[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 2 commits: base: Define Semigroup and Monoid instances for lazy ST
by Marge Bot (@marge-bot) 14 Dec '25
by Marge Bot (@marge-bot) 14 Dec '25
14 Dec '25
Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC
Commits:
68f452c4 by Johan Förberg at 2025-12-14T13:14:00-05:00
base: Define Semigroup and Monoid instances for lazy ST
CLC proposal:
https://github.com/haskell/core-libraries-committee/issues/374
Fixes #26581
- - - - -
9895f817 by mangoiv at 2025-12-14T13:14:10-05:00
ci: do not require nightly cabal-reinstall job to succeed
- - - - -
7 changed files:
- .gitlab-ci.yml
- libraries/base/changelog.md
- libraries/ghc-internal/src/GHC/Internal/Control/Monad/ST/Lazy/Imp.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:
=====================================
.gitlab-ci.yml
=====================================
@@ -524,6 +524,7 @@ test-cabal-reinstall-x86_64-linux-deb10:
TEST_ENV: "x86_64-linux-deb10-cabal-install"
rules:
- if: $NIGHTLY
+ allow_failure: true
- if: '$CI_MERGE_REQUEST_LABELS =~ /.*test-reinstall.*/'
########################################
=====================================
libraries/base/changelog.md
=====================================
@@ -14,6 +14,7 @@
* 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)
* 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))
## 4.22.0.0 *TBA*
* Shipped with GHC 9.14.1
=====================================
libraries/ghc-internal/src/GHC/Internal/Control/Monad/ST/Lazy/Imp.hs
=====================================
@@ -214,6 +214,14 @@ fixST m = ST (\ s ->
instance MonadFix (ST s) where
mfix = fixST
+-- | @since base-4.23.0.0
+instance Semigroup a => Semigroup (ST s a) where
+ (<>) = liftA2 (<>)
+
+-- | @since base-4.23.0.0
+instance Monoid a => Monoid (ST s a) where
+ mempty = pure mempty
+
-- ---------------------------------------------------------------------------
-- Strict <--> Lazy
=====================================
testsuite/tests/interface-stability/base-exports.stdout
=====================================
@@ -11318,6 +11318,7 @@ instance forall a k (b :: k). GHC.Internal.Base.Monoid a => GHC.Internal.Base.Mo
instance forall a. GHC.Internal.Base.Monoid a => GHC.Internal.Base.Monoid (GHC.Internal.Conc.Sync.STM a) -- Defined in ‘GHC.Internal.Conc.Sync’
instance GHC.Internal.Base.Monoid GHC.Internal.Exception.Context.ExceptionContext -- Defined in ‘GHC.Internal.Exception.Context’
instance forall a s. GHC.Internal.Base.Monoid a => GHC.Internal.Base.Monoid (GHC.Internal.ST.ST s a) -- Defined in ‘GHC.Internal.ST’
+instance forall a s. GHC.Internal.Base.Monoid a => GHC.Internal.Base.Monoid (GHC.Internal.Control.Monad.ST.Lazy.Imp.ST s a) -- Defined in ‘GHC.Internal.Control.Monad.ST.Lazy.Imp’
instance GHC.Internal.Base.Monoid Data.Array.Byte.ByteArray -- Defined in ‘Data.Array.Byte’
instance forall a. GHC.Internal.Bits.FiniteBits a => GHC.Internal.Base.Monoid (GHC.Internal.Data.Bits.And a) -- Defined in ‘GHC.Internal.Data.Bits’
instance forall a. GHC.Internal.Bits.FiniteBits a => GHC.Internal.Base.Monoid (GHC.Internal.Data.Bits.Iff a) -- Defined in ‘GHC.Internal.Data.Bits’
@@ -11372,6 +11373,7 @@ instance forall a k (b :: k). GHC.Internal.Base.Semigroup a => GHC.Internal.Base
instance forall a. GHC.Internal.Base.Semigroup a => GHC.Internal.Base.Semigroup (GHC.Internal.Conc.Sync.STM a) -- Defined in ‘GHC.Internal.Conc.Sync’
instance GHC.Internal.Base.Semigroup GHC.Internal.Exception.Context.ExceptionContext -- Defined in ‘GHC.Internal.Exception.Context’
instance forall a s. GHC.Internal.Base.Semigroup a => GHC.Internal.Base.Semigroup (GHC.Internal.ST.ST s a) -- Defined in ‘GHC.Internal.ST’
+instance forall a s. GHC.Internal.Base.Semigroup a => GHC.Internal.Base.Semigroup (GHC.Internal.Control.Monad.ST.Lazy.Imp.ST s a) -- Defined in ‘GHC.Internal.Control.Monad.ST.Lazy.Imp’
instance GHC.Internal.Base.Semigroup Data.Array.Byte.ByteArray -- Defined in ‘Data.Array.Byte’
instance forall a. GHC.Internal.Bits.Bits a => GHC.Internal.Base.Semigroup (GHC.Internal.Data.Bits.And a) -- Defined in ‘GHC.Internal.Data.Bits’
instance forall a. GHC.Internal.Bits.FiniteBits a => GHC.Internal.Base.Semigroup (GHC.Internal.Data.Bits.Iff a) -- Defined in ‘GHC.Internal.Data.Bits’
=====================================
testsuite/tests/interface-stability/base-exports.stdout-javascript-unknown-ghcjs
=====================================
@@ -14364,6 +14364,7 @@ instance forall a k (b :: k). GHC.Internal.Base.Monoid a => GHC.Internal.Base.Mo
instance forall a. GHC.Internal.Base.Monoid a => GHC.Internal.Base.Monoid (GHC.Internal.Conc.Sync.STM a) -- Defined in ‘GHC.Internal.Conc.Sync’
instance GHC.Internal.Base.Monoid GHC.Internal.Exception.Context.ExceptionContext -- Defined in ‘GHC.Internal.Exception.Context’
instance forall a s. GHC.Internal.Base.Monoid a => GHC.Internal.Base.Monoid (GHC.Internal.ST.ST s a) -- Defined in ‘GHC.Internal.ST’
+instance forall a s. GHC.Internal.Base.Monoid a => GHC.Internal.Base.Monoid (GHC.Internal.Control.Monad.ST.Lazy.Imp.ST s a) -- Defined in ‘GHC.Internal.Control.Monad.ST.Lazy.Imp’
instance GHC.Internal.Base.Monoid Data.Array.Byte.ByteArray -- Defined in ‘Data.Array.Byte’
instance forall a. GHC.Internal.Bits.FiniteBits a => GHC.Internal.Base.Monoid (GHC.Internal.Data.Bits.And a) -- Defined in ‘GHC.Internal.Data.Bits’
instance forall a. GHC.Internal.Bits.FiniteBits a => GHC.Internal.Base.Monoid (GHC.Internal.Data.Bits.Iff a) -- Defined in ‘GHC.Internal.Data.Bits’
@@ -14415,6 +14416,7 @@ instance forall a k (b :: k). GHC.Internal.Base.Semigroup a => GHC.Internal.Base
instance forall a. GHC.Internal.Base.Semigroup a => GHC.Internal.Base.Semigroup (GHC.Internal.Conc.Sync.STM a) -- Defined in ‘GHC.Internal.Conc.Sync’
instance GHC.Internal.Base.Semigroup GHC.Internal.Exception.Context.ExceptionContext -- Defined in ‘GHC.Internal.Exception.Context’
instance forall a s. GHC.Internal.Base.Semigroup a => GHC.Internal.Base.Semigroup (GHC.Internal.ST.ST s a) -- Defined in ‘GHC.Internal.ST’
+instance forall a s. GHC.Internal.Base.Semigroup a => GHC.Internal.Base.Semigroup (GHC.Internal.Control.Monad.ST.Lazy.Imp.ST s a) -- Defined in ‘GHC.Internal.Control.Monad.ST.Lazy.Imp’
instance GHC.Internal.Base.Semigroup Data.Array.Byte.ByteArray -- Defined in ‘Data.Array.Byte’
instance forall a. GHC.Internal.Bits.Bits a => GHC.Internal.Base.Semigroup (GHC.Internal.Data.Bits.And a) -- Defined in ‘GHC.Internal.Data.Bits’
instance forall a. GHC.Internal.Bits.FiniteBits a => GHC.Internal.Base.Semigroup (GHC.Internal.Data.Bits.Iff a) -- Defined in ‘GHC.Internal.Data.Bits’
=====================================
testsuite/tests/interface-stability/base-exports.stdout-mingw32
=====================================
@@ -11580,6 +11580,7 @@ instance forall a k (b :: k). GHC.Internal.Base.Monoid a => GHC.Internal.Base.Mo
instance forall a. GHC.Internal.Base.Monoid a => GHC.Internal.Base.Monoid (GHC.Internal.Conc.Sync.STM a) -- Defined in ‘GHC.Internal.Conc.Sync’
instance GHC.Internal.Base.Monoid GHC.Internal.Exception.Context.ExceptionContext -- Defined in ‘GHC.Internal.Exception.Context’
instance forall a s. GHC.Internal.Base.Monoid a => GHC.Internal.Base.Monoid (GHC.Internal.ST.ST s a) -- Defined in ‘GHC.Internal.ST’
+instance forall a s. GHC.Internal.Base.Monoid a => GHC.Internal.Base.Monoid (GHC.Internal.Control.Monad.ST.Lazy.Imp.ST s a) -- Defined in ‘GHC.Internal.Control.Monad.ST.Lazy.Imp’
instance GHC.Internal.Base.Monoid Data.Array.Byte.ByteArray -- Defined in ‘Data.Array.Byte’
instance forall a. GHC.Internal.Bits.FiniteBits a => GHC.Internal.Base.Monoid (GHC.Internal.Data.Bits.And a) -- Defined in ‘GHC.Internal.Data.Bits’
instance forall a. GHC.Internal.Bits.FiniteBits a => GHC.Internal.Base.Monoid (GHC.Internal.Data.Bits.Iff a) -- Defined in ‘GHC.Internal.Data.Bits’
@@ -11632,6 +11633,7 @@ instance forall a k (b :: k). GHC.Internal.Base.Semigroup a => GHC.Internal.Base
instance forall a. GHC.Internal.Base.Semigroup a => GHC.Internal.Base.Semigroup (GHC.Internal.Conc.Sync.STM a) -- Defined in ‘GHC.Internal.Conc.Sync’
instance GHC.Internal.Base.Semigroup GHC.Internal.Exception.Context.ExceptionContext -- Defined in ‘GHC.Internal.Exception.Context’
instance forall a s. GHC.Internal.Base.Semigroup a => GHC.Internal.Base.Semigroup (GHC.Internal.ST.ST s a) -- Defined in ‘GHC.Internal.ST’
+instance forall a s. GHC.Internal.Base.Semigroup a => GHC.Internal.Base.Semigroup (GHC.Internal.Control.Monad.ST.Lazy.Imp.ST s a) -- Defined in ‘GHC.Internal.Control.Monad.ST.Lazy.Imp’
instance GHC.Internal.Base.Semigroup Data.Array.Byte.ByteArray -- Defined in ‘Data.Array.Byte’
instance forall a. GHC.Internal.Bits.Bits a => GHC.Internal.Base.Semigroup (GHC.Internal.Data.Bits.And a) -- Defined in ‘GHC.Internal.Data.Bits’
instance forall a. GHC.Internal.Bits.FiniteBits a => GHC.Internal.Base.Semigroup (GHC.Internal.Data.Bits.Iff a) -- Defined in ‘GHC.Internal.Data.Bits’
=====================================
testsuite/tests/interface-stability/base-exports.stdout-ws-32
=====================================
@@ -11318,6 +11318,7 @@ instance forall a k (b :: k). GHC.Internal.Base.Monoid a => GHC.Internal.Base.Mo
instance forall a. GHC.Internal.Base.Monoid a => GHC.Internal.Base.Monoid (GHC.Internal.Conc.Sync.STM a) -- Defined in ‘GHC.Internal.Conc.Sync’
instance GHC.Internal.Base.Monoid GHC.Internal.Exception.Context.ExceptionContext -- Defined in ‘GHC.Internal.Exception.Context’
instance forall a s. GHC.Internal.Base.Monoid a => GHC.Internal.Base.Monoid (GHC.Internal.ST.ST s a) -- Defined in ‘GHC.Internal.ST’
+instance forall a s. GHC.Internal.Base.Monoid a => GHC.Internal.Base.Monoid (GHC.Internal.Control.Monad.ST.Lazy.Imp.ST s a) -- Defined in ‘GHC.Internal.Control.Monad.ST.Lazy.Imp’
instance GHC.Internal.Base.Monoid Data.Array.Byte.ByteArray -- Defined in ‘Data.Array.Byte’
instance forall a. GHC.Internal.Bits.FiniteBits a => GHC.Internal.Base.Monoid (GHC.Internal.Data.Bits.And a) -- Defined in ‘GHC.Internal.Data.Bits’
instance forall a. GHC.Internal.Bits.FiniteBits a => GHC.Internal.Base.Monoid (GHC.Internal.Data.Bits.Iff a) -- Defined in ‘GHC.Internal.Data.Bits’
@@ -11372,6 +11373,7 @@ instance forall a k (b :: k). GHC.Internal.Base.Semigroup a => GHC.Internal.Base
instance forall a. GHC.Internal.Base.Semigroup a => GHC.Internal.Base.Semigroup (GHC.Internal.Conc.Sync.STM a) -- Defined in ‘GHC.Internal.Conc.Sync’
instance GHC.Internal.Base.Semigroup GHC.Internal.Exception.Context.ExceptionContext -- Defined in ‘GHC.Internal.Exception.Context’
instance forall a s. GHC.Internal.Base.Semigroup a => GHC.Internal.Base.Semigroup (GHC.Internal.ST.ST s a) -- Defined in ‘GHC.Internal.ST’
+instance forall a s. GHC.Internal.Base.Semigroup a => GHC.Internal.Base.Semigroup (GHC.Internal.Control.Monad.ST.Lazy.Imp.ST s a) -- Defined in ‘GHC.Internal.Control.Monad.ST.Lazy.Imp’
instance GHC.Internal.Base.Semigroup Data.Array.Byte.ByteArray -- Defined in ‘Data.Array.Byte’
instance forall a. GHC.Internal.Bits.Bits a => GHC.Internal.Base.Semigroup (GHC.Internal.Data.Bits.And a) -- Defined in ‘GHC.Internal.Data.Bits’
instance forall a. GHC.Internal.Bits.FiniteBits a => GHC.Internal.Base.Semigroup (GHC.Internal.Data.Bits.Iff a) -- Defined in ‘GHC.Internal.Data.Bits’
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/209405d3f756e06c08200199723055…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/209405d3f756e06c08200199723055…
You're receiving this email because of your account on gitlab.haskell.org.
1
0
[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 2 commits: base: Define Semigroup and Monoid instances for lazy ST
by Marge Bot (@marge-bot) 14 Dec '25
by Marge Bot (@marge-bot) 14 Dec '25
14 Dec '25
Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC
Commits:
60213034 by Johan Förberg at 2025-12-14T06:57:18-05:00
base: Define Semigroup and Monoid instances for lazy ST
CLC proposal:
https://github.com/haskell/core-libraries-committee/issues/374
Fixes #26581
- - - - -
209405d3 by mangoiv at 2025-12-14T06:57:29-05:00
ci: do not require nightly cabal-reinstall job to succeed
- - - - -
7 changed files:
- .gitlab-ci.yml
- libraries/base/changelog.md
- libraries/ghc-internal/src/GHC/Internal/Control/Monad/ST/Lazy/Imp.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:
=====================================
.gitlab-ci.yml
=====================================
@@ -524,6 +524,7 @@ test-cabal-reinstall-x86_64-linux-deb10:
TEST_ENV: "x86_64-linux-deb10-cabal-install"
rules:
- if: $NIGHTLY
+ allow_failure: true
- if: '$CI_MERGE_REQUEST_LABELS =~ /.*test-reinstall.*/'
########################################
=====================================
libraries/base/changelog.md
=====================================
@@ -14,6 +14,7 @@
* 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)
* 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))
## 4.22.0.0 *TBA*
* Shipped with GHC 9.14.1
=====================================
libraries/ghc-internal/src/GHC/Internal/Control/Monad/ST/Lazy/Imp.hs
=====================================
@@ -214,6 +214,14 @@ fixST m = ST (\ s ->
instance MonadFix (ST s) where
mfix = fixST
+-- | @since base-4.23.0.0
+instance Semigroup a => Semigroup (ST s a) where
+ (<>) = liftA2 (<>)
+
+-- | @since base-4.23.0.0
+instance Monoid a => Monoid (ST s a) where
+ mempty = pure mempty
+
-- ---------------------------------------------------------------------------
-- Strict <--> Lazy
=====================================
testsuite/tests/interface-stability/base-exports.stdout
=====================================
@@ -11318,6 +11318,7 @@ instance forall a k (b :: k). GHC.Internal.Base.Monoid a => GHC.Internal.Base.Mo
instance forall a. GHC.Internal.Base.Monoid a => GHC.Internal.Base.Monoid (GHC.Internal.Conc.Sync.STM a) -- Defined in ‘GHC.Internal.Conc.Sync’
instance GHC.Internal.Base.Monoid GHC.Internal.Exception.Context.ExceptionContext -- Defined in ‘GHC.Internal.Exception.Context’
instance forall a s. GHC.Internal.Base.Monoid a => GHC.Internal.Base.Monoid (GHC.Internal.ST.ST s a) -- Defined in ‘GHC.Internal.ST’
+instance forall a s. GHC.Internal.Base.Monoid a => GHC.Internal.Base.Monoid (GHC.Internal.Control.Monad.ST.Lazy.Imp.ST s a) -- Defined in ‘GHC.Internal.Control.Monad.ST.Lazy.Imp’
instance GHC.Internal.Base.Monoid Data.Array.Byte.ByteArray -- Defined in ‘Data.Array.Byte’
instance forall a. GHC.Internal.Bits.FiniteBits a => GHC.Internal.Base.Monoid (GHC.Internal.Data.Bits.And a) -- Defined in ‘GHC.Internal.Data.Bits’
instance forall a. GHC.Internal.Bits.FiniteBits a => GHC.Internal.Base.Monoid (GHC.Internal.Data.Bits.Iff a) -- Defined in ‘GHC.Internal.Data.Bits’
@@ -11372,6 +11373,7 @@ instance forall a k (b :: k). GHC.Internal.Base.Semigroup a => GHC.Internal.Base
instance forall a. GHC.Internal.Base.Semigroup a => GHC.Internal.Base.Semigroup (GHC.Internal.Conc.Sync.STM a) -- Defined in ‘GHC.Internal.Conc.Sync’
instance GHC.Internal.Base.Semigroup GHC.Internal.Exception.Context.ExceptionContext -- Defined in ‘GHC.Internal.Exception.Context’
instance forall a s. GHC.Internal.Base.Semigroup a => GHC.Internal.Base.Semigroup (GHC.Internal.ST.ST s a) -- Defined in ‘GHC.Internal.ST’
+instance forall a s. GHC.Internal.Base.Semigroup a => GHC.Internal.Base.Semigroup (GHC.Internal.Control.Monad.ST.Lazy.Imp.ST s a) -- Defined in ‘GHC.Internal.Control.Monad.ST.Lazy.Imp’
instance GHC.Internal.Base.Semigroup Data.Array.Byte.ByteArray -- Defined in ‘Data.Array.Byte’
instance forall a. GHC.Internal.Bits.Bits a => GHC.Internal.Base.Semigroup (GHC.Internal.Data.Bits.And a) -- Defined in ‘GHC.Internal.Data.Bits’
instance forall a. GHC.Internal.Bits.FiniteBits a => GHC.Internal.Base.Semigroup (GHC.Internal.Data.Bits.Iff a) -- Defined in ‘GHC.Internal.Data.Bits’
=====================================
testsuite/tests/interface-stability/base-exports.stdout-javascript-unknown-ghcjs
=====================================
@@ -14364,6 +14364,7 @@ instance forall a k (b :: k). GHC.Internal.Base.Monoid a => GHC.Internal.Base.Mo
instance forall a. GHC.Internal.Base.Monoid a => GHC.Internal.Base.Monoid (GHC.Internal.Conc.Sync.STM a) -- Defined in ‘GHC.Internal.Conc.Sync’
instance GHC.Internal.Base.Monoid GHC.Internal.Exception.Context.ExceptionContext -- Defined in ‘GHC.Internal.Exception.Context’
instance forall a s. GHC.Internal.Base.Monoid a => GHC.Internal.Base.Monoid (GHC.Internal.ST.ST s a) -- Defined in ‘GHC.Internal.ST’
+instance forall a s. GHC.Internal.Base.Monoid a => GHC.Internal.Base.Monoid (GHC.Internal.Control.Monad.ST.Lazy.Imp.ST s a) -- Defined in ‘GHC.Internal.Control.Monad.ST.Lazy.Imp’
instance GHC.Internal.Base.Monoid Data.Array.Byte.ByteArray -- Defined in ‘Data.Array.Byte’
instance forall a. GHC.Internal.Bits.FiniteBits a => GHC.Internal.Base.Monoid (GHC.Internal.Data.Bits.And a) -- Defined in ‘GHC.Internal.Data.Bits’
instance forall a. GHC.Internal.Bits.FiniteBits a => GHC.Internal.Base.Monoid (GHC.Internal.Data.Bits.Iff a) -- Defined in ‘GHC.Internal.Data.Bits’
@@ -14415,6 +14416,7 @@ instance forall a k (b :: k). GHC.Internal.Base.Semigroup a => GHC.Internal.Base
instance forall a. GHC.Internal.Base.Semigroup a => GHC.Internal.Base.Semigroup (GHC.Internal.Conc.Sync.STM a) -- Defined in ‘GHC.Internal.Conc.Sync’
instance GHC.Internal.Base.Semigroup GHC.Internal.Exception.Context.ExceptionContext -- Defined in ‘GHC.Internal.Exception.Context’
instance forall a s. GHC.Internal.Base.Semigroup a => GHC.Internal.Base.Semigroup (GHC.Internal.ST.ST s a) -- Defined in ‘GHC.Internal.ST’
+instance forall a s. GHC.Internal.Base.Semigroup a => GHC.Internal.Base.Semigroup (GHC.Internal.Control.Monad.ST.Lazy.Imp.ST s a) -- Defined in ‘GHC.Internal.Control.Monad.ST.Lazy.Imp’
instance GHC.Internal.Base.Semigroup Data.Array.Byte.ByteArray -- Defined in ‘Data.Array.Byte’
instance forall a. GHC.Internal.Bits.Bits a => GHC.Internal.Base.Semigroup (GHC.Internal.Data.Bits.And a) -- Defined in ‘GHC.Internal.Data.Bits’
instance forall a. GHC.Internal.Bits.FiniteBits a => GHC.Internal.Base.Semigroup (GHC.Internal.Data.Bits.Iff a) -- Defined in ‘GHC.Internal.Data.Bits’
=====================================
testsuite/tests/interface-stability/base-exports.stdout-mingw32
=====================================
@@ -11580,6 +11580,7 @@ instance forall a k (b :: k). GHC.Internal.Base.Monoid a => GHC.Internal.Base.Mo
instance forall a. GHC.Internal.Base.Monoid a => GHC.Internal.Base.Monoid (GHC.Internal.Conc.Sync.STM a) -- Defined in ‘GHC.Internal.Conc.Sync’
instance GHC.Internal.Base.Monoid GHC.Internal.Exception.Context.ExceptionContext -- Defined in ‘GHC.Internal.Exception.Context’
instance forall a s. GHC.Internal.Base.Monoid a => GHC.Internal.Base.Monoid (GHC.Internal.ST.ST s a) -- Defined in ‘GHC.Internal.ST’
+instance forall a s. GHC.Internal.Base.Monoid a => GHC.Internal.Base.Monoid (GHC.Internal.Control.Monad.ST.Lazy.Imp.ST s a) -- Defined in ‘GHC.Internal.Control.Monad.ST.Lazy.Imp’
instance GHC.Internal.Base.Monoid Data.Array.Byte.ByteArray -- Defined in ‘Data.Array.Byte’
instance forall a. GHC.Internal.Bits.FiniteBits a => GHC.Internal.Base.Monoid (GHC.Internal.Data.Bits.And a) -- Defined in ‘GHC.Internal.Data.Bits’
instance forall a. GHC.Internal.Bits.FiniteBits a => GHC.Internal.Base.Monoid (GHC.Internal.Data.Bits.Iff a) -- Defined in ‘GHC.Internal.Data.Bits’
@@ -11632,6 +11633,7 @@ instance forall a k (b :: k). GHC.Internal.Base.Semigroup a => GHC.Internal.Base
instance forall a. GHC.Internal.Base.Semigroup a => GHC.Internal.Base.Semigroup (GHC.Internal.Conc.Sync.STM a) -- Defined in ‘GHC.Internal.Conc.Sync’
instance GHC.Internal.Base.Semigroup GHC.Internal.Exception.Context.ExceptionContext -- Defined in ‘GHC.Internal.Exception.Context’
instance forall a s. GHC.Internal.Base.Semigroup a => GHC.Internal.Base.Semigroup (GHC.Internal.ST.ST s a) -- Defined in ‘GHC.Internal.ST’
+instance forall a s. GHC.Internal.Base.Semigroup a => GHC.Internal.Base.Semigroup (GHC.Internal.Control.Monad.ST.Lazy.Imp.ST s a) -- Defined in ‘GHC.Internal.Control.Monad.ST.Lazy.Imp’
instance GHC.Internal.Base.Semigroup Data.Array.Byte.ByteArray -- Defined in ‘Data.Array.Byte’
instance forall a. GHC.Internal.Bits.Bits a => GHC.Internal.Base.Semigroup (GHC.Internal.Data.Bits.And a) -- Defined in ‘GHC.Internal.Data.Bits’
instance forall a. GHC.Internal.Bits.FiniteBits a => GHC.Internal.Base.Semigroup (GHC.Internal.Data.Bits.Iff a) -- Defined in ‘GHC.Internal.Data.Bits’
=====================================
testsuite/tests/interface-stability/base-exports.stdout-ws-32
=====================================
@@ -11318,6 +11318,7 @@ instance forall a k (b :: k). GHC.Internal.Base.Monoid a => GHC.Internal.Base.Mo
instance forall a. GHC.Internal.Base.Monoid a => GHC.Internal.Base.Monoid (GHC.Internal.Conc.Sync.STM a) -- Defined in ‘GHC.Internal.Conc.Sync’
instance GHC.Internal.Base.Monoid GHC.Internal.Exception.Context.ExceptionContext -- Defined in ‘GHC.Internal.Exception.Context’
instance forall a s. GHC.Internal.Base.Monoid a => GHC.Internal.Base.Monoid (GHC.Internal.ST.ST s a) -- Defined in ‘GHC.Internal.ST’
+instance forall a s. GHC.Internal.Base.Monoid a => GHC.Internal.Base.Monoid (GHC.Internal.Control.Monad.ST.Lazy.Imp.ST s a) -- Defined in ‘GHC.Internal.Control.Monad.ST.Lazy.Imp’
instance GHC.Internal.Base.Monoid Data.Array.Byte.ByteArray -- Defined in ‘Data.Array.Byte’
instance forall a. GHC.Internal.Bits.FiniteBits a => GHC.Internal.Base.Monoid (GHC.Internal.Data.Bits.And a) -- Defined in ‘GHC.Internal.Data.Bits’
instance forall a. GHC.Internal.Bits.FiniteBits a => GHC.Internal.Base.Monoid (GHC.Internal.Data.Bits.Iff a) -- Defined in ‘GHC.Internal.Data.Bits’
@@ -11372,6 +11373,7 @@ instance forall a k (b :: k). GHC.Internal.Base.Semigroup a => GHC.Internal.Base
instance forall a. GHC.Internal.Base.Semigroup a => GHC.Internal.Base.Semigroup (GHC.Internal.Conc.Sync.STM a) -- Defined in ‘GHC.Internal.Conc.Sync’
instance GHC.Internal.Base.Semigroup GHC.Internal.Exception.Context.ExceptionContext -- Defined in ‘GHC.Internal.Exception.Context’
instance forall a s. GHC.Internal.Base.Semigroup a => GHC.Internal.Base.Semigroup (GHC.Internal.ST.ST s a) -- Defined in ‘GHC.Internal.ST’
+instance forall a s. GHC.Internal.Base.Semigroup a => GHC.Internal.Base.Semigroup (GHC.Internal.Control.Monad.ST.Lazy.Imp.ST s a) -- Defined in ‘GHC.Internal.Control.Monad.ST.Lazy.Imp’
instance GHC.Internal.Base.Semigroup Data.Array.Byte.ByteArray -- Defined in ‘Data.Array.Byte’
instance forall a. GHC.Internal.Bits.Bits a => GHC.Internal.Base.Semigroup (GHC.Internal.Data.Bits.And a) -- Defined in ‘GHC.Internal.Data.Bits’
instance forall a. GHC.Internal.Bits.FiniteBits a => GHC.Internal.Base.Semigroup (GHC.Internal.Data.Bits.Iff a) -- Defined in ‘GHC.Internal.Data.Bits’
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/3af44b93111e63a11904592d7e31f9…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/3af44b93111e63a11904592d7e31f9…
You're receiving this email because of your account on gitlab.haskell.org.
1
0
[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 6 commits: ci: use treeless fetch for perf notes
by Marge Bot (@marge-bot) 14 Dec '25
by Marge Bot (@marge-bot) 14 Dec '25
14 Dec '25
Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC
Commits:
3c001377 by Cheng Shao at 2025-12-13T05:03:15-05:00
ci: use treeless fetch for perf notes
This patch improves the ci logic for fetching perf notes by using
treeless fetch
(https://github.blog/open-source/git/get-up-to-speed-with-partial-clone-and-…)
to avoid downloading all blobs of the perf notes repo at once, and
only fetch the actually required blobs on-demand when needed. This
makes the initial `test-metrics.sh pull` operation much faster, and
also more robust, since we are seeing an increasing rate of 504 errors
in CI when fetching all perf notes at once, which is a major source of
CI flakiness at this point.
Co-authored-by: Codex <codex(a)openai.com>
- - - - -
123a8d77 by Peter Trommler at 2025-12-13T05:03:57-05:00
Cmm: remove restriction in MachOp folding
- - - - -
0b54b5fd by Andreas Klebinger at 2025-12-13T05:04:38-05:00
Remove explicit Typeable deriviations.
- - - - -
08b13f7b by Cheng Shao at 2025-12-13T05:05:18-05:00
ci: set gc.auto=0 during setup stage
This patch sets `gc.auto=0` during `setup` stage of CI, see added
comment for detailed explanation.
- - - - -
3b5aecb5 by Ben Gamari at 2025-12-13T23:43:10+01:00
Bump exceptions submodule to 0.10.11
- - - - -
3af44b93 by Johan Förberg at 2025-12-13T21:56:37-05:00
base: Define Semigroup and Monoid instances for lazy ST
CLC proposal:
https://github.com/haskell/core-libraries-committee/issues/374
Fixes #26581
- - - - -
20 changed files:
- .gitlab/ci.sh
- .gitlab/test-metrics.sh
- compiler/GHC/Cmm/Opt.hs
- hadrian/src/Hadrian/Haskell/Cabal/Type.hs
- hadrian/src/Hadrian/Haskell/Hash.hs
- hadrian/src/Hadrian/Oracles/ArgsHash.hs
- hadrian/src/Hadrian/Oracles/Cabal/Type.hs
- hadrian/src/Hadrian/Oracles/DirectoryContents.hs
- hadrian/src/Hadrian/Oracles/Path.hs
- hadrian/src/Hadrian/Oracles/TextFile.hs
- hadrian/src/Hadrian/Utilities.hs
- hadrian/src/Oracles/Flavour.hs
- hadrian/src/Oracles/ModuleFiles.hs
- libraries/base/changelog.md
- libraries/exceptions
- libraries/ghc-internal/src/GHC/Internal/Control/Monad/ST/Lazy/Imp.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:
=====================================
.gitlab/ci.sh
=====================================
@@ -259,6 +259,12 @@ function setup() {
git config user.email "ghc-ci(a)gitlab-haskell.org"
git config user.name "GHC GitLab CI"
+ # Disable auto gc. Useless in a temporary checkout, and
+ # non-deterministic "Auto packing the repository in background for
+ # optimum performance." message could pop up that confuses the
+ # testsuite driver!
+ git config gc.auto 0
+
info "====================================================="
info "Toolchain versions"
info "====================================================="
=====================================
.gitlab/test-metrics.sh
=====================================
@@ -17,12 +17,14 @@ fail() {
function pull() {
local ref="refs/notes/$REF"
- # 2023-10-04: `git fetch` started failing, first on Darwin in CI and then on
- # Linux locally, both using git version 2.40.1. See #24055. One workaround is
- # to set a larger http.postBuffer, although this is definitely a workaround.
- # The default should work just fine. The error could be in git, GitLab, or
- # perhaps the networking tube (including all proxies etc) between the two.
- run git -c http.postBuffer=2097152 fetch -f "$NOTES_ORIGIN" "$ref:$ref"
+
+ # Fetch performance notes from a dedicated promisor remote using a
+ # treeless filter, so that individual note blobs are fetched lazily
+ # as needed.
+ git remote add perf-notes "$NOTES_ORIGIN" || true
+ git config fetch.recurseSubmodules false
+ git config remote.perf-notes.partialclonefilter tree:0
+ run git fetch --force perf-notes "$ref:$ref"
echo "perf notes ref $ref is $(git rev-parse $ref)"
}
@@ -81,4 +83,3 @@ case $1 in
pull) pull ;;
*) fail "Invalid mode $1" ;;
esac
-
=====================================
compiler/GHC/Cmm/Opt.hs
=====================================
@@ -290,9 +290,7 @@ cmmMachOpFoldM _ (MO_Sub _) [CmmLit lit, CmmLit (CmmInt i rep)]
-- the same comparison at the larger size.
cmmMachOpFoldM platform cmp [CmmMachOp conv [x], CmmLit (CmmInt i _)]
- | -- powerPC NCG has a TODO for I8/I16 comparisons, so don't try
- platformArch platform `elem` [ArchX86, ArchX86_64],
- -- if the operand is widened:
+ | -- if the operand is widened:
Just (rep, signed, narrow_fn) <- maybe_conversion conv,
-- and this is a comparison operation:
Just narrow_cmp <- maybe_comparison cmp rep signed,
=====================================
hadrian/src/Hadrian/Haskell/Cabal/Type.hs
=====================================
@@ -31,7 +31,7 @@ data PackageData = PackageData
, description :: String
, packageDependencies :: [Package]
, genericPackageDescription :: GenericPackageDescription
- } deriving (Eq, Generic, Show, Typeable)
+ } deriving (Eq, Generic, Show)
-- | Haskell package metadata obtained after resolving package configuration
-- flags and associated conditionals according to the current build context.
@@ -75,7 +75,7 @@ data ContextData = ContextData
, contextLibdir :: FilePath
-- The location where dynamic libraries go
, contextDynLibdir :: FilePath
- } deriving (Eq, Generic, Show, Typeable)
+ } deriving (Eq, Generic, Show)
instance Binary PackageData
instance Hashable PackageData where hashWithSalt salt = hashWithSalt salt . show
=====================================
hadrian/src/Hadrian/Haskell/Hash.hs
=====================================
@@ -108,7 +108,7 @@ data PackageHashConfigInputs = PackageHashConfigInputs {
deriving Show
newtype PkgHashKey = PkgHashKey (Stage, Package)
- deriving (Binary, Eq, Hashable, NFData, Show, Typeable)
+ deriving (Binary, Eq, Hashable, NFData, Show)
type instance RuleResult PkgHashKey = String
pkgHash :: Stage -> Package -> Action String
=====================================
hadrian/src/Hadrian/Oracles/ArgsHash.hs
=====================================
@@ -38,7 +38,7 @@ trackArgsHash t = do
void (askOracle $ ArgsHash hashedTarget :: Action Int)
newtype ArgsHash c b = ArgsHash (Target c b)
- deriving (Binary, Eq, Hashable, NFData, Show, Typeable)
+ deriving (Binary, Eq, Hashable, NFData, Show)
type instance RuleResult (ArgsHash c b) = Int
-- | This oracle stores per-target argument list hashes in the Shake database,
=====================================
hadrian/src/Hadrian/Oracles/Cabal/Type.hs
=====================================
@@ -26,13 +26,13 @@ import Stage
-- | This type of oracle key is used by 'Hadrian.Oracles.Cabal.readPackageData'
-- to cache reading and parsing of 'Hadrian.Haskell.Cabal.Type.PackageData'.
newtype PackageDataKey = PackageDataKey Package
- deriving (Binary, Eq, Hashable, NFData, Show, Typeable)
+ deriving (Binary, Eq, Hashable, NFData, Show)
type instance RuleResult PackageDataKey = PackageData
-- | This type of oracle key is used by 'Hadrian.Oracles.Cabal.readContextData'
-- to cache reading and parsing of 'Hadrian.Haskell.Cabal.Type.ContextData'.
newtype ContextDataKey = ContextDataKey Context
- deriving (Binary, Eq, Hashable, NFData, Show, Typeable)
+ deriving (Binary, Eq, Hashable, NFData, Show)
type instance RuleResult ContextDataKey = ContextData
-- TODO: Should @PackageConfiguration@ be simply @()@? Presumably the pair
@@ -40,7 +40,7 @@ type instance RuleResult ContextDataKey = ContextData
-- | The result of Cabal package configuration produced by the oracle
-- 'Hadrian.Oracles.Cabal.configurePackageGHC'.
newtype PackageConfiguration = PackageConfiguration (C.Compiler, C.Platform)
- deriving (Binary, Eq, Show, Typeable)
+ deriving (Binary, Eq, Show)
instance NFData PackageConfiguration where
rnf (PackageConfiguration (c, p)) =
@@ -58,5 +58,5 @@ instance Hashable PackageConfiguration where
-- | This type of oracle key is used by 'Hadrian.Oracles.Cabal.configurePackageGHC'
-- to cache configuration of a Cabal package.
newtype PackageConfigurationKey = PackageConfigurationKey (Package, Stage)
- deriving (Binary, Eq, Hashable, NFData, Show, Typeable)
+ deriving (Binary, Eq, Hashable, NFData, Show)
type instance RuleResult PackageConfigurationKey = PackageConfiguration
=====================================
hadrian/src/Hadrian/Oracles/DirectoryContents.hs
=====================================
@@ -15,7 +15,7 @@ import Hadrian.Utilities
import qualified System.Directory.Extra as IO
data Match = Test FilePattern | Not Match | And [Match] | Or [Match]
- deriving (Generic, Eq, Show, Typeable)
+ deriving (Generic, Eq, Show)
instance Binary Match
instance Hashable Match
@@ -54,7 +54,7 @@ copyDirectoryContentsUntracked expr source target = do
mapM_ cp =<< directoryContents expr source
newtype DirectoryContents = DirectoryContents (Match, FilePath)
- deriving (Binary, Eq, Hashable, NFData, Show, Typeable)
+ deriving (Binary, Eq, Hashable, NFData, Show)
type instance RuleResult DirectoryContents = [FilePath]
-- | This oracle answers 'directoryContents' queries and tracks the results.
=====================================
hadrian/src/Hadrian/Oracles/Path.hs
=====================================
@@ -34,11 +34,11 @@ fixAbsolutePathOnWindows path =
return path
newtype LookupInPath = LookupInPath String
- deriving (Binary, Eq, Hashable, NFData, Show, Typeable)
+ deriving (Binary, Eq, Hashable, NFData, Show)
type instance RuleResult LookupInPath = String
newtype WindowsPath = WindowsPath FilePath
- deriving (Binary, Eq, Hashable, NFData, Show, Typeable)
+ deriving (Binary, Eq, Hashable, NFData, Show)
type instance RuleResult WindowsPath = String
-- | Oracles for looking up paths. These are slow and require caching.
=====================================
hadrian/src/Hadrian/Oracles/TextFile.hs
=====================================
@@ -118,15 +118,15 @@ queryTargetTarget :: (Toolchain.Target -> a) -> Action a
queryTargetTarget f = f <$> getTargetTarget
newtype KeyValue = KeyValue (FilePath, String)
- deriving (Binary, Eq, Hashable, NFData, Show, Typeable)
+ deriving (Binary, Eq, Hashable, NFData, Show)
type instance RuleResult KeyValue = Maybe String
newtype KeyValues = KeyValues (FilePath, String)
- deriving (Binary, Eq, Hashable, NFData, Show, Typeable)
+ deriving (Binary, Eq, Hashable, NFData, Show)
type instance RuleResult KeyValues = Maybe [String]
newtype TargetFile = TargetFile FilePath
- deriving (Binary, Eq, Hashable, NFData, Show, Typeable)
+ deriving (Binary, Eq, Hashable, NFData, Show)
type instance RuleResult TargetFile = Toolchain.Target
-- | These oracle rules are used to cache and track answers to the following
=====================================
hadrian/src/Hadrian/Utilities.hs
=====================================
@@ -298,7 +298,7 @@ userSettingRules defaultValue = do
extra <- shakeExtra <$> getShakeOptionsRules
return $ lookupExtra defaultValue extra
-newtype BuildRoot = BuildRoot FilePath deriving (Typeable, Eq, Show)
+newtype BuildRoot = BuildRoot FilePath deriving (Eq, Show)
-- | All build results are put into the 'buildRoot' directory.
buildRoot :: Action FilePath
@@ -484,7 +484,6 @@ putColoured code msg = do
else putInfo msg
newtype BuildProgressColour = BuildProgressColour String
- deriving Typeable
-- | By default, Hadrian tries to figure out if the current terminal
-- supports colors using this function. The default can be overridden
@@ -511,7 +510,6 @@ putBuild msg = do
putColoured code msg
newtype SuccessColour = SuccessColour String
- deriving Typeable
-- | Generate an encoded colour for successful output from names
mkSuccessColour :: Colour -> SuccessColour
@@ -528,7 +526,6 @@ putSuccess msg = do
putColoured code msg
newtype FailureColour = FailureColour String
- deriving Typeable
-- | Generate an encoded colour for failure output messages
mkFailureColour :: Colour -> FailureColour
@@ -544,7 +541,7 @@ putFailure msg = do
FailureColour code <- userSetting red
putColoured code msg
-data ProgressInfo = None | Brief | Normal | Unicorn deriving (Eq, Show, Typeable)
+data ProgressInfo = None | Brief | Normal | Unicorn deriving (Eq, Show)
-- | Version of 'putBuild' controlled by @--progress-info@ command line argument.
putProgressInfo :: String -> Action ()
=====================================
hadrian/src/Oracles/Flavour.hs
=====================================
@@ -14,11 +14,11 @@ import Flavour
import Settings (flavour)
newtype DynGhcPrograms =
- DynGhcPrograms () deriving (Show, Typeable, Eq, Hashable, Binary, NFData)
+ DynGhcPrograms () deriving (Show, Eq, Hashable, Binary, NFData)
type instance RuleResult DynGhcPrograms = Bool
newtype GhcProfiled =
- GhcProfiled Stage deriving (Show, Typeable, Eq, Hashable, Binary, NFData)
+ GhcProfiled Stage deriving (Show, Eq, Hashable, Binary, NFData)
type instance RuleResult GhcProfiled = Bool
oracles :: Rules ()
=====================================
hadrian/src/Oracles/ModuleFiles.hs
=====================================
@@ -16,11 +16,11 @@ import Expression
type ModuleName = String
newtype ModuleFiles = ModuleFiles (Stage, Package)
- deriving (Binary, Eq, Hashable, NFData, Show, Typeable)
+ deriving (Binary, Eq, Hashable, NFData, Show)
type instance RuleResult ModuleFiles = [Maybe FilePath]
newtype Generator = Generator (Stage, Package, FilePath)
- deriving (Binary, Eq, Hashable, NFData, Show, Typeable)
+ deriving (Binary, Eq, Hashable, NFData, Show)
type instance RuleResult Generator = Maybe FilePath
-- | We scan for the following Haskell source extensions when looking for module
=====================================
libraries/base/changelog.md
=====================================
@@ -14,6 +14,7 @@
* 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)
* 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))
## 4.22.0.0 *TBA*
* Shipped with GHC 9.14.1
=====================================
libraries/exceptions
=====================================
@@ -1 +1 @@
-Subproject commit b6c4290124eb1138358bf04ad9f33e67f6c5c1d8
+Subproject commit 81bfd6e0ca631f315658201ae02e30046678f056
=====================================
libraries/ghc-internal/src/GHC/Internal/Control/Monad/ST/Lazy/Imp.hs
=====================================
@@ -214,6 +214,14 @@ fixST m = ST (\ s ->
instance MonadFix (ST s) where
mfix = fixST
+-- | @since base-4.23.0.0
+instance Semigroup a => Semigroup (ST s a) where
+ (<>) = liftA2 (<>)
+
+-- | @since base-4.23.0.0
+instance Monoid a => Monoid (ST s a) where
+ mempty = pure mempty
+
-- ---------------------------------------------------------------------------
-- Strict <--> Lazy
=====================================
testsuite/tests/interface-stability/base-exports.stdout
=====================================
@@ -11318,6 +11318,7 @@ instance forall a k (b :: k). GHC.Internal.Base.Monoid a => GHC.Internal.Base.Mo
instance forall a. GHC.Internal.Base.Monoid a => GHC.Internal.Base.Monoid (GHC.Internal.Conc.Sync.STM a) -- Defined in ‘GHC.Internal.Conc.Sync’
instance GHC.Internal.Base.Monoid GHC.Internal.Exception.Context.ExceptionContext -- Defined in ‘GHC.Internal.Exception.Context’
instance forall a s. GHC.Internal.Base.Monoid a => GHC.Internal.Base.Monoid (GHC.Internal.ST.ST s a) -- Defined in ‘GHC.Internal.ST’
+instance forall a s. GHC.Internal.Base.Monoid a => GHC.Internal.Base.Monoid (GHC.Internal.Control.Monad.ST.Lazy.Imp.ST s a) -- Defined in ‘GHC.Internal.Control.Monad.ST.Lazy.Imp’
instance GHC.Internal.Base.Monoid Data.Array.Byte.ByteArray -- Defined in ‘Data.Array.Byte’
instance forall a. GHC.Internal.Bits.FiniteBits a => GHC.Internal.Base.Monoid (GHC.Internal.Data.Bits.And a) -- Defined in ‘GHC.Internal.Data.Bits’
instance forall a. GHC.Internal.Bits.FiniteBits a => GHC.Internal.Base.Monoid (GHC.Internal.Data.Bits.Iff a) -- Defined in ‘GHC.Internal.Data.Bits’
@@ -11372,6 +11373,7 @@ instance forall a k (b :: k). GHC.Internal.Base.Semigroup a => GHC.Internal.Base
instance forall a. GHC.Internal.Base.Semigroup a => GHC.Internal.Base.Semigroup (GHC.Internal.Conc.Sync.STM a) -- Defined in ‘GHC.Internal.Conc.Sync’
instance GHC.Internal.Base.Semigroup GHC.Internal.Exception.Context.ExceptionContext -- Defined in ‘GHC.Internal.Exception.Context’
instance forall a s. GHC.Internal.Base.Semigroup a => GHC.Internal.Base.Semigroup (GHC.Internal.ST.ST s a) -- Defined in ‘GHC.Internal.ST’
+instance forall a s. GHC.Internal.Base.Semigroup a => GHC.Internal.Base.Semigroup (GHC.Internal.Control.Monad.ST.Lazy.Imp.ST s a) -- Defined in ‘GHC.Internal.Control.Monad.ST.Lazy.Imp’
instance GHC.Internal.Base.Semigroup Data.Array.Byte.ByteArray -- Defined in ‘Data.Array.Byte’
instance forall a. GHC.Internal.Bits.Bits a => GHC.Internal.Base.Semigroup (GHC.Internal.Data.Bits.And a) -- Defined in ‘GHC.Internal.Data.Bits’
instance forall a. GHC.Internal.Bits.FiniteBits a => GHC.Internal.Base.Semigroup (GHC.Internal.Data.Bits.Iff a) -- Defined in ‘GHC.Internal.Data.Bits’
=====================================
testsuite/tests/interface-stability/base-exports.stdout-javascript-unknown-ghcjs
=====================================
@@ -14364,6 +14364,7 @@ instance forall a k (b :: k). GHC.Internal.Base.Monoid a => GHC.Internal.Base.Mo
instance forall a. GHC.Internal.Base.Monoid a => GHC.Internal.Base.Monoid (GHC.Internal.Conc.Sync.STM a) -- Defined in ‘GHC.Internal.Conc.Sync’
instance GHC.Internal.Base.Monoid GHC.Internal.Exception.Context.ExceptionContext -- Defined in ‘GHC.Internal.Exception.Context’
instance forall a s. GHC.Internal.Base.Monoid a => GHC.Internal.Base.Monoid (GHC.Internal.ST.ST s a) -- Defined in ‘GHC.Internal.ST’
+instance forall a s. GHC.Internal.Base.Monoid a => GHC.Internal.Base.Monoid (GHC.Internal.Control.Monad.ST.Lazy.Imp.ST s a) -- Defined in ‘GHC.Internal.Control.Monad.ST.Lazy.Imp’
instance GHC.Internal.Base.Monoid Data.Array.Byte.ByteArray -- Defined in ‘Data.Array.Byte’
instance forall a. GHC.Internal.Bits.FiniteBits a => GHC.Internal.Base.Monoid (GHC.Internal.Data.Bits.And a) -- Defined in ‘GHC.Internal.Data.Bits’
instance forall a. GHC.Internal.Bits.FiniteBits a => GHC.Internal.Base.Monoid (GHC.Internal.Data.Bits.Iff a) -- Defined in ‘GHC.Internal.Data.Bits’
@@ -14415,6 +14416,7 @@ instance forall a k (b :: k). GHC.Internal.Base.Semigroup a => GHC.Internal.Base
instance forall a. GHC.Internal.Base.Semigroup a => GHC.Internal.Base.Semigroup (GHC.Internal.Conc.Sync.STM a) -- Defined in ‘GHC.Internal.Conc.Sync’
instance GHC.Internal.Base.Semigroup GHC.Internal.Exception.Context.ExceptionContext -- Defined in ‘GHC.Internal.Exception.Context’
instance forall a s. GHC.Internal.Base.Semigroup a => GHC.Internal.Base.Semigroup (GHC.Internal.ST.ST s a) -- Defined in ‘GHC.Internal.ST’
+instance forall a s. GHC.Internal.Base.Semigroup a => GHC.Internal.Base.Semigroup (GHC.Internal.Control.Monad.ST.Lazy.Imp.ST s a) -- Defined in ‘GHC.Internal.Control.Monad.ST.Lazy.Imp’
instance GHC.Internal.Base.Semigroup Data.Array.Byte.ByteArray -- Defined in ‘Data.Array.Byte’
instance forall a. GHC.Internal.Bits.Bits a => GHC.Internal.Base.Semigroup (GHC.Internal.Data.Bits.And a) -- Defined in ‘GHC.Internal.Data.Bits’
instance forall a. GHC.Internal.Bits.FiniteBits a => GHC.Internal.Base.Semigroup (GHC.Internal.Data.Bits.Iff a) -- Defined in ‘GHC.Internal.Data.Bits’
=====================================
testsuite/tests/interface-stability/base-exports.stdout-mingw32
=====================================
@@ -11580,6 +11580,7 @@ instance forall a k (b :: k). GHC.Internal.Base.Monoid a => GHC.Internal.Base.Mo
instance forall a. GHC.Internal.Base.Monoid a => GHC.Internal.Base.Monoid (GHC.Internal.Conc.Sync.STM a) -- Defined in ‘GHC.Internal.Conc.Sync’
instance GHC.Internal.Base.Monoid GHC.Internal.Exception.Context.ExceptionContext -- Defined in ‘GHC.Internal.Exception.Context’
instance forall a s. GHC.Internal.Base.Monoid a => GHC.Internal.Base.Monoid (GHC.Internal.ST.ST s a) -- Defined in ‘GHC.Internal.ST’
+instance forall a s. GHC.Internal.Base.Monoid a => GHC.Internal.Base.Monoid (GHC.Internal.Control.Monad.ST.Lazy.Imp.ST s a) -- Defined in ‘GHC.Internal.Control.Monad.ST.Lazy.Imp’
instance GHC.Internal.Base.Monoid Data.Array.Byte.ByteArray -- Defined in ‘Data.Array.Byte’
instance forall a. GHC.Internal.Bits.FiniteBits a => GHC.Internal.Base.Monoid (GHC.Internal.Data.Bits.And a) -- Defined in ‘GHC.Internal.Data.Bits’
instance forall a. GHC.Internal.Bits.FiniteBits a => GHC.Internal.Base.Monoid (GHC.Internal.Data.Bits.Iff a) -- Defined in ‘GHC.Internal.Data.Bits’
@@ -11632,6 +11633,7 @@ instance forall a k (b :: k). GHC.Internal.Base.Semigroup a => GHC.Internal.Base
instance forall a. GHC.Internal.Base.Semigroup a => GHC.Internal.Base.Semigroup (GHC.Internal.Conc.Sync.STM a) -- Defined in ‘GHC.Internal.Conc.Sync’
instance GHC.Internal.Base.Semigroup GHC.Internal.Exception.Context.ExceptionContext -- Defined in ‘GHC.Internal.Exception.Context’
instance forall a s. GHC.Internal.Base.Semigroup a => GHC.Internal.Base.Semigroup (GHC.Internal.ST.ST s a) -- Defined in ‘GHC.Internal.ST’
+instance forall a s. GHC.Internal.Base.Semigroup a => GHC.Internal.Base.Semigroup (GHC.Internal.Control.Monad.ST.Lazy.Imp.ST s a) -- Defined in ‘GHC.Internal.Control.Monad.ST.Lazy.Imp’
instance GHC.Internal.Base.Semigroup Data.Array.Byte.ByteArray -- Defined in ‘Data.Array.Byte’
instance forall a. GHC.Internal.Bits.Bits a => GHC.Internal.Base.Semigroup (GHC.Internal.Data.Bits.And a) -- Defined in ‘GHC.Internal.Data.Bits’
instance forall a. GHC.Internal.Bits.FiniteBits a => GHC.Internal.Base.Semigroup (GHC.Internal.Data.Bits.Iff a) -- Defined in ‘GHC.Internal.Data.Bits’
=====================================
testsuite/tests/interface-stability/base-exports.stdout-ws-32
=====================================
@@ -11318,6 +11318,7 @@ instance forall a k (b :: k). GHC.Internal.Base.Monoid a => GHC.Internal.Base.Mo
instance forall a. GHC.Internal.Base.Monoid a => GHC.Internal.Base.Monoid (GHC.Internal.Conc.Sync.STM a) -- Defined in ‘GHC.Internal.Conc.Sync’
instance GHC.Internal.Base.Monoid GHC.Internal.Exception.Context.ExceptionContext -- Defined in ‘GHC.Internal.Exception.Context’
instance forall a s. GHC.Internal.Base.Monoid a => GHC.Internal.Base.Monoid (GHC.Internal.ST.ST s a) -- Defined in ‘GHC.Internal.ST’
+instance forall a s. GHC.Internal.Base.Monoid a => GHC.Internal.Base.Monoid (GHC.Internal.Control.Monad.ST.Lazy.Imp.ST s a) -- Defined in ‘GHC.Internal.Control.Monad.ST.Lazy.Imp’
instance GHC.Internal.Base.Monoid Data.Array.Byte.ByteArray -- Defined in ‘Data.Array.Byte’
instance forall a. GHC.Internal.Bits.FiniteBits a => GHC.Internal.Base.Monoid (GHC.Internal.Data.Bits.And a) -- Defined in ‘GHC.Internal.Data.Bits’
instance forall a. GHC.Internal.Bits.FiniteBits a => GHC.Internal.Base.Monoid (GHC.Internal.Data.Bits.Iff a) -- Defined in ‘GHC.Internal.Data.Bits’
@@ -11372,6 +11373,7 @@ instance forall a k (b :: k). GHC.Internal.Base.Semigroup a => GHC.Internal.Base
instance forall a. GHC.Internal.Base.Semigroup a => GHC.Internal.Base.Semigroup (GHC.Internal.Conc.Sync.STM a) -- Defined in ‘GHC.Internal.Conc.Sync’
instance GHC.Internal.Base.Semigroup GHC.Internal.Exception.Context.ExceptionContext -- Defined in ‘GHC.Internal.Exception.Context’
instance forall a s. GHC.Internal.Base.Semigroup a => GHC.Internal.Base.Semigroup (GHC.Internal.ST.ST s a) -- Defined in ‘GHC.Internal.ST’
+instance forall a s. GHC.Internal.Base.Semigroup a => GHC.Internal.Base.Semigroup (GHC.Internal.Control.Monad.ST.Lazy.Imp.ST s a) -- Defined in ‘GHC.Internal.Control.Monad.ST.Lazy.Imp’
instance GHC.Internal.Base.Semigroup Data.Array.Byte.ByteArray -- Defined in ‘Data.Array.Byte’
instance forall a. GHC.Internal.Bits.Bits a => GHC.Internal.Base.Semigroup (GHC.Internal.Data.Bits.And a) -- Defined in ‘GHC.Internal.Data.Bits’
instance forall a. GHC.Internal.Bits.FiniteBits a => GHC.Internal.Base.Semigroup (GHC.Internal.Data.Bits.Iff a) -- Defined in ‘GHC.Internal.Data.Bits’
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/c866c3db1f5daaa7c724e84d3075b2…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/c866c3db1f5daaa7c724e84d3075b2…
You're receiving this email because of your account on gitlab.haskell.org.
1
0
[Git][ghc/ghc][wip/T26538] 98 commits: compiler: Exclude units with no exposed modules from unused package check
by Cheng Shao (@TerrorJack) 14 Dec '25
by Cheng Shao (@TerrorJack) 14 Dec '25
14 Dec '25
Cheng Shao pushed to branch wip/T26538 at Glasgow Haskell Compiler / GHC
Commits:
5cdcfaed by Ben Gamari at 2025-11-06T09:01:36-05:00
compiler: Exclude units with no exposed modules from unused package check
Such packages cannot be "used" in the Haskell sense of the word yet
are nevertheless necessary as they may provide, e.g., C object code or
link flags.
Fixes #24120.
- - - - -
74b8397a by Brandon Chinn at 2025-11-06T09:02:19-05:00
Replace deprecated argparse.FileType
- - - - -
36ddf988 by Ben Gamari at 2025-11-06T09:03:01-05:00
Bump unix submodule to 2.8.8.0
Closes #26474.
- - - - -
c32b3a29 by fendor at 2025-11-06T09:03:43-05:00
Fix assertion in `postStringLen` to account for \0 byte
We fix the assertion to handle trailing \0 bytes in `postStringLen`.
Before this change, the assertion looked like this:
ASSERT(eb->begin + eb->size > eb->pos + len + 1);
Let's assume some values to see why this is actually off by one:
eb->begin = 0
eb->size = 1
eb->pos = 0
len = 1
then the assertion would trigger correctly:
0 + 1 > 0 + 1 + 1 => 1 > 2 => false
as there is not enough space for the \0 byte (which is the trailing +1).
However, if we change `eb->size = 2`, then we do have enough space for a
string of length 1, but the assertion still fails:
0 + 2 > 0 + 1 + 1 => 2 > 2 => false
Which causes the assertion to fail if there is exactly enough space for
the string with a trailing \0 byte.
Clearly, the assertion should be `>=`!
If we switch around the operand, it should become more obvious that `<=`
is the correct comparison:
ASSERT(eb->pos + len + 1 <= eb->begin + eb->size);
This is expresses more naturally that the current position plus the
length of the string (and the null byte) must be smaller or equal to the
overall size of the buffer.
This change also is in line with the implementation in
`hasRoomForEvent` and `hasRoomForVariableEvent`:
```
StgBool hasRoomForEvent(EventsBuf *eb, EventTypeNum eNum)
{
uint32_t size = ...;
if (eb->pos + size > eb->begin + eb->size)
...
```
the check `eb->pos + size > eb->begin + eb->size` is identical to
`eb->pos + size <= eb->begin + eb->size` plus a negation.
- - - - -
3034a6f2 by Ben Gamari at 2025-11-06T09:04:24-05:00
Bump os-string submodule to 2.0.8
- - - - -
39567e85 by Cheng Shao at 2025-11-06T09:05:06-05:00
rts: use computed goto for instruction dispatch in the bytecode interpreter
This patch uses computed goto for instruction dispatch in the bytecode
interpreter. Previously instruction dispatch is done by a classic
switch loop, so executing the next instruction requires two jumps: one
to the start of the switch loop and another to the case block based on
the instruction tag. By using computed goto, we can build a jump table
consisted of code addresses indexed by the instruction tags
themselves, so executing the next instruction requires only one jump,
to the destination directly fetched from the jump table.
Closes #12953.
- - - - -
93fc7265 by sheaf at 2025-11-06T21:33:24-05:00
Correct hasFixedRuntimeRep in matchExpectedFunTys
This commit fixes a bug in the representation-polymormorphism check in
GHC.Tc.Utils.Unify.matchExpectedFunTys. The problem was that we put
the coercion resulting from hasFixedRuntimeRep in the wrong place,
leading to the Core Lint error reported in #26528.
The change is that we have to be careful when using 'mkWpFun': it
expects **both** the expected and actual argument types to have a
syntactically fixed RuntimeRep, as explained in Note [WpFun-FRR-INVARIANT]
in GHC.Tc.Types.Evidence.
On the way, this patch improves some of the commentary relating to
other usages of 'mkWpFun' in the compiler, in particular in the view
pattern case of 'tc_pat'. No functional changes, but some stylistic
changes to make the code more readable, and make it easier to understand
how we are upholding the WpFun-FRR-INVARIANT.
Fixes #26528
- - - - -
c052c724 by Simon Peyton Jones at 2025-11-06T21:34:06-05:00
Fix a horrible shadowing bug in implicit parameters
Fixes #26451. The change is in GHC.Tc.Solver.Monad.updInertDicts
where we now do /not/ delete /Wanted/ implicit-parameeter constraints.
This bug has been in GHC since 9.8! But it's quite hard to provoke;
I contructed a tests in T26451, but it was hard to do so.
- - - - -
b253013e by Georgios Karachalias at 2025-11-07T17:21:57-05:00
Remove the `CoreBindings` constructor from `LinkablePart`
Adjust HscRecompStatus to disallow unhydrated WholeCoreBindings
from being passed as input to getLinkDeps (which would previously
panic in this case).
Fixes #26497
- - - - -
ac7b737e by Sylvain Henry at 2025-11-07T17:22:51-05:00
Testsuite: pass ext-interp test way (#26552)
Note that some tests are still marked as broken with the ext-interp way
(see #26552 and #14335)
- - - - -
3c2f4bb4 by sheaf at 2025-11-11T11:47:28-05:00
Preserve user-written kinds in data declarations
This commit ensures that we preserve the user-written kind for data
declarations, e.g. in
type T2T = Type -> Type
type D :: T2T
data D a where { .. }
that we preserve the user-written kind of D as 'T2T', instead of
expanding the type synonym 'T2T' during kind checking.
We do this by storing 'tyConKind' separately from 'tyConResKind'. This
means that 'tyConKind' is not necessarily equal to
'mkTyConKind binders res_kind', as e.g. in the above example the former
is 'T2T' while the latter is 'Type -> Type'.
This is explained in Note [Preserve user-written TyCon kind] in GHC.Core.TyCon.
This is particularly important for Haddock, as the kinds stored in
interface files affect the generated documentation, and we want to
preserve the user-written types as much as possible.
- - - - -
19859584 by sheaf at 2025-11-11T11:47:28-05:00
Store user-written datacon tvs in interface files
This commit ensures we store the user-written quantified type variables
of data constructors in interface files, e.g. in
data D a where
MkD1 :: forall x. x -> D x
MkD2 :: forall u v. u -> v -> D v
The previous behaviour was to rename the universal variables to match
the universal variables of the data constructor. This was undesirable
because the names that end up in interface files end up mattering for
generated Haddock documentation; it's better to preserve the user-written
type variables.
Moreover, the universal variables may not have been user-written at all,
e.g. in an example such as:
type T2T = Type -> Type
data G :: T2T where
MkG :: forall x. D x
Here GHC will invent the type variable name 'a' for the first binder of
the TyCon G. We really don't want to then rename the user-written 'x'
into the generated 'a'.
- - - - -
034b2056 by sheaf at 2025-11-11T11:47:28-05:00
DataCon univ_tvs names: pick TyCon over inferred
This commit changes how we compute the names of universal type variables
in GADT data constructors. This augments the existing logic that chose
which type variable name to use, in GHC.Tc.TyCl.mkGADTVars. We continue
to prefer DataCon tv names for user-written binders, but we now prefer
TyCon tv names for inferred (non-user-written) DataCon binders.
This makes a difference in examples such as:
type (:~~:) :: k1 -> k2 -> Type
data a :~~: b where
HRefl :: a :~~: a
Before this patch, we ended up giving HRefl the type:
forall {k2}. forall (a :: k2). a :~~: a
whereas we now give it the type:
forall {k1}. forall (a :: k1). a :~~: a
The important part isn't really 'k1' or 'k2', but more that the inferred
type variable names of the DataCon can be arbitrary/unpredictable (as
they are chosen by GHC and depend on how unification proceeds), so it's
much better to use the more predictable TyCon type variable names.
- - - - -
95078d00 by sheaf at 2025-11-11T11:47:28-05:00
Backpack Rename: use explicit record construction
This commit updates the Backpack boilerplate in GHC.Iface.Rename to
use explicit record construction rather than record update. This makes
sure that the code stays up to date when the underlying constructors
change (e.g. new fields are added). The rationale is further explained
in Note [Prefer explicit record construction].
- - - - -
2bf36263 by sheaf at 2025-11-11T11:47:28-05:00
Store # eta binders in TyCon and use for Haddock
This commit stores the number of TyCon binders that were introduced by
eta-expansion (by the function GHC.Tc.Gen.HsType.splitTyConKind).
This is then used to pretty-print the TyCon as the user wrote it, e.g.
for
type Effect :: (Type -> Type) -> Type -> Type
data State s :: Effect where {..} -- arity 3
GHC will eta-expand the data declaration to
data State s a b where {..}
but also store in the 'TyCon' that the number of binders introduced by
this eta expansion is 2. This allows us, in
'Haddock.Convert.synifyTyConKindSig', to recover the original user-written
syntax, preserving the user's intent in Haddock documentation.
See Note [Inline kind signatures with GADTSyntax] in Haddock.Convert.
- - - - -
6c91582f by Matthew Pickering at 2025-11-11T11:48:12-05:00
driver: Properly handle errors during LinkNode steps
Previously we were not properly catching errors during the LinkNode step
(see T9930fail test).
This is fixed by wrapping the `LinkNode` action in `wrapAction`, the
same handler which is used for module compilation.
Fixes #26496
- - - - -
e1e1eb32 by Matthew Pickering at 2025-11-11T11:48:54-05:00
driver: Remove unecessary call to hscInsertHPT
This call was left-over from e9445c013fbccf9318739ca3d095a3e0a2e1be8a
If you follow the functions which call `upsweep_mod`, they immediately
add the interface to the HomePackageTable when `upsweep_mod` returns.
- - - - -
b22777d4 by ARATA Mizuki at 2025-11-11T11:49:44-05:00
LLVM backend: Pass the +evex512 attribute to LLVM 18+ if -mavx512f is set
The newer LLVM requires the +evex512 attribute to enable use of ZMM registers.
LLVM exhibits a backward-compatible behavior if the cpu is `x86-64`, but not if `penryn`.
Therefore, on macOS, where the cpu is set to `penryn`, we need to explicitly pass +evex512.
Fixes #26410
- - - - -
6ead7d06 by Vladislav Zavialov at 2025-11-11T11:50:26-05:00
Comments only in GHC.Parser.PostProcess.Haddock
Remove outdated Note [Register keyword location], as the issue it describes
was addressed by commit 05eb50dff2fcc78d025e77b9418ddb369db49b9f.
- - - - -
43fa8be8 by sheaf at 2025-11-11T11:51:18-05:00
localRegistersConflict: account for assignment LHS
This commit fixes a serious oversight in GHC.Cmm.Sink.conflicts,
specifically the code that computes which local registers conflict
between an assignment and a Cmm statement.
If we have:
assignment: <local_reg> = <expr>
node: <local_reg> = <other_expr>
then clearly the two conflict, because we cannot move one statement past
the other, as they assign two different values to the same local
register. (Recall that 'conflicts (local_reg,expr) node' is False if and
only if the assignment 'local_reg = expr' can be safely commuted past
the statement 'node'.)
The fix is to update 'GHC.Cmm.Sink.localRegistersConflict' to take into
account the following two situations:
(1) 'node' defines the LHS local register of the assignment,
(2) 'node' defines a local register used in the RHS of the assignment.
The bug is precisely that we were previously missing condition (1).
Fixes #26550
- - - - -
79dfcfe0 by sheaf at 2025-11-11T11:51:18-05:00
Update assigned register format when spilling
When we come to spilling a register to put new data into it, in
GHC.CmmToAsm.Reg.Linear.allocRegsAndSpill_spill, we need to:
1. Spill the data currently in the register. That is, do a spill
with a format that matches what's currently in the register.
2. Update the register assignment, allocating a virtual register to
this real register, but crucially **updating the format** of this
assignment.
Due to shadowing in the Haskell code for allocRegsAndSpill_spill, we
were mistakenly re-using the old format. This could lead to a situation
where:
a. We were using xmm6 to store a Double#.
b. We want to store a DoubleX2# into xmm6, so we spill the current
content of xmm6 to the stack using a scalar move (correct).
c. We update the register assignment, but we fail to update the format
of the assignment, so we continue to think that xmm6 stores a
Double# and not a DoubleX2#.
d. Later on, we need to spill xmm6 because it is getting clobbered by
another instruction. We then decide to only spill the lower 64 bits
of the register, because we still think that xmm6 only stores a
Double# and not a DoubleX2#.
Fixes #26542
- - - - -
aada5db9 by ARATA Mizuki at 2025-11-11T11:52:07-05:00
Fix the order of spill/reload instructions
The AArch64 NCG could emit multiple instructions for a single spill/reload,
but their order was not consistent between the definition and a use.
Fixes #26537
Co-authored-by: sheaf <sam.derbyshire(a)gmail.com>
- - - - -
64ec82ff by Andreas Klebinger at 2025-11-11T11:52:48-05:00
Add hpc to release script
- - - - -
741da00c by Ben Gamari at 2025-11-12T03:38:20-05:00
template-haskell: Better describe getQ semantics
Clarify that the state is a type-indexed map, as suggested by #26484.
- - - - -
8b080e04 by ARATA Mizuki at 2025-11-12T03:39:11-05:00
Fix incorrect markups in the User's Guide
* Correct markup for C--: "C-\-" in reST
* Fix internal links
* Fix code highlighting
* Fix inline code: Use ``code`` rather than `code`
* Remove extra backslashes
Fixes #16812
Co-authored-by: sheaf <sam.derbyshire(a)gmail.com>
- - - - -
a00840ea by Simon Peyton Jones at 2025-11-14T15:23:56+00:00
Make TYPE and CONSTRAINT apart again
This patch finally fixes #24279.
* The story started with #11715
* Then #21623 articulated a plan, which made Type and Constraint
not-apart; a horrible hack but it worked. The main patch was
commit 778c6adca2c995cd8a1b84394d4d5ca26b915dac
Author: Simon Peyton Jones <simonpj(a)microsoft.com>
Date: Wed Nov 9 10:33:22 2022 +0000
Type vs Constraint: finally nailed
* #24279 reported a bug in the above big commit; this small patch fixes it
commit af6932d6c068361c6ae300d52e72fbe13f8e1f18
Author: Simon Peyton Jones <simon.peytonjones(a)gmail.com>
Date: Mon Jan 8 10:49:49 2024 +0000
Make TYPE and CONSTRAINT not-apart
Issue #24279 showed up a bug in the logic in GHC.Core.Unify.unify_ty
which is supposed to make TYPE and CONSTRAINT be not-apart.
* Then !10479 implemented "unary classes".
* That change in turn allows us to make Type and Constraint apart again,
cleaning up the compiler and allowing a little bit more expressiveness.
It fixes the original hope in #24279, namely that `Type` and `Constraint`
should be distinct throughout.
- - - - -
c0a1e574 by Georgios Karachalias at 2025-11-15T05:14:31-05:00
Report all missing modules with -M
We now report all missing modules at once in GHC.Driver.Makefile.processDeps,
as opposed to only reporting a single missing module. Fixes #26551.
- - - - -
c9fa3449 by Sylvain Henry at 2025-11-15T05:15:26-05:00
JS: fix array index for registers
We used to store R32 in h$regs[-1]. While it's correct in JavaScript,
fix this to store R32 in h$regs[0] instead.
- - - - -
9e469909 by Sylvain Henry at 2025-11-15T05:15:26-05:00
JS: support more than 128 registers (#26558)
The JS backend only supported 128 registers (JS variables/array slots
used to pass function arguments). It failed in T26537 when 129
registers were required.
This commit adds support for more than 128 registers: it is now limited to
maxBound :: Int (compiler's Int). If we ever go above this threshold the
compiler now panics with a more descriptive message.
A few built-in JS functions were assuming 128 registers and have been
rewritten to use loops. Note that loops are only used for "high"
registers that are stored in an array: the 31 "low" registers are still
handled with JS global variables and with explicit switch-cases to
maintain good performance in the most common cases (i.e. few registers
used). Adjusting the number of low registers is now easy: just one
constant to adjust (GHC.StgToJS.Regs.lowRegsCount).
No new test added: T26537 is used as a regression test instead.
- - - - -
0a64a78b by Sven Tennie at 2025-11-15T20:31:10-05:00
AArch64: Simplify CmmAssign and CmmStore
The special handling for floats was fake: The general case is always
used. So, the additional code path isn't needed (and only adds
complexity for the reader.)
- - - - -
15b311be by sheaf at 2025-11-15T20:32:02-05:00
SimpleOpt: refactor & push coercions into lambdas
This commit improves the simple optimiser (in GHC.Core.SimpleOpt)
in a couple of ways:
- The logic to push coercion lambdas is shored up.
The function 'pushCoercionIntoLambda' used to be called in 'finish_app',
but this meant we could not continue to optimise the program after
performing this transformation.
Now, we call 'pushCoercionIntoLambda' as part of 'simple_app'.
Doing so can be important when dealing with unlifted newtypes,
as explained in Note [Desugaring unlifted newtypes].
- The code is re-structured to avoid duplication and out-of-sync
code paths.
Now, 'simple_opt_expr' defers to 'simple_app' for the 'App', 'Var',
'Cast' and 'Lam' cases. This means all the logic for those is
centralised in a single place (e.g. the 'go_lam' helper function).
To do this, the general structure is brought a bit closer to the
full-blown simplifier, with a notion of 'continuation'
(see 'SimpleContItem').
This commit also modifies GHC.Core.Opt.Arity.pushCoercionIntoLambda to
apply a substitution (a slight generalisation of its existing implementation).
- - - - -
b33284c7 by sheaf at 2025-11-15T20:32:02-05:00
Improve typechecking of data constructors
This commit changes the way in which we perform typecheck data
constructors, in particular how we make multiplicities line up.
Now, impedance matching occurs as part of the existing subsumption
machinery. See the revamped Note [Typechecking data constructors] in
GHC.Tc.Gen.App, as well as Note [Polymorphisation of linear fields]
in GHC.Core.Multiplicity.
This allows us to get rid of a fair amount of hacky code that was
added with the introduction of LinearTypes; in particular the logic of
GHC.Tc.Gen.Head.tcInferDataCon.
-------------------------
Metric Decrease:
T10421
T14766
T15164
T15703
T19695
T5642
T9630
WWRec
-------------------------
- - - - -
b6faf5d0 by sheaf at 2025-11-15T20:32:02-05:00
Handle unsaturated rep-poly newtypes
This commit allows GHC to handle unsaturated occurrences of unlifted
newtype constructors. The plan is detailed in
Note [Eta-expanding rep-poly unlifted newtypes]
in GHC.Tc.Utils.Concrete: for unsaturated unlifted newtypes, we perform
the appropriate representation-polymorphism check in tcInstFun.
- - - - -
682bf979 by Mike Pilgrem at 2025-11-16T16:44:14+00:00
Fix #26293 Valid stack.yaml for hadrian
- - - - -
acc70c3a by Simon Peyton Jones at 2025-11-18T16:21:20-05:00
Fix a bug in defaulting
Addresses #26582
Defaulting was doing some unification but then failing to
iterate. Silly.
I discovered that the main solver was unnecessarily iterating even
if there was a unification for an /outer/ unification variable, so
I fixed that too.
- - - - -
c12fa73e by Simon Peyton Jones at 2025-11-19T02:55:01-05:00
Make PmLit be in Ord, and use it in Map
This MR addresses #26514, by changing from
data PmAltConSet = PACS !(UniqDSet ConLike) ![PmLit]
to
data PmAltConSet = PACS !(UniqDSet ConLike) !(Map PmLit PmLit)
This matters when doing pattern-match overlap checking, when there
is a very large set of patterns. For most programs it makes
no difference at all.
For the N=5000 case of the repro case in #26514, compiler
mutator time (with `-fno-code`) goes from 1.9s to 0.43s.
All for the price for an Ord instance for PmLit
- - - - -
41b84f40 by sheaf at 2025-11-19T02:55:52-05:00
Add passing tests for #26311 and #26072
This commit adds two tests cases that now pass since landing the changes
to typechecking of data constructors in b33284c7.
Fixes #26072 #26311
- - - - -
1faa758a by sheaf at 2025-11-19T02:55:52-05:00
mkCast: weaken bad cast warning for multiplicity
This commit weakens the warning message emitted when constructing a bad
cast in mkCast to ignore multiplicity.
Justification: since b33284c7, GHC uses sub-multiplicity coercions to
typecheck data constructors. The coercion optimiser is free to discard
these coercions, both for performance reasons, and because GHC's Core
simplifier does not (yet) preserve linearity.
We thus weaken 'mkCast' to use 'eqTypeIgnoringMultiplicity' instead of
'eqType', to avoid getting many spurious warnings about mismatched
multiplicities.
- - - - -
55eab80d by Sylvain Henry at 2025-11-20T17:33:13-05:00
Build external interpreter program on demand (#24731)
This patch teaches GHC how to build the external interpreter program
when it is missing. As long as we have the `ghci` library, doing this is
trivial so most of this patch is refactoring for doing it sanely.
- - - - -
08bbc028 by Rodrigo Mesquita at 2025-11-20T17:33:54-05:00
Add tests for #23973 and #26565
These were fixed by 4af4f0f070f83f948e49ad5d7835fd91b8d3f0e6 in !10417
- - - - -
6b42232c by sheaf at 2025-11-20T17:34:35-05:00
Mark T26410_ffi as fragile on Windows
As seen in #26595, this test intermittently fails on Windows.
This commit marks it as fragile, until we get around to fixing it.
- - - - -
b7b7c049 by Andrew Lelechenko at 2025-11-21T21:04:01+00:00
Add nubOrd / nubOrdBy to Data.List and Data.List.NonEmpty
As per https://github.com/haskell/core-libraries-committee/issues/336
- - - - -
352d5462 by Marc Scholten at 2025-11-22T10:33:03-05:00
Fix haddock test runner to handle UTF-8 output
xhtml 3000.4.0.0 now produces UTF-8 output instead of escaping non-ASCII characters.
When using --test-accept it previously wrote files in the wrong encoding
because they have not been decoded properly when reading the files.
- - - - -
48a3ed57 by Simon Peyton Jones at 2025-11-25T15:33:54+00:00
Add a fast-path for args=[] to occAnalApp
In the common case of having not arguments, occAnalApp
was doing redundant work.
- - - - -
951e5ed9 by Simon Peyton Jones at 2025-11-25T15:33:54+00:00
Fix a performance hole in the occurrence analyser
As #26425 showed, the clever stuff in
Note [Occurrence analysis for join points]
does a lot of duplication of usage details. This patch
improved matters with a little fancy footwork. It is
described in the new (W4) of the same Note.
Compile-time allocations go down slightly. Here are the changes
of +/- 0.5% or more:
T13253(normal) 329,369,244 326,395,544 -0.9%
T13253-spj(normal) 66,410,496 66,095,864 -0.5%
T15630(normal) 129,797,200 128,663,136 -0.9%
T15630a(normal) 129,212,408 128,027,560 -0.9%
T16577(normal) 6,756,706,896 6,723,028,512 -0.5%
T18282(normal) 128,462,070 125,808,584 -2.1% GOOD
T18698a(normal) 208,418,305 202,037,336 -3.1% GOOD
T18730(optasm) 136,981,756 136,208,136 -0.6%
T18923(normal) 58,103,088 57,745,840 -0.6%
T19695(normal) 1,386,306,272 1,365,609,416 -1.5%
T26425(normal) 3,344,402,957 2,457,811,664 -26.5% GOOD
T6048(optasm) 79,763,816 79,212,760 -0.7%
T9020(optasm) 225,278,408 223,682,440 -0.7%
T9961(normal) 303,810,717 300,729,168 -1.0% GOOD
geo. mean -0.5%
minimum -26.5%
maximum +0.4%
Metric Decrease:
T18282
T18698a
T26425
T9961
- - - - -
f1959dfc by Simon Peyton Jones at 2025-11-26T11:58:07+00:00
Remove a quadratic-cost assertion check in mkCoreApp
See the new Note [Assertion checking in mkCoreApp]
- - - - -
98fa0d36 by Simon Hengel at 2025-11-27T17:54:57-05:00
Fix typo in docs/users_guide/exts/type_families.rst
- - - - -
5b97e5ce by Simon Hengel at 2025-11-27T17:55:37-05:00
Fix broken RankNTypes example in user's guide
- - - - -
fa2aaa00 by Simon Peyton Jones at 2025-11-27T17:56:18-05:00
Switch off specialisation in ExactPrint
In !15057 (where we re-introduced -fpolymoprhic-specialisation) we found
that ExactPrint's compile time blew up by a factor of 5. It turned out
to be caused by bazillions of specialisations of `markAnnotated`.
Since ExactPrint isn't perf-critical, it does not seem worth taking
the performance hit, so this patch switches off specialisation in
this one module.
- - - - -
1fd25987 by Simon Peyton Jones at 2025-11-27T17:56:18-05:00
Switch -fpolymorphic-specialisation on by default
This patch addresses #23559.
Now that !10479 has landed and #26329 is fixed, we can switch on
polymorphic specialisation by default, addressing a bunch of other
tickets listed in #23559.
Metric changes:
* CoOpt_Singleton: +4% compiler allocations: we just get more
specialisations
* info_table_map_perf: -20% decrease in compiler allocations.
This is caused by using -fno-specialise in ExactPrint.hs
Without that change we get a 4x blow-up in compile time;
see !15058 for details
Metric Decrease:
info_table_map_perf
Metric Increase:
CoOpt_Singletons
- - - - -
b7fe7445 by Matthew Pickering at 2025-11-27T17:56:59-05:00
rts: Fix a deadlock with eventlog flush interval and RTS shutdown
The ghc_ticker thread attempts to flush at the eventlog tick interval, this requires
waiting to take all capabilities.
At the same time, the main thread is shutting down, the schedule is
stopped and then we wait for the ticker thread to finish.
Therefore we are deadlocked.
The solution is to use `newBoundTask/exitMyTask`, so that flushing can
cooperate with the scheduler shutdown.
Fixes #26573
- - - - -
1d4a1229 by sheaf at 2025-11-27T17:58:02-05:00
SimpleOpt: don't subst in pushCoercionIntoLambda
It was noticed in #26589 that the change in 15b311be was incorrect:
the simple optimiser carries two different substitution-like pieces of
information: 'soe_subst' (from InVar to OutExpr) and 'soe_inl'
(from InId to InExpr). It is thus incorrect to have 'pushCoercionIntoLambda'
apply the substitution from 'soe_subst' while discarding 'soe_inl'
entirely, which is what was done in 15b311be.
Instead, we change back pushCoercionIntoLambda to take an InScopeSet,
and optimise the lambda before calling 'pushCoercionIntoLambda' to avoid
mixing InExpr with OutExpr, or mixing two InExpr with different
environments. We can then call 'soeZapSubst' without problems.
Fixes #26588 #26589
- - - - -
84a087d5 by Sylvain Henry at 2025-11-28T17:35:28-05:00
Fix PIC jump tables on Windows (#24016)
Avoid overflows in jump tables by using a base label closer to the jump
targets. See added Note [Jump tables]
- - - - -
82db7042 by Zubin Duggal at 2025-11-28T17:36:10-05:00
rts/linker/PEi386: Copy strings before they are inserted into LoadedDllCache. The original strings are temporary and might be freed at an arbitrary point.
Fixes #26613
- - - - -
ff3f0d09 by Ben Gamari at 2025-11-29T18:34:28-05:00
gitlab-ci: Run ghcup-metadata jobs on OpenCape runners
This significantly reduces our egress traffic
and makes the jobs significantly faster.
- - - - -
ef0dc33b by Matthew Pickering at 2025-11-29T18:35:10-05:00
Use 'OsPath' in getModificationTimeIfExists
This part of the compiler is quite hot during recompilation checking in
particular since the filepaths will be translated to a string. It is
better to use the 'OsPath' native function, which turns out to be easy
to do.
- - - - -
fa3bd0a6 by Georgios Karachalias at 2025-11-29T18:36:05-05:00
Use OsPath in PkgDbRef and UnitDatabase, not FilePath
- - - - -
0d7c05ec by Ben Gamari at 2025-12-01T03:13:46-05:00
hadrian: Place user options after package arguments
This makes it easier for the user to override the default package
arguments with `UserSettings.hs`.
Fixes #25821.
-------------------------
Metric Decrease:
T14697
-------------------------
- - - - -
3b2c4598 by Vladislav Zavialov at 2025-12-01T03:14:29-05:00
Namespace-specified wildcards in import/export lists (#25901)
This change adds support for top-level namespace-specified wildcards
`type ..` and `data ..` to import and export lists.
Examples:
import M (type ..) -- imports all type and class constructors from M
import M (data ..) -- imports all data constructors and terms from M
module M (type .., f) where
-- exports all type and class constructors defined in M,
-- plus the function 'f'
The primary intended usage of this feature is in combination with module
aliases, allowing namespace disambiguation:
import Data.Proxy as T (type ..) -- T.Proxy is unambiguously the type constructor
import Data.Proxy as D (data ..) -- D.Proxy is unambiguously the data constructor
The patch accounts for the interactions of wildcards with:
* Imports with `hiding` clauses
* Import warnings -Wunused-imports, -Wdodgy-imports
* Export warnings -Wduplicate-exports, -Wdodgy-exports
Summary of the changes:
1. Move the NamespaceSpecifier type from GHC.Hs.Binds to GHC.Hs.Basic,
making it possible to use it in more places in the AST.
2. Extend the AST (type: IE) with a representation of `..`, `type ..`,
and `data ..` (constructor: IEWholeNamespace). Per the proposal, the
plain `..` is always rejected with a dedicated error message.
3. Extend the grammar in Parser.y with productions for `..`, `type ..`,
and `data ..` in both import and export lists.
4. Implement wildcard imports by updating the `filterImports` function
in GHC.Rename.Names; the logic for IEWholeNamespace is roughly
modeled after the Nothing (no explicit import list) case.
5. Implement wildcard exports by updating the `exports_from_avail`
function in GHC.Tc.Gen.Export; the logic for IEWholeNamespace is
closely modeled after the IEModuleContents case.
6. Refactor and extend diagnostics to report the new warnings and
errors. See PsErrPlainWildcardImport, DodgyImportsWildcard,
PsErrPlainWildcardExport, DodgyExportsWildcard,
TcRnDupeWildcardExport.
Note that this patch is specifically about top-level import/export
items. Subordinate import/export items are left unchanged.
- - - - -
c71faa76 by Luite Stegeman at 2025-12-01T03:16:05-05:00
rts: Handle overflow of ELF section header string table
If the section header string table is stored in a section greater
than or equal to SHN_LORESERVE (0xff00), the 16-bit field e_shstrndx
in the ELF header does not contain the section number, but rather
an overflow value SHN_XINDEX (0xffff) indicating that we need to look
elsewhere.
This fixes the linker by not using e_shstrndx directly but calling
elf_shstrndx, which correctly handles the SHN_XINDEX value.
Fixes #26603
- - - - -
ab20eb54 by Mike Pilgrem at 2025-12-01T22:46:55+00:00
Re CLC issue 292 Warn GHC.Internal.List.{init,last} are partial
Also corrects the warning for `tail` to refer to `Data.List.uncons` (like the existing warning for `head`).
In module `Settings.Warnings`, applies `-Wno-x-partial` to the `filepath`, and `parsec` packages (outside GHC's repository).
Also bumps submodules.
- - - - -
fc1d7f79 by Jade Lovelace at 2025-12-02T11:04:09-05:00
docs: fix StandaloneKindSignatures in DataKinds docs
These should be `type` as otherwise GHC reports a duplicate definition
error.
- - - - -
beae879b by Rodrigo Mesquita at 2025-12-03T15:42:37+01:00
task: Substitute some datatypes for newtypes
* Substitutes some data type declarations for newtype declarations
* Adds comment to `LlvmConfigCache`, which must decidedly not be a
newtype.
Fixes #23555
- - - - -
3bd7dd44 by mangoiv at 2025-12-04T04:36:45-05:00
Renamer: reinstate the template haskell level check in notFound
Out-of-scope names might be caused by a staging error, as is explained by
Note [Out of scope might be a staging error] in GHC.Tc.Utils.Env.hs.
This logic was assumed to be dead code after 217caad1 and has thus been
removed. This commit reintroduces it and thus fixes issue #26099.
- - - - -
0318010b by Zubin Duggal at 2025-12-04T04:37:27-05:00
testlib: Optionally include the way name in the expected output file
This allows us to have different outputs for different ways.
- - - - -
6d945fdd by Zubin Duggal at 2025-12-04T04:37:27-05:00
testsuite: Accept output of tests failing in ext-interp way due to differing compilation requirements
Fixes #26552
- - - - -
0ffc5243 by Cheng Shao at 2025-12-04T04:38:09-05:00
devx: minor fixes for compile_flags.txt
This patch includes minor fixes for compile_flags.txt to improve
developer experience when using clangd as language server to hack on
RTS C sources:
- Ensure `-fPIC` is passed and `__PIC__` is defined, to be coherent
with `-DDYNAMIC` and ensure the `__PIC__` guarded code paths are
indexed
- Add the missing `-DRtsWay` definition, otherwise a few source files
like `RtsUtils.c` and `Trace.c` would produce clangd errors
- - - - -
e36a5fcb by Matthew Pickering at 2025-12-05T16:25:57-05:00
Add support for building bytecode libraries
A bytecode library is a collection of bytecode files (.gbc) and a
library which combines together additional object files.
A bytecode library is created by invoking GHC with the `-bytecodelib`
flag.
A library can be created from in-memory `ModuleByteCode` linkables or
by passing `.gbc` files as arguments on the command line.
Fixes #26298
- - - - -
8f9ae339 by Matthew Pickering at 2025-12-05T16:25:57-05:00
Load bytecode libraries to satisfy package dependencies
This commit allows you to use a bytecode library to satisfy a package
dependency when using the interpreter.
If a user enables `-fprefer-byte-code`, then if a package provides a
bytecode library, that will be loaded and used to satisfy the
dependency.
The main change is to separate the relevant parts of the `LoaderState`
into external and home package byte code. Bytecode is loaded into either
the home package or external part (similar to HPT/EPS split), HPT
bytecode can be unloaded. External bytecode is never unloaded.
The unload function has also only been called with an empty list of
"stable linkables" for a long time. It has been modified to directly
implement a complete unloading of the home package bytecode linkables.
At the moment, the bytecode libraries are found in the "library-dirs"
field from the package description. In the future when `Cabal`
implements support for "bytecode-library-dirs" field, we can read the
bytecode libraries from there. No changes to the Cabal submodule are
necessary at the moment.
Four new tests are added in testsuite/tests/cabal, which generate fake
package descriptions and test loading the libraries into GHCi.
Fixes #26298
- - - - -
54458ce4 by mangoiv at 2025-12-05T16:26:50-05:00
ExplicitLevelImports: improve documentation of the code
- more explicit names for variable names like `flg` or `topLevel`
- don't pass the same value twice to functions
- some explanations of interesting but undocumented code paths
- adjust comment to not mention non-existent error message
- - - - -
c7061392 by mangoiv at 2025-12-05T16:27:42-05:00
driver: don't expect nodes to exist when checking paths between them
In `mgQueryZero`, previously node lookups were expected to never fail,
i.e. it was expected that when calculating the path between two nodes in
a zero level import graph, both nodes would always exist. This is not
the case, e.g. in some situations involving exact names (see the
test-case). The fix is to first check whether the node is present in the
graph at all, instead of panicking, just to report that there is no
path.
Closes #26568
- - - - -
d6cf8463 by Peng Fan at 2025-12-06T11:06:28-05:00
NCG/LA64: Simplify genCCall into two parts
genCCall is too long, so it's been simplified into two parts:
genPrim and genLibCCall.
Suggested by Andreas Klebinger
- - - - -
9d371d23 by Matthew Pickering at 2025-12-06T11:07:09-05:00
hadrian: Use a response file to invoke GHC for dep gathering.
In some cases we construct an argument list too long for GHC to
handle directly on windows. This happens when we generate
the dependency file because the command line will contain
references to a large number of .hs files.
To avoid this we now invoke GHC using a response file when
generating dependencies to sidestep length limitations.
Note that we only pass the actual file names in the dependency
file. Why? Because this side-steps #26560
- - - - -
0043bfb0 by Marc Scholten at 2025-12-06T11:08:03-05:00
update xhtml to 3000.4.0.0
haddock-api: bump xhtml bounds
haddock-api: use lazy text instead of string to support xhtml 3000.4.0.0
Bumping submodule xhtml to 3000.4.0.0
add xhtml to stage0Packages
remove unused import of writeUtf8File
Remove redundant import
Update haddock golden files for xhtml 3000.4.0.0
Metric Decrease:
haddock.Cabal
haddock.base
- - - - -
fc958fc9 by Julian Ospald at 2025-12-06T11:08:53-05:00
rts: Fix object file format detection in loadArchive
Commit 76d1041dfa4b96108cfdd22b07f2b3feb424dcbe seems to
have introduced this bug, ultimately leading to failure of
test T11788. I can only theorize that this test isn't run
in upstream's CI, because they don't build a static GHC.
The culprit is that we go through the thin archive, trying
to follow the members on the filesystem, but don't
re-identify the new object format of the member. This pins
`object_fmt` to `NotObject` from the thin archive.
Thanks to @angerman for spotting this.
- - - - -
0f297f6e by mangoiv at 2025-12-06T11:09:44-05:00
users' guide: don't use f strings in the python script to ensure compatibility with python 3.5
- - - - -
3bfe7aa2 by Matthew Pickering at 2025-12-07T12:18:57-05:00
ci: Try using multi repl in ghc-in-ghci test
This should be quite a bit faster than the ./hadrian/ghci command as it
doesn't properly build all the dependencies.
- - - - -
2ef1601a by Rodrigo Mesquita at 2025-12-07T12:19:38-05:00
Stack.Decode: Don't error on bitmap size 0
A RET_BCO may have a bitmap with no payload.
In that case, the bitmap = 0.
One can observe this by using -ddump-bcos and interpreting
```
main = pure ()
```
Observe, for instance, that the BCO for this main function has size 0:
```
ProtoBCO Main.main#0:
\u []
break<main:Main,0>() GHC.Internal.Base.pure
GHC.Internal.Base.$fApplicativeIO GHC.Internal.Tuple.()
bitmap: 0 []
BRK_FUN <breakarray> main:Main 0 <cc>
PACK () 0
PUSH_G GHC.Internal.Base.$fApplicativeIO
PUSH_APPLY_PP
PUSH_G GHC.Internal.Base.pure
ENTER
```
Perhaps we never tried to decode a stack in which a BCO like this was
present. However, for the debugger, we want to decode stacks of threads
stopped at breakpoints, and these kind of BCOs do get on a stack under
e.g. `stg_apply_interp_info` frames.
See the accompanying test in the next commit for an example to trigger
the bug this commit fixes.
Fixes #26640
- - - - -
747153d2 by Rodrigo Mesquita at 2025-12-07T12:19:38-05:00
Add test for #26640
- - - - -
d4b1e353 by Simon Hengel at 2025-12-10T00:00:02-05:00
Fix syntax error in gadt_syntax.rst
- - - - -
91cc8be6 by Cheng Shao at 2025-12-10T00:00:43-05:00
ci: fix "ci.sh clean" to address frequent out of space error on windows runners
This patch fixes the `ci.sh clean` logic to address frequent out of
space error on windows runners; previously it didn't clean up the
inplace mingw blobs, which is the largest source of space leak on
windows runners. See added comment for detailed explanation.
- - - - -
fe2b79f4 by Recursion Ninja at 2025-12-10T08:34:18-05:00
Narrow before optimising MUL/DIV/REM into shifts
The MUL/DIV/REM operations can be optimised into shifts when one of the
operands is a constant power of 2. However, as literals in Cmm are
stored as 'Integer', for this to be correct we first need to narrow the
literal to the appropriate width before checking whether the literal is
a power of 2.
Fixes #25664
- - - - -
06c2349c by Recursion Ninja at 2025-12-10T08:34:58-05:00
Decouple 'Language.Haskell.Syntax.Type' from 'GHC.Utils.Panic'
- Remove the *original* defintion of 'hsQTvExplicit' defined within 'Language.Haskell.Syntax.Type'
- Redefine 'hsQTvExplicit' as 'hsq_explicit' specialized to 'GhcPass' exported by 'GHC.Utils.Panic'
- Define 'hsQTvExplicitBinders' as 'hsq_explicit' specialized to 'DocNameI' exported by 'Haddock.GhcUtils'.
- Replace all call sites of the original 'hsQTvExplicit' definition with either:
1. 'hsQTvExplicit' updated definition
2. 'hsQTvExplicitBinders'
All call sites never entered the 'XLHsQTyVars' constructor branch, but a call to 'panic' existed on this code path because the type system was not strong enought to guarantee that the 'XLHsQTyVars' construction was impossible.
These two specialized functions provide the type system with enough information to make that guarantee, and hence the dependancy on 'panic' can be removed.
- - - - -
ac0815d5 by sheaf at 2025-12-10T23:39:57-05:00
Quantify arg before mult in function arrows
As noted in #23764, we expect quantification order to be left-to-right,
so that in a type such as
a %m -> b
the inferred quantification order should be [a, m, b] and not [m, a, b].
This was addressed in commit d31fbf6c, but that commit failed to update
some other functions such as GHC.Core.TyCo.FVs.tyCoFVsOfType.
This affects Haddock, as whether we print an explicit forall or not
depends on whether the inferred quantification order matches the actual
quantification order.
- - - - -
2caf796e by sheaf at 2025-12-10T23:39:57-05:00
Haddock: improvements to ty-var quantification
This commit makes several improvements to how Haddock deals with the
quantification of type variables:
1. In pattern synonyms, Haddock used to jumble up universal and
existential quantification. That is now fixed, fixing #26252.
Tested in the 'PatternSyns2' haddock-html test.
2. The logic for computing whether to use an explicit kind annotation
for a type variable quantified in a forall was not even wrong.
This commit improves the heuristic, but it will always remain an
imperfect heuristic (lest we actually run kind inference again).
In the future (#26271), we hope to avoid reliance on this heuristic.
- - - - -
b14bdd59 by Teo Camarasu at 2025-12-10T23:40:38-05:00
Add explicit export list to GHC.Num
Let's make clear what this module exports to allow us to easily deprecate and remove some of these in the future. Resolves https://gitlab.haskell.org/ghc/ghc/-/issues/26625
- - - - -
d99f8326 by Cheng Shao at 2025-12-11T19:14:18-05:00
compiler: remove unused CPP code in foreign stub
This patch removes unused CPP code in the generated foreign stub:
- `#define IN_STG_CODE 0` is not needed, since `Rts.h` already
includes this definition
- The `if defined(__cplusplus)` code paths are not needed in the `.c`
file, since we don't generate C++ stubs and don't include C++
headers in our stubs. But it still needs to be present in the `.h`
header since it might be later included into C++ source files.
- - - - -
46c9746f by Cheng Shao at 2025-12-11T19:14:57-05:00
configure: bump LlvmMaxVersion to 22
This commit bumps LlvmMaxVersion to 22; 21.x releases have been
available since Aug 26th, 2025 and there's no regressions with 21.x so
far. This bump is also required for updating fedora image to 43.
- - - - -
96fce8d0 by Cheng Shao at 2025-12-12T01:17:51+01:00
hadrian: add support for building with UndefinedBehaviorSanitizer
This patch adds a +ubsan flavour transformer to hadrian to build all
stage1+ C/C++ code with UndefinedBehaviorSanitizer. This is
particularly useful to catch potential undefined behavior in the RTS
codebase.
- - - - -
f7a06d8c by Cheng Shao at 2025-12-12T01:17:51+01:00
ci: update alpine/fedora & add ubsan job
This patch updates alpine image to 3.23, fedora image to 43, and adds
a `x86_64-linux-fedora43-validate+debug_info+ubsan` job that's run in
validate/nightly pipelines to catch undefined behavior in the RTS
codebase.
- - - - -
2ccd11ca by Cheng Shao at 2025-12-12T01:17:51+01:00
rts: fix zero-length VLA undefined behavior in interpretBCO
This commit fixes a zero-length VLA undefined behavior in interpretBCO, caught by UBSan:
```
+rts/Interpreter.c:3133:19: runtime variable length array bound evaluates to non-positive value 0
```
- - - - -
4156ed19 by Cheng Shao at 2025-12-12T01:17:51+01:00
rts: fix unaligned ReadSpB in interpretBCO
This commit fixes unaligned ReadSpB in interpretBCO, caught by UBSan:
```
+rts/Interpreter.c:2174:64: runtime load of misaligned address 0x004202059dd1 for type 'StgWord', which requires 8 byte alignment
```
To perform proper unaligned read, we define StgUnalignedWord as a type
alias of StgWord with aligned(1) attribute, and load StgUnalignedWord
instead of StgWord in ReadSpB, so the C compiler is aware that we're
not loading with natural alignment.
- - - - -
fef89fb9 by Cheng Shao at 2025-12-12T01:17:51+01:00
rts: fix signed integer overflow in subword arithmetic in interpretBCO
This commit fixes signed integer overflow in subword arithmetic in
interpretBCO, see added note for detailed explanation.
- - - - -
3c001377 by Cheng Shao at 2025-12-13T05:03:15-05:00
ci: use treeless fetch for perf notes
This patch improves the ci logic for fetching perf notes by using
treeless fetch
(https://github.blog/open-source/git/get-up-to-speed-with-partial-clone-and-…)
to avoid downloading all blobs of the perf notes repo at once, and
only fetch the actually required blobs on-demand when needed. This
makes the initial `test-metrics.sh pull` operation much faster, and
also more robust, since we are seeing an increasing rate of 504 errors
in CI when fetching all perf notes at once, which is a major source of
CI flakiness at this point.
Co-authored-by: Codex <codex(a)openai.com>
- - - - -
123a8d77 by Peter Trommler at 2025-12-13T05:03:57-05:00
Cmm: remove restriction in MachOp folding
- - - - -
0b54b5fd by Andreas Klebinger at 2025-12-13T05:04:38-05:00
Remove explicit Typeable deriviations.
- - - - -
08b13f7b by Cheng Shao at 2025-12-13T05:05:18-05:00
ci: set gc.auto=0 during setup stage
This patch sets `gc.auto=0` during `setup` stage of CI, see added
comment for detailed explanation.
- - - - -
3b5aecb5 by Ben Gamari at 2025-12-13T23:43:10+01:00
Bump exceptions submodule to 0.10.11
- - - - -
531 changed files:
- .gitlab-ci.yml
- .gitlab/ci.sh
- .gitlab/generate-ci/gen_ci.hs
- .gitlab/jobs.yaml
- .gitlab/rel_eng/fetch-gitlab-artifacts/fetch_gitlab.py
- .gitlab/rel_eng/mk-ghcup-metadata/mk_ghcup_metadata.py
- .gitlab/rel_eng/upload_ghc_libs.py
- .gitlab/test-metrics.sh
- compile_flags.txt
- compiler/GHC.hs
- compiler/GHC/Builtin/Types.hs
- compiler/GHC/Builtin/Types/Literals.hs
- compiler/GHC/Builtin/Types/Prim.hs
- compiler/GHC/ByteCode/Linker.hs
- compiler/GHC/ByteCode/Serialize.hs
- compiler/GHC/Cmm/Opt.hs
- compiler/GHC/Cmm/Sink.hs
- compiler/GHC/CmmToAsm/AArch64/CodeGen.hs
- compiler/GHC/CmmToAsm/AArch64/RegInfo.hs
- compiler/GHC/CmmToAsm/LA64/CodeGen.hs
- compiler/GHC/CmmToAsm/PPC/RegInfo.hs
- compiler/GHC/CmmToAsm/Reg/Linear.hs
- compiler/GHC/CmmToAsm/Reg/Liveness.hs
- compiler/GHC/CmmToAsm/X86/CodeGen.hs
- compiler/GHC/CmmToAsm/X86/Instr.hs
- compiler/GHC/CmmToAsm/X86/Ppr.hs
- compiler/GHC/Core.hs
- compiler/GHC/Core/Coercion.hs
- compiler/GHC/Core/Coercion/Opt.hs
- compiler/GHC/Core/DataCon.hs
- compiler/GHC/Core/Lint.hs
- compiler/GHC/Core/Make.hs
- compiler/GHC/Core/Map/Type.hs
- compiler/GHC/Core/Multiplicity.hs
- compiler/GHC/Core/Opt/Arity.hs
- compiler/GHC/Core/Opt/OccurAnal.hs
- compiler/GHC/Core/Opt/Simplify/Iteration.hs
- compiler/GHC/Core/RoughMap.hs
- compiler/GHC/Core/SimpleOpt.hs
- compiler/GHC/Core/TyCo/FVs.hs
- compiler/GHC/Core/TyCo/Rep.hs
- compiler/GHC/Core/TyCon.hs
- compiler/GHC/Core/Type.hs
- compiler/GHC/Core/Unify.hs
- compiler/GHC/Core/Utils.hs
- compiler/GHC/Data/OsPath.hs
- compiler/GHC/Driver/Backpack.hs
- compiler/GHC/Driver/CodeOutput.hs
- compiler/GHC/Driver/Config/Core/Lint.hs
- + compiler/GHC/Driver/Config/Interpreter.hs
- compiler/GHC/Driver/Config/Linker.hs
- compiler/GHC/Driver/Downsweep.hs
- compiler/GHC/Driver/DynFlags.hs
- compiler/GHC/Driver/Errors/Ppr.hs
- compiler/GHC/Driver/Errors/Types.hs
- compiler/GHC/Driver/Flags.hs
- compiler/GHC/Driver/LlvmConfigCache.hs
- compiler/GHC/Driver/Main.hs
- compiler/GHC/Driver/Make.hs
- compiler/GHC/Driver/MakeFile.hs
- compiler/GHC/Driver/Phases.hs
- compiler/GHC/Driver/Pipeline.hs
- compiler/GHC/Driver/Pipeline/Execute.hs
- compiler/GHC/Driver/Pipeline/Phases.hs
- compiler/GHC/Driver/Session.hs
- compiler/GHC/Driver/Session/Units.hs
- compiler/GHC/Hs/Basic.hs
- compiler/GHC/Hs/Binds.hs
- compiler/GHC/Hs/Expr.hs
- compiler/GHC/Hs/ImpExp.hs
- compiler/GHC/Hs/Instances.hs
- compiler/GHC/Hs/Syn/Type.hs
- compiler/GHC/Hs/Type.hs
- compiler/GHC/Hs/Utils.hs
- compiler/GHC/HsToCore/Binds.hs
- compiler/GHC/HsToCore/Docs.hs
- compiler/GHC/HsToCore/Expr.hs
- compiler/GHC/HsToCore/Match.hs
- compiler/GHC/HsToCore/Pmc/Solver/Types.hs
- compiler/GHC/HsToCore/Utils.hs
- compiler/GHC/Iface/Decl.hs
- compiler/GHC/Iface/Ext/Ast.hs
- compiler/GHC/Iface/Rename.hs
- compiler/GHC/Iface/Syntax.hs
- compiler/GHC/Iface/Type.hs
- compiler/GHC/IfaceToCore.hs
- + compiler/GHC/Linker/ByteCode.hs
- compiler/GHC/Linker/Config.hs
- compiler/GHC/Linker/Deps.hs
- compiler/GHC/Linker/Dynamic.hs
- + compiler/GHC/Linker/Executable.hs
- − compiler/GHC/Linker/ExtraObj.hs
- compiler/GHC/Linker/Loader.hs
- compiler/GHC/Linker/MacOS.hs
- compiler/GHC/Linker/Static.hs
- compiler/GHC/Linker/Types.hs
- compiler/GHC/Linker/Windows.hs
- compiler/GHC/Parser.y
- compiler/GHC/Parser/Errors/Ppr.hs
- compiler/GHC/Parser/Errors/Types.hs
- compiler/GHC/Parser/PostProcess.hs
- compiler/GHC/Parser/PostProcess/Haddock.hs
- compiler/GHC/Prelude/Basic.hs
- compiler/GHC/Rename/Names.hs
- compiler/GHC/Rename/Splice.hs
- compiler/GHC/Runtime/Debugger.hs
- compiler/GHC/Runtime/Eval.hs
- + compiler/GHC/Runtime/Interpreter/C.hs
- + compiler/GHC/Runtime/Interpreter/Init.hs
- compiler/GHC/Settings.hs
- compiler/GHC/StgToJS/Apply.hs
- compiler/GHC/StgToJS/Expr.hs
- compiler/GHC/StgToJS/Regs.hs
- compiler/GHC/StgToJS/Rts/Rts.hs
- compiler/GHC/StgToJS/Rts/Types.hs
- compiler/GHC/SysTools/Tasks.hs
- compiler/GHC/Tc/Errors/Ppr.hs
- compiler/GHC/Tc/Errors/Types.hs
- compiler/GHC/Tc/Gen/App.hs
- compiler/GHC/Tc/Gen/Export.hs
- compiler/GHC/Tc/Gen/Expr.hs
- compiler/GHC/Tc/Gen/Expr.hs-boot
- compiler/GHC/Tc/Gen/Head.hs
- compiler/GHC/Tc/Gen/HsType.hs
- compiler/GHC/Tc/Gen/Match.hs
- compiler/GHC/Tc/Gen/Pat.hs
- compiler/GHC/Tc/Instance/Class.hs
- compiler/GHC/Tc/Solver/Default.hs
- compiler/GHC/Tc/Solver/Dict.hs
- compiler/GHC/Tc/Solver/Monad.hs
- compiler/GHC/Tc/Solver/Solve.hs
- compiler/GHC/Tc/TyCl.hs
- compiler/GHC/Tc/TyCl/Build.hs
- compiler/GHC/Tc/TyCl/Instance.hs
- compiler/GHC/Tc/Types/Evidence.hs
- compiler/GHC/Tc/Types/Origin.hs
- compiler/GHC/Tc/Utils/Concrete.hs
- compiler/GHC/Tc/Utils/Env.hs
- compiler/GHC/Tc/Utils/Instantiate.hs
- compiler/GHC/Tc/Utils/TcMType.hs
- compiler/GHC/Tc/Utils/TcType.hs
- compiler/GHC/Tc/Utils/Unify.hs
- compiler/GHC/Tc/Zonk/Type.hs
- compiler/GHC/Types/Basic.hs
- compiler/GHC/Types/Error/Codes.hs
- compiler/GHC/Types/Hint.hs
- compiler/GHC/Types/Hint/Ppr.hs
- compiler/GHC/Types/Id/Make.hs
- compiler/GHC/Types/SourceText.hs
- compiler/GHC/Types/Unique/FM.hs
- compiler/GHC/Types/Unique/Set.hs
- compiler/GHC/Types/Var/Env.hs
- compiler/GHC/Unit/Finder.hs
- compiler/GHC/Unit/Home/ModInfo.hs
- compiler/GHC/Unit/Home/PackageTable.hs
- compiler/GHC/Unit/Info.hs
- compiler/GHC/Unit/Module/Graph.hs
- compiler/GHC/Unit/Module/Status.hs
- compiler/GHC/Unit/Module/WholeCoreBindings.hs
- compiler/GHC/Unit/State.hs
- compiler/GHC/Utils/Misc.hs
- compiler/GHC/Utils/Outputable.hs
- compiler/Language/Haskell/Syntax/Extension.hs
- compiler/Language/Haskell/Syntax/ImpExp.hs
- compiler/Language/Haskell/Syntax/Type.hs
- compiler/ghc.cabal.in
- configure.ac
- docs/users_guide/9.16.1-notes.rst
- docs/users_guide/bugs.rst
- docs/users_guide/compare-flags.py
- docs/users_guide/conf.py
- docs/users_guide/debug-info.rst
- docs/users_guide/debugging.rst
- docs/users_guide/extending_ghc.rst
- docs/users_guide/exts/arrows.rst
- docs/users_guide/exts/data_kinds.rst
- docs/users_guide/exts/derive_any_class.rst
- docs/users_guide/exts/deriving_extra.rst
- docs/users_guide/exts/deriving_inferred.rst
- docs/users_guide/exts/deriving_strategies.rst
- docs/users_guide/exts/explicit_namespaces.rst
- docs/users_guide/exts/gadt.rst
- docs/users_guide/exts/gadt_syntax.rst
- docs/users_guide/exts/generics.rst
- docs/users_guide/exts/overloaded_labels.rst
- docs/users_guide/exts/overloaded_strings.rst
- docs/users_guide/exts/pattern_synonyms.rst
- docs/users_guide/exts/poly_kinds.rst
- docs/users_guide/exts/primitives.rst
- docs/users_guide/exts/rank_polymorphism.rst
- docs/users_guide/exts/rebindable_syntax.rst
- docs/users_guide/exts/required_type_arguments.rst
- docs/users_guide/exts/scoped_type_variables.rst
- docs/users_guide/exts/standalone_deriving.rst
- docs/users_guide/exts/template_haskell.rst
- docs/users_guide/exts/tuple_sections.rst
- docs/users_guide/exts/type_data.rst
- docs/users_guide/exts/type_defaulting.rst
- docs/users_guide/exts/type_families.rst
- docs/users_guide/gone_wrong.rst
- docs/users_guide/hints.rst
- docs/users_guide/javascript.rst
- docs/users_guide/phases.rst
- docs/users_guide/profiling.rst
- docs/users_guide/separate_compilation.rst
- docs/users_guide/using-optimisation.rst
- docs/users_guide/using.rst
- docs/users_guide/wasm.rst
- docs/users_guide/win32-dlls.rst
- ghc/GHCi/UI.hs
- ghc/Main.hs
- hadrian/doc/flavours.md
- hadrian/src/Builder.hs
- hadrian/src/Flavour.hs
- hadrian/src/Hadrian/Haskell/Cabal/Type.hs
- hadrian/src/Hadrian/Haskell/Hash.hs
- hadrian/src/Hadrian/Oracles/ArgsHash.hs
- hadrian/src/Hadrian/Oracles/Cabal/Type.hs
- hadrian/src/Hadrian/Oracles/DirectoryContents.hs
- hadrian/src/Hadrian/Oracles/Path.hs
- hadrian/src/Hadrian/Oracles/TextFile.hs
- hadrian/src/Hadrian/Utilities.hs
- hadrian/src/Oracles/Flavour.hs
- hadrian/src/Oracles/ModuleFiles.hs
- hadrian/src/Rules/ToolArgs.hs
- hadrian/src/Settings.hs
- hadrian/src/Settings/Builders/Ghc.hs
- hadrian/src/Settings/Default.hs
- hadrian/src/Settings/Warnings.hs
- hadrian/stack.yaml
- hadrian/stack.yaml.lock
- libraries/base/base.cabal.in
- libraries/base/changelog.md
- libraries/base/src/Data/List.hs
- libraries/base/src/Data/List/NonEmpty.hs
- + libraries/base/src/Data/List/NubOrdSet.hs
- libraries/base/src/GHC/Num.hs
- libraries/base/tests/all.T
- libraries/exceptions
- libraries/ghc-boot-th/GHC/Boot/TH/Ppr.hs
- libraries/ghc-boot/GHC/Unit/Database.hs
- libraries/ghc-internal/src/GHC/Internal/Data/OldList.hs
- libraries/ghc-internal/src/GHC/Internal/Float.hs
- libraries/ghc-internal/src/GHC/Internal/List.hs
- libraries/ghc-internal/src/GHC/Internal/Stack/Decode.hs
- libraries/ghc-internal/src/GHC/Internal/System/IO.hs
- libraries/ghc-internal/src/GHC/Internal/TH/Monad.hs
- libraries/ghc-internal/src/GHC/Internal/TH/Syntax.hs
- libraries/os-string
- libraries/template-haskell/vendored-filepath/System/FilePath/Posix.hs
- libraries/template-haskell/vendored-filepath/System/FilePath/Windows.hs
- libraries/unix
- libraries/xhtml
- + rts/.ubsan-suppressions
- rts/Interpreter.c
- rts/eventlog/EventLog.c
- rts/gen_event_types.py
- rts/include/rts/Bytecodes.h
- rts/include/stg/Types.h
- rts/linker/Elf.c
- rts/linker/LoadArchive.c
- rts/linker/PEi386.c
- rts/rts.cabal
- testsuite/config/ghc
- testsuite/driver/runtests.py
- testsuite/driver/testglobals.py
- testsuite/driver/testlib.py
- testsuite/mk/boilerplate.mk
- testsuite/tests/backpack/should_fail/T19244a.stderr
- + testsuite/tests/bytecode/T23973.hs
- + testsuite/tests/bytecode/T23973.script
- + testsuite/tests/bytecode/T23973.stdout
- + testsuite/tests/bytecode/T26565.hs
- + testsuite/tests/bytecode/T26565.script
- + testsuite/tests/bytecode/T26565.stdout
- + testsuite/tests/bytecode/T26640.hs
- + testsuite/tests/bytecode/T26640.script
- + testsuite/tests/bytecode/T26640.stdout
- testsuite/tests/bytecode/all.T
- + testsuite/tests/cabal/Bytecode.hs
- + testsuite/tests/cabal/BytecodeForeign.c
- + testsuite/tests/cabal/BytecodeForeign.hs
- testsuite/tests/cabal/Makefile
- testsuite/tests/cabal/all.T
- + testsuite/tests/cabal/bytecode.pkg
- + testsuite/tests/cabal/bytecode.script
- + testsuite/tests/cabal/bytecode_foreign.pkg
- + testsuite/tests/cabal/bytecode_foreign.script
- testsuite/tests/cabal/ghcpkg03.stderr
- testsuite/tests/cabal/ghcpkg03.stderr-mingw32
- testsuite/tests/cabal/ghcpkg05.stderr
- testsuite/tests/cabal/ghcpkg05.stderr-mingw32
- + testsuite/tests/cabal/pkg_bytecode.stderr
- + testsuite/tests/cabal/pkg_bytecode.stdout
- + testsuite/tests/cabal/pkg_bytecode_foreign.stderr
- + testsuite/tests/cabal/pkg_bytecode_foreign.stdout
- + testsuite/tests/cabal/pkg_bytecode_with_gbc.stderr
- + testsuite/tests/cabal/pkg_bytecode_with_gbc.stdout
- + testsuite/tests/cabal/pkg_bytecode_with_o.stderr
- + testsuite/tests/cabal/pkg_bytecode_with_o.stdout
- + testsuite/tests/cmm/opt/T25664.hs
- + testsuite/tests/cmm/opt/T25664.stdout
- testsuite/tests/cmm/opt/all.T
- + testsuite/tests/codeGen/should_run/T24016.hs
- + testsuite/tests/codeGen/should_run/T24016.stdout
- + testsuite/tests/codeGen/should_run/T26537.hs
- + testsuite/tests/codeGen/should_run/T26537.stdout
- testsuite/tests/codeGen/should_run/all.T
- testsuite/tests/dependent/should_fail/T11334b.stderr
- testsuite/tests/diagnostic-codes/codes.stdout
- testsuite/tests/driver/Makefile
- + testsuite/tests/driver/T20696/T20696.stderr-ext-interp
- + testsuite/tests/driver/T24120.hs
- + testsuite/tests/driver/T24731.hs
- + testsuite/tests/driver/T26551.hs
- + testsuite/tests/driver/T26551.stderr
- testsuite/tests/driver/all.T
- testsuite/tests/driver/bytecode-object/Makefile
- testsuite/tests/driver/bytecode-object/all.T
- testsuite/tests/driver/bytecode-object/bytecode_object19.stdout
- + testsuite/tests/driver/bytecode-object/bytecode_object20.stdout
- + testsuite/tests/driver/bytecode-object/bytecode_object21.stderr
- + testsuite/tests/driver/bytecode-object/bytecode_object21.stdout
- + testsuite/tests/driver/bytecode-object/bytecode_object23.stdout
- + testsuite/tests/driver/bytecode-object/bytecode_object24.stdout
- + testsuite/tests/driver/fat-iface/fat012.stderr-ext-interp
- + testsuite/tests/driver/fat-iface/fat015.stderr-ext-interp
- testsuite/tests/driver/j-space/jspace.hs
- testsuite/tests/generics/T10604/T10604_deriving.stderr
- testsuite/tests/ghc-e/should_fail/T9930fail.stderr
- testsuite/tests/ghc-e/should_fail/all.T
- testsuite/tests/ghci.debugger/scripts/print012.stdout
- testsuite/tests/ghci/scripts/T10321.stdout
- testsuite/tests/ghci/scripts/T24459.stdout
- testsuite/tests/ghci/scripts/T7730.stdout
- testsuite/tests/ghci/scripts/T8959b.stderr
- testsuite/tests/ghci/scripts/ghci051.stderr
- testsuite/tests/ghci/scripts/ghci065.stdout
- testsuite/tests/haddock/should_compile_flag_haddock/T17544_kw.hs
- testsuite/tests/haddock/should_compile_flag_haddock/T17544_kw.stderr
- testsuite/tests/indexed-types/should_compile/T12538.stderr
- testsuite/tests/indexed-types/should_fail/T21092.hs
- − testsuite/tests/indexed-types/should_fail/T21092.stderr
- testsuite/tests/indexed-types/should_fail/all.T
- 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/linear/should_compile/LinearEtaExpansions.hs
- testsuite/tests/linear/should_compile/all.T
- testsuite/tests/linear/should_fail/TypeClass.hs
- testsuite/tests/linear/should_fail/TypeClass.stderr
- testsuite/tests/linear/should_run/LinearGhci.stdout
- + testsuite/tests/linear/should_run/T26311.hs
- + testsuite/tests/linear/should_run/T26311.stdout
- testsuite/tests/linear/should_run/all.T
- + testsuite/tests/module/T25901_exp_plain_wc.hs
- + testsuite/tests/module/T25901_exp_plain_wc.stderr
- + testsuite/tests/module/T25901_imp_plain_wc.hs
- + testsuite/tests/module/T25901_imp_plain_wc.stderr
- testsuite/tests/module/all.T
- testsuite/tests/numeric/should_compile/T16402.stderr-ws-64
- testsuite/tests/parser/should_compile/DumpTypecheckedAst.stderr
- testsuite/tests/perf/compiler/all.T
- testsuite/tests/pmcheck/should_compile/pmcOrPats.stderr
- + testsuite/tests/rename/should_compile/T25901_exp_1.hs
- + testsuite/tests/rename/should_compile/T25901_exp_1_helper.hs
- + testsuite/tests/rename/should_compile/T25901_exp_2.hs
- + testsuite/tests/rename/should_compile/T25901_exp_2_helper.hs
- + testsuite/tests/rename/should_compile/T25901_imp_hq.hs
- + testsuite/tests/rename/should_compile/T25901_imp_hu.hs
- + testsuite/tests/rename/should_compile/T25901_imp_sq.hs
- + testsuite/tests/rename/should_compile/T25901_imp_su.hs
- testsuite/tests/rename/should_compile/all.T
- + testsuite/tests/rename/should_fail/T25901_exp_fail_1.hs
- + testsuite/tests/rename/should_fail/T25901_exp_fail_1.stderr
- + testsuite/tests/rename/should_fail/T25901_exp_fail_1_helper.hs
- + testsuite/tests/rename/should_fail/T25901_exp_fail_2.hs
- + testsuite/tests/rename/should_fail/T25901_exp_fail_2.stderr
- + testsuite/tests/rename/should_fail/T25901_exp_fail_2_helper.hs
- + testsuite/tests/rename/should_fail/T25901_imp_hq_fail_5.hs
- + testsuite/tests/rename/should_fail/T25901_imp_hq_fail_5.stderr
- + testsuite/tests/rename/should_fail/T25901_imp_hq_fail_6.hs
- + testsuite/tests/rename/should_fail/T25901_imp_hq_fail_6.stderr
- + testsuite/tests/rename/should_fail/T25901_imp_hu_fail_4.hs
- + testsuite/tests/rename/should_fail/T25901_imp_hu_fail_4.stderr
- + testsuite/tests/rename/should_fail/T25901_imp_sq_fail_2.hs
- + testsuite/tests/rename/should_fail/T25901_imp_sq_fail_2.stderr
- + testsuite/tests/rename/should_fail/T25901_imp_sq_fail_3.hs
- + testsuite/tests/rename/should_fail/T25901_imp_sq_fail_3.stderr
- + testsuite/tests/rename/should_fail/T25901_imp_su_fail_1.hs
- + testsuite/tests/rename/should_fail/T25901_imp_su_fail_1.stderr
- testsuite/tests/rename/should_fail/all.T
- testsuite/tests/rename/should_fail/rnfail055.stderr
- testsuite/tests/rep-poly/RepPolyCase1.stderr
- − testsuite/tests/rep-poly/RepPolyCase2.stderr
- testsuite/tests/rep-poly/RepPolyRule3.stderr
- testsuite/tests/rep-poly/RepPolyTuple4.stderr
- testsuite/tests/rep-poly/T13233.stderr
- − testsuite/tests/rep-poly/T17021.stderr
- testsuite/tests/rep-poly/T20363b.stderr
- − testsuite/tests/rep-poly/T21650_a.stderr
- − testsuite/tests/rep-poly/T21650_b.stderr
- + testsuite/tests/rep-poly/T26072.hs
- + testsuite/tests/rep-poly/T26072b.hs
- + testsuite/tests/rep-poly/T26528.hs
- testsuite/tests/rep-poly/UnliftedNewtypesLevityBinder.stderr
- testsuite/tests/rep-poly/all.T
- testsuite/tests/rts/KeepCafsBase.hs
- testsuite/tests/rts/all.T
- testsuite/tests/saks/should_compile/saks023.stdout
- testsuite/tests/saks/should_compile/saks034.stdout
- testsuite/tests/saks/should_compile/saks035.stdout
- testsuite/tests/showIface/Makefile
- + testsuite/tests/showIface/T26246a.hs
- + testsuite/tests/showIface/T26246a.stdout
- testsuite/tests/showIface/all.T
- + testsuite/tests/simd/should_run/T26410_ffi.hs
- + testsuite/tests/simd/should_run/T26410_ffi.stdout
- + testsuite/tests/simd/should_run/T26410_ffi_c.c
- + testsuite/tests/simd/should_run/T26410_prim.hs
- + testsuite/tests/simd/should_run/T26410_prim.stdout
- + testsuite/tests/simd/should_run/T26542.hs
- + testsuite/tests/simd/should_run/T26542.stdout
- + testsuite/tests/simd/should_run/T26550.hs
- + testsuite/tests/simd/should_run/T26550.stdout
- testsuite/tests/simd/should_run/all.T
- + testsuite/tests/simplCore/should_compile/T26588.hs
- + testsuite/tests/simplCore/should_compile/T26589.hs
- testsuite/tests/simplCore/should_compile/T8331.stderr
- testsuite/tests/simplCore/should_compile/all.T
- + testsuite/tests/splice-imports/SI07.stderr-ext-interp
- + testsuite/tests/th/T26099.hs
- + testsuite/tests/th/T26099.stderr
- + testsuite/tests/th/T26568.hs
- + testsuite/tests/th/T26568.stderr
- testsuite/tests/th/all.T
- testsuite/tests/typecheck/T16127/T16127.stderr
- testsuite/tests/typecheck/should_compile/T22560d.stdout
- + testsuite/tests/typecheck/should_compile/T26451.hs
- + testsuite/tests/typecheck/should_compile/T26582.hs
- testsuite/tests/typecheck/should_compile/all.T
- testsuite/tests/typecheck/should_fail/T15629.stderr
- testsuite/tests/typecheck/should_fail/T15883e.stderr
- testsuite/tests/typecheck/should_fail/T2414.stderr
- testsuite/tests/typecheck/should_fail/T24279.hs
- − testsuite/tests/typecheck/should_fail/T24279.stderr
- testsuite/tests/typecheck/should_fail/T2534.stderr
- testsuite/tests/typecheck/should_fail/T7264.stderr
- testsuite/tests/typecheck/should_fail/all.T
- testsuite/tests/unboxedsums/UbxSumUnpackedSize.hs
- + testsuite/tests/warnings/should_compile/T25901_exp_dodgy.hs
- + testsuite/tests/warnings/should_compile/T25901_exp_dodgy.stderr
- + testsuite/tests/warnings/should_compile/T25901_exp_dup_wc_1.hs
- + testsuite/tests/warnings/should_compile/T25901_exp_dup_wc_1.stderr
- + testsuite/tests/warnings/should_compile/T25901_exp_dup_wc_2.hs
- + testsuite/tests/warnings/should_compile/T25901_exp_dup_wc_2.stderr
- + testsuite/tests/warnings/should_compile/T25901_exp_dup_wc_3.hs
- + testsuite/tests/warnings/should_compile/T25901_exp_dup_wc_3.stderr
- + testsuite/tests/warnings/should_compile/T25901_exp_dup_wc_4.hs
- + testsuite/tests/warnings/should_compile/T25901_exp_dup_wc_4.stderr
- + testsuite/tests/warnings/should_compile/T25901_helper_1.hs
- + testsuite/tests/warnings/should_compile/T25901_helper_2.hs
- + testsuite/tests/warnings/should_compile/T25901_helper_3.hs
- + testsuite/tests/warnings/should_compile/T25901_imp_dodgy_1.hs
- + testsuite/tests/warnings/should_compile/T25901_imp_dodgy_1.stderr
- + testsuite/tests/warnings/should_compile/T25901_imp_dodgy_2.hs
- + testsuite/tests/warnings/should_compile/T25901_imp_dodgy_2.stderr
- + testsuite/tests/warnings/should_compile/T25901_imp_unused_1.hs
- + testsuite/tests/warnings/should_compile/T25901_imp_unused_1.stderr
- + testsuite/tests/warnings/should_compile/T25901_imp_unused_2.hs
- + testsuite/tests/warnings/should_compile/T25901_imp_unused_2.stderr
- + testsuite/tests/warnings/should_compile/T25901_imp_unused_3.hs
- + testsuite/tests/warnings/should_compile/T25901_imp_unused_3.stderr
- + testsuite/tests/warnings/should_compile/T25901_imp_unused_4.hs
- + testsuite/tests/warnings/should_compile/T25901_imp_unused_4.stderr
- testsuite/tests/warnings/should_compile/all.T
- utils/check-exact/ExactPrint.hs
- utils/check-exact/Main.hs
- utils/check-exact/Transform.hs
- utils/check-exact/Utils.hs
- utils/ghc-pkg/Main.hs
- utils/ghc-toolchain/src/GHC/Toolchain/Utils.hs
- utils/haddock/cabal.project
- utils/haddock/haddock-api/haddock-api.cabal
- utils/haddock/haddock-api/src/Haddock/Backends/Hoogle.hs
- utils/haddock/haddock-api/src/Haddock/Backends/Hyperlinker.hs
- utils/haddock/haddock-api/src/Haddock/Backends/Hyperlinker/Renderer.hs
- utils/haddock/haddock-api/src/Haddock/Backends/LaTeX.hs
- utils/haddock/haddock-api/src/Haddock/Backends/Xhtml.hs
- utils/haddock/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs
- utils/haddock/haddock-api/src/Haddock/Backends/Xhtml/DocMarkup.hs
- utils/haddock/haddock-api/src/Haddock/Backends/Xhtml/Layout.hs
- utils/haddock/haddock-api/src/Haddock/Backends/Xhtml/Names.hs
- utils/haddock/haddock-api/src/Haddock/Backends/Xhtml/Themes.hs
- utils/haddock/haddock-api/src/Haddock/Backends/Xhtml/Utils.hs
- utils/haddock/haddock-api/src/Haddock/Convert.hs
- utils/haddock/haddock-api/src/Haddock/Doc.hs
- utils/haddock/haddock-api/src/Haddock/GhcUtils.hs
- utils/haddock/haddock-api/src/Haddock/Utils.hs
- utils/haddock/haddock-library/src/Documentation/Haddock/Parser.hs
- utils/haddock/haddock-test/src/Test/Haddock.hs
- utils/haddock/html-test/ref/Bug1004.html
- utils/haddock/html-test/ref/Bug1050.html
- utils/haddock/html-test/ref/Bug26.html
- + utils/haddock/html-test/ref/Bug26246.html
- utils/haddock/html-test/ref/Bug298.html
- utils/haddock/html-test/ref/Bug458.html
- utils/haddock/html-test/ref/Bug85.html
- utils/haddock/html-test/ref/Bug923.html
- utils/haddock/html-test/ref/BundledPatterns.html
- utils/haddock/html-test/ref/BundledPatterns2.html
- utils/haddock/html-test/ref/ConstructorPatternExport.html
- utils/haddock/html-test/ref/GADTRecords.html
- utils/haddock/html-test/ref/LinearTypes.html
- utils/haddock/html-test/ref/Nesting.html
- utils/haddock/html-test/ref/PatternSyns.html
- + utils/haddock/html-test/ref/PatternSyns2.html
- utils/haddock/html-test/ref/PromotedTypes.html
- utils/haddock/html-test/ref/TitledPicture.html
- utils/haddock/html-test/ref/TypeOperators.html
- utils/haddock/html-test/ref/Unicode.html
- utils/haddock/html-test/ref/Unicode2.html
- + utils/haddock/html-test/src/Bug26246.hs
- + utils/haddock/html-test/src/PatternSyns2.hs
- utils/haddock/hypsrc-test/ref/src/Classes.html
- utils/haddock/hypsrc-test/ref/src/Quasiquoter.html
- utils/haddock/latex-test/ref/LinearTypes/LinearTypes.tex
- utils/hpc
- utils/hsc2hs
- utils/iserv/iserv.cabal.in
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/ee33202b34cf60bcbac4f76eb35e04…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/ee33202b34cf60bcbac4f76eb35e04…
You're receiving this email because of your account on gitlab.haskell.org.
1
0
[Git][ghc/ghc][wip/terrorjack/asan] 7 commits: ci: use treeless fetch for perf notes
by Cheng Shao (@TerrorJack) 14 Dec '25
by Cheng Shao (@TerrorJack) 14 Dec '25
14 Dec '25
Cheng Shao pushed to branch wip/terrorjack/asan at Glasgow Haskell Compiler / GHC
Commits:
3c001377 by Cheng Shao at 2025-12-13T05:03:15-05:00
ci: use treeless fetch for perf notes
This patch improves the ci logic for fetching perf notes by using
treeless fetch
(https://github.blog/open-source/git/get-up-to-speed-with-partial-clone-and-…)
to avoid downloading all blobs of the perf notes repo at once, and
only fetch the actually required blobs on-demand when needed. This
makes the initial `test-metrics.sh pull` operation much faster, and
also more robust, since we are seeing an increasing rate of 504 errors
in CI when fetching all perf notes at once, which is a major source of
CI flakiness at this point.
Co-authored-by: Codex <codex(a)openai.com>
- - - - -
123a8d77 by Peter Trommler at 2025-12-13T05:03:57-05:00
Cmm: remove restriction in MachOp folding
- - - - -
0b54b5fd by Andreas Klebinger at 2025-12-13T05:04:38-05:00
Remove explicit Typeable deriviations.
- - - - -
08b13f7b by Cheng Shao at 2025-12-13T05:05:18-05:00
ci: set gc.auto=0 during setup stage
This patch sets `gc.auto=0` during `setup` stage of CI, see added
comment for detailed explanation.
- - - - -
a3034931 by Cheng Shao at 2025-12-13T23:38:12+01:00
rts: add is-valid-utf8.c to .ubsan-suppressions
- - - - -
7f3ae26a by Cheng Shao at 2025-12-13T23:38:12+01:00
hadrian: add support for building with AddressSanitizer
This patch adds a +asan flavour transformer to hadrian to build all
stage1+ C/C++ code with AddressBehaviorSanitizer. This is particularly
useful to catch out-of-bounds and use-after-free bugs in the RTS
codebase.
export ASAN_OPTIONS=detect_leaks=false:handle_segv=0:handle_sigfpe=0:verify_asan_link_order=false
- - - - -
16675f7d by Cheng Shao at 2025-12-13T23:38:12+01:00
rts: add ASAN poisoning to mblock allocator
- - - - -
23 changed files:
- .gitlab/ci.sh
- .gitlab/test-metrics.sh
- compiler/GHC/Cmm/Opt.hs
- hadrian/doc/flavours.md
- hadrian/src/Flavour.hs
- hadrian/src/Hadrian/Haskell/Cabal/Type.hs
- hadrian/src/Hadrian/Haskell/Hash.hs
- hadrian/src/Hadrian/Oracles/ArgsHash.hs
- hadrian/src/Hadrian/Oracles/Cabal/Type.hs
- hadrian/src/Hadrian/Oracles/DirectoryContents.hs
- hadrian/src/Hadrian/Oracles/Path.hs
- hadrian/src/Hadrian/Oracles/TextFile.hs
- hadrian/src/Hadrian/Utilities.hs
- hadrian/src/Oracles/Flavour.hs
- hadrian/src/Oracles/ModuleFiles.hs
- rts/.ubsan-suppressions
- rts/include/Stg.h
- + rts/include/rts/ASANUtils.h
- rts/rts.cabal
- rts/sm/MBlock.c
- testsuite/driver/testglobals.py
- testsuite/driver/testlib.py
- testsuite/tests/rts/T18623/all.T
Changes:
=====================================
.gitlab/ci.sh
=====================================
@@ -259,6 +259,12 @@ function setup() {
git config user.email "ghc-ci(a)gitlab-haskell.org"
git config user.name "GHC GitLab CI"
+ # Disable auto gc. Useless in a temporary checkout, and
+ # non-deterministic "Auto packing the repository in background for
+ # optimum performance." message could pop up that confuses the
+ # testsuite driver!
+ git config gc.auto 0
+
info "====================================================="
info "Toolchain versions"
info "====================================================="
=====================================
.gitlab/test-metrics.sh
=====================================
@@ -17,12 +17,14 @@ fail() {
function pull() {
local ref="refs/notes/$REF"
- # 2023-10-04: `git fetch` started failing, first on Darwin in CI and then on
- # Linux locally, both using git version 2.40.1. See #24055. One workaround is
- # to set a larger http.postBuffer, although this is definitely a workaround.
- # The default should work just fine. The error could be in git, GitLab, or
- # perhaps the networking tube (including all proxies etc) between the two.
- run git -c http.postBuffer=2097152 fetch -f "$NOTES_ORIGIN" "$ref:$ref"
+
+ # Fetch performance notes from a dedicated promisor remote using a
+ # treeless filter, so that individual note blobs are fetched lazily
+ # as needed.
+ git remote add perf-notes "$NOTES_ORIGIN" || true
+ git config fetch.recurseSubmodules false
+ git config remote.perf-notes.partialclonefilter tree:0
+ run git fetch --force perf-notes "$ref:$ref"
echo "perf notes ref $ref is $(git rev-parse $ref)"
}
@@ -81,4 +83,3 @@ case $1 in
pull) pull ;;
*) fail "Invalid mode $1" ;;
esac
-
=====================================
compiler/GHC/Cmm/Opt.hs
=====================================
@@ -290,9 +290,7 @@ cmmMachOpFoldM _ (MO_Sub _) [CmmLit lit, CmmLit (CmmInt i rep)]
-- the same comparison at the larger size.
cmmMachOpFoldM platform cmp [CmmMachOp conv [x], CmmLit (CmmInt i _)]
- | -- powerPC NCG has a TODO for I8/I16 comparisons, so don't try
- platformArch platform `elem` [ArchX86, ArchX86_64],
- -- if the operand is widened:
+ | -- if the operand is widened:
Just (rep, signed, narrow_fn) <- maybe_conversion conv,
-- and this is a comparison operation:
Just narrow_cmp <- maybe_comparison cmp rep signed,
=====================================
hadrian/doc/flavours.md
=====================================
@@ -242,6 +242,10 @@ The supported transformers are listed below:
<td><code>ubsan</code></td>
<td>Build all stage1+ C/C++ code with UndefinedBehaviorSanitizer support</td>
</tr>
+ <tr>
+ <td><code>asan</code></td>
+ <td>Build all stage1+ C/C++ code with AddressSanitizer support</td>
+ </tr>
<tr>
<td><code>llvm</code></td>
<td>Use GHC's LLVM backend (`-fllvm`) for all stage1+ compilation.</td>
=====================================
hadrian/src/Flavour.hs
=====================================
@@ -8,6 +8,7 @@ module Flavour
, splitSections
, enableThreadSanitizer
, enableUBSan
+ , enableASan
, enableLateCCS
, enableHashUnitIds
, enableDebugInfo, enableTickyGhc
@@ -56,6 +57,7 @@ flavourTransformers = M.fromList
, "thread_sanitizer" =: enableThreadSanitizer False
, "thread_sanitizer_cmm" =: enableThreadSanitizer True
, "ubsan" =: enableUBSan
+ , "asan" =: enableASan
, "llvm" =: viaLlvmBackend
, "profiled_ghc" =: enableProfiledGhc
, "no_dynamic_ghc" =: disableDynamicGhcPrograms
@@ -303,6 +305,28 @@ enableUBSan =
builder Testsuite ? arg "--config=have_ubsan=True"
]
+-- | Build all stage1+ C/C++ code with AddressSanitizer support:
+-- https://clang.llvm.org/docs/AddressSanitizer.html
+enableASan :: Flavour -> Flavour
+enableASan =
+ addArgs $
+ notStage0
+ ? mconcat
+ [ package rts
+ ? builder (Cabal Flags)
+ ? arg "+asan"
+ <> (needSharedLibSAN ? arg "+shared-libsan"),
+ builder (Ghc CompileHs) ? arg "-optc-fsanitize=address",
+ builder (Ghc CompileCWithGhc) ? arg "-optc-fsanitize=address",
+ builder (Ghc CompileCppWithGhc) ? arg "-optcxx-fsanitize=address",
+ builder (Ghc LinkHs)
+ ? arg "-optc-fsanitize=address"
+ <> arg "-optl-fsanitize=address"
+ <> (needSharedLibSAN ? arg "-optl-shared-libsan"),
+ builder (Cc CompileC) ? arg "-fsanitize=address",
+ builder Testsuite ? arg "--config=have_asan=True"
+ ]
+
-- | Use the LLVM backend in stages 1 and later.
viaLlvmBackend :: Flavour -> Flavour
viaLlvmBackend = addArgs $ notStage0 ? builder Ghc ? arg "-fllvm"
=====================================
hadrian/src/Hadrian/Haskell/Cabal/Type.hs
=====================================
@@ -31,7 +31,7 @@ data PackageData = PackageData
, description :: String
, packageDependencies :: [Package]
, genericPackageDescription :: GenericPackageDescription
- } deriving (Eq, Generic, Show, Typeable)
+ } deriving (Eq, Generic, Show)
-- | Haskell package metadata obtained after resolving package configuration
-- flags and associated conditionals according to the current build context.
@@ -75,7 +75,7 @@ data ContextData = ContextData
, contextLibdir :: FilePath
-- The location where dynamic libraries go
, contextDynLibdir :: FilePath
- } deriving (Eq, Generic, Show, Typeable)
+ } deriving (Eq, Generic, Show)
instance Binary PackageData
instance Hashable PackageData where hashWithSalt salt = hashWithSalt salt . show
=====================================
hadrian/src/Hadrian/Haskell/Hash.hs
=====================================
@@ -108,7 +108,7 @@ data PackageHashConfigInputs = PackageHashConfigInputs {
deriving Show
newtype PkgHashKey = PkgHashKey (Stage, Package)
- deriving (Binary, Eq, Hashable, NFData, Show, Typeable)
+ deriving (Binary, Eq, Hashable, NFData, Show)
type instance RuleResult PkgHashKey = String
pkgHash :: Stage -> Package -> Action String
=====================================
hadrian/src/Hadrian/Oracles/ArgsHash.hs
=====================================
@@ -38,7 +38,7 @@ trackArgsHash t = do
void (askOracle $ ArgsHash hashedTarget :: Action Int)
newtype ArgsHash c b = ArgsHash (Target c b)
- deriving (Binary, Eq, Hashable, NFData, Show, Typeable)
+ deriving (Binary, Eq, Hashable, NFData, Show)
type instance RuleResult (ArgsHash c b) = Int
-- | This oracle stores per-target argument list hashes in the Shake database,
=====================================
hadrian/src/Hadrian/Oracles/Cabal/Type.hs
=====================================
@@ -26,13 +26,13 @@ import Stage
-- | This type of oracle key is used by 'Hadrian.Oracles.Cabal.readPackageData'
-- to cache reading and parsing of 'Hadrian.Haskell.Cabal.Type.PackageData'.
newtype PackageDataKey = PackageDataKey Package
- deriving (Binary, Eq, Hashable, NFData, Show, Typeable)
+ deriving (Binary, Eq, Hashable, NFData, Show)
type instance RuleResult PackageDataKey = PackageData
-- | This type of oracle key is used by 'Hadrian.Oracles.Cabal.readContextData'
-- to cache reading and parsing of 'Hadrian.Haskell.Cabal.Type.ContextData'.
newtype ContextDataKey = ContextDataKey Context
- deriving (Binary, Eq, Hashable, NFData, Show, Typeable)
+ deriving (Binary, Eq, Hashable, NFData, Show)
type instance RuleResult ContextDataKey = ContextData
-- TODO: Should @PackageConfiguration@ be simply @()@? Presumably the pair
@@ -40,7 +40,7 @@ type instance RuleResult ContextDataKey = ContextData
-- | The result of Cabal package configuration produced by the oracle
-- 'Hadrian.Oracles.Cabal.configurePackageGHC'.
newtype PackageConfiguration = PackageConfiguration (C.Compiler, C.Platform)
- deriving (Binary, Eq, Show, Typeable)
+ deriving (Binary, Eq, Show)
instance NFData PackageConfiguration where
rnf (PackageConfiguration (c, p)) =
@@ -58,5 +58,5 @@ instance Hashable PackageConfiguration where
-- | This type of oracle key is used by 'Hadrian.Oracles.Cabal.configurePackageGHC'
-- to cache configuration of a Cabal package.
newtype PackageConfigurationKey = PackageConfigurationKey (Package, Stage)
- deriving (Binary, Eq, Hashable, NFData, Show, Typeable)
+ deriving (Binary, Eq, Hashable, NFData, Show)
type instance RuleResult PackageConfigurationKey = PackageConfiguration
=====================================
hadrian/src/Hadrian/Oracles/DirectoryContents.hs
=====================================
@@ -15,7 +15,7 @@ import Hadrian.Utilities
import qualified System.Directory.Extra as IO
data Match = Test FilePattern | Not Match | And [Match] | Or [Match]
- deriving (Generic, Eq, Show, Typeable)
+ deriving (Generic, Eq, Show)
instance Binary Match
instance Hashable Match
@@ -54,7 +54,7 @@ copyDirectoryContentsUntracked expr source target = do
mapM_ cp =<< directoryContents expr source
newtype DirectoryContents = DirectoryContents (Match, FilePath)
- deriving (Binary, Eq, Hashable, NFData, Show, Typeable)
+ deriving (Binary, Eq, Hashable, NFData, Show)
type instance RuleResult DirectoryContents = [FilePath]
-- | This oracle answers 'directoryContents' queries and tracks the results.
=====================================
hadrian/src/Hadrian/Oracles/Path.hs
=====================================
@@ -34,11 +34,11 @@ fixAbsolutePathOnWindows path =
return path
newtype LookupInPath = LookupInPath String
- deriving (Binary, Eq, Hashable, NFData, Show, Typeable)
+ deriving (Binary, Eq, Hashable, NFData, Show)
type instance RuleResult LookupInPath = String
newtype WindowsPath = WindowsPath FilePath
- deriving (Binary, Eq, Hashable, NFData, Show, Typeable)
+ deriving (Binary, Eq, Hashable, NFData, Show)
type instance RuleResult WindowsPath = String
-- | Oracles for looking up paths. These are slow and require caching.
=====================================
hadrian/src/Hadrian/Oracles/TextFile.hs
=====================================
@@ -118,15 +118,15 @@ queryTargetTarget :: (Toolchain.Target -> a) -> Action a
queryTargetTarget f = f <$> getTargetTarget
newtype KeyValue = KeyValue (FilePath, String)
- deriving (Binary, Eq, Hashable, NFData, Show, Typeable)
+ deriving (Binary, Eq, Hashable, NFData, Show)
type instance RuleResult KeyValue = Maybe String
newtype KeyValues = KeyValues (FilePath, String)
- deriving (Binary, Eq, Hashable, NFData, Show, Typeable)
+ deriving (Binary, Eq, Hashable, NFData, Show)
type instance RuleResult KeyValues = Maybe [String]
newtype TargetFile = TargetFile FilePath
- deriving (Binary, Eq, Hashable, NFData, Show, Typeable)
+ deriving (Binary, Eq, Hashable, NFData, Show)
type instance RuleResult TargetFile = Toolchain.Target
-- | These oracle rules are used to cache and track answers to the following
=====================================
hadrian/src/Hadrian/Utilities.hs
=====================================
@@ -298,7 +298,7 @@ userSettingRules defaultValue = do
extra <- shakeExtra <$> getShakeOptionsRules
return $ lookupExtra defaultValue extra
-newtype BuildRoot = BuildRoot FilePath deriving (Typeable, Eq, Show)
+newtype BuildRoot = BuildRoot FilePath deriving (Eq, Show)
-- | All build results are put into the 'buildRoot' directory.
buildRoot :: Action FilePath
@@ -484,7 +484,6 @@ putColoured code msg = do
else putInfo msg
newtype BuildProgressColour = BuildProgressColour String
- deriving Typeable
-- | By default, Hadrian tries to figure out if the current terminal
-- supports colors using this function. The default can be overridden
@@ -511,7 +510,6 @@ putBuild msg = do
putColoured code msg
newtype SuccessColour = SuccessColour String
- deriving Typeable
-- | Generate an encoded colour for successful output from names
mkSuccessColour :: Colour -> SuccessColour
@@ -528,7 +526,6 @@ putSuccess msg = do
putColoured code msg
newtype FailureColour = FailureColour String
- deriving Typeable
-- | Generate an encoded colour for failure output messages
mkFailureColour :: Colour -> FailureColour
@@ -544,7 +541,7 @@ putFailure msg = do
FailureColour code <- userSetting red
putColoured code msg
-data ProgressInfo = None | Brief | Normal | Unicorn deriving (Eq, Show, Typeable)
+data ProgressInfo = None | Brief | Normal | Unicorn deriving (Eq, Show)
-- | Version of 'putBuild' controlled by @--progress-info@ command line argument.
putProgressInfo :: String -> Action ()
=====================================
hadrian/src/Oracles/Flavour.hs
=====================================
@@ -14,11 +14,11 @@ import Flavour
import Settings (flavour)
newtype DynGhcPrograms =
- DynGhcPrograms () deriving (Show, Typeable, Eq, Hashable, Binary, NFData)
+ DynGhcPrograms () deriving (Show, Eq, Hashable, Binary, NFData)
type instance RuleResult DynGhcPrograms = Bool
newtype GhcProfiled =
- GhcProfiled Stage deriving (Show, Typeable, Eq, Hashable, Binary, NFData)
+ GhcProfiled Stage deriving (Show, Eq, Hashable, Binary, NFData)
type instance RuleResult GhcProfiled = Bool
oracles :: Rules ()
=====================================
hadrian/src/Oracles/ModuleFiles.hs
=====================================
@@ -16,11 +16,11 @@ import Expression
type ModuleName = String
newtype ModuleFiles = ModuleFiles (Stage, Package)
- deriving (Binary, Eq, Hashable, NFData, Show, Typeable)
+ deriving (Binary, Eq, Hashable, NFData, Show)
type instance RuleResult ModuleFiles = [Maybe FilePath]
newtype Generator = Generator (Stage, Package, FilePath)
- deriving (Binary, Eq, Hashable, NFData, Show, Typeable)
+ deriving (Binary, Eq, Hashable, NFData, Show)
type instance RuleResult Generator = Maybe FilePath
-- | We scan for the following Haskell source extensions when looking for module
=====================================
rts/.ubsan-suppressions
=====================================
@@ -1,3 +1,6 @@
+# libraries/bytestring/cbits/is-valid-utf8.c:66:14: runtime load of misaligned address 0x7ae45206f112 for type 'const uint64_t *' (aka 'const unsigned long *'), which requires 8 byte alignment
+alignment:libraries/bytestring/cbits/is-valid-utf8.c
+
# libraries/text/cbits/measure_off.c:50:39: runtime left shift of 1 by 31 places cannot be represented in type 'int'
shift-base:libraries/text/cbits/measure_off.c
=====================================
rts/include/Stg.h
=====================================
@@ -335,6 +335,7 @@ external prototype return neither of these types to workaround #11395.
#include "stg/MachRegsForHost.h"
#include "stg/Regs.h"
#include "stg/Ticky.h"
+#include "rts/ASANUtils.h"
#include "rts/TSANUtils.h"
#if IN_STG_CODE
=====================================
rts/include/rts/ASANUtils.h
=====================================
@@ -0,0 +1,33 @@
+#pragma once
+
+#if defined(__SANITIZE_ADDRESS__)
+#define ASAN_ENABLED
+#elif defined(__has_feature)
+#if __has_feature(address_sanitizer)
+#define ASAN_ENABLED
+#endif
+#endif
+
+#if defined(ASAN_ENABLED)
+#include <sanitizer/asan_interface.h>
+#define USED_IF_ASAN
+#else
+#include <stdlib.h>
+#define USED_IF_ASAN __attribute__((unused))
+#endif
+
+static inline void
+__ghc_asan_poison_memory_region(void const volatile *addr USED_IF_ASAN,
+ size_t size USED_IF_ASAN) {
+#if defined(ASAN_ENABLED)
+ __asan_poison_memory_region(addr, size);
+#endif
+}
+
+static inline void
+__ghc_asan_unpoison_memory_region(void const volatile *addr USED_IF_ASAN,
+ size_t size USED_IF_ASAN) {
+#if defined(ASAN_ENABLED)
+ __asan_unpoison_memory_region(addr, size);
+#endif
+}
=====================================
rts/rts.cabal
=====================================
@@ -97,6 +97,12 @@ flag ubsan
UndefinedBehaviorSanitizer.
default: False
manual: True
+flag asan
+ description:
+ Link with -fsanitize=address, to be enabled when building with
+ AddressSanitizer.
+ default: False
+ manual: True
flag shared-libsan
description:
Link with -shared-libsan, to guarantee only one copy of the
@@ -216,6 +222,9 @@ library
if flag(ubsan)
ld-options: -fsanitize=undefined
+ if flag(asan)
+ ld-options: -fsanitize=address
+
if flag(shared-libsan)
ld-options: -shared-libsan
@@ -280,6 +289,7 @@ library
-- ^ generated
rts/ghc_ffi.h
rts/Adjustor.h
+ rts/ASANUtils.h
rts/ExecPage.h
rts/BlockSignals.h
rts/Bytecodes.h
=====================================
rts/sm/MBlock.c
=====================================
@@ -579,6 +579,8 @@ getMBlocks(uint32_t n)
ret = getCommittedMBlocks(n);
+ __ghc_asan_unpoison_memory_region(ret, (W_)n * MBLOCK_SIZE);
+
debugTrace(DEBUG_gc, "allocated %d megablock(s) at %p",n,ret);
mblocks_allocated += n;
@@ -611,6 +613,8 @@ freeMBlocks(void *addr, uint32_t n)
mblocks_allocated -= n;
+ __ghc_asan_poison_memory_region(addr, (W_)n * MBLOCK_SIZE);
+
decommitMBlocks(addr, n);
}
=====================================
testsuite/driver/testglobals.py
=====================================
@@ -189,6 +189,9 @@ class TestConfig:
# Are we running with UndefinedBehaviorSanitizer enabled?
self.have_ubsan = False
+ # Are we running with AddressSanitizer enabled?
+ self.have_asan = False
+
# Do symbols use leading underscores?
self.leading_underscore = False
=====================================
testsuite/driver/testlib.py
=====================================
@@ -1093,6 +1093,9 @@ def have_thread_sanitizer( ) -> bool:
def have_ubsan( ) -> bool:
return config.have_ubsan
+def have_asan( ) -> bool:
+ return config.have_asan
+
def gcc_as_cmmp() -> bool:
return config.cmm_cpp_is_gcc
=====================================
testsuite/tests/rts/T18623/all.T
=====================================
@@ -8,6 +8,8 @@ test('T18623',
# Recent versions of osx report an error when running `ulimit -v`
when(opsys('darwin'), skip),
when(arch('powerpc64le'), skip),
+ # ASan can't allocate shadow memory
+ when(have_asan(), skip),
cmd_prefix('ulimit -v ' + str(8 * 1024 ** 2) + ' && '),
ignore_stdout],
run_command,
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/367a9e8f914663e6b3f9bc76aa26ba…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/367a9e8f914663e6b3f9bc76aa26ba…
You're receiving this email because of your account on gitlab.haskell.org.
1
0
[Git][ghc/ghc][wip/foundation-improve-coverage] 5 commits: ci: use treeless fetch for perf notes
by Cheng Shao (@TerrorJack) 14 Dec '25
by Cheng Shao (@TerrorJack) 14 Dec '25
14 Dec '25
Cheng Shao pushed to branch wip/foundation-improve-coverage at Glasgow Haskell Compiler / GHC
Commits:
3c001377 by Cheng Shao at 2025-12-13T05:03:15-05:00
ci: use treeless fetch for perf notes
This patch improves the ci logic for fetching perf notes by using
treeless fetch
(https://github.blog/open-source/git/get-up-to-speed-with-partial-clone-and-…)
to avoid downloading all blobs of the perf notes repo at once, and
only fetch the actually required blobs on-demand when needed. This
makes the initial `test-metrics.sh pull` operation much faster, and
also more robust, since we are seeing an increasing rate of 504 errors
in CI when fetching all perf notes at once, which is a major source of
CI flakiness at this point.
Co-authored-by: Codex <codex(a)openai.com>
- - - - -
123a8d77 by Peter Trommler at 2025-12-13T05:03:57-05:00
Cmm: remove restriction in MachOp folding
- - - - -
0b54b5fd by Andreas Klebinger at 2025-12-13T05:04:38-05:00
Remove explicit Typeable deriviations.
- - - - -
08b13f7b by Cheng Shao at 2025-12-13T05:05:18-05:00
ci: set gc.auto=0 during setup stage
This patch sets `gc.auto=0` during `setup` stage of CI, see added
comment for detailed explanation.
- - - - -
1a841641 by Cheng Shao at 2025-12-13T23:34:32+01:00
testsuite: improve coverage of foundation test
This patch refactors the `foundation` test a bit to improve coverage:
- Instead of using a hard-coded seed, a random seed is now taken from
the command line, and printed upon test failure. This improves test
coverage over many future CI runs, and shall a failure occur, the
seed is available in the CI log for local reproduction.
- The iterations count is bumped to 10000 instead of 100, similar to
the bump in `test-primops`. Runtime timeout is bumped 2x just to be
safe, though it's 2m39s on my machine and well within default
timeout 300s.
- Improve `newLCGGen` by using non-atomic loads/stores on a
`MutableByteArray#` for storing mutable `Word64`, this test doesn't
use parallelism in the first place
- Fixed a few compiler warnings and removed redundant pragmas and
imports
Co-authored-by: Codex <codex(a)openai.com>
- - - - -
16 changed files:
- .gitlab/ci.sh
- .gitlab/test-metrics.sh
- compiler/GHC/Cmm/Opt.hs
- hadrian/src/Hadrian/Haskell/Cabal/Type.hs
- hadrian/src/Hadrian/Haskell/Hash.hs
- hadrian/src/Hadrian/Oracles/ArgsHash.hs
- hadrian/src/Hadrian/Oracles/Cabal/Type.hs
- hadrian/src/Hadrian/Oracles/DirectoryContents.hs
- hadrian/src/Hadrian/Oracles/Path.hs
- hadrian/src/Hadrian/Oracles/TextFile.hs
- hadrian/src/Hadrian/Utilities.hs
- hadrian/src/Oracles/Flavour.hs
- hadrian/src/Oracles/ModuleFiles.hs
- testsuite/tests/numeric/should_run/all.T
- testsuite/tests/numeric/should_run/foundation.hs
- testsuite/tests/numeric/should_run/foundation.stdout
Changes:
=====================================
.gitlab/ci.sh
=====================================
@@ -259,6 +259,12 @@ function setup() {
git config user.email "ghc-ci(a)gitlab-haskell.org"
git config user.name "GHC GitLab CI"
+ # Disable auto gc. Useless in a temporary checkout, and
+ # non-deterministic "Auto packing the repository in background for
+ # optimum performance." message could pop up that confuses the
+ # testsuite driver!
+ git config gc.auto 0
+
info "====================================================="
info "Toolchain versions"
info "====================================================="
=====================================
.gitlab/test-metrics.sh
=====================================
@@ -17,12 +17,14 @@ fail() {
function pull() {
local ref="refs/notes/$REF"
- # 2023-10-04: `git fetch` started failing, first on Darwin in CI and then on
- # Linux locally, both using git version 2.40.1. See #24055. One workaround is
- # to set a larger http.postBuffer, although this is definitely a workaround.
- # The default should work just fine. The error could be in git, GitLab, or
- # perhaps the networking tube (including all proxies etc) between the two.
- run git -c http.postBuffer=2097152 fetch -f "$NOTES_ORIGIN" "$ref:$ref"
+
+ # Fetch performance notes from a dedicated promisor remote using a
+ # treeless filter, so that individual note blobs are fetched lazily
+ # as needed.
+ git remote add perf-notes "$NOTES_ORIGIN" || true
+ git config fetch.recurseSubmodules false
+ git config remote.perf-notes.partialclonefilter tree:0
+ run git fetch --force perf-notes "$ref:$ref"
echo "perf notes ref $ref is $(git rev-parse $ref)"
}
@@ -81,4 +83,3 @@ case $1 in
pull) pull ;;
*) fail "Invalid mode $1" ;;
esac
-
=====================================
compiler/GHC/Cmm/Opt.hs
=====================================
@@ -290,9 +290,7 @@ cmmMachOpFoldM _ (MO_Sub _) [CmmLit lit, CmmLit (CmmInt i rep)]
-- the same comparison at the larger size.
cmmMachOpFoldM platform cmp [CmmMachOp conv [x], CmmLit (CmmInt i _)]
- | -- powerPC NCG has a TODO for I8/I16 comparisons, so don't try
- platformArch platform `elem` [ArchX86, ArchX86_64],
- -- if the operand is widened:
+ | -- if the operand is widened:
Just (rep, signed, narrow_fn) <- maybe_conversion conv,
-- and this is a comparison operation:
Just narrow_cmp <- maybe_comparison cmp rep signed,
=====================================
hadrian/src/Hadrian/Haskell/Cabal/Type.hs
=====================================
@@ -31,7 +31,7 @@ data PackageData = PackageData
, description :: String
, packageDependencies :: [Package]
, genericPackageDescription :: GenericPackageDescription
- } deriving (Eq, Generic, Show, Typeable)
+ } deriving (Eq, Generic, Show)
-- | Haskell package metadata obtained after resolving package configuration
-- flags and associated conditionals according to the current build context.
@@ -75,7 +75,7 @@ data ContextData = ContextData
, contextLibdir :: FilePath
-- The location where dynamic libraries go
, contextDynLibdir :: FilePath
- } deriving (Eq, Generic, Show, Typeable)
+ } deriving (Eq, Generic, Show)
instance Binary PackageData
instance Hashable PackageData where hashWithSalt salt = hashWithSalt salt . show
=====================================
hadrian/src/Hadrian/Haskell/Hash.hs
=====================================
@@ -108,7 +108,7 @@ data PackageHashConfigInputs = PackageHashConfigInputs {
deriving Show
newtype PkgHashKey = PkgHashKey (Stage, Package)
- deriving (Binary, Eq, Hashable, NFData, Show, Typeable)
+ deriving (Binary, Eq, Hashable, NFData, Show)
type instance RuleResult PkgHashKey = String
pkgHash :: Stage -> Package -> Action String
=====================================
hadrian/src/Hadrian/Oracles/ArgsHash.hs
=====================================
@@ -38,7 +38,7 @@ trackArgsHash t = do
void (askOracle $ ArgsHash hashedTarget :: Action Int)
newtype ArgsHash c b = ArgsHash (Target c b)
- deriving (Binary, Eq, Hashable, NFData, Show, Typeable)
+ deriving (Binary, Eq, Hashable, NFData, Show)
type instance RuleResult (ArgsHash c b) = Int
-- | This oracle stores per-target argument list hashes in the Shake database,
=====================================
hadrian/src/Hadrian/Oracles/Cabal/Type.hs
=====================================
@@ -26,13 +26,13 @@ import Stage
-- | This type of oracle key is used by 'Hadrian.Oracles.Cabal.readPackageData'
-- to cache reading and parsing of 'Hadrian.Haskell.Cabal.Type.PackageData'.
newtype PackageDataKey = PackageDataKey Package
- deriving (Binary, Eq, Hashable, NFData, Show, Typeable)
+ deriving (Binary, Eq, Hashable, NFData, Show)
type instance RuleResult PackageDataKey = PackageData
-- | This type of oracle key is used by 'Hadrian.Oracles.Cabal.readContextData'
-- to cache reading and parsing of 'Hadrian.Haskell.Cabal.Type.ContextData'.
newtype ContextDataKey = ContextDataKey Context
- deriving (Binary, Eq, Hashable, NFData, Show, Typeable)
+ deriving (Binary, Eq, Hashable, NFData, Show)
type instance RuleResult ContextDataKey = ContextData
-- TODO: Should @PackageConfiguration@ be simply @()@? Presumably the pair
@@ -40,7 +40,7 @@ type instance RuleResult ContextDataKey = ContextData
-- | The result of Cabal package configuration produced by the oracle
-- 'Hadrian.Oracles.Cabal.configurePackageGHC'.
newtype PackageConfiguration = PackageConfiguration (C.Compiler, C.Platform)
- deriving (Binary, Eq, Show, Typeable)
+ deriving (Binary, Eq, Show)
instance NFData PackageConfiguration where
rnf (PackageConfiguration (c, p)) =
@@ -58,5 +58,5 @@ instance Hashable PackageConfiguration where
-- | This type of oracle key is used by 'Hadrian.Oracles.Cabal.configurePackageGHC'
-- to cache configuration of a Cabal package.
newtype PackageConfigurationKey = PackageConfigurationKey (Package, Stage)
- deriving (Binary, Eq, Hashable, NFData, Show, Typeable)
+ deriving (Binary, Eq, Hashable, NFData, Show)
type instance RuleResult PackageConfigurationKey = PackageConfiguration
=====================================
hadrian/src/Hadrian/Oracles/DirectoryContents.hs
=====================================
@@ -15,7 +15,7 @@ import Hadrian.Utilities
import qualified System.Directory.Extra as IO
data Match = Test FilePattern | Not Match | And [Match] | Or [Match]
- deriving (Generic, Eq, Show, Typeable)
+ deriving (Generic, Eq, Show)
instance Binary Match
instance Hashable Match
@@ -54,7 +54,7 @@ copyDirectoryContentsUntracked expr source target = do
mapM_ cp =<< directoryContents expr source
newtype DirectoryContents = DirectoryContents (Match, FilePath)
- deriving (Binary, Eq, Hashable, NFData, Show, Typeable)
+ deriving (Binary, Eq, Hashable, NFData, Show)
type instance RuleResult DirectoryContents = [FilePath]
-- | This oracle answers 'directoryContents' queries and tracks the results.
=====================================
hadrian/src/Hadrian/Oracles/Path.hs
=====================================
@@ -34,11 +34,11 @@ fixAbsolutePathOnWindows path =
return path
newtype LookupInPath = LookupInPath String
- deriving (Binary, Eq, Hashable, NFData, Show, Typeable)
+ deriving (Binary, Eq, Hashable, NFData, Show)
type instance RuleResult LookupInPath = String
newtype WindowsPath = WindowsPath FilePath
- deriving (Binary, Eq, Hashable, NFData, Show, Typeable)
+ deriving (Binary, Eq, Hashable, NFData, Show)
type instance RuleResult WindowsPath = String
-- | Oracles for looking up paths. These are slow and require caching.
=====================================
hadrian/src/Hadrian/Oracles/TextFile.hs
=====================================
@@ -118,15 +118,15 @@ queryTargetTarget :: (Toolchain.Target -> a) -> Action a
queryTargetTarget f = f <$> getTargetTarget
newtype KeyValue = KeyValue (FilePath, String)
- deriving (Binary, Eq, Hashable, NFData, Show, Typeable)
+ deriving (Binary, Eq, Hashable, NFData, Show)
type instance RuleResult KeyValue = Maybe String
newtype KeyValues = KeyValues (FilePath, String)
- deriving (Binary, Eq, Hashable, NFData, Show, Typeable)
+ deriving (Binary, Eq, Hashable, NFData, Show)
type instance RuleResult KeyValues = Maybe [String]
newtype TargetFile = TargetFile FilePath
- deriving (Binary, Eq, Hashable, NFData, Show, Typeable)
+ deriving (Binary, Eq, Hashable, NFData, Show)
type instance RuleResult TargetFile = Toolchain.Target
-- | These oracle rules are used to cache and track answers to the following
=====================================
hadrian/src/Hadrian/Utilities.hs
=====================================
@@ -298,7 +298,7 @@ userSettingRules defaultValue = do
extra <- shakeExtra <$> getShakeOptionsRules
return $ lookupExtra defaultValue extra
-newtype BuildRoot = BuildRoot FilePath deriving (Typeable, Eq, Show)
+newtype BuildRoot = BuildRoot FilePath deriving (Eq, Show)
-- | All build results are put into the 'buildRoot' directory.
buildRoot :: Action FilePath
@@ -484,7 +484,6 @@ putColoured code msg = do
else putInfo msg
newtype BuildProgressColour = BuildProgressColour String
- deriving Typeable
-- | By default, Hadrian tries to figure out if the current terminal
-- supports colors using this function. The default can be overridden
@@ -511,7 +510,6 @@ putBuild msg = do
putColoured code msg
newtype SuccessColour = SuccessColour String
- deriving Typeable
-- | Generate an encoded colour for successful output from names
mkSuccessColour :: Colour -> SuccessColour
@@ -528,7 +526,6 @@ putSuccess msg = do
putColoured code msg
newtype FailureColour = FailureColour String
- deriving Typeable
-- | Generate an encoded colour for failure output messages
mkFailureColour :: Colour -> FailureColour
@@ -544,7 +541,7 @@ putFailure msg = do
FailureColour code <- userSetting red
putColoured code msg
-data ProgressInfo = None | Brief | Normal | Unicorn deriving (Eq, Show, Typeable)
+data ProgressInfo = None | Brief | Normal | Unicorn deriving (Eq, Show)
-- | Version of 'putBuild' controlled by @--progress-info@ command line argument.
putProgressInfo :: String -> Action ()
=====================================
hadrian/src/Oracles/Flavour.hs
=====================================
@@ -14,11 +14,11 @@ import Flavour
import Settings (flavour)
newtype DynGhcPrograms =
- DynGhcPrograms () deriving (Show, Typeable, Eq, Hashable, Binary, NFData)
+ DynGhcPrograms () deriving (Show, Eq, Hashable, Binary, NFData)
type instance RuleResult DynGhcPrograms = Bool
newtype GhcProfiled =
- GhcProfiled Stage deriving (Show, Typeable, Eq, Hashable, Binary, NFData)
+ GhcProfiled Stage deriving (Show, Eq, Hashable, Binary, NFData)
type instance RuleResult GhcProfiled = Bool
oracles :: Rules ()
=====================================
hadrian/src/Oracles/ModuleFiles.hs
=====================================
@@ -16,11 +16,11 @@ import Expression
type ModuleName = String
newtype ModuleFiles = ModuleFiles (Stage, Package)
- deriving (Binary, Eq, Hashable, NFData, Show, Typeable)
+ deriving (Binary, Eq, Hashable, NFData, Show)
type instance RuleResult ModuleFiles = [Maybe FilePath]
newtype Generator = Generator (Stage, Package, FilePath)
- deriving (Binary, Eq, Hashable, NFData, Show, Typeable)
+ deriving (Binary, Eq, Hashable, NFData, Show)
type instance RuleResult Generator = Maybe FilePath
-- | We scan for the following Haskell source extensions when looking for module
=====================================
testsuite/tests/numeric/should_run/all.T
=====================================
@@ -3,6 +3,8 @@
# extra run flags
# expected process return value, if not zero
+import random
+
test('arith001', normal, compile_and_run, [''])
test('arith002', normal, compile_and_run, [''])
test('arith003', normal, compile_and_run, [''])
@@ -82,7 +84,7 @@ test('IntegerToFloat', normal, compile_and_run, [''])
test('T20291', normal, compile_and_run, [''])
test('T22282', normal, compile_and_run, [''])
test('T22671', js_fragile(24259), compile_and_run, [''])
-test('foundation', [when(js_arch(), run_timeout_multiplier(2)), js_fragile(24259), extra_ways(['optasm','ghci','ghci-opt'])], compile_and_run, ['-package transformers -fno-break-points'])
+test('foundation', [run_timeout_multiplier(2), js_fragile(24259), extra_ways(['optasm','ghci','ghci-opt']), extra_run_opts(str(random.getrandbits(64)))], compile_and_run, ['-fno-break-points'])
test('T24066', normal, compile_and_run, [''])
test('div01', normal, compile_and_run, [''])
test('T24245', normal, compile_and_run, [''])
=====================================
testsuite/tests/numeric/should_run/foundation.hs
=====================================
@@ -10,9 +10,7 @@
compare the result of the primop wrappers with the results of interpretation.
-}
-{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
-{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeAbstractions #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE DerivingStrategies #-}
@@ -25,28 +23,23 @@ module Main
( main
) where
+import Data.Array.Byte
import Data.Bits (Bits((.&.), bit), FiniteBits, finiteBitSize)
import Data.Word
import Data.Int
import GHC.Natural
import Data.Typeable
-import Data.Proxy
import GHC.Int
import GHC.Word
-import GHC.Word
import Data.Function
import GHC.Prim
import Control.Monad.Reader
-import System.IO
-import Foreign.Marshal.Alloc
-import Foreign.Storable
-import Foreign.Ptr
import Data.List (intercalate)
-import Data.IORef
+import System.Environment (getArgs)
+import Text.Read (readMaybe)
import Unsafe.Coerce
import GHC.Types
import Data.Char
-import Data.Semigroup
import System.Exit
import qualified GHC.Internal.PrimopWrappers as Wrapper
@@ -194,11 +187,16 @@ newtype LCGGen = LCGGen { randomWord64 :: IO Word64 }
data LCGParams = LCGParams { seed :: Word64, a :: Word64, c :: Word64, m :: Word64 }
newLCGGen :: LCGParams -> IO LCGGen
-newLCGGen LCGParams{..} = do
- var <- newIORef (fromIntegral seed)
- return $ LCGGen $ do
- atomicModifyIORef' var (\old_v -> let new_val = (old_v * a + c) `mod` m in (new_val, new_val))
-
+newLCGGen LCGParams {seed = W64# seed#, ..} = do
+ MutableByteArray mba# <- IO $ \s0 -> case newByteArray# 8# s0 of
+ (# s1, mba# #) -> case writeWord64Array# mba# 0# seed# s1 of
+ s2 -> (# s2, MutableByteArray mba# #)
+ pure $ LCGGen $ IO $ \s0 -> case readWord64Array# mba# 0# s0 of
+ (# s1, old_val# #) ->
+ let old_val = W64# old_val#
+ !new_val@(W64# new_val#) = (old_val * a + c) `mod` m
+ in case writeWord64Array# mba# 0# new_val# s1 of
+ s2 -> (# s2, new_val #)
runPropertyCheck (PropertyBinaryOp res desc s1 s2) =
if res then return Success
@@ -211,7 +209,7 @@ runPropertyCheck (PropertyAnd a1 a2) = (<>) <$> runPropertyCheck a1 <*> runPrope
runProperty :: Property -> ReaderT RunS IO Result
runProperty (Prop p) = do
- let iterations = 100
+ let iterations = 10000 :: Int
loop iterations iterations
where
loop iterations 0 = do
@@ -257,14 +255,15 @@ runTestInternal (Property name p) = do
nest label $ runProperty (property p)
-runTests :: Test -> IO ()
-runTests t = do
+runTests :: Word64 -> Test -> IO ()
+runTests seed t = do
-- These params are the same ones as glibc uses.
- h <- newLCGGen (LCGParams { seed = 1238123213, m = 2^31, a = 1103515245, c = 12345 })
+ h <- newLCGGen (LCGParams { seed, m = 2 ^ (31 :: Int), a = 1103515245, c = 12345 })
res <- runReaderT (runTestInternal t) (RunS 0 h [])
case res of
Success -> return ()
Failure tests -> do
+ putStrLn $ "Seed: " ++ show seed
putStrLn $ "These tests failed: \n" ++ intercalate " \n" (map (showStack 0 . reverse) tests)
exitFailure
@@ -455,7 +454,19 @@ instance TestPrimop LowerBitsAreDefined where
twoNonZero :: (a -> a -> b) -> a -> NonZero a -> b
twoNonZero f x (NonZero y) = f x y
-main = runTests (Group "ALL" [testNumberRefs, testPrimops])
+getSeedFromArgs :: IO Word64
+getSeedFromArgs = do
+ args <- getArgs
+ case args of
+ [arg] -> case readMaybe arg of
+ Just seed -> pure seed
+ Nothing -> die $ "Invalid seed (expected Word64): " ++ show arg
+ _ -> die "Usage: foundation <seed>"
+
+main :: IO ()
+main = do
+ seed <- getSeedFromArgs
+ runTests seed (Group "ALL" [testNumberRefs, testPrimops])
-- Test an interpreted primop vs a compiled primop
testPrimops = Group "primop"
=====================================
testsuite/tests/numeric/should_run/foundation.stdout
=====================================
@@ -3,1048 +3,1048 @@ Group ALL
Group Int
Group Integral
Running FromIntegral(Integer(a)) == a
- Passed 100 iterations
+ Passed 10000 iterations
Group Property
Running Eq
- Passed 100 iterations
+ Passed 10000 iterations
Running Show
- Passed 100 iterations
+ Passed 10000 iterations
Running Ord
- Passed 100 iterations
+ Passed 10000 iterations
Running <
- Passed 100 iterations
+ Passed 10000 iterations
Group Additive
Running a + azero == a
- Passed 100 iterations
+ Passed 10000 iterations
Running azero + a == a
- Passed 100 iterations
+ Passed 10000 iterations
Running a + b == b + a
- Passed 100 iterations
+ Passed 10000 iterations
Group Multiplicative
Running a * 1 == a
- Passed 100 iterations
+ Passed 10000 iterations
Running 1 * a == a
- Passed 100 iterations
+ Passed 10000 iterations
Running multiplication commutative
- Passed 100 iterations
+ Passed 10000 iterations
Running a * b == Integer(a) * Integer(b)
- Passed 100 iterations
+ Passed 10000 iterations
Group Divisible
Running (x `div` y) * y + (x `mod` y) == x
- Passed 100 iterations
+ Passed 10000 iterations
Group Precedence
Running + and - (1)
- Passed 100 iterations
+ Passed 10000 iterations
Running + and - (2)
- Passed 100 iterations
+ Passed 10000 iterations
Running + and * (1)
- Passed 100 iterations
+ Passed 10000 iterations
Running + and * (2)
- Passed 100 iterations
+ Passed 10000 iterations
Running - and * (1)
- Passed 100 iterations
+ Passed 10000 iterations
Running - and * (2)
- Passed 100 iterations
+ Passed 10000 iterations
Running * and ^ (1)
- Passed 100 iterations
+ Passed 10000 iterations
Running * and ^ (2)
- Passed 100 iterations
+ Passed 10000 iterations
Group Int8
Group Integral
Running FromIntegral(Integer(a)) == a
- Passed 100 iterations
+ Passed 10000 iterations
Group Property
Running Eq
- Passed 100 iterations
+ Passed 10000 iterations
Running Show
- Passed 100 iterations
+ Passed 10000 iterations
Running Ord
- Passed 100 iterations
+ Passed 10000 iterations
Running <
- Passed 100 iterations
+ Passed 10000 iterations
Group Additive
Running a + azero == a
- Passed 100 iterations
+ Passed 10000 iterations
Running azero + a == a
- Passed 100 iterations
+ Passed 10000 iterations
Running a + b == b + a
- Passed 100 iterations
+ Passed 10000 iterations
Group Multiplicative
Running a * 1 == a
- Passed 100 iterations
+ Passed 10000 iterations
Running 1 * a == a
- Passed 100 iterations
+ Passed 10000 iterations
Running multiplication commutative
- Passed 100 iterations
+ Passed 10000 iterations
Running a * b == Integer(a) * Integer(b)
- Passed 100 iterations
+ Passed 10000 iterations
Group Divisible
Running (x `div` y) * y + (x `mod` y) == x
- Passed 100 iterations
+ Passed 10000 iterations
Group Precedence
Running + and - (1)
- Passed 100 iterations
+ Passed 10000 iterations
Running + and - (2)
- Passed 100 iterations
+ Passed 10000 iterations
Running + and * (1)
- Passed 100 iterations
+ Passed 10000 iterations
Running + and * (2)
- Passed 100 iterations
+ Passed 10000 iterations
Running - and * (1)
- Passed 100 iterations
+ Passed 10000 iterations
Running - and * (2)
- Passed 100 iterations
+ Passed 10000 iterations
Running * and ^ (1)
- Passed 100 iterations
+ Passed 10000 iterations
Running * and ^ (2)
- Passed 100 iterations
+ Passed 10000 iterations
Group Int16
Group Integral
Running FromIntegral(Integer(a)) == a
- Passed 100 iterations
+ Passed 10000 iterations
Group Property
Running Eq
- Passed 100 iterations
+ Passed 10000 iterations
Running Show
- Passed 100 iterations
+ Passed 10000 iterations
Running Ord
- Passed 100 iterations
+ Passed 10000 iterations
Running <
- Passed 100 iterations
+ Passed 10000 iterations
Group Additive
Running a + azero == a
- Passed 100 iterations
+ Passed 10000 iterations
Running azero + a == a
- Passed 100 iterations
+ Passed 10000 iterations
Running a + b == b + a
- Passed 100 iterations
+ Passed 10000 iterations
Group Multiplicative
Running a * 1 == a
- Passed 100 iterations
+ Passed 10000 iterations
Running 1 * a == a
- Passed 100 iterations
+ Passed 10000 iterations
Running multiplication commutative
- Passed 100 iterations
+ Passed 10000 iterations
Running a * b == Integer(a) * Integer(b)
- Passed 100 iterations
+ Passed 10000 iterations
Group Divisible
Running (x `div` y) * y + (x `mod` y) == x
- Passed 100 iterations
+ Passed 10000 iterations
Group Precedence
Running + and - (1)
- Passed 100 iterations
+ Passed 10000 iterations
Running + and - (2)
- Passed 100 iterations
+ Passed 10000 iterations
Running + and * (1)
- Passed 100 iterations
+ Passed 10000 iterations
Running + and * (2)
- Passed 100 iterations
+ Passed 10000 iterations
Running - and * (1)
- Passed 100 iterations
+ Passed 10000 iterations
Running - and * (2)
- Passed 100 iterations
+ Passed 10000 iterations
Running * and ^ (1)
- Passed 100 iterations
+ Passed 10000 iterations
Running * and ^ (2)
- Passed 100 iterations
+ Passed 10000 iterations
Group Int32
Group Integral
Running FromIntegral(Integer(a)) == a
- Passed 100 iterations
+ Passed 10000 iterations
Group Property
Running Eq
- Passed 100 iterations
+ Passed 10000 iterations
Running Show
- Passed 100 iterations
+ Passed 10000 iterations
Running Ord
- Passed 100 iterations
+ Passed 10000 iterations
Running <
- Passed 100 iterations
+ Passed 10000 iterations
Group Additive
Running a + azero == a
- Passed 100 iterations
+ Passed 10000 iterations
Running azero + a == a
- Passed 100 iterations
+ Passed 10000 iterations
Running a + b == b + a
- Passed 100 iterations
+ Passed 10000 iterations
Group Multiplicative
Running a * 1 == a
- Passed 100 iterations
+ Passed 10000 iterations
Running 1 * a == a
- Passed 100 iterations
+ Passed 10000 iterations
Running multiplication commutative
- Passed 100 iterations
+ Passed 10000 iterations
Running a * b == Integer(a) * Integer(b)
- Passed 100 iterations
+ Passed 10000 iterations
Group Divisible
Running (x `div` y) * y + (x `mod` y) == x
- Passed 100 iterations
+ Passed 10000 iterations
Group Precedence
Running + and - (1)
- Passed 100 iterations
+ Passed 10000 iterations
Running + and - (2)
- Passed 100 iterations
+ Passed 10000 iterations
Running + and * (1)
- Passed 100 iterations
+ Passed 10000 iterations
Running + and * (2)
- Passed 100 iterations
+ Passed 10000 iterations
Running - and * (1)
- Passed 100 iterations
+ Passed 10000 iterations
Running - and * (2)
- Passed 100 iterations
+ Passed 10000 iterations
Running * and ^ (1)
- Passed 100 iterations
+ Passed 10000 iterations
Running * and ^ (2)
- Passed 100 iterations
+ Passed 10000 iterations
Group Int64
Group Integral
Running FromIntegral(Integer(a)) == a
- Passed 100 iterations
+ Passed 10000 iterations
Group Property
Running Eq
- Passed 100 iterations
+ Passed 10000 iterations
Running Show
- Passed 100 iterations
+ Passed 10000 iterations
Running Ord
- Passed 100 iterations
+ Passed 10000 iterations
Running <
- Passed 100 iterations
+ Passed 10000 iterations
Group Additive
Running a + azero == a
- Passed 100 iterations
+ Passed 10000 iterations
Running azero + a == a
- Passed 100 iterations
+ Passed 10000 iterations
Running a + b == b + a
- Passed 100 iterations
+ Passed 10000 iterations
Group Multiplicative
Running a * 1 == a
- Passed 100 iterations
+ Passed 10000 iterations
Running 1 * a == a
- Passed 100 iterations
+ Passed 10000 iterations
Running multiplication commutative
- Passed 100 iterations
+ Passed 10000 iterations
Running a * b == Integer(a) * Integer(b)
- Passed 100 iterations
+ Passed 10000 iterations
Group Divisible
Running (x `div` y) * y + (x `mod` y) == x
- Passed 100 iterations
+ Passed 10000 iterations
Group Precedence
Running + and - (1)
- Passed 100 iterations
+ Passed 10000 iterations
Running + and - (2)
- Passed 100 iterations
+ Passed 10000 iterations
Running + and * (1)
- Passed 100 iterations
+ Passed 10000 iterations
Running + and * (2)
- Passed 100 iterations
+ Passed 10000 iterations
Running - and * (1)
- Passed 100 iterations
+ Passed 10000 iterations
Running - and * (2)
- Passed 100 iterations
+ Passed 10000 iterations
Running * and ^ (1)
- Passed 100 iterations
+ Passed 10000 iterations
Running * and ^ (2)
- Passed 100 iterations
+ Passed 10000 iterations
Group Integer
Group Integral
Running FromIntegral(Integer(a)) == a
- Passed 100 iterations
+ Passed 10000 iterations
Group Property
Running Eq
- Passed 100 iterations
+ Passed 10000 iterations
Running Show
- Passed 100 iterations
+ Passed 10000 iterations
Running Ord
- Passed 100 iterations
+ Passed 10000 iterations
Running <
- Passed 100 iterations
+ Passed 10000 iterations
Group Additive
Running a + azero == a
- Passed 100 iterations
+ Passed 10000 iterations
Running azero + a == a
- Passed 100 iterations
+ Passed 10000 iterations
Running a + b == b + a
- Passed 100 iterations
+ Passed 10000 iterations
Group Multiplicative
Running a * 1 == a
- Passed 100 iterations
+ Passed 10000 iterations
Running 1 * a == a
- Passed 100 iterations
+ Passed 10000 iterations
Running multiplication commutative
- Passed 100 iterations
+ Passed 10000 iterations
Running a * b == Integer(a) * Integer(b)
- Passed 100 iterations
+ Passed 10000 iterations
Group Divisible
Running (x `div` y) * y + (x `mod` y) == x
- Passed 100 iterations
+ Passed 10000 iterations
Group Precedence
Running + and - (1)
- Passed 100 iterations
+ Passed 10000 iterations
Running + and - (2)
- Passed 100 iterations
+ Passed 10000 iterations
Running + and * (1)
- Passed 100 iterations
+ Passed 10000 iterations
Running + and * (2)
- Passed 100 iterations
+ Passed 10000 iterations
Running - and * (1)
- Passed 100 iterations
+ Passed 10000 iterations
Running - and * (2)
- Passed 100 iterations
+ Passed 10000 iterations
Running * and ^ (1)
- Passed 100 iterations
+ Passed 10000 iterations
Running * and ^ (2)
- Passed 100 iterations
+ Passed 10000 iterations
Group Word
Group Integral
Running FromIntegral(Integer(a)) == a
- Passed 100 iterations
+ Passed 10000 iterations
Group Property
Running Eq
- Passed 100 iterations
+ Passed 10000 iterations
Running Show
- Passed 100 iterations
+ Passed 10000 iterations
Running Ord
- Passed 100 iterations
+ Passed 10000 iterations
Running <
- Passed 100 iterations
+ Passed 10000 iterations
Group Additive
Running a + azero == a
- Passed 100 iterations
+ Passed 10000 iterations
Running azero + a == a
- Passed 100 iterations
+ Passed 10000 iterations
Running a + b == b + a
- Passed 100 iterations
+ Passed 10000 iterations
Group Multiplicative
Running a * 1 == a
- Passed 100 iterations
+ Passed 10000 iterations
Running 1 * a == a
- Passed 100 iterations
+ Passed 10000 iterations
Running multiplication commutative
- Passed 100 iterations
+ Passed 10000 iterations
Running a * b == Integer(a) * Integer(b)
- Passed 100 iterations
+ Passed 10000 iterations
Group Divisible
Running (x `div` y) * y + (x `mod` y) == x
- Passed 100 iterations
+ Passed 10000 iterations
Group Precedence
Running + and - (1)
- Passed 100 iterations
+ Passed 10000 iterations
Running + and - (2)
- Passed 100 iterations
+ Passed 10000 iterations
Running + and * (1)
- Passed 100 iterations
+ Passed 10000 iterations
Running + and * (2)
- Passed 100 iterations
+ Passed 10000 iterations
Running - and * (1)
- Passed 100 iterations
+ Passed 10000 iterations
Running - and * (2)
- Passed 100 iterations
+ Passed 10000 iterations
Running * and ^ (1)
- Passed 100 iterations
+ Passed 10000 iterations
Running * and ^ (2)
- Passed 100 iterations
+ Passed 10000 iterations
Group Word8
Group Integral
Running FromIntegral(Integer(a)) == a
- Passed 100 iterations
+ Passed 10000 iterations
Group Property
Running Eq
- Passed 100 iterations
+ Passed 10000 iterations
Running Show
- Passed 100 iterations
+ Passed 10000 iterations
Running Ord
- Passed 100 iterations
+ Passed 10000 iterations
Running <
- Passed 100 iterations
+ Passed 10000 iterations
Group Additive
Running a + azero == a
- Passed 100 iterations
+ Passed 10000 iterations
Running azero + a == a
- Passed 100 iterations
+ Passed 10000 iterations
Running a + b == b + a
- Passed 100 iterations
+ Passed 10000 iterations
Group Multiplicative
Running a * 1 == a
- Passed 100 iterations
+ Passed 10000 iterations
Running 1 * a == a
- Passed 100 iterations
+ Passed 10000 iterations
Running multiplication commutative
- Passed 100 iterations
+ Passed 10000 iterations
Running a * b == Integer(a) * Integer(b)
- Passed 100 iterations
+ Passed 10000 iterations
Group Divisible
Running (x `div` y) * y + (x `mod` y) == x
- Passed 100 iterations
+ Passed 10000 iterations
Group Precedence
Running + and - (1)
- Passed 100 iterations
+ Passed 10000 iterations
Running + and - (2)
- Passed 100 iterations
+ Passed 10000 iterations
Running + and * (1)
- Passed 100 iterations
+ Passed 10000 iterations
Running + and * (2)
- Passed 100 iterations
+ Passed 10000 iterations
Running - and * (1)
- Passed 100 iterations
+ Passed 10000 iterations
Running - and * (2)
- Passed 100 iterations
+ Passed 10000 iterations
Running * and ^ (1)
- Passed 100 iterations
+ Passed 10000 iterations
Running * and ^ (2)
- Passed 100 iterations
+ Passed 10000 iterations
Group Word16
Group Integral
Running FromIntegral(Integer(a)) == a
- Passed 100 iterations
+ Passed 10000 iterations
Group Property
Running Eq
- Passed 100 iterations
+ Passed 10000 iterations
Running Show
- Passed 100 iterations
+ Passed 10000 iterations
Running Ord
- Passed 100 iterations
+ Passed 10000 iterations
Running <
- Passed 100 iterations
+ Passed 10000 iterations
Group Additive
Running a + azero == a
- Passed 100 iterations
+ Passed 10000 iterations
Running azero + a == a
- Passed 100 iterations
+ Passed 10000 iterations
Running a + b == b + a
- Passed 100 iterations
+ Passed 10000 iterations
Group Multiplicative
Running a * 1 == a
- Passed 100 iterations
+ Passed 10000 iterations
Running 1 * a == a
- Passed 100 iterations
+ Passed 10000 iterations
Running multiplication commutative
- Passed 100 iterations
+ Passed 10000 iterations
Running a * b == Integer(a) * Integer(b)
- Passed 100 iterations
+ Passed 10000 iterations
Group Divisible
Running (x `div` y) * y + (x `mod` y) == x
- Passed 100 iterations
+ Passed 10000 iterations
Group Precedence
Running + and - (1)
- Passed 100 iterations
+ Passed 10000 iterations
Running + and - (2)
- Passed 100 iterations
+ Passed 10000 iterations
Running + and * (1)
- Passed 100 iterations
+ Passed 10000 iterations
Running + and * (2)
- Passed 100 iterations
+ Passed 10000 iterations
Running - and * (1)
- Passed 100 iterations
+ Passed 10000 iterations
Running - and * (2)
- Passed 100 iterations
+ Passed 10000 iterations
Running * and ^ (1)
- Passed 100 iterations
+ Passed 10000 iterations
Running * and ^ (2)
- Passed 100 iterations
+ Passed 10000 iterations
Group Word32
Group Integral
Running FromIntegral(Integer(a)) == a
- Passed 100 iterations
+ Passed 10000 iterations
Group Property
Running Eq
- Passed 100 iterations
+ Passed 10000 iterations
Running Show
- Passed 100 iterations
+ Passed 10000 iterations
Running Ord
- Passed 100 iterations
+ Passed 10000 iterations
Running <
- Passed 100 iterations
+ Passed 10000 iterations
Group Additive
Running a + azero == a
- Passed 100 iterations
+ Passed 10000 iterations
Running azero + a == a
- Passed 100 iterations
+ Passed 10000 iterations
Running a + b == b + a
- Passed 100 iterations
+ Passed 10000 iterations
Group Multiplicative
Running a * 1 == a
- Passed 100 iterations
+ Passed 10000 iterations
Running 1 * a == a
- Passed 100 iterations
+ Passed 10000 iterations
Running multiplication commutative
- Passed 100 iterations
+ Passed 10000 iterations
Running a * b == Integer(a) * Integer(b)
- Passed 100 iterations
+ Passed 10000 iterations
Group Divisible
Running (x `div` y) * y + (x `mod` y) == x
- Passed 100 iterations
+ Passed 10000 iterations
Group Precedence
Running + and - (1)
- Passed 100 iterations
+ Passed 10000 iterations
Running + and - (2)
- Passed 100 iterations
+ Passed 10000 iterations
Running + and * (1)
- Passed 100 iterations
+ Passed 10000 iterations
Running + and * (2)
- Passed 100 iterations
+ Passed 10000 iterations
Running - and * (1)
- Passed 100 iterations
+ Passed 10000 iterations
Running - and * (2)
- Passed 100 iterations
+ Passed 10000 iterations
Running * and ^ (1)
- Passed 100 iterations
+ Passed 10000 iterations
Running * and ^ (2)
- Passed 100 iterations
+ Passed 10000 iterations
Group Word64
Group Integral
Running FromIntegral(Integer(a)) == a
- Passed 100 iterations
+ Passed 10000 iterations
Group Property
Running Eq
- Passed 100 iterations
+ Passed 10000 iterations
Running Show
- Passed 100 iterations
+ Passed 10000 iterations
Running Ord
- Passed 100 iterations
+ Passed 10000 iterations
Running <
- Passed 100 iterations
+ Passed 10000 iterations
Group Additive
Running a + azero == a
- Passed 100 iterations
+ Passed 10000 iterations
Running azero + a == a
- Passed 100 iterations
+ Passed 10000 iterations
Running a + b == b + a
- Passed 100 iterations
+ Passed 10000 iterations
Group Multiplicative
Running a * 1 == a
- Passed 100 iterations
+ Passed 10000 iterations
Running 1 * a == a
- Passed 100 iterations
+ Passed 10000 iterations
Running multiplication commutative
- Passed 100 iterations
+ Passed 10000 iterations
Running a * b == Integer(a) * Integer(b)
- Passed 100 iterations
+ Passed 10000 iterations
Group Divisible
Running (x `div` y) * y + (x `mod` y) == x
- Passed 100 iterations
+ Passed 10000 iterations
Group Precedence
Running + and - (1)
- Passed 100 iterations
+ Passed 10000 iterations
Running + and - (2)
- Passed 100 iterations
+ Passed 10000 iterations
Running + and * (1)
- Passed 100 iterations
+ Passed 10000 iterations
Running + and * (2)
- Passed 100 iterations
+ Passed 10000 iterations
Running - and * (1)
- Passed 100 iterations
+ Passed 10000 iterations
Running - and * (2)
- Passed 100 iterations
+ Passed 10000 iterations
Running * and ^ (1)
- Passed 100 iterations
+ Passed 10000 iterations
Running * and ^ (2)
- Passed 100 iterations
+ Passed 10000 iterations
Group primop
Running gtChar#
- Passed 100 iterations
+ Passed 10000 iterations
Running geChar#
- Passed 100 iterations
+ Passed 10000 iterations
Running eqChar#
- Passed 100 iterations
+ Passed 10000 iterations
Running neChar#
- Passed 100 iterations
+ Passed 10000 iterations
Running ltChar#
- Passed 100 iterations
+ Passed 10000 iterations
Running leChar#
- Passed 100 iterations
+ Passed 10000 iterations
Running ord#
- Passed 100 iterations
+ Passed 10000 iterations
Running int8ToInt#
- Passed 100 iterations
+ Passed 10000 iterations
Running intToInt8#
- Passed 100 iterations
+ Passed 10000 iterations
Running negateInt8#
- Passed 100 iterations
+ Passed 10000 iterations
Running plusInt8#
- Passed 100 iterations
+ Passed 10000 iterations
Running subInt8#
- Passed 100 iterations
+ Passed 10000 iterations
Running timesInt8#
- Passed 100 iterations
+ Passed 10000 iterations
Running quotInt8#
- Passed 100 iterations
+ Passed 10000 iterations
Running remInt8#
- Passed 100 iterations
+ Passed 10000 iterations
Running quotRemInt8#
- Passed 100 iterations
+ Passed 10000 iterations
Running uncheckedShiftLInt8#
- Passed 100 iterations
+ Passed 10000 iterations
Running uncheckedShiftRAInt8#
- Passed 100 iterations
+ Passed 10000 iterations
Running uncheckedShiftRLInt8#
- Passed 100 iterations
+ Passed 10000 iterations
Running int8ToWord8#
- Passed 100 iterations
+ Passed 10000 iterations
Running eqInt8#
- Passed 100 iterations
+ Passed 10000 iterations
Running geInt8#
- Passed 100 iterations
+ Passed 10000 iterations
Running gtInt8#
- Passed 100 iterations
+ Passed 10000 iterations
Running leInt8#
- Passed 100 iterations
+ Passed 10000 iterations
Running ltInt8#
- Passed 100 iterations
+ Passed 10000 iterations
Running neInt8#
- Passed 100 iterations
+ Passed 10000 iterations
Running word8ToWord#
- Passed 100 iterations
+ Passed 10000 iterations
Running wordToWord8#
- Passed 100 iterations
+ Passed 10000 iterations
Running plusWord8#
- Passed 100 iterations
+ Passed 10000 iterations
Running subWord8#
- Passed 100 iterations
+ Passed 10000 iterations
Running timesWord8#
- Passed 100 iterations
+ Passed 10000 iterations
Running quotWord8#
- Passed 100 iterations
+ Passed 10000 iterations
Running remWord8#
- Passed 100 iterations
+ Passed 10000 iterations
Running quotRemWord8#
- Passed 100 iterations
+ Passed 10000 iterations
Running andWord8#
- Passed 100 iterations
+ Passed 10000 iterations
Running orWord8#
- Passed 100 iterations
+ Passed 10000 iterations
Running xorWord8#
- Passed 100 iterations
+ Passed 10000 iterations
Running notWord8#
- Passed 100 iterations
+ Passed 10000 iterations
Running uncheckedShiftLWord8#
- Passed 100 iterations
+ Passed 10000 iterations
Running uncheckedShiftRLWord8#
- Passed 100 iterations
+ Passed 10000 iterations
Running word8ToInt8#
- Passed 100 iterations
+ Passed 10000 iterations
Running eqWord8#
- Passed 100 iterations
+ Passed 10000 iterations
Running geWord8#
- Passed 100 iterations
+ Passed 10000 iterations
Running gtWord8#
- Passed 100 iterations
+ Passed 10000 iterations
Running leWord8#
- Passed 100 iterations
+ Passed 10000 iterations
Running ltWord8#
- Passed 100 iterations
+ Passed 10000 iterations
Running neWord8#
- Passed 100 iterations
+ Passed 10000 iterations
Running int16ToInt#
- Passed 100 iterations
+ Passed 10000 iterations
Running intToInt16#
- Passed 100 iterations
+ Passed 10000 iterations
Running negateInt16#
- Passed 100 iterations
+ Passed 10000 iterations
Running plusInt16#
- Passed 100 iterations
+ Passed 10000 iterations
Running subInt16#
- Passed 100 iterations
+ Passed 10000 iterations
Running timesInt16#
- Passed 100 iterations
+ Passed 10000 iterations
Running quotInt16#
- Passed 100 iterations
+ Passed 10000 iterations
Running remInt16#
- Passed 100 iterations
+ Passed 10000 iterations
Running quotRemInt16#
- Passed 100 iterations
+ Passed 10000 iterations
Running uncheckedShiftLInt16#
- Passed 100 iterations
+ Passed 10000 iterations
Running uncheckedShiftRAInt16#
- Passed 100 iterations
+ Passed 10000 iterations
Running uncheckedShiftRLInt16#
- Passed 100 iterations
+ Passed 10000 iterations
Running int16ToWord16#
- Passed 100 iterations
+ Passed 10000 iterations
Running eqInt16#
- Passed 100 iterations
+ Passed 10000 iterations
Running geInt16#
- Passed 100 iterations
+ Passed 10000 iterations
Running gtInt16#
- Passed 100 iterations
+ Passed 10000 iterations
Running leInt16#
- Passed 100 iterations
+ Passed 10000 iterations
Running ltInt16#
- Passed 100 iterations
+ Passed 10000 iterations
Running neInt16#
- Passed 100 iterations
+ Passed 10000 iterations
Running word16ToWord#
- Passed 100 iterations
+ Passed 10000 iterations
Running wordToWord16#
- Passed 100 iterations
+ Passed 10000 iterations
Running plusWord16#
- Passed 100 iterations
+ Passed 10000 iterations
Running subWord16#
- Passed 100 iterations
+ Passed 10000 iterations
Running timesWord16#
- Passed 100 iterations
+ Passed 10000 iterations
Running quotWord16#
- Passed 100 iterations
+ Passed 10000 iterations
Running remWord16#
- Passed 100 iterations
+ Passed 10000 iterations
Running quotRemWord16#
- Passed 100 iterations
+ Passed 10000 iterations
Running andWord16#
- Passed 100 iterations
+ Passed 10000 iterations
Running orWord16#
- Passed 100 iterations
+ Passed 10000 iterations
Running xorWord16#
- Passed 100 iterations
+ Passed 10000 iterations
Running notWord16#
- Passed 100 iterations
+ Passed 10000 iterations
Running uncheckedShiftLWord16#
- Passed 100 iterations
+ Passed 10000 iterations
Running uncheckedShiftRLWord16#
- Passed 100 iterations
+ Passed 10000 iterations
Running word16ToInt16#
- Passed 100 iterations
+ Passed 10000 iterations
Running eqWord16#
- Passed 100 iterations
+ Passed 10000 iterations
Running geWord16#
- Passed 100 iterations
+ Passed 10000 iterations
Running gtWord16#
- Passed 100 iterations
+ Passed 10000 iterations
Running leWord16#
- Passed 100 iterations
+ Passed 10000 iterations
Running ltWord16#
- Passed 100 iterations
+ Passed 10000 iterations
Running neWord16#
- Passed 100 iterations
+ Passed 10000 iterations
Running int32ToInt#
- Passed 100 iterations
+ Passed 10000 iterations
Running intToInt32#
- Passed 100 iterations
+ Passed 10000 iterations
Running negateInt32#
- Passed 100 iterations
+ Passed 10000 iterations
Running plusInt32#
- Passed 100 iterations
+ Passed 10000 iterations
Running subInt32#
- Passed 100 iterations
+ Passed 10000 iterations
Running timesInt32#
- Passed 100 iterations
+ Passed 10000 iterations
Running quotInt32#
- Passed 100 iterations
+ Passed 10000 iterations
Running remInt32#
- Passed 100 iterations
+ Passed 10000 iterations
Running quotRemInt32#
- Passed 100 iterations
+ Passed 10000 iterations
Running uncheckedShiftLInt32#
- Passed 100 iterations
+ Passed 10000 iterations
Running uncheckedShiftRAInt32#
- Passed 100 iterations
+ Passed 10000 iterations
Running uncheckedShiftRLInt32#
- Passed 100 iterations
+ Passed 10000 iterations
Running int32ToWord32#
- Passed 100 iterations
+ Passed 10000 iterations
Running eqInt32#
- Passed 100 iterations
+ Passed 10000 iterations
Running geInt32#
- Passed 100 iterations
+ Passed 10000 iterations
Running gtInt32#
- Passed 100 iterations
+ Passed 10000 iterations
Running leInt32#
- Passed 100 iterations
+ Passed 10000 iterations
Running ltInt32#
- Passed 100 iterations
+ Passed 10000 iterations
Running neInt32#
- Passed 100 iterations
+ Passed 10000 iterations
Running word32ToWord#
- Passed 100 iterations
+ Passed 10000 iterations
Running wordToWord32#
- Passed 100 iterations
+ Passed 10000 iterations
Running plusWord32#
- Passed 100 iterations
+ Passed 10000 iterations
Running subWord32#
- Passed 100 iterations
+ Passed 10000 iterations
Running timesWord32#
- Passed 100 iterations
+ Passed 10000 iterations
Running quotWord32#
- Passed 100 iterations
+ Passed 10000 iterations
Running remWord32#
- Passed 100 iterations
+ Passed 10000 iterations
Running quotRemWord32#
- Passed 100 iterations
+ Passed 10000 iterations
Running andWord32#
- Passed 100 iterations
+ Passed 10000 iterations
Running orWord32#
- Passed 100 iterations
+ Passed 10000 iterations
Running xorWord32#
- Passed 100 iterations
+ Passed 10000 iterations
Running notWord32#
- Passed 100 iterations
+ Passed 10000 iterations
Running uncheckedShiftLWord32#
- Passed 100 iterations
+ Passed 10000 iterations
Running uncheckedShiftRLWord32#
- Passed 100 iterations
+ Passed 10000 iterations
Running word32ToInt32#
- Passed 100 iterations
+ Passed 10000 iterations
Running eqWord32#
- Passed 100 iterations
+ Passed 10000 iterations
Running geWord32#
- Passed 100 iterations
+ Passed 10000 iterations
Running gtWord32#
- Passed 100 iterations
+ Passed 10000 iterations
Running leWord32#
- Passed 100 iterations
+ Passed 10000 iterations
Running ltWord32#
- Passed 100 iterations
+ Passed 10000 iterations
Running neWord32#
- Passed 100 iterations
+ Passed 10000 iterations
Running int64ToInt#
- Passed 100 iterations
+ Passed 10000 iterations
Running intToInt64#
- Passed 100 iterations
+ Passed 10000 iterations
Running negateInt64#
- Passed 100 iterations
+ Passed 10000 iterations
Running plusInt64#
- Passed 100 iterations
+ Passed 10000 iterations
Running subInt64#
- Passed 100 iterations
+ Passed 10000 iterations
Running timesInt64#
- Passed 100 iterations
+ Passed 10000 iterations
Running quotInt64#
- Passed 100 iterations
+ Passed 10000 iterations
Running remInt64#
- Passed 100 iterations
+ Passed 10000 iterations
Running uncheckedIShiftL64#
- Passed 100 iterations
+ Passed 10000 iterations
Running uncheckedIShiftRA64#
- Passed 100 iterations
+ Passed 10000 iterations
Running uncheckedIShiftRL64#
- Passed 100 iterations
+ Passed 10000 iterations
Running int64ToWord64#
- Passed 100 iterations
+ Passed 10000 iterations
Running eqInt64#
- Passed 100 iterations
+ Passed 10000 iterations
Running geInt64#
- Passed 100 iterations
+ Passed 10000 iterations
Running gtInt64#
- Passed 100 iterations
+ Passed 10000 iterations
Running leInt64#
- Passed 100 iterations
+ Passed 10000 iterations
Running ltInt64#
- Passed 100 iterations
+ Passed 10000 iterations
Running neInt64#
- Passed 100 iterations
+ Passed 10000 iterations
Running word64ToWord#
- Passed 100 iterations
+ Passed 10000 iterations
Running wordToWord64#
- Passed 100 iterations
+ Passed 10000 iterations
Running plusWord64#
- Passed 100 iterations
+ Passed 10000 iterations
Running subWord64#
- Passed 100 iterations
+ Passed 10000 iterations
Running timesWord64#
- Passed 100 iterations
+ Passed 10000 iterations
Running quotWord64#
- Passed 100 iterations
+ Passed 10000 iterations
Running remWord64#
- Passed 100 iterations
+ Passed 10000 iterations
Running and64#
- Passed 100 iterations
+ Passed 10000 iterations
Running or64#
- Passed 100 iterations
+ Passed 10000 iterations
Running xor64#
- Passed 100 iterations
+ Passed 10000 iterations
Running not64#
- Passed 100 iterations
+ Passed 10000 iterations
Running uncheckedShiftL64#
- Passed 100 iterations
+ Passed 10000 iterations
Running uncheckedShiftRL64#
- Passed 100 iterations
+ Passed 10000 iterations
Running word64ToInt64#
- Passed 100 iterations
+ Passed 10000 iterations
Running eqWord64#
- Passed 100 iterations
+ Passed 10000 iterations
Running geWord64#
- Passed 100 iterations
+ Passed 10000 iterations
Running gtWord64#
- Passed 100 iterations
+ Passed 10000 iterations
Running leWord64#
- Passed 100 iterations
+ Passed 10000 iterations
Running ltWord64#
- Passed 100 iterations
+ Passed 10000 iterations
Running neWord64#
- Passed 100 iterations
+ Passed 10000 iterations
Running +#
- Passed 100 iterations
+ Passed 10000 iterations
Running -#
- Passed 100 iterations
+ Passed 10000 iterations
Running *#
- Passed 100 iterations
+ Passed 10000 iterations
Running timesInt2#
- Passed 100 iterations
+ Passed 10000 iterations
Running mulIntMayOflo#
- Passed 100 iterations
+ Passed 10000 iterations
Running quotInt#
- Passed 100 iterations
+ Passed 10000 iterations
Running remInt#
- Passed 100 iterations
+ Passed 10000 iterations
Running quotRemInt#
- Passed 100 iterations
+ Passed 10000 iterations
Running andI#
- Passed 100 iterations
+ Passed 10000 iterations
Running orI#
- Passed 100 iterations
+ Passed 10000 iterations
Running xorI#
- Passed 100 iterations
+ Passed 10000 iterations
Running notI#
- Passed 100 iterations
+ Passed 10000 iterations
Running negateInt#
- Passed 100 iterations
+ Passed 10000 iterations
Running addIntC#
- Passed 100 iterations
+ Passed 10000 iterations
Running subIntC#
- Passed 100 iterations
+ Passed 10000 iterations
Running >#
- Passed 100 iterations
+ Passed 10000 iterations
Running >=#
- Passed 100 iterations
+ Passed 10000 iterations
Running ==#
- Passed 100 iterations
+ Passed 10000 iterations
Running /=#
- Passed 100 iterations
+ Passed 10000 iterations
Running <#
- Passed 100 iterations
+ Passed 10000 iterations
Running <=#
- Passed 100 iterations
+ Passed 10000 iterations
Running chr#
- Passed 100 iterations
+ Passed 10000 iterations
Running int2Word#
- Passed 100 iterations
+ Passed 10000 iterations
Running uncheckedIShiftL#
- Passed 100 iterations
+ Passed 10000 iterations
Running uncheckedIShiftRA#
- Passed 100 iterations
+ Passed 10000 iterations
Running uncheckedIShiftRL#
- Passed 100 iterations
+ Passed 10000 iterations
Running plusWord#
- Passed 100 iterations
+ Passed 10000 iterations
Running addWordC#
- Passed 100 iterations
+ Passed 10000 iterations
Running subWordC#
- Passed 100 iterations
+ Passed 10000 iterations
Running plusWord2#
- Passed 100 iterations
+ Passed 10000 iterations
Running minusWord#
- Passed 100 iterations
+ Passed 10000 iterations
Running timesWord#
- Passed 100 iterations
+ Passed 10000 iterations
Running timesWord2#
- Passed 100 iterations
+ Passed 10000 iterations
Running quotWord#
- Passed 100 iterations
+ Passed 10000 iterations
Running remWord#
- Passed 100 iterations
+ Passed 10000 iterations
Running quotRemWord#
- Passed 100 iterations
+ Passed 10000 iterations
Running and#
- Passed 100 iterations
+ Passed 10000 iterations
Running or#
- Passed 100 iterations
+ Passed 10000 iterations
Running xor#
- Passed 100 iterations
+ Passed 10000 iterations
Running not#
- Passed 100 iterations
+ Passed 10000 iterations
Running uncheckedShiftL#
- Passed 100 iterations
+ Passed 10000 iterations
Running uncheckedShiftRL#
- Passed 100 iterations
+ Passed 10000 iterations
Running word2Int#
- Passed 100 iterations
+ Passed 10000 iterations
Running gtWord#
- Passed 100 iterations
+ Passed 10000 iterations
Running geWord#
- Passed 100 iterations
+ Passed 10000 iterations
Running eqWord#
- Passed 100 iterations
+ Passed 10000 iterations
Running neWord#
- Passed 100 iterations
+ Passed 10000 iterations
Running ltWord#
- Passed 100 iterations
+ Passed 10000 iterations
Running leWord#
- Passed 100 iterations
+ Passed 10000 iterations
Running popCnt8#
- Passed 100 iterations
+ Passed 10000 iterations
Running popCnt16#
- Passed 100 iterations
+ Passed 10000 iterations
Running popCnt32#
- Passed 100 iterations
+ Passed 10000 iterations
Running popCnt64#
- Passed 100 iterations
+ Passed 10000 iterations
Running popCnt#
- Passed 100 iterations
+ Passed 10000 iterations
Running pdep8#
- Passed 100 iterations
+ Passed 10000 iterations
Running pdep16#
- Passed 100 iterations
+ Passed 10000 iterations
Running pdep32#
- Passed 100 iterations
+ Passed 10000 iterations
Running pdep64#
- Passed 100 iterations
+ Passed 10000 iterations
Running pdep#
- Passed 100 iterations
+ Passed 10000 iterations
Running pext8#
- Passed 100 iterations
+ Passed 10000 iterations
Running pext16#
- Passed 100 iterations
+ Passed 10000 iterations
Running pext32#
- Passed 100 iterations
+ Passed 10000 iterations
Running pext64#
- Passed 100 iterations
+ Passed 10000 iterations
Running pext#
- Passed 100 iterations
+ Passed 10000 iterations
Running clz8#
- Passed 100 iterations
+ Passed 10000 iterations
Running clz16#
- Passed 100 iterations
+ Passed 10000 iterations
Running clz32#
- Passed 100 iterations
+ Passed 10000 iterations
Running clz64#
- Passed 100 iterations
+ Passed 10000 iterations
Running clz#
- Passed 100 iterations
+ Passed 10000 iterations
Running ctz8#
- Passed 100 iterations
+ Passed 10000 iterations
Running ctz16#
- Passed 100 iterations
+ Passed 10000 iterations
Running ctz32#
- Passed 100 iterations
+ Passed 10000 iterations
Running ctz64#
- Passed 100 iterations
+ Passed 10000 iterations
Running ctz#
- Passed 100 iterations
+ Passed 10000 iterations
Running byteSwap16#
- Passed 100 iterations
+ Passed 10000 iterations
Running byteSwap32#
- Passed 100 iterations
+ Passed 10000 iterations
Running byteSwap64#
- Passed 100 iterations
+ Passed 10000 iterations
Running byteSwap#
- Passed 100 iterations
+ Passed 10000 iterations
Running bitReverse8#
- Passed 100 iterations
+ Passed 10000 iterations
Running bitReverse16#
- Passed 100 iterations
+ Passed 10000 iterations
Running bitReverse32#
- Passed 100 iterations
+ Passed 10000 iterations
Running bitReverse64#
- Passed 100 iterations
+ Passed 10000 iterations
Running bitReverse#
- Passed 100 iterations
+ Passed 10000 iterations
Running narrow8Int#
- Passed 100 iterations
+ Passed 10000 iterations
Running narrow16Int#
- Passed 100 iterations
+ Passed 10000 iterations
Running narrow32Int#
- Passed 100 iterations
+ Passed 10000 iterations
Running narrow8Word#
- Passed 100 iterations
+ Passed 10000 iterations
Running narrow16Word#
- Passed 100 iterations
+ Passed 10000 iterations
Running narrow32Word#
- Passed 100 iterations
+ Passed 10000 iterations
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/0ed6a6375079f1c92a5ba5dfe5b6a6…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/0ed6a6375079f1c92a5ba5dfe5b6a6…
You're receiving this email because of your account on gitlab.haskell.org.
1
0
[Git][ghc/ghc][wip/jeltsch/obtaining-os-handles] Get rid of the duplication of the caveats documentation
by Wolfgang Jeltsch (@jeltsch) 14 Dec '25
by Wolfgang Jeltsch (@jeltsch) 14 Dec '25
14 Dec '25
Wolfgang Jeltsch pushed to branch wip/jeltsch/obtaining-os-handles at Glasgow Haskell Compiler / GHC
Commits:
0319831e by Wolfgang Jeltsch at 2025-12-13T20:50:37+02:00
Get rid of the duplication of the caveats documentation
- - - - -
1 changed file:
- libraries/ghc-internal/src/GHC/Internal/System/IO/OS.hs
Changes:
=====================================
libraries/ghc-internal/src/GHC/Internal/System/IO/OS.hs
=====================================
@@ -316,27 +316,8 @@ withWindowsHandleWritingBiasedRaw
-- ** Caveats
{-$with-ref-caveats
- #with-ref-caveats#There are the following caveats regarding the above
- operations:
-
- * Flushing of buffers can fail if the given handle is readable but not
- seekable.
-
- * If one of these operations is performed as part of an action executed by
- 'System.IO.Unsafe.unsafePerformIO',
- 'System.IO.Unsafe.unsafeInterleaveIO', or one of their “dupable”
- variants and the user-provided action receives an asychnchronous
- exception and does not catch it, then the following happens:
-
- - Before the overall computation is suspended, the blocking of handle
- operations is removed.
-
- - When the computation is later resumed due to another evaluation
- attempt, the blocking of handle operations is reinstantiated, the
- Haskell-managed buffers are flushed again, and the user-provided
- action is run from the beginning.
-
- Repeating the previously executed part of the user-provided action
- cannot be avoided apparently. See the @[async]@ note in the source code
- of "GHC.Internal.IO.Handle.Internals" for further explanation.
+ #with-ref-caveats#This subsection is just a dummy, whose purpose is to serve
+ as the target of the hyperlinks above. The real documentation of the caveats
+ is in the /Caveats/ subsection in the @base@ module @System.IO.OS@, which
+ re-exports the above operations.
-}
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0319831e3f9a15c42dd58b7d81fd8d0…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0319831e3f9a15c42dd58b7d81fd8d0…
You're receiving this email because of your account on gitlab.haskell.org.
1
0
13 Dec '25
Simon Peyton Jones pushed to branch wip/26543 at Glasgow Haskell Compiler / GHC
Commits:
43b75476 by Simon Peyton Jones at 2025-12-13T17:32:07+00:00
Add comment to test
- - - - -
1 changed file:
- testsuite/tests/perf/compiler/T5030.hs
Changes:
=====================================
testsuite/tests/perf/compiler/T5030.hs
=====================================
@@ -1,6 +1,10 @@
{-# LANGUAGE TypeFamilies, GADTs, EmptyDataDecls, FlexibleContexts #-}
{-# LANGUAGE UndecidableInstances #-}
+-- Almost all compile time is in coercion optimisation!
+-- -O0 -fno-coercion-opt 372M alloc
+-- -O0 -fcoercion-opt 1600M alloc
+
module SlowComp where
import Control.Monad
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/43b75476d806c5b95457eb6e045e735…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/43b75476d806c5b95457eb6e045e735…
You're receiving this email because of your account on gitlab.haskell.org.
1
0
[Git][ghc/ghc][wip/26543] Fix sense of needs-case-binding
by Simon Peyton Jones (@simonpj) 13 Dec '25
by Simon Peyton Jones (@simonpj) 13 Dec '25
13 Dec '25
Simon Peyton Jones pushed to branch wip/26543 at Glasgow Haskell Compiler / GHC
Commits:
e924574f by Simon Peyton Jones at 2025-12-13T17:30:50+00:00
Fix sense of needs-case-binding
- - - - -
1 changed file:
- compiler/GHC/Core/Opt/Simplify/Utils.hs
Changes:
=====================================
compiler/GHC/Core/Opt/Simplify/Utils.hs
=====================================
@@ -1551,10 +1551,10 @@ preInlineBetaUnconditionally env levity bndr clo
-- NB: exprOkForSpeculation is stable under substitution
-- so we can apply it to an InExpr in the ContEx case
needs_case_binding Lifted = False
- needs_case_binding Unlifted = case clo of
- DoneId {} -> False
- DoneEx e _ -> exprOkForSpeculation e
- ContEx _ e _ -> exprOkForSpeculation e
+ needs_case_binding Unlifted = case clo of
+ DoneId {} -> False
+ DoneEx e _ -> not $ exprOkForSpeculation e
+ ContEx _ e _ -> not $ exprOkForSpeculation e
preInlineLetUnconditionally
:: SimplEnv -> TopLevelFlag -> InId
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/e924574fcb51e6aa4cb39b1027b26ff…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/e924574fcb51e6aa4cb39b1027b26ff…
You're receiving this email because of your account on gitlab.haskell.org.
1
0
13 Dec '25
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
08b13f7b by Cheng Shao at 2025-12-13T05:05:18-05:00
ci: set gc.auto=0 during setup stage
This patch sets `gc.auto=0` during `setup` stage of CI, see added
comment for detailed explanation.
- - - - -
1 changed file:
- .gitlab/ci.sh
Changes:
=====================================
.gitlab/ci.sh
=====================================
@@ -259,6 +259,12 @@ function setup() {
git config user.email "ghc-ci(a)gitlab-haskell.org"
git config user.name "GHC GitLab CI"
+ # Disable auto gc. Useless in a temporary checkout, and
+ # non-deterministic "Auto packing the repository in background for
+ # optimum performance." message could pop up that confuses the
+ # testsuite driver!
+ git config gc.auto 0
+
info "====================================================="
info "Toolchain versions"
info "====================================================="
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/08b13f7b0e9d12cabddfdff6c07354e…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/08b13f7b0e9d12cabddfdff6c07354e…
You're receiving this email because of your account on gitlab.haskell.org.
1
0