From eeaea2df3fa585db503034f419c6e4331a4d8a84 Mon Sep 17 00:00:00 2001 From: "Dr. ERDI Gergo" Date: Sat, 12 Apr 2014 19:36:31 +0800 Subject: Instead of tracking Origin in LHsBindsLR, track it in MatchGroup --- compiler/parser/Parser.y.pp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'compiler/parser/Parser.y.pp') diff --git a/compiler/parser/Parser.y.pp b/compiler/parser/Parser.y.pp index 8e4da8ce2b..4f4ec0b123 100644 --- a/compiler/parser/Parser.y.pp +++ b/compiler/parser/Parser.y.pp @@ -1476,18 +1476,18 @@ infixexp :: { LHsExpr RdrName } exp10 :: { LHsExpr RdrName } : '\\' apat apats opt_asig '->' exp - { LL $ HsLam (mkMatchGroup [LL $ Match ($2:$3) $4 + { LL $ HsLam (mkMatchGroup FromSource [LL $ Match ($2:$3) $4 (unguardedGRHSs $6) - ]) } + ]) } | 'let' binds 'in' exp { LL $ HsLet (unLoc $2) $4 } | '\\' 'lcase' altslist - { LL $ HsLamCase placeHolderType (mkMatchGroup (unLoc $3)) } + { LL $ HsLamCase placeHolderType (mkMatchGroup FromSource (unLoc $3)) } | 'if' exp optSemi 'then' exp optSemi 'else' exp {% checkDoAndIfThenElse $2 $3 $5 $6 $8 >> return (LL $ mkHsIf $2 $5 $8) } | 'if' ifgdpats {% hintMultiWayIf (getLoc $1) >> return (LL $ HsMultiIf placeHolderType (reverse $ unLoc $2)) } - | 'case' exp 'of' altslist { LL $ HsCase $2 (mkMatchGroup (unLoc $4)) } + | 'case' exp 'of' altslist { LL $ HsCase $2 (mkMatchGroup FromSource (unLoc $4)) } | '-' fexp { LL $ NegApp $2 noSyntaxExpr } | 'do' stmtlist { L (comb2 $1 $2) (mkHsDo DoExpr (unLoc $2)) } -- cgit v1.2.1