[Git][ghc/ghc][wip/int-index/ppr-tick] Print unticked promoted data constructors (#20531)

Vladislav Zavialov (@int-index) gitlab at gitlab.haskell.org
Wed Nov 23 08:57:23 UTC 2022



Vladislav Zavialov pushed to branch wip/int-index/ppr-tick at Glasgow Haskell Compiler / GHC


Commits:
7fbdb6a8 by Vladislav Zavialov at 2022-11-23T11:56:51+03:00
Print unticked promoted data constructors (#20531)

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.

Co-authored-by: Artyom Kuznetsov <hi at wzrd.ht>

- - - - -


30 changed files:

- compiler/GHC.hs
- compiler/GHC/Core/Opt/Pipeline.hs
- compiler/GHC/Core/Opt/Simplify.hs
- compiler/GHC/Core/TyCon.hs
- compiler/GHC/Driver/Backpack.hs
- compiler/GHC/Driver/Flags.hs
- compiler/GHC/Driver/Main.hs
- compiler/GHC/Driver/Session.hs
- compiler/GHC/HsToCore.hs
- compiler/GHC/HsToCore/Monad.hs
- compiler/GHC/Iface/Load.hs
- compiler/GHC/Iface/Type.hs
- compiler/GHC/Runtime/Context.hs
- compiler/GHC/Tc/Utils/Monad.hs
- compiler/GHC/Types/Name/Ppr.hs
- compiler/GHC/Utils/Outputable.hs
- docs/users_guide/using.rst
- testsuite/tests/dependent/should_fail/T11471.stderr
- testsuite/tests/dependent/should_fail/T13135_simple.stderr
- testsuite/tests/dependent/should_fail/T17131.stderr
- testsuite/tests/dependent/should_fail/T17541.stderr
- testsuite/tests/ffi/should_fail/T21305_fail.stderr
- testsuite/tests/gadt/T7293.stderr
- testsuite/tests/gadt/T7294.stderr
- testsuite/tests/ghci/T18060/T18060.stdout
- testsuite/tests/ghci/T18262/T18262.stdout
- testsuite/tests/ghci/scripts/GhciKinds.stdout
- testsuite/tests/ghci/scripts/T20974.stdout
- testsuite/tests/ghci/scripts/T6018ghcifail.stderr
- testsuite/tests/ghci/scripts/T7627.stdout


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/7fbdb6a86307f3554252fc200924550e6ccc0bf1

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/7fbdb6a86307f3554252fc200924550e6ccc0bf1
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20221123/de6bfd98/attachment.html>


More information about the ghc-commits mailing list