Malformed class assertion with GHCi's output (a -> a ~ T a)
leather at cs.uu.nl
Tue Sep 15 07:50:45 EDT 2009
I queried (:t) the type of something in GHCi, and it told me the value
should have the constraint (a -> a ~ T a) among others. When I tried to use
this in code, I got a "malformed class assertion." So, I put parentheses
around the function type, ((a -> a) ~ T a), and everybody is happy again. Is
there something off about the precedence of (~) vs. (->)? Should GHCi print
I'm using GHC 6.10.1, so this might already be fixed.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Glasgow-haskell-users