precedence of '::' and '->'

0 views
Skip to first unread message

Geoffrey Irving

unread,
Sep 3, 2009, 9:42:34 AM9/3/09
to Dylan Alex Simon, duck...@googlegroups.com
> Unrelated: I've been making a mess of Pretty and precedence lately, and
> noticed how we're parsing '::' and '->'. Are you sure you like their current
> relative precedences?
>
> 1 :: 2 -> 3 :: 4
>
> Seems like it should be:
>
> (1 :: 2) -> (3 :: 4)
>
> Not parse failure. I think.

I think I settled on that precedence largely for an artificial reason
related to the grammar, which may no longer apply now that we do more
two-phase parsing. Therefore, I'd be willing to switch. The only
example I have of where the current order is nice is

x -> x :: x -> x

which is, of course, a gimmick.

Geoffrey

Reply all
Reply to author
Forward
0 new messages