summaryrefslogtreecommitdiff
path: root/compiler/GHC/Parser.y
diff options
context:
space:
mode:
authorAlexis King <lexi.lambda@gmail.com>2020-04-19 20:11:37 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-04-30 01:57:35 -0400
commita48cd2a045695c5f34ed7b00184a8d91c4fcac0e (patch)
tree526d1b2e19ce1b8ffcaeb73688999a255de2ef2e /compiler/GHC/Parser.y
parent71484b09fa3c676e99785b3d68f69d4cfb14266e (diff)
downloadhaskell-a48cd2a045695c5f34ed7b00184a8d91c4fcac0e.tar.gz
Allow LambdaCase to be used as a command in proc notation
Diffstat (limited to 'compiler/GHC/Parser.y')
-rw-r--r--compiler/GHC/Parser.y7
1 files changed, 3 insertions, 4 deletions
diff --git a/compiler/GHC/Parser.y b/compiler/GHC/Parser.y
index 34d46fd4db..bafed741be 100644
--- a/compiler/GHC/Parser.y
+++ b/compiler/GHC/Parser.y
@@ -2765,11 +2765,10 @@ aexp :: { ECP }
(mj AnnLet $1:mj AnnIn $3
:(fst $ unLoc $2)) }
| '\\' 'lcase' altslist
- {% runPV $3 >>= \ $3 ->
- fmap ecpFromExp $
- ams (sLL $1 $> $ HsLamCase noExtField
+ { ECP $ $3 >>= \ $3 ->
+ amms (mkHsLamCasePV (comb2 $1 $>)
(mkMatchGroup FromSource (snd $ unLoc $3)))
- (mj AnnLam $1:mj AnnCase $2:(fst $ unLoc $3)) }
+ (mj AnnLam $1:mj AnnCase $2:(fst $ unLoc $3)) }
| 'if' exp optSemi 'then' exp optSemi 'else' exp
{% runECP_P $2 >>= \ $2 ->
return $ ECP $