[Git][ghc/ghc][wip/monomorphic-nonempty-unzip] 5 commits: base: Add `HasCallStack` constraint to `ioError`

Bodigrim (@Bodigrim) gitlab at gitlab.haskell.org
Fri Oct 4 22:06:12 UTC 2024



Bodigrim pushed to branch wip/monomorphic-nonempty-unzip at Glasgow Haskell Compiler / GHC


Commits:
876d6e0e by Ben Gamari at 2024-10-04T15:07:53+01:00
base: Add `HasCallStack` constraint to `ioError`

As proposed in core-libraries-committee#275.

- - - - -
9bfd9fd0 by Matthew Pickering at 2024-10-04T15:08:03+01:00
Fix toException method for ExceptionWithContext

Fixes #25235

- - - - -
ac004028 by Matthew Pickering at 2024-10-04T15:09:07+01:00
Exception rethrowing

Basic changes:

* Change `catch` function to propagate exceptions using the
  WhileHandling mechanism.
* Introduce `catchNoPropagate`, which does the same as before, but
  passes an exception which can be rethrown.
* Introduce `rethrowIO` combinator, which rethrows an exception with a
  context and doesn't add a new backtrace.
* Introduce `tryWithContext` for a variant of `try` which can rethrow
  the exception with it's original context.
* onException is modified to rethrow the original error rather than
  creating a new callstack.
* Functions which rethrow in GHC.Internal.IO.Handle.FD,
  GHC.Internal.IO.Handle.Internals, GHC.Internal.IO.Handle.Text, and
  GHC.Internal.System.IO.Error are modified to not add a new callstack.

Implements CLC proposal#202 <https://github.com/haskell/core-libraries-committee/issues/202>

- - - - -
bcb293f2 by Cheng Shao at 2024-10-04T17:59:28-04:00
testsuite: remove accidentally checked in debug print logic

- - - - -
6e39778b by Andrew Lelechenko at 2024-10-04T23:06:03+01:00
Restrict Data.List.NonEmpty.unzip to NonEmpty (a, b) -> (NonEmpty a, NonEmpty b)

Implementing the final phase of CLC proposal https://github.com/haskell/core-libraries-committee/issues/86

- - - - -


30 changed files:

- libraries/base/changelog.md
- libraries/base/src/Control/Exception.hs
- libraries/base/src/Data/List/NonEmpty.hs
- libraries/base/tests/IO/T21336/T21336b.stderr
- libraries/base/tests/IO/T4808.stderr
- libraries/base/tests/IO/mkdirExists.stderr
- libraries/base/tests/IO/openFile002.stderr
- libraries/base/tests/IO/openFile002.stderr-mingw32
- libraries/base/tests/IO/withBinaryFile001.stderr
- libraries/base/tests/IO/withBinaryFile002.stderr
- libraries/base/tests/IO/withFile001.stderr
- libraries/base/tests/IO/withFile002.stderr
- libraries/base/tests/IO/withFileBlocking001.stderr
- libraries/base/tests/IO/withFileBlocking002.stderr
- libraries/base/tests/T15349.stderr
- libraries/ghc-internal/src/GHC/Internal/Control/Exception.hs
- libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs
- libraries/ghc-internal/src/GHC/Internal/Exception/Type.hs
- libraries/ghc-internal/src/GHC/Internal/IO.hs
- libraries/ghc-internal/src/GHC/Internal/IO/Exception.hs
- libraries/ghc-internal/src/GHC/Internal/IO/Handle/FD.hs
- libraries/ghc-internal/src/GHC/Internal/IO/Handle/Internals.hs
- libraries/ghc-internal/src/GHC/Internal/IO/Handle/Text.hs
- libraries/ghc-internal/src/GHC/Internal/System/IO/Error.hs
- testsuite/tests/codeGen/should_run/cgrun016.stderr
- testsuite/tests/codeGen/should_run/cgrun025.stderr
- testsuite/tests/concurrent/should_run/T3279.hs
- testsuite/tests/ffi/should_run/T7170.stderr
- testsuite/tests/ghc-e/should_fail/T18441fail2.stderr
- testsuite/tests/ghc-e/should_fail/T18441fail7.stderr


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/3ceb34978c85cf2e87f67bd2d907285b9402ec3e...6e39778b4dcb1a1d773ee0c1747f893cb0b6ac10

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/3ceb34978c85cf2e87f67bd2d907285b9402ec3e...6e39778b4dcb1a1d773ee0c1747f893cb0b6ac10
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/20241004/d4cf7c19/attachment.html>


More information about the ghc-commits mailing list