diff options
author | sheaf <sam.derbyshire@gmail.com> | 2022-04-01 12:02:46 +0200 |
---|---|---|
committer | Matthew Pickering <matthewtpickering@gmail.com> | 2022-04-01 11:17:56 +0100 |
commit | d85c7dcb7c457efc23b20ac8f4e4ae88bae5b050 (patch) | |
tree | 6a052785be9dd3b67e42637102de21f0630f6ddf /ghc/GHCi | |
parent | 950f58e7bf584ec6970327ac7c7ae3f3fdbc9882 (diff) | |
download | haskell-d85c7dcb7c457efc23b20ac8f4e4ae88bae5b050.tar.gz |
Keep track of promotion ticks in HsOpTywip/no-c-stubswip/matt-merge-batch
This patch adds a PromotionFlag field to HsOpTy, which is used
in pretty-printing and when determining whether to emit warnings
with -fwarn-unticked-promoted-constructors.
This allows us to correctly report tick-related warnings for things
like:
type A = Int : '[]
type B = [Int, Bool]
Updates haddock submodule
Fixes #19984
Diffstat (limited to 'ghc/GHCi')
-rw-r--r-- | ghc/GHCi/UI.hs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ghc/GHCi/UI.hs b/ghc/GHCi/UI.hs index 68519f5ce7..fa04121821 100644 --- a/ghc/GHCi/UI.hs +++ b/ghc/GHCi/UI.hs @@ -1783,9 +1783,9 @@ defineMacro overwrite s = do expr <- GHC.parseExpr definition -- > ghciStepIO . definition :: String -> IO String let stringTy :: LHsType GhcPs - stringTy = nlHsTyVar stringTyCon_RDR + stringTy = nlHsTyVar NotPromoted stringTyCon_RDR ioM :: LHsType GhcPs -- AZ - ioM = nlHsTyVar (getRdrName ioTyConName) `nlHsAppTy` stringTy + ioM = nlHsTyVar NotPromoted (getRdrName ioTyConName) `nlHsAppTy` stringTy body = nlHsVar compose_RDR `mkHsApp` (nlHsPar step) `mkHsApp` (nlHsPar expr) tySig = mkHsWildCardBndrs $ noLocA $ mkHsImplicitSigType $ @@ -1853,9 +1853,9 @@ cmdCmd str = handleSourceError printErrAndMaybeExit $ do getGhciStepIO :: GHC.GhcMonad m => m (LHsExpr GhcPs) getGhciStepIO = do ghciTyConName <- GHC.getGHCiMonad - let stringTy = nlHsTyVar stringTyCon_RDR - ghciM = nlHsTyVar (getRdrName ghciTyConName) `nlHsAppTy` stringTy - ioM = nlHsTyVar (getRdrName ioTyConName) `nlHsAppTy` stringTy + let stringTy = nlHsTyVar NotPromoted stringTyCon_RDR + ghciM = nlHsTyVar NotPromoted (getRdrName ghciTyConName) `nlHsAppTy` stringTy + ioM = nlHsTyVar NotPromoted (getRdrName ioTyConName) `nlHsAppTy` stringTy body = nlHsVar (getRdrName ghciStepIoMName) tySig = mkHsWildCardBndrs $ noLocA $ mkHsImplicitSigType $ nlHsFunTy ghciM ioM |