1 Dec 2003 17:45
Mismatched contexts
Armin Größlinger <groessli <at> fmi.uni-passau.de>
2003-12-01 16:45:49 GMT
2003-12-01 16:45:49 GMT
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 }
functions :: Functions
functions =
Functions { f1 = (\x -> x),
f2 = f2b
}
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 :: forall a. (Integral a) => a -> a
The signature contexts in a mutually recursive group
(Continue reading)
RSS Feed