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 /compiler/GHC/Rename/Env.hs | |
parent | 950f58e7bf584ec6970327ac7c7ae3f3fdbc9882 (diff) | |
download | haskell-wip/matt-merge-batch.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 'compiler/GHC/Rename/Env.hs')
-rw-r--r-- | compiler/GHC/Rename/Env.hs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/GHC/Rename/Env.hs b/compiler/GHC/Rename/Env.hs index 2440976b31..e5c1c17f3c 100644 --- a/compiler/GHC/Rename/Env.hs +++ b/compiler/GHC/Rename/Env.hs @@ -1078,9 +1078,7 @@ lookup_demoted rdr_name then do { mb_demoted_name <- lookupOccRn_maybe demoted_rdr ; case mb_demoted_name of Nothing -> unboundNameX looking_for rdr_name star_is_type_hints - Just demoted_name -> - do { addDiagnostic $ TcRnUntickedPromotedConstructor demoted_name - ; return demoted_name } } + Just demoted_name -> return demoted_name } else do { -- We need to check if a data constructor of this name is -- in scope to give good error messages. However, we do -- not want to give an additional error if the data |