[GHC] #5462: Deriving clause for arbitrary classes
GHC
cvs-ghc at haskell.org
Fri Sep 16 22:40:46 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 hvr):
Replying to [comment:14 guest]:
> I'd think getting a boring instance of default methods is precisely what
s/he would expect if deriving from a class w/o any default method
signatures. So why not let him/her have it? Apart from probable
uselessness, is there a price to be payed by such a choice?
How would this interact with the GeneralizedNewtypeDeriving extension?
Could there be cases where the code compiles fine with and without
GeneralizedNewtypeDeriving, but in the first case the wrapped types'
instance methods are "inherited", and in the second case the default
methods of the typeclass would be used. Would this be a bad thing if
switching on language extensions changes the semantics of the program (w/o
any visible compile warning)?
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5462#comment:15>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list