[GHC] #5462: Deriving clause for arbitrary classes

GHC cvs-ghc at haskell.org
Tue Sep 6 11:47:55 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 guest):

 I would argue that it is worth the extra compactness, in that I want
 to be able to teach this to first years.  I don't want to teach them
 to use

  ... deriving Show

 to get unpretty printing, but then they have to use the more long-winded

  instance (Pretty a, Pretty b) => Pretty (Tree a b)

 to get pretty printing.  If it's good for the goose (your built-in
 derived types) it's good for the gander (my custom derived types).

 -- Philip Wadler (logged in as guest because the registration function is
 buggy)

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



More information about the Glasgow-haskell-bugs mailing list