A couple more parser tweaks
authorIan Lynagh <igloo@earth.li>
Fri, 25 Jan 2008 14:34:21 +0000 (14:34 +0000)
committerIan Lynagh <igloo@earth.li>
Fri, 25 Jan 2008 14:34:21 +0000 (14:34 +0000)
compiler/parser/Lexer.x
compiler/parser/Parser.y.pp

index 8d2a9a5..3ba0b1e 100644 (file)
@@ -920,6 +920,7 @@ splitQualName orig_buf len = split orig_buf orig_buf
        qual_size = orig_buf `byteDiff` dot_buf
 
 varid span buf len = 
+  fs `seq`
   case lookupUFM reservedWordsFM fs of
        Just (keyword,0)    -> do
                maybe_layout keyword
index 06e55ff..418f0a1 100644 (file)
@@ -824,7 +824,7 @@ where_inst :: { Located (OrdList (LHsDecl RdrName)) }       -- Reversed
 decls  :: { Located (OrdList (LHsDecl RdrName)) }      
        : decls ';' decl                { let { this = unLoc $3;
                                     rest = unLoc $1;
-                                    these = unLoc $1 `appOL` unLoc $3 }
+                                    these = rest `appOL` this }
                               in rest `seq` this `seq` these `seq`
                                     LL these }
        | decls ';'                     { LL (unLoc $1) }