Posted on Aug 8, 2007 by
Quick Hippo
This code doesn't work:
test :: Eq a => a -> Bool test a = f a where (f) = \a -> (==) a a
-- during after type inference/checking Error: Context for Prelude.Eq needed in left hand pattern at 8:5.
Removing the brackets makes it work. I suspect the problem is in the type checker, but perhaps the parser should be removing the brackets from the AST before this point.
Status: Accepted
Labels:
Type-Defect
Priority-Low
Component-Yhc