Thanks.   I’ve fixed this.

 

Ian: pls merge if time.

 

Simon

 

Fri Oct  2 12:15:49 BST 2009  simonpj@microsoft.com

  * Fix pretty-printing precedence for equality constraints

 

    M ./compiler/types/TypeRep.lhs -1 +7

 

 

From: glasgow-haskell-users-bounces@haskell.org [mailto:glasgow-haskell-users-bounces@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