#5462: Deriving clause for arbitrary classes
---------------------------------+------------------------------------------
Reporter: simonpj | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: 7.6.1
Component: Compiler | Version: 7.2.1
Keywords: | Os: Unknown/Multiple
Architecture: Unknown/Multiple | Failure: None/Unknown
Difficulty: | Testcase:
Blockedby: | Blocking:
Related: |
---------------------------------+------------------------------------------
Comment(by mux):
I would be in favor of this too; but since I'm not entirely sure what the
original proposal meant exactly, let me state what I think the semantics
should be.
I think that this should be strictly syntactic sugar, without any compiler
logic behind it. So:
{{{
data T = ... deriving C
}}}
would get translated to:
{{{
instance C T
}}}
The intent is to keep things as simple as possible. As a consequence,
trying to add some class to a deriving clause would fail if it requires a
context, exactly in the same way as an "instance C T" without any context
would.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5462#comment:18>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs