[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 4 commits: haddock: use snippets for all list examples
by Marge Bot (@marge-bot) 18 Feb '26
by Marge Bot (@marge-bot) 18 Feb '26
18 Feb '26
Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC
Commits:
c28348db by Phil de Joux at 2026-02-18T00:16:46-05:00
haddock: use snippets for all list examples
- generate snippet output for docs
- reduce font size to better fit snippets
- Use only directive to guard html snippets
- Add latex snippets for lists
- - - - -
856e2143 by Phil de Joux at 2026-02-18T00:16:46-05:00
haddock: Place the snippet input and output together
- Put the output seemingly inside the example box
- - - - -
83297209 by Samuel Thibault at 2026-02-18T00:16:58-05:00
Fix linking against libm by moving the -lm option
For those systems that need -lm for getting math functions, this is
currently added on the link line very early, before the object files being
linked together. Newer toolchains enable --as-needed by default, which means
-lm is ignored at that point because no object requires a math function
yet. With such toolchains, we thus have to add -lm after the objects, so the
linker actually includes libm in the link.
- - - - -
9d45aeb1 by Teo Camarasu at 2026-02-18T00:16:59-05:00
ghc-internal: Move GHC.Internal.Data.Bool to base
This is a tiny module that only defines bool :: Bool -> a -> a -> a. We can just move this to base and delete it from ghc-internal. If we want this functionality there we can just use a case statement or if-then expression.
Resolves 26865
- - - - -
56 changed files:
- compiler/GHC/Linker/Dynamic.hs
- libraries/base/src/Data/Bool.hs
- libraries/base/src/Data/List.hs
- libraries/base/src/Data/List/NubOrdSet.hs
- libraries/base/src/GHC/Exts.hs
- libraries/ghc-internal/ghc-internal.cabal.in
- − libraries/ghc-internal/src/GHC/Internal/Data/Bool.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Foldable.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Function.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Type/Bool.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Type/Ord.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Version.hs
- libraries/ghc-internal/src/GHC/Internal/IO/FD.hs
- libraries/ghc-internal/src/GHC/Internal/JS/Prim.hs
- libraries/ghc-internal/src/GHC/Internal/System/IO/OS.hs
- libraries/ghc-internal/src/GHC/Internal/TH/Lift.hs
- libraries/ghc-internal/src/GHC/Internal/TypeError.hs
- utils/haddock/doc/.gitignore
- utils/haddock/doc/Makefile
- + utils/haddock/doc/_static/haddock-custom.css
- utils/haddock/doc/conf.py
- utils/haddock/doc/markup.rst
- + utils/haddock/doc/snippets/.gitignore
- + utils/haddock/doc/snippets/Lists.hs
- + utils/haddock/doc/snippets/Makefile
- + utils/haddock/doc/snippets/Snippet-List-Bulleted.html
- + utils/haddock/doc/snippets/Snippet-List-Bulleted.tex
- + utils/haddock/doc/snippets/Snippet-List-Definition.html
- + utils/haddock/doc/snippets/Snippet-List-Definition.tex
- + utils/haddock/doc/snippets/Snippet-List-Enumerated.html
- + utils/haddock/doc/snippets/Snippet-List-Enumerated.tex
- + utils/haddock/doc/snippets/Snippet-List-Indentation.html
- + utils/haddock/doc/snippets/Snippet-List-Indentation.tex
- + utils/haddock/doc/snippets/Snippet-List-Multiline-Item.html
- + utils/haddock/doc/snippets/Snippet-List-Multiline-Item.tex
- + utils/haddock/doc/snippets/Snippet-List-Nested-Item.html
- + utils/haddock/doc/snippets/Snippet-List-Nested-Item.tex
- + utils/haddock/doc/snippets/Snippet-List-Not-Newline.html
- + utils/haddock/doc/snippets/Snippet-List-Not-Newline.tex
- + utils/haddock/doc/snippets/Snippet-List-Not-Separated.html
- + utils/haddock/doc/snippets/Snippet-List-Not-Separated.tex
- utils/haddock/html-test/ref/A.html
- utils/haddock/html-test/ref/Bug1004.html
- utils/haddock/html-test/ref/Bug1033.html
- utils/haddock/html-test/ref/Bug1103.html
- utils/haddock/html-test/ref/Bug548.html
- utils/haddock/html-test/ref/Bug923.html
- utils/haddock/html-test/ref/ConstructorPatternExport.html
- utils/haddock/html-test/ref/FunArgs.html
- utils/haddock/html-test/ref/Hash.html
- utils/haddock/html-test/ref/Instances.html
- utils/haddock/html-test/ref/LinearTypes.html
- utils/haddock/html-test/ref/RedactTypeSynonyms.html
- utils/haddock/html-test/ref/T23616.html
- utils/haddock/html-test/ref/Test.html
- utils/haddock/html-test/ref/TypeFamilies3.html
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/4a2d77c52ee4c2d2c57a3e8aa39a85…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/4a2d77c52ee4c2d2c57a3e8aa39a85…
You're receiving this email because of your account on gitlab.haskell.org.
1
0
Teo Camarasu pushed to branch wip/T26930 at Glasgow Haskell Compiler / GHC
Commits:
316765d2 by Teo Camarasu at 2026-02-17T23:25:50+00:00
Float up generics
- - - - -
15 changed files:
- libraries/ghc-internal/src/GHC/Internal/ByteOrder.hs
- − libraries/ghc-internal/src/GHC/Internal/ByteOrder.hs-boot
- libraries/ghc-internal/src/GHC/Internal/Control/Arrow.hs
- libraries/ghc-internal/src/GHC/Internal/Control/Monad/Fix.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Foldable.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Functor/Const.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Functor/Identity.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Monoid.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Semigroup/Internal.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Traversable.hs
- libraries/ghc-internal/src/GHC/Internal/Functor/ZipList.hs
- libraries/ghc-internal/src/GHC/Internal/Generics.hs
- libraries/ghc-internal/src/GHC/Internal/IO/Exception.hs
- libraries/ghc-internal/src/GHC/Internal/Read.hs
- libraries/ghc-internal/src/GHC/Internal/Unicode/Bits.hs
Changes:
=====================================
libraries/ghc-internal/src/GHC/Internal/ByteOrder.hs
=====================================
@@ -27,8 +27,6 @@ module GHC.Internal.ByteOrder
import GHC.Internal.Base
import GHC.Internal.Enum
-import GHC.Internal.Generics (Generic)
-import GHC.Internal.Text.Read
import GHC.Internal.Text.Show
-- | Byte ordering.
@@ -39,9 +37,7 @@ data ByteOrder
, Ord -- ^ @since base-4.11.0.0
, Bounded -- ^ @since base-4.11.0.0
, Enum -- ^ @since base-4.11.0.0
- , Read -- ^ @since base-4.11.0.0
, Show -- ^ @since base-4.11.0.0
- , Generic -- ^ @since base-4.15.0.0
)
-- | The byte ordering of the target machine.
=====================================
libraries/ghc-internal/src/GHC/Internal/ByteOrder.hs-boot deleted
=====================================
@@ -1,29 +0,0 @@
-{-# LANGUAGE NoImplicitPrelude #-}
-
-{-
-This SOURCE-imported hs-boot module cuts a big dependency loop:
-
-module ‘GHC.Stable’
-imports module ‘GHC.Ptr’
-imports module ‘Numeric’
-imports module ‘GHC.Read’
-imports module ‘GHC.Unicode’
-imports module ‘GHC.Unicode.Internal.Char.UnicodeData.GeneralCategory’
-imports module ‘GHC.Unicode.Internal.Bits’
-imports module ‘GHC.ByteOrder’
-imports module ‘GHC.Generics’
-imports module ‘Data.Ord’
-imports module ‘Foreign.Storable’
-imports module ‘GHC.Stable’
--}
-
-module GHC.Internal.ByteOrder where
-
--- See W1 of Note [Tracking dependencies on primitives] in GHC.Internal.Base
-import GHC.Internal.Types ()
-
-data ByteOrder
- = BigEndian
- | LittleEndian
-
-targetByteOrder :: ByteOrder
=====================================
libraries/ghc-internal/src/GHC/Internal/Control/Arrow.hs
=====================================
@@ -51,7 +51,7 @@ import GHC.Internal.Data.Tuple ( uncurry )
import GHC.Internal.Data.Either
import GHC.Internal.Control.Category
import GHC.Internal.Base hiding ( (.), id )
-import GHC.Internal.Generics (Generic, Generic1)
+import GHC.Internal.Generics
infixr 5 <+>
infixr 3 ***
@@ -179,12 +179,6 @@ instance Arrow (->) where
-- | Kleisli arrows of a monad.
newtype Kleisli m a b = Kleisli { runKleisli :: a -> m b }
--- | @since base-4.14.0.0
-deriving instance Generic (Kleisli m a b)
-
--- | @since base-4.14.0.0
-deriving instance Generic1 (Kleisli m a)
-
-- | @since base-4.14.0.0
deriving instance Functor m => Functor (Kleisli m a)
@@ -416,3 +410,8 @@ leftApp :: ArrowApply a => a b c -> a (Either b d) (Either c d)
leftApp f = arr ((\b -> (arr (\() -> b) >>> f >>> arr Left, ())) |||
(\d -> (arr (\() -> d) >>> arr Right, ()))) >>> app
+-- | @since base-4.14.0.0
+deriving instance Generic (Kleisli m a b)
+
+-- | @since base-4.14.0.0
+deriving instance Generic1 (Kleisli m a)
=====================================
libraries/ghc-internal/src/GHC/Internal/Control/Monad/Fix.hs
=====================================
@@ -39,7 +39,6 @@ import GHC.Internal.Data.NonEmpty ( NonEmpty(..) )
import GHC.Internal.Data.Ord ( Down(..) )
import GHC.Internal.Data.Tuple ( Solo(..), fst, snd )
import GHC.Internal.Base ( IO, Monad, errorWithoutStackTrace, (.), return, liftM )
-import GHC.Internal.Generics
import GHC.Internal.List ( head, drop )
import GHC.Internal.Control.Monad.ST.Imp
import qualified GHC.Internal.Control.Monad.ST.Lazy.Imp as Lazy
@@ -240,26 +239,6 @@ instance MonadFix f => MonadFix (Alt f) where
instance MonadFix f => MonadFix (Ap f) where
mfix f = Ap (mfix (getAp . f))
--- Instances for GHC.Generics
--- | @since base-4.9.0.0
-instance MonadFix Par1 where
- mfix f = Par1 (fix (unPar1 . f))
-
--- | @since base-4.9.0.0
-instance MonadFix f => MonadFix (Rec1 f) where
- mfix f = Rec1 (mfix (unRec1 . f))
-
--- | @since base-4.9.0.0
-instance MonadFix f => MonadFix (M1 i c f) where
- mfix f = M1 (mfix (unM1. f))
-
--- | @since base-4.9.0.0
-instance (MonadFix f, MonadFix g) => MonadFix (f :*: g) where
- mfix f = (mfix (fstP . f)) :*: (mfix (sndP . f))
- where
- fstP (a :*: _) = a
- sndP (_ :*: b) = b
-
-- Instances for Data.Ord
-- | @since base-4.12.0.0
=====================================
libraries/ghc-internal/src/GHC/Internal/Data/Foldable.hs
=====================================
@@ -65,7 +65,6 @@ import GHC.Internal.Arr ( Array(..), elems, numElements,
foldlElems', foldrElems',
foldl1Elems, foldr1Elems)
import GHC.Internal.Base hiding ( foldr )
-import GHC.Internal.Generics
import GHC.Internal.Tuple (Solo (..))
import GHC.Internal.Num ( Num(..) )
@@ -860,67 +859,6 @@ instance (Foldable f) => Foldable (Alt f) where
instance (Foldable f) => Foldable (Ap f) where
foldMap f = foldMap f . getAp
--- Instances for GHC.Generics
--- | @since base-4.9.0.0
-instance Foldable U1 where
- foldMap _ _ = mempty
- {-# INLINE foldMap #-}
- fold _ = mempty
- {-# INLINE fold #-}
- foldr _ z _ = z
- {-# INLINE foldr #-}
- foldl _ z _ = z
- {-# INLINE foldl #-}
- foldl1 _ _ = errorWithoutStackTrace "foldl1: U1"
- foldr1 _ _ = errorWithoutStackTrace "foldr1: U1"
- length _ = 0
- null _ = True
- elem _ _ = False
- sum _ = 0
- product _ = 1
-
--- | @since base-4.9.0.0
-deriving instance Foldable V1
-
--- | @since base-4.9.0.0
-deriving instance Foldable Par1
-
--- | @since base-4.9.0.0
-deriving instance Foldable f => Foldable (Rec1 f)
-
--- | @since base-4.9.0.0
-deriving instance Foldable (K1 i c)
-
--- | @since base-4.9.0.0
-deriving instance Foldable f => Foldable (M1 i c f)
-
--- | @since base-4.9.0.0
-deriving instance (Foldable f, Foldable g) => Foldable (f :+: g)
-
--- | @since base-4.9.0.0
-deriving instance (Foldable f, Foldable g) => Foldable (f :*: g)
-
--- | @since base-4.9.0.0
-deriving instance (Foldable f, Foldable g) => Foldable (f :.: g)
-
--- | @since base-4.9.0.0
-deriving instance Foldable UAddr
-
--- | @since base-4.9.0.0
-deriving instance Foldable UChar
-
--- | @since base-4.9.0.0
-deriving instance Foldable UDouble
-
--- | @since base-4.9.0.0
-deriving instance Foldable UFloat
-
--- | @since base-4.9.0.0
-deriving instance Foldable UInt
-
--- | @since base-4.9.0.0
-deriving instance Foldable UWord
-
-- Instances for Data.Ord
-- | @since base-4.12.0.0
deriving instance Foldable Down
=====================================
libraries/ghc-internal/src/GHC/Internal/Data/Functor/Const.hs
=====================================
@@ -29,7 +29,6 @@ import GHC.Internal.Ix (Ix)
import GHC.Internal.Base
import GHC.Internal.Enum (Bounded, Enum)
import GHC.Internal.Float (Floating, RealFloat)
-import GHC.Internal.Generics (Generic, Generic1)
import GHC.Internal.Num (Num)
import GHC.Internal.Real (Fractional, Integral, Real, RealFrac)
import GHC.Internal.Read (Read(readsPrec), readParen, lex)
@@ -57,8 +56,6 @@ newtype Const a b = Const { getConst :: a }
, FiniteBits -- ^ @since base-4.9.0.0
, Floating -- ^ @since base-4.9.0.0
, Fractional -- ^ @since base-4.9.0.0
- , Generic -- ^ @since base-4.9.0.0
- , Generic1 -- ^ @since base-4.9.0.0
, Integral -- ^ @since base-4.9.0.0
, Ix -- ^ @since base-4.9.0.0
, Semigroup -- ^ @since base-4.9.0.0
=====================================
libraries/ghc-internal/src/GHC/Internal/Data/Functor/Identity.hs
=====================================
@@ -43,7 +43,6 @@ import GHC.Internal.Base ( Applicative(..), Eq(..), Functor(..), Monad(..)
, Semigroup, Monoid, Ord(..), ($), (.) )
import GHC.Internal.Enum (Bounded, Enum)
import GHC.Internal.Float (Floating, RealFloat)
-import GHC.Internal.Generics (Generic, Generic1)
import GHC.Internal.Num (Num)
import GHC.Internal.Read (Read(..), lex, readParen)
import GHC.Internal.Real (Fractional, Integral, Real, RealFrac)
@@ -77,8 +76,6 @@ newtype Identity a = Identity { runIdentity :: a }
, FiniteBits -- ^ @since base-4.9.0.0
, Floating -- ^ @since base-4.9.0.0
, Fractional -- ^ @since base-4.9.0.0
- , Generic -- ^ @since base-4.8.0.0
- , Generic1 -- ^ @since base-4.8.0.0
, Integral -- ^ @since base-4.9.0.0
, Ix -- ^ @since base-4.9.0.0
, Semigroup -- ^ @since base-4.9.0.0
=====================================
libraries/ghc-internal/src/GHC/Internal/Data/Monoid.hs
=====================================
@@ -1,4 +1,3 @@
-{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE PolyKinds #-}
@@ -85,7 +84,6 @@ module GHC.Internal.Data.Monoid (
-- Push down the module in the dependency hierarchy.
import GHC.Internal.Base hiding (Any)
import GHC.Internal.Enum
-import GHC.Internal.Generics
import GHC.Internal.Num
import GHC.Internal.Read
import GHC.Internal.Show
@@ -148,8 +146,6 @@ newtype First a = First { getFirst :: Maybe a }
, Ord -- ^ @since base-2.01
, Read -- ^ @since base-2.01
, Show -- ^ @since base-2.01
- , Generic -- ^ @since base-4.7.0.0
- , Generic1 -- ^ @since base-4.7.0.0
, Functor -- ^ @since base-4.8.0.0
, Applicative -- ^ @since base-4.8.0.0
, Monad -- ^ @since base-4.8.0.0
@@ -190,8 +186,6 @@ newtype Last a = Last { getLast :: Maybe a }
, Ord -- ^ @since base-2.01
, Read -- ^ @since base-2.01
, Show -- ^ @since base-2.01
- , Generic -- ^ @since base-4.7.0.0
- , Generic1 -- ^ @since base-4.7.0.0
, Functor -- ^ @since base-4.8.0.0
, Applicative -- ^ @since base-4.8.0.0
, Monad -- ^ @since base-4.8.0.0
@@ -225,8 +219,6 @@ newtype Ap f a = Ap { getAp :: f a }
, Enum -- ^ @since base-4.12.0.0
, Eq -- ^ @since base-4.12.0.0
, Functor -- ^ @since base-4.12.0.0
- , Generic -- ^ @since base-4.12.0.0
- , Generic1 -- ^ @since base-4.12.0.0
, Monad -- ^ @since base-4.12.0.0
, MonadFail -- ^ @since base-4.12.0.0
, MonadPlus -- ^ @since base-4.12.0.0
=====================================
libraries/ghc-internal/src/GHC/Internal/Data/Semigroup/Internal.hs
=====================================
@@ -1,6 +1,5 @@
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE BangPatterns #-}
-{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE ScopedTypeVariables #-}
@@ -26,7 +25,6 @@ import qualified GHC.Internal.List as List
import GHC.Internal.Num
import GHC.Internal.Read
import GHC.Internal.Show
-import GHC.Internal.Generics
import GHC.Internal.Real
-- | This is a valid definition of 'stimes' for an idempotent 'Semigroup'.
@@ -90,8 +88,6 @@ newtype Dual a = Dual { getDual :: a }
, Read -- ^ @since base-2.01
, Show -- ^ @since base-2.01
, Bounded -- ^ @since base-2.01
- , Generic -- ^ @since base-4.7.0.0
- , Generic1 -- ^ @since base-4.7.0.0
)
-- | @since base-4.9.0.0
@@ -130,8 +126,6 @@ instance Monad Dual where
-- >>> appEndo computation 1
-- 6
newtype Endo a = Endo { appEndo :: a -> a }
- deriving ( Generic -- ^ @since base-4.7.0.0
- )
-- | @since base-4.9.0.0
instance Semigroup (Endo a) where
@@ -200,7 +194,6 @@ newtype All = All { getAll :: Bool }
, Read -- ^ @since base-2.01
, Show -- ^ @since base-2.01
, Bounded -- ^ @since base-2.01
- , Generic -- ^ @since base-4.7.0.0
)
-- | @since base-4.9.0.0
@@ -232,7 +225,6 @@ newtype Any = Any { getAny :: Bool }
, Read -- ^ @since base-2.01
, Show -- ^ @since base-2.01
, Bounded -- ^ @since base-2.01
- , Generic -- ^ @since base-4.7.0.0
)
-- | @since base-4.9.0.0
@@ -261,8 +253,6 @@ newtype Sum a = Sum { getSum :: a }
, Read -- ^ @since base-2.01
, Show -- ^ @since base-2.01
, Bounded -- ^ @since base-2.01
- , Generic -- ^ @since base-4.7.0.0
- , Generic1 -- ^ @since base-4.7.0.0
, Num -- ^ @since base-4.7.0.0
)
@@ -309,8 +299,6 @@ newtype Product a = Product { getProduct :: a }
, Read -- ^ @since base-2.01
, Show -- ^ @since base-2.01
, Bounded -- ^ @since base-2.01
- , Generic -- ^ @since base-4.7.0.0
- , Generic1 -- ^ @since base-4.7.0.0
, Num -- ^ @since base-4.7.0.0
)
@@ -355,9 +343,7 @@ instance Monad Product where
--
-- @since base-4.8.0.0
newtype Alt f a = Alt {getAlt :: f a}
- deriving ( Generic -- ^ @since base-4.8.0.0
- , Generic1 -- ^ @since base-4.8.0.0
- , Read -- ^ @since base-4.8.0.0
+ deriving ( Read -- ^ @since base-4.8.0.0
, Show -- ^ @since base-4.8.0.0
, Eq -- ^ @since base-4.8.0.0
, Ord -- ^ @since base-4.8.0.0
=====================================
libraries/ghc-internal/src/GHC/Internal/Data/Traversable.hs
=====================================
@@ -51,8 +51,7 @@ import GHC.Internal.Data.Proxy ( Proxy(..) )
import GHC.Internal.Arr
import GHC.Internal.Base ( Applicative(..), Monad(..), Monoid, Maybe(..), NonEmpty(..),
- ($), (.), id, flip )
-import GHC.Internal.Generics
+ (.), id, flip, ($) )
import qualified GHC.Internal.List as List ( foldr )
import GHC.Internal.Tuple (Solo (..))
@@ -310,60 +309,6 @@ instance (Traversable f) => Traversable (Ap f) where
deriving instance Traversable Identity
--- Instances for GHC.Generics
--- | @since base-4.9.0.0
-instance Traversable U1 where
- traverse _ _ = pure U1
- {-# INLINE traverse #-}
- sequenceA _ = pure U1
- {-# INLINE sequenceA #-}
- mapM _ _ = pure U1
- {-# INLINE mapM #-}
- sequence _ = pure U1
- {-# INLINE sequence #-}
-
--- | @since base-4.9.0.0
-deriving instance Traversable V1
-
--- | @since base-4.9.0.0
-deriving instance Traversable Par1
-
--- | @since base-4.9.0.0
-deriving instance Traversable f => Traversable (Rec1 f)
-
--- | @since base-4.9.0.0
-deriving instance Traversable (K1 i c)
-
--- | @since base-4.9.0.0
-deriving instance Traversable f => Traversable (M1 i c f)
-
--- | @since base-4.9.0.0
-deriving instance (Traversable f, Traversable g) => Traversable (f :+: g)
-
--- | @since base-4.9.0.0
-deriving instance (Traversable f, Traversable g) => Traversable (f :*: g)
-
--- | @since base-4.9.0.0
-deriving instance (Traversable f, Traversable g) => Traversable (f :.: g)
-
--- | @since base-4.9.0.0
-deriving instance Traversable UAddr
-
--- | @since base-4.9.0.0
-deriving instance Traversable UChar
-
--- | @since base-4.9.0.0
-deriving instance Traversable UDouble
-
--- | @since base-4.9.0.0
-deriving instance Traversable UFloat
-
--- | @since base-4.9.0.0
-deriving instance Traversable UInt
-
--- | @since base-4.9.0.0
-deriving instance Traversable UWord
-
-- Instance for Data.Ord
-- | @since base-4.12.0.0
deriving instance Traversable Down
=====================================
libraries/ghc-internal/src/GHC/Internal/Functor/ZipList.hs
=====================================
@@ -1,13 +1,11 @@
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE DeriveFunctor #-}
-{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveFoldable #-}
module GHC.Internal.Functor.ZipList (ZipList(..)) where
import GHC.Internal.Base
-import GHC.Internal.Generics
import GHC.Internal.List (repeat, zipWith)
import GHC.Internal.Read (Read)
import GHC.Internal.Show (Show)
@@ -41,8 +39,6 @@ newtype ZipList a = ZipList { getZipList :: [a] }
, Read -- ^ @since base-4.7.0.0
, Functor -- ^ @since base-2.01
, Foldable -- ^ @since base-4.9.0.0
- , Generic -- ^ @since base-4.7.0.0
- , Generic1 -- ^ @since base-4.7.0.0
)
=====================================
libraries/ghc-internal/src/GHC/Internal/Generics.hs
=====================================
@@ -3,7 +3,9 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveFunctor #-}
+{-# LANGUAGE DeriveFoldable #-}
{-# LANGUAGE DeriveGeneric #-}
+{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE EmptyDataDeriving #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
@@ -736,13 +738,13 @@ import GHC.Internal.Data.Ord ( Down(..) )
import GHC.Internal.Bignum.Integer ( Integer, integerToInt )
import GHC.Internal.Prim ( Addr#, Char#, Double#, Float#, Int#, Word# )
import GHC.Internal.Ptr ( Ptr(..) )
-import GHC.Internal.Types
+import GHC.Internal.Types hiding (Any) -- clashes with the Semigroup
-- Needed for instances
import GHC.Internal.Ix ( Ix )
import GHC.Internal.Base ( Alternative(..), Applicative(..), Functor(..)
, Monad(..), MonadPlus(..), NonEmpty(..), String, coerce
- , Semigroup(..), Monoid(..), Void )
+ , Semigroup(..), Void, errorWithoutStackTrace, liftM2 )
import GHC.Internal.Classes ( Eq(..), Ord(..) )
import GHC.Internal.Enum ( Bounded, Enum )
import GHC.Internal.Read ( Read(..) )
@@ -751,6 +753,15 @@ import GHC.Internal.Stack.Types ( SrcLoc(..) )
import GHC.Internal.Tuple (Solo (..))
import GHC.Internal.Unicode ( GeneralCategory(..) )
import GHC.Internal.Fingerprint.Type ( Fingerprint(..) )
+import GHC.Internal.Data.Semigroup.Internal
+import GHC.Internal.Data.Monoid
+import GHC.Internal.Data.Foldable
+import GHC.Internal.Data.Traversable
+import GHC.Internal.Data.Functor.Const
+import GHC.Internal.Data.Functor.Identity
+import GHC.Internal.Functor.ZipList
+import GHC.Internal.IO.Exception ( ExitCode(..) )
+import GHC.Internal.ByteOrder ( ByteOrder(..) )
-- Needed for metadata
import GHC.Internal.Data.Proxy ( Proxy(..) )
@@ -1879,3 +1890,191 @@ instance SingKind DecidedStrictness where
fromSing SDecidedLazy = DecidedLazy
fromSing SDecidedStrict = DecidedStrict
fromSing SDecidedUnpack = DecidedUnpack
+
+-- | @since base-4.7.0.0
+deriving instance Generic (Dual a)
+
+-- | @since base-4.7.0.0
+deriving instance Generic1 Dual
+
+-- | @since base-4.7.0.0
+deriving instance Generic (Endo a)
+
+-- | @since base-4.7.0.0
+deriving instance Generic All
+
+-- | @since base-4.7.0.0
+deriving instance Generic Any
+
+-- | @since base-4.7.0.0
+deriving instance Generic (Sum a)
+
+-- | @since base-4.7.0.0
+deriving instance Generic1 Sum
+
+-- | @since base-4.7.0.0
+deriving instance Generic (Product a)
+
+-- | @since base-4.7.0.0
+deriving instance Generic1 Product
+
+-- | @since base-4.8.0.0
+deriving instance Generic (Alt f a)
+
+-- | @since base-4.8.0.0
+deriving instance Generic1 (Alt f)
+
+-- | @since base-4.7.0.0
+deriving instance Generic (First a)
+
+-- | @since base-4.7.0.0
+deriving instance Generic1 First
+
+-- | @since base-4.7.0.0
+deriving instance Generic (Last a)
+
+-- | @since base-4.7.0.0
+deriving instance Generic1 Last
+
+-- | @since base-4.12.0.0
+deriving instance Generic (Ap f a)
+
+-- | @since base-4.12.0.0
+deriving instance Generic1 (Ap f)
+
+-- | @since base-4.9.0.0
+instance Foldable U1 where
+ foldMap _ _ = mempty
+ {-# INLINE foldMap #-}
+ fold _ = mempty
+ {-# INLINE fold #-}
+ foldr _ z _ = z
+ {-# INLINE foldr #-}
+ foldl _ z _ = z
+ {-# INLINE foldl #-}
+ foldl1 _ _ = errorWithoutStackTrace "foldl1: U1"
+ foldr1 _ _ = errorWithoutStackTrace "foldr1: U1"
+ length _ = 0
+ null _ = True
+ elem _ _ = False
+ sum _ = 0
+ product _ = 1
+
+-- | @since base-4.9.0.0
+deriving instance Foldable V1
+
+-- | @since base-4.9.0.0
+deriving instance Foldable Par1
+
+-- | @since base-4.9.0.0
+deriving instance Foldable f => Foldable (Rec1 f)
+
+-- | @since base-4.9.0.0
+deriving instance Foldable (K1 i c)
+
+-- | @since base-4.9.0.0
+deriving instance Foldable f => Foldable (M1 i c f)
+
+-- | @since base-4.9.0.0
+deriving instance (Foldable f, Foldable g) => Foldable (f :+: g)
+
+-- | @since base-4.9.0.0
+deriving instance (Foldable f, Foldable g) => Foldable (f :*: g)
+
+-- | @since base-4.9.0.0
+deriving instance (Foldable f, Foldable g) => Foldable (f :.: g)
+
+-- | @since base-4.9.0.0
+deriving instance Foldable UAddr
+
+-- | @since base-4.9.0.0
+deriving instance Foldable UChar
+
+-- | @since base-4.9.0.0
+deriving instance Foldable UDouble
+
+-- | @since base-4.9.0.0
+deriving instance Foldable UFloat
+
+-- | @since base-4.9.0.0
+deriving instance Foldable UInt
+
+-- | @since base-4.9.0.0
+deriving instance Foldable UWord
+
+-- | @since base-4.9.0.0
+instance Traversable U1 where
+ traverse _ _ = pure U1
+ {-# INLINE traverse #-}
+ sequenceA _ = pure U1
+ {-# INLINE sequenceA #-}
+ mapM _ _ = pure U1
+ {-# INLINE mapM #-}
+ sequence _ = pure U1
+ {-# INLINE sequence #-}
+
+-- | @since base-4.9.0.0
+deriving instance Traversable V1
+
+-- | @since base-4.9.0.0
+deriving instance Traversable Par1
+
+-- | @since base-4.9.0.0
+deriving instance Traversable f => Traversable (Rec1 f)
+
+-- | @since base-4.9.0.0
+deriving instance Traversable (K1 i c)
+
+-- | @since base-4.9.0.0
+deriving instance Traversable f => Traversable (M1 i c f)
+
+-- | @since base-4.9.0.0
+deriving instance (Traversable f, Traversable g) => Traversable (f :+: g)
+
+-- | @since base-4.9.0.0
+deriving instance (Traversable f, Traversable g) => Traversable (f :*: g)
+
+-- | @since base-4.9.0.0
+deriving instance (Traversable f, Traversable g) => Traversable (f :.: g)
+
+-- | @since base-4.9.0.0
+deriving instance Traversable UAddr
+
+-- | @since base-4.9.0.0
+deriving instance Traversable UChar
+
+-- | @since base-4.9.0.0
+deriving instance Traversable UDouble
+
+-- | @since base-4.9.0.0
+deriving instance Traversable UFloat
+
+-- | @since base-4.9.0.0
+deriving instance Traversable UInt
+
+-- | @since base-4.9.0.0
+deriving instance Traversable UWord
+
+-- | @since base-4.9.0.0
+deriving instance Generic (Const a b)
+
+-- | @since base-4.9.0.0
+deriving instance Generic1 (Const a)
+
+-- | @since base-4.8.0.0
+deriving instance Generic (Identity a)
+
+-- | @since base-4.8.0.0
+deriving instance Generic1 Identity
+
+-- | @since base-4.7.0.0
+deriving instance Generic (ZipList a)
+
+-- | @since base-4.7.0.0
+deriving instance Generic1 ZipList
+
+-- TODO: since when??
+deriving instance Generic ExitCode
+
+-- | @since base-4.15.0.0
+deriving instance Generic ByteOrder
=====================================
libraries/ghc-internal/src/GHC/Internal/IO/Exception.hs
=====================================
@@ -1,5 +1,5 @@
{-# LANGUAGE Trustworthy #-}
-{-# LANGUAGE DeriveGeneric, NoImplicitPrelude, MagicHash,
+{-# LANGUAGE NoImplicitPrelude, MagicHash,
ExistentialQuantification, ImplicitParams #-}
{-# OPTIONS_GHC -funbox-strict-fields #-}
{-# OPTIONS_HADDOCK not-home #-}
@@ -52,7 +52,6 @@ module GHC.Internal.IO.Exception (
) where
import GHC.Internal.Base
-import GHC.Internal.Generics
import GHC.Internal.List
import GHC.Internal.IO
import GHC.Internal.Show
@@ -306,7 +305,7 @@ data ExitCode
-- The exact interpretation of the code is
-- operating-system dependent. In particular, some values
-- may be prohibited (e.g. 0 on a POSIX-compliant system).
- deriving (Eq, Ord, Read, Show, Generic)
+ deriving (Eq, Ord, Read, Show)
-- | @since base-4.1.0.0
instance Exception ExitCode
=====================================
libraries/ghc-internal/src/GHC/Internal/Read.hs
=====================================
@@ -74,6 +74,7 @@ import GHC.Internal.Arr
import GHC.Internal.Word
import GHC.Internal.List (filter)
import GHC.Internal.Tuple (Solo (..))
+import GHC.Internal.ByteOrder
-- | @'readParen' 'True' p@ parses what @p@ parses, but surrounded with
@@ -833,3 +834,6 @@ instance (Read a, Read b, Read c, Read d, Read e, Read f, Read g, Read h,
; return (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o) })
readListPrec = readListPrecDefault
readList = readListDefault
+
+-- | @since base-4.11.0.0
+deriving instance Read ByteOrder
=====================================
libraries/ghc-internal/src/GHC/Internal/Unicode/Bits.hs
=====================================
@@ -31,7 +31,7 @@ module GHC.Internal.Unicode.Bits
where
import GHC.Internal.Bits (finiteBitSize, popCount)
-import {-# SOURCE #-} GHC.Internal.ByteOrder
+import GHC.Internal.ByteOrder
import GHC.Internal.Prim
import GHC.Internal.ST
import GHC.Internal.Base
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/316765d2128789be4ad1042d0214c8d…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/316765d2128789be4ad1042d0214c8d…
You're receiving this email because of your account on gitlab.haskell.org.
1
0
[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 5 commits: configure: Accept happy-2.2
by Marge Bot (@marge-bot) 17 Feb '26
by Marge Bot (@marge-bot) 17 Feb '26
17 Feb '26
Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC
Commits:
4f2840f2 by Brian J. Cardiff at 2026-02-17T17:04:08-05:00
configure: Accept happy-2.2
In Jan 2026 happy-2.2 was released. The most sensible change is https://github.com/haskell/happy/issues/335 which didn't trigger in a fresh build
- - - - -
10b4d364 by Duncan Coutts at 2026-02-17T17:04:52-05:00
Fix errors in the documentation of the eventlog STOP_THREAD status codes
Fix the code for BlockedOnMsgThrowTo.
Document all the known historical warts.
Fixes issue #26867
- - - - -
1617b10c by Phil de Joux at 2026-02-17T17:36:29-05:00
haddock: use snippets for all list examples
- generate snippet output for docs
- reduce font size to better fit snippets
- Use only directive to guard html snippets
- Add latex snippets for lists
- - - - -
2ac7b715 by Phil de Joux at 2026-02-17T17:36:29-05:00
haddock: Place the snippet input and output together
- Put the output seemingly inside the example box
- - - - -
4a2d77c5 by Samuel Thibault at 2026-02-17T17:36:42-05:00
Fix linking against libm by moving the -lm option
For those systems that need -lm for getting math functions, this is
currently added on the link line very early, before the object files being
linked together. Newer toolchains enable --as-needed by default, which means
-lm is ignored at that point because no object requires a math function
yet. With such toolchains, we thus have to add -lm after the objects, so the
linker actually includes libm in the link.
- - - - -
27 changed files:
- compiler/GHC/Linker/Dynamic.hs
- docs/users_guide/eventlog-formats.rst
- m4/fptools_happy.m4
- utils/haddock/doc/.gitignore
- utils/haddock/doc/Makefile
- + utils/haddock/doc/_static/haddock-custom.css
- utils/haddock/doc/conf.py
- utils/haddock/doc/markup.rst
- + utils/haddock/doc/snippets/.gitignore
- + utils/haddock/doc/snippets/Lists.hs
- + utils/haddock/doc/snippets/Makefile
- + utils/haddock/doc/snippets/Snippet-List-Bulleted.html
- + utils/haddock/doc/snippets/Snippet-List-Bulleted.tex
- + utils/haddock/doc/snippets/Snippet-List-Definition.html
- + utils/haddock/doc/snippets/Snippet-List-Definition.tex
- + utils/haddock/doc/snippets/Snippet-List-Enumerated.html
- + utils/haddock/doc/snippets/Snippet-List-Enumerated.tex
- + utils/haddock/doc/snippets/Snippet-List-Indentation.html
- + utils/haddock/doc/snippets/Snippet-List-Indentation.tex
- + utils/haddock/doc/snippets/Snippet-List-Multiline-Item.html
- + utils/haddock/doc/snippets/Snippet-List-Multiline-Item.tex
- + utils/haddock/doc/snippets/Snippet-List-Nested-Item.html
- + utils/haddock/doc/snippets/Snippet-List-Nested-Item.tex
- + utils/haddock/doc/snippets/Snippet-List-Not-Newline.html
- + utils/haddock/doc/snippets/Snippet-List-Not-Newline.tex
- + utils/haddock/doc/snippets/Snippet-List-Not-Separated.html
- + utils/haddock/doc/snippets/Snippet-List-Not-Separated.tex
Changes:
=====================================
compiler/GHC/Linker/Dynamic.hs
=====================================
@@ -227,7 +227,6 @@ linkDynLib logger tmpfs dflags0 unit_env o_files dep_packages
runLink logger tmpfs linker_config (
map Option verbFlags
- ++ libmLinkOpts platform
++ [ Option "-o"
, FileOption "" output_fn
]
@@ -260,6 +259,7 @@ linkDynLib logger tmpfs dflags0 unit_env o_files dep_packages
-- driver is a more pragmatic solution.
++ [ Option "-Wl,--Bsymbolic,--experimental-pic,--unresolved-symbols=import-dynamic" | arch == ArchWasm32 ]
++ extra_ld_inputs
+ ++ libmLinkOpts platform
++ map Option lib_path_opts
++ map Option pkg_lib_path_opts
++ map Option pkg_link_opts
=====================================
docs/users_guide/eventlog-formats.rst
=====================================
@@ -221,14 +221,41 @@ Thread and scheduling events
* 11: BlockedOnDelay
* 12: BlockedOnSTM
* 13: BlockedOnDoProc
- * 16: BlockedOnMsgThrowTo
+ * 14--17: unused
+ * 18: BlockedOnMsgThrowTo
+ * 19: unused
* 20: BlockedOnMVarRead
:field ThreadId: thread id of thread being blocked on (only for some status
values)
The indicated thread has stopped running for the reason given by ``status``.
-
+
+ Historically, the GHC-internal status codes for the reasons why threads are
+ blocked were used more-or-less directly as the status codes emitted into the
+ eventlog. This is now recognised as a mistake and the GHC internal codes and
+ these eventlog stop thread codes are now independent. We are nevertheless
+ left with some historical warts:
+
+ * 14,15: these correspond to GHC internal status codes `BlockedOnGA` and
+ `BlockedOnGA_NoSend` that are no longer used (and may never have been
+ used by any released version of GHC).
+ * 16,17: these would be used by `BlockedOnCCall` and
+ `BlockedOnCCall_Interruptible` which are GHC-internal status codes, but
+ these are never and have never been emitted into the eventlog. This has
+ caused confusion, and many versions of the `ghc-events` package support
+ these status codes. Threads blocking on foreign calls use `ForeignCall`
+ above.
+ * 19: this would be used by `ThreadMigrating` which is a GHC-internal
+ status code, but this is never emitted into the eventlog. Threads
+ migrating use a separate event `MIGRATE_THREAD`.
+ * `BlockedOnMsgGlobalise`: this is supported by versions of `ghc-events` as
+ code 18, but it appears never to have been emitted by any released version
+ of GHC. Most likely it was related to the local-heap GC experiment that
+ was never released.
+
+ Errata: previous versions of this document stated that code 16 is
+ `BlockedOnMsgThrowTo`. It appears this was always incorrect.
.. event-type:: MIGRATE_THREAD
=====================================
m4/fptools_happy.m4
=====================================
@@ -28,13 +28,13 @@ then
else
fptools_cv_happy_version_display="none";
fi;
- failure_msg="Happy version == 1.20.* || >= 2.0.2 && < 2.2 is required to compile GHC. (Found: $fptools_cv_happy_version_display)"
+ failure_msg="Happy version == 1.20.* || >= 2.0.2 && < 2.3 is required to compile GHC. (Found: $fptools_cv_happy_version_display)"
FP_COMPARE_VERSIONS([$fptools_cv_happy_version],[-lt],[1.20.0],
[AC_MSG_ERROR([$failure_msg])])[]
FP_COMPARE_VERSIONS([$fptools_cv_happy_version],[-ge],[1.21.0],
FP_COMPARE_VERSIONS([$fptools_cv_happy_version], [-le], [2.0.1],
[AC_MSG_ERROR([$failure_msg])])[])[]
- FP_COMPARE_VERSIONS([$fptools_cv_happy_version],[-ge],[2.2.0],
+ FP_COMPARE_VERSIONS([$fptools_cv_happy_version],[-ge],[2.3.0],
[AC_MSG_ERROR([$failure_msg])])[]
fi
HappyVersion=$fptools_cv_happy_version;
=====================================
utils/haddock/doc/.gitignore
=====================================
@@ -1 +1,3 @@
-.build-html
\ No newline at end of file
+.build-html
+.build-latex
+!_static
=====================================
utils/haddock/doc/Makefile
=====================================
@@ -1,8 +1,13 @@
SPHINX_BUILD ?= sphinx-build
-all : html
+all : html pdf
.PHONY : html
+.PHONY : pdf
html :
$(SPHINX_BUILD) -b html . .build-html
+
+pdf :
+ $(SPHINX_BUILD) -b latex . .build-latex
+ cd .build-latex && make
=====================================
utils/haddock/doc/_static/haddock-custom.css
=====================================
@@ -0,0 +1,19 @@
+.result.admonition {
+ border: solid 3px #eee;
+ border-top: none;
+ background-color: transparent;
+ padding: 1px 0px 10px 10px;
+ margin: 0px 0px -20px 0px;
+ position: relative;
+ top: -18px;
+}
+
+.result.admonition p.admonition-title{
+ position: absolute;
+ visibility: hidden;
+}
+
+/* Use a small font size for code blocks so that they don't overflow. */
+pre {
+ font-size: 0.8em;
+}
=====================================
utils/haddock/doc/conf.py
=====================================
@@ -31,6 +31,12 @@ pygments_style = 'tango'
htmlhelp_basename = 'Haddockdoc'
+html_static_path = ['_static']
+
+html_css_files = [
+ 'haddock-custom.css',
+]
+
# -- Options for LaTeX output ---------------------------------------------
=====================================
utils/haddock/doc/markup.rst
=====================================
@@ -1004,99 +1004,162 @@ Itemized and Enumerated Lists
A bulleted item is represented by preceding a paragraph with either
“``*``” or “``-``”. A sequence of bulleted paragraphs is rendered as an
-itemized list in the generated documentation, e.g.: ::
+itemized list in the generated documentation, e.g.
- -- | This is a bulleted list:
- --
- -- * first item
- --
- -- * second item
+.. literalinclude:: snippets/Lists.hs
+ :lines: 3-7
+
+.. admonition:: Result
+ :class: result
+
+ .. only:: html
+
+ .. raw:: html
+ :file: snippets/Snippet-List-Bulleted.html
+
+ .. only:: latex
+
+ .. raw:: latex
+ :file: snippets/Snippet-List-Bulleted.tex
+
+.. warning::
+
+ Separate lists from any preceding markup with at least one blank line
+ otherwise the list and its items will be rendered with the preceding
+ content.
+
+.. literalinclude:: snippets/Lists.hs
+ :lines: 10-12
+
+.. admonition:: Result
+ :class: result
+
+ .. only:: html
+
+ .. raw:: html
+ :file: snippets/Snippet-List-Not-Separated.html
+
+ .. only:: latex
+
+ .. raw:: latex
+ :file: snippets/Snippet-List-Not-Separated.tex
An enumerated list is similar, except each paragraph must be preceded by
-either “``(n)``” or “``n.``” where n is any integer. e.g. ::
+either “``(n)``” or “``n.``” where n is any integer. e.g.
- -- | This is an enumerated list:
- --
- -- (1) first item
- --
- -- 2. second item
+.. literalinclude:: snippets/Lists.hs
+ :lines: 15-19
-Lists of the same type don't have to be separated by a newline: ::
+.. admonition:: Result
+ :class: result
- -- | This is an enumerated list:
- --
- -- (1) first item
- -- 2. second item
- --
- -- This is a bulleted list:
- --
- -- * first item
- -- * second item
+ .. only:: html
-You can have more than one line of content in a list element: ::
+ .. raw:: html
+ :file: snippets/Snippet-List-Enumerated.html
- -- |
- -- * first item
- -- and more content for the first item
- -- * second item
- -- and more content for the second item
+ .. only:: latex
+
+ .. raw:: latex
+ :file: snippets/Snippet-List-Enumerated.tex
+
+Lists of the same type don't have to be separated by a newline:
+
+.. literalinclude:: snippets/Lists.hs
+ :lines: 22-30
+
+.. admonition:: Result
+ :class: result
+
+ .. only:: html
+
+ .. raw:: html
+ :file: snippets/Snippet-List-Not-Newline.html
+
+ .. only:: latex
+
+ .. raw:: latex
+ :file: snippets/Snippet-List-Not-Newline.tex
+
+You can have more than one line of content in a list element:
+
+.. literalinclude:: snippets/Lists.hs
+ :lines: 33-37
+
+.. admonition:: Result
+ :class: result
+
+ .. only:: html
+
+ .. raw:: html
+ :file: snippets/Snippet-List-Multiline-Item.html
+
+ .. only:: latex
+
+ .. raw:: latex
+ :file: snippets/Snippet-List-Multiline-Item.tex
You can even nest whole paragraphs inside of list elements. The rules
are 4 spaces for each indentation level. You're required to use a
-newline before such nested paragraphs: ::
-
- {-|
- * Beginning of list
- This belongs to the list above!
+newline before such nested paragraphs:
- > nested
- > bird
- > tracks
+.. literalinclude:: snippets/Lists.hs
+ :lines: 40-61
- * Next list
- More of the indented list.
+.. admonition:: Result
+ :class: result
- * Deeper
+ .. only:: html
- @
- even code blocks work
- @
+ .. raw:: html
+ :file: snippets/Snippet-List-Nested-Item.html
- * Deeper
+ .. only:: latex
- 1. Even deeper!
- 2. No newline separation even in indented lists.
- -}
+ .. raw:: latex
+ :file: snippets/Snippet-List-Nested-Item.tex
The indentation of the first list item is honoured. That is, in the
following example the items are on the same level. Before Haddock
2.16.1, the second item would have been nested under the first item
-which was unexpected. ::
+which was unexpected.
- {-|
- * foo
+.. literalinclude:: snippets/Lists.hs
+ :lines: 64-68
- * bar
- -}
+.. admonition:: Result
+ :class: result
+
+ .. only:: html
+
+ .. raw:: html
+ :file: snippets/Snippet-List-Indentation.html
+
+ .. only:: latex
+
+ .. raw:: latex
+ :file: snippets/Snippet-List-Indentation.tex
Definition Lists
~~~~~~~~~~~~~~~~
-Definition lists are written as follows: ::
+Definition lists are written as follows:
- -- | This is a definition list:
- --
- -- [@foo@]: The description of @foo@.
- --
- -- [@bar@]: The description of @bar@.
+.. literalinclude:: snippets/Lists.hs
+ :lines: 71-75
+
+.. admonition:: Result
+ :class: result
+
+ .. only:: html
-To produce output something like this:
+ .. raw:: html
+ :file: snippets/Snippet-List-Definition.html
-``foo``
- The description of ``foo``.
+ .. only:: latex
-``bar``
- The description of ``bar``.
+ .. raw:: latex
+ :file: snippets/Snippet-List-Definition.tex
Each paragraph should be preceded by the “definition term” enclosed in
square brackets and followed by a colon. Other markup operators may be
=====================================
utils/haddock/doc/snippets/.gitignore
=====================================
@@ -0,0 +1,12 @@
+*.html
+*.tex
+haddock-bundle.min.js
+haddock.sty
+linuwial.css
+main.tex
+meta.json
+quick-jump.css
+synopsis.png
+
+!Snippet*.html
+!Snippet*.tex
=====================================
utils/haddock/doc/snippets/Lists.hs
=====================================
@@ -0,0 +1,76 @@
+module Lists where
+
+-- | This is a bulleted list:
+--
+-- * first item
+--
+-- * second item
+data Bulleted
+
+-- | __Missing blank lines__ before a list:
+-- * first item
+-- * second item
+data Before
+
+-- | This is an, (n) n., enumerated list:
+--
+-- (1) first item
+--
+-- 2. second item
+data Enumerated
+
+-- | This is an enumerated list, with items not separated by newlines:
+--
+-- (1) first item
+-- 2. second item
+--
+-- This is a bulleted list, with items not separated by newlines:
+--
+-- * first item
+-- * second item
+data NotNewline
+
+-- |
+-- * first item
+-- and more content for the first item
+-- * second item
+-- and more content for the second item
+data MultilineItem
+
+{-|
+* Beginning of list
+This belongs to the list above!
+
+ > nested
+ > bird
+ > tracks
+
+ * Next list
+ More of the indented list.
+
+ * Deeper
+
+ @
+ even code blocks work
+ @
+
+ * Deeper
+
+ 1. Even deeper!
+ 2. No newline separation even in indented lists.
+-}
+data NestedItem
+
+{-|
+ * foo
+
+ * bar
+-}
+data Indentation
+
+-- | This is a definition list:
+--
+-- [@foo@]: The description of @foo@.
+--
+-- [@bar@]: The description of @bar@.
+data DefinitionList
\ No newline at end of file
=====================================
utils/haddock/doc/snippets/Makefile
=====================================
@@ -0,0 +1,103 @@
+# \newcommand{\haddockbegindoc}{\hfill\\[1ex]}
+HDK_BEGIN := \\\\newcommand{\\haddockbegindoc}{\\hfill\\\\\[1ex]}
+
+# \newcommand{\haddockverb}{\small}
+HDK_VERB := \\\\newcommand{\\haddockverb}{\\small}
+
+# \newcommand{\haddocktt}[1]{{\small \texttt{#1}}}
+HDK_TT := \\\\newcommand{\\haddocktt}[1]{{\\small \\\\texttt{\#1}}}
+
+all: \
+ Snippet-List-Bulleted.html \
+ Snippet-List-Bulleted.tex \
+ Snippet-List-Not-Separated.html \
+ Snippet-List-Not-Separated.tex \
+ Snippet-List-Enumerated.html \
+ Snippet-List-Enumerated.tex \
+ Snippet-List-Not-Newline.html \
+ Snippet-List-Not-Newline.tex \
+ Snippet-List-Multiline-Item.html \
+ Snippet-List-Multiline-Item.tex \
+ Snippet-List-Nested-Item.html \
+ Snippet-List-Nested-Item.tex \
+ Snippet-List-Indentation.html \
+ Snippet-List-Indentation.tex \
+ Snippet-List-Definition.html \
+ Snippet-List-Definition.tex
+
+clean:
+ rm -f Lists*.html
+
+Lists.html: Lists.hs
+ haddock --html $^
+
+Lists.tex: Lists.hs
+ haddock --latex $^
+
+# Using pandoc-3.1.3
+Lists-Pretty.html: Lists.html
+ pandoc $^ -o $@
+
+# Using tex-fmt-0.4.1
+# nix profile install github:wgunderwood/tex-fmt
+Lists-Pretty.tex: Lists.tex
+ cp $^ $@
+ tex-fmt $@
+
+Snippet-List-Bulleted.html: Lists-Pretty.html
+ sed -n '48,52p;53q' $^ > $@
+
+Snippet-List-Bulleted.tex: Lists-Pretty.tex
+ echo "$(HDK_BEGIN)" > $@
+ sed -n '18,26p;27q' $^ >> $@
+
+Snippet-List-Not-Separated.html: Lists-Pretty.html
+ sed -n '59,60p;61q' $^ > $@
+
+Snippet-List-Not-Separated.tex: Lists-Pretty.tex
+ echo "$(HDK_BEGIN)" > $@
+ sed -n '33,36p;37q' $^ >> $@
+
+Snippet-List-Enumerated.html: Lists-Pretty.html
+ sed -n '68,72p;73q' $^ > $@
+
+Snippet-List-Enumerated.tex: Lists-Pretty.tex
+ echo "$(HDK_BEGIN)" > $@
+ sed -n '43,51p;52q' $^ >> $@
+
+Snippet-List-Not-Newline.html: Lists-Pretty.html
+ sed -n '80,89p;90q' $^ > $@
+
+Snippet-List-Not-Newline.tex: Lists-Pretty.tex
+ echo "$(HDK_BEGIN)" > $@
+ sed -n '58,74p;75q' $^ >> $@
+
+Snippet-List-Multiline-Item.html: Lists-Pretty.html
+ sed -n '97,100p;101q' $^ > $@
+
+Snippet-List-Multiline-Item.tex: Lists-Pretty.tex
+ echo "$(HDK_BEGIN)" > $@
+ sed -n '81,90p;91q' $^ >> $@
+
+Snippet-List-Nested-Item.html: Lists-Pretty.html
+ sed -n '108,127p;128q' $^ > $@
+
+Snippet-List-Nested-Item.tex: Lists-Pretty.tex
+ echo "$(HDK_BEGIN)" > $@
+ echo "$(HDK_VERB)" >> $@
+ sed -n '97,141p;142q' $^ >> $@
+
+Snippet-List-Indentation.html: Lists-Pretty.html
+ sed -n '135,138p;139q' $^ > $@
+
+Snippet-List-Indentation.tex: Lists-Pretty.tex
+ echo "$(HDK_BEGIN)" > $@
+ sed -n '148,155p;156q' $^ >> $@
+
+Snippet-List-Definition.html: Lists-Pretty.html
+ sed -n '146,156p;157q' $^ > $@
+
+Snippet-List-Definition.tex: Lists-Pretty.tex
+ echo "$(HDK_BEGIN)" > $@
+ echo "$(HDK_TT)" >> $@
+ sed -n '162,170p;171q' $^ >> $@
=====================================
utils/haddock/doc/snippets/Snippet-List-Bulleted.html
=====================================
@@ -0,0 +1,5 @@
+<p>This is a bulleted list:</p>
+<ul>
+<li>first item</li>
+<li>second item</li>
+</ul>
=====================================
utils/haddock/doc/snippets/Snippet-List-Bulleted.tex
=====================================
@@ -0,0 +1,10 @@
+\newcommand{\haddockbegindoc}{\hfill\\[1ex]}
+ {\haddockbegindoc
+ This is a bulleted list:\par
+ \vbox{
+ \begin{itemize}
+ \item
+ first item\par
+ \item
+ second item\par
+ \end{itemize}}}
=====================================
utils/haddock/doc/snippets/Snippet-List-Definition.html
=====================================
@@ -0,0 +1,11 @@
+<p>This is a definition list:</p>
+<dl>
+<dt><code>foo</code></dt>
+<dd>
+The description of <code>foo</code>.
+</dd>
+<dt><code>bar</code></dt>
+<dd>
+The description of <code>bar</code>.
+</dd>
+</dl>
=====================================
utils/haddock/doc/snippets/Snippet-List-Definition.tex
=====================================
@@ -0,0 +1,11 @@
+\newcommand{\haddockbegindoc}{\hfill\\[1ex]}
+\newcommand{\haddocktt}[1]{{\small \texttt{#1}}}
+ {\haddockbegindoc
+ This is a definition list:\par
+ \vbox{
+ \begin{description}
+ \item[\haddocktt{foo}]\hfill \par
+ The description of \haddocktt{foo}.
+ \item[\haddocktt{bar}]\hfill \par
+ The description of \haddocktt{bar}.
+ \end{description}}}
=====================================
utils/haddock/doc/snippets/Snippet-List-Enumerated.html
=====================================
@@ -0,0 +1,5 @@
+<p>This is an, (n) n., enumerated list:</p>
+<ol>
+<li>first item</li>
+<li>second item</li>
+</ol>
=====================================
utils/haddock/doc/snippets/Snippet-List-Enumerated.tex
=====================================
@@ -0,0 +1,10 @@
+\newcommand{\haddockbegindoc}{\hfill\\[1ex]}
+ {\haddockbegindoc
+ This is an, (n) n., enumerated list:\par
+ \vbox{
+ \begin{enumerate}
+ \item
+ first item\par
+ \item
+ second item\par
+ \end{enumerate}}}
=====================================
utils/haddock/doc/snippets/Snippet-List-Indentation.html
=====================================
@@ -0,0 +1,4 @@
+<ul>
+<li>foo</li>
+<li>bar</li>
+</ul>
=====================================
utils/haddock/doc/snippets/Snippet-List-Indentation.tex
=====================================
@@ -0,0 +1,9 @@
+\newcommand{\haddockbegindoc}{\hfill\\[1ex]}
+ {\haddockbegindoc
+ \vbox{
+ \begin{itemize}
+ \item
+ foo\par
+ \item
+ bar\par
+ \end{itemize}}}
=====================================
utils/haddock/doc/snippets/Snippet-List-Multiline-Item.html
=====================================
@@ -0,0 +1,4 @@
+<ul>
+<li>first item and more content for the first item</li>
+<li>second item and more content for the second item</li>
+</ul>
=====================================
utils/haddock/doc/snippets/Snippet-List-Multiline-Item.tex
=====================================
@@ -0,0 +1,11 @@
+\newcommand{\haddockbegindoc}{\hfill\\[1ex]}
+ {\haddockbegindoc
+ \vbox{
+ \begin{itemize}
+ \item
+ first item
+ and more content for the first item\par
+ \item
+ second item
+ and more content for the second item\par
+ \end{itemize}}}
=====================================
utils/haddock/doc/snippets/Snippet-List-Nested-Item.html
=====================================
@@ -0,0 +1,20 @@
+<ul>
+<li><p>Beginning of list This belongs to the list above!</p>
+<pre><code>nested
+bird
+tracks</code></pre>
+<ul>
+<li><p>Next list More of the indented list.</p>
+<ul>
+<li><p>Deeper</p>
+<pre><code>even code blocks work</code></pre>
+<ul>
+<li><p>Deeper</p>
+<ol>
+<li>Even deeper!</li>
+<li>No newline separation even in indented lists.</li>
+</ol></li>
+</ul></li>
+</ul></li>
+</ul></li>
+</ul>
=====================================
utils/haddock/doc/snippets/Snippet-List-Nested-Item.tex
=====================================
@@ -0,0 +1,47 @@
+\newcommand{\haddockbegindoc}{\hfill\\[1ex]}
+\newcommand{\haddockverb}{\small}
+ {\haddockbegindoc
+ \vbox{
+ \begin{itemize}
+ \item
+ Beginning of list
+ This belongs to the list above!\par
+ \begin{quote}
+ {\haddockverb
+ \begin{verbatim}
+nested
+bird
+tracks
+ \end{verbatim}}
+ \end{quote}
+ \vbox{
+ \begin{itemize}
+ \item
+ Next list
+ More of the indented list.\par
+ \vbox{
+ \begin{itemize}
+ \item
+ Deeper\par
+ \begin{quote}
+ {\haddockverb
+ \begin{verbatim}
+even code blocks work
+ \end{verbatim}}
+ \end{quote}
+ \vbox{
+ \begin{itemize}
+ \item
+ Deeper\par
+ \vbox{
+ \begin{enumerate}
+ \item
+ Even deeper!\par
+ \item
+ No newline separation even in
+ indented lists.\par
+ \end{enumerate}}
+ \end{itemize}}
+ \end{itemize}}
+ \end{itemize}}
+ \end{itemize}}}
=====================================
utils/haddock/doc/snippets/Snippet-List-Not-Newline.html
=====================================
@@ -0,0 +1,10 @@
+<p>This is an enumerated list, with items not separated by newlines:</p>
+<ol>
+<li>first item</li>
+<li>second item</li>
+</ol>
+<p>This is a bulleted list, with items not separated by newlines:</p>
+<ul>
+<li>first item</li>
+<li>second item</li>
+</ul>
=====================================
utils/haddock/doc/snippets/Snippet-List-Not-Newline.tex
=====================================
@@ -0,0 +1,18 @@
+\newcommand{\haddockbegindoc}{\hfill\\[1ex]}
+ {\haddockbegindoc
+ This is an enumerated list, with items not separated by newlines:\par
+ \vbox{
+ \begin{enumerate}
+ \item
+ first item\par
+ \item
+ second item\par
+ \end{enumerate}}
+ This is a bulleted list, with items not separated by newlines:\par
+ \vbox{
+ \begin{itemize}
+ \item
+ first item\par
+ \item
+ second item\par
+ \end{itemize}}}
=====================================
utils/haddock/doc/snippets/Snippet-List-Not-Separated.html
=====================================
@@ -0,0 +1,2 @@
+<p><strong>Missing blank lines</strong> before a list: * first item *
+second item</p>
=====================================
utils/haddock/doc/snippets/Snippet-List-Not-Separated.tex
=====================================
@@ -0,0 +1,5 @@
+\newcommand{\haddockbegindoc}{\hfill\\[1ex]}
+ {\haddockbegindoc
+ \textbf{Missing blank lines} before a list:
+ * first item
+ * second item\par}
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/45987fcec35aa76d9a9eb04ed2497d…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/45987fcec35aa76d9a9eb04ed2497d…
You're receiving this email because of your account on gitlab.haskell.org.
1
0
[Git][ghc/ghc][master] Fix errors in the documentation of the eventlog STOP_THREAD status codes
by Marge Bot (@marge-bot) 17 Feb '26
by Marge Bot (@marge-bot) 17 Feb '26
17 Feb '26
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
10b4d364 by Duncan Coutts at 2026-02-17T17:04:52-05:00
Fix errors in the documentation of the eventlog STOP_THREAD status codes
Fix the code for BlockedOnMsgThrowTo.
Document all the known historical warts.
Fixes issue #26867
- - - - -
1 changed file:
- docs/users_guide/eventlog-formats.rst
Changes:
=====================================
docs/users_guide/eventlog-formats.rst
=====================================
@@ -221,14 +221,41 @@ Thread and scheduling events
* 11: BlockedOnDelay
* 12: BlockedOnSTM
* 13: BlockedOnDoProc
- * 16: BlockedOnMsgThrowTo
+ * 14--17: unused
+ * 18: BlockedOnMsgThrowTo
+ * 19: unused
* 20: BlockedOnMVarRead
:field ThreadId: thread id of thread being blocked on (only for some status
values)
The indicated thread has stopped running for the reason given by ``status``.
-
+
+ Historically, the GHC-internal status codes for the reasons why threads are
+ blocked were used more-or-less directly as the status codes emitted into the
+ eventlog. This is now recognised as a mistake and the GHC internal codes and
+ these eventlog stop thread codes are now independent. We are nevertheless
+ left with some historical warts:
+
+ * 14,15: these correspond to GHC internal status codes `BlockedOnGA` and
+ `BlockedOnGA_NoSend` that are no longer used (and may never have been
+ used by any released version of GHC).
+ * 16,17: these would be used by `BlockedOnCCall` and
+ `BlockedOnCCall_Interruptible` which are GHC-internal status codes, but
+ these are never and have never been emitted into the eventlog. This has
+ caused confusion, and many versions of the `ghc-events` package support
+ these status codes. Threads blocking on foreign calls use `ForeignCall`
+ above.
+ * 19: this would be used by `ThreadMigrating` which is a GHC-internal
+ status code, but this is never emitted into the eventlog. Threads
+ migrating use a separate event `MIGRATE_THREAD`.
+ * `BlockedOnMsgGlobalise`: this is supported by versions of `ghc-events` as
+ code 18, but it appears never to have been emitted by any released version
+ of GHC. Most likely it was related to the local-heap GC experiment that
+ was never released.
+
+ Errata: previous versions of this document stated that code 16 is
+ `BlockedOnMsgThrowTo`. It appears this was always incorrect.
.. event-type:: MIGRATE_THREAD
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/10b4d3641f6fe7a7443bd621d62d135…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/10b4d3641f6fe7a7443bd621d62d135…
You're receiving this email because of your account on gitlab.haskell.org.
1
0
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
4f2840f2 by Brian J. Cardiff at 2026-02-17T17:04:08-05:00
configure: Accept happy-2.2
In Jan 2026 happy-2.2 was released. The most sensible change is https://github.com/haskell/happy/issues/335 which didn't trigger in a fresh build
- - - - -
1 changed file:
- m4/fptools_happy.m4
Changes:
=====================================
m4/fptools_happy.m4
=====================================
@@ -28,13 +28,13 @@ then
else
fptools_cv_happy_version_display="none";
fi;
- failure_msg="Happy version == 1.20.* || >= 2.0.2 && < 2.2 is required to compile GHC. (Found: $fptools_cv_happy_version_display)"
+ failure_msg="Happy version == 1.20.* || >= 2.0.2 && < 2.3 is required to compile GHC. (Found: $fptools_cv_happy_version_display)"
FP_COMPARE_VERSIONS([$fptools_cv_happy_version],[-lt],[1.20.0],
[AC_MSG_ERROR([$failure_msg])])[]
FP_COMPARE_VERSIONS([$fptools_cv_happy_version],[-ge],[1.21.0],
FP_COMPARE_VERSIONS([$fptools_cv_happy_version], [-le], [2.0.1],
[AC_MSG_ERROR([$failure_msg])])[])[]
- FP_COMPARE_VERSIONS([$fptools_cv_happy_version],[-ge],[2.2.0],
+ FP_COMPARE_VERSIONS([$fptools_cv_happy_version],[-ge],[2.3.0],
[AC_MSG_ERROR([$failure_msg])])[]
fi
HappyVersion=$fptools_cv_happy_version;
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/4f2840f2bb729ef1a6660f9f5c46906…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/4f2840f2bb729ef1a6660f9f5c46906…
You're receiving this email because of your account on gitlab.haskell.org.
1
0
Teo Camarasu pushed new branch wip/T26930 at Glasgow Haskell Compiler / GHC
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/T26930
You're receiving this email because of your account on gitlab.haskell.org.
1
0
[Git][ghc/ghc][wip/T26865] ghc-internal: Move GHC.Internal.Data.Bool to base
by Teo Camarasu (@teo) 17 Feb '26
by Teo Camarasu (@teo) 17 Feb '26
17 Feb '26
Teo Camarasu pushed to branch wip/T26865 at Glasgow Haskell Compiler / GHC
Commits:
d6a9780c by Teo Camarasu at 2026-02-17T21:38:19+00:00
ghc-internal: Move GHC.Internal.Data.Bool to base
This is a tiny module that only defines bool :: Bool -> a -> a -> a. We can just move this to base and delete it from ghc-internal. If we want this functionality there we can just use a case statement or if-then expression.
Resolves 26865
- - - - -
31 changed files:
- libraries/base/src/Data/Bool.hs
- libraries/base/src/Data/List.hs
- libraries/base/src/Data/List/NubOrdSet.hs
- libraries/base/src/GHC/Exts.hs
- libraries/ghc-internal/ghc-internal.cabal.in
- − libraries/ghc-internal/src/GHC/Internal/Data/Bool.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Foldable.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Function.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Type/Bool.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Type/Ord.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Version.hs
- libraries/ghc-internal/src/GHC/Internal/IO/FD.hs
- libraries/ghc-internal/src/GHC/Internal/JS/Prim.hs
- libraries/ghc-internal/src/GHC/Internal/System/IO/OS.hs
- libraries/ghc-internal/src/GHC/Internal/TH/Lift.hs
- libraries/ghc-internal/src/GHC/Internal/TypeError.hs
- utils/haddock/html-test/ref/A.html
- utils/haddock/html-test/ref/Bug1004.html
- utils/haddock/html-test/ref/Bug1033.html
- utils/haddock/html-test/ref/Bug1103.html
- utils/haddock/html-test/ref/Bug548.html
- utils/haddock/html-test/ref/Bug923.html
- utils/haddock/html-test/ref/ConstructorPatternExport.html
- utils/haddock/html-test/ref/FunArgs.html
- utils/haddock/html-test/ref/Hash.html
- utils/haddock/html-test/ref/Instances.html
- utils/haddock/html-test/ref/LinearTypes.html
- utils/haddock/html-test/ref/RedactTypeSynonyms.html
- utils/haddock/html-test/ref/T23616.html
- utils/haddock/html-test/ref/Test.html
- utils/haddock/html-test/ref/TypeFamilies3.html
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/d6a9780c081cc04423afdb9ee5c8cf1…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/d6a9780c081cc04423afdb9ee5c8cf1…
You're receiving this email because of your account on gitlab.haskell.org.
1
0
[Git][ghc/ghc][wip/T26865] ghc-internal: Move GHC.Internal.Data.Bool to base
by Teo Camarasu (@teo) 17 Feb '26
by Teo Camarasu (@teo) 17 Feb '26
17 Feb '26
Teo Camarasu pushed to branch wip/T26865 at Glasgow Haskell Compiler / GHC
Commits:
7a308655 by Teo Camarasu at 2026-02-17T21:16:24+00:00
ghc-internal: Move GHC.Internal.Data.Bool to base
This is a tiny module that only defines bool :: Bool -> a -> a -> a. We can just move this to base and delete it from ghc-internal. If we want this functionality there we can just use a case statement or if-then expression.
Resolves 26865
- - - - -
29 changed files:
- libraries/base/src/Data/Bool.hs
- libraries/base/src/Data/List.hs
- libraries/base/src/Data/List/NubOrdSet.hs
- libraries/ghc-internal/ghc-internal.cabal.in
- − libraries/ghc-internal/src/GHC/Internal/Data/Bool.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Foldable.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Function.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Type/Bool.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Type/Ord.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Version.hs
- libraries/ghc-internal/src/GHC/Internal/IO/FD.hs
- libraries/ghc-internal/src/GHC/Internal/JS/Prim.hs
- libraries/ghc-internal/src/GHC/Internal/System/IO/OS.hs
- libraries/ghc-internal/src/GHC/Internal/TH/Lift.hs
- libraries/ghc-internal/src/GHC/Internal/TypeError.hs
- utils/haddock/html-test/ref/A.html
- utils/haddock/html-test/ref/Bug1004.html
- utils/haddock/html-test/ref/Bug1033.html
- utils/haddock/html-test/ref/Bug1103.html
- utils/haddock/html-test/ref/Bug548.html
- utils/haddock/html-test/ref/Bug923.html
- utils/haddock/html-test/ref/ConstructorPatternExport.html
- utils/haddock/html-test/ref/FunArgs.html
- utils/haddock/html-test/ref/Instances.html
- utils/haddock/html-test/ref/LinearTypes.html
- utils/haddock/html-test/ref/RedactTypeSynonyms.html
- utils/haddock/html-test/ref/T23616.html
- utils/haddock/html-test/ref/Test.html
- utils/haddock/html-test/ref/TypeFamilies3.html
Changes:
=====================================
libraries/base/src/Data/Bool.hs
=====================================
@@ -24,4 +24,39 @@ module Data.Bool
bool
) where
-import GHC.Internal.Data.Bool
\ No newline at end of file
+import Prelude (Bool(..), (&&), (||), not, otherwise)
+
+-- $setup
+-- >>> import Prelude
+
+-- | Case analysis for the 'Bool' type. @'bool' f t p@ evaluates to @f@
+-- when @p@ is 'False', and evaluates to @t@ when @p@ is 'True'.
+--
+-- This is equivalent to @if p then t else f@; that is, one can
+-- think of it as an if-then-else construct with its arguments
+-- reordered.
+--
+-- @since base-4.7.0.0
+--
+-- ==== __Examples__
+--
+-- Basic usage:
+--
+-- >>> bool "foo" "bar" True
+-- "bar"
+-- >>> bool "foo" "bar" False
+-- "foo"
+--
+-- Confirm that @'bool' f t p@ and @if p then t else f@ are
+-- equivalent:
+--
+-- >>> let p = True; f = "bar"; t = "foo"
+-- >>> bool f t p == if p then t else f
+-- True
+-- >>> let p = False
+-- >>> bool f t p == if p then t else f
+-- True
+--
+bool :: a -> a -> Bool -> a
+bool f _ False = f
+bool _ t True = t
=====================================
libraries/base/src/Data/List.hs
=====================================
@@ -184,7 +184,7 @@ module Data.List
genericReplicate
) where
-import GHC.Internal.Data.Bool (otherwise)
+import Data.Bool (otherwise)
import GHC.Internal.Data.Function (const)
import GHC.Internal.Data.List
import GHC.Internal.Data.List.NonEmpty (NonEmpty(..))
=====================================
libraries/base/src/Data/List/NubOrdSet.hs
=====================================
@@ -11,7 +11,7 @@ module Data.List.NubOrdSet (
insert,
) where
-import GHC.Internal.Data.Bool (Bool(..))
+import Data.Bool (Bool(..))
import GHC.Internal.Data.Function ((.))
import GHC.Internal.Data.Ord (Ordering(..))
=====================================
libraries/ghc-internal/ghc-internal.cabal.in
=====================================
@@ -140,7 +140,6 @@ Library
GHC.Internal.Control.Monad.ST.Imp
GHC.Internal.Control.Monad.ST.Lazy.Imp
GHC.Internal.Data.Bits
- GHC.Internal.Data.Bool
GHC.Internal.Data.Coerce
GHC.Internal.Data.Data
GHC.Internal.Data.Dynamic
=====================================
libraries/ghc-internal/src/GHC/Internal/Data/Bool.hs deleted
=====================================
@@ -1,64 +0,0 @@
-{-# LANGUAGE Trustworthy #-}
-{-# LANGUAGE NoImplicitPrelude #-}
-
------------------------------------------------------------------------------
--- |
--- Module : GHC.Internal.Data.Bool
--- Copyright : (c) The University of Glasgow 2001
--- License : BSD-style (see the file libraries/base/LICENSE)
---
--- Maintainer : libraries(a)haskell.org
--- Stability : stable
--- Portability : portable
---
--- The 'Bool' type and related functions.
---
------------------------------------------------------------------------------
-
-module GHC.Internal.Data.Bool (
- -- * Booleans
- Bool(..),
- -- ** Operations
- (&&),
- (||),
- not,
- otherwise,
- bool,
- ) where
-
-import GHC.Internal.Base
-
--- $setup
--- >>> import Prelude
-
--- | Case analysis for the 'Bool' type. @'bool' f t p@ evaluates to @f@
--- when @p@ is 'False', and evaluates to @t@ when @p@ is 'True'.
---
--- This is equivalent to @if p then t else f@; that is, one can
--- think of it as an if-then-else construct with its arguments
--- reordered.
---
--- @since base-4.7.0.0
---
--- ==== __Examples__
---
--- Basic usage:
---
--- >>> bool "foo" "bar" True
--- "bar"
--- >>> bool "foo" "bar" False
--- "foo"
---
--- Confirm that @'bool' f t p@ and @if p then t else f@ are
--- equivalent:
---
--- >>> let p = True; f = "bar"; t = "foo"
--- >>> bool f t p == if p then t else f
--- True
--- >>> let p = False
--- >>> bool f t p == if p then t else f
--- True
---
-bool :: a -> a -> Bool -> a
-bool f _ False = f
-bool _ t True = t
=====================================
libraries/ghc-internal/src/GHC/Internal/Data/Foldable.hs
=====================================
@@ -50,7 +50,6 @@ module GHC.Internal.Data.Foldable (
find
) where
-import GHC.Internal.Data.Bool
import GHC.Internal.Data.Either
import GHC.Internal.Data.Eq
import GHC.Internal.Data.Functor.Utils (Max(..), Min(..), (#.))
=====================================
libraries/ghc-internal/src/GHC/Internal/Data/Function.hs
=====================================
@@ -30,8 +30,7 @@ module GHC.Internal.Data.Function
, applyWhen
) where
-import GHC.Internal.Base ( TYPE, ($), (.), id, const, flip )
-import GHC.Internal.Data.Bool ( Bool(..) )
+import GHC.Internal.Base ( TYPE, Bool(..), ($), (.), id, const, flip )
infixl 0 `on`
infixl 1 &
@@ -171,7 +170,7 @@ x & f = f x
-- | 'applyWhen' applies a function to a value if a condition is true,
-- otherwise, it returns the value unchanged.
--
--- It is equivalent to @'flip' ('GHC.Internal.Data.Bool.bool' 'id')@.
+-- It is equivalent to @'flip' ('Data.Bool.bool' 'id')@.
--
-- ==== __Examples__
--
=====================================
libraries/ghc-internal/src/GHC/Internal/Data/Type/Bool.hs
=====================================
@@ -1,7 +1,7 @@
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE PolyKinds #-}
-{-# LANGUAGE Safe #-}
+{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE TypeFamilyDependencies #-}
{-# LANGUAGE TypeOperators #-}
@@ -23,7 +23,7 @@ module GHC.Internal.Data.Type.Bool (
If, type (&&), type (||), Not
) where
-import GHC.Internal.Data.Bool
+import GHC.Internal.Base
-- This needs to be in base because (&&) is used in Data.Type.Equality.
-- The other functions do not need to be in base, but seemed to be appropriate
=====================================
libraries/ghc-internal/src/GHC/Internal/Data/Type/Ord.hs
=====================================
@@ -34,14 +34,11 @@ module GHC.Internal.Data.Type.Ord (
, OrdCond
) where
-import GHC.Internal.Show(Show(..))
+import GHC.Internal.Base
+import GHC.Internal.Show (Show(..))
import GHC.Internal.TypeError
import GHC.Internal.TypeLits.Internal
import GHC.Internal.TypeNats.Internal
-import GHC.Internal.Types (type (~), Char)
-import GHC.Internal.Data.Bool
-import GHC.Internal.Data.Eq
-import GHC.Internal.Data.Ord
-- | 'Compare' branches on the kind of its arguments to either compare by
-- 'Symbol' or 'Nat'.
=====================================
libraries/ghc-internal/src/GHC/Internal/Data/Version.hs
=====================================
@@ -37,13 +37,12 @@ module GHC.Internal.Data.Version (
) where
import GHC.Internal.Data.Functor ( Functor(..) )
-import GHC.Internal.Data.Bool ( (&&) )
import GHC.Internal.Data.Eq
import GHC.Internal.Int ( Int )
import GHC.Internal.Data.List ( map, sort, concat, concatMap, intersperse, (++) )
import GHC.Internal.Data.Ord
import GHC.Internal.Data.String ( String )
-import GHC.Internal.Base ( Applicative(..) )
+import GHC.Internal.Base ( Applicative(..), (&&) )
import GHC.Internal.Generics
import GHC.Internal.Unicode ( isDigit, isAlphaNum )
import GHC.Internal.Read
=====================================
libraries/ghc-internal/src/GHC/Internal/IO/FD.hs
=====================================
@@ -49,7 +49,6 @@ import GHC.Internal.Conc.IO
import GHC.Internal.IO.Exception
#if defined(mingw32_HOST_OS)
import GHC.Internal.Windows
-import GHC.Internal.Data.Bool
import GHC.Internal.IO.SubSystem ((<!>))
import GHC.Internal.Foreign.Storable
#endif
@@ -717,7 +716,7 @@ asyncReadRawBufferPtr loc !fd !buf !off !len = do
if l == (-1)
then let sock_errno = c_maperrno_func (fromIntegral rc)
non_sock_errno = Errno (fromIntegral rc)
- errno = bool non_sock_errno sock_errno (fdIsSocket fd)
+ errno = if fdIsSocket fd then sock_errno else non_sock_errno
in ioError (errnoToIOError loc errno Nothing Nothing)
else return (fromIntegral l)
@@ -728,7 +727,7 @@ asyncWriteRawBufferPtr loc !fd !buf !off !len = do
if l == (-1)
then let sock_errno = c_maperrno_func (fromIntegral rc)
non_sock_errno = Errno (fromIntegral rc)
- errno = bool non_sock_errno sock_errno (fdIsSocket fd)
+ errno = if fdIsSocket fd then sock_errno else non_sock_errno
in ioError (errnoToIOError loc errno Nothing Nothing)
else return (fromIntegral l)
@@ -740,7 +739,7 @@ blockingReadRawBufferPtr loc !fd !buf !off !len
let start_ptr = buf `plusPtr` off
recv_ret = c_safe_recv (fdFD fd) start_ptr (fromIntegral len) 0
read_ret = c_safe_read (fdFD fd) start_ptr (fromIntegral len)
- r <- bool read_ret recv_ret (fdIsSocket fd)
+ r <- if fdIsSocket fd then recv_ret else read_ret
when ((fdIsSocket fd) && (r == -1)) c_maperrno
return r
-- We trust read() to give us the correct errno but recv(), as a
@@ -753,7 +752,7 @@ blockingWriteRawBufferPtr loc !fd !buf !off !len
let start_ptr = buf `plusPtr` off
send_ret = c_safe_send (fdFD fd) start_ptr (fromIntegral len) 0
write_ret = c_safe_write (fdFD fd) start_ptr (fromIntegral len)
- r <- bool write_ret send_ret (fdIsSocket fd)
+ r <- if fdIsSocket fd then send_ret else write_ret
when (r == -1) c_maperrno
return r
-- We don't trust write() to give us the correct errno, and
=====================================
libraries/ghc-internal/src/GHC/Internal/JS/Prim.hs
=====================================
@@ -46,7 +46,6 @@ import GHC.Internal.Types
import qualified GHC.Internal.Exception as Ex
import qualified GHC.Internal.CString as GHC
import GHC.Internal.IO
-import GHC.Internal.Data.Bool
import GHC.Internal.Base
import GHC.Internal.Show
=====================================
libraries/ghc-internal/src/GHC/Internal/System/IO/OS.hs
=====================================
@@ -1,4 +1,4 @@
-{-# LANGUAGE Safe #-}
+{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE RankNTypes #-}
@@ -23,14 +23,12 @@ module GHC.Internal.System.IO.OS
)
where
+import GHC.Internal.Base
import GHC.Internal.Control.Monad (return)
import GHC.Internal.Control.Concurrent.MVar (MVar)
import GHC.Internal.Control.Exception (mask)
import GHC.Internal.Data.Function (const, (.), ($))
import GHC.Internal.Data.Functor (fmap)
-#if defined(mingw32_HOST_OS)
-import GHC.Internal.Data.Bool (otherwise)
-#endif
import GHC.Internal.Data.Maybe (Maybe (Nothing), maybe)
#if defined(mingw32_HOST_OS)
import GHC.Internal.Data.Maybe (Maybe (Just))
=====================================
libraries/ghc-internal/src/GHC/Internal/TH/Lift.hs
=====================================
@@ -34,7 +34,6 @@ import GHC.Internal.TH.Monad
import qualified GHC.Internal.TH.Lib as Lib (litE) -- See wrinkle (W4) of Note [Tracking dependencies on primitives]
import GHC.Internal.Data.Either
-import GHC.Internal.Data.Bool
import GHC.Internal.Base hiding (NonEmpty(..), Type, Module, inline)
import GHC.Internal.Data.NonEmpty (NonEmpty(..))
import GHC.Internal.Integer
=====================================
libraries/ghc-internal/src/GHC/Internal/TypeError.hs
=====================================
@@ -31,8 +31,7 @@ module GHC.Internal.TypeError
, Unsatisfiable, unsatisfiable
) where
-import GHC.Internal.Data.Bool
-import GHC.Internal.Types (TYPE, Constraint, Symbol)
+import GHC.Internal.Types (TYPE, Bool(True), Constraint, Symbol)
{- Note [Custom type errors]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
=====================================
utils/haddock/html-test/ref/A.html
=====================================
@@ -70,7 +70,7 @@
><li class="src short"
><a href="#"
>test2</a
- > :: <a href="#" title="Data.Bool"
+ > :: <a href="#" title="GHC.Exts"
>Bool</a
></li
><li class="src short"
@@ -131,7 +131,7 @@
><p class="src"
><a id="v:test2" class="def"
>test2</a
- > :: <a href="#" title="Data.Bool"
+ > :: <a href="#" title="GHC.Exts"
>Bool</a
> <a href="#" class="selflink"
>#</a
=====================================
utils/haddock/html-test/ref/Bug1004.html
=====================================
@@ -210,7 +210,7 @@
>D1</a
> ('<a href="#" title="GHC.Generics"
>MetaData</a
- > "Product" "Data.Functor.Product" "base" '<a href="#" title="Data.Bool"
+ > "Product" "Data.Functor.Product" "base" '<a href="#" title="GHC.Exts"
>False</a
>) (<a href="#" title="GHC.Generics"
>C1</a
@@ -218,7 +218,7 @@
>MetaCons</a
> "Pair" '<a href="#" title="GHC.Generics"
>PrefixI</a
- > '<a href="#" title="Data.Bool"
+ > '<a href="#" title="GHC.Exts"
>False</a
>) (<a href="#" title="GHC.Generics"
>S1</a
@@ -505,13 +505,13 @@
><p class="src"
><a href="#"
>liftEq</a
- > :: (a -> b -> <a href="#" title="Data.Bool"
+ > :: (a -> b -> <a href="#" title="GHC.Exts"
>Bool</a
>) -> <a href="#" title="Bug1004"
>Product</a
> f g a -> <a href="#" title="Bug1004"
>Product</a
- > f g b -> <a href="#" title="Data.Bool"
+ > f g b -> <a href="#" title="GHC.Exts"
>Bool</a
> <a href="#" class="selflink"
>#</a
@@ -1553,7 +1553,7 @@
>null</a
> :: <a href="#" title="Bug1004"
>Product</a
- > f g a -> <a href="#" title="Data.Bool"
+ > f g a -> <a href="#" title="GHC.Exts"
>Bool</a
> <a href="#" class="selflink"
>#</a
@@ -1575,7 +1575,7 @@
>Eq</a
> a => a -> <a href="#" title="Bug1004"
>Product</a
- > f g a -> <a href="#" title="Data.Bool"
+ > f g a -> <a href="#" title="GHC.Exts"
>Bool</a
> <a href="#" class="selflink"
>#</a
@@ -1983,7 +1983,7 @@
>Product</a
> f g a -> <a href="#" title="Bug1004"
>Product</a
- > f g a -> <a href="#" title="Data.Bool"
+ > f g a -> <a href="#" title="GHC.Exts"
>Bool</a
> <a href="#" class="selflink"
>#</a
@@ -1995,7 +1995,7 @@
>Product</a
> f g a -> <a href="#" title="Bug1004"
>Product</a
- > f g a -> <a href="#" title="Data.Bool"
+ > f g a -> <a href="#" title="GHC.Exts"
>Bool</a
> <a href="#" class="selflink"
>#</a
@@ -2065,7 +2065,7 @@
>Product</a
> f g a -> <a href="#" title="Bug1004"
>Product</a
- > f g a -> <a href="#" title="Data.Bool"
+ > f g a -> <a href="#" title="GHC.Exts"
>Bool</a
> <a href="#" class="selflink"
>#</a
@@ -2077,7 +2077,7 @@
>Product</a
> f g a -> <a href="#" title="Bug1004"
>Product</a
- > f g a -> <a href="#" title="Data.Bool"
+ > f g a -> <a href="#" title="GHC.Exts"
>Bool</a
> <a href="#" class="selflink"
>#</a
@@ -2089,7 +2089,7 @@
>Product</a
> f g a -> <a href="#" title="Bug1004"
>Product</a
- > f g a -> <a href="#" title="Data.Bool"
+ > f g a -> <a href="#" title="GHC.Exts"
>Bool</a
> <a href="#" class="selflink"
>#</a
@@ -2101,7 +2101,7 @@
>Product</a
> f g a -> <a href="#" title="Bug1004"
>Product</a
- > f g a -> <a href="#" title="Data.Bool"
+ > f g a -> <a href="#" title="GHC.Exts"
>Bool</a
> <a href="#" class="selflink"
>#</a
@@ -2471,7 +2471,7 @@
>D1</a
> ('<a href="#" title="GHC.Generics"
>MetaData</a
- > "Product" "Data.Functor.Product" "base" '<a href="#" title="Data.Bool"
+ > "Product" "Data.Functor.Product" "base" '<a href="#" title="GHC.Exts"
>False</a
>) (<a href="#" title="GHC.Generics"
>C1</a
@@ -2479,7 +2479,7 @@
>MetaCons</a
> "Pair" '<a href="#" title="GHC.Generics"
>PrefixI</a
- > '<a href="#" title="Data.Bool"
+ > '<a href="#" title="GHC.Exts"
>False</a
>) (<a href="#" title="GHC.Generics"
>S1</a
@@ -2768,7 +2768,7 @@
>D1</a
> ('<a href="#" title="GHC.Generics"
>MetaData</a
- > "Product" "Data.Functor.Product" "base" '<a href="#" title="Data.Bool"
+ > "Product" "Data.Functor.Product" "base" '<a href="#" title="GHC.Exts"
>False</a
>) (<a href="#" title="GHC.Generics"
>C1</a
@@ -2776,7 +2776,7 @@
>MetaCons</a
> "Pair" '<a href="#" title="GHC.Generics"
>PrefixI</a
- > '<a href="#" title="Data.Bool"
+ > '<a href="#" title="GHC.Exts"
>False</a
>) (<a href="#" title="GHC.Generics"
>S1</a
@@ -2862,7 +2862,7 @@
>D1</a
> ('<a href="#" title="GHC.Generics"
>MetaData</a
- > "Product" "Data.Functor.Product" "base" '<a href="#" title="Data.Bool"
+ > "Product" "Data.Functor.Product" "base" '<a href="#" title="GHC.Exts"
>False</a
>) (<a href="#" title="GHC.Generics"
>C1</a
@@ -2870,7 +2870,7 @@
>MetaCons</a
> "Pair" '<a href="#" title="GHC.Generics"
>PrefixI</a
- > '<a href="#" title="Data.Bool"
+ > '<a href="#" title="GHC.Exts"
>False</a
>) (<a href="#" title="GHC.Generics"
>S1</a
=====================================
utils/haddock/html-test/ref/Bug1033.html
=====================================
@@ -148,7 +148,7 @@
>D1</a
> ('<a href="#" title="GHC.Generics"
>MetaData</a
- > "Foo" "Bug1033" "main" '<a href="#" title="Data.Bool"
+ > "Foo" "Bug1033" "main" '<a href="#" title="GHC.Exts"
>False</a
>) (<a href="#" title="GHC.Generics"
>C1</a
@@ -156,7 +156,7 @@
>MetaCons</a
> "Foo" '<a href="#" title="GHC.Generics"
>PrefixI</a
- > '<a href="#" title="Data.Bool"
+ > '<a href="#" title="GHC.Exts"
>False</a
>) (<a href="#" title="GHC.Generics"
>U1</a
@@ -241,7 +241,7 @@
>D1</a
> ('<a href="#" title="GHC.Generics"
>MetaData</a
- > "Foo" "Bug1033" "main" '<a href="#" title="Data.Bool"
+ > "Foo" "Bug1033" "main" '<a href="#" title="GHC.Exts"
>False</a
>) (<a href="#" title="GHC.Generics"
>C1</a
@@ -249,7 +249,7 @@
>MetaCons</a
> "Foo" '<a href="#" title="GHC.Generics"
>PrefixI</a
- > '<a href="#" title="Data.Bool"
+ > '<a href="#" title="GHC.Exts"
>False</a
>) (<a href="#" title="GHC.Generics"
>U1</a
=====================================
utils/haddock/html-test/ref/Bug1103.html
=====================================
@@ -80,7 +80,7 @@
>data</span
> <a href="#" title="Bug1103"
>Foo1</a
- > <a href="#" title="Data.Bool"
+ > <a href="#" title="GHC.Exts"
>Bool</a
></span
> <a href="#" class="selflink"
@@ -103,7 +103,7 @@
>data</span
> <a href="#" title="Bug1103"
>Foo1</a
- > <a href="#" title="Data.Bool"
+ > <a href="#" title="GHC.Exts"
>Bool</a
> = <a id="v:Foo1Bool" class="def"
>Foo1Bool</a
@@ -218,7 +218,7 @@
>data</span
> <a href="#" title="Bug1103"
>Foo2</a
- > <a href="#" title="Data.Bool"
+ > <a href="#" title="GHC.Exts"
>Bool</a
></span
> <a href="#" class="selflink"
@@ -241,7 +241,7 @@
>data</span
> <a href="#" title="Bug1103"
>Foo2</a
- > <a href="#" title="Data.Bool"
+ > <a href="#" title="GHC.Exts"
>Bool</a
> = <a id="v:Foo2Bool" class="def"
>Foo2Bool</a
@@ -476,7 +476,7 @@
>data</span
> <a href="#" title="Bug1103"
>Foo3</a
- > <a href="#" title="Data.Bool"
+ > <a href="#" title="GHC.Exts"
>Bool</a
></span
> <a href="#" class="selflink"
@@ -499,7 +499,7 @@
>data</span
> <a href="#" title="Bug1103"
>Foo3</a
- > <a href="#" title="Data.Bool"
+ > <a href="#" title="GHC.Exts"
>Bool</a
> = <a id="v:Foo3Bool" class="def"
>Foo3Bool</a
=====================================
utils/haddock/html-test/ref/Bug548.html
=====================================
@@ -186,7 +186,7 @@
>D1</a
> ('<a href="#" title="GHC.Generics"
>MetaData</a
- > "WrappedArrow" "Control.Applicative" "base" '<a href="#" title="Data.Bool"
+ > "WrappedArrow" "Control.Applicative" "base" '<a href="#" title="GHC.Exts"
>True</a
>) (<a href="#" title="GHC.Generics"
>C1</a
@@ -194,7 +194,7 @@
>MetaCons</a
> "WrapArrow" '<a href="#" title="GHC.Generics"
>PrefixI</a
- > '<a href="#" title="Data.Bool"
+ > '<a href="#" title="GHC.Exts"
>True</a
>) (<a href="#" title="GHC.Generics"
>S1</a
@@ -814,7 +814,7 @@
>D1</a
> ('<a href="#" title="GHC.Generics"
>MetaData</a
- > "WrappedArrow" "Control.Applicative" "base" '<a href="#" title="Data.Bool"
+ > "WrappedArrow" "Control.Applicative" "base" '<a href="#" title="GHC.Exts"
>True</a
>) (<a href="#" title="GHC.Generics"
>C1</a
@@ -822,7 +822,7 @@
>MetaCons</a
> "WrapArrow" '<a href="#" title="GHC.Generics"
>PrefixI</a
- > '<a href="#" title="Data.Bool"
+ > '<a href="#" title="GHC.Exts"
>True</a
>) (<a href="#" title="GHC.Generics"
>S1</a
@@ -925,7 +925,7 @@
>D1</a
> ('<a href="#" title="GHC.Generics"
>MetaData</a
- > "WrappedArrow" "Control.Applicative" "base" '<a href="#" title="Data.Bool"
+ > "WrappedArrow" "Control.Applicative" "base" '<a href="#" title="GHC.Exts"
>True</a
>) (<a href="#" title="GHC.Generics"
>C1</a
@@ -933,7 +933,7 @@
>MetaCons</a
> "WrapArrow" '<a href="#" title="GHC.Generics"
>PrefixI</a
- > '<a href="#" title="Data.Bool"
+ > '<a href="#" title="GHC.Exts"
>True</a
>) (<a href="#" title="GHC.Generics"
>S1</a
@@ -995,7 +995,7 @@
>D1</a
> ('<a href="#" title="GHC.Generics"
>MetaData</a
- > "WrappedArrow" "Control.Applicative" "base" '<a href="#" title="Data.Bool"
+ > "WrappedArrow" "Control.Applicative" "base" '<a href="#" title="GHC.Exts"
>True</a
>) (<a href="#" title="GHC.Generics"
>C1</a
@@ -1003,7 +1003,7 @@
>MetaCons</a
> "WrapArrow" '<a href="#" title="GHC.Generics"
>PrefixI</a
- > '<a href="#" title="Data.Bool"
+ > '<a href="#" title="GHC.Exts"
>True</a
>) (<a href="#" title="GHC.Generics"
>S1</a
=====================================
utils/haddock/html-test/ref/Bug923.html
=====================================
@@ -202,7 +202,7 @@
>Type</a
>, <a href="#" title="Data.Kind"
>Type</a
- >)) -> <a href="#" title="Data.Bool"
+ >)) -> <a href="#" title="GHC.Exts"
>Bool</a
> <a href="#" class="selflink"
>#</a
@@ -226,7 +226,7 @@
>Type</a
>, <a href="#" title="Data.Kind"
>Type</a
- >)) -> <a href="#" title="Data.Bool"
+ >)) -> <a href="#" title="GHC.Exts"
>Bool</a
> <a href="#" class="selflink"
>#</a
=====================================
utils/haddock/html-test/ref/ConstructorPatternExport.html
=====================================
@@ -69,7 +69,7 @@
>pattern</span
> <a id="v:MyRecCons" class="def"
>MyRecCons</a
- > :: <a href="#" title="Data.Bool"
+ > :: <a href="#" title="GHC.Exts"
>Bool</a
> -> <a href="#" title="Data.Int"
>Int</a
=====================================
utils/haddock/html-test/ref/FunArgs.html
=====================================
@@ -90,7 +90,7 @@
></tr
><tr
><td class="src"
- >-> <a href="#" title="Data.Bool"
+ >-> <a href="#" title="GHC.Exts"
>Bool</a
></td
><td class="doc"
=====================================
utils/haddock/html-test/ref/Instances.html
=====================================
@@ -682,7 +682,7 @@
><p class="src"
><a id="v:bar" class="def"
>bar</a
- > :: f a -> f <a href="#" title="Data.Bool"
+ > :: f a -> f <a href="#" title="GHC.Exts"
>Bool</a
> -> a <a href="#" class="selflink"
>#</a
@@ -722,7 +722,7 @@
>Bar</a
> <a href="#" title="Data.Maybe"
>Maybe</a
- > <a href="#" title="Data.Bool"
+ > <a href="#" title="GHC.Exts"
>Bool</a
></span
> <a href="#" class="selflink"
@@ -748,13 +748,13 @@
>bar</a
> :: <a href="#" title="Data.Maybe"
>Maybe</a
- > <a href="#" title="Data.Bool"
+ > <a href="#" title="GHC.Exts"
>Bool</a
> -> <a href="#" title="Data.Maybe"
>Maybe</a
- > <a href="#" title="Data.Bool"
+ > <a href="#" title="GHC.Exts"
>Bool</a
- > -> <a href="#" title="Data.Bool"
+ > -> <a href="#" title="GHC.Exts"
>Bool</a
> <a href="#" class="selflink"
>#</a
@@ -766,7 +766,7 @@
>Maybe</a
> (<a href="#" title="Data.Maybe"
>Maybe</a
- > <a href="#" title="Data.Bool"
+ > <a href="#" title="GHC.Exts"
>Bool</a
>) -> <a href="#" title="Data.Maybe"
>Maybe</a
@@ -782,11 +782,11 @@
>bar0</a
> :: (<a href="#" title="Data.Maybe"
>Maybe</a
- > <a href="#" title="Data.Bool"
+ > <a href="#" title="GHC.Exts"
>Bool</a
>, <a href="#" title="Data.Maybe"
>Maybe</a
- > <a href="#" title="Data.Bool"
+ > <a href="#" title="GHC.Exts"
>Bool</a
>) -> (<a href="#" title="Data.Maybe"
>Maybe</a
@@ -800,11 +800,11 @@
>bar1</a
> :: (<a href="#" title="Data.Maybe"
>Maybe</a
- > <a href="#" title="Data.Bool"
+ > <a href="#" title="GHC.Exts"
>Bool</a
>, <a href="#" title="Data.Maybe"
>Maybe</a
- > <a href="#" title="Data.Bool"
+ > <a href="#" title="GHC.Exts"
>Bool</a
>) -> (<a href="#" title="Data.Maybe"
>Maybe</a
@@ -852,7 +852,7 @@
>Maybe</a
> [a] -> <a href="#" title="Data.Maybe"
>Maybe</a
- > <a href="#" title="Data.Bool"
+ > <a href="#" title="GHC.Exts"
>Bool</a
> -> [a] <a href="#" class="selflink"
>#</a
@@ -936,7 +936,7 @@
><p class="src"
><a href="#"
>bar</a
- > :: [(a, a)] -> [<a href="#" title="Data.Bool"
+ > :: [(a, a)] -> [<a href="#" title="GHC.Exts"
>Bool</a
>] -> (a, a) <a href="#" class="selflink"
>#</a
@@ -1000,7 +1000,7 @@
>Either</a
> a (f a) -> <a href="#" title="Data.Either"
>Either</a
- > a <a href="#" title="Data.Bool"
+ > a <a href="#" title="GHC.Exts"
>Bool</a
> -> f a <a href="#" class="selflink"
>#</a
@@ -1092,7 +1092,7 @@
>Quux</a
> a b c) -> <a href="#" title="Instances"
>Quux</a
- > a c <a href="#" title="Data.Bool"
+ > a c <a href="#" title="GHC.Exts"
>Bool</a
> -> <a href="#" title="Instances"
>Quux</a
@@ -1188,7 +1188,7 @@
><p class="src"
><a href="#"
>bar</a
- > :: (a, b, (a, b, a)) -> (a, b, <a href="#" title="Data.Bool"
+ > :: (a, b, (a, b, a)) -> (a, b, <a href="#" title="GHC.Exts"
>Bool</a
>) -> (a, b, a) <a href="#" class="selflink"
>#</a
@@ -1754,7 +1754,7 @@
>Quux</a
> a b c) -> <a href="#" title="Instances"
>Quux</a
- > a c <a href="#" title="Data.Bool"
+ > a c <a href="#" title="GHC.Exts"
>Bool</a
> -> <a href="#" title="Instances"
>Quux</a
@@ -2020,7 +2020,7 @@
>Norf</a
> <a href="#" title="Data.Int"
>Int</a
- > <a href="#" title="Data.Bool"
+ > <a href="#" title="GHC.Exts"
>Bool</a
></span
> <a href="#" class="selflink"
@@ -2053,7 +2053,7 @@
>Plugh</a
> <a href="#" title="Data.Int"
>Int</a
- > (a, b) <a href="#" title="Data.Bool"
+ > (a, b) <a href="#" title="GHC.Exts"
>Bool</a
></span
></td
@@ -2076,7 +2076,7 @@
>Plugh</a
> <a href="#" title="Data.Int"
>Int</a
- > (a, b) <a href="#" title="Data.Bool"
+ > (a, b) <a href="#" title="GHC.Exts"
>Bool</a
> = (a, [b])</div
></details
@@ -2093,7 +2093,7 @@
>Plugh</a
> <a href="#" title="Data.Int"
>Int</a
- > [a] <a href="#" title="Data.Bool"
+ > [a] <a href="#" title="GHC.Exts"
>Bool</a
></span
></td
@@ -2116,7 +2116,7 @@
>Plugh</a
> <a href="#" title="Data.Int"
>Int</a
- > [a] <a href="#" title="Data.Bool"
+ > [a] <a href="#" title="GHC.Exts"
>Bool</a
> = a</div
></details
@@ -2156,7 +2156,7 @@
>Int</a
> [a] = <a id="v:Thuuuud" class="def"
>Thuuuud</a
- > <a href="#" title="Data.Bool"
+ > <a href="#" title="GHC.Exts"
>Bool</a
></div
></details
@@ -2228,13 +2228,13 @@
>Plugh</a
> <a href="#" title="Data.Int"
>Int</a
- > c <a href="#" title="Data.Bool"
+ > c <a href="#" title="GHC.Exts"
>Bool</a
> -> <a href="#" title="Data.Int"
>Int</a
> -> (<a href="#" title="Data.Int"
>Int</a
- > -> c) -> <a href="#" title="Data.Bool"
+ > -> c) -> <a href="#" title="GHC.Exts"
>Bool</a
> <a href="#" class="selflink"
>#</a
=====================================
utils/haddock/html-test/ref/LinearTypes.html
=====================================
@@ -98,7 +98,7 @@
><li
><a href="#"
>noC</a
- > :: <a href="#" title="Data.Bool"
+ > :: <a href="#" title="GHC.Exts"
>Bool</a
></li
></ul
@@ -236,7 +236,7 @@
><dfn class="src"
><a id="v:noC" class="def"
>noC</a
- > :: <a href="#" title="Data.Bool"
+ > :: <a href="#" title="GHC.Exts"
>Bool</a
></dfn
><div class="doc empty"
@@ -324,7 +324,7 @@
><dfn class="src"
> , <a id="v:noG" class="def"
>noG</a
- > :: <a href="#" title="Data.Bool"
+ > :: <a href="#" title="GHC.Exts"
>Bool</a
></dfn
><div class="doc empty"
=====================================
utils/haddock/html-test/ref/RedactTypeSynonyms.html
=====================================
@@ -90,7 +90,7 @@
><li class="src short"
><a href="#"
>exportedFn</a
- > :: <a href="#" title="Data.Bool"
+ > :: <a href="#" title="GHC.Exts"
>Bool</a
> -> AlsoHidden</li
></ul
@@ -188,7 +188,7 @@
><p class="src"
><a id="v:exportedFn" class="def"
>exportedFn</a
- > :: <a href="#" title="Data.Bool"
+ > :: <a href="#" title="GHC.Exts"
>Bool</a
> -> AlsoHidden <a href="#" class="selflink"
>#</a
=====================================
utils/haddock/html-test/ref/T23616.html
=====================================
@@ -51,7 +51,7 @@
>null</a
> :: <a href="#" title="Data.Foldable"
>Foldable</a
- > t => t a -> <a href="#" title="Data.Bool"
+ > t => t a -> <a href="#" title="GHC.Exts"
>Bool</a
> <a href="#" class="selflink"
>#</a
=====================================
utils/haddock/html-test/ref/Test.html
=====================================
@@ -427,9 +427,9 @@
>Int</a
> -> <a href="#" title="Test"
>T3</a
- > <a href="#" title="Data.Bool"
+ > <a href="#" title="GHC.Exts"
>Bool</a
- > <a href="#" title="Data.Bool"
+ > <a href="#" title="GHC.Exts"
>Bool</a
> -> <a href="#" title="Test"
>T4</a
@@ -649,9 +649,9 @@
>Int</a
> -> (<a href="#" title="Test"
>T3</a
- > <a href="#" title="Data.Bool"
+ > <a href="#" title="GHC.Exts"
>Bool</a
- > <a href="#" title="Data.Bool"
+ > <a href="#" title="GHC.Exts"
>Bool</a
> -> <a href="#" title="Test"
>T4</a
@@ -1450,9 +1450,9 @@
>Int</a
> -> <a href="#" title="Test"
>T3</a
- > <a href="#" title="Data.Bool"
+ > <a href="#" title="GHC.Exts"
>Bool</a
- > <a href="#" title="Data.Bool"
+ > <a href="#" title="GHC.Exts"
>Bool</a
> -> <a href="#" title="Test"
>T4</a
@@ -2235,9 +2235,9 @@ is at the beginning of the line).</pre
><td class="src"
>-> (<a href="#" title="Test"
>T3</a
- > <a href="#" title="Data.Bool"
+ > <a href="#" title="GHC.Exts"
>Bool</a
- > <a href="#" title="Data.Bool"
+ > <a href="#" title="GHC.Exts"
>Bool</a
> -> <a href="#" title="Test"
>T4</a
=====================================
utils/haddock/html-test/ref/TypeFamilies3.html
=====================================
@@ -351,7 +351,7 @@
>Int</a
> = <a id="v:Baz2" class="def"
>Baz2</a
- > <a href="#" title="Data.Bool"
+ > <a href="#" title="GHC.Exts"
>Bool</a
></div
></details
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/7a308655096be1418291b9e5e067418…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/7a308655096be1418291b9e5e067418…
You're receiving this email because of your account on gitlab.haskell.org.
1
0
[Git][ghc/ghc] Pushed new branch wip/jeltsch/control-monad-zip-to-base
by Wolfgang Jeltsch (@jeltsch) 17 Feb '26
by Wolfgang Jeltsch (@jeltsch) 17 Feb '26
17 Feb '26
Wolfgang Jeltsch pushed new branch wip/jeltsch/control-monad-zip-to-base at Glasgow Haskell Compiler / GHC
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/jeltsch/control-monad-zip-to-…
You're receiving this email because of your account on gitlab.haskell.org.
1
0
[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 3 commits: Hide implementation details from base exception stack traces
by Marge Bot (@marge-bot) 17 Feb '26
by Marge Bot (@marge-bot) 17 Feb '26
17 Feb '26
Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC
Commits:
016f79d5 by fendor at 2026-02-17T09:16:16-05:00
Hide implementation details from base exception stack traces
Ensure we hide the implementation details of the exception throwing mechanisms:
* `undefined`
* `throwSTM`
* `throw`
* `throwIO`
* `error`
The `HasCallStackBacktrace` should always have a length of exactly 1,
not showing internal implementation details in the stack trace, as these
are vastly distracting to end users.
CLC proposal [#387](https://github.com/haskell/core-libraries-committee/issues/387)
- - - - -
3f842bf4 by Brian J. Cardiff at 2026-02-17T13:53:45-05:00
configure: Accept happy-2.2
In Jan 2026 happy-2.2 was released. The most sensible change is https://github.com/haskell/happy/issues/335 which didn't trigger in a fresh build
- - - - -
45987fce by Duncan Coutts at 2026-02-17T13:53:47-05:00
Fix errors in the documentation of the eventlog STOP_THREAD status codes
Fix the code for BlockedOnMsgThrowTo.
Document all the known historical warts.
Fixes issue #26867
- - - - -
29 changed files:
- docs/users_guide/eventlog-formats.rst
- libraries/base/changelog.md
- libraries/ghc-internal/src/GHC/Internal/Exception.hs
- libraries/ghc-internal/src/GHC/Internal/STM.hs
- + libraries/ghc-internal/tests/backtraces/T15395.hs
- + libraries/ghc-internal/tests/backtraces/T15395.stdout
- libraries/ghc-internal/tests/backtraces/all.T
- libraries/ghc-internal/tests/stack-annotation/ann_frame005.stdout
- m4/fptools_happy.m4
- testsuite/tests/arrows/should_compile/T21301.stderr
- testsuite/tests/deSugar/should_fail/DsStrictFail.stderr
- testsuite/tests/deSugar/should_run/T20024.stderr
- testsuite/tests/deSugar/should_run/dsrun005.stderr
- testsuite/tests/deSugar/should_run/dsrun007.stderr
- testsuite/tests/deSugar/should_run/dsrun008.stderr
- testsuite/tests/deriving/should_run/T9576.stderr
- testsuite/tests/ghci/scripts/Defer02.stderr
- testsuite/tests/ghci/scripts/T15325.stderr
- testsuite/tests/patsyn/should_run/ghci.stderr
- testsuite/tests/quotes/LiftErrMsgDefer.stderr
- testsuite/tests/safeHaskell/safeLanguage/SafeLang15.stderr
- testsuite/tests/type-data/should_run/T22332a.stderr
- testsuite/tests/typecheck/should_run/T10284.stderr
- testsuite/tests/typecheck/should_run/T13838.stderr
- testsuite/tests/typecheck/should_run/T9497a-run.stderr
- testsuite/tests/typecheck/should_run/T9497b-run.stderr
- testsuite/tests/typecheck/should_run/T9497c-run.stderr
- testsuite/tests/unsatisfiable/T23816.stderr
- testsuite/tests/unsatisfiable/UnsatDefer.stderr
Changes:
=====================================
docs/users_guide/eventlog-formats.rst
=====================================
@@ -221,14 +221,41 @@ Thread and scheduling events
* 11: BlockedOnDelay
* 12: BlockedOnSTM
* 13: BlockedOnDoProc
- * 16: BlockedOnMsgThrowTo
+ * 14--17: unused
+ * 18: BlockedOnMsgThrowTo
+ * 19: unused
* 20: BlockedOnMVarRead
:field ThreadId: thread id of thread being blocked on (only for some status
values)
The indicated thread has stopped running for the reason given by ``status``.
-
+
+ Historically, the GHC-internal status codes for the reasons why threads are
+ blocked were used more-or-less directly as the status codes emitted into the
+ eventlog. This is now recognised as a mistake and the GHC internal codes and
+ these eventlog stop thread codes are now independent. We are nevertheless
+ left with some historical warts:
+
+ * 14,15: these correspond to GHC internal status codes `BlockedOnGA` and
+ `BlockedOnGA_NoSend` that are no longer used (and may never have been
+ used by any released version of GHC).
+ * 16,17: these would be used by `BlockedOnCCall` and
+ `BlockedOnCCall_Interruptible` which are GHC-internal status codes, but
+ these are never and have never been emitted into the eventlog. This has
+ caused confusion, and many versions of the `ghc-events` package support
+ these status codes. Threads blocking on foreign calls use `ForeignCall`
+ above.
+ * 19: this would be used by `ThreadMigrating` which is a GHC-internal
+ status code, but this is never emitted into the eventlog. Threads
+ migrating use a separate event `MIGRATE_THREAD`.
+ * `BlockedOnMsgGlobalise`: this is supported by versions of `ghc-events` as
+ code 18, but it appears never to have been emitted by any released version
+ of GHC. Most likely it was related to the local-heap GC experiment that
+ was never released.
+
+ Errata: previous versions of this document stated that code 16 is
+ `BlockedOnMsgThrowTo`. It appears this was always incorrect.
.. event-type:: MIGRATE_THREAD
=====================================
libraries/base/changelog.md
=====================================
@@ -25,6 +25,7 @@
* Export `labelThread` from `Control.Concurrent`.([CLC proposal #376](https://github.com/haskell/core-libraries-committee/issues/376))
* Add a new module `System.IO.OS` with operations for obtaining operating-system handles (file descriptors, Windows handles). ([CLC proposal #369](https://github.com/haskell/core-libraries-committee/issues/369))
* Evaluate backtraces for "error" exceptions at the moment they are thrown. ([CLC proposal #383](https://github.com/haskell/core-libraries-committee/issues/383))
+ * Hide implementation details when throwing exceptions in throw and throwSTM. ([CLC proposal #387](https://github.com/haskell/core-libraries-committee/issues/387))
## 4.22.0.0 *TBA*
* Shipped with GHC 9.14.1
=====================================
libraries/ghc-internal/src/GHC/Internal/Exception.hs
=====================================
@@ -87,7 +87,7 @@ throw e =
-- Note also the absolutely crucial `noinine` in the RHS!
-- See Note [Hiding precise exception signature in throw]
let se :: SomeException
- !se = noinline (unsafePerformIO (toExceptionWithBacktrace e))
+ !se = noinline (unsafePerformIO (withFrozenCallStack $ toExceptionWithBacktrace e))
in raise# se
-- Note [Capturing the backtrace in throw]
@@ -162,7 +162,12 @@ throw e =
-- primops which allow more precise guidance of the demand analyser's heuristic
-- (e.g. #23847).
--- | @since base-4.20.0.0
+-- | Collect a Backtrace and attach it to the 'Exception'.
+--
+-- It is recommended to use 'withFrozenCallStack' when calling this function
+-- in order to avoid leaking implementation details of 'toExceptionWithBacktrace'.
+--
+-- @since base-4.20.0.0
toExceptionWithBacktrace :: (HasCallStack, Exception e)
=> e -> IO SomeException
toExceptionWithBacktrace e
=====================================
libraries/ghc-internal/src/GHC/Internal/STM.hs
=====================================
@@ -28,7 +28,7 @@ import GHC.Internal.Base
import GHC.Internal.Exception (Exception, toExceptionWithBacktrace, fromException, addExceptionContext)
import GHC.Internal.Exception.Context (ExceptionAnnotation)
import GHC.Internal.Exception.Type (WhileHandling(..))
-import GHC.Internal.Stack (HasCallStack)
+import GHC.Internal.Stack (HasCallStack, withFrozenCallStack)
-- TVars are shared memory locations which support atomic memory
-- transactions.
@@ -187,7 +187,7 @@ throwSTM e = do
-- N.B. Typically use of unsafeIOToSTM is very much frowned upon as this
-- is an easy way to end up with nested transactions. However, we can be
-- certain that toExceptionWithBacktrace will not initiate a transaction.
- se <- unsafeIOToSTM (toExceptionWithBacktrace e)
+ se <- unsafeIOToSTM (withFrozenCallStack $ toExceptionWithBacktrace e)
STM $ raiseIO# se
-- | Exception handling within STM actions.
=====================================
libraries/ghc-internal/tests/backtraces/T15395.hs
=====================================
@@ -0,0 +1,85 @@
+{-# LANGUAGE LambdaCase #-}
+{-# LANGUAGE TypeApplications #-}
+
+import GHC.Internal.Control.Exception
+import GHC.Internal.Data.Foldable (traverse_)
+import GHC.Internal.Exception.Backtrace
+import GHC.Internal.Exception.Context
+import GHC.Internal.Exception.Type
+import GHC.Internal.STM (atomically, throwSTM)
+import qualified GHC.Internal.Stack as HCS
+import qualified GHC.Internal.Stack.Types as HCS
+import Control.Monad (when)
+import qualified Data.List as List
+import System.Exit (exitFailure)
+
+main :: IO ()
+main = do
+ -- Make sure there are HasCallStackBacktraces
+ setBacktraceMechanismState HasCallStackBacktrace True
+ mapM_ (uncurry runCase)
+ [ ("throw", throwAction)
+ , ("throwIO", throwIOAction)
+ , ("error", errorAction)
+ , ("throwSTM", throwSTMAction)
+ , ("undefined", undefinedAction)
+ ]
+
+runCase :: String -> IO () -> IO ()
+runCase name act = do
+ putStrLn $ "=== Validate stack size of '" ++ name ++ "' has length 1"
+ catchAndVerifyStackTraceLength name act
+ putStrLn ""
+
+throwAction :: IO ()
+throwAction = evaluate $ throw $ ErrorCall "my throw error"
+
+throwIOAction :: IO ()
+throwIOAction = throwIO $ ErrorCall "my throwIO error"
+
+errorAction :: IO ()
+errorAction = error "plain error"
+
+throwSTMAction :: IO ()
+throwSTMAction = atomically $ throwSTM $ ErrorCall "my throwSTM error"
+
+undefinedAction :: IO ()
+undefinedAction = evaluate undefined
+
+catchAndVerifyStackTraceLength :: String -> IO () -> IO ()
+catchAndVerifyStackTraceLength name act = do
+ try act >>= \ case
+ Right _ -> do
+ putStrLn $ "Exception expected but got a result for '" ++ name ++ "'"
+ exitFailure
+ Left exc ->
+ verifyBacktraceSize name exc
+
+verifyBacktraceSize :: String -> SomeException -> IO ()
+verifyBacktraceSize label se = do
+ message <- evaluate (displayException se)
+ putStrLn "==== Caught exception:"
+ putStrLn message
+ putStrLn "==== Exception Backtraces:"
+ let backtraces = getExceptionAnnotations @Backtraces $ someExceptionContext se
+ traverse_ validateBacktrace backtraces
+
+validateBacktrace :: Backtraces -> IO ()
+validateBacktrace bt =
+ case btrHasCallStack bt of
+ Nothing -> pure ()
+ Just cs -> do
+ let stack = HCS.getCallStack cs
+
+ traverse_ mustNotReferenceInternalPackages stack
+ traverse_ (putStrLn . prettyCallSite) stack
+ where
+ prettyCallSite (f, loc) = "- " ++ f ++ ", called at " ++ HCS.prettySrcLoc loc
+
+ mustNotReferenceInternalPackages (_, loc) =
+ case List.find (HCS.srcLocPackage loc ==) internalPackages of
+ Just val -> fail $ "Stack trace must not reference '" ++ val ++ "' package."
+ Nothing -> pure ()
+
+internalPackages :: [String]
+internalPackages = ["base", "ghc", "ghc-internal", "ghc-experimental"]
=====================================
libraries/ghc-internal/tests/backtraces/T15395.stdout
=====================================
@@ -0,0 +1,30 @@
+=== Validate stack size of 'throw' has length 1
+==== Caught exception:
+my throw error
+==== Exception Backtraces:
+- throw, called at T15395.hs:35:26 in main:Main
+
+=== Validate stack size of 'throwIO' has length 1
+==== Caught exception:
+my throwIO error
+==== Exception Backtraces:
+- throwIO, called at T15395.hs:38:17 in main:Main
+
+=== Validate stack size of 'error' has length 1
+==== Caught exception:
+plain error
+==== Exception Backtraces:
+- error, called at T15395.hs:41:15 in main:Main
+
+=== Validate stack size of 'throwSTM' has length 1
+==== Caught exception:
+my throwSTM error
+==== Exception Backtraces:
+- throwSTM, called at T15395.hs:44:31 in main:Main
+
+=== Validate stack size of 'undefined' has length 1
+==== Caught exception:
+Prelude.undefined
+==== Exception Backtraces:
+- undefined, called at T15395.hs:47:28 in main:Main
+
=====================================
libraries/ghc-internal/tests/backtraces/all.T
=====================================
@@ -4,3 +4,7 @@ test('T26507', [ when(have_profiling(), extra_ways(['prof']))
, when(js_arch(), skip)
, when(ghc_with_ipe(), skip) # IPE builds include an IPE backtrace section on stderr.
, exit_code(1)], compile_and_run, [''])
+
+# Stack traces shouldn't expose implementation details
+test('T15395', [ when(have_profiling(), extra_ways(['prof']))
+ , when(js_arch(), skip)], compile_and_run, [''])
=====================================
libraries/ghc-internal/tests/stack-annotation/ann_frame005.stdout
=====================================
@@ -39,7 +39,5 @@ Exception context:
- catch site for throwSTM
- annotateCallStackIO, called at ann_frame005.hs:26:3 in main:Main
- HasCallStack backtrace:
-- collectExceptionAnnotation, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:170:37 in ghc-internal:GHC.Internal.Exception
-- toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/STM.hs:190:26 in ghc-internal:GHC.Internal.STM
- throwSTM, called at ann_frame005.hs:55:9 in main:Main
Handler annotation not present in context
=====================================
m4/fptools_happy.m4
=====================================
@@ -28,13 +28,13 @@ then
else
fptools_cv_happy_version_display="none";
fi;
- failure_msg="Happy version == 1.20.* || >= 2.0.2 && < 2.2 is required to compile GHC. (Found: $fptools_cv_happy_version_display)"
+ failure_msg="Happy version == 1.20.* || >= 2.0.2 && < 2.3 is required to compile GHC. (Found: $fptools_cv_happy_version_display)"
FP_COMPARE_VERSIONS([$fptools_cv_happy_version],[-lt],[1.20.0],
[AC_MSG_ERROR([$failure_msg])])[]
FP_COMPARE_VERSIONS([$fptools_cv_happy_version],[-ge],[1.21.0],
FP_COMPARE_VERSIONS([$fptools_cv_happy_version], [-le], [2.0.1],
[AC_MSG_ERROR([$failure_msg])])[])[]
- FP_COMPARE_VERSIONS([$fptools_cv_happy_version],[-ge],[2.2.0],
+ FP_COMPARE_VERSIONS([$fptools_cv_happy_version],[-ge],[2.3.0],
[AC_MSG_ERROR([$failure_msg])])[]
fi
HappyVersion=$fptools_cv_happy_version;
=====================================
testsuite/tests/arrows/should_compile/T21301.stderr
=====================================
@@ -4,7 +4,5 @@ T21301.hs:(8,7)-(10,6): Non-exhaustive patterns in case
HasCallStack backtrace:
- collectExceptionAnnotation, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception
- toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:89:42 in ghc-internal:GHC.Internal.Exception
throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:434:30 in ghc-internal:GHC.Internal.Control.Exception.Base
=====================================
testsuite/tests/deSugar/should_fail/DsStrictFail.stderr
=====================================
@@ -4,7 +4,5 @@ DsStrictFail.hs:4:12-23: Non-exhaustive patterns in False
HasCallStack backtrace:
- collectExceptionAnnotation, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception
- toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:89:42 in ghc-internal:GHC.Internal.Exception
throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:434:30 in ghc-internal:GHC.Internal.Control.Exception.Base
=====================================
testsuite/tests/deSugar/should_run/T20024.stderr
=====================================
@@ -4,7 +4,5 @@ T20024.hs:2:12-32: Non-exhaustive guards in pattern binding
HasCallStack backtrace:
- collectExceptionAnnotation, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception
- toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:89:42 in ghc-internal:GHC.Internal.Exception
throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:431:30 in ghc-internal:GHC.Internal.Control.Exception.Base
=====================================
testsuite/tests/deSugar/should_run/dsrun005.stderr
=====================================
@@ -4,7 +4,5 @@ dsrun005.hs:42:1-18: Non-exhaustive patterns in function f
HasCallStack backtrace:
- collectExceptionAnnotation, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception
- toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:89:42 in ghc-internal:GHC.Internal.Exception
throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:434:30 in ghc-internal:GHC.Internal.Control.Exception.Base
=====================================
testsuite/tests/deSugar/should_run/dsrun007.stderr
=====================================
@@ -4,7 +4,5 @@ dsrun007.hs:5:23-25: Missing field in record construction
HasCallStack backtrace:
- collectExceptionAnnotation, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception
- toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:89:42 in ghc-internal:GHC.Internal.Exception
throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:432:30 in ghc-internal:GHC.Internal.Control.Exception.Base
=====================================
testsuite/tests/deSugar/should_run/dsrun008.stderr
=====================================
@@ -4,7 +4,5 @@ dsrun008.hs:2:32-36: Non-exhaustive patterns in (2, x)
HasCallStack backtrace:
- collectExceptionAnnotation, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception
- toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:89:42 in ghc-internal:GHC.Internal.Exception
throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:434:30 in ghc-internal:GHC.Internal.Control.Exception.Base
=====================================
testsuite/tests/deriving/should_run/T9576.stderr
=====================================
@@ -13,7 +13,5 @@ T9576.hs:6:31: error: [GHC-39999]
(deferred type error)
HasCallStack backtrace:
- collectExceptionAnnotation, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception
- toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:89:42 in ghc-internal:GHC.Internal.Exception
throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:435:30 in ghc-internal:GHC.Internal.Control.Exception.Base
=====================================
testsuite/tests/ghci/scripts/Defer02.stderr
=====================================
@@ -71,8 +71,6 @@ Defer01.hs:49:5: warning: [GHC-83865] [-Wdeferred-type-errors (in -Wdefault)]
(deferred type error)
HasCallStack backtrace:
- collectExceptionAnnotation, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception
- toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:89:42 in ghc-internal:GHC.Internal.Exception
throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:435:30 in ghc-internal:GHC.Internal.Control.Exception.Base
*** Exception: Defer01.hs:13:5: error: [GHC-83865]
@@ -82,8 +80,6 @@ HasCallStack backtrace:
(deferred type error)
HasCallStack backtrace:
- collectExceptionAnnotation, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception
- toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:89:42 in ghc-internal:GHC.Internal.Exception
throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:435:30 in ghc-internal:GHC.Internal.Control.Exception.Base
*** Exception: Defer01.hs:17:9: error: [GHC-39999]
@@ -93,8 +89,6 @@ HasCallStack backtrace:
(deferred type error)
HasCallStack backtrace:
- collectExceptionAnnotation, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception
- toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:89:42 in ghc-internal:GHC.Internal.Exception
throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:435:30 in ghc-internal:GHC.Internal.Control.Exception.Base
<interactive>:10:11: error: [GHC-83865]
@@ -113,8 +107,6 @@ HasCallStack backtrace:
(deferred type error)
HasCallStack backtrace:
- collectExceptionAnnotation, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception
- toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:89:42 in ghc-internal:GHC.Internal.Exception
throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:435:30 in ghc-internal:GHC.Internal.Control.Exception.Base
*** Exception: Defer01.hs:30:5: error: [GHC-83865]
@@ -127,8 +119,6 @@ HasCallStack backtrace:
(deferred type error)
HasCallStack backtrace:
- collectExceptionAnnotation, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception
- toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:89:42 in ghc-internal:GHC.Internal.Exception
throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:435:30 in ghc-internal:GHC.Internal.Control.Exception.Base
*** Exception: Defer01.hs:33:8: error: [GHC-25897]
@@ -146,8 +136,6 @@ HasCallStack backtrace:
(deferred type error)
HasCallStack backtrace:
- collectExceptionAnnotation, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception
- toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:89:42 in ghc-internal:GHC.Internal.Exception
throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:435:30 in ghc-internal:GHC.Internal.Control.Exception.Base
*** Exception: Defer01.hs:38:17: error: [GHC-83865]
@@ -161,8 +149,6 @@ HasCallStack backtrace:
(deferred type error)
HasCallStack backtrace:
- collectExceptionAnnotation, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception
- toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:89:42 in ghc-internal:GHC.Internal.Exception
throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:435:30 in ghc-internal:GHC.Internal.Control.Exception.Base
*** Exception: Defer01.hs:42:5: error: [GHC-39999]
@@ -172,8 +158,6 @@ HasCallStack backtrace:
(deferred type error)
HasCallStack backtrace:
- collectExceptionAnnotation, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception
- toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:89:42 in ghc-internal:GHC.Internal.Exception
throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:435:30 in ghc-internal:GHC.Internal.Control.Exception.Base
<interactive>:16:8: error: [GHC-18872]
@@ -192,7 +176,5 @@ HasCallStack backtrace:
(deferred type error)
HasCallStack backtrace:
- collectExceptionAnnotation, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception
- toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:89:42 in ghc-internal:GHC.Internal.Exception
throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:435:30 in ghc-internal:GHC.Internal.Control.Exception.Base
=====================================
testsuite/tests/ghci/scripts/T15325.stderr
=====================================
@@ -24,7 +24,5 @@ T15325.hs:11:9: warning: [GHC-39999] [-Wdeferred-type-errors (in -Wdefault)]
(deferred type error)
HasCallStack backtrace:
- collectExceptionAnnotation, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception
- toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:89:42 in ghc-internal:GHC.Internal.Exception
throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:435:30 in ghc-internal:GHC.Internal.Control.Exception.Base
=====================================
testsuite/tests/patsyn/should_run/ghci.stderr
=====================================
@@ -2,7 +2,5 @@
HasCallStack backtrace:
- collectExceptionAnnotation, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception
- toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:89:42 in ghc-internal:GHC.Internal.Exception
throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:434:30 in ghc-internal:GHC.Internal.Control.Exception.Base
=====================================
testsuite/tests/quotes/LiftErrMsgDefer.stderr
=====================================
@@ -11,7 +11,5 @@ LiftErrMsgDefer.hs:14:12: warning: [GHC-28914] [-Wdeferred-type-errors (in -Wdef
(deferred type error)
HasCallStack backtrace:
- collectExceptionAnnotation, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception
- toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:89:42 in ghc-internal:GHC.Internal.Exception
throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:435:30 in ghc-internal:GHC.Internal.Control.Exception.Base
=====================================
testsuite/tests/safeHaskell/safeLanguage/SafeLang15.stderr
=====================================
@@ -4,7 +4,5 @@ SafeLang15.hs:22:9-37: Non-exhaustive patterns in Just p'
HasCallStack backtrace:
- collectExceptionAnnotation, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception
- toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:89:42 in ghc-internal:GHC.Internal.Exception
throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:434:30 in ghc-internal:GHC.Internal.Control.Exception.Base
=====================================
testsuite/tests/type-data/should_run/T22332a.stderr
=====================================
@@ -4,7 +4,5 @@ T22332a.hs:18:1-35: Non-exhaustive patterns in Just eq
HasCallStack backtrace:
- collectExceptionAnnotation, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception
- toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:89:42 in ghc-internal:GHC.Internal.Exception
throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:434:30 in ghc-internal:GHC.Internal.Control.Exception.Base
=====================================
testsuite/tests/typecheck/should_run/T10284.stderr
=====================================
@@ -7,7 +7,5 @@ T10284.hs:7:5: error: [GHC-83865]
(deferred type error)
HasCallStack backtrace:
- collectExceptionAnnotation, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception
- toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:89:42 in ghc-internal:GHC.Internal.Exception
throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:435:30 in ghc-internal:GHC.Internal.Control.Exception.Base
=====================================
testsuite/tests/typecheck/should_run/T13838.stderr
=====================================
@@ -9,7 +9,5 @@ T13838.hs:6:1: error: [GHC-83865]
(deferred type error)
HasCallStack backtrace:
- collectExceptionAnnotation, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception
- toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:89:42 in ghc-internal:GHC.Internal.Exception
throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:435:30 in ghc-internal:GHC.Internal.Control.Exception.Base
=====================================
testsuite/tests/typecheck/should_run/T9497a-run.stderr
=====================================
@@ -19,7 +19,5 @@ T9497a-run.hs:2:8: error: [GHC-88464]
(deferred type error)
HasCallStack backtrace:
- collectExceptionAnnotation, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception
- toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:89:42 in ghc-internal:GHC.Internal.Exception
throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:435:30 in ghc-internal:GHC.Internal.Control.Exception.Base
=====================================
testsuite/tests/typecheck/should_run/T9497b-run.stderr
=====================================
@@ -19,7 +19,5 @@ T9497b-run.hs:2:8: error: [GHC-88464]
(deferred type error)
HasCallStack backtrace:
- collectExceptionAnnotation, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception
- toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:89:42 in ghc-internal:GHC.Internal.Exception
throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:435:30 in ghc-internal:GHC.Internal.Control.Exception.Base
=====================================
testsuite/tests/typecheck/should_run/T9497c-run.stderr
=====================================
@@ -19,7 +19,5 @@ T9497c-run.hs:2:8: error: [GHC-88464]
(deferred type error)
HasCallStack backtrace:
- collectExceptionAnnotation, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception
- toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:89:42 in ghc-internal:GHC.Internal.Exception
throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:435:30 in ghc-internal:GHC.Internal.Control.Exception.Base
=====================================
testsuite/tests/unsatisfiable/T23816.stderr
=====================================
@@ -8,7 +8,5 @@ T23816.hs:18:15: error: [GHC-22250]
(deferred type error)
HasCallStack backtrace:
- collectExceptionAnnotation, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception
- toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:89:42 in ghc-internal:GHC.Internal.Exception
throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:435:30 in ghc-internal:GHC.Internal.Control.Exception.Base
=====================================
testsuite/tests/unsatisfiable/UnsatDefer.stderr
=====================================
@@ -7,7 +7,5 @@ UnsatDefer.hs:20:7: error: [GHC-22250]
(deferred type error)
HasCallStack backtrace:
- collectExceptionAnnotation, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception
- toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:89:42 in ghc-internal:GHC.Internal.Exception
throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:435:30 in ghc-internal:GHC.Internal.Control.Exception.Base
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/a40e0e03941759e0bc3c2c296c0636…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/a40e0e03941759e0bc3c2c296c0636…
You're receiving this email because of your account on gitlab.haskell.org.
1
0