"The signature contexts in a mutually recursive group should all be
identical"; why?
George Russell
ger at tzi.de
Wed Dec 19 07:21:57 EST 2001
The attached file doesn't compile (ghc -fglasgow-exts), with the message
RecContext.hs:12:
Mismatched contexts
When matching the contexts of the signatures for
g :: forall a b. (Silly a b) => a -> b -> SillyType a -> [String]
f :: forall a. SillyType a -> [String]
The signature contexts in a mutually recursive group should all be identical
When generalising the type(s) for g, f
This seems strange. f can't have the context Silly a b, as b doesn't occur in its
signature and is introduced later as part of an existential constructor . . .
I know this code looks pretty pointless. If you want to see the Real World 450 line
module which provoked the message, do ask, but only if you like having your brain
curdled by mixtures of dependent types, existential types and overlapping multi-parameter
type classes . . .
-------------- next part --------------
A non-text attachment was scrubbed...
Name: RecContext.hs
Type: application/octet-stream
Size: 342 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/glasgow-haskell-bugs/attachments/20011219/930bc59e/RecContext.obj
More information about the Glasgow-haskell-bugs
mailing list