Commit e13260bd authored by chak@cse.unsw.edu.au.'s avatar chak@cse.unsw.edu.au.

Fix parsing of parallel array literals

parent 276a4524
......@@ -51,6 +51,17 @@ import Control.Monad ( mplus )
}
{-
-----------------------------------------------------------------------------
24 Februar 2006
Conflicts: 33 shift/reduce
1 reduce/reduce
The reduce/reduce conflict is weird. It's between tyconsym and consym, and I
would think the two should never occur in the same context.
-=chak
-----------------------------------------------------------------------------
31 December 2006
......@@ -1434,12 +1445,12 @@ quals :: { Located [LStmt RdrName] }
parr :: { LHsExpr RdrName }
: { noLoc (ExplicitPArr placeHolderType []) }
| exp { L1 $ ExplicitPArr placeHolderType [$1] }
| texp { L1 $ ExplicitPArr placeHolderType [$1] }
| lexps { L1 $ ExplicitPArr placeHolderType
(reverse (unLoc $1)) }
| exp '..' exp { LL $ PArrSeq noPostTcExpr (FromTo $1 $3) }
| exp ',' exp '..' exp { LL $ PArrSeq noPostTcExpr (FromThenTo $1 $3 $5) }
| exp pquals { sL (comb2 $1 $>) $ mkHsDo PArrComp (reverse (unLoc $2)) $1 }
| texp '..' exp { LL $ PArrSeq noPostTcExpr (FromTo $1 $3) }
| texp ',' exp '..' exp { LL $ PArrSeq noPostTcExpr (FromThenTo $1 $3 $5) }
| texp pquals { sL (comb2 $1 $>) $ mkHsDo PArrComp (reverse (unLoc $2)) $1 }
-- We are reusing `lexps' and `pquals' from the list case.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment