[GHC] #5462: Deriving clause for arbitrary classes

GHC cvs-ghc at haskell.org
Fri Sep 9 18:37:09 CEST 2011


#5462: Deriving clause for arbitrary classes
---------------------------------+------------------------------------------
    Reporter:  simonpj           |        Owner:              
        Type:  feature request   |       Status:  new         
    Priority:  normal            |    Milestone:              
   Component:  Compiler          |      Version:  7.2.1       
    Keywords:                    |     Testcase:              
   Blockedby:                    |   Difficulty:              
          Os:  Unknown/Multiple  |     Blocking:              
Architecture:  Unknown/Multiple  |      Failure:  None/Unknown
---------------------------------+------------------------------------------

Comment(by dterei):

 Replying to [comment:12 simonpj]:
 > Remember it is '''always''' legal to say
 > {{{
 > instance C (T a) where {}
 > }}}
 > becuase the compiler will fill in a bunch of defaults from the class
 decl, or error thunks if you supplied none.  It's just not usually
 ''useful'' to do so.

 Ahh I wasn't aware you could do this. OK, well are there any downsides to
 the list of requirements you proposed? They are what I was imagining
 myself as my context for all of this is the new Pedro stuff.

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



More information about the Glasgow-haskell-bugs mailing list