base 4.20.0.1 → 4.20.1.0
raw patch · 13 files changed
+61/−12 lines, 13 filesdep ~ghc-internalPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: ghc-internal
API changes (from Hackage documentation)
- Control.Exception: throw :: forall a e. (?callStack :: CallStack, Exception e) => e -> a
+ Control.Exception: throw :: forall a e. (HasCallStack, Exception e) => e -> a
- Control.Exception.Base: throw :: forall a e. (?callStack :: CallStack, Exception e) => e -> a
+ Control.Exception.Base: throw :: forall a e. (HasCallStack, Exception e) => e -> a
- GHC.Exception: throw :: forall a e. (?callStack :: CallStack, Exception e) => e -> a
+ GHC.Exception: throw :: forall a e. (HasCallStack, Exception e) => e -> a
Files
- base.cabal +6/−2
- changelog.md +7/−0
- src/Control/Exception/Backtrace.hs +36/−1
- src/Data/Char.hs +1/−1
- src/Data/Functor/Product.hs +0/−1
- src/Data/Functor/Sum.hs +0/−1
- src/Data/Kind.hs +0/−1
- src/Data/Semigroup.hs +1/−1
- src/GHC/ConsoleHandler.hs +1/−0
- src/GHC/Constants.hs +2/−1
- src/GHC/Exts.hs +3/−0
- src/GHC/IO/Encoding/CodePage.hs +1/−0
- src/Prelude.hs +3/−3
base.cabal view
@@ -1,6 +1,10 @@ cabal-version: 3.0++-- WARNING: ghc-experimental.cabal is automatically generated from ghc-experimental.cabal.in+-- Make sure you are editing ghc-experimental.cabal.in, not ghc-experimental.cabal+ name: base-version: 4.20.0.1+version: 4.20.1.0 -- NOTE: Don't forget to update ./changelog.md license: BSD-3-Clause@@ -26,7 +30,7 @@ default-language: Haskell2010 default-extensions: NoImplicitPrelude build-depends:- ghc-internal >= 9.1001 && < 9.1002,+ ghc-internal == 9.1002.*, ghc-prim, exposed-modules:
changelog.md view
@@ -1,5 +1,12 @@ # Changelog for [`base` package](http://hackage.haskell.org/package/base) +## 4.20.1 *Jan 2025*+ * Shipped with GHC 9.10.2+ * `setNonBlockingMode` will no longer throw an exception when called on a FD associated with a unknown device type. ([CLC proposal #282](https://github.com/haskell/core-libraries-committee/issues/282))+ * Propagate HasCallStack from `errorCallWithCallStackException` to exception backtraces, fixing a bug in the implementation of [CLC proposal #164](https://github.com/haskell/core-libraries-committee/issues/164).+ * Modify the implementation of `Control.Exception.throw` to avoid call-sites being inferred as diverging via precise exception.+ ([GHC #25066](https://gitlab.haskell.org/ghc/ghc/-/issues/25066), [CLC proposal #290](https://github.com/haskell/core-libraries-committee/issues/290))+ ## 4.20.0.1 *May 2024* * Not shipped with any GHC: This is a documentation only release to fix various issues with base-4.20.0.0 docs due to the GHC internal split * For an accounting of the issues fixed, see [#24875](https://gitlab.haskell.org/ghc/ghc/-/issues/24875)
src/Control/Exception/Backtrace.hs view
@@ -7,8 +7,43 @@ -- Stability : internal -- Portability : non-portable (GHC Extensions) ----- Mechanisms for collecting diagnostic backtraces and their representation.+-- This module provides the 'Backtrace'\ s type, which provides a+-- common representation for backtrace information which can be, e.g., attached+-- to exceptions (via the 'Control.Exception.Context.ExceptionContext' facility).+-- These backtraces preserve useful context about the execution state of the program+-- using a variety of means; we call these means *backtrace mechanisms*. --+-- We currently support four backtrace mechanisms:+--+-- - 'CostCentreBacktrace' captures the current cost-centre stack+-- using 'GHC.Stack.CCS.getCurrentCCS'.+-- - 'HasCallStackBacktrace' captures the 'HasCallStack' 'CallStack'.+-- - 'ExecutionBacktrace' captures the execution stack, unwound and resolved+-- to symbols via DWARF debug information.+-- - 'IPEBacktrace' captures the execution stack, resolved to names via info-table+-- provenance information.+--+-- Each of these are useful in different situations. While 'CostCentreBacktrace's are+-- readily mapped back to the source program, they require that the program be instrumented+-- with cost-centres, incurring runtime cost. Similarly, 'HasCallStackBacktrace's require that+-- the program be manually annotated with 'HasCallStack' constraints.+--+-- By contrast, 'IPEBacktrace's incur no runtime instrumentation but require that (at least+-- some subset of) the program be built with GHC\'s @-finfo-table-map@ flag. Moreover, because+-- info-table provenance information is derived after optimisation, it may be harder to relate+-- back to the structure of the source program.+--+-- 'ExecutionBacktrace's are similar to 'IPEBacktrace's but use DWARF stack unwinding+-- and symbol resolution; this allows for useful backtraces even in the presence+-- of foreign calls, both into and out of Haskell. However, for robust stack unwinding+-- the entirety of the program (and its dependencies, both Haskell and native) must+-- be compiled with debugging information (e.g. using GHC\'s @-g@ flag).+++-- Note [Backtrace mechanisms]+-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~+-- See module docstring above.+ module Control.Exception.Backtrace ( -- * Backtrace mechanisms
src/Data/Char.hs view
@@ -42,7 +42,7 @@ , digitToInt , intToDigit - -- * GHC.Internal.Numeric representations+ -- * Numeric representations , ord , chr
src/Data/Functor/Product.hs view
@@ -29,7 +29,6 @@ import GHC.Internal.Data.Data (Data) import Data.Functor.Classes import GHC.Generics (Generic, Generic1)-import GHC.Internal.Text.Read () import Prelude -- | Lifted product of functors.
src/Data/Functor/Sum.hs view
@@ -26,7 +26,6 @@ import GHC.Internal.Data.Data (Data) import Data.Functor.Classes import GHC.Generics (Generic, Generic1)-import GHC.Internal.Text.Read () import Prelude -- | Lifted sum of functors.
src/Data/Kind.hs view
@@ -19,6 +19,5 @@ FUN ) where -import GHC.Num.BigNat () -- for build ordering (#23942) import GHC.Prim (FUN) import GHC.Types (Type, Constraint)
src/Data/Semigroup.hs view
@@ -85,7 +85,7 @@ , First(..) , Last(..) , WrappedMonoid(..)- -- * Re-exported monoids from GHC.Internal.Data.Monoid+ -- * Re-exported monoids , Dual(..) , Endo(..) , All(..)
src/GHC/ConsoleHandler.hs view
@@ -19,6 +19,7 @@ module GHC.ConsoleHandler () where +-- See W1 of Note [Tracking dependencies on primitives] in GHC.Internal.Base import Prelude () -- for build ordering #else
src/GHC/Constants.hs view
@@ -1,5 +1,6 @@ -- TODO: Deprecate module GHC.Constants where -import GHC.Base () -- dummy dependency+-- See W1 of Note [Tracking dependencies on primitives] in GHC.Internal.Base+import GHC.Types () -- for build ordering
src/GHC/Exts.hs view
@@ -14,6 +14,9 @@ -- -- Note: no other @base@ module should import this module. +-- See Note [Where do we export PrimOps] for details about how to expose primops+-- to users.+ module GHC.Exts (-- ** Pointer types Ptr(..),
src/GHC/IO/Encoding/CodePage.hs view
@@ -5,6 +5,7 @@ module GHC.IO.Encoding.CodePage ( ) where +-- See W1 of Note [Tracking dependencies on primitives] in GHC.Internal.Base import Prelude () -- for build ordering #else
src/Prelude.hs view
@@ -47,11 +47,11 @@ -- ** Numbers - -- *** GHC.Internal.Numeric types+ -- *** Numeric types Int, Integer, Float, Double, Rational, Word, - -- *** GHC.Internal.Numeric type classes+ -- *** Numeric type classes Num((+), (-), (*), negate, abs, signum, fromInteger), Real(toRational), Integral(quot, rem, div, mod, quotRem, divMod, toInteger),@@ -63,7 +63,7 @@ encodeFloat, exponent, significand, scaleFloat, isNaN, isInfinite, isDenormalized, isIEEE, isNegativeZero, atan2), - -- *** GHC.Internal.Numeric functions+ -- *** Numeric functions subtract, even, odd, gcd, lcm, (^), (^^), fromIntegral, realToFrac,