summaryrefslogtreecommitdiff
path: root/compiler/GHC/Parser.y
diff options
context:
space:
mode:
authorDaniel Rogozin <daniel.rogozin@serokell.io>2021-04-20 19:22:56 +0300
committerDaniel Rogozin <daniel.rogozin@serokell.io>2021-04-23 19:59:16 +0300
commit62fbbe95ad21af5a1db3292622d39f1444f52b75 (patch)
tree4543825759492a9bd7636a8489fccb9c6e9cbf59 /compiler/GHC/Parser.y
parentd1acda985696f2e828452e246686fb35294bb7fa (diff)
downloadhaskell-wip/T17594.tar.gz
Diffstat (limited to 'compiler/GHC/Parser.y')
-rw-r--r--compiler/GHC/Parser.y11
1 files changed, 9 insertions, 2 deletions
diff --git a/compiler/GHC/Parser.y b/compiler/GHC/Parser.y
index 356a728b23..d0c27ac25b 100644
--- a/compiler/GHC/Parser.y
+++ b/compiler/GHC/Parser.y
@@ -2778,7 +2778,7 @@ aexp :: { ECP }
unECP $2 >>= \ $2 ->
mkHsNegAppPV (comb2A $1 $>) $2 [mj AnnMinus $1] }
- | '\\' apat apats '->' exp
+ | '\\' typats apats '->' exp
{ ECP $
unECP $5 >>= \ $5 ->
mkHsLamPV (comb2 $1 (reLoc $>)) (\cs -> mkMatchGroup FromSource
@@ -2786,7 +2786,7 @@ aexp :: { ECP }
[reLocA $ sLLlA $1 $>
$ Match { m_ext = EpAnn (glR $1) [mj AnnLam $1] cs
, m_ctxt = LambdaExpr
- , m_pats = $2:$3
+ , m_pats = $3
, m_grhss = unguardedGRHSs (comb2 $4 (reLoc $5)) $5 (EpAnn (glR $4) (GrhsAnn Nothing (mu AnnRarrow $4)) noCom) }])) }
| 'let' binds 'in' exp { ECP $
unECP $4 >>= \ $4 ->
@@ -3284,6 +3284,13 @@ apats :: { [LPat GhcPs] }
: apat apats { $1 : $2 }
| {- empty -} { [] }
+typat :: { LHsTyVarBndr Specificity GhcPs }
+ : PREFIX_AT tv_bndr { $2 }
+
+typats :: { [LHsTyVarBndr Specificity GhcPs] }
+ : typat typats { $1 : $2 }
+ | {- empty -} { [] }
+
-----------------------------------------------------------------------------
-- Statement sequences