diff options
author | Vladislav Zavialov <vlad.z.4096@gmail.com> | 2022-11-18 12:53:00 +0300 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-11-25 04:39:04 -0500 |
commit | 13d627bbd0bc3dd30d672de341aa7f471be0aa2c (patch) | |
tree | 3464a8c6dca4b9bb47db356352d964279eca94fe /testsuite/tests/rep-poly/T13929.stderr | |
parent | 1f1b99b86ab2b005604aea08b0614279a8ad1244 (diff) | |
download | haskell-13d627bbd0bc3dd30d672de341aa7f471be0aa2c.tar.gz |
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.
Summary of changes:
* Rename PrintUnqualified to NamePprCtx
* Add QueryPromotionTick to it
* Consult the GlobalRdrEnv to decide whether to print a tick (see mkPromTick)
* Introduce -fprint-redundant-promotion-ticks
Co-authored-by: Artyom Kuznetsov <hi@wzrd.ht>
Diffstat (limited to 'testsuite/tests/rep-poly/T13929.stderr')
-rw-r--r-- | testsuite/tests/rep-poly/T13929.stderr | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/testsuite/tests/rep-poly/T13929.stderr b/testsuite/tests/rep-poly/T13929.stderr index 5ad878794c..5c4a61b80d 100644 --- a/testsuite/tests/rep-poly/T13929.stderr +++ b/testsuite/tests/rep-poly/T13929.stderr @@ -10,20 +10,20 @@ T13929.hs:29:24: error: [GHC-55287] In an equation for ‘gunbox’: gunbox (x :*: y) = (# gunbox x, gunbox y #) In the instance declaration for - ‘GUnbox (f :*: g) ('TupleRep '[rf, rg])’ + ‘GUnbox (f :*: g) (TupleRep [rf, rg])’ • Relevant bindings include x :: f p (bound at T13929.hs:29:13) - gunbox :: (:*:) f g p -> GUnboxed (f :*: g) ('TupleRep '[rf, rg]) + gunbox :: (:*:) f g p -> GUnboxed (f :*: g) (TupleRep [rf, rg]) (bound at T13929.hs:29:5) T13929.hs:34:21: error: [GHC-55287] • • The unboxed sum does not have a fixed runtime representation. Its type is: - GUnboxed (f :+: g) ('SumRep '[rf, rg]) :: TYPE ('SumRep '[rf, rg]) + GUnboxed (f :+: g) (SumRep [rf, rg]) :: TYPE (SumRep [rf, rg]) • The unboxed sum does not have a fixed runtime representation. Its type is: - GUnboxed (f :+: g) ('SumRep '[rf, rg]) :: TYPE ('SumRep '[rf, rg]) + GUnboxed (f :+: g) (SumRep [rf, rg]) :: TYPE (SumRep [rf, rg]) • In the expression: (# | gunbox r #) In an equation for ‘gunbox’: gunbox (R1 r) = (# | gunbox r #) In the instance declaration for - ‘GUnbox (f :+: g) ('SumRep '[rf, rg])’ + ‘GUnbox (f :+: g) (SumRep [rf, rg])’ |