Bugs item #978107, was opened at 2004-06-23 11:11
Message generated for change (Settings changed) made by rosspaterson
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=108032&aid=978107&group_id=8032

Category: Compiler (Parser)
Group: 6.2
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: John Hughes (rjmh)
Assigned to: Nobody/Anonymous (nobody)
Summary: arrow notation example can't be parsed

Initial Comment:
This expression can't be parsed:

bug f g = proc x -> f >>> g -< x

Brackets are needed around f>>>g to get it through the 
parser. Can't see any justification for this -- the 
documentation suggests any expression is allowed 
before -<, and indeed, >>> cannot be confused with a 
command operator because f is not a command.

Are you parsing -< as an operator with a precedence 
greater than >>>? Hard to see otherwise why this 
doesn't parse.

John

----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2004-06-23 13:17

Message:
Logged In: NO 

The grammar in the documentation is imprecise.  In essence,
this problem is another instance of the old
if/lambda/let/case vs infix ambiguity (complicated because
GHC parses cmd as exp). I was ducking the conflicts by having

        cmd ::= fexp -< exp

but I'll change that to
 
        cmd ::= exp0 -< exp

(adding 4 shift/reduce conflicts) because the default
conflict resolution in favour of shift is the sensible thing
here.  And I'll fix the documentation.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=108032&aid=978107&group_id=8032
_______________________________________________
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to