> In Haskell, the precedence of type annotation is very low. This has the > consequence that type annotation lacks a certain symmetry: > > a:int + b => (a:int) + b > a+b:int => (a+b):int > f a + b:int => ((f a) + b):int > a + f b :int => (a + (f b)):int
I think you've misunderstood the Haskell grammar. The first of your examples, even after replacing : with ::, is a syntax error. The second is an example of valid syntax (infixexp :: type). And lines three and four are just special cases of the second, remembering that function application has higher precedence than any infix operator. These details may be irrelevant to your main point, but I'm not seeing the lack of symmetry that you mention. All the best, Mark _______________________________________________ bitc-dev mailing list [email protected] http://www.coyotos.org/mailman/listinfo/bitc-dev
