[Git][ghc/ghc][wip/structured-ghci-errors] 8 commits: Deriving-via one-shot strict state Monad instances

Jade (@Jade) gitlab at gitlab.haskell.org
Thu Aug 1 13:58:50 UTC 2024



Jade pushed to branch wip/structured-ghci-errors at Glasgow Haskell Compiler / GHC


Commits:
12931305 by Rodrigo Mesquita at 2024-08-01T15:54:36+02:00
Deriving-via one-shot strict state Monad instances

A small refactor to use deriving via GHC.Utils.Monad.State.Strict
Monad instances for state Monads with unboxed/strict results which all
re-implemented the one-shot trick in the instance and used unboxed
tuples:

* CmmOptM in GHC.Cmm.GenericOpt
* RegM in GHC.CmmToAsm.Reg.Linear.State
* UniqSM in GHC.Types.Unique.Supply

- - - - -
50691dc6 by doyougnu at 2024-08-01T15:54:36+02:00
Rts linker: add case for pc-rel 64 relocation

part of the upstream haskell.nix patches

- - - - -
99941d1c by doyougnu at 2024-08-01T15:54:36+02:00
RTS linker: aarch64: better debug information

Dump better debugging information when a symbol address is null.

Part of the haskell.nix patches upstream project

Co-authored-by: Sylvain Henry <sylvain at haskus.fr>

- - - - -
65d41b20 by Rodrigo Mesquita at 2024-08-01T15:54:36+02:00
base: Add haddocks to HasExceptionContext

Fixes #25091

- - - - -
83ffcd33 by Sylvain Henry at 2024-08-01T15:54:36+02:00
Only lookup ghcversion.h file in the RTS include-dirs by default.

The code was introduced in 3549c952b535803270872adaf87262f2df0295a4.
It used `getPackageIncludePath` which name doesn't convey that it looks
into all include paths of the preload units too. So this behavior is
probably unintentional and it should be ok to change it.

Fix #25106

- - - - -
46a47a64 by Matthew Pickering at 2024-08-01T15:54:36+02:00
driver: Fix -Wmissing-home-modules when multiple units have the same module name

It was assumed that module names were unique but that isn't true with
multiple units.

The fix is quite simple, maintain a set of `(ModuleName, UnitId)` and
query that to see whether the module has been specified.

Fixes #25122

- - - - -
37062a38 by sheaf at 2024-08-01T15:54:36+02:00
PMC: suggest in-scope COMPLETE sets when possible

This commit modifies GHC.HsToCore.Pmc.Solver.generateInhabitingPatterns
to prioritise reporting COMPLETE sets in which all of the ConLikes
are in scope. This avoids suggesting out of scope constructors
when displaying an incomplete pattern match warning, e.g. in

  baz :: Ordering -> Int
  baz = \case
    EQ -> 5

we prefer:

  Patterns of type 'Ordering' not matched:
      LT
      GT

over:

  Patterns of type 'Ordering' not matched:
      OutOfScope

Fixes #25115

- - - - -
0681e87a by Jade at 2024-08-01T15:56:36+02:00
WIP

- - - - -


30 changed files:

- compiler/GHC/Cmm/GenericOpt.hs
- compiler/GHC/CmmToAsm/Reg/Linear/State.hs
- compiler/GHC/Driver/Errors.hs
- compiler/GHC/Driver/Errors/Ppr.hs
- compiler/GHC/Driver/Errors/Types.hs
- compiler/GHC/Driver/Make.hs
- compiler/GHC/Driver/Ppr.hs
- compiler/GHC/HsToCore/Errors/Ppr.hs
- compiler/GHC/HsToCore/Errors/Types.hs
- compiler/GHC/HsToCore/Monad.hs
- compiler/GHC/HsToCore/Pmc/Solver.hs
- compiler/GHC/HsToCore/Types.hs
- compiler/GHC/Parser/Errors/Ppr.hs
- compiler/GHC/Parser/Errors/Types.hs
- compiler/GHC/SysTools/Cpp.hs
- compiler/GHC/Tc/Errors/Ppr.hs
- compiler/GHC/Tc/Errors/Types.hs
- compiler/GHC/Types/Error.hs
- compiler/GHC/Types/Error/Codes.hs
- compiler/GHC/Types/Unique/Supply.hs
- compiler/GHC/Utils/Monad/State/Strict.hs
- ghc/GHCi/UI.hs
- ghc/GHCi/UI/Exception.hs
- ghc/GHCi/UI/Info.hs
- ghc/GHCi/UI/Monad.hs
- + ghc/GHCi/UI/Print.hs
- ghc/ghc-bin.cabal.in
- libraries/ghc-internal/src/GHC/Internal/Exception/Type.hs
- rts/linker/PEi386.c
- rts/linker/elf_reloc_aarch64.c


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/8c1acd064a461c60b248226942845fe704c6b404...0681e87ac7c688a9c76b7db71f54fab536fb524e

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/8c1acd064a461c60b248226942845fe704c6b404...0681e87ac7c688a9c76b7db71f54fab536fb524e
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/20240801/34f2b1f8/attachment.html>


More information about the ghc-commits mailing list