[Git][ghc/ghc][wip/az/ghc-9.0-anns] ApiAnnotations: Fix parser for new GHC 9.0 features

Alan Zimmerman gitlab at gitlab.haskell.org
Mon Aug 10 22:33:41 UTC 2020



Alan Zimmerman pushed to branch wip/az/ghc-9.0-anns at Glasgow Haskell Compiler / GHC


Commits:
d88bc94a by Alan Zimmerman at 2020-08-10T23:32:26+01:00
ApiAnnotations: Fix parser for new GHC 9.0 features

- - - - -


1 changed file:

- compiler/GHC/Parser.y


Changes:

=====================================
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



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/d88bc94affafe24c3af7cb5f1fe095d1b9e676bf

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/d88bc94affafe24c3af7cb5f1fe095d1b9e676bf
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20200810/d782745a/attachment-0001.html>


More information about the ghc-commits mailing list