From d85c7dcb7c457efc23b20ac8f4e4ae88bae5b050 Mon Sep 17 00:00:00 2001 From: sheaf Date: Fri, 1 Apr 2022 12:02:46 +0200 Subject: Keep track of promotion ticks in HsOpTy 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 --- compiler/Language/Haskell/Syntax/Type.hs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'compiler/Language/Haskell/Syntax') diff --git a/compiler/Language/Haskell/Syntax/Type.hs b/compiler/Language/Haskell/Syntax/Type.hs index e7c35f93c1..0c84e9faa6 100644 --- a/compiler/Language/Haskell/Syntax/Type.hs +++ b/compiler/Language/Haskell/Syntax/Type.hs @@ -791,6 +791,8 @@ data HsType pass -- For details on above see Note [exact print annotations] in GHC.Parser.Annotation | HsOpTy (XOpTy pass) + PromotionFlag -- Whether explicitly promoted, + -- for the pretty printer (LHsType pass) (LIdP pass) (LHsType pass) -- ^ - 'GHC.Parser.Annotation.AnnKeywordId' : None -- cgit v1.2.1