Missed suggestion with context on foralls
Given the program:
module Test where
test :: forall a . a -> a
test = id
I get the nice and helpful error message:
Test.hs:3:17:
Illegal operator `.' in type `forall a . (a -> a)'
Perhaps you intended to use -XRankNTypes or similar flag
to enable explicit-forall syntax: forall <tvs>. <type>
[I personally usually want ScopedTypeVariables
rather than RankNTypes
, but its still a very useful hint at where to look]
However, trying the program:
module Test where
test :: forall a . Eq a => a -> a
test = id
Gives:
Test.hs:3:24: parse error on input `=>'
I think it would be helpful to give the same suggestion as above.
-- Neil