Haskell.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

ghc-commits

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
ghc-commits@haskell.org

  • 1 participants
  • 8640 discussions
[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 2 commits: base: don't expose GHC.Num.{BigNat, Integer, Natural}
by Marge Bot (@marge-bot) 19 Jan '26

19 Jan '26
Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC Commits: 01be89c2 by Teo Camarasu at 2026-01-19T15:06:30-05:00 base: don't expose GHC.Num.{BigNat, Integer, Natural} We no longer expose GHC.Num.{BigNat, Integer, Natural} from base instead users should get these modules from ghc-bignum. We make this change to insulate end users from changes to GHC's implementation of big numbers. Implements CLC proposal 359: https://github.com/haskell/core-libraries-committee/issues/359 - - - - - 34564f82 by Teo Camarasu at 2026-01-19T15:06:31-05:00 base: deprecate GHC internals in GHC.Num Implements CLC proposal: https://github.com/haskell/core-libraries-committee/issues/360 - - - - - 14 changed files: - libraries/base/base.cabal.in - libraries/base/changelog.md - libraries/base/src/Data/Array/Byte.hs - libraries/base/src/GHC/Num.hs - − libraries/base/src/GHC/Num/BigNat.hs - − libraries/base/src/GHC/Num/Integer.hs - − libraries/base/src/GHC/Num/Natural.hs - libraries/base/src/System/CPUTime/Utils.hs - libraries/ghc-bignum/ghc-bignum.cabal - libraries/ghc-experimental/src/GHC/TypeNats/Experimental.hs - testsuite/tests/interface-stability/base-exports.stdout - testsuite/tests/interface-stability/base-exports.stdout-javascript-unknown-ghcjs - testsuite/tests/interface-stability/base-exports.stdout-mingw32 - testsuite/tests/interface-stability/base-exports.stdout-ws-32 Changes: ===================================== libraries/base/base.cabal.in ===================================== @@ -219,9 +219,6 @@ Library , GHC.MVar , GHC.Natural , GHC.Num - , GHC.Num.Integer - , GHC.Num.Natural - , GHC.Num.BigNat , GHC.OldList , GHC.OverloadedLabels , GHC.Profiling ===================================== libraries/base/changelog.md ===================================== @@ -13,8 +13,10 @@ * Add `thenA` and `thenM`. ([CLC proposal #351](https://github.com/haskell/core-libraries-committee/issues/351)) * Fix bug where `naturalAndNot` was incorrectly truncating results ([CLC proposal #350](github.com/haskell/core-libraries-committee/issues/350)) * generalize `deleteBy` and `deleteFirstsBy` ([CLC proposal 372](https://github.com/haskell/core-libraries-committee/issues/372)) + * GHC.Num.{BigNat, Integer, Natural} are no longer exposed. Users should import them from `ghc-bignum` instead. ([CLC proposal #359](github.com/haskell/core-libraries-committee/issues/359)) * Remove extra laziness from `Data.Bifunctor.Bifunctor` instances for all tuples to have the same laziness as their `Data.Functor.Functor` counterparts (i.e. they became more strict than before) ([CLC proposal #339](https://github.com/haskell/core-libraries-committee/issues/339)) * Adjust the strictness of `Data.List.iterate'` to be more reasonable: every element of the output list is forced to WHNF when the `(:)` containing it is forced. ([CLC proposal #335)](https://github.com/haskell/core-libraries-committee/issues/335) + * GHC internals in `GHC.Num` have been deprecated and will be removed after one major release. ((CLC proposal #360)[https://github.com/haskell/core-libraries-committee/issues/360]) * Add `nubOrd` / `nubOrdBy` to `Data.List` and `Data.List.NonEmpty`. ([CLC proposal #336](https://github.com/haskell/core-libraries-committee/issues/336)) * Add `Semigroup` and `Monoid` instances for `Control.Monad.ST.Lazy`. ([CLC proposal #374](https://github.com/haskell/core-libraries-committee/issues/374)) * `GHC.Conc.throwSTM` and `GHC.Conc.Sync.throwSTM` now carry a `HasCallStack` constraint and attach a `Backtrace` annotation to the thrown exception. ([GHC #25365](https://gitlab.haskell.org/ghc/ghc/-/issues/25365)) ===================================== libraries/base/src/Data/Array/Byte.hs ===================================== @@ -27,7 +27,7 @@ import qualified GHC.Internal.Data.Foldable as F import GHC.Internal.Data.Maybe (fromMaybe) import Data.Semigroup import GHC.Internal.Exts -import GHC.Num.Integer (Integer(..)) +import GHC.Internal.Bignum.Integer (Integer(..)) import GHC.Internal.Show (intToDigit) import GHC.Internal.ST (ST(..), runST) import GHC.Internal.Word (Word8(..)) ===================================== libraries/base/src/GHC/Num.hs ===================================== @@ -1,5 +1,7 @@ {-# LANGUAGE MagicHash #-} {-# OPTIONS_HADDOCK not-home #-} +-- don't warn that some but not all of Integer and Natural are deprecated +{-# OPTIONS_GHC -Wno-incomplete-export-warnings -Wno-duplicate-exports #-} -- | -- Module : GHC.Num @@ -15,191 +17,370 @@ module GHC.Num ( Num(..) + , Integer + , Natural , subtract , quotRemInteger - , integerFromNatural - , integerToNaturalClamp - , integerToNaturalThrow - , integerToNatural - , integerToWord# - , integerToInt# - , integerToWord64# - , integerToInt64# - , integerAdd - , integerMul - , integerSub - , integerNegate - , integerAbs - , integerPopCount# - , integerQuot - , integerRem - , integerDiv - , integerMod - , integerDivMod# - , integerQuotRem# - , integerEncodeFloat# - , integerEncodeDouble# - , integerGcd - , integerLcm - , integerAnd - , integerOr - , integerXor - , integerComplement - , integerBit# - , integerTestBit# - , integerShiftL# - , integerShiftR# - , integerFromWord# - , integerFromWord64# - , integerFromInt64# - , Integer(..) - , integerBit - , integerCheck - , integerCheck# - , integerCompare - , integerDecodeDouble# - , integerDivMod - , integerEncodeDouble - , integerEq - , integerEq# - , integerFromAddr - , integerFromAddr# - , integerFromBigNat# - , integerFromBigNatNeg# - , integerFromBigNatSign# - , integerFromByteArray - , integerFromByteArray# - , integerFromInt - , integerFromInt# + , integerToWord , integerFromWord - , integerFromWordList - , integerFromWordNeg# - , integerFromWordSign# - , integerGcde - , integerGcde# - , integerGe - , integerGe# - , integerGt - , integerGt# - , integerIsNegative - , integerIsNegative# - , integerIsOne - , integerIsPowerOf2# - , integerIsZero - , integerLe - , integerLe# - , integerLog2 - , integerLog2# - , integerLogBase - , integerLogBase# - , integerLogBaseWord - , integerLogBaseWord# - , integerLt - , integerLt# - , integerNe - , integerNe# - , integerOne - , integerPowMod# - , integerQuotRem - , integerRecipMod# - , integerShiftL - , integerShiftR - , integerSignum - , integerSignum# - , integerSizeInBase# - , integerSqr - , integerTestBit - , integerToAddr - , integerToAddr# - , integerToBigNatClamp# - , integerToBigNatSign# , integerToInt - , integerToMutableByteArray - , integerToMutableByteArray# - , integerToWord - , integerZero - , naturalToWord# - , naturalPopCount# - , naturalShiftR# - , naturalShiftL# - , naturalAdd - , naturalSub - , naturalSubThrow - , naturalSubUnsafe - , naturalMul - , naturalQuotRem# - , naturalQuot - , naturalRem - , naturalAnd - , naturalAndNot - , naturalOr - , naturalXor - , naturalTestBit# - , naturalBit# - , naturalGcd - , naturalLcm - , naturalLog2# - , naturalLogBaseWord# - , naturalLogBase# - , naturalPowMod - , naturalSizeInBase# - , Natural(..) - , naturalBit - , naturalCheck - , naturalCheck# - , naturalClearBit - , naturalClearBit# - , naturalCompare - , naturalComplementBit - , naturalComplementBit# - , naturalEncodeDouble# - , naturalEncodeFloat# - , naturalEq - , naturalEq# - , naturalFromAddr - , naturalFromAddr# - , naturalFromBigNat# - , naturalFromByteArray# - , naturalFromWord - , naturalFromWord# - , naturalFromWord2# - , naturalFromWordList - , naturalGe - , naturalGe# - , naturalGt - , naturalGt# - , naturalIsOne - , naturalIsPowerOf2# - , naturalIsZero - , naturalLe - , naturalLe# - , naturalLog2 - , naturalLogBase - , naturalLogBaseWord - , naturalLt - , naturalLt# - , naturalNe - , naturalNe# - , naturalNegate - , naturalOne - , naturalPopCount - , naturalQuotRem - , naturalSetBit - , naturalSetBit# - , naturalShiftL - , naturalShiftR - , naturalSignum - , naturalSqr - , naturalTestBit - , naturalToAddr - , naturalToAddr# - , naturalToBigNat# - , naturalToMutableByteArray# - , naturalToWord - , naturalToWordClamp - , naturalToWordClamp# - , naturalToWordMaybe# - , naturalZero + , integerFromInt + , integerToNatural + , integerFromNatural + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + Integer(IN, IP, IS) + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + Natural(NS, NB) + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerToNaturalClamp + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerToNaturalThrow + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerToWord# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerToInt# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerToWord64# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerToInt64# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerAdd + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerMul + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerSub + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerNegate + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerAbs + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerPopCount# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerQuot + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerRem + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerDiv + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerMod + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerDivMod# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerQuotRem# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerEncodeFloat# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerEncodeDouble# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerGcd + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerLcm + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerAnd + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerOr + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerXor + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerComplement + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerBit# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerTestBit# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerShiftL# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerShiftR# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerFromWord# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerFromWord64# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerFromInt64# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerBit + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerCheck + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerCheck# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerCompare + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerDecodeDouble# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerDivMod + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerEncodeDouble + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerEq + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerEq# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerFromAddr + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerFromAddr# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerFromBigNat# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerFromBigNatNeg# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerFromBigNatSign# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerFromByteArray + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerFromByteArray# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerFromInt# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerFromWordList + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerFromWordNeg# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerFromWordSign# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerGcde + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerGcde# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerGe + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerGe# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerGt + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerGt# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerIsNegative + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerIsNegative# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerIsOne + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerIsPowerOf2# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerIsZero + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerLe + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerLe# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerLog2 + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerLog2# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerLogBase + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerLogBase# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerLogBaseWord + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerLogBaseWord# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerLt + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerLt# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerNe + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerNe# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerOne + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerPowMod# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerQuotRem + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerRecipMod# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerShiftL + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerShiftR + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerSignum + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerSignum# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerSizeInBase# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerSqr + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerTestBit + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerToAddr + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerToAddr# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerToBigNatClamp# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerToBigNatSign# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerToMutableByteArray + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerToMutableByteArray# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + integerZero + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalToWord# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalPopCount# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalShiftR# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalShiftL# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalAdd + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalSub + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalSubThrow + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalSubUnsafe + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalMul + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalQuotRem# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalQuot + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalRem + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalAnd + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalAndNot + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalOr + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalXor + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalTestBit# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalBit# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalGcd + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalLcm + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalLog2# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalLogBaseWord# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalLogBase# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalPowMod + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalSizeInBase# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalBit + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalCheck + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalCheck# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalClearBit + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalClearBit# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalCompare + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalComplementBit + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalComplementBit# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalEncodeDouble# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalEncodeFloat# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalEq + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalEq# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalFromAddr + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalFromAddr# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalFromBigNat# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalFromByteArray# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalFromWord + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalFromWord# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalFromWord2# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalFromWordList + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalGe + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalGe# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalGt + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalGt# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalIsOne + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalIsPowerOf2# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalIsZero + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalLe + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalLe# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalLog2 + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalLogBase + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalLogBaseWord + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalLt + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalLt# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalNe + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalNe# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalNegate + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalOne + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalPopCount + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalQuotRem + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalSetBit + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalSetBit# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalShiftL + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalShiftR + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalSignum + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalSqr + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalTestBit + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalToAddr + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalToAddr# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalToBigNat# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalToMutableByteArray# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalToWord + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalToWordClamp + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalToWordClamp# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalToWordMaybe# + , {-# DEPRECATED ["The internals of big numbers will be removed in 4.24.", "Use ghc-bignum instead."] #-} + naturalZero ) where ===================================== libraries/base/src/GHC/Num/BigNat.hs deleted ===================================== @@ -1,6 +0,0 @@ -module GHC.Num.BigNat - ( module GHC.Internal.Bignum.BigNat - ) -where - -import GHC.Internal.Bignum.BigNat ===================================== libraries/base/src/GHC/Num/Integer.hs deleted ===================================== @@ -1,6 +0,0 @@ -module GHC.Num.Integer - ( module GHC.Internal.Bignum.Integer - ) -where - -import GHC.Internal.Bignum.Integer ===================================== libraries/base/src/GHC/Num/Natural.hs deleted ===================================== @@ -1,6 +0,0 @@ -module GHC.Num.Natural - ( module GHC.Internal.Bignum.Natural - ) -where - -import GHC.Internal.Bignum.Natural ===================================== libraries/base/src/System/CPUTime/Utils.hs ===================================== @@ -8,7 +8,7 @@ module System.CPUTime.Utils ) where import GHC.Internal.Foreign.C.Types -import GHC.Num.Integer (Integer) +import GHC.Internal.Bignum.Integer (Integer) import GHC.Internal.Real (fromIntegral) cClockToInteger :: CClock -> Integer ===================================== libraries/ghc-bignum/ghc-bignum.cabal ===================================== @@ -10,10 +10,8 @@ bug-reports: https://gitlab.haskell.org/ghc/ghc/issues/new category: Numeric, Algebra, GHC build-type: Simple description: - This package used to provide the low-level implementation of the standard + This package provides the low-level implementation of the standard 'BigNat', 'Natural' and 'Integer' types. - Use `base:GHC.Num.{Integer,Natural,BigNat}` instead or other modules from - `ghc-internal`. extra-source-files: changelog.md @@ -40,13 +38,6 @@ library , GHC.Internal.Bignum.Backend as GHC.Num.Backend , GHC.Internal.Bignum.Backend.Selected as GHC.Num.Backend.Selected , GHC.Internal.Bignum.Backend.Native as GHC.Num.Backend.Native - -- reexport from base - -- We can't reexport these modules from ghc-internal otherwise we get - -- ambiguity between: - -- ghc-bignum:GHC.Num.X - -- base:GHC.Num.X - -- we should probably just deprecate ghc-bignum and encourage users to use - -- exports from base instead. - , GHC.Num.BigNat - , GHC.Num.Natural - , GHC.Num.Integer + , GHC.Internal.Bignum.BigNat as GHC.Num.BigNat + , GHC.Internal.Bignum.Natural as GHC.Num.Natural + , GHC.Internal.Bignum.Integer as GHC.Num.Integer ===================================== libraries/ghc-experimental/src/GHC/TypeNats/Experimental.hs ===================================== @@ -12,7 +12,7 @@ module GHC.TypeNats.Experimental ( ) where import GHC.Internal.TypeNats -import GHC.Num.Natural (naturalLog2) +import GHC.Internal.Bignum.Natural (naturalLog2) plusSNat :: SNat n -> SNat m -> SNat (n + m) plusSNat (UnsafeSNat n) (UnsafeSNat m) = UnsafeSNat (n + m) ===================================== testsuite/tests/interface-stability/base-exports.stdout ===================================== @@ -8550,340 +8550,6 @@ module GHC.Num where quotRemInteger :: Integer -> Integer -> (# Integer, Integer #) subtract :: forall a. Num a => a -> a -> a -module GHC.Num.BigNat where - -- Safety: None - type BigNat :: * - data BigNat = BN# {unBigNat :: BigNat#} - type BigNat# :: GHC.Internal.Types.UnliftedType - type BigNat# = GHC.Internal.Bignum.WordArray.WordArray# - bigNatAdd :: BigNat# -> BigNat# -> BigNat# - bigNatAddWord :: BigNat# -> GHC.Internal.Types.Word -> BigNat# - bigNatAddWord# :: BigNat# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatAnd :: BigNat# -> BigNat# -> BigNat# - bigNatAndInt# :: BigNat# -> GHC.Internal.Prim.Int# -> BigNat# - bigNatAndNot :: BigNat# -> BigNat# -> BigNat# - bigNatAndNotWord# :: BigNat# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatAndWord# :: BigNat# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatBit :: GHC.Internal.Types.Word -> BigNat# - bigNatBit# :: GHC.Internal.Prim.Word# -> BigNat# - bigNatCheck :: BigNat# -> GHC.Internal.Types.Bool - bigNatCheck# :: BigNat# -> GHC.Internal.Bignum.Primitives.Bool# - bigNatClearBit# :: BigNat# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatCompare :: BigNat# -> BigNat# -> GHC.Internal.Types.Ordering - bigNatCompareWord :: BigNat# -> GHC.Internal.Types.Word -> GHC.Internal.Types.Ordering - bigNatCompareWord# :: BigNat# -> GHC.Internal.Prim.Word# -> GHC.Internal.Types.Ordering - bigNatComplementBit# :: BigNat# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatCtz :: BigNat# -> GHC.Internal.Types.Word - bigNatCtz# :: BigNat# -> GHC.Internal.Prim.Word# - bigNatCtzWord :: BigNat# -> GHC.Internal.Types.Word - bigNatCtzWord# :: BigNat# -> GHC.Internal.Prim.Word# - bigNatEncodeDouble# :: BigNat# -> GHC.Internal.Prim.Int# -> GHC.Internal.Prim.Double# - bigNatEq :: BigNat# -> BigNat# -> GHC.Internal.Types.Bool - bigNatEq# :: BigNat# -> BigNat# -> GHC.Internal.Bignum.Primitives.Bool# - bigNatEqWord# :: BigNat# -> GHC.Internal.Prim.Word# -> GHC.Internal.Bignum.Primitives.Bool# - bigNatFromAbsInt# :: GHC.Internal.Prim.Int# -> BigNat# - bigNatFromAddr# :: forall s. GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Addr# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, BigNat# #) - bigNatFromAddrBE# :: forall s. GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Addr# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, BigNat# #) - bigNatFromAddrLE# :: forall s. GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Addr# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, BigNat# #) - bigNatFromByteArray# :: forall s. GHC.Internal.Prim.Word# -> GHC.Internal.Prim.ByteArray# -> GHC.Internal.Prim.Word# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, BigNat# #) - bigNatFromByteArrayBE# :: forall s. GHC.Internal.Prim.Word# -> GHC.Internal.Prim.ByteArray# -> GHC.Internal.Prim.Word# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, BigNat# #) - bigNatFromByteArrayLE# :: forall s. GHC.Internal.Prim.Word# -> GHC.Internal.Prim.ByteArray# -> GHC.Internal.Prim.Word# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, BigNat# #) - bigNatFromWord :: GHC.Internal.Types.Word -> BigNat# - bigNatFromWord# :: GHC.Internal.Prim.Word# -> BigNat# - bigNatFromWord2# :: GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatFromWord64# :: GHC.Internal.Prim.Word64# -> BigNat# - bigNatFromWordArray :: GHC.Internal.Bignum.WordArray.WordArray# -> GHC.Internal.Prim.Word# -> BigNat - bigNatFromWordArray# :: GHC.Internal.Bignum.WordArray.WordArray# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatFromWordList :: [GHC.Internal.Types.Word] -> BigNat# - bigNatFromWordList# :: [GHC.Internal.Types.Word] -> GHC.Internal.Bignum.WordArray.WordArray# - bigNatFromWordListUnsafe :: [GHC.Internal.Types.Word] -> BigNat# - bigNatGcd :: BigNat# -> BigNat# -> BigNat# - bigNatGcdWord# :: BigNat# -> GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Word# - bigNatGe :: BigNat# -> BigNat# -> GHC.Internal.Types.Bool - bigNatGe# :: BigNat# -> BigNat# -> GHC.Internal.Bignum.Primitives.Bool# - bigNatGt :: BigNat# -> BigNat# -> GHC.Internal.Types.Bool - bigNatGt# :: BigNat# -> BigNat# -> GHC.Internal.Bignum.Primitives.Bool# - bigNatGtWord :: BigNat# -> GHC.Internal.Types.Word -> GHC.Internal.Types.Bool - bigNatGtWord# :: BigNat# -> GHC.Internal.Prim.Word# -> GHC.Internal.Bignum.Primitives.Bool# - bigNatIndex :: BigNat# -> GHC.Internal.Prim.Int# -> GHC.Internal.Types.Word - bigNatIndex# :: BigNat# -> GHC.Internal.Prim.Int# -> GHC.Internal.Prim.Word# - bigNatIsOne :: BigNat# -> GHC.Internal.Types.Bool - bigNatIsOne# :: BigNat# -> GHC.Internal.Bignum.Primitives.Bool# - bigNatIsPowerOf2# :: BigNat# -> (# (# #) | GHC.Internal.Prim.Word# #) - bigNatIsTwo :: BigNat# -> GHC.Internal.Types.Bool - bigNatIsTwo# :: BigNat# -> GHC.Internal.Bignum.Primitives.Bool# - bigNatIsZero :: BigNat# -> GHC.Internal.Types.Bool - bigNatIsZero# :: BigNat# -> GHC.Internal.Bignum.Primitives.Bool# - bigNatLcm :: BigNat# -> BigNat# -> BigNat# - bigNatLcmWord# :: BigNat# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatLcmWordWord# :: GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatLe :: BigNat# -> BigNat# -> GHC.Internal.Types.Bool - bigNatLe# :: BigNat# -> BigNat# -> GHC.Internal.Bignum.Primitives.Bool# - bigNatLeWord :: BigNat# -> GHC.Internal.Types.Word -> GHC.Internal.Types.Bool - bigNatLeWord# :: BigNat# -> GHC.Internal.Prim.Word# -> GHC.Internal.Bignum.Primitives.Bool# - bigNatLog2 :: BigNat# -> GHC.Internal.Types.Word - bigNatLog2# :: BigNat# -> GHC.Internal.Prim.Word# - bigNatLogBase :: BigNat# -> BigNat# -> GHC.Internal.Types.Word - bigNatLogBase# :: BigNat# -> BigNat# -> GHC.Internal.Prim.Word# - bigNatLogBaseWord :: GHC.Internal.Types.Word -> BigNat# -> GHC.Internal.Types.Word - bigNatLogBaseWord# :: GHC.Internal.Prim.Word# -> BigNat# -> GHC.Internal.Prim.Word# - bigNatLt :: BigNat# -> BigNat# -> GHC.Internal.Types.Bool - bigNatLt# :: BigNat# -> BigNat# -> GHC.Internal.Bignum.Primitives.Bool# - bigNatMul :: BigNat# -> BigNat# -> BigNat# - bigNatMulWord :: BigNat# -> GHC.Internal.Types.Word -> BigNat# - bigNatMulWord# :: BigNat# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatNe :: BigNat# -> BigNat# -> GHC.Internal.Types.Bool - bigNatNe# :: BigNat# -> BigNat# -> GHC.Internal.Bignum.Primitives.Bool# - bigNatOne :: BigNat - bigNatOne# :: (# #) -> BigNat# - bigNatOr :: BigNat# -> BigNat# -> BigNat# - bigNatOrWord# :: BigNat# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatPopCount :: BigNat# -> GHC.Internal.Types.Word - bigNatPopCount# :: BigNat# -> GHC.Internal.Prim.Word# - bigNatPowMod :: BigNat# -> BigNat# -> BigNat# -> BigNat# - bigNatPowModWord# :: BigNat# -> BigNat# -> GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Word# - bigNatQuot :: BigNat# -> BigNat# -> BigNat# - bigNatQuotRem# :: BigNat# -> BigNat# -> (# BigNat#, BigNat# #) - bigNatQuotRemWord# :: BigNat# -> GHC.Internal.Prim.Word# -> (# BigNat#, GHC.Internal.Prim.Word# #) - bigNatQuotWord :: BigNat# -> GHC.Internal.Types.Word -> BigNat# - bigNatQuotWord# :: BigNat# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatRem :: BigNat# -> BigNat# -> BigNat# - bigNatRemWord :: BigNat# -> GHC.Internal.Types.Word -> GHC.Internal.Types.Word - bigNatRemWord# :: BigNat# -> GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Word# - bigNatSetBit# :: BigNat# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatShiftL :: BigNat# -> GHC.Internal.Types.Word -> BigNat# - bigNatShiftL# :: BigNat# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatShiftR :: BigNat# -> GHC.Internal.Types.Word -> BigNat# - bigNatShiftR# :: BigNat# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatShiftRNeg# :: BigNat# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatSize :: BigNat# -> GHC.Internal.Types.Word - bigNatSize# :: BigNat# -> GHC.Internal.Prim.Int# - bigNatSizeInBase :: GHC.Internal.Types.Word -> BigNat# -> GHC.Internal.Types.Word - bigNatSizeInBase# :: GHC.Internal.Prim.Word# -> BigNat# -> GHC.Internal.Prim.Word# - bigNatSqr :: BigNat# -> BigNat# - bigNatSub :: BigNat# -> BigNat# -> (# (# #) | BigNat# #) - bigNatSubUnsafe :: BigNat# -> BigNat# -> BigNat# - bigNatSubWord# :: BigNat# -> GHC.Internal.Prim.Word# -> (# (# #) | BigNat# #) - bigNatSubWordUnsafe :: BigNat# -> GHC.Internal.Types.Word -> BigNat# - bigNatSubWordUnsafe# :: BigNat# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatTestBit :: BigNat# -> GHC.Internal.Types.Word -> GHC.Internal.Types.Bool - bigNatTestBit# :: BigNat# -> GHC.Internal.Prim.Word# -> GHC.Internal.Bignum.Primitives.Bool# - bigNatToAddr :: BigNat# -> GHC.Internal.Prim.Addr# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Types.IO GHC.Internal.Types.Word - bigNatToAddr# :: forall s. BigNat# -> GHC.Internal.Prim.Addr# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, GHC.Internal.Prim.Word# #) - bigNatToAddrBE# :: forall s. BigNat# -> GHC.Internal.Prim.Addr# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, GHC.Internal.Prim.Word# #) - bigNatToAddrLE# :: forall s. BigNat# -> GHC.Internal.Prim.Addr# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, GHC.Internal.Prim.Word# #) - bigNatToInt :: BigNat# -> GHC.Internal.Types.Int - bigNatToInt# :: BigNat# -> GHC.Internal.Prim.Int# - bigNatToMutableByteArray# :: forall s. BigNat# -> GHC.Internal.Prim.MutableByteArray# s -> GHC.Internal.Prim.Word# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, GHC.Internal.Prim.Word# #) - bigNatToMutableByteArrayBE# :: forall s. BigNat# -> GHC.Internal.Prim.MutableByteArray# s -> GHC.Internal.Prim.Word# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, GHC.Internal.Prim.Word# #) - bigNatToMutableByteArrayLE# :: forall s. BigNat# -> GHC.Internal.Prim.MutableByteArray# s -> GHC.Internal.Prim.Word# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, GHC.Internal.Prim.Word# #) - bigNatToWord :: BigNat# -> GHC.Internal.Types.Word - bigNatToWord# :: BigNat# -> GHC.Internal.Prim.Word# - bigNatToWord64# :: BigNat# -> GHC.Internal.Prim.Word64# - bigNatToWordList :: BigNat# -> [GHC.Internal.Types.Word] - bigNatToWordMaybe# :: BigNat# -> (# (# #) | GHC.Internal.Prim.Word# #) - bigNatXor :: BigNat# -> BigNat# -> BigNat# - bigNatXorWord# :: BigNat# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatZero :: BigNat - bigNatZero# :: (# #) -> BigNat# - gcdInt :: GHC.Internal.Types.Int -> GHC.Internal.Types.Int -> GHC.Internal.Types.Int - gcdInt# :: GHC.Internal.Prim.Int# -> GHC.Internal.Prim.Int# -> GHC.Internal.Prim.Int# - gcdWord :: GHC.Internal.Types.Word -> GHC.Internal.Types.Word -> GHC.Internal.Types.Word - gcdWord# :: GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Word# - powModWord# :: GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Word# - raiseDivZero_BigNat :: (# #) -> BigNat# - -module GHC.Num.Integer where - -- Safety: None - type Integer :: * - data Integer = IS GHC.Internal.Prim.Int# | IP GHC.Internal.Prim.ByteArray# | IN GHC.Internal.Prim.ByteArray# - integerAbs :: Integer -> Integer - integerAdd :: Integer -> Integer -> Integer - integerAnd :: Integer -> Integer -> Integer - integerBit :: GHC.Internal.Types.Word -> Integer - integerBit# :: GHC.Internal.Prim.Word# -> Integer - integerCheck :: Integer -> GHC.Internal.Types.Bool - integerCheck# :: Integer -> GHC.Internal.Bignum.Primitives.Bool# - integerCompare :: Integer -> Integer -> GHC.Internal.Types.Ordering - integerComplement :: Integer -> Integer - integerDecodeDouble# :: GHC.Internal.Prim.Double# -> (# Integer, GHC.Internal.Prim.Int# #) - integerDiv :: Integer -> Integer -> Integer - integerDivMod :: Integer -> Integer -> (Integer, Integer) - integerDivMod# :: Integer -> Integer -> (# Integer, Integer #) - integerEncodeDouble :: Integer -> GHC.Internal.Types.Int -> GHC.Internal.Types.Double - integerEncodeDouble# :: Integer -> GHC.Internal.Prim.Int# -> GHC.Internal.Prim.Double# - integerEncodeFloat# :: Integer -> GHC.Internal.Prim.Int# -> GHC.Internal.Prim.Float# - integerEq :: Integer -> Integer -> GHC.Internal.Types.Bool - integerEq# :: Integer -> Integer -> GHC.Internal.Bignum.Primitives.Bool# - integerFromAddr :: GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Addr# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Types.IO Integer - integerFromAddr# :: forall s. GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Addr# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, Integer #) - integerFromBigNat# :: GHC.Internal.Bignum.BigNat.BigNat# -> Integer - integerFromBigNatNeg# :: GHC.Internal.Bignum.BigNat.BigNat# -> Integer - integerFromBigNatSign# :: GHC.Internal.Prim.Int# -> GHC.Internal.Bignum.BigNat.BigNat# -> Integer - integerFromByteArray :: GHC.Internal.Prim.Word# -> GHC.Internal.Prim.ByteArray# -> GHC.Internal.Prim.Word# -> GHC.Internal.Bignum.Primitives.Bool# -> Integer - integerFromByteArray# :: forall s. GHC.Internal.Prim.Word# -> GHC.Internal.Prim.ByteArray# -> GHC.Internal.Prim.Word# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, Integer #) - integerFromInt :: GHC.Internal.Types.Int -> Integer - integerFromInt# :: GHC.Internal.Prim.Int# -> Integer - integerFromInt64# :: GHC.Internal.Prim.Int64# -> Integer - integerFromNatural :: GHC.Internal.Bignum.Natural.Natural -> Integer - integerFromWord :: GHC.Internal.Types.Word -> Integer - integerFromWord# :: GHC.Internal.Prim.Word# -> Integer - integerFromWord64# :: GHC.Internal.Prim.Word64# -> Integer - integerFromWordList :: GHC.Internal.Types.Bool -> [GHC.Internal.Types.Word] -> Integer - integerFromWordNeg# :: GHC.Internal.Prim.Word# -> Integer - integerFromWordSign# :: GHC.Internal.Prim.Int# -> GHC.Internal.Prim.Word# -> Integer - integerGcd :: Integer -> Integer -> Integer - integerGcde :: Integer -> Integer -> (Integer, Integer, Integer) - integerGcde# :: Integer -> Integer -> (# Integer, Integer, Integer #) - integerGe :: Integer -> Integer -> GHC.Internal.Types.Bool - integerGe# :: Integer -> Integer -> GHC.Internal.Bignum.Primitives.Bool# - integerGt :: Integer -> Integer -> GHC.Internal.Types.Bool - integerGt# :: Integer -> Integer -> GHC.Internal.Bignum.Primitives.Bool# - integerIsNegative :: Integer -> GHC.Internal.Types.Bool - integerIsNegative# :: Integer -> GHC.Internal.Bignum.Primitives.Bool# - integerIsOne :: Integer -> GHC.Internal.Types.Bool - integerIsPowerOf2# :: Integer -> (# (# #) | GHC.Internal.Prim.Word# #) - integerIsZero :: Integer -> GHC.Internal.Types.Bool - integerLcm :: Integer -> Integer -> Integer - integerLe :: Integer -> Integer -> GHC.Internal.Types.Bool - integerLe# :: Integer -> Integer -> GHC.Internal.Bignum.Primitives.Bool# - integerLog2 :: Integer -> GHC.Internal.Types.Word - integerLog2# :: Integer -> GHC.Internal.Prim.Word# - integerLogBase :: Integer -> Integer -> GHC.Internal.Types.Word - integerLogBase# :: Integer -> Integer -> GHC.Internal.Prim.Word# - integerLogBaseWord :: GHC.Internal.Types.Word -> Integer -> GHC.Internal.Types.Word - integerLogBaseWord# :: GHC.Internal.Prim.Word# -> Integer -> GHC.Internal.Prim.Word# - integerLt :: Integer -> Integer -> GHC.Internal.Types.Bool - integerLt# :: Integer -> Integer -> GHC.Internal.Bignum.Primitives.Bool# - integerMod :: Integer -> Integer -> Integer - integerMul :: Integer -> Integer -> Integer - integerNe :: Integer -> Integer -> GHC.Internal.Types.Bool - integerNe# :: Integer -> Integer -> GHC.Internal.Bignum.Primitives.Bool# - integerNegate :: Integer -> Integer - integerOne :: Integer - integerOr :: Integer -> Integer -> Integer - integerPopCount# :: Integer -> GHC.Internal.Prim.Int# - integerPowMod# :: Integer -> Integer -> GHC.Internal.Bignum.Natural.Natural -> (# GHC.Internal.Bignum.Natural.Natural | () #) - integerQuot :: Integer -> Integer -> Integer - integerQuotRem :: Integer -> Integer -> (Integer, Integer) - integerQuotRem# :: Integer -> Integer -> (# Integer, Integer #) - integerRecipMod# :: Integer -> GHC.Internal.Bignum.Natural.Natural -> (# GHC.Internal.Bignum.Natural.Natural | () #) - integerRem :: Integer -> Integer -> Integer - integerShiftL :: Integer -> GHC.Internal.Types.Word -> Integer - integerShiftL# :: Integer -> GHC.Internal.Prim.Word# -> Integer - integerShiftR :: Integer -> GHC.Internal.Types.Word -> Integer - integerShiftR# :: Integer -> GHC.Internal.Prim.Word# -> Integer - integerSignum :: Integer -> Integer - integerSignum# :: Integer -> GHC.Internal.Prim.Int# - integerSizeInBase# :: GHC.Internal.Prim.Word# -> Integer -> GHC.Internal.Prim.Word# - integerSqr :: Integer -> Integer - integerSub :: Integer -> Integer -> Integer - integerTestBit :: Integer -> GHC.Internal.Types.Word -> GHC.Internal.Types.Bool - integerTestBit# :: Integer -> GHC.Internal.Prim.Word# -> GHC.Internal.Bignum.Primitives.Bool# - integerToAddr :: Integer -> GHC.Internal.Prim.Addr# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Types.IO GHC.Internal.Types.Word - integerToAddr# :: forall s. Integer -> GHC.Internal.Prim.Addr# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, GHC.Internal.Prim.Word# #) - integerToBigNatClamp# :: Integer -> GHC.Internal.Bignum.BigNat.BigNat# - integerToBigNatSign# :: Integer -> (# GHC.Internal.Prim.Int#, GHC.Internal.Bignum.BigNat.BigNat# #) - integerToInt :: Integer -> GHC.Internal.Types.Int - integerToInt# :: Integer -> GHC.Internal.Prim.Int# - integerToInt64# :: Integer -> GHC.Internal.Prim.Int64# - integerToMutableByteArray :: Integer -> GHC.Internal.Prim.MutableByteArray# GHC.Internal.Prim.RealWorld -> GHC.Internal.Prim.Word# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Types.IO GHC.Internal.Types.Word - integerToMutableByteArray# :: forall s. Integer -> GHC.Internal.Prim.MutableByteArray# s -> GHC.Internal.Prim.Word# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, GHC.Internal.Prim.Word# #) - integerToNatural :: Integer -> GHC.Internal.Bignum.Natural.Natural - integerToNaturalClamp :: Integer -> GHC.Internal.Bignum.Natural.Natural - integerToNaturalThrow :: Integer -> GHC.Internal.Bignum.Natural.Natural - integerToWord :: Integer -> GHC.Internal.Types.Word - integerToWord# :: Integer -> GHC.Internal.Prim.Word# - integerToWord64# :: Integer -> GHC.Internal.Prim.Word64# - integerXor :: Integer -> Integer -> Integer - integerZero :: Integer - -module GHC.Num.Natural where - -- Safety: None - type Natural :: * - data Natural = NS GHC.Internal.Prim.Word# | NB GHC.Internal.Prim.ByteArray# - naturalAdd :: Natural -> Natural -> Natural - naturalAnd :: Natural -> Natural -> Natural - naturalAndNot :: Natural -> Natural -> Natural - naturalBit :: GHC.Internal.Types.Word -> Natural - naturalBit# :: GHC.Internal.Prim.Word# -> Natural - naturalCheck :: Natural -> GHC.Internal.Types.Bool - naturalCheck# :: Natural -> GHC.Internal.Bignum.Primitives.Bool# - naturalClearBit :: Natural -> GHC.Internal.Types.Word -> Natural - naturalClearBit# :: Natural -> GHC.Internal.Prim.Word# -> Natural - naturalCompare :: Natural -> Natural -> GHC.Internal.Types.Ordering - naturalComplementBit :: Natural -> GHC.Internal.Types.Word -> Natural - naturalComplementBit# :: Natural -> GHC.Internal.Prim.Word# -> Natural - naturalEncodeDouble# :: Natural -> GHC.Internal.Prim.Int# -> GHC.Internal.Prim.Double# - naturalEncodeFloat# :: Natural -> GHC.Internal.Prim.Int# -> GHC.Internal.Prim.Float# - naturalEq :: Natural -> Natural -> GHC.Internal.Types.Bool - naturalEq# :: Natural -> Natural -> GHC.Internal.Bignum.Primitives.Bool# - naturalFromAddr :: GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Addr# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Types.IO Natural - naturalFromAddr# :: forall s. GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Addr# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, Natural #) - naturalFromBigNat# :: GHC.Internal.Bignum.BigNat.BigNat# -> Natural - naturalFromByteArray# :: forall s. GHC.Internal.Prim.Word# -> GHC.Internal.Prim.ByteArray# -> GHC.Internal.Prim.Word# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, Natural #) - naturalFromWord :: GHC.Internal.Types.Word -> Natural - naturalFromWord# :: GHC.Internal.Prim.Word# -> Natural - naturalFromWord2# :: GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Word# -> Natural - naturalFromWordList :: [GHC.Internal.Types.Word] -> Natural - naturalGcd :: Natural -> Natural -> Natural - naturalGe :: Natural -> Natural -> GHC.Internal.Types.Bool - naturalGe# :: Natural -> Natural -> GHC.Internal.Bignum.Primitives.Bool# - naturalGt :: Natural -> Natural -> GHC.Internal.Types.Bool - naturalGt# :: Natural -> Natural -> GHC.Internal.Bignum.Primitives.Bool# - naturalIsOne :: Natural -> GHC.Internal.Types.Bool - naturalIsPowerOf2# :: Natural -> (# (# #) | GHC.Internal.Prim.Word# #) - naturalIsZero :: Natural -> GHC.Internal.Types.Bool - naturalLcm :: Natural -> Natural -> Natural - naturalLe :: Natural -> Natural -> GHC.Internal.Types.Bool - naturalLe# :: Natural -> Natural -> GHC.Internal.Bignum.Primitives.Bool# - naturalLog2 :: Natural -> GHC.Internal.Types.Word - naturalLog2# :: Natural -> GHC.Internal.Prim.Word# - naturalLogBase :: Natural -> Natural -> GHC.Internal.Types.Word - naturalLogBase# :: Natural -> Natural -> GHC.Internal.Prim.Word# - naturalLogBaseWord :: GHC.Internal.Types.Word -> Natural -> GHC.Internal.Types.Word - naturalLogBaseWord# :: GHC.Internal.Prim.Word# -> Natural -> GHC.Internal.Prim.Word# - naturalLt :: Natural -> Natural -> GHC.Internal.Types.Bool - naturalLt# :: Natural -> Natural -> GHC.Internal.Bignum.Primitives.Bool# - naturalMul :: Natural -> Natural -> Natural - naturalNe :: Natural -> Natural -> GHC.Internal.Types.Bool - naturalNe# :: Natural -> Natural -> GHC.Internal.Bignum.Primitives.Bool# - naturalNegate :: Natural -> Natural - naturalOne :: Natural - naturalOr :: Natural -> Natural -> Natural - naturalPopCount :: Natural -> GHC.Internal.Types.Word - naturalPopCount# :: Natural -> GHC.Internal.Prim.Word# - naturalPowMod :: Natural -> Natural -> Natural -> Natural - naturalQuot :: Natural -> Natural -> Natural - naturalQuotRem :: Natural -> Natural -> (Natural, Natural) - naturalQuotRem# :: Natural -> Natural -> (# Natural, Natural #) - naturalRem :: Natural -> Natural -> Natural - naturalSetBit :: Natural -> GHC.Internal.Types.Word -> Natural - naturalSetBit# :: Natural -> GHC.Internal.Prim.Word# -> Natural - naturalShiftL :: Natural -> GHC.Internal.Types.Word -> Natural - naturalShiftL# :: Natural -> GHC.Internal.Prim.Word# -> Natural - naturalShiftR :: Natural -> GHC.Internal.Types.Word -> Natural - naturalShiftR# :: Natural -> GHC.Internal.Prim.Word# -> Natural - naturalSignum :: Natural -> Natural - naturalSizeInBase# :: GHC.Internal.Prim.Word# -> Natural -> GHC.Internal.Prim.Word# - naturalSqr :: Natural -> Natural - naturalSub :: Natural -> Natural -> (# (# #) | Natural #) - naturalSubThrow :: Natural -> Natural -> Natural - naturalSubUnsafe :: Natural -> Natural -> Natural - naturalTestBit :: Natural -> GHC.Internal.Types.Word -> GHC.Internal.Types.Bool - naturalTestBit# :: Natural -> GHC.Internal.Prim.Word# -> GHC.Internal.Bignum.Primitives.Bool# - naturalToAddr :: Natural -> GHC.Internal.Prim.Addr# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Types.IO GHC.Internal.Types.Word - naturalToAddr# :: forall s. Natural -> GHC.Internal.Prim.Addr# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, GHC.Internal.Prim.Word# #) - naturalToBigNat# :: Natural -> GHC.Internal.Bignum.BigNat.BigNat# - naturalToMutableByteArray# :: forall s. Natural -> GHC.Internal.Prim.MutableByteArray# s -> GHC.Internal.Prim.Word# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, GHC.Internal.Prim.Word# #) - naturalToWord :: Natural -> GHC.Internal.Types.Word - naturalToWord# :: Natural -> GHC.Internal.Prim.Word# - naturalToWordClamp :: Natural -> GHC.Internal.Types.Word - naturalToWordClamp# :: Natural -> GHC.Internal.Prim.Word# - naturalToWordMaybe# :: Natural -> (# (# #) | GHC.Internal.Prim.Word# #) - naturalXor :: Natural -> Natural -> Natural - naturalZero :: Natural - module GHC.OldList where -- Safety: Safe (!!) :: forall a. GHC.Internal.Stack.Types.HasCallStack => [a] -> GHC.Internal.Types.Int -> a ===================================== testsuite/tests/interface-stability/base-exports.stdout-javascript-unknown-ghcjs ===================================== @@ -8588,340 +8588,6 @@ module GHC.Num where quotRemInteger :: Integer -> Integer -> (# Integer, Integer #) subtract :: forall a. Num a => a -> a -> a -module GHC.Num.BigNat where - -- Safety: None - type BigNat :: * - data BigNat = BN# {unBigNat :: BigNat#} - type BigNat# :: GHC.Internal.Types.UnliftedType - type BigNat# = GHC.Internal.Bignum.WordArray.WordArray# - bigNatAdd :: BigNat# -> BigNat# -> BigNat# - bigNatAddWord :: BigNat# -> GHC.Internal.Types.Word -> BigNat# - bigNatAddWord# :: BigNat# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatAnd :: BigNat# -> BigNat# -> BigNat# - bigNatAndInt# :: BigNat# -> GHC.Internal.Prim.Int# -> BigNat# - bigNatAndNot :: BigNat# -> BigNat# -> BigNat# - bigNatAndNotWord# :: BigNat# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatAndWord# :: BigNat# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatBit :: GHC.Internal.Types.Word -> BigNat# - bigNatBit# :: GHC.Internal.Prim.Word# -> BigNat# - bigNatCheck :: BigNat# -> GHC.Internal.Types.Bool - bigNatCheck# :: BigNat# -> GHC.Internal.Bignum.Primitives.Bool# - bigNatClearBit# :: BigNat# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatCompare :: BigNat# -> BigNat# -> GHC.Internal.Types.Ordering - bigNatCompareWord :: BigNat# -> GHC.Internal.Types.Word -> GHC.Internal.Types.Ordering - bigNatCompareWord# :: BigNat# -> GHC.Internal.Prim.Word# -> GHC.Internal.Types.Ordering - bigNatComplementBit# :: BigNat# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatCtz :: BigNat# -> GHC.Internal.Types.Word - bigNatCtz# :: BigNat# -> GHC.Internal.Prim.Word# - bigNatCtzWord :: BigNat# -> GHC.Internal.Types.Word - bigNatCtzWord# :: BigNat# -> GHC.Internal.Prim.Word# - bigNatEncodeDouble# :: BigNat# -> GHC.Internal.Prim.Int# -> GHC.Internal.Prim.Double# - bigNatEq :: BigNat# -> BigNat# -> GHC.Internal.Types.Bool - bigNatEq# :: BigNat# -> BigNat# -> GHC.Internal.Bignum.Primitives.Bool# - bigNatEqWord# :: BigNat# -> GHC.Internal.Prim.Word# -> GHC.Internal.Bignum.Primitives.Bool# - bigNatFromAbsInt# :: GHC.Internal.Prim.Int# -> BigNat# - bigNatFromAddr# :: forall s. GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Addr# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, BigNat# #) - bigNatFromAddrBE# :: forall s. GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Addr# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, BigNat# #) - bigNatFromAddrLE# :: forall s. GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Addr# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, BigNat# #) - bigNatFromByteArray# :: forall s. GHC.Internal.Prim.Word# -> GHC.Internal.Prim.ByteArray# -> GHC.Internal.Prim.Word# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, BigNat# #) - bigNatFromByteArrayBE# :: forall s. GHC.Internal.Prim.Word# -> GHC.Internal.Prim.ByteArray# -> GHC.Internal.Prim.Word# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, BigNat# #) - bigNatFromByteArrayLE# :: forall s. GHC.Internal.Prim.Word# -> GHC.Internal.Prim.ByteArray# -> GHC.Internal.Prim.Word# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, BigNat# #) - bigNatFromWord :: GHC.Internal.Types.Word -> BigNat# - bigNatFromWord# :: GHC.Internal.Prim.Word# -> BigNat# - bigNatFromWord2# :: GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatFromWord64# :: GHC.Internal.Prim.Word64# -> BigNat# - bigNatFromWordArray :: GHC.Internal.Bignum.WordArray.WordArray# -> GHC.Internal.Prim.Word# -> BigNat - bigNatFromWordArray# :: GHC.Internal.Bignum.WordArray.WordArray# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatFromWordList :: [GHC.Internal.Types.Word] -> BigNat# - bigNatFromWordList# :: [GHC.Internal.Types.Word] -> GHC.Internal.Bignum.WordArray.WordArray# - bigNatFromWordListUnsafe :: [GHC.Internal.Types.Word] -> BigNat# - bigNatGcd :: BigNat# -> BigNat# -> BigNat# - bigNatGcdWord# :: BigNat# -> GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Word# - bigNatGe :: BigNat# -> BigNat# -> GHC.Internal.Types.Bool - bigNatGe# :: BigNat# -> BigNat# -> GHC.Internal.Bignum.Primitives.Bool# - bigNatGt :: BigNat# -> BigNat# -> GHC.Internal.Types.Bool - bigNatGt# :: BigNat# -> BigNat# -> GHC.Internal.Bignum.Primitives.Bool# - bigNatGtWord :: BigNat# -> GHC.Internal.Types.Word -> GHC.Internal.Types.Bool - bigNatGtWord# :: BigNat# -> GHC.Internal.Prim.Word# -> GHC.Internal.Bignum.Primitives.Bool# - bigNatIndex :: BigNat# -> GHC.Internal.Prim.Int# -> GHC.Internal.Types.Word - bigNatIndex# :: BigNat# -> GHC.Internal.Prim.Int# -> GHC.Internal.Prim.Word# - bigNatIsOne :: BigNat# -> GHC.Internal.Types.Bool - bigNatIsOne# :: BigNat# -> GHC.Internal.Bignum.Primitives.Bool# - bigNatIsPowerOf2# :: BigNat# -> (# (# #) | GHC.Internal.Prim.Word# #) - bigNatIsTwo :: BigNat# -> GHC.Internal.Types.Bool - bigNatIsTwo# :: BigNat# -> GHC.Internal.Bignum.Primitives.Bool# - bigNatIsZero :: BigNat# -> GHC.Internal.Types.Bool - bigNatIsZero# :: BigNat# -> GHC.Internal.Bignum.Primitives.Bool# - bigNatLcm :: BigNat# -> BigNat# -> BigNat# - bigNatLcmWord# :: BigNat# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatLcmWordWord# :: GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatLe :: BigNat# -> BigNat# -> GHC.Internal.Types.Bool - bigNatLe# :: BigNat# -> BigNat# -> GHC.Internal.Bignum.Primitives.Bool# - bigNatLeWord :: BigNat# -> GHC.Internal.Types.Word -> GHC.Internal.Types.Bool - bigNatLeWord# :: BigNat# -> GHC.Internal.Prim.Word# -> GHC.Internal.Bignum.Primitives.Bool# - bigNatLog2 :: BigNat# -> GHC.Internal.Types.Word - bigNatLog2# :: BigNat# -> GHC.Internal.Prim.Word# - bigNatLogBase :: BigNat# -> BigNat# -> GHC.Internal.Types.Word - bigNatLogBase# :: BigNat# -> BigNat# -> GHC.Internal.Prim.Word# - bigNatLogBaseWord :: GHC.Internal.Types.Word -> BigNat# -> GHC.Internal.Types.Word - bigNatLogBaseWord# :: GHC.Internal.Prim.Word# -> BigNat# -> GHC.Internal.Prim.Word# - bigNatLt :: BigNat# -> BigNat# -> GHC.Internal.Types.Bool - bigNatLt# :: BigNat# -> BigNat# -> GHC.Internal.Bignum.Primitives.Bool# - bigNatMul :: BigNat# -> BigNat# -> BigNat# - bigNatMulWord :: BigNat# -> GHC.Internal.Types.Word -> BigNat# - bigNatMulWord# :: BigNat# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatNe :: BigNat# -> BigNat# -> GHC.Internal.Types.Bool - bigNatNe# :: BigNat# -> BigNat# -> GHC.Internal.Bignum.Primitives.Bool# - bigNatOne :: BigNat - bigNatOne# :: (# #) -> BigNat# - bigNatOr :: BigNat# -> BigNat# -> BigNat# - bigNatOrWord# :: BigNat# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatPopCount :: BigNat# -> GHC.Internal.Types.Word - bigNatPopCount# :: BigNat# -> GHC.Internal.Prim.Word# - bigNatPowMod :: BigNat# -> BigNat# -> BigNat# -> BigNat# - bigNatPowModWord# :: BigNat# -> BigNat# -> GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Word# - bigNatQuot :: BigNat# -> BigNat# -> BigNat# - bigNatQuotRem# :: BigNat# -> BigNat# -> (# BigNat#, BigNat# #) - bigNatQuotRemWord# :: BigNat# -> GHC.Internal.Prim.Word# -> (# BigNat#, GHC.Internal.Prim.Word# #) - bigNatQuotWord :: BigNat# -> GHC.Internal.Types.Word -> BigNat# - bigNatQuotWord# :: BigNat# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatRem :: BigNat# -> BigNat# -> BigNat# - bigNatRemWord :: BigNat# -> GHC.Internal.Types.Word -> GHC.Internal.Types.Word - bigNatRemWord# :: BigNat# -> GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Word# - bigNatSetBit# :: BigNat# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatShiftL :: BigNat# -> GHC.Internal.Types.Word -> BigNat# - bigNatShiftL# :: BigNat# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatShiftR :: BigNat# -> GHC.Internal.Types.Word -> BigNat# - bigNatShiftR# :: BigNat# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatShiftRNeg# :: BigNat# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatSize :: BigNat# -> GHC.Internal.Types.Word - bigNatSize# :: BigNat# -> GHC.Internal.Prim.Int# - bigNatSizeInBase :: GHC.Internal.Types.Word -> BigNat# -> GHC.Internal.Types.Word - bigNatSizeInBase# :: GHC.Internal.Prim.Word# -> BigNat# -> GHC.Internal.Prim.Word# - bigNatSqr :: BigNat# -> BigNat# - bigNatSub :: BigNat# -> BigNat# -> (# (# #) | BigNat# #) - bigNatSubUnsafe :: BigNat# -> BigNat# -> BigNat# - bigNatSubWord# :: BigNat# -> GHC.Internal.Prim.Word# -> (# (# #) | BigNat# #) - bigNatSubWordUnsafe :: BigNat# -> GHC.Internal.Types.Word -> BigNat# - bigNatSubWordUnsafe# :: BigNat# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatTestBit :: BigNat# -> GHC.Internal.Types.Word -> GHC.Internal.Types.Bool - bigNatTestBit# :: BigNat# -> GHC.Internal.Prim.Word# -> GHC.Internal.Bignum.Primitives.Bool# - bigNatToAddr :: BigNat# -> GHC.Internal.Prim.Addr# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Types.IO GHC.Internal.Types.Word - bigNatToAddr# :: forall s. BigNat# -> GHC.Internal.Prim.Addr# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, GHC.Internal.Prim.Word# #) - bigNatToAddrBE# :: forall s. BigNat# -> GHC.Internal.Prim.Addr# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, GHC.Internal.Prim.Word# #) - bigNatToAddrLE# :: forall s. BigNat# -> GHC.Internal.Prim.Addr# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, GHC.Internal.Prim.Word# #) - bigNatToInt :: BigNat# -> GHC.Internal.Types.Int - bigNatToInt# :: BigNat# -> GHC.Internal.Prim.Int# - bigNatToMutableByteArray# :: forall s. BigNat# -> GHC.Internal.Prim.MutableByteArray# s -> GHC.Internal.Prim.Word# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, GHC.Internal.Prim.Word# #) - bigNatToMutableByteArrayBE# :: forall s. BigNat# -> GHC.Internal.Prim.MutableByteArray# s -> GHC.Internal.Prim.Word# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, GHC.Internal.Prim.Word# #) - bigNatToMutableByteArrayLE# :: forall s. BigNat# -> GHC.Internal.Prim.MutableByteArray# s -> GHC.Internal.Prim.Word# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, GHC.Internal.Prim.Word# #) - bigNatToWord :: BigNat# -> GHC.Internal.Types.Word - bigNatToWord# :: BigNat# -> GHC.Internal.Prim.Word# - bigNatToWord64# :: BigNat# -> GHC.Internal.Prim.Word64# - bigNatToWordList :: BigNat# -> [GHC.Internal.Types.Word] - bigNatToWordMaybe# :: BigNat# -> (# (# #) | GHC.Internal.Prim.Word# #) - bigNatXor :: BigNat# -> BigNat# -> BigNat# - bigNatXorWord# :: BigNat# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatZero :: BigNat - bigNatZero# :: (# #) -> BigNat# - gcdInt :: GHC.Internal.Types.Int -> GHC.Internal.Types.Int -> GHC.Internal.Types.Int - gcdInt# :: GHC.Internal.Prim.Int# -> GHC.Internal.Prim.Int# -> GHC.Internal.Prim.Int# - gcdWord :: GHC.Internal.Types.Word -> GHC.Internal.Types.Word -> GHC.Internal.Types.Word - gcdWord# :: GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Word# - powModWord# :: GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Word# - raiseDivZero_BigNat :: (# #) -> BigNat# - -module GHC.Num.Integer where - -- Safety: None - type Integer :: * - data Integer = IS GHC.Internal.Prim.Int# | IP GHC.Internal.Prim.ByteArray# | IN GHC.Internal.Prim.ByteArray# - integerAbs :: Integer -> Integer - integerAdd :: Integer -> Integer -> Integer - integerAnd :: Integer -> Integer -> Integer - integerBit :: GHC.Internal.Types.Word -> Integer - integerBit# :: GHC.Internal.Prim.Word# -> Integer - integerCheck :: Integer -> GHC.Internal.Types.Bool - integerCheck# :: Integer -> GHC.Internal.Bignum.Primitives.Bool# - integerCompare :: Integer -> Integer -> GHC.Internal.Types.Ordering - integerComplement :: Integer -> Integer - integerDecodeDouble# :: GHC.Internal.Prim.Double# -> (# Integer, GHC.Internal.Prim.Int# #) - integerDiv :: Integer -> Integer -> Integer - integerDivMod :: Integer -> Integer -> (Integer, Integer) - integerDivMod# :: Integer -> Integer -> (# Integer, Integer #) - integerEncodeDouble :: Integer -> GHC.Internal.Types.Int -> GHC.Internal.Types.Double - integerEncodeDouble# :: Integer -> GHC.Internal.Prim.Int# -> GHC.Internal.Prim.Double# - integerEncodeFloat# :: Integer -> GHC.Internal.Prim.Int# -> GHC.Internal.Prim.Float# - integerEq :: Integer -> Integer -> GHC.Internal.Types.Bool - integerEq# :: Integer -> Integer -> GHC.Internal.Bignum.Primitives.Bool# - integerFromAddr :: GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Addr# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Types.IO Integer - integerFromAddr# :: forall s. GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Addr# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, Integer #) - integerFromBigNat# :: GHC.Internal.Bignum.BigNat.BigNat# -> Integer - integerFromBigNatNeg# :: GHC.Internal.Bignum.BigNat.BigNat# -> Integer - integerFromBigNatSign# :: GHC.Internal.Prim.Int# -> GHC.Internal.Bignum.BigNat.BigNat# -> Integer - integerFromByteArray :: GHC.Internal.Prim.Word# -> GHC.Internal.Prim.ByteArray# -> GHC.Internal.Prim.Word# -> GHC.Internal.Bignum.Primitives.Bool# -> Integer - integerFromByteArray# :: forall s. GHC.Internal.Prim.Word# -> GHC.Internal.Prim.ByteArray# -> GHC.Internal.Prim.Word# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, Integer #) - integerFromInt :: GHC.Internal.Types.Int -> Integer - integerFromInt# :: GHC.Internal.Prim.Int# -> Integer - integerFromInt64# :: GHC.Internal.Prim.Int64# -> Integer - integerFromNatural :: GHC.Internal.Bignum.Natural.Natural -> Integer - integerFromWord :: GHC.Internal.Types.Word -> Integer - integerFromWord# :: GHC.Internal.Prim.Word# -> Integer - integerFromWord64# :: GHC.Internal.Prim.Word64# -> Integer - integerFromWordList :: GHC.Internal.Types.Bool -> [GHC.Internal.Types.Word] -> Integer - integerFromWordNeg# :: GHC.Internal.Prim.Word# -> Integer - integerFromWordSign# :: GHC.Internal.Prim.Int# -> GHC.Internal.Prim.Word# -> Integer - integerGcd :: Integer -> Integer -> Integer - integerGcde :: Integer -> Integer -> (Integer, Integer, Integer) - integerGcde# :: Integer -> Integer -> (# Integer, Integer, Integer #) - integerGe :: Integer -> Integer -> GHC.Internal.Types.Bool - integerGe# :: Integer -> Integer -> GHC.Internal.Bignum.Primitives.Bool# - integerGt :: Integer -> Integer -> GHC.Internal.Types.Bool - integerGt# :: Integer -> Integer -> GHC.Internal.Bignum.Primitives.Bool# - integerIsNegative :: Integer -> GHC.Internal.Types.Bool - integerIsNegative# :: Integer -> GHC.Internal.Bignum.Primitives.Bool# - integerIsOne :: Integer -> GHC.Internal.Types.Bool - integerIsPowerOf2# :: Integer -> (# (# #) | GHC.Internal.Prim.Word# #) - integerIsZero :: Integer -> GHC.Internal.Types.Bool - integerLcm :: Integer -> Integer -> Integer - integerLe :: Integer -> Integer -> GHC.Internal.Types.Bool - integerLe# :: Integer -> Integer -> GHC.Internal.Bignum.Primitives.Bool# - integerLog2 :: Integer -> GHC.Internal.Types.Word - integerLog2# :: Integer -> GHC.Internal.Prim.Word# - integerLogBase :: Integer -> Integer -> GHC.Internal.Types.Word - integerLogBase# :: Integer -> Integer -> GHC.Internal.Prim.Word# - integerLogBaseWord :: GHC.Internal.Types.Word -> Integer -> GHC.Internal.Types.Word - integerLogBaseWord# :: GHC.Internal.Prim.Word# -> Integer -> GHC.Internal.Prim.Word# - integerLt :: Integer -> Integer -> GHC.Internal.Types.Bool - integerLt# :: Integer -> Integer -> GHC.Internal.Bignum.Primitives.Bool# - integerMod :: Integer -> Integer -> Integer - integerMul :: Integer -> Integer -> Integer - integerNe :: Integer -> Integer -> GHC.Internal.Types.Bool - integerNe# :: Integer -> Integer -> GHC.Internal.Bignum.Primitives.Bool# - integerNegate :: Integer -> Integer - integerOne :: Integer - integerOr :: Integer -> Integer -> Integer - integerPopCount# :: Integer -> GHC.Internal.Prim.Int# - integerPowMod# :: Integer -> Integer -> GHC.Internal.Bignum.Natural.Natural -> (# GHC.Internal.Bignum.Natural.Natural | () #) - integerQuot :: Integer -> Integer -> Integer - integerQuotRem :: Integer -> Integer -> (Integer, Integer) - integerQuotRem# :: Integer -> Integer -> (# Integer, Integer #) - integerRecipMod# :: Integer -> GHC.Internal.Bignum.Natural.Natural -> (# GHC.Internal.Bignum.Natural.Natural | () #) - integerRem :: Integer -> Integer -> Integer - integerShiftL :: Integer -> GHC.Internal.Types.Word -> Integer - integerShiftL# :: Integer -> GHC.Internal.Prim.Word# -> Integer - integerShiftR :: Integer -> GHC.Internal.Types.Word -> Integer - integerShiftR# :: Integer -> GHC.Internal.Prim.Word# -> Integer - integerSignum :: Integer -> Integer - integerSignum# :: Integer -> GHC.Internal.Prim.Int# - integerSizeInBase# :: GHC.Internal.Prim.Word# -> Integer -> GHC.Internal.Prim.Word# - integerSqr :: Integer -> Integer - integerSub :: Integer -> Integer -> Integer - integerTestBit :: Integer -> GHC.Internal.Types.Word -> GHC.Internal.Types.Bool - integerTestBit# :: Integer -> GHC.Internal.Prim.Word# -> GHC.Internal.Bignum.Primitives.Bool# - integerToAddr :: Integer -> GHC.Internal.Prim.Addr# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Types.IO GHC.Internal.Types.Word - integerToAddr# :: forall s. Integer -> GHC.Internal.Prim.Addr# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, GHC.Internal.Prim.Word# #) - integerToBigNatClamp# :: Integer -> GHC.Internal.Bignum.BigNat.BigNat# - integerToBigNatSign# :: Integer -> (# GHC.Internal.Prim.Int#, GHC.Internal.Bignum.BigNat.BigNat# #) - integerToInt :: Integer -> GHC.Internal.Types.Int - integerToInt# :: Integer -> GHC.Internal.Prim.Int# - integerToInt64# :: Integer -> GHC.Internal.Prim.Int64# - integerToMutableByteArray :: Integer -> GHC.Internal.Prim.MutableByteArray# GHC.Internal.Prim.RealWorld -> GHC.Internal.Prim.Word# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Types.IO GHC.Internal.Types.Word - integerToMutableByteArray# :: forall s. Integer -> GHC.Internal.Prim.MutableByteArray# s -> GHC.Internal.Prim.Word# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, GHC.Internal.Prim.Word# #) - integerToNatural :: Integer -> GHC.Internal.Bignum.Natural.Natural - integerToNaturalClamp :: Integer -> GHC.Internal.Bignum.Natural.Natural - integerToNaturalThrow :: Integer -> GHC.Internal.Bignum.Natural.Natural - integerToWord :: Integer -> GHC.Internal.Types.Word - integerToWord# :: Integer -> GHC.Internal.Prim.Word# - integerToWord64# :: Integer -> GHC.Internal.Prim.Word64# - integerXor :: Integer -> Integer -> Integer - integerZero :: Integer - -module GHC.Num.Natural where - -- Safety: None - type Natural :: * - data Natural = NS GHC.Internal.Prim.Word# | NB GHC.Internal.Prim.ByteArray# - naturalAdd :: Natural -> Natural -> Natural - naturalAnd :: Natural -> Natural -> Natural - naturalAndNot :: Natural -> Natural -> Natural - naturalBit :: GHC.Internal.Types.Word -> Natural - naturalBit# :: GHC.Internal.Prim.Word# -> Natural - naturalCheck :: Natural -> GHC.Internal.Types.Bool - naturalCheck# :: Natural -> GHC.Internal.Bignum.Primitives.Bool# - naturalClearBit :: Natural -> GHC.Internal.Types.Word -> Natural - naturalClearBit# :: Natural -> GHC.Internal.Prim.Word# -> Natural - naturalCompare :: Natural -> Natural -> GHC.Internal.Types.Ordering - naturalComplementBit :: Natural -> GHC.Internal.Types.Word -> Natural - naturalComplementBit# :: Natural -> GHC.Internal.Prim.Word# -> Natural - naturalEncodeDouble# :: Natural -> GHC.Internal.Prim.Int# -> GHC.Internal.Prim.Double# - naturalEncodeFloat# :: Natural -> GHC.Internal.Prim.Int# -> GHC.Internal.Prim.Float# - naturalEq :: Natural -> Natural -> GHC.Internal.Types.Bool - naturalEq# :: Natural -> Natural -> GHC.Internal.Bignum.Primitives.Bool# - naturalFromAddr :: GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Addr# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Types.IO Natural - naturalFromAddr# :: forall s. GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Addr# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, Natural #) - naturalFromBigNat# :: GHC.Internal.Bignum.BigNat.BigNat# -> Natural - naturalFromByteArray# :: forall s. GHC.Internal.Prim.Word# -> GHC.Internal.Prim.ByteArray# -> GHC.Internal.Prim.Word# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, Natural #) - naturalFromWord :: GHC.Internal.Types.Word -> Natural - naturalFromWord# :: GHC.Internal.Prim.Word# -> Natural - naturalFromWord2# :: GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Word# -> Natural - naturalFromWordList :: [GHC.Internal.Types.Word] -> Natural - naturalGcd :: Natural -> Natural -> Natural - naturalGe :: Natural -> Natural -> GHC.Internal.Types.Bool - naturalGe# :: Natural -> Natural -> GHC.Internal.Bignum.Primitives.Bool# - naturalGt :: Natural -> Natural -> GHC.Internal.Types.Bool - naturalGt# :: Natural -> Natural -> GHC.Internal.Bignum.Primitives.Bool# - naturalIsOne :: Natural -> GHC.Internal.Types.Bool - naturalIsPowerOf2# :: Natural -> (# (# #) | GHC.Internal.Prim.Word# #) - naturalIsZero :: Natural -> GHC.Internal.Types.Bool - naturalLcm :: Natural -> Natural -> Natural - naturalLe :: Natural -> Natural -> GHC.Internal.Types.Bool - naturalLe# :: Natural -> Natural -> GHC.Internal.Bignum.Primitives.Bool# - naturalLog2 :: Natural -> GHC.Internal.Types.Word - naturalLog2# :: Natural -> GHC.Internal.Prim.Word# - naturalLogBase :: Natural -> Natural -> GHC.Internal.Types.Word - naturalLogBase# :: Natural -> Natural -> GHC.Internal.Prim.Word# - naturalLogBaseWord :: GHC.Internal.Types.Word -> Natural -> GHC.Internal.Types.Word - naturalLogBaseWord# :: GHC.Internal.Prim.Word# -> Natural -> GHC.Internal.Prim.Word# - naturalLt :: Natural -> Natural -> GHC.Internal.Types.Bool - naturalLt# :: Natural -> Natural -> GHC.Internal.Bignum.Primitives.Bool# - naturalMul :: Natural -> Natural -> Natural - naturalNe :: Natural -> Natural -> GHC.Internal.Types.Bool - naturalNe# :: Natural -> Natural -> GHC.Internal.Bignum.Primitives.Bool# - naturalNegate :: Natural -> Natural - naturalOne :: Natural - naturalOr :: Natural -> Natural -> Natural - naturalPopCount :: Natural -> GHC.Internal.Types.Word - naturalPopCount# :: Natural -> GHC.Internal.Prim.Word# - naturalPowMod :: Natural -> Natural -> Natural -> Natural - naturalQuot :: Natural -> Natural -> Natural - naturalQuotRem :: Natural -> Natural -> (Natural, Natural) - naturalQuotRem# :: Natural -> Natural -> (# Natural, Natural #) - naturalRem :: Natural -> Natural -> Natural - naturalSetBit :: Natural -> GHC.Internal.Types.Word -> Natural - naturalSetBit# :: Natural -> GHC.Internal.Prim.Word# -> Natural - naturalShiftL :: Natural -> GHC.Internal.Types.Word -> Natural - naturalShiftL# :: Natural -> GHC.Internal.Prim.Word# -> Natural - naturalShiftR :: Natural -> GHC.Internal.Types.Word -> Natural - naturalShiftR# :: Natural -> GHC.Internal.Prim.Word# -> Natural - naturalSignum :: Natural -> Natural - naturalSizeInBase# :: GHC.Internal.Prim.Word# -> Natural -> GHC.Internal.Prim.Word# - naturalSqr :: Natural -> Natural - naturalSub :: Natural -> Natural -> (# (# #) | Natural #) - naturalSubThrow :: Natural -> Natural -> Natural - naturalSubUnsafe :: Natural -> Natural -> Natural - naturalTestBit :: Natural -> GHC.Internal.Types.Word -> GHC.Internal.Types.Bool - naturalTestBit# :: Natural -> GHC.Internal.Prim.Word# -> GHC.Internal.Bignum.Primitives.Bool# - naturalToAddr :: Natural -> GHC.Internal.Prim.Addr# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Types.IO GHC.Internal.Types.Word - naturalToAddr# :: forall s. Natural -> GHC.Internal.Prim.Addr# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, GHC.Internal.Prim.Word# #) - naturalToBigNat# :: Natural -> GHC.Internal.Bignum.BigNat.BigNat# - naturalToMutableByteArray# :: forall s. Natural -> GHC.Internal.Prim.MutableByteArray# s -> GHC.Internal.Prim.Word# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, GHC.Internal.Prim.Word# #) - naturalToWord :: Natural -> GHC.Internal.Types.Word - naturalToWord# :: Natural -> GHC.Internal.Prim.Word# - naturalToWordClamp :: Natural -> GHC.Internal.Types.Word - naturalToWordClamp# :: Natural -> GHC.Internal.Prim.Word# - naturalToWordMaybe# :: Natural -> (# (# #) | GHC.Internal.Prim.Word# #) - naturalXor :: Natural -> Natural -> Natural - naturalZero :: Natural - module GHC.OldList where -- Safety: Safe (!!) :: forall a. GHC.Internal.Stack.Types.HasCallStack => [a] -> GHC.Internal.Types.Int -> a ===================================== testsuite/tests/interface-stability/base-exports.stdout-mingw32 ===================================== @@ -8768,340 +8768,6 @@ module GHC.Num where quotRemInteger :: Integer -> Integer -> (# Integer, Integer #) subtract :: forall a. Num a => a -> a -> a -module GHC.Num.BigNat where - -- Safety: None - type BigNat :: * - data BigNat = BN# {unBigNat :: BigNat#} - type BigNat# :: GHC.Internal.Types.UnliftedType - type BigNat# = GHC.Internal.Bignum.WordArray.WordArray# - bigNatAdd :: BigNat# -> BigNat# -> BigNat# - bigNatAddWord :: BigNat# -> GHC.Internal.Types.Word -> BigNat# - bigNatAddWord# :: BigNat# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatAnd :: BigNat# -> BigNat# -> BigNat# - bigNatAndInt# :: BigNat# -> GHC.Internal.Prim.Int# -> BigNat# - bigNatAndNot :: BigNat# -> BigNat# -> BigNat# - bigNatAndNotWord# :: BigNat# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatAndWord# :: BigNat# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatBit :: GHC.Internal.Types.Word -> BigNat# - bigNatBit# :: GHC.Internal.Prim.Word# -> BigNat# - bigNatCheck :: BigNat# -> GHC.Internal.Types.Bool - bigNatCheck# :: BigNat# -> GHC.Internal.Bignum.Primitives.Bool# - bigNatClearBit# :: BigNat# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatCompare :: BigNat# -> BigNat# -> GHC.Internal.Types.Ordering - bigNatCompareWord :: BigNat# -> GHC.Internal.Types.Word -> GHC.Internal.Types.Ordering - bigNatCompareWord# :: BigNat# -> GHC.Internal.Prim.Word# -> GHC.Internal.Types.Ordering - bigNatComplementBit# :: BigNat# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatCtz :: BigNat# -> GHC.Internal.Types.Word - bigNatCtz# :: BigNat# -> GHC.Internal.Prim.Word# - bigNatCtzWord :: BigNat# -> GHC.Internal.Types.Word - bigNatCtzWord# :: BigNat# -> GHC.Internal.Prim.Word# - bigNatEncodeDouble# :: BigNat# -> GHC.Internal.Prim.Int# -> GHC.Internal.Prim.Double# - bigNatEq :: BigNat# -> BigNat# -> GHC.Internal.Types.Bool - bigNatEq# :: BigNat# -> BigNat# -> GHC.Internal.Bignum.Primitives.Bool# - bigNatEqWord# :: BigNat# -> GHC.Internal.Prim.Word# -> GHC.Internal.Bignum.Primitives.Bool# - bigNatFromAbsInt# :: GHC.Internal.Prim.Int# -> BigNat# - bigNatFromAddr# :: forall s. GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Addr# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, BigNat# #) - bigNatFromAddrBE# :: forall s. GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Addr# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, BigNat# #) - bigNatFromAddrLE# :: forall s. GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Addr# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, BigNat# #) - bigNatFromByteArray# :: forall s. GHC.Internal.Prim.Word# -> GHC.Internal.Prim.ByteArray# -> GHC.Internal.Prim.Word# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, BigNat# #) - bigNatFromByteArrayBE# :: forall s. GHC.Internal.Prim.Word# -> GHC.Internal.Prim.ByteArray# -> GHC.Internal.Prim.Word# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, BigNat# #) - bigNatFromByteArrayLE# :: forall s. GHC.Internal.Prim.Word# -> GHC.Internal.Prim.ByteArray# -> GHC.Internal.Prim.Word# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, BigNat# #) - bigNatFromWord :: GHC.Internal.Types.Word -> BigNat# - bigNatFromWord# :: GHC.Internal.Prim.Word# -> BigNat# - bigNatFromWord2# :: GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatFromWord64# :: GHC.Internal.Prim.Word64# -> BigNat# - bigNatFromWordArray :: GHC.Internal.Bignum.WordArray.WordArray# -> GHC.Internal.Prim.Word# -> BigNat - bigNatFromWordArray# :: GHC.Internal.Bignum.WordArray.WordArray# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatFromWordList :: [GHC.Internal.Types.Word] -> BigNat# - bigNatFromWordList# :: [GHC.Internal.Types.Word] -> GHC.Internal.Bignum.WordArray.WordArray# - bigNatFromWordListUnsafe :: [GHC.Internal.Types.Word] -> BigNat# - bigNatGcd :: BigNat# -> BigNat# -> BigNat# - bigNatGcdWord# :: BigNat# -> GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Word# - bigNatGe :: BigNat# -> BigNat# -> GHC.Internal.Types.Bool - bigNatGe# :: BigNat# -> BigNat# -> GHC.Internal.Bignum.Primitives.Bool# - bigNatGt :: BigNat# -> BigNat# -> GHC.Internal.Types.Bool - bigNatGt# :: BigNat# -> BigNat# -> GHC.Internal.Bignum.Primitives.Bool# - bigNatGtWord :: BigNat# -> GHC.Internal.Types.Word -> GHC.Internal.Types.Bool - bigNatGtWord# :: BigNat# -> GHC.Internal.Prim.Word# -> GHC.Internal.Bignum.Primitives.Bool# - bigNatIndex :: BigNat# -> GHC.Internal.Prim.Int# -> GHC.Internal.Types.Word - bigNatIndex# :: BigNat# -> GHC.Internal.Prim.Int# -> GHC.Internal.Prim.Word# - bigNatIsOne :: BigNat# -> GHC.Internal.Types.Bool - bigNatIsOne# :: BigNat# -> GHC.Internal.Bignum.Primitives.Bool# - bigNatIsPowerOf2# :: BigNat# -> (# (# #) | GHC.Internal.Prim.Word# #) - bigNatIsTwo :: BigNat# -> GHC.Internal.Types.Bool - bigNatIsTwo# :: BigNat# -> GHC.Internal.Bignum.Primitives.Bool# - bigNatIsZero :: BigNat# -> GHC.Internal.Types.Bool - bigNatIsZero# :: BigNat# -> GHC.Internal.Bignum.Primitives.Bool# - bigNatLcm :: BigNat# -> BigNat# -> BigNat# - bigNatLcmWord# :: BigNat# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatLcmWordWord# :: GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatLe :: BigNat# -> BigNat# -> GHC.Internal.Types.Bool - bigNatLe# :: BigNat# -> BigNat# -> GHC.Internal.Bignum.Primitives.Bool# - bigNatLeWord :: BigNat# -> GHC.Internal.Types.Word -> GHC.Internal.Types.Bool - bigNatLeWord# :: BigNat# -> GHC.Internal.Prim.Word# -> GHC.Internal.Bignum.Primitives.Bool# - bigNatLog2 :: BigNat# -> GHC.Internal.Types.Word - bigNatLog2# :: BigNat# -> GHC.Internal.Prim.Word# - bigNatLogBase :: BigNat# -> BigNat# -> GHC.Internal.Types.Word - bigNatLogBase# :: BigNat# -> BigNat# -> GHC.Internal.Prim.Word# - bigNatLogBaseWord :: GHC.Internal.Types.Word -> BigNat# -> GHC.Internal.Types.Word - bigNatLogBaseWord# :: GHC.Internal.Prim.Word# -> BigNat# -> GHC.Internal.Prim.Word# - bigNatLt :: BigNat# -> BigNat# -> GHC.Internal.Types.Bool - bigNatLt# :: BigNat# -> BigNat# -> GHC.Internal.Bignum.Primitives.Bool# - bigNatMul :: BigNat# -> BigNat# -> BigNat# - bigNatMulWord :: BigNat# -> GHC.Internal.Types.Word -> BigNat# - bigNatMulWord# :: BigNat# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatNe :: BigNat# -> BigNat# -> GHC.Internal.Types.Bool - bigNatNe# :: BigNat# -> BigNat# -> GHC.Internal.Bignum.Primitives.Bool# - bigNatOne :: BigNat - bigNatOne# :: (# #) -> BigNat# - bigNatOr :: BigNat# -> BigNat# -> BigNat# - bigNatOrWord# :: BigNat# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatPopCount :: BigNat# -> GHC.Internal.Types.Word - bigNatPopCount# :: BigNat# -> GHC.Internal.Prim.Word# - bigNatPowMod :: BigNat# -> BigNat# -> BigNat# -> BigNat# - bigNatPowModWord# :: BigNat# -> BigNat# -> GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Word# - bigNatQuot :: BigNat# -> BigNat# -> BigNat# - bigNatQuotRem# :: BigNat# -> BigNat# -> (# BigNat#, BigNat# #) - bigNatQuotRemWord# :: BigNat# -> GHC.Internal.Prim.Word# -> (# BigNat#, GHC.Internal.Prim.Word# #) - bigNatQuotWord :: BigNat# -> GHC.Internal.Types.Word -> BigNat# - bigNatQuotWord# :: BigNat# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatRem :: BigNat# -> BigNat# -> BigNat# - bigNatRemWord :: BigNat# -> GHC.Internal.Types.Word -> GHC.Internal.Types.Word - bigNatRemWord# :: BigNat# -> GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Word# - bigNatSetBit# :: BigNat# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatShiftL :: BigNat# -> GHC.Internal.Types.Word -> BigNat# - bigNatShiftL# :: BigNat# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatShiftR :: BigNat# -> GHC.Internal.Types.Word -> BigNat# - bigNatShiftR# :: BigNat# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatShiftRNeg# :: BigNat# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatSize :: BigNat# -> GHC.Internal.Types.Word - bigNatSize# :: BigNat# -> GHC.Internal.Prim.Int# - bigNatSizeInBase :: GHC.Internal.Types.Word -> BigNat# -> GHC.Internal.Types.Word - bigNatSizeInBase# :: GHC.Internal.Prim.Word# -> BigNat# -> GHC.Internal.Prim.Word# - bigNatSqr :: BigNat# -> BigNat# - bigNatSub :: BigNat# -> BigNat# -> (# (# #) | BigNat# #) - bigNatSubUnsafe :: BigNat# -> BigNat# -> BigNat# - bigNatSubWord# :: BigNat# -> GHC.Internal.Prim.Word# -> (# (# #) | BigNat# #) - bigNatSubWordUnsafe :: BigNat# -> GHC.Internal.Types.Word -> BigNat# - bigNatSubWordUnsafe# :: BigNat# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatTestBit :: BigNat# -> GHC.Internal.Types.Word -> GHC.Internal.Types.Bool - bigNatTestBit# :: BigNat# -> GHC.Internal.Prim.Word# -> GHC.Internal.Bignum.Primitives.Bool# - bigNatToAddr :: BigNat# -> GHC.Internal.Prim.Addr# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Types.IO GHC.Internal.Types.Word - bigNatToAddr# :: forall s. BigNat# -> GHC.Internal.Prim.Addr# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, GHC.Internal.Prim.Word# #) - bigNatToAddrBE# :: forall s. BigNat# -> GHC.Internal.Prim.Addr# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, GHC.Internal.Prim.Word# #) - bigNatToAddrLE# :: forall s. BigNat# -> GHC.Internal.Prim.Addr# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, GHC.Internal.Prim.Word# #) - bigNatToInt :: BigNat# -> GHC.Internal.Types.Int - bigNatToInt# :: BigNat# -> GHC.Internal.Prim.Int# - bigNatToMutableByteArray# :: forall s. BigNat# -> GHC.Internal.Prim.MutableByteArray# s -> GHC.Internal.Prim.Word# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, GHC.Internal.Prim.Word# #) - bigNatToMutableByteArrayBE# :: forall s. BigNat# -> GHC.Internal.Prim.MutableByteArray# s -> GHC.Internal.Prim.Word# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, GHC.Internal.Prim.Word# #) - bigNatToMutableByteArrayLE# :: forall s. BigNat# -> GHC.Internal.Prim.MutableByteArray# s -> GHC.Internal.Prim.Word# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, GHC.Internal.Prim.Word# #) - bigNatToWord :: BigNat# -> GHC.Internal.Types.Word - bigNatToWord# :: BigNat# -> GHC.Internal.Prim.Word# - bigNatToWord64# :: BigNat# -> GHC.Internal.Prim.Word64# - bigNatToWordList :: BigNat# -> [GHC.Internal.Types.Word] - bigNatToWordMaybe# :: BigNat# -> (# (# #) | GHC.Internal.Prim.Word# #) - bigNatXor :: BigNat# -> BigNat# -> BigNat# - bigNatXorWord# :: BigNat# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatZero :: BigNat - bigNatZero# :: (# #) -> BigNat# - gcdInt :: GHC.Internal.Types.Int -> GHC.Internal.Types.Int -> GHC.Internal.Types.Int - gcdInt# :: GHC.Internal.Prim.Int# -> GHC.Internal.Prim.Int# -> GHC.Internal.Prim.Int# - gcdWord :: GHC.Internal.Types.Word -> GHC.Internal.Types.Word -> GHC.Internal.Types.Word - gcdWord# :: GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Word# - powModWord# :: GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Word# - raiseDivZero_BigNat :: (# #) -> BigNat# - -module GHC.Num.Integer where - -- Safety: None - type Integer :: * - data Integer = IS GHC.Internal.Prim.Int# | IP GHC.Internal.Prim.ByteArray# | IN GHC.Internal.Prim.ByteArray# - integerAbs :: Integer -> Integer - integerAdd :: Integer -> Integer -> Integer - integerAnd :: Integer -> Integer -> Integer - integerBit :: GHC.Internal.Types.Word -> Integer - integerBit# :: GHC.Internal.Prim.Word# -> Integer - integerCheck :: Integer -> GHC.Internal.Types.Bool - integerCheck# :: Integer -> GHC.Internal.Bignum.Primitives.Bool# - integerCompare :: Integer -> Integer -> GHC.Internal.Types.Ordering - integerComplement :: Integer -> Integer - integerDecodeDouble# :: GHC.Internal.Prim.Double# -> (# Integer, GHC.Internal.Prim.Int# #) - integerDiv :: Integer -> Integer -> Integer - integerDivMod :: Integer -> Integer -> (Integer, Integer) - integerDivMod# :: Integer -> Integer -> (# Integer, Integer #) - integerEncodeDouble :: Integer -> GHC.Internal.Types.Int -> GHC.Internal.Types.Double - integerEncodeDouble# :: Integer -> GHC.Internal.Prim.Int# -> GHC.Internal.Prim.Double# - integerEncodeFloat# :: Integer -> GHC.Internal.Prim.Int# -> GHC.Internal.Prim.Float# - integerEq :: Integer -> Integer -> GHC.Internal.Types.Bool - integerEq# :: Integer -> Integer -> GHC.Internal.Bignum.Primitives.Bool# - integerFromAddr :: GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Addr# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Types.IO Integer - integerFromAddr# :: forall s. GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Addr# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, Integer #) - integerFromBigNat# :: GHC.Internal.Bignum.BigNat.BigNat# -> Integer - integerFromBigNatNeg# :: GHC.Internal.Bignum.BigNat.BigNat# -> Integer - integerFromBigNatSign# :: GHC.Internal.Prim.Int# -> GHC.Internal.Bignum.BigNat.BigNat# -> Integer - integerFromByteArray :: GHC.Internal.Prim.Word# -> GHC.Internal.Prim.ByteArray# -> GHC.Internal.Prim.Word# -> GHC.Internal.Bignum.Primitives.Bool# -> Integer - integerFromByteArray# :: forall s. GHC.Internal.Prim.Word# -> GHC.Internal.Prim.ByteArray# -> GHC.Internal.Prim.Word# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, Integer #) - integerFromInt :: GHC.Internal.Types.Int -> Integer - integerFromInt# :: GHC.Internal.Prim.Int# -> Integer - integerFromInt64# :: GHC.Internal.Prim.Int64# -> Integer - integerFromNatural :: GHC.Internal.Bignum.Natural.Natural -> Integer - integerFromWord :: GHC.Internal.Types.Word -> Integer - integerFromWord# :: GHC.Internal.Prim.Word# -> Integer - integerFromWord64# :: GHC.Internal.Prim.Word64# -> Integer - integerFromWordList :: GHC.Internal.Types.Bool -> [GHC.Internal.Types.Word] -> Integer - integerFromWordNeg# :: GHC.Internal.Prim.Word# -> Integer - integerFromWordSign# :: GHC.Internal.Prim.Int# -> GHC.Internal.Prim.Word# -> Integer - integerGcd :: Integer -> Integer -> Integer - integerGcde :: Integer -> Integer -> (Integer, Integer, Integer) - integerGcde# :: Integer -> Integer -> (# Integer, Integer, Integer #) - integerGe :: Integer -> Integer -> GHC.Internal.Types.Bool - integerGe# :: Integer -> Integer -> GHC.Internal.Bignum.Primitives.Bool# - integerGt :: Integer -> Integer -> GHC.Internal.Types.Bool - integerGt# :: Integer -> Integer -> GHC.Internal.Bignum.Primitives.Bool# - integerIsNegative :: Integer -> GHC.Internal.Types.Bool - integerIsNegative# :: Integer -> GHC.Internal.Bignum.Primitives.Bool# - integerIsOne :: Integer -> GHC.Internal.Types.Bool - integerIsPowerOf2# :: Integer -> (# (# #) | GHC.Internal.Prim.Word# #) - integerIsZero :: Integer -> GHC.Internal.Types.Bool - integerLcm :: Integer -> Integer -> Integer - integerLe :: Integer -> Integer -> GHC.Internal.Types.Bool - integerLe# :: Integer -> Integer -> GHC.Internal.Bignum.Primitives.Bool# - integerLog2 :: Integer -> GHC.Internal.Types.Word - integerLog2# :: Integer -> GHC.Internal.Prim.Word# - integerLogBase :: Integer -> Integer -> GHC.Internal.Types.Word - integerLogBase# :: Integer -> Integer -> GHC.Internal.Prim.Word# - integerLogBaseWord :: GHC.Internal.Types.Word -> Integer -> GHC.Internal.Types.Word - integerLogBaseWord# :: GHC.Internal.Prim.Word# -> Integer -> GHC.Internal.Prim.Word# - integerLt :: Integer -> Integer -> GHC.Internal.Types.Bool - integerLt# :: Integer -> Integer -> GHC.Internal.Bignum.Primitives.Bool# - integerMod :: Integer -> Integer -> Integer - integerMul :: Integer -> Integer -> Integer - integerNe :: Integer -> Integer -> GHC.Internal.Types.Bool - integerNe# :: Integer -> Integer -> GHC.Internal.Bignum.Primitives.Bool# - integerNegate :: Integer -> Integer - integerOne :: Integer - integerOr :: Integer -> Integer -> Integer - integerPopCount# :: Integer -> GHC.Internal.Prim.Int# - integerPowMod# :: Integer -> Integer -> GHC.Internal.Bignum.Natural.Natural -> (# GHC.Internal.Bignum.Natural.Natural | () #) - integerQuot :: Integer -> Integer -> Integer - integerQuotRem :: Integer -> Integer -> (Integer, Integer) - integerQuotRem# :: Integer -> Integer -> (# Integer, Integer #) - integerRecipMod# :: Integer -> GHC.Internal.Bignum.Natural.Natural -> (# GHC.Internal.Bignum.Natural.Natural | () #) - integerRem :: Integer -> Integer -> Integer - integerShiftL :: Integer -> GHC.Internal.Types.Word -> Integer - integerShiftL# :: Integer -> GHC.Internal.Prim.Word# -> Integer - integerShiftR :: Integer -> GHC.Internal.Types.Word -> Integer - integerShiftR# :: Integer -> GHC.Internal.Prim.Word# -> Integer - integerSignum :: Integer -> Integer - integerSignum# :: Integer -> GHC.Internal.Prim.Int# - integerSizeInBase# :: GHC.Internal.Prim.Word# -> Integer -> GHC.Internal.Prim.Word# - integerSqr :: Integer -> Integer - integerSub :: Integer -> Integer -> Integer - integerTestBit :: Integer -> GHC.Internal.Types.Word -> GHC.Internal.Types.Bool - integerTestBit# :: Integer -> GHC.Internal.Prim.Word# -> GHC.Internal.Bignum.Primitives.Bool# - integerToAddr :: Integer -> GHC.Internal.Prim.Addr# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Types.IO GHC.Internal.Types.Word - integerToAddr# :: forall s. Integer -> GHC.Internal.Prim.Addr# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, GHC.Internal.Prim.Word# #) - integerToBigNatClamp# :: Integer -> GHC.Internal.Bignum.BigNat.BigNat# - integerToBigNatSign# :: Integer -> (# GHC.Internal.Prim.Int#, GHC.Internal.Bignum.BigNat.BigNat# #) - integerToInt :: Integer -> GHC.Internal.Types.Int - integerToInt# :: Integer -> GHC.Internal.Prim.Int# - integerToInt64# :: Integer -> GHC.Internal.Prim.Int64# - integerToMutableByteArray :: Integer -> GHC.Internal.Prim.MutableByteArray# GHC.Internal.Prim.RealWorld -> GHC.Internal.Prim.Word# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Types.IO GHC.Internal.Types.Word - integerToMutableByteArray# :: forall s. Integer -> GHC.Internal.Prim.MutableByteArray# s -> GHC.Internal.Prim.Word# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, GHC.Internal.Prim.Word# #) - integerToNatural :: Integer -> GHC.Internal.Bignum.Natural.Natural - integerToNaturalClamp :: Integer -> GHC.Internal.Bignum.Natural.Natural - integerToNaturalThrow :: Integer -> GHC.Internal.Bignum.Natural.Natural - integerToWord :: Integer -> GHC.Internal.Types.Word - integerToWord# :: Integer -> GHC.Internal.Prim.Word# - integerToWord64# :: Integer -> GHC.Internal.Prim.Word64# - integerXor :: Integer -> Integer -> Integer - integerZero :: Integer - -module GHC.Num.Natural where - -- Safety: None - type Natural :: * - data Natural = NS GHC.Internal.Prim.Word# | NB GHC.Internal.Prim.ByteArray# - naturalAdd :: Natural -> Natural -> Natural - naturalAnd :: Natural -> Natural -> Natural - naturalAndNot :: Natural -> Natural -> Natural - naturalBit :: GHC.Internal.Types.Word -> Natural - naturalBit# :: GHC.Internal.Prim.Word# -> Natural - naturalCheck :: Natural -> GHC.Internal.Types.Bool - naturalCheck# :: Natural -> GHC.Internal.Bignum.Primitives.Bool# - naturalClearBit :: Natural -> GHC.Internal.Types.Word -> Natural - naturalClearBit# :: Natural -> GHC.Internal.Prim.Word# -> Natural - naturalCompare :: Natural -> Natural -> GHC.Internal.Types.Ordering - naturalComplementBit :: Natural -> GHC.Internal.Types.Word -> Natural - naturalComplementBit# :: Natural -> GHC.Internal.Prim.Word# -> Natural - naturalEncodeDouble# :: Natural -> GHC.Internal.Prim.Int# -> GHC.Internal.Prim.Double# - naturalEncodeFloat# :: Natural -> GHC.Internal.Prim.Int# -> GHC.Internal.Prim.Float# - naturalEq :: Natural -> Natural -> GHC.Internal.Types.Bool - naturalEq# :: Natural -> Natural -> GHC.Internal.Bignum.Primitives.Bool# - naturalFromAddr :: GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Addr# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Types.IO Natural - naturalFromAddr# :: forall s. GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Addr# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, Natural #) - naturalFromBigNat# :: GHC.Internal.Bignum.BigNat.BigNat# -> Natural - naturalFromByteArray# :: forall s. GHC.Internal.Prim.Word# -> GHC.Internal.Prim.ByteArray# -> GHC.Internal.Prim.Word# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, Natural #) - naturalFromWord :: GHC.Internal.Types.Word -> Natural - naturalFromWord# :: GHC.Internal.Prim.Word# -> Natural - naturalFromWord2# :: GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Word# -> Natural - naturalFromWordList :: [GHC.Internal.Types.Word] -> Natural - naturalGcd :: Natural -> Natural -> Natural - naturalGe :: Natural -> Natural -> GHC.Internal.Types.Bool - naturalGe# :: Natural -> Natural -> GHC.Internal.Bignum.Primitives.Bool# - naturalGt :: Natural -> Natural -> GHC.Internal.Types.Bool - naturalGt# :: Natural -> Natural -> GHC.Internal.Bignum.Primitives.Bool# - naturalIsOne :: Natural -> GHC.Internal.Types.Bool - naturalIsPowerOf2# :: Natural -> (# (# #) | GHC.Internal.Prim.Word# #) - naturalIsZero :: Natural -> GHC.Internal.Types.Bool - naturalLcm :: Natural -> Natural -> Natural - naturalLe :: Natural -> Natural -> GHC.Internal.Types.Bool - naturalLe# :: Natural -> Natural -> GHC.Internal.Bignum.Primitives.Bool# - naturalLog2 :: Natural -> GHC.Internal.Types.Word - naturalLog2# :: Natural -> GHC.Internal.Prim.Word# - naturalLogBase :: Natural -> Natural -> GHC.Internal.Types.Word - naturalLogBase# :: Natural -> Natural -> GHC.Internal.Prim.Word# - naturalLogBaseWord :: GHC.Internal.Types.Word -> Natural -> GHC.Internal.Types.Word - naturalLogBaseWord# :: GHC.Internal.Prim.Word# -> Natural -> GHC.Internal.Prim.Word# - naturalLt :: Natural -> Natural -> GHC.Internal.Types.Bool - naturalLt# :: Natural -> Natural -> GHC.Internal.Bignum.Primitives.Bool# - naturalMul :: Natural -> Natural -> Natural - naturalNe :: Natural -> Natural -> GHC.Internal.Types.Bool - naturalNe# :: Natural -> Natural -> GHC.Internal.Bignum.Primitives.Bool# - naturalNegate :: Natural -> Natural - naturalOne :: Natural - naturalOr :: Natural -> Natural -> Natural - naturalPopCount :: Natural -> GHC.Internal.Types.Word - naturalPopCount# :: Natural -> GHC.Internal.Prim.Word# - naturalPowMod :: Natural -> Natural -> Natural -> Natural - naturalQuot :: Natural -> Natural -> Natural - naturalQuotRem :: Natural -> Natural -> (Natural, Natural) - naturalQuotRem# :: Natural -> Natural -> (# Natural, Natural #) - naturalRem :: Natural -> Natural -> Natural - naturalSetBit :: Natural -> GHC.Internal.Types.Word -> Natural - naturalSetBit# :: Natural -> GHC.Internal.Prim.Word# -> Natural - naturalShiftL :: Natural -> GHC.Internal.Types.Word -> Natural - naturalShiftL# :: Natural -> GHC.Internal.Prim.Word# -> Natural - naturalShiftR :: Natural -> GHC.Internal.Types.Word -> Natural - naturalShiftR# :: Natural -> GHC.Internal.Prim.Word# -> Natural - naturalSignum :: Natural -> Natural - naturalSizeInBase# :: GHC.Internal.Prim.Word# -> Natural -> GHC.Internal.Prim.Word# - naturalSqr :: Natural -> Natural - naturalSub :: Natural -> Natural -> (# (# #) | Natural #) - naturalSubThrow :: Natural -> Natural -> Natural - naturalSubUnsafe :: Natural -> Natural -> Natural - naturalTestBit :: Natural -> GHC.Internal.Types.Word -> GHC.Internal.Types.Bool - naturalTestBit# :: Natural -> GHC.Internal.Prim.Word# -> GHC.Internal.Bignum.Primitives.Bool# - naturalToAddr :: Natural -> GHC.Internal.Prim.Addr# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Types.IO GHC.Internal.Types.Word - naturalToAddr# :: forall s. Natural -> GHC.Internal.Prim.Addr# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, GHC.Internal.Prim.Word# #) - naturalToBigNat# :: Natural -> GHC.Internal.Bignum.BigNat.BigNat# - naturalToMutableByteArray# :: forall s. Natural -> GHC.Internal.Prim.MutableByteArray# s -> GHC.Internal.Prim.Word# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, GHC.Internal.Prim.Word# #) - naturalToWord :: Natural -> GHC.Internal.Types.Word - naturalToWord# :: Natural -> GHC.Internal.Prim.Word# - naturalToWordClamp :: Natural -> GHC.Internal.Types.Word - naturalToWordClamp# :: Natural -> GHC.Internal.Prim.Word# - naturalToWordMaybe# :: Natural -> (# (# #) | GHC.Internal.Prim.Word# #) - naturalXor :: Natural -> Natural -> Natural - naturalZero :: Natural - module GHC.OldList where -- Safety: Safe (!!) :: forall a. GHC.Internal.Stack.Types.HasCallStack => [a] -> GHC.Internal.Types.Int -> a ===================================== testsuite/tests/interface-stability/base-exports.stdout-ws-32 ===================================== @@ -8550,340 +8550,6 @@ module GHC.Num where quotRemInteger :: Integer -> Integer -> (# Integer, Integer #) subtract :: forall a. Num a => a -> a -> a -module GHC.Num.BigNat where - -- Safety: None - type BigNat :: * - data BigNat = BN# {unBigNat :: BigNat#} - type BigNat# :: GHC.Internal.Types.UnliftedType - type BigNat# = GHC.Internal.Bignum.WordArray.WordArray# - bigNatAdd :: BigNat# -> BigNat# -> BigNat# - bigNatAddWord :: BigNat# -> GHC.Internal.Types.Word -> BigNat# - bigNatAddWord# :: BigNat# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatAnd :: BigNat# -> BigNat# -> BigNat# - bigNatAndInt# :: BigNat# -> GHC.Internal.Prim.Int# -> BigNat# - bigNatAndNot :: BigNat# -> BigNat# -> BigNat# - bigNatAndNotWord# :: BigNat# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatAndWord# :: BigNat# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatBit :: GHC.Internal.Types.Word -> BigNat# - bigNatBit# :: GHC.Internal.Prim.Word# -> BigNat# - bigNatCheck :: BigNat# -> GHC.Internal.Types.Bool - bigNatCheck# :: BigNat# -> GHC.Internal.Bignum.Primitives.Bool# - bigNatClearBit# :: BigNat# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatCompare :: BigNat# -> BigNat# -> GHC.Internal.Types.Ordering - bigNatCompareWord :: BigNat# -> GHC.Internal.Types.Word -> GHC.Internal.Types.Ordering - bigNatCompareWord# :: BigNat# -> GHC.Internal.Prim.Word# -> GHC.Internal.Types.Ordering - bigNatComplementBit# :: BigNat# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatCtz :: BigNat# -> GHC.Internal.Types.Word - bigNatCtz# :: BigNat# -> GHC.Internal.Prim.Word# - bigNatCtzWord :: BigNat# -> GHC.Internal.Types.Word - bigNatCtzWord# :: BigNat# -> GHC.Internal.Prim.Word# - bigNatEncodeDouble# :: BigNat# -> GHC.Internal.Prim.Int# -> GHC.Internal.Prim.Double# - bigNatEq :: BigNat# -> BigNat# -> GHC.Internal.Types.Bool - bigNatEq# :: BigNat# -> BigNat# -> GHC.Internal.Bignum.Primitives.Bool# - bigNatEqWord# :: BigNat# -> GHC.Internal.Prim.Word# -> GHC.Internal.Bignum.Primitives.Bool# - bigNatFromAbsInt# :: GHC.Internal.Prim.Int# -> BigNat# - bigNatFromAddr# :: forall s. GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Addr# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, BigNat# #) - bigNatFromAddrBE# :: forall s. GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Addr# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, BigNat# #) - bigNatFromAddrLE# :: forall s. GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Addr# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, BigNat# #) - bigNatFromByteArray# :: forall s. GHC.Internal.Prim.Word# -> GHC.Internal.Prim.ByteArray# -> GHC.Internal.Prim.Word# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, BigNat# #) - bigNatFromByteArrayBE# :: forall s. GHC.Internal.Prim.Word# -> GHC.Internal.Prim.ByteArray# -> GHC.Internal.Prim.Word# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, BigNat# #) - bigNatFromByteArrayLE# :: forall s. GHC.Internal.Prim.Word# -> GHC.Internal.Prim.ByteArray# -> GHC.Internal.Prim.Word# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, BigNat# #) - bigNatFromWord :: GHC.Internal.Types.Word -> BigNat# - bigNatFromWord# :: GHC.Internal.Prim.Word# -> BigNat# - bigNatFromWord2# :: GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatFromWord64# :: GHC.Internal.Prim.Word64# -> BigNat# - bigNatFromWordArray :: GHC.Internal.Bignum.WordArray.WordArray# -> GHC.Internal.Prim.Word# -> BigNat - bigNatFromWordArray# :: GHC.Internal.Bignum.WordArray.WordArray# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatFromWordList :: [GHC.Internal.Types.Word] -> BigNat# - bigNatFromWordList# :: [GHC.Internal.Types.Word] -> GHC.Internal.Bignum.WordArray.WordArray# - bigNatFromWordListUnsafe :: [GHC.Internal.Types.Word] -> BigNat# - bigNatGcd :: BigNat# -> BigNat# -> BigNat# - bigNatGcdWord# :: BigNat# -> GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Word# - bigNatGe :: BigNat# -> BigNat# -> GHC.Internal.Types.Bool - bigNatGe# :: BigNat# -> BigNat# -> GHC.Internal.Bignum.Primitives.Bool# - bigNatGt :: BigNat# -> BigNat# -> GHC.Internal.Types.Bool - bigNatGt# :: BigNat# -> BigNat# -> GHC.Internal.Bignum.Primitives.Bool# - bigNatGtWord :: BigNat# -> GHC.Internal.Types.Word -> GHC.Internal.Types.Bool - bigNatGtWord# :: BigNat# -> GHC.Internal.Prim.Word# -> GHC.Internal.Bignum.Primitives.Bool# - bigNatIndex :: BigNat# -> GHC.Internal.Prim.Int# -> GHC.Internal.Types.Word - bigNatIndex# :: BigNat# -> GHC.Internal.Prim.Int# -> GHC.Internal.Prim.Word# - bigNatIsOne :: BigNat# -> GHC.Internal.Types.Bool - bigNatIsOne# :: BigNat# -> GHC.Internal.Bignum.Primitives.Bool# - bigNatIsPowerOf2# :: BigNat# -> (# (# #) | GHC.Internal.Prim.Word# #) - bigNatIsTwo :: BigNat# -> GHC.Internal.Types.Bool - bigNatIsTwo# :: BigNat# -> GHC.Internal.Bignum.Primitives.Bool# - bigNatIsZero :: BigNat# -> GHC.Internal.Types.Bool - bigNatIsZero# :: BigNat# -> GHC.Internal.Bignum.Primitives.Bool# - bigNatLcm :: BigNat# -> BigNat# -> BigNat# - bigNatLcmWord# :: BigNat# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatLcmWordWord# :: GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatLe :: BigNat# -> BigNat# -> GHC.Internal.Types.Bool - bigNatLe# :: BigNat# -> BigNat# -> GHC.Internal.Bignum.Primitives.Bool# - bigNatLeWord :: BigNat# -> GHC.Internal.Types.Word -> GHC.Internal.Types.Bool - bigNatLeWord# :: BigNat# -> GHC.Internal.Prim.Word# -> GHC.Internal.Bignum.Primitives.Bool# - bigNatLog2 :: BigNat# -> GHC.Internal.Types.Word - bigNatLog2# :: BigNat# -> GHC.Internal.Prim.Word# - bigNatLogBase :: BigNat# -> BigNat# -> GHC.Internal.Types.Word - bigNatLogBase# :: BigNat# -> BigNat# -> GHC.Internal.Prim.Word# - bigNatLogBaseWord :: GHC.Internal.Types.Word -> BigNat# -> GHC.Internal.Types.Word - bigNatLogBaseWord# :: GHC.Internal.Prim.Word# -> BigNat# -> GHC.Internal.Prim.Word# - bigNatLt :: BigNat# -> BigNat# -> GHC.Internal.Types.Bool - bigNatLt# :: BigNat# -> BigNat# -> GHC.Internal.Bignum.Primitives.Bool# - bigNatMul :: BigNat# -> BigNat# -> BigNat# - bigNatMulWord :: BigNat# -> GHC.Internal.Types.Word -> BigNat# - bigNatMulWord# :: BigNat# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatNe :: BigNat# -> BigNat# -> GHC.Internal.Types.Bool - bigNatNe# :: BigNat# -> BigNat# -> GHC.Internal.Bignum.Primitives.Bool# - bigNatOne :: BigNat - bigNatOne# :: (# #) -> BigNat# - bigNatOr :: BigNat# -> BigNat# -> BigNat# - bigNatOrWord# :: BigNat# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatPopCount :: BigNat# -> GHC.Internal.Types.Word - bigNatPopCount# :: BigNat# -> GHC.Internal.Prim.Word# - bigNatPowMod :: BigNat# -> BigNat# -> BigNat# -> BigNat# - bigNatPowModWord# :: BigNat# -> BigNat# -> GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Word# - bigNatQuot :: BigNat# -> BigNat# -> BigNat# - bigNatQuotRem# :: BigNat# -> BigNat# -> (# BigNat#, BigNat# #) - bigNatQuotRemWord# :: BigNat# -> GHC.Internal.Prim.Word# -> (# BigNat#, GHC.Internal.Prim.Word# #) - bigNatQuotWord :: BigNat# -> GHC.Internal.Types.Word -> BigNat# - bigNatQuotWord# :: BigNat# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatRem :: BigNat# -> BigNat# -> BigNat# - bigNatRemWord :: BigNat# -> GHC.Internal.Types.Word -> GHC.Internal.Types.Word - bigNatRemWord# :: BigNat# -> GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Word# - bigNatSetBit# :: BigNat# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatShiftL :: BigNat# -> GHC.Internal.Types.Word -> BigNat# - bigNatShiftL# :: BigNat# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatShiftR :: BigNat# -> GHC.Internal.Types.Word -> BigNat# - bigNatShiftR# :: BigNat# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatShiftRNeg# :: BigNat# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatSize :: BigNat# -> GHC.Internal.Types.Word - bigNatSize# :: BigNat# -> GHC.Internal.Prim.Int# - bigNatSizeInBase :: GHC.Internal.Types.Word -> BigNat# -> GHC.Internal.Types.Word - bigNatSizeInBase# :: GHC.Internal.Prim.Word# -> BigNat# -> GHC.Internal.Prim.Word# - bigNatSqr :: BigNat# -> BigNat# - bigNatSub :: BigNat# -> BigNat# -> (# (# #) | BigNat# #) - bigNatSubUnsafe :: BigNat# -> BigNat# -> BigNat# - bigNatSubWord# :: BigNat# -> GHC.Internal.Prim.Word# -> (# (# #) | BigNat# #) - bigNatSubWordUnsafe :: BigNat# -> GHC.Internal.Types.Word -> BigNat# - bigNatSubWordUnsafe# :: BigNat# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatTestBit :: BigNat# -> GHC.Internal.Types.Word -> GHC.Internal.Types.Bool - bigNatTestBit# :: BigNat# -> GHC.Internal.Prim.Word# -> GHC.Internal.Bignum.Primitives.Bool# - bigNatToAddr :: BigNat# -> GHC.Internal.Prim.Addr# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Types.IO GHC.Internal.Types.Word - bigNatToAddr# :: forall s. BigNat# -> GHC.Internal.Prim.Addr# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, GHC.Internal.Prim.Word# #) - bigNatToAddrBE# :: forall s. BigNat# -> GHC.Internal.Prim.Addr# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, GHC.Internal.Prim.Word# #) - bigNatToAddrLE# :: forall s. BigNat# -> GHC.Internal.Prim.Addr# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, GHC.Internal.Prim.Word# #) - bigNatToInt :: BigNat# -> GHC.Internal.Types.Int - bigNatToInt# :: BigNat# -> GHC.Internal.Prim.Int# - bigNatToMutableByteArray# :: forall s. BigNat# -> GHC.Internal.Prim.MutableByteArray# s -> GHC.Internal.Prim.Word# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, GHC.Internal.Prim.Word# #) - bigNatToMutableByteArrayBE# :: forall s. BigNat# -> GHC.Internal.Prim.MutableByteArray# s -> GHC.Internal.Prim.Word# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, GHC.Internal.Prim.Word# #) - bigNatToMutableByteArrayLE# :: forall s. BigNat# -> GHC.Internal.Prim.MutableByteArray# s -> GHC.Internal.Prim.Word# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, GHC.Internal.Prim.Word# #) - bigNatToWord :: BigNat# -> GHC.Internal.Types.Word - bigNatToWord# :: BigNat# -> GHC.Internal.Prim.Word# - bigNatToWord64# :: BigNat# -> GHC.Internal.Prim.Word64# - bigNatToWordList :: BigNat# -> [GHC.Internal.Types.Word] - bigNatToWordMaybe# :: BigNat# -> (# (# #) | GHC.Internal.Prim.Word# #) - bigNatXor :: BigNat# -> BigNat# -> BigNat# - bigNatXorWord# :: BigNat# -> GHC.Internal.Prim.Word# -> BigNat# - bigNatZero :: BigNat - bigNatZero# :: (# #) -> BigNat# - gcdInt :: GHC.Internal.Types.Int -> GHC.Internal.Types.Int -> GHC.Internal.Types.Int - gcdInt# :: GHC.Internal.Prim.Int# -> GHC.Internal.Prim.Int# -> GHC.Internal.Prim.Int# - gcdWord :: GHC.Internal.Types.Word -> GHC.Internal.Types.Word -> GHC.Internal.Types.Word - gcdWord# :: GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Word# - powModWord# :: GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Word# - raiseDivZero_BigNat :: (# #) -> BigNat# - -module GHC.Num.Integer where - -- Safety: None - type Integer :: * - data Integer = IS GHC.Internal.Prim.Int# | IP GHC.Internal.Prim.ByteArray# | IN GHC.Internal.Prim.ByteArray# - integerAbs :: Integer -> Integer - integerAdd :: Integer -> Integer -> Integer - integerAnd :: Integer -> Integer -> Integer - integerBit :: GHC.Internal.Types.Word -> Integer - integerBit# :: GHC.Internal.Prim.Word# -> Integer - integerCheck :: Integer -> GHC.Internal.Types.Bool - integerCheck# :: Integer -> GHC.Internal.Bignum.Primitives.Bool# - integerCompare :: Integer -> Integer -> GHC.Internal.Types.Ordering - integerComplement :: Integer -> Integer - integerDecodeDouble# :: GHC.Internal.Prim.Double# -> (# Integer, GHC.Internal.Prim.Int# #) - integerDiv :: Integer -> Integer -> Integer - integerDivMod :: Integer -> Integer -> (Integer, Integer) - integerDivMod# :: Integer -> Integer -> (# Integer, Integer #) - integerEncodeDouble :: Integer -> GHC.Internal.Types.Int -> GHC.Internal.Types.Double - integerEncodeDouble# :: Integer -> GHC.Internal.Prim.Int# -> GHC.Internal.Prim.Double# - integerEncodeFloat# :: Integer -> GHC.Internal.Prim.Int# -> GHC.Internal.Prim.Float# - integerEq :: Integer -> Integer -> GHC.Internal.Types.Bool - integerEq# :: Integer -> Integer -> GHC.Internal.Bignum.Primitives.Bool# - integerFromAddr :: GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Addr# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Types.IO Integer - integerFromAddr# :: forall s. GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Addr# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, Integer #) - integerFromBigNat# :: GHC.Internal.Bignum.BigNat.BigNat# -> Integer - integerFromBigNatNeg# :: GHC.Internal.Bignum.BigNat.BigNat# -> Integer - integerFromBigNatSign# :: GHC.Internal.Prim.Int# -> GHC.Internal.Bignum.BigNat.BigNat# -> Integer - integerFromByteArray :: GHC.Internal.Prim.Word# -> GHC.Internal.Prim.ByteArray# -> GHC.Internal.Prim.Word# -> GHC.Internal.Bignum.Primitives.Bool# -> Integer - integerFromByteArray# :: forall s. GHC.Internal.Prim.Word# -> GHC.Internal.Prim.ByteArray# -> GHC.Internal.Prim.Word# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, Integer #) - integerFromInt :: GHC.Internal.Types.Int -> Integer - integerFromInt# :: GHC.Internal.Prim.Int# -> Integer - integerFromInt64# :: GHC.Internal.Prim.Int64# -> Integer - integerFromNatural :: GHC.Internal.Bignum.Natural.Natural -> Integer - integerFromWord :: GHC.Internal.Types.Word -> Integer - integerFromWord# :: GHC.Internal.Prim.Word# -> Integer - integerFromWord64# :: GHC.Internal.Prim.Word64# -> Integer - integerFromWordList :: GHC.Internal.Types.Bool -> [GHC.Internal.Types.Word] -> Integer - integerFromWordNeg# :: GHC.Internal.Prim.Word# -> Integer - integerFromWordSign# :: GHC.Internal.Prim.Int# -> GHC.Internal.Prim.Word# -> Integer - integerGcd :: Integer -> Integer -> Integer - integerGcde :: Integer -> Integer -> (Integer, Integer, Integer) - integerGcde# :: Integer -> Integer -> (# Integer, Integer, Integer #) - integerGe :: Integer -> Integer -> GHC.Internal.Types.Bool - integerGe# :: Integer -> Integer -> GHC.Internal.Bignum.Primitives.Bool# - integerGt :: Integer -> Integer -> GHC.Internal.Types.Bool - integerGt# :: Integer -> Integer -> GHC.Internal.Bignum.Primitives.Bool# - integerIsNegative :: Integer -> GHC.Internal.Types.Bool - integerIsNegative# :: Integer -> GHC.Internal.Bignum.Primitives.Bool# - integerIsOne :: Integer -> GHC.Internal.Types.Bool - integerIsPowerOf2# :: Integer -> (# (# #) | GHC.Internal.Prim.Word# #) - integerIsZero :: Integer -> GHC.Internal.Types.Bool - integerLcm :: Integer -> Integer -> Integer - integerLe :: Integer -> Integer -> GHC.Internal.Types.Bool - integerLe# :: Integer -> Integer -> GHC.Internal.Bignum.Primitives.Bool# - integerLog2 :: Integer -> GHC.Internal.Types.Word - integerLog2# :: Integer -> GHC.Internal.Prim.Word# - integerLogBase :: Integer -> Integer -> GHC.Internal.Types.Word - integerLogBase# :: Integer -> Integer -> GHC.Internal.Prim.Word# - integerLogBaseWord :: GHC.Internal.Types.Word -> Integer -> GHC.Internal.Types.Word - integerLogBaseWord# :: GHC.Internal.Prim.Word# -> Integer -> GHC.Internal.Prim.Word# - integerLt :: Integer -> Integer -> GHC.Internal.Types.Bool - integerLt# :: Integer -> Integer -> GHC.Internal.Bignum.Primitives.Bool# - integerMod :: Integer -> Integer -> Integer - integerMul :: Integer -> Integer -> Integer - integerNe :: Integer -> Integer -> GHC.Internal.Types.Bool - integerNe# :: Integer -> Integer -> GHC.Internal.Bignum.Primitives.Bool# - integerNegate :: Integer -> Integer - integerOne :: Integer - integerOr :: Integer -> Integer -> Integer - integerPopCount# :: Integer -> GHC.Internal.Prim.Int# - integerPowMod# :: Integer -> Integer -> GHC.Internal.Bignum.Natural.Natural -> (# GHC.Internal.Bignum.Natural.Natural | () #) - integerQuot :: Integer -> Integer -> Integer - integerQuotRem :: Integer -> Integer -> (Integer, Integer) - integerQuotRem# :: Integer -> Integer -> (# Integer, Integer #) - integerRecipMod# :: Integer -> GHC.Internal.Bignum.Natural.Natural -> (# GHC.Internal.Bignum.Natural.Natural | () #) - integerRem :: Integer -> Integer -> Integer - integerShiftL :: Integer -> GHC.Internal.Types.Word -> Integer - integerShiftL# :: Integer -> GHC.Internal.Prim.Word# -> Integer - integerShiftR :: Integer -> GHC.Internal.Types.Word -> Integer - integerShiftR# :: Integer -> GHC.Internal.Prim.Word# -> Integer - integerSignum :: Integer -> Integer - integerSignum# :: Integer -> GHC.Internal.Prim.Int# - integerSizeInBase# :: GHC.Internal.Prim.Word# -> Integer -> GHC.Internal.Prim.Word# - integerSqr :: Integer -> Integer - integerSub :: Integer -> Integer -> Integer - integerTestBit :: Integer -> GHC.Internal.Types.Word -> GHC.Internal.Types.Bool - integerTestBit# :: Integer -> GHC.Internal.Prim.Word# -> GHC.Internal.Bignum.Primitives.Bool# - integerToAddr :: Integer -> GHC.Internal.Prim.Addr# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Types.IO GHC.Internal.Types.Word - integerToAddr# :: forall s. Integer -> GHC.Internal.Prim.Addr# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, GHC.Internal.Prim.Word# #) - integerToBigNatClamp# :: Integer -> GHC.Internal.Bignum.BigNat.BigNat# - integerToBigNatSign# :: Integer -> (# GHC.Internal.Prim.Int#, GHC.Internal.Bignum.BigNat.BigNat# #) - integerToInt :: Integer -> GHC.Internal.Types.Int - integerToInt# :: Integer -> GHC.Internal.Prim.Int# - integerToInt64# :: Integer -> GHC.Internal.Prim.Int64# - integerToMutableByteArray :: Integer -> GHC.Internal.Prim.MutableByteArray# GHC.Internal.Prim.RealWorld -> GHC.Internal.Prim.Word# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Types.IO GHC.Internal.Types.Word - integerToMutableByteArray# :: forall s. Integer -> GHC.Internal.Prim.MutableByteArray# s -> GHC.Internal.Prim.Word# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, GHC.Internal.Prim.Word# #) - integerToNatural :: Integer -> GHC.Internal.Bignum.Natural.Natural - integerToNaturalClamp :: Integer -> GHC.Internal.Bignum.Natural.Natural - integerToNaturalThrow :: Integer -> GHC.Internal.Bignum.Natural.Natural - integerToWord :: Integer -> GHC.Internal.Types.Word - integerToWord# :: Integer -> GHC.Internal.Prim.Word# - integerToWord64# :: Integer -> GHC.Internal.Prim.Word64# - integerXor :: Integer -> Integer -> Integer - integerZero :: Integer - -module GHC.Num.Natural where - -- Safety: None - type Natural :: * - data Natural = NS GHC.Internal.Prim.Word# | NB GHC.Internal.Prim.ByteArray# - naturalAdd :: Natural -> Natural -> Natural - naturalAnd :: Natural -> Natural -> Natural - naturalAndNot :: Natural -> Natural -> Natural - naturalBit :: GHC.Internal.Types.Word -> Natural - naturalBit# :: GHC.Internal.Prim.Word# -> Natural - naturalCheck :: Natural -> GHC.Internal.Types.Bool - naturalCheck# :: Natural -> GHC.Internal.Bignum.Primitives.Bool# - naturalClearBit :: Natural -> GHC.Internal.Types.Word -> Natural - naturalClearBit# :: Natural -> GHC.Internal.Prim.Word# -> Natural - naturalCompare :: Natural -> Natural -> GHC.Internal.Types.Ordering - naturalComplementBit :: Natural -> GHC.Internal.Types.Word -> Natural - naturalComplementBit# :: Natural -> GHC.Internal.Prim.Word# -> Natural - naturalEncodeDouble# :: Natural -> GHC.Internal.Prim.Int# -> GHC.Internal.Prim.Double# - naturalEncodeFloat# :: Natural -> GHC.Internal.Prim.Int# -> GHC.Internal.Prim.Float# - naturalEq :: Natural -> Natural -> GHC.Internal.Types.Bool - naturalEq# :: Natural -> Natural -> GHC.Internal.Bignum.Primitives.Bool# - naturalFromAddr :: GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Addr# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Types.IO Natural - naturalFromAddr# :: forall s. GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Addr# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, Natural #) - naturalFromBigNat# :: GHC.Internal.Bignum.BigNat.BigNat# -> Natural - naturalFromByteArray# :: forall s. GHC.Internal.Prim.Word# -> GHC.Internal.Prim.ByteArray# -> GHC.Internal.Prim.Word# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, Natural #) - naturalFromWord :: GHC.Internal.Types.Word -> Natural - naturalFromWord# :: GHC.Internal.Prim.Word# -> Natural - naturalFromWord2# :: GHC.Internal.Prim.Word# -> GHC.Internal.Prim.Word# -> Natural - naturalFromWordList :: [GHC.Internal.Types.Word] -> Natural - naturalGcd :: Natural -> Natural -> Natural - naturalGe :: Natural -> Natural -> GHC.Internal.Types.Bool - naturalGe# :: Natural -> Natural -> GHC.Internal.Bignum.Primitives.Bool# - naturalGt :: Natural -> Natural -> GHC.Internal.Types.Bool - naturalGt# :: Natural -> Natural -> GHC.Internal.Bignum.Primitives.Bool# - naturalIsOne :: Natural -> GHC.Internal.Types.Bool - naturalIsPowerOf2# :: Natural -> (# (# #) | GHC.Internal.Prim.Word# #) - naturalIsZero :: Natural -> GHC.Internal.Types.Bool - naturalLcm :: Natural -> Natural -> Natural - naturalLe :: Natural -> Natural -> GHC.Internal.Types.Bool - naturalLe# :: Natural -> Natural -> GHC.Internal.Bignum.Primitives.Bool# - naturalLog2 :: Natural -> GHC.Internal.Types.Word - naturalLog2# :: Natural -> GHC.Internal.Prim.Word# - naturalLogBase :: Natural -> Natural -> GHC.Internal.Types.Word - naturalLogBase# :: Natural -> Natural -> GHC.Internal.Prim.Word# - naturalLogBaseWord :: GHC.Internal.Types.Word -> Natural -> GHC.Internal.Types.Word - naturalLogBaseWord# :: GHC.Internal.Prim.Word# -> Natural -> GHC.Internal.Prim.Word# - naturalLt :: Natural -> Natural -> GHC.Internal.Types.Bool - naturalLt# :: Natural -> Natural -> GHC.Internal.Bignum.Primitives.Bool# - naturalMul :: Natural -> Natural -> Natural - naturalNe :: Natural -> Natural -> GHC.Internal.Types.Bool - naturalNe# :: Natural -> Natural -> GHC.Internal.Bignum.Primitives.Bool# - naturalNegate :: Natural -> Natural - naturalOne :: Natural - naturalOr :: Natural -> Natural -> Natural - naturalPopCount :: Natural -> GHC.Internal.Types.Word - naturalPopCount# :: Natural -> GHC.Internal.Prim.Word# - naturalPowMod :: Natural -> Natural -> Natural -> Natural - naturalQuot :: Natural -> Natural -> Natural - naturalQuotRem :: Natural -> Natural -> (Natural, Natural) - naturalQuotRem# :: Natural -> Natural -> (# Natural, Natural #) - naturalRem :: Natural -> Natural -> Natural - naturalSetBit :: Natural -> GHC.Internal.Types.Word -> Natural - naturalSetBit# :: Natural -> GHC.Internal.Prim.Word# -> Natural - naturalShiftL :: Natural -> GHC.Internal.Types.Word -> Natural - naturalShiftL# :: Natural -> GHC.Internal.Prim.Word# -> Natural - naturalShiftR :: Natural -> GHC.Internal.Types.Word -> Natural - naturalShiftR# :: Natural -> GHC.Internal.Prim.Word# -> Natural - naturalSignum :: Natural -> Natural - naturalSizeInBase# :: GHC.Internal.Prim.Word# -> Natural -> GHC.Internal.Prim.Word# - naturalSqr :: Natural -> Natural - naturalSub :: Natural -> Natural -> (# (# #) | Natural #) - naturalSubThrow :: Natural -> Natural -> Natural - naturalSubUnsafe :: Natural -> Natural -> Natural - naturalTestBit :: Natural -> GHC.Internal.Types.Word -> GHC.Internal.Types.Bool - naturalTestBit# :: Natural -> GHC.Internal.Prim.Word# -> GHC.Internal.Bignum.Primitives.Bool# - naturalToAddr :: Natural -> GHC.Internal.Prim.Addr# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Types.IO GHC.Internal.Types.Word - naturalToAddr# :: forall s. Natural -> GHC.Internal.Prim.Addr# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, GHC.Internal.Prim.Word# #) - naturalToBigNat# :: Natural -> GHC.Internal.Bignum.BigNat.BigNat# - naturalToMutableByteArray# :: forall s. Natural -> GHC.Internal.Prim.MutableByteArray# s -> GHC.Internal.Prim.Word# -> GHC.Internal.Bignum.Primitives.Bool# -> GHC.Internal.Prim.State# s -> (# GHC.Internal.Prim.State# s, GHC.Internal.Prim.Word# #) - naturalToWord :: Natural -> GHC.Internal.Types.Word - naturalToWord# :: Natural -> GHC.Internal.Prim.Word# - naturalToWordClamp :: Natural -> GHC.Internal.Types.Word - naturalToWordClamp# :: Natural -> GHC.Internal.Prim.Word# - naturalToWordMaybe# :: Natural -> (# (# #) | GHC.Internal.Prim.Word# #) - naturalXor :: Natural -> Natural -> Natural - naturalZero :: Natural - module GHC.OldList where -- Safety: Safe (!!) :: forall a. GHC.Internal.Stack.Types.HasCallStack => [a] -> GHC.Internal.Types.Int -> a View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/8524ec749269a9a040a38db4d25d41… -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/8524ec749269a9a040a38db4d25d41… You're receiving this email because of your account on gitlab.haskell.org.
1 0
0 0
[Git][ghc/ghc][wip/ani/hie-spans] 48 commits: Don't re-use stack slots for growing registers
by Apoorv Ingle (@ani) 19 Jan '26

19 Jan '26
Apoorv Ingle pushed to branch wip/ani/hie-spans at Glasgow Haskell Compiler / GHC Commits: 023c301c by sheaf at 2026-01-13T04:57:30-05:00 Don't re-use stack slots for growing registers This commit avoids re-using a stack slot for a register that has grown but already had a stack slot. For example, suppose we have stack slot assigments %v1 :: FF64 |-> StackSlot 0 %v2 :: FF64 |-> StackSlot 1 Later, we start using %v1 at a larger format (e.g. F64x2) and we need to spill it again. Then we **must not** use StackSlot 0, as a spill at format F64x2 would clobber the data in StackSlot 1. This can cause some fragmentation of the `StackMap`, but that's probably OK. Fixes #26668 - - - - - d0966e64 by fendor at 2026-01-13T04:58:11-05:00 Remove `traceId` from ghc-pkg executable - - - - - 20d7efec by Simon Peyton Jones at 2026-01-13T12:41:22-05:00 Make SpecContr rules fire a bit later See #26615 and Note [SpecConstr rule activation] - - - - - 8bc4eb8c by Andrew Lelechenko at 2026-01-13T12:42:03-05:00 Upgrade mtl submodule to 2.3.2 Fixes #26656 - - - - - c94aaacd by Cheng Shao at 2026-01-13T12:42:44-05:00 compiler: remove iserv and only use on-demand external interpreter This patch removes `iserv` from the tree completely. Hadrian would no longer build or distribute `iserv`, and the GHC driver would use the on-demand external interpreter by default when invoked with `-fexternal-interpreter`, without needing to specify `-pgmi ""`. This has multiple benefits: - It allows cleanup of a lot of legacy hacks in the hadrian codebase. - It paves the way for running cross ghc's iserv via cross emulator (#25523), fixing TH/ghci support for cross targets other than wasm/js. - - - - - c1fe0097 by Peter Trommler at 2026-01-14T03:54:49-05:00 PPC NCG: Fix shift right MO code The shift amount in shift right [arithmetic] MOs is machine word width. Therefore remove unnecessary zero- or sign-extending of shift amount. It looks harmless to extend the shift amount argument because the shift right instruction uses only the seven lowest bits (i. e. mod 128). But now we have a conversion operation from a smaller type to word width around a memory load at word width. The types are not matching up but there is no check done in CodeGen. The necessary conversion from word width down to the smaller width would be translated into a no-op on PowerPC anyway. So all seems harmless if it was not for a small optimisation in getRegister'. In getRegister' a load instruction with the smaller width of the conversion operation was generated. This loaded the most significant bits of the word in memory on a big-endian platform. These bits were zero and hence shift right was used with shift amount zero and not one as required in test Sized. Fixes #26519 - - - - - 2dafc65a by Cheng Shao at 2026-01-14T03:55:31-05:00 Tree-wide cleanup of cygwin logic GHC has not supported cygwin for quite a few years already, and will not resume support in the forseeable future. The only supported windows toolchain is clang64/clangarm64 of the msys2 project. This patch cleans up the unused cygwin logic in the tree. Co-authored-by: Codex <codex(a)openai.com> - - - - - 66b96e2a by Teo Camarasu at 2026-01-14T03:56:13-05:00 Set default eventlog-flush-interval to 5s Resolves #26707 - - - - - d0254579 by Andrew Lelechenko at 2026-01-14T03:56:53-05:00 Document when -maxN RTS option was added - - - - - f25e2b12 by Cheng Shao at 2026-01-14T11:10:39-05:00 testsuite: remove obsolete --ci option from the testsuite driver This patch removes the obsolete `--ci` option from the testsuite driver: neither the CI scripts nor hadrian ever invokes the testsuite driver with `--ci`, and the perf notes are always fetched to the `refs/notes/perf` local reference anyway. - - - - - 7964763b by Julian Ospald at 2026-01-14T11:11:31-05:00 Fix fetch_cabal * download cabal if the existing one is of an older version * fix FreeBSD download url * fix unpacking on FreeBSD - - - - - 6b0129c1 by Julian Ospald at 2026-01-14T11:11:31-05:00 Bump toolchain in CI - - - - - 0f53ccc6 by Julian Ospald at 2026-01-14T11:11:31-05:00 Use libffi-clib Previously, we would build libffi via hadrian and bundle it manually with the GHC bindist. This now moves all that logic out of hadrian and allows us to have a clean Haskell package to build and link against and ship it without extra logic. This patch still retains the ability to link against a system libffi. The main reason of bundling libffi was that on some platforms (e.g. FreeBSD and Mac), system libffi is not visible to the C toolchain by default, so users would require settings in e.g. cabal to be able to compile anything. This adds the submodule libffi-clib to the repository. - - - - - 5e1cd595 by Peng Fan at 2026-01-14T11:12:26-05:00 NCG/LA64: add support for la664 micro architecture Add '-mla664' flag to LA664, which has some new features: atomic instructions, dbar hints, etc. 'LA464' is the default so that unrecognized instructions are not generated. - - - - - c56567ec by Simon Peyton Jones at 2026-01-15T23:19:04+00:00 Add evals for strict data-con args in worker-functions This fixes #26722, by adding an eval in a worker for arguments of strict data constructors, even if the function body uses them strictly. See (WIS1) in Note [Which Ids should be strictified] I took the opportunity to make substantial improvements in the documentation for call-by-value functions. See especially Note [CBV Function Ids: overview] in GHC.Types.Id.Info Note [Which Ids should be CBV candidates?] ditto Note [EPT enforcement] in GHC.Stg.EnforceEpt among others. - - - - - 9719ce5d by Simon Peyton Jones at 2026-01-15T23:19:04+00:00 Improve `interestingArg` This function analyses a function's argument to see if it is interesting enough to deserve an inlining discount. Improvements for * LitRubbish arguments * exprIsExpandable arguments See Note [Interesting arguments] which is substantially rewritten. - - - - - 7b616b9f by Cheng Shao at 2026-01-16T06:45:00-05:00 compiler: fix regression when compiling foreign stubs in the rts unit This patch fixes a regression when compiling foreign stubs in the rts unit introduced in 05e25647f72bc102061af3f20478aa72bff6ff6e. A simple revert would fix it, but it's better to implement a proper fix with comment for better understanding of the underlying problem, see the added comment for explanation. Co-authored-by: Codex <codex(a)openai.com> - - - - - c343ef64 by Sylvain Henry at 2026-01-16T06:45:51-05:00 base: remove GHC.JS.Prim.Internal.Build (#23432) See accepted CLC proposal https://github.com/haskell/core-libraries-committee/issues/329 - - - - - 29c0aceb by Simon Peyton Jones at 2026-01-16T17:18:11-05:00 Improve newtype unwrapping Ticket #26746 describes several relatively-minor shortcomings of newtype unwrapping. This MR addresses them, while also (arguably) simplifying the code a bit. See new Note [Solving newtype equalities: overview] and Note [Decomposing newtype equalities] and Note [Eager newtype decomposition] and Note [Even more eager newtype decomposition] For some reason, on Windows only, runtime allocations decrease for test T5205 (from 52k to 48k). I have not idea why. No change at all on Linux. I'm just going to accept the change. (I saw this same effect in another MR so I think it's a fault in the baseline.) Metric Decrease: T5205 - - - - - 8b59e62c by Andreas Klebinger at 2026-01-16T17:18:52-05:00 testsuite: Widen acceptance window for T5205. Fixes #26782 - - - - - 9e5e0234 by mangoiv at 2026-01-17T06:03:03-05:00 add a new issue template for getting verified To reduce spam created by new users, we will in future not grant any rights but reporting issues to new users. That is why we will have to be able to verify them. The added issue template serves that purpose. - - - - - b18b2c42 by Cheng Shao at 2026-01-17T06:03:44-05:00 llvm: fix split sections for llvm backend This patch fixes split sections for llvm backend: - Pass missing `--data-sections`/`--function-sections` flags to llc/opt. - Use `@llvm.compiler.used` instead of `@llvm.used` to avoid sections being unnecessarily retained at link-time. Fixes #26770. ------------------------- Metric Decrease: libdir size_hello_artifact size_hello_unicode ------------------------- Co-authored-by: Codex <codex(a)openai.com> - - - - - ebf66f67 by Cheng Shao at 2026-01-17T13:16:50-05:00 Update autoconf scripts Scripts taken from autoconf a2287c3041a3f2a204eb942e09c015eab00dc7dd - - - - - 598624b9 by Andreas Klebinger at 2026-01-17T13:17:32-05:00 CString.hs: Update incorrect comment. Fixes #26322 - - - - - eea2036b by Cheng Shao at 2026-01-18T10:00:49-05:00 libraries: bump haskeline submodule to 0.8.4.1 This patch bumps the haskeline submodule to 0.8.4.1 which includes an important fix for an ANSI handling bug on Windows (https://github.com/haskell/haskeline/pull/126) - - - - - 87d8f6c2 by Cheng Shao at 2026-01-18T10:01:30-05:00 hadrian: replace default -H32m/-H64m with -O64M to improve mutator productivity Most hadrian build flavours pass `-H32m`/`-H64m` to GHC as conventional wisdom to improve mutator productivity and reduce GC overhead. They were inherited from the legacy Make build system, and there used to be make flags to instrument a build process with `-Rghc-timing` option to collect GC stats of each GHC run from stderr. It's time to revisit whether there are better defaults for `-H32m`/`-H64m`, and this patch changes it to `-O64M` which indeed improves mutator productivity based on real statistics. `-O64M` is more aggressive than `-H64m`; it allows the old generation to grow to at least 64M before triggering major GC and reduces major GC runs. The stats of a clean build with `validate` flavour and `-H64m`: ``` h64m.log matched RTS stat lines: 5499 sum MUT cpu : 2400.808 s sum GC cpu : 1378.292 s sum MUT elapsed : 2788.253 s sum GC elapsed : 1389.233 s GC/MUT cpu ratio : 0.574 (GC is 57.4% of MUT) GC/MUT elapsed ratio : 0.498 (GC is 49.8% of MUT) GC fraction of (MUT+GC) cpu : 36.5% GC fraction of (MUT+GC) elapsed : 33.3% per-line GC/MUT cpu ratio: median 0.691, p90 1.777 per-line GC/MUT elapsed ratio: median 0.519, p90 1.081 ``` The stats of a clean build with `validate` flavour and `-O64M`: ``` o64m.log matched RTS stat lines: 5499 sum MUT cpu : 2377.383 s sum GC cpu : 1127.146 s sum MUT elapsed : 2758.857 s sum GC elapsed : 1135.587 s GC/MUT cpu ratio : 0.474 (GC is 47.4% of MUT) GC/MUT elapsed ratio : 0.412 (GC is 41.2% of MUT) GC fraction of (MUT+GC) cpu : 32.2% GC fraction of (MUT+GC) elapsed : 29.2% per-line GC/MUT cpu ratio: median 0.489, p90 1.099 per-line GC/MUT elapsed ratio: median 0.367, p90 0.806 ``` Mutator time is roughly in the same ballpark, but GC CPU time has reduced by 18.22%, and mutator productivity has increased from 63.5% to 67.8%. - - - - - 8372e13d by Cheng Shao at 2026-01-18T10:02:12-05:00 rts: remove unused .def files from rts/win32 This patch removes unused .def files from `rts/win32`, given we don't build .dll files for rts/ghc-internal/ghc-prim at all. Even when we resurrect win32 dll support at some point in the future, these .def files still contain incorrect symbols anyway and won't be of any use. - - - - - f6af485d by Cheng Shao at 2026-01-18T10:03:19-05:00 .gitmodules: use gitlab mirror for the libffi-clib submodule This patch fixes .gitmodules to use the gitlab mirror for the libffi-clib submodule, to make it coherent with other submodules that allow ghc developers to experiment with wip branches in submodules for ghc patches. Fixes #26783. - - - - - 41432d25 by Cheng Shao at 2026-01-18T10:05:13-05:00 hadrian: remove the horrible i386 speedHack When hadrian builds certain rts objects for i386, there's a horrible speedHack that forces -fno-PIC even for dynamic ways of those objects. This is not compatible with newer versions of gcc/binutils as well as clang/lld, and this patch removes it. Fixes #26792. - - - - - 323eb8f0 by Cheng Shao at 2026-01-18T21:48:19-05:00 hadrian: enable split sections for cross stage0 This patch fixes a minor issue with `splitSectionsArgs` in hadrian: previously, it's unconditionally disabled for stage0 libraries because it's not going to be shipped in the final bindists. But it's only true when not cross compiling. So for now we also need to enable it for cross stage0 as well. - - - - - 3fadfefe by Andreas Klebinger at 2026-01-18T21:49:01-05:00 RTS: Document -K behaviour better - - - - - b1622aed by Apoorv Ingle at 2026-01-19T13:20:12-06:00 This commit: - Streamlines implementations of `tcExpr` and `tcXExpr` to work on `XExpr` Calls `setInGeneratedCode` everytime the typechecker goes over an `XExpr` - Kills `VACtxt` (and its associated VAExpansion and VACall) datatype, it is subsumed by simply a SrcSpan. - Kills the function `addHeadCtxt` as it is now mearly setting a location - The function `tcValArgs` does its own argument number management - Makes `splitHsApps` not look through `XExpr` - `tcExprSigma` is called if the head of the expression after calling `splitHsApps` turns out to be an `XExpr` - Removes location information from `OrigPat` payload - Removes special case of tcBody from `tcLambdaMatches` - Removes special case of `dsExpr` for `ExpandedThingTc` - Moves `setQLInstLevel` inside `tcInstFun` - Rename `HsThingRn` to `SrcCodeCtxt` - Kills `tcl_in_gen_code` and `tcl_err_ctxt`. It is subsumed by `ErrCtxtStack` - Kills `ExpectedFunTyOrig`. It is subsumed by `CtOrigin` - Fixes `CtOrigin` for `HsProjection` case in `exprCtOrigin`. It was previously assigned to be `SectionOrigin`. It is now just the expression - Adds a new `CtOrigin.ExpansionOrigin` for storing the original syntax - Adds a new `CtOrigin.ExpectedTySyntax` as a replacement for `ExpectedTySyntaxOp`. Cannot kill the former yet because of `ApplicativeDo` - Renames `tcMonoExpr` -> `tcMonoLExpr`, `tcMonoExprNC` -> `tcMonoLExpr` - Renames `EValArg`, `EValArgQL` fields: `ea_ctxt` -> `ea_loc_span` and `eaql_ctx` -> `eaql_loc_span` Notes added [Error Context Stack] Notes updated Note [Expanding HsDo with XXExprGhcRn] ------------------------- Metric Decrease: T9020 ------------------------- - - - - - c83d2222 by Apoorv Ingle at 2026-01-19T13:20:13-06:00 - kill PopErrCtxt - Pass in the location of the head of the application chain to `addArgCtxt` to print better error messages. Make `addArgCtxt` print in the nth argument if the head of the application chain is user located. - match context with record updates dont get added in error context - Do not use HsPar in Last statement - simplify addArgCtxt and push setSrcSpan inside addLExprCtxt. Make sure addExprCtxt is not called by itself - fun_orig in tcApp depends on the SrcSpan of the head of the application chain (similar to addArgCtxt) - rename fun_ctxt to fun_lspan, fun_orig passed in tcInstFun to default to app chain head if its user located, fall back to srcCodeOrigin if it's a generated location - fix quickLookArg function to blame the correct application chain head. The arguments application chain head should be blamed, not the original head when we quick look arg - Make sure only expression wrapped around generated src span are ignored while adding them to the error context stack - In `addArgCtxt` the nth argument's err ctxt adds a generated error ctxt if the argument is XExpr - - - - - 452bf2a6 by Apoorv Ingle at 2026-01-19T13:20:13-06:00 - make sure landmark error contexts are always printed. accept some testcases - fix overloaded list error message. Expanded Expressions head `listFromN` should be wrapped in a generated source span (Wrinkle) This may make some HIE tests to fail, but HIE should fix the behaviour there. - Fix notes - fix for MonadFailErrors test case. OrigPat now also stores the statement to make the error message resonable - - - - - 678820ca by Apoorv Ingle at 2026-01-19T13:21:33-06:00 - `getDeepSubsumptionFlag_DataConHead` performs a non-trivial traversal if the expression passed to it is complex. This traversal is necessary if the head of the function is an `XExpr` and `splitHsApps` does not look through them - The deepsubsumption flag is stored in EVAlArgQL to reduce the need to call `getDeepSubsumptionFlag_DataConHead` - `getDeepSubsumptionFlag_DataConHead` is called in `tcExprSigma` and `tcInferAppHead` to reduce AST traversals - refactor building CtOrigin before instantiations as a function. It does state lookup only if needed. - In tcDoStmts, we lose the location of the first statement. It is needed for getting the pattern match check right Further, do not call addErrCtxt on it, the tcMonoLExpr will do it for us. - during QL arg's function head instantiation use more a more accurate location for arg when the application chain is null - - - - - 107612ff by Apoorv Ingle at 2026-01-19T13:22:00-06:00 do not add error context in tcExprSigma for XExpr and do not setQLInstLevel before tcInstFun - - - - - 072ef03e by Apoorv Ingle at 2026-01-19T13:22:01-06:00 wrap expanded records in an XExpr. Accept test cases - - - - - 3fe78b11 by Apoorv Ingle at 2026-01-19T13:22:01-06:00 in QuicklookArg, wrap the inferAppHead_maybe with an optional error context update. If the head is a XExpr, we need to flip the state to generated - - - - - bf2b0724 by Apoorv Ingle at 2026-01-19T13:22:01-06:00 ignore patterns wrapped around generated src span while type checking patterns - - - - - f0ff7ea9 by Apoorv Ingle at 2026-01-19T13:22:01-06:00 fixing some more error messages - - - - - cd493daa by Apoorv Ingle at 2026-01-19T13:22:01-06:00 wrap fromListN with a generated src span - - - - - b032d467 by Apoorv Ingle at 2026-01-19T13:22:01-06:00 some minor things - - - - - 23e2a676 by Apoorv Ingle at 2026-01-19T13:22:01-06:00 enable NB for custom, user written HasField constraint errors - - - - - 496c337e by Apoorv Ingle at 2026-01-19T13:22:02-06:00 rebase changes - - - - - c6fdd282 by Apoorv Ingle at 2026-01-19T13:22:02-06:00 add Overview note - - - - - 1d90a947 by Apoorv Ingle at 2026-01-19T13:22:02-06:00 fix for failing test case - - - - - f59e1ed0 by Apoorv Ingle at 2026-01-19T13:32:16-06:00 do not overwrite err ctxt head when we add err ctxt due to expanded exprs `(XExpr (OrigStmt{})` fixes RecordDotSyntaxFail test cases where a record is updated within a do statement - - - - - 21c286aa by Apoorv Ingle at 2026-01-19T13:57:26-06:00 - Make a new variant `GeneratedSrcSpan` in `SrcSpan` for HIEAst Nodes - remove UnhelpfulGenerated from UnhelpfulSpanReason and into new datatype GeneratedSrcSpanDetails - Fixes T23540, tcfail181 - - - - - 234 changed files: - .gitlab/ci.sh - .gitlab/generate-ci/gen_ci.hs - + .gitlab/issue_templates/get-verified.md - .gitlab/jobs.yaml - .gitmodules - CODEOWNERS - cabal.project-reinstall - compiler/GHC.hs - compiler/GHC/CmmToAsm/Config.hs - compiler/GHC/CmmToAsm/PPC/CodeGen.hs - compiler/GHC/CmmToAsm/Reg/Linear.hs - compiler/GHC/CmmToAsm/Reg/Linear/StackMap.hs - compiler/GHC/CmmToLlvm.hs - compiler/GHC/CmmToLlvm/Base.hs - compiler/GHC/Core/FamInstEnv.hs - compiler/GHC/Core/Opt/Arity.hs - compiler/GHC/Core/Opt/Simplify/Env.hs - compiler/GHC/Core/Opt/Simplify/Iteration.hs - compiler/GHC/Core/Opt/Simplify/Utils.hs - compiler/GHC/Core/Opt/SpecConstr.hs - compiler/GHC/Core/Opt/Specialise.hs - compiler/GHC/Core/Opt/WorkWrap.hs - compiler/GHC/Core/Opt/WorkWrap/Utils.hs - compiler/GHC/Core/Rules.hs - compiler/GHC/Core/Tidy.hs - compiler/GHC/Core/Unfold.hs - compiler/GHC/Core/Unfold/Make.hs - compiler/GHC/Core/Utils.hs - compiler/GHC/CoreToStg/Prep.hs - compiler/GHC/Driver/CodeOutput.hs - compiler/GHC/Driver/Config/CmmToAsm.hs - compiler/GHC/Driver/DynFlags.hs - compiler/GHC/Driver/MakeFile.hs - compiler/GHC/Driver/Pipeline/Execute.hs - compiler/GHC/Driver/Session.hs - compiler/GHC/Hs/DocString.hs - compiler/GHC/Hs/Expr.hs - compiler/GHC/Hs/Instances.hs - compiler/GHC/HsToCore/Expr.hs - compiler/GHC/HsToCore/Match.hs - compiler/GHC/HsToCore/Monad.hs - compiler/GHC/HsToCore/Pmc.hs - compiler/GHC/HsToCore/Quote.hs - compiler/GHC/HsToCore/Ticks.hs - compiler/GHC/Iface/Ext/Ast.hs - compiler/GHC/Iface/Ext/Utils.hs - compiler/GHC/Linker/Loader.hs - compiler/GHC/Linker/Unit.hs - compiler/GHC/Parser/HaddockLex.x - compiler/GHC/Rename/Expr.hs - compiler/GHC/Rename/Names.hs - compiler/GHC/Rename/Utils.hs - compiler/GHC/Runtime/Debugger/Breakpoints.hs - compiler/GHC/Runtime/Interpreter/Init.hs - compiler/GHC/Settings/IO.hs - compiler/GHC/Stg/EnforceEpt.hs - compiler/GHC/Stg/Lint.hs - compiler/GHC/StgToCmm/Closure.hs - compiler/GHC/StgToCmm/Expr.hs - compiler/GHC/SysTools/Terminal.hs - compiler/GHC/Tc/Errors.hs - compiler/GHC/Tc/Errors/Ppr.hs - compiler/GHC/Tc/Gen/App.hs - + compiler/GHC/Tc/Gen/App.hs-boot - compiler/GHC/Tc/Gen/Do.hs - compiler/GHC/Tc/Gen/Expr.hs - compiler/GHC/Tc/Gen/Expr.hs-boot - compiler/GHC/Tc/Gen/Head.hs - compiler/GHC/Tc/Gen/Match.hs - compiler/GHC/Tc/Gen/Pat.hs - compiler/GHC/Tc/Gen/Splice.hs - compiler/GHC/Tc/Instance/Class.hs - compiler/GHC/Tc/Instance/Family.hs - compiler/GHC/Tc/Solver/Equality.hs - compiler/GHC/Tc/Solver/Monad.hs - compiler/GHC/Tc/Types/CtLoc.hs - compiler/GHC/Tc/Types/ErrCtxt.hs - compiler/GHC/Tc/Types/LclEnv.hs - compiler/GHC/Tc/Types/Origin.hs - compiler/GHC/Tc/Utils/Monad.hs - compiler/GHC/Tc/Utils/Unify.hs - compiler/GHC/Types/Error.hs - compiler/GHC/Types/Hint/Ppr.hs - compiler/GHC/Types/Id.hs - compiler/GHC/Types/Id/Info.hs - compiler/GHC/Types/Id/Make.hs - compiler/GHC/Types/Name/Reader.hs - compiler/GHC/Types/SrcLoc.hs - compiler/GHC/Unit/State.hs - compiler/GHC/Utils/Binary.hs - compiler/GHC/Utils/Logger.hs - config.guess - config.sub - configure.ac - docs/users_guide/9.16.1-notes.rst - docs/users_guide/ghci.rst - docs/users_guide/packages.rst - docs/users_guide/phases.rst - docs/users_guide/runtime_control.rst - docs/users_guide/using-concurrent.rst - docs/users_guide/using.rst - docs/users_guide/win32-dlls.rst - driver/ghci/ghci.c - driver/utils/cwrapper.c - driver/utils/isMinTTY.c - ghc/GHCi/UI.hs - ghc/GHCi/UI/Info.hs - hadrian/bindist/cwrappers/cwrapper.c - hadrian/doc/flavours.md - hadrian/doc/user-settings.md - hadrian/hadrian.cabal - hadrian/src/Builder.hs - hadrian/src/Packages.hs - hadrian/src/Rules.hs - hadrian/src/Rules/BinaryDist.hs - hadrian/src/Rules/CabalReinstall.hs - hadrian/src/Rules/Documentation.hs - hadrian/src/Rules/Generate.hs - − hadrian/src/Rules/Libffi.hs - hadrian/src/Rules/Program.hs - hadrian/src/Rules/Register.hs - hadrian/src/Rules/Rts.hs - hadrian/src/Rules/SourceDist.hs - hadrian/src/Rules/Test.hs - hadrian/src/Settings/Builders/Cabal.hs - hadrian/src/Settings/Builders/Ghc.hs - hadrian/src/Settings/Builders/SplitSections.hs - hadrian/src/Settings/Default.hs - hadrian/src/Settings/Flavours/Benchmark.hs - hadrian/src/Settings/Flavours/Development.hs - hadrian/src/Settings/Flavours/GhcInGhci.hs - hadrian/src/Settings/Flavours/Performance.hs - hadrian/src/Settings/Flavours/Quick.hs - hadrian/src/Settings/Flavours/QuickCross.hs - hadrian/src/Settings/Flavours/Quickest.hs - hadrian/src/Settings/Flavours/Validate.hs - hadrian/src/Settings/Packages.hs - hadrian/src/Settings/Program.hs - − libffi-tarballs - libraries/base/base.cabal.in - libraries/base/changelog.md - − libraries/base/src/GHC/JS/Prim/Internal/Build.hs - libraries/base/tests/IO/T12010/cbits/initWinSock.c - libraries/ghc-internal/cbits/consUtils.c - libraries/ghc-internal/configure.ac - libraries/ghc-internal/src/GHC/Internal/CString.hs - libraries/ghc-internal/src/GHC/Internal/ConsoleHandler.hsc - libraries/ghc-internal/src/GHC/Internal/IO/Handle.hs - libraries/haskeline - + libraries/libffi-clib - libraries/mtl - m4/ghc_select_file_extensions.m4 - packages - rts/RtsFlags.c - rts/include/rts/ghc_ffi.h - rts/rts.buildinfo.in - rts/rts.cabal - − rts/win32/libHSffi.def - − rts/win32/libHSghc-internal.def - − rts/win32/libHSghc-prim.def - testsuite/driver/perf_notes.py - testsuite/driver/runtests.py - testsuite/driver/testglobals.py - testsuite/driver/testlib.py - testsuite/mk/test.mk - testsuite/tests/deriving/should_fail/T8984.stderr - testsuite/tests/deriving/should_fail/deriving-via-fail.stderr - testsuite/tests/deriving/should_fail/deriving-via-fail4.stderr - testsuite/tests/deriving/should_fail/deriving-via-fail5.stderr - − testsuite/tests/driver/T24731.hs - testsuite/tests/driver/all.T - testsuite/tests/indexed-types/should_fail/T2693.stderr - testsuite/tests/indexed-types/should_fail/T5439.stderr - testsuite/tests/interface-stability/base-exports.stdout-javascript-unknown-ghcjs - testsuite/tests/overloadedrecflds/should_fail/T26480b.stderr - testsuite/tests/parser/should_fail/RecordDotSyntaxFail10.stderr - testsuite/tests/parser/should_fail/RecordDotSyntaxFail11.stderr - testsuite/tests/parser/should_fail/RecordDotSyntaxFail8.stderr - testsuite/tests/perf/should_run/all.T - testsuite/tests/plugins/test-defaulting-plugin.stderr - testsuite/tests/printer/T17697.stderr - testsuite/tests/rebindable/rebindable6.stderr - testsuite/tests/rep-poly/RepPolyDoBind.stderr - testsuite/tests/rep-poly/RepPolyDoBody1.stderr - testsuite/tests/rep-poly/RepPolyDoBody2.stderr - testsuite/tests/rep-poly/RepPolyRecordUpdate.stderr - testsuite/tests/rts/linker/rdynamic.hs - testsuite/tests/simplCore/should_compile/T14003.stderr - testsuite/tests/simplCore/should_compile/T18013.stderr - testsuite/tests/simplCore/should_compile/T19672.stderr - testsuite/tests/simplCore/should_compile/T21763.stderr - testsuite/tests/simplCore/should_compile/T21763a.stderr - + testsuite/tests/simplCore/should_compile/T26615.hs - + testsuite/tests/simplCore/should_compile/T26615.stderr - + testsuite/tests/simplCore/should_compile/T26615a.hs - + testsuite/tests/simplCore/should_compile/T26722.hs - + testsuite/tests/simplCore/should_compile/T26722.stderr - testsuite/tests/simplCore/should_compile/T4908.stderr - testsuite/tests/simplCore/should_compile/all.T - testsuite/tests/simplCore/should_compile/spec-inline.stderr - + testsuite/tests/typecheck/should_compile/ExpansionQLIm.hs - testsuite/tests/typecheck/should_compile/T14590.stderr - + testsuite/tests/typecheck/should_compile/T26746.hs - testsuite/tests/typecheck/should_compile/all.T - testsuite/tests/typecheck/should_compile/valid_hole_fits.stderr - testsuite/tests/typecheck/should_fail/DoExpansion1.stderr - testsuite/tests/typecheck/should_fail/DoExpansion2.stderr - testsuite/tests/typecheck/should_fail/T10971d.stderr - testsuite/tests/typecheck/should_fail/T13311.stderr - testsuite/tests/typecheck/should_fail/T15801.stderr - testsuite/tests/typecheck/should_fail/T22924b.stderr - testsuite/tests/typecheck/should_fail/T3323.stderr - testsuite/tests/typecheck/should_fail/T3613.stderr - testsuite/tests/typecheck/should_fail/T6069.stderr - testsuite/tests/typecheck/should_fail/T7851.stderr - testsuite/tests/typecheck/should_fail/T7857.stderr - testsuite/tests/typecheck/should_fail/T8603.stderr - testsuite/tests/typecheck/should_fail/T9612.stderr - testsuite/tests/typecheck/should_fail/TcCoercibleFail.hs - testsuite/tests/typecheck/should_fail/TcCoercibleFail.stderr - testsuite/tests/typecheck/should_fail/all.T - testsuite/tests/typecheck/should_fail/tcfail102.stderr - testsuite/tests/typecheck/should_fail/tcfail128.stderr - testsuite/tests/typecheck/should_fail/tcfail140.stderr - testsuite/tests/typecheck/should_fail/tcfail181.stderr - utils/check-exact/ExactPrint.hs - utils/check-exact/Parsers.hs - utils/check-exact/Transform.hs - utils/check-exact/Utils.hs - utils/ghc-pkg/Main.hs - utils/haddock/haddock-api/src/Haddock/Backends/Hyperlinker/Parser.hs - utils/haddock/haddock-api/src/Haddock/Backends/Xhtml/Utils.hs - − utils/iserv/iserv.cabal.in - − utils/iserv/src/Main.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/8c567a8642419c876cce6db00f17af… -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/8c567a8642419c876cce6db00f17af… You're receiving this email because of your account on gitlab.haskell.org.
1 0
0 0
[Git][ghc/ghc][wip/spj-apporv-Oct24] 47 commits: Don't re-use stack slots for growing registers
by Apoorv Ingle (@ani) 19 Jan '26

19 Jan '26
Apoorv Ingle pushed to branch wip/spj-apporv-Oct24 at Glasgow Haskell Compiler / GHC Commits: 023c301c by sheaf at 2026-01-13T04:57:30-05:00 Don't re-use stack slots for growing registers This commit avoids re-using a stack slot for a register that has grown but already had a stack slot. For example, suppose we have stack slot assigments %v1 :: FF64 |-> StackSlot 0 %v2 :: FF64 |-> StackSlot 1 Later, we start using %v1 at a larger format (e.g. F64x2) and we need to spill it again. Then we **must not** use StackSlot 0, as a spill at format F64x2 would clobber the data in StackSlot 1. This can cause some fragmentation of the `StackMap`, but that's probably OK. Fixes #26668 - - - - - d0966e64 by fendor at 2026-01-13T04:58:11-05:00 Remove `traceId` from ghc-pkg executable - - - - - 20d7efec by Simon Peyton Jones at 2026-01-13T12:41:22-05:00 Make SpecContr rules fire a bit later See #26615 and Note [SpecConstr rule activation] - - - - - 8bc4eb8c by Andrew Lelechenko at 2026-01-13T12:42:03-05:00 Upgrade mtl submodule to 2.3.2 Fixes #26656 - - - - - c94aaacd by Cheng Shao at 2026-01-13T12:42:44-05:00 compiler: remove iserv and only use on-demand external interpreter This patch removes `iserv` from the tree completely. Hadrian would no longer build or distribute `iserv`, and the GHC driver would use the on-demand external interpreter by default when invoked with `-fexternal-interpreter`, without needing to specify `-pgmi ""`. This has multiple benefits: - It allows cleanup of a lot of legacy hacks in the hadrian codebase. - It paves the way for running cross ghc's iserv via cross emulator (#25523), fixing TH/ghci support for cross targets other than wasm/js. - - - - - c1fe0097 by Peter Trommler at 2026-01-14T03:54:49-05:00 PPC NCG: Fix shift right MO code The shift amount in shift right [arithmetic] MOs is machine word width. Therefore remove unnecessary zero- or sign-extending of shift amount. It looks harmless to extend the shift amount argument because the shift right instruction uses only the seven lowest bits (i. e. mod 128). But now we have a conversion operation from a smaller type to word width around a memory load at word width. The types are not matching up but there is no check done in CodeGen. The necessary conversion from word width down to the smaller width would be translated into a no-op on PowerPC anyway. So all seems harmless if it was not for a small optimisation in getRegister'. In getRegister' a load instruction with the smaller width of the conversion operation was generated. This loaded the most significant bits of the word in memory on a big-endian platform. These bits were zero and hence shift right was used with shift amount zero and not one as required in test Sized. Fixes #26519 - - - - - 2dafc65a by Cheng Shao at 2026-01-14T03:55:31-05:00 Tree-wide cleanup of cygwin logic GHC has not supported cygwin for quite a few years already, and will not resume support in the forseeable future. The only supported windows toolchain is clang64/clangarm64 of the msys2 project. This patch cleans up the unused cygwin logic in the tree. Co-authored-by: Codex <codex(a)openai.com> - - - - - 66b96e2a by Teo Camarasu at 2026-01-14T03:56:13-05:00 Set default eventlog-flush-interval to 5s Resolves #26707 - - - - - d0254579 by Andrew Lelechenko at 2026-01-14T03:56:53-05:00 Document when -maxN RTS option was added - - - - - f25e2b12 by Cheng Shao at 2026-01-14T11:10:39-05:00 testsuite: remove obsolete --ci option from the testsuite driver This patch removes the obsolete `--ci` option from the testsuite driver: neither the CI scripts nor hadrian ever invokes the testsuite driver with `--ci`, and the perf notes are always fetched to the `refs/notes/perf` local reference anyway. - - - - - 7964763b by Julian Ospald at 2026-01-14T11:11:31-05:00 Fix fetch_cabal * download cabal if the existing one is of an older version * fix FreeBSD download url * fix unpacking on FreeBSD - - - - - 6b0129c1 by Julian Ospald at 2026-01-14T11:11:31-05:00 Bump toolchain in CI - - - - - 0f53ccc6 by Julian Ospald at 2026-01-14T11:11:31-05:00 Use libffi-clib Previously, we would build libffi via hadrian and bundle it manually with the GHC bindist. This now moves all that logic out of hadrian and allows us to have a clean Haskell package to build and link against and ship it without extra logic. This patch still retains the ability to link against a system libffi. The main reason of bundling libffi was that on some platforms (e.g. FreeBSD and Mac), system libffi is not visible to the C toolchain by default, so users would require settings in e.g. cabal to be able to compile anything. This adds the submodule libffi-clib to the repository. - - - - - 5e1cd595 by Peng Fan at 2026-01-14T11:12:26-05:00 NCG/LA64: add support for la664 micro architecture Add '-mla664' flag to LA664, which has some new features: atomic instructions, dbar hints, etc. 'LA464' is the default so that unrecognized instructions are not generated. - - - - - c56567ec by Simon Peyton Jones at 2026-01-15T23:19:04+00:00 Add evals for strict data-con args in worker-functions This fixes #26722, by adding an eval in a worker for arguments of strict data constructors, even if the function body uses them strictly. See (WIS1) in Note [Which Ids should be strictified] I took the opportunity to make substantial improvements in the documentation for call-by-value functions. See especially Note [CBV Function Ids: overview] in GHC.Types.Id.Info Note [Which Ids should be CBV candidates?] ditto Note [EPT enforcement] in GHC.Stg.EnforceEpt among others. - - - - - 9719ce5d by Simon Peyton Jones at 2026-01-15T23:19:04+00:00 Improve `interestingArg` This function analyses a function's argument to see if it is interesting enough to deserve an inlining discount. Improvements for * LitRubbish arguments * exprIsExpandable arguments See Note [Interesting arguments] which is substantially rewritten. - - - - - 7b616b9f by Cheng Shao at 2026-01-16T06:45:00-05:00 compiler: fix regression when compiling foreign stubs in the rts unit This patch fixes a regression when compiling foreign stubs in the rts unit introduced in 05e25647f72bc102061af3f20478aa72bff6ff6e. A simple revert would fix it, but it's better to implement a proper fix with comment for better understanding of the underlying problem, see the added comment for explanation. Co-authored-by: Codex <codex(a)openai.com> - - - - - c343ef64 by Sylvain Henry at 2026-01-16T06:45:51-05:00 base: remove GHC.JS.Prim.Internal.Build (#23432) See accepted CLC proposal https://github.com/haskell/core-libraries-committee/issues/329 - - - - - 29c0aceb by Simon Peyton Jones at 2026-01-16T17:18:11-05:00 Improve newtype unwrapping Ticket #26746 describes several relatively-minor shortcomings of newtype unwrapping. This MR addresses them, while also (arguably) simplifying the code a bit. See new Note [Solving newtype equalities: overview] and Note [Decomposing newtype equalities] and Note [Eager newtype decomposition] and Note [Even more eager newtype decomposition] For some reason, on Windows only, runtime allocations decrease for test T5205 (from 52k to 48k). I have not idea why. No change at all on Linux. I'm just going to accept the change. (I saw this same effect in another MR so I think it's a fault in the baseline.) Metric Decrease: T5205 - - - - - 8b59e62c by Andreas Klebinger at 2026-01-16T17:18:52-05:00 testsuite: Widen acceptance window for T5205. Fixes #26782 - - - - - 9e5e0234 by mangoiv at 2026-01-17T06:03:03-05:00 add a new issue template for getting verified To reduce spam created by new users, we will in future not grant any rights but reporting issues to new users. That is why we will have to be able to verify them. The added issue template serves that purpose. - - - - - b18b2c42 by Cheng Shao at 2026-01-17T06:03:44-05:00 llvm: fix split sections for llvm backend This patch fixes split sections for llvm backend: - Pass missing `--data-sections`/`--function-sections` flags to llc/opt. - Use `@llvm.compiler.used` instead of `@llvm.used` to avoid sections being unnecessarily retained at link-time. Fixes #26770. ------------------------- Metric Decrease: libdir size_hello_artifact size_hello_unicode ------------------------- Co-authored-by: Codex <codex(a)openai.com> - - - - - ebf66f67 by Cheng Shao at 2026-01-17T13:16:50-05:00 Update autoconf scripts Scripts taken from autoconf a2287c3041a3f2a204eb942e09c015eab00dc7dd - - - - - 598624b9 by Andreas Klebinger at 2026-01-17T13:17:32-05:00 CString.hs: Update incorrect comment. Fixes #26322 - - - - - eea2036b by Cheng Shao at 2026-01-18T10:00:49-05:00 libraries: bump haskeline submodule to 0.8.4.1 This patch bumps the haskeline submodule to 0.8.4.1 which includes an important fix for an ANSI handling bug on Windows (https://github.com/haskell/haskeline/pull/126) - - - - - 87d8f6c2 by Cheng Shao at 2026-01-18T10:01:30-05:00 hadrian: replace default -H32m/-H64m with -O64M to improve mutator productivity Most hadrian build flavours pass `-H32m`/`-H64m` to GHC as conventional wisdom to improve mutator productivity and reduce GC overhead. They were inherited from the legacy Make build system, and there used to be make flags to instrument a build process with `-Rghc-timing` option to collect GC stats of each GHC run from stderr. It's time to revisit whether there are better defaults for `-H32m`/`-H64m`, and this patch changes it to `-O64M` which indeed improves mutator productivity based on real statistics. `-O64M` is more aggressive than `-H64m`; it allows the old generation to grow to at least 64M before triggering major GC and reduces major GC runs. The stats of a clean build with `validate` flavour and `-H64m`: ``` h64m.log matched RTS stat lines: 5499 sum MUT cpu : 2400.808 s sum GC cpu : 1378.292 s sum MUT elapsed : 2788.253 s sum GC elapsed : 1389.233 s GC/MUT cpu ratio : 0.574 (GC is 57.4% of MUT) GC/MUT elapsed ratio : 0.498 (GC is 49.8% of MUT) GC fraction of (MUT+GC) cpu : 36.5% GC fraction of (MUT+GC) elapsed : 33.3% per-line GC/MUT cpu ratio: median 0.691, p90 1.777 per-line GC/MUT elapsed ratio: median 0.519, p90 1.081 ``` The stats of a clean build with `validate` flavour and `-O64M`: ``` o64m.log matched RTS stat lines: 5499 sum MUT cpu : 2377.383 s sum GC cpu : 1127.146 s sum MUT elapsed : 2758.857 s sum GC elapsed : 1135.587 s GC/MUT cpu ratio : 0.474 (GC is 47.4% of MUT) GC/MUT elapsed ratio : 0.412 (GC is 41.2% of MUT) GC fraction of (MUT+GC) cpu : 32.2% GC fraction of (MUT+GC) elapsed : 29.2% per-line GC/MUT cpu ratio: median 0.489, p90 1.099 per-line GC/MUT elapsed ratio: median 0.367, p90 0.806 ``` Mutator time is roughly in the same ballpark, but GC CPU time has reduced by 18.22%, and mutator productivity has increased from 63.5% to 67.8%. - - - - - 8372e13d by Cheng Shao at 2026-01-18T10:02:12-05:00 rts: remove unused .def files from rts/win32 This patch removes unused .def files from `rts/win32`, given we don't build .dll files for rts/ghc-internal/ghc-prim at all. Even when we resurrect win32 dll support at some point in the future, these .def files still contain incorrect symbols anyway and won't be of any use. - - - - - f6af485d by Cheng Shao at 2026-01-18T10:03:19-05:00 .gitmodules: use gitlab mirror for the libffi-clib submodule This patch fixes .gitmodules to use the gitlab mirror for the libffi-clib submodule, to make it coherent with other submodules that allow ghc developers to experiment with wip branches in submodules for ghc patches. Fixes #26783. - - - - - 41432d25 by Cheng Shao at 2026-01-18T10:05:13-05:00 hadrian: remove the horrible i386 speedHack When hadrian builds certain rts objects for i386, there's a horrible speedHack that forces -fno-PIC even for dynamic ways of those objects. This is not compatible with newer versions of gcc/binutils as well as clang/lld, and this patch removes it. Fixes #26792. - - - - - 323eb8f0 by Cheng Shao at 2026-01-18T21:48:19-05:00 hadrian: enable split sections for cross stage0 This patch fixes a minor issue with `splitSectionsArgs` in hadrian: previously, it's unconditionally disabled for stage0 libraries because it's not going to be shipped in the final bindists. But it's only true when not cross compiling. So for now we also need to enable it for cross stage0 as well. - - - - - 3fadfefe by Andreas Klebinger at 2026-01-18T21:49:01-05:00 RTS: Document -K behaviour better - - - - - b1622aed by Apoorv Ingle at 2026-01-19T13:20:12-06:00 This commit: - Streamlines implementations of `tcExpr` and `tcXExpr` to work on `XExpr` Calls `setInGeneratedCode` everytime the typechecker goes over an `XExpr` - Kills `VACtxt` (and its associated VAExpansion and VACall) datatype, it is subsumed by simply a SrcSpan. - Kills the function `addHeadCtxt` as it is now mearly setting a location - The function `tcValArgs` does its own argument number management - Makes `splitHsApps` not look through `XExpr` - `tcExprSigma` is called if the head of the expression after calling `splitHsApps` turns out to be an `XExpr` - Removes location information from `OrigPat` payload - Removes special case of tcBody from `tcLambdaMatches` - Removes special case of `dsExpr` for `ExpandedThingTc` - Moves `setQLInstLevel` inside `tcInstFun` - Rename `HsThingRn` to `SrcCodeCtxt` - Kills `tcl_in_gen_code` and `tcl_err_ctxt`. It is subsumed by `ErrCtxtStack` - Kills `ExpectedFunTyOrig`. It is subsumed by `CtOrigin` - Fixes `CtOrigin` for `HsProjection` case in `exprCtOrigin`. It was previously assigned to be `SectionOrigin`. It is now just the expression - Adds a new `CtOrigin.ExpansionOrigin` for storing the original syntax - Adds a new `CtOrigin.ExpectedTySyntax` as a replacement for `ExpectedTySyntaxOp`. Cannot kill the former yet because of `ApplicativeDo` - Renames `tcMonoExpr` -> `tcMonoLExpr`, `tcMonoExprNC` -> `tcMonoLExpr` - Renames `EValArg`, `EValArgQL` fields: `ea_ctxt` -> `ea_loc_span` and `eaql_ctx` -> `eaql_loc_span` Notes added [Error Context Stack] Notes updated Note [Expanding HsDo with XXExprGhcRn] ------------------------- Metric Decrease: T9020 ------------------------- - - - - - c83d2222 by Apoorv Ingle at 2026-01-19T13:20:13-06:00 - kill PopErrCtxt - Pass in the location of the head of the application chain to `addArgCtxt` to print better error messages. Make `addArgCtxt` print in the nth argument if the head of the application chain is user located. - match context with record updates dont get added in error context - Do not use HsPar in Last statement - simplify addArgCtxt and push setSrcSpan inside addLExprCtxt. Make sure addExprCtxt is not called by itself - fun_orig in tcApp depends on the SrcSpan of the head of the application chain (similar to addArgCtxt) - rename fun_ctxt to fun_lspan, fun_orig passed in tcInstFun to default to app chain head if its user located, fall back to srcCodeOrigin if it's a generated location - fix quickLookArg function to blame the correct application chain head. The arguments application chain head should be blamed, not the original head when we quick look arg - Make sure only expression wrapped around generated src span are ignored while adding them to the error context stack - In `addArgCtxt` the nth argument's err ctxt adds a generated error ctxt if the argument is XExpr - - - - - 452bf2a6 by Apoorv Ingle at 2026-01-19T13:20:13-06:00 - make sure landmark error contexts are always printed. accept some testcases - fix overloaded list error message. Expanded Expressions head `listFromN` should be wrapped in a generated source span (Wrinkle) This may make some HIE tests to fail, but HIE should fix the behaviour there. - Fix notes - fix for MonadFailErrors test case. OrigPat now also stores the statement to make the error message resonable - - - - - 678820ca by Apoorv Ingle at 2026-01-19T13:21:33-06:00 - `getDeepSubsumptionFlag_DataConHead` performs a non-trivial traversal if the expression passed to it is complex. This traversal is necessary if the head of the function is an `XExpr` and `splitHsApps` does not look through them - The deepsubsumption flag is stored in EVAlArgQL to reduce the need to call `getDeepSubsumptionFlag_DataConHead` - `getDeepSubsumptionFlag_DataConHead` is called in `tcExprSigma` and `tcInferAppHead` to reduce AST traversals - refactor building CtOrigin before instantiations as a function. It does state lookup only if needed. - In tcDoStmts, we lose the location of the first statement. It is needed for getting the pattern match check right Further, do not call addErrCtxt on it, the tcMonoLExpr will do it for us. - during QL arg's function head instantiation use more a more accurate location for arg when the application chain is null - - - - - 107612ff by Apoorv Ingle at 2026-01-19T13:22:00-06:00 do not add error context in tcExprSigma for XExpr and do not setQLInstLevel before tcInstFun - - - - - 072ef03e by Apoorv Ingle at 2026-01-19T13:22:01-06:00 wrap expanded records in an XExpr. Accept test cases - - - - - 3fe78b11 by Apoorv Ingle at 2026-01-19T13:22:01-06:00 in QuicklookArg, wrap the inferAppHead_maybe with an optional error context update. If the head is a XExpr, we need to flip the state to generated - - - - - bf2b0724 by Apoorv Ingle at 2026-01-19T13:22:01-06:00 ignore patterns wrapped around generated src span while type checking patterns - - - - - f0ff7ea9 by Apoorv Ingle at 2026-01-19T13:22:01-06:00 fixing some more error messages - - - - - cd493daa by Apoorv Ingle at 2026-01-19T13:22:01-06:00 wrap fromListN with a generated src span - - - - - b032d467 by Apoorv Ingle at 2026-01-19T13:22:01-06:00 some minor things - - - - - 23e2a676 by Apoorv Ingle at 2026-01-19T13:22:01-06:00 enable NB for custom, user written HasField constraint errors - - - - - 496c337e by Apoorv Ingle at 2026-01-19T13:22:02-06:00 rebase changes - - - - - c6fdd282 by Apoorv Ingle at 2026-01-19T13:22:02-06:00 add Overview note - - - - - 1d90a947 by Apoorv Ingle at 2026-01-19T13:22:02-06:00 fix for failing test case - - - - - f59e1ed0 by Apoorv Ingle at 2026-01-19T13:32:16-06:00 do not overwrite err ctxt head when we add err ctxt due to expanded exprs `(XExpr (OrigStmt{})` fixes RecordDotSyntaxFail test cases where a record is updated within a do statement - - - - - 211 changed files: - .gitlab/ci.sh - .gitlab/generate-ci/gen_ci.hs - + .gitlab/issue_templates/get-verified.md - .gitlab/jobs.yaml - .gitmodules - CODEOWNERS - cabal.project-reinstall - compiler/GHC/CmmToAsm/Config.hs - compiler/GHC/CmmToAsm/PPC/CodeGen.hs - compiler/GHC/CmmToAsm/Reg/Linear.hs - compiler/GHC/CmmToAsm/Reg/Linear/StackMap.hs - compiler/GHC/CmmToLlvm.hs - compiler/GHC/CmmToLlvm/Base.hs - compiler/GHC/Core/FamInstEnv.hs - compiler/GHC/Core/Opt/Arity.hs - compiler/GHC/Core/Opt/Simplify/Env.hs - compiler/GHC/Core/Opt/Simplify/Iteration.hs - compiler/GHC/Core/Opt/Simplify/Utils.hs - compiler/GHC/Core/Opt/SpecConstr.hs - compiler/GHC/Core/Opt/Specialise.hs - compiler/GHC/Core/Opt/WorkWrap.hs - compiler/GHC/Core/Opt/WorkWrap/Utils.hs - compiler/GHC/Core/Rules.hs - compiler/GHC/Core/Tidy.hs - compiler/GHC/Core/Unfold.hs - compiler/GHC/Core/Unfold/Make.hs - compiler/GHC/Core/Utils.hs - compiler/GHC/CoreToStg/Prep.hs - compiler/GHC/Driver/CodeOutput.hs - compiler/GHC/Driver/Config/CmmToAsm.hs - compiler/GHC/Driver/DynFlags.hs - compiler/GHC/Driver/MakeFile.hs - compiler/GHC/Driver/Pipeline/Execute.hs - compiler/GHC/Driver/Session.hs - compiler/GHC/Hs/Expr.hs - compiler/GHC/Hs/Instances.hs - compiler/GHC/HsToCore/Expr.hs - compiler/GHC/HsToCore/Match.hs - compiler/GHC/HsToCore/Pmc.hs - compiler/GHC/HsToCore/Quote.hs - compiler/GHC/HsToCore/Ticks.hs - compiler/GHC/Iface/Ext/Ast.hs - compiler/GHC/Linker/Loader.hs - compiler/GHC/Linker/Unit.hs - compiler/GHC/Rename/Expr.hs - compiler/GHC/Rename/Utils.hs - compiler/GHC/Runtime/Interpreter/Init.hs - compiler/GHC/Settings/IO.hs - compiler/GHC/Stg/EnforceEpt.hs - compiler/GHC/Stg/Lint.hs - compiler/GHC/StgToCmm/Closure.hs - compiler/GHC/StgToCmm/Expr.hs - compiler/GHC/SysTools/Terminal.hs - compiler/GHC/Tc/Errors.hs - compiler/GHC/Tc/Errors/Ppr.hs - compiler/GHC/Tc/Gen/App.hs - + compiler/GHC/Tc/Gen/App.hs-boot - compiler/GHC/Tc/Gen/Do.hs - compiler/GHC/Tc/Gen/Expr.hs - compiler/GHC/Tc/Gen/Expr.hs-boot - compiler/GHC/Tc/Gen/Head.hs - compiler/GHC/Tc/Gen/Match.hs - compiler/GHC/Tc/Gen/Pat.hs - compiler/GHC/Tc/Instance/Class.hs - compiler/GHC/Tc/Instance/Family.hs - compiler/GHC/Tc/Solver/Equality.hs - compiler/GHC/Tc/Solver/Monad.hs - compiler/GHC/Tc/Types/ErrCtxt.hs - compiler/GHC/Tc/Types/LclEnv.hs - compiler/GHC/Tc/Types/Origin.hs - compiler/GHC/Tc/Utils/Monad.hs - compiler/GHC/Tc/Utils/Unify.hs - compiler/GHC/Types/Id.hs - compiler/GHC/Types/Id/Info.hs - compiler/GHC/Types/Id/Make.hs - compiler/GHC/Unit/State.hs - config.guess - config.sub - configure.ac - docs/users_guide/9.16.1-notes.rst - docs/users_guide/ghci.rst - docs/users_guide/packages.rst - docs/users_guide/phases.rst - docs/users_guide/runtime_control.rst - docs/users_guide/using-concurrent.rst - docs/users_guide/using.rst - docs/users_guide/win32-dlls.rst - driver/ghci/ghci.c - driver/utils/cwrapper.c - driver/utils/isMinTTY.c - hadrian/bindist/cwrappers/cwrapper.c - hadrian/doc/flavours.md - hadrian/doc/user-settings.md - hadrian/hadrian.cabal - hadrian/src/Builder.hs - hadrian/src/Packages.hs - hadrian/src/Rules.hs - hadrian/src/Rules/BinaryDist.hs - hadrian/src/Rules/CabalReinstall.hs - hadrian/src/Rules/Documentation.hs - hadrian/src/Rules/Generate.hs - − hadrian/src/Rules/Libffi.hs - hadrian/src/Rules/Program.hs - hadrian/src/Rules/Register.hs - hadrian/src/Rules/Rts.hs - hadrian/src/Rules/SourceDist.hs - hadrian/src/Rules/Test.hs - hadrian/src/Settings/Builders/Cabal.hs - hadrian/src/Settings/Builders/Ghc.hs - hadrian/src/Settings/Builders/SplitSections.hs - hadrian/src/Settings/Default.hs - hadrian/src/Settings/Flavours/Benchmark.hs - hadrian/src/Settings/Flavours/Development.hs - hadrian/src/Settings/Flavours/GhcInGhci.hs - hadrian/src/Settings/Flavours/Performance.hs - hadrian/src/Settings/Flavours/Quick.hs - hadrian/src/Settings/Flavours/QuickCross.hs - hadrian/src/Settings/Flavours/Quickest.hs - hadrian/src/Settings/Flavours/Validate.hs - hadrian/src/Settings/Packages.hs - hadrian/src/Settings/Program.hs - − libffi-tarballs - libraries/base/base.cabal.in - libraries/base/changelog.md - − libraries/base/src/GHC/JS/Prim/Internal/Build.hs - libraries/base/tests/IO/T12010/cbits/initWinSock.c - libraries/ghc-internal/cbits/consUtils.c - libraries/ghc-internal/configure.ac - libraries/ghc-internal/src/GHC/Internal/CString.hs - libraries/ghc-internal/src/GHC/Internal/ConsoleHandler.hsc - libraries/ghc-internal/src/GHC/Internal/IO/Handle.hs - libraries/haskeline - + libraries/libffi-clib - libraries/mtl - m4/ghc_select_file_extensions.m4 - packages - rts/RtsFlags.c - rts/include/rts/ghc_ffi.h - rts/rts.buildinfo.in - rts/rts.cabal - − rts/win32/libHSffi.def - − rts/win32/libHSghc-internal.def - − rts/win32/libHSghc-prim.def - testsuite/driver/perf_notes.py - testsuite/driver/runtests.py - testsuite/driver/testglobals.py - testsuite/driver/testlib.py - testsuite/mk/test.mk - testsuite/tests/deriving/should_fail/T8984.stderr - testsuite/tests/deriving/should_fail/deriving-via-fail.stderr - testsuite/tests/deriving/should_fail/deriving-via-fail4.stderr - testsuite/tests/deriving/should_fail/deriving-via-fail5.stderr - − testsuite/tests/driver/T24731.hs - testsuite/tests/driver/all.T - testsuite/tests/indexed-types/should_fail/T2693.stderr - testsuite/tests/indexed-types/should_fail/T5439.stderr - testsuite/tests/interface-stability/base-exports.stdout-javascript-unknown-ghcjs - testsuite/tests/overloadedrecflds/should_fail/T26480b.stderr - testsuite/tests/parser/should_fail/RecordDotSyntaxFail10.stderr - testsuite/tests/parser/should_fail/RecordDotSyntaxFail11.stderr - testsuite/tests/parser/should_fail/RecordDotSyntaxFail8.stderr - testsuite/tests/perf/should_run/all.T - testsuite/tests/plugins/test-defaulting-plugin.stderr - testsuite/tests/printer/T17697.stderr - testsuite/tests/rebindable/rebindable6.stderr - testsuite/tests/rep-poly/RepPolyDoBind.stderr - testsuite/tests/rep-poly/RepPolyDoBody1.stderr - testsuite/tests/rep-poly/RepPolyDoBody2.stderr - testsuite/tests/rep-poly/RepPolyRecordUpdate.stderr - testsuite/tests/rts/linker/rdynamic.hs - testsuite/tests/simplCore/should_compile/T14003.stderr - testsuite/tests/simplCore/should_compile/T18013.stderr - testsuite/tests/simplCore/should_compile/T19672.stderr - testsuite/tests/simplCore/should_compile/T21763.stderr - testsuite/tests/simplCore/should_compile/T21763a.stderr - + testsuite/tests/simplCore/should_compile/T26615.hs - + testsuite/tests/simplCore/should_compile/T26615.stderr - + testsuite/tests/simplCore/should_compile/T26615a.hs - + testsuite/tests/simplCore/should_compile/T26722.hs - + testsuite/tests/simplCore/should_compile/T26722.stderr - testsuite/tests/simplCore/should_compile/T4908.stderr - testsuite/tests/simplCore/should_compile/all.T - testsuite/tests/simplCore/should_compile/spec-inline.stderr - + testsuite/tests/typecheck/should_compile/ExpansionQLIm.hs - testsuite/tests/typecheck/should_compile/T14590.stderr - + testsuite/tests/typecheck/should_compile/T26746.hs - testsuite/tests/typecheck/should_compile/all.T - testsuite/tests/typecheck/should_compile/valid_hole_fits.stderr - testsuite/tests/typecheck/should_fail/DoExpansion1.stderr - testsuite/tests/typecheck/should_fail/DoExpansion2.stderr - testsuite/tests/typecheck/should_fail/T10971d.stderr - testsuite/tests/typecheck/should_fail/T13311.stderr - testsuite/tests/typecheck/should_fail/T15801.stderr - testsuite/tests/typecheck/should_fail/T22924b.stderr - testsuite/tests/typecheck/should_fail/T3323.stderr - testsuite/tests/typecheck/should_fail/T3613.stderr - testsuite/tests/typecheck/should_fail/T6069.stderr - testsuite/tests/typecheck/should_fail/T7851.stderr - testsuite/tests/typecheck/should_fail/T7857.stderr - testsuite/tests/typecheck/should_fail/T8603.stderr - testsuite/tests/typecheck/should_fail/T9612.stderr - testsuite/tests/typecheck/should_fail/TcCoercibleFail.hs - testsuite/tests/typecheck/should_fail/TcCoercibleFail.stderr - testsuite/tests/typecheck/should_fail/all.T - testsuite/tests/typecheck/should_fail/tcfail102.stderr - testsuite/tests/typecheck/should_fail/tcfail128.stderr - testsuite/tests/typecheck/should_fail/tcfail140.stderr - testsuite/tests/typecheck/should_fail/tcfail181.stderr - utils/ghc-pkg/Main.hs - − utils/iserv/iserv.cabal.in - − utils/iserv/src/Main.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/05158af44f23fcc04b43a607533b29… -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/05158af44f23fcc04b43a607533b29… You're receiving this email because of your account on gitlab.haskell.org.
1 0
0 0
[Git][ghc/ghc][wip/sm-no-sweep] rts: drop the legacy mark-region oldest generation collector
by Cheng Shao (@TerrorJack) 19 Jan '26

19 Jan '26
Cheng Shao pushed to branch wip/sm-no-sweep at Glasgow Haskell Compiler / GHC Commits: 62caed2b by Cheng Shao at 2026-01-19T19:31:25+01:00 rts: drop the legacy mark-region oldest generation collector This patch drops the legacy mark-region oldest generation collector from the RTS, which performs simple mark-and-sweep in the oldest generation's old blocks, checking their bitmap and freeing the blocks that contain no live closure; any old block that contains live closure is retained, and is suspectible to fragmentation. It was added as an experiment in 2008 (https://mail.haskell.org/pipermail/cvs-ghc/2008-June/043146.html) has not seen much changes over the years, does not work with heap census, is completely untested in CI, and doesn't seem to be really used by anyone in production. Keeping it in the RTS codebase also causes a slight confusion in terminology, since the term "sweep" can refer to both the legacy code path as well as the nonmoving sweep logic. This motivates the cleanup. Closes #26802. - - - - - 15 changed files: - docs/users_guide/runtime_control.rst - libraries/base/src/GHC/RTS/Flags.hs - libraries/ghc-internal/src/GHC/Internal/RTS/Flags.hsc - rts/RtsFlags.c - rts/include/rts/Flags.h - rts/include/rts/storage/Block.h - rts/rts.cabal - rts/sm/GC.c - rts/sm/Sanity.c - rts/sm/Storage.c - − rts/sm/Sweep.c - − rts/sm/Sweep.h - testsuite/tests/interface-stability/ghc-experimental-exports.stdout - testsuite/tests/interface-stability/ghc-experimental-exports.stdout-mingw32 - testsuite/tests/linters/Makefile Changes: ===================================== docs/users_guide/runtime_control.rst ===================================== @@ -449,18 +449,6 @@ performance. Large values are likely to lead to diminishing returns as , in practice, the Haskell heap tends to be dominated by small objects. - -.. rts-flag:: -w - - :default: off - :since: a long time ago - :reverse: none - - Uses a mark-region garbage collection strategy for the oldest-generation heap. - Note that this cannot be used in conjunction with heap profiling - (:rts-flag:`-hT`) unless linked against the profiling runtime system with - :ghc-flag:`-prof`. - .. rts-flag:: -A ⟨size⟩ :default: 4MB ===================================== libraries/base/src/GHC/RTS/Flags.hs ===================================== @@ -107,7 +107,8 @@ data GCFlags = GCFlags , compact :: Bool -- ^ True <=> "compact all the time" , compactThreshold :: Double , sweep :: Bool - -- ^ use "mostly mark-sweep" instead of copying for the oldest generation + -- ^ Always 'False', refers to the legacy mark-and-sweep + -- collector (@+RTS -w@) that's now removed , ringBell :: Bool , idleGCDelayTime :: RtsTime , doIdleGC :: Bool @@ -362,7 +363,7 @@ internal_to_base_RTSFlags Internal.RTSFlags{..} = internal_to_base_GCFlags :: Internal.GCFlags -> GCFlags internal_to_base_GCFlags i@Internal.GCFlags{..} = let give_stats = internal_to_base_giveStats (Internal.giveStats i) - in GCFlags{ giveStats = give_stats, .. } + in GCFlags{ giveStats = give_stats, sweep = False, .. } where internal_to_base_giveStats :: Internal.GiveGCStats -> GiveGCStats internal_to_base_giveStats Internal.NoGCStats = NoGCStats ===================================== libraries/ghc-internal/src/GHC/Internal/RTS/Flags.hsc ===================================== @@ -126,8 +126,6 @@ data GCFlags = GCFlags , squeezeUpdFrames :: Bool , compact :: Bool -- ^ True <=> "compact all the time" , compactThreshold :: Double - , sweep :: Bool - -- ^ use "mostly mark-sweep" instead of copying for the oldest generation , ringBell :: Bool , idleGCDelayTime :: RtsTime , doIdleGC :: Bool @@ -472,8 +470,6 @@ getGCFlags = do <*> (toBool <$> (#{peek GC_FLAGS, compact} ptr :: IO CBool)) <*> #{peek GC_FLAGS, compactThreshold} ptr - <*> (toBool <$> - (#{peek GC_FLAGS, sweep} ptr :: IO CBool)) <*> (toBool <$> (#{peek GC_FLAGS, ringBell} ptr :: IO CBool)) <*> #{peek GC_FLAGS, idleGCDelayTime} ptr ===================================== rts/RtsFlags.c ===================================== @@ -170,7 +170,6 @@ void initRtsFlagsDefaults(void) RtsFlags.GcFlags.squeezeUpdFrames = true; RtsFlags.GcFlags.compact = false; RtsFlags.GcFlags.compactThreshold = 30.0; - RtsFlags.GcFlags.sweep = false; RtsFlags.GcFlags.idleGCDelayTime = USToTime(300000); // 300ms RtsFlags.GcFlags.interIdleGCWait = 0; #if defined(THREADED_RTS) @@ -361,7 +360,6 @@ usage_text[] = { " -M (default: 30%)", " -c Use in-place compaction for all oldest generation collections", " (the default is to use copying)", -" -w Use mark-region for the oldest generation (experimental)", #if defined(THREADED_RTS) " -I<sec> Perform full GC after <sec> idle time (default: 0.3, 0 == off)", " -Iw<sec> Minimum wait time between idle GC runs (default: 0, 0 == no min wait time)", @@ -1266,12 +1264,6 @@ error = true; } break; - case 'w': - OPTION_UNSAFE; - RtsFlags.GcFlags.sweep = true; - unchecked_arg_start++; - goto check_rest; - case 'F': OPTION_UNSAFE; switch(rts_argv[arg][2]) { @@ -2019,16 +2011,6 @@ static void normaliseRtsOpts (void) barf("The non-moving collector doesn't support -G1"); } -#if !defined(PROFILING) && !defined(DEBUG) - // The mark-region collector is incompatible with heap census unless - // we zero slop of blackhole'd thunks, which doesn't happen in the - // vanilla way. See #9666. - if (RtsFlags.ProfFlags.doHeapProfile && RtsFlags.GcFlags.sweep) { - barf("The mark-region collector can only be used with profiling\n" - "when linked against the profiled RTS."); - } -#endif - if (RtsFlags.GcFlags.compact && RtsFlags.GcFlags.useNonmoving) { errorBelch("The non-moving collector cannot be used in conjunction with\n" "the compacting collector."); ===================================== rts/include/rts/Flags.h ===================================== @@ -61,8 +61,6 @@ typedef struct _GC_FLAGS { bool compact; /* True <=> "compact all the time" */ double compactThreshold; - bool sweep; /* use "mostly mark-sweep" instead of copying - * for the oldest generation */ bool ringBell; Time idleGCDelayTime; /* units: TIME_RESOLUTION */ ===================================== rts/include/rts/storage/Block.h ===================================== @@ -168,8 +168,6 @@ typedef struct bdescr_ { #define BF_FRAGMENTED 64 /* we know about this block (for finding leaks) */ #define BF_KNOWN 128 -/* Block was swept in the last generation */ -#define BF_SWEPT 256 /* Block is part of a Compact */ #define BF_COMPACT 512 /* A non-moving allocator segment (see NonMoving.c) */ ===================================== rts/rts.cabal ===================================== @@ -528,7 +528,6 @@ library sm/Scav.c sm/Scav_thr.c sm/Storage.c - sm/Sweep.c fs.c prim/atomic.c prim/bitrev.c ===================================== rts/sm/GC.c ===================================== @@ -26,7 +26,6 @@ #include "MarkStack.h" #include "MarkWeak.h" #include "Sparks.h" -#include "Sweep.h" #include "Arena.h" #include "Storage.h" @@ -384,7 +383,7 @@ GarbageCollect (struct GcConfig config, #if defined(THREADED_RTS) /* How many threads will be participating in this GC? - * We don't always parallelise minor GCs, or mark/compact/sweep GC. + * We don't always parallelise minor GCs, or mark/compact GC. * The policy on when to do a parallel GC is controlled by RTS flags (see * below) @@ -602,14 +601,11 @@ GarbageCollect (struct GcConfig config, // NO MORE EVACUATION AFTER THIS POINT! - // Finally: compact or sweep the oldest generation. + // Finally: compact the oldest generation. if (major_gc && oldest_gen->mark) { - if (oldest_gen->compact) compact(gct->scavenged_static_objects, &dead_weak_ptr_list, &resurrected_threads); - else - sweep(oldest_gen); } copied = 0; @@ -1792,10 +1788,6 @@ prepare_collected_gen (generation *gen) if (!(bd->flags & BF_FRAGMENTED)) { bd->flags |= BF_MARKED; } - - // BF_SWEPT should be marked only for blocks that are being - // collected in sweep() - bd->flags &= ~BF_SWEPT; } } } @@ -2025,10 +2017,6 @@ resizeGenerations (void) // debugBelch("compaction: off\n", live); } - if (RtsFlags.GcFlags.sweep) { - oldest_gen->mark = 1; - } - // if we're going to go over the maximum heap size, reduce the // size of the generations accordingly. The calculation is // different if compaction is turned on, because we don't need ===================================== rts/sm/Sanity.c ===================================== @@ -597,7 +597,6 @@ checkClosure( const StgClosure* p ) void checkHeapChain (bdescr *bd) { for (; bd != NULL; bd = bd->link) { - if(!(bd->flags & BF_SWEPT)) { StgPtr p = bd->start; while (p < bd->free) { uint32_t size = checkClosure((StgClosure *)p); @@ -609,7 +608,6 @@ void checkHeapChain (bdescr *bd) while (p < bd->free && (*p < 0x1000 || !LOOKS_LIKE_INFO_PTR(*p))) { p++; } } - } } } ===================================== rts/sm/Storage.c ===================================== @@ -226,13 +226,12 @@ initStorage (void) nonmovingInit(); /* The oldest generation has one step. */ - if (RtsFlags.GcFlags.compact || RtsFlags.GcFlags.sweep) { + if (RtsFlags.GcFlags.compact) { if (RtsFlags.GcFlags.generations == 1) { errorBelch("WARNING: compact/sweep is incompatible with -G1; disabled"); } else { oldest_gen->mark = 1; - if (RtsFlags.GcFlags.compact) - oldest_gen->compact = 1; + oldest_gen->compact = 1; } } ===================================== rts/sm/Sweep.c deleted ===================================== @@ -1,86 +0,0 @@ -/* ----------------------------------------------------------------------------- - * - * (c) The GHC Team 2008 - * - * Simple mark/sweep, collecting whole blocks. - * - * Documentation on the architecture of the Garbage Collector can be - * found in the online commentary: - * - * https://gitlab.haskell.org/ghc/ghc/wikis/commentary/rts/storage/gc - * - * ---------------------------------------------------------------------------*/ - -#include "rts/PosixSource.h" -#include "Rts.h" - -#include "BlockAlloc.h" -#include "Sweep.h" -#include "Trace.h" - -void -sweep(generation *gen) -{ - bdescr *bd, *prev, *next; - uint32_t i; - W_ freed, resid, fragd, blocks, live; - - ASSERT(countBlocks(gen->old_blocks) == gen->n_old_blocks); - - live = 0; // estimate of live data in this gen - freed = 0; - fragd = 0; - blocks = 0; - prev = NULL; - for (bd = gen->old_blocks; bd != NULL; bd = next) - { - next = bd->link; - - if (!(bd->flags & BF_MARKED)) { - prev = bd; - continue; - } - - blocks++; - resid = 0; - for (i = 0; i < BLOCK_SIZE_W / BITS_IN(W_); i++) - { - if (bd->u.bitmap[i] != 0) resid++; - } - live += resid * BITS_IN(W_); - - if (resid == 0) - { - freed++; - gen->n_old_blocks--; - if (prev == NULL) { - gen->old_blocks = next; - } else { - prev->link = next; - } - freeGroup(bd); - } - else - { - prev = bd; - if (resid < (BLOCK_SIZE_W * 3) / (BITS_IN(W_) * 4)) { - fragd++; - bd->flags |= BF_FRAGMENTED; - } - - bd->flags |= BF_SWEPT; - } - } - - gen->live_estimate = live; - - debugTrace(DEBUG_gc, "sweeping: %d blocks, %d were copied, %d freed (%d%%), %d are fragmented, live estimate: %ld%%", - gen->n_old_blocks + freed, - gen->n_old_blocks - blocks + freed, - freed, - blocks == 0 ? 0 : (freed * 100) / blocks, - fragd, - (unsigned long)((blocks - freed) == 0 ? 0 : ((live / BLOCK_SIZE_W) * 100) / (blocks - freed))); - - ASSERT(countBlocks(gen->old_blocks) == gen->n_old_blocks); -} ===================================== rts/sm/Sweep.h deleted ===================================== @@ -1,16 +0,0 @@ -/* ----------------------------------------------------------------------------- - * - * (c) The GHC Team 2008 - * - * Simple mark/sweep, collecting whole blocks. - * - * Documentation on the architecture of the Garbage Collector can be - * found in the online commentary: - * - * https://gitlab.haskell.org/ghc/ghc/wikis/commentary/rts/storage/gc - * - * ---------------------------------------------------------------------------*/ - -#pragma once - -RTS_PRIVATE void sweep(generation *gen); ===================================== testsuite/tests/interface-stability/ghc-experimental-exports.stdout ===================================== @@ -6415,7 +6415,6 @@ module GHC.RTS.Flags.Experimental where squeezeUpdFrames :: GHC.Internal.Types.Bool, compact :: GHC.Internal.Types.Bool, compactThreshold :: GHC.Internal.Types.Double, - sweep :: GHC.Internal.Types.Bool, ringBell :: GHC.Internal.Types.Bool, idleGCDelayTime :: RtsTime, doIdleGC :: GHC.Internal.Types.Bool, ===================================== testsuite/tests/interface-stability/ghc-experimental-exports.stdout-mingw32 ===================================== @@ -6418,7 +6418,6 @@ module GHC.RTS.Flags.Experimental where squeezeUpdFrames :: GHC.Internal.Types.Bool, compact :: GHC.Internal.Types.Bool, compactThreshold :: GHC.Internal.Types.Double, - sweep :: GHC.Internal.Types.Bool, ringBell :: GHC.Internal.Types.Bool, idleGCDelayTime :: RtsTime, doIdleGC :: GHC.Internal.Types.Bool, ===================================== testsuite/tests/linters/Makefile ===================================== @@ -90,8 +90,6 @@ whitespace: rts/sm/MarkStack.h\ rts/sm/MarkWeak.h\ rts/sm/Scav.h\ - rts/sm/Sweep.c\ - rts/sm/Sweep.h\ rts/win32/veh_excn.h\ utils/genprimopcode/Parser.y\ utils/genprimopcode/Syntax.hs\ View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/62caed2b2014879be6855d273256bec… -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/62caed2b2014879be6855d273256bec… You're receiving this email because of your account on gitlab.haskell.org.
1 0
0 0
[Git][ghc/ghc][wip/sm-no-sweep] rts: drop the legacy mark-region oldest generation collector
by Cheng Shao (@TerrorJack) 19 Jan '26

19 Jan '26
Cheng Shao pushed to branch wip/sm-no-sweep at Glasgow Haskell Compiler / GHC Commits: 49b263ba by Cheng Shao at 2026-01-19T19:27:42+01:00 rts: drop the legacy mark-region oldest generation collector This patch drops the legacy mark-region oldest generation collector from the RTS, which performs simple mark-and-sweep in the oldest generation's old blocks, checking their bitmap and freeing the blocks that contain no live closure; any old block that contains live closure is retained, and is suspectible to fragmentation. It was added as an experiment in 2008 (https://mail.haskell.org/pipermail/cvs-ghc/2008-June/043146.html) has not seen much changes over the years, does not work with heap census, is completely untested in CI, and doesn't seem to be really used by anyone in production. Keeping it in the RTS codebase also causes a slight confusion in terminology, since the term "sweep" can refer to both the legacy code path as well as the nonmoving sweep logic. This motivates the cleanup. Closes #26802. - - - - - 15 changed files: - docs/users_guide/runtime_control.rst - libraries/base/src/GHC/RTS/Flags.hs - libraries/ghc-internal/src/GHC/Internal/RTS/Flags.hsc - rts/RtsFlags.c - rts/include/rts/Flags.h - rts/include/rts/storage/Block.h - rts/rts.cabal - rts/sm/GC.c - rts/sm/Sanity.c - rts/sm/Storage.c - − rts/sm/Sweep.c - − rts/sm/Sweep.h - testsuite/tests/interface-stability/ghc-experimental-exports.stdout - testsuite/tests/interface-stability/ghc-experimental-exports.stdout-mingw32 - testsuite/tests/linters/Makefile Changes: ===================================== docs/users_guide/runtime_control.rst ===================================== @@ -449,18 +449,6 @@ performance. Large values are likely to lead to diminishing returns as , in practice, the Haskell heap tends to be dominated by small objects. - -.. rts-flag:: -w - - :default: off - :since: a long time ago - :reverse: none - - Uses a mark-region garbage collection strategy for the oldest-generation heap. - Note that this cannot be used in conjunction with heap profiling - (:rts-flag:`-hT`) unless linked against the profiling runtime system with - :ghc-flag:`-prof`. - .. rts-flag:: -A ⟨size⟩ :default: 4MB ===================================== libraries/base/src/GHC/RTS/Flags.hs ===================================== @@ -107,7 +107,8 @@ data GCFlags = GCFlags , compact :: Bool -- ^ True <=> "compact all the time" , compactThreshold :: Double , sweep :: Bool - -- ^ use "mostly mark-sweep" instead of copying for the oldest generation + -- ^ Always 'False', refers to the legacy mark-and-sweep + -- collector (@+RTS -w@) that's now removed , ringBell :: Bool , idleGCDelayTime :: RtsTime , doIdleGC :: Bool ===================================== libraries/ghc-internal/src/GHC/Internal/RTS/Flags.hsc ===================================== @@ -126,8 +126,6 @@ data GCFlags = GCFlags , squeezeUpdFrames :: Bool , compact :: Bool -- ^ True <=> "compact all the time" , compactThreshold :: Double - , sweep :: Bool - -- ^ use "mostly mark-sweep" instead of copying for the oldest generation , ringBell :: Bool , idleGCDelayTime :: RtsTime , doIdleGC :: Bool @@ -472,8 +470,6 @@ getGCFlags = do <*> (toBool <$> (#{peek GC_FLAGS, compact} ptr :: IO CBool)) <*> #{peek GC_FLAGS, compactThreshold} ptr - <*> (toBool <$> - (#{peek GC_FLAGS, sweep} ptr :: IO CBool)) <*> (toBool <$> (#{peek GC_FLAGS, ringBell} ptr :: IO CBool)) <*> #{peek GC_FLAGS, idleGCDelayTime} ptr ===================================== rts/RtsFlags.c ===================================== @@ -170,7 +170,6 @@ void initRtsFlagsDefaults(void) RtsFlags.GcFlags.squeezeUpdFrames = true; RtsFlags.GcFlags.compact = false; RtsFlags.GcFlags.compactThreshold = 30.0; - RtsFlags.GcFlags.sweep = false; RtsFlags.GcFlags.idleGCDelayTime = USToTime(300000); // 300ms RtsFlags.GcFlags.interIdleGCWait = 0; #if defined(THREADED_RTS) @@ -361,7 +360,6 @@ usage_text[] = { " -M (default: 30%)", " -c Use in-place compaction for all oldest generation collections", " (the default is to use copying)", -" -w Use mark-region for the oldest generation (experimental)", #if defined(THREADED_RTS) " -I<sec> Perform full GC after <sec> idle time (default: 0.3, 0 == off)", " -Iw<sec> Minimum wait time between idle GC runs (default: 0, 0 == no min wait time)", @@ -1266,12 +1264,6 @@ error = true; } break; - case 'w': - OPTION_UNSAFE; - RtsFlags.GcFlags.sweep = true; - unchecked_arg_start++; - goto check_rest; - case 'F': OPTION_UNSAFE; switch(rts_argv[arg][2]) { @@ -2019,16 +2011,6 @@ static void normaliseRtsOpts (void) barf("The non-moving collector doesn't support -G1"); } -#if !defined(PROFILING) && !defined(DEBUG) - // The mark-region collector is incompatible with heap census unless - // we zero slop of blackhole'd thunks, which doesn't happen in the - // vanilla way. See #9666. - if (RtsFlags.ProfFlags.doHeapProfile && RtsFlags.GcFlags.sweep) { - barf("The mark-region collector can only be used with profiling\n" - "when linked against the profiled RTS."); - } -#endif - if (RtsFlags.GcFlags.compact && RtsFlags.GcFlags.useNonmoving) { errorBelch("The non-moving collector cannot be used in conjunction with\n" "the compacting collector."); ===================================== rts/include/rts/Flags.h ===================================== @@ -61,8 +61,6 @@ typedef struct _GC_FLAGS { bool compact; /* True <=> "compact all the time" */ double compactThreshold; - bool sweep; /* use "mostly mark-sweep" instead of copying - * for the oldest generation */ bool ringBell; Time idleGCDelayTime; /* units: TIME_RESOLUTION */ ===================================== rts/include/rts/storage/Block.h ===================================== @@ -168,8 +168,6 @@ typedef struct bdescr_ { #define BF_FRAGMENTED 64 /* we know about this block (for finding leaks) */ #define BF_KNOWN 128 -/* Block was swept in the last generation */ -#define BF_SWEPT 256 /* Block is part of a Compact */ #define BF_COMPACT 512 /* A non-moving allocator segment (see NonMoving.c) */ ===================================== rts/rts.cabal ===================================== @@ -528,7 +528,6 @@ library sm/Scav.c sm/Scav_thr.c sm/Storage.c - sm/Sweep.c fs.c prim/atomic.c prim/bitrev.c ===================================== rts/sm/GC.c ===================================== @@ -26,7 +26,6 @@ #include "MarkStack.h" #include "MarkWeak.h" #include "Sparks.h" -#include "Sweep.h" #include "Arena.h" #include "Storage.h" @@ -384,7 +383,7 @@ GarbageCollect (struct GcConfig config, #if defined(THREADED_RTS) /* How many threads will be participating in this GC? - * We don't always parallelise minor GCs, or mark/compact/sweep GC. + * We don't always parallelise minor GCs, or mark/compact GC. * The policy on when to do a parallel GC is controlled by RTS flags (see * below) @@ -602,14 +601,11 @@ GarbageCollect (struct GcConfig config, // NO MORE EVACUATION AFTER THIS POINT! - // Finally: compact or sweep the oldest generation. + // Finally: compact the oldest generation. if (major_gc && oldest_gen->mark) { - if (oldest_gen->compact) compact(gct->scavenged_static_objects, &dead_weak_ptr_list, &resurrected_threads); - else - sweep(oldest_gen); } copied = 0; @@ -1792,10 +1788,6 @@ prepare_collected_gen (generation *gen) if (!(bd->flags & BF_FRAGMENTED)) { bd->flags |= BF_MARKED; } - - // BF_SWEPT should be marked only for blocks that are being - // collected in sweep() - bd->flags &= ~BF_SWEPT; } } } @@ -2025,10 +2017,6 @@ resizeGenerations (void) // debugBelch("compaction: off\n", live); } - if (RtsFlags.GcFlags.sweep) { - oldest_gen->mark = 1; - } - // if we're going to go over the maximum heap size, reduce the // size of the generations accordingly. The calculation is // different if compaction is turned on, because we don't need ===================================== rts/sm/Sanity.c ===================================== @@ -597,7 +597,6 @@ checkClosure( const StgClosure* p ) void checkHeapChain (bdescr *bd) { for (; bd != NULL; bd = bd->link) { - if(!(bd->flags & BF_SWEPT)) { StgPtr p = bd->start; while (p < bd->free) { uint32_t size = checkClosure((StgClosure *)p); @@ -609,7 +608,6 @@ void checkHeapChain (bdescr *bd) while (p < bd->free && (*p < 0x1000 || !LOOKS_LIKE_INFO_PTR(*p))) { p++; } } - } } } ===================================== rts/sm/Storage.c ===================================== @@ -226,13 +226,12 @@ initStorage (void) nonmovingInit(); /* The oldest generation has one step. */ - if (RtsFlags.GcFlags.compact || RtsFlags.GcFlags.sweep) { + if (RtsFlags.GcFlags.compact) { if (RtsFlags.GcFlags.generations == 1) { errorBelch("WARNING: compact/sweep is incompatible with -G1; disabled"); } else { oldest_gen->mark = 1; - if (RtsFlags.GcFlags.compact) - oldest_gen->compact = 1; + oldest_gen->compact = 1; } } ===================================== rts/sm/Sweep.c deleted ===================================== @@ -1,86 +0,0 @@ -/* ----------------------------------------------------------------------------- - * - * (c) The GHC Team 2008 - * - * Simple mark/sweep, collecting whole blocks. - * - * Documentation on the architecture of the Garbage Collector can be - * found in the online commentary: - * - * https://gitlab.haskell.org/ghc/ghc/wikis/commentary/rts/storage/gc - * - * ---------------------------------------------------------------------------*/ - -#include "rts/PosixSource.h" -#include "Rts.h" - -#include "BlockAlloc.h" -#include "Sweep.h" -#include "Trace.h" - -void -sweep(generation *gen) -{ - bdescr *bd, *prev, *next; - uint32_t i; - W_ freed, resid, fragd, blocks, live; - - ASSERT(countBlocks(gen->old_blocks) == gen->n_old_blocks); - - live = 0; // estimate of live data in this gen - freed = 0; - fragd = 0; - blocks = 0; - prev = NULL; - for (bd = gen->old_blocks; bd != NULL; bd = next) - { - next = bd->link; - - if (!(bd->flags & BF_MARKED)) { - prev = bd; - continue; - } - - blocks++; - resid = 0; - for (i = 0; i < BLOCK_SIZE_W / BITS_IN(W_); i++) - { - if (bd->u.bitmap[i] != 0) resid++; - } - live += resid * BITS_IN(W_); - - if (resid == 0) - { - freed++; - gen->n_old_blocks--; - if (prev == NULL) { - gen->old_blocks = next; - } else { - prev->link = next; - } - freeGroup(bd); - } - else - { - prev = bd; - if (resid < (BLOCK_SIZE_W * 3) / (BITS_IN(W_) * 4)) { - fragd++; - bd->flags |= BF_FRAGMENTED; - } - - bd->flags |= BF_SWEPT; - } - } - - gen->live_estimate = live; - - debugTrace(DEBUG_gc, "sweeping: %d blocks, %d were copied, %d freed (%d%%), %d are fragmented, live estimate: %ld%%", - gen->n_old_blocks + freed, - gen->n_old_blocks - blocks + freed, - freed, - blocks == 0 ? 0 : (freed * 100) / blocks, - fragd, - (unsigned long)((blocks - freed) == 0 ? 0 : ((live / BLOCK_SIZE_W) * 100) / (blocks - freed))); - - ASSERT(countBlocks(gen->old_blocks) == gen->n_old_blocks); -} ===================================== rts/sm/Sweep.h deleted ===================================== @@ -1,16 +0,0 @@ -/* ----------------------------------------------------------------------------- - * - * (c) The GHC Team 2008 - * - * Simple mark/sweep, collecting whole blocks. - * - * Documentation on the architecture of the Garbage Collector can be - * found in the online commentary: - * - * https://gitlab.haskell.org/ghc/ghc/wikis/commentary/rts/storage/gc - * - * ---------------------------------------------------------------------------*/ - -#pragma once - -RTS_PRIVATE void sweep(generation *gen); ===================================== testsuite/tests/interface-stability/ghc-experimental-exports.stdout ===================================== @@ -6415,7 +6415,6 @@ module GHC.RTS.Flags.Experimental where squeezeUpdFrames :: GHC.Internal.Types.Bool, compact :: GHC.Internal.Types.Bool, compactThreshold :: GHC.Internal.Types.Double, - sweep :: GHC.Internal.Types.Bool, ringBell :: GHC.Internal.Types.Bool, idleGCDelayTime :: RtsTime, doIdleGC :: GHC.Internal.Types.Bool, ===================================== testsuite/tests/interface-stability/ghc-experimental-exports.stdout-mingw32 ===================================== @@ -6418,7 +6418,6 @@ module GHC.RTS.Flags.Experimental where squeezeUpdFrames :: GHC.Internal.Types.Bool, compact :: GHC.Internal.Types.Bool, compactThreshold :: GHC.Internal.Types.Double, - sweep :: GHC.Internal.Types.Bool, ringBell :: GHC.Internal.Types.Bool, idleGCDelayTime :: RtsTime, doIdleGC :: GHC.Internal.Types.Bool, ===================================== testsuite/tests/linters/Makefile ===================================== @@ -90,8 +90,6 @@ whitespace: rts/sm/MarkStack.h\ rts/sm/MarkWeak.h\ rts/sm/Scav.h\ - rts/sm/Sweep.c\ - rts/sm/Sweep.h\ rts/win32/veh_excn.h\ utils/genprimopcode/Parser.y\ utils/genprimopcode/Syntax.hs\ View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/49b263ba08212e1cc0c3798b6f1dbd6… -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/49b263ba08212e1cc0c3798b6f1dbd6… You're receiving this email because of your account on gitlab.haskell.org.
1 0
0 0
[Git][ghc/ghc][wip/sm-no-sweep] 87 commits: [#26183] Associated Type Iface Fix
by Cheng Shao (@TerrorJack) 19 Jan '26

19 Jan '26
Cheng Shao pushed to branch wip/sm-no-sweep at Glasgow Haskell Compiler / GHC Commits: 8a317b6f by Aaron Allen at 2026-01-01T03:05:15-05:00 [#26183] Associated Type Iface Fix When determining "extras" for class decl interface entries, axioms for the associated types need to included so that dependent modules will be recompiled if those axioms change. resolves #26183 - - - - - ae1aeaab by Cheng Shao at 2026-01-01T03:06:32-05:00 testsuite: run numeric tests with optasm when available This patch adds the `optasm` extra way to nueric tests when NCG is available. Some numeric bugs only surface with optimization, omitting this can hide these bugs and even make them slip into release! (e.g. #26711) - - - - - 6213bb57 by maralorn at 2026-01-02T16:30:32+01:00 GHC.Internal.Exception.Context: Fix comment on addExceptionAnnotation - - - - - b820ff50 by Janis Voigtlaender at 2026-01-05T02:43:18-05:00 GHC.Internal.Control.Monad.replicateM: Fix comment - - - - - a8a94aad by Cheng Shao at 2026-01-05T16:24:04-05:00 hadrian: drops unused PE linker script for windows This patch drops unused PE linker script for windows in the `MergeObjects` builder of hadrian. The linker script is used for merging object files into a single `HS*.o` object file and undoing the effect of split sections, when building the "ghci library" object file. However, we don't build the ghci library on windows, and this code path is actually unreachable. - - - - - 53038ea9 by Cheng Shao at 2026-01-05T16:24:04-05:00 hadrian: drop unused logic for building ghci libraries This patch drops the unused logic for building ghci libraries in hadrian: - The term "ghci library" refers to an optional object file per library `HS*.o`, which is merged from multiple object files in that library using the `MergeObjects` builder in hadrian. - The original rationale of having a ghci library object, in addition to normal archives, was to speedup ghci loading, since the combined object is linked with a linker script to undo the effects of `-fsplit-sections` to reduce section count and make it easier for the RTS linker to handle. - However, most GHC builds enable `dynamicGhcPrograms` by default, in such cases the ghci library would already not be built. - `dynamicGhcPrograms` is disabled on Windows, but still we don't build the ghci library due to lack of functioning merge objects command. - The only case that we actually build ghci library objects, are alpine fully static bindists. However, for other reasons, split sections is already disabled for fully static builds anyway! - There will not be any regression if the ghci library objects are absent from a GHC global libdir when `dynamicGhcPrograms` is disabled. The RTS linker can already load the archives without any issue. Hence the removal. We now forcibly disable ghci libraries for all Cabal components, and rip out all logic related to `MergeObjects` and ghci libraries in hadrian. This also nicely cleans up some old todos and fixmes that are no longer relevant. Note that MergeObjects in hadrian is not the same thing as merge objects in the GHC driver. The latter is not affected by this patch. ------------------------- Metric Decrease: libdir ------------------------- Co-authored-by: Codex <codex(a)openai.com> - - - - - 8f209336 by Simon Jakobi at 2026-01-05T16:24:48-05:00 User's guide: Fix link to language extensions Instead of linking to haddocks, it seemed more useful to link to the extension overview in the user's guide. Closes #26614. - - - - - 0b7df6db by Simon Peyton Jones at 2026-01-06T09:32:23-05:00 Improved fundeps for closed type families The big payload of this commit is to execute the plan suggested in #23162, by improving the way that we generate functional dependencies for closed type families. It is all described in Note [Exploiting closed type families] Most of the changes are in GHC.Tc.Solver.FunDeps Other small changes * GHC.Tc.Solver.bumpReductionDepth. This function brings together the code that * Bumps the depth * Checks for overflow Previously the two were separated, sometimes quite widely. * GHC.Core.Unify.niFixSubst: minor improvement, removing an unnecessary itraetion in the base case. * GHC.Core.Unify: no need to pass an InScopeSet to tcUnifyTysForInjectivity. It can calculate one for itself; and it is never inspected anyway so it's free to do so. * GHC.Tc.Errors.Ppr: slight impovement to the error message for reduction-stack overflow, when a constraint (rather than a type) is involved. * GHC.Tc.Solver.Monad.wrapUnifier: small change to the API - - - - - fde8bd88 by Simon Peyton Jones at 2026-01-06T09:32:23-05:00 Add missing (KK4) to kick-out criteria There was a missing case in kick-out that meant we could fail to solve an eminently-solvable constraint. See the new notes about (KK4) - - - - - 00082844 by Simon Peyton Jones at 2026-01-06T09:32:23-05:00 Some small refactorings of error reporting in the typechecker This is just a tidy-up commit. * Add ei_insoluble to ErrorItem, to cache insolubility. Small tidy-up. * Remove `is_ip` and `mkIPErr` from GHC.Tc.Errors; instead enhance mkDictErr to handle implicit parameters. Small refactor. - - - - - fe4cb252 by Simon Peyton Jones at 2026-01-06T09:32:24-05:00 Improve recording of insolubility for fundeps This commit addresses #22652, by recording when the fundeps for a constraint are definitely insoluble. That in turn improves the perspicacity of the pattern-match overlap checker. See Note [Insoluble fundeps] - - - - - df0ffaa5 by Simon Peyton Jones at 2026-01-06T09:32:24-05:00 Fix a buglet in niFixSubst The MR of which this is part failed an assertion check extendTvSubst because we extended the TvSubst with a CoVar. Boo. This tiny patch fixes it, and adds the regression test from #13882 that showed it up. - - - - - 3d6aba77 by konsumlamm at 2026-01-06T09:33:16-05:00 Fix changelog formatting - - - - - 69e0ab59 by Cheng Shao at 2026-01-06T19:37:56-05:00 compiler: add targetHasRTSWays function This commit adds a `targetHasRTSWays` util function in `GHC.Driver.Session` to query if the target RTS has a given Ways (e.g. WayThreaded). - - - - - 25a0ab94 by Cheng Shao at 2026-01-06T19:37:56-05:00 compiler: link on-demand external interpreter with threaded RTS This commit makes the compiler link the on-demand external interpreter program with threaded RTS if it is available in the target RTS ways. This is a better default than the previous single-threaded RTS, and it enables the external interpreter to benefit from parallelism when deserializing CreateBCOs messages. - - - - - 92404a2b by Cheng Shao at 2026-01-06T19:37:56-05:00 hadrian: link iserv with threaded RTS This commit makes hadrian link iserv with threaded RTS if it's available in the RTS ways. Also cleans up the iserv main C program which can be replaced by the `-fkeep-cafs` link-time option. - - - - - a20542d2 by Cheng Shao at 2026-01-06T19:38:38-05:00 ghc-internal: remove unused GMP macros This patch removes unused GMP related macros from `ghc-internal`. The in-tree GMP version was hard coded and outdated, but it was not used anywhere anyway. - - - - - 4079dcd6 by Cheng Shao at 2026-01-06T19:38:38-05:00 hadrian: fix in-tree gmp configure error on newer c compilers Building in-tree gmp on newer c compilers that default to c23 fails at configure stage, this patch fixes it, see added comment for explanation. - - - - - 414d1fe1 by Cheng Shao at 2026-01-06T19:39:20-05:00 compiler: fix LLVM backend pdep/pext handling for i386 target This patch fixes LLVM backend's pdep/pext handling for i386 target, and also removes non-existent 128/256/512 bit hs_pdep/hs_pext callees. See amended note for more explanation. Fixes #26450. Co-authored-by: Codex <codex(a)openai.com> - - - - - c7f6fba3 by Cheng Shao at 2026-01-06T19:39:20-05:00 ci: remove allow_failure flag for i386 alpine job The LLVM codegen issue for i386 has been fixed, and the i386 alpine job should pass now. This commit removes the allow_failure flag so that other i386 regressions in the future are signaled more timely. - - - - - 52d00c05 by Simon Peyton Jones at 2026-01-07T10:24:21-05:00 Add missing InVar->OutVar lookup in SetLevels As #26681 showed, the SetLevels pass was failing to map an InVar to an OutVar. Very silly! I'm amazed it hasn't broken before now. I have improved the type singatures (to mention InVar and OutVar) so it's more obvious what needs to happen. - - - - - ab0a5594 by Cheng Shao at 2026-01-07T10:25:04-05:00 hadrian: drop deprecated pkgHashSplitObjs code path This patch drops deprecated `pkgHashSplitObjs` code path from hadrian, since GHC itself has removed split objs support many versions ago and this code path is unused. - - - - - bb3a2ba1 by Cheng Shao at 2026-01-07T10:25:44-05:00 hadrian: remove linting/assertion in quick-validate flavour The `quick-validate` flavour is meant for testing ghc and passing the testsuite locally with similar settings to `validate` but faster. This patch removes the linting/assertion overhead in `quick-validate` to improve developer experience. I also took the chance to simplify redundant logic of rts/library way definition in `validate` flavour. - - - - - 7971f5dd by Cheng Shao at 2026-01-07T10:26:26-05:00 deriveConstants: clean up unused constants This patch cleans up unused constants from `deriveConstants`, they are not used by C/Cmm code in the RTS, nor compiler-generated code. Co-authored-by: Codex <codex(a)openai.com> - - - - - 4df96993 by Cheng Shao at 2026-01-07T10:27:08-05:00 hadrian: pass -fno-omit-frame-pointer with +debug_info This patch adds `-fno-omit-frame-pointer` as C/C++ compilation flag when compiling with `+debug_info` flavour transformer. It's a sane default when you care about debugging and reliable backtraces, and makes debugging/profiling with bpf easier. - - - - - 8a3900a3 by Aaron Allen at 2026-01-07T10:27:57-05:00 [26705] Include TyCl instances in data fam iface entry Ensures dependent modules are recompiled when the class instances for a data family instance change. resolves #26705 - - - - - a0b980af by Cheng Shao at 2026-01-07T10:28:38-05:00 hadrian: remove unused Hp2Ps/Hpc builders This patch removes the Hp2Ps/Hpc builders from hadrian, they are unused in the build system. Note that the hp2ps/hpc programs are still built and not affected. - - - - - 50a58757 by Cheng Shao at 2026-01-07T10:29:20-05:00 hadrian: only install js files to libdir for wasm/js targets There are certain js files required for wasm/js targets to work, and previously hadrian would install those js files to libdir unconditionally on other targets as well. This could be a minor annoyance for packagers especially when the unused js files contain shebangs that interfere with the packaging process. This patch makes hadrian only selectively install the right js files for the right targets. Co-authored-by: Codex <codex(a)openai.com> - - - - - da40e553 by Simon Peyton Jones at 2026-01-07T10:30:00-05:00 Add flavour transformer assertions_stage1 This allows us to enable -DDEBUG assertions in the stage1 compiler - - - - - ec3cf767 by Cheng Shao at 2026-01-08T06:24:31-05:00 make: remove unused Makefiles from legacy make build system This patch removes unused Makefiles from legacy make build system; now they are never used by hadrian in any way, and they already include common boilerplate mk files that are long gone in the make build system removal, hence the housecleaning. Co-authored-by: Codex <codex(a)openai.com> - - - - - 04ea3f83 by Cheng Shao at 2026-01-08T06:25:13-05:00 compiler: use -O3 as LLVM optimization level for ghc -O2 The GHC driver clamps LLVM optimization level to `-O2` due to LLVM crashes, but those were historical issues many years ago that are no longer relevant for LLVM versions we support today. This patch changes the driver to use `-O3` as LLVM optimization level when compiling with `-O2`, which is a better default when we're willing to trade compilation time for faster generated code. - - - - - 472df471 by Peter Trommler at 2026-01-08T13:28:54-05:00 Use half-word literals in info tables With this commit info tables are mapped to the same assembler code on big-endian and little-endian platforms. Fixes #26579. - - - - - 393f9c51 by Simon Peyton Jones at 2026-01-08T13:29:35-05:00 Refactor srutOkForBinderSwap This MR does a small refactor: * Moves `scrutOkForBinderSwap` and `BinderSwapDecision` to GHC.Core.Utils * Inverts the sense of the coercion it returns, which makes more sense No effect on behaviour - - - - - ad76fb0f by Simon Peyton Jones at 2026-01-08T13:29:36-05:00 Improve case merging This small MR makes case merging happen a bit more often than it otherwise could, by getting join points out of the way. See #26709 and GHC.Core.Utils Note [Floating join points out of DEFAULT alternatives] - - - - - 4c9395f5 by Cheng Shao at 2026-01-08T13:30:16-05:00 hadrian: remove broken hsc2hs flag when cross compiling to windows This patch removes the `--via-asm` hsc2hs flag when cross compiling to windows. With recent llvm-mingw toolchain, it would fail with: ``` x86_64-w64-mingw32-hsc2hs: Cannot combine instructions: [Quad 8,Long 4,Long 241,Ref ".Ltmp1-.Ltmp0"] ``` The hsc2hs default `--cross-compile` logic is slower but works. - - - - - 71fdef55 by Simon Peyton Jones at 2026-01-08T13:30:57-05:00 Try harder to keep the substitution empty Avoid unnecessary cloning of variables in the Simplifier. Addresses #26724, See Note [Keeping the substitution empty] We get some big wins in compile time Metrics: compile_time/bytes allocated ------------------------------------- Baseline Test Metric value New value Change ---------------------------------------------------------------------------- CoOpt_Singletons(normal) ghc/alloc 721,544,088 692,174,216 -4.1% GOOD LargeRecord(normal) ghc/alloc 1,268,031,157 1,265,168,448 -0.2% T14766(normal) ghc/alloc 918,218,533 688,432,296 -25.0% GOOD T15703(normal) ghc/alloc 318,103,629 306,638,016 -3.6% GOOD T17836(normal) ghc/alloc 419,174,584 418,400,824 -0.2% T18478(normal) ghc/alloc 471,042,976 470,261,376 -0.2% T20261(normal) ghc/alloc 573,387,162 563,663,336 -1.7% T24984(normal) ghc/alloc 87,832,666 87,636,168 -0.2% T25196(optasm) ghc/alloc 1,103,284,040 1,101,376,992 -0.2% hard_hole_fits(normal) ghc/alloc 224,981,413 224,608,208 -0.2% geo. mean -0.3% minimum -25.0% maximum +0.1% Metric Decrease: CoOpt_Singletons T14766 T15703 - - - - - 30341168 by Simon Peyton Jones at 2026-01-08T13:31:38-05:00 Add regression test for #24867 - - - - - 1ac1a541 by Julian Ospald at 2026-01-09T02:48:53-05:00 Support statically linking executables properly Fixes #26434 In detail, this does a number of things: * Makes GHC aware of 'extra-libraries-static' (this changes the package database format). * Adds a switch '-static-external' that will honour 'extra-libraries-static' to link external system dependencies statically. * Adds a new field to settings/targets: "ld supports verbatim namespace". This field is used by '-static-external' to conditionally use '-l:foo.a' syntax during linking, which is more robust than trying to find the absolute path to an archive on our own. * Adds a switch '-fully-static' that is meant as a high-level interface for e.g. cabal. This also honours 'extra-libraries-static'. This also attempts to clean up the confusion around library search directories. At the moment, we have 3 types of directories in the package database format: * library-dirs * library-dirs-static * dynamic-library-dirs However, we only have two types of linking: dynamic or static. Given the existing logic in 'mungeDynLibFields', this patch assumes that 'library-dirs' is really just nothing but a fallback and always prefers the more specific variants if they exist and are non-empty. Conceptually, we should be ok with even just one search dirs variant. Haskell libraries are named differently depending on whether they're static or dynamic, so GHC can conveniently pick the right one depending on the linking needs. That means we don't really need to play tricks with search paths to convince the compiler to do linking as we want it. For system C libraries, the convention has been anyway to place static and dynamic libs next to each other, so we need to deal with that issue anyway and it is outside of our control. But this is out of the scope of this patch. This patch is backwards compatible with cabal. Cabal should however be patched to use the new '-fully-static' switch. - - - - - ad3c808d by Julian Ospald at 2026-01-09T02:48:53-05:00 Warn when "-dynamic" is mixed with "-staticlib" - - - - - 322dd672 by Matthew Pickering at 2026-01-09T02:49:35-05:00 rts: Use INFO_TABLE_CONSTR for stg_dummy_ret_closure Since the closure type is CONSTR_NOCAF, we need to use INFO_TABLE_CONSTR to populate the constructor description field (this crashes ghc-debug when decoding AP_STACK frames sometimes) Fixes #26745 - - - - - 039bac4c by Ben Gamari at 2026-01-09T20:22:16-05:00 ghc-internal: Move STM utilities out of GHC.Internal.Conc.Sync This is necessary to avoid an import cycle on Windows when importing `GHC.Internal.Exception.Context` in `GHC.Internal.Conc.Sync`. On the road to address #25365. - - - - - 8c389e8c by Ben Gamari at 2026-01-09T20:22:16-05:00 base: Capture backtrace from throwSTM Implements core-libraries-committee#297. Fixes #25365. - - - - - e1ce1fc3 by Ben Gamari at 2026-01-09T20:22:16-05:00 base: Annotate rethrown exceptions in catchSTM with WhileHandling Implements core-libraries-committee#298 - - - - - c4ebdbdf by Cheng Shao at 2026-01-09T20:23:06-05:00 compiler: make getPrim eagerly evaluate its result This commit makes `GHC.Utils.Binary.getPrim` eagerly evaluate its result, to avoid accidental laziness when future patches build other binary parsers using `getPrim`. - - - - - 66a0c4f7 by Cheng Shao at 2026-01-09T20:23:06-05:00 compiler: implement fast get/put for Word16/Word32/Word64 Previously, `GHC.Utils.Binary` contains `get`/`put` functions for `Word16`/`Word32`/`Word64` which always loads and stores them as big-endian words at a potentially unaligned address. The previous implementation is based on loads/stores of individual bytes and concatenating bytes with bitwise operations, which currently cannot be fused to a single load/store operation by GHC. This patch implements fast `get`/`put` functions for `Word16`/`Word32`/`Word64` based on a single memory load/store, with an additional `byteSwap` operation on little-endian hosts. It is based on unaligned load/store primops added since GHC 9.10, and we already require booting with at least 9.10, so it's about time to switch to this faster path. - - - - - 641ec3f0 by Simon Peyton Jones at 2026-01-09T20:23:55-05:00 Fix scoping errors in specialisation Using -fspecialise-aggressively in #26682 showed up a couple of subtle errors in the type-class specialiser. * dumpBindUDs failed to call `deleteCallsMentioning`, resulting in a call that mentioned a dictionary that was not in scope. This call has been missing since 2009! commit c43c981705ec33da92a9ce91eb90f2ecf00be9fe Author: Simon Peyton Jones <simonpj(a)microsoft.com> Date: Fri Oct 23 16:15:51 2009 +0000 Fixed by re-combining `dumpBindUDs` and `dumpUDs`. * I think there was another bug involving the quantified type variables in polymorphic specialisation. In any case I refactored `specHeader` and `spec_call` so that the former looks for the extra quantified type variables rather than the latter. This is quite a worthwhile simplification: less code, easier to grok. Test case in simplCore/should_compile/T26682, brilliantly minimised by @sheaf. - - - - - 2433e91d by Cheng Shao at 2026-01-09T20:24:43-05:00 compiler: change sectionProtection to take SectionType argument This commit changes `sectionProtection` to only take `SectionType` argument instead of whole `Section`, since it doesn't need the Cmm section content anyway, and it can then be called in parts of NCG where we only have a `SectionType` in scope. - - - - - e5926fbe by Cheng Shao at 2026-01-09T20:24:43-05:00 compiler: change isInitOrFiniSection to take SectionType argument This commit changes `isInitOrFiniSection` to only take `SectionType` argument instead of whole `Section`, since it doesn't need the Cmm section content anyway, and it can then be called in parts of NCG where we only have a `SectionType` in scope. Also marks it as exported. - - - - - 244d57d7 by Cheng Shao at 2026-01-09T20:24:43-05:00 compiler: fix split sections on windows This patch fixes split sections on windows by emitting the right COMDAT section header in NCG, see added comment for more explanation. Fix #26696 #26494. ------------------------- Metric Decrease: LargeRecord T9675 size_hello_artifact size_hello_artifact_gzip size_hello_unicode size_hello_unicode_gzip Metric Increase: T13035 ------------------------- Co-authored-by: Codex <codex(a)openai.com> - - - - - 182f3d0f by Cheng Shao at 2026-01-09T20:25:28-05:00 iserv: add comment about -fkeep-cafs - - - - - 49675b69 by Matthew Craven at 2026-01-09T20:26:14-05:00 Account for "stupid theta" in demand sig for DataCon wrappers Fixes #26748. - - - - - f3c18890 by Samuel Thibault at 2026-01-10T15:48:22+01:00 hurd: Fix getExecutablePath build 3939a8bf93e27 ("GNU/Hurd: Add getExecutablePath support") added using /proc/self/exe for GNU/Hurd but missed adding the required imports for the corresponding code. - - - - - 7f15bd15 by Samuel Thibault at 2026-01-12T07:16:25-05:00 Fix the OS string encoding for GNU/Hurd Following https://github.com/haskell/cabal/pull/9434/files , and as seen in the various gnu_HOST_OS usages in the source code, it is expected that GNU/Hurd is advertised as "gnu", like the autotools do. - - - - - 1db2f240 by Andrew Lelechenko at 2026-01-12T07:17:06-05:00 Add since annotation for Data.Bifoldable1 Fixes #26432 - - - - - e038a383 by Sven Tennie at 2026-01-12T07:17:49-05:00 Ignore Windows CI tool directories in Git Otherwise, we see thousands of changes in `git status` which is very confusing to work with. - - - - - 023c301c by sheaf at 2026-01-13T04:57:30-05:00 Don't re-use stack slots for growing registers This commit avoids re-using a stack slot for a register that has grown but already had a stack slot. For example, suppose we have stack slot assigments %v1 :: FF64 |-> StackSlot 0 %v2 :: FF64 |-> StackSlot 1 Later, we start using %v1 at a larger format (e.g. F64x2) and we need to spill it again. Then we **must not** use StackSlot 0, as a spill at format F64x2 would clobber the data in StackSlot 1. This can cause some fragmentation of the `StackMap`, but that's probably OK. Fixes #26668 - - - - - d0966e64 by fendor at 2026-01-13T04:58:11-05:00 Remove `traceId` from ghc-pkg executable - - - - - 20d7efec by Simon Peyton Jones at 2026-01-13T12:41:22-05:00 Make SpecContr rules fire a bit later See #26615 and Note [SpecConstr rule activation] - - - - - 8bc4eb8c by Andrew Lelechenko at 2026-01-13T12:42:03-05:00 Upgrade mtl submodule to 2.3.2 Fixes #26656 - - - - - c94aaacd by Cheng Shao at 2026-01-13T12:42:44-05:00 compiler: remove iserv and only use on-demand external interpreter This patch removes `iserv` from the tree completely. Hadrian would no longer build or distribute `iserv`, and the GHC driver would use the on-demand external interpreter by default when invoked with `-fexternal-interpreter`, without needing to specify `-pgmi ""`. This has multiple benefits: - It allows cleanup of a lot of legacy hacks in the hadrian codebase. - It paves the way for running cross ghc's iserv via cross emulator (#25523), fixing TH/ghci support for cross targets other than wasm/js. - - - - - c1fe0097 by Peter Trommler at 2026-01-14T03:54:49-05:00 PPC NCG: Fix shift right MO code The shift amount in shift right [arithmetic] MOs is machine word width. Therefore remove unnecessary zero- or sign-extending of shift amount. It looks harmless to extend the shift amount argument because the shift right instruction uses only the seven lowest bits (i. e. mod 128). But now we have a conversion operation from a smaller type to word width around a memory load at word width. The types are not matching up but there is no check done in CodeGen. The necessary conversion from word width down to the smaller width would be translated into a no-op on PowerPC anyway. So all seems harmless if it was not for a small optimisation in getRegister'. In getRegister' a load instruction with the smaller width of the conversion operation was generated. This loaded the most significant bits of the word in memory on a big-endian platform. These bits were zero and hence shift right was used with shift amount zero and not one as required in test Sized. Fixes #26519 - - - - - 2dafc65a by Cheng Shao at 2026-01-14T03:55:31-05:00 Tree-wide cleanup of cygwin logic GHC has not supported cygwin for quite a few years already, and will not resume support in the forseeable future. The only supported windows toolchain is clang64/clangarm64 of the msys2 project. This patch cleans up the unused cygwin logic in the tree. Co-authored-by: Codex <codex(a)openai.com> - - - - - 66b96e2a by Teo Camarasu at 2026-01-14T03:56:13-05:00 Set default eventlog-flush-interval to 5s Resolves #26707 - - - - - d0254579 by Andrew Lelechenko at 2026-01-14T03:56:53-05:00 Document when -maxN RTS option was added - - - - - f25e2b12 by Cheng Shao at 2026-01-14T11:10:39-05:00 testsuite: remove obsolete --ci option from the testsuite driver This patch removes the obsolete `--ci` option from the testsuite driver: neither the CI scripts nor hadrian ever invokes the testsuite driver with `--ci`, and the perf notes are always fetched to the `refs/notes/perf` local reference anyway. - - - - - 7964763b by Julian Ospald at 2026-01-14T11:11:31-05:00 Fix fetch_cabal * download cabal if the existing one is of an older version * fix FreeBSD download url * fix unpacking on FreeBSD - - - - - 6b0129c1 by Julian Ospald at 2026-01-14T11:11:31-05:00 Bump toolchain in CI - - - - - 0f53ccc6 by Julian Ospald at 2026-01-14T11:11:31-05:00 Use libffi-clib Previously, we would build libffi via hadrian and bundle it manually with the GHC bindist. This now moves all that logic out of hadrian and allows us to have a clean Haskell package to build and link against and ship it without extra logic. This patch still retains the ability to link against a system libffi. The main reason of bundling libffi was that on some platforms (e.g. FreeBSD and Mac), system libffi is not visible to the C toolchain by default, so users would require settings in e.g. cabal to be able to compile anything. This adds the submodule libffi-clib to the repository. - - - - - 5e1cd595 by Peng Fan at 2026-01-14T11:12:26-05:00 NCG/LA64: add support for la664 micro architecture Add '-mla664' flag to LA664, which has some new features: atomic instructions, dbar hints, etc. 'LA464' is the default so that unrecognized instructions are not generated. - - - - - c56567ec by Simon Peyton Jones at 2026-01-15T23:19:04+00:00 Add evals for strict data-con args in worker-functions This fixes #26722, by adding an eval in a worker for arguments of strict data constructors, even if the function body uses them strictly. See (WIS1) in Note [Which Ids should be strictified] I took the opportunity to make substantial improvements in the documentation for call-by-value functions. See especially Note [CBV Function Ids: overview] in GHC.Types.Id.Info Note [Which Ids should be CBV candidates?] ditto Note [EPT enforcement] in GHC.Stg.EnforceEpt among others. - - - - - 9719ce5d by Simon Peyton Jones at 2026-01-15T23:19:04+00:00 Improve `interestingArg` This function analyses a function's argument to see if it is interesting enough to deserve an inlining discount. Improvements for * LitRubbish arguments * exprIsExpandable arguments See Note [Interesting arguments] which is substantially rewritten. - - - - - 7b616b9f by Cheng Shao at 2026-01-16T06:45:00-05:00 compiler: fix regression when compiling foreign stubs in the rts unit This patch fixes a regression when compiling foreign stubs in the rts unit introduced in 05e25647f72bc102061af3f20478aa72bff6ff6e. A simple revert would fix it, but it's better to implement a proper fix with comment for better understanding of the underlying problem, see the added comment for explanation. Co-authored-by: Codex <codex(a)openai.com> - - - - - c343ef64 by Sylvain Henry at 2026-01-16T06:45:51-05:00 base: remove GHC.JS.Prim.Internal.Build (#23432) See accepted CLC proposal https://github.com/haskell/core-libraries-committee/issues/329 - - - - - 29c0aceb by Simon Peyton Jones at 2026-01-16T17:18:11-05:00 Improve newtype unwrapping Ticket #26746 describes several relatively-minor shortcomings of newtype unwrapping. This MR addresses them, while also (arguably) simplifying the code a bit. See new Note [Solving newtype equalities: overview] and Note [Decomposing newtype equalities] and Note [Eager newtype decomposition] and Note [Even more eager newtype decomposition] For some reason, on Windows only, runtime allocations decrease for test T5205 (from 52k to 48k). I have not idea why. No change at all on Linux. I'm just going to accept the change. (I saw this same effect in another MR so I think it's a fault in the baseline.) Metric Decrease: T5205 - - - - - 8b59e62c by Andreas Klebinger at 2026-01-16T17:18:52-05:00 testsuite: Widen acceptance window for T5205. Fixes #26782 - - - - - 9e5e0234 by mangoiv at 2026-01-17T06:03:03-05:00 add a new issue template for getting verified To reduce spam created by new users, we will in future not grant any rights but reporting issues to new users. That is why we will have to be able to verify them. The added issue template serves that purpose. - - - - - b18b2c42 by Cheng Shao at 2026-01-17T06:03:44-05:00 llvm: fix split sections for llvm backend This patch fixes split sections for llvm backend: - Pass missing `--data-sections`/`--function-sections` flags to llc/opt. - Use `@llvm.compiler.used` instead of `@llvm.used` to avoid sections being unnecessarily retained at link-time. Fixes #26770. ------------------------- Metric Decrease: libdir size_hello_artifact size_hello_unicode ------------------------- Co-authored-by: Codex <codex(a)openai.com> - - - - - ebf66f67 by Cheng Shao at 2026-01-17T13:16:50-05:00 Update autoconf scripts Scripts taken from autoconf a2287c3041a3f2a204eb942e09c015eab00dc7dd - - - - - 598624b9 by Andreas Klebinger at 2026-01-17T13:17:32-05:00 CString.hs: Update incorrect comment. Fixes #26322 - - - - - eea2036b by Cheng Shao at 2026-01-18T10:00:49-05:00 libraries: bump haskeline submodule to 0.8.4.1 This patch bumps the haskeline submodule to 0.8.4.1 which includes an important fix for an ANSI handling bug on Windows (https://github.com/haskell/haskeline/pull/126) - - - - - 87d8f6c2 by Cheng Shao at 2026-01-18T10:01:30-05:00 hadrian: replace default -H32m/-H64m with -O64M to improve mutator productivity Most hadrian build flavours pass `-H32m`/`-H64m` to GHC as conventional wisdom to improve mutator productivity and reduce GC overhead. They were inherited from the legacy Make build system, and there used to be make flags to instrument a build process with `-Rghc-timing` option to collect GC stats of each GHC run from stderr. It's time to revisit whether there are better defaults for `-H32m`/`-H64m`, and this patch changes it to `-O64M` which indeed improves mutator productivity based on real statistics. `-O64M` is more aggressive than `-H64m`; it allows the old generation to grow to at least 64M before triggering major GC and reduces major GC runs. The stats of a clean build with `validate` flavour and `-H64m`: ``` h64m.log matched RTS stat lines: 5499 sum MUT cpu : 2400.808 s sum GC cpu : 1378.292 s sum MUT elapsed : 2788.253 s sum GC elapsed : 1389.233 s GC/MUT cpu ratio : 0.574 (GC is 57.4% of MUT) GC/MUT elapsed ratio : 0.498 (GC is 49.8% of MUT) GC fraction of (MUT+GC) cpu : 36.5% GC fraction of (MUT+GC) elapsed : 33.3% per-line GC/MUT cpu ratio: median 0.691, p90 1.777 per-line GC/MUT elapsed ratio: median 0.519, p90 1.081 ``` The stats of a clean build with `validate` flavour and `-O64M`: ``` o64m.log matched RTS stat lines: 5499 sum MUT cpu : 2377.383 s sum GC cpu : 1127.146 s sum MUT elapsed : 2758.857 s sum GC elapsed : 1135.587 s GC/MUT cpu ratio : 0.474 (GC is 47.4% of MUT) GC/MUT elapsed ratio : 0.412 (GC is 41.2% of MUT) GC fraction of (MUT+GC) cpu : 32.2% GC fraction of (MUT+GC) elapsed : 29.2% per-line GC/MUT cpu ratio: median 0.489, p90 1.099 per-line GC/MUT elapsed ratio: median 0.367, p90 0.806 ``` Mutator time is roughly in the same ballpark, but GC CPU time has reduced by 18.22%, and mutator productivity has increased from 63.5% to 67.8%. - - - - - 8372e13d by Cheng Shao at 2026-01-18T10:02:12-05:00 rts: remove unused .def files from rts/win32 This patch removes unused .def files from `rts/win32`, given we don't build .dll files for rts/ghc-internal/ghc-prim at all. Even when we resurrect win32 dll support at some point in the future, these .def files still contain incorrect symbols anyway and won't be of any use. - - - - - f6af485d by Cheng Shao at 2026-01-18T10:03:19-05:00 .gitmodules: use gitlab mirror for the libffi-clib submodule This patch fixes .gitmodules to use the gitlab mirror for the libffi-clib submodule, to make it coherent with other submodules that allow ghc developers to experiment with wip branches in submodules for ghc patches. Fixes #26783. - - - - - 41432d25 by Cheng Shao at 2026-01-18T10:05:13-05:00 hadrian: remove the horrible i386 speedHack When hadrian builds certain rts objects for i386, there's a horrible speedHack that forces -fno-PIC even for dynamic ways of those objects. This is not compatible with newer versions of gcc/binutils as well as clang/lld, and this patch removes it. Fixes #26792. - - - - - 323eb8f0 by Cheng Shao at 2026-01-18T21:48:19-05:00 hadrian: enable split sections for cross stage0 This patch fixes a minor issue with `splitSectionsArgs` in hadrian: previously, it's unconditionally disabled for stage0 libraries because it's not going to be shipped in the final bindists. But it's only true when not cross compiling. So for now we also need to enable it for cross stage0 as well. - - - - - 3fadfefe by Andreas Klebinger at 2026-01-18T21:49:01-05:00 RTS: Document -K behaviour better - - - - - e0485920 by Cheng Shao at 2026-01-19T19:21:48+01:00 rts: drop the legacy mark-region oldest generation collector This patch drops the legacy mark-region oldest generation collector from the RTS, which performs simple mark-and-sweep in the oldest generation's old blocks, checking their bitmap and freeing the blocks that contain no live closure; any old block that contains live closure is retained, and is suspectible to fragmentation. It was added as an experiment in 2008 (https://mail.haskell.org/pipermail/cvs-ghc/2008-June/043146.html) has not seen much changes over the years, does not work with heap census, is completely untested in CI, and doesn't seem to be really used by anyone in production. Keeping it in the RTS codebase also causes a slight confusion in terminology, since the term "sweep" can refer to both the legacy code path as well as the nonmoving sweep logic. This motivates the cleanup. Closes #26802. - - - - - 358 changed files: - .gitignore - .gitlab/ci.sh - .gitlab/generate-ci/gen_ci.hs - + .gitlab/issue_templates/get-verified.md - .gitlab/jobs.yaml - .gitmodules - CODEOWNERS - cabal.project-reinstall - compiler/GHC.hs - compiler/GHC/Cmm.hs - compiler/GHC/Cmm/Info.hs - compiler/GHC/Cmm/InitFini.hs - compiler/GHC/Cmm/Utils.hs - compiler/GHC/CmmToAsm/AArch64/Ppr.hs - compiler/GHC/CmmToAsm/Config.hs - compiler/GHC/CmmToAsm/PPC/CodeGen.hs - compiler/GHC/CmmToAsm/Ppr.hs - compiler/GHC/CmmToAsm/Reg/Linear.hs - compiler/GHC/CmmToAsm/Reg/Linear/StackMap.hs - compiler/GHC/CmmToAsm/Wasm/FromCmm.hs - compiler/GHC/CmmToAsm/X86/Ppr.hs - compiler/GHC/CmmToC.hs - compiler/GHC/CmmToLlvm.hs - compiler/GHC/CmmToLlvm/Base.hs - compiler/GHC/CmmToLlvm/CodeGen.hs - compiler/GHC/CmmToLlvm/Data.hs - compiler/GHC/Core/FamInstEnv.hs - compiler/GHC/Core/Opt/Arity.hs - compiler/GHC/Core/Opt/OccurAnal.hs - compiler/GHC/Core/Opt/SetLevels.hs - compiler/GHC/Core/Opt/Simplify/Env.hs - compiler/GHC/Core/Opt/Simplify/Iteration.hs - compiler/GHC/Core/Opt/Simplify/Utils.hs - compiler/GHC/Core/Opt/SpecConstr.hs - compiler/GHC/Core/Opt/Specialise.hs - compiler/GHC/Core/Opt/WorkWrap.hs - compiler/GHC/Core/Opt/WorkWrap/Utils.hs - compiler/GHC/Core/Rules.hs - compiler/GHC/Core/Subst.hs - compiler/GHC/Core/Tidy.hs - compiler/GHC/Core/TyCo/Subst.hs - compiler/GHC/Core/TyCon.hs - compiler/GHC/Core/Unfold.hs - compiler/GHC/Core/Unfold/Make.hs - compiler/GHC/Core/Unify.hs - compiler/GHC/Core/Utils.hs - compiler/GHC/CoreToStg/Prep.hs - compiler/GHC/Driver/Backpack.hs - compiler/GHC/Driver/CodeOutput.hs - compiler/GHC/Driver/Config/CmmToAsm.hs - compiler/GHC/Driver/Config/Interpreter.hs - compiler/GHC/Driver/Downsweep.hs - compiler/GHC/Driver/DynFlags.hs - compiler/GHC/Driver/MakeFile.hs - compiler/GHC/Driver/Pipeline.hs - compiler/GHC/Driver/Pipeline/Execute.hs - compiler/GHC/Driver/Session.hs - compiler/GHC/HsToCore/Monad.hs - compiler/GHC/Iface/Recomp.hs - compiler/GHC/Linker/Dynamic.hs - compiler/GHC/Linker/Executable.hs - compiler/GHC/Linker/Loader.hs - compiler/GHC/Linker/Unit.hs - compiler/GHC/Runtime/Interpreter/C.hs - compiler/GHC/Runtime/Interpreter/Init.hs - compiler/GHC/Settings.hs - compiler/GHC/Settings/IO.hs - compiler/GHC/Stg/EnforceEpt.hs - compiler/GHC/Stg/Lint.hs - compiler/GHC/StgToCmm/Closure.hs - compiler/GHC/StgToCmm/Expr.hs - compiler/GHC/StgToJS/Linker/Utils.hs - compiler/GHC/SysTools/Terminal.hs - compiler/GHC/Tc/Errors.hs - compiler/GHC/Tc/Errors/Ppr.hs - compiler/GHC/Tc/Errors/Types.hs - compiler/GHC/Tc/Gen/Splice.hs - compiler/GHC/Tc/Instance/Family.hs - compiler/GHC/Tc/Solver.hs - compiler/GHC/Tc/Solver/Default.hs - compiler/GHC/Tc/Solver/Dict.hs - compiler/GHC/Tc/Solver/Equality.hs - compiler/GHC/Tc/Solver/FunDeps.hs - compiler/GHC/Tc/Solver/InertSet.hs - compiler/GHC/Tc/Solver/Monad.hs - compiler/GHC/Tc/Solver/Rewrite.hs - compiler/GHC/Tc/Types/Constraint.hs - compiler/GHC/Tc/Types/CtLoc.hs - compiler/GHC/Tc/Utils/Monad.hs - compiler/GHC/Tc/Utils/Unify.hs - compiler/GHC/Types/Id.hs - compiler/GHC/Types/Id/Info.hs - compiler/GHC/Types/Id/Make.hs - compiler/GHC/Types/TyThing.hs - compiler/GHC/Unit/Info.hs - compiler/GHC/Unit/State.hs - compiler/GHC/Utils/Binary.hs - config.guess - config.sub - configure.ac - distrib/configure.ac.in - − docs/Makefile - − docs/storage-mgt/Makefile - docs/users_guide/9.16.1-notes.rst - − docs/users_guide/Makefile - docs/users_guide/exts/pragmas.rst - docs/users_guide/exts/table.rst - docs/users_guide/ghci.rst - docs/users_guide/packages.rst - docs/users_guide/phases.rst - docs/users_guide/runtime_control.rst - docs/users_guide/using-concurrent.rst - docs/users_guide/using.rst - docs/users_guide/win32-dlls.rst - − driver/Makefile - − driver/ghc/Makefile - − driver/ghci/Makefile - driver/ghci/ghci.c - − driver/haddock/Makefile - driver/utils/cwrapper.c - driver/utils/isMinTTY.c - − driver/utils/merge_sections.ld - − driver/utils/merge_sections_pe.ld - ghc/Main.hs - − ghc/Makefile - hadrian/bindist/cwrappers/cwrapper.c - hadrian/cfg/default.host.target.in - hadrian/cfg/default.target.in - hadrian/doc/flavours.md - hadrian/doc/user-settings.md - hadrian/hadrian.cabal - hadrian/src/Base.hs - hadrian/src/Builder.hs - hadrian/src/Context.hs - hadrian/src/Flavour.hs - hadrian/src/Hadrian/Haskell/Cabal/Parse.hs - hadrian/src/Hadrian/Haskell/Cabal/Type.hs - hadrian/src/Hadrian/Haskell/Hash.hs - hadrian/src/Oracles/Flag.hs - hadrian/src/Oracles/Setting.hs - hadrian/src/Packages.hs - hadrian/src/Rules.hs - hadrian/src/Rules/BinaryDist.hs - hadrian/src/Rules/CabalReinstall.hs - hadrian/src/Rules/Documentation.hs - hadrian/src/Rules/Generate.hs - hadrian/src/Rules/Gmp.hs - − hadrian/src/Rules/Libffi.hs - hadrian/src/Rules/Library.hs - hadrian/src/Rules/Program.hs - hadrian/src/Rules/Register.hs - hadrian/src/Rules/Rts.hs - hadrian/src/Rules/SourceDist.hs - hadrian/src/Rules/Test.hs - hadrian/src/Settings/Builders/Cabal.hs - hadrian/src/Settings/Builders/Ghc.hs - hadrian/src/Settings/Builders/Hsc2Hs.hs - − hadrian/src/Settings/Builders/MergeObjects.hs - hadrian/src/Settings/Builders/SplitSections.hs - hadrian/src/Settings/Default.hs - hadrian/src/Settings/Flavours/Benchmark.hs - hadrian/src/Settings/Flavours/Development.hs - hadrian/src/Settings/Flavours/GhcInGhci.hs - hadrian/src/Settings/Flavours/Performance.hs - hadrian/src/Settings/Flavours/Quick.hs - hadrian/src/Settings/Flavours/QuickCross.hs - hadrian/src/Settings/Flavours/Quickest.hs - hadrian/src/Settings/Flavours/Validate.hs - hadrian/src/Settings/Packages.hs - hadrian/src/Settings/Program.hs - − libffi-tarballs - − libraries/Makefile - libraries/base/base.cabal.in - libraries/base/changelog.md - libraries/base/src/Data/Bifoldable1.hs - libraries/base/src/GHC/Conc.hs - libraries/base/src/GHC/Conc/Sync.hs - − libraries/base/src/GHC/JS/Prim/Internal/Build.hs - libraries/base/src/GHC/RTS/Flags.hs - libraries/base/tests/IO/T12010/cbits/initWinSock.c - − libraries/doc/Makefile - libraries/ghc-boot/GHC/Unit/Database.hs - libraries/ghc-internal/cbits/consUtils.c - libraries/ghc-internal/configure.ac - libraries/ghc-internal/ghc-internal.buildinfo.in - libraries/ghc-internal/ghc-internal.cabal.in - libraries/ghc-internal/include/HsIntegerGmp.h.in - libraries/ghc-internal/src/GHC/Internal/CString.hs - libraries/ghc-internal/src/GHC/Internal/Conc/IO.hs - libraries/ghc-internal/src/GHC/Internal/Conc/POSIX.hs - libraries/ghc-internal/src/GHC/Internal/Conc/Sync.hs - libraries/ghc-internal/src/GHC/Internal/Conc/Sync.hs-boot - libraries/ghc-internal/src/GHC/Internal/Conc/Windows.hs - libraries/ghc-internal/src/GHC/Internal/ConsoleHandler.hsc - libraries/ghc-internal/src/GHC/Internal/Control/Monad.hs - libraries/ghc-internal/src/GHC/Internal/Event/Thread.hs - libraries/ghc-internal/src/GHC/Internal/Event/Windows/Thread.hs - libraries/ghc-internal/src/GHC/Internal/Exception/Context.hs - libraries/ghc-internal/src/GHC/Internal/IO/Handle.hs - libraries/ghc-internal/src/GHC/Internal/RTS/Flags.hsc - + libraries/ghc-internal/src/GHC/Internal/STM.hs - libraries/ghc-internal/src/GHC/Internal/System/Environment/ExecutablePath.hsc - libraries/ghc-platform/src/GHC/Platform/ArchOS.hs - libraries/haskeline - + libraries/libffi-clib - libraries/mtl - linters/lint-codes/LintCodes/Static.hs - − linters/lint-codes/Makefile - − linters/lint-notes/Makefile - llvm-passes - + m4/fp_linker_supports_verbatim.m4 - m4/ghc_select_file_extensions.m4 - m4/prep_target_file.m4 - mk/system-cxx-std-lib-1.0.conf.in - packages - − rts/Makefile - rts/RtsFlags.c - rts/StgMiscClosures.cmm - rts/configure.ac - − rts/include/Makefile - rts/include/rts/Flags.h - rts/include/rts/ghc_ffi.h - rts/include/rts/storage/Block.h - rts/rts.buildinfo.in - rts/rts.cabal - rts/sm/GC.c - rts/sm/Sanity.c - rts/sm/Storage.c - − rts/sm/Sweep.c - − rts/sm/Sweep.h - − rts/win32/libHSffi.def - − rts/win32/libHSghc-internal.def - − rts/win32/libHSghc-prim.def - + testsuite/driver/_elffile.py - testsuite/driver/perf_notes.py - testsuite/driver/runtests.py - testsuite/driver/testglobals.py - testsuite/driver/testlib.py - testsuite/ghc-config/ghc-config.hs - testsuite/mk/test.mk - testsuite/tests/deriving/should_fail/T8984.stderr - testsuite/tests/deriving/should_fail/deriving-via-fail.stderr - testsuite/tests/deriving/should_fail/deriving-via-fail4.stderr - testsuite/tests/deriving/should_fail/deriving-via-fail5.stderr - + testsuite/tests/dmdanal/should_run/T26748.hs - + testsuite/tests/dmdanal/should_run/T26748.stdout - testsuite/tests/dmdanal/should_run/all.T - − testsuite/tests/driver/T24731.hs - testsuite/tests/driver/all.T - + testsuite/tests/driver/fully-static/Hello.hs - + testsuite/tests/driver/fully-static/Makefile - + testsuite/tests/driver/fully-static/all.T - + testsuite/tests/driver/fully-static/fully-static.stdout - + testsuite/tests/driver/fully-static/test/Test.hs - + testsuite/tests/driver/fully-static/test/test.pkg - + testsuite/tests/driver/mostly-static/Hello.hs - + testsuite/tests/driver/mostly-static/Makefile - + testsuite/tests/driver/mostly-static/all.T - + testsuite/tests/driver/mostly-static/mostly-static.stdout - + testsuite/tests/driver/mostly-static/test/test.c - + testsuite/tests/driver/mostly-static/test/test.h - + testsuite/tests/driver/mostly-static/test/test.pkg - + testsuite/tests/driver/recomp26183/M.hs - + testsuite/tests/driver/recomp26183/M2A.hs - + testsuite/tests/driver/recomp26183/M2B.hs - + testsuite/tests/driver/recomp26183/Makefile - + testsuite/tests/driver/recomp26183/all.T - + testsuite/tests/driver/recomp26183/recomp26183.stderr - + testsuite/tests/driver/recomp26705/M.hs - + testsuite/tests/driver/recomp26705/M2A.hs - + testsuite/tests/driver/recomp26705/M2B.hs - + testsuite/tests/driver/recomp26705/Makefile - + testsuite/tests/driver/recomp26705/all.T - + testsuite/tests/driver/recomp26705/recomp26705.stderr - testsuite/tests/indexed-types/should_compile/CEqCanOccursCheck.hs - testsuite/tests/indexed-types/should_fail/T12522a.hs - testsuite/tests/indexed-types/should_fail/T26176.stderr - testsuite/tests/interface-stability/base-exports.stdout - testsuite/tests/interface-stability/base-exports.stdout-javascript-unknown-ghcjs - testsuite/tests/interface-stability/base-exports.stdout-mingw32 - testsuite/tests/interface-stability/base-exports.stdout-ws-32 - testsuite/tests/linters/Makefile - testsuite/tests/numeric/should_run/all.T - testsuite/tests/parser/should_fail/RecordDotSyntaxFail10.stderr - testsuite/tests/parser/should_fail/RecordDotSyntaxFail13.stderr - testsuite/tests/parser/should_fail/T20654a.stderr - testsuite/tests/perf/should_run/all.T - testsuite/tests/pmcheck/should_compile/T15753c.hs - + testsuite/tests/pmcheck/should_compile/T15753c.stderr - testsuite/tests/pmcheck/should_compile/T15753d.hs - + testsuite/tests/pmcheck/should_compile/T15753d.stderr - + testsuite/tests/pmcheck/should_compile/T22652.hs - + testsuite/tests/pmcheck/should_compile/T22652a.hs - + testsuite/tests/pmcheck/should_compile/T24867.hs - + testsuite/tests/pmcheck/should_compile/T24867.stderr - testsuite/tests/pmcheck/should_compile/all.T - + testsuite/tests/polykinds/T13882.hs - testsuite/tests/polykinds/all.T - testsuite/tests/quantified-constraints/T15316A.stderr - testsuite/tests/quantified-constraints/T17267.stderr - testsuite/tests/quantified-constraints/T17267a.stderr - testsuite/tests/quantified-constraints/T17267b.stderr - testsuite/tests/quantified-constraints/T17267c.stderr - testsuite/tests/quantified-constraints/T17267e.stderr - testsuite/tests/quantified-constraints/T17458.stderr - testsuite/tests/rts/linker/rdynamic.hs - testsuite/tests/simplCore/should_compile/T14003.stderr - testsuite/tests/simplCore/should_compile/T18013.stderr - testsuite/tests/simplCore/should_compile/T19672.stderr - testsuite/tests/simplCore/should_compile/T21763.stderr - testsuite/tests/simplCore/should_compile/T21763a.stderr - + testsuite/tests/simplCore/should_compile/T26615.hs - + testsuite/tests/simplCore/should_compile/T26615.stderr - + testsuite/tests/simplCore/should_compile/T26615a.hs - + testsuite/tests/simplCore/should_compile/T26681.hs - + testsuite/tests/simplCore/should_compile/T26682.hs - + testsuite/tests/simplCore/should_compile/T26682a.hs - + testsuite/tests/simplCore/should_compile/T26709.hs - + testsuite/tests/simplCore/should_compile/T26709.stderr - + testsuite/tests/simplCore/should_compile/T26722.hs - + testsuite/tests/simplCore/should_compile/T26722.stderr - testsuite/tests/simplCore/should_compile/T4908.stderr - testsuite/tests/simplCore/should_compile/all.T - testsuite/tests/simplCore/should_compile/spec-inline.stderr - testsuite/tests/typecheck/should_compile/T16188.hs - + testsuite/tests/typecheck/should_compile/T26746.hs - testsuite/tests/typecheck/should_compile/all.T - testsuite/tests/typecheck/should_fail/ContextStack1.stderr - testsuite/tests/typecheck/should_fail/FD3.stderr - testsuite/tests/typecheck/should_fail/FDsFromGivens2.stderr - testsuite/tests/typecheck/should_fail/FunDepOrigin1b.stderr - testsuite/tests/typecheck/should_fail/T13506.stderr - testsuite/tests/typecheck/should_fail/T15767.stderr - testsuite/tests/typecheck/should_fail/T15801.stderr - testsuite/tests/typecheck/should_fail/T19415.stderr - testsuite/tests/typecheck/should_fail/T19415b.stderr - testsuite/tests/typecheck/should_fail/T22924b.stderr - + testsuite/tests/typecheck/should_fail/T23162b.hs - + testsuite/tests/typecheck/should_fail/T23162b.stderr - + testsuite/tests/typecheck/should_fail/T23162c.hs - + testsuite/tests/typecheck/should_fail/T23162d.hs - testsuite/tests/typecheck/should_fail/T25325.stderr - testsuite/tests/typecheck/should_fail/T5236.stderr - testsuite/tests/typecheck/should_fail/T5246.stderr - testsuite/tests/typecheck/should_fail/T5978.stderr - testsuite/tests/typecheck/should_fail/T9612.stderr - testsuite/tests/typecheck/should_fail/TcCoercibleFail.hs - testsuite/tests/typecheck/should_fail/TcCoercibleFail.stderr - testsuite/tests/typecheck/should_fail/all.T - testsuite/tests/typecheck/should_fail/tcfail143.stderr - utils/deriveConstants/Main.hs - utils/ghc-pkg/Main.hs - utils/ghc-toolchain/exe/Main.hs - utils/ghc-toolchain/src/GHC/Toolchain/Tools/Link.hs - utils/haddock/haddock-api/src/Haddock/Convert.hs - − utils/iserv/cbits/iservmain.c - − utils/iserv/iserv.cabal.in - − utils/iserv/src/Main.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/6be6c9f40d9ed206ce26aa109aa64f… -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/6be6c9f40d9ed206ce26aa109aa64f… You're receiving this email because of your account on gitlab.haskell.org.
1 0
0 0
[Git][ghc/ghc][wip/fix-darwin-toolchain-cruft] ci: update darwin boot ghc to 9.10.3
by Cheng Shao (@TerrorJack) 19 Jan '26

19 Jan '26
Cheng Shao pushed to branch wip/fix-darwin-toolchain-cruft at Glasgow Haskell Compiler / GHC Commits: 03155fb0 by Cheng Shao at 2026-01-19T17:48:40+00:00 ci: update darwin boot ghc to 9.10.3 This patch updates darwin boot ghc to 9.10.3, along with other related updates, and pays off some technical debt here: - Update `nixpkgs` and use the `nixpkgs-25.05-darwin` channel. - Update the `niv` template. - Update LLVM to 21 and update `llvm-targets` to reflect LLVM 21 layout changes for arm64/x86_64 darwin targets. - Use `stdenvNoCC` to prevent nix packaged apple sdk from being used by boot ghc, and manually set `DEVELOPER_DIR`/`SDKROOT` to enforce the usage of system-wide command line sdk for macos. - When building nix derivation for boot ghc, run `configure` via the `arch` command so that `configure` and its subprocesses pick up the manually specified architecture. - Remove the previous horrible hack that obliterates `configure` to make autoconf test result in true. `configure` now properly does its job. - Remove the now obsolete configure args and post install settings file patching logic. - Use `scheme-small` for texlive to avoid build failures in certain unused texlive packages, especially on x86_64-darwin. - - - - - 3 changed files: - .gitlab/darwin/nix/sources.json - .gitlab/darwin/toolchain.nix - llvm-targets Changes: ===================================== .gitlab/darwin/nix/sources.json ===================================== @@ -1,26 +1,14 @@ { - "niv": { - "branch": "master", - "description": "Easy dependency management for Nix projects", - "homepage": "https://github.com/nmattia/niv", - "owner": "nmattia", - "repo": "niv", - "rev": "e0ca65c81a2d7a4d82a189f1e23a48d59ad42070", - "sha256": "1pq9nh1d8nn3xvbdny8fafzw87mj7gsmp6pxkdl65w2g18rmcmzx", - "type": "tarball", - "url": "https://github.com/nmattia/niv/archive/e0ca65c81a2d7a4d82a189f1e23a48d59ad4…", - "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" - }, "nixpkgs": { - "branch": "nixos-unstable", + "branch": "nixpkgs-25.05-darwin", "description": "Nix Packages collection", "homepage": "", "owner": "nixos", "repo": "nixpkgs", - "rev": "2893f56de08021cffd9b6b6dfc70fd9ccd51eb60", - "sha256": "1anwxmjpm21msnnlrjdz19w31bxnbpn4kgf93sn3npihi7wf4a8h", + "rev": "3e3f3c7f9977dc123c23ee21e8085ed63daf8c37", + "sha256": "0jnmv6gpzhqb0jyhj7qi7vjfwbn4cqs5blm5xia7q5i0ma2bbkcd", "type": "tarball", - "url": "https://github.com/nixos/nixpkgs/archive/2893f56de08021cffd9b6b6dfc70fd9ccd…", + "url": "https://github.com/nixos/nixpkgs/archive/3e3f3c7f9977dc123c23ee21e8085ed63d…", "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" } } ===================================== .gitlab/darwin/toolchain.nix ===================================== @@ -11,69 +11,67 @@ let hsPkgs = pkgs.haskellPackages; alex = hsPkgs.alex; happy = hsPkgs.happy; - targetTriple = pkgs.stdenv.targetPlatform.config; + targetTriple = pkgs.stdenvNoCC.targetPlatform.config; ghcBindists = let version = ghc.version; in { - aarch64-darwin = hostPkgs.fetchurl { + aarch64-darwin = hostPkgs.fetchzip { url = "https://downloads.haskell.org/ghc/${version}/ghc-${version}-aarch64-apple-d…"; - sha256 = "sha256-/6+DtdeossBJIMbjkJwL4h3eJ7rzgNCV+ifoQKOi6AQ="; + hash = "sha512-xUlt7zc/OT3a1SR0BxmFFgrabPkWUENATdw4NbQwEi5+nH5yPau+HSrGI5UUoKdO4gdpgZlPaxtI7eSk0fx1+g=="; }; - x86_64-darwin = hostPkgs.fetchurl { + x86_64-darwin = hostPkgs.fetchzip { url = "https://downloads.haskell.org/ghc/${version}/ghc-${version}-x86_64-apple-da…"; - sha256 = "sha256-jPIhiJMOENesUnDUJeIaPatgavc6ZVSTY5NFIAxlC+k="; + hash = "sha512-4/INeJwPPGbOj9MepwnIvIg2lvFkqS8w/3U/I8f6gCsoNlgwPr78iyY9vd6vfMONR1GxNQU3L/lxE07F3P0Qag=="; }; - }; - ghc = pkgs.stdenv.mkDerivation rec { - version = "9.10.1"; + ghc = pkgs.stdenvNoCC.mkDerivation rec { + version = "9.10.3"; name = "ghc"; - src = ghcBindists.${pkgs.stdenv.hostPlatform.system}; + src = ghcBindists.${pkgs.stdenvNoCC.hostPlatform.system}; + + dontUpdateAutotoolsGnuConfigScripts = true; + configureFlags = [ - "CC=/usr/bin/clang" - "CLANG=/usr/bin/clang" "AR=/usr/bin/ar" - "LLC=${llvm}/bin/llc" - "OPT=${llvm}/bin/opt" - "LLVMAS=${llvm_clang}/bin/clang" - "CONF_CC_OPTS_STAGE2=--target=${targetTriple}" - "CONF_CXX_OPTS_STAGE2=--target=${targetTriple}" - "CONF_GCC_LINKER_OPTS_STAGE2=--target=${targetTriple}" + "CC=/usr/bin/clang" + "CXX=/usr/bin/clang++" + "INSTALL=/usr/bin/install" + "INSTALL_NAME_TOOL=/usr/bin/install_name_tool" + "MergeObjsCmd=/usr/bin/ld" + "NM=/usr/bin/nm" + "OTOOL=/usr/bin/otool" + "RANLIB=/usr/bin/ranlib" ]; - buildPhase = "true"; - - # This is a horrible hack because the configure script invokes /usr/bin/clang - # without a `--target` flag. Then depending on whether the `nix` binary itself is - # a native x86 or arm64 binary means that /usr/bin/clang thinks it needs to run in - # x86 or arm64 mode. - - # The correct answer for the check in question is the first one we try, so by replacing - # the condition to true; we select the right C++ standard library still. - preConfigure = '' - sed "s/\"\$CC\" -o actest actest.o \''${1} 2>\/dev\/null/true/i" configure > configure.new - mv configure.new configure - chmod +x configure - cat configure + # Use the arch command to explicitly specify architecture, so that + # configure and its subprocesses would pick up the architecture we + # choose via the system argument. + preConfigure = pkgs.lib.optionalString (system == "aarch64-darwin") '' + substituteInPlace configure \ + --replace-fail "#! /bin/sh" "#!/usr/bin/env -S /usr/bin/arch -arm64 /bin/sh" + '' + pkgs.lib.optionalString (system == "x86_64-darwin") '' + substituteInPlace configure \ + --replace-fail "#! /bin/sh" "#!/usr/bin/env -S /usr/bin/arch -x86_64 /bin/sh" + '' + '' + unset DEVELOPER_DIR SDKROOT + export DEVELOPER_DIR="$(/usr/bin/xcode-select --print-path)" + export SDKROOT="$(/usr/bin/xcrun --sdk macosx --show-sdk-path)" ''; + dontPatchShebangsInConfigure = true; + # N.B. Work around #20253. nativeBuildInputs = [ pkgs.gnused ]; - postInstallPhase = '' - settings="$out/lib/ghc-${version}/settings" - sed -i -e "s%\"llc\"%\"${llvm}/bin/llc\"%" $settings - sed -i -e "s%\"opt\"%\"${llvm}/bin/opt\"%" $settings - sed -i -e "s%\"clang\"%\"/usr/bin/clang\"%" $settings - sed -i -e 's%("C compiler command", "")%("C compiler command", "/usr/bin/clang")%' $settings - sed -i -e 's%("C compiler flags", "")%("C compiler flags", "--target=${targetTriple}")%' $settings - sed -i -e 's%("C++ compiler flags", "")%("C++ compiler flags", "--target=${targetTriple}")%' $settings - sed -i -e 's%("C compiler link flags", "")%("C compiler link flags", "--target=${targetTriple}")%' $settings - ''; + + dontBuild = true; + + enableParallelInstalling = true; + + dontFixup = true; # Sanity check: verify that we can compile hello world. doInstallCheck = true; installCheckPhase = '' - unset DYLD_LIBRARY_PATH $out/bin/ghc --info cd $TMP mkdir test-ghc; cd test-ghc @@ -91,13 +89,13 @@ let ourtexlive = with pkgs; texlive.combine { inherit (texlive) - scheme-medium collection-xetex fncychap titlesec tabulary varwidth + scheme-small collection-xetex fncychap tex-gyre titlesec tabulary varwidth framed capt-of wrapfig needspace dejavu-otf helvetic upquote; }; fonts = with pkgs; makeFontsConf { fontDirectories = [ dejavu_fonts ]; }; - llvm = pkgs.llvm_15; - llvm_clang = pkgs.llvmPackages_15.clang-unwrapped; + llvm = pkgs.llvm_21; + llvm_clang = pkgs.llvmPackages_21.clang-unwrapped; in pkgs.writeTextFile { name = "toolchain"; ===================================== llvm-targets ===================================== @@ -44,8 +44,8 @@ ,("riscv64-unknown-linux", ("e-m:e-p:64:64-i64:64-i128:128-n64-S128", "", "+m +a +f +d +c +relax")) ,("loongarch64-unknown-linux-gnu", ("e-m:e-p:64:64-i64:64-i128:128-n64-S128", "", "+f +d")) ,("loongarch64-unknown-linux", ("e-m:e-p:64:64-i64:64-i128:128-n64-S128", "", "+f +d")) -,("x86_64-apple-darwin", ("e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128", "penryn", "")) -,("arm64-apple-darwin", ("e-m:o-i64:64-i128:128-n32:64-S128", "generic", "+v8.3a +fp-armv8 +neon +crc +crypto +fullfp16 +ras +lse +rdm +rcpc +zcm +zcz +sha2 +aes")) +,("x86_64-apple-darwin", ("e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", "core2", "")) +,("arm64-apple-darwin", ("e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-n32:64-S128-Fn32", "apple-m1", "+v8.4a +aes +altnzcv +ccdp +ccpp +complxnum +crc +dotprod +flagm +fp-armv8 +fp16fml +fptoint +fullfp16 +jsconv +lse +neon +pauth +perfmon +predres +ras +rcpc +rdm +sb +sha2 +sha3 +specrestrict +ssbs")) ,("aarch64-apple-ios", ("e-m:o-i64:64-i128:128-n32:64-S128", "apple-a7", "+fp-armv8 +neon +crypto +zcm +zcz +sha2 +aes")) ,("x86_64-apple-ios", ("e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128", "core2", "")) ,("amd64-portbld-freebsd", ("e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128", "x86-64", "")) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/03155fb0e37175a4a0f02e5a6536517… -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/03155fb0e37175a4a0f02e5a6536517… You're receiving this email because of your account on gitlab.haskell.org.
1 0
0 0
[Git][ghc/ghc][wip/fix-darwin-toolchain-cruft] 58 commits: make: remove unused Makefiles from legacy make build system
by Cheng Shao (@TerrorJack) 19 Jan '26

19 Jan '26
Cheng Shao pushed to branch wip/fix-darwin-toolchain-cruft at Glasgow Haskell Compiler / GHC Commits: ec3cf767 by Cheng Shao at 2026-01-08T06:24:31-05:00 make: remove unused Makefiles from legacy make build system This patch removes unused Makefiles from legacy make build system; now they are never used by hadrian in any way, and they already include common boilerplate mk files that are long gone in the make build system removal, hence the housecleaning. Co-authored-by: Codex <codex(a)openai.com> - - - - - 04ea3f83 by Cheng Shao at 2026-01-08T06:25:13-05:00 compiler: use -O3 as LLVM optimization level for ghc -O2 The GHC driver clamps LLVM optimization level to `-O2` due to LLVM crashes, but those were historical issues many years ago that are no longer relevant for LLVM versions we support today. This patch changes the driver to use `-O3` as LLVM optimization level when compiling with `-O2`, which is a better default when we're willing to trade compilation time for faster generated code. - - - - - 472df471 by Peter Trommler at 2026-01-08T13:28:54-05:00 Use half-word literals in info tables With this commit info tables are mapped to the same assembler code on big-endian and little-endian platforms. Fixes #26579. - - - - - 393f9c51 by Simon Peyton Jones at 2026-01-08T13:29:35-05:00 Refactor srutOkForBinderSwap This MR does a small refactor: * Moves `scrutOkForBinderSwap` and `BinderSwapDecision` to GHC.Core.Utils * Inverts the sense of the coercion it returns, which makes more sense No effect on behaviour - - - - - ad76fb0f by Simon Peyton Jones at 2026-01-08T13:29:36-05:00 Improve case merging This small MR makes case merging happen a bit more often than it otherwise could, by getting join points out of the way. See #26709 and GHC.Core.Utils Note [Floating join points out of DEFAULT alternatives] - - - - - 4c9395f5 by Cheng Shao at 2026-01-08T13:30:16-05:00 hadrian: remove broken hsc2hs flag when cross compiling to windows This patch removes the `--via-asm` hsc2hs flag when cross compiling to windows. With recent llvm-mingw toolchain, it would fail with: ``` x86_64-w64-mingw32-hsc2hs: Cannot combine instructions: [Quad 8,Long 4,Long 241,Ref ".Ltmp1-.Ltmp0"] ``` The hsc2hs default `--cross-compile` logic is slower but works. - - - - - 71fdef55 by Simon Peyton Jones at 2026-01-08T13:30:57-05:00 Try harder to keep the substitution empty Avoid unnecessary cloning of variables in the Simplifier. Addresses #26724, See Note [Keeping the substitution empty] We get some big wins in compile time Metrics: compile_time/bytes allocated ------------------------------------- Baseline Test Metric value New value Change ---------------------------------------------------------------------------- CoOpt_Singletons(normal) ghc/alloc 721,544,088 692,174,216 -4.1% GOOD LargeRecord(normal) ghc/alloc 1,268,031,157 1,265,168,448 -0.2% T14766(normal) ghc/alloc 918,218,533 688,432,296 -25.0% GOOD T15703(normal) ghc/alloc 318,103,629 306,638,016 -3.6% GOOD T17836(normal) ghc/alloc 419,174,584 418,400,824 -0.2% T18478(normal) ghc/alloc 471,042,976 470,261,376 -0.2% T20261(normal) ghc/alloc 573,387,162 563,663,336 -1.7% T24984(normal) ghc/alloc 87,832,666 87,636,168 -0.2% T25196(optasm) ghc/alloc 1,103,284,040 1,101,376,992 -0.2% hard_hole_fits(normal) ghc/alloc 224,981,413 224,608,208 -0.2% geo. mean -0.3% minimum -25.0% maximum +0.1% Metric Decrease: CoOpt_Singletons T14766 T15703 - - - - - 30341168 by Simon Peyton Jones at 2026-01-08T13:31:38-05:00 Add regression test for #24867 - - - - - 1ac1a541 by Julian Ospald at 2026-01-09T02:48:53-05:00 Support statically linking executables properly Fixes #26434 In detail, this does a number of things: * Makes GHC aware of 'extra-libraries-static' (this changes the package database format). * Adds a switch '-static-external' that will honour 'extra-libraries-static' to link external system dependencies statically. * Adds a new field to settings/targets: "ld supports verbatim namespace". This field is used by '-static-external' to conditionally use '-l:foo.a' syntax during linking, which is more robust than trying to find the absolute path to an archive on our own. * Adds a switch '-fully-static' that is meant as a high-level interface for e.g. cabal. This also honours 'extra-libraries-static'. This also attempts to clean up the confusion around library search directories. At the moment, we have 3 types of directories in the package database format: * library-dirs * library-dirs-static * dynamic-library-dirs However, we only have two types of linking: dynamic or static. Given the existing logic in 'mungeDynLibFields', this patch assumes that 'library-dirs' is really just nothing but a fallback and always prefers the more specific variants if they exist and are non-empty. Conceptually, we should be ok with even just one search dirs variant. Haskell libraries are named differently depending on whether they're static or dynamic, so GHC can conveniently pick the right one depending on the linking needs. That means we don't really need to play tricks with search paths to convince the compiler to do linking as we want it. For system C libraries, the convention has been anyway to place static and dynamic libs next to each other, so we need to deal with that issue anyway and it is outside of our control. But this is out of the scope of this patch. This patch is backwards compatible with cabal. Cabal should however be patched to use the new '-fully-static' switch. - - - - - ad3c808d by Julian Ospald at 2026-01-09T02:48:53-05:00 Warn when "-dynamic" is mixed with "-staticlib" - - - - - 322dd672 by Matthew Pickering at 2026-01-09T02:49:35-05:00 rts: Use INFO_TABLE_CONSTR for stg_dummy_ret_closure Since the closure type is CONSTR_NOCAF, we need to use INFO_TABLE_CONSTR to populate the constructor description field (this crashes ghc-debug when decoding AP_STACK frames sometimes) Fixes #26745 - - - - - 039bac4c by Ben Gamari at 2026-01-09T20:22:16-05:00 ghc-internal: Move STM utilities out of GHC.Internal.Conc.Sync This is necessary to avoid an import cycle on Windows when importing `GHC.Internal.Exception.Context` in `GHC.Internal.Conc.Sync`. On the road to address #25365. - - - - - 8c389e8c by Ben Gamari at 2026-01-09T20:22:16-05:00 base: Capture backtrace from throwSTM Implements core-libraries-committee#297. Fixes #25365. - - - - - e1ce1fc3 by Ben Gamari at 2026-01-09T20:22:16-05:00 base: Annotate rethrown exceptions in catchSTM with WhileHandling Implements core-libraries-committee#298 - - - - - c4ebdbdf by Cheng Shao at 2026-01-09T20:23:06-05:00 compiler: make getPrim eagerly evaluate its result This commit makes `GHC.Utils.Binary.getPrim` eagerly evaluate its result, to avoid accidental laziness when future patches build other binary parsers using `getPrim`. - - - - - 66a0c4f7 by Cheng Shao at 2026-01-09T20:23:06-05:00 compiler: implement fast get/put for Word16/Word32/Word64 Previously, `GHC.Utils.Binary` contains `get`/`put` functions for `Word16`/`Word32`/`Word64` which always loads and stores them as big-endian words at a potentially unaligned address. The previous implementation is based on loads/stores of individual bytes and concatenating bytes with bitwise operations, which currently cannot be fused to a single load/store operation by GHC. This patch implements fast `get`/`put` functions for `Word16`/`Word32`/`Word64` based on a single memory load/store, with an additional `byteSwap` operation on little-endian hosts. It is based on unaligned load/store primops added since GHC 9.10, and we already require booting with at least 9.10, so it's about time to switch to this faster path. - - - - - 641ec3f0 by Simon Peyton Jones at 2026-01-09T20:23:55-05:00 Fix scoping errors in specialisation Using -fspecialise-aggressively in #26682 showed up a couple of subtle errors in the type-class specialiser. * dumpBindUDs failed to call `deleteCallsMentioning`, resulting in a call that mentioned a dictionary that was not in scope. This call has been missing since 2009! commit c43c981705ec33da92a9ce91eb90f2ecf00be9fe Author: Simon Peyton Jones <simonpj(a)microsoft.com> Date: Fri Oct 23 16:15:51 2009 +0000 Fixed by re-combining `dumpBindUDs` and `dumpUDs`. * I think there was another bug involving the quantified type variables in polymorphic specialisation. In any case I refactored `specHeader` and `spec_call` so that the former looks for the extra quantified type variables rather than the latter. This is quite a worthwhile simplification: less code, easier to grok. Test case in simplCore/should_compile/T26682, brilliantly minimised by @sheaf. - - - - - 2433e91d by Cheng Shao at 2026-01-09T20:24:43-05:00 compiler: change sectionProtection to take SectionType argument This commit changes `sectionProtection` to only take `SectionType` argument instead of whole `Section`, since it doesn't need the Cmm section content anyway, and it can then be called in parts of NCG where we only have a `SectionType` in scope. - - - - - e5926fbe by Cheng Shao at 2026-01-09T20:24:43-05:00 compiler: change isInitOrFiniSection to take SectionType argument This commit changes `isInitOrFiniSection` to only take `SectionType` argument instead of whole `Section`, since it doesn't need the Cmm section content anyway, and it can then be called in parts of NCG where we only have a `SectionType` in scope. Also marks it as exported. - - - - - 244d57d7 by Cheng Shao at 2026-01-09T20:24:43-05:00 compiler: fix split sections on windows This patch fixes split sections on windows by emitting the right COMDAT section header in NCG, see added comment for more explanation. Fix #26696 #26494. ------------------------- Metric Decrease: LargeRecord T9675 size_hello_artifact size_hello_artifact_gzip size_hello_unicode size_hello_unicode_gzip Metric Increase: T13035 ------------------------- Co-authored-by: Codex <codex(a)openai.com> - - - - - 182f3d0f by Cheng Shao at 2026-01-09T20:25:28-05:00 iserv: add comment about -fkeep-cafs - - - - - 49675b69 by Matthew Craven at 2026-01-09T20:26:14-05:00 Account for "stupid theta" in demand sig for DataCon wrappers Fixes #26748. - - - - - f3c18890 by Samuel Thibault at 2026-01-10T15:48:22+01:00 hurd: Fix getExecutablePath build 3939a8bf93e27 ("GNU/Hurd: Add getExecutablePath support") added using /proc/self/exe for GNU/Hurd but missed adding the required imports for the corresponding code. - - - - - 7f15bd15 by Samuel Thibault at 2026-01-12T07:16:25-05:00 Fix the OS string encoding for GNU/Hurd Following https://github.com/haskell/cabal/pull/9434/files , and as seen in the various gnu_HOST_OS usages in the source code, it is expected that GNU/Hurd is advertised as "gnu", like the autotools do. - - - - - 1db2f240 by Andrew Lelechenko at 2026-01-12T07:17:06-05:00 Add since annotation for Data.Bifoldable1 Fixes #26432 - - - - - e038a383 by Sven Tennie at 2026-01-12T07:17:49-05:00 Ignore Windows CI tool directories in Git Otherwise, we see thousands of changes in `git status` which is very confusing to work with. - - - - - 023c301c by sheaf at 2026-01-13T04:57:30-05:00 Don't re-use stack slots for growing registers This commit avoids re-using a stack slot for a register that has grown but already had a stack slot. For example, suppose we have stack slot assigments %v1 :: FF64 |-> StackSlot 0 %v2 :: FF64 |-> StackSlot 1 Later, we start using %v1 at a larger format (e.g. F64x2) and we need to spill it again. Then we **must not** use StackSlot 0, as a spill at format F64x2 would clobber the data in StackSlot 1. This can cause some fragmentation of the `StackMap`, but that's probably OK. Fixes #26668 - - - - - d0966e64 by fendor at 2026-01-13T04:58:11-05:00 Remove `traceId` from ghc-pkg executable - - - - - 20d7efec by Simon Peyton Jones at 2026-01-13T12:41:22-05:00 Make SpecContr rules fire a bit later See #26615 and Note [SpecConstr rule activation] - - - - - 8bc4eb8c by Andrew Lelechenko at 2026-01-13T12:42:03-05:00 Upgrade mtl submodule to 2.3.2 Fixes #26656 - - - - - c94aaacd by Cheng Shao at 2026-01-13T12:42:44-05:00 compiler: remove iserv and only use on-demand external interpreter This patch removes `iserv` from the tree completely. Hadrian would no longer build or distribute `iserv`, and the GHC driver would use the on-demand external interpreter by default when invoked with `-fexternal-interpreter`, without needing to specify `-pgmi ""`. This has multiple benefits: - It allows cleanup of a lot of legacy hacks in the hadrian codebase. - It paves the way for running cross ghc's iserv via cross emulator (#25523), fixing TH/ghci support for cross targets other than wasm/js. - - - - - c1fe0097 by Peter Trommler at 2026-01-14T03:54:49-05:00 PPC NCG: Fix shift right MO code The shift amount in shift right [arithmetic] MOs is machine word width. Therefore remove unnecessary zero- or sign-extending of shift amount. It looks harmless to extend the shift amount argument because the shift right instruction uses only the seven lowest bits (i. e. mod 128). But now we have a conversion operation from a smaller type to word width around a memory load at word width. The types are not matching up but there is no check done in CodeGen. The necessary conversion from word width down to the smaller width would be translated into a no-op on PowerPC anyway. So all seems harmless if it was not for a small optimisation in getRegister'. In getRegister' a load instruction with the smaller width of the conversion operation was generated. This loaded the most significant bits of the word in memory on a big-endian platform. These bits were zero and hence shift right was used with shift amount zero and not one as required in test Sized. Fixes #26519 - - - - - 2dafc65a by Cheng Shao at 2026-01-14T03:55:31-05:00 Tree-wide cleanup of cygwin logic GHC has not supported cygwin for quite a few years already, and will not resume support in the forseeable future. The only supported windows toolchain is clang64/clangarm64 of the msys2 project. This patch cleans up the unused cygwin logic in the tree. Co-authored-by: Codex <codex(a)openai.com> - - - - - 66b96e2a by Teo Camarasu at 2026-01-14T03:56:13-05:00 Set default eventlog-flush-interval to 5s Resolves #26707 - - - - - d0254579 by Andrew Lelechenko at 2026-01-14T03:56:53-05:00 Document when -maxN RTS option was added - - - - - f25e2b12 by Cheng Shao at 2026-01-14T11:10:39-05:00 testsuite: remove obsolete --ci option from the testsuite driver This patch removes the obsolete `--ci` option from the testsuite driver: neither the CI scripts nor hadrian ever invokes the testsuite driver with `--ci`, and the perf notes are always fetched to the `refs/notes/perf` local reference anyway. - - - - - 7964763b by Julian Ospald at 2026-01-14T11:11:31-05:00 Fix fetch_cabal * download cabal if the existing one is of an older version * fix FreeBSD download url * fix unpacking on FreeBSD - - - - - 6b0129c1 by Julian Ospald at 2026-01-14T11:11:31-05:00 Bump toolchain in CI - - - - - 0f53ccc6 by Julian Ospald at 2026-01-14T11:11:31-05:00 Use libffi-clib Previously, we would build libffi via hadrian and bundle it manually with the GHC bindist. This now moves all that logic out of hadrian and allows us to have a clean Haskell package to build and link against and ship it without extra logic. This patch still retains the ability to link against a system libffi. The main reason of bundling libffi was that on some platforms (e.g. FreeBSD and Mac), system libffi is not visible to the C toolchain by default, so users would require settings in e.g. cabal to be able to compile anything. This adds the submodule libffi-clib to the repository. - - - - - 5e1cd595 by Peng Fan at 2026-01-14T11:12:26-05:00 NCG/LA64: add support for la664 micro architecture Add '-mla664' flag to LA664, which has some new features: atomic instructions, dbar hints, etc. 'LA464' is the default so that unrecognized instructions are not generated. - - - - - c56567ec by Simon Peyton Jones at 2026-01-15T23:19:04+00:00 Add evals for strict data-con args in worker-functions This fixes #26722, by adding an eval in a worker for arguments of strict data constructors, even if the function body uses them strictly. See (WIS1) in Note [Which Ids should be strictified] I took the opportunity to make substantial improvements in the documentation for call-by-value functions. See especially Note [CBV Function Ids: overview] in GHC.Types.Id.Info Note [Which Ids should be CBV candidates?] ditto Note [EPT enforcement] in GHC.Stg.EnforceEpt among others. - - - - - 9719ce5d by Simon Peyton Jones at 2026-01-15T23:19:04+00:00 Improve `interestingArg` This function analyses a function's argument to see if it is interesting enough to deserve an inlining discount. Improvements for * LitRubbish arguments * exprIsExpandable arguments See Note [Interesting arguments] which is substantially rewritten. - - - - - 7b616b9f by Cheng Shao at 2026-01-16T06:45:00-05:00 compiler: fix regression when compiling foreign stubs in the rts unit This patch fixes a regression when compiling foreign stubs in the rts unit introduced in 05e25647f72bc102061af3f20478aa72bff6ff6e. A simple revert would fix it, but it's better to implement a proper fix with comment for better understanding of the underlying problem, see the added comment for explanation. Co-authored-by: Codex <codex(a)openai.com> - - - - - c343ef64 by Sylvain Henry at 2026-01-16T06:45:51-05:00 base: remove GHC.JS.Prim.Internal.Build (#23432) See accepted CLC proposal https://github.com/haskell/core-libraries-committee/issues/329 - - - - - 29c0aceb by Simon Peyton Jones at 2026-01-16T17:18:11-05:00 Improve newtype unwrapping Ticket #26746 describes several relatively-minor shortcomings of newtype unwrapping. This MR addresses them, while also (arguably) simplifying the code a bit. See new Note [Solving newtype equalities: overview] and Note [Decomposing newtype equalities] and Note [Eager newtype decomposition] and Note [Even more eager newtype decomposition] For some reason, on Windows only, runtime allocations decrease for test T5205 (from 52k to 48k). I have not idea why. No change at all on Linux. I'm just going to accept the change. (I saw this same effect in another MR so I think it's a fault in the baseline.) Metric Decrease: T5205 - - - - - 8b59e62c by Andreas Klebinger at 2026-01-16T17:18:52-05:00 testsuite: Widen acceptance window for T5205. Fixes #26782 - - - - - 9e5e0234 by mangoiv at 2026-01-17T06:03:03-05:00 add a new issue template for getting verified To reduce spam created by new users, we will in future not grant any rights but reporting issues to new users. That is why we will have to be able to verify them. The added issue template serves that purpose. - - - - - b18b2c42 by Cheng Shao at 2026-01-17T06:03:44-05:00 llvm: fix split sections for llvm backend This patch fixes split sections for llvm backend: - Pass missing `--data-sections`/`--function-sections` flags to llc/opt. - Use `@llvm.compiler.used` instead of `@llvm.used` to avoid sections being unnecessarily retained at link-time. Fixes #26770. ------------------------- Metric Decrease: libdir size_hello_artifact size_hello_unicode ------------------------- Co-authored-by: Codex <codex(a)openai.com> - - - - - ebf66f67 by Cheng Shao at 2026-01-17T13:16:50-05:00 Update autoconf scripts Scripts taken from autoconf a2287c3041a3f2a204eb942e09c015eab00dc7dd - - - - - 598624b9 by Andreas Klebinger at 2026-01-17T13:17:32-05:00 CString.hs: Update incorrect comment. Fixes #26322 - - - - - eea2036b by Cheng Shao at 2026-01-18T10:00:49-05:00 libraries: bump haskeline submodule to 0.8.4.1 This patch bumps the haskeline submodule to 0.8.4.1 which includes an important fix for an ANSI handling bug on Windows (https://github.com/haskell/haskeline/pull/126) - - - - - 87d8f6c2 by Cheng Shao at 2026-01-18T10:01:30-05:00 hadrian: replace default -H32m/-H64m with -O64M to improve mutator productivity Most hadrian build flavours pass `-H32m`/`-H64m` to GHC as conventional wisdom to improve mutator productivity and reduce GC overhead. They were inherited from the legacy Make build system, and there used to be make flags to instrument a build process with `-Rghc-timing` option to collect GC stats of each GHC run from stderr. It's time to revisit whether there are better defaults for `-H32m`/`-H64m`, and this patch changes it to `-O64M` which indeed improves mutator productivity based on real statistics. `-O64M` is more aggressive than `-H64m`; it allows the old generation to grow to at least 64M before triggering major GC and reduces major GC runs. The stats of a clean build with `validate` flavour and `-H64m`: ``` h64m.log matched RTS stat lines: 5499 sum MUT cpu : 2400.808 s sum GC cpu : 1378.292 s sum MUT elapsed : 2788.253 s sum GC elapsed : 1389.233 s GC/MUT cpu ratio : 0.574 (GC is 57.4% of MUT) GC/MUT elapsed ratio : 0.498 (GC is 49.8% of MUT) GC fraction of (MUT+GC) cpu : 36.5% GC fraction of (MUT+GC) elapsed : 33.3% per-line GC/MUT cpu ratio: median 0.691, p90 1.777 per-line GC/MUT elapsed ratio: median 0.519, p90 1.081 ``` The stats of a clean build with `validate` flavour and `-O64M`: ``` o64m.log matched RTS stat lines: 5499 sum MUT cpu : 2377.383 s sum GC cpu : 1127.146 s sum MUT elapsed : 2758.857 s sum GC elapsed : 1135.587 s GC/MUT cpu ratio : 0.474 (GC is 47.4% of MUT) GC/MUT elapsed ratio : 0.412 (GC is 41.2% of MUT) GC fraction of (MUT+GC) cpu : 32.2% GC fraction of (MUT+GC) elapsed : 29.2% per-line GC/MUT cpu ratio: median 0.489, p90 1.099 per-line GC/MUT elapsed ratio: median 0.367, p90 0.806 ``` Mutator time is roughly in the same ballpark, but GC CPU time has reduced by 18.22%, and mutator productivity has increased from 63.5% to 67.8%. - - - - - 8372e13d by Cheng Shao at 2026-01-18T10:02:12-05:00 rts: remove unused .def files from rts/win32 This patch removes unused .def files from `rts/win32`, given we don't build .dll files for rts/ghc-internal/ghc-prim at all. Even when we resurrect win32 dll support at some point in the future, these .def files still contain incorrect symbols anyway and won't be of any use. - - - - - f6af485d by Cheng Shao at 2026-01-18T10:03:19-05:00 .gitmodules: use gitlab mirror for the libffi-clib submodule This patch fixes .gitmodules to use the gitlab mirror for the libffi-clib submodule, to make it coherent with other submodules that allow ghc developers to experiment with wip branches in submodules for ghc patches. Fixes #26783. - - - - - 41432d25 by Cheng Shao at 2026-01-18T10:05:13-05:00 hadrian: remove the horrible i386 speedHack When hadrian builds certain rts objects for i386, there's a horrible speedHack that forces -fno-PIC even for dynamic ways of those objects. This is not compatible with newer versions of gcc/binutils as well as clang/lld, and this patch removes it. Fixes #26792. - - - - - 323eb8f0 by Cheng Shao at 2026-01-18T21:48:19-05:00 hadrian: enable split sections for cross stage0 This patch fixes a minor issue with `splitSectionsArgs` in hadrian: previously, it's unconditionally disabled for stage0 libraries because it's not going to be shipped in the final bindists. But it's only true when not cross compiling. So for now we also need to enable it for cross stage0 as well. - - - - - 3fadfefe by Andreas Klebinger at 2026-01-18T21:49:01-05:00 RTS: Document -K behaviour better - - - - - 6b8c5058 by Cheng Shao at 2026-01-19T17:44:59+00:00 ci: update darwin boot ghc to 9.10.3 This patch updates darwin boot ghc to 9.10.3, along with other related updates, and pays off some technical debt here: - Update `nixpkgs` and use the `nixpkgs-25.05-darwin` channel. - Update LLVM to 21 and update `llvm-targets` to reflect LLVM 21 layout changes for arm64/x86_64 darwin targets. - Use `stdenvNoCC` to prevent nix packaged apple sdk from being used by boot ghc, and manually set `DEVELOPER_DIR`/`SDKROOT` to enforce the usage of system-wide command line sdk for macos. - When building nix derivation for boot ghc, run `configure` via the `arch` command so that `configure` and its subprocesses pick up the manually specified architecture. - Remove the previous horrible hack that obliterates `configure` to make every autoconf test result in true. `configure` now properly does its job. - Remove the now obsolete configure args and post install settings file patching logic. - Use `scheme-small` for texlive to avoid build failures in certain unused texlive packages, especially on x86_64-darwin. - - - - - 252 changed files: - .gitignore - .gitlab/ci.sh - .gitlab/darwin/nix/sources.json - .gitlab/darwin/nix/sources.nix - .gitlab/generate-ci/gen_ci.hs - + .gitlab/issue_templates/get-verified.md - .gitlab/jobs.yaml - .gitmodules - CODEOWNERS - cabal.project-reinstall - compiler/GHC/Cmm.hs - compiler/GHC/Cmm/Info.hs - compiler/GHC/Cmm/InitFini.hs - compiler/GHC/Cmm/Utils.hs - compiler/GHC/CmmToAsm/AArch64/Ppr.hs - compiler/GHC/CmmToAsm/Config.hs - compiler/GHC/CmmToAsm/PPC/CodeGen.hs - compiler/GHC/CmmToAsm/Ppr.hs - compiler/GHC/CmmToAsm/Reg/Linear.hs - compiler/GHC/CmmToAsm/Reg/Linear/StackMap.hs - compiler/GHC/CmmToAsm/Wasm/FromCmm.hs - compiler/GHC/CmmToAsm/X86/Ppr.hs - compiler/GHC/CmmToC.hs - compiler/GHC/CmmToLlvm.hs - compiler/GHC/CmmToLlvm/Base.hs - compiler/GHC/CmmToLlvm/Data.hs - compiler/GHC/Core/FamInstEnv.hs - compiler/GHC/Core/Opt/Arity.hs - compiler/GHC/Core/Opt/OccurAnal.hs - compiler/GHC/Core/Opt/Simplify/Env.hs - compiler/GHC/Core/Opt/Simplify/Iteration.hs - compiler/GHC/Core/Opt/Simplify/Utils.hs - compiler/GHC/Core/Opt/SpecConstr.hs - compiler/GHC/Core/Opt/Specialise.hs - compiler/GHC/Core/Opt/WorkWrap.hs - compiler/GHC/Core/Opt/WorkWrap/Utils.hs - compiler/GHC/Core/Rules.hs - compiler/GHC/Core/Subst.hs - compiler/GHC/Core/Tidy.hs - compiler/GHC/Core/TyCo/Subst.hs - compiler/GHC/Core/Unfold.hs - compiler/GHC/Core/Unfold/Make.hs - compiler/GHC/Core/Utils.hs - compiler/GHC/CoreToStg/Prep.hs - compiler/GHC/Driver/Backpack.hs - compiler/GHC/Driver/CodeOutput.hs - compiler/GHC/Driver/Config/CmmToAsm.hs - compiler/GHC/Driver/Config/Interpreter.hs - compiler/GHC/Driver/Downsweep.hs - compiler/GHC/Driver/DynFlags.hs - compiler/GHC/Driver/MakeFile.hs - compiler/GHC/Driver/Pipeline.hs - compiler/GHC/Driver/Pipeline/Execute.hs - compiler/GHC/Driver/Session.hs - compiler/GHC/Linker/Dynamic.hs - compiler/GHC/Linker/Executable.hs - compiler/GHC/Linker/Loader.hs - compiler/GHC/Linker/Unit.hs - compiler/GHC/Runtime/Interpreter/Init.hs - compiler/GHC/Settings.hs - compiler/GHC/Settings/IO.hs - compiler/GHC/Stg/EnforceEpt.hs - compiler/GHC/Stg/Lint.hs - compiler/GHC/StgToCmm/Closure.hs - compiler/GHC/StgToCmm/Expr.hs - compiler/GHC/StgToJS/Linker/Utils.hs - compiler/GHC/SysTools/Terminal.hs - compiler/GHC/Tc/Instance/Family.hs - compiler/GHC/Tc/Solver/Equality.hs - compiler/GHC/Tc/Solver/Monad.hs - compiler/GHC/Types/Id.hs - compiler/GHC/Types/Id/Info.hs - compiler/GHC/Types/Id/Make.hs - compiler/GHC/Unit/Info.hs - compiler/GHC/Unit/State.hs - compiler/GHC/Utils/Binary.hs - config.guess - config.sub - configure.ac - distrib/configure.ac.in - − docs/Makefile - − docs/storage-mgt/Makefile - docs/users_guide/9.16.1-notes.rst - − docs/users_guide/Makefile - docs/users_guide/ghci.rst - docs/users_guide/packages.rst - docs/users_guide/phases.rst - docs/users_guide/runtime_control.rst - docs/users_guide/using-concurrent.rst - docs/users_guide/using.rst - docs/users_guide/win32-dlls.rst - − driver/Makefile - − driver/ghc/Makefile - − driver/ghci/Makefile - driver/ghci/ghci.c - − driver/haddock/Makefile - driver/utils/cwrapper.c - driver/utils/isMinTTY.c - ghc/Main.hs - − ghc/Makefile - hadrian/bindist/cwrappers/cwrapper.c - hadrian/cfg/default.host.target.in - hadrian/cfg/default.target.in - hadrian/doc/flavours.md - hadrian/doc/user-settings.md - hadrian/hadrian.cabal - hadrian/src/Builder.hs - hadrian/src/Packages.hs - hadrian/src/Rules.hs - hadrian/src/Rules/BinaryDist.hs - hadrian/src/Rules/CabalReinstall.hs - hadrian/src/Rules/Documentation.hs - hadrian/src/Rules/Generate.hs - − hadrian/src/Rules/Libffi.hs - hadrian/src/Rules/Program.hs - hadrian/src/Rules/Register.hs - hadrian/src/Rules/Rts.hs - hadrian/src/Rules/SourceDist.hs - hadrian/src/Rules/Test.hs - hadrian/src/Settings/Builders/Cabal.hs - hadrian/src/Settings/Builders/Ghc.hs - hadrian/src/Settings/Builders/Hsc2Hs.hs - hadrian/src/Settings/Builders/SplitSections.hs - hadrian/src/Settings/Default.hs - hadrian/src/Settings/Flavours/Benchmark.hs - hadrian/src/Settings/Flavours/Development.hs - hadrian/src/Settings/Flavours/GhcInGhci.hs - hadrian/src/Settings/Flavours/Performance.hs - hadrian/src/Settings/Flavours/Quick.hs - hadrian/src/Settings/Flavours/QuickCross.hs - hadrian/src/Settings/Flavours/Quickest.hs - hadrian/src/Settings/Flavours/Validate.hs - hadrian/src/Settings/Packages.hs - hadrian/src/Settings/Program.hs - − libffi-tarballs - − libraries/Makefile - libraries/base/base.cabal.in - libraries/base/changelog.md - libraries/base/src/Data/Bifoldable1.hs - libraries/base/src/GHC/Conc.hs - libraries/base/src/GHC/Conc/Sync.hs - − libraries/base/src/GHC/JS/Prim/Internal/Build.hs - libraries/base/tests/IO/T12010/cbits/initWinSock.c - − libraries/doc/Makefile - libraries/ghc-boot/GHC/Unit/Database.hs - libraries/ghc-internal/cbits/consUtils.c - libraries/ghc-internal/configure.ac - libraries/ghc-internal/ghc-internal.buildinfo.in - libraries/ghc-internal/ghc-internal.cabal.in - libraries/ghc-internal/src/GHC/Internal/CString.hs - libraries/ghc-internal/src/GHC/Internal/Conc/IO.hs - libraries/ghc-internal/src/GHC/Internal/Conc/POSIX.hs - libraries/ghc-internal/src/GHC/Internal/Conc/Sync.hs - libraries/ghc-internal/src/GHC/Internal/Conc/Sync.hs-boot - libraries/ghc-internal/src/GHC/Internal/Conc/Windows.hs - libraries/ghc-internal/src/GHC/Internal/ConsoleHandler.hsc - libraries/ghc-internal/src/GHC/Internal/Event/Thread.hs - libraries/ghc-internal/src/GHC/Internal/Event/Windows/Thread.hs - libraries/ghc-internal/src/GHC/Internal/IO/Handle.hs - + libraries/ghc-internal/src/GHC/Internal/STM.hs - libraries/ghc-internal/src/GHC/Internal/System/Environment/ExecutablePath.hsc - libraries/ghc-platform/src/GHC/Platform/ArchOS.hs - libraries/haskeline - + libraries/libffi-clib - libraries/mtl - − linters/lint-codes/Makefile - − linters/lint-notes/Makefile - llvm-passes - llvm-targets - + m4/fp_linker_supports_verbatim.m4 - m4/ghc_select_file_extensions.m4 - m4/prep_target_file.m4 - mk/system-cxx-std-lib-1.0.conf.in - packages - − rts/Makefile - rts/RtsFlags.c - rts/StgMiscClosures.cmm - rts/configure.ac - − rts/include/Makefile - rts/include/rts/ghc_ffi.h - rts/rts.buildinfo.in - rts/rts.cabal - − rts/win32/libHSffi.def - − rts/win32/libHSghc-internal.def - − rts/win32/libHSghc-prim.def - + testsuite/driver/_elffile.py - testsuite/driver/perf_notes.py - testsuite/driver/runtests.py - testsuite/driver/testglobals.py - testsuite/driver/testlib.py - testsuite/ghc-config/ghc-config.hs - testsuite/mk/test.mk - testsuite/tests/deriving/should_fail/T8984.stderr - testsuite/tests/deriving/should_fail/deriving-via-fail.stderr - testsuite/tests/deriving/should_fail/deriving-via-fail4.stderr - testsuite/tests/deriving/should_fail/deriving-via-fail5.stderr - + testsuite/tests/dmdanal/should_run/T26748.hs - + testsuite/tests/dmdanal/should_run/T26748.stdout - testsuite/tests/dmdanal/should_run/all.T - − testsuite/tests/driver/T24731.hs - testsuite/tests/driver/all.T - + testsuite/tests/driver/fully-static/Hello.hs - + testsuite/tests/driver/fully-static/Makefile - + testsuite/tests/driver/fully-static/all.T - + testsuite/tests/driver/fully-static/fully-static.stdout - + testsuite/tests/driver/fully-static/test/Test.hs - + testsuite/tests/driver/fully-static/test/test.pkg - + testsuite/tests/driver/mostly-static/Hello.hs - + testsuite/tests/driver/mostly-static/Makefile - + testsuite/tests/driver/mostly-static/all.T - + testsuite/tests/driver/mostly-static/mostly-static.stdout - + testsuite/tests/driver/mostly-static/test/test.c - + testsuite/tests/driver/mostly-static/test/test.h - + testsuite/tests/driver/mostly-static/test/test.pkg - testsuite/tests/interface-stability/base-exports.stdout - testsuite/tests/interface-stability/base-exports.stdout-javascript-unknown-ghcjs - testsuite/tests/interface-stability/base-exports.stdout-mingw32 - testsuite/tests/interface-stability/base-exports.stdout-ws-32 - testsuite/tests/perf/should_run/all.T - + testsuite/tests/pmcheck/should_compile/T24867.hs - + testsuite/tests/pmcheck/should_compile/T24867.stderr - testsuite/tests/pmcheck/should_compile/all.T - testsuite/tests/rts/linker/rdynamic.hs - testsuite/tests/simplCore/should_compile/T14003.stderr - testsuite/tests/simplCore/should_compile/T18013.stderr - testsuite/tests/simplCore/should_compile/T19672.stderr - testsuite/tests/simplCore/should_compile/T21763.stderr - testsuite/tests/simplCore/should_compile/T21763a.stderr - + testsuite/tests/simplCore/should_compile/T26615.hs - + testsuite/tests/simplCore/should_compile/T26615.stderr - + testsuite/tests/simplCore/should_compile/T26615a.hs - + testsuite/tests/simplCore/should_compile/T26682.hs - + testsuite/tests/simplCore/should_compile/T26682a.hs - + testsuite/tests/simplCore/should_compile/T26709.hs - + testsuite/tests/simplCore/should_compile/T26709.stderr - + testsuite/tests/simplCore/should_compile/T26722.hs - + testsuite/tests/simplCore/should_compile/T26722.stderr - testsuite/tests/simplCore/should_compile/T4908.stderr - testsuite/tests/simplCore/should_compile/all.T - testsuite/tests/simplCore/should_compile/spec-inline.stderr - + testsuite/tests/typecheck/should_compile/T26746.hs - testsuite/tests/typecheck/should_compile/all.T - testsuite/tests/typecheck/should_fail/T15801.stderr - testsuite/tests/typecheck/should_fail/T22924b.stderr - testsuite/tests/typecheck/should_fail/TcCoercibleFail.hs - testsuite/tests/typecheck/should_fail/TcCoercibleFail.stderr - testsuite/tests/typecheck/should_fail/all.T - utils/ghc-pkg/Main.hs - utils/ghc-toolchain/exe/Main.hs - utils/ghc-toolchain/src/GHC/Toolchain/Tools/Link.hs - − utils/iserv/iserv.cabal.in - − utils/iserv/src/Main.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/d3c677589fb093afa92c330ac37feb… -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/d3c677589fb093afa92c330ac37feb… You're receiving this email because of your account on gitlab.haskell.org.
1 0
0 0
[Git][ghc/ghc][wip/ani/hie-spans] 3 commits: do not overwrite err ctxt head when we add err ctxt due to expanded exprs...
by Apoorv Ingle (@ani) 19 Jan '26

19 Jan '26
Apoorv Ingle pushed to branch wip/ani/hie-spans at Glasgow Haskell Compiler / GHC Commits: 05158af4 by Apoorv Ingle at 2026-01-19T11:08:34-06:00 do not overwrite err ctxt head when we add err ctxt due to expanded exprs `(XExpr (OrigStmt{})` fixes RecordDotSyntaxFail test cases where a record is updated within a do statement - - - - - 6c00c974 by Apoorv Ingle at 2026-01-19T11:12:18-06:00 - Make a new variant `GeneratedSrcSpan` in `SrcSpan` for HIEAst Nodes - Fixes T23540 - - - - - 8c567a86 by Apoorv Ingle at 2026-01-19T11:13:02-06:00 remove UnhelpfulGenerated from UnhelpfulSpanReason and into new datatype GeneratedSrcSpanDetails - - - - - 34 changed files: - compiler/GHC.hs - compiler/GHC/Hs/DocString.hs - compiler/GHC/HsToCore/Monad.hs - compiler/GHC/HsToCore/Ticks.hs - compiler/GHC/Iface/Ext/Ast.hs - compiler/GHC/Iface/Ext/Utils.hs - compiler/GHC/Parser/HaddockLex.x - compiler/GHC/Rename/Expr.hs - compiler/GHC/Rename/Names.hs - compiler/GHC/Rename/Utils.hs - compiler/GHC/Runtime/Debugger/Breakpoints.hs - compiler/GHC/Tc/Gen/Do.hs - compiler/GHC/Tc/Gen/Expr.hs - compiler/GHC/Tc/Gen/Splice.hs - compiler/GHC/Tc/Types/CtLoc.hs - compiler/GHC/Tc/Types/LclEnv.hs - compiler/GHC/Tc/Utils/Monad.hs - compiler/GHC/Types/Error.hs - compiler/GHC/Types/Hint/Ppr.hs - compiler/GHC/Types/Name/Reader.hs - compiler/GHC/Types/SrcLoc.hs - compiler/GHC/Utils/Binary.hs - compiler/GHC/Utils/Logger.hs - ghc/GHCi/UI.hs - ghc/GHCi/UI/Info.hs - testsuite/tests/parser/should_fail/RecordDotSyntaxFail10.stderr - testsuite/tests/parser/should_fail/RecordDotSyntaxFail13.stderr - testsuite/tests/parser/should_fail/RecordDotSyntaxFail8.stderr - utils/check-exact/ExactPrint.hs - utils/check-exact/Parsers.hs - utils/check-exact/Transform.hs - utils/check-exact/Utils.hs - utils/haddock/haddock-api/src/Haddock/Backends/Hyperlinker/Parser.hs - utils/haddock/haddock-api/src/Haddock/Backends/Xhtml/Utils.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/79743184cc8c09adf9c83e5db9dff2… -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/79743184cc8c09adf9c83e5db9dff2… You're receiving this email because of your account on gitlab.haskell.org.
1 0
0 0
[Git][ghc/ghc][wip/spj-apporv-Oct24] do not overwrite err ctxt head when we add err ctxt due to expanded exprs...
by Apoorv Ingle (@ani) 19 Jan '26

19 Jan '26
Apoorv Ingle pushed to branch wip/spj-apporv-Oct24 at Glasgow Haskell Compiler / GHC Commits: 05158af4 by Apoorv Ingle at 2026-01-19T11:08:34-06:00 do not overwrite err ctxt head when we add err ctxt due to expanded exprs `(XExpr (OrigStmt{})` fixes RecordDotSyntaxFail test cases where a record is updated within a do statement - - - - - 5 changed files: - compiler/GHC/Tc/Gen/Expr.hs - compiler/GHC/Tc/Types/LclEnv.hs - testsuite/tests/parser/should_fail/RecordDotSyntaxFail10.stderr - testsuite/tests/parser/should_fail/RecordDotSyntaxFail13.stderr - testsuite/tests/parser/should_fail/RecordDotSyntaxFail8.stderr Changes: ===================================== compiler/GHC/Tc/Gen/Expr.hs ===================================== @@ -1522,12 +1522,12 @@ expandRecordUpd record_expr possible_parents rbnds res_ty generatedSrcSpan in (genVarPat fld_nm, genLHsVar fld_nm) - -- STEP 2 (b): expand to HsCase, as per note [Record Updates] + -- STEP 2 (b): expand to HsCase, as per Note [Record Updates] ; let ds_expr :: HsExpr GhcRn ds_expr = HsLet noExtField let_binds (wrapGenSpan case_expr) case_expr :: HsExpr GhcRn - case_expr = HsCase RecUpd record_expr + case_expr = HsCase RecUpd (wrapGenSpan (unLoc record_expr)) $ mkMatchGroup (Generated OtherExpansion DoPmc) (wrapGenSpan matches) matches :: [LMatch GhcRn (LHsExpr GhcRn)] matches = map make_pat (NE.toList relevant_cons) ===================================== compiler/GHC/Tc/Types/LclEnv.hs ===================================== @@ -212,8 +212,11 @@ setLclEnvSrcCodeOrigin ec = modifyLclCtxt (setLclCtxtSrcCodeOrigin ec) -- See Note [ErrCtxtStack Manipulation] setLclCtxtSrcCodeOrigin :: ErrCtxt -> TcLclCtxt -> TcLclCtxt setLclCtxtSrcCodeOrigin ec lclCtxt - | MkErrCtxt (ExpansionCodeCtxt _) _ : ecs <- tcl_err_ctxt lclCtxt - , MkErrCtxt (ExpansionCodeCtxt _) _ <- ec + | MkErrCtxt (ExpansionCodeCtxt{}) _ : ecs <- tcl_err_ctxt lclCtxt + , MkErrCtxt (ExpansionCodeCtxt OrigExpr{}) _ <- ec + = lclCtxt { tcl_err_ctxt = ec : ecs } + | MkErrCtxt (ExpansionCodeCtxt{}) _ : ecs <- tcl_err_ctxt lclCtxt + , MkErrCtxt (ExpansionCodeCtxt{}) _ <- ec = lclCtxt { tcl_err_ctxt = ec : ecs } | otherwise = lclCtxt { tcl_err_ctxt = ec : tcl_err_ctxt lclCtxt } ===================================== testsuite/tests/parser/should_fail/RecordDotSyntaxFail10.stderr ===================================== @@ -4,13 +4,9 @@ RecordDotSyntaxFail10.hs:40:11: error: [GHC-39999] NB: ‘HasField’ is not the built-in ‘GHC.Internal.Records.HasField’ class. Insoluble functional dependencies wrt top-level instances • In the second argument of ‘($)’, namely ‘a {foo.bar.baz.quux}’ + In a stmt of a 'do' block: print $ a {foo.bar.baz.quux} In the expression: do let a = Foo {foo = ...} let quux = "Expecto patronum!" print $ a {foo.bar.baz.quux} - In an equation for ‘main’: - main - = do let a = ... - let quux = "Expecto patronum!" - print $ a {foo.bar.baz.quux} ===================================== testsuite/tests/parser/should_fail/RecordDotSyntaxFail13.stderr ===================================== @@ -4,11 +4,8 @@ RecordDotSyntaxFail13.hs:26:11: error: [GHC-39999] NB: ‘HasField’ is not the built-in ‘GHC.Internal.Records.HasField’ class. Insoluble functional dependencies wrt top-level instances • In the second argument of ‘($)’, namely ‘a {foo}’ + In a stmt of a 'do' block: print $ a {foo} In the expression: do let a = Foo {foo = 12} print $ a {foo} - In an equation for ‘main’: - main - = do let a = ... - print $ a {foo} ===================================== testsuite/tests/parser/should_fail/RecordDotSyntaxFail8.stderr ===================================== @@ -3,6 +3,7 @@ RecordDotSyntaxFail8.hs:47:17: error: [GHC-39999] arising from selecting the field ‘quux1’ NB: ‘HasField’ is not the built-in ‘GHC.Internal.Records.HasField’ class. • In the second argument of ‘($)’, namely ‘....bar.baz.quux1’ + In a stmt of a 'do' block: print @Quux $ ....baz.quux1 In the expression: do let a = Foo {foo = ...} print @Quux $ ....quux1 @@ -10,19 +11,13 @@ RecordDotSyntaxFail8.hs:47:17: error: [GHC-39999] print @Quux $ b.quux2 let c = Foo {foo = ...} ... - In an equation for ‘main’: - main - = do let a = ... - print @Quux $ ....quux1 - let b = myQuux - print @Quux $ b.quux2 - ... RecordDotSyntaxFail8.hs:50:17: error: [GHC-39999] • No instance for ‘HasField "quux2" Quux Quux’ arising from selecting the field ‘quux2’ NB: ‘HasField’ is not the built-in ‘GHC.Internal.Records.HasField’ class. • In the second argument of ‘($)’, namely ‘b.quux2’ + In a stmt of a 'do' block: print @Quux $ b.quux2 In the expression: do let a = Foo {foo = ...} print @Quux $ ....quux1 @@ -30,31 +25,12 @@ RecordDotSyntaxFail8.hs:50:17: error: [GHC-39999] print @Quux $ b.quux2 let c = Foo {foo = ...} ... - In an equation for ‘main’: - main - = do let a = ... - print @Quux $ ....quux1 - let b = myQuux - print @Quux $ b.quux2 - ... RecordDotSyntaxFail8.hs:53:17: error: [GHC-39999] • No instance for ‘HasField "quux3" Quux a0’ arising from selecting the field ‘quux3’ NB: ‘HasField’ is not the built-in ‘GHC.Internal.Records.HasField’ class. • In the expression: ....bar.baz.quux3 - In the expression: - do let a = Foo {foo = ...} - print @Quux $ ....quux1 - let b = myQuux - print @Quux $ b.quux2 - let c = Foo {foo = ...} - ... - In an equation for ‘main’: - main - = do let a = ... - print @Quux $ ....quux1 - let b = myQuux - print @Quux $ b.quux2 - ... + In the second argument of ‘($)’, namely ‘....baz.quux3.wob’ + In a stmt of a 'do' block: print @Bool $ ....quux3.wob View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/05158af44f23fcc04b43a607533b299… -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/05158af44f23fcc04b43a607533b299… You're receiving this email because of your account on gitlab.haskell.org.
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 402
  • 403
  • 404
  • 405
  • 406
  • 407
  • 408
  • ...
  • 864
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.