[Git][ghc/ghc][master] EPA: splitLHsForAllTyInvis does not return ann
Marge Bot (@marge-bot)
gitlab at gitlab.haskell.org
Wed Nov 15 18:23:47 UTC 2023
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
27981fac by Alan Zimmerman at 2023-11-15T13:21:25-05:00
EPA: splitLHsForAllTyInvis does not return ann
We did not use the annotations returned from splitLHsForAllTyInvis, so
do not return them.
- - - - -
1 changed file:
- compiler/GHC/Hs/Type.hs
Changes:
=====================================
compiler/GHC/Hs/Type.hs
=====================================
@@ -701,10 +701,10 @@ splitLHsPatSynTy ty = (univs, reqs, exis, provs, ty4)
HsOuterImplicit{} -> ([], ignoreParens body)
HsOuterExplicit{hso_bndrs = exp_bndrs} -> (exp_bndrs, body)
- (univs, ty1) = split_sig_ty ty
- (reqs, ty2) = splitLHsQualTy ty1
- ((_an, exis), ty3) = splitLHsForAllTyInvis ty2
- (provs, ty4) = splitLHsQualTy ty3
+ (univs, ty1) = split_sig_ty ty
+ (reqs, ty2) = splitLHsQualTy ty1
+ (exis, ty3) = splitLHsForAllTyInvis ty2
+ (provs, ty4) = splitLHsQualTy ty3
-- | Decompose a sigma type (of the form @forall <tvs>. context => body@)
-- into its constituent parts.
@@ -724,8 +724,8 @@ splitLHsSigmaTyInvis :: LHsType (GhcPass p)
-> ([LHsTyVarBndr Specificity (GhcPass p)]
, Maybe (LHsContext (GhcPass p)), LHsType (GhcPass p))
splitLHsSigmaTyInvis ty
- | ((_an,tvs), ty1) <- splitLHsForAllTyInvis ty
- , (ctxt, ty2) <- splitLHsQualTy ty1
+ | (tvs, ty1) <- splitLHsForAllTyInvis ty
+ , (ctxt, ty2) <- splitLHsQualTy ty1
= (tvs, ctxt, ty2)
-- | Decompose a GADT type into its constituent parts.
@@ -770,11 +770,11 @@ splitLHsGadtTy (L _ sig_ty)
-- Unlike 'splitLHsSigmaTyInvis', this function does not look through
-- parentheses, hence the suffix @_KP@ (short for \"Keep Parentheses\").
splitLHsForAllTyInvis ::
- LHsType (GhcPass pass) -> ( (EpAnnForallTy, [LHsTyVarBndr Specificity (GhcPass pass)])
+ LHsType (GhcPass pass) -> ( [LHsTyVarBndr Specificity (GhcPass pass)]
, LHsType (GhcPass pass))
splitLHsForAllTyInvis ty
| ((mb_tvbs), body) <- splitLHsForAllTyInvis_KP (ignoreParens ty)
- = (fromMaybe (EpAnnNotUsed,[]) mb_tvbs, body)
+ = (fromMaybe [] mb_tvbs, body)
-- | Decompose a type of the form @forall <tvs>. body@ into its constituent
-- parts. Only splits type variable binders that
@@ -788,14 +788,13 @@ splitLHsForAllTyInvis ty
-- Unlike 'splitLHsForAllTyInvis', this function does not look through
-- parentheses, hence the suffix @_KP@ (short for \"Keep Parentheses\").
splitLHsForAllTyInvis_KP ::
- LHsType (GhcPass pass) -> (Maybe (EpAnnForallTy, [LHsTyVarBndr Specificity (GhcPass pass)])
+ LHsType (GhcPass pass) -> (Maybe ([LHsTyVarBndr Specificity (GhcPass pass)])
, LHsType (GhcPass pass))
splitLHsForAllTyInvis_KP lty@(L _ ty) =
case ty of
- HsForAllTy { hst_tele = HsForAllInvis { hsf_xinvis = an
- , hsf_invis_bndrs = tvs }
+ HsForAllTy { hst_tele = HsForAllInvis {hsf_invis_bndrs = tvs }
, hst_body = body }
- -> (Just (an, tvs), body)
+ -> (Just tvs, body)
_ -> (Nothing, lty)
-- | Decompose a type of the form @context => body@ into its constituent parts.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/27981facd9907089ee3c8ff39d30b8921dff89fd
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/27981facd9907089ee3c8ff39d30b8921dff89fd
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/20231115/261247ad/attachment-0001.html>
More information about the ghc-commits
mailing list