Make the parser a bit stricter
authorIan Lynagh <igloo@earth.li>
Mon, 18 Feb 2008 17:55:14 +0000 (17:55 +0000)
committerIan Lynagh <igloo@earth.li>
Mon, 18 Feb 2008 17:55:14 +0000 (17:55 +0000)
compiler/parser/Parser.y.pp

index cb25136..32ab991 100644 (file)
@@ -1441,7 +1441,7 @@ list :: { LHsExpr RdrName }
        | texp '|' flattenedpquals      { sL (comb2 $1 $>) $ mkHsDo ListComp (unLoc $3) $1 }
 
 lexps :: { Located [LHsExpr RdrName] }
-       : lexps ',' texp                { LL ($3 : unLoc $1) }
+       : lexps ',' texp                { LL (((:) $! $3) $! unLoc $1) }
        | texp ',' texp                 { LL [$3,$1] }
 
 -----------------------------------------------------------------------------