#7395: DefaultSignatures conflict with default implementations
----------------------------------+-----------------------------------------
    Reporter:  cgaebel            |       Owner:                           
        Type:  bug                |      Status:  new                      
    Priority:  normal             |   Milestone:                           
   Component:  Compiler           |     Version:  7.6.1                    
    Keywords:  DefaultSignatures  |          Os:  Unknown/Multiple         
Architecture:  Unknown/Multiple   |     Failure:  GHC rejects valid program
  Difficulty:  Unknown            |    Testcase:                           
   Blockedby:                     |    Blocking:                           
     Related:                     |  
----------------------------------+-----------------------------------------

Comment(by hvr):

 just a thought:

 ...what if the default-signature implementation would be only selectable
 by using the `deriving` facilities for auto-derivable classes? I.e. by
 using

 {{{
 #!hs
 data A = A { unA :: Int }
     deriving (Generic,Klass)
 }}}
 or
 {{{
 #!hs
 data A = A { unA :: Int }
     deriving Generic

 deriving instance Klass A
 }}}

 would both result in `A` getting the default-signature based
 implementation, wheras

 {{{
 #!hs
 data A = A { unA :: Int }
     deriving Generic

 instance Klass A
 }}}

 would get the "ordinary" default implementation (as if the default-
 signature implementation wasn't there). Wouldn't this help the issue at
 hand by making the choice explicit?

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7395#comment:7>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to