Skip to content

Print unticked promoted data constructors (#20531)

Vladislav Zavialov requested to merge wip/int-index/ppr-tick into master

Before this patch, GHC unconditionally printed ticks before promoted data constructors:

ghci> type T = True  -- unticked (user-written)
ghci> :kind! T
T :: Bool
= 'True              -- ticked (compiler output)

After this patch, GHC prints ticks only when necessary:

ghci> type F = False    -- unticked (user-written)
ghci> :kind! F
F :: Bool
= False                 -- unticked (compiler output)

ghci> data False        -- introduce ambiguity
ghci> :kind! F
F :: Bool
= 'False                -- ticked by necessity (compiler output)

The old behavior can be enabled by -fprint-redundant-promotion-ticks.

Edited by Vladislav Zavialov

Merge request reports