
5 Nov
2007
5 Nov
'07
5:02 p.m.
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 Chris.