Teo Camarasu pushed to branch wip/T26930 at Glasgow Haskell Compiler / GHC
Commits:
0a66581b by Teo Camarasu at 2026-02-20T11:41:15+00:00
Float up generics
- - - - -
19 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/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/RTS/Flags.hsc
- libraries/ghc-internal/src/GHC/Internal/Read.hs
- libraries/ghc-internal/src/GHC/Internal/Unicode/Bits.hs
- testsuite/tests/ghci/scripts/ListTuplePunsPpr.stdout
- testsuite/tests/ghci/scripts/T10963.stderr
- testsuite/tests/ghci/scripts/ghci064.stdout
- testsuite/tests/interface-stability/base-exports.stdout
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/Monad/Fix.hs
=====================================
@@ -36,7 +36,6 @@ import GHC.Internal.Data.NonEmpty ( NonEmpty(..) )
import GHC.Internal.Data.Ord ( Down(..) )
import GHC.Internal.Data.Tuple ( Solo(..), snd )
import GHC.Internal.Base ( Monad, errorWithoutStackTrace, (.) )
-import GHC.Internal.Generics
import GHC.Internal.List ( head, drop )
import GHC.Internal.Control.Monad.ST.Imp
import GHC.Internal.System.IO
@@ -146,26 +145,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
=====================================
@@ -64,7 +64,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(..) )
@@ -859,67 +858,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
=====================================
@@ -44,7 +44,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)
@@ -78,8 +77,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, (.) )
import GHC.Internal.Classes ( Eq(..), Ord(..) )
import GHC.Internal.Enum ( Bounded, Enum )
import GHC.Internal.Read ( Read(..) )
@@ -751,6 +753,17 @@ 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(..) )
+import GHC.Internal.Control.Monad.Fix
+import GHC.Internal.RTS.Flags
-- Needed for metadata
import GHC.Internal.Data.Proxy ( Proxy(..) )
@@ -1879,3 +1892,257 @@ 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
+
+-- | @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 RTS.Flags
+
+-- | @since base-4.15.0.0
+deriving instance Generic GiveGCStats
+
+-- | @since base-4.15.0.0
+deriving instance Generic GCFlags
+
+-- | @since base-4.15.0.0
+deriving instance Generic ConcFlags
+
+-- | @since base-4.15.0.0
+deriving instance Generic MiscFlags
+
+-- | @since base-4.15.0.0
+deriving instance Generic DebugFlags
+
+-- | @since base-4.15.0.0
+deriving instance Generic DoCostCentres
+
+-- | @since base-4.15.0.0
+deriving instance Generic CCFlags
+
+-- | @since base-4.15.0.0
+deriving instance Generic DoHeapProfile
+
+-- | @since base-4.15.0.0
+deriving instance Generic ProfFlags
+
+-- | @since base-4.15.0.0
+deriving instance Generic DoTrace
+
+-- | @since base-4.15.0.0
+deriving instance Generic TraceFlags
+
+-- | @since base-4.15.0.0
+deriving instance Generic TickyFlags
+
+-- | @since base-4.15.0.0
+deriving instance Generic ParFlags
+
+-- | @since base-4.15.0.0
+deriving instance Generic HpcFlags
+
+-- | @since base-4.15.0.0
+deriving instance Generic RTSFlags
=====================================
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/RTS/Flags.hsc
=====================================
@@ -63,7 +63,6 @@ import GHC.Internal.Ptr
import GHC.Internal.Word
import GHC.Internal.Base
import GHC.Internal.Enum
-import GHC.Internal.Generics (Generic)
import GHC.Internal.IO
import GHC.Internal.Real
import GHC.Internal.Show
@@ -84,7 +83,6 @@ data GiveGCStats
| SummaryGCStats
| VerboseGCStats
deriving ( Show -- ^ @since base-4.8.0.0
- , Generic -- ^ @since base-4.15.0.0
)
-- | @since base-4.8.0.0
@@ -136,7 +134,6 @@ data GCFlags = GCFlags
, numa :: Bool
, numaMask :: Word
} deriving ( Show -- ^ @since base-4.8.0.0
- , Generic -- ^ @since base-4.15.0.0
)
-- | Parameters concerning context switching
@@ -146,7 +143,6 @@ data ConcFlags = ConcFlags
{ ctxtSwitchTime :: RtsTime
, ctxtSwitchTicks :: Int
} deriving ( Show -- ^ @since base-4.8.0.0
- , Generic -- ^ @since base-4.15.0.0
)
-- | Miscellaneous parameters
@@ -169,7 +165,6 @@ data MiscFlags = MiscFlags
, ioManager :: IoManagerFlag
, numIoWorkerThreads :: Word32
} deriving ( Show -- ^ @since base-4.8.0.0
- , Generic -- ^ @since base-4.15.0.0
)
-- |
@@ -206,7 +201,6 @@ data DebugFlags = DebugFlags
, hpc :: Bool -- ^ @c@ coverage
, sparks :: Bool -- ^ @r@
} deriving ( Show -- ^ @since base-4.8.0.0
- , Generic -- ^ @since base-4.15.0.0
)
-- | Should the RTS produce a cost-center summary?
@@ -219,7 +213,6 @@ data DoCostCentres
| CostCentresAll
| CostCentresJSON
deriving ( Show -- ^ @since base-4.8.0.0
- , Generic -- ^ @since base-4.15.0.0
)
-- | @since base-4.8.0.0
@@ -245,7 +238,6 @@ data CCFlags = CCFlags
, profilerTicks :: Int
, msecsPerTick :: Int
} deriving ( Show -- ^ @since base-4.8.0.0
- , Generic -- ^ @since base-4.15.0.0
)
-- | What sort of heap profile are we collecting?
@@ -263,7 +255,6 @@ data DoHeapProfile
| HeapByInfoTable
| HeapByEra -- ^ @since base-4.20.0.0
deriving ( Show -- ^ @since base-4.8.0.0
- , Generic -- ^ @since base-4.15.0.0
)
-- | @since base-4.8.0.0
@@ -315,7 +306,6 @@ data ProfFlags = ProfFlags
, closureTypeSelector :: Maybe String
, infoTableSelector :: Maybe String
} deriving ( Show -- ^ @since base-4.8.0.0
- , Generic -- ^ @since base-4.15.0.0
)
-- | Is event tracing enabled?
@@ -326,7 +316,6 @@ data DoTrace
| TraceEventLog -- ^ send tracing events to the event log
| TraceStderr -- ^ send tracing events to @stderr@
deriving ( Show -- ^ @since base-4.8.0.0
- , Generic -- ^ @since base-4.15.0.0
)
-- | @since base-4.8.0.0
@@ -354,7 +343,6 @@ data TraceFlags = TraceFlags
, sparksFull :: Bool -- ^ trace spark events 100% accurately
, user :: Bool -- ^ trace user events (emitted from Haskell code)
} deriving ( Show -- ^ @since base-4.8.0.0
- , Generic -- ^ @since base-4.15.0.0
)
-- | Parameters pertaining to ticky-ticky profiler
@@ -364,7 +352,6 @@ data TickyFlags = TickyFlags
{ showTickyStats :: Bool
, tickyFile :: Maybe FilePath
} deriving ( Show -- ^ @since base-4.8.0.0
- , Generic -- ^ @since base-4.15.0.0
)
-- | Parameters pertaining to parallelism
@@ -383,7 +370,6 @@ data ParFlags = ParFlags
, setAffinity :: Bool
}
deriving ( Show -- ^ @since base-4.8.0.0
- , Generic -- ^ @since base-4.15.0.0
)
-- | Parameters pertaining to Haskell program coverage (HPC)
@@ -399,7 +385,6 @@ data HpcFlags = HpcFlags
-- written after the execution of the program.
}
deriving (Show -- ^ @since base-4.20.0.0
- , Generic -- ^ @since base-4.20.0.0
)
-- | Parameters of the runtime system
--
@@ -416,7 +401,6 @@ data RTSFlags = RTSFlags
, parFlags :: ParFlags
, hpcFlags :: HpcFlags
} deriving ( Show -- ^ @since base-4.8.0.0
- , Generic -- ^ @since base-4.15.0.0
)
foreign import ccall "&RtsFlags" rtsFlagsPtr :: Ptr RTSFlags
=====================================
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
=====================================
testsuite/tests/ghci/scripts/ListTuplePunsPpr.stdout
=====================================
@@ -21,13 +21,13 @@ instance Applicative Solo -- Defined in ‘GHC.Internal.Base’
instance Foldable Solo -- Defined in ‘GHC.Internal.Data.Foldable’
instance Functor Solo -- Defined in ‘GHC.Internal.Base’
instance Monad Solo -- Defined in ‘GHC.Internal.Base’
+instance Read a => Read (Solo a) -- Defined in ‘GHC.Internal.Read’
instance Bounded a => Bounded (Solo a)
-- Defined in ‘GHC.Internal.Enum’
instance Enum a => Enum (Solo a) -- Defined in ‘GHC.Internal.Enum’
-instance Read a => Read (Solo a) -- Defined in ‘GHC.Internal.Read’
-instance Eq a => Eq (Solo a) -- Defined in ‘GHC.Internal.Classes’
instance Ord a => Ord (Solo a) -- Defined in ‘GHC.Internal.Classes’
instance Show a => Show (Solo a) -- Defined in ‘GHC.Internal.Show’
+instance Eq a => Eq (Solo a) -- Defined in ‘GHC.Internal.Classes’
instance Monoid a => Monoid (Solo a)
-- Defined in ‘GHC.Internal.Base’
instance Semigroup a => Semigroup (Solo a)
=====================================
testsuite/tests/ghci/scripts/T10963.stderr
=====================================
@@ -1,4 +1,3 @@
-
<interactive>:1:1: error: [GHC-39999]
• Ambiguous type variable ‘a0’ arising from a use of ‘foo’
prevents the constraint ‘(Num a0)’ from being solved.
@@ -7,6 +6,7 @@
instance Num Integer -- Defined in ‘GHC.Internal.Num’
instance Num Double -- Defined in ‘GHC.Internal.Float’
...plus three others
- ...plus one instance involving out-of-scope types
+ ...plus four instances involving out-of-scope types
(use -fprint-potential-instances to see them all)
• In the expression: foo
+
=====================================
testsuite/tests/ghci/scripts/ghci064.stdout
=====================================
@@ -10,11 +10,6 @@ instance MonadFail Maybe
instance GHC.Internal.Base.MonadPlus Maybe
-- Defined in ‘GHC.Internal.Base’
instance Monad Maybe -- Defined in ‘GHC.Internal.Base’
-instance GHC.Internal.Generics.SingKind w =>
- GHC.Internal.Generics.SingKind (Maybe w)
- -- Defined in ‘GHC.Internal.Generics’
-instance GHC.Internal.Generics.Generic (Maybe w)
- -- Defined in ‘GHC.Internal.Generics’
instance Semigroup w => Monoid (Maybe w)
-- Defined in ‘GHC.Internal.Base’
instance Read w => Read (Maybe w) -- Defined in ‘GHC.Internal.Read’
@@ -25,26 +20,18 @@ instance [safe] Ord w => Ord (Maybe w)
instance Show w => Show (Maybe w) -- Defined in ‘GHC.Internal.Show’
instance [safe] Eq w => Eq (Maybe w)
-- Defined in ‘GHC.Internal.Maybe’
-instance GHC.Internal.Generics.Generic [w]
- -- Defined in ‘GHC.Internal.Generics’
instance Read w => Read [w] -- Defined in ‘GHC.Internal.Read’
-instance Eq w => Eq [w] -- Defined in ‘GHC.Internal.Classes’
instance Ord w => Ord [w] -- Defined in ‘GHC.Internal.Classes’
instance Show w => Show [w] -- Defined in ‘GHC.Internal.Show’
+instance Eq w => Eq [w] -- Defined in ‘GHC.Internal.Classes’
instance Monoid [w] -- Defined in ‘GHC.Internal.Base’
instance Semigroup [w] -- Defined in ‘GHC.Internal.Base’
instance [safe] MyShow w => MyShow [w]
-- Defined at ghci064.hs:8:10
-instance GHC.Internal.Generics.Generic [T]
- -- Defined in ‘GHC.Internal.Generics’
instance Monoid [T] -- Defined in ‘GHC.Internal.Base’
instance Semigroup [T] -- Defined in ‘GHC.Internal.Base’
instance [safe] MyShow [T] -- Defined at ghci064.hs:16:10
instance [safe] MyShow [T] -- Defined at ghci064.hs:8:10
-instance GHC.Internal.Generics.SingKind Bool
- -- Defined in ‘GHC.Internal.Generics’
-instance GHC.Internal.Generics.Generic Bool
- -- Defined in ‘GHC.Internal.Generics’
instance GHC.Internal.Foreign.Storable.Storable Bool
-- Defined in ‘GHC.Internal.Foreign.Storable’
instance GHC.Internal.Bits.Bits Bool
=====================================
testsuite/tests/interface-stability/base-exports.stdout
=====================================
@@ -11544,7 +11544,6 @@ instance forall (f :: * -> *). GHC.Internal.Control.Monad.Fail.MonadFail f => GH
instance GHC.Internal.Control.Monad.Fail.MonadFail GHC.Internal.Text.ParserCombinators.ReadP.P -- Defined in ‘GHC.Internal.Text.ParserCombinators.ReadP’
instance GHC.Internal.Control.Monad.Fail.MonadFail GHC.Internal.Text.ParserCombinators.ReadP.ReadP -- Defined in ‘GHC.Internal.Text.ParserCombinators.ReadP’
instance GHC.Internal.Control.Monad.Fail.MonadFail GHC.Internal.Text.ParserCombinators.ReadPrec.ReadPrec -- Defined in ‘GHC.Internal.Text.ParserCombinators.ReadPrec’
-instance forall (f :: * -> *) (g :: * -> *). (GHC.Internal.Control.Monad.Fix.MonadFix f, GHC.Internal.Control.Monad.Fix.MonadFix g) => GHC.Internal.Control.Monad.Fix.MonadFix (f GHC.Internal.Generics.:*: g) -- Defined in ‘GHC.Internal.Control.Monad.Fix’
instance forall (f :: * -> *). GHC.Internal.Control.Monad.Fix.MonadFix f => GHC.Internal.Control.Monad.Fix.MonadFix (GHC.Internal.Data.Semigroup.Internal.Alt f) -- Defined in ‘GHC.Internal.Control.Monad.Fix’
instance forall (f :: * -> *). GHC.Internal.Control.Monad.Fix.MonadFix f => GHC.Internal.Control.Monad.Fix.MonadFix (GHC.Internal.Data.Monoid.Ap f) -- Defined in ‘GHC.Internal.Control.Monad.Fix’
instance GHC.Internal.Control.Monad.Fix.MonadFix GHC.Internal.Data.Ord.Down -- Defined in ‘GHC.Internal.Control.Monad.Fix’
@@ -11555,12 +11554,9 @@ instance GHC.Internal.Control.Monad.Fix.MonadFix GHC.Internal.Data.Monoid.First
instance GHC.Internal.Control.Monad.Fix.MonadFix GHC.Internal.Types.IO -- Defined in ‘GHC.Internal.Control.Monad.Fix’
instance GHC.Internal.Control.Monad.Fix.MonadFix GHC.Internal.Data.Monoid.Last -- Defined in ‘GHC.Internal.Control.Monad.Fix’
instance GHC.Internal.Control.Monad.Fix.MonadFix [] -- Defined in ‘GHC.Internal.Control.Monad.Fix’
-instance forall (f :: * -> *) i (c :: GHC.Internal.Generics.Meta). GHC.Internal.Control.Monad.Fix.MonadFix f => GHC.Internal.Control.Monad.Fix.MonadFix (GHC.Internal.Generics.M1 i c f) -- Defined in ‘GHC.Internal.Control.Monad.Fix’
instance GHC.Internal.Control.Monad.Fix.MonadFix GHC.Internal.Maybe.Maybe -- Defined in ‘GHC.Internal.Control.Monad.Fix’
instance GHC.Internal.Control.Monad.Fix.MonadFix GHC.Internal.Base.NonEmpty -- Defined in ‘GHC.Internal.Control.Monad.Fix’
-instance GHC.Internal.Control.Monad.Fix.MonadFix GHC.Internal.Generics.Par1 -- Defined in ‘GHC.Internal.Control.Monad.Fix’
instance GHC.Internal.Control.Monad.Fix.MonadFix GHC.Internal.Data.Semigroup.Internal.Product -- Defined in ‘GHC.Internal.Control.Monad.Fix’
-instance forall (f :: * -> *). GHC.Internal.Control.Monad.Fix.MonadFix f => GHC.Internal.Control.Monad.Fix.MonadFix (GHC.Internal.Generics.Rec1 f) -- Defined in ‘GHC.Internal.Control.Monad.Fix’
instance forall s. GHC.Internal.Control.Monad.Fix.MonadFix (GHC.Internal.ST.ST s) -- Defined in ‘GHC.Internal.Control.Monad.Fix’
instance GHC.Internal.Control.Monad.Fix.MonadFix Solo -- Defined in ‘GHC.Internal.Control.Monad.Fix’
instance GHC.Internal.Control.Monad.Fix.MonadFix GHC.Internal.Data.Semigroup.Internal.Sum -- Defined in ‘GHC.Internal.Control.Monad.Fix’
@@ -11573,6 +11569,10 @@ instance GHC.Internal.Control.Monad.Fix.MonadFix Data.Semigroup.First -- Defined
instance GHC.Internal.Control.Monad.Fix.MonadFix Data.Semigroup.Last -- Defined in ‘Data.Semigroup’
instance GHC.Internal.Control.Monad.Fix.MonadFix Data.Semigroup.Max -- Defined in ‘Data.Semigroup’
instance GHC.Internal.Control.Monad.Fix.MonadFix Data.Semigroup.Min -- Defined in ‘Data.Semigroup’
+instance forall (f :: * -> *) (g :: * -> *). (GHC.Internal.Control.Monad.Fix.MonadFix f, GHC.Internal.Control.Monad.Fix.MonadFix g) => GHC.Internal.Control.Monad.Fix.MonadFix (f GHC.Internal.Generics.:*: g) -- Defined in ‘GHC.Internal.Generics’
+instance forall (f :: * -> *) i (c :: GHC.Internal.Generics.Meta). GHC.Internal.Control.Monad.Fix.MonadFix f => GHC.Internal.Control.Monad.Fix.MonadFix (GHC.Internal.Generics.M1 i c f) -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Control.Monad.Fix.MonadFix GHC.Internal.Generics.Par1 -- Defined in ‘GHC.Internal.Generics’
+instance forall (f :: * -> *). GHC.Internal.Control.Monad.Fix.MonadFix f => GHC.Internal.Control.Monad.Fix.MonadFix (GHC.Internal.Generics.Rec1 f) -- Defined in ‘GHC.Internal.Generics’
instance GHC.Internal.Control.Monad.IO.Class.MonadIO GHC.Internal.Types.IO -- Defined in ‘GHC.Internal.Control.Monad.IO.Class’
instance forall (f :: * -> *) (g :: * -> *). (GHC.Internal.Control.Monad.Zip.MonadZip f, GHC.Internal.Control.Monad.Zip.MonadZip g) => GHC.Internal.Control.Monad.Zip.MonadZip (f GHC.Internal.Generics.:*: g) -- Defined in ‘GHC.Internal.Control.Monad.Zip’
instance forall (f :: * -> *). GHC.Internal.Control.Monad.Zip.MonadZip f => GHC.Internal.Control.Monad.Zip.MonadZip (GHC.Internal.Data.Semigroup.Internal.Alt f) -- Defined in ‘GHC.Internal.Control.Monad.Zip’
@@ -11737,9 +11737,6 @@ instance forall a. GHC.Internal.Data.Data.Data a => GHC.Internal.Data.Data.Data
instance forall m. GHC.Internal.Data.Data.Data m => GHC.Internal.Data.Data.Data (Data.Semigroup.WrappedMonoid m) -- Defined in ‘Data.Semigroup’
instance forall m. GHC.Internal.Data.Foldable.Foldable (GHC.Internal.Data.Functor.Const.Const m) -- Defined in ‘GHC.Internal.Data.Functor.Const’
instance GHC.Internal.Data.Foldable.Foldable GHC.Internal.Functor.ZipList.ZipList -- Defined in ‘GHC.Internal.Functor.ZipList’
-instance forall (f :: * -> *) (g :: * -> *). (GHC.Internal.Data.Foldable.Foldable f, GHC.Internal.Data.Foldable.Foldable g) => GHC.Internal.Data.Foldable.Foldable (f GHC.Internal.Generics.:*: g) -- Defined in ‘GHC.Internal.Data.Foldable’
-instance forall (f :: * -> *) (g :: * -> *). (GHC.Internal.Data.Foldable.Foldable f, GHC.Internal.Data.Foldable.Foldable g) => GHC.Internal.Data.Foldable.Foldable (f GHC.Internal.Generics.:+: g) -- Defined in ‘GHC.Internal.Data.Foldable’
-instance forall (f :: * -> *) (g :: * -> *). (GHC.Internal.Data.Foldable.Foldable f, GHC.Internal.Data.Foldable.Foldable g) => GHC.Internal.Data.Foldable.Foldable (f GHC.Internal.Generics.:.: g) -- Defined in ‘GHC.Internal.Data.Foldable’
instance forall (f :: * -> *). GHC.Internal.Data.Foldable.Foldable f => GHC.Internal.Data.Foldable.Foldable (GHC.Internal.Data.Semigroup.Internal.Alt f) -- Defined in ‘GHC.Internal.Data.Foldable’
instance forall (f :: * -> *). GHC.Internal.Data.Foldable.Foldable f => GHC.Internal.Data.Foldable.Foldable (GHC.Internal.Data.Monoid.Ap f) -- Defined in ‘GHC.Internal.Data.Foldable’
instance forall i. GHC.Internal.Data.Foldable.Foldable (GHC.Internal.Arr.Array i) -- Defined in ‘GHC.Internal.Data.Foldable’
@@ -11747,27 +11744,15 @@ instance GHC.Internal.Data.Foldable.Foldable GHC.Internal.Data.Ord.Down -- Defin
instance GHC.Internal.Data.Foldable.Foldable GHC.Internal.Data.Semigroup.Internal.Dual -- Defined in ‘GHC.Internal.Data.Foldable’
instance forall a. GHC.Internal.Data.Foldable.Foldable (GHC.Internal.Data.Either.Either a) -- Defined in ‘GHC.Internal.Data.Foldable’
instance GHC.Internal.Data.Foldable.Foldable GHC.Internal.Data.Monoid.First -- Defined in ‘GHC.Internal.Data.Foldable’
-instance forall i c. GHC.Internal.Data.Foldable.Foldable (GHC.Internal.Generics.K1 i c) -- Defined in ‘GHC.Internal.Data.Foldable’
instance GHC.Internal.Data.Foldable.Foldable GHC.Internal.Data.Monoid.Last -- Defined in ‘GHC.Internal.Data.Foldable’
instance GHC.Internal.Data.Foldable.Foldable [] -- Defined in ‘GHC.Internal.Data.Foldable’
-instance forall (f :: * -> *) i (c :: GHC.Internal.Generics.Meta). GHC.Internal.Data.Foldable.Foldable f => GHC.Internal.Data.Foldable.Foldable (GHC.Internal.Generics.M1 i c f) -- Defined in ‘GHC.Internal.Data.Foldable’
instance GHC.Internal.Data.Foldable.Foldable GHC.Internal.Maybe.Maybe -- Defined in ‘GHC.Internal.Data.Foldable’
instance GHC.Internal.Data.Foldable.Foldable GHC.Internal.Base.NonEmpty -- Defined in ‘GHC.Internal.Data.Foldable’
-instance GHC.Internal.Data.Foldable.Foldable GHC.Internal.Generics.Par1 -- Defined in ‘GHC.Internal.Data.Foldable’
instance GHC.Internal.Data.Foldable.Foldable GHC.Internal.Data.Semigroup.Internal.Product -- Defined in ‘GHC.Internal.Data.Foldable’
instance GHC.Internal.Data.Foldable.Foldable GHC.Internal.Data.Proxy.Proxy -- Defined in ‘GHC.Internal.Data.Foldable’
-instance forall (f :: * -> *). GHC.Internal.Data.Foldable.Foldable f => GHC.Internal.Data.Foldable.Foldable (GHC.Internal.Generics.Rec1 f) -- Defined in ‘GHC.Internal.Data.Foldable’
instance GHC.Internal.Data.Foldable.Foldable Solo -- Defined in ‘GHC.Internal.Data.Foldable’
instance GHC.Internal.Data.Foldable.Foldable GHC.Internal.Data.Semigroup.Internal.Sum -- Defined in ‘GHC.Internal.Data.Foldable’
instance forall a. GHC.Internal.Data.Foldable.Foldable ((,) a) -- Defined in ‘GHC.Internal.Data.Foldable’
-instance GHC.Internal.Data.Foldable.Foldable GHC.Internal.Generics.U1 -- Defined in ‘GHC.Internal.Data.Foldable’
-instance GHC.Internal.Data.Foldable.Foldable GHC.Internal.Generics.UAddr -- Defined in ‘GHC.Internal.Data.Foldable’
-instance GHC.Internal.Data.Foldable.Foldable GHC.Internal.Generics.UChar -- Defined in ‘GHC.Internal.Data.Foldable’
-instance GHC.Internal.Data.Foldable.Foldable GHC.Internal.Generics.UDouble -- Defined in ‘GHC.Internal.Data.Foldable’
-instance GHC.Internal.Data.Foldable.Foldable GHC.Internal.Generics.UFloat -- Defined in ‘GHC.Internal.Data.Foldable’
-instance GHC.Internal.Data.Foldable.Foldable GHC.Internal.Generics.UInt -- Defined in ‘GHC.Internal.Data.Foldable’
-instance GHC.Internal.Data.Foldable.Foldable GHC.Internal.Generics.UWord -- Defined in ‘GHC.Internal.Data.Foldable’
-instance GHC.Internal.Data.Foldable.Foldable GHC.Internal.Generics.V1 -- Defined in ‘GHC.Internal.Data.Foldable’
instance GHC.Internal.Data.Foldable.Foldable Data.Complex.Complex -- Defined in ‘Data.Complex’
instance forall (f :: * -> *) (g :: * -> *). (GHC.Internal.Data.Foldable.Foldable f, GHC.Internal.Data.Foldable.Foldable g) => GHC.Internal.Data.Foldable.Foldable (Data.Functor.Compose.Compose f g) -- Defined in ‘Data.Functor.Compose’
instance GHC.Internal.Data.Foldable.Foldable GHC.Internal.Data.Functor.Identity.Identity -- Defined in ‘GHC.Internal.Data.Functor.Identity’
@@ -11778,13 +11763,25 @@ instance GHC.Internal.Data.Foldable.Foldable Data.Semigroup.First -- Defined in
instance GHC.Internal.Data.Foldable.Foldable Data.Semigroup.Last -- Defined in ‘Data.Semigroup’
instance GHC.Internal.Data.Foldable.Foldable Data.Semigroup.Max -- Defined in ‘Data.Semigroup’
instance GHC.Internal.Data.Foldable.Foldable Data.Semigroup.Min -- Defined in ‘Data.Semigroup’
+instance forall (f :: * -> *) (g :: * -> *). (GHC.Internal.Data.Foldable.Foldable f, GHC.Internal.Data.Foldable.Foldable g) => GHC.Internal.Data.Foldable.Foldable (f GHC.Internal.Generics.:*: g) -- Defined in ‘GHC.Internal.Generics’
+instance forall (f :: * -> *) (g :: * -> *). (GHC.Internal.Data.Foldable.Foldable f, GHC.Internal.Data.Foldable.Foldable g) => GHC.Internal.Data.Foldable.Foldable (f GHC.Internal.Generics.:+: g) -- Defined in ‘GHC.Internal.Generics’
+instance forall (f :: * -> *) (g :: * -> *). (GHC.Internal.Data.Foldable.Foldable f, GHC.Internal.Data.Foldable.Foldable g) => GHC.Internal.Data.Foldable.Foldable (f GHC.Internal.Generics.:.: g) -- Defined in ‘GHC.Internal.Generics’
+instance forall i c. GHC.Internal.Data.Foldable.Foldable (GHC.Internal.Generics.K1 i c) -- Defined in ‘GHC.Internal.Generics’
+instance forall (f :: * -> *) i (c :: GHC.Internal.Generics.Meta). GHC.Internal.Data.Foldable.Foldable f => GHC.Internal.Data.Foldable.Foldable (GHC.Internal.Generics.M1 i c f) -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Data.Foldable.Foldable GHC.Internal.Generics.Par1 -- Defined in ‘GHC.Internal.Generics’
+instance forall (f :: * -> *). GHC.Internal.Data.Foldable.Foldable f => GHC.Internal.Data.Foldable.Foldable (GHC.Internal.Generics.Rec1 f) -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Data.Foldable.Foldable GHC.Internal.Generics.U1 -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Data.Foldable.Foldable GHC.Internal.Generics.UAddr -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Data.Foldable.Foldable GHC.Internal.Generics.UChar -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Data.Foldable.Foldable GHC.Internal.Generics.UDouble -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Data.Foldable.Foldable GHC.Internal.Generics.UFloat -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Data.Foldable.Foldable GHC.Internal.Generics.UInt -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Data.Foldable.Foldable GHC.Internal.Generics.UWord -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Data.Foldable.Foldable GHC.Internal.Generics.V1 -- Defined in ‘GHC.Internal.Generics’
instance forall a k (b :: k). GHC.Internal.Data.String.IsString a => GHC.Internal.Data.String.IsString (GHC.Internal.Data.Functor.Const.Const a b) -- Defined in ‘GHC.Internal.Data.String’
instance forall a. GHC.Internal.Data.String.IsString a => GHC.Internal.Data.String.IsString (GHC.Internal.Data.Functor.Identity.Identity a) -- Defined in ‘GHC.Internal.Data.String’
instance forall a. (a ~ GHC.Internal.Types.Char) => GHC.Internal.Data.String.IsString [a] -- Defined in ‘GHC.Internal.Data.String’
instance GHC.Internal.Data.Traversable.Traversable GHC.Internal.Functor.ZipList.ZipList -- Defined in ‘GHC.Internal.Functor.ZipList’
-instance forall (f :: * -> *) (g :: * -> *). (GHC.Internal.Data.Traversable.Traversable f, GHC.Internal.Data.Traversable.Traversable g) => GHC.Internal.Data.Traversable.Traversable (f GHC.Internal.Generics.:*: g) -- Defined in ‘GHC.Internal.Data.Traversable’
-instance forall (f :: * -> *) (g :: * -> *). (GHC.Internal.Data.Traversable.Traversable f, GHC.Internal.Data.Traversable.Traversable g) => GHC.Internal.Data.Traversable.Traversable (f GHC.Internal.Generics.:+: g) -- Defined in ‘GHC.Internal.Data.Traversable’
-instance forall (f :: * -> *) (g :: * -> *). (GHC.Internal.Data.Traversable.Traversable f, GHC.Internal.Data.Traversable.Traversable g) => GHC.Internal.Data.Traversable.Traversable (f GHC.Internal.Generics.:.: g) -- Defined in ‘GHC.Internal.Data.Traversable’
instance forall (f :: * -> *). GHC.Internal.Data.Traversable.Traversable f => GHC.Internal.Data.Traversable.Traversable (GHC.Internal.Data.Semigroup.Internal.Alt f) -- Defined in ‘GHC.Internal.Data.Traversable’
instance forall (f :: * -> *). GHC.Internal.Data.Traversable.Traversable f => GHC.Internal.Data.Traversable.Traversable (GHC.Internal.Data.Monoid.Ap f) -- Defined in ‘GHC.Internal.Data.Traversable’
instance forall i. GHC.Internal.Ix.Ix i => GHC.Internal.Data.Traversable.Traversable (GHC.Internal.Arr.Array i) -- Defined in ‘GHC.Internal.Data.Traversable’
@@ -11794,27 +11791,15 @@ instance GHC.Internal.Data.Traversable.Traversable GHC.Internal.Data.Semigroup.I
instance forall a. GHC.Internal.Data.Traversable.Traversable (GHC.Internal.Data.Either.Either a) -- Defined in ‘GHC.Internal.Data.Traversable’
instance GHC.Internal.Data.Traversable.Traversable GHC.Internal.Data.Monoid.First -- Defined in ‘GHC.Internal.Data.Traversable’
instance GHC.Internal.Data.Traversable.Traversable GHC.Internal.Data.Functor.Identity.Identity -- Defined in ‘GHC.Internal.Data.Traversable’
-instance forall i c. GHC.Internal.Data.Traversable.Traversable (GHC.Internal.Generics.K1 i c) -- Defined in ‘GHC.Internal.Data.Traversable’
instance GHC.Internal.Data.Traversable.Traversable GHC.Internal.Data.Monoid.Last -- Defined in ‘GHC.Internal.Data.Traversable’
instance GHC.Internal.Data.Traversable.Traversable [] -- Defined in ‘GHC.Internal.Data.Traversable’
-instance forall (f :: * -> *) i (c :: GHC.Internal.Generics.Meta). GHC.Internal.Data.Traversable.Traversable f => GHC.Internal.Data.Traversable.Traversable (GHC.Internal.Generics.M1 i c f) -- Defined in ‘GHC.Internal.Data.Traversable’
instance GHC.Internal.Data.Traversable.Traversable GHC.Internal.Maybe.Maybe -- Defined in ‘GHC.Internal.Data.Traversable’
instance GHC.Internal.Data.Traversable.Traversable GHC.Internal.Base.NonEmpty -- Defined in ‘GHC.Internal.Data.Traversable’
-instance GHC.Internal.Data.Traversable.Traversable GHC.Internal.Generics.Par1 -- Defined in ‘GHC.Internal.Data.Traversable’
instance GHC.Internal.Data.Traversable.Traversable GHC.Internal.Data.Semigroup.Internal.Product -- Defined in ‘GHC.Internal.Data.Traversable’
instance GHC.Internal.Data.Traversable.Traversable GHC.Internal.Data.Proxy.Proxy -- Defined in ‘GHC.Internal.Data.Traversable’
-instance forall (f :: * -> *). GHC.Internal.Data.Traversable.Traversable f => GHC.Internal.Data.Traversable.Traversable (GHC.Internal.Generics.Rec1 f) -- Defined in ‘GHC.Internal.Data.Traversable’
instance GHC.Internal.Data.Traversable.Traversable Solo -- Defined in ‘GHC.Internal.Data.Traversable’
instance GHC.Internal.Data.Traversable.Traversable GHC.Internal.Data.Semigroup.Internal.Sum -- Defined in ‘GHC.Internal.Data.Traversable’
instance forall a. GHC.Internal.Data.Traversable.Traversable ((,) a) -- Defined in ‘GHC.Internal.Data.Traversable’
-instance GHC.Internal.Data.Traversable.Traversable GHC.Internal.Generics.U1 -- Defined in ‘GHC.Internal.Data.Traversable’
-instance GHC.Internal.Data.Traversable.Traversable GHC.Internal.Generics.UAddr -- Defined in ‘GHC.Internal.Data.Traversable’
-instance GHC.Internal.Data.Traversable.Traversable GHC.Internal.Generics.UChar -- Defined in ‘GHC.Internal.Data.Traversable’
-instance GHC.Internal.Data.Traversable.Traversable GHC.Internal.Generics.UDouble -- Defined in ‘GHC.Internal.Data.Traversable’
-instance GHC.Internal.Data.Traversable.Traversable GHC.Internal.Generics.UFloat -- Defined in ‘GHC.Internal.Data.Traversable’
-instance GHC.Internal.Data.Traversable.Traversable GHC.Internal.Generics.UInt -- Defined in ‘GHC.Internal.Data.Traversable’
-instance GHC.Internal.Data.Traversable.Traversable GHC.Internal.Generics.UWord -- Defined in ‘GHC.Internal.Data.Traversable’
-instance GHC.Internal.Data.Traversable.Traversable GHC.Internal.Generics.V1 -- Defined in ‘GHC.Internal.Data.Traversable’
instance GHC.Internal.Data.Traversable.Traversable Data.Complex.Complex -- Defined in ‘Data.Complex’
instance forall (f :: * -> *) (g :: * -> *). (GHC.Internal.Data.Traversable.Traversable f, GHC.Internal.Data.Traversable.Traversable g) => GHC.Internal.Data.Traversable.Traversable (Data.Functor.Compose.Compose f g) -- Defined in ‘Data.Functor.Compose’
instance [safe] forall (f :: * -> *) (g :: * -> *). (GHC.Internal.Data.Traversable.Traversable f, GHC.Internal.Data.Traversable.Traversable g) => GHC.Internal.Data.Traversable.Traversable (Data.Functor.Product.Product f g) -- Defined in ‘Data.Functor.Product’
@@ -11824,6 +11809,21 @@ instance GHC.Internal.Data.Traversable.Traversable Data.Semigroup.First -- Defin
instance GHC.Internal.Data.Traversable.Traversable Data.Semigroup.Last -- Defined in ‘Data.Semigroup’
instance GHC.Internal.Data.Traversable.Traversable Data.Semigroup.Max -- Defined in ‘Data.Semigroup’
instance GHC.Internal.Data.Traversable.Traversable Data.Semigroup.Min -- Defined in ‘Data.Semigroup’
+instance forall (f :: * -> *) (g :: * -> *). (GHC.Internal.Data.Traversable.Traversable f, GHC.Internal.Data.Traversable.Traversable g) => GHC.Internal.Data.Traversable.Traversable (f GHC.Internal.Generics.:*: g) -- Defined in ‘GHC.Internal.Generics’
+instance forall (f :: * -> *) (g :: * -> *). (GHC.Internal.Data.Traversable.Traversable f, GHC.Internal.Data.Traversable.Traversable g) => GHC.Internal.Data.Traversable.Traversable (f GHC.Internal.Generics.:+: g) -- Defined in ‘GHC.Internal.Generics’
+instance forall (f :: * -> *) (g :: * -> *). (GHC.Internal.Data.Traversable.Traversable f, GHC.Internal.Data.Traversable.Traversable g) => GHC.Internal.Data.Traversable.Traversable (f GHC.Internal.Generics.:.: g) -- Defined in ‘GHC.Internal.Generics’
+instance forall i c. GHC.Internal.Data.Traversable.Traversable (GHC.Internal.Generics.K1 i c) -- Defined in ‘GHC.Internal.Generics’
+instance forall (f :: * -> *) i (c :: GHC.Internal.Generics.Meta). GHC.Internal.Data.Traversable.Traversable f => GHC.Internal.Data.Traversable.Traversable (GHC.Internal.Generics.M1 i c f) -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Data.Traversable.Traversable GHC.Internal.Generics.Par1 -- Defined in ‘GHC.Internal.Generics’
+instance forall (f :: * -> *). GHC.Internal.Data.Traversable.Traversable f => GHC.Internal.Data.Traversable.Traversable (GHC.Internal.Generics.Rec1 f) -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Data.Traversable.Traversable GHC.Internal.Generics.U1 -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Data.Traversable.Traversable GHC.Internal.Generics.UAddr -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Data.Traversable.Traversable GHC.Internal.Generics.UChar -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Data.Traversable.Traversable GHC.Internal.Generics.UDouble -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Data.Traversable.Traversable GHC.Internal.Generics.UFloat -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Data.Traversable.Traversable GHC.Internal.Generics.UInt -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Data.Traversable.Traversable GHC.Internal.Generics.UWord -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Data.Traversable.Traversable GHC.Internal.Generics.V1 -- Defined in ‘GHC.Internal.Generics’
instance GHC.Internal.Data.Type.Coercion.TestCoercion GHC.Internal.TypeNats.SNat -- Defined in ‘GHC.Internal.TypeNats’
instance GHC.Internal.Data.Type.Coercion.TestCoercion GHC.Internal.TypeLits.SChar -- Defined in ‘GHC.Internal.TypeLits’
instance GHC.Internal.Data.Type.Coercion.TestCoercion GHC.Internal.TypeLits.SSymbol -- Defined in ‘GHC.Internal.TypeLits’
@@ -12110,25 +12110,11 @@ instance forall (n :: GHC.Internal.Types.Symbol) (f :: GHC.Internal.Generics.Fix
instance forall (n :: GHC.Internal.Types.Symbol) (m :: GHC.Internal.Types.Symbol) (p :: GHC.Internal.Types.Symbol) (nt :: GHC.Internal.Types.Bool). (GHC.Internal.TypeLits.KnownSymbol n, GHC.Internal.TypeLits.KnownSymbol m, GHC.Internal.TypeLits.KnownSymbol p, GHC.Internal.Generics.SingI nt) => GHC.Internal.Generics.Datatype (GHC.Internal.Generics.MetaData n m p nt) -- Defined in ‘GHC.Internal.Generics’
instance forall (a :: * -> * -> *) b c. GHC.Internal.Generics.Generic (Control.Applicative.WrappedArrow a b c) -- Defined in ‘Control.Applicative’
instance forall (m :: * -> *) a. GHC.Internal.Generics.Generic (Control.Applicative.WrappedMonad m a) -- Defined in ‘Control.Applicative’
-instance forall a k (b :: k). GHC.Internal.Generics.Generic (GHC.Internal.Data.Functor.Const.Const a b) -- Defined in ‘GHC.Internal.Data.Functor.Const’
-instance forall a. GHC.Internal.Generics.Generic (GHC.Internal.Functor.ZipList.ZipList a) -- Defined in ‘GHC.Internal.Functor.ZipList’
instance forall (m :: * -> *) a b. GHC.Internal.Generics.Generic (GHC.Internal.Control.Arrow.Kleisli m a b) -- Defined in ‘GHC.Internal.Control.Arrow’
-instance GHC.Internal.Generics.Generic GHC.Internal.IO.Exception.ExitCode -- Defined in ‘GHC.Internal.IO.Exception’
instance forall a. GHC.Internal.Generics.Generic (Data.Complex.Complex a) -- Defined in ‘Data.Complex’
instance forall k1 (f :: k1 -> *) k2 (g :: k2 -> k1) (a :: k2). GHC.Internal.Generics.Generic (Data.Functor.Compose.Compose f g a) -- Defined in ‘Data.Functor.Compose’
-instance forall a. GHC.Internal.Generics.Generic (GHC.Internal.Data.Functor.Identity.Identity a) -- Defined in ‘GHC.Internal.Data.Functor.Identity’
instance [safe] forall k (f :: k -> *) (g :: k -> *) (a :: k). GHC.Internal.Generics.Generic (Data.Functor.Product.Product f g a) -- Defined in ‘Data.Functor.Product’
instance [safe] forall k (f :: k -> *) (g :: k -> *) (a :: k). GHC.Internal.Generics.Generic (Data.Functor.Sum.Sum f g a) -- Defined in ‘Data.Functor.Sum’
-instance GHC.Internal.Generics.Generic GHC.Internal.Data.Semigroup.Internal.All -- Defined in ‘GHC.Internal.Data.Semigroup.Internal’
-instance forall k (f :: k -> *) (a :: k). GHC.Internal.Generics.Generic (GHC.Internal.Data.Semigroup.Internal.Alt f a) -- Defined in ‘GHC.Internal.Data.Semigroup.Internal’
-instance GHC.Internal.Generics.Generic GHC.Internal.Data.Semigroup.Internal.Any -- Defined in ‘GHC.Internal.Data.Semigroup.Internal’
-instance forall a. GHC.Internal.Generics.Generic (GHC.Internal.Data.Semigroup.Internal.Dual a) -- Defined in ‘GHC.Internal.Data.Semigroup.Internal’
-instance forall a. GHC.Internal.Generics.Generic (GHC.Internal.Data.Semigroup.Internal.Endo a) -- Defined in ‘GHC.Internal.Data.Semigroup.Internal’
-instance forall a. GHC.Internal.Generics.Generic (GHC.Internal.Data.Semigroup.Internal.Product a) -- Defined in ‘GHC.Internal.Data.Semigroup.Internal’
-instance forall a. GHC.Internal.Generics.Generic (GHC.Internal.Data.Semigroup.Internal.Sum a) -- Defined in ‘GHC.Internal.Data.Semigroup.Internal’
-instance forall k (f :: k -> *) (a :: k). GHC.Internal.Generics.Generic (GHC.Internal.Data.Monoid.Ap f a) -- Defined in ‘GHC.Internal.Data.Monoid’
-instance forall a. GHC.Internal.Generics.Generic (GHC.Internal.Data.Monoid.First a) -- Defined in ‘GHC.Internal.Data.Monoid’
-instance forall a. GHC.Internal.Generics.Generic (GHC.Internal.Data.Monoid.Last a) -- Defined in ‘GHC.Internal.Data.Monoid’
instance forall a b. GHC.Internal.Generics.Generic (Data.Semigroup.Arg a b) -- Defined in ‘Data.Semigroup’
instance forall a. GHC.Internal.Generics.Generic (Data.Semigroup.First a) -- Defined in ‘Data.Semigroup’
instance forall a. GHC.Internal.Generics.Generic (Data.Semigroup.Last a) -- Defined in ‘Data.Semigroup’
@@ -12136,31 +12122,59 @@ instance forall a. GHC.Internal.Generics.Generic (Data.Semigroup.Max a) -- Defin
instance forall a. GHC.Internal.Generics.Generic (Data.Semigroup.Min a) -- Defined in ‘Data.Semigroup’
instance forall m. GHC.Internal.Generics.Generic (Data.Semigroup.WrappedMonoid m) -- Defined in ‘Data.Semigroup’
instance GHC.Internal.Generics.Generic GHC.Internal.Data.Version.Version -- Defined in ‘GHC.Internal.Data.Version’
-instance GHC.Internal.Generics.Generic GHC.Internal.ByteOrder.ByteOrder -- Defined in ‘GHC.Internal.ByteOrder’
instance forall k (f :: k -> *) (g :: k -> *) (p :: k). GHC.Internal.Generics.Generic ((GHC.Internal.Generics.:*:) f g p) -- Defined in ‘GHC.Internal.Generics’
instance forall k (f :: k -> *) (g :: k -> *) (p :: k). GHC.Internal.Generics.Generic ((GHC.Internal.Generics.:+:) f g p) -- Defined in ‘GHC.Internal.Generics’
instance forall k2 (f :: k2 -> *) k1 (g :: k1 -> k2) (p :: k1). GHC.Internal.Generics.Generic ((GHC.Internal.Generics.:.:) f g p) -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Generics.Generic GHC.Internal.Data.Semigroup.Internal.All -- Defined in ‘GHC.Internal.Generics’
+instance forall k (f :: k -> *) (a :: k). GHC.Internal.Generics.Generic (GHC.Internal.Data.Semigroup.Internal.Alt f a) -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Generics.Generic GHC.Internal.Data.Semigroup.Internal.Any -- Defined in ‘GHC.Internal.Generics’
+instance forall k (f :: k -> *) (a :: k). GHC.Internal.Generics.Generic (GHC.Internal.Data.Monoid.Ap f a) -- Defined in ‘GHC.Internal.Generics’
instance GHC.Internal.Generics.Generic GHC.Internal.Generics.Associativity -- Defined in ‘GHC.Internal.Generics’
instance GHC.Internal.Generics.Generic GHC.Internal.Types.Bool -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Generics.Generic GHC.Internal.ByteOrder.ByteOrder -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.CCFlags -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.ConcFlags -- Defined in ‘GHC.Internal.Generics’
+instance forall k a (b :: k). GHC.Internal.Generics.Generic (GHC.Internal.Data.Functor.Const.Const a b) -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.DebugFlags -- Defined in ‘GHC.Internal.Generics’
instance GHC.Internal.Generics.Generic GHC.Internal.Generics.DecidedStrictness -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.DoCostCentres -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.DoHeapProfile -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.DoTrace -- Defined in ‘GHC.Internal.Generics’
instance forall a. GHC.Internal.Generics.Generic (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Generics’
+instance forall a. GHC.Internal.Generics.Generic (GHC.Internal.Data.Semigroup.Internal.Dual a) -- Defined in ‘GHC.Internal.Generics’
instance forall a b. GHC.Internal.Generics.Generic (GHC.Internal.Data.Either.Either a b) -- Defined in ‘GHC.Internal.Generics’
+instance forall a. GHC.Internal.Generics.Generic (GHC.Internal.Data.Semigroup.Internal.Endo a) -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Generics.Generic GHC.Internal.IO.Exception.ExitCode -- Defined in ‘GHC.Internal.Generics’
instance GHC.Internal.Generics.Generic GHC.Internal.Fingerprint.Type.Fingerprint -- Defined in ‘GHC.Internal.Generics’
+instance forall a. GHC.Internal.Generics.Generic (GHC.Internal.Data.Monoid.First a) -- Defined in ‘GHC.Internal.Generics’
instance GHC.Internal.Generics.Generic GHC.Internal.Generics.Fixity -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.GCFlags -- Defined in ‘GHC.Internal.Generics’
instance GHC.Internal.Generics.Generic GHC.Internal.Unicode.GeneralCategory -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.GiveGCStats -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.HpcFlags -- Defined in ‘GHC.Internal.Generics’
+instance forall a. GHC.Internal.Generics.Generic (GHC.Internal.Data.Functor.Identity.Identity a) -- Defined in ‘GHC.Internal.Generics’
instance forall i c k (p :: k). GHC.Internal.Generics.Generic (GHC.Internal.Generics.K1 i c p) -- Defined in ‘GHC.Internal.Generics’
+instance forall a. GHC.Internal.Generics.Generic (GHC.Internal.Data.Monoid.Last a) -- Defined in ‘GHC.Internal.Generics’
instance forall a. GHC.Internal.Generics.Generic [a] -- Defined in ‘GHC.Internal.Generics’
instance forall i (c :: GHC.Internal.Generics.Meta) k (f :: k -> *) (p :: k). GHC.Internal.Generics.Generic (GHC.Internal.Generics.M1 i c f p) -- Defined in ‘GHC.Internal.Generics’
instance forall a. GHC.Internal.Generics.Generic (GHC.Internal.Maybe.Maybe a) -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.MiscFlags -- Defined in ‘GHC.Internal.Generics’
instance forall a. GHC.Internal.Generics.Generic (GHC.Internal.Base.NonEmpty a) -- Defined in ‘GHC.Internal.Generics’
instance GHC.Internal.Generics.Generic GHC.Internal.Types.Ordering -- Defined in ‘GHC.Internal.Generics’
instance forall p. GHC.Internal.Generics.Generic (GHC.Internal.Generics.Par1 p) -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.ParFlags -- Defined in ‘GHC.Internal.Generics’
+instance forall a. GHC.Internal.Generics.Generic (GHC.Internal.Data.Semigroup.Internal.Product a) -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.ProfFlags -- Defined in ‘GHC.Internal.Generics’
instance forall k (t :: k). GHC.Internal.Generics.Generic (GHC.Internal.Data.Proxy.Proxy t) -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.RTSFlags -- Defined in ‘GHC.Internal.Generics’
instance forall k (f :: k -> *) (p :: k). GHC.Internal.Generics.Generic (GHC.Internal.Generics.Rec1 f p) -- Defined in ‘GHC.Internal.Generics’
instance forall a. GHC.Internal.Generics.Generic (Solo a) -- Defined in ‘GHC.Internal.Generics’
instance GHC.Internal.Generics.Generic GHC.Internal.Generics.SourceStrictness -- Defined in ‘GHC.Internal.Generics’
instance GHC.Internal.Generics.Generic GHC.Internal.Generics.SourceUnpackedness -- Defined in ‘GHC.Internal.Generics’
instance GHC.Internal.Generics.Generic GHC.Internal.Stack.Types.SrcLoc -- Defined in ‘GHC.Internal.Generics’
+instance forall a. GHC.Internal.Generics.Generic (GHC.Internal.Data.Semigroup.Internal.Sum a) -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.TickyFlags -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.TraceFlags -- Defined in ‘GHC.Internal.Generics’
instance forall a b c d e f g h i j. GHC.Internal.Generics.Generic (a, b, c, d, e, f, g, h, i, j) -- Defined in ‘GHC.Internal.Generics’
instance forall a b c d e f g h i j k. GHC.Internal.Generics.Generic (a, b, c, d, e, f, g, h, i, j, k) -- Defined in ‘GHC.Internal.Generics’
instance forall a b c d e f g h i j k l. GHC.Internal.Generics.Generic (a, b, c, d, e, f, g, h, i, j, k, l) -- Defined in ‘GHC.Internal.Generics’
@@ -12185,6 +12199,7 @@ instance forall k (p :: k). GHC.Internal.Generics.Generic (GHC.Internal.Generics
instance GHC.Internal.Generics.Generic () -- Defined in ‘GHC.Internal.Generics’
instance forall k (p :: k). GHC.Internal.Generics.Generic (GHC.Internal.Generics.V1 p) -- Defined in ‘GHC.Internal.Generics’
instance GHC.Internal.Generics.Generic GHC.Internal.Base.Void -- Defined in ‘GHC.Internal.Generics’
+instance forall a. GHC.Internal.Generics.Generic (GHC.Internal.Functor.ZipList.ZipList a) -- Defined in ‘GHC.Internal.Generics’
instance GHC.Internal.Generics.Generic GHC.RTS.Flags.CCFlags -- Defined in ‘GHC.RTS.Flags’
instance GHC.Internal.Generics.Generic GHC.RTS.Flags.ConcFlags -- Defined in ‘GHC.RTS.Flags’
instance GHC.Internal.Generics.Generic GHC.RTS.Flags.DebugFlags -- Defined in ‘GHC.RTS.Flags’
@@ -12204,15 +12219,8 @@ instance [safe] GHC.Internal.Generics.Generic GHC.Stats.GCDetails -- Defined in
instance [safe] GHC.Internal.Generics.Generic GHC.Stats.RTSStats -- Defined in ‘GHC.Stats’
instance forall (a :: * -> * -> *) b. GHC.Internal.Generics.Generic1 (Control.Applicative.WrappedArrow a b) -- Defined in ‘Control.Applicative’
instance forall (m :: * -> *). GHC.Internal.Generics.Generic1 (Control.Applicative.WrappedMonad m) -- Defined in ‘Control.Applicative’
-instance GHC.Internal.Generics.Generic1 GHC.Internal.Functor.ZipList.ZipList -- Defined in ‘GHC.Internal.Functor.ZipList’
instance forall (m :: * -> *) a. GHC.Internal.Generics.Generic1 (GHC.Internal.Control.Arrow.Kleisli m a) -- Defined in ‘GHC.Internal.Control.Arrow’
instance GHC.Internal.Generics.Generic1 Data.Complex.Complex -- Defined in ‘Data.Complex’
-instance GHC.Internal.Generics.Generic1 GHC.Internal.Data.Functor.Identity.Identity -- Defined in ‘GHC.Internal.Data.Functor.Identity’
-instance GHC.Internal.Generics.Generic1 GHC.Internal.Data.Semigroup.Internal.Dual -- Defined in ‘GHC.Internal.Data.Semigroup.Internal’
-instance GHC.Internal.Generics.Generic1 GHC.Internal.Data.Semigroup.Internal.Product -- Defined in ‘GHC.Internal.Data.Semigroup.Internal’
-instance GHC.Internal.Generics.Generic1 GHC.Internal.Data.Semigroup.Internal.Sum -- Defined in ‘GHC.Internal.Data.Semigroup.Internal’
-instance GHC.Internal.Generics.Generic1 GHC.Internal.Data.Monoid.First -- Defined in ‘GHC.Internal.Data.Monoid’
-instance GHC.Internal.Generics.Generic1 GHC.Internal.Data.Monoid.Last -- Defined in ‘GHC.Internal.Data.Monoid’
instance forall a. GHC.Internal.Generics.Generic1 (Data.Semigroup.Arg a) -- Defined in ‘Data.Semigroup’
instance GHC.Internal.Generics.Generic1 Data.Semigroup.First -- Defined in ‘Data.Semigroup’
instance GHC.Internal.Generics.Generic1 Data.Semigroup.Last -- Defined in ‘Data.Semigroup’
@@ -12220,12 +12228,18 @@ instance GHC.Internal.Generics.Generic1 Data.Semigroup.Max -- Defined in ‘Data
instance GHC.Internal.Generics.Generic1 Data.Semigroup.Min -- Defined in ‘Data.Semigroup’
instance GHC.Internal.Generics.Generic1 Data.Semigroup.WrappedMonoid -- Defined in ‘Data.Semigroup’
instance GHC.Internal.Generics.Generic1 GHC.Internal.Data.Ord.Down -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Generics.Generic1 GHC.Internal.Data.Semigroup.Internal.Dual -- Defined in ‘GHC.Internal.Generics’
instance forall a. GHC.Internal.Generics.Generic1 (GHC.Internal.Data.Either.Either a) -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Generics.Generic1 GHC.Internal.Data.Monoid.First -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Generics.Generic1 GHC.Internal.Data.Functor.Identity.Identity -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Generics.Generic1 GHC.Internal.Data.Monoid.Last -- Defined in ‘GHC.Internal.Generics’
instance GHC.Internal.Generics.Generic1 [] -- Defined in ‘GHC.Internal.Generics’
instance GHC.Internal.Generics.Generic1 GHC.Internal.Maybe.Maybe -- Defined in ‘GHC.Internal.Generics’
instance GHC.Internal.Generics.Generic1 GHC.Internal.Base.NonEmpty -- Defined in ‘GHC.Internal.Generics’
instance GHC.Internal.Generics.Generic1 GHC.Internal.Generics.Par1 -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Generics.Generic1 GHC.Internal.Data.Semigroup.Internal.Product -- Defined in ‘GHC.Internal.Generics’
instance GHC.Internal.Generics.Generic1 Solo -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Generics.Generic1 GHC.Internal.Data.Semigroup.Internal.Sum -- Defined in ‘GHC.Internal.Generics’
instance forall a b c d e f g h i. GHC.Internal.Generics.Generic1 ((,,,,,,,,,) a b c d e f g h i) -- Defined in ‘GHC.Internal.Generics’
instance forall a b c d e f g h i j. GHC.Internal.Generics.Generic1 ((,,,,,,,,,,) a b c d e f g h i j) -- Defined in ‘GHC.Internal.Generics’
instance forall a b c d e f g h i j k. GHC.Internal.Generics.Generic1 ((,,,,,,,,,,,) a b c d e f g h i j k) -- Defined in ‘GHC.Internal.Generics’
@@ -12240,15 +12254,16 @@ instance forall a b c d e. GHC.Internal.Generics.Generic1 ((,,,,,) a b c d e) --
instance forall a b c d e f. GHC.Internal.Generics.Generic1 ((,,,,,,) a b c d e f) -- Defined in ‘GHC.Internal.Generics’
instance forall a b c d e f g. GHC.Internal.Generics.Generic1 ((,,,,,,,) a b c d e f g) -- Defined in ‘GHC.Internal.Generics’
instance forall a b c d e f g h. GHC.Internal.Generics.Generic1 ((,,,,,,,,) a b c d e f g h) -- Defined in ‘GHC.Internal.Generics’
-instance forall k1 a. GHC.Internal.Generics.Generic1 (GHC.Internal.Data.Functor.Const.Const a) -- Defined in ‘GHC.Internal.Data.Functor.Const’
+instance GHC.Internal.Generics.Generic1 GHC.Internal.Functor.ZipList.ZipList -- Defined in ‘GHC.Internal.Generics’
instance forall (f :: * -> *) k1 (g :: k1 -> *). GHC.Internal.Base.Functor f => GHC.Internal.Generics.Generic1 (Data.Functor.Compose.Compose f g) -- Defined in ‘Data.Functor.Compose’
instance [safe] forall k1 (f :: k1 -> *) (g :: k1 -> *). GHC.Internal.Generics.Generic1 (Data.Functor.Product.Product f g) -- Defined in ‘Data.Functor.Product’
instance [safe] forall k1 (f :: k1 -> *) (g :: k1 -> *). GHC.Internal.Generics.Generic1 (Data.Functor.Sum.Sum f g) -- Defined in ‘Data.Functor.Sum’
-instance forall k1 (f :: k1 -> *). GHC.Internal.Generics.Generic1 (GHC.Internal.Data.Semigroup.Internal.Alt f) -- Defined in ‘GHC.Internal.Data.Semigroup.Internal’
-instance forall k1 (f :: k1 -> *). GHC.Internal.Generics.Generic1 (GHC.Internal.Data.Monoid.Ap f) -- Defined in ‘GHC.Internal.Data.Monoid’
instance forall k (f :: k -> *) (g :: k -> *). GHC.Internal.Generics.Generic1 (f GHC.Internal.Generics.:*: g) -- Defined in ‘GHC.Internal.Generics’
instance forall k (f :: k -> *) (g :: k -> *). GHC.Internal.Generics.Generic1 (f GHC.Internal.Generics.:+: g) -- Defined in ‘GHC.Internal.Generics’
instance forall (f :: * -> *) k (g :: k -> *). GHC.Internal.Base.Functor f => GHC.Internal.Generics.Generic1 (f GHC.Internal.Generics.:.: g) -- Defined in ‘GHC.Internal.Generics’
+instance forall k (f :: k -> *). GHC.Internal.Generics.Generic1 (GHC.Internal.Data.Semigroup.Internal.Alt f) -- Defined in ‘GHC.Internal.Generics’
+instance forall k (f :: k -> *). GHC.Internal.Generics.Generic1 (GHC.Internal.Data.Monoid.Ap f) -- Defined in ‘GHC.Internal.Generics’
+instance forall k a. GHC.Internal.Generics.Generic1 (GHC.Internal.Data.Functor.Const.Const a) -- Defined in ‘GHC.Internal.Generics’
instance forall k i c. GHC.Internal.Generics.Generic1 (GHC.Internal.Generics.K1 i c) -- Defined in ‘GHC.Internal.Generics’
instance forall i (c :: GHC.Internal.Generics.Meta) k (f :: k -> *). GHC.Internal.Generics.Generic1 (GHC.Internal.Generics.M1 i c f) -- Defined in ‘GHC.Internal.Generics’
instance forall k. GHC.Internal.Generics.Generic1 GHC.Internal.Data.Proxy.Proxy -- Defined in ‘GHC.Internal.Generics’
@@ -12428,6 +12443,7 @@ instance forall a. GHC.Internal.Read.Read a => GHC.Internal.Read.Read (GHC.Inter
instance forall a. GHC.Internal.Read.Read a => GHC.Internal.Read.Read (GHC.Internal.Data.Bits.Xor a) -- Defined in ‘GHC.Internal.Data.Bits’
instance forall a b. (GHC.Internal.Ix.Ix a, GHC.Internal.Read.Read a, GHC.Internal.Read.Read b) => GHC.Internal.Read.Read (GHC.Internal.Arr.Array a b) -- Defined in ‘GHC.Internal.Read’
instance GHC.Internal.Read.Read GHC.Internal.Types.Bool -- Defined in ‘GHC.Internal.Read’
+instance GHC.Internal.Read.Read GHC.Internal.ByteOrder.ByteOrder -- Defined in ‘GHC.Internal.Read’
instance GHC.Internal.Read.Read GHC.Internal.Types.Char -- Defined in ‘GHC.Internal.Read’
instance GHC.Internal.Read.Read GHC.Internal.Types.Double -- Defined in ‘GHC.Internal.Read’
instance GHC.Internal.Read.Read GHC.Internal.Types.Float -- Defined in ‘GHC.Internal.Read’
@@ -12523,7 +12539,6 @@ instance GHC.Internal.Read.Read GHC.Internal.Foreign.C.Types.CULong -- Defined i
instance GHC.Internal.Read.Read GHC.Internal.Foreign.C.Types.CUSeconds -- Defined in ‘GHC.Internal.Foreign.C.Types’
instance GHC.Internal.Read.Read GHC.Internal.Foreign.C.Types.CUShort -- Defined in ‘GHC.Internal.Foreign.C.Types’
instance GHC.Internal.Read.Read GHC.Internal.Foreign.C.Types.CWchar -- Defined in ‘GHC.Internal.Foreign.C.Types’
-instance GHC.Internal.Read.Read GHC.Internal.ByteOrder.ByteOrder -- Defined in ‘GHC.Internal.ByteOrder’
instance forall k (f :: k -> *) (g :: k -> *) (p :: k). (GHC.Internal.Read.Read (f p), GHC.Internal.Read.Read (g p)) => GHC.Internal.Read.Read ((GHC.Internal.Generics.:*:) f g p) -- Defined in ‘GHC.Internal.Generics’
instance forall k (f :: k -> *) (g :: k -> *) (p :: k). (GHC.Internal.Read.Read (f p), GHC.Internal.Read.Read (g p)) => GHC.Internal.Read.Read ((GHC.Internal.Generics.:+:) f g p) -- Defined in ‘GHC.Internal.Generics’
instance forall k2 (f :: k2 -> *) k1 (g :: k1 -> k2) (p :: k1). GHC.Internal.Read.Read (f (g p)) => GHC.Internal.Read.Read ((GHC.Internal.Generics.:.:) f g p) -- Defined in ‘GHC.Internal.Generics’
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0a66581b1a1afbd5b2fa6c298a5fd94…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0a66581b1a1afbd5b2fa6c298a5fd94…
You're receiving this email because of your account on gitlab.haskell.org.
1
0
[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 2 commits: Add optional `SrcLoc` to `StackAnnotation` class
by Marge Bot (@marge-bot) 20 Feb '26
by Marge Bot (@marge-bot) 20 Feb '26
20 Feb '26
Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC
Commits:
59318907 by fendor at 2026-02-20T04:44:23-05:00
Add optional `SrcLoc` to `StackAnnotation` class
`StackAnnotation`s give access to an optional `SrcLoc` field that
user-added stack annotations can use to provide better backtraces in both error
messages and when decoding the callstack.
We update builtin stack annotations such as `StringAnnotation` and
`ShowAnnotation` to also capture the `SrcLoc` of the current `CallStack`
to improve backtraces by default (if stack annotations are used).
This change is backwards compatible with GHC 9.14.1.
- - - - -
c36d2bb8 by Simon Hengel at 2026-02-20T04:44:24-05:00
docs: Fix grammar in explicit_namespaces.rst
- - - - -
21 changed files:
- docs/users_guide/exts/explicit_namespaces.rst
- libraries/ghc-experimental/CHANGELOG.md
- libraries/ghc-experimental/src/GHC/Stack/Annotation/Experimental.hs
- + libraries/ghc-experimental/tests/Makefile
- + libraries/ghc-experimental/tests/all.T
- + libraries/ghc-experimental/tests/backtraces/Makefile
- + libraries/ghc-experimental/tests/backtraces/T26806a.hs
- + libraries/ghc-experimental/tests/backtraces/T26806a.stderr
- + libraries/ghc-experimental/tests/backtraces/T26806b.hs
- + libraries/ghc-experimental/tests/backtraces/T26806b.stderr
- + libraries/ghc-experimental/tests/backtraces/T26806c.hs
- + libraries/ghc-experimental/tests/backtraces/T26806c.stderr
- + libraries/ghc-experimental/tests/backtraces/all.T
- libraries/ghc-internal/src/GHC/Internal/Stack/Annotation.hs
- libraries/ghc-internal/tests/stack-annotation/ann_frame001.stdout
- libraries/ghc-internal/tests/stack-annotation/ann_frame002.stdout
- libraries/ghc-internal/tests/stack-annotation/ann_frame003.stdout
- libraries/ghc-internal/tests/stack-annotation/ann_frame004.stdout
- libraries/ghc-internal/tests/stack-annotation/ann_frame005.stdout
- testsuite/tests/interface-stability/ghc-experimental-exports.stdout
- testsuite/tests/interface-stability/ghc-experimental-exports.stdout-mingw32
Changes:
=====================================
docs/users_guide/exts/explicit_namespaces.rst
=====================================
@@ -86,7 +86,7 @@ However, how would one import only the data constructor? There are two options:
import Data.Proxy (data Proxy) -- imports the data constructor only
import Data.Proxy (pattern Proxy) -- imports the data constructor only
-The ``data`` keyword enables the import or export a data constructor without its
+The ``data`` keyword allows a data constructor to be imported or exported without its
parent type constructor.
The ``pattern`` keyword does the same, with only a few differences:
=====================================
libraries/ghc-experimental/CHANGELOG.md
=====================================
@@ -5,12 +5,17 @@
- New and/or/xor SIMD primops for bitwise logical operations, such as andDoubleX4#, orWord32X4#, xorInt8X16#, etc.
These are supported by the LLVM backend and by the X86_64 NCG backend (for the latter, only for 128-wide vectors).
-## ghc-experimental-9.1401.0,
+## ghc-experimental-9.1402.0
+
+- Add optional `SrcLoc` to `StackAnnotation` class in `GHC.Stack.Annotation.Experimental`
+
+## ghc-experimental-9.1401.0
- Expose access to RTS flags via `GHC.RTS.Flags.Experimental`
- Expose access to era profiling interface via `GHC.Profiling.Eras`
- Expose access to runtime stack annotations via `GHC.Stack.Annotation.Experimental`
- Expose custom allocation limit handler via `System.Mem.Experimental`
+- Expose access to Stack Annotations via `GHC.Stack.Annotation.Experimental`
- Expose module Prelude.Experimental, which reexports some modules from ghc-experimental for convenience, like Prelude does for base.
## ghc-experimental-9.1201.0
=====================================
libraries/ghc-experimental/src/GHC/Stack/Annotation/Experimental.hs
=====================================
@@ -82,9 +82,6 @@ import GHC.Internal.Stack.Annotation
-- the pure variations can behave in ways that are hard to predict.
--
-- See Note [Stack annotations in pure code] for more details.
---
--- At last, stack annotations are tricky to use with 'error'.
--- See Note [Pushing annotation frames on 'error'] for why this is the case.
-- Note [Stack annotations in pure code]
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -96,57 +93,50 @@ import GHC.Internal.Stack.Annotation
-- For example:
--
-- @
--- annotateStackShow (5 @Int) (fib 20 + throw (ErrorCall "Oh no!"))
+-- annotateStackShow (5 @Int) (fib 20 + error "Oh no!")
-- @
--
--- Without forcing the result of @(fib 20 + throw (ErrorCall "Oh no!"))@, the computation
+-- Without forcing the result of @(fib 20 + error "Oh no!")@, the computation
-- will simply return a thunk, and the stack annotation would be popped off the stack.
-- Once the thunk is evaluated, the exception is raised, but no stack annotation will be found!
--- If we force the result of @(fib 20 + throw (ErrorCall "Oh no!"))@, then the stack
+-- If we force the result of @(fib 20 + error "Oh no!")@, then the stack
-- annotations remain on the stack, and are displayed in the stack trace.
--
-- Naturally, this only holds if no imprecise exceptions are thrown during evaluation of any
-- nested value, for example in 'annotateStackShow 5 (Just $ throw (ErrorCall "Oh no!"))', the
-- stack trace will not include the value @5@.
--
--- See how we preferred @throw (ErrorCall ...)@ over @error@?
--- See Note [Pushing annotation frames on 'error'] for why we do this.
-
--- Note [Pushing annotation frames on 'error']
--- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--- Examples so far have not been using 'error' at all.
--- The reason is that 'error' is extraordinarily difficult to use correctly with stack annotation frames.
--- See Note [Capturing the backtrace in throw] for a detailed discussion of how 'throw'
--- manages to capture 'Backtraces'.
---
--- Long story short, 'error' does not do the same thing as 'throw' and is subtly different
--- in terms of evaluation, cause it to bypass the stack annotation frames, especially in
--- pure code.
---
--- However, even in 'IO' code, it is difficult to use 'error' and obtain stack annotation frames
--- close to the call site due to the same issue of laziness and backtrace collection.
---
--- This means, right now, if you want to reliably capture stack frame annotations,
--- in both pure and impure code, prefer 'throw' and 'throwIO' variants over 'error'.
-- ----------------------------------------------------------------------------
-- Annotations
-- ----------------------------------------------------------------------------
+
+-- | A 'String' only annotation with an optional source location.
data StringAnnotation where
- StringAnnotation :: String -> StringAnnotation
+ StringAnnotation :: !(Maybe SrcLoc) -> String -> StringAnnotation
instance StackAnnotation StringAnnotation where
- displayStackAnnotation (StringAnnotation str) = str
+ displayStackAnnotationShort (StringAnnotation _srcLoc str) =
+ str
+
+ stackAnnotationSourceLocation (StringAnnotation srcLoc _str) =
+ srcLoc
-- | Use the 'Show' instance of a type to display as the 'StackAnnotation'.
data ShowAnnotation where
- ShowAnnotation :: forall a . Show a => a -> ShowAnnotation
+ ShowAnnotation :: forall a . Show a => !(Maybe SrcLoc) -> a -> ShowAnnotation
instance StackAnnotation ShowAnnotation where
- displayStackAnnotation (ShowAnnotation showAnno) = show showAnno
+ displayStackAnnotationShort (ShowAnnotation _srcLoc showAnno) =
+ show showAnno
+
+ stackAnnotationSourceLocation (ShowAnnotation srcLoc _showAnno) =
+ srcLoc
-- | A 'CallStack' stack annotation.
+--
+-- Captures the whole 'CallStack'.
newtype CallStackAnnotation = CallStackAnnotation CallStack
instance Show CallStackAnnotation where
@@ -154,9 +144,23 @@ instance Show CallStackAnnotation where
-- | Displays the first entry of the 'CallStack'
instance StackAnnotation CallStackAnnotation where
- displayStackAnnotation (CallStackAnnotation cs) = case getCallStack cs of
+ stackAnnotationSourceLocation (CallStackAnnotation cs) =
+ callStackHeadSrcLoc cs
+
+ displayStackAnnotationShort (CallStackAnnotation cs) =
+ callStackHeadFunctionName cs
+
+callStackHeadSrcLoc :: CallStack -> Maybe SrcLoc
+callStackHeadSrcLoc cs =
+ case getCallStack cs of
+ [] -> Nothing
+ (_, srcLoc):_ -> Just srcLoc
+
+callStackHeadFunctionName :: CallStack -> String
+callStackHeadFunctionName cs =
+ case getCallStack cs of
[] -> "<unknown source location>"
- ((fnName,srcLoc):_) -> fnName ++ ", called at " ++ prettySrcLoc srcLoc
+ (fnName, _):_ -> fnName
-- ----------------------------------------------------------------------------
-- Annotate the CallStack with custom data
@@ -172,7 +176,7 @@ instance StackAnnotation CallStackAnnotation where
--
-- WARNING: forces the evaluation of @b@ to WHNF.
{-# NOINLINE annotateStack #-}
-annotateStack :: forall a b. (Typeable a, StackAnnotation a) => a -> b -> b
+annotateStack :: forall a b. (HasCallStack, Typeable a, StackAnnotation a) => a -> b -> b
annotateStack ann b = unsafePerformIO $
annotateStackIO ann (evaluate b)
@@ -196,9 +200,9 @@ annotateCallStack b = unsafePerformIO $ withFrozenCallStack $
-- information to stack traces.
--
-- WARNING: forces the evaluation of @b@ to WHNF.
-annotateStackString :: forall b . String -> b -> b
+annotateStackString :: forall b . HasCallStack => String -> b -> b
annotateStackString ann =
- annotateStack (StringAnnotation ann)
+ annotateStack (StringAnnotation (callStackHeadSrcLoc ?callStack) ann)
-- | @'annotateStackShow' showable b@ annotates the evaluation stack of @b@
-- with the value @showable@.
@@ -207,37 +211,36 @@ annotateStackString ann =
-- information to stack traces.
--
-- WARNING: forces the evaluation of @b@ to WHNF.
-annotateStackShow :: forall a b . (Typeable a, Show a) => a -> b -> b
+annotateStackShow :: forall a b . (HasCallStack, Typeable a, Show a) => a -> b -> b
annotateStackShow ann =
- annotateStack (ShowAnnotation ann)
+ annotateStack (ShowAnnotation (callStackHeadSrcLoc ?callStack) ann)
-- | @'annotateStackIO' showable b@ annotates the evaluation stack of @b@
-- with the value @showable@.
--
-- When decoding the call stack, the annotation frames can be used to add more
-- information to stack traces.
-annotateStackIO :: forall a b . (Typeable a, StackAnnotation a) => a -> IO b -> IO b
+annotateStackIO :: forall a b . (HasCallStack, Typeable a, StackAnnotation a) => a -> IO b -> IO b
annotateStackIO ann (IO act) =
IO $ \s -> annotateStack# (SomeStackAnnotation ann) act s
-{-# NOINLINE annotateStackIO #-}
-- | @'annotateStackStringIO' msg b@ annotates the evaluation stack of @b@
-- with the value @msg@.
--
-- When decoding the call stack, the annotation frames can be used to add more
-- information to stack traces.
-annotateStackStringIO :: forall b . String -> IO b -> IO b
+annotateStackStringIO :: forall b . HasCallStack => String -> IO b -> IO b
annotateStackStringIO ann =
- annotateStackIO (StringAnnotation ann)
+ annotateStackIO (StringAnnotation (callStackHeadSrcLoc ?callStack) ann)
-- | @'annotateStackShowIO' msg b@ annotates the evaluation stack of @b@
-- with the value @msg@.
--
-- When decoding the call stack, the annotation frames can be used to add more
-- information to stack traces.
-annotateStackShowIO :: forall a b . (Show a) => a -> IO b -> IO b
+annotateStackShowIO :: forall a b . (HasCallStack, Show a) => a -> IO b -> IO b
annotateStackShowIO ann =
- annotateStackIO (ShowAnnotation ann)
+ annotateStackIO (ShowAnnotation (callStackHeadSrcLoc ?callStack) ann)
-- | @'annotateCallStackIO' b@ annotates the evaluation stack of @b@ with the
-- current 'callstack'.
=====================================
libraries/ghc-experimental/tests/Makefile
=====================================
@@ -0,0 +1,7 @@
+# This Makefile runs the tests using GHC's testsuite framework. It
+# assumes the package is part of a GHC build tree with the testsuite
+# installed in ../../../testsuite.
+
+TOP=../../../testsuite
+include $(TOP)/mk/boilerplate.mk
+include $(TOP)/mk/test.mk
=====================================
libraries/ghc-experimental/tests/all.T
=====================================
=====================================
libraries/ghc-experimental/tests/backtraces/Makefile
=====================================
@@ -0,0 +1,7 @@
+# This Makefile runs the tests using GHC's testsuite framework. It
+# assumes the package is part of a GHC build tree with the testsuite
+# installed in ../../../testsuite.
+
+TOP=../../../../testsuite
+include $(TOP)/mk/boilerplate.mk
+include $(TOP)/mk/test.mk
=====================================
libraries/ghc-experimental/tests/backtraces/T26806a.hs
=====================================
@@ -0,0 +1,14 @@
+module Main where
+
+import GHC.Stack.Annotation.Experimental
+import Control.Exception
+import Control.Exception.Backtrace
+
+main :: IO ()
+main = do
+ setBacktraceMechanismState IPEBacktrace True
+ annotateCallStackIO $ do
+ annotateStackShowIO ([1..4] :: [Int]) $ do
+ annotateStackStringIO "Lovely annotation" $ do
+ throwIO $ ErrorCall "Backtrace Test"
+
=====================================
libraries/ghc-experimental/tests/backtraces/T26806a.stderr
=====================================
@@ -0,0 +1,11 @@
+T26806a: Uncaught exception ghc-internal:GHC.Internal.Exception.ErrorCall:
+
+Backtrace Test
+
+IPE backtrace:
+ Lovely annotation, called at T26806a.hs:12:7 in main:Main
+ [1,2,3,4], called at T26806a.hs:11:5 in main:Main
+ annotateCallStackIO, called at T26806a.hs:10:3 in main:Main
+HasCallStack backtrace:
+ throwIO, called at T26806a.hs:13:9 in main:Main
+
=====================================
libraries/ghc-experimental/tests/backtraces/T26806b.hs
=====================================
@@ -0,0 +1,18 @@
+module Main where
+
+import GHC.Stack.Annotation.Experimental
+import Control.Exception
+import Control.Exception.Backtrace
+
+main :: IO ()
+main = do
+ setBacktraceMechanismState IPEBacktrace True
+ print $ foo 500
+
+foo :: Int -> Int
+foo n =
+ annotateCallStack $
+ annotateStackShow ([1..4] :: [Int]) $
+ annotateStackString "Lovely annotation" $
+ throw $ ErrorCall $ "Backtrace Test: " ++ show (n * n * n)
+
=====================================
libraries/ghc-experimental/tests/backtraces/T26806b.stderr
=====================================
@@ -0,0 +1,10 @@
+T26806b: Uncaught exception ghc-internal:GHC.Internal.Exception.ErrorCall:
+
+Backtrace Test: 125000000
+
+IPE backtrace:
+ Lovely annotation, called at T26806b.hs:16:7 in main:Main
+ [1,2,3,4], called at T26806b.hs:15:5 in main:Main
+ annotateCallStack, called at T26806b.hs:14:3 in main:Main
+HasCallStack backtrace:
+ throw, called at T26806b.hs:17:9 in main:Main
=====================================
libraries/ghc-experimental/tests/backtraces/T26806c.hs
=====================================
@@ -0,0 +1,18 @@
+module Main where
+
+import GHC.Stack.Annotation.Experimental
+import Control.Exception
+import Control.Exception.Backtrace
+
+main :: IO ()
+main = do
+ setBacktraceMechanismState IPEBacktrace True
+ print $ foo 500
+
+foo :: Int -> Int
+foo n =
+ annotateCallStack $
+ annotateStackShow ([1..4] :: [Int]) $
+ annotateStackString "Lovely annotation" $
+ error $ "Backtrace Test: " ++ show (n * n * n)
+
=====================================
libraries/ghc-experimental/tests/backtraces/T26806c.stderr
=====================================
@@ -0,0 +1,11 @@
+T26806c: Uncaught exception ghc-internal:GHC.Internal.Exception.ErrorCall:
+
+Backtrace Test: 125000000
+
+IPE backtrace:
+ Lovely annotation, called at T26806c.hs:16:7 in main:Main
+ [1,2,3,4], called at T26806c.hs:15:5 in main:Main
+ annotateCallStack, called at T26806c.hs:14:3 in main:Main
+HasCallStack backtrace:
+ error, called at T26806c.hs:17:9 in main:Main
+
=====================================
libraries/ghc-experimental/tests/backtraces/all.T
=====================================
@@ -0,0 +1,5 @@
+stack_annotation_backtrace_opts = [ when(have_profiling(), extra_ways(['prof'])) , when(js_arch(), skip) , exit_code(1) ]
+
+test('T26806a', stack_annotation_backtrace_opts, compile_and_run, [''])
+test('T26806b', stack_annotation_backtrace_opts, compile_and_run, [''])
+test('T26806c', stack_annotation_backtrace_opts, compile_and_run, [''])
=====================================
libraries/ghc-internal/src/GHC/Internal/Stack/Annotation.hs
=====================================
@@ -4,6 +4,7 @@ module GHC.Internal.Stack.Annotation where
import GHC.Internal.Base
import GHC.Internal.Data.Typeable
+import GHC.Internal.Stack (SrcLoc, prettySrcLoc)
-- ----------------------------------------------------------------------------
-- StackAnnotation
@@ -13,8 +14,38 @@ import GHC.Internal.Data.Typeable
-- as the payload of 'AnnFrame' stack frames.
--
class StackAnnotation a where
+ -- | Display a human readable string for the 'StackAnnotation'.
+ --
+ -- This is supposed to be the long version of 'displayStackAnnotationShort'
+ -- and may contain a source location.
+ --
+ -- If not provided, 'displayStackAnnotation' is derived from 'stackAnnotationSourceLocation'
+ -- and 'displayStackAnnotationShort'.
displayStackAnnotation :: a -> String
+ -- | Get the 'SrcLoc' of the given 'StackAnnotation'.
+ --
+ -- This is optional, 'SrcLoc' are not strictly required for 'StackAnnotation', but
+ -- it is still heavily encouarged to provide a 'SrcLoc' for better IPE backtraces.
+ stackAnnotationSourceLocation :: a -> Maybe SrcLoc
+
+ -- | The description of the StackAnnotation without any metadata such as source locations.
+ --
+ -- Pefer implementing 'displayStackAnnotationShort' over 'displayStackAnnotation'.
+ displayStackAnnotationShort :: a -> String
+
+ {-# MINIMAL displayStackAnnotation | displayStackAnnotationShort #-}
+
+ displayStackAnnotation ann =
+ displayStackAnnotationShort ann
+ ++ case stackAnnotationSourceLocation ann of
+ Nothing -> ""
+ Just srcLoc -> ", called at " ++ prettySrcLoc srcLoc
+
+ stackAnnotationSourceLocation _ann = Nothing
+
+ displayStackAnnotationShort = displayStackAnnotation
+
-- ----------------------------------------------------------------------------
-- Annotations
-- ----------------------------------------------------------------------------
@@ -28,4 +59,11 @@ data SomeStackAnnotation where
SomeStackAnnotation :: forall a. (Typeable a, StackAnnotation a) => a -> SomeStackAnnotation
instance StackAnnotation SomeStackAnnotation where
- displayStackAnnotation (SomeStackAnnotation a) = displayStackAnnotation a
+ displayStackAnnotation (SomeStackAnnotation a) =
+ displayStackAnnotation a
+
+ stackAnnotationSourceLocation (SomeStackAnnotation a) =
+ stackAnnotationSourceLocation a
+
+ displayStackAnnotationShort (SomeStackAnnotation a) =
+ displayStackAnnotationShort a
=====================================
libraries/ghc-internal/tests/stack-annotation/ann_frame001.stdout
=====================================
@@ -1,12 +1,12 @@
Stack annotations:
-- (2,3)
+- (2,3), called at ann_frame001.hs:5:13 in main:Main
47
Stack annotations:
-- "bar"
-- "foo"
-- "tailCallEx"
+- "bar", called at ann_frame001.hs:23:9 in main:Main
+- "foo", called at ann_frame001.hs:21:11 in main:Main
+- "tailCallEx", called at ann_frame001.hs:17:18 in main:Main
Stack annotations:
-- "bar"
-- "foo"
-- "tailCallEx"
+- "bar", called at ann_frame001.hs:23:9 in main:Main
+- "foo", called at ann_frame001.hs:21:11 in main:Main
+- "tailCallEx", called at ann_frame001.hs:17:18 in main:Main
40
=====================================
libraries/ghc-internal/tests/stack-annotation/ann_frame002.stdout
=====================================
@@ -7,5 +7,5 @@ Finish some work
Some more work in bar
17711
Stack annotations:
-- bar
+- bar, called at ann_frame002.hs:23:29 in main:Main
- annotateCallStackIO, called at ann_frame002.hs:23:7 in main:Main
=====================================
libraries/ghc-internal/tests/stack-annotation/ann_frame003.stdout
=====================================
@@ -1,6 +1,6 @@
47
Stack annotations:
-- "bar"
-- "foo"
-- "tailCallEx"
+- "bar", called at ann_frame003.hs:25:9 in main:Main
+- "foo", called at ann_frame003.hs:21:11 in main:Main
+- "tailCallEx", called at ann_frame003.hs:16:18 in main:Main
40
=====================================
libraries/ghc-internal/tests/stack-annotation/ann_frame004.stdout
=====================================
@@ -13,5 +13,5 @@ Stack annotations:
- annotateCallStack, called at ann_frame004.hs:21:17 in main:Main
- annotateCallStack, called at ann_frame004.hs:21:17 in main:Main
- annotateCallStack, called at ann_frame004.hs:13:10 in main:Main
-- bar
+- bar, called at ann_frame004.hs:12:29 in main:Main
- annotateCallStackIO, called at ann_frame004.hs:12:7 in main:Main
=====================================
libraries/ghc-internal/tests/stack-annotation/ann_frame005.stdout
=====================================
@@ -2,9 +2,9 @@
Caught exception: SimpleBoom
Exception context:
- IPE backtrace:
-- throwIO SimpleBoom
-- raising action
-- catch site for throwIO SimpleBoom
+- throwIO SimpleBoom, called at ann_frame005.hs:33:5 in main:Main
+- raising action, called at ann_frame005.hs:32:3 in main:Main
+- catch site for throwIO SimpleBoom, called at ann_frame005.hs:27:5 in main:Main
- annotateCallStackIO, called at ann_frame005.hs:26:3 in main:Main
- HasCallStack backtrace:
- throwIO, called at ann_frame005.hs:34:7 in main:Main
@@ -13,9 +13,9 @@ Handler annotation not present in context
Caught exception: Prelude.undefined
Exception context:
- IPE backtrace:
-- undefined thunk
-- raising undefined action
-- catch site for undefined
+- undefined thunk, called at ann_frame005.hs:41:9 in main:Main
+- raising undefined action, called at ann_frame005.hs:38:3 in main:Main
+- catch site for undefined, called at ann_frame005.hs:27:5 in main:Main
- annotateCallStackIO, called at ann_frame005.hs:26:3 in main:Main
- HasCallStack backtrace:
- undefined, called at ann_frame005.hs:41:48 in main:Main
@@ -24,9 +24,9 @@ Handler annotation not present in context
Caught exception: error from annotateStackString
Exception context:
- IPE backtrace:
-- error thunk
-- raising error action
-- catch site for error
+- error thunk, called at ann_frame005.hs:48:9 in main:Main
+- raising error action, called at ann_frame005.hs:45:3 in main:Main
+- catch site for error, called at ann_frame005.hs:27:5 in main:Main
- annotateCallStackIO, called at ann_frame005.hs:26:3 in main:Main
- HasCallStack backtrace:
- error, called at ann_frame005.hs:48:44 in main:Main
@@ -35,8 +35,8 @@ Handler annotation not present in context
Caught exception: SimpleBoom
Exception context:
- IPE backtrace:
-- raising throwSTM action
-- catch site for throwSTM
+- raising throwSTM action, called at ann_frame005.hs:52:3 in main:Main
+- catch site for throwSTM, called at ann_frame005.hs:27:5 in main:Main
- annotateCallStackIO, called at ann_frame005.hs:26:3 in main:Main
- HasCallStack backtrace:
- throwSTM, called at ann_frame005.hs:55:9 in main:Main
=====================================
testsuite/tests/interface-stability/ghc-experimental-exports.stdout
=====================================
@@ -6499,25 +6499,27 @@ module GHC.Stack.Annotation.Experimental where
newtype CallStackAnnotation = CallStackAnnotation GHC.Internal.Stack.Types.CallStack
type ShowAnnotation :: *
data ShowAnnotation where
- ShowAnnotation :: forall a. GHC.Internal.Show.Show a => a -> ShowAnnotation
+ ShowAnnotation :: forall a. GHC.Internal.Show.Show a => !(GHC.Internal.Maybe.Maybe GHC.Internal.Stack.Types.SrcLoc) -> a -> ShowAnnotation
type SomeStackAnnotation :: *
data SomeStackAnnotation where
SomeStackAnnotation :: forall a. (ghc-internal-9.1500.0:GHC.Internal.Data.Typeable.Internal.Typeable a, StackAnnotation a) => a -> SomeStackAnnotation
type StackAnnotation :: * -> Constraint
class StackAnnotation a where
displayStackAnnotation :: a -> GHC.Internal.Base.String
- {-# MINIMAL displayStackAnnotation #-}
+ stackAnnotationSourceLocation :: a -> GHC.Internal.Maybe.Maybe GHC.Internal.Stack.Types.SrcLoc
+ displayStackAnnotationShort :: a -> GHC.Internal.Base.String
+ {-# MINIMAL displayStackAnnotation | displayStackAnnotationShort #-}
type StringAnnotation :: *
data StringAnnotation where
- StringAnnotation :: GHC.Internal.Base.String -> StringAnnotation
+ StringAnnotation :: !(GHC.Internal.Maybe.Maybe GHC.Internal.Stack.Types.SrcLoc) -> GHC.Internal.Base.String -> StringAnnotation
annotateCallStack :: forall b. GHC.Internal.Stack.Types.HasCallStack => b -> b
annotateCallStackIO :: forall a. GHC.Internal.Stack.Types.HasCallStack => GHC.Internal.Types.IO a -> GHC.Internal.Types.IO a
- annotateStack :: forall a b. (ghc-internal-9.1500.0:GHC.Internal.Data.Typeable.Internal.Typeable a, StackAnnotation a) => a -> b -> b
- annotateStackIO :: forall a b. (ghc-internal-9.1500.0:GHC.Internal.Data.Typeable.Internal.Typeable a, StackAnnotation a) => a -> GHC.Internal.Types.IO b -> GHC.Internal.Types.IO b
- annotateStackShow :: forall a b. (ghc-internal-9.1500.0:GHC.Internal.Data.Typeable.Internal.Typeable a, GHC.Internal.Show.Show a) => a -> b -> b
- annotateStackShowIO :: forall a b. GHC.Internal.Show.Show a => a -> GHC.Internal.Types.IO b -> GHC.Internal.Types.IO b
- annotateStackString :: forall b. GHC.Internal.Base.String -> b -> b
- annotateStackStringIO :: forall b. GHC.Internal.Base.String -> GHC.Internal.Types.IO b -> GHC.Internal.Types.IO b
+ annotateStack :: forall a b. (GHC.Internal.Stack.Types.HasCallStack, ghc-internal-9.1500.0:GHC.Internal.Data.Typeable.Internal.Typeable a, StackAnnotation a) => a -> b -> b
+ annotateStackIO :: forall a b. (GHC.Internal.Stack.Types.HasCallStack, ghc-internal-9.1500.0:GHC.Internal.Data.Typeable.Internal.Typeable a, StackAnnotation a) => a -> GHC.Internal.Types.IO b -> GHC.Internal.Types.IO b
+ annotateStackShow :: forall a b. (GHC.Internal.Stack.Types.HasCallStack, ghc-internal-9.1500.0:GHC.Internal.Data.Typeable.Internal.Typeable a, GHC.Internal.Show.Show a) => a -> b -> b
+ annotateStackShowIO :: forall a b. (GHC.Internal.Stack.Types.HasCallStack, GHC.Internal.Show.Show a) => a -> GHC.Internal.Types.IO b -> GHC.Internal.Types.IO b
+ annotateStackString :: forall b. GHC.Internal.Stack.Types.HasCallStack => GHC.Internal.Base.String -> b -> b
+ annotateStackStringIO :: forall b. GHC.Internal.Stack.Types.HasCallStack => GHC.Internal.Base.String -> GHC.Internal.Types.IO b -> GHC.Internal.Types.IO b
module GHC.Stats.Experimental where
-- Safety: Safe
=====================================
testsuite/tests/interface-stability/ghc-experimental-exports.stdout-mingw32
=====================================
@@ -6502,25 +6502,27 @@ module GHC.Stack.Annotation.Experimental where
newtype CallStackAnnotation = CallStackAnnotation GHC.Internal.Stack.Types.CallStack
type ShowAnnotation :: *
data ShowAnnotation where
- ShowAnnotation :: forall a. GHC.Internal.Show.Show a => a -> ShowAnnotation
+ ShowAnnotation :: forall a. GHC.Internal.Show.Show a => !(GHC.Internal.Maybe.Maybe GHC.Internal.Stack.Types.SrcLoc) -> a -> ShowAnnotation
type SomeStackAnnotation :: *
data SomeStackAnnotation where
SomeStackAnnotation :: forall a. (ghc-internal-9.1500.0:GHC.Internal.Data.Typeable.Internal.Typeable a, StackAnnotation a) => a -> SomeStackAnnotation
type StackAnnotation :: * -> Constraint
class StackAnnotation a where
displayStackAnnotation :: a -> GHC.Internal.Base.String
- {-# MINIMAL displayStackAnnotation #-}
+ stackAnnotationSourceLocation :: a -> GHC.Internal.Maybe.Maybe GHC.Internal.Stack.Types.SrcLoc
+ displayStackAnnotationShort :: a -> GHC.Internal.Base.String
+ {-# MINIMAL displayStackAnnotation | displayStackAnnotationShort #-}
type StringAnnotation :: *
data StringAnnotation where
- StringAnnotation :: GHC.Internal.Base.String -> StringAnnotation
+ StringAnnotation :: !(GHC.Internal.Maybe.Maybe GHC.Internal.Stack.Types.SrcLoc) -> GHC.Internal.Base.String -> StringAnnotation
annotateCallStack :: forall b. GHC.Internal.Stack.Types.HasCallStack => b -> b
annotateCallStackIO :: forall a. GHC.Internal.Stack.Types.HasCallStack => GHC.Internal.Types.IO a -> GHC.Internal.Types.IO a
- annotateStack :: forall a b. (ghc-internal-9.1500.0:GHC.Internal.Data.Typeable.Internal.Typeable a, StackAnnotation a) => a -> b -> b
- annotateStackIO :: forall a b. (ghc-internal-9.1500.0:GHC.Internal.Data.Typeable.Internal.Typeable a, StackAnnotation a) => a -> GHC.Internal.Types.IO b -> GHC.Internal.Types.IO b
- annotateStackShow :: forall a b. (ghc-internal-9.1500.0:GHC.Internal.Data.Typeable.Internal.Typeable a, GHC.Internal.Show.Show a) => a -> b -> b
- annotateStackShowIO :: forall a b. GHC.Internal.Show.Show a => a -> GHC.Internal.Types.IO b -> GHC.Internal.Types.IO b
- annotateStackString :: forall b. GHC.Internal.Base.String -> b -> b
- annotateStackStringIO :: forall b. GHC.Internal.Base.String -> GHC.Internal.Types.IO b -> GHC.Internal.Types.IO b
+ annotateStack :: forall a b. (GHC.Internal.Stack.Types.HasCallStack, ghc-internal-9.1500.0:GHC.Internal.Data.Typeable.Internal.Typeable a, StackAnnotation a) => a -> b -> b
+ annotateStackIO :: forall a b. (GHC.Internal.Stack.Types.HasCallStack, ghc-internal-9.1500.0:GHC.Internal.Data.Typeable.Internal.Typeable a, StackAnnotation a) => a -> GHC.Internal.Types.IO b -> GHC.Internal.Types.IO b
+ annotateStackShow :: forall a b. (GHC.Internal.Stack.Types.HasCallStack, ghc-internal-9.1500.0:GHC.Internal.Data.Typeable.Internal.Typeable a, GHC.Internal.Show.Show a) => a -> b -> b
+ annotateStackShowIO :: forall a b. (GHC.Internal.Stack.Types.HasCallStack, GHC.Internal.Show.Show a) => a -> GHC.Internal.Types.IO b -> GHC.Internal.Types.IO b
+ annotateStackString :: forall b. GHC.Internal.Stack.Types.HasCallStack => GHC.Internal.Base.String -> b -> b
+ annotateStackStringIO :: forall b. GHC.Internal.Stack.Types.HasCallStack => GHC.Internal.Base.String -> GHC.Internal.Types.IO b -> GHC.Internal.Types.IO b
module GHC.Stats.Experimental where
-- Safety: Safe
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/db3e6cd86619164ef5ca80cfa9f4a7…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/db3e6cd86619164ef5ca80cfa9f4a7…
You're receiving this email because of your account on gitlab.haskell.org.
1
0
[Git][ghc/ghc][wip/romes/hadrian-cross-stage2-rebase_SVEN_FINAL] 35 commits: Support more x86 extensions: AVX-512 {BW,DQ,VL} and GFNI
by Sven Tennie (@supersven) 20 Feb '26
by Sven Tennie (@supersven) 20 Feb '26
20 Feb '26
Sven Tennie pushed to branch wip/romes/hadrian-cross-stage2-rebase_SVEN_FINAL at Glasgow Haskell Compiler / GHC
Commits:
14f485ee by ARATA Mizuki at 2026-02-17T09:09:24+09:00
Support more x86 extensions: AVX-512 {BW,DQ,VL} and GFNI
Also, mark AVX-512 ER and PF as deprecated.
AVX-512 instructions can be used for certain 64-bit integer vector operations.
GFNI can be used to implement bitReverse (currently not used by NCG, but LLVM may use it).
Closes #26406
Addresses #26509
- - - - -
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)
- - - - -
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
- - - - -
c5e15b8b by Phil de Joux at 2026-02-18T05:07:36-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
- - - - -
d388bac1 by Phil de Joux at 2026-02-18T05:07:36-05:00
haddock: Place the snippet input and output together
- Put the output seemingly inside the example box
- - - - -
016fa306 by Samuel Thibault at 2026-02-18T05:08:35-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.
- - - - -
68bd0805 by Teo Camarasu at 2026-02-18T05:09:19-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
- - - - -
4be6eff8 by Matthew Pickering at 2026-02-19T19:32:30+01:00
Add missing req_interp modifier to T18441fail3 and T18441fail19
These tests require the interpreter but they were failing in a different
way with the javascript backend because the interpreter was disabled and
stderr is ignored by the test.
- - - - -
a1cc6956 by Matthew Pickering at 2026-02-19T19:32:30+01:00
Use explicit syntax rather than pure
- - - - -
9ceeae6c by Matthew Pickering at 2026-02-19T19:32:30+01:00
packaging: correctly propagate build/host/target to bindist configure script
At the moment the host and target which we will produce a compiler for
is fixed at the initial configure time. Therefore we need to persist
the choice made at this time into the installation bindist as well so we
look for the right tools, with the right prefixes at install time.
In the future, we want to provide a bit more control about what kind of
bindist we produce so the logic about what the host/target will have to
be written by hadrian rather than persisted by the configure script. In
particular with cross compilers we want to either build a normal stage 2
cross bindist or a stage 3 bindist, which creates a bindist which has a
native compiler for the target platform.
Fixes #21970
- - - - -
8843ce11 by Matthew Pickering at 2026-02-19T19:32:30+01:00
hadrian: Fill in more of the default.host toolchain file
When you are building a cross compiler this file will be used to build
stage1 and it's libraries, so we need enough information here to work
accurately. There is still more work to be done (see for example, word
size is still fixed).
- - - - -
eaa41a41 by Matthew Pickering at 2026-02-19T19:32:30+01:00
hadrian: Disable docs when cross compiling
Before there were a variety of ad-hoc places where doc building was
disabled when cross compiling.
* Some CI jobs sets --docs=none in gen_ci.hs
* Some CI jobs set --docs=none in .gitlab/ci.sh
* There was some logic in hadrian to not need the ["docs"] target when
making a bindist.
Now the situation is simple:
* If you are cross compiling then defaultDocsTargets is empty by
default.
In theory, there is no reason why we can't build documentation for cross
compiler bindists, but this is left to future work to generalise the
documentation building rules to allow this (#24289)
- - - - -
b057e7b1 by Matthew Pickering at 2026-02-19T19:32:30+01:00
hadrian: Build stage 2 cross compilers
* Most of hadrian is abstracted over the stage in order to remove the
assumption that the target of all stages is the same platform. This
allows the RTS to be built for two different targets for example.
* Abstracts the bindist creation logic to allow building either normal
or cross bindists. Normal bindists use stage 1 libraries and a stage 2
compiler. Cross bindists use stage 2 libararies and a stage 2
compiler.
* hadrian: Make binary-dist-dir the default build target. This allows us
to have the logic in one place about which libraries/stages to build
with cross compilers. Fixes #24192
New hadrian target:
* `binary-dist-dir-cross`: Build a cross compiler bindist (compiler =
stage 1, libraries = stage 2)
This commit also contains various changes to make stage2 compilers
feasible.
-------------------------
Metric Decrease:
ManyAlternatives
MultiComponentModulesRecomp
MultiLayerModulesRecomp
T10421
T12425
T12707
T13035
T13379
T15703
T16577
T18698a
T18698b
T18923
T1969
T21839c
T3294
T4801
T5030
T5321Fun
T5642
T783
T9198
T9872d
T9961
parsing001
T5321FD
T6048
T12227
T18140
T18282
T9233
T5631
T9630
-------------------------
Co-authored-by: Sven Tennie <sven.tennie(a)gmail.com>
Fix rebase: settings-use-distro-mingw is now staged
- - - - -
be8af267 by Matthew Pickering at 2026-02-19T19:32:30+01:00
ci: Test cross bindists
We remove the special logic for testing in-tree cross
compilers and instead test cross compiler bindists, like we do for all
other platforms.
- - - - -
5088ca0b by Matthew Pickering at 2026-02-19T19:32:30+01:00
ci: Introduce CROSS_STAGE variable
In preparation for building and testing stage3 bindists we introduce the
CROSS_STAGE variable which is used by a CI job to determine what kind of
bindist the CI job should produce.
At the moment we are only using CROSS_STAGE=2 but in the future we will
have some jobs which set CROSS_STAGE=3 to produce native bindists for a
target, but produced by a cross compiler, which can be tested on by
another CI job on the native platform.
CROSS_STAGE=2: Build a normal cross compiler bindist
CROSS_STAGE=3: Build a stage 3 bindist, one which is a native compiler and library for the target
- - - - -
a790621a by Matthew Pickering at 2026-02-19T19:32:30+01:00
hadrian: Refactor system-cxx-std-lib rules0
I noticed a few things wrong with the hadrian rules for `system-cxx-std-lib` rules.
* For `text` there is an ad-hoc check to depend on `system-cxx-std-lib` outside of `configurePackage`.
* The `system-cxx-std-lib` dependency is not read from cabal files.
* Recache is not called on the packge database after the `.conf` file is generated, a more natural place for this rule is `registerRules`.
Treating this uniformly like other packages is complicated by it not having any source code or a cabal file. However we can do a bit better by reporting the dependency firstly in `PackageData` and then needing the `.conf` file in the same place as every other package in `configurePackage`.
Fixes #25303
- - - - -
ab28e95d by Sven Tennie at 2026-02-19T19:32:30+01:00
ci: Increase timeout for emulators
Test runs with emulators naturally take longer than on native machines.
Generate jobs.yml
- - - - -
0d0560d1 by Sven Tennie at 2026-02-19T19:32:30+01:00
ghc: Distinguish between having an interpreter and having an internal one
Otherwise, we fail with warnings when compiling tools. Actually, these
are related but different things:
- ghc can run an interpreter (either internal or external)
- ghc is compiled with an internal interpreter
- - - - -
f19f6046 by Matthew Pickering at 2026-02-19T19:32:30+01:00
ci: Javascript don't set CROSS_EMULATOR
There is no CROSS_EMULATOR needed to run javascript binaries, so we
don't set the CROSS_EMULATOR to some dummy value.
- - - - -
7ed62118 by Sven Tennie at 2026-02-19T19:32:30+01:00
Javascript skip T23697
See #22355 about how HSC2HS and the Javascript target don't play well
together.
- - - - -
f737508e by Sven Tennie at 2026-02-19T19:32:30+01:00
Mark T24602 as fragile
It was skipped before (due to CROSS_EMULATOR being set, which changed
for JS), so we don't make things worse by marking it as fragile.
- - - - -
adf2a1cf by Sven Tennie at 2026-02-19T19:32:30+01:00
Windows needs NM_STAGE0 as well
The stage0 always needs nm.
- - - - -
ce84d7ad by Sven Tennie at 2026-02-19T19:32:30+01:00
T17912 sometimes works for windows-validate
This seems to be timing related. However, just simply increasing the
timeout (sleep) statement of this test didn't help. Maybe, it has been
flaky on CI before.
- - - - -
2595998a by Sven Tennie at 2026-02-19T19:32:30+01:00
Add haddock to `NoEmulatorNeeded TimeoutIncrease`
- - - - -
68d3462f by Sven Tennie at 2026-02-19T19:32:30+01:00
Delete done TODO
- - - - -
0ad7d3c1 by Sven Tennie at 2026-02-19T19:32:30+01:00
Delete done TODO
- - - - -
4b5dfb69 by Sven Tennie at 2026-02-19T19:32:30+01:00
Remove cross special case of performance flavour
- - - - -
9ddc73f9 by Sven Tennie at 2026-02-19T19:32:30+01:00
Delete obsolete iserv comment
- - - - -
ff18fd86 by Sven Tennie at 2026-02-19T19:32:30+01:00
No more cross stage special cases
- - - - -
537146ee by Sven Tennie at 2026-02-19T19:32:30+01:00
Delete libffi-tarballs
Must have been an accidential commit...
- - - - -
08d0f95a by Sven Tennie at 2026-02-19T19:32:30+01:00
Fix commented out code
- - - - -
3c41ceea by Sven Tennie at 2026-02-19T19:32:30+01:00
Remove trace log
- - - - -
9179f498 by Sven Tennie at 2026-02-19T19:32:30+01:00
configure.ac: Remove unnecessay blank
- - - - -
a291b7ab by Sven Tennie at 2026-02-19T19:32:30+01:00
Drop Rules.Libffi
- - - - -
179 changed files:
- .gitlab/ci.sh
- .gitlab/generate-ci/gen_ci.hs
- .gitlab/jobs.yaml
- compiler/GHC/CmmToAsm/Config.hs
- compiler/GHC/CmmToAsm/X86/CodeGen.hs
- compiler/GHC/CmmToAsm/X86/Instr.hs
- compiler/GHC/CmmToAsm/X86/Ppr.hs
- compiler/GHC/Driver/Config/CmmToAsm.hs
- compiler/GHC/Driver/DynFlags.hs
- compiler/GHC/Driver/Pipeline/Execute.hs
- compiler/GHC/Driver/Session.hs
- compiler/GHC/Linker/Dynamic.hs
- compiler/GHC/SysTools/Cpp.hs
- configure.ac
- distrib/configure.ac.in
- docs/users_guide/9.16.1-notes.rst
- docs/users_guide/eventlog-formats.rst
- docs/users_guide/phases.rst
- docs/users_guide/using.rst
- ghc/GHC/Driver/Session/Mode.hs
- ghc/GHCi/UI.hs
- ghc/Main.hs
- ghc/ghc-bin.cabal.in
- hadrian/README.md
- hadrian/bindist/config.mk.in
- hadrian/cfg/default.host.target.in
- + hadrian/cfg/system.config.host.in
- hadrian/cfg/system.config.in
- + hadrian/cfg/system.config.target.in
- hadrian/hadrian.cabal
- hadrian/src/Base.hs
- + hadrian/src/BindistConfig.hs
- hadrian/src/Builder.hs
- hadrian/src/Context.hs
- hadrian/src/Expression.hs
- hadrian/src/Flavour.hs
- hadrian/src/Flavour/Type.hs
- hadrian/src/Hadrian/Builder.hs
- hadrian/src/Hadrian/Haskell/Cabal/Parse.hs
- hadrian/src/Hadrian/Haskell/Cabal/Type.hs
- hadrian/src/Hadrian/Haskell/Hash.hs
- hadrian/src/Hadrian/Oracles/TextFile.hs
- hadrian/src/Oracles/Flag.hs
- hadrian/src/Oracles/Flavour.hs
- hadrian/src/Oracles/Setting.hs
- hadrian/src/Oracles/TestSettings.hs
- hadrian/src/Packages.hs
- hadrian/src/Rules.hs
- hadrian/src/Rules/BinaryDist.hs
- hadrian/src/Rules/CabalReinstall.hs
- hadrian/src/Rules/Compile.hs
- hadrian/src/Rules/Documentation.hs
- hadrian/src/Rules/Generate.hs
- hadrian/src/Rules/Gmp.hs
- hadrian/src/Rules/Library.hs
- hadrian/src/Rules/Program.hs
- hadrian/src/Rules/Register.hs
- hadrian/src/Rules/Test.hs
- hadrian/src/Settings.hs
- hadrian/src/Settings/Builders/Cabal.hs
- hadrian/src/Settings/Builders/Common.hs
- hadrian/src/Settings/Builders/Configure.hs
- hadrian/src/Settings/Builders/DeriveConstants.hs
- hadrian/src/Settings/Builders/Ghc.hs
- hadrian/src/Settings/Builders/Hsc2Hs.hs
- hadrian/src/Settings/Builders/RunTest.hs
- hadrian/src/Settings/Builders/SplitSections.hs
- hadrian/src/Settings/Default.hs
- hadrian/src/Settings/Flavours/Benchmark.hs
- hadrian/src/Settings/Flavours/Development.hs
- hadrian/src/Settings/Flavours/GhcInGhci.hs
- hadrian/src/Settings/Flavours/Performance.hs
- hadrian/src/Settings/Flavours/Quick.hs
- hadrian/src/Settings/Flavours/QuickCross.hs
- hadrian/src/Settings/Flavours/Quickest.hs
- hadrian/src/Settings/Flavours/Validate.hs
- hadrian/src/Settings/Packages.hs
- hadrian/src/Settings/Program.hs
- hadrian/src/Settings/Warnings.hs
- libraries/base/changelog.md
- 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/base/tests/IO/all.T
- libraries/base/tests/all.T
- 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/Exception.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/STM.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
- + 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/fp_find_nm.m4
- m4/fptools_happy.m4
- m4/fptools_set_platform_vars.m4
- m4/prep_target_file.m4
- testsuite/driver/cpu_features.py
- testsuite/ghc-config/ghc-config.hs
- testsuite/tests/arrows/should_compile/T21301.stderr
- testsuite/tests/codeGen/should_gen_asm/all.T
- + testsuite/tests/codeGen/should_gen_asm/avx512-int64-minmax.asm
- + testsuite/tests/codeGen/should_gen_asm/avx512-int64-minmax.hs
- + testsuite/tests/codeGen/should_gen_asm/avx512-int64-mul.asm
- + testsuite/tests/codeGen/should_gen_asm/avx512-int64-mul.hs
- + testsuite/tests/codeGen/should_gen_asm/avx512-word64-minmax.asm
- + testsuite/tests/codeGen/should_gen_asm/avx512-word64-minmax.hs
- 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/ghc-e/should_fail/all.T
- testsuite/tests/ghci/scripts/Defer02.stderr
- testsuite/tests/ghci/scripts/T15325.stderr
- testsuite/tests/javascript/closure/all.T
- testsuite/tests/patsyn/should_run/ghci.stderr
- testsuite/tests/quotes/LiftErrMsgDefer.stderr
- testsuite/tests/safeHaskell/safeLanguage/SafeLang15.stderr
- testsuite/tests/simd/should_run/all.T
- 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
- 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/f5fef1f7105c66c5af686235d0cce7…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/f5fef1f7105c66c5af686235d0cce7…
You're receiving this email because of your account on gitlab.haskell.org.
1
0
Simon Peyton Jones pushed to branch wip/T26868 at Glasgow Haskell Compiler / GHC
Commits:
d5b4f775 by Simon Peyton Jones at 2026-02-20T07:00:27+00:00
Wibbles
- - - - -
2 changed files:
- compiler/GHC/Core.hs
- compiler/GHC/Core/TyCo/Rep.hs
Changes:
=====================================
compiler/GHC/Core.hs
=====================================
@@ -436,7 +436,7 @@ set includes:
* The /deep/ free vars of the term in which we are substituting
E.g when substituting [x :-> blah] into `e`, we must ensure that if we
- clone a binder in `e`, we don't accidentally choose a new binder that
+ clone a binder in `e`, we don't accidentally choose a new binder that
shadows a deep free var of `e`.
For substitution on /types/ we don't need to use deep free variables.
=====================================
compiler/GHC/Core/TyCo/Rep.hs
=====================================
@@ -1983,7 +1983,7 @@ foldTyCo (TyCoFolder { tcf_view = view
-- As per #23764, ordering is [arg, w, res]
go_ty (TyConApp _ tys) = go_tys tys
- go_ty (ForAllTy (Bndr tv vis) inner)
+ go_ty (ForAllTy (Bndr tv _) inner)
= go_ty (varType tv) `mappend` tycobinder tv (go_ty inner)
-- See Note [Use explicit recursion in foldTyCo]
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/d5b4f7751eb4910fdecdadfb3a8ee64…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/d5b4f7751eb4910fdecdadfb3a8ee64…
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: Add optional `SrcLoc` to `StackAnnotation` class
by Marge Bot (@marge-bot) 20 Feb '26
by Marge Bot (@marge-bot) 20 Feb '26
20 Feb '26
Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC
Commits:
aab7cc88 by fendor at 2026-02-20T00:12:59-05:00
Add optional `SrcLoc` to `StackAnnotation` class
`StackAnnotation`s give access to an optional `SrcLoc` field that
user-added stack annotations can use to provide better backtraces in both error
messages and when decoding the callstack.
We update builtin stack annotations such as `StringAnnotation` and
`ShowAnnotation` to also capture the `SrcLoc` of the current `CallStack`
to improve backtraces by default (if stack annotations are used).
This change is backwards compatible with GHC 9.14.1.
- - - - -
3d31e443 by Simon Hengel at 2026-02-20T00:13:00-05:00
docs: Fix grammar in explicit_namespaces.rst
- - - - -
db3e6cd8 by Andreas Klebinger at 2026-02-20T00:13:00-05:00
Bump hackage index state and minimum shake version for hadrian.
We also add the shake version we want to stack.yaml
Fixes #26884
- - - - -
25 changed files:
- .gitlab/ci.sh
- docs/users_guide/exts/explicit_namespaces.rst
- hadrian/cabal.project
- hadrian/hadrian.cabal
- hadrian/stack.yaml
- libraries/ghc-experimental/CHANGELOG.md
- libraries/ghc-experimental/src/GHC/Stack/Annotation/Experimental.hs
- + libraries/ghc-experimental/tests/Makefile
- + libraries/ghc-experimental/tests/all.T
- + libraries/ghc-experimental/tests/backtraces/Makefile
- + libraries/ghc-experimental/tests/backtraces/T26806a.hs
- + libraries/ghc-experimental/tests/backtraces/T26806a.stderr
- + libraries/ghc-experimental/tests/backtraces/T26806b.hs
- + libraries/ghc-experimental/tests/backtraces/T26806b.stderr
- + libraries/ghc-experimental/tests/backtraces/T26806c.hs
- + libraries/ghc-experimental/tests/backtraces/T26806c.stderr
- + libraries/ghc-experimental/tests/backtraces/all.T
- libraries/ghc-internal/src/GHC/Internal/Stack/Annotation.hs
- libraries/ghc-internal/tests/stack-annotation/ann_frame001.stdout
- libraries/ghc-internal/tests/stack-annotation/ann_frame002.stdout
- libraries/ghc-internal/tests/stack-annotation/ann_frame003.stdout
- libraries/ghc-internal/tests/stack-annotation/ann_frame004.stdout
- libraries/ghc-internal/tests/stack-annotation/ann_frame005.stdout
- testsuite/tests/interface-stability/ghc-experimental-exports.stdout
- testsuite/tests/interface-stability/ghc-experimental-exports.stdout-mingw32
Changes:
=====================================
.gitlab/ci.sh
=====================================
@@ -8,7 +8,7 @@ set -Eeuo pipefail
# Configuration:
# N.B. You may want to also update the index-state in hadrian/cabal.project.
-HACKAGE_INDEX_STATE="2025-12-19T19:24:24Z"
+HACKAGE_INDEX_STATE="2026-02-06T13:08:09Z"
MIN_HAPPY_VERSION="1.20"
MIN_ALEX_VERSION="3.2.6"
=====================================
docs/users_guide/exts/explicit_namespaces.rst
=====================================
@@ -86,7 +86,7 @@ However, how would one import only the data constructor? There are two options:
import Data.Proxy (data Proxy) -- imports the data constructor only
import Data.Proxy (pattern Proxy) -- imports the data constructor only
-The ``data`` keyword enables the import or export a data constructor without its
+The ``data`` keyword allows a data constructor to be imported or exported without its
parent type constructor.
The ``pattern`` keyword does the same, with only a few differences:
=====================================
hadrian/cabal.project
=====================================
@@ -4,7 +4,7 @@ packages: ./
-- This essentially freezes the build plan for hadrian
-- It would be wise to keep this up to date with the state set in .gitlab/ci.sh.
-index-state: 2025-12-19T19:24:24Z
+index-state: 2026-02-06T13:08:09Z
-- Fixes bootstrapping with ghc-9.14
allow-newer: all:base, all:ghc-bignum, all:template-haskell
=====================================
hadrian/hadrian.cabal
=====================================
@@ -163,7 +163,8 @@ executable hadrian
, time
, mtl >= 2.2 && < 2.4
, parsec >= 3.1 && < 3.2
- , shake >= 0.18.3 && < 0.20
+ -- shake 0.19.9 has some fixes to greatly improve error messages
+ , shake >= 0.19.9 && < 0.20
, transformers >= 0.4 && < 0.7
, unordered-containers >= 0.2.1 && < 0.3
, text >= 1.2 && < 3
=====================================
hadrian/stack.yaml
=====================================
@@ -42,3 +42,5 @@ extra-deps:
- directory-1.3.9.0
# Needed because process depends on directory, which has been pruned:
- process-1.6.26.1
+# Needed stackage doesn't have the latest shake yet, which we want for better exceptions
+- shake-0.19.9
=====================================
libraries/ghc-experimental/CHANGELOG.md
=====================================
@@ -5,12 +5,17 @@
- New and/or/xor SIMD primops for bitwise logical operations, such as andDoubleX4#, orWord32X4#, xorInt8X16#, etc.
These are supported by the LLVM backend and by the X86_64 NCG backend (for the latter, only for 128-wide vectors).
-## ghc-experimental-9.1401.0,
+## ghc-experimental-9.1402.0
+
+- Add optional `SrcLoc` to `StackAnnotation` class in `GHC.Stack.Annotation.Experimental`
+
+## ghc-experimental-9.1401.0
- Expose access to RTS flags via `GHC.RTS.Flags.Experimental`
- Expose access to era profiling interface via `GHC.Profiling.Eras`
- Expose access to runtime stack annotations via `GHC.Stack.Annotation.Experimental`
- Expose custom allocation limit handler via `System.Mem.Experimental`
+- Expose access to Stack Annotations via `GHC.Stack.Annotation.Experimental`
- Expose module Prelude.Experimental, which reexports some modules from ghc-experimental for convenience, like Prelude does for base.
## ghc-experimental-9.1201.0
=====================================
libraries/ghc-experimental/src/GHC/Stack/Annotation/Experimental.hs
=====================================
@@ -82,9 +82,6 @@ import GHC.Internal.Stack.Annotation
-- the pure variations can behave in ways that are hard to predict.
--
-- See Note [Stack annotations in pure code] for more details.
---
--- At last, stack annotations are tricky to use with 'error'.
--- See Note [Pushing annotation frames on 'error'] for why this is the case.
-- Note [Stack annotations in pure code]
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -96,57 +93,50 @@ import GHC.Internal.Stack.Annotation
-- For example:
--
-- @
--- annotateStackShow (5 @Int) (fib 20 + throw (ErrorCall "Oh no!"))
+-- annotateStackShow (5 @Int) (fib 20 + error "Oh no!")
-- @
--
--- Without forcing the result of @(fib 20 + throw (ErrorCall "Oh no!"))@, the computation
+-- Without forcing the result of @(fib 20 + error "Oh no!")@, the computation
-- will simply return a thunk, and the stack annotation would be popped off the stack.
-- Once the thunk is evaluated, the exception is raised, but no stack annotation will be found!
--- If we force the result of @(fib 20 + throw (ErrorCall "Oh no!"))@, then the stack
+-- If we force the result of @(fib 20 + error "Oh no!")@, then the stack
-- annotations remain on the stack, and are displayed in the stack trace.
--
-- Naturally, this only holds if no imprecise exceptions are thrown during evaluation of any
-- nested value, for example in 'annotateStackShow 5 (Just $ throw (ErrorCall "Oh no!"))', the
-- stack trace will not include the value @5@.
--
--- See how we preferred @throw (ErrorCall ...)@ over @error@?
--- See Note [Pushing annotation frames on 'error'] for why we do this.
-
--- Note [Pushing annotation frames on 'error']
--- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--- Examples so far have not been using 'error' at all.
--- The reason is that 'error' is extraordinarily difficult to use correctly with stack annotation frames.
--- See Note [Capturing the backtrace in throw] for a detailed discussion of how 'throw'
--- manages to capture 'Backtraces'.
---
--- Long story short, 'error' does not do the same thing as 'throw' and is subtly different
--- in terms of evaluation, cause it to bypass the stack annotation frames, especially in
--- pure code.
---
--- However, even in 'IO' code, it is difficult to use 'error' and obtain stack annotation frames
--- close to the call site due to the same issue of laziness and backtrace collection.
---
--- This means, right now, if you want to reliably capture stack frame annotations,
--- in both pure and impure code, prefer 'throw' and 'throwIO' variants over 'error'.
-- ----------------------------------------------------------------------------
-- Annotations
-- ----------------------------------------------------------------------------
+
+-- | A 'String' only annotation with an optional source location.
data StringAnnotation where
- StringAnnotation :: String -> StringAnnotation
+ StringAnnotation :: !(Maybe SrcLoc) -> String -> StringAnnotation
instance StackAnnotation StringAnnotation where
- displayStackAnnotation (StringAnnotation str) = str
+ displayStackAnnotationShort (StringAnnotation _srcLoc str) =
+ str
+
+ stackAnnotationSourceLocation (StringAnnotation srcLoc _str) =
+ srcLoc
-- | Use the 'Show' instance of a type to display as the 'StackAnnotation'.
data ShowAnnotation where
- ShowAnnotation :: forall a . Show a => a -> ShowAnnotation
+ ShowAnnotation :: forall a . Show a => !(Maybe SrcLoc) -> a -> ShowAnnotation
instance StackAnnotation ShowAnnotation where
- displayStackAnnotation (ShowAnnotation showAnno) = show showAnno
+ displayStackAnnotationShort (ShowAnnotation _srcLoc showAnno) =
+ show showAnno
+
+ stackAnnotationSourceLocation (ShowAnnotation srcLoc _showAnno) =
+ srcLoc
-- | A 'CallStack' stack annotation.
+--
+-- Captures the whole 'CallStack'.
newtype CallStackAnnotation = CallStackAnnotation CallStack
instance Show CallStackAnnotation where
@@ -154,9 +144,23 @@ instance Show CallStackAnnotation where
-- | Displays the first entry of the 'CallStack'
instance StackAnnotation CallStackAnnotation where
- displayStackAnnotation (CallStackAnnotation cs) = case getCallStack cs of
+ stackAnnotationSourceLocation (CallStackAnnotation cs) =
+ callStackHeadSrcLoc cs
+
+ displayStackAnnotationShort (CallStackAnnotation cs) =
+ callStackHeadFunctionName cs
+
+callStackHeadSrcLoc :: CallStack -> Maybe SrcLoc
+callStackHeadSrcLoc cs =
+ case getCallStack cs of
+ [] -> Nothing
+ (_, srcLoc):_ -> Just srcLoc
+
+callStackHeadFunctionName :: CallStack -> String
+callStackHeadFunctionName cs =
+ case getCallStack cs of
[] -> "<unknown source location>"
- ((fnName,srcLoc):_) -> fnName ++ ", called at " ++ prettySrcLoc srcLoc
+ (fnName, _):_ -> fnName
-- ----------------------------------------------------------------------------
-- Annotate the CallStack with custom data
@@ -172,7 +176,7 @@ instance StackAnnotation CallStackAnnotation where
--
-- WARNING: forces the evaluation of @b@ to WHNF.
{-# NOINLINE annotateStack #-}
-annotateStack :: forall a b. (Typeable a, StackAnnotation a) => a -> b -> b
+annotateStack :: forall a b. (HasCallStack, Typeable a, StackAnnotation a) => a -> b -> b
annotateStack ann b = unsafePerformIO $
annotateStackIO ann (evaluate b)
@@ -196,9 +200,9 @@ annotateCallStack b = unsafePerformIO $ withFrozenCallStack $
-- information to stack traces.
--
-- WARNING: forces the evaluation of @b@ to WHNF.
-annotateStackString :: forall b . String -> b -> b
+annotateStackString :: forall b . HasCallStack => String -> b -> b
annotateStackString ann =
- annotateStack (StringAnnotation ann)
+ annotateStack (StringAnnotation (callStackHeadSrcLoc ?callStack) ann)
-- | @'annotateStackShow' showable b@ annotates the evaluation stack of @b@
-- with the value @showable@.
@@ -207,37 +211,36 @@ annotateStackString ann =
-- information to stack traces.
--
-- WARNING: forces the evaluation of @b@ to WHNF.
-annotateStackShow :: forall a b . (Typeable a, Show a) => a -> b -> b
+annotateStackShow :: forall a b . (HasCallStack, Typeable a, Show a) => a -> b -> b
annotateStackShow ann =
- annotateStack (ShowAnnotation ann)
+ annotateStack (ShowAnnotation (callStackHeadSrcLoc ?callStack) ann)
-- | @'annotateStackIO' showable b@ annotates the evaluation stack of @b@
-- with the value @showable@.
--
-- When decoding the call stack, the annotation frames can be used to add more
-- information to stack traces.
-annotateStackIO :: forall a b . (Typeable a, StackAnnotation a) => a -> IO b -> IO b
+annotateStackIO :: forall a b . (HasCallStack, Typeable a, StackAnnotation a) => a -> IO b -> IO b
annotateStackIO ann (IO act) =
IO $ \s -> annotateStack# (SomeStackAnnotation ann) act s
-{-# NOINLINE annotateStackIO #-}
-- | @'annotateStackStringIO' msg b@ annotates the evaluation stack of @b@
-- with the value @msg@.
--
-- When decoding the call stack, the annotation frames can be used to add more
-- information to stack traces.
-annotateStackStringIO :: forall b . String -> IO b -> IO b
+annotateStackStringIO :: forall b . HasCallStack => String -> IO b -> IO b
annotateStackStringIO ann =
- annotateStackIO (StringAnnotation ann)
+ annotateStackIO (StringAnnotation (callStackHeadSrcLoc ?callStack) ann)
-- | @'annotateStackShowIO' msg b@ annotates the evaluation stack of @b@
-- with the value @msg@.
--
-- When decoding the call stack, the annotation frames can be used to add more
-- information to stack traces.
-annotateStackShowIO :: forall a b . (Show a) => a -> IO b -> IO b
+annotateStackShowIO :: forall a b . (HasCallStack, Show a) => a -> IO b -> IO b
annotateStackShowIO ann =
- annotateStackIO (ShowAnnotation ann)
+ annotateStackIO (ShowAnnotation (callStackHeadSrcLoc ?callStack) ann)
-- | @'annotateCallStackIO' b@ annotates the evaluation stack of @b@ with the
-- current 'callstack'.
=====================================
libraries/ghc-experimental/tests/Makefile
=====================================
@@ -0,0 +1,7 @@
+# This Makefile runs the tests using GHC's testsuite framework. It
+# assumes the package is part of a GHC build tree with the testsuite
+# installed in ../../../testsuite.
+
+TOP=../../../testsuite
+include $(TOP)/mk/boilerplate.mk
+include $(TOP)/mk/test.mk
=====================================
libraries/ghc-experimental/tests/all.T
=====================================
=====================================
libraries/ghc-experimental/tests/backtraces/Makefile
=====================================
@@ -0,0 +1,7 @@
+# This Makefile runs the tests using GHC's testsuite framework. It
+# assumes the package is part of a GHC build tree with the testsuite
+# installed in ../../../testsuite.
+
+TOP=../../../../testsuite
+include $(TOP)/mk/boilerplate.mk
+include $(TOP)/mk/test.mk
=====================================
libraries/ghc-experimental/tests/backtraces/T26806a.hs
=====================================
@@ -0,0 +1,14 @@
+module Main where
+
+import GHC.Stack.Annotation.Experimental
+import Control.Exception
+import Control.Exception.Backtrace
+
+main :: IO ()
+main = do
+ setBacktraceMechanismState IPEBacktrace True
+ annotateCallStackIO $ do
+ annotateStackShowIO ([1..4] :: [Int]) $ do
+ annotateStackStringIO "Lovely annotation" $ do
+ throwIO $ ErrorCall "Backtrace Test"
+
=====================================
libraries/ghc-experimental/tests/backtraces/T26806a.stderr
=====================================
@@ -0,0 +1,11 @@
+T26806a: Uncaught exception ghc-internal:GHC.Internal.Exception.ErrorCall:
+
+Backtrace Test
+
+IPE backtrace:
+ Lovely annotation, called at T26806a.hs:12:7 in main:Main
+ [1,2,3,4], called at T26806a.hs:11:5 in main:Main
+ annotateCallStackIO, called at T26806a.hs:10:3 in main:Main
+HasCallStack backtrace:
+ throwIO, called at T26806a.hs:13:9 in main:Main
+
=====================================
libraries/ghc-experimental/tests/backtraces/T26806b.hs
=====================================
@@ -0,0 +1,18 @@
+module Main where
+
+import GHC.Stack.Annotation.Experimental
+import Control.Exception
+import Control.Exception.Backtrace
+
+main :: IO ()
+main = do
+ setBacktraceMechanismState IPEBacktrace True
+ print $ foo 500
+
+foo :: Int -> Int
+foo n =
+ annotateCallStack $
+ annotateStackShow ([1..4] :: [Int]) $
+ annotateStackString "Lovely annotation" $
+ throw $ ErrorCall $ "Backtrace Test: " ++ show (n * n * n)
+
=====================================
libraries/ghc-experimental/tests/backtraces/T26806b.stderr
=====================================
@@ -0,0 +1,10 @@
+T26806b: Uncaught exception ghc-internal:GHC.Internal.Exception.ErrorCall:
+
+Backtrace Test: 125000000
+
+IPE backtrace:
+ Lovely annotation, called at T26806b.hs:16:7 in main:Main
+ [1,2,3,4], called at T26806b.hs:15:5 in main:Main
+ annotateCallStack, called at T26806b.hs:14:3 in main:Main
+HasCallStack backtrace:
+ throw, called at T26806b.hs:17:9 in main:Main
=====================================
libraries/ghc-experimental/tests/backtraces/T26806c.hs
=====================================
@@ -0,0 +1,18 @@
+module Main where
+
+import GHC.Stack.Annotation.Experimental
+import Control.Exception
+import Control.Exception.Backtrace
+
+main :: IO ()
+main = do
+ setBacktraceMechanismState IPEBacktrace True
+ print $ foo 500
+
+foo :: Int -> Int
+foo n =
+ annotateCallStack $
+ annotateStackShow ([1..4] :: [Int]) $
+ annotateStackString "Lovely annotation" $
+ error $ "Backtrace Test: " ++ show (n * n * n)
+
=====================================
libraries/ghc-experimental/tests/backtraces/T26806c.stderr
=====================================
@@ -0,0 +1,11 @@
+T26806c: Uncaught exception ghc-internal:GHC.Internal.Exception.ErrorCall:
+
+Backtrace Test: 125000000
+
+IPE backtrace:
+ Lovely annotation, called at T26806c.hs:16:7 in main:Main
+ [1,2,3,4], called at T26806c.hs:15:5 in main:Main
+ annotateCallStack, called at T26806c.hs:14:3 in main:Main
+HasCallStack backtrace:
+ error, called at T26806c.hs:17:9 in main:Main
+
=====================================
libraries/ghc-experimental/tests/backtraces/all.T
=====================================
@@ -0,0 +1,5 @@
+stack_annotation_backtrace_opts = [ when(have_profiling(), extra_ways(['prof'])) , when(js_arch(), skip) , exit_code(1) ]
+
+test('T26806a', stack_annotation_backtrace_opts, compile_and_run, [''])
+test('T26806b', stack_annotation_backtrace_opts, compile_and_run, [''])
+test('T26806c', stack_annotation_backtrace_opts, compile_and_run, [''])
=====================================
libraries/ghc-internal/src/GHC/Internal/Stack/Annotation.hs
=====================================
@@ -4,6 +4,7 @@ module GHC.Internal.Stack.Annotation where
import GHC.Internal.Base
import GHC.Internal.Data.Typeable
+import GHC.Internal.Stack (SrcLoc, prettySrcLoc)
-- ----------------------------------------------------------------------------
-- StackAnnotation
@@ -13,8 +14,38 @@ import GHC.Internal.Data.Typeable
-- as the payload of 'AnnFrame' stack frames.
--
class StackAnnotation a where
+ -- | Display a human readable string for the 'StackAnnotation'.
+ --
+ -- This is supposed to be the long version of 'displayStackAnnotationShort'
+ -- and may contain a source location.
+ --
+ -- If not provided, 'displayStackAnnotation' is derived from 'stackAnnotationSourceLocation'
+ -- and 'displayStackAnnotationShort'.
displayStackAnnotation :: a -> String
+ -- | Get the 'SrcLoc' of the given 'StackAnnotation'.
+ --
+ -- This is optional, 'SrcLoc' are not strictly required for 'StackAnnotation', but
+ -- it is still heavily encouarged to provide a 'SrcLoc' for better IPE backtraces.
+ stackAnnotationSourceLocation :: a -> Maybe SrcLoc
+
+ -- | The description of the StackAnnotation without any metadata such as source locations.
+ --
+ -- Pefer implementing 'displayStackAnnotationShort' over 'displayStackAnnotation'.
+ displayStackAnnotationShort :: a -> String
+
+ {-# MINIMAL displayStackAnnotation | displayStackAnnotationShort #-}
+
+ displayStackAnnotation ann =
+ displayStackAnnotationShort ann
+ ++ case stackAnnotationSourceLocation ann of
+ Nothing -> ""
+ Just srcLoc -> ", called at " ++ prettySrcLoc srcLoc
+
+ stackAnnotationSourceLocation _ann = Nothing
+
+ displayStackAnnotationShort = displayStackAnnotation
+
-- ----------------------------------------------------------------------------
-- Annotations
-- ----------------------------------------------------------------------------
@@ -28,4 +59,11 @@ data SomeStackAnnotation where
SomeStackAnnotation :: forall a. (Typeable a, StackAnnotation a) => a -> SomeStackAnnotation
instance StackAnnotation SomeStackAnnotation where
- displayStackAnnotation (SomeStackAnnotation a) = displayStackAnnotation a
+ displayStackAnnotation (SomeStackAnnotation a) =
+ displayStackAnnotation a
+
+ stackAnnotationSourceLocation (SomeStackAnnotation a) =
+ stackAnnotationSourceLocation a
+
+ displayStackAnnotationShort (SomeStackAnnotation a) =
+ displayStackAnnotationShort a
=====================================
libraries/ghc-internal/tests/stack-annotation/ann_frame001.stdout
=====================================
@@ -1,12 +1,12 @@
Stack annotations:
-- (2,3)
+- (2,3), called at ann_frame001.hs:5:13 in main:Main
47
Stack annotations:
-- "bar"
-- "foo"
-- "tailCallEx"
+- "bar", called at ann_frame001.hs:23:9 in main:Main
+- "foo", called at ann_frame001.hs:21:11 in main:Main
+- "tailCallEx", called at ann_frame001.hs:17:18 in main:Main
Stack annotations:
-- "bar"
-- "foo"
-- "tailCallEx"
+- "bar", called at ann_frame001.hs:23:9 in main:Main
+- "foo", called at ann_frame001.hs:21:11 in main:Main
+- "tailCallEx", called at ann_frame001.hs:17:18 in main:Main
40
=====================================
libraries/ghc-internal/tests/stack-annotation/ann_frame002.stdout
=====================================
@@ -7,5 +7,5 @@ Finish some work
Some more work in bar
17711
Stack annotations:
-- bar
+- bar, called at ann_frame002.hs:23:29 in main:Main
- annotateCallStackIO, called at ann_frame002.hs:23:7 in main:Main
=====================================
libraries/ghc-internal/tests/stack-annotation/ann_frame003.stdout
=====================================
@@ -1,6 +1,6 @@
47
Stack annotations:
-- "bar"
-- "foo"
-- "tailCallEx"
+- "bar", called at ann_frame003.hs:25:9 in main:Main
+- "foo", called at ann_frame003.hs:21:11 in main:Main
+- "tailCallEx", called at ann_frame003.hs:16:18 in main:Main
40
=====================================
libraries/ghc-internal/tests/stack-annotation/ann_frame004.stdout
=====================================
@@ -13,5 +13,5 @@ Stack annotations:
- annotateCallStack, called at ann_frame004.hs:21:17 in main:Main
- annotateCallStack, called at ann_frame004.hs:21:17 in main:Main
- annotateCallStack, called at ann_frame004.hs:13:10 in main:Main
-- bar
+- bar, called at ann_frame004.hs:12:29 in main:Main
- annotateCallStackIO, called at ann_frame004.hs:12:7 in main:Main
=====================================
libraries/ghc-internal/tests/stack-annotation/ann_frame005.stdout
=====================================
@@ -2,9 +2,9 @@
Caught exception: SimpleBoom
Exception context:
- IPE backtrace:
-- throwIO SimpleBoom
-- raising action
-- catch site for throwIO SimpleBoom
+- throwIO SimpleBoom, called at ann_frame005.hs:33:5 in main:Main
+- raising action, called at ann_frame005.hs:32:3 in main:Main
+- catch site for throwIO SimpleBoom, called at ann_frame005.hs:27:5 in main:Main
- annotateCallStackIO, called at ann_frame005.hs:26:3 in main:Main
- HasCallStack backtrace:
- throwIO, called at ann_frame005.hs:34:7 in main:Main
@@ -13,9 +13,9 @@ Handler annotation not present in context
Caught exception: Prelude.undefined
Exception context:
- IPE backtrace:
-- undefined thunk
-- raising undefined action
-- catch site for undefined
+- undefined thunk, called at ann_frame005.hs:41:9 in main:Main
+- raising undefined action, called at ann_frame005.hs:38:3 in main:Main
+- catch site for undefined, called at ann_frame005.hs:27:5 in main:Main
- annotateCallStackIO, called at ann_frame005.hs:26:3 in main:Main
- HasCallStack backtrace:
- undefined, called at ann_frame005.hs:41:48 in main:Main
@@ -24,9 +24,9 @@ Handler annotation not present in context
Caught exception: error from annotateStackString
Exception context:
- IPE backtrace:
-- error thunk
-- raising error action
-- catch site for error
+- error thunk, called at ann_frame005.hs:48:9 in main:Main
+- raising error action, called at ann_frame005.hs:45:3 in main:Main
+- catch site for error, called at ann_frame005.hs:27:5 in main:Main
- annotateCallStackIO, called at ann_frame005.hs:26:3 in main:Main
- HasCallStack backtrace:
- error, called at ann_frame005.hs:48:44 in main:Main
@@ -35,8 +35,8 @@ Handler annotation not present in context
Caught exception: SimpleBoom
Exception context:
- IPE backtrace:
-- raising throwSTM action
-- catch site for throwSTM
+- raising throwSTM action, called at ann_frame005.hs:52:3 in main:Main
+- catch site for throwSTM, called at ann_frame005.hs:27:5 in main:Main
- annotateCallStackIO, called at ann_frame005.hs:26:3 in main:Main
- HasCallStack backtrace:
- throwSTM, called at ann_frame005.hs:55:9 in main:Main
=====================================
testsuite/tests/interface-stability/ghc-experimental-exports.stdout
=====================================
@@ -6499,25 +6499,27 @@ module GHC.Stack.Annotation.Experimental where
newtype CallStackAnnotation = CallStackAnnotation GHC.Internal.Stack.Types.CallStack
type ShowAnnotation :: *
data ShowAnnotation where
- ShowAnnotation :: forall a. GHC.Internal.Show.Show a => a -> ShowAnnotation
+ ShowAnnotation :: forall a. GHC.Internal.Show.Show a => !(GHC.Internal.Maybe.Maybe GHC.Internal.Stack.Types.SrcLoc) -> a -> ShowAnnotation
type SomeStackAnnotation :: *
data SomeStackAnnotation where
SomeStackAnnotation :: forall a. (ghc-internal-9.1500.0:GHC.Internal.Data.Typeable.Internal.Typeable a, StackAnnotation a) => a -> SomeStackAnnotation
type StackAnnotation :: * -> Constraint
class StackAnnotation a where
displayStackAnnotation :: a -> GHC.Internal.Base.String
- {-# MINIMAL displayStackAnnotation #-}
+ stackAnnotationSourceLocation :: a -> GHC.Internal.Maybe.Maybe GHC.Internal.Stack.Types.SrcLoc
+ displayStackAnnotationShort :: a -> GHC.Internal.Base.String
+ {-# MINIMAL displayStackAnnotation | displayStackAnnotationShort #-}
type StringAnnotation :: *
data StringAnnotation where
- StringAnnotation :: GHC.Internal.Base.String -> StringAnnotation
+ StringAnnotation :: !(GHC.Internal.Maybe.Maybe GHC.Internal.Stack.Types.SrcLoc) -> GHC.Internal.Base.String -> StringAnnotation
annotateCallStack :: forall b. GHC.Internal.Stack.Types.HasCallStack => b -> b
annotateCallStackIO :: forall a. GHC.Internal.Stack.Types.HasCallStack => GHC.Internal.Types.IO a -> GHC.Internal.Types.IO a
- annotateStack :: forall a b. (ghc-internal-9.1500.0:GHC.Internal.Data.Typeable.Internal.Typeable a, StackAnnotation a) => a -> b -> b
- annotateStackIO :: forall a b. (ghc-internal-9.1500.0:GHC.Internal.Data.Typeable.Internal.Typeable a, StackAnnotation a) => a -> GHC.Internal.Types.IO b -> GHC.Internal.Types.IO b
- annotateStackShow :: forall a b. (ghc-internal-9.1500.0:GHC.Internal.Data.Typeable.Internal.Typeable a, GHC.Internal.Show.Show a) => a -> b -> b
- annotateStackShowIO :: forall a b. GHC.Internal.Show.Show a => a -> GHC.Internal.Types.IO b -> GHC.Internal.Types.IO b
- annotateStackString :: forall b. GHC.Internal.Base.String -> b -> b
- annotateStackStringIO :: forall b. GHC.Internal.Base.String -> GHC.Internal.Types.IO b -> GHC.Internal.Types.IO b
+ annotateStack :: forall a b. (GHC.Internal.Stack.Types.HasCallStack, ghc-internal-9.1500.0:GHC.Internal.Data.Typeable.Internal.Typeable a, StackAnnotation a) => a -> b -> b
+ annotateStackIO :: forall a b. (GHC.Internal.Stack.Types.HasCallStack, ghc-internal-9.1500.0:GHC.Internal.Data.Typeable.Internal.Typeable a, StackAnnotation a) => a -> GHC.Internal.Types.IO b -> GHC.Internal.Types.IO b
+ annotateStackShow :: forall a b. (GHC.Internal.Stack.Types.HasCallStack, ghc-internal-9.1500.0:GHC.Internal.Data.Typeable.Internal.Typeable a, GHC.Internal.Show.Show a) => a -> b -> b
+ annotateStackShowIO :: forall a b. (GHC.Internal.Stack.Types.HasCallStack, GHC.Internal.Show.Show a) => a -> GHC.Internal.Types.IO b -> GHC.Internal.Types.IO b
+ annotateStackString :: forall b. GHC.Internal.Stack.Types.HasCallStack => GHC.Internal.Base.String -> b -> b
+ annotateStackStringIO :: forall b. GHC.Internal.Stack.Types.HasCallStack => GHC.Internal.Base.String -> GHC.Internal.Types.IO b -> GHC.Internal.Types.IO b
module GHC.Stats.Experimental where
-- Safety: Safe
=====================================
testsuite/tests/interface-stability/ghc-experimental-exports.stdout-mingw32
=====================================
@@ -6502,25 +6502,27 @@ module GHC.Stack.Annotation.Experimental where
newtype CallStackAnnotation = CallStackAnnotation GHC.Internal.Stack.Types.CallStack
type ShowAnnotation :: *
data ShowAnnotation where
- ShowAnnotation :: forall a. GHC.Internal.Show.Show a => a -> ShowAnnotation
+ ShowAnnotation :: forall a. GHC.Internal.Show.Show a => !(GHC.Internal.Maybe.Maybe GHC.Internal.Stack.Types.SrcLoc) -> a -> ShowAnnotation
type SomeStackAnnotation :: *
data SomeStackAnnotation where
SomeStackAnnotation :: forall a. (ghc-internal-9.1500.0:GHC.Internal.Data.Typeable.Internal.Typeable a, StackAnnotation a) => a -> SomeStackAnnotation
type StackAnnotation :: * -> Constraint
class StackAnnotation a where
displayStackAnnotation :: a -> GHC.Internal.Base.String
- {-# MINIMAL displayStackAnnotation #-}
+ stackAnnotationSourceLocation :: a -> GHC.Internal.Maybe.Maybe GHC.Internal.Stack.Types.SrcLoc
+ displayStackAnnotationShort :: a -> GHC.Internal.Base.String
+ {-# MINIMAL displayStackAnnotation | displayStackAnnotationShort #-}
type StringAnnotation :: *
data StringAnnotation where
- StringAnnotation :: GHC.Internal.Base.String -> StringAnnotation
+ StringAnnotation :: !(GHC.Internal.Maybe.Maybe GHC.Internal.Stack.Types.SrcLoc) -> GHC.Internal.Base.String -> StringAnnotation
annotateCallStack :: forall b. GHC.Internal.Stack.Types.HasCallStack => b -> b
annotateCallStackIO :: forall a. GHC.Internal.Stack.Types.HasCallStack => GHC.Internal.Types.IO a -> GHC.Internal.Types.IO a
- annotateStack :: forall a b. (ghc-internal-9.1500.0:GHC.Internal.Data.Typeable.Internal.Typeable a, StackAnnotation a) => a -> b -> b
- annotateStackIO :: forall a b. (ghc-internal-9.1500.0:GHC.Internal.Data.Typeable.Internal.Typeable a, StackAnnotation a) => a -> GHC.Internal.Types.IO b -> GHC.Internal.Types.IO b
- annotateStackShow :: forall a b. (ghc-internal-9.1500.0:GHC.Internal.Data.Typeable.Internal.Typeable a, GHC.Internal.Show.Show a) => a -> b -> b
- annotateStackShowIO :: forall a b. GHC.Internal.Show.Show a => a -> GHC.Internal.Types.IO b -> GHC.Internal.Types.IO b
- annotateStackString :: forall b. GHC.Internal.Base.String -> b -> b
- annotateStackStringIO :: forall b. GHC.Internal.Base.String -> GHC.Internal.Types.IO b -> GHC.Internal.Types.IO b
+ annotateStack :: forall a b. (GHC.Internal.Stack.Types.HasCallStack, ghc-internal-9.1500.0:GHC.Internal.Data.Typeable.Internal.Typeable a, StackAnnotation a) => a -> b -> b
+ annotateStackIO :: forall a b. (GHC.Internal.Stack.Types.HasCallStack, ghc-internal-9.1500.0:GHC.Internal.Data.Typeable.Internal.Typeable a, StackAnnotation a) => a -> GHC.Internal.Types.IO b -> GHC.Internal.Types.IO b
+ annotateStackShow :: forall a b. (GHC.Internal.Stack.Types.HasCallStack, ghc-internal-9.1500.0:GHC.Internal.Data.Typeable.Internal.Typeable a, GHC.Internal.Show.Show a) => a -> b -> b
+ annotateStackShowIO :: forall a b. (GHC.Internal.Stack.Types.HasCallStack, GHC.Internal.Show.Show a) => a -> GHC.Internal.Types.IO b -> GHC.Internal.Types.IO b
+ annotateStackString :: forall b. GHC.Internal.Stack.Types.HasCallStack => GHC.Internal.Base.String -> b -> b
+ annotateStackStringIO :: forall b. GHC.Internal.Stack.Types.HasCallStack => GHC.Internal.Base.String -> GHC.Internal.Types.IO b -> GHC.Internal.Types.IO b
module GHC.Stats.Experimental where
-- Safety: Safe
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/531a1af56cad47fe22ebeeed53512e…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/531a1af56cad47fe22ebeeed53512e…
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: Add optional `SrcLoc` to `StackAnnotation` class
by Marge Bot (@marge-bot) 20 Feb '26
by Marge Bot (@marge-bot) 20 Feb '26
20 Feb '26
Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC
Commits:
0ead7260 by fendor at 2026-02-19T20:22:29-05:00
Add optional `SrcLoc` to `StackAnnotation` class
`StackAnnotation`s give access to an optional `SrcLoc` field that
user-added stack annotations can use to provide better backtraces in both error
messages and when decoding the callstack.
We update builtin stack annotations such as `StringAnnotation` and
`ShowAnnotation` to also capture the `SrcLoc` of the current `CallStack`
to improve backtraces by default (if stack annotations are used).
This change is backwards compatible with GHC 9.14.1.
- - - - -
6c40b798 by Simon Hengel at 2026-02-19T20:22:30-05:00
docs: Fix grammar in explicit_namespaces.rst
- - - - -
531a1af5 by Andreas Klebinger at 2026-02-19T20:22:31-05:00
Bump hackage index state and minimum shake version for hadrian.
We also add the shake version we want to stack.yaml
Fixes #26884
- - - - -
25 changed files:
- .gitlab/ci.sh
- docs/users_guide/exts/explicit_namespaces.rst
- hadrian/cabal.project
- hadrian/hadrian.cabal
- hadrian/stack.yaml
- libraries/ghc-experimental/CHANGELOG.md
- libraries/ghc-experimental/src/GHC/Stack/Annotation/Experimental.hs
- + libraries/ghc-experimental/tests/Makefile
- + libraries/ghc-experimental/tests/all.T
- + libraries/ghc-experimental/tests/backtraces/Makefile
- + libraries/ghc-experimental/tests/backtraces/T26806a.hs
- + libraries/ghc-experimental/tests/backtraces/T26806a.stderr
- + libraries/ghc-experimental/tests/backtraces/T26806b.hs
- + libraries/ghc-experimental/tests/backtraces/T26806b.stderr
- + libraries/ghc-experimental/tests/backtraces/T26806c.hs
- + libraries/ghc-experimental/tests/backtraces/T26806c.stderr
- + libraries/ghc-experimental/tests/backtraces/all.T
- libraries/ghc-internal/src/GHC/Internal/Stack/Annotation.hs
- libraries/ghc-internal/tests/stack-annotation/ann_frame001.stdout
- libraries/ghc-internal/tests/stack-annotation/ann_frame002.stdout
- libraries/ghc-internal/tests/stack-annotation/ann_frame003.stdout
- libraries/ghc-internal/tests/stack-annotation/ann_frame004.stdout
- libraries/ghc-internal/tests/stack-annotation/ann_frame005.stdout
- testsuite/tests/interface-stability/ghc-experimental-exports.stdout
- testsuite/tests/interface-stability/ghc-experimental-exports.stdout-mingw32
Changes:
=====================================
.gitlab/ci.sh
=====================================
@@ -8,7 +8,7 @@ set -Eeuo pipefail
# Configuration:
# N.B. You may want to also update the index-state in hadrian/cabal.project.
-HACKAGE_INDEX_STATE="2025-12-19T19:24:24Z"
+HACKAGE_INDEX_STATE="2026-02-06T13:08:09Z"
MIN_HAPPY_VERSION="1.20"
MIN_ALEX_VERSION="3.2.6"
=====================================
docs/users_guide/exts/explicit_namespaces.rst
=====================================
@@ -86,7 +86,7 @@ However, how would one import only the data constructor? There are two options:
import Data.Proxy (data Proxy) -- imports the data constructor only
import Data.Proxy (pattern Proxy) -- imports the data constructor only
-The ``data`` keyword enables the import or export a data constructor without its
+The ``data`` keyword allows a data constructor to be imported or exported without its
parent type constructor.
The ``pattern`` keyword does the same, with only a few differences:
=====================================
hadrian/cabal.project
=====================================
@@ -4,7 +4,7 @@ packages: ./
-- This essentially freezes the build plan for hadrian
-- It would be wise to keep this up to date with the state set in .gitlab/ci.sh.
-index-state: 2025-12-19T19:24:24Z
+index-state: 2026-02-06T13:08:09Z
-- Fixes bootstrapping with ghc-9.14
allow-newer: all:base, all:ghc-bignum, all:template-haskell
=====================================
hadrian/hadrian.cabal
=====================================
@@ -163,7 +163,8 @@ executable hadrian
, time
, mtl >= 2.2 && < 2.4
, parsec >= 3.1 && < 3.2
- , shake >= 0.18.3 && < 0.20
+ -- shake 0.19.9 has some fixes to greatly improve error messages
+ , shake >= 0.19.9 && < 0.20
, transformers >= 0.4 && < 0.7
, unordered-containers >= 0.2.1 && < 0.3
, text >= 1.2 && < 3
=====================================
hadrian/stack.yaml
=====================================
@@ -42,3 +42,5 @@ extra-deps:
- directory-1.3.9.0
# Needed because process depends on directory, which has been pruned:
- process-1.6.26.1
+# Needed stackage doesn't have the latest shake yet, which we want for better exceptions
+- shake-0.19.9
=====================================
libraries/ghc-experimental/CHANGELOG.md
=====================================
@@ -5,12 +5,17 @@
- New and/or/xor SIMD primops for bitwise logical operations, such as andDoubleX4#, orWord32X4#, xorInt8X16#, etc.
These are supported by the LLVM backend and by the X86_64 NCG backend (for the latter, only for 128-wide vectors).
-## ghc-experimental-9.1401.0,
+## ghc-experimental-9.1402.0
+
+- Add optional `SrcLoc` to `StackAnnotation` class in `GHC.Stack.Annotation.Experimental`
+
+## ghc-experimental-9.1401.0
- Expose access to RTS flags via `GHC.RTS.Flags.Experimental`
- Expose access to era profiling interface via `GHC.Profiling.Eras`
- Expose access to runtime stack annotations via `GHC.Stack.Annotation.Experimental`
- Expose custom allocation limit handler via `System.Mem.Experimental`
+- Expose access to Stack Annotations via `GHC.Stack.Annotation.Experimental`
- Expose module Prelude.Experimental, which reexports some modules from ghc-experimental for convenience, like Prelude does for base.
## ghc-experimental-9.1201.0
=====================================
libraries/ghc-experimental/src/GHC/Stack/Annotation/Experimental.hs
=====================================
@@ -82,9 +82,6 @@ import GHC.Internal.Stack.Annotation
-- the pure variations can behave in ways that are hard to predict.
--
-- See Note [Stack annotations in pure code] for more details.
---
--- At last, stack annotations are tricky to use with 'error'.
--- See Note [Pushing annotation frames on 'error'] for why this is the case.
-- Note [Stack annotations in pure code]
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -96,57 +93,50 @@ import GHC.Internal.Stack.Annotation
-- For example:
--
-- @
--- annotateStackShow (5 @Int) (fib 20 + throw (ErrorCall "Oh no!"))
+-- annotateStackShow (5 @Int) (fib 20 + error "Oh no!")
-- @
--
--- Without forcing the result of @(fib 20 + throw (ErrorCall "Oh no!"))@, the computation
+-- Without forcing the result of @(fib 20 + error "Oh no!")@, the computation
-- will simply return a thunk, and the stack annotation would be popped off the stack.
-- Once the thunk is evaluated, the exception is raised, but no stack annotation will be found!
--- If we force the result of @(fib 20 + throw (ErrorCall "Oh no!"))@, then the stack
+-- If we force the result of @(fib 20 + error "Oh no!")@, then the stack
-- annotations remain on the stack, and are displayed in the stack trace.
--
-- Naturally, this only holds if no imprecise exceptions are thrown during evaluation of any
-- nested value, for example in 'annotateStackShow 5 (Just $ throw (ErrorCall "Oh no!"))', the
-- stack trace will not include the value @5@.
--
--- See how we preferred @throw (ErrorCall ...)@ over @error@?
--- See Note [Pushing annotation frames on 'error'] for why we do this.
-
--- Note [Pushing annotation frames on 'error']
--- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--- Examples so far have not been using 'error' at all.
--- The reason is that 'error' is extraordinarily difficult to use correctly with stack annotation frames.
--- See Note [Capturing the backtrace in throw] for a detailed discussion of how 'throw'
--- manages to capture 'Backtraces'.
---
--- Long story short, 'error' does not do the same thing as 'throw' and is subtly different
--- in terms of evaluation, cause it to bypass the stack annotation frames, especially in
--- pure code.
---
--- However, even in 'IO' code, it is difficult to use 'error' and obtain stack annotation frames
--- close to the call site due to the same issue of laziness and backtrace collection.
---
--- This means, right now, if you want to reliably capture stack frame annotations,
--- in both pure and impure code, prefer 'throw' and 'throwIO' variants over 'error'.
-- ----------------------------------------------------------------------------
-- Annotations
-- ----------------------------------------------------------------------------
+
+-- | A 'String' only annotation with an optional source location.
data StringAnnotation where
- StringAnnotation :: String -> StringAnnotation
+ StringAnnotation :: !(Maybe SrcLoc) -> String -> StringAnnotation
instance StackAnnotation StringAnnotation where
- displayStackAnnotation (StringAnnotation str) = str
+ displayStackAnnotationShort (StringAnnotation _srcLoc str) =
+ str
+
+ stackAnnotationSourceLocation (StringAnnotation srcLoc _str) =
+ srcLoc
-- | Use the 'Show' instance of a type to display as the 'StackAnnotation'.
data ShowAnnotation where
- ShowAnnotation :: forall a . Show a => a -> ShowAnnotation
+ ShowAnnotation :: forall a . Show a => !(Maybe SrcLoc) -> a -> ShowAnnotation
instance StackAnnotation ShowAnnotation where
- displayStackAnnotation (ShowAnnotation showAnno) = show showAnno
+ displayStackAnnotationShort (ShowAnnotation _srcLoc showAnno) =
+ show showAnno
+
+ stackAnnotationSourceLocation (ShowAnnotation srcLoc _showAnno) =
+ srcLoc
-- | A 'CallStack' stack annotation.
+--
+-- Captures the whole 'CallStack'.
newtype CallStackAnnotation = CallStackAnnotation CallStack
instance Show CallStackAnnotation where
@@ -154,9 +144,23 @@ instance Show CallStackAnnotation where
-- | Displays the first entry of the 'CallStack'
instance StackAnnotation CallStackAnnotation where
- displayStackAnnotation (CallStackAnnotation cs) = case getCallStack cs of
+ stackAnnotationSourceLocation (CallStackAnnotation cs) =
+ callStackHeadSrcLoc cs
+
+ displayStackAnnotationShort (CallStackAnnotation cs) =
+ callStackHeadFunctionName cs
+
+callStackHeadSrcLoc :: CallStack -> Maybe SrcLoc
+callStackHeadSrcLoc cs =
+ case getCallStack cs of
+ [] -> Nothing
+ (_, srcLoc):_ -> Just srcLoc
+
+callStackHeadFunctionName :: CallStack -> String
+callStackHeadFunctionName cs =
+ case getCallStack cs of
[] -> "<unknown source location>"
- ((fnName,srcLoc):_) -> fnName ++ ", called at " ++ prettySrcLoc srcLoc
+ (fnName, _):_ -> fnName
-- ----------------------------------------------------------------------------
-- Annotate the CallStack with custom data
@@ -172,7 +176,7 @@ instance StackAnnotation CallStackAnnotation where
--
-- WARNING: forces the evaluation of @b@ to WHNF.
{-# NOINLINE annotateStack #-}
-annotateStack :: forall a b. (Typeable a, StackAnnotation a) => a -> b -> b
+annotateStack :: forall a b. (HasCallStack, Typeable a, StackAnnotation a) => a -> b -> b
annotateStack ann b = unsafePerformIO $
annotateStackIO ann (evaluate b)
@@ -196,9 +200,9 @@ annotateCallStack b = unsafePerformIO $ withFrozenCallStack $
-- information to stack traces.
--
-- WARNING: forces the evaluation of @b@ to WHNF.
-annotateStackString :: forall b . String -> b -> b
+annotateStackString :: forall b . HasCallStack => String -> b -> b
annotateStackString ann =
- annotateStack (StringAnnotation ann)
+ annotateStack (StringAnnotation (callStackHeadSrcLoc ?callStack) ann)
-- | @'annotateStackShow' showable b@ annotates the evaluation stack of @b@
-- with the value @showable@.
@@ -207,37 +211,36 @@ annotateStackString ann =
-- information to stack traces.
--
-- WARNING: forces the evaluation of @b@ to WHNF.
-annotateStackShow :: forall a b . (Typeable a, Show a) => a -> b -> b
+annotateStackShow :: forall a b . (HasCallStack, Typeable a, Show a) => a -> b -> b
annotateStackShow ann =
- annotateStack (ShowAnnotation ann)
+ annotateStack (ShowAnnotation (callStackHeadSrcLoc ?callStack) ann)
-- | @'annotateStackIO' showable b@ annotates the evaluation stack of @b@
-- with the value @showable@.
--
-- When decoding the call stack, the annotation frames can be used to add more
-- information to stack traces.
-annotateStackIO :: forall a b . (Typeable a, StackAnnotation a) => a -> IO b -> IO b
+annotateStackIO :: forall a b . (HasCallStack, Typeable a, StackAnnotation a) => a -> IO b -> IO b
annotateStackIO ann (IO act) =
IO $ \s -> annotateStack# (SomeStackAnnotation ann) act s
-{-# NOINLINE annotateStackIO #-}
-- | @'annotateStackStringIO' msg b@ annotates the evaluation stack of @b@
-- with the value @msg@.
--
-- When decoding the call stack, the annotation frames can be used to add more
-- information to stack traces.
-annotateStackStringIO :: forall b . String -> IO b -> IO b
+annotateStackStringIO :: forall b . HasCallStack => String -> IO b -> IO b
annotateStackStringIO ann =
- annotateStackIO (StringAnnotation ann)
+ annotateStackIO (StringAnnotation (callStackHeadSrcLoc ?callStack) ann)
-- | @'annotateStackShowIO' msg b@ annotates the evaluation stack of @b@
-- with the value @msg@.
--
-- When decoding the call stack, the annotation frames can be used to add more
-- information to stack traces.
-annotateStackShowIO :: forall a b . (Show a) => a -> IO b -> IO b
+annotateStackShowIO :: forall a b . (HasCallStack, Show a) => a -> IO b -> IO b
annotateStackShowIO ann =
- annotateStackIO (ShowAnnotation ann)
+ annotateStackIO (ShowAnnotation (callStackHeadSrcLoc ?callStack) ann)
-- | @'annotateCallStackIO' b@ annotates the evaluation stack of @b@ with the
-- current 'callstack'.
=====================================
libraries/ghc-experimental/tests/Makefile
=====================================
@@ -0,0 +1,7 @@
+# This Makefile runs the tests using GHC's testsuite framework. It
+# assumes the package is part of a GHC build tree with the testsuite
+# installed in ../../../testsuite.
+
+TOP=../../../testsuite
+include $(TOP)/mk/boilerplate.mk
+include $(TOP)/mk/test.mk
=====================================
libraries/ghc-experimental/tests/all.T
=====================================
=====================================
libraries/ghc-experimental/tests/backtraces/Makefile
=====================================
@@ -0,0 +1,7 @@
+# This Makefile runs the tests using GHC's testsuite framework. It
+# assumes the package is part of a GHC build tree with the testsuite
+# installed in ../../../testsuite.
+
+TOP=../../../../testsuite
+include $(TOP)/mk/boilerplate.mk
+include $(TOP)/mk/test.mk
=====================================
libraries/ghc-experimental/tests/backtraces/T26806a.hs
=====================================
@@ -0,0 +1,14 @@
+module Main where
+
+import GHC.Stack.Annotation.Experimental
+import Control.Exception
+import Control.Exception.Backtrace
+
+main :: IO ()
+main = do
+ setBacktraceMechanismState IPEBacktrace True
+ annotateCallStackIO $ do
+ annotateStackShowIO ([1..4] :: [Int]) $ do
+ annotateStackStringIO "Lovely annotation" $ do
+ throwIO $ ErrorCall "Backtrace Test"
+
=====================================
libraries/ghc-experimental/tests/backtraces/T26806a.stderr
=====================================
@@ -0,0 +1,11 @@
+T26806a: Uncaught exception ghc-internal:GHC.Internal.Exception.ErrorCall:
+
+Backtrace Test
+
+IPE backtrace:
+ Lovely annotation, called at T26806a.hs:12:7 in main:Main
+ [1,2,3,4], called at T26806a.hs:11:5 in main:Main
+ annotateCallStackIO, called at T26806a.hs:10:3 in main:Main
+HasCallStack backtrace:
+ throwIO, called at T26806a.hs:13:9 in main:Main
+
=====================================
libraries/ghc-experimental/tests/backtraces/T26806b.hs
=====================================
@@ -0,0 +1,18 @@
+module Main where
+
+import GHC.Stack.Annotation.Experimental
+import Control.Exception
+import Control.Exception.Backtrace
+
+main :: IO ()
+main = do
+ setBacktraceMechanismState IPEBacktrace True
+ print $ foo 500
+
+foo :: Int -> Int
+foo n =
+ annotateCallStack $
+ annotateStackShow ([1..4] :: [Int]) $
+ annotateStackString "Lovely annotation" $
+ throw $ ErrorCall $ "Backtrace Test: " ++ show (n * n * n)
+
=====================================
libraries/ghc-experimental/tests/backtraces/T26806b.stderr
=====================================
@@ -0,0 +1,10 @@
+T26806b: Uncaught exception ghc-internal:GHC.Internal.Exception.ErrorCall:
+
+Backtrace Test: 125000000
+
+IPE backtrace:
+ Lovely annotation, called at T26806b.hs:16:7 in main:Main
+ [1,2,3,4], called at T26806b.hs:15:5 in main:Main
+ annotateCallStack, called at T26806b.hs:14:3 in main:Main
+HasCallStack backtrace:
+ throw, called at T26806b.hs:17:9 in main:Main
=====================================
libraries/ghc-experimental/tests/backtraces/T26806c.hs
=====================================
@@ -0,0 +1,18 @@
+module Main where
+
+import GHC.Stack.Annotation.Experimental
+import Control.Exception
+import Control.Exception.Backtrace
+
+main :: IO ()
+main = do
+ setBacktraceMechanismState IPEBacktrace True
+ print $ foo 500
+
+foo :: Int -> Int
+foo n =
+ annotateCallStack $
+ annotateStackShow ([1..4] :: [Int]) $
+ annotateStackString "Lovely annotation" $
+ error $ "Backtrace Test: " ++ show (n * n * n)
+
=====================================
libraries/ghc-experimental/tests/backtraces/T26806c.stderr
=====================================
@@ -0,0 +1,11 @@
+T26806c: Uncaught exception ghc-internal:GHC.Internal.Exception.ErrorCall:
+
+Backtrace Test: 125000000
+
+IPE backtrace:
+ Lovely annotation, called at T26806c.hs:16:7 in main:Main
+ [1,2,3,4], called at T26806c.hs:15:5 in main:Main
+ annotateCallStack, called at T26806c.hs:14:3 in main:Main
+HasCallStack backtrace:
+ error, called at T26806c.hs:17:9 in main:Main
+
=====================================
libraries/ghc-experimental/tests/backtraces/all.T
=====================================
@@ -0,0 +1,5 @@
+stack_annotation_backtrace_opts = [ when(have_profiling(), extra_ways(['prof'])) , when(js_arch(), skip) , exit_code(1) ]
+
+test('T26806a', stack_annotation_backtrace_opts, compile_and_run, [''])
+test('T26806b', stack_annotation_backtrace_opts, compile_and_run, [''])
+test('T26806c', stack_annotation_backtrace_opts, compile_and_run, [''])
=====================================
libraries/ghc-internal/src/GHC/Internal/Stack/Annotation.hs
=====================================
@@ -4,6 +4,7 @@ module GHC.Internal.Stack.Annotation where
import GHC.Internal.Base
import GHC.Internal.Data.Typeable
+import GHC.Internal.Stack (SrcLoc, prettySrcLoc)
-- ----------------------------------------------------------------------------
-- StackAnnotation
@@ -13,8 +14,38 @@ import GHC.Internal.Data.Typeable
-- as the payload of 'AnnFrame' stack frames.
--
class StackAnnotation a where
+ -- | Display a human readable string for the 'StackAnnotation'.
+ --
+ -- This is supposed to be the long version of 'displayStackAnnotationShort'
+ -- and may contain a source location.
+ --
+ -- If not provided, 'displayStackAnnotation' is derived from 'stackAnnotationSourceLocation'
+ -- and 'displayStackAnnotationShort'.
displayStackAnnotation :: a -> String
+ -- | Get the 'SrcLoc' of the given 'StackAnnotation'.
+ --
+ -- This is optional, 'SrcLoc' are not strictly required for 'StackAnnotation', but
+ -- it is still heavily encouarged to provide a 'SrcLoc' for better IPE backtraces.
+ stackAnnotationSourceLocation :: a -> Maybe SrcLoc
+
+ -- | The description of the StackAnnotation without any metadata such as source locations.
+ --
+ -- Pefer implementing 'displayStackAnnotationShort' over 'displayStackAnnotation'.
+ displayStackAnnotationShort :: a -> String
+
+ {-# MINIMAL displayStackAnnotation | displayStackAnnotationShort #-}
+
+ displayStackAnnotation ann =
+ displayStackAnnotationShort ann
+ ++ case stackAnnotationSourceLocation ann of
+ Nothing -> ""
+ Just srcLoc -> ", called at " ++ prettySrcLoc srcLoc
+
+ stackAnnotationSourceLocation _ann = Nothing
+
+ displayStackAnnotationShort = displayStackAnnotation
+
-- ----------------------------------------------------------------------------
-- Annotations
-- ----------------------------------------------------------------------------
@@ -28,4 +59,11 @@ data SomeStackAnnotation where
SomeStackAnnotation :: forall a. (Typeable a, StackAnnotation a) => a -> SomeStackAnnotation
instance StackAnnotation SomeStackAnnotation where
- displayStackAnnotation (SomeStackAnnotation a) = displayStackAnnotation a
+ displayStackAnnotation (SomeStackAnnotation a) =
+ displayStackAnnotation a
+
+ stackAnnotationSourceLocation (SomeStackAnnotation a) =
+ stackAnnotationSourceLocation a
+
+ displayStackAnnotationShort (SomeStackAnnotation a) =
+ displayStackAnnotationShort a
=====================================
libraries/ghc-internal/tests/stack-annotation/ann_frame001.stdout
=====================================
@@ -1,12 +1,12 @@
Stack annotations:
-- (2,3)
+- (2,3), called at ann_frame001.hs:5:13 in main:Main
47
Stack annotations:
-- "bar"
-- "foo"
-- "tailCallEx"
+- "bar", called at ann_frame001.hs:23:9 in main:Main
+- "foo", called at ann_frame001.hs:21:11 in main:Main
+- "tailCallEx", called at ann_frame001.hs:17:18 in main:Main
Stack annotations:
-- "bar"
-- "foo"
-- "tailCallEx"
+- "bar", called at ann_frame001.hs:23:9 in main:Main
+- "foo", called at ann_frame001.hs:21:11 in main:Main
+- "tailCallEx", called at ann_frame001.hs:17:18 in main:Main
40
=====================================
libraries/ghc-internal/tests/stack-annotation/ann_frame002.stdout
=====================================
@@ -7,5 +7,5 @@ Finish some work
Some more work in bar
17711
Stack annotations:
-- bar
+- bar, called at ann_frame002.hs:23:29 in main:Main
- annotateCallStackIO, called at ann_frame002.hs:23:7 in main:Main
=====================================
libraries/ghc-internal/tests/stack-annotation/ann_frame003.stdout
=====================================
@@ -1,6 +1,6 @@
47
Stack annotations:
-- "bar"
-- "foo"
-- "tailCallEx"
+- "bar", called at ann_frame003.hs:25:9 in main:Main
+- "foo", called at ann_frame003.hs:21:11 in main:Main
+- "tailCallEx", called at ann_frame003.hs:16:18 in main:Main
40
=====================================
libraries/ghc-internal/tests/stack-annotation/ann_frame004.stdout
=====================================
@@ -13,5 +13,5 @@ Stack annotations:
- annotateCallStack, called at ann_frame004.hs:21:17 in main:Main
- annotateCallStack, called at ann_frame004.hs:21:17 in main:Main
- annotateCallStack, called at ann_frame004.hs:13:10 in main:Main
-- bar
+- bar, called at ann_frame004.hs:12:29 in main:Main
- annotateCallStackIO, called at ann_frame004.hs:12:7 in main:Main
=====================================
libraries/ghc-internal/tests/stack-annotation/ann_frame005.stdout
=====================================
@@ -2,9 +2,9 @@
Caught exception: SimpleBoom
Exception context:
- IPE backtrace:
-- throwIO SimpleBoom
-- raising action
-- catch site for throwIO SimpleBoom
+- throwIO SimpleBoom, called at ann_frame005.hs:33:5 in main:Main
+- raising action, called at ann_frame005.hs:32:3 in main:Main
+- catch site for throwIO SimpleBoom, called at ann_frame005.hs:27:5 in main:Main
- annotateCallStackIO, called at ann_frame005.hs:26:3 in main:Main
- HasCallStack backtrace:
- throwIO, called at ann_frame005.hs:34:7 in main:Main
@@ -13,9 +13,9 @@ Handler annotation not present in context
Caught exception: Prelude.undefined
Exception context:
- IPE backtrace:
-- undefined thunk
-- raising undefined action
-- catch site for undefined
+- undefined thunk, called at ann_frame005.hs:41:9 in main:Main
+- raising undefined action, called at ann_frame005.hs:38:3 in main:Main
+- catch site for undefined, called at ann_frame005.hs:27:5 in main:Main
- annotateCallStackIO, called at ann_frame005.hs:26:3 in main:Main
- HasCallStack backtrace:
- undefined, called at ann_frame005.hs:41:48 in main:Main
@@ -24,9 +24,9 @@ Handler annotation not present in context
Caught exception: error from annotateStackString
Exception context:
- IPE backtrace:
-- error thunk
-- raising error action
-- catch site for error
+- error thunk, called at ann_frame005.hs:48:9 in main:Main
+- raising error action, called at ann_frame005.hs:45:3 in main:Main
+- catch site for error, called at ann_frame005.hs:27:5 in main:Main
- annotateCallStackIO, called at ann_frame005.hs:26:3 in main:Main
- HasCallStack backtrace:
- error, called at ann_frame005.hs:48:44 in main:Main
@@ -35,8 +35,8 @@ Handler annotation not present in context
Caught exception: SimpleBoom
Exception context:
- IPE backtrace:
-- raising throwSTM action
-- catch site for throwSTM
+- raising throwSTM action, called at ann_frame005.hs:52:3 in main:Main
+- catch site for throwSTM, called at ann_frame005.hs:27:5 in main:Main
- annotateCallStackIO, called at ann_frame005.hs:26:3 in main:Main
- HasCallStack backtrace:
- throwSTM, called at ann_frame005.hs:55:9 in main:Main
=====================================
testsuite/tests/interface-stability/ghc-experimental-exports.stdout
=====================================
@@ -6499,25 +6499,27 @@ module GHC.Stack.Annotation.Experimental where
newtype CallStackAnnotation = CallStackAnnotation GHC.Internal.Stack.Types.CallStack
type ShowAnnotation :: *
data ShowAnnotation where
- ShowAnnotation :: forall a. GHC.Internal.Show.Show a => a -> ShowAnnotation
+ ShowAnnotation :: forall a. GHC.Internal.Show.Show a => !(GHC.Internal.Maybe.Maybe GHC.Internal.Stack.Types.SrcLoc) -> a -> ShowAnnotation
type SomeStackAnnotation :: *
data SomeStackAnnotation where
SomeStackAnnotation :: forall a. (ghc-internal-9.1500.0:GHC.Internal.Data.Typeable.Internal.Typeable a, StackAnnotation a) => a -> SomeStackAnnotation
type StackAnnotation :: * -> Constraint
class StackAnnotation a where
displayStackAnnotation :: a -> GHC.Internal.Base.String
- {-# MINIMAL displayStackAnnotation #-}
+ stackAnnotationSourceLocation :: a -> GHC.Internal.Maybe.Maybe GHC.Internal.Stack.Types.SrcLoc
+ displayStackAnnotationShort :: a -> GHC.Internal.Base.String
+ {-# MINIMAL displayStackAnnotation | displayStackAnnotationShort #-}
type StringAnnotation :: *
data StringAnnotation where
- StringAnnotation :: GHC.Internal.Base.String -> StringAnnotation
+ StringAnnotation :: !(GHC.Internal.Maybe.Maybe GHC.Internal.Stack.Types.SrcLoc) -> GHC.Internal.Base.String -> StringAnnotation
annotateCallStack :: forall b. GHC.Internal.Stack.Types.HasCallStack => b -> b
annotateCallStackIO :: forall a. GHC.Internal.Stack.Types.HasCallStack => GHC.Internal.Types.IO a -> GHC.Internal.Types.IO a
- annotateStack :: forall a b. (ghc-internal-9.1500.0:GHC.Internal.Data.Typeable.Internal.Typeable a, StackAnnotation a) => a -> b -> b
- annotateStackIO :: forall a b. (ghc-internal-9.1500.0:GHC.Internal.Data.Typeable.Internal.Typeable a, StackAnnotation a) => a -> GHC.Internal.Types.IO b -> GHC.Internal.Types.IO b
- annotateStackShow :: forall a b. (ghc-internal-9.1500.0:GHC.Internal.Data.Typeable.Internal.Typeable a, GHC.Internal.Show.Show a) => a -> b -> b
- annotateStackShowIO :: forall a b. GHC.Internal.Show.Show a => a -> GHC.Internal.Types.IO b -> GHC.Internal.Types.IO b
- annotateStackString :: forall b. GHC.Internal.Base.String -> b -> b
- annotateStackStringIO :: forall b. GHC.Internal.Base.String -> GHC.Internal.Types.IO b -> GHC.Internal.Types.IO b
+ annotateStack :: forall a b. (GHC.Internal.Stack.Types.HasCallStack, ghc-internal-9.1500.0:GHC.Internal.Data.Typeable.Internal.Typeable a, StackAnnotation a) => a -> b -> b
+ annotateStackIO :: forall a b. (GHC.Internal.Stack.Types.HasCallStack, ghc-internal-9.1500.0:GHC.Internal.Data.Typeable.Internal.Typeable a, StackAnnotation a) => a -> GHC.Internal.Types.IO b -> GHC.Internal.Types.IO b
+ annotateStackShow :: forall a b. (GHC.Internal.Stack.Types.HasCallStack, ghc-internal-9.1500.0:GHC.Internal.Data.Typeable.Internal.Typeable a, GHC.Internal.Show.Show a) => a -> b -> b
+ annotateStackShowIO :: forall a b. (GHC.Internal.Stack.Types.HasCallStack, GHC.Internal.Show.Show a) => a -> GHC.Internal.Types.IO b -> GHC.Internal.Types.IO b
+ annotateStackString :: forall b. GHC.Internal.Stack.Types.HasCallStack => GHC.Internal.Base.String -> b -> b
+ annotateStackStringIO :: forall b. GHC.Internal.Stack.Types.HasCallStack => GHC.Internal.Base.String -> GHC.Internal.Types.IO b -> GHC.Internal.Types.IO b
module GHC.Stats.Experimental where
-- Safety: Safe
=====================================
testsuite/tests/interface-stability/ghc-experimental-exports.stdout-mingw32
=====================================
@@ -6502,25 +6502,27 @@ module GHC.Stack.Annotation.Experimental where
newtype CallStackAnnotation = CallStackAnnotation GHC.Internal.Stack.Types.CallStack
type ShowAnnotation :: *
data ShowAnnotation where
- ShowAnnotation :: forall a. GHC.Internal.Show.Show a => a -> ShowAnnotation
+ ShowAnnotation :: forall a. GHC.Internal.Show.Show a => !(GHC.Internal.Maybe.Maybe GHC.Internal.Stack.Types.SrcLoc) -> a -> ShowAnnotation
type SomeStackAnnotation :: *
data SomeStackAnnotation where
SomeStackAnnotation :: forall a. (ghc-internal-9.1500.0:GHC.Internal.Data.Typeable.Internal.Typeable a, StackAnnotation a) => a -> SomeStackAnnotation
type StackAnnotation :: * -> Constraint
class StackAnnotation a where
displayStackAnnotation :: a -> GHC.Internal.Base.String
- {-# MINIMAL displayStackAnnotation #-}
+ stackAnnotationSourceLocation :: a -> GHC.Internal.Maybe.Maybe GHC.Internal.Stack.Types.SrcLoc
+ displayStackAnnotationShort :: a -> GHC.Internal.Base.String
+ {-# MINIMAL displayStackAnnotation | displayStackAnnotationShort #-}
type StringAnnotation :: *
data StringAnnotation where
- StringAnnotation :: GHC.Internal.Base.String -> StringAnnotation
+ StringAnnotation :: !(GHC.Internal.Maybe.Maybe GHC.Internal.Stack.Types.SrcLoc) -> GHC.Internal.Base.String -> StringAnnotation
annotateCallStack :: forall b. GHC.Internal.Stack.Types.HasCallStack => b -> b
annotateCallStackIO :: forall a. GHC.Internal.Stack.Types.HasCallStack => GHC.Internal.Types.IO a -> GHC.Internal.Types.IO a
- annotateStack :: forall a b. (ghc-internal-9.1500.0:GHC.Internal.Data.Typeable.Internal.Typeable a, StackAnnotation a) => a -> b -> b
- annotateStackIO :: forall a b. (ghc-internal-9.1500.0:GHC.Internal.Data.Typeable.Internal.Typeable a, StackAnnotation a) => a -> GHC.Internal.Types.IO b -> GHC.Internal.Types.IO b
- annotateStackShow :: forall a b. (ghc-internal-9.1500.0:GHC.Internal.Data.Typeable.Internal.Typeable a, GHC.Internal.Show.Show a) => a -> b -> b
- annotateStackShowIO :: forall a b. GHC.Internal.Show.Show a => a -> GHC.Internal.Types.IO b -> GHC.Internal.Types.IO b
- annotateStackString :: forall b. GHC.Internal.Base.String -> b -> b
- annotateStackStringIO :: forall b. GHC.Internal.Base.String -> GHC.Internal.Types.IO b -> GHC.Internal.Types.IO b
+ annotateStack :: forall a b. (GHC.Internal.Stack.Types.HasCallStack, ghc-internal-9.1500.0:GHC.Internal.Data.Typeable.Internal.Typeable a, StackAnnotation a) => a -> b -> b
+ annotateStackIO :: forall a b. (GHC.Internal.Stack.Types.HasCallStack, ghc-internal-9.1500.0:GHC.Internal.Data.Typeable.Internal.Typeable a, StackAnnotation a) => a -> GHC.Internal.Types.IO b -> GHC.Internal.Types.IO b
+ annotateStackShow :: forall a b. (GHC.Internal.Stack.Types.HasCallStack, ghc-internal-9.1500.0:GHC.Internal.Data.Typeable.Internal.Typeable a, GHC.Internal.Show.Show a) => a -> b -> b
+ annotateStackShowIO :: forall a b. (GHC.Internal.Stack.Types.HasCallStack, GHC.Internal.Show.Show a) => a -> GHC.Internal.Types.IO b -> GHC.Internal.Types.IO b
+ annotateStackString :: forall b. GHC.Internal.Stack.Types.HasCallStack => GHC.Internal.Base.String -> b -> b
+ annotateStackStringIO :: forall b. GHC.Internal.Stack.Types.HasCallStack => GHC.Internal.Base.String -> GHC.Internal.Types.IO b -> GHC.Internal.Types.IO b
module GHC.Stats.Experimental where
-- Safety: Safe
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/bbf5cdb1ffddaace8e6146c7cb82da…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/bbf5cdb1ffddaace8e6146c7cb82da…
You're receiving this email because of your account on gitlab.haskell.org.
1
0
[Git][ghc/ghc][wip/T26868] Refactor free-variable finding
by Simon Peyton Jones (@simonpj) 19 Feb '26
by Simon Peyton Jones (@simonpj) 19 Feb '26
19 Feb '26
Simon Peyton Jones pushed to branch wip/T26868 at Glasgow Haskell Compiler / GHC
Commits:
325fcf16 by Simon Peyton Jones at 2026-02-19T23:24:17+00:00
Refactor free-variable finding
Removes dplication, hopefully improves efficiency
- - - - -
42 changed files:
- compiler/GHC/Core.hs
- compiler/GHC/Core/Coercion.hs
- compiler/GHC/Core/FVs.hs
- compiler/GHC/Core/Opt/SetLevels.hs
- compiler/GHC/Core/Opt/Specialise.hs
- compiler/GHC/Core/Rules.hs
- compiler/GHC/Core/Subst.hs
- compiler/GHC/Core/TyCo/FVs.hs
- compiler/GHC/Core/TyCo/Rep.hs
- compiler/GHC/Core/TyCo/Subst.hs
- compiler/GHC/Core/Type.hs
- compiler/GHC/Core/Unify.hs
- compiler/GHC/Hs/Utils.hs
- compiler/GHC/HsToCore/Ticks.hs
- compiler/GHC/Iface/Ext/Ast.hs
- compiler/GHC/Iface/Syntax.hs
- compiler/GHC/Rename/Bind.hs
- compiler/GHC/Rename/Env.hs
- compiler/GHC/Rename/Expr.hs
- compiler/GHC/Rename/Expr.hs-boot
- compiler/GHC/Rename/HsType.hs
- compiler/GHC/Rename/Module.hs
- compiler/GHC/Rename/Pat.hs
- compiler/GHC/Rename/Splice.hs
- compiler/GHC/Rename/Splice.hs-boot
- compiler/GHC/Rename/Utils.hs
- compiler/GHC/Tc/Deriv.hs
- compiler/GHC/Tc/Errors.hs
- compiler/GHC/Tc/Errors/Hole.hs
- compiler/GHC/Tc/Gen/App.hs
- compiler/GHC/Tc/Instance/Family.hs
- compiler/GHC/Tc/Instance/FunDeps.hs
- compiler/GHC/Tc/Module.hs
- compiler/GHC/Tc/TyCl/Utils.hs
- compiler/GHC/Tc/Types/Constraint.hs
- compiler/GHC/Tc/Types/Evidence.hs
- compiler/GHC/Tc/Utils/TcType.hs
- compiler/GHC/Tc/Utils/Unify.hs
- compiler/GHC/Tc/Validity.hs
- compiler/GHC/Types/Name/Set.hs
- compiler/GHC/Types/Var/Set.hs
- compiler/GHC/Utils/EndoOS.hs
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/325fcf1618bb4ccfe4f5ab4ad2ead4a…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/325fcf1618bb4ccfe4f5ab4ad2ead4a…
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: Add optional `SrcLoc` to `StackAnnotation` class
by Marge Bot (@marge-bot) 19 Feb '26
by Marge Bot (@marge-bot) 19 Feb '26
19 Feb '26
Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC
Commits:
6ab7d014 by fendor at 2026-02-19T14:01:02-05:00
Add optional `SrcLoc` to `StackAnnotation` class
`StackAnnotation`s give access to an optional `SrcLoc` field that
user-added stack annotations can use to provide better backtraces in both error
messages and when decoding the callstack.
We update builtin stack annotations such as `StringAnnotation` and
`ShowAnnotation` to also capture the `SrcLoc` of the current `CallStack`
to improve backtraces by default (if stack annotations are used).
This change is backwards compatible with GHC 9.14.1.
- - - - -
e45c3859 by Simon Hengel at 2026-02-19T14:01:03-05:00
docs: Fix grammar in explicit_namespaces.rst
- - - - -
bbf5cdb1 by Andreas Klebinger at 2026-02-19T14:01:04-05:00
Bump hackage index state and minimum shake version for hadrian.
We also add the shake version we want to stack.yaml
Fixes #26884
- - - - -
25 changed files:
- .gitlab/ci.sh
- docs/users_guide/exts/explicit_namespaces.rst
- hadrian/cabal.project
- hadrian/hadrian.cabal
- hadrian/stack.yaml
- libraries/ghc-experimental/CHANGELOG.md
- libraries/ghc-experimental/src/GHC/Stack/Annotation/Experimental.hs
- + libraries/ghc-experimental/tests/Makefile
- + libraries/ghc-experimental/tests/all.T
- + libraries/ghc-experimental/tests/backtraces/Makefile
- + libraries/ghc-experimental/tests/backtraces/T26806a.hs
- + libraries/ghc-experimental/tests/backtraces/T26806a.stderr
- + libraries/ghc-experimental/tests/backtraces/T26806b.hs
- + libraries/ghc-experimental/tests/backtraces/T26806b.stderr
- + libraries/ghc-experimental/tests/backtraces/T26806c.hs
- + libraries/ghc-experimental/tests/backtraces/T26806c.stderr
- + libraries/ghc-experimental/tests/backtraces/all.T
- libraries/ghc-internal/src/GHC/Internal/Stack/Annotation.hs
- libraries/ghc-internal/tests/stack-annotation/ann_frame001.stdout
- libraries/ghc-internal/tests/stack-annotation/ann_frame002.stdout
- libraries/ghc-internal/tests/stack-annotation/ann_frame003.stdout
- libraries/ghc-internal/tests/stack-annotation/ann_frame004.stdout
- libraries/ghc-internal/tests/stack-annotation/ann_frame005.stdout
- testsuite/tests/interface-stability/ghc-experimental-exports.stdout
- testsuite/tests/interface-stability/ghc-experimental-exports.stdout-mingw32
Changes:
=====================================
.gitlab/ci.sh
=====================================
@@ -8,7 +8,7 @@ set -Eeuo pipefail
# Configuration:
# N.B. You may want to also update the index-state in hadrian/cabal.project.
-HACKAGE_INDEX_STATE="2025-12-19T19:24:24Z"
+HACKAGE_INDEX_STATE="2026-02-06T13:08:09Z"
MIN_HAPPY_VERSION="1.20"
MIN_ALEX_VERSION="3.2.6"
=====================================
docs/users_guide/exts/explicit_namespaces.rst
=====================================
@@ -86,7 +86,7 @@ However, how would one import only the data constructor? There are two options:
import Data.Proxy (data Proxy) -- imports the data constructor only
import Data.Proxy (pattern Proxy) -- imports the data constructor only
-The ``data`` keyword enables the import or export a data constructor without its
+The ``data`` keyword allows a data constructor to be imported or exported without its
parent type constructor.
The ``pattern`` keyword does the same, with only a few differences:
=====================================
hadrian/cabal.project
=====================================
@@ -4,7 +4,7 @@ packages: ./
-- This essentially freezes the build plan for hadrian
-- It would be wise to keep this up to date with the state set in .gitlab/ci.sh.
-index-state: 2025-12-19T19:24:24Z
+index-state: 2026-02-06T13:08:09Z
-- Fixes bootstrapping with ghc-9.14
allow-newer: all:base, all:ghc-bignum, all:template-haskell
=====================================
hadrian/hadrian.cabal
=====================================
@@ -163,7 +163,8 @@ executable hadrian
, time
, mtl >= 2.2 && < 2.4
, parsec >= 3.1 && < 3.2
- , shake >= 0.18.3 && < 0.20
+ -- shake 0.19.9 has some fixes to greatly improve error messages
+ , shake >= 0.19.9 && < 0.20
, transformers >= 0.4 && < 0.7
, unordered-containers >= 0.2.1 && < 0.3
, text >= 1.2 && < 3
=====================================
hadrian/stack.yaml
=====================================
@@ -42,3 +42,5 @@ extra-deps:
- directory-1.3.9.0
# Needed because process depends on directory, which has been pruned:
- process-1.6.26.1
+# Needed stackage doesn't have the latest shake yet, which we want for better exceptions
+- shake-0.19.9
=====================================
libraries/ghc-experimental/CHANGELOG.md
=====================================
@@ -5,12 +5,17 @@
- New and/or/xor SIMD primops for bitwise logical operations, such as andDoubleX4#, orWord32X4#, xorInt8X16#, etc.
These are supported by the LLVM backend and by the X86_64 NCG backend (for the latter, only for 128-wide vectors).
-## ghc-experimental-9.1401.0,
+## ghc-experimental-9.1402.0
+
+- Add optional `SrcLoc` to `StackAnnotation` class in `GHC.Stack.Annotation.Experimental`
+
+## ghc-experimental-9.1401.0
- Expose access to RTS flags via `GHC.RTS.Flags.Experimental`
- Expose access to era profiling interface via `GHC.Profiling.Eras`
- Expose access to runtime stack annotations via `GHC.Stack.Annotation.Experimental`
- Expose custom allocation limit handler via `System.Mem.Experimental`
+- Expose access to Stack Annotations via `GHC.Stack.Annotation.Experimental`
- Expose module Prelude.Experimental, which reexports some modules from ghc-experimental for convenience, like Prelude does for base.
## ghc-experimental-9.1201.0
=====================================
libraries/ghc-experimental/src/GHC/Stack/Annotation/Experimental.hs
=====================================
@@ -82,9 +82,6 @@ import GHC.Internal.Stack.Annotation
-- the pure variations can behave in ways that are hard to predict.
--
-- See Note [Stack annotations in pure code] for more details.
---
--- At last, stack annotations are tricky to use with 'error'.
--- See Note [Pushing annotation frames on 'error'] for why this is the case.
-- Note [Stack annotations in pure code]
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -96,57 +93,50 @@ import GHC.Internal.Stack.Annotation
-- For example:
--
-- @
--- annotateStackShow (5 @Int) (fib 20 + throw (ErrorCall "Oh no!"))
+-- annotateStackShow (5 @Int) (fib 20 + error "Oh no!")
-- @
--
--- Without forcing the result of @(fib 20 + throw (ErrorCall "Oh no!"))@, the computation
+-- Without forcing the result of @(fib 20 + error "Oh no!")@, the computation
-- will simply return a thunk, and the stack annotation would be popped off the stack.
-- Once the thunk is evaluated, the exception is raised, but no stack annotation will be found!
--- If we force the result of @(fib 20 + throw (ErrorCall "Oh no!"))@, then the stack
+-- If we force the result of @(fib 20 + error "Oh no!")@, then the stack
-- annotations remain on the stack, and are displayed in the stack trace.
--
-- Naturally, this only holds if no imprecise exceptions are thrown during evaluation of any
-- nested value, for example in 'annotateStackShow 5 (Just $ throw (ErrorCall "Oh no!"))', the
-- stack trace will not include the value @5@.
--
--- See how we preferred @throw (ErrorCall ...)@ over @error@?
--- See Note [Pushing annotation frames on 'error'] for why we do this.
-
--- Note [Pushing annotation frames on 'error']
--- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--- Examples so far have not been using 'error' at all.
--- The reason is that 'error' is extraordinarily difficult to use correctly with stack annotation frames.
--- See Note [Capturing the backtrace in throw] for a detailed discussion of how 'throw'
--- manages to capture 'Backtraces'.
---
--- Long story short, 'error' does not do the same thing as 'throw' and is subtly different
--- in terms of evaluation, cause it to bypass the stack annotation frames, especially in
--- pure code.
---
--- However, even in 'IO' code, it is difficult to use 'error' and obtain stack annotation frames
--- close to the call site due to the same issue of laziness and backtrace collection.
---
--- This means, right now, if you want to reliably capture stack frame annotations,
--- in both pure and impure code, prefer 'throw' and 'throwIO' variants over 'error'.
-- ----------------------------------------------------------------------------
-- Annotations
-- ----------------------------------------------------------------------------
+
+-- | A 'String' only annotation with an optional source location.
data StringAnnotation where
- StringAnnotation :: String -> StringAnnotation
+ StringAnnotation :: !(Maybe SrcLoc) -> String -> StringAnnotation
instance StackAnnotation StringAnnotation where
- displayStackAnnotation (StringAnnotation str) = str
+ displayStackAnnotationShort (StringAnnotation _srcLoc str) =
+ str
+
+ stackAnnotationSourceLocation (StringAnnotation srcLoc _str) =
+ srcLoc
-- | Use the 'Show' instance of a type to display as the 'StackAnnotation'.
data ShowAnnotation where
- ShowAnnotation :: forall a . Show a => a -> ShowAnnotation
+ ShowAnnotation :: forall a . Show a => !(Maybe SrcLoc) -> a -> ShowAnnotation
instance StackAnnotation ShowAnnotation where
- displayStackAnnotation (ShowAnnotation showAnno) = show showAnno
+ displayStackAnnotationShort (ShowAnnotation _srcLoc showAnno) =
+ show showAnno
+
+ stackAnnotationSourceLocation (ShowAnnotation srcLoc _showAnno) =
+ srcLoc
-- | A 'CallStack' stack annotation.
+--
+-- Captures the whole 'CallStack'.
newtype CallStackAnnotation = CallStackAnnotation CallStack
instance Show CallStackAnnotation where
@@ -154,9 +144,23 @@ instance Show CallStackAnnotation where
-- | Displays the first entry of the 'CallStack'
instance StackAnnotation CallStackAnnotation where
- displayStackAnnotation (CallStackAnnotation cs) = case getCallStack cs of
+ stackAnnotationSourceLocation (CallStackAnnotation cs) =
+ callStackHeadSrcLoc cs
+
+ displayStackAnnotationShort (CallStackAnnotation cs) =
+ callStackHeadFunctionName cs
+
+callStackHeadSrcLoc :: CallStack -> Maybe SrcLoc
+callStackHeadSrcLoc cs =
+ case getCallStack cs of
+ [] -> Nothing
+ (_, srcLoc):_ -> Just srcLoc
+
+callStackHeadFunctionName :: CallStack -> String
+callStackHeadFunctionName cs =
+ case getCallStack cs of
[] -> "<unknown source location>"
- ((fnName,srcLoc):_) -> fnName ++ ", called at " ++ prettySrcLoc srcLoc
+ (fnName, _):_ -> fnName
-- ----------------------------------------------------------------------------
-- Annotate the CallStack with custom data
@@ -172,7 +176,7 @@ instance StackAnnotation CallStackAnnotation where
--
-- WARNING: forces the evaluation of @b@ to WHNF.
{-# NOINLINE annotateStack #-}
-annotateStack :: forall a b. (Typeable a, StackAnnotation a) => a -> b -> b
+annotateStack :: forall a b. (HasCallStack, Typeable a, StackAnnotation a) => a -> b -> b
annotateStack ann b = unsafePerformIO $
annotateStackIO ann (evaluate b)
@@ -196,9 +200,9 @@ annotateCallStack b = unsafePerformIO $ withFrozenCallStack $
-- information to stack traces.
--
-- WARNING: forces the evaluation of @b@ to WHNF.
-annotateStackString :: forall b . String -> b -> b
+annotateStackString :: forall b . HasCallStack => String -> b -> b
annotateStackString ann =
- annotateStack (StringAnnotation ann)
+ annotateStack (StringAnnotation (callStackHeadSrcLoc ?callStack) ann)
-- | @'annotateStackShow' showable b@ annotates the evaluation stack of @b@
-- with the value @showable@.
@@ -207,37 +211,36 @@ annotateStackString ann =
-- information to stack traces.
--
-- WARNING: forces the evaluation of @b@ to WHNF.
-annotateStackShow :: forall a b . (Typeable a, Show a) => a -> b -> b
+annotateStackShow :: forall a b . (HasCallStack, Typeable a, Show a) => a -> b -> b
annotateStackShow ann =
- annotateStack (ShowAnnotation ann)
+ annotateStack (ShowAnnotation (callStackHeadSrcLoc ?callStack) ann)
-- | @'annotateStackIO' showable b@ annotates the evaluation stack of @b@
-- with the value @showable@.
--
-- When decoding the call stack, the annotation frames can be used to add more
-- information to stack traces.
-annotateStackIO :: forall a b . (Typeable a, StackAnnotation a) => a -> IO b -> IO b
+annotateStackIO :: forall a b . (HasCallStack, Typeable a, StackAnnotation a) => a -> IO b -> IO b
annotateStackIO ann (IO act) =
IO $ \s -> annotateStack# (SomeStackAnnotation ann) act s
-{-# NOINLINE annotateStackIO #-}
-- | @'annotateStackStringIO' msg b@ annotates the evaluation stack of @b@
-- with the value @msg@.
--
-- When decoding the call stack, the annotation frames can be used to add more
-- information to stack traces.
-annotateStackStringIO :: forall b . String -> IO b -> IO b
+annotateStackStringIO :: forall b . HasCallStack => String -> IO b -> IO b
annotateStackStringIO ann =
- annotateStackIO (StringAnnotation ann)
+ annotateStackIO (StringAnnotation (callStackHeadSrcLoc ?callStack) ann)
-- | @'annotateStackShowIO' msg b@ annotates the evaluation stack of @b@
-- with the value @msg@.
--
-- When decoding the call stack, the annotation frames can be used to add more
-- information to stack traces.
-annotateStackShowIO :: forall a b . (Show a) => a -> IO b -> IO b
+annotateStackShowIO :: forall a b . (HasCallStack, Show a) => a -> IO b -> IO b
annotateStackShowIO ann =
- annotateStackIO (ShowAnnotation ann)
+ annotateStackIO (ShowAnnotation (callStackHeadSrcLoc ?callStack) ann)
-- | @'annotateCallStackIO' b@ annotates the evaluation stack of @b@ with the
-- current 'callstack'.
=====================================
libraries/ghc-experimental/tests/Makefile
=====================================
@@ -0,0 +1,7 @@
+# This Makefile runs the tests using GHC's testsuite framework. It
+# assumes the package is part of a GHC build tree with the testsuite
+# installed in ../../../testsuite.
+
+TOP=../../../testsuite
+include $(TOP)/mk/boilerplate.mk
+include $(TOP)/mk/test.mk
=====================================
libraries/ghc-experimental/tests/all.T
=====================================
=====================================
libraries/ghc-experimental/tests/backtraces/Makefile
=====================================
@@ -0,0 +1,7 @@
+# This Makefile runs the tests using GHC's testsuite framework. It
+# assumes the package is part of a GHC build tree with the testsuite
+# installed in ../../../testsuite.
+
+TOP=../../../../testsuite
+include $(TOP)/mk/boilerplate.mk
+include $(TOP)/mk/test.mk
=====================================
libraries/ghc-experimental/tests/backtraces/T26806a.hs
=====================================
@@ -0,0 +1,14 @@
+module Main where
+
+import GHC.Stack.Annotation.Experimental
+import Control.Exception
+import Control.Exception.Backtrace
+
+main :: IO ()
+main = do
+ setBacktraceMechanismState IPEBacktrace True
+ annotateCallStackIO $ do
+ annotateStackShowIO ([1..4] :: [Int]) $ do
+ annotateStackStringIO "Lovely annotation" $ do
+ throwIO $ ErrorCall "Backtrace Test"
+
=====================================
libraries/ghc-experimental/tests/backtraces/T26806a.stderr
=====================================
@@ -0,0 +1,11 @@
+T26806a: Uncaught exception ghc-internal:GHC.Internal.Exception.ErrorCall:
+
+Backtrace Test
+
+IPE backtrace:
+ Lovely annotation, called at T26806a.hs:12:7 in main:Main
+ [1,2,3,4], called at T26806a.hs:11:5 in main:Main
+ annotateCallStackIO, called at T26806a.hs:10:3 in main:Main
+HasCallStack backtrace:
+ throwIO, called at T26806a.hs:13:9 in main:Main
+
=====================================
libraries/ghc-experimental/tests/backtraces/T26806b.hs
=====================================
@@ -0,0 +1,18 @@
+module Main where
+
+import GHC.Stack.Annotation.Experimental
+import Control.Exception
+import Control.Exception.Backtrace
+
+main :: IO ()
+main = do
+ setBacktraceMechanismState IPEBacktrace True
+ print $ foo 500
+
+foo :: Int -> Int
+foo n =
+ annotateCallStack $
+ annotateStackShow ([1..4] :: [Int]) $
+ annotateStackString "Lovely annotation" $
+ throw $ ErrorCall $ "Backtrace Test: " ++ show (n * n * n)
+
=====================================
libraries/ghc-experimental/tests/backtraces/T26806b.stderr
=====================================
@@ -0,0 +1,10 @@
+T26806b: Uncaught exception ghc-internal:GHC.Internal.Exception.ErrorCall:
+
+Backtrace Test: 125000000
+
+IPE backtrace:
+ Lovely annotation, called at T26806b.hs:16:7 in main:Main
+ [1,2,3,4], called at T26806b.hs:15:5 in main:Main
+ annotateCallStack, called at T26806b.hs:14:3 in main:Main
+HasCallStack backtrace:
+ throw, called at T26806b.hs:17:9 in main:Main
=====================================
libraries/ghc-experimental/tests/backtraces/T26806c.hs
=====================================
@@ -0,0 +1,18 @@
+module Main where
+
+import GHC.Stack.Annotation.Experimental
+import Control.Exception
+import Control.Exception.Backtrace
+
+main :: IO ()
+main = do
+ setBacktraceMechanismState IPEBacktrace True
+ print $ foo 500
+
+foo :: Int -> Int
+foo n =
+ annotateCallStack $
+ annotateStackShow ([1..4] :: [Int]) $
+ annotateStackString "Lovely annotation" $
+ error $ "Backtrace Test: " ++ show (n * n * n)
+
=====================================
libraries/ghc-experimental/tests/backtraces/T26806c.stderr
=====================================
@@ -0,0 +1,11 @@
+T26806c: Uncaught exception ghc-internal:GHC.Internal.Exception.ErrorCall:
+
+Backtrace Test: 125000000
+
+IPE backtrace:
+ Lovely annotation, called at T26806c.hs:16:7 in main:Main
+ [1,2,3,4], called at T26806c.hs:15:5 in main:Main
+ annotateCallStack, called at T26806c.hs:14:3 in main:Main
+HasCallStack backtrace:
+ error, called at T26806c.hs:17:9 in main:Main
+
=====================================
libraries/ghc-experimental/tests/backtraces/all.T
=====================================
@@ -0,0 +1,5 @@
+stack_annotation_backtrace_opts = [ when(have_profiling(), extra_ways(['prof'])) , when(js_arch(), skip) , exit_code(1) ]
+
+test('T26806a', stack_annotation_backtrace_opts, compile_and_run, [''])
+test('T26806b', stack_annotation_backtrace_opts, compile_and_run, [''])
+test('T26806c', stack_annotation_backtrace_opts, compile_and_run, [''])
=====================================
libraries/ghc-internal/src/GHC/Internal/Stack/Annotation.hs
=====================================
@@ -4,6 +4,7 @@ module GHC.Internal.Stack.Annotation where
import GHC.Internal.Base
import GHC.Internal.Data.Typeable
+import GHC.Internal.Stack (SrcLoc, prettySrcLoc)
-- ----------------------------------------------------------------------------
-- StackAnnotation
@@ -13,8 +14,38 @@ import GHC.Internal.Data.Typeable
-- as the payload of 'AnnFrame' stack frames.
--
class StackAnnotation a where
+ -- | Display a human readable string for the 'StackAnnotation'.
+ --
+ -- This is supposed to be the long version of 'displayStackAnnotationShort'
+ -- and may contain a source location.
+ --
+ -- If not provided, 'displayStackAnnotation' is derived from 'stackAnnotationSourceLocation'
+ -- and 'displayStackAnnotationShort'.
displayStackAnnotation :: a -> String
+ -- | Get the 'SrcLoc' of the given 'StackAnnotation'.
+ --
+ -- This is optional, 'SrcLoc' are not strictly required for 'StackAnnotation', but
+ -- it is still heavily encouarged to provide a 'SrcLoc' for better IPE backtraces.
+ stackAnnotationSourceLocation :: a -> Maybe SrcLoc
+
+ -- | The description of the StackAnnotation without any metadata such as source locations.
+ --
+ -- Pefer implementing 'displayStackAnnotationShort' over 'displayStackAnnotation'.
+ displayStackAnnotationShort :: a -> String
+
+ {-# MINIMAL displayStackAnnotation | displayStackAnnotationShort #-}
+
+ displayStackAnnotation ann =
+ displayStackAnnotationShort ann
+ ++ case stackAnnotationSourceLocation ann of
+ Nothing -> ""
+ Just srcLoc -> ", called at " ++ prettySrcLoc srcLoc
+
+ stackAnnotationSourceLocation _ann = Nothing
+
+ displayStackAnnotationShort = displayStackAnnotation
+
-- ----------------------------------------------------------------------------
-- Annotations
-- ----------------------------------------------------------------------------
@@ -28,4 +59,11 @@ data SomeStackAnnotation where
SomeStackAnnotation :: forall a. (Typeable a, StackAnnotation a) => a -> SomeStackAnnotation
instance StackAnnotation SomeStackAnnotation where
- displayStackAnnotation (SomeStackAnnotation a) = displayStackAnnotation a
+ displayStackAnnotation (SomeStackAnnotation a) =
+ displayStackAnnotation a
+
+ stackAnnotationSourceLocation (SomeStackAnnotation a) =
+ stackAnnotationSourceLocation a
+
+ displayStackAnnotationShort (SomeStackAnnotation a) =
+ displayStackAnnotationShort a
=====================================
libraries/ghc-internal/tests/stack-annotation/ann_frame001.stdout
=====================================
@@ -1,12 +1,12 @@
Stack annotations:
-- (2,3)
+- (2,3), called at ann_frame001.hs:5:13 in main:Main
47
Stack annotations:
-- "bar"
-- "foo"
-- "tailCallEx"
+- "bar", called at ann_frame001.hs:23:9 in main:Main
+- "foo", called at ann_frame001.hs:21:11 in main:Main
+- "tailCallEx", called at ann_frame001.hs:17:18 in main:Main
Stack annotations:
-- "bar"
-- "foo"
-- "tailCallEx"
+- "bar", called at ann_frame001.hs:23:9 in main:Main
+- "foo", called at ann_frame001.hs:21:11 in main:Main
+- "tailCallEx", called at ann_frame001.hs:17:18 in main:Main
40
=====================================
libraries/ghc-internal/tests/stack-annotation/ann_frame002.stdout
=====================================
@@ -7,5 +7,5 @@ Finish some work
Some more work in bar
17711
Stack annotations:
-- bar
+- bar, called at ann_frame002.hs:23:29 in main:Main
- annotateCallStackIO, called at ann_frame002.hs:23:7 in main:Main
=====================================
libraries/ghc-internal/tests/stack-annotation/ann_frame003.stdout
=====================================
@@ -1,6 +1,6 @@
47
Stack annotations:
-- "bar"
-- "foo"
-- "tailCallEx"
+- "bar", called at ann_frame003.hs:25:9 in main:Main
+- "foo", called at ann_frame003.hs:21:11 in main:Main
+- "tailCallEx", called at ann_frame003.hs:16:18 in main:Main
40
=====================================
libraries/ghc-internal/tests/stack-annotation/ann_frame004.stdout
=====================================
@@ -13,5 +13,5 @@ Stack annotations:
- annotateCallStack, called at ann_frame004.hs:21:17 in main:Main
- annotateCallStack, called at ann_frame004.hs:21:17 in main:Main
- annotateCallStack, called at ann_frame004.hs:13:10 in main:Main
-- bar
+- bar, called at ann_frame004.hs:12:29 in main:Main
- annotateCallStackIO, called at ann_frame004.hs:12:7 in main:Main
=====================================
libraries/ghc-internal/tests/stack-annotation/ann_frame005.stdout
=====================================
@@ -2,9 +2,9 @@
Caught exception: SimpleBoom
Exception context:
- IPE backtrace:
-- throwIO SimpleBoom
-- raising action
-- catch site for throwIO SimpleBoom
+- throwIO SimpleBoom, called at ann_frame005.hs:33:5 in main:Main
+- raising action, called at ann_frame005.hs:32:3 in main:Main
+- catch site for throwIO SimpleBoom, called at ann_frame005.hs:27:5 in main:Main
- annotateCallStackIO, called at ann_frame005.hs:26:3 in main:Main
- HasCallStack backtrace:
- throwIO, called at ann_frame005.hs:34:7 in main:Main
@@ -13,9 +13,9 @@ Handler annotation not present in context
Caught exception: Prelude.undefined
Exception context:
- IPE backtrace:
-- undefined thunk
-- raising undefined action
-- catch site for undefined
+- undefined thunk, called at ann_frame005.hs:41:9 in main:Main
+- raising undefined action, called at ann_frame005.hs:38:3 in main:Main
+- catch site for undefined, called at ann_frame005.hs:27:5 in main:Main
- annotateCallStackIO, called at ann_frame005.hs:26:3 in main:Main
- HasCallStack backtrace:
- undefined, called at ann_frame005.hs:41:48 in main:Main
@@ -24,9 +24,9 @@ Handler annotation not present in context
Caught exception: error from annotateStackString
Exception context:
- IPE backtrace:
-- error thunk
-- raising error action
-- catch site for error
+- error thunk, called at ann_frame005.hs:48:9 in main:Main
+- raising error action, called at ann_frame005.hs:45:3 in main:Main
+- catch site for error, called at ann_frame005.hs:27:5 in main:Main
- annotateCallStackIO, called at ann_frame005.hs:26:3 in main:Main
- HasCallStack backtrace:
- error, called at ann_frame005.hs:48:44 in main:Main
@@ -35,8 +35,8 @@ Handler annotation not present in context
Caught exception: SimpleBoom
Exception context:
- IPE backtrace:
-- raising throwSTM action
-- catch site for throwSTM
+- raising throwSTM action, called at ann_frame005.hs:52:3 in main:Main
+- catch site for throwSTM, called at ann_frame005.hs:27:5 in main:Main
- annotateCallStackIO, called at ann_frame005.hs:26:3 in main:Main
- HasCallStack backtrace:
- throwSTM, called at ann_frame005.hs:55:9 in main:Main
=====================================
testsuite/tests/interface-stability/ghc-experimental-exports.stdout
=====================================
@@ -6499,25 +6499,27 @@ module GHC.Stack.Annotation.Experimental where
newtype CallStackAnnotation = CallStackAnnotation GHC.Internal.Stack.Types.CallStack
type ShowAnnotation :: *
data ShowAnnotation where
- ShowAnnotation :: forall a. GHC.Internal.Show.Show a => a -> ShowAnnotation
+ ShowAnnotation :: forall a. GHC.Internal.Show.Show a => !(GHC.Internal.Maybe.Maybe GHC.Internal.Stack.Types.SrcLoc) -> a -> ShowAnnotation
type SomeStackAnnotation :: *
data SomeStackAnnotation where
SomeStackAnnotation :: forall a. (ghc-internal-9.1500.0:GHC.Internal.Data.Typeable.Internal.Typeable a, StackAnnotation a) => a -> SomeStackAnnotation
type StackAnnotation :: * -> Constraint
class StackAnnotation a where
displayStackAnnotation :: a -> GHC.Internal.Base.String
- {-# MINIMAL displayStackAnnotation #-}
+ stackAnnotationSourceLocation :: a -> GHC.Internal.Maybe.Maybe GHC.Internal.Stack.Types.SrcLoc
+ displayStackAnnotationShort :: a -> GHC.Internal.Base.String
+ {-# MINIMAL displayStackAnnotation | displayStackAnnotationShort #-}
type StringAnnotation :: *
data StringAnnotation where
- StringAnnotation :: GHC.Internal.Base.String -> StringAnnotation
+ StringAnnotation :: !(GHC.Internal.Maybe.Maybe GHC.Internal.Stack.Types.SrcLoc) -> GHC.Internal.Base.String -> StringAnnotation
annotateCallStack :: forall b. GHC.Internal.Stack.Types.HasCallStack => b -> b
annotateCallStackIO :: forall a. GHC.Internal.Stack.Types.HasCallStack => GHC.Internal.Types.IO a -> GHC.Internal.Types.IO a
- annotateStack :: forall a b. (ghc-internal-9.1500.0:GHC.Internal.Data.Typeable.Internal.Typeable a, StackAnnotation a) => a -> b -> b
- annotateStackIO :: forall a b. (ghc-internal-9.1500.0:GHC.Internal.Data.Typeable.Internal.Typeable a, StackAnnotation a) => a -> GHC.Internal.Types.IO b -> GHC.Internal.Types.IO b
- annotateStackShow :: forall a b. (ghc-internal-9.1500.0:GHC.Internal.Data.Typeable.Internal.Typeable a, GHC.Internal.Show.Show a) => a -> b -> b
- annotateStackShowIO :: forall a b. GHC.Internal.Show.Show a => a -> GHC.Internal.Types.IO b -> GHC.Internal.Types.IO b
- annotateStackString :: forall b. GHC.Internal.Base.String -> b -> b
- annotateStackStringIO :: forall b. GHC.Internal.Base.String -> GHC.Internal.Types.IO b -> GHC.Internal.Types.IO b
+ annotateStack :: forall a b. (GHC.Internal.Stack.Types.HasCallStack, ghc-internal-9.1500.0:GHC.Internal.Data.Typeable.Internal.Typeable a, StackAnnotation a) => a -> b -> b
+ annotateStackIO :: forall a b. (GHC.Internal.Stack.Types.HasCallStack, ghc-internal-9.1500.0:GHC.Internal.Data.Typeable.Internal.Typeable a, StackAnnotation a) => a -> GHC.Internal.Types.IO b -> GHC.Internal.Types.IO b
+ annotateStackShow :: forall a b. (GHC.Internal.Stack.Types.HasCallStack, ghc-internal-9.1500.0:GHC.Internal.Data.Typeable.Internal.Typeable a, GHC.Internal.Show.Show a) => a -> b -> b
+ annotateStackShowIO :: forall a b. (GHC.Internal.Stack.Types.HasCallStack, GHC.Internal.Show.Show a) => a -> GHC.Internal.Types.IO b -> GHC.Internal.Types.IO b
+ annotateStackString :: forall b. GHC.Internal.Stack.Types.HasCallStack => GHC.Internal.Base.String -> b -> b
+ annotateStackStringIO :: forall b. GHC.Internal.Stack.Types.HasCallStack => GHC.Internal.Base.String -> GHC.Internal.Types.IO b -> GHC.Internal.Types.IO b
module GHC.Stats.Experimental where
-- Safety: Safe
=====================================
testsuite/tests/interface-stability/ghc-experimental-exports.stdout-mingw32
=====================================
@@ -6502,25 +6502,27 @@ module GHC.Stack.Annotation.Experimental where
newtype CallStackAnnotation = CallStackAnnotation GHC.Internal.Stack.Types.CallStack
type ShowAnnotation :: *
data ShowAnnotation where
- ShowAnnotation :: forall a. GHC.Internal.Show.Show a => a -> ShowAnnotation
+ ShowAnnotation :: forall a. GHC.Internal.Show.Show a => !(GHC.Internal.Maybe.Maybe GHC.Internal.Stack.Types.SrcLoc) -> a -> ShowAnnotation
type SomeStackAnnotation :: *
data SomeStackAnnotation where
SomeStackAnnotation :: forall a. (ghc-internal-9.1500.0:GHC.Internal.Data.Typeable.Internal.Typeable a, StackAnnotation a) => a -> SomeStackAnnotation
type StackAnnotation :: * -> Constraint
class StackAnnotation a where
displayStackAnnotation :: a -> GHC.Internal.Base.String
- {-# MINIMAL displayStackAnnotation #-}
+ stackAnnotationSourceLocation :: a -> GHC.Internal.Maybe.Maybe GHC.Internal.Stack.Types.SrcLoc
+ displayStackAnnotationShort :: a -> GHC.Internal.Base.String
+ {-# MINIMAL displayStackAnnotation | displayStackAnnotationShort #-}
type StringAnnotation :: *
data StringAnnotation where
- StringAnnotation :: GHC.Internal.Base.String -> StringAnnotation
+ StringAnnotation :: !(GHC.Internal.Maybe.Maybe GHC.Internal.Stack.Types.SrcLoc) -> GHC.Internal.Base.String -> StringAnnotation
annotateCallStack :: forall b. GHC.Internal.Stack.Types.HasCallStack => b -> b
annotateCallStackIO :: forall a. GHC.Internal.Stack.Types.HasCallStack => GHC.Internal.Types.IO a -> GHC.Internal.Types.IO a
- annotateStack :: forall a b. (ghc-internal-9.1500.0:GHC.Internal.Data.Typeable.Internal.Typeable a, StackAnnotation a) => a -> b -> b
- annotateStackIO :: forall a b. (ghc-internal-9.1500.0:GHC.Internal.Data.Typeable.Internal.Typeable a, StackAnnotation a) => a -> GHC.Internal.Types.IO b -> GHC.Internal.Types.IO b
- annotateStackShow :: forall a b. (ghc-internal-9.1500.0:GHC.Internal.Data.Typeable.Internal.Typeable a, GHC.Internal.Show.Show a) => a -> b -> b
- annotateStackShowIO :: forall a b. GHC.Internal.Show.Show a => a -> GHC.Internal.Types.IO b -> GHC.Internal.Types.IO b
- annotateStackString :: forall b. GHC.Internal.Base.String -> b -> b
- annotateStackStringIO :: forall b. GHC.Internal.Base.String -> GHC.Internal.Types.IO b -> GHC.Internal.Types.IO b
+ annotateStack :: forall a b. (GHC.Internal.Stack.Types.HasCallStack, ghc-internal-9.1500.0:GHC.Internal.Data.Typeable.Internal.Typeable a, StackAnnotation a) => a -> b -> b
+ annotateStackIO :: forall a b. (GHC.Internal.Stack.Types.HasCallStack, ghc-internal-9.1500.0:GHC.Internal.Data.Typeable.Internal.Typeable a, StackAnnotation a) => a -> GHC.Internal.Types.IO b -> GHC.Internal.Types.IO b
+ annotateStackShow :: forall a b. (GHC.Internal.Stack.Types.HasCallStack, ghc-internal-9.1500.0:GHC.Internal.Data.Typeable.Internal.Typeable a, GHC.Internal.Show.Show a) => a -> b -> b
+ annotateStackShowIO :: forall a b. (GHC.Internal.Stack.Types.HasCallStack, GHC.Internal.Show.Show a) => a -> GHC.Internal.Types.IO b -> GHC.Internal.Types.IO b
+ annotateStackString :: forall b. GHC.Internal.Stack.Types.HasCallStack => GHC.Internal.Base.String -> b -> b
+ annotateStackStringIO :: forall b. GHC.Internal.Stack.Types.HasCallStack => GHC.Internal.Base.String -> GHC.Internal.Types.IO b -> GHC.Internal.Types.IO b
module GHC.Stats.Experimental where
-- Safety: Safe
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/0ebcc7d617f5215574ae70911e692f…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/0ebcc7d617f5215574ae70911e692f…
You're receiving this email because of your account on gitlab.haskell.org.
1
0
[Git][ghc/ghc][wip/romes/hadrian-cross-stage2-rebase_SVEN_FINAL] 5 commits: Delete libffi-tarballs
by Sven Tennie (@supersven) 19 Feb '26
by Sven Tennie (@supersven) 19 Feb '26
19 Feb '26
Sven Tennie pushed to branch wip/romes/hadrian-cross-stage2-rebase_SVEN_FINAL at Glasgow Haskell Compiler / GHC
Commits:
bf1281cf by Sven Tennie at 2026-02-19T17:39:59+01:00
Delete libffi-tarballs
Must have been an accidential commit...
- - - - -
75aebf18 by Sven Tennie at 2026-02-19T17:51:35+01:00
Fix commented out code
- - - - -
e176223d by Sven Tennie at 2026-02-19T17:53:57+01:00
Remove trace log
- - - - -
1ff31395 by Sven Tennie at 2026-02-19T17:55:32+01:00
configure.ac: Remove unnecessay blank
- - - - -
f5fef1f7 by Sven Tennie at 2026-02-19T17:59:42+01:00
Drop Rules.Libffi
- - - - -
5 changed files:
- configure.ac
- hadrian/src/Oracles/TestSettings.hs
- − hadrian/src/Rules/Libffi.hs
- hadrian/src/Settings/Builders/RunTest.hs
- − libffi-tarballs
Changes:
=====================================
configure.ac
=====================================
@@ -1,4 +1,4 @@
- dnl == autoconf source for the Glasgow FP tools ==
+dnl == autoconf source for the Glasgow FP tools ==
dnl (run "grep '^dnl \*' configure.ac | sed -e 's/dnl / /g; s/\*\*/ +/g;'"
dnl (or some such) to see the outline of this file)
dnl
=====================================
hadrian/src/Oracles/TestSettings.hs
=====================================
@@ -14,7 +14,6 @@ import Oracles.Setting (topDirectory, setting, ProjectSetting(..), crossStage)
import Packages
import Settings.Program (programContext)
import Hadrian.Oracles.Path
---import System.Directory (makeAbsolute)
testConfigFile :: Action FilePath
testConfigFile = buildRoot <&> (-/- "test/ghcconfig")
=====================================
hadrian/src/Rules/Libffi.hs deleted
=====================================
@@ -1,249 +0,0 @@
-{-# LANGUAGE TypeFamilies #-}
-
-module Rules.Libffi (
- LibffiDynLibs(..),
- needLibffi, askLibffilDynLibs, libffiRules, libffiLibrary, libffiHeaderFiles,
- libffiHeaderDir, libffiSystemHeaderDir, libffiName
- ) where
-
-import Hadrian.Utilities
-
-import Packages
-import Settings.Builders.Common
-import Target
-import Utilities
-import GHC.Toolchain (targetPlatformTriple)
-
-{- Note [Libffi indicating inputs]
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-First see https://gitlab.haskell.org/ghc/ghc/wikis/Developing-Hadrian for an
-explanation of "indicating input". Part of the definition is copied here for
-your convenience:
-
- change in the vital output -> change in the indicating inputs
-
-In the case of building libffi `vital output = built libffi library files` and
-we can consider the libffi archive file (i.e. the "libffi-tarballs/libffi*.tar.gz"
-file) to be the only indicating input besides the build tools (e.g. make).
-Note building libffi is split into a few rules, but we also expect that:
-
- no change in the archive file -> no change in the intermediate build artifacts
-
-and so the archive file is still a valid choice of indicating input for
-all libffi rules. Hence we can get away with `need`ing only the archive file and
-don't have to `need` intermediate build artifacts (besides those to trigger
-dependant libffi rules i.e. to generate vital inputs as is noted on the wiki).
-It is then safe to `trackAllow` the libffi build directory as is done in
-`needLibfffiArchive`.
-
-A disadvantage to this approach is that changing the archive file forces a clean
-build of libffi i.e. we cannot incrementally build libffi. This seems like a
-performance issue, but is justified as building libffi is fast and the archive
-file is rarely changed.
-
--}
-
--- | Oracle question type. The oracle returns the list of dynamic
--- libffi library file paths (all but one of which should be symlinks).
-newtype LibffiDynLibs = LibffiDynLibs Stage
- deriving (Eq, Show, Hashable, Binary, NFData)
-type instance RuleResult LibffiDynLibs = [FilePath]
-
-askLibffilDynLibs :: Stage -> Action [FilePath]
-askLibffilDynLibs stage = askOracle (LibffiDynLibs stage)
-
--- | The path to the dynamic library manifest file. The file contains all file
--- paths to libffi dynamic library file paths.
--- The path is calculated but not `need`ed.
-dynLibManifest' :: Monad m => m FilePath -> Stage -> m FilePath
-dynLibManifest' getRoot stage = do
- root <- getRoot
- return $ root -/- stageString stage -/- pkgName libffi -/- ".dynamiclibs"
-
-dynLibManifestRules :: Stage -> Rules FilePath
-dynLibManifestRules = dynLibManifest' buildRootRules
-
-dynLibManifest :: Stage -> Action FilePath
-dynLibManifest = dynLibManifest' buildRoot
-
--- | Need the (locally built) libffi library.
-needLibffi :: Stage -> Action ()
-needLibffi stage = do
- jsTarget <- isJsTarget stage
- unless jsTarget $ do
- manifest <- dynLibManifest stage
- need [manifest]
-
--- | Context for @libffi@.
-libffiContext :: Stage -> Action Context
-libffiContext stage = do
- ways <- interpretInContext
- (Context stage libffi (error "libffiContext: way not set") (error "libffiContext: iplace not set"))
- getLibraryWays
- return $ (\w -> Context stage libffi w Final) (if any (wayUnit Dynamic) ways
- then dynamic
- else vanilla)
-
--- | The name of the library
-libffiName :: Expr String
-libffiName = do
- useSystemFfi <- succStaged (buildFlag UseSystemFfi)
- if useSystemFfi
- then pure "ffi"
- else libffiLocalName Nothing
-
--- | The name of the (locally built) library
-libffiLocalName :: Maybe Bool -> Expr String
-libffiLocalName force_dynamic = do
- way <- getWay
- stage <- getStage
- winTarget <- expr (isWinTarget stage)
- let dynamic = fromMaybe (Dynamic `wayUnit` way) force_dynamic
- pure $ mconcat
- [ if dynamic then "" else "C"
- , if winTarget then "ffi-6" else "ffi"
- ]
-
-libffiLibrary :: FilePath
-libffiLibrary = "inst/lib/libffi.a"
-
--- | These are the headers that we must package with GHC since foreign export
--- adjustor code produced by GHC depends upon them.
--- See Note [Packaging libffi headers] in GHC.Driver.CodeOutput.
-libffiHeaderFiles :: [FilePath]
-libffiHeaderFiles = ["ffi.h", "ffitarget.h"]
-
-libffiHeaderDir :: Stage -> Action FilePath
-libffiHeaderDir stage = do
- path <- libffiBuildPath stage
- return $ path -/- "inst/include"
-
-libffiSystemHeaderDir :: Stage -> Action FilePath
-libffiSystemHeaderDir = buildSetting FfiIncludeDir
-
-fixLibffiMakefile :: FilePath -> String -> String
-fixLibffiMakefile top =
- replace "-MD" "-MMD"
- . replace "@toolexeclibdir@" "$(libdir)"
- . replace "@INSTALL@" ("$(subst ../install-sh," ++ top ++ "/install-sh,@INSTALL@)")
-
--- TODO: check code duplication w.r.t. ConfCcArgs
-configureEnvironment :: Stage -> Action [CmdOption]
-configureEnvironment stage = do
- context <- libffiContext stage
- cFlags <- interpretInContext context getStagedCCFlags
- isCross <- flag CrossCompiling
- sequence $ [ builderEnvironment "CC" $ Cc CompileC stage
- , builderEnvironment "CXX" $ Cc CompileC stage
- , builderEnvironment "AR" $ Ar Unpack stage
- , builderEnvironment "NM" $ Nm stage
- , builderEnvironment "RANLIB" $ Ranlib stage
- , return . AddEnv "CFLAGS" $ unwords cFlags ++ " -w"
- , return . AddEnv "LDFLAGS" $ "-w" ] ++
- -- When we're building a cross-compiler, we have to be careful
- -- which environment variables are propagated for the non-target
- -- stages.
- (if isHostStage stage && isCross then [remBuilderEnvironment "LD"] else [])
-
--- Need the libffi archive and `trackAllow` all files in the build directory.
--- See [Libffi indicating inputs].
-needLibfffiArchive :: FilePath -> Action FilePath
-needLibfffiArchive buildPath = do
- top <- topDirectory
- tarball <- unifyPath
- . fromSingleton "Exactly one LibFFI tarball is expected"
- <$> getDirectoryFiles top ["libffi-tarballs/libffi*.tar.gz"]
- need [top -/- tarball]
- trackAllow [buildPath -/- "**"]
- return tarball
-
-libffiRules :: Rules ()
-libffiRules = do
- _ <- addOracleCache $ \ (LibffiDynLibs stage)
- -> do
- jsTarget <- isJsTarget stage
- if jsTarget
- then return []
- else readFileLines =<< dynLibManifest stage
- forM_ [Stage1, Stage2, Stage3] $ \stage -> do
- root <- buildRootRules
- let path = root -/- stageString stage
- libffiPath = path -/- pkgName libffi -/- "build"
-
- -- We set a higher priority because this rule overlaps with the build rule
- -- for static libraries 'Rules.Library.libraryRules'.
- dynLibMan <- dynLibManifestRules stage
- let topLevelTargets = [ libffiPath -/- libffiLibrary
- , dynLibMan
- ]
- priority 2 $ topLevelTargets &%> \_ -> do
- _ <- needLibfffiArchive libffiPath
- context <- libffiContext stage
-
- -- Note this build needs the Makefile, triggering the rules bellow.
- build $ target context (Make libffiPath) [] []
- libffiName' <- interpretInContext context (libffiLocalName (Just True))
-
- -- Produces all install files.
- produces =<< (\\ topLevelTargets)
- <$> liftIO (getDirectoryFilesIO "." [libffiPath -/- "inst//*"])
-
- -- Find dynamic libraries.
- osxTarget <- isOsxTarget stage
- winTarget <- isWinTarget stage
-
- dynLibFiles <- do
- let libfilesDir = libffiPath -/-
- (if winTarget then "inst" -/- "bin" else "inst" -/- "lib")
- dynlibext
- | winTarget = "dll"
- | osxTarget = "dylib"
- | otherwise = "so"
- filepat = "lib" ++ libffiName' ++ "." ++ dynlibext ++ "*"
- liftIO $ getDirectoryFilesIO "." [libfilesDir -/- filepat]
-
- writeFileLines dynLibMan dynLibFiles
- putSuccess "| Successfully build libffi."
-
- fmap (libffiPath -/-) ( "Makefile.in" :& "configure" :& Nil ) &%>
- \ ( mkIn :& _ ) -> do
- -- Extract libffi tar file
- context <- libffiContext stage
- removeDirectory libffiPath
- tarball <- needLibfffiArchive libffiPath
- -- Go from 'libffi-3.99999+git20171002+77e130c.tar.gz' to 'libffi-3.99999'
- let libname = takeWhile (/= '+') $ fromJust $ stripExtension "tar.gz" $ takeFileName tarball
-
- -- Move extracted directory to libffiPath.
- root <- buildRoot
- removeDirectory (root -/- libname)
- actionFinally (do
- build $ target context (Tar Extract) [tarball] [path]
- moveDirectory (path -/- libname) libffiPath) $
- -- And finally:
- removeFiles (path) [libname -/- "**"]
-
- top <- topDirectory
- fixFile mkIn (fixLibffiMakefile top)
-
- files <- liftIO $ getDirectoryFilesIO "." [libffiPath -/- "**"]
- produces files
-
- fmap (libffiPath -/-) ("Makefile" :& "config.guess" :& "config.sub" :& Nil)
- &%> \( mk :& _ ) -> do
- _ <- needLibfffiArchive libffiPath
- context <- libffiContext stage
-
- -- This need rule extracts the libffi tar file to libffiPath.
- need [mk <.> "in"]
-
- -- Configure.
- forM_ ["config.guess", "config.sub"] $ \file -> do
- copyFile file (libffiPath -/- file)
- env <- configureEnvironment stage
- buildWithCmdOptions env $
- target context (Configure libffiPath) [mk <.> "in"] [mk]
-
- dir <- queryBuildTarget targetPlatformTriple
- files <- liftIO $ getDirectoryFilesIO "." [libffiPath -/- dir -/- "**"]
- produces files
=====================================
hadrian/src/Settings/Builders/RunTest.hs
=====================================
@@ -23,8 +23,6 @@ import Settings.Program
import qualified Context.Type
import GHC.Toolchain.Target
-import Debug.Trace
-
-- | Extra flags to send to the Haskell compiler to run tests.
runTestGhcFlags :: Stage -> Action String
@@ -183,8 +181,6 @@ outOfTreeCompilerArgs = do
rtsWay <- getTestSetting TestRTSWay
let debugged = "debug" `isInfixOf` rtsWay
- traceShowM (os, arch, platform)
-
llc_cmd <- getTestSetting TestLLC
have_llvm <- (allowHaveLLVM arch &&) <$> liftIO (isJust <$> findExecutable llc_cmd)
profiled <- getBooleanSetting TestGhcProfiled
=====================================
libffi-tarballs deleted
=====================================
@@ -1 +0,0 @@
-Subproject commit 7c51059557b68d29820a0a87cebfa6fe73c8adf5
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/30145457b935d819b56aded50c4c05…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/30145457b935d819b56aded50c4c05…
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:
58357012 by Teo Camarasu at 2026-02-19T16:48:45+00:00
Float up generics
- - - - -
18 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/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
- testsuite/tests/ghci/scripts/ListTuplePunsPpr.stdout
- testsuite/tests/ghci/scripts/T10963.stderr
- testsuite/tests/ghci/scripts/ghci064.stdout
- testsuite/tests/interface-stability/base-exports.stdout
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/Monad/Fix.hs
=====================================
@@ -36,7 +36,6 @@ import GHC.Internal.Data.NonEmpty ( NonEmpty(..) )
import GHC.Internal.Data.Ord ( Down(..) )
import GHC.Internal.Data.Tuple ( Solo(..), snd )
import GHC.Internal.Base ( Monad, errorWithoutStackTrace, (.) )
-import GHC.Internal.Generics
import GHC.Internal.List ( head, drop )
import GHC.Internal.Control.Monad.ST.Imp
import GHC.Internal.System.IO
@@ -146,26 +145,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
=====================================
@@ -64,7 +64,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(..) )
@@ -859,67 +858,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
=====================================
@@ -44,7 +44,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)
@@ -78,8 +77,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, (.) )
import GHC.Internal.Classes ( Eq(..), Ord(..) )
import GHC.Internal.Enum ( Bounded, Enum )
import GHC.Internal.Read ( Read(..) )
@@ -751,6 +753,16 @@ 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(..) )
+import GHC.Internal.Control.Monad.Fix
-- Needed for metadata
import GHC.Internal.Data.Proxy ( Proxy(..) )
@@ -1879,3 +1891,210 @@ 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
+
+-- | @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
=====================================
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
=====================================
testsuite/tests/ghci/scripts/ListTuplePunsPpr.stdout
=====================================
@@ -21,13 +21,13 @@ instance Applicative Solo -- Defined in ‘GHC.Internal.Base’
instance Foldable Solo -- Defined in ‘GHC.Internal.Data.Foldable’
instance Functor Solo -- Defined in ‘GHC.Internal.Base’
instance Monad Solo -- Defined in ‘GHC.Internal.Base’
+instance Read a => Read (Solo a) -- Defined in ‘GHC.Internal.Read’
instance Bounded a => Bounded (Solo a)
-- Defined in ‘GHC.Internal.Enum’
instance Enum a => Enum (Solo a) -- Defined in ‘GHC.Internal.Enum’
-instance Read a => Read (Solo a) -- Defined in ‘GHC.Internal.Read’
-instance Eq a => Eq (Solo a) -- Defined in ‘GHC.Internal.Classes’
instance Ord a => Ord (Solo a) -- Defined in ‘GHC.Internal.Classes’
instance Show a => Show (Solo a) -- Defined in ‘GHC.Internal.Show’
+instance Eq a => Eq (Solo a) -- Defined in ‘GHC.Internal.Classes’
instance Monoid a => Monoid (Solo a)
-- Defined in ‘GHC.Internal.Base’
instance Semigroup a => Semigroup (Solo a)
=====================================
testsuite/tests/ghci/scripts/T10963.stderr
=====================================
@@ -1,4 +1,3 @@
-
<interactive>:1:1: error: [GHC-39999]
• Ambiguous type variable ‘a0’ arising from a use of ‘foo’
prevents the constraint ‘(Num a0)’ from being solved.
@@ -7,6 +6,7 @@
instance Num Integer -- Defined in ‘GHC.Internal.Num’
instance Num Double -- Defined in ‘GHC.Internal.Float’
...plus three others
- ...plus one instance involving out-of-scope types
+ ...plus four instances involving out-of-scope types
(use -fprint-potential-instances to see them all)
• In the expression: foo
+
=====================================
testsuite/tests/ghci/scripts/ghci064.stdout
=====================================
@@ -10,11 +10,6 @@ instance MonadFail Maybe
instance GHC.Internal.Base.MonadPlus Maybe
-- Defined in ‘GHC.Internal.Base’
instance Monad Maybe -- Defined in ‘GHC.Internal.Base’
-instance GHC.Internal.Generics.SingKind w =>
- GHC.Internal.Generics.SingKind (Maybe w)
- -- Defined in ‘GHC.Internal.Generics’
-instance GHC.Internal.Generics.Generic (Maybe w)
- -- Defined in ‘GHC.Internal.Generics’
instance Semigroup w => Monoid (Maybe w)
-- Defined in ‘GHC.Internal.Base’
instance Read w => Read (Maybe w) -- Defined in ‘GHC.Internal.Read’
@@ -25,26 +20,18 @@ instance [safe] Ord w => Ord (Maybe w)
instance Show w => Show (Maybe w) -- Defined in ‘GHC.Internal.Show’
instance [safe] Eq w => Eq (Maybe w)
-- Defined in ‘GHC.Internal.Maybe’
-instance GHC.Internal.Generics.Generic [w]
- -- Defined in ‘GHC.Internal.Generics’
instance Read w => Read [w] -- Defined in ‘GHC.Internal.Read’
-instance Eq w => Eq [w] -- Defined in ‘GHC.Internal.Classes’
instance Ord w => Ord [w] -- Defined in ‘GHC.Internal.Classes’
instance Show w => Show [w] -- Defined in ‘GHC.Internal.Show’
+instance Eq w => Eq [w] -- Defined in ‘GHC.Internal.Classes’
instance Monoid [w] -- Defined in ‘GHC.Internal.Base’
instance Semigroup [w] -- Defined in ‘GHC.Internal.Base’
instance [safe] MyShow w => MyShow [w]
-- Defined at ghci064.hs:8:10
-instance GHC.Internal.Generics.Generic [T]
- -- Defined in ‘GHC.Internal.Generics’
instance Monoid [T] -- Defined in ‘GHC.Internal.Base’
instance Semigroup [T] -- Defined in ‘GHC.Internal.Base’
instance [safe] MyShow [T] -- Defined at ghci064.hs:16:10
instance [safe] MyShow [T] -- Defined at ghci064.hs:8:10
-instance GHC.Internal.Generics.SingKind Bool
- -- Defined in ‘GHC.Internal.Generics’
-instance GHC.Internal.Generics.Generic Bool
- -- Defined in ‘GHC.Internal.Generics’
instance GHC.Internal.Foreign.Storable.Storable Bool
-- Defined in ‘GHC.Internal.Foreign.Storable’
instance GHC.Internal.Bits.Bits Bool
=====================================
testsuite/tests/interface-stability/base-exports.stdout
=====================================
@@ -11544,7 +11544,6 @@ instance forall (f :: * -> *). GHC.Internal.Control.Monad.Fail.MonadFail f => GH
instance GHC.Internal.Control.Monad.Fail.MonadFail GHC.Internal.Text.ParserCombinators.ReadP.P -- Defined in ‘GHC.Internal.Text.ParserCombinators.ReadP’
instance GHC.Internal.Control.Monad.Fail.MonadFail GHC.Internal.Text.ParserCombinators.ReadP.ReadP -- Defined in ‘GHC.Internal.Text.ParserCombinators.ReadP’
instance GHC.Internal.Control.Monad.Fail.MonadFail GHC.Internal.Text.ParserCombinators.ReadPrec.ReadPrec -- Defined in ‘GHC.Internal.Text.ParserCombinators.ReadPrec’
-instance forall (f :: * -> *) (g :: * -> *). (GHC.Internal.Control.Monad.Fix.MonadFix f, GHC.Internal.Control.Monad.Fix.MonadFix g) => GHC.Internal.Control.Monad.Fix.MonadFix (f GHC.Internal.Generics.:*: g) -- Defined in ‘GHC.Internal.Control.Monad.Fix’
instance forall (f :: * -> *). GHC.Internal.Control.Monad.Fix.MonadFix f => GHC.Internal.Control.Monad.Fix.MonadFix (GHC.Internal.Data.Semigroup.Internal.Alt f) -- Defined in ‘GHC.Internal.Control.Monad.Fix’
instance forall (f :: * -> *). GHC.Internal.Control.Monad.Fix.MonadFix f => GHC.Internal.Control.Monad.Fix.MonadFix (GHC.Internal.Data.Monoid.Ap f) -- Defined in ‘GHC.Internal.Control.Monad.Fix’
instance GHC.Internal.Control.Monad.Fix.MonadFix GHC.Internal.Data.Ord.Down -- Defined in ‘GHC.Internal.Control.Monad.Fix’
@@ -11555,12 +11554,9 @@ instance GHC.Internal.Control.Monad.Fix.MonadFix GHC.Internal.Data.Monoid.First
instance GHC.Internal.Control.Monad.Fix.MonadFix GHC.Internal.Types.IO -- Defined in ‘GHC.Internal.Control.Monad.Fix’
instance GHC.Internal.Control.Monad.Fix.MonadFix GHC.Internal.Data.Monoid.Last -- Defined in ‘GHC.Internal.Control.Monad.Fix’
instance GHC.Internal.Control.Monad.Fix.MonadFix [] -- Defined in ‘GHC.Internal.Control.Monad.Fix’
-instance forall (f :: * -> *) i (c :: GHC.Internal.Generics.Meta). GHC.Internal.Control.Monad.Fix.MonadFix f => GHC.Internal.Control.Monad.Fix.MonadFix (GHC.Internal.Generics.M1 i c f) -- Defined in ‘GHC.Internal.Control.Monad.Fix’
instance GHC.Internal.Control.Monad.Fix.MonadFix GHC.Internal.Maybe.Maybe -- Defined in ‘GHC.Internal.Control.Monad.Fix’
instance GHC.Internal.Control.Monad.Fix.MonadFix GHC.Internal.Base.NonEmpty -- Defined in ‘GHC.Internal.Control.Monad.Fix’
-instance GHC.Internal.Control.Monad.Fix.MonadFix GHC.Internal.Generics.Par1 -- Defined in ‘GHC.Internal.Control.Monad.Fix’
instance GHC.Internal.Control.Monad.Fix.MonadFix GHC.Internal.Data.Semigroup.Internal.Product -- Defined in ‘GHC.Internal.Control.Monad.Fix’
-instance forall (f :: * -> *). GHC.Internal.Control.Monad.Fix.MonadFix f => GHC.Internal.Control.Monad.Fix.MonadFix (GHC.Internal.Generics.Rec1 f) -- Defined in ‘GHC.Internal.Control.Monad.Fix’
instance forall s. GHC.Internal.Control.Monad.Fix.MonadFix (GHC.Internal.ST.ST s) -- Defined in ‘GHC.Internal.Control.Monad.Fix’
instance GHC.Internal.Control.Monad.Fix.MonadFix Solo -- Defined in ‘GHC.Internal.Control.Monad.Fix’
instance GHC.Internal.Control.Monad.Fix.MonadFix GHC.Internal.Data.Semigroup.Internal.Sum -- Defined in ‘GHC.Internal.Control.Monad.Fix’
@@ -11573,6 +11569,10 @@ instance GHC.Internal.Control.Monad.Fix.MonadFix Data.Semigroup.First -- Defined
instance GHC.Internal.Control.Monad.Fix.MonadFix Data.Semigroup.Last -- Defined in ‘Data.Semigroup’
instance GHC.Internal.Control.Monad.Fix.MonadFix Data.Semigroup.Max -- Defined in ‘Data.Semigroup’
instance GHC.Internal.Control.Monad.Fix.MonadFix Data.Semigroup.Min -- Defined in ‘Data.Semigroup’
+instance forall (f :: * -> *) (g :: * -> *). (GHC.Internal.Control.Monad.Fix.MonadFix f, GHC.Internal.Control.Monad.Fix.MonadFix g) => GHC.Internal.Control.Monad.Fix.MonadFix (f GHC.Internal.Generics.:*: g) -- Defined in ‘GHC.Internal.Generics’
+instance forall (f :: * -> *) i (c :: GHC.Internal.Generics.Meta). GHC.Internal.Control.Monad.Fix.MonadFix f => GHC.Internal.Control.Monad.Fix.MonadFix (GHC.Internal.Generics.M1 i c f) -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Control.Monad.Fix.MonadFix GHC.Internal.Generics.Par1 -- Defined in ‘GHC.Internal.Generics’
+instance forall (f :: * -> *). GHC.Internal.Control.Monad.Fix.MonadFix f => GHC.Internal.Control.Monad.Fix.MonadFix (GHC.Internal.Generics.Rec1 f) -- Defined in ‘GHC.Internal.Generics’
instance GHC.Internal.Control.Monad.IO.Class.MonadIO GHC.Internal.Types.IO -- Defined in ‘GHC.Internal.Control.Monad.IO.Class’
instance forall (f :: * -> *) (g :: * -> *). (GHC.Internal.Control.Monad.Zip.MonadZip f, GHC.Internal.Control.Monad.Zip.MonadZip g) => GHC.Internal.Control.Monad.Zip.MonadZip (f GHC.Internal.Generics.:*: g) -- Defined in ‘GHC.Internal.Control.Monad.Zip’
instance forall (f :: * -> *). GHC.Internal.Control.Monad.Zip.MonadZip f => GHC.Internal.Control.Monad.Zip.MonadZip (GHC.Internal.Data.Semigroup.Internal.Alt f) -- Defined in ‘GHC.Internal.Control.Monad.Zip’
@@ -11737,9 +11737,6 @@ instance forall a. GHC.Internal.Data.Data.Data a => GHC.Internal.Data.Data.Data
instance forall m. GHC.Internal.Data.Data.Data m => GHC.Internal.Data.Data.Data (Data.Semigroup.WrappedMonoid m) -- Defined in ‘Data.Semigroup’
instance forall m. GHC.Internal.Data.Foldable.Foldable (GHC.Internal.Data.Functor.Const.Const m) -- Defined in ‘GHC.Internal.Data.Functor.Const’
instance GHC.Internal.Data.Foldable.Foldable GHC.Internal.Functor.ZipList.ZipList -- Defined in ‘GHC.Internal.Functor.ZipList’
-instance forall (f :: * -> *) (g :: * -> *). (GHC.Internal.Data.Foldable.Foldable f, GHC.Internal.Data.Foldable.Foldable g) => GHC.Internal.Data.Foldable.Foldable (f GHC.Internal.Generics.:*: g) -- Defined in ‘GHC.Internal.Data.Foldable’
-instance forall (f :: * -> *) (g :: * -> *). (GHC.Internal.Data.Foldable.Foldable f, GHC.Internal.Data.Foldable.Foldable g) => GHC.Internal.Data.Foldable.Foldable (f GHC.Internal.Generics.:+: g) -- Defined in ‘GHC.Internal.Data.Foldable’
-instance forall (f :: * -> *) (g :: * -> *). (GHC.Internal.Data.Foldable.Foldable f, GHC.Internal.Data.Foldable.Foldable g) => GHC.Internal.Data.Foldable.Foldable (f GHC.Internal.Generics.:.: g) -- Defined in ‘GHC.Internal.Data.Foldable’
instance forall (f :: * -> *). GHC.Internal.Data.Foldable.Foldable f => GHC.Internal.Data.Foldable.Foldable (GHC.Internal.Data.Semigroup.Internal.Alt f) -- Defined in ‘GHC.Internal.Data.Foldable’
instance forall (f :: * -> *). GHC.Internal.Data.Foldable.Foldable f => GHC.Internal.Data.Foldable.Foldable (GHC.Internal.Data.Monoid.Ap f) -- Defined in ‘GHC.Internal.Data.Foldable’
instance forall i. GHC.Internal.Data.Foldable.Foldable (GHC.Internal.Arr.Array i) -- Defined in ‘GHC.Internal.Data.Foldable’
@@ -11747,27 +11744,15 @@ instance GHC.Internal.Data.Foldable.Foldable GHC.Internal.Data.Ord.Down -- Defin
instance GHC.Internal.Data.Foldable.Foldable GHC.Internal.Data.Semigroup.Internal.Dual -- Defined in ‘GHC.Internal.Data.Foldable’
instance forall a. GHC.Internal.Data.Foldable.Foldable (GHC.Internal.Data.Either.Either a) -- Defined in ‘GHC.Internal.Data.Foldable’
instance GHC.Internal.Data.Foldable.Foldable GHC.Internal.Data.Monoid.First -- Defined in ‘GHC.Internal.Data.Foldable’
-instance forall i c. GHC.Internal.Data.Foldable.Foldable (GHC.Internal.Generics.K1 i c) -- Defined in ‘GHC.Internal.Data.Foldable’
instance GHC.Internal.Data.Foldable.Foldable GHC.Internal.Data.Monoid.Last -- Defined in ‘GHC.Internal.Data.Foldable’
instance GHC.Internal.Data.Foldable.Foldable [] -- Defined in ‘GHC.Internal.Data.Foldable’
-instance forall (f :: * -> *) i (c :: GHC.Internal.Generics.Meta). GHC.Internal.Data.Foldable.Foldable f => GHC.Internal.Data.Foldable.Foldable (GHC.Internal.Generics.M1 i c f) -- Defined in ‘GHC.Internal.Data.Foldable’
instance GHC.Internal.Data.Foldable.Foldable GHC.Internal.Maybe.Maybe -- Defined in ‘GHC.Internal.Data.Foldable’
instance GHC.Internal.Data.Foldable.Foldable GHC.Internal.Base.NonEmpty -- Defined in ‘GHC.Internal.Data.Foldable’
-instance GHC.Internal.Data.Foldable.Foldable GHC.Internal.Generics.Par1 -- Defined in ‘GHC.Internal.Data.Foldable’
instance GHC.Internal.Data.Foldable.Foldable GHC.Internal.Data.Semigroup.Internal.Product -- Defined in ‘GHC.Internal.Data.Foldable’
instance GHC.Internal.Data.Foldable.Foldable GHC.Internal.Data.Proxy.Proxy -- Defined in ‘GHC.Internal.Data.Foldable’
-instance forall (f :: * -> *). GHC.Internal.Data.Foldable.Foldable f => GHC.Internal.Data.Foldable.Foldable (GHC.Internal.Generics.Rec1 f) -- Defined in ‘GHC.Internal.Data.Foldable’
instance GHC.Internal.Data.Foldable.Foldable Solo -- Defined in ‘GHC.Internal.Data.Foldable’
instance GHC.Internal.Data.Foldable.Foldable GHC.Internal.Data.Semigroup.Internal.Sum -- Defined in ‘GHC.Internal.Data.Foldable’
instance forall a. GHC.Internal.Data.Foldable.Foldable ((,) a) -- Defined in ‘GHC.Internal.Data.Foldable’
-instance GHC.Internal.Data.Foldable.Foldable GHC.Internal.Generics.U1 -- Defined in ‘GHC.Internal.Data.Foldable’
-instance GHC.Internal.Data.Foldable.Foldable GHC.Internal.Generics.UAddr -- Defined in ‘GHC.Internal.Data.Foldable’
-instance GHC.Internal.Data.Foldable.Foldable GHC.Internal.Generics.UChar -- Defined in ‘GHC.Internal.Data.Foldable’
-instance GHC.Internal.Data.Foldable.Foldable GHC.Internal.Generics.UDouble -- Defined in ‘GHC.Internal.Data.Foldable’
-instance GHC.Internal.Data.Foldable.Foldable GHC.Internal.Generics.UFloat -- Defined in ‘GHC.Internal.Data.Foldable’
-instance GHC.Internal.Data.Foldable.Foldable GHC.Internal.Generics.UInt -- Defined in ‘GHC.Internal.Data.Foldable’
-instance GHC.Internal.Data.Foldable.Foldable GHC.Internal.Generics.UWord -- Defined in ‘GHC.Internal.Data.Foldable’
-instance GHC.Internal.Data.Foldable.Foldable GHC.Internal.Generics.V1 -- Defined in ‘GHC.Internal.Data.Foldable’
instance GHC.Internal.Data.Foldable.Foldable Data.Complex.Complex -- Defined in ‘Data.Complex’
instance forall (f :: * -> *) (g :: * -> *). (GHC.Internal.Data.Foldable.Foldable f, GHC.Internal.Data.Foldable.Foldable g) => GHC.Internal.Data.Foldable.Foldable (Data.Functor.Compose.Compose f g) -- Defined in ‘Data.Functor.Compose’
instance GHC.Internal.Data.Foldable.Foldable GHC.Internal.Data.Functor.Identity.Identity -- Defined in ‘GHC.Internal.Data.Functor.Identity’
@@ -11778,13 +11763,25 @@ instance GHC.Internal.Data.Foldable.Foldable Data.Semigroup.First -- Defined in
instance GHC.Internal.Data.Foldable.Foldable Data.Semigroup.Last -- Defined in ‘Data.Semigroup’
instance GHC.Internal.Data.Foldable.Foldable Data.Semigroup.Max -- Defined in ‘Data.Semigroup’
instance GHC.Internal.Data.Foldable.Foldable Data.Semigroup.Min -- Defined in ‘Data.Semigroup’
+instance forall (f :: * -> *) (g :: * -> *). (GHC.Internal.Data.Foldable.Foldable f, GHC.Internal.Data.Foldable.Foldable g) => GHC.Internal.Data.Foldable.Foldable (f GHC.Internal.Generics.:*: g) -- Defined in ‘GHC.Internal.Generics’
+instance forall (f :: * -> *) (g :: * -> *). (GHC.Internal.Data.Foldable.Foldable f, GHC.Internal.Data.Foldable.Foldable g) => GHC.Internal.Data.Foldable.Foldable (f GHC.Internal.Generics.:+: g) -- Defined in ‘GHC.Internal.Generics’
+instance forall (f :: * -> *) (g :: * -> *). (GHC.Internal.Data.Foldable.Foldable f, GHC.Internal.Data.Foldable.Foldable g) => GHC.Internal.Data.Foldable.Foldable (f GHC.Internal.Generics.:.: g) -- Defined in ‘GHC.Internal.Generics’
+instance forall i c. GHC.Internal.Data.Foldable.Foldable (GHC.Internal.Generics.K1 i c) -- Defined in ‘GHC.Internal.Generics’
+instance forall (f :: * -> *) i (c :: GHC.Internal.Generics.Meta). GHC.Internal.Data.Foldable.Foldable f => GHC.Internal.Data.Foldable.Foldable (GHC.Internal.Generics.M1 i c f) -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Data.Foldable.Foldable GHC.Internal.Generics.Par1 -- Defined in ‘GHC.Internal.Generics’
+instance forall (f :: * -> *). GHC.Internal.Data.Foldable.Foldable f => GHC.Internal.Data.Foldable.Foldable (GHC.Internal.Generics.Rec1 f) -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Data.Foldable.Foldable GHC.Internal.Generics.U1 -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Data.Foldable.Foldable GHC.Internal.Generics.UAddr -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Data.Foldable.Foldable GHC.Internal.Generics.UChar -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Data.Foldable.Foldable GHC.Internal.Generics.UDouble -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Data.Foldable.Foldable GHC.Internal.Generics.UFloat -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Data.Foldable.Foldable GHC.Internal.Generics.UInt -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Data.Foldable.Foldable GHC.Internal.Generics.UWord -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Data.Foldable.Foldable GHC.Internal.Generics.V1 -- Defined in ‘GHC.Internal.Generics’
instance forall a k (b :: k). GHC.Internal.Data.String.IsString a => GHC.Internal.Data.String.IsString (GHC.Internal.Data.Functor.Const.Const a b) -- Defined in ‘GHC.Internal.Data.String’
instance forall a. GHC.Internal.Data.String.IsString a => GHC.Internal.Data.String.IsString (GHC.Internal.Data.Functor.Identity.Identity a) -- Defined in ‘GHC.Internal.Data.String’
instance forall a. (a ~ GHC.Internal.Types.Char) => GHC.Internal.Data.String.IsString [a] -- Defined in ‘GHC.Internal.Data.String’
instance GHC.Internal.Data.Traversable.Traversable GHC.Internal.Functor.ZipList.ZipList -- Defined in ‘GHC.Internal.Functor.ZipList’
-instance forall (f :: * -> *) (g :: * -> *). (GHC.Internal.Data.Traversable.Traversable f, GHC.Internal.Data.Traversable.Traversable g) => GHC.Internal.Data.Traversable.Traversable (f GHC.Internal.Generics.:*: g) -- Defined in ‘GHC.Internal.Data.Traversable’
-instance forall (f :: * -> *) (g :: * -> *). (GHC.Internal.Data.Traversable.Traversable f, GHC.Internal.Data.Traversable.Traversable g) => GHC.Internal.Data.Traversable.Traversable (f GHC.Internal.Generics.:+: g) -- Defined in ‘GHC.Internal.Data.Traversable’
-instance forall (f :: * -> *) (g :: * -> *). (GHC.Internal.Data.Traversable.Traversable f, GHC.Internal.Data.Traversable.Traversable g) => GHC.Internal.Data.Traversable.Traversable (f GHC.Internal.Generics.:.: g) -- Defined in ‘GHC.Internal.Data.Traversable’
instance forall (f :: * -> *). GHC.Internal.Data.Traversable.Traversable f => GHC.Internal.Data.Traversable.Traversable (GHC.Internal.Data.Semigroup.Internal.Alt f) -- Defined in ‘GHC.Internal.Data.Traversable’
instance forall (f :: * -> *). GHC.Internal.Data.Traversable.Traversable f => GHC.Internal.Data.Traversable.Traversable (GHC.Internal.Data.Monoid.Ap f) -- Defined in ‘GHC.Internal.Data.Traversable’
instance forall i. GHC.Internal.Ix.Ix i => GHC.Internal.Data.Traversable.Traversable (GHC.Internal.Arr.Array i) -- Defined in ‘GHC.Internal.Data.Traversable’
@@ -11794,27 +11791,15 @@ instance GHC.Internal.Data.Traversable.Traversable GHC.Internal.Data.Semigroup.I
instance forall a. GHC.Internal.Data.Traversable.Traversable (GHC.Internal.Data.Either.Either a) -- Defined in ‘GHC.Internal.Data.Traversable’
instance GHC.Internal.Data.Traversable.Traversable GHC.Internal.Data.Monoid.First -- Defined in ‘GHC.Internal.Data.Traversable’
instance GHC.Internal.Data.Traversable.Traversable GHC.Internal.Data.Functor.Identity.Identity -- Defined in ‘GHC.Internal.Data.Traversable’
-instance forall i c. GHC.Internal.Data.Traversable.Traversable (GHC.Internal.Generics.K1 i c) -- Defined in ‘GHC.Internal.Data.Traversable’
instance GHC.Internal.Data.Traversable.Traversable GHC.Internal.Data.Monoid.Last -- Defined in ‘GHC.Internal.Data.Traversable’
instance GHC.Internal.Data.Traversable.Traversable [] -- Defined in ‘GHC.Internal.Data.Traversable’
-instance forall (f :: * -> *) i (c :: GHC.Internal.Generics.Meta). GHC.Internal.Data.Traversable.Traversable f => GHC.Internal.Data.Traversable.Traversable (GHC.Internal.Generics.M1 i c f) -- Defined in ‘GHC.Internal.Data.Traversable’
instance GHC.Internal.Data.Traversable.Traversable GHC.Internal.Maybe.Maybe -- Defined in ‘GHC.Internal.Data.Traversable’
instance GHC.Internal.Data.Traversable.Traversable GHC.Internal.Base.NonEmpty -- Defined in ‘GHC.Internal.Data.Traversable’
-instance GHC.Internal.Data.Traversable.Traversable GHC.Internal.Generics.Par1 -- Defined in ‘GHC.Internal.Data.Traversable’
instance GHC.Internal.Data.Traversable.Traversable GHC.Internal.Data.Semigroup.Internal.Product -- Defined in ‘GHC.Internal.Data.Traversable’
instance GHC.Internal.Data.Traversable.Traversable GHC.Internal.Data.Proxy.Proxy -- Defined in ‘GHC.Internal.Data.Traversable’
-instance forall (f :: * -> *). GHC.Internal.Data.Traversable.Traversable f => GHC.Internal.Data.Traversable.Traversable (GHC.Internal.Generics.Rec1 f) -- Defined in ‘GHC.Internal.Data.Traversable’
instance GHC.Internal.Data.Traversable.Traversable Solo -- Defined in ‘GHC.Internal.Data.Traversable’
instance GHC.Internal.Data.Traversable.Traversable GHC.Internal.Data.Semigroup.Internal.Sum -- Defined in ‘GHC.Internal.Data.Traversable’
instance forall a. GHC.Internal.Data.Traversable.Traversable ((,) a) -- Defined in ‘GHC.Internal.Data.Traversable’
-instance GHC.Internal.Data.Traversable.Traversable GHC.Internal.Generics.U1 -- Defined in ‘GHC.Internal.Data.Traversable’
-instance GHC.Internal.Data.Traversable.Traversable GHC.Internal.Generics.UAddr -- Defined in ‘GHC.Internal.Data.Traversable’
-instance GHC.Internal.Data.Traversable.Traversable GHC.Internal.Generics.UChar -- Defined in ‘GHC.Internal.Data.Traversable’
-instance GHC.Internal.Data.Traversable.Traversable GHC.Internal.Generics.UDouble -- Defined in ‘GHC.Internal.Data.Traversable’
-instance GHC.Internal.Data.Traversable.Traversable GHC.Internal.Generics.UFloat -- Defined in ‘GHC.Internal.Data.Traversable’
-instance GHC.Internal.Data.Traversable.Traversable GHC.Internal.Generics.UInt -- Defined in ‘GHC.Internal.Data.Traversable’
-instance GHC.Internal.Data.Traversable.Traversable GHC.Internal.Generics.UWord -- Defined in ‘GHC.Internal.Data.Traversable’
-instance GHC.Internal.Data.Traversable.Traversable GHC.Internal.Generics.V1 -- Defined in ‘GHC.Internal.Data.Traversable’
instance GHC.Internal.Data.Traversable.Traversable Data.Complex.Complex -- Defined in ‘Data.Complex’
instance forall (f :: * -> *) (g :: * -> *). (GHC.Internal.Data.Traversable.Traversable f, GHC.Internal.Data.Traversable.Traversable g) => GHC.Internal.Data.Traversable.Traversable (Data.Functor.Compose.Compose f g) -- Defined in ‘Data.Functor.Compose’
instance [safe] forall (f :: * -> *) (g :: * -> *). (GHC.Internal.Data.Traversable.Traversable f, GHC.Internal.Data.Traversable.Traversable g) => GHC.Internal.Data.Traversable.Traversable (Data.Functor.Product.Product f g) -- Defined in ‘Data.Functor.Product’
@@ -11824,6 +11809,21 @@ instance GHC.Internal.Data.Traversable.Traversable Data.Semigroup.First -- Defin
instance GHC.Internal.Data.Traversable.Traversable Data.Semigroup.Last -- Defined in ‘Data.Semigroup’
instance GHC.Internal.Data.Traversable.Traversable Data.Semigroup.Max -- Defined in ‘Data.Semigroup’
instance GHC.Internal.Data.Traversable.Traversable Data.Semigroup.Min -- Defined in ‘Data.Semigroup’
+instance forall (f :: * -> *) (g :: * -> *). (GHC.Internal.Data.Traversable.Traversable f, GHC.Internal.Data.Traversable.Traversable g) => GHC.Internal.Data.Traversable.Traversable (f GHC.Internal.Generics.:*: g) -- Defined in ‘GHC.Internal.Generics’
+instance forall (f :: * -> *) (g :: * -> *). (GHC.Internal.Data.Traversable.Traversable f, GHC.Internal.Data.Traversable.Traversable g) => GHC.Internal.Data.Traversable.Traversable (f GHC.Internal.Generics.:+: g) -- Defined in ‘GHC.Internal.Generics’
+instance forall (f :: * -> *) (g :: * -> *). (GHC.Internal.Data.Traversable.Traversable f, GHC.Internal.Data.Traversable.Traversable g) => GHC.Internal.Data.Traversable.Traversable (f GHC.Internal.Generics.:.: g) -- Defined in ‘GHC.Internal.Generics’
+instance forall i c. GHC.Internal.Data.Traversable.Traversable (GHC.Internal.Generics.K1 i c) -- Defined in ‘GHC.Internal.Generics’
+instance forall (f :: * -> *) i (c :: GHC.Internal.Generics.Meta). GHC.Internal.Data.Traversable.Traversable f => GHC.Internal.Data.Traversable.Traversable (GHC.Internal.Generics.M1 i c f) -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Data.Traversable.Traversable GHC.Internal.Generics.Par1 -- Defined in ‘GHC.Internal.Generics’
+instance forall (f :: * -> *). GHC.Internal.Data.Traversable.Traversable f => GHC.Internal.Data.Traversable.Traversable (GHC.Internal.Generics.Rec1 f) -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Data.Traversable.Traversable GHC.Internal.Generics.U1 -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Data.Traversable.Traversable GHC.Internal.Generics.UAddr -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Data.Traversable.Traversable GHC.Internal.Generics.UChar -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Data.Traversable.Traversable GHC.Internal.Generics.UDouble -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Data.Traversable.Traversable GHC.Internal.Generics.UFloat -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Data.Traversable.Traversable GHC.Internal.Generics.UInt -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Data.Traversable.Traversable GHC.Internal.Generics.UWord -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Data.Traversable.Traversable GHC.Internal.Generics.V1 -- Defined in ‘GHC.Internal.Generics’
instance GHC.Internal.Data.Type.Coercion.TestCoercion GHC.Internal.TypeNats.SNat -- Defined in ‘GHC.Internal.TypeNats’
instance GHC.Internal.Data.Type.Coercion.TestCoercion GHC.Internal.TypeLits.SChar -- Defined in ‘GHC.Internal.TypeLits’
instance GHC.Internal.Data.Type.Coercion.TestCoercion GHC.Internal.TypeLits.SSymbol -- Defined in ‘GHC.Internal.TypeLits’
@@ -12110,25 +12110,11 @@ instance forall (n :: GHC.Internal.Types.Symbol) (f :: GHC.Internal.Generics.Fix
instance forall (n :: GHC.Internal.Types.Symbol) (m :: GHC.Internal.Types.Symbol) (p :: GHC.Internal.Types.Symbol) (nt :: GHC.Internal.Types.Bool). (GHC.Internal.TypeLits.KnownSymbol n, GHC.Internal.TypeLits.KnownSymbol m, GHC.Internal.TypeLits.KnownSymbol p, GHC.Internal.Generics.SingI nt) => GHC.Internal.Generics.Datatype (GHC.Internal.Generics.MetaData n m p nt) -- Defined in ‘GHC.Internal.Generics’
instance forall (a :: * -> * -> *) b c. GHC.Internal.Generics.Generic (Control.Applicative.WrappedArrow a b c) -- Defined in ‘Control.Applicative’
instance forall (m :: * -> *) a. GHC.Internal.Generics.Generic (Control.Applicative.WrappedMonad m a) -- Defined in ‘Control.Applicative’
-instance forall a k (b :: k). GHC.Internal.Generics.Generic (GHC.Internal.Data.Functor.Const.Const a b) -- Defined in ‘GHC.Internal.Data.Functor.Const’
-instance forall a. GHC.Internal.Generics.Generic (GHC.Internal.Functor.ZipList.ZipList a) -- Defined in ‘GHC.Internal.Functor.ZipList’
instance forall (m :: * -> *) a b. GHC.Internal.Generics.Generic (GHC.Internal.Control.Arrow.Kleisli m a b) -- Defined in ‘GHC.Internal.Control.Arrow’
-instance GHC.Internal.Generics.Generic GHC.Internal.IO.Exception.ExitCode -- Defined in ‘GHC.Internal.IO.Exception’
instance forall a. GHC.Internal.Generics.Generic (Data.Complex.Complex a) -- Defined in ‘Data.Complex’
instance forall k1 (f :: k1 -> *) k2 (g :: k2 -> k1) (a :: k2). GHC.Internal.Generics.Generic (Data.Functor.Compose.Compose f g a) -- Defined in ‘Data.Functor.Compose’
-instance forall a. GHC.Internal.Generics.Generic (GHC.Internal.Data.Functor.Identity.Identity a) -- Defined in ‘GHC.Internal.Data.Functor.Identity’
instance [safe] forall k (f :: k -> *) (g :: k -> *) (a :: k). GHC.Internal.Generics.Generic (Data.Functor.Product.Product f g a) -- Defined in ‘Data.Functor.Product’
instance [safe] forall k (f :: k -> *) (g :: k -> *) (a :: k). GHC.Internal.Generics.Generic (Data.Functor.Sum.Sum f g a) -- Defined in ‘Data.Functor.Sum’
-instance GHC.Internal.Generics.Generic GHC.Internal.Data.Semigroup.Internal.All -- Defined in ‘GHC.Internal.Data.Semigroup.Internal’
-instance forall k (f :: k -> *) (a :: k). GHC.Internal.Generics.Generic (GHC.Internal.Data.Semigroup.Internal.Alt f a) -- Defined in ‘GHC.Internal.Data.Semigroup.Internal’
-instance GHC.Internal.Generics.Generic GHC.Internal.Data.Semigroup.Internal.Any -- Defined in ‘GHC.Internal.Data.Semigroup.Internal’
-instance forall a. GHC.Internal.Generics.Generic (GHC.Internal.Data.Semigroup.Internal.Dual a) -- Defined in ‘GHC.Internal.Data.Semigroup.Internal’
-instance forall a. GHC.Internal.Generics.Generic (GHC.Internal.Data.Semigroup.Internal.Endo a) -- Defined in ‘GHC.Internal.Data.Semigroup.Internal’
-instance forall a. GHC.Internal.Generics.Generic (GHC.Internal.Data.Semigroup.Internal.Product a) -- Defined in ‘GHC.Internal.Data.Semigroup.Internal’
-instance forall a. GHC.Internal.Generics.Generic (GHC.Internal.Data.Semigroup.Internal.Sum a) -- Defined in ‘GHC.Internal.Data.Semigroup.Internal’
-instance forall k (f :: k -> *) (a :: k). GHC.Internal.Generics.Generic (GHC.Internal.Data.Monoid.Ap f a) -- Defined in ‘GHC.Internal.Data.Monoid’
-instance forall a. GHC.Internal.Generics.Generic (GHC.Internal.Data.Monoid.First a) -- Defined in ‘GHC.Internal.Data.Monoid’
-instance forall a. GHC.Internal.Generics.Generic (GHC.Internal.Data.Monoid.Last a) -- Defined in ‘GHC.Internal.Data.Monoid’
instance forall a b. GHC.Internal.Generics.Generic (Data.Semigroup.Arg a b) -- Defined in ‘Data.Semigroup’
instance forall a. GHC.Internal.Generics.Generic (Data.Semigroup.First a) -- Defined in ‘Data.Semigroup’
instance forall a. GHC.Internal.Generics.Generic (Data.Semigroup.Last a) -- Defined in ‘Data.Semigroup’
@@ -12136,31 +12122,44 @@ instance forall a. GHC.Internal.Generics.Generic (Data.Semigroup.Max a) -- Defin
instance forall a. GHC.Internal.Generics.Generic (Data.Semigroup.Min a) -- Defined in ‘Data.Semigroup’
instance forall m. GHC.Internal.Generics.Generic (Data.Semigroup.WrappedMonoid m) -- Defined in ‘Data.Semigroup’
instance GHC.Internal.Generics.Generic GHC.Internal.Data.Version.Version -- Defined in ‘GHC.Internal.Data.Version’
-instance GHC.Internal.Generics.Generic GHC.Internal.ByteOrder.ByteOrder -- Defined in ‘GHC.Internal.ByteOrder’
instance forall k (f :: k -> *) (g :: k -> *) (p :: k). GHC.Internal.Generics.Generic ((GHC.Internal.Generics.:*:) f g p) -- Defined in ‘GHC.Internal.Generics’
instance forall k (f :: k -> *) (g :: k -> *) (p :: k). GHC.Internal.Generics.Generic ((GHC.Internal.Generics.:+:) f g p) -- Defined in ‘GHC.Internal.Generics’
instance forall k2 (f :: k2 -> *) k1 (g :: k1 -> k2) (p :: k1). GHC.Internal.Generics.Generic ((GHC.Internal.Generics.:.:) f g p) -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Generics.Generic GHC.Internal.Data.Semigroup.Internal.All -- Defined in ‘GHC.Internal.Generics’
+instance forall k (f :: k -> *) (a :: k). GHC.Internal.Generics.Generic (GHC.Internal.Data.Semigroup.Internal.Alt f a) -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Generics.Generic GHC.Internal.Data.Semigroup.Internal.Any -- Defined in ‘GHC.Internal.Generics’
+instance forall k (f :: k -> *) (a :: k). GHC.Internal.Generics.Generic (GHC.Internal.Data.Monoid.Ap f a) -- Defined in ‘GHC.Internal.Generics’
instance GHC.Internal.Generics.Generic GHC.Internal.Generics.Associativity -- Defined in ‘GHC.Internal.Generics’
instance GHC.Internal.Generics.Generic GHC.Internal.Types.Bool -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Generics.Generic GHC.Internal.ByteOrder.ByteOrder -- Defined in ‘GHC.Internal.Generics’
+instance forall k a (b :: k). GHC.Internal.Generics.Generic (GHC.Internal.Data.Functor.Const.Const a b) -- Defined in ‘GHC.Internal.Generics’
instance GHC.Internal.Generics.Generic GHC.Internal.Generics.DecidedStrictness -- Defined in ‘GHC.Internal.Generics’
instance forall a. GHC.Internal.Generics.Generic (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Generics’
+instance forall a. GHC.Internal.Generics.Generic (GHC.Internal.Data.Semigroup.Internal.Dual a) -- Defined in ‘GHC.Internal.Generics’
instance forall a b. GHC.Internal.Generics.Generic (GHC.Internal.Data.Either.Either a b) -- Defined in ‘GHC.Internal.Generics’
+instance forall a. GHC.Internal.Generics.Generic (GHC.Internal.Data.Semigroup.Internal.Endo a) -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Generics.Generic GHC.Internal.IO.Exception.ExitCode -- Defined in ‘GHC.Internal.Generics’
instance GHC.Internal.Generics.Generic GHC.Internal.Fingerprint.Type.Fingerprint -- Defined in ‘GHC.Internal.Generics’
+instance forall a. GHC.Internal.Generics.Generic (GHC.Internal.Data.Monoid.First a) -- Defined in ‘GHC.Internal.Generics’
instance GHC.Internal.Generics.Generic GHC.Internal.Generics.Fixity -- Defined in ‘GHC.Internal.Generics’
instance GHC.Internal.Generics.Generic GHC.Internal.Unicode.GeneralCategory -- Defined in ‘GHC.Internal.Generics’
+instance forall a. GHC.Internal.Generics.Generic (GHC.Internal.Data.Functor.Identity.Identity a) -- Defined in ‘GHC.Internal.Generics’
instance forall i c k (p :: k). GHC.Internal.Generics.Generic (GHC.Internal.Generics.K1 i c p) -- Defined in ‘GHC.Internal.Generics’
+instance forall a. GHC.Internal.Generics.Generic (GHC.Internal.Data.Monoid.Last a) -- Defined in ‘GHC.Internal.Generics’
instance forall a. GHC.Internal.Generics.Generic [a] -- Defined in ‘GHC.Internal.Generics’
instance forall i (c :: GHC.Internal.Generics.Meta) k (f :: k -> *) (p :: k). GHC.Internal.Generics.Generic (GHC.Internal.Generics.M1 i c f p) -- Defined in ‘GHC.Internal.Generics’
instance forall a. GHC.Internal.Generics.Generic (GHC.Internal.Maybe.Maybe a) -- Defined in ‘GHC.Internal.Generics’
instance forall a. GHC.Internal.Generics.Generic (GHC.Internal.Base.NonEmpty a) -- Defined in ‘GHC.Internal.Generics’
instance GHC.Internal.Generics.Generic GHC.Internal.Types.Ordering -- Defined in ‘GHC.Internal.Generics’
instance forall p. GHC.Internal.Generics.Generic (GHC.Internal.Generics.Par1 p) -- Defined in ‘GHC.Internal.Generics’
+instance forall a. GHC.Internal.Generics.Generic (GHC.Internal.Data.Semigroup.Internal.Product a) -- Defined in ‘GHC.Internal.Generics’
instance forall k (t :: k). GHC.Internal.Generics.Generic (GHC.Internal.Data.Proxy.Proxy t) -- Defined in ‘GHC.Internal.Generics’
instance forall k (f :: k -> *) (p :: k). GHC.Internal.Generics.Generic (GHC.Internal.Generics.Rec1 f p) -- Defined in ‘GHC.Internal.Generics’
instance forall a. GHC.Internal.Generics.Generic (Solo a) -- Defined in ‘GHC.Internal.Generics’
instance GHC.Internal.Generics.Generic GHC.Internal.Generics.SourceStrictness -- Defined in ‘GHC.Internal.Generics’
instance GHC.Internal.Generics.Generic GHC.Internal.Generics.SourceUnpackedness -- Defined in ‘GHC.Internal.Generics’
instance GHC.Internal.Generics.Generic GHC.Internal.Stack.Types.SrcLoc -- Defined in ‘GHC.Internal.Generics’
+instance forall a. GHC.Internal.Generics.Generic (GHC.Internal.Data.Semigroup.Internal.Sum a) -- Defined in ‘GHC.Internal.Generics’
instance forall a b c d e f g h i j. GHC.Internal.Generics.Generic (a, b, c, d, e, f, g, h, i, j) -- Defined in ‘GHC.Internal.Generics’
instance forall a b c d e f g h i j k. GHC.Internal.Generics.Generic (a, b, c, d, e, f, g, h, i, j, k) -- Defined in ‘GHC.Internal.Generics’
instance forall a b c d e f g h i j k l. GHC.Internal.Generics.Generic (a, b, c, d, e, f, g, h, i, j, k, l) -- Defined in ‘GHC.Internal.Generics’
@@ -12185,6 +12184,7 @@ instance forall k (p :: k). GHC.Internal.Generics.Generic (GHC.Internal.Generics
instance GHC.Internal.Generics.Generic () -- Defined in ‘GHC.Internal.Generics’
instance forall k (p :: k). GHC.Internal.Generics.Generic (GHC.Internal.Generics.V1 p) -- Defined in ‘GHC.Internal.Generics’
instance GHC.Internal.Generics.Generic GHC.Internal.Base.Void -- Defined in ‘GHC.Internal.Generics’
+instance forall a. GHC.Internal.Generics.Generic (GHC.Internal.Functor.ZipList.ZipList a) -- Defined in ‘GHC.Internal.Generics’
instance GHC.Internal.Generics.Generic GHC.RTS.Flags.CCFlags -- Defined in ‘GHC.RTS.Flags’
instance GHC.Internal.Generics.Generic GHC.RTS.Flags.ConcFlags -- Defined in ‘GHC.RTS.Flags’
instance GHC.Internal.Generics.Generic GHC.RTS.Flags.DebugFlags -- Defined in ‘GHC.RTS.Flags’
@@ -12204,15 +12204,8 @@ instance [safe] GHC.Internal.Generics.Generic GHC.Stats.GCDetails -- Defined in
instance [safe] GHC.Internal.Generics.Generic GHC.Stats.RTSStats -- Defined in ‘GHC.Stats’
instance forall (a :: * -> * -> *) b. GHC.Internal.Generics.Generic1 (Control.Applicative.WrappedArrow a b) -- Defined in ‘Control.Applicative’
instance forall (m :: * -> *). GHC.Internal.Generics.Generic1 (Control.Applicative.WrappedMonad m) -- Defined in ‘Control.Applicative’
-instance GHC.Internal.Generics.Generic1 GHC.Internal.Functor.ZipList.ZipList -- Defined in ‘GHC.Internal.Functor.ZipList’
instance forall (m :: * -> *) a. GHC.Internal.Generics.Generic1 (GHC.Internal.Control.Arrow.Kleisli m a) -- Defined in ‘GHC.Internal.Control.Arrow’
instance GHC.Internal.Generics.Generic1 Data.Complex.Complex -- Defined in ‘Data.Complex’
-instance GHC.Internal.Generics.Generic1 GHC.Internal.Data.Functor.Identity.Identity -- Defined in ‘GHC.Internal.Data.Functor.Identity’
-instance GHC.Internal.Generics.Generic1 GHC.Internal.Data.Semigroup.Internal.Dual -- Defined in ‘GHC.Internal.Data.Semigroup.Internal’
-instance GHC.Internal.Generics.Generic1 GHC.Internal.Data.Semigroup.Internal.Product -- Defined in ‘GHC.Internal.Data.Semigroup.Internal’
-instance GHC.Internal.Generics.Generic1 GHC.Internal.Data.Semigroup.Internal.Sum -- Defined in ‘GHC.Internal.Data.Semigroup.Internal’
-instance GHC.Internal.Generics.Generic1 GHC.Internal.Data.Monoid.First -- Defined in ‘GHC.Internal.Data.Monoid’
-instance GHC.Internal.Generics.Generic1 GHC.Internal.Data.Monoid.Last -- Defined in ‘GHC.Internal.Data.Monoid’
instance forall a. GHC.Internal.Generics.Generic1 (Data.Semigroup.Arg a) -- Defined in ‘Data.Semigroup’
instance GHC.Internal.Generics.Generic1 Data.Semigroup.First -- Defined in ‘Data.Semigroup’
instance GHC.Internal.Generics.Generic1 Data.Semigroup.Last -- Defined in ‘Data.Semigroup’
@@ -12220,12 +12213,18 @@ instance GHC.Internal.Generics.Generic1 Data.Semigroup.Max -- Defined in ‘Data
instance GHC.Internal.Generics.Generic1 Data.Semigroup.Min -- Defined in ‘Data.Semigroup’
instance GHC.Internal.Generics.Generic1 Data.Semigroup.WrappedMonoid -- Defined in ‘Data.Semigroup’
instance GHC.Internal.Generics.Generic1 GHC.Internal.Data.Ord.Down -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Generics.Generic1 GHC.Internal.Data.Semigroup.Internal.Dual -- Defined in ‘GHC.Internal.Generics’
instance forall a. GHC.Internal.Generics.Generic1 (GHC.Internal.Data.Either.Either a) -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Generics.Generic1 GHC.Internal.Data.Monoid.First -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Generics.Generic1 GHC.Internal.Data.Functor.Identity.Identity -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Generics.Generic1 GHC.Internal.Data.Monoid.Last -- Defined in ‘GHC.Internal.Generics’
instance GHC.Internal.Generics.Generic1 [] -- Defined in ‘GHC.Internal.Generics’
instance GHC.Internal.Generics.Generic1 GHC.Internal.Maybe.Maybe -- Defined in ‘GHC.Internal.Generics’
instance GHC.Internal.Generics.Generic1 GHC.Internal.Base.NonEmpty -- Defined in ‘GHC.Internal.Generics’
instance GHC.Internal.Generics.Generic1 GHC.Internal.Generics.Par1 -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Generics.Generic1 GHC.Internal.Data.Semigroup.Internal.Product -- Defined in ‘GHC.Internal.Generics’
instance GHC.Internal.Generics.Generic1 Solo -- Defined in ‘GHC.Internal.Generics’
+instance GHC.Internal.Generics.Generic1 GHC.Internal.Data.Semigroup.Internal.Sum -- Defined in ‘GHC.Internal.Generics’
instance forall a b c d e f g h i. GHC.Internal.Generics.Generic1 ((,,,,,,,,,) a b c d e f g h i) -- Defined in ‘GHC.Internal.Generics’
instance forall a b c d e f g h i j. GHC.Internal.Generics.Generic1 ((,,,,,,,,,,) a b c d e f g h i j) -- Defined in ‘GHC.Internal.Generics’
instance forall a b c d e f g h i j k. GHC.Internal.Generics.Generic1 ((,,,,,,,,,,,) a b c d e f g h i j k) -- Defined in ‘GHC.Internal.Generics’
@@ -12240,15 +12239,16 @@ instance forall a b c d e. GHC.Internal.Generics.Generic1 ((,,,,,) a b c d e) --
instance forall a b c d e f. GHC.Internal.Generics.Generic1 ((,,,,,,) a b c d e f) -- Defined in ‘GHC.Internal.Generics’
instance forall a b c d e f g. GHC.Internal.Generics.Generic1 ((,,,,,,,) a b c d e f g) -- Defined in ‘GHC.Internal.Generics’
instance forall a b c d e f g h. GHC.Internal.Generics.Generic1 ((,,,,,,,,) a b c d e f g h) -- Defined in ‘GHC.Internal.Generics’
-instance forall k1 a. GHC.Internal.Generics.Generic1 (GHC.Internal.Data.Functor.Const.Const a) -- Defined in ‘GHC.Internal.Data.Functor.Const’
+instance GHC.Internal.Generics.Generic1 GHC.Internal.Functor.ZipList.ZipList -- Defined in ‘GHC.Internal.Generics’
instance forall (f :: * -> *) k1 (g :: k1 -> *). GHC.Internal.Base.Functor f => GHC.Internal.Generics.Generic1 (Data.Functor.Compose.Compose f g) -- Defined in ‘Data.Functor.Compose’
instance [safe] forall k1 (f :: k1 -> *) (g :: k1 -> *). GHC.Internal.Generics.Generic1 (Data.Functor.Product.Product f g) -- Defined in ‘Data.Functor.Product’
instance [safe] forall k1 (f :: k1 -> *) (g :: k1 -> *). GHC.Internal.Generics.Generic1 (Data.Functor.Sum.Sum f g) -- Defined in ‘Data.Functor.Sum’
-instance forall k1 (f :: k1 -> *). GHC.Internal.Generics.Generic1 (GHC.Internal.Data.Semigroup.Internal.Alt f) -- Defined in ‘GHC.Internal.Data.Semigroup.Internal’
-instance forall k1 (f :: k1 -> *). GHC.Internal.Generics.Generic1 (GHC.Internal.Data.Monoid.Ap f) -- Defined in ‘GHC.Internal.Data.Monoid’
instance forall k (f :: k -> *) (g :: k -> *). GHC.Internal.Generics.Generic1 (f GHC.Internal.Generics.:*: g) -- Defined in ‘GHC.Internal.Generics’
instance forall k (f :: k -> *) (g :: k -> *). GHC.Internal.Generics.Generic1 (f GHC.Internal.Generics.:+: g) -- Defined in ‘GHC.Internal.Generics’
instance forall (f :: * -> *) k (g :: k -> *). GHC.Internal.Base.Functor f => GHC.Internal.Generics.Generic1 (f GHC.Internal.Generics.:.: g) -- Defined in ‘GHC.Internal.Generics’
+instance forall k (f :: k -> *). GHC.Internal.Generics.Generic1 (GHC.Internal.Data.Semigroup.Internal.Alt f) -- Defined in ‘GHC.Internal.Generics’
+instance forall k (f :: k -> *). GHC.Internal.Generics.Generic1 (GHC.Internal.Data.Monoid.Ap f) -- Defined in ‘GHC.Internal.Generics’
+instance forall k a. GHC.Internal.Generics.Generic1 (GHC.Internal.Data.Functor.Const.Const a) -- Defined in ‘GHC.Internal.Generics’
instance forall k i c. GHC.Internal.Generics.Generic1 (GHC.Internal.Generics.K1 i c) -- Defined in ‘GHC.Internal.Generics’
instance forall i (c :: GHC.Internal.Generics.Meta) k (f :: k -> *). GHC.Internal.Generics.Generic1 (GHC.Internal.Generics.M1 i c f) -- Defined in ‘GHC.Internal.Generics’
instance forall k. GHC.Internal.Generics.Generic1 GHC.Internal.Data.Proxy.Proxy -- Defined in ‘GHC.Internal.Generics’
@@ -12428,6 +12428,7 @@ instance forall a. GHC.Internal.Read.Read a => GHC.Internal.Read.Read (GHC.Inter
instance forall a. GHC.Internal.Read.Read a => GHC.Internal.Read.Read (GHC.Internal.Data.Bits.Xor a) -- Defined in ‘GHC.Internal.Data.Bits’
instance forall a b. (GHC.Internal.Ix.Ix a, GHC.Internal.Read.Read a, GHC.Internal.Read.Read b) => GHC.Internal.Read.Read (GHC.Internal.Arr.Array a b) -- Defined in ‘GHC.Internal.Read’
instance GHC.Internal.Read.Read GHC.Internal.Types.Bool -- Defined in ‘GHC.Internal.Read’
+instance GHC.Internal.Read.Read GHC.Internal.ByteOrder.ByteOrder -- Defined in ‘GHC.Internal.Read’
instance GHC.Internal.Read.Read GHC.Internal.Types.Char -- Defined in ‘GHC.Internal.Read’
instance GHC.Internal.Read.Read GHC.Internal.Types.Double -- Defined in ‘GHC.Internal.Read’
instance GHC.Internal.Read.Read GHC.Internal.Types.Float -- Defined in ‘GHC.Internal.Read’
@@ -12523,7 +12524,6 @@ instance GHC.Internal.Read.Read GHC.Internal.Foreign.C.Types.CULong -- Defined i
instance GHC.Internal.Read.Read GHC.Internal.Foreign.C.Types.CUSeconds -- Defined in ‘GHC.Internal.Foreign.C.Types’
instance GHC.Internal.Read.Read GHC.Internal.Foreign.C.Types.CUShort -- Defined in ‘GHC.Internal.Foreign.C.Types’
instance GHC.Internal.Read.Read GHC.Internal.Foreign.C.Types.CWchar -- Defined in ‘GHC.Internal.Foreign.C.Types’
-instance GHC.Internal.Read.Read GHC.Internal.ByteOrder.ByteOrder -- Defined in ‘GHC.Internal.ByteOrder’
instance forall k (f :: k -> *) (g :: k -> *) (p :: k). (GHC.Internal.Read.Read (f p), GHC.Internal.Read.Read (g p)) => GHC.Internal.Read.Read ((GHC.Internal.Generics.:*:) f g p) -- Defined in ‘GHC.Internal.Generics’
instance forall k (f :: k -> *) (g :: k -> *) (p :: k). (GHC.Internal.Read.Read (f p), GHC.Internal.Read.Read (g p)) => GHC.Internal.Read.Read ((GHC.Internal.Generics.:+:) f g p) -- Defined in ‘GHC.Internal.Generics’
instance forall k2 (f :: k2 -> *) k1 (g :: k1 -> k2) (p :: k1). GHC.Internal.Read.Read (f (g p)) => GHC.Internal.Read.Read ((GHC.Internal.Generics.:.:) f g p) -- Defined in ‘GHC.Internal.Generics’
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/583570120001014ebf7f3cda0296085…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/583570120001014ebf7f3cda0296085…
You're receiving this email because of your account on gitlab.haskell.org.
1
0