[Git][ghc/ghc][wip/int-index/ppr-tick] 5 commits: Extend documentation for Data.IORef

Vladislav Zavialov (@int-index) gitlab at gitlab.haskell.org
Mon Nov 21 18:56:31 UTC 2022



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


Commits:
f2f9ef07 by Bodigrim at 2022-11-20T18:39:30-05:00
Extend documentation for Data.IORef

- - - - -
ef511b23 by Simon Peyton Jones at 2022-11-20T18:40:05-05:00
Buglet in GHC.Tc.Module.checkBootTyCon

This lurking bug used the wrong function to compare two
types in GHC.Tc.Module.checkBootTyCon

It's hard to trigger the bug, which only came up during
!9343, so there's no regression test in this MR.

- - - - -
451aeac3 by Bodigrim at 2022-11-20T18:40:44-05:00
Add since pragmas for c_interruptible_open and hostIsThreaded

- - - - -
42e61a4f by Vladislav Zavialov at 2022-11-21T13:22:35+03:00
Check if the SDoc starts with a single quote (#22488)

This patch fixes pretty-printing of character literals
inside promoted lists and tuples.

When we pretty-print a promoted list or tuple whose first element
starts with a single quote, we want to add a space between the opening
bracket and the element:

	'[True]    -- ok
	'[ 'True]  -- ok
	'['True]   -- not ok

If we don't add the space, we accidentally produce a character
literal '['.

Before this patch, pprSpaceIfPromotedTyCon inspected the type as an AST
and tried to guess if it would be rendered with a single quote. However,
it missed the case when the inner type was itself a character literal:

	'[ 'x']  -- ok
	'['x']   -- not ok

Instead of adding this particular case, I opted for a more future-proof
solution: check the SDoc directly. This way we can detect if the single
quote is actually there instead of trying to predict it from the AST.
The new function is called spaceIfSingleQuote.

- - - - -
23cd7b4c by Vladislav Zavialov at 2022-11-21T21:56:17+03:00
Draft: Print unticked promoted data constructors (WIP: 20531)

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/Data/FastString.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/Module.hs
- compiler/GHC/Tc/Utils/Monad.hs
- compiler/GHC/Types/Name/Ppr.hs
- compiler/GHC/Utils/Misc.hs
- compiler/GHC/Utils/Outputable.hs
- compiler/GHC/Utils/Ppr.hs
- libraries/base/Data/IORef.hs
- libraries/base/GHC/IORef.hs
- libraries/base/System/Posix/Internals.hs
- 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


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/1f1f43a1d6eebc5fa75dc2ddb72e65aab6e16732...23cd7b4cacdfe132f5b64c5ca5f8fc142d5589cc

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/1f1f43a1d6eebc5fa75dc2ddb72e65aab6e16732...23cd7b4cacdfe132f5b64c5ca5f8fc142d5589cc
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/20221121/b4a37899/attachment.html>


More information about the ghc-commits mailing list