[Git][ghc/ghc][wip/T26258] In TcSShortCut, typechecker plugins should get empty Givens
by sheaf (@sheaf) 07 Aug '25
by sheaf (@sheaf) 07 Aug '25
07 Aug '25
sheaf pushed to branch wip/T26258 at Glasgow Haskell Compiler / GHC
Commits:
de2cf17c by Simon Peyton Jones at 2025-08-07T10:37:52+02:00
In TcSShortCut, typechecker plugins should get empty Givens
Solving in TcShortCut mode means /ignoring the Givens/. So we
should not pass them to typechecker plugins!
Fixes #26258.
This is a fixup to the earlier MR:
commit 1bd12371feacc52394a0e660ef9349f9e8ee1c06
Author: Simon Peyton Jones <simon.peytonjones(a)gmail.com>
Date: Mon Jul 21 10:04:49 2025 +0100
Improve treatment of SPECIALISE pragmas -- again!
- - - - -
3 changed files:
- compiler/GHC/Tc/Solver/Dict.hs
- compiler/GHC/Tc/Solver/Monad.hs
- compiler/GHC/Tc/Solver/Solve.hs
Changes:
=====================================
compiler/GHC/Tc/Solver/Dict.hs
=====================================
@@ -496,11 +496,15 @@ We could use the Eq [a] superclass of the Ord [a], or we could use the top-level
instance `Eq a => Eq [a]`. But if we did the latter we'd be stuck with an
insoluble constraint (Eq a).
-So the ShortCutSolving rule is this:
+-----------------------------------
+So the ShortCutSolving plan is this:
If we could solve a constraint from a local Given,
- try first to /completely/ solve the constraint using only top-level instances.
+ try first to /completely/ solve the constraint
+ using only top-level instances,
+ /without/ using any local Givens.
- If that succeeds, use it
- If not, use the local Given
+-----------------------------------
An example that succeeds:
@@ -555,7 +559,7 @@ The moving parts are relatively simple:
- `matchLocalInst`, which would otherwise consult Given quantified constraints
- `GHC.Tc.Solver.Instance.Class.matchInstEnv`: when short-cut solving, don't
pick overlappable top-level instances
-
+ - `GHC.Tc.Solver.Solve.runTcPluginsWanted`: don't pass any Givens to the plugin
Some wrinkles:
=====================================
compiler/GHC/Tc/Solver/Monad.hs
=====================================
@@ -897,7 +897,9 @@ for it, so TcS carries a mutable location where the binding can be
added. This is initialised from the innermost implication constraint.
-}
--- | See Note [TcSMode]
+-- | The mode for the constraint solving monad.
+--
+-- See Note [TcSMode], where each constructor is documented
data TcSMode
= TcSVanilla -- ^ Normal constraint solving
| TcSPMCheck -- ^ Used when doing patterm match overlap checks
@@ -905,6 +907,12 @@ data TcSMode
| TcSShortCut -- ^ Fully solve all constraints, without using local Givens
deriving (Eq)
+instance Outputable TcSMode where
+ ppr TcSVanilla = text "TcSVanilla"
+ ppr TcSPMCheck = text "TcSPMCheck"
+ ppr TcSEarlyAbort = text "TcSEarlyAbort"
+ ppr TcSShortCut = text "TcSShortcut"
+
{- Note [TcSMode]
~~~~~~~~~~~~~~~~~
The constraint solver can operate in different modes:
=====================================
compiler/GHC/Tc/Solver/Solve.hs
=====================================
@@ -1011,9 +1011,17 @@ solveSimpleGivens givens
solveSimpleWanteds :: Cts -> TcS Cts
-- The result is not necessarily zonked
solveSimpleWanteds simples
- = do { traceTcS "solveSimpleWanteds {" (ppr simples)
+ = do { mode <- getTcSMode
; dflags <- getDynFlags
+ ; inerts <- getInertSet
+
+ ; traceTcS "solveSimpleWanteds {" $
+ vcat [ text "Mode:" <+> ppr mode
+ , text "Inerts:" <+> ppr inerts
+ , text "Wanteds to solve:" <+> ppr simples ]
+
; (n,wc) <- go 1 (solverIterations dflags) simples
+
; traceTcS "solveSimpleWanteds end }" $
vcat [ text "iterations =" <+> ppr n
, text "residual =" <+> ppr wc ]
@@ -1663,19 +1671,28 @@ runTcPluginsGiven
-- 'solveSimpleWanteds' should feed the updated wanteds back into the
-- main solver.
runTcPluginsWanted :: Cts -> TcS (Bool, Cts)
-runTcPluginsWanted simples1
- | isEmptyBag simples1
- = return (False, simples1)
+runTcPluginsWanted wanted
+ | isEmptyBag wanted
+ = return (False, wanted)
| otherwise
= do { solvers <- getTcPluginSolvers
- ; if null solvers then return (False, simples1) else
-
- do { given <- getInertGivens
- ; wanted <- TcS.zonkSimples simples1 -- Plugin requires zonked inputs
-
- ; traceTcS "Running plugins (" (vcat [ text "Given:" <+> ppr given
- , text "Wanted:" <+> ppr wanted ])
- ; p <- runTcPluginSolvers solvers (given, bagToList wanted)
+ ; if null solvers then return (False, wanted) else
+
+ do { -- Find the set of Givens to give to the plugin.
+ -- If TcSMode = TcSShortCut, we are solving with
+ -- no Givens so don't return any (#26258)!
+ -- See Note [Shortcut solving] in GHC.Tc.Solver.Dict
+ mode <- getTcSMode
+ ; given <- case mode of
+ TcSShortCut -> return []
+ _ -> getInertGivens
+
+ -- Plugin requires zonked input wanteds
+ ; zonked_wanted <- TcS.zonkSimples wanted
+
+ ; traceTcS "Running plugins {" (vcat [ text "Given:" <+> ppr given
+ , text "Wanted:" <+> ppr zonked_wanted ])
+ ; p <- runTcPluginSolvers solvers (given, bagToList zonked_wanted)
; let (_, solved_wanted) = pluginSolvedCts p
(_, unsolved_wanted) = pluginInputCts p
new_wanted = pluginNewCts p
@@ -1684,9 +1701,6 @@ runTcPluginsWanted simples1
listToBag unsolved_wanted `andCts`
listToBag insols
--- SLPJ: I'm deeply suspicious of this
--- ; updInertCans (removeInertCts $ solved_givens)
-
; mapM_ setEv solved_wanted
; traceTcS "Finished plugins }" (ppr new_wanted)
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/de2cf17c9fdbec9845338860c8a3cf9…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/de2cf17c9fdbec9845338860c8a3cf9…
You're receiving this email because of your account on gitlab.haskell.org.
1
0
[Git][ghc/ghc][wip/26249] testsuite: Be more permissive when filtering out GNU_PROPERTY_TYPE linker warnings
by Zubin (@wz1000) 07 Aug '25
by Zubin (@wz1000) 07 Aug '25
07 Aug '25
Zubin pushed to branch wip/26249 at Glasgow Haskell Compiler / GHC
Commits:
da64beed by Zubin Duggal at 2025-08-07T14:04:54+05:30
testsuite: Be more permissive when filtering out GNU_PROPERTY_TYPE linker warnings
The warning text is slightly different with ld.bfd.
Fixes #26219
- - - - -
1 changed file:
- testsuite/driver/testlib.py
Changes:
=====================================
testsuite/driver/testlib.py
=====================================
@@ -2988,7 +2988,7 @@ def normalise_errmsg(s: str) -> str:
# filter out unsupported GNU_PROPERTY_TYPE (5), which is emitted by LLVM10
# and not understood by older binutils (ar, ranlib, ...)
- s = modify_lines(s, lambda l: re.sub(r'^(.+)warning: (.+): unsupported GNU_PROPERTY_TYPE \(5\) type: 0xc000000(.*)$', '', l))
+ s = modify_lines(s, lambda l: re.sub(r'^(.+)warning: (.+): unsupported GNU_PROPERTY_TYPE (?:\(5\) )?type: 0xc000000(.*)$', '', l))
s = re.sub(r'ld: warning: passed .* min versions \(.*\) for platform macOS. Using [\.0-9]+.','',s)
s = re.sub('ld: warning: -sdk_version and -platform_version are not compatible, ignoring -sdk_version','',s)
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/da64beed5de26bbad529c31aa192a1a…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/da64beed5de26bbad529c31aa192a1a…
You're receiving this email because of your account on gitlab.haskell.org.
1
0
Zubin pushed new branch wip/26249 at Glasgow Haskell Compiler / GHC
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/26249
You're receiving this email because of your account on gitlab.haskell.org.
1
0
[Git][ghc/ghc][wip/fendor/backtraces-decoders] Expose Backtraces internals from ghc-experimental
by Hannes Siebenhandl (@fendor) 07 Aug '25
by Hannes Siebenhandl (@fendor) 07 Aug '25
07 Aug '25
Hannes Siebenhandl pushed to branch wip/fendor/backtraces-decoders at Glasgow Haskell Compiler / GHC
Commits:
348b6114 by fendor at 2025-08-07T09:37:03+02:00
Expose Backtraces internals from ghc-experimental
Additionally, expose the same API `base:Control.Exception.Backtrace`
to make it easier to use as a drop-in replacement.
- - - - -
1 changed file:
- libraries/ghc-experimental/src/GHC/Exception/Backtrace/Experimental.hs
Changes:
=====================================
libraries/ghc-experimental/src/GHC/Exception/Backtrace/Experimental.hs
=====================================
@@ -9,12 +9,20 @@ Portability : non-portable (GHC extensions)
This module exposes experimental extensions to the Backtrace mechanism of GHC.
-}
-module GHC.Exception.Backtrace.Experimental (
- -- * Collecting exception annotations (like backtraces)
- CollectExceptionAnnotationMechanism,
- getCollectExceptionAnnotationMechanism,
- setCollectExceptionAnnotation,
- collectExceptionAnnotation,
+module GHC.Exception.Backtrace.Experimental
+ ( -- * Backtrace mechanisms
+ BacktraceMechanism(..)
+ , getBacktraceMechanismState
+ , setBacktraceMechanismState
+ -- * Collecting backtraces
+ , Backtraces(..),
+ , displayBacktraces
+ , collectBacktraces
+ -- * Collecting exception annotations on throwing 'Exception's
+ , CollectExceptionAnnotationMechanism
+ , getCollectExceptionAnnotationMechanism
+ , setCollectExceptionAnnotation
+ , collectExceptionAnnotation
) where
import GHC.Internal.Exception.Backtrace
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/348b6114e17413cffba5be424acf248…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/348b6114e17413cffba5be424acf248…
You're receiving this email because of your account on gitlab.haskell.org.
1
0
[Git][ghc/ghc][wip/fendor/backtraces-decoders] 11 commits: compiler: Export a version of `newNameCache` that is not prone to footguns.
by Hannes Siebenhandl (@fendor) 07 Aug '25
by Hannes Siebenhandl (@fendor) 07 Aug '25
07 Aug '25
Hannes Siebenhandl pushed to branch wip/fendor/backtraces-decoders at Glasgow Haskell Compiler / GHC
Commits:
bcdec657 by Zubin Duggal at 2025-08-05T10:37:29+05:30
compiler: Export a version of `newNameCache` that is not prone to footguns.
`newNameCache` must be initialized with both a non-"reserved" unique tag, as well
as a list of known key names. Failing to do so results in hard to debug unique conflicts.
It is difficult for API users to tell which unique tags are safe to use. So instead of leaving
this up to the user to decide, we now export a version of `newNameCache` which uses a guaranteed
non-reserved unique tag. In fact, this is now the way the unique tag is initialized for all invocations
of the compiler.
The original version of `newNameCache` is now exported as `newNameCache'` for advanced users.
We also deprecate `initNameCache` as it is also prone to footguns and is completely subsumed in
functionality by `newNameCache` and `newNameCache'`.
Fixes #26135 and #26055
- - - - -
57d3b4a8 by Andrew Lelechenko at 2025-08-05T18:36:31-04:00
hadrian: bump Stackage snapshot to LTS 24.2 / GHC 9.10.2
In line with #25693 we should use GHC 9.10 as a boot compiler,
while Hadrian stack.yaml was stuck on GHC 9.6.
- - - - -
c2a78cea by Peng Fan at 2025-08-05T18:37:27-04:00
NCG/LA64: implement atomic write with finer-grained DBAR hints
Signed-off-by: Peng Fan <fanpeng(a)loongson.cn>
- - - - -
95231c8e by Teo Camarasu at 2025-08-06T08:35:58-04:00
CODEOWNERS: add CLC as codeowner of base
We also remove hvr, since I think he is no longer active
- - - - -
77df0ded by Andrew Lelechenko at 2025-08-06T08:36:39-04:00
Bump submodule text to 2.1.3
- - - - -
8af260d0 by Nikolaos Chatzikonstantinou at 2025-08-06T08:37:23-04:00
docs: fix internal import in getopt examples
This external-facing doc example shouldn't mention GHC internals when
using 'fromMaybe'.
- - - - -
69cc16ca by Marc Scholten at 2025-08-06T15:51:28-04:00
README: Add note on ghc.nix
- - - - -
93a2f450 by Daniel Díaz at 2025-08-06T15:52:14-04:00
Link to the "Strict Bindings" docs from the linear types docs
Strict Bidings are relevant for the kinds of multiplicity annotations
linear lets support.
- - - - -
1b245abe by fendor at 2025-08-07T09:10:37+02:00
Store `StackTrace` and `StackSnapshot` in `Backtraces`
Instead of decoding the stack traces when collecting the `Backtraces`,
defer this decoding until actually showing the `Backtraces`.
This allows users to customise how `Backtraces` are displayed by
using a custom implementation of `displayExceptionWithInfo`, overwriting
the default implementation for `Backtraces` (`displayBacktraces`).
- - - - -
097fe105 by fendor at 2025-08-07T09:10:37+02:00
Allow users to customise the collection of exception annotations
Add a global `CollectExceptionAnnotationMechanism` which determines how
`ExceptionAnnotation`s are collected upon throwing an `Exception`.
This API is exposed via `ghc-experimental`.
By overriding how we collect `Backtraces`, we can control how the
`Backtraces` are displayed to the user by newtyping `Backtraces` and
giving a different instance for `ExceptionAnnotation`.
A concrete use-case for this feature is allowing us to experiment with
alternative stack decoders, without having to modify `base`, which take
additional information from the stack frames.
This commit does not modify how `Backtraces` are currently
collected or displayed.
- - - - -
4c22cbdb by fendor at 2025-08-07T09:36:55+02:00
Expose Backtraces internals, as well as the API of `base.Control.Exception.Backtrace`
- - - - -
36 changed files:
- CODEOWNERS
- README.md
- compiler/GHC/CmmToAsm/LA64/CodeGen.hs
- compiler/GHC/Driver/Main.hs
- compiler/GHC/Types/Name/Cache.hs
- docs/users_guide/exts/linear_types.rst
- docs/users_guide/exts/strict.rst
- hadrian/stack.yaml
- hadrian/stack.yaml.lock
- libraries/base/src/System/Console/GetOpt.hs
- + libraries/ghc-experimental/src/GHC/Exception/Backtrace/Experimental.hs
- libraries/ghc-internal/src/GHC/Internal/Exception.hs
- libraries/ghc-internal/src/GHC/Internal/Exception/Backtrace.hs
- libraries/ghc-internal/src/GHC/Internal/Exception/Backtrace.hs-boot
- libraries/text
- testsuite/tests/arrows/should_compile/T21301.stderr
- testsuite/tests/deSugar/should_fail/DsStrictFail.stderr
- testsuite/tests/deSugar/should_run/T20024.stderr
- testsuite/tests/deSugar/should_run/dsrun005.stderr
- testsuite/tests/deSugar/should_run/dsrun007.stderr
- testsuite/tests/deSugar/should_run/dsrun008.stderr
- testsuite/tests/deriving/should_run/T9576.stderr
- testsuite/tests/ghci/scripts/Defer02.stderr
- testsuite/tests/ghci/scripts/T15325.stderr
- testsuite/tests/hiefile/should_run/TestUtils.hs
- testsuite/tests/patsyn/should_run/ghci.stderr
- testsuite/tests/quotes/LiftErrMsgDefer.stderr
- testsuite/tests/safeHaskell/safeLanguage/SafeLang15.stderr
- testsuite/tests/type-data/should_run/T22332a.stderr
- testsuite/tests/typecheck/should_run/T10284.stderr
- testsuite/tests/typecheck/should_run/T13838.stderr
- testsuite/tests/typecheck/should_run/T9497a-run.stderr
- testsuite/tests/typecheck/should_run/T9497b-run.stderr
- testsuite/tests/typecheck/should_run/T9497c-run.stderr
- testsuite/tests/unsatisfiable/T23816.stderr
- testsuite/tests/unsatisfiable/UnsatDefer.stderr
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/68d564d74328a3b7247b13a5532b77…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/68d564d74328a3b7247b13a5532b77…
You're receiving this email because of your account on gitlab.haskell.org.
1
0
[Git][ghc/ghc][wip/9.10.3-backports] Revert "base: Expose Backtraces constructor and fields"
by Zubin (@wz1000) 07 Aug '25
by Zubin (@wz1000) 07 Aug '25
07 Aug '25
Zubin pushed to branch wip/9.10.3-backports at Glasgow Haskell Compiler / GHC
Commits:
1b256e63 by Zubin Duggal at 2025-08-07T12:55:18+05:30
Revert "base: Expose Backtraces constructor and fields"
This reverts commit 1d7e75354027b4ef917c69793d11f50a931a737d.
- - - - -
6 changed files:
- libraries/base/changelog.md
- libraries/base/src/Control/Exception/Backtrace.hs
- testsuite/tests/interface-stability/base-exports.stdout
- testsuite/tests/interface-stability/base-exports.stdout-javascript-unknown-ghcjs
- testsuite/tests/interface-stability/base-exports.stdout-mingw32
- testsuite/tests/interface-stability/base-exports.stdout-ws-32
Changes:
=====================================
libraries/base/changelog.md
=====================================
@@ -2,7 +2,6 @@
## 4.20.2 *July 2025*
* Fix incorrect results of `integerPowMod` when the base is 0 and the exponent is negative, and `integerRecipMod` when the modulus is zero ([#26017](https://gitlab.haskell.org/ghc/ghc/-/issues/26017)).
- * Expose constructor and field of `Backtraces` from `Control.Exception.Backtrace`, as per [CLC #199](https://github.com/haskell/core-libraries-committee/issues/199#issuecomment-1954662391)
## 4.20.1 *Jan 2025*
* Shipped with GHC 9.10.2
=====================================
libraries/base/src/Control/Exception/Backtrace.hs
=====================================
@@ -51,7 +51,7 @@ module Control.Exception.Backtrace
, getBacktraceMechanismState
, setBacktraceMechanismState
-- * Collecting backtraces
- , Backtraces(..)
+ , Backtraces
, displayBacktraces
, collectBacktraces
) where
=====================================
testsuite/tests/interface-stability/base-exports.stdout
=====================================
@@ -234,7 +234,7 @@ module Control.Exception where
type ErrorCall :: *
data ErrorCall = ErrorCallWithLocation GHC.Internal.Base.String GHC.Internal.Base.String
type Exception :: * -> Constraint
- class (ghc-internal-9.1002.0:GHC.Internal.Data.Typeable.Internal.Typeable e, GHC.Internal.Show.Show e) => Exception e where
+ class (ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal.Typeable e, GHC.Internal.Show.Show e) => Exception e where
toException :: e -> SomeException
fromException :: SomeException -> GHC.Internal.Maybe.Maybe e
displayException :: e -> GHC.Internal.Base.String
@@ -303,7 +303,7 @@ module Control.Exception where
module Control.Exception.Annotation where
-- Safety: None
type ExceptionAnnotation :: * -> Constraint
- class ghc-internal-9.1002.0:GHC.Internal.Data.Typeable.Internal.Typeable a => ExceptionAnnotation a where
+ class ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal.Typeable a => ExceptionAnnotation a where
displayExceptionAnnotation :: a -> GHC.Internal.Base.String
default displayExceptionAnnotation :: GHC.Internal.Show.Show a => a -> GHC.Internal.Base.String
{-# MINIMAL #-}
@@ -315,7 +315,7 @@ module Control.Exception.Backtrace where
type BacktraceMechanism :: *
data BacktraceMechanism = CostCentreBacktrace | HasCallStackBacktrace | ExecutionBacktrace | IPEBacktrace
type Backtraces :: *
- data Backtraces = Backtraces {btrCostCentre :: GHC.Internal.Maybe.Maybe (GHC.Internal.Ptr.Ptr GHC.Internal.Stack.CCS.CostCentreStack), btrHasCallStack :: GHC.Internal.Maybe.Maybe GHC.Internal.Stack.Types.CallStack, btrExecutionStack :: GHC.Internal.Maybe.Maybe [GHC.Internal.ExecutionStack.Internal.Location], btrIpe :: GHC.Internal.Maybe.Maybe [GHC.Internal.Stack.CloneStack.StackEntry]}
+ data Backtraces = ...
collectBacktraces :: (?callStack::GHC.Internal.Stack.Types.CallStack) => GHC.Types.IO Backtraces
displayBacktraces :: Backtraces -> GHC.Internal.Base.String
getBacktraceMechanismState :: BacktraceMechanism -> GHC.Types.IO GHC.Types.Bool
@@ -345,7 +345,7 @@ module Control.Exception.Base where
type ErrorCall :: *
data ErrorCall = ErrorCallWithLocation GHC.Internal.Base.String GHC.Internal.Base.String
type Exception :: * -> Constraint
- class (ghc-internal-9.1002.0:GHC.Internal.Data.Typeable.Internal.Typeable e, GHC.Internal.Show.Show e) => Exception e where
+ class (ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal.Typeable e, GHC.Internal.Show.Show e) => Exception e where
toException :: e -> SomeException
fromException :: SomeException -> GHC.Internal.Maybe.Maybe e
displayException :: e -> GHC.Internal.Base.String
@@ -848,11 +848,11 @@ module Data.Data where
type TyCon :: *
data TyCon = ...
type TypeRep :: *
- type TypeRep = ghc-internal-9.1002.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep
+ type TypeRep = ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep
type Typeable :: forall k. k -> Constraint
class Typeable a where
...
- {-# MINIMAL ghc-internal-9.1002.0:GHC.Internal.Data.Typeable.Internal.typeRep# #-}
+ {-# MINIMAL ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal.typeRep# #-}
cast :: forall a b. (Typeable a, Typeable b) => a -> GHC.Internal.Maybe.Maybe b
constrFields :: Constr -> [GHC.Internal.Base.String]
constrFixity :: Constr -> Fixity
@@ -895,7 +895,7 @@ module Data.Data where
showConstr :: Constr -> GHC.Internal.Base.String
showsTypeRep :: TypeRep -> GHC.Internal.Show.ShowS
splitTyConApp :: TypeRep -> (TyCon, [TypeRep])
- trLiftedRep :: ghc-internal-9.1002.0:GHC.Internal.Data.Typeable.Internal.TypeRep GHC.Types.LiftedRep
+ trLiftedRep :: ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal.TypeRep GHC.Types.LiftedRep
tyConFingerprint :: TyCon -> GHC.Internal.Fingerprint.Type.Fingerprint
tyConModule :: TyCon -> GHC.Internal.Base.String
tyConName :: TyCon -> GHC.Internal.Base.String
@@ -919,14 +919,14 @@ module Data.Dynamic where
-- Safety: Safe
type Dynamic :: *
data Dynamic where
- Dynamic :: forall a. ghc-internal-9.1002.0:GHC.Internal.Data.Typeable.Internal.TypeRep a -> a -> Dynamic
+ Dynamic :: forall a. ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal.TypeRep a -> a -> Dynamic
type Typeable :: forall k. k -> Constraint
class Typeable a where
...
- {-# MINIMAL ghc-internal-9.1002.0:GHC.Internal.Data.Typeable.Internal.typeRep# #-}
+ {-# MINIMAL ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal.typeRep# #-}
dynApp :: Dynamic -> Dynamic -> Dynamic
dynApply :: Dynamic -> Dynamic -> GHC.Internal.Maybe.Maybe Dynamic
- dynTypeRep :: Dynamic -> ghc-internal-9.1002.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep
+ dynTypeRep :: Dynamic -> ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep
fromDyn :: forall a. Typeable a => Dynamic -> a -> a
fromDynamic :: forall a. Typeable a => Dynamic -> GHC.Internal.Maybe.Maybe a
toDyn :: forall a. Typeable a => a -> Dynamic
@@ -1809,11 +1809,11 @@ module Data.Typeable where
type TyCon :: *
data TyCon = ...
type TypeRep :: *
- type TypeRep = ghc-internal-9.1002.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep
+ type TypeRep = ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep
type Typeable :: forall k. k -> Constraint
class Typeable a where
...
- {-# MINIMAL ghc-internal-9.1002.0:GHC.Internal.Data.Typeable.Internal.typeRep# #-}
+ {-# MINIMAL ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal.typeRep# #-}
cast :: forall a b. (Typeable a, Typeable b) => a -> GHC.Internal.Maybe.Maybe b
decT :: forall {k} (a :: k) (b :: k). (Typeable a, Typeable b) => GHC.Internal.Data.Either.Either ((a :~: b) -> GHC.Internal.Base.Void) (a :~: b)
eqT :: forall {k} (a :: k) (b :: k). (Typeable a, Typeable b) => GHC.Internal.Maybe.Maybe (a :~: b)
@@ -1828,7 +1828,7 @@ module Data.Typeable where
rnfTypeRep :: TypeRep -> ()
showsTypeRep :: TypeRep -> GHC.Internal.Show.ShowS
splitTyConApp :: TypeRep -> (TyCon, [TypeRep])
- trLiftedRep :: ghc-internal-9.1002.0:GHC.Internal.Data.Typeable.Internal.TypeRep GHC.Types.LiftedRep
+ trLiftedRep :: ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal.TypeRep GHC.Types.LiftedRep
tyConFingerprint :: TyCon -> GHC.Internal.Fingerprint.Type.Fingerprint
tyConModule :: TyCon -> GHC.Internal.Base.String
tyConName :: TyCon -> GHC.Internal.Base.String
@@ -5249,7 +5249,7 @@ module GHC.Event where
data EventManager = ...
type FdKey :: *
data FdKey
- = ghc-internal-9.1002.0:GHC.Internal.Event.Manager.FdKey {keyFd :: ! {-# UNPACK #-}(GHC.Internal.System.Posix.Types.N:Fd[0]
+ = ghc-internal-9.1001.0:GHC.Internal.Event.Manager.FdKey {keyFd :: ! {-# UNPACK #-}(GHC.Internal.System.Posix.Types.N:Fd[0]
; GHC.Internal.Foreign.C.Types.N:CInt[0])GHC.Internal.System.Posix.Types.Fd,
...}
type IOCallback :: *
@@ -5282,9 +5282,9 @@ module GHC.Event.TimeOut where
type TimeoutEdit :: *
type TimeoutEdit = TimeoutQueue -> TimeoutQueue
type TimeoutKey :: *
- newtype TimeoutKey = TK ghc-internal-9.1002.0:GHC.Internal.Event.Unique.Unique
+ newtype TimeoutKey = TK ghc-internal-9.1001.0:GHC.Internal.Event.Unique.Unique
type TimeoutQueue :: *
- type TimeoutQueue = ghc-internal-9.1002.0:GHC.Internal.Event.PSQ.PSQ TimeoutCallback
+ type TimeoutQueue = ghc-internal-9.1001.0:GHC.Internal.Event.PSQ.PSQ TimeoutCallback
module GHC.Exception where
-- Safety: Safe
@@ -5296,7 +5296,7 @@ module GHC.Exception where
type ErrorCall :: *
data ErrorCall = ErrorCallWithLocation GHC.Internal.Base.String GHC.Internal.Base.String
type Exception :: * -> Constraint
- class (ghc-internal-9.1002.0:GHC.Internal.Data.Typeable.Internal.Typeable e, GHC.Internal.Show.Show e) => Exception e where
+ class (ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal.Typeable e, GHC.Internal.Show.Show e) => Exception e where
toException :: e -> SomeException
fromException :: SomeException -> GHC.Internal.Maybe.Maybe e
displayException :: e -> GHC.Internal.Base.String
@@ -5325,7 +5325,7 @@ module GHC.Exception.Type where
type ArithException :: *
data ArithException = Overflow | Underflow | LossOfPrecision | DivideByZero | Denormal | RatioZeroDenominator
type Exception :: * -> Constraint
- class (ghc-internal-9.1002.0:GHC.Internal.Data.Typeable.Internal.Typeable e, GHC.Internal.Show.Show e) => Exception e where
+ class (ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal.Typeable e, GHC.Internal.Show.Show e) => Exception e where
toException :: e -> SomeException
fromException :: SomeException -> GHC.Internal.Maybe.Maybe e
displayException :: e -> GHC.Internal.Base.String
@@ -7878,8 +7878,8 @@ module GHC.IO.Handle where
hTryLock :: Handle -> LockMode -> GHC.Types.IO GHC.Types.Bool
hWaitForInput :: Handle -> GHC.Types.Int -> GHC.Types.IO GHC.Types.Bool
isEOF :: GHC.Types.IO GHC.Types.Bool
- mkDuplexHandle :: forall dev. (GHC.Internal.IO.Device.RawIO dev, GHC.Internal.IO.Device.IODevice dev, GHC.Internal.IO.BufferedIO.BufferedIO dev, ghc-internal-9.1002.0:GHC.Internal.Data.Typeable.Internal.Typeable dev) => dev -> GHC.Internal.IO.FilePath -> GHC.Internal.Maybe.Maybe GHC.Internal.IO.Encoding.Types.TextEncoding -> NewlineMode -> GHC.Types.IO Handle
- mkFileHandle :: forall dev. (GHC.Internal.IO.Device.RawIO dev, GHC.Internal.IO.Device.IODevice dev, GHC.Internal.IO.BufferedIO.BufferedIO dev, ghc-internal-9.1002.0:GHC.Internal.Data.Typeable.Internal.Typeable dev) => dev -> GHC.Internal.IO.FilePath -> GHC.Internal.IO.IOMode.IOMode -> GHC.Internal.Maybe.Maybe GHC.Internal.IO.Encoding.Types.TextEncoding -> NewlineMode -> GHC.Types.IO Handle
+ mkDuplexHandle :: forall dev. (GHC.Internal.IO.Device.RawIO dev, GHC.Internal.IO.Device.IODevice dev, GHC.Internal.IO.BufferedIO.BufferedIO dev, ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal.Typeable dev) => dev -> GHC.Internal.IO.FilePath -> GHC.Internal.Maybe.Maybe GHC.Internal.IO.Encoding.Types.TextEncoding -> NewlineMode -> GHC.Types.IO Handle
+ mkFileHandle :: forall dev. (GHC.Internal.IO.Device.RawIO dev, GHC.Internal.IO.Device.IODevice dev, GHC.Internal.IO.BufferedIO.BufferedIO dev, ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal.Typeable dev) => dev -> GHC.Internal.IO.FilePath -> GHC.Internal.IO.IOMode.IOMode -> GHC.Internal.Maybe.Maybe GHC.Internal.IO.Encoding.Types.TextEncoding -> NewlineMode -> GHC.Types.IO Handle
nativeNewline :: Newline
nativeNewlineMode :: NewlineMode
noNewlineTranslation :: NewlineMode
@@ -7929,11 +7929,11 @@ module GHC.IO.Handle.Internals where
ioe_notReadable :: forall a. GHC.Types.IO a
ioe_notWritable :: forall a. GHC.Types.IO a
ioe_semiclosedHandle :: forall a. GHC.Types.IO a
- mkDuplexHandle :: forall dev. (GHC.Internal.IO.Device.RawIO dev, GHC.Internal.IO.Device.IODevice dev, GHC.Internal.IO.BufferedIO.BufferedIO dev, ghc-internal-9.1002.0:GHC.Internal.Data.Typeable.Internal.Typeable dev) => dev -> GHC.Internal.IO.FilePath -> GHC.Internal.Maybe.Maybe GHC.Internal.IO.Encoding.Types.TextEncoding -> GHC.Internal.IO.Handle.Types.NewlineMode -> GHC.Types.IO GHC.Internal.IO.Handle.Types.Handle
- mkDuplexHandleNoFinalizer :: forall dev. (GHC.Internal.IO.Device.RawIO dev, GHC.Internal.IO.Device.IODevice dev, GHC.Internal.IO.BufferedIO.BufferedIO dev, ghc-internal-9.1002.0:GHC.Internal.Data.Typeable.Internal.Typeable dev) => dev -> GHC.Internal.IO.FilePath -> GHC.Internal.Maybe.Maybe GHC.Internal.IO.Encoding.Types.TextEncoding -> GHC.Internal.IO.Handle.Types.NewlineMode -> GHC.Types.IO GHC.Internal.IO.Handle.Types.Handle
- mkFileHandle :: forall dev. (GHC.Internal.IO.Device.RawIO dev, GHC.Internal.IO.Device.IODevice dev, GHC.Internal.IO.BufferedIO.BufferedIO dev, ghc-internal-9.1002.0:GHC.Internal.Data.Typeable.Internal.Typeable dev) => dev -> GHC.Internal.IO.FilePath -> GHC.Internal.IO.IOMode.IOMode -> GHC.Internal.Maybe.Maybe GHC.Internal.IO.Encoding.Types.TextEncoding -> GHC.Internal.IO.Handle.Types.NewlineMode -> GHC.Types.IO GHC.Internal.IO.Handle.Types.Handle
- mkFileHandleNoFinalizer :: forall dev. (GHC.Internal.IO.Device.RawIO dev, GHC.Internal.IO.Device.IODevice dev, GHC.Internal.IO.BufferedIO.BufferedIO dev, ghc-internal-9.1002.0:GHC.Internal.Data.Typeable.Internal.Typeable dev) => dev -> GHC.Internal.IO.FilePath -> GHC.Internal.IO.IOMode.IOMode -> GHC.Internal.Maybe.Maybe GHC.Internal.IO.Encoding.Types.TextEncoding -> GHC.Internal.IO.Handle.Types.NewlineMode -> GHC.Types.IO GHC.Internal.IO.Handle.Types.Handle
- mkHandle :: forall dev. (GHC.Internal.IO.Device.RawIO dev, GHC.Internal.IO.Device.IODevice dev, GHC.Internal.IO.BufferedIO.BufferedIO dev, ghc-internal-9.1002.0:GHC.Internal.Data.Typeable.Internal.Typeable dev) => dev -> GHC.Internal.IO.FilePath -> GHC.Internal.IO.Handle.Types.HandleType -> GHC.Types.Bool -> GHC.Internal.Maybe.Maybe GHC.Internal.IO.Encoding.Types.TextEncoding -> GHC.Internal.IO.Handle.Types.NewlineMode -> GHC.Internal.Maybe.Maybe HandleFinalizer -> GHC.Internal.Maybe.Maybe (GHC.Internal.MVar.MVar GHC.Internal.IO.Handle.Types.Handle__) -> GHC.Types.IO GHC.Internal.IO.Handle.Types.Handle
+ mkDuplexHandle :: forall dev. (GHC.Internal.IO.Device.RawIO dev, GHC.Internal.IO.Device.IODevice dev, GHC.Internal.IO.BufferedIO.BufferedIO dev, ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal.Typeable dev) => dev -> GHC.Internal.IO.FilePath -> GHC.Internal.Maybe.Maybe GHC.Internal.IO.Encoding.Types.TextEncoding -> GHC.Internal.IO.Handle.Types.NewlineMode -> GHC.Types.IO GHC.Internal.IO.Handle.Types.Handle
+ mkDuplexHandleNoFinalizer :: forall dev. (GHC.Internal.IO.Device.RawIO dev, GHC.Internal.IO.Device.IODevice dev, GHC.Internal.IO.BufferedIO.BufferedIO dev, ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal.Typeable dev) => dev -> GHC.Internal.IO.FilePath -> GHC.Internal.Maybe.Maybe GHC.Internal.IO.Encoding.Types.TextEncoding -> GHC.Internal.IO.Handle.Types.NewlineMode -> GHC.Types.IO GHC.Internal.IO.Handle.Types.Handle
+ mkFileHandle :: forall dev. (GHC.Internal.IO.Device.RawIO dev, GHC.Internal.IO.Device.IODevice dev, GHC.Internal.IO.BufferedIO.BufferedIO dev, ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal.Typeable dev) => dev -> GHC.Internal.IO.FilePath -> GHC.Internal.IO.IOMode.IOMode -> GHC.Internal.Maybe.Maybe GHC.Internal.IO.Encoding.Types.TextEncoding -> GHC.Internal.IO.Handle.Types.NewlineMode -> GHC.Types.IO GHC.Internal.IO.Handle.Types.Handle
+ mkFileHandleNoFinalizer :: forall dev. (GHC.Internal.IO.Device.RawIO dev, GHC.Internal.IO.Device.IODevice dev, GHC.Internal.IO.BufferedIO.BufferedIO dev, ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal.Typeable dev) => dev -> GHC.Internal.IO.FilePath -> GHC.Internal.IO.IOMode.IOMode -> GHC.Internal.Maybe.Maybe GHC.Internal.IO.Encoding.Types.TextEncoding -> GHC.Internal.IO.Handle.Types.NewlineMode -> GHC.Types.IO GHC.Internal.IO.Handle.Types.Handle
+ mkHandle :: forall dev. (GHC.Internal.IO.Device.RawIO dev, GHC.Internal.IO.Device.IODevice dev, GHC.Internal.IO.BufferedIO.BufferedIO dev, ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal.Typeable dev) => dev -> GHC.Internal.IO.FilePath -> GHC.Internal.IO.Handle.Types.HandleType -> GHC.Types.Bool -> GHC.Internal.Maybe.Maybe GHC.Internal.IO.Encoding.Types.TextEncoding -> GHC.Internal.IO.Handle.Types.NewlineMode -> GHC.Internal.Maybe.Maybe HandleFinalizer -> GHC.Internal.Maybe.Maybe (GHC.Internal.MVar.MVar GHC.Internal.IO.Handle.Types.Handle__) -> GHC.Types.IO GHC.Internal.IO.Handle.Types.Handle
openTextEncoding :: forall a. GHC.Internal.Maybe.Maybe GHC.Internal.IO.Encoding.Types.TextEncoding -> GHC.Internal.IO.Handle.Types.HandleType -> (forall es ds. GHC.Internal.Maybe.Maybe (GHC.Internal.IO.Encoding.Types.TextEncoder es) -> GHC.Internal.Maybe.Maybe (GHC.Internal.IO.Encoding.Types.TextDecoder ds) -> GHC.Types.IO a) -> GHC.Types.IO a
readTextDevice :: GHC.Internal.IO.Handle.Types.Handle__ -> GHC.Internal.IO.Buffer.CharBuffer -> GHC.Types.IO GHC.Internal.IO.Buffer.CharBuffer
readTextDeviceNonBlocking :: GHC.Internal.IO.Handle.Types.Handle__ -> GHC.Internal.IO.Buffer.CharBuffer -> GHC.Types.IO GHC.Internal.IO.Buffer.CharBuffer
@@ -7997,7 +7997,7 @@ module GHC.IO.Handle.Types where
type Handle__ :: *
data Handle__
= forall dev enc_state dec_state.
- (GHC.Internal.IO.Device.RawIO dev, GHC.Internal.IO.Device.IODevice dev, GHC.Internal.IO.BufferedIO.BufferedIO dev, ghc-internal-9.1002.0:GHC.Internal.Data.Typeable.Internal.Typeable dev) =>
+ (GHC.Internal.IO.Device.RawIO dev, GHC.Internal.IO.Device.IODevice dev, GHC.Internal.IO.BufferedIO.BufferedIO dev, ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal.Typeable dev) =>
Handle__ {haDevice :: !dev,
haType :: HandleType,
haByteBuffer :: ! {-# UNPACK #-}(GHC.Internal.IORef.N:IORef[0] <GHC.Internal.IO.Buffer.Buffer GHC.Internal.Word.Word8>_N)(GHC.Internal.IORef.IORef (GHC.Internal.IO.Buffer.Buffer GHC.Internal.Word.Word8)),
@@ -9419,7 +9419,7 @@ module GHC.StaticPtr where
-- Safety: None
type IsStatic :: (* -> *) -> Constraint
class IsStatic p where
- fromStaticPtr :: forall a. ghc-internal-9.1002.0:GHC.Internal.Data.Typeable.Internal.Typeable a => StaticPtr a -> p a
+ fromStaticPtr :: forall a. ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal.Typeable a => StaticPtr a -> p a
{-# MINIMAL fromStaticPtr #-}
type StaticKey :: *
type StaticKey = GHC.Internal.Fingerprint.Type.Fingerprint
@@ -10816,8 +10816,8 @@ module Type.Reflection where
data (:~~:) a b where
HRefl :: forall {k1} (a :: k1). (:~~:) a a
pattern App :: forall k2 (t :: k2). () => forall k1 (a :: k1 -> k2) (b :: k1). (t ~ a b) => TypeRep a -> TypeRep b -> TypeRep t
- pattern Con :: forall k (a :: k). () => ghc-internal-9.1002.0:GHC.Internal.Data.Typeable.Internal.NotApplication a => TyCon -> TypeRep a
- pattern Con' :: forall k (a :: k). () => ghc-internal-9.1002.0:GHC.Internal.Data.Typeable.Internal.NotApplication a => TyCon -> [SomeTypeRep] -> TypeRep a
+ pattern Con :: forall k (a :: k). () => ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal.NotApplication a => TyCon -> TypeRep a
+ pattern Con' :: forall k (a :: k). () => ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal.NotApplication a => TyCon -> [SomeTypeRep] -> TypeRep a
pattern Fun :: forall k (fun :: k). () => forall (r1 :: GHC.Types.RuntimeRep) (r2 :: GHC.Types.RuntimeRep) (arg :: TYPE r1) (res :: TYPE r2). (k ~ *, fun ~~ (arg -> res)) => TypeRep arg -> TypeRep res -> TypeRep fun
type Module :: *
data Module = ...
@@ -10834,7 +10834,7 @@ module Type.Reflection where
type Typeable :: forall k. k -> Constraint
class Typeable a where
...
- {-# MINIMAL ghc-internal-9.1002.0:GHC.Internal.Data.Typeable.Internal.typeRep# #-}
+ {-# MINIMAL ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal.typeRep# #-}
decTypeRep :: forall k1 k2 (a :: k1) (b :: k2). TypeRep a -> TypeRep b -> GHC.Internal.Data.Either.Either ((a :~~: b) -> GHC.Internal.Base.Void) (a :~~: b)
eqTypeRep :: forall k1 k2 (a :: k1) (b :: k2). TypeRep a -> TypeRep b -> GHC.Internal.Maybe.Maybe (a :~~: b)
moduleName :: Module -> GHC.Internal.Base.String
@@ -10869,9 +10869,9 @@ module Type.Reflection.Unsafe where
data TypeRep a where
...
mkTrApp :: forall k1 k2 (a :: k1 -> k2) (b :: k1). TypeRep a -> TypeRep b -> TypeRep (a b)
- mkTrCon :: forall k (a :: k). TyCon -> [ghc-internal-9.1002.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep] -> TypeRep a
+ mkTrCon :: forall k (a :: k). TyCon -> [ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep] -> TypeRep a
mkTyCon :: GHC.Internal.Base.String -> GHC.Internal.Base.String -> GHC.Internal.Base.String -> GHC.Types.Int -> KindRep -> TyCon
- someTypeRepFingerprint :: ghc-internal-9.1002.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep -> GHC.Internal.Fingerprint.Type.Fingerprint
+ someTypeRepFingerprint :: ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep -> GHC.Internal.Fingerprint.Type.Fingerprint
tyConFingerprint :: TyCon -> GHC.Internal.Fingerprint.Type.Fingerprint
tyConKindArgs :: TyCon -> GHC.Types.Int
tyConKindRep :: TyCon -> KindRep
@@ -11202,9 +11202,9 @@ instance forall a. GHC.Internal.Base.Monoid a => GHC.Internal.Base.Monoid (GHC.I
instance forall a. (GHC.Classes.Ord a, GHC.Internal.Enum.Bounded a) => GHC.Internal.Base.Monoid (Data.Semigroup.Max a) -- Defined in ‘Data.Semigroup’
instance forall a. (GHC.Classes.Ord a, GHC.Internal.Enum.Bounded a) => GHC.Internal.Base.Monoid (Data.Semigroup.Min a) -- Defined in ‘Data.Semigroup’
instance forall m. GHC.Internal.Base.Monoid m => GHC.Internal.Base.Monoid (Data.Semigroup.WrappedMonoid m) -- Defined in ‘Data.Semigroup’
-instance GHC.Internal.Base.Monoid ghc-internal-9.1002.0:GHC.Internal.Event.Internal.Types.Event -- Defined in ‘ghc-internal-9.1002.0:GHC.Internal.Event.Internal.Types’
-instance GHC.Internal.Base.Monoid ghc-internal-9.1002.0:GHC.Internal.Event.Internal.Types.EventLifetime -- Defined in ‘ghc-internal-9.1002.0:GHC.Internal.Event.Internal.Types’
-instance GHC.Internal.Base.Monoid ghc-internal-9.1002.0:GHC.Internal.Event.Internal.Types.Lifetime -- Defined in ‘ghc-internal-9.1002.0:GHC.Internal.Event.Internal.Types’
+instance GHC.Internal.Base.Monoid ghc-internal-9.1001.0:GHC.Internal.Event.Internal.Types.Event -- Defined in ‘ghc-internal-9.1001.0:GHC.Internal.Event.Internal.Types’
+instance GHC.Internal.Base.Monoid ghc-internal-9.1001.0:GHC.Internal.Event.Internal.Types.EventLifetime -- Defined in ‘ghc-internal-9.1001.0:GHC.Internal.Event.Internal.Types’
+instance GHC.Internal.Base.Monoid ghc-internal-9.1001.0:GHC.Internal.Event.Internal.Types.Lifetime -- Defined in ‘ghc-internal-9.1001.0:GHC.Internal.Event.Internal.Types’
instance forall k (f :: k -> *) (p :: k) (g :: k -> *). (GHC.Internal.Base.Monoid (f p), GHC.Internal.Base.Monoid (g p)) => GHC.Internal.Base.Monoid ((GHC.Internal.Generics.:*:) f g p) -- Defined in ‘GHC.Internal.Generics’
instance forall k2 k1 (f :: k2 -> *) (g :: k1 -> k2) (p :: k1). GHC.Internal.Base.Monoid (f (g p)) => GHC.Internal.Base.Monoid ((GHC.Internal.Generics.:.:) f g p) -- Defined in ‘GHC.Internal.Generics’
instance forall a. (GHC.Internal.Generics.Generic a, GHC.Internal.Base.Monoid (GHC.Internal.Generics.Rep a ())) => GHC.Internal.Base.Monoid (GHC.Internal.Generics.Generically a) -- Defined in ‘GHC.Internal.Generics’
@@ -11260,9 +11260,9 @@ instance forall a. GHC.Internal.Base.Semigroup (Data.Semigroup.Last a) -- Define
instance forall a. GHC.Classes.Ord a => GHC.Internal.Base.Semigroup (Data.Semigroup.Max a) -- Defined in ‘Data.Semigroup’
instance forall a. GHC.Classes.Ord a => GHC.Internal.Base.Semigroup (Data.Semigroup.Min a) -- Defined in ‘Data.Semigroup’
instance forall m. GHC.Internal.Base.Monoid m => GHC.Internal.Base.Semigroup (Data.Semigroup.WrappedMonoid m) -- Defined in ‘Data.Semigroup’
-instance GHC.Internal.Base.Semigroup ghc-internal-9.1002.0:GHC.Internal.Event.Internal.Types.Event -- Defined in ‘ghc-internal-9.1002.0:GHC.Internal.Event.Internal.Types’
-instance GHC.Internal.Base.Semigroup ghc-internal-9.1002.0:GHC.Internal.Event.Internal.Types.EventLifetime -- Defined in ‘ghc-internal-9.1002.0:GHC.Internal.Event.Internal.Types’
-instance GHC.Internal.Base.Semigroup ghc-internal-9.1002.0:GHC.Internal.Event.Internal.Types.Lifetime -- Defined in ‘ghc-internal-9.1002.0:GHC.Internal.Event.Internal.Types’
+instance GHC.Internal.Base.Semigroup ghc-internal-9.1001.0:GHC.Internal.Event.Internal.Types.Event -- Defined in ‘ghc-internal-9.1001.0:GHC.Internal.Event.Internal.Types’
+instance GHC.Internal.Base.Semigroup ghc-internal-9.1001.0:GHC.Internal.Event.Internal.Types.EventLifetime -- Defined in ‘ghc-internal-9.1001.0:GHC.Internal.Event.Internal.Types’
+instance GHC.Internal.Base.Semigroup ghc-internal-9.1001.0:GHC.Internal.Event.Internal.Types.Lifetime -- Defined in ‘ghc-internal-9.1001.0:GHC.Internal.Event.Internal.Types’
instance forall k (f :: k -> *) (p :: k) (g :: k -> *). (GHC.Internal.Base.Semigroup (f p), GHC.Internal.Base.Semigroup (g p)) => GHC.Internal.Base.Semigroup ((GHC.Internal.Generics.:*:) f g p) -- Defined in ‘GHC.Internal.Generics’
instance forall k2 k1 (f :: k2 -> *) (g :: k1 -> k2) (p :: k1). GHC.Internal.Base.Semigroup (f (g p)) => GHC.Internal.Base.Semigroup ((GHC.Internal.Generics.:.:) f g p) -- Defined in ‘GHC.Internal.Generics’
instance forall a. (GHC.Internal.Generics.Generic a, GHC.Internal.Base.Semigroup (GHC.Internal.Generics.Rep a ())) => GHC.Internal.Base.Semigroup (GHC.Internal.Generics.Generically a) -- Defined in ‘GHC.Internal.Generics’
@@ -11390,20 +11390,20 @@ 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 (a :: * -> * -> *) b c. (ghc-internal-9.1002.0:GHC.Internal.Data.Typeable.Internal.Typeable a, ghc-internal-9.1002.0:GHC.Internal.Data.Typeable.Internal.Typeable b, ghc-internal-9.1002.0:GHC.Internal.Data.Typeable.Internal.Typeable c, GHC.Internal.Data.Data.Data (a b c)) => GHC.Internal.Data.Data.Data (Control.Applicative.WrappedArrow a b c) -- Defined in ‘Control.Applicative’
-instance forall (m :: * -> *) a. (ghc-internal-9.1002.0:GHC.Internal.Data.Typeable.Internal.Typeable m, ghc-internal-9.1002.0:GHC.Internal.Data.Typeable.Internal.Typeable a, GHC.Internal.Data.Data.Data (m a)) => GHC.Internal.Data.Data.Data (Control.Applicative.WrappedMonad m a) -- Defined in ‘Control.Applicative’
+instance forall (a :: * -> * -> *) b c. (ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal.Typeable a, ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal.Typeable b, ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal.Typeable c, GHC.Internal.Data.Data.Data (a b c)) => GHC.Internal.Data.Data.Data (Control.Applicative.WrappedArrow a b c) -- Defined in ‘Control.Applicative’
+instance forall (m :: * -> *) a. (ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal.Typeable m, ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal.Typeable a, GHC.Internal.Data.Data.Data (m a)) => GHC.Internal.Data.Data.Data (Control.Applicative.WrappedMonad m a) -- Defined in ‘Control.Applicative’
instance forall a. GHC.Internal.Data.Data.Data a => GHC.Internal.Data.Data.Data (GHC.Internal.Functor.ZipList.ZipList a) -- Defined in ‘GHC.Internal.Functor.ZipList’
instance GHC.Internal.Data.Data.Data Data.Array.Byte.ByteArray -- Defined in ‘Data.Array.Byte’
-instance forall s. ghc-internal-9.1002.0:GHC.Internal.Data.Typeable.Internal.Typeable s => GHC.Internal.Data.Data.Data (Data.Array.Byte.MutableByteArray s) -- Defined in ‘Data.Array.Byte’
+instance forall s. ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal.Typeable s => GHC.Internal.Data.Data.Data (Data.Array.Byte.MutableByteArray s) -- Defined in ‘Data.Array.Byte’
instance forall a. GHC.Internal.Data.Data.Data a => GHC.Internal.Data.Data.Data (Data.Complex.Complex a) -- Defined in ‘Data.Complex’
-instance forall i j (a :: i) (b :: j). (ghc-internal-9.1002.0:GHC.Internal.Data.Typeable.Internal.Typeable i, ghc-internal-9.1002.0:GHC.Internal.Data.Typeable.Internal.Typeable j, ghc-internal-9.1002.0:GHC.Internal.Data.Typeable.Internal.Typeable a, ghc-internal-9.1002.0:GHC.Internal.Data.Typeable.Internal.Typeable b, a ~~ b) => GHC.Internal.Data.Data.Data (a GHC.Internal.Data.Type.Equality.:~~: b) -- Defined in ‘GHC.Internal.Data.Data’
+instance forall i j (a :: i) (b :: j). (ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal.Typeable i, ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal.Typeable j, ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal.Typeable a, ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal.Typeable b, a ~~ b) => GHC.Internal.Data.Data.Data (a GHC.Internal.Data.Type.Equality.:~~: b) -- Defined in ‘GHC.Internal.Data.Data’
instance GHC.Internal.Data.Data.Data GHC.Internal.Data.Semigroup.Internal.All -- Defined in ‘GHC.Internal.Data.Data’
instance GHC.Internal.Data.Data.Data GHC.Internal.Data.Semigroup.Internal.Any -- Defined in ‘GHC.Internal.Data.Data’
instance forall a b. (GHC.Internal.Data.Data.Data a, GHC.Internal.Data.Data.Data b, GHC.Internal.Ix.Ix a) => GHC.Internal.Data.Data.Data (GHC.Internal.Arr.Array a b) -- Defined in ‘GHC.Internal.Data.Data’
instance GHC.Internal.Data.Data.Data GHC.Internal.Generics.Associativity -- Defined in ‘GHC.Internal.Data.Data’
instance GHC.Internal.Data.Data.Data GHC.Types.Bool -- Defined in ‘GHC.Internal.Data.Data’
instance GHC.Internal.Data.Data.Data GHC.Types.Char -- Defined in ‘GHC.Internal.Data.Data’
-instance forall k a (b :: k). (ghc-internal-9.1002.0:GHC.Internal.Data.Typeable.Internal.Typeable k, GHC.Internal.Data.Data.Data a, ghc-internal-9.1002.0:GHC.Internal.Data.Typeable.Internal.Typeable b) => GHC.Internal.Data.Data.Data (GHC.Internal.Data.Functor.Const.Const a b) -- Defined in ‘GHC.Internal.Data.Data’
+instance forall k a (b :: k). (ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal.Typeable k, GHC.Internal.Data.Data.Data a, ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal.Typeable b) => GHC.Internal.Data.Data.Data (GHC.Internal.Data.Functor.Const.Const a b) -- Defined in ‘GHC.Internal.Data.Data’
instance forall a. GHC.Internal.Data.Data.Data a => GHC.Internal.Data.Data.Data (GHC.Internal.Foreign.C.ConstPtr.ConstPtr a) -- Defined in ‘GHC.Internal.Data.Data’
instance GHC.Internal.Data.Data.Data GHC.Internal.Generics.DecidedStrictness -- Defined in ‘GHC.Internal.Data.Data’
instance GHC.Internal.Data.Data.Data GHC.Types.Double -- Defined in ‘GHC.Internal.Data.Data’
@@ -11451,10 +11451,10 @@ instance GHC.Internal.Data.Data.Data GHC.Internal.Word.Word32 -- Defined in ‘G
instance GHC.Internal.Data.Data.Data GHC.Internal.Word.Word64 -- Defined in ‘GHC.Internal.Data.Data’
instance GHC.Internal.Data.Data.Data GHC.Internal.Word.Word8 -- Defined in ‘GHC.Internal.Data.Data’
instance GHC.Internal.Data.Data.Data GHC.Internal.Foreign.Ptr.WordPtr -- Defined in ‘GHC.Internal.Data.Data’
-instance forall k (a :: k). (ghc-internal-9.1002.0:GHC.Internal.Data.Typeable.Internal.Typeable k, ghc-internal-9.1002.0:GHC.Internal.Data.Typeable.Internal.Typeable a) => GHC.Internal.Data.Data.Data (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’
-instance forall k1 (f :: k1 -> *) k2 (g :: k2 -> k1) (a :: k2). (ghc-internal-9.1002.0:GHC.Internal.Data.Typeable.Internal.Typeable a, ghc-internal-9.1002.0:GHC.Internal.Data.Typeable.Internal.Typeable f, ghc-internal-9.1002.0:GHC.Internal.Data.Typeable.Internal.Typeable g, ghc-internal-9.1002.0:GHC.Internal.Data.Typeable.Internal.Typeable k1, ghc-internal-9.1002.0:GHC.Internal.Data.Typeable.Internal.Typeable k2, GHC.Internal.Data.Data.Data (f (g a))) => GHC.Internal.Data.Data.Data (Data.Functor.Compose.Compose f g a) -- Defined in ‘Data.Functor.Compose’
-instance [safe] forall k (f :: k -> *) (g :: k -> *) (a :: k). (ghc-internal-9.1002.0:GHC.Internal.Data.Typeable.Internal.Typeable a, ghc-internal-9.1002.0:GHC.Internal.Data.Typeable.Internal.Typeable f, ghc-internal-9.1002.0:GHC.Internal.Data.Typeable.Internal.Typeable g, ghc-internal-9.1002.0:GHC.Internal.Data.Typeable.Internal.Typeable k, GHC.Internal.Data.Data.Data (f a), GHC.Internal.Data.Data.Data (g a)) => GHC.Internal.Data.Data.Data (Data.Functor.Product.Product f g a) -- Defined in ‘Data.Functor.Product’
-instance [safe] forall k (f :: k -> *) (g :: k -> *) (a :: k). (ghc-internal-9.1002.0:GHC.Internal.Data.Typeable.Internal.Typeable a, ghc-internal-9.1002.0:GHC.Internal.Data.Typeable.Internal.Typeable f, ghc-internal-9.1002.0:GHC.Internal.Data.Typeable.Internal.Typeable g, ghc-internal-9.1002.0:GHC.Internal.Data.Typeable.Internal.Typeable k, GHC.Internal.Data.Data.Data (f a), GHC.Internal.Data.Data.Data (g a)) => GHC.Internal.Data.Data.Data (Data.Functor.Sum.Sum f g a) -- Defined in ‘Data.Functor.Sum’
+instance forall k (a :: k). (ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal.Typeable k, ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal.Typeable a) => GHC.Internal.Data.Data.Data (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’
+instance forall k1 (f :: k1 -> *) k2 (g :: k2 -> k1) (a :: k2). (ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal.Typeable a, ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal.Typeable f, ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal.Typeable g, ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal.Typeable k1, ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal.Typeable k2, GHC.Internal.Data.Data.Data (f (g a))) => GHC.Internal.Data.Data.Data (Data.Functor.Compose.Compose f g a) -- Defined in ‘Data.Functor.Compose’
+instance [safe] forall k (f :: k -> *) (g :: k -> *) (a :: k). (ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal.Typeable a, ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal.Typeable f, ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal.Typeable g, ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal.Typeable k, GHC.Internal.Data.Data.Data (f a), GHC.Internal.Data.Data.Data (g a)) => GHC.Internal.Data.Data.Data (Data.Functor.Product.Product f g a) -- Defined in ‘Data.Functor.Product’
+instance [safe] forall k (f :: k -> *) (g :: k -> *) (a :: k). (ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal.Typeable a, ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal.Typeable f, ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal.Typeable g, ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal.Typeable k, GHC.Internal.Data.Data.Data (f a), GHC.Internal.Data.Data.Data (g a)) => GHC.Internal.Data.Data.Data (Data.Functor.Sum.Sum f g a) -- Defined in ‘Data.Functor.Sum’
instance forall a b. (GHC.Internal.Data.Data.Data a, GHC.Internal.Data.Data.Data b) => GHC.Internal.Data.Data.Data (Data.Semigroup.Arg a b) -- Defined in ‘Data.Semigroup’
instance forall a. GHC.Internal.Data.Data.Data a => GHC.Internal.Data.Data.Data (Data.Semigroup.First a) -- Defined in ‘Data.Semigroup’
instance forall a. GHC.Internal.Data.Data.Data a => GHC.Internal.Data.Data.Data (Data.Semigroup.Last a) -- Defined in ‘Data.Semigroup’
@@ -11520,7 +11520,7 @@ instance GHC.Internal.Data.Type.Equality.TestEquality GHC.Internal.TypeLits.SCha
instance GHC.Internal.Data.Type.Equality.TestEquality GHC.Internal.TypeLits.SSymbol -- Defined in ‘GHC.Internal.TypeLits’
instance forall k (a :: k). GHC.Internal.Data.Type.Equality.TestEquality ((GHC.Internal.Data.Type.Equality.:~:) a) -- Defined in ‘GHC.Internal.Data.Type.Equality’
instance forall k1 k (a :: k1). GHC.Internal.Data.Type.Equality.TestEquality ((GHC.Internal.Data.Type.Equality.:~~:) a) -- Defined in ‘GHC.Internal.Data.Type.Equality’
-instance forall k. GHC.Internal.Data.Type.Equality.TestEquality ghc-internal-9.1002.0:GHC.Internal.Data.Typeable.Internal.TypeRep -- Defined in ‘ghc-internal-9.1002.0:GHC.Internal.Data.Typeable.Internal’
+instance forall k. GHC.Internal.Data.Type.Equality.TestEquality ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal.TypeRep -- Defined in ‘ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal’
instance forall k1 k2 (f :: k1 -> *) (g :: k2 -> k1). GHC.Internal.Data.Type.Equality.TestEquality f => GHC.Internal.Data.Type.Equality.TestEquality (Data.Functor.Compose.Compose f g) -- Defined in ‘Data.Functor.Compose’
instance forall a k (b :: k). GHC.Internal.Enum.Bounded a => GHC.Internal.Enum.Bounded (GHC.Internal.Data.Functor.Const.Const a b) -- Defined in ‘GHC.Internal.Data.Functor.Const’
instance forall a. GHC.Internal.Enum.Bounded a => GHC.Internal.Enum.Bounded (GHC.Internal.Data.Bits.And a) -- Defined in ‘GHC.Internal.Data.Bits’
@@ -11717,7 +11717,7 @@ instance GHC.Internal.Exception.Type.Exception GHC.Internal.Control.Exception.Ba
instance GHC.Internal.Exception.Type.Exception GHC.Internal.Control.Exception.Base.RecUpdError -- Defined in ‘GHC.Internal.Control.Exception.Base’
instance GHC.Internal.Exception.Type.Exception GHC.Internal.Control.Exception.Base.TypeError -- Defined in ‘GHC.Internal.Control.Exception.Base’
instance GHC.Internal.Exception.Type.Exception GHC.Internal.Data.Dynamic.Dynamic -- Defined in ‘GHC.Internal.Data.Dynamic’
-instance [safe] GHC.Internal.Exception.Type.Exception ghc-internal-9.1002.0:GHC.Internal.IO.Handle.Lock.Common.FileLockingNotSupported -- Defined in ‘ghc-internal-9.1002.0:GHC.Internal.IO.Handle.Lock.Common’
+instance [safe] GHC.Internal.Exception.Type.Exception ghc-internal-9.1001.0:GHC.Internal.IO.Handle.Lock.Common.FileLockingNotSupported -- Defined in ‘ghc-internal-9.1001.0:GHC.Internal.IO.Handle.Lock.Common’
instance GHC.Internal.Exception.Type.Exception GHC.Internal.IOPort.IOPortException -- Defined in ‘GHC.Internal.IOPort’
instance [safe] GHC.Internal.Exception.Type.Exception System.Timeout.Timeout -- Defined in ‘System.Timeout’
instance forall a k (b :: k). GHC.Internal.Float.Floating a => GHC.Internal.Float.Floating (GHC.Internal.Data.Functor.Const.Const a b) -- Defined in ‘GHC.Internal.Data.Functor.Const’
@@ -12389,8 +12389,8 @@ instance GHC.Internal.Show.Show GHC.Internal.Data.Data.DataRep -- Defined in ‘
instance GHC.Internal.Show.Show GHC.Internal.Data.Data.DataType -- Defined in ‘GHC.Internal.Data.Data’
instance GHC.Internal.Show.Show GHC.Internal.Data.Data.Fixity -- Defined in ‘GHC.Internal.Data.Data’
instance forall k (s :: k). GHC.Internal.Show.Show (GHC.Internal.Data.Proxy.Proxy s) -- Defined in ‘GHC.Internal.Data.Proxy’
-instance GHC.Internal.Show.Show ghc-internal-9.1002.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep -- Defined in ‘ghc-internal-9.1002.0:GHC.Internal.Data.Typeable.Internal’
-instance forall k (a :: k). GHC.Internal.Show.Show (ghc-internal-9.1002.0:GHC.Internal.Data.Typeable.Internal.TypeRep a) -- Defined in ‘ghc-internal-9.1002.0:GHC.Internal.Data.Typeable.Internal’
+instance GHC.Internal.Show.Show ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep -- Defined in ‘ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal’
+instance forall k (a :: k). GHC.Internal.Show.Show (ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal.TypeRep a) -- Defined in ‘ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal’
instance GHC.Internal.Show.Show GHC.Internal.Data.Dynamic.Dynamic -- Defined in ‘GHC.Internal.Data.Dynamic’
instance forall a b. (GHC.Internal.Show.Show a, GHC.Internal.Show.Show b) => GHC.Internal.Show.Show (GHC.Internal.Data.Either.Either a b) -- Defined in ‘GHC.Internal.Data.Either’
instance forall k (a :: k). Data.Fixed.HasResolution a => GHC.Internal.Show.Show (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’
@@ -12461,13 +12461,13 @@ instance GHC.Internal.Show.Show GHC.Internal.Foreign.C.Types.CWchar -- Defined i
instance forall a. GHC.Internal.Show.Show (GHC.Internal.Foreign.C.ConstPtr.ConstPtr a) -- Defined in ‘GHC.Internal.Foreign.C.ConstPtr’
instance forall a b. (GHC.Internal.Ix.Ix a, GHC.Internal.Show.Show a, GHC.Internal.Show.Show b) => GHC.Internal.Show.Show (GHC.Internal.Arr.Array a b) -- Defined in ‘GHC.Internal.Arr’
instance GHC.Internal.Show.Show GHC.Internal.ByteOrder.ByteOrder -- Defined in ‘GHC.Internal.ByteOrder’
-instance GHC.Internal.Show.Show ghc-internal-9.1002.0:GHC.Internal.Event.Internal.Types.Event -- Defined in ‘ghc-internal-9.1002.0:GHC.Internal.Event.Internal.Types’
-instance GHC.Internal.Show.Show ghc-internal-9.1002.0:GHC.Internal.Event.Internal.Types.EventLifetime -- Defined in ‘ghc-internal-9.1002.0:GHC.Internal.Event.Internal.Types’
-instance GHC.Internal.Show.Show ghc-internal-9.1002.0:GHC.Internal.Event.Internal.Types.Lifetime -- Defined in ‘ghc-internal-9.1002.0:GHC.Internal.Event.Internal.Types’
-instance GHC.Internal.Show.Show ghc-internal-9.1002.0:GHC.Internal.Event.Internal.Types.Timeout -- Defined in ‘ghc-internal-9.1002.0:GHC.Internal.Event.Internal.Types’
-instance GHC.Internal.Show.Show ghc-internal-9.1002.0:GHC.Internal.Event.Manager.FdKey -- Defined in ‘ghc-internal-9.1002.0:GHC.Internal.Event.Manager’
-instance GHC.Internal.Show.Show ghc-internal-9.1002.0:GHC.Internal.Event.Manager.State -- Defined in ‘ghc-internal-9.1002.0:GHC.Internal.Event.Manager’
-instance GHC.Internal.Show.Show ghc-internal-9.1002.0:GHC.Internal.Event.TimerManager.State -- Defined in ‘ghc-internal-9.1002.0:GHC.Internal.Event.TimerManager’
+instance GHC.Internal.Show.Show ghc-internal-9.1001.0:GHC.Internal.Event.Internal.Types.Event -- Defined in ‘ghc-internal-9.1001.0:GHC.Internal.Event.Internal.Types’
+instance GHC.Internal.Show.Show ghc-internal-9.1001.0:GHC.Internal.Event.Internal.Types.EventLifetime -- Defined in ‘ghc-internal-9.1001.0:GHC.Internal.Event.Internal.Types’
+instance GHC.Internal.Show.Show ghc-internal-9.1001.0:GHC.Internal.Event.Internal.Types.Lifetime -- Defined in ‘ghc-internal-9.1001.0:GHC.Internal.Event.Internal.Types’
+instance GHC.Internal.Show.Show ghc-internal-9.1001.0:GHC.Internal.Event.Internal.Types.Timeout -- Defined in ‘ghc-internal-9.1001.0:GHC.Internal.Event.Internal.Types’
+instance GHC.Internal.Show.Show ghc-internal-9.1001.0:GHC.Internal.Event.Manager.FdKey -- Defined in ‘ghc-internal-9.1001.0:GHC.Internal.Event.Manager’
+instance GHC.Internal.Show.Show ghc-internal-9.1001.0:GHC.Internal.Event.Manager.State -- Defined in ‘ghc-internal-9.1001.0:GHC.Internal.Event.Manager’
+instance GHC.Internal.Show.Show ghc-internal-9.1001.0:GHC.Internal.Event.TimerManager.State -- Defined in ‘ghc-internal-9.1001.0:GHC.Internal.Event.TimerManager’
instance GHC.Internal.Show.Show GHC.Internal.Fingerprint.Type.Fingerprint -- Defined in ‘GHC.Internal.Fingerprint.Type’
instance GHC.Internal.Show.Show GHC.Types.Double -- Defined in ‘GHC.Internal.Float’
instance GHC.Internal.Show.Show GHC.Types.Float -- Defined in ‘GHC.Internal.Float’
@@ -12500,7 +12500,7 @@ instance GHC.Internal.Show.Show GHC.Internal.IO.Handle.Types.Handle -- Defined i
instance GHC.Internal.Show.Show GHC.Internal.IO.Handle.Types.HandleType -- Defined in ‘GHC.Internal.IO.Handle.Types’
instance GHC.Internal.Show.Show GHC.Internal.IO.Handle.Types.Newline -- Defined in ‘GHC.Internal.IO.Handle.Types’
instance GHC.Internal.Show.Show GHC.Internal.IO.Handle.Types.NewlineMode -- Defined in ‘GHC.Internal.IO.Handle.Types’
-instance [safe] GHC.Internal.Show.Show ghc-internal-9.1002.0:GHC.Internal.IO.Handle.Lock.Common.FileLockingNotSupported -- Defined in ‘ghc-internal-9.1002.0:GHC.Internal.IO.Handle.Lock.Common’
+instance [safe] GHC.Internal.Show.Show ghc-internal-9.1001.0:GHC.Internal.IO.Handle.Lock.Common.FileLockingNotSupported -- Defined in ‘ghc-internal-9.1001.0:GHC.Internal.IO.Handle.Lock.Common’
instance GHC.Internal.Show.Show GHC.Internal.IO.Handle.HandlePosn -- Defined in ‘GHC.Internal.IO.Handle’
instance GHC.Internal.Show.Show GHC.Internal.IO.IOMode.IOMode -- Defined in ‘GHC.Internal.IO.IOMode’
instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.CCFlags -- Defined in ‘GHC.Internal.RTS.Flags’
@@ -12595,8 +12595,8 @@ instance GHC.Classes.Eq GHC.Internal.Data.Data.ConstrRep -- Defined in ‘GHC.In
instance GHC.Classes.Eq GHC.Internal.Data.Data.DataRep -- Defined in ‘GHC.Internal.Data.Data’
instance GHC.Classes.Eq GHC.Internal.Data.Data.Fixity -- Defined in ‘GHC.Internal.Data.Data’
instance forall k (s :: k). GHC.Classes.Eq (GHC.Internal.Data.Proxy.Proxy s) -- Defined in ‘GHC.Internal.Data.Proxy’
-instance GHC.Classes.Eq ghc-internal-9.1002.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep -- Defined in ‘ghc-internal-9.1002.0:GHC.Internal.Data.Typeable.Internal’
-instance forall k (a :: k). GHC.Classes.Eq (ghc-internal-9.1002.0:GHC.Internal.Data.Typeable.Internal.TypeRep a) -- Defined in ‘ghc-internal-9.1002.0:GHC.Internal.Data.Typeable.Internal’
+instance GHC.Classes.Eq ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep -- Defined in ‘ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal’
+instance forall k (a :: k). GHC.Classes.Eq (ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal.TypeRep a) -- Defined in ‘ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal’
instance forall a b. (GHC.Classes.Eq a, GHC.Classes.Eq b) => GHC.Classes.Eq (GHC.Internal.Data.Either.Either a b) -- Defined in ‘GHC.Internal.Data.Either’
instance forall k (a :: k). GHC.Classes.Eq (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’
instance forall k1 k2 (f :: k1 -> *) (g :: k2 -> k1) (a :: k2). GHC.Classes.Eq (f (g a)) => GHC.Classes.Eq (Data.Functor.Compose.Compose f g a) -- Defined in ‘Data.Functor.Compose’
@@ -12672,13 +12672,13 @@ instance forall a. GHC.Classes.Eq (GHC.Internal.Foreign.C.ConstPtr.ConstPtr a) -
instance forall i e. (GHC.Internal.Ix.Ix i, GHC.Classes.Eq e) => GHC.Classes.Eq (GHC.Internal.Arr.Array i e) -- Defined in ‘GHC.Internal.Arr’
instance forall s i e. GHC.Classes.Eq (GHC.Internal.Arr.STArray s i e) -- Defined in ‘GHC.Internal.Arr’
instance GHC.Classes.Eq GHC.Internal.ByteOrder.ByteOrder -- Defined in ‘GHC.Internal.ByteOrder’
-instance GHC.Classes.Eq ghc-internal-9.1002.0:GHC.Internal.Event.Internal.Types.Event -- Defined in ‘ghc-internal-9.1002.0:GHC.Internal.Event.Internal.Types’
-instance GHC.Classes.Eq ghc-internal-9.1002.0:GHC.Internal.Event.Internal.Types.EventLifetime -- Defined in ‘ghc-internal-9.1002.0:GHC.Internal.Event.Internal.Types’
-instance GHC.Classes.Eq ghc-internal-9.1002.0:GHC.Internal.Event.Internal.Types.Lifetime -- Defined in ‘ghc-internal-9.1002.0:GHC.Internal.Event.Internal.Types’
-instance GHC.Classes.Eq ghc-internal-9.1002.0:GHC.Internal.Event.Manager.FdKey -- Defined in ‘ghc-internal-9.1002.0:GHC.Internal.Event.Manager’
-instance GHC.Classes.Eq ghc-internal-9.1002.0:GHC.Internal.Event.Manager.State -- Defined in ‘ghc-internal-9.1002.0:GHC.Internal.Event.Manager’
+instance GHC.Classes.Eq ghc-internal-9.1001.0:GHC.Internal.Event.Internal.Types.Event -- Defined in ‘ghc-internal-9.1001.0:GHC.Internal.Event.Internal.Types’
+instance GHC.Classes.Eq ghc-internal-9.1001.0:GHC.Internal.Event.Internal.Types.EventLifetime -- Defined in ‘ghc-internal-9.1001.0:GHC.Internal.Event.Internal.Types’
+instance GHC.Classes.Eq ghc-internal-9.1001.0:GHC.Internal.Event.Internal.Types.Lifetime -- Defined in ‘ghc-internal-9.1001.0:GHC.Internal.Event.Internal.Types’
+instance GHC.Classes.Eq ghc-internal-9.1001.0:GHC.Internal.Event.Manager.FdKey -- Defined in ‘ghc-internal-9.1001.0:GHC.Internal.Event.Manager’
+instance GHC.Classes.Eq ghc-internal-9.1001.0:GHC.Internal.Event.Manager.State -- Defined in ‘ghc-internal-9.1001.0:GHC.Internal.Event.Manager’
instance GHC.Classes.Eq GHC.Internal.Event.TimeOut.TimeoutKey -- Defined in ‘GHC.Internal.Event.TimeOut’
-instance GHC.Classes.Eq ghc-internal-9.1002.0:GHC.Internal.Event.TimerManager.State -- Defined in ‘ghc-internal-9.1002.0:GHC.Internal.Event.TimerManager’
+instance GHC.Classes.Eq ghc-internal-9.1001.0:GHC.Internal.Event.TimerManager.State -- Defined in ‘ghc-internal-9.1001.0:GHC.Internal.Event.TimerManager’
instance GHC.Classes.Eq GHC.Internal.Stack.Types.SrcLoc -- Defined in ‘GHC.Internal.Stack.Types’
instance GHC.Classes.Eq GHC.Internal.Exts.SpecConstrAnnotation -- Defined in ‘GHC.Internal.Exts’
instance GHC.Classes.Eq GHC.Internal.Fingerprint.Type.Fingerprint -- Defined in ‘GHC.Internal.Fingerprint.Type’
@@ -12773,8 +12773,8 @@ instance GHC.Classes.Ord GHC.Internal.Unicode.GeneralCategory -- Defined in ‘G
instance forall k (a :: k) (b :: k). GHC.Classes.Ord (a GHC.Internal.Data.Type.Equality.:~: b) -- Defined in ‘GHC.Internal.Data.Type.Equality’
instance forall k1 k2 (a :: k1) (b :: k2). GHC.Classes.Ord (a GHC.Internal.Data.Type.Equality.:~~: b) -- Defined in ‘GHC.Internal.Data.Type.Equality’
instance forall k (s :: k). GHC.Classes.Ord (GHC.Internal.Data.Proxy.Proxy s) -- Defined in ‘GHC.Internal.Data.Proxy’
-instance GHC.Classes.Ord ghc-internal-9.1002.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep -- Defined in ‘ghc-internal-9.1002.0:GHC.Internal.Data.Typeable.Internal’
-instance forall k (a :: k). GHC.Classes.Ord (ghc-internal-9.1002.0:GHC.Internal.Data.Typeable.Internal.TypeRep a) -- Defined in ‘ghc-internal-9.1002.0:GHC.Internal.Data.Typeable.Internal’
+instance GHC.Classes.Ord ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep -- Defined in ‘ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal’
+instance forall k (a :: k). GHC.Classes.Ord (ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal.TypeRep a) -- Defined in ‘ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal’
instance forall a b. (GHC.Classes.Ord a, GHC.Classes.Ord b) => GHC.Classes.Ord (GHC.Internal.Data.Either.Either a b) -- Defined in ‘GHC.Internal.Data.Either’
instance forall k (a :: k). GHC.Classes.Ord (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’
instance forall k1 k2 (f :: k1 -> *) (g :: k2 -> k1) (a :: k2). GHC.Classes.Ord (f (g a)) => GHC.Classes.Ord (Data.Functor.Compose.Compose f g a) -- Defined in ‘Data.Functor.Compose’
=====================================
testsuite/tests/interface-stability/base-exports.stdout-javascript-unknown-ghcjs
=====================================
@@ -315,7 +315,7 @@ module Control.Exception.Backtrace where
type BacktraceMechanism :: *
data BacktraceMechanism = CostCentreBacktrace | HasCallStackBacktrace | ExecutionBacktrace | IPEBacktrace
type Backtraces :: *
- data Backtraces = Backtraces {btrCostCentre :: GHC.Internal.Maybe.Maybe (GHC.Internal.Ptr.Ptr GHC.Internal.Stack.CCS.CostCentreStack), btrHasCallStack :: GHC.Internal.Maybe.Maybe GHC.Internal.Stack.Types.CallStack, btrExecutionStack :: GHC.Internal.Maybe.Maybe [GHC.Internal.ExecutionStack.Internal.Location], btrIpe :: GHC.Internal.Maybe.Maybe [GHC.Internal.Stack.CloneStack.StackEntry]}
+ data Backtraces = ...
collectBacktraces :: (?callStack::GHC.Internal.Stack.Types.CallStack) => GHC.Types.IO Backtraces
displayBacktraces :: Backtraces -> GHC.Internal.Base.String
getBacktraceMechanismState :: BacktraceMechanism -> GHC.Types.IO GHC.Types.Bool
@@ -5187,7 +5187,6 @@ module GHC.Constants where
module GHC.Desugar where
-- Safety: Safe
- (>>>) :: forall (arr :: * -> * -> *) a b c. GHC.Internal.Control.Arrow.Arrow arr => arr a b -> arr b c -> arr a c
type AnnotationWrapper :: *
data AnnotationWrapper = forall a. GHC.Internal.Data.Data.Data a => AnnotationWrapper a
toAnnotationWrapper :: forall a. GHC.Internal.Data.Data.Data a => a -> AnnotationWrapper
=====================================
testsuite/tests/interface-stability/base-exports.stdout-mingw32
=====================================
@@ -315,7 +315,7 @@ module Control.Exception.Backtrace where
type BacktraceMechanism :: *
data BacktraceMechanism = CostCentreBacktrace | HasCallStackBacktrace | ExecutionBacktrace | IPEBacktrace
type Backtraces :: *
- data Backtraces = Backtraces {btrCostCentre :: GHC.Internal.Maybe.Maybe (GHC.Internal.Ptr.Ptr GHC.Internal.Stack.CCS.CostCentreStack), btrHasCallStack :: GHC.Internal.Maybe.Maybe GHC.Internal.Stack.Types.CallStack, btrExecutionStack :: GHC.Internal.Maybe.Maybe [GHC.Internal.ExecutionStack.Internal.Location], btrIpe :: GHC.Internal.Maybe.Maybe [GHC.Internal.Stack.CloneStack.StackEntry]}
+ data Backtraces = ...
collectBacktraces :: (?callStack::GHC.Internal.Stack.Types.CallStack) => GHC.Types.IO Backtraces
displayBacktraces :: Backtraces -> GHC.Internal.Base.String
getBacktraceMechanismState :: BacktraceMechanism -> GHC.Types.IO GHC.Types.Bool
=====================================
testsuite/tests/interface-stability/base-exports.stdout-ws-32
=====================================
@@ -315,7 +315,7 @@ module Control.Exception.Backtrace where
type BacktraceMechanism :: *
data BacktraceMechanism = CostCentreBacktrace | HasCallStackBacktrace | ExecutionBacktrace | IPEBacktrace
type Backtraces :: *
- data Backtraces = Backtraces {btrCostCentre :: GHC.Internal.Maybe.Maybe (GHC.Internal.Ptr.Ptr GHC.Internal.Stack.CCS.CostCentreStack), btrHasCallStack :: GHC.Internal.Maybe.Maybe GHC.Internal.Stack.Types.CallStack, btrExecutionStack :: GHC.Internal.Maybe.Maybe [GHC.Internal.ExecutionStack.Internal.Location], btrIpe :: GHC.Internal.Maybe.Maybe [GHC.Internal.Stack.CloneStack.StackEntry]}
+ data Backtraces = ...
collectBacktraces :: (?callStack::GHC.Internal.Stack.Types.CallStack) => GHC.Types.IO Backtraces
displayBacktraces :: Backtraces -> GHC.Internal.Base.String
getBacktraceMechanismState :: BacktraceMechanism -> GHC.Types.IO GHC.Types.Bool
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/1b256e6399c2453f18837a5b6e1efa4…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/1b256e6399c2453f18837a5b6e1efa4…
You're receiving this email because of your account on gitlab.haskell.org.
1
0
[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 2 commits: level imports: Check the level of exported identifiers
by Marge Bot (@marge-bot) 07 Aug '25
by Marge Bot (@marge-bot) 07 Aug '25
07 Aug '25
Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC
Commits:
467b2357 by Matthew Pickering at 2025-08-07T01:48:07-04:00
level imports: Check the level of exported identifiers
The level imports specification states that exported identifiers have to
be at level 0. This patch adds the requird level checks that all
explicitly mentioned identifiers occur at level 0.
For implicit export specifications (T(..) and module B), only level 0
identifiers are selected for re-export.
ghc-proposal: https://github.com/ghc-proposals/ghc-proposals/pull/705
Fixes #26090
- - - - -
9988a241 by fendor at 2025-08-07T01:48:07-04:00
Bump GHC on darwin CI to 9.10.1
- - - - -
18 changed files:
- .gitlab/darwin/toolchain.nix
- compiler/GHC/Tc/Gen/Export.hs
- compiler/GHC/Types/Name/Reader.hs
- + testsuite/tests/splice-imports/DodgyLevelExport.hs
- + testsuite/tests/splice-imports/DodgyLevelExport.stderr
- + testsuite/tests/splice-imports/DodgyLevelExportA.hs
- + testsuite/tests/splice-imports/LevelImportExports.hs
- + testsuite/tests/splice-imports/LevelImportExports.stdout
- + testsuite/tests/splice-imports/LevelImportExportsA.hs
- testsuite/tests/splice-imports/Makefile
- + testsuite/tests/splice-imports/ModuleExport.hs
- + testsuite/tests/splice-imports/ModuleExport.stderr
- + testsuite/tests/splice-imports/ModuleExportA.hs
- + testsuite/tests/splice-imports/ModuleExportB.hs
- + testsuite/tests/splice-imports/T26090.hs
- + testsuite/tests/splice-imports/T26090.stderr
- + testsuite/tests/splice-imports/T26090A.hs
- testsuite/tests/splice-imports/all.T
Changes:
=====================================
.gitlab/darwin/toolchain.nix
=====================================
@@ -16,18 +16,17 @@ let
ghcBindists = let version = ghc.version; in {
aarch64-darwin = hostPkgs.fetchurl {
url = "https://downloads.haskell.org/ghc/${version}/ghc-${version}-aarch64-apple-d…";
- sha256 = "sha256-c1GTMJf3/yiW/t4QL532EswD5JVlgA4getkfsxj4TaA=";
+ sha256 = "sha256-/6+DtdeossBJIMbjkJwL4h3eJ7rzgNCV+ifoQKOi6AQ=";
};
x86_64-darwin = hostPkgs.fetchurl {
url = "https://downloads.haskell.org/ghc/${version}/ghc-${version}-x86_64-apple-da…";
- sha256 = "sha256-LrYniMG0phsvyW6dhQC+3ompvzcxnwAe6GezEqqzoTQ=";
+ sha256 = "sha256-jPIhiJMOENesUnDUJeIaPatgavc6ZVSTY5NFIAxlC+k=";
};
};
ghc = pkgs.stdenv.mkDerivation rec {
- # Using 9.6.2 because of #24050
- version = "9.6.2";
+ version = "9.10.1";
name = "ghc";
src = ghcBindists.${pkgs.stdenv.hostPlatform.system};
configureFlags = [
=====================================
compiler/GHC/Tc/Gen/Export.hs
=====================================
@@ -23,6 +23,7 @@ import GHC.Rename.Module
import GHC.Rename.Names
import GHC.Rename.Env
import GHC.Rename.Unbound ( reportUnboundName )
+import GHC.Rename.Splice
import GHC.Unit.Module
import GHC.Unit.Module.Imported
import GHC.Unit.Module.Warnings
@@ -312,7 +313,7 @@ exports_from_avail Nothing rdr_env _imports _this_mod
; addDiagnostic
(TcRnMissingExportList $ moduleName _this_mod)
; let avails =
- map fix_faminst . gresToAvailInfo
+ map fix_faminst . gresToAvailInfo . mapMaybe pickLevelZeroGRE
. filter isLocalGRE . globalRdrEnvElts $ rdr_env
; return (Nothing, emptyDefaultEnv, avails, []) }
where
@@ -384,6 +385,7 @@ exports_from_avail (Just (L _ rdr_items)) rdr_env imports this_mod
= do { let { exportValid = (mod `elem` imported_modules)
|| (moduleName this_mod == mod)
; gre_prs = pickGREsModExp mod (globalRdrEnvElts rdr_env)
+ -- NB: this filters out non level 0 exports
; new_gres = [ gre'
| (gre, _) <- gre_prs
, gre' <- expand_tyty_gre gre ]
@@ -451,6 +453,7 @@ exports_from_avail (Just (L _ rdr_items)) rdr_env imports this_mod
let avail = availFromGRE gre
name = greName gre
+ checkThLocalNameNoLift (ieLWrappedUserRdrName l name)
occs' <- check_occs occs ie [gre]
(export_warn_spans', dont_warn_export', warn_txt_rn)
<- process_warning export_warn_spans
@@ -499,6 +502,7 @@ exports_from_avail (Just (L _ rdr_items)) rdr_env imports this_mod
occs' <- check_occs occs ie [gre]
return (Just avail, occs', exp_dflts)
+ checkThLocalNameNoLift (ieLWrappedUserRdrName l name)
(export_warn_spans', dont_warn_export', warn_txt_rn)
<- process_warning export_warn_spans
dont_warn_export
@@ -526,6 +530,7 @@ exports_from_avail (Just (L _ rdr_items)) rdr_env imports this_mod
all_gres = par : all_kids
all_names = map greName all_gres
+ checkThLocalNameNoLift (ieLWrappedUserRdrName l name)
occs' <- check_occs occs ie all_gres
(export_warn_spans', dont_warn_export', warn_txt_rn)
<- process_warning export_warn_spans
@@ -563,6 +568,7 @@ exports_from_avail (Just (L _ rdr_items)) rdr_env imports this_mod
all_gres = par : all_kids
all_names = map greName all_gres
+ checkThLocalNameNoLift (ieLWrappedUserRdrName l name)
occs' <- check_occs occs ie all_gres
(export_warn_spans', dont_warn_export', warn_txt_rn)
<- process_warning export_warn_spans
@@ -589,17 +595,19 @@ exports_from_avail (Just (L _ rdr_items)) rdr_env imports this_mod
lookup_ie_kids_all :: IE GhcPs -> LIEWrappedName GhcPs -> GlobalRdrElt
-> RnM [GlobalRdrElt]
- lookup_ie_kids_all ie (L _ rdr) gre =
+ lookup_ie_kids_all ie (L _loc rdr) gre =
do { let name = greName gre
gres = findChildren kids_env name
- ; addUsedKids (ieWrappedName rdr) gres
- ; when (null gres) $
+ -- We only choose level 0 exports when filling in part of an export list implicitly.
+ ; let kids_0 = mapMaybe pickLevelZeroGRE gres
+ ; addUsedKids (ieWrappedName rdr) kids_0
+ ; when (null kids_0) $
if isTyConName name
then addTcRnDiagnostic (TcRnDodgyExports gre)
else -- This occurs when you export T(..), but
-- only import T abstractly, or T is a synonym.
addErr (TcRnExportHiddenComponents ie)
- ; return gres }
+ ; return kids_0 }
-------------
@@ -696,6 +704,10 @@ exports_from_avail (Just (L _ rdr_items)) rdr_env imports this_mod
addUsedKids parent_rdr kid_gres
= addUsedGREs ExportDeprecationWarnings (pickGREs parent_rdr kid_gres)
+
+ieLWrappedUserRdrName :: LIEWrappedName GhcPs -> Name -> LIdOccP GhcRn
+ieLWrappedUserRdrName l n = fmap (\rdr -> WithUserRdr rdr n) $ ieLWrappedName l
+
-- | In what namespaces should we go looking for an import/export item
-- that is out of scope, for suggestions in error messages?
ieWrappedNameWhatLooking :: IEWrappedName GhcPs -> WhatLooking
@@ -800,6 +812,7 @@ lookupChildrenExport parent_gre rdr_items = mapAndReportM doOne rdr_items
; return (L l (IEName noExtField (L (l2l l) ub)), gre)}
FoundChild child@(GRE { gre_name = child_nm, gre_par = par }) ->
do { checkPatSynParent spec_parent par child_nm
+ ; checkThLocalNameNoLift (ieLWrappedUserRdrName n child_nm)
; return (replaceLWrappedName n child_nm, child)
}
IncorrectParent p c gs -> failWithDcErr (parentGRE_name p) (greName c) gs
=====================================
compiler/GHC/Types/Name/Reader.hs
=====================================
@@ -69,7 +69,7 @@ module GHC.Types.Name.Reader (
lookupGRE_Name,
lookupGRE_FieldLabel,
getGRE_NameQualifier_maybes,
- transformGREs, pickGREs, pickGREsModExp,
+ transformGREs, pickGREs, pickGREsModExp, pickLevelZeroGRE,
-- * GlobalRdrElts
availFromGRE,
@@ -144,7 +144,7 @@ import GHC.Utils.Panic
import GHC.Utils.Binary
import Control.DeepSeq
-import Control.Monad ( guard )
+import Control.Monad ( guard , (>=>) )
import Data.Data
import Data.List ( sort )
import qualified Data.List.NonEmpty as NE
@@ -641,7 +641,7 @@ greParent = gre_par
greInfo :: GlobalRdrElt -> GREInfo
greInfo = gre_info
-greLevels :: GlobalRdrElt -> Set.Set ImportLevel
+greLevels :: GlobalRdrEltX info -> Set.Set ImportLevel
greLevels g =
if gre_lcl g then Set.singleton NormalLevel
else Set.fromList (bagToList (fmap (is_level . is_decl) (gre_imp g)))
@@ -1604,7 +1604,14 @@ pickGREsModExp :: ModuleName -> [GlobalRdrEltX info] -> [(GlobalRdrEltX info,Glo
--
-- Used only for the 'module M' item in export list;
-- see 'GHC.Tc.Gen.Export.exports_from_avail'
-pickGREsModExp mod gres = mapMaybe (pickBothGRE mod) gres
+-- This function also only chooses GREs which are at level zero.
+pickGREsModExp mod gres = mapMaybe (pickLevelZeroGRE >=> pickBothGRE mod) gres
+
+pickLevelZeroGRE :: GlobalRdrEltX info -> Maybe (GlobalRdrEltX info)
+pickLevelZeroGRE gre =
+ if NormalLevel `Set.member` greLevels gre
+ then Just gre
+ else Nothing
-- | isBuiltInSyntax filter out names for built-in syntax They
-- just clutter up the environment (esp tuples), and the
=====================================
testsuite/tests/splice-imports/DodgyLevelExport.hs
=====================================
@@ -0,0 +1,5 @@
+{-# LANGUAGE ExplicitLevelImports #-}
+module DodgyLevelExport ( T(..) ) where
+
+import quote DodgyLevelExportA
+import DodgyLevelExportA (T)
=====================================
testsuite/tests/splice-imports/DodgyLevelExport.stderr
=====================================
@@ -0,0 +1,4 @@
+DodgyLevelExport.hs:2:27: warning: [GHC-75356] [-Wdodgy-exports (in -Wextra)]
+ The export item ‘T(..)’ suggests that
+ ‘T’ has (in-scope) constructors or record fields, but it has none
+
=====================================
testsuite/tests/splice-imports/DodgyLevelExportA.hs
=====================================
@@ -0,0 +1,3 @@
+module DodgyLevelExportA where
+
+data T = T { a :: Int }
=====================================
testsuite/tests/splice-imports/LevelImportExports.hs
=====================================
@@ -0,0 +1,6 @@
+{-# LANGUAGE ExplicitLevelImports #-}
+module LevelImportExports ( module LevelImportExportsA, T(..) ) where
+
+import quote LevelImportExportsA
+import splice LevelImportExportsA
+import LevelImportExportsA(a, T)
=====================================
testsuite/tests/splice-imports/LevelImportExports.stdout
=====================================
@@ -0,0 +1,6 @@
+[1 of 2] Compiling LevelImportExportsA ( LevelImportExportsA.hs, LevelImportExportsA.o )
+[2 of 2] Compiling LevelImportExports ( LevelImportExports.hs, LevelImportExports.o )
+exports:
+ LevelImportExportsA.a
+ LevelImportExportsA.T
+defaults:
=====================================
testsuite/tests/splice-imports/LevelImportExportsA.hs
=====================================
@@ -0,0 +1,6 @@
+module LevelImportExportsA where
+
+a = 100
+b = 100
+
+data T = T { c :: Int }
=====================================
testsuite/tests/splice-imports/Makefile
=====================================
@@ -24,5 +24,9 @@ SI10_oneshot:
"$(TEST_HC)" $(TEST_HC_OPTS) -c InstanceA.hs
"$(TEST_HC)" $(TEST_HC_OPTS) -c SI10.hs
+LevelImportExports:
+ "$(TEST_HC)" $(TEST_HC_OPTS) -haddock LevelImportExports.hs
+ "$(TEST_HC)" --show-iface LevelImportExports.hi | grep -A3 "^exports:"
+
clean:
rm -f *.o *.hi
=====================================
testsuite/tests/splice-imports/ModuleExport.hs
=====================================
@@ -0,0 +1,4 @@
+module ModuleExport where
+
+-- Should fail
+import ModuleExportA (a)
=====================================
testsuite/tests/splice-imports/ModuleExport.stderr
=====================================
@@ -0,0 +1,3 @@
+ModuleExport.hs:4:23: error: [GHC-61689]
+ Module ‘ModuleExportA’ does not export ‘a’.
+
=====================================
testsuite/tests/splice-imports/ModuleExportA.hs
=====================================
@@ -0,0 +1,8 @@
+{-# LANGUAGE ExplicitLevelImports #-}
+-- Module export only exports level 0 things (b)
+module ModuleExportA (module ModuleExportB) where
+
+-- Everything at level 1
+import quote ModuleExportB
+-- Only b at level 0
+import ModuleExportB (b)
=====================================
testsuite/tests/splice-imports/ModuleExportB.hs
=====================================
@@ -0,0 +1,6 @@
+module ModuleExportB where
+
+a = ()
+b = ()
+
+
=====================================
testsuite/tests/splice-imports/T26090.hs
=====================================
@@ -0,0 +1,10 @@
+{-# LANGUAGE ExplicitLevelImports, TemplateHaskell #-}
+module T26090 ( a --varaible
+ , T(..) -- WithAll
+ , S(s) -- With
+ , R -- Abs
+ ) where
+
+import quote T26090A
+import T26090A (T(T), S)
+
=====================================
testsuite/tests/splice-imports/T26090.stderr
=====================================
@@ -0,0 +1,16 @@
+T26090.hs:2:17: error: [GHC-28914]
+ • Level error: ‘a’ is bound at level 1 but used at level 0
+ • Available from the imports:
+ • imported from ‘T26090A’ at 1 at T26090.hs:8:1-20
+
+T26090.hs:4:17: error: [GHC-28914]
+ • Level error: ‘s’ is bound at level 1 but used at level 0
+ • Available from the imports:
+ • imported from ‘T26090A’ at 1 at T26090.hs:8:1-20
+ • In the export: S(s)
+
+T26090.hs:5:17: error: [GHC-28914]
+ • Level error: ‘R’ is bound at level 1 but used at level 0
+ • Available from the imports:
+ • imported from ‘T26090A’ at 1 at T26090.hs:8:1-20
+
=====================================
testsuite/tests/splice-imports/T26090A.hs
=====================================
@@ -0,0 +1,14 @@
+{-# LANGUAGE ExplicitLevelImports, TemplateHaskell #-}
+module T26090A where
+
+import Language.Haskell.TH
+
+a :: Q Exp
+a = [| True |]
+
+data T = T { t :: () }
+
+data S = S { s :: () }
+
+data R = R { r :: () }
+
=====================================
testsuite/tests/splice-imports/all.T
=====================================
@@ -48,3 +48,7 @@ test('SI35',
test('SI36', [extra_files(["SI36_A.hs", "SI36_B1.hs", "SI36_B2.hs", "SI36_B3.hs", "SI36_C1.hs", "SI36_C2.hs", "SI36_C3.hs"])], multimod_compile_fail, ['SI36', '-v0'])
test('T26087', [], multimod_compile_fail, ['T26087A', ''])
test('T26088', [], multimod_compile_fail, ['T26088A', '-v0'])
+test('T26090', [], multimod_compile_fail, ['T26090', '-v0'])
+test('ModuleExport', [], multimod_compile_fail, ['ModuleExport', '-v0'])
+test('LevelImportExports', [], makefile_test, [])
+test('DodgyLevelExport', [], multimod_compile, ['DodgyLevelExport', '-v0 -Wdodgy-exports'])
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/61b099b69242dff7905e344f6f92a2…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/61b099b69242dff7905e344f6f92a2…
You're receiving this email because of your account on gitlab.haskell.org.
1
0
07 Aug '25
Cheng Shao pushed new branch wip/romes/26227.bak at Glasgow Haskell Compiler / GHC
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/romes/26227.bak
You're receiving this email because of your account on gitlab.haskell.org.
1
0
[Git][ghc/ghc][wip/bytecode-serialize-3] 2 commits: compiler: WIP GHC.ByteCode.Serialize
by Cheng Shao (@TerrorJack) 07 Aug '25
by Cheng Shao (@TerrorJack) 07 Aug '25
07 Aug '25
Cheng Shao pushed to branch wip/bytecode-serialize-3 at Glasgow Haskell Compiler / GHC
Commits:
636f8ce7 by Cheng Shao at 2025-08-07T03:38:16+00:00
compiler: WIP GHC.ByteCode.Serialize
- - - - -
b0b466a5 by Cheng Shao at 2025-08-07T03:38:39+00:00
driver: test bytecode roundtrip serialization
- - - - -
4 changed files:
- + compiler/GHC/ByteCode/Serialize.hs
- compiler/GHC/Driver/Main.hs
- compiler/GHC/Utils/Binary.hs
- compiler/ghc.cabal.in
Changes:
=====================================
compiler/GHC/ByteCode/Serialize.hs
=====================================
@@ -0,0 +1,296 @@
+{-# LANGUAGE MultiWayIf #-}
+{-# LANGUAGE RecordWildCards #-}
+{-# OPTIONS_GHC -Wno-orphans #-}
+
+module GHC.ByteCode.Serialize (testBinByteCode) where
+
+import GHC.Prelude
+import GHC.Utils.Binary
+import GHC.ByteCode.Breakpoints
+import GHC.ByteCode.Types
+import GHC.Utils.Exception
+import GHC.Data.FlatBag as FlatBag
+import GHCi.FFI
+import GHC.Builtin.PrimOps
+import GHC.Driver.Env
+import GHC.Types.Name
+import Data.Proxy
+import GHC.Data.FastString
+import Data.IORef
+import GHC.Types.Name.Cache
+import GHC.Types.SrcLoc
+import GHC.Types.SptEntry
+import GHC.Builtin.Types
+import GHC.Types.Id
+import Data.Word
+import qualified Data.ByteString.Lazy as LBS
+import qualified Data.Binary as Binary
+import GHCi.Message
+import Data.Foldable
+import Control.Monad
+import GHC.Iface.Binary
+import GHC.Utils.TmpFs
+import System.FilePath
+
+testBinByteCode :: HscEnv -> CompiledByteCode -> IO CompiledByteCode
+testBinByteCode hsc_env cbc = withSystemTempDirectory "ghc-bbc" $ \tmpdir -> do
+ let f = tmpdir </> "ghc-bbc"
+ roundtripBinByteCode hsc_env f cbc
+
+roundtripBinByteCode :: HscEnv -> FilePath -> CompiledByteCode -> IO CompiledByteCode
+roundtripBinByteCode hsc_env f cbc = do
+ writeBinByteCode f cbc
+ readBinByteCode hsc_env f
+
+readBinByteCode :: HscEnv -> FilePath -> IO CompiledByteCode
+readBinByteCode hsc_env f = do
+ bh' <- readBinMem f
+ bh <- addSerializableNameReader hsc_env bh'
+ getWithUserData (hsc_NC hsc_env) bh
+
+writeBinByteCode :: FilePath -> CompiledByteCode -> IO ()
+writeBinByteCode f cbc = do
+ bh' <- openBinMem (1024*1024)
+ bh <- addSerializableNameWriter bh'
+ putWithUserData QuietBinIFace NormalCompression bh cbc
+ writeBinMem bh f
+
+instance Binary CompiledByteCode where
+ get bh = do
+ bc_bcos <- get bh
+ bc_itbls_len <- get bh
+ bc_itbls <- replicateM bc_itbls_len $ do
+ nm <- getViaSerializableName bh
+ itbl <- get bh
+ pure (nm, itbl)
+ bc_strs_len <- get bh
+ bc_strs <-
+ replicateM bc_strs_len
+ $ (,)
+ <$> getViaSerializableName bh
+ <*> get bh
+ bc_breaks <- get bh
+ bc_spt_entries <- get bh
+ evaluate
+ CompiledByteCode
+ { bc_bcos,
+ bc_itbls,
+ bc_strs,
+ bc_breaks,
+ bc_spt_entries
+ }
+
+ put_ bh CompiledByteCode {..} = do
+ put_ bh bc_bcos
+ put_ bh $ length bc_itbls
+ for_ bc_itbls
+ $ \(nm, itbl) -> do
+ putViaSerializableName bh nm
+ put_ bh itbl
+ put_ bh $ length bc_strs
+ for_ bc_strs
+ $ \(nm, str) -> putViaSerializableName bh nm *> put_ bh str
+ put_ bh bc_breaks
+ put_ bh bc_spt_entries
+
+instance Binary InternalModBreaks where
+ get bh = InternalModBreaks <$> get bh <*> get bh
+
+ put_ bh InternalModBreaks {..} = put_ bh imodBreaks_breakInfo *> put_ bh imodBreaks_modBreaks
+
+instance Binary ModBreaks where
+ get bh = ModBreaks <$> get bh <*> get bh <*> get bh <*> get bh <*> get bh
+
+ put_ bh ModBreaks {..} = put_ bh modBreaks_locs *> put_ bh modBreaks_vars *> put_ bh modBreaks_decls *> put_ bh modBreaks_ccs *> put_ bh modBreaks_module
+
+instance Binary SrcSpan where
+ get bh = unBinSrcSpan <$> get bh
+
+ put_ bh = put_ bh . BinSrcSpan
+
+instance Binary CgBreakInfo where
+ put_ bh CgBreakInfo {..} = put_ bh cgb_tyvars *> put_ bh cgb_vars *> put_ bh cgb_resty *> put_ bh cgb_tick_id
+
+ get bh = CgBreakInfo <$> get bh <*> get bh <*> get bh <*> get bh
+
+instance Binary ConInfoTable where
+ get bh = Binary.decode . LBS.fromStrict <$> get bh
+
+ put_ bh = put_ bh . LBS.toStrict . Binary.encode
+
+
+instance Binary UnlinkedBCO where
+ get bh =
+ UnlinkedBCO
+ <$> getViaSerializableName bh
+ <*> get bh
+ <*> (Binary.decode . LBS.fromStrict <$> get bh)
+ <*> (Binary.decode . LBS.fromStrict <$> get bh)
+ <*> get bh
+ <*> get bh
+
+ put_ bh UnlinkedBCO {..} = do
+ putViaSerializableName bh unlinkedBCOName
+ put_ bh unlinkedBCOArity
+ put_ bh $ LBS.toStrict $ Binary.encode unlinkedBCOInstrs
+ put_ bh $ LBS.toStrict $ Binary.encode unlinkedBCOBitmap
+ put_ bh unlinkedBCOLits
+ put_ bh unlinkedBCOPtrs
+
+instance Binary BCOPtr where
+ get bh = do
+ t <- getByte bh
+ case t of
+ 0 -> BCOPtrName <$> getViaSerializableName bh
+ 1 -> BCOPtrPrimOp <$> get bh
+ 2 -> BCOPtrBCO <$> get bh
+ _ -> BCOPtrBreakArray <$> get bh
+
+ put_ bh ptr = case ptr of
+ BCOPtrName nm -> putByte bh 0 *> putViaSerializableName bh nm
+ BCOPtrPrimOp op -> putByte bh 1 *> put_ bh op
+ BCOPtrBCO bco -> putByte bh 2 *> put_ bh bco
+ BCOPtrBreakArray info_mod -> putByte bh 3 *> put_ bh info_mod
+
+instance Binary BCONPtr where
+ get bh = do
+ t <- getByte bh
+ case t of
+ 0 -> BCONPtrWord . fromIntegral <$> (get bh :: IO Word64)
+ 1 -> BCONPtrLbl <$> get bh
+ 2 -> BCONPtrItbl <$> getViaSerializableName bh
+ 3 -> BCONPtrAddr <$> getViaSerializableName bh
+ 4 -> BCONPtrStr <$> get bh
+ 5 -> BCONPtrFS <$> get bh
+ 6 -> BCONPtrFFIInfo <$> get bh
+ _ -> BCONPtrCostCentre <$> get bh
+
+ put_ bh ptr = case ptr of
+ BCONPtrWord lit -> putByte bh 0 *> put_ bh (fromIntegral lit :: Word64)
+ BCONPtrLbl sym -> putByte bh 1 *> put_ bh sym
+ BCONPtrItbl nm -> putByte bh 2 *> putViaSerializableName bh nm
+ BCONPtrAddr nm -> putByte bh 3 *> putViaSerializableName bh nm
+ BCONPtrStr str -> putByte bh 4 *> put_ bh str
+ BCONPtrFS fs -> putByte bh 5 *> put_ bh fs
+ BCONPtrFFIInfo ffi -> putByte bh 6 *> put_ bh ffi
+ BCONPtrCostCentre ibi -> putByte bh 7 *> put_ bh ibi
+
+instance Binary InternalBreakLoc where
+ get bh = InternalBreakLoc <$> get bh
+
+ put_ bh InternalBreakLoc {..} = put_ bh internalBreakLoc
+
+instance Binary BreakpointId where
+ get bh = BreakpointId <$> get bh <*> get bh
+
+ put_ bh BreakpointId {..} = put_ bh bi_tick_mod *> put_ bh bi_tick_index
+
+instance Binary InternalBreakpointId where
+ get bh = InternalBreakpointId <$> get bh <*> get bh
+
+ put_ bh InternalBreakpointId {..} = put_ bh ibi_info_mod *> put_ bh ibi_info_index
+
+instance Binary SptEntry where
+ get bh = do
+ nm <- getViaSerializableName bh
+ fp <- get bh
+ pure $ SptEntry (mkVanillaGlobal nm anyTy) fp
+
+ put_ bh (SptEntry nm fp) = putViaSerializableName bh (getName nm) *> put_ bh fp
+
+
+newtype SerializableName = SerializableName {unSerializableName :: Name}
+
+getViaSerializableName :: ReadBinHandle -> IO Name
+getViaSerializableName bh = case findUserDataReader Proxy bh of
+ BinaryReader f -> unSerializableName <$> f bh
+
+putViaSerializableName :: WriteBinHandle -> Name -> IO ()
+putViaSerializableName bh nm = case findUserDataWriter Proxy bh of
+ BinaryWriter f -> f bh $ SerializableName nm
+
+addSerializableNameWriter :: WriteBinHandle -> IO WriteBinHandle
+addSerializableNameWriter bh' =
+ evaluate
+ $ flip addWriterToUserData bh'
+ $ BinaryWriter
+ $ \bh
+ ( SerializableName
+ nm
+ ) ->
+ if
+ | isExternalName nm -> do
+ putByte bh 0
+ put_ bh nm
+ | otherwise -> do
+ putByte bh 1
+ put_ bh $ occNameFS (occName nm) `appendFS` mkFastString (show $ nameUnique nm)
+
+addSerializableNameReader :: HscEnv -> ReadBinHandle -> IO ReadBinHandle
+addSerializableNameReader HscEnv {..} bh' = do
+ nc <- evaluate hsc_NC
+ env_ref <- newIORef emptyOccEnv
+ evaluate $ flip addReaderToUserData bh' $ BinaryReader $ \bh -> do
+ t <- getByte bh
+ case t of
+ 0 -> do
+ nm <- get bh
+ evaluate $ SerializableName nm
+ _ -> do
+ occ <- mkVarOccFS <$> get bh
+ u <- takeUniqFromNameCache nc
+ nm' <- evaluate $ mkInternalName u occ noSrcSpan
+ fmap SerializableName
+ $ atomicModifyIORef' env_ref
+ $ \env -> case lookupOccEnv env occ of
+ Just nm -> (env, nm)
+ _ -> (extendOccEnv env occ nm', nm')
+
+instance Binary PrimOp where
+ get bh = (allThePrimOps !!) <$> get bh
+
+ put_ bh = put_ bh . primOpTag
+
+instance Binary FFIInfo where
+ get bh = FFIInfo <$> get bh <*> get bh
+
+ put_ bh FFIInfo {..} = put_ bh ffiInfoArgs *> put_ bh ffiInfoRet
+
+instance Binary FFIType where
+ get bh = do
+ t <- getByte bh
+ evaluate $ case t of
+ 0 -> FFIVoid
+ 1 -> FFIPointer
+ 2 -> FFIFloat
+ 3 -> FFIDouble
+ 4 -> FFISInt8
+ 5 -> FFISInt16
+ 6 -> FFISInt32
+ 7 -> FFISInt64
+ 8 -> FFIUInt8
+ 9 -> FFIUInt16
+ 10 -> FFIUInt32
+ _ -> FFIUInt64
+
+ put_ bh t = putByte bh $ case t of
+ FFIVoid -> 0
+ FFIPointer -> 1
+ FFIFloat -> 2
+ FFIDouble -> 3
+ FFISInt8 -> 4
+ FFISInt16 -> 5
+ FFISInt32 -> 6
+ FFISInt64 -> 7
+ FFIUInt8 -> 8
+ FFIUInt16 -> 9
+ FFIUInt32 -> 10
+ FFIUInt64 -> 11
+
+
+instance (Binary a) => Binary (FlatBag a) where
+ get bh = do
+ xs <- get bh
+ evaluate $ FlatBag.fromList (fromIntegral $ length xs) xs
+
+ put_ bh = put_ bh . FlatBag.elemsFlatBag
=====================================
compiler/GHC/Driver/Main.hs
=====================================
@@ -305,6 +305,8 @@ import Data.Bifunctor
import qualified GHC.Unit.Home.Graph as HUG
import GHC.Unit.Home.PackageTable
+import GHC.ByteCode.Serialize
+
{- **********************************************************************
%* *
Initialisation
@@ -2169,7 +2171,8 @@ generateByteCode :: HscEnv
-> ModLocation
-> IO (CompiledByteCode, [FilePath])
generateByteCode hsc_env cgguts mod_location = do
- (hasStub, comp_bc) <- hscInteractive hsc_env cgguts mod_location
+ (hasStub, comp_bc') <- hscInteractive hsc_env cgguts mod_location
+ comp_bc <- testBinByteCode hsc_env comp_bc'
compile_for_interpreter hsc_env $ \ i_env -> do
stub_o <- traverse (compileForeign i_env LangC) hasStub
foreign_files_o <- traverse (uncurry (compileForeign i_env)) (cgi_foreign_files cgguts)
=====================================
compiler/GHC/Utils/Binary.hs
=====================================
@@ -929,6 +929,12 @@ instance Binary Char where
put_ bh c = put_ bh (fromIntegral (ord c) :: Word32)
get bh = do x <- get bh; return $! (chr (fromIntegral (x :: Word32)))
+instance Binary Word where
+ put_ bh i = put_ bh (fromIntegral i :: Word64)
+ get bh = do
+ x <- get bh
+ return $! (fromIntegral (x :: Word64))
+
instance Binary Int where
put_ bh i = put_ bh (fromIntegral i :: Int64)
get bh = do
=====================================
compiler/ghc.cabal.in
=====================================
@@ -228,6 +228,7 @@ Library
GHC.ByteCode.InfoTable
GHC.ByteCode.Instr
GHC.ByteCode.Linker
+ GHC.ByteCode.Serialize
GHC.ByteCode.Types
GHC.Cmm
GHC.Cmm.BlockId
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/2e6004b419b0c451e9590b9d2a5545…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/2e6004b419b0c451e9590b9d2a5545…
You're receiving this email because of your account on gitlab.haskell.org.
1
0
[Git][ghc/ghc][wip/fix-26109] Resolving issues #20645 and #26109
by recursion-ninja (@recursion-ninja) 07 Aug '25
by recursion-ninja (@recursion-ninja) 07 Aug '25
07 Aug '25
recursion-ninja pushed to branch wip/fix-26109 at Glasgow Haskell Compiler / GHC
Commits:
9fbadea8 by Recursion Ninja at 2025-08-06T21:10:52-04:00
Resolving issues #20645 and #26109
Correctly sign extending and casting smaller bit width types for LLVM operations:
- bitReverse8#
- bitReverse16#
- bitReverse32#
- byteSwap16#
- byteSwap32#
- pdep8#
- pdep16#
- pext8#
- pext16#
- - - - -
2 changed files:
- compiler/GHC/CmmToLlvm/CodeGen.hs
- testsuite/tests/numeric/should_run/foundation.hs
Changes:
=====================================
compiler/GHC/CmmToLlvm/CodeGen.hs
=====================================
@@ -230,23 +230,25 @@ genCall t@(PrimTarget (MO_Prefetch_Data localityInt)) [] args
statement $ Expr $ Call StdCall fptr (argVars' ++ argSuffix) []
| otherwise = panic $ "prefetch locality level integer must be between 0 and 3, given: " ++ (show localityInt)
--- Handle PopCnt, Clz, Ctz, and BSwap that need to only convert arg
--- and return types
-genCall t@(PrimTarget (MO_PopCnt w)) dsts args =
- genCallSimpleCast w t dsts args
-
-genCall t@(PrimTarget (MO_Pdep w)) dsts args =
- genCallSimpleCast2 w t dsts args
-genCall t@(PrimTarget (MO_Pext w)) dsts args =
- genCallSimpleCast2 w t dsts args
-genCall t@(PrimTarget (MO_Clz w)) dsts args =
- genCallSimpleCast w t dsts args
-genCall t@(PrimTarget (MO_Ctz w)) dsts args =
- genCallSimpleCast w t dsts args
-genCall t@(PrimTarget (MO_BSwap w)) dsts args =
- genCallSimpleCast w t dsts args
-genCall t@(PrimTarget (MO_BRev w)) dsts args =
- genCallSimpleCast w t dsts args
+-- Handle PopCnt, Clz, Ctz, BRev, and BSwap that need to only convert arg and return types
+genCall (PrimTarget op@(MO_PopCnt w)) [dst] args =
+ genCallSimpleCast w op dst args
+genCall (PrimTarget op@(MO_Clz w)) [dst] args =
+ genCallSimpleCast w op dst args
+genCall (PrimTarget op@(MO_Ctz w)) [dst] args =
+ genCallSimpleCast w op dst args
+genCall (PrimTarget op@(MO_BRev w)) [dst] args =
+ genCallSimpleCast w op dst args
+genCall (PrimTarget op@(MO_BSwap w)) [dst] args =
+ genCallSimpleCast w op dst args
+
+-- Handle Pdep and Pext that (may) require using a type with a larger bit-width
+-- than the specified but width. This register width-extension is particualarly
+-- necessary for W8 and W16.
+genCall (PrimTarget op@(MO_Pdep w)) [dst] args =
+ genCallCastWithMinWidthOf W32 w op dst args
+genCall (PrimTarget op@(MO_Pext w)) [dst] args =
+ genCallCastWithMinWidthOf W32 w op dst args
genCall (PrimTarget (MO_AtomicRMW width amop)) [dst] [addr, n] = runStmtsDecls $ do
addrVar <- exprToVarW addr
@@ -640,63 +642,35 @@ genCallExtract _ _ _ _ =
-- since GHC only really has i32 and i64 types and things like Word8 are backed
-- by an i32 and just present a logical i8 range. So we must handle conversions
-- from i32 to i8 explicitly as LLVM is strict about types.
-genCallSimpleCast :: Width -> ForeignTarget -> [CmmFormal] -> [CmmActual]
- -> LlvmM StmtData
-genCallSimpleCast w t@(PrimTarget op) [dst] args = do
- let width = widthToLlvmInt w
- dstTy = cmmToLlvmType $ localRegType dst
-
- fname <- cmmPrimOpFunctions op
- (fptr, _, top3) <- getInstrinct fname width [width]
-
- (dstV, _dst_ty) <- getCmmReg (CmmLocal dst)
-
- let (_, arg_hints) = foreignTargetHints t
- let args_hints = zip args arg_hints
- (argsV, stmts2, top2) <- arg_vars args_hints ([], nilOL, [])
- (argsV', stmts4) <- castVars Signed $ zip argsV [width]
- (retV, s1) <- doExpr width $ Call StdCall fptr argsV' []
- (retVs', stmts5) <- castVars (cmmPrimOpRetValSignage op) [(retV,dstTy)]
- let retV' = singletonPanic "genCallSimpleCast" retVs'
- let s2 = Store retV' dstV Nothing []
-
- let stmts = stmts2 `appOL` stmts4 `snocOL`
- s1 `appOL` stmts5 `snocOL` s2
- return (stmts, top2 ++ top3)
-genCallSimpleCast _ _ dsts _ =
- panic ("genCallSimpleCast: " ++ show (length dsts) ++ " dsts")
-
--- Handle simple function call that only need simple type casting, of the form:
--- truncate arg >>= \a -> call(a) >>= zext
---
--- since GHC only really has i32 and i64 types and things like Word8 are backed
--- by an i32 and just present a logical i8 range. So we must handle conversions
--- from i32 to i8 explicitly as LLVM is strict about types.
-genCallSimpleCast2 :: Width -> ForeignTarget -> [CmmFormal] -> [CmmActual]
- -> LlvmM StmtData
-genCallSimpleCast2 w t@(PrimTarget op) [dst] args = do
- let width = widthToLlvmInt w
- dstTy = cmmToLlvmType $ localRegType dst
-
- fname <- cmmPrimOpFunctions op
- (fptr, _, top3) <- getInstrinct fname width (const width <$> args)
-
- (dstV, _dst_ty) <- getCmmReg (CmmLocal dst)
-
- let (_, arg_hints) = foreignTargetHints t
- let args_hints = zip args arg_hints
- (argsV, stmts2, top2) <- arg_vars args_hints ([], nilOL, [])
- (argsV', stmts4) <- castVars Signed $ zip argsV (const width <$> argsV)
- (retV, s1) <- doExpr width $ Call StdCall fptr argsV' []
- (retVs', stmts5) <- castVars (cmmPrimOpRetValSignage op) [(retV,dstTy)]
- let retV' = singletonPanic "genCallSimpleCast2" retVs'
- let s2 = Store retV' dstV Nothing []
-
- let stmts = stmts2 `appOL` stmts4 `snocOL`
- s1 `appOL` stmts5 `snocOL` s2
+genCallSimpleCast :: Width -> CallishMachOp -> CmmFormal -> [CmmActual]
+ -> LlvmM StmtData
+genCallSimpleCast w = genCallCastWithMinWidthOf w w
+
+-- Handle extension case that the element should be extend to a larger bit-width
+-- for the operation and subsequently truncated, of the form:
+-- extend arg >>= \a -> call(a) >>= truncate
+genCallCastWithMinWidthOf :: Width -> Width -> CallishMachOp -> CmmFormal
+ -> [CmmActual] -> LlvmM StmtData
+genCallCastWithMinWidthOf minW specW op dst args = do
+ let width = widthToLlvmInt $ max minW specW
+ argsW = const width <$> args
+ dstType = cmmToLlvmType $ localRegType dst
+ signage = cmmPrimOpRetValSignage op
+
+ fname <- cmmPrimOpFunctions op
+ (fptr, _, top3) <- getInstrinct fname width argsW
+ (dstV, _dst_ty) <- getCmmReg (CmmLocal dst)
+ let (_, arg_hints) = foreignTargetHints $ PrimTarget op
+ let args_hints = zip args arg_hints
+ (argsV, stmts2, top2) <- arg_vars args_hints ([], nilOL, [])
+ (argsV', stmts4) <- castVars signage $ zip argsV argsW
+ (retV, s1) <- doExpr width $ Call StdCall fptr argsV' []
+ (retV', stmts5) <- castVar signage retV dstType
+ let s2 = Store retV' dstV Nothing []
+
+ let stmts = stmts2 `appOL` stmts4 `snocOL` s1 `snocOL`
+ stmts5 `snocOL` s2
return (stmts, top2 ++ top3)
-genCallSimpleCast2 _ _ dsts _ =
- panic ("genCallSimpleCast2: " ++ show (length dsts) ++ " dsts")
-- | Create a function pointer from a target.
getFunPtrW :: (LMString -> LlvmType) -> ForeignTarget
@@ -811,11 +785,39 @@ castVar signage v t | getVarType v == t
Signed -> LM_Sext
Unsigned -> LM_Zext
-
cmmPrimOpRetValSignage :: CallishMachOp -> Signage
cmmPrimOpRetValSignage mop = case mop of
MO_Pdep _ -> Unsigned
MO_Pext _ -> Unsigned
+ -- If the result of a Bit-Reverse is treated as signed,
+ -- an positive input can result in an negative output, i.e.:
+ --
+ -- identity(0x03) = 0x03 = 00000011
+ -- breverse(0x03) = 0xC0 = 11000000
+ --
+ -- Now if an extension is performed after the operation to
+ -- promote a smaller bit-width value into a larger bit-width
+ -- type, it is expected that the /bit-wise/ operations will
+ -- not be treated /numerically/ as signed.
+ --
+ -- To illustrate the difference, consider how a signed extension
+ -- for the type i16 to i32 differs for out values above:
+ -- ext_zeroed(i32, breverse(0x03)) = 0x00C0 = 0000000011000000
+ -- ext_signed(i32, breverse(0x03)) = 0xFFC0 = 1111111111000000
+ --
+ -- Here we can see that the former output is the expected result
+ -- of a bit-wise operation which needs to be promoted to a larger
+ -- bit-width type. The latter output is not desirable when we must
+ -- constraining a value into a range of i16 within an i32 type.
+ --
+ -- Hence we always treat the "signage" as unsigned for Bit-Reverse!
+ MO_BRev _ -> Unsigned
+
+ -- The same reasoning applied to Bit-Reverse above applies to Byte-Swap;
+ -- we do not want to sign extend a number whose sign may have changed!
+ MO_BSwap _ -> Unsigned
+
+ -- All other cases, default to preserving the numeric sign when extending.
_ -> Signed
-- | Decide what C function to use to implement a CallishMachOp
@@ -954,8 +956,8 @@ cmmPrimOpFunctions mop = do
W256 -> fsLit "llvm.x86.bmi.pdep.256"
W512 -> fsLit "llvm.x86.bmi.pdep.512"
| otherwise -> case w of
- W8 -> fsLit "hs_pdep8"
- W16 -> fsLit "hs_pdep16"
+ W8 -> fsLit "hs_pdep32"
+ W16 -> fsLit "hs_pdep32"
W32 -> fsLit "hs_pdep32"
W64 -> fsLit "hs_pdep64"
W128 -> fsLit "hs_pdep128"
@@ -971,8 +973,8 @@ cmmPrimOpFunctions mop = do
W256 -> fsLit "llvm.x86.bmi.pext.256"
W512 -> fsLit "llvm.x86.bmi.pext.512"
| otherwise -> case w of
- W8 -> fsLit "hs_pext8"
- W16 -> fsLit "hs_pext16"
+ W8 -> fsLit "hs_pext32"
+ W16 -> fsLit "hs_pext32"
W32 -> fsLit "hs_pext32"
W64 -> fsLit "hs_pext64"
W128 -> fsLit "hs_pext128"
=====================================
testsuite/tests/numeric/should_run/foundation.hs
=====================================
@@ -24,6 +24,7 @@ module Main
( main
) where
+import Data.Bits (Bits((.&.), bit))
import Data.Word
import Data.Int
import GHC.Natural
@@ -655,8 +656,8 @@ testPrimops = Group "primop"
, testPrimop "ctz32#" Primop.ctz32# Wrapper.ctz32#
, testPrimop "ctz64#" Primop.ctz64# Wrapper.ctz64#
, testPrimop "ctz#" Primop.ctz# Wrapper.ctz#
- , testPrimop "byteSwap16#" Primop.byteSwap16# Wrapper.byteSwap16#
- , testPrimop "byteSwap32#" Primop.byteSwap32# Wrapper.byteSwap32#
+ , testPrimop "byteSwap16#" (16 `LowerBitsAreDefined` Primop.byteSwap16#) (16 `LowerBitsAreDefined` Wrapper.byteSwap16#)
+ , testPrimop "byteSwap32#" (32 `LowerBitsAreDefined` Primop.byteSwap32#) (32 `LowerBitsAreDefined` Wrapper.byteSwap32#)
, testPrimop "byteSwap64#" Primop.byteSwap64# Wrapper.byteSwap64#
, testPrimop "byteSwap#" Primop.byteSwap# Wrapper.byteSwap#
, testPrimop "bitReverse8#" Primop.bitReverse8# Wrapper.bitReverse8#
@@ -672,6 +673,34 @@ testPrimops = Group "primop"
, testPrimop "narrow32Word#" Primop.narrow32Word# Wrapper.narrow32Word#
]
+-- | A special data-type for representing functions where,
+-- since only some number of the lower bits are defined,
+-- testing for strict equality in the undefined upper bits is not appropriate!
+-- Without using this data-type, false-positive failures will be reported
+-- when the undefined bit regions do not match, even though the equality of bits
+-- in this undefined region has no bearing on correctness.
+data LowerBitsAreDefined =
+ LowerBitsAreDefined
+ { definedLowerWidth :: Word
+ -- ^ The (strictly-non-negative) number of least-significant bits
+ -- for which the attached function is defined.
+ , undefinedBehavior :: (Word# -> Word#)
+ -- ^ Function with undefined behavior for some of its most significant bits.
+ }
+
+instance TestPrimop LowerBitsAreDefined where
+ testPrimop s l r = Property s $ \ (uWord#-> x0) ->
+ let -- Create a mask to unset all bits in the undefined area,
+ -- leaving set bits only in the area of defined behavior.
+ -- Since the upper bits are undefined,
+ -- if the function defines behavior for the lower N bits,
+ -- then /only/ the lower N bits are preserved,
+ -- and the upper WORDSIZE - N bits are discarded.
+ mask = bit (fromEnum (definedLowerWidth r)) - 1
+ valL = wWord# (undefinedBehavior l x0) .&. mask
+ valR = wWord# (undefinedBehavior r x0) .&. mask
+ in valL === valR
+
instance TestPrimop (Char# -> Char# -> Int#) where
testPrimop s l r = Property s $ \ (uChar#-> x0) (uChar#-> x1) -> wInt# (l x0 x1) === wInt# (r x0 x1)
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/9fbadea8fb900c08c812a29716c3c40…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/9fbadea8fb900c08c812a29716c3c40…
You're receiving this email because of your account on gitlab.haskell.org.
1
0