Re: Mismatched contexts

2003-12-15 Thread Armin Größlinger
, 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

RE: Mismatched contexts

2003-12-15 Thread Simon Peyton-Jones
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

Mismatched contexts

2003-12-03 Thread Tom Pledger
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

Mismatched contexts

2003-12-03 Thread Armin Größlinger
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 ::