[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) 20 Feb '26
by Simon Peyton Jones (@simonpj) 20 Feb '26
20 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) 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:
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) 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:
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
[Git][ghc/ghc][wip/T26930] 9 commits: Support more x86 extensions: AVX-512 {BW,DQ,VL} and GFNI
by Teo Camarasu (@teo) 20 Feb '26
by Teo Camarasu (@teo) 20 Feb '26
20 Feb '26
Teo Camarasu pushed to branch wip/T26930 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
- - - - -
f5208751 by Teo Camarasu at 2026-02-19T16:19:11+00:00
Float up generics
- - - - -
124 changed files:
- 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
- docs/users_guide/9.16.1-notes.rst
- docs/users_guide/eventlog-formats.rst
- docs/users_guide/phases.rst
- docs/users_guide/using.rst
- 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/ghc-internal/ghc-internal.cabal.in
- libraries/ghc-internal/src/GHC/Internal/ByteOrder.hs
- − libraries/ghc-internal/src/GHC/Internal/ByteOrder.hs-boot
- libraries/ghc-internal/src/GHC/Internal/Control/Arrow.hs
- libraries/ghc-internal/src/GHC/Internal/Control/Monad/Fix.hs
- − libraries/ghc-internal/src/GHC/Internal/Data/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/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/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/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/IO/FD.hs
- libraries/ghc-internal/src/GHC/Internal/JS/Prim.hs
- libraries/ghc-internal/src/GHC/Internal/Read.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/src/GHC/Internal/Unicode/Bits.hs
- + libraries/ghc-internal/tests/backtraces/T15395.hs
- + libraries/ghc-internal/tests/backtraces/T15395.stdout
- libraries/ghc-internal/tests/backtraces/all.T
- libraries/ghc-internal/tests/stack-annotation/ann_frame005.stdout
- m4/fptools_happy.m4
- testsuite/driver/cpu_features.py
- 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/ghci/scripts/Defer02.stderr
- testsuite/tests/ghci/scripts/ListTuplePunsPpr.stdout
- testsuite/tests/ghci/scripts/T10963.stderr
- testsuite/tests/ghci/scripts/T15325.stderr
- testsuite/tests/ghci/scripts/ghci064.stdout
- testsuite/tests/interface-stability/base-exports.stdout
- 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/316765d2128789be4ad1042d0214c8…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/316765d2128789be4ad1042d0214c8…
You're receiving this email because of your account on gitlab.haskell.org.
1
0
Teo Camarasu pushed new branch wip/T26875-1 at Glasgow Haskell Compiler / GHC
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/T26875-1
You're receiving this email because of your account on gitlab.haskell.org.
1
0
[Git][ghc/ghc][wip/fendor/linkable-usage] 2 commits: determinism: Use a deterministic renaming when writing bytecode files
by Hannes Siebenhandl (@fendor) 19 Feb '26
by Hannes Siebenhandl (@fendor) 19 Feb '26
19 Feb '26
Hannes Siebenhandl pushed to branch wip/fendor/linkable-usage at Glasgow Haskell Compiler / GHC
Commits:
dd08f8bc by Matthew Pickering at 2026-02-19T12:30:00+01:00
determinism: Use a deterministic renaming when writing bytecode files
Now when writing the bytecode file, a counter and substitution are used
to provide deterministic keys to local variables (rather than relying on
uniques). This change ensures that `.gbc` are produced
deterministically.
Fixes #26499
- - - - -
ef364443 by fendor at 2026-02-19T14:26:28+01:00
WIP: fix fingerprinting
- - - - -
1 changed file:
- compiler/GHC/ByteCode/Serialize.hs
Changes:
=====================================
compiler/GHC/ByteCode/Serialize.hs
=====================================
@@ -47,9 +47,11 @@ import qualified Data.ByteString as BS
import Data.Traversable
import GHC.Utils.Logger
import GHC.Linker.Types
-import System.IO.Unsafe (unsafeInterleaveIO)
+import System.IO.Unsafe (unsafeInterleaveIO, unsafePerformIO)
import GHC.Utils.Outputable
-import GHC.Utils.Fingerprint (Fingerprint, fingerprintByteString)
+import GHC.Utils.Fingerprint (Fingerprint)
+import GHC.Types.Name.Env
+import GHC.Iface.Recomp.Binary (putNameLiterally, fingerprintBinMem)
{- Note [Overview of persistent bytecode]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -289,12 +291,8 @@ writeBinByteCode f cbc = do
fingerprintModuleByteCodeContents :: Module -> CompiledByteCode -> [FilePath] -> IO Fingerprint
fingerprintModuleByteCodeContents modl cbc foreign_files = do
- bh' <- openBinMem (1024 * 1024)
- bh <- addBinNameWriter bh'
foreign_contents <- readObjectFiles foreign_files
- putWithUserData QuietBinIFace NormalCompression bh
- (modl, cbc, foreign_contents)
- withBinBuffer bh (pure . fingerprintByteString)
+ pure $ computeFingerprint2 putNameLiterally (modl, cbc, foreign_contents)
instance Binary CompiledByteCode where
get bh = do
@@ -397,8 +395,30 @@ putViaBinName :: WriteBinHandle -> Name -> IO ()
putViaBinName bh nm = case findUserDataWriter Proxy bh of
BinaryWriter f -> f bh $ BinName nm
+data BytecodeNameEnv = ByteCodeNameEnv { _bytecode_next_id :: !Word64
+ , _bytecode_name_subst :: NameEnv Word64
+ }
+
+
+computeFingerprint2 :: (Binary a)
+ => (WriteBinHandle -> Name -> IO ())
+ -> a
+ -> Fingerprint
+computeFingerprint2 put_nonbinding_name a = unsafePerformIO $ do
+ bh <- fmap set_user_data $ openBinMem (3*1024) -- just less than a block
+ bh' <- addBinNameWriter bh
+ put_ bh' a
+ fingerprintBinMem bh'
+ where
+ set_user_data bh = setWriterUserData bh $ mkWriterUserData
+ [ mkSomeBinaryWriter $ mkWriter put_nonbinding_name
+ , mkSomeBinaryWriter $ simpleBindingNameWriter $ mkWriter putNameLiterally
+ , mkSomeBinaryWriter $ mkWriter putFS
+ ]
+
addBinNameWriter :: WriteBinHandle -> IO WriteBinHandle
-addBinNameWriter bh' =
+addBinNameWriter bh' = do
+ env_ref <- newIORef (ByteCodeNameEnv 0 emptyNameEnv)
evaluate
$ flip addWriterToUserData bh'
$ BinaryWriter
@@ -409,10 +429,17 @@ addBinNameWriter bh' =
put_ bh nm
| otherwise -> do
putByte bh 1
- put_ bh
- $ occNameFS (occName nm)
- `appendFS` mkFastString
- (show $ nameUnique nm)
+ key <- getBinNameKey env_ref nm
+ -- Delimit the OccName from the deterministic counter to keep the
+ -- encoding injective, avoiding collisions like "foo1" vs "foo#1".
+ put_ bh (occNameFS (occName nm) `appendFS` mkFastString ('#' : show key))
+ where
+ -- Find a deterministic key for local names. This
+ getBinNameKey ref name = do
+ atomicModifyIORef ref (\b@(ByteCodeNameEnv next subst) ->
+ case lookupNameEnv subst name of
+ Just idx -> (b, idx)
+ Nothing -> (ByteCodeNameEnv (next + 1) (extendNameEnv subst name next), next))
addBinNameReader :: HscEnv -> ReadBinHandle -> IO ReadBinHandle
addBinNameReader HscEnv {..} bh' = do
@@ -438,9 +465,6 @@ addBinNameReader HscEnv {..} bh' = do
-- Note [Serializing Names in bytecode]
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--- NOTE: This approach means that bytecode objects are not deterministic.
--- We need to revisit this in order to make the output deterministic.
---
-- The bytecode related types contain various Names which we need to
-- serialize. Unfortunately, we can't directly use the Binary instance
-- of Name: it is only meant to be used for serializing external Names
@@ -448,9 +472,8 @@ addBinNameReader HscEnv {..} bh' = do
--
-- We also need to maintain the invariant that: any pair of internal
-- Names with equal/different uniques must also be deserialized to
--- have the same equality. So normally uniques aren't supposed to be
--- serialized, but for this invariant to work, we do append uniques to
--- OccNames of internal Names, so that they can be uniquely identified
--- by OccName alone. When deserializing, we check a global cached
--- mapping from OccName to Unique, and create the real Name with the
--- right Unique if it's already deserialized at least once.
+-- have the same equality. Therefore when we write the names to the interface, we
+-- use an incrementing counter to give each local name it's own unique number. A substitution
+-- is maintained to give each occurence of the Name the same unique key. When the interface
+-- is read, a reverse mapping is used from these unique keys to a Name.
+--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/fbe69319e44e9dbdaef8a68c50de1f…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/fbe69319e44e9dbdaef8a68c50de1f…
You're receiving this email because of your account on gitlab.haskell.org.
1
0
[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 6 commits: haddock: use snippets for all list examples
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:
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
- - - - -
afdf9c60 by fendor at 2026-02-19T07:17:51-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.
- - - - -
0ebcc7d6 by Simon Hengel at 2026-02-19T07:17:52-05:00
docs: Fix grammar in explicit_namespaces.rst
- - - - -
77 changed files:
- compiler/GHC/Linker/Dynamic.hs
- docs/users_guide/exts/explicit_namespaces.rst
- libraries/base/src/Data/Bool.hs
- libraries/base/src/Data/List.hs
- libraries/base/src/Data/List/NubOrdSet.hs
- libraries/base/src/GHC/Exts.hs
- libraries/ghc-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/ghc-internal.cabal.in
- − libraries/ghc-internal/src/GHC/Internal/Data/Bool.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Foldable.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Function.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Type/Bool.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Type/Ord.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Version.hs
- libraries/ghc-internal/src/GHC/Internal/IO/FD.hs
- libraries/ghc-internal/src/GHC/Internal/JS/Prim.hs
- libraries/ghc-internal/src/GHC/Internal/Stack/Annotation.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/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
- 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/9d45aeb1b0f9151ba146c0e39c1bf7…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/9d45aeb1b0f9151ba146c0e39c1bf7…
You're receiving this email because of your account on gitlab.haskell.org.
1
0
[Git][ghc/ghc][wip/T26875] ghc-internal: avoid depending on GHC.Internal.Control.Monad.Fix
by Teo Camarasu (@teo) 19 Feb '26
by Teo Camarasu (@teo) 19 Feb '26
19 Feb '26
Teo Camarasu pushed to branch wip/T26875 at Glasgow Haskell Compiler / GHC
Commits:
af32ff38 by Teo Camarasu at 2026-02-19T10:32:42+00:00
ghc-internal: avoid depending on GHC.Internal.Control.Monad.Fix
This module contains the definition of MonadFix, since we want an
instance for IO, that instance requires a lot of machinery and we want
to avoid an orphan instance, this will naturally be quite high up in the
dependency graph.
So we want to avoid other modules depending on it as far as possible.
Resolves #26875
We get some metric increases on Windows, but get mild improvements
everywhere else.
Metric Increase:
T10858
T13056
- - - - -
14 changed files:
- libraries/base/src/System/IO.hs
- libraries/ghc-internal/src/GHC/Internal/Control/Monad/Fix.hs
- libraries/ghc-internal/src/GHC/Internal/Control/Monad/ST/Lazy/Imp.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Functor/Identity.hs
- libraries/ghc-internal/src/GHC/Internal/System/IO.hs
- libraries/ghc-internal/src/GHC/Internal/TH/Monad.hs
- testsuite/tests/ghci/scripts/ListTuplePunsPpr.stdout
- testsuite/tests/ghci/scripts/T4175.stdout
- testsuite/tests/interface-stability/base-exports.stdout
- testsuite/tests/interface-stability/base-exports.stdout-javascript-unknown-ghcjs
- testsuite/tests/interface-stability/base-exports.stdout-mingw32
- testsuite/tests/interface-stability/base-exports.stdout-ws-32
- testsuite/tests/interface-stability/template-haskell-exports.stdout
- testsuite/tests/mdo/should_fail/mdofail006.stderr
Changes:
=====================================
libraries/base/src/System/IO.hs
=====================================
@@ -185,6 +185,7 @@ module System.IO
) where
import GHC.Internal.System.IO
+import GHC.Internal.Control.Monad.Fix (fixIO)
-- $locking
-- Implementations should enforce as far as possible, at least locally to the
=====================================
libraries/ghc-internal/src/GHC/Internal/Control/Monad/Fix.hs
=====================================
@@ -24,7 +24,8 @@
module GHC.Internal.Control.Monad.Fix (
MonadFix(mfix),
- fix
+ fix,
+ fixIO,
) where
import GHC.Internal.Data.Either
@@ -35,11 +36,17 @@ import GHC.Internal.Data.Monoid ( Monoid, Dual(..), Sum(..), Product(..)
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.Base ( IO, Monad, errorWithoutStackTrace, (.), return, liftM )
import GHC.Internal.Generics
import GHC.Internal.List ( head, drop )
import GHC.Internal.Control.Monad.ST.Imp
-import GHC.Internal.System.IO
+import qualified GHC.Internal.Control.Monad.ST.Lazy.Imp as Lazy
+import GHC.Internal.Data.Functor.Identity (Identity(..))
+import GHC.Internal.MVar
+import GHC.Internal.IO.Unsafe
+import GHC.Internal.IO.Exception
+import GHC.Internal.TH.Monad
+import GHC.Internal.Control.Exception
-- | Monads having fixed points with a \'knot-tying\' semantics.
-- Instances of 'MonadFix' should satisfy the following laws:
@@ -102,6 +109,86 @@ instance MonadFix NonEmpty where
instance MonadFix IO where
mfix = fixIO
+-- ---------------------------------------------------------------------------
+-- fixIO
+
+-- | The implementation of 'Control.Monad.Fix.mfix' for 'IO'.
+--
+-- This operation may fail with:
+--
+-- * 'FixIOException' if the function passed to 'fixIO' inspects its argument.
+--
+-- ==== __Examples__
+--
+-- the IO-action is only executed once. The recursion is only on the values.
+--
+-- >>> take 3 <$> fixIO (\x -> putStr ":D" >> (:x) <$> readLn @Int)
+-- :D
+-- 2
+-- [2,2,2]
+--
+-- If we are strict in the value, just as with 'Data.Function.fix', we do not get termination:
+--
+-- >>> fixIO (\x -> putStr x >> pure ('x' : x))
+-- * hangs forever *
+--
+-- We can tie the knot of a structure within 'IO' using 'fixIO':
+--
+-- @
+-- data Node = MkNode Int (IORef Node)
+--
+-- foo :: IO ()
+-- foo = do
+-- p \<- fixIO (\p -> newIORef (MkNode 0 p))
+-- q <- output p
+-- r <- output q
+-- _ <- output r
+-- pure ()
+--
+-- output :: IORef Node -> IO (IORef Node)
+-- output ref = do
+-- MkNode x p <- readIORef ref
+-- print x
+-- pure p
+-- @
+--
+-- >>> foo
+-- 0
+-- 0
+-- 0
+fixIO :: (a -> IO a) -> IO a
+fixIO k = do
+ m <- newEmptyMVar
+ ans <- unsafeDupableInterleaveIO
+ (readMVar m `catch` \BlockedIndefinitelyOnMVar ->
+ throwIO FixIOException)
+ result <- k ans
+ putMVar m result
+ return result
+
+-- Note [Blackholing in fixIO]
+-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+-- We do our own explicit black holing here, because GHC's lazy
+-- blackholing isn't enough. In an infinite loop, GHC may run the IO
+-- computation a few times before it notices the loop, which is wrong.
+--
+-- NOTE2: the explicit black-holing with an IORef ran into trouble
+-- with multiple threads (see #5421), so now we use an MVar. We used
+-- to use takeMVar with unsafeInterleaveIO. This, however, uses noDuplicate#,
+-- which is not particularly cheap. Better to use readMVar, which can be
+-- performed in multiple threads safely, and to use unsafeDupableInterleaveIO
+-- to avoid the noDuplicate cost.
+--
+-- What we'd ideally want is probably an IVar, but we don't quite have those.
+-- STM TVars look like an option at first, but I don't think they are:
+-- we'd need to be able to write to the variable in an IO context, which can
+-- only be done using 'atomically', and 'atomically' is not allowed within
+-- unsafePerformIO. We can't know if someone will try to use the result
+-- of fixIO with unsafePerformIO!
+--
+-- See also System.IO.Unsafe.unsafeFixIO.
+--
+
-- | @since base-2.01
instance MonadFix ((->) r) where
mfix f = \ r -> let a = f a r in a
@@ -116,6 +203,10 @@ instance MonadFix (Either e) where
instance MonadFix (ST s) where
mfix = fixST
+-- | @since base-2.01
+instance MonadFix (Lazy.ST s) where
+ mfix = Lazy.fixST
+
-- Instances of Data.Monoid wrappers
-- | @since base-4.8.0.0
@@ -171,3 +262,24 @@ instance (MonadFix f, MonadFix g) => MonadFix (f :*: g) where
-- | @since base-4.12.0.0
instance MonadFix Down where
mfix f = Down (fix (getDown . f))
+
+
+-- | @since base-4.8.0.0
+instance MonadFix Identity where
+ mfix f = Identity (fix (runIdentity . f))
+
+-- | If the function passed to 'mfix' inspects its argument,
+-- the resulting action will throw a 'FixIOException'.
+--
+-- @since 2.17.0.0
+instance MonadFix Q where
+ -- We use the same blackholing approach as in fixIO.
+ -- See Note [Blackholing in fixIO].
+ mfix k = do
+ m <- runIO newEmptyMVar
+ ans <- runIO (unsafeDupableInterleaveIO
+ (readMVar m `catch` \BlockedIndefinitelyOnMVar ->
+ throwIO FixIOException))
+ result <- k ans
+ runIO (putMVar m result)
+ return result
=====================================
libraries/ghc-internal/src/GHC/Internal/Control/Monad/ST/Lazy/Imp.hs
=====================================
@@ -37,7 +37,6 @@ module GHC.Internal.Control.Monad.ST.Lazy.Imp (
unsafeIOToST
) where
-import GHC.Internal.Control.Monad.Fix
import GHC.Internal.Data.Tuple
import qualified GHC.Internal.Control.Monad.ST.Imp as ST
@@ -210,10 +209,6 @@ fixST m = ST (\ s ->
-- itself is demanded directly in the `let` body. See also
-- Note [Lazy ST: not producing lazy pairs].
--- | @since base-2.01
-instance MonadFix (ST s) where
- mfix = fixST
-
-- | @since base-4.23.0.0
instance Semigroup a => Semigroup (ST s a) where
(<>) = liftA2 (<>)
=====================================
libraries/ghc-internal/src/GHC/Internal/Data/Functor/Identity.hs
=====================================
@@ -33,7 +33,6 @@ module GHC.Internal.Data.Functor.Identity (
Identity(..),
) where
-import GHC.Internal.Control.Monad.Fix
import GHC.Internal.Data.Bits (Bits, FiniteBits)
import GHC.Internal.Data.Coerce
import GHC.Internal.Data.Foldable
@@ -143,7 +142,3 @@ instance Applicative Identity where
-- | @since base-4.8.0.0
instance Monad Identity where
m >>= k = k (runIdentity m)
-
--- | @since base-4.8.0.0
-instance MonadFix Identity where
- mfix f = Identity (fix (runIdentity . f))
=====================================
libraries/ghc-internal/src/GHC/Internal/System/IO.hs
=====================================
@@ -20,7 +20,6 @@ module GHC.Internal.System.IO (
-- * The IO monad
IO,
- fixIO,
-- * Files and handles
@@ -258,7 +257,6 @@ import GHC.Internal.IO.Encoding
import GHC.Internal.Text.Read
import GHC.Internal.IO.StdHandles
import GHC.Internal.Show
-import GHC.Internal.MVar
-----------------------------------------------------------------------------
-- Standard IO
@@ -602,87 +600,6 @@ hReady h = hWaitForInput h 0
hPrint :: Show a => Handle -> a -> IO ()
hPrint hdl = hPutStrLn hdl . show
-
--- ---------------------------------------------------------------------------
--- fixIO
-
--- | The implementation of 'Control.Monad.Fix.mfix' for 'IO'.
---
--- This operation may fail with:
---
--- * 'FixIOException' if the function passed to 'fixIO' inspects its argument.
---
--- ==== __Examples__
---
--- the IO-action is only executed once. The recursion is only on the values.
---
--- >>> take 3 <$> fixIO (\x -> putStr ":D" >> (:x) <$> readLn @Int)
--- :D
--- 2
--- [2,2,2]
---
--- If we are strict in the value, just as with 'Data.Function.fix', we do not get termination:
---
--- >>> fixIO (\x -> putStr x >> pure ('x' : x))
--- * hangs forever *
---
--- We can tie the knot of a structure within 'IO' using 'fixIO':
---
--- @
--- data Node = MkNode Int (IORef Node)
---
--- foo :: IO ()
--- foo = do
--- p \<- fixIO (\p -> newIORef (MkNode 0 p))
--- q <- output p
--- r <- output q
--- _ <- output r
--- pure ()
---
--- output :: IORef Node -> IO (IORef Node)
--- output ref = do
--- MkNode x p <- readIORef ref
--- print x
--- pure p
--- @
---
--- >>> foo
--- 0
--- 0
--- 0
-fixIO :: (a -> IO a) -> IO a
-fixIO k = do
- m <- newEmptyMVar
- ans <- unsafeDupableInterleaveIO
- (readMVar m `catch` \BlockedIndefinitelyOnMVar ->
- throwIO FixIOException)
- result <- k ans
- putMVar m result
- return result
-
--- Note [Blackholing in fixIO]
--- ~~~~~~~~~~~~~~~~~~~~~~~~~~~
--- We do our own explicit black holing here, because GHC's lazy
--- blackholing isn't enough. In an infinite loop, GHC may run the IO
--- computation a few times before it notices the loop, which is wrong.
---
--- NOTE2: the explicit black-holing with an IORef ran into trouble
--- with multiple threads (see #5421), so now we use an MVar. We used
--- to use takeMVar with unsafeInterleaveIO. This, however, uses noDuplicate#,
--- which is not particularly cheap. Better to use readMVar, which can be
--- performed in multiple threads safely, and to use unsafeDupableInterleaveIO
--- to avoid the noDuplicate cost.
---
--- What we'd ideally want is probably an IVar, but we don't quite have those.
--- STM TVars look like an option at first, but I don't think they are:
--- we'd need to be able to write to the variable in an IO context, which can
--- only be done using 'atomically', and 'atomically' is not allowed within
--- unsafePerformIO. We can't know if someone will try to use the result
--- of fixIO with unsafePerformIO!
---
--- See also System.IO.Unsafe.unsafeFixIO.
---
-
-- | The function creates a temporary file in ReadWrite mode.
-- The created file isn\'t deleted automatically, so you need to delete it manually.
--
=====================================
libraries/ghc-internal/src/GHC/Internal/TH/Monad.hs
=====================================
@@ -28,13 +28,8 @@ import Data.Data hiding (Fixity(..))
import Data.IORef
import System.IO.Unsafe ( unsafePerformIO )
import Control.Monad.IO.Class (MonadIO (..))
-import Control.Monad.Fix (MonadFix (..))
-import Control.Exception (BlockedIndefinitelyOnMVar (..), catch, throwIO)
-import Control.Exception.Base (FixIOException (..))
-import Control.Concurrent.MVar (newEmptyMVar, readMVar, putMVar)
import System.IO ( hPutStrLn, stderr )
import qualified Data.Kind as Kind (Type)
-import GHC.IO.Unsafe ( unsafeDupableInterleaveIO )
import GHC.Types (TYPE, RuntimeRep(..))
#else
import GHC.Internal.Base hiding (NonEmpty(..),Type, Module, sequence)
@@ -46,12 +41,8 @@ import GHC.Internal.Data.Foldable
import GHC.Internal.Data.Typeable
import GHC.Internal.Control.Monad.IO.Class
import GHC.Internal.Control.Monad.Fail
-import GHC.Internal.Control.Monad.Fix
-import GHC.Internal.Control.Exception
import GHC.Internal.Num
import GHC.Internal.IO.Unsafe
-import GHC.Internal.MVar
-import GHC.Internal.IO.Exception
import qualified GHC.Internal.Types as Kind (Type)
#endif
import GHC.Internal.ForeignSrcLang
@@ -258,22 +249,6 @@ instance Semigroup a => Semigroup (Q a) where
instance Monoid a => Monoid (Q a) where
mempty = pure mempty
--- | If the function passed to 'mfix' inspects its argument,
--- the resulting action will throw a 'FixIOException'.
---
--- @since 2.17.0.0
-instance MonadFix Q where
- -- We use the same blackholing approach as in fixIO.
- -- See Note [Blackholing in fixIO] in System.IO in base.
- mfix k = do
- m <- runIO newEmptyMVar
- ans <- runIO (unsafeDupableInterleaveIO
- (readMVar m `catch` \BlockedIndefinitelyOnMVar ->
- throwIO FixIOException))
- result <- k ans
- runIO (putMVar m result)
- return result
-
-----------------------------------------------------
--
=====================================
testsuite/tests/ghci/scripts/ListTuplePunsPpr.stdout
=====================================
@@ -41,10 +41,10 @@ data Tuple2 a b = (,) a b
-- Defined in ‘GHC.Internal.Tuple’
instance Traversable (Tuple2 a)
-- Defined in ‘GHC.Internal.Data.Traversable’
-instance Foldable (Tuple2 a)
- -- Defined in ‘GHC.Internal.Data.Foldable’
instance Monoid a => Applicative (Tuple2 a)
-- Defined in ‘GHC.Internal.Base’
+instance Foldable (Tuple2 a)
+ -- Defined in ‘GHC.Internal.Data.Foldable’
instance Functor (Tuple2 a) -- Defined in ‘GHC.Internal.Base’
instance Monoid a => Monad (Tuple2 a)
-- Defined in ‘GHC.Internal.Base’
=====================================
testsuite/tests/ghci/scripts/T4175.stdout
=====================================
@@ -44,8 +44,8 @@ instance Traversable Maybe
-- Defined in ‘GHC.Internal.Data.Traversable’
instance MonadFail Maybe
-- Defined in ‘GHC.Internal.Control.Monad.Fail’
-instance Foldable Maybe -- Defined in ‘GHC.Internal.Data.Foldable’
instance Applicative Maybe -- Defined in ‘GHC.Internal.Base’
+instance Foldable Maybe -- Defined in ‘GHC.Internal.Data.Foldable’
instance Functor Maybe -- Defined in ‘GHC.Internal.Base’
instance Monad Maybe -- Defined in ‘GHC.Internal.Base’
instance Semigroup a => Monoid (Maybe a)
=====================================
testsuite/tests/interface-stability/base-exports.stdout
=====================================
@@ -11553,6 +11553,7 @@ instance forall e. GHC.Internal.Control.Monad.Fix.MonadFix (GHC.Internal.Data.Ei
instance forall r. GHC.Internal.Control.Monad.Fix.MonadFix ((->) r) -- Defined in ‘GHC.Internal.Control.Monad.Fix’
instance GHC.Internal.Control.Monad.Fix.MonadFix GHC.Internal.Data.Monoid.First -- Defined in ‘GHC.Internal.Control.Monad.Fix’
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.Functor.Identity.Identity -- 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’
@@ -11560,14 +11561,14 @@ instance GHC.Internal.Control.Monad.Fix.MonadFix GHC.Internal.Maybe.Maybe -- Def
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 GHC.Internal.Control.Monad.Fix.MonadFix GHC.Internal.TH.Monad.Q -- 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.Control.Monad.ST.Lazy.Imp.ST s) -- 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’
instance forall a. GHC.Internal.Base.Monoid a => GHC.Internal.Control.Monad.Fix.MonadFix ((,) a) -- Defined in ‘GHC.Internal.Control.Monad.Fix’
-instance forall s. GHC.Internal.Control.Monad.Fix.MonadFix (GHC.Internal.Control.Monad.ST.Lazy.Imp.ST s) -- Defined in ‘GHC.Internal.Control.Monad.ST.Lazy.Imp’
instance GHC.Internal.Control.Monad.Fix.MonadFix Data.Complex.Complex -- Defined in ‘Data.Complex’
-instance GHC.Internal.Control.Monad.Fix.MonadFix GHC.Internal.Data.Functor.Identity.Identity -- Defined in ‘GHC.Internal.Data.Functor.Identity’
instance [safe] forall (f :: * -> *) (g :: * -> *). (GHC.Internal.Control.Monad.Fix.MonadFix f, GHC.Internal.Control.Monad.Fix.MonadFix g) => GHC.Internal.Control.Monad.Fix.MonadFix (Data.Functor.Product.Product f g) -- Defined in ‘Data.Functor.Product’
instance GHC.Internal.Control.Monad.Fix.MonadFix Data.Semigroup.First -- Defined in ‘Data.Semigroup’
instance GHC.Internal.Control.Monad.Fix.MonadFix Data.Semigroup.Last -- Defined in ‘Data.Semigroup’
=====================================
testsuite/tests/interface-stability/base-exports.stdout-javascript-unknown-ghcjs
=====================================
@@ -11580,6 +11580,7 @@ instance forall e. GHC.Internal.Control.Monad.Fix.MonadFix (GHC.Internal.Data.Ei
instance forall r. GHC.Internal.Control.Monad.Fix.MonadFix ((->) r) -- Defined in ‘GHC.Internal.Control.Monad.Fix’
instance GHC.Internal.Control.Monad.Fix.MonadFix GHC.Internal.Data.Monoid.First -- Defined in ‘GHC.Internal.Control.Monad.Fix’
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.Functor.Identity.Identity -- 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’
@@ -11587,14 +11588,14 @@ instance GHC.Internal.Control.Monad.Fix.MonadFix GHC.Internal.Maybe.Maybe -- Def
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 GHC.Internal.Control.Monad.Fix.MonadFix GHC.Internal.TH.Monad.Q -- 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.Control.Monad.ST.Lazy.Imp.ST s) -- 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’
instance forall a. GHC.Internal.Base.Monoid a => GHC.Internal.Control.Monad.Fix.MonadFix ((,) a) -- Defined in ‘GHC.Internal.Control.Monad.Fix’
-instance forall s. GHC.Internal.Control.Monad.Fix.MonadFix (GHC.Internal.Control.Monad.ST.Lazy.Imp.ST s) -- Defined in ‘GHC.Internal.Control.Monad.ST.Lazy.Imp’
instance GHC.Internal.Control.Monad.Fix.MonadFix Data.Complex.Complex -- Defined in ‘Data.Complex’
-instance GHC.Internal.Control.Monad.Fix.MonadFix GHC.Internal.Data.Functor.Identity.Identity -- Defined in ‘GHC.Internal.Data.Functor.Identity’
instance [safe] forall (f :: * -> *) (g :: * -> *). (GHC.Internal.Control.Monad.Fix.MonadFix f, GHC.Internal.Control.Monad.Fix.MonadFix g) => GHC.Internal.Control.Monad.Fix.MonadFix (Data.Functor.Product.Product f g) -- Defined in ‘Data.Functor.Product’
instance GHC.Internal.Control.Monad.Fix.MonadFix Data.Semigroup.First -- Defined in ‘Data.Semigroup’
instance GHC.Internal.Control.Monad.Fix.MonadFix Data.Semigroup.Last -- Defined in ‘Data.Semigroup’
=====================================
testsuite/tests/interface-stability/base-exports.stdout-mingw32
=====================================
@@ -11811,6 +11811,7 @@ instance forall e. GHC.Internal.Control.Monad.Fix.MonadFix (GHC.Internal.Data.Ei
instance forall r. GHC.Internal.Control.Monad.Fix.MonadFix ((->) r) -- Defined in ‘GHC.Internal.Control.Monad.Fix’
instance GHC.Internal.Control.Monad.Fix.MonadFix GHC.Internal.Data.Monoid.First -- Defined in ‘GHC.Internal.Control.Monad.Fix’
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.Functor.Identity.Identity -- 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’
@@ -11818,14 +11819,14 @@ instance GHC.Internal.Control.Monad.Fix.MonadFix GHC.Internal.Maybe.Maybe -- Def
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 GHC.Internal.Control.Monad.Fix.MonadFix GHC.Internal.TH.Monad.Q -- 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.Control.Monad.ST.Lazy.Imp.ST s) -- 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’
instance forall a. GHC.Internal.Base.Monoid a => GHC.Internal.Control.Monad.Fix.MonadFix ((,) a) -- Defined in ‘GHC.Internal.Control.Monad.Fix’
-instance forall s. GHC.Internal.Control.Monad.Fix.MonadFix (GHC.Internal.Control.Monad.ST.Lazy.Imp.ST s) -- Defined in ‘GHC.Internal.Control.Monad.ST.Lazy.Imp’
instance GHC.Internal.Control.Monad.Fix.MonadFix Data.Complex.Complex -- Defined in ‘Data.Complex’
-instance GHC.Internal.Control.Monad.Fix.MonadFix GHC.Internal.Data.Functor.Identity.Identity -- Defined in ‘GHC.Internal.Data.Functor.Identity’
instance [safe] forall (f :: * -> *) (g :: * -> *). (GHC.Internal.Control.Monad.Fix.MonadFix f, GHC.Internal.Control.Monad.Fix.MonadFix g) => GHC.Internal.Control.Monad.Fix.MonadFix (Data.Functor.Product.Product f g) -- Defined in ‘Data.Functor.Product’
instance GHC.Internal.Control.Monad.Fix.MonadFix Data.Semigroup.First -- Defined in ‘Data.Semigroup’
instance GHC.Internal.Control.Monad.Fix.MonadFix Data.Semigroup.Last -- Defined in ‘Data.Semigroup’
=====================================
testsuite/tests/interface-stability/base-exports.stdout-ws-32
=====================================
@@ -11553,6 +11553,7 @@ instance forall e. GHC.Internal.Control.Monad.Fix.MonadFix (GHC.Internal.Data.Ei
instance forall r. GHC.Internal.Control.Monad.Fix.MonadFix ((->) r) -- Defined in ‘GHC.Internal.Control.Monad.Fix’
instance GHC.Internal.Control.Monad.Fix.MonadFix GHC.Internal.Data.Monoid.First -- Defined in ‘GHC.Internal.Control.Monad.Fix’
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.Functor.Identity.Identity -- 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’
@@ -11560,14 +11561,14 @@ instance GHC.Internal.Control.Monad.Fix.MonadFix GHC.Internal.Maybe.Maybe -- Def
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 GHC.Internal.Control.Monad.Fix.MonadFix GHC.Internal.TH.Monad.Q -- 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.Control.Monad.ST.Lazy.Imp.ST s) -- 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’
instance forall a. GHC.Internal.Base.Monoid a => GHC.Internal.Control.Monad.Fix.MonadFix ((,) a) -- Defined in ‘GHC.Internal.Control.Monad.Fix’
-instance forall s. GHC.Internal.Control.Monad.Fix.MonadFix (GHC.Internal.Control.Monad.ST.Lazy.Imp.ST s) -- Defined in ‘GHC.Internal.Control.Monad.ST.Lazy.Imp’
instance GHC.Internal.Control.Monad.Fix.MonadFix Data.Complex.Complex -- Defined in ‘Data.Complex’
-instance GHC.Internal.Control.Monad.Fix.MonadFix GHC.Internal.Data.Functor.Identity.Identity -- Defined in ‘GHC.Internal.Data.Functor.Identity’
instance [safe] forall (f :: * -> *) (g :: * -> *). (GHC.Internal.Control.Monad.Fix.MonadFix f, GHC.Internal.Control.Monad.Fix.MonadFix g) => GHC.Internal.Control.Monad.Fix.MonadFix (Data.Functor.Product.Product f g) -- Defined in ‘Data.Functor.Product’
instance GHC.Internal.Control.Monad.Fix.MonadFix Data.Semigroup.First -- Defined in ‘Data.Semigroup’
instance GHC.Internal.Control.Monad.Fix.MonadFix Data.Semigroup.Last -- Defined in ‘Data.Semigroup’
=====================================
testsuite/tests/interface-stability/template-haskell-exports.stdout
=====================================
@@ -2052,7 +2052,6 @@ instance GHC.Internal.Classes.Ord GHC.Internal.TH.Syntax.Type -- Defined in ‘G
instance GHC.Internal.Classes.Ord GHC.Internal.TH.Syntax.TypeFamilyHead -- Defined in ‘GHC.Internal.TH.Syntax’
instance GHC.Internal.Classes.Ord GHC.Internal.LanguageExtensions.Extension -- Defined in ‘GHC.Internal.LanguageExtensions’
instance GHC.Internal.Control.Monad.Fail.MonadFail GHC.Internal.TH.Monad.Q -- Defined in ‘GHC.Internal.TH.Monad’
-instance GHC.Internal.Control.Monad.Fix.MonadFix GHC.Internal.TH.Monad.Q -- Defined in ‘GHC.Internal.TH.Monad’
instance GHC.Internal.Control.Monad.IO.Class.MonadIO GHC.Internal.TH.Monad.Q -- Defined in ‘GHC.Internal.TH.Monad’
instance GHC.Internal.Data.Foldable.Foldable GHC.Internal.TH.Syntax.TyVarBndr -- Defined in ‘GHC.Internal.TH.Syntax’
instance GHC.Internal.Data.Traversable.Traversable GHC.Internal.TH.Syntax.TyVarBndr -- Defined in ‘GHC.Internal.TH.Syntax’
=====================================
testsuite/tests/mdo/should_fail/mdofail006.stderr
=====================================
@@ -5,5 +5,5 @@ cyclic evaluation in fixIO
While handling thread blocked indefinitely in an MVar operation
HasCallStack backtrace:
- throwIO, called at libraries/ghc-internal/src/GHC/Internal/System/IO.hs:641:37 in ghc-internal:GHC.Internal.System.IO
+ throwIO, called at libraries/ghc-internal/src/GHC/Internal/Control/Monad/Fix.hs:167:37 in ghc-internal:GHC.Internal.Control.Monad.Fix
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/af32ff389ca3280bfa62cebf399b98c…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/af32ff389ca3280bfa62cebf399b98c…
You're receiving this email because of your account on gitlab.haskell.org.
1
0