[Git][ghc/ghc][wip/exception-context] 16 commits: Add os-string as a boot package

Ben Gamari (@bgamari) gitlab at gitlab.haskell.org
Wed Jan 31 21:17:20 UTC 2024



Ben Gamari pushed to branch wip/exception-context at Glasgow Haskell Compiler / GHC


Commits:
2bc669ff by Ben Gamari at 2024-01-31T08:51:35-05:00
Add os-string as a boot package

Introduces `os-string` submodule. This will be necessary for
`filepath-1.5`.

- - - - -
cbb52840 by Ben Gamari at 2024-01-31T16:02:39-05:00
Bump filepath to 1.5.0.0

Required bumps of the following submodules:

 * `directory`
 * `filepath`
 * `haskeline`
 * `process`
 * `unix`
 * `hsc2hs`
 * `Win32`
 * `semaphore-compat`

and the addition of `os-string` as a boot package.

- - - - -
7f3ea74e by Ben Gamari at 2024-01-31T16:05:06-05:00
base: Cleanup whitespace in cbits

- - - - -
efdf9acf by Ben Gamari at 2024-01-31T16:05:06-05:00
Move `base` to `ghc-internal`

Here we move a good deal of the implementation of `base` into a new
package, `ghc-internal` such that it can be evolved independently
from the user-visible interfaces of `base`.

While we want to isolate implementation from interfaces, naturally, we
would like to avoid turning `base` into a mere set of module re-exports.
However, this is a non-trivial undertaking for a variety of reasons:

 * `base` contains numerous known-key and wired-in things, requiring
   corresponding changes in the compiler

 * `base` contains a significant amount of C code and corresponding
   autoconf logic, which is very fragile and difficult to break apart

 * `base` has numerous import cycles, which are currently dealt with via
   carefully balanced `hs-boot` files

 * We must not break existing users

To accomplish this migration, I tried the following approaches:

* [Split-GHC.Base]: Break apart the GHC.Base knot to allow incremental
  migration of modules into ghc-internal: this knot is simply too
  intertwined to be easily pulled apart, especially given the rather
  tricky import cycles that it contains)

* [Move-Core]: Moving the "core" connected component of base (roughly
  150 modules) into ghc-internal. While the Haskell side of this seems
  tractable, the C dependencies are very subtle to break apart.

* [Move-Incrementally]:

  1. Move all of base into ghc-internal
  2. Examine the module structure and begin moving obvious modules (e.g.
     leaves of the import graph) back into base
  3. Examine the modules remaining in ghc-internal, refactor as necessary
     to facilitate further moves
  4. Go to (2) iterate until the cost/benefit of further moves is
     insufficient to justify continuing
  5. Rename the modules moved into ghc-internal to ensure that they don't
     overlap with those in base
  6. For each module moved into ghc-internal, add a shim module to base
     with the declarations which should be exposed and any requisite
     Haddocks (thus guaranteeing that base will be insulated from changes
     in the export lists of modules in ghc-internal

Here I am using the [Move-Incrementally] approach, which is empirically
the least painful of the unpleasant options above

- - - - -
a3e25da1 by Ben Gamari at 2024-01-31T16:17:15-05:00
compiler/tc: Small optimisation of evCallStack

Don't lookupIds unless we actually need them.

- - - - -
c2b107e3 by Ben Gamari at 2024-01-31T16:17:15-05:00
compiler/tc: Use toException instead of SomeException

- - - - -
d96e6e7b by Ben Gamari at 2024-01-31T16:17:15-05:00
base: Factor out errorBelch

This was useful when debugging

- - - - -
becea0f6 by Ben Gamari at 2024-01-31T16:17:15-05:00
base: Clean up imports of GHC.Stack.CloneStack

- - - - -
ecc92a0e by Ben Gamari at 2024-01-31T16:17:15-05:00
base: Move PrimMVar to GHC.MVar

- - - - -
785e5130 by Ben Gamari at 2024-01-31T16:17:15-05:00
base: Move prettyCallStack to GHC.Stack

- - - - -
e0b83c9d by Ben Gamari at 2024-01-31T16:17:15-05:00
base: Use displayException in top-level exception handler

Happily this also allows us to eliminate a special case for Deadlock
exceptions.

- - - - -
713f69bd by Ben Gamari at 2024-01-31T16:17:15-05:00
base: Introduce exception context

- - - - -
a650d57e by Ben Gamari at 2024-01-31T16:17:15-05:00
compiler: Default and warn ExceptionContext constraints

- - - - -
2cedfc2d by Ben Gamari at 2024-01-31T16:17:15-05:00
base: Don't collect backtraces in onException

- - - - -
1510e495 by Ben Gamari at 2024-01-31T16:17:15-05:00
rts: Don't dump IPE entries on startup with DEBUG rts

- - - - -
dea481ea by Ben Gamari at 2024-01-31T16:17:15-05:00
Update testsuite output

- - - - -


30 changed files:

- .gitignore
- .gitmodules
- compiler/GHC/Builtin/Names.hs
- compiler/GHC/Core/Predicate.hs
- compiler/GHC/StgToJS/Rts/Rts.hs
- compiler/GHC/Tc/Errors/Ppr.hs
- compiler/GHC/Tc/Errors/Types.hs
- compiler/GHC/Tc/Gen/Splice.hs
- compiler/GHC/Tc/Solver.hs
- compiler/GHC/Tc/Types/EvTerm.hs
- compiler/GHC/Types/Error/Codes.hs
- compiler/GHC/Unit/Types.hs
- compiler/ghc.cabal.in
- configure.ac
- docs/users_guide/9.8.1-notes.rst
- ghc/ghc-bin.cabal.in
- hadrian/src/Packages.hs
- hadrian/src/Settings/Default.hs
- hadrian/src/Settings/Packages.hs
- libraries/Cabal
- libraries/Win32
- libraries/base/base.cabal
- libraries/base/changelog.md
- libraries/base/src/Control/Applicative.hs
- libraries/base/src/Control/Concurrent.hs
- libraries/base/src/Data/Complex.hs
- libraries/base/src/Data/Semigroup.hs
- + libraries/base/src/Dummy.hs
- libraries/base/src/System/CPUTime/Posix/Times.hsc
- libraries/base/tests/IO/T21336/T21336a.stderr


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/f280244d8f275f2eb3f99c5ceb23888210a563b1...dea481eae92496e1cb675dfd06dc79d3f2f1d003

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/f280244d8f275f2eb3f99c5ceb23888210a563b1...dea481eae92496e1cb675dfd06dc79d3f2f1d003
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/20240131/82a66b1c/attachment.html>


More information about the ghc-commits mailing list