diff options
author | Alan Zimmerman <alan.zimm@gmail.com> | 2020-08-10 23:32:26 +0100 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2020-09-18 08:38:29 -0400 |
commit | 23f34f7be335f94dcebb7459008d4b1cfa926e3e (patch) | |
tree | 40fe4cd9e146505b1d524007447f9ff51d9eb06f | |
parent | d16223fdc730609fa1f765034904b6d6b5e58335 (diff) | |
download | haskell-23f34f7be335f94dcebb7459008d4b1cfa926e3e.tar.gz |
ApiAnnotations: Fix parser for new GHC 9.0 features
(cherry picked from commit 0f4d29cac3826392ceb26ea219fce6e8a7505107)
-rw-r--r-- | compiler/GHC/Parser.y | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/compiler/GHC/Parser.y b/compiler/GHC/Parser.y index a5adaf9219..14b3c9f71c 100644 --- a/compiler/GHC/Parser.y +++ b/compiler/GHC/Parser.y @@ -1961,7 +1961,7 @@ type :: { LHsType GhcPs } | btype '#->' ctype {% hintLinear (getLoc $2) >> ams (sLL $1 $> $ HsFunTy noExtField HsLinearArrow $1 $3) - [mu AnnRarrow $2] } + [mu AnnLolly $2] } mult :: { LHsType GhcPs } : btype { $1 } @@ -2080,10 +2080,10 @@ tv_bndrs :: { [LHsTyVarBndr Specificity GhcPs] } tv_bndr :: { LHsTyVarBndr Specificity GhcPs } : tv_bndr_no_braces { $1 } | '{' tyvar '}' {% ams (sLL $1 $> (UserTyVar noExtField InferredSpec $2)) - [mop $1, mcp $3] } + [moc $1, mcc $3] } | '{' tyvar '::' kind '}' {% ams (sLL $1 $> (KindedTyVar noExtField InferredSpec $2 $4)) - [mop $1,mu AnnDcolon $3 - ,mcp $5] } + [moc $1,mu AnnDcolon $3 + ,mcc $5] } tv_bndr_no_braces :: { LHsTyVarBndr Specificity GhcPs } : tyvar { sL1 $1 (UserTyVar noExtField SpecifiedSpec $1) } @@ -3717,6 +3717,7 @@ isUnicode (L _ (ITcparenbar iu)) = iu == UnicodeSyntax isUnicode (L _ (ITopenExpQuote _ iu)) = iu == UnicodeSyntax isUnicode (L _ (ITcloseQuote iu)) = iu == UnicodeSyntax isUnicode (L _ (ITstar iu)) = iu == UnicodeSyntax +isUnicode (L _ (ITlolly iu)) = iu == UnicodeSyntax isUnicode _ = False hasE :: Located Token -> Bool |