[GHC] #5462: Deriving clause for arbitrary classes
GHC
cvs-ghc at haskell.org
Thu Sep 8 20:18: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:9 simonpj]:
> But I'm not sure whether that is what you meant.
Yes that is what I meant. Basically GHC should set a list of requirements
that must be met (chosen so GHC has enough information to correctly
derive) and if a class meets that you can put it in a deriving clause.
Otherwise if you put it in a deriving clause you'll get an error message
like you currently do.
The proposed DERIVE pragma is the same as this anyway except I guess you
could throw an error earlier and maybe a little more informative if you
encounter a class that has the pragma but doesn't meet the requirements.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5462#comment:10>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list