summaryrefslogtreecommitdiff
path: root/compiler/parser/Parser.y
diff options
context:
space:
mode:
authorAlan Zimmerman <alan.zimm@gmail.com>2016-05-25 00:09:34 +0200
committerAlan Zimmerman <alan.zimm@gmail.com>2016-06-06 20:04:43 +0200
commit306ecad591951521ac3f5888ca8be85bf749d271 (patch)
tree1f6d154698f022b76042b1b796ca0ed959a2b201 /compiler/parser/Parser.y
parent1937ef1c506b538f0f93cd290fa4a42fc85ab769 (diff)
downloadhaskell-wip/T12105.tar.gz
Merge MatchFixity and HsMatchContextwip/T12105
Summary: MatchFixity was introduced to facilitate use of API Annotations. HsMatchContext does the same thing with more detail, but is chased through all over the place to provide context when processing a Match. Since we already have MatchFixity in the Match, it may as well provide the full context. updates submodule haddock Test Plan: ./validate Reviewers: austin, goldfire, bgamari Subscribers: thomie, mpickering Differential Revision: https://phabricator.haskell.org/D2271 GHC Trac Issues: #12105
Diffstat (limited to 'compiler/parser/Parser.y')
-rw-r--r--compiler/parser/Parser.y4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/parser/Parser.y b/compiler/parser/Parser.y
index e1c8559933..b0b64aea5c 100644
--- a/compiler/parser/Parser.y
+++ b/compiler/parser/Parser.y
@@ -2131,7 +2131,7 @@ infixexp :: { LHsExpr RdrName }
exp10 :: { LHsExpr RdrName }
: '\\' apat apats opt_asig '->' exp
{% ams (sLL $1 $> $ HsLam (mkMatchGroup FromSource
- [sLL $1 $> $ Match { m_fixity = NonFunBindMatch
+ [sLL $1 $> $ Match { m_ctxt = LambdaExpr
, m_pats = $2:$3
, m_type = snd $4
, m_grhss = unguardedGRHSs $6 }]))
@@ -2550,7 +2550,7 @@ alts1 :: { Located ([AddAnn],[LMatch RdrName (LHsExpr RdrName)]) }
| alt { sL1 $1 ([],[$1]) }
alt :: { LMatch RdrName (LHsExpr RdrName) }
- : pat opt_asig alt_rhs {%ams (sLL $1 $> (Match { m_fixity = NonFunBindMatch
+ : pat opt_asig alt_rhs {%ams (sLL $1 $> (Match { m_ctxt = CaseAlt
, m_pats = [$1]
, m_type = snd $2
, m_grhss = snd $ unLoc $3 }))