[Haskell-cafe] Strange Type Inference

C.M.Brown cmb21 at kent.ac.uk
Mon Nov 5 17:02:42 EST 2007

> Yes, using a ghc extension of scoped type variables.  In the signature
> of testFunction, if you explicitly quantify all your variables with
> forall, then they are visible in the where clause (and elsewhere in
> the function).

Perfect! But how come if I have:

testFunction :: forall a b. Ord a => Map.Map a b -> Map.Map a b -> a ->
(Maybe b, Maybe b)

I get:

Test1.hs:6:34: parse error on input `=>'

Is the syntax incorrect?

Many thanks

More information about the Haskell-Cafe mailing list