, f2b :: Integral a => a -> a
> |
> | f2a = f1 functions
> | f2b x = x
> |
> |
> | is accepted by GHC, but if I change
> | f2 = f2b
> | to
> | f2 = f2a
> | in the definition of `functions', GHC says
> |
> | Mismatched contexts
> | When m
1 December 2003 16:46
| To: [EMAIL PROTECTED]
| Subject: Mismatched contexts
|
| Hello,
|
| I observed the following behavior on GHC-6.0.1 and CVS HEAD.
| With -fglasgow-exts the following program
|
|
| data Functions =
| Functions { f1, f2 :: Integral a => a -> a }
|
| functi
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
f2a, f2b :: Integral a => a -> a
f2a = f1 functions
f2b x = x
is accepted by GHC, but if I change
f2 = f2b
to
f2 = f2a
in the definition of `functions', GHC says
Mismatched contexts
When matching the contexts of the signatures for
functions :: Functions
f2a ::