logo       

[ ghc-Bugs-1191681 ] parse error on input: msg#00142

lang.haskell.glasgow.bugs

Subject: [ ghc-Bugs-1191681 ] parse error on input

Bugs item #1191681, was opened at 2005-04-28 06:07
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=108032&aid=1191681&group_id=8032

Category: Compiler
Group: 6.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: parse error on input

Initial Comment:
On GHC 6.4 on Mac OS X 10.3.9, the one-line file (t.hs) with
exactly the following contents

module A where m=(\n->n+)

incorrectly produces a syntax error:

~/working/bugs% ghc -c t.hs

t.hs:1:25: parse error on input `)'

The + can be replaced with - or * or > and will still produce the
same error.

AND the following one-line file (t1.hs)

module A where m=\n->n

produces the error

t1.hs:1:19: parse error on input `->'

BUT, adding a space after the = produces no error (t2.hs):

module A where m= \n->n

(Maybe =\ is parsed as one token. But that doesn't explain t.hs,
to which a space can be added and the problem doesn't go
away.)

--
Robin Bate Boerop
robin@xxxxxxxxxxxxxxx

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

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=108032&aid=1191681&group_id=8032


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise