summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorsheaf <sam.derbyshire@gmail.com>2022-04-01 12:02:46 +0200
committerMatthew Pickering <matthewtpickering@gmail.com>2022-04-01 11:17:56 +0100
commitd85c7dcb7c457efc23b20ac8f4e4ae88bae5b050 (patch)
tree6a052785be9dd3b67e42637102de21f0630f6ddf /utils
parent950f58e7bf584ec6970327ac7c7ae3f3fdbc9882 (diff)
downloadhaskell-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 'utils')
-rw-r--r--utils/check-exact/ExactPrint.hs5
m---------utils/haddock0
2 files changed, 3 insertions, 2 deletions
diff --git a/utils/check-exact/ExactPrint.hs b/utils/check-exact/ExactPrint.hs
index 67aa1f280d..3d493cfd22 100644
--- a/utils/check-exact/ExactPrint.hs
+++ b/utils/check-exact/ExactPrint.hs
@@ -2876,7 +2876,7 @@ instance ExactPrint (HsType GhcPs) where
getAnnotationEntry (HsListTy an _) = fromAnn an
getAnnotationEntry (HsTupleTy an _ _) = fromAnn an
getAnnotationEntry (HsSumTy an _) = fromAnn an
- getAnnotationEntry (HsOpTy _ _ _ _) = NoEntryVal
+ getAnnotationEntry (HsOpTy an _ _ _ _) = fromAnn an
getAnnotationEntry (HsParTy an _) = fromAnn an
getAnnotationEntry (HsIParamTy an _ _) = fromAnn an
getAnnotationEntry (HsStarTy _ _) = NoEntryVal
@@ -2926,7 +2926,8 @@ instance ExactPrint (HsType GhcPs) where
markOpeningParen an
markAnnotated tys
markClosingParen an
- exact (HsOpTy _an t1 lo t2) = do
+ exact (HsOpTy an promoted t1 lo t2) = do
+ when (isPromoted promoted) $ markEpAnn an AnnSimpleQuote
markAnnotated t1
markAnnotated lo
markAnnotated t2
diff --git a/utils/haddock b/utils/haddock
-Subproject 559e41505e81d93939e9afa6aa9793b0a428924
+Subproject 58237d76c96325f25627bfd7cdad5b93364d29a