Skip to content
Snippets Groups Projects
Commit d88bc94a authored by Alan Zimmerman's avatar Alan Zimmerman
Browse files

ApiAnnotations: Fix parser for new GHC 9.0 features

parent 8dbee2c5
No related branches found
Tags 0.2.1.0
No related merge requests found
Pipeline #23240 failed
...@@ -1961,7 +1961,7 @@ type :: { LHsType GhcPs } ...@@ -1961,7 +1961,7 @@ type :: { LHsType GhcPs }
| btype '#->' ctype {% hintLinear (getLoc $2) >> | btype '#->' ctype {% hintLinear (getLoc $2) >>
ams (sLL $1 $> $ HsFunTy noExtField HsLinearArrow $1 $3) ams (sLL $1 $> $ HsFunTy noExtField HsLinearArrow $1 $3)
[mu AnnRarrow $2] } [mu AnnLolly $2] }
mult :: { LHsType GhcPs } mult :: { LHsType GhcPs }
: btype { $1 } : btype { $1 }
...@@ -2080,10 +2080,10 @@ tv_bndrs :: { [LHsTyVarBndr Specificity GhcPs] } ...@@ -2080,10 +2080,10 @@ tv_bndrs :: { [LHsTyVarBndr Specificity GhcPs] }
tv_bndr :: { LHsTyVarBndr Specificity GhcPs } tv_bndr :: { LHsTyVarBndr Specificity GhcPs }
: tv_bndr_no_braces { $1 } : tv_bndr_no_braces { $1 }
| '{' tyvar '}' {% ams (sLL $1 $> (UserTyVar noExtField InferredSpec $2)) | '{' 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)) | '{' tyvar '::' kind '}' {% ams (sLL $1 $> (KindedTyVar noExtField InferredSpec $2 $4))
[mop $1,mu AnnDcolon $3 [moc $1,mu AnnDcolon $3
,mcp $5] } ,mcc $5] }
tv_bndr_no_braces :: { LHsTyVarBndr Specificity GhcPs } tv_bndr_no_braces :: { LHsTyVarBndr Specificity GhcPs }
: tyvar { sL1 $1 (UserTyVar noExtField SpecifiedSpec $1) } : tyvar { sL1 $1 (UserTyVar noExtField SpecifiedSpec $1) }
...@@ -3717,6 +3717,7 @@ isUnicode (L _ (ITcparenbar iu)) = iu == UnicodeSyntax ...@@ -3717,6 +3717,7 @@ isUnicode (L _ (ITcparenbar iu)) = iu == UnicodeSyntax
isUnicode (L _ (ITopenExpQuote _ iu)) = iu == UnicodeSyntax isUnicode (L _ (ITopenExpQuote _ iu)) = iu == UnicodeSyntax
isUnicode (L _ (ITcloseQuote iu)) = iu == UnicodeSyntax isUnicode (L _ (ITcloseQuote iu)) = iu == UnicodeSyntax
isUnicode (L _ (ITstar iu)) = iu == UnicodeSyntax isUnicode (L _ (ITstar iu)) = iu == UnicodeSyntax
isUnicode (L _ (ITlolly iu)) = iu == UnicodeSyntax
isUnicode _ = False isUnicode _ = False
hasE :: Located Token -> Bool hasE :: Located Token -> Bool
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment