[Git][ghc/ghc][wip/romes/fix-docs] 7 commits: Handle top-level Addr# literals in the bytecode compiler

Rodrigo Mesquita (@alt-romes) gitlab at gitlab.haskell.org
Tue Feb 21 19:01:48 UTC 2023



Rodrigo Mesquita pushed to branch wip/romes/fix-docs at Glasgow Haskell Compiler / GHC


Commits:
26243de1 by Alexis King at 2023-02-20T15:27:17-05:00
Handle top-level Addr# literals in the bytecode compiler

Fixes #22376.

- - - - -
0196cc2b by romes at 2023-02-20T15:27:52-05:00
fix: Explicitly flush stdout on plugin

Because of #20791, the plugins tests often fail.  This is a temporary
fix to stop the tests from failing due to unflushed outputs on windows
and the explicit flush should be removed when #20791 is fixed.

- - - - -
4327d635 by Ryan Scott at 2023-02-20T20:44:34-05:00
Don't generate datacon wrappers for `type data` declarations

Data constructor wrappers only make sense for _value_-level data constructors,
but data constructors for `type data` declarations only exist at the _type_
level. This patch does the following:

* The criteria in `GHC.Types.Id.Make.mkDataConRep` for whether a data
  constructor receives a wrapper now consider whether or not its parent data
  type was declared with `type data`, omitting a wrapper if this is the case.

* Now that `type data` data constructors no longer receive wrappers, there is a
  spot of code in `refineDefaultAlt` that panics when it encounters a value
  headed by a `type data` type constructor. I've fixed this with a special case
  in `refineDefaultAlt` and expanded `Note [Refine DEFAULT case alternatives]`
  to explain why we do this.

Fixes #22948.

- - - - -
96dc58b9 by Ryan Scott at 2023-02-20T20:44:35-05:00
Treat type data declarations as empty when checking pattern-matching coverage

The data constructors for a `type data` declaration don't exist at the value
level, so we don't want GHC to warn users to match on them.

Fixes #22964.

- - - - -
ff8e99f6 by Ryan Scott at 2023-02-20T20:44:35-05:00
Disallow `tagToEnum#` on `type data` types

We don't want to allow users to conjure up values of a `type data` type using
`tagToEnum#`, as these simply don't exist at the value level.

- - - - -
8e765aff by Bodigrim at 2023-02-21T12:03:24-05:00
Bump submodule text to 2.0.2

- - - - -
d027c629 by romes at 2023-02-21T19:01:46+00:00
fix: Update documentation links

Closes #23008

Additionally batches some fixes to pointers to the Note [Wired-in units],
and a typo in said note.

- - - - -


30 changed files:

- compiler/GHC/ByteCode/Asm.hs
- compiler/GHC/ByteCode/Instr.hs
- compiler/GHC/ByteCode/Linker.hs
- compiler/GHC/ByteCode/Types.hs
- compiler/GHC/Core/Utils.hs
- compiler/GHC/HsToCore/Pmc/Solver.hs
- compiler/GHC/Linker/Loader.hs
- compiler/GHC/Linker/Types.hs
- compiler/GHC/Rename/Module.hs
- compiler/GHC/StgToByteCode.hs
- compiler/GHC/Tc/Errors/Ppr.hs
- compiler/GHC/Tc/Errors/Types.hs
- compiler/GHC/Tc/Gen/App.hs
- compiler/GHC/Types/Error/Codes.hs
- compiler/GHC/Types/Id/Make.hs
- compiler/GHC/Unit.hs
- compiler/GHC/Unit/State.hs
- docs/users_guide/exts/deriving_strategies.rst
- libraries/text
- + testsuite/tests/bytecode/T22376/A.hs
- + testsuite/tests/bytecode/T22376/B.hs
- + testsuite/tests/bytecode/T22376/T22376.hs
- + testsuite/tests/bytecode/T22376/T22376.stdout
- + testsuite/tests/bytecode/T22376/all.T
- testsuite/tests/plugins/all.T
- testsuite/tests/plugins/echo-plugin/Echo.hs
- testsuite/tests/plugins/hooks-plugin/Hooks/Plugin.hs
- + testsuite/tests/pmcheck/should_compile/T22964.hs
- testsuite/tests/pmcheck/should_compile/all.T
- + testsuite/tests/type-data/should_compile/T22948b.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/acde13c20b8e9bc18ece57c01ba9d94419984a5a...d027c629cdbae51f49b91dbbd8c77d1a427b66ef

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/acde13c20b8e9bc18ece57c01ba9d94419984a5a...d027c629cdbae51f49b91dbbd8c77d1a427b66ef
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/20230221/957fb015/attachment-0001.html>


More information about the ghc-commits mailing list