diff options
author | Vladislav Zavialov <vlad.z.4096@gmail.com> | 2021-06-01 13:46:39 +0300 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-06-16 20:19:10 -0400 |
commit | a2e4cb80db1b63ea2c5e0ab501acec7fb1b116e3 (patch) | |
tree | 5d0ef3df75a255a817d611fef555812f3223cc8a /compiler/GHC/ThToHs.hs | |
parent | 6c131ba04ab1455827d985704e4411aa19185f5f (diff) | |
download | haskell-a2e4cb80db1b63ea2c5e0ab501acec7fb1b116e3.tar.gz |
HsUniToken and HsToken for HsArrow (#19623)
Another step towards a simpler design for exact printing.
Updates the haddock submodule.
Diffstat (limited to 'compiler/GHC/ThToHs.hs')
-rw-r--r-- | compiler/GHC/ThToHs.hs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/GHC/ThToHs.hs b/compiler/GHC/ThToHs.hs index 7aa9b73eb2..edd5301907 100644 --- a/compiler/GHC/ThToHs.hs +++ b/compiler/GHC/ThToHs.hs @@ -659,7 +659,7 @@ cvtConstr (RecGadtC c varstrtys ty) = do { c' <- mapM cNameN c ; ty' <- cvtType ty ; rec_flds <- mapM cvt_id_arg varstrtys - ; returnLA $ mk_gadt_decl c' (RecConGADT $ noLocA rec_flds) ty' } + ; returnLA $ mk_gadt_decl c' (RecConGADT (noLocA rec_flds) noHsUniTok) ty' } mk_gadt_decl :: [LocatedN RdrName] -> HsConDeclGADTDetails GhcPs -> LHsType GhcPs -> ConDecl GhcPs @@ -1518,7 +1518,7 @@ cvtTypeKind ty_str ty _ -> return $ parenthesizeHsType sigPrec x' let y'' = parenthesizeHsType sigPrec y' - returnLA (HsFunTy noAnn (HsUnrestrictedArrow NormalSyntax) x'' y'') + returnLA (HsFunTy noAnn (HsUnrestrictedArrow noHsUniTok) x'' y'') | otherwise -> mk_apps (HsTyVar noAnn NotPromoted (noLocA (getRdrName unrestrictedFunTyCon))) @@ -1675,9 +1675,9 @@ cvtTypeKind ty_str ty hsTypeToArrow :: LHsType GhcPs -> HsArrow GhcPs hsTypeToArrow w = case unLoc w of HsTyVar _ _ (L _ (isExact_maybe -> Just n)) - | n == oneDataConName -> HsLinearArrow NormalSyntax Nothing - | n == manyDataConName -> HsUnrestrictedArrow NormalSyntax - _ -> HsExplicitMult NormalSyntax Nothing w + | n == oneDataConName -> HsLinearArrow (HsPct1 noHsTok noHsUniTok) + | n == manyDataConName -> HsUnrestrictedArrow noHsUniTok + _ -> HsExplicitMult noHsTok w noHsUniTok -- ConT/InfixT can contain both data constructor (i.e., promoted) names and -- other (i.e, unpromoted) names, as opposed to PromotedT, which can only |