diff options
author | Ian Lynagh <igloo@earth.li> | 2008-01-24 18:31:42 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2008-01-24 18:31:42 +0000 |
commit | 351e8d3641128e37d32dd35179a19c0b3350661b (patch) | |
tree | f285c6085ea45c06e0dbb08868cd9b708f028c83 /compiler/parser | |
parent | f64a432bfebd80b421d7a8bbbefc3b8aeebec2e0 (diff) | |
download | haskell-351e8d3641128e37d32dd35179a19c0b3350661b.tar.gz |
Strictness tweaks
Diffstat (limited to 'compiler/parser')
-rw-r--r-- | compiler/parser/Parser.y.pp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/compiler/parser/Parser.y.pp b/compiler/parser/Parser.y.pp index 515c474422..8c4b03fb21 100644 --- a/compiler/parser/Parser.y.pp +++ b/compiler/parser/Parser.y.pp @@ -822,7 +822,11 @@ where_inst :: { Located (OrdList (LHsDecl RdrName)) } -- Reversed -- Declarations in binding groups other than classes and instances -- decls :: { Located (OrdList (LHsDecl RdrName)) } - : decls ';' decl { LL (unLoc $1 `appOL` unLoc $3) } + : decls ';' decl { let { this = unLoc $3; + rest = unLoc $1; + these = unLoc $1 `appOL` unLoc $3 } + in rest `seq` this `seq` these `seq` + LL these } | decls ';' { LL (unLoc $1) } | decl { $1 } | {- empty -} { noLoc nilOL } @@ -1625,9 +1629,10 @@ fbind :: { HsRecField RdrName (LHsExpr RdrName) } -- Implicit Parameter Bindings dbinds :: { Located [LIPBind RdrName] } - : dbinds ';' dbind { LL ($3 : unLoc $1) } + : dbinds ';' dbind { let { this = $3; rest = unLoc $1 } + in rest `seq` this `seq` LL (this : rest) } | dbinds ';' { LL (unLoc $1) } - | dbind { L1 [$1] } + | dbind { let this = $1 in this `seq` L1 [this] } -- | {- empty -} { [] } dbind :: { LIPBind RdrName } |