#4529: Deriving Data does not work for attached code
---------------------------------+------------------------------------------
Reporter: mitar | Owner:
Type: bug | Status: new
Priority: normal | Component: Compiler (Type checker)
Version: 7.1 | Keywords:
Testcase: | Blockedby:
Os: Unknown/Multiple | Blocking:
Architecture: Unknown/Multiple | Failure: None/Unknown
---------------------------------+------------------------------------------
For attached code I get this error:
{{{
Test2.hs:19:48:
Could not deduce (Real r, Random r)
from the context (Data r, Typeable1 t)
arising from a use of `f'
Possible fix:
add (Real r, Random r) to the context of
the type signature for `dataCast1'
or the instance declaration
In the first argument of `gcast1', namely `f'
In the expression: gcast1 f
In an equation for `dataCast1': dataCast1 f = gcast1 f
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4529>
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