logo       

Mismatched contexts: msg#00002

lang.haskell.glasgow.bugs

Subject: Mismatched contexts

Armin Größlinger writes:
:
| GHC says
|
| Mismatched contexts
| When matching the contexts of the signatures for
| functions :: Functions
| f2a :: forall a. (Integral a) => a -> a
| The signature contexts in a mutually recursive group
| should all be identical
| When generalising the type(s) for functions, f2a
:
| I don't understand why the contexts must be identical in mutually
| recursive definitions.
:

Hi.

I don't know why that particular example was rejected, but if you're
after some general discussion of contexts in mutually recursive
groups, see section 11.6.3 of Typing Haskell in Haskell
(http://www.cse.ogi.edu/~mpj/thih/).

Regards,
Tom


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise