From: Ian Lynagh Date: Thu, 24 Jan 2008 15:20:00 +0000 (+0000) Subject: Get a bit of sharing X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=bf1cff988c19adb2937294e41f6d0a0f41f1168d Get a bit of sharing --- diff --git a/compiler/parser/Parser.y.pp b/compiler/parser/Parser.y.pp index 7104a0d..515c474 100644 --- a/compiler/parser/Parser.y.pp +++ b/compiler/parser/Parser.y.pp @@ -1221,8 +1221,9 @@ decl :: { Located (OrdList (LHsDecl RdrName)) } return (LL $ unitOL $ LL $ ValD ( PatBind (LL $ BangPat pat) (unLoc $3) placeHolderType placeHolderNames)) } } - | infixexp opt_sig rhs {% do { r <- checkValDef $1 $2 $3; - return $! (LL $! (unitOL $! (LL $ ValD r))) } } + | infixexp opt_sig rhs {% do { r <- checkValDef $1 $2 $3; + let { l = comb2 $1 $> }; + return $! (sL l (unitOL $! (sL l $ ValD r))) } } | docdecl { LL $ unitOL $1 } rhs :: { Located (GRHSs RdrName) }