Malformed class assertion with GHCi's output (a -> a ~ T a)
Simon Peyton-Jones
simonpj at microsoft.com
Fri Oct 2 07:16:50 EDT 2009
Thanks. I've fixed this.
Ian: pls merge if time.
Simon
Fri Oct 2 12:15:49 BST 2009 simonpj at microsoft.com
* Fix pretty-printing precedence for equality constraints
M ./compiler/types/TypeRep.lhs -1 +7
From: glasgow-haskell-users-bounces at haskell.org [mailto:glasgow-haskell-users-bounces at haskell.org] On Behalf Of Sean Leather
Sent: 15 September 2009 12:51
To: GHC Users List
Subject: Malformed class assertion with GHCi's output (a -> a ~ T a)
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 the parentheses?
I'm using GHC 6.10.1, so this might already be fixed.
Regards,
Sean
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/glasgow-haskell-users/attachments/20091002/8901cb12/attachment-0001.html
More information about the Glasgow-haskell-users
mailing list