[Git][ghc/ghc] Pushed new branch wip/davide/ghc-internal-def
by David Eichmann (@DavidEichmann) 18 May '26
by David Eichmann (@DavidEichmann) 18 May '26
18 May '26
David Eichmann pushed new branch wip/davide/ghc-internal-def at Glasgow Haskell Compiler / GHC
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/davide/ghc-internal-def
You're receiving this email because of your account on gitlab.haskell.org.
1
0
[Git][ghc/ghc][wip/spj-reinstallable-base2] 2 commits: kill all TH known keys, keep the occs
by Rodrigo Mesquita (@alt-romes) 18 May '26
by Rodrigo Mesquita (@alt-romes) 18 May '26
18 May '26
Rodrigo Mesquita pushed to branch wip/spj-reinstallable-base2 at Glasgow Haskell Compiler / GHC
Commits:
c807aec4 by Rodrigo Mesquita at 2026-05-18T12:07:35+01:00
kill all TH known keys, keep the occs
- - - - -
0749548e by Rodrigo Mesquita at 2026-05-18T16:10:47+01:00
fix th things
- - - - -
5 changed files:
- compiler/GHC/Builtin/TH.hs
- compiler/GHC/HsToCore/Quote.hs
- compiler/GHC/Rename/Splice.hs
- compiler/GHC/Tc/Gen/Splice.hs
- libraries/base/src/GHC/Essentials.hs
Changes:
=====================================
compiler/GHC/Builtin/TH.hs
=====================================
@@ -8,10 +8,8 @@ module GHC.Builtin.TH where
import GHC.Prelude ()
-import GHC.Types.Name( Name, KnownOcc )
+import GHC.Types.Name( KnownOcc )
import GHC.Types.Name.Occurrence
-import GHC.Types.Unique ( Unique )
-import GHC.Builtin.Uniques
import GHC.Data.FastString
-------------------- TH.Syntax -----------------------
@@ -230,8 +228,7 @@ implicitParamBindDOcc = mkVarOcc "implicitParamBindD"
-- type Ctxt = ...
cxtName :: KnownOcc
-cxtName = mkVarOcc "cxt" -- TODO: WHERE IS THIS; AND DO I NEED TO EXPORT IT FROM GHC.Essentials??
- -- Look at the knownOccs below up until BangTypeName too.
+cxtName = mkVarOcc "cxt"
-- data SourceUnpackedness = ...
noSourceUnpackednessOcc, sourceNoUnpackOcc, sourceUnpackOcc :: KnownOcc
@@ -260,23 +257,23 @@ bangName = mkVarOcc "bang"
-- type BangType = ...
bangTypeName :: KnownOcc
-bangTypeName = libFun (fsLit "bangType") bangTKey
+bangTypeName = mkVarOcc "bangType"
-- type VarBangType = ...
varBangTypeName :: KnownOcc
-varBangTypeName = libFun (fsLit "varBangType") varBangTKey
+varBangTypeName = mkVarOcc "varBangType"
-- data PatSynDir = ...
unidirPatSynName, implBidirPatSynName, explBidirPatSynName :: KnownOcc
-unidirPatSynName = libFun (fsLit "unidir") unidirPatSynIdKey
-implBidirPatSynName = libFun (fsLit "implBidir") implBidirPatSynIdKey
-explBidirPatSynName = libFun (fsLit "explBidir") explBidirPatSynIdKey
+unidirPatSynName = mkVarOcc "unidir"
+implBidirPatSynName = mkVarOcc "implBidir"
+explBidirPatSynName = mkVarOcc "explBidir"
-- data PatSynArgs = ...
prefixPatSynName, infixPatSynName, recordPatSynName :: KnownOcc
-prefixPatSynName = libFun (fsLit "prefixPatSyn") prefixPatSynIdKey
-infixPatSynName = libFun (fsLit "infixPatSyn") infixPatSynIdKey
-recordPatSynName = libFun (fsLit "recordPatSyn") recordPatSynIdKey
+prefixPatSynName = mkVarOcc "prefixPatSyn"
+infixPatSynName = mkVarOcc "infixPatSyn"
+recordPatSynName = mkVarOcc "recordPatSyn"
-- data Type = ...
forallTName, forallVisTName, varTName, conTName, infixTName, tupleTName,
@@ -284,124 +281,124 @@ forallTName, forallVisTName, varTName, conTName, infixTName, tupleTName,
appTName, appKindTName, sigTName, equalityTName, litTName, promotedTName,
promotedTupleTName, promotedNilTName, promotedConsTName,
wildCardTName, implicitParamTName :: KnownOcc
-forallTName = libFun (fsLit "forallT") forallTIdKey
-forallVisTName = libFun (fsLit "forallVisT") forallVisTIdKey
-varTName = libFun (fsLit "varT") varTIdKey
-conTName = libFun (fsLit "conT") conTIdKey
-tupleTName = libFun (fsLit "tupleT") tupleTIdKey
-unboxedTupleTName = libFun (fsLit "unboxedTupleT") unboxedTupleTIdKey
-unboxedSumTName = libFun (fsLit "unboxedSumT") unboxedSumTIdKey
-arrowTName = libFun (fsLit "arrowT") arrowTIdKey
-mulArrowTName = libFun (fsLit "mulArrowT") mulArrowTIdKey
-listTName = libFun (fsLit "listT") listTIdKey
-appTName = libFun (fsLit "appT") appTIdKey
-appKindTName = libFun (fsLit "appKindT") appKindTIdKey
-sigTName = libFun (fsLit "sigT") sigTIdKey
-equalityTName = libFun (fsLit "equalityT") equalityTIdKey
-litTName = libFun (fsLit "litT") litTIdKey
-promotedTName = libFun (fsLit "promotedT") promotedTIdKey
-promotedTupleTName = libFun (fsLit "promotedTupleT") promotedTupleTIdKey
-promotedNilTName = libFun (fsLit "promotedNilT") promotedNilTIdKey
-promotedConsTName = libFun (fsLit "promotedConsT") promotedConsTIdKey
-wildCardTName = libFun (fsLit "wildCardT") wildCardTIdKey
-infixTName = libFun (fsLit "infixT") infixTIdKey
-implicitParamTName = libFun (fsLit "implicitParamT") implicitParamTIdKey
+forallTName = mkVarOcc "forallT"
+forallVisTName = mkVarOcc "forallVisT"
+varTName = mkVarOcc "varT"
+conTName = mkVarOcc "conT"
+tupleTName = mkVarOcc "tupleT"
+unboxedTupleTName = mkVarOcc "unboxedTupleT"
+unboxedSumTName = mkVarOcc "unboxedSumT"
+arrowTName = mkVarOcc "arrowT"
+mulArrowTName = mkVarOcc "mulArrowT"
+listTName = mkVarOcc "listT"
+appTName = mkVarOcc "appT"
+appKindTName = mkVarOcc "appKindT"
+sigTName = mkVarOcc "sigT"
+equalityTName = mkVarOcc "equalityT"
+litTName = mkVarOcc "litT"
+promotedTName = mkVarOcc "promotedT"
+promotedTupleTName = mkVarOcc "promotedTupleT"
+promotedNilTName = mkVarOcc "promotedNilT"
+promotedConsTName = mkVarOcc "promotedConsT"
+wildCardTName = mkVarOcc "wildCardT"
+infixTName = mkVarOcc "infixT"
+implicitParamTName = mkVarOcc "implicitParamT"
-- data TyLit = ...
numTyLitName, strTyLitName, charTyLitName :: KnownOcc
-numTyLitName = libFun (fsLit "numTyLit") numTyLitIdKey
-strTyLitName = libFun (fsLit "strTyLit") strTyLitIdKey
-charTyLitName = libFun (fsLit "charTyLit") charTyLitIdKey
+numTyLitName = mkVarOcc "numTyLit"
+strTyLitName = mkVarOcc "strTyLit"
+charTyLitName = mkVarOcc "charTyLit"
-- data TyVarBndr = ...
plainTVName, kindedTVName :: KnownOcc
-plainTVName = libFun (fsLit "plainTV") plainTVIdKey
-kindedTVName = libFun (fsLit "kindedTV") kindedTVIdKey
+plainTVName = mkVarOcc "plainTV"
+kindedTVName = mkVarOcc "kindedTV"
plainInvisTVName, kindedInvisTVName :: KnownOcc
-plainInvisTVName = libFun (fsLit "plainInvisTV") plainInvisTVIdKey
-kindedInvisTVName = libFun (fsLit "kindedInvisTV") kindedInvisTVIdKey
+plainInvisTVName = mkVarOcc "plainInvisTV"
+kindedInvisTVName = mkVarOcc "kindedInvisTV"
plainBndrTVName, kindedBndrTVName :: KnownOcc
-plainBndrTVName = libFun (fsLit "plainBndrTV") plainBndrTVIdKey
-kindedBndrTVName = libFun (fsLit "kindedBndrTV") kindedBndrTVIdKey
+plainBndrTVName = mkVarOcc "plainBndrTV"
+kindedBndrTVName = mkVarOcc "kindedBndrTV"
-- data Specificity = ...
specifiedSpecName, inferredSpecName :: KnownOcc
-specifiedSpecName = libFun (fsLit "specifiedSpec") specifiedSpecKey
-inferredSpecName = libFun (fsLit "inferredSpec") inferredSpecKey
+specifiedSpecName = mkVarOcc "specifiedSpec"
+inferredSpecName = mkVarOcc "inferredSpec"
-- data BndrVis = ...
bndrReqName, bndrInvisName :: KnownOcc
-bndrReqName = libFun (fsLit "bndrReq") bndrReqKey
-bndrInvisName = libFun (fsLit "bndrInvis") bndrInvisKey
+bndrReqName = mkVarOcc "bndrReq"
+bndrInvisName = mkVarOcc "bndrInvis"
-- data Role = ...
nominalRName, representationalRName, phantomRName, inferRName :: KnownOcc
-nominalRName = libFun (fsLit "nominalR") nominalRIdKey
-representationalRName = libFun (fsLit "representationalR") representationalRIdKey
-phantomRName = libFun (fsLit "phantomR") phantomRIdKey
-inferRName = libFun (fsLit "inferR") inferRIdKey
+nominalRName = mkVarOcc "nominalR"
+representationalRName = mkVarOcc "representationalR"
+phantomRName = mkVarOcc "phantomR"
+inferRName = mkVarOcc "inferR"
-- data Kind = ...
starKName, constraintKName :: KnownOcc
-starKName = libFun (fsLit "starK") starKIdKey
-constraintKName = libFun (fsLit "constraintK") constraintKIdKey
+starKName = mkVarOcc "starK"
+constraintKName = mkVarOcc "constraintK"
-- data FamilyResultSig = ...
noSigName, kindSigName, tyVarSigName :: KnownOcc
-noSigName = libFun (fsLit "noSig") noSigIdKey
-kindSigName = libFun (fsLit "kindSig") kindSigIdKey
-tyVarSigName = libFun (fsLit "tyVarSig") tyVarSigIdKey
+noSigName = mkVarOcc "noSig"
+kindSigName = mkVarOcc "kindSig"
+tyVarSigName = mkVarOcc "tyVarSig"
-- data InjectivityAnn = ...
injectivityAnnName :: KnownOcc
-injectivityAnnName = libFun (fsLit "injectivityAnn") injectivityAnnIdKey
+injectivityAnnName = mkVarOcc "injectivityAnn"
-- data Callconv = ...
cCallName, stdCallName, cApiCallName, primCallName, javaScriptCallName :: KnownOcc
-cCallName = libFun (fsLit "cCall") cCallIdKey
-stdCallName = libFun (fsLit "stdCall") stdCallIdKey
-cApiCallName = libFun (fsLit "cApi") cApiCallIdKey
-primCallName = libFun (fsLit "prim") primCallIdKey
-javaScriptCallName = libFun (fsLit "javaScript") javaScriptCallIdKey
+cCallName = mkVarOcc "cCall"
+stdCallName = mkVarOcc "stdCall"
+cApiCallName = mkVarOcc "cApi"
+primCallName = mkVarOcc "prim"
+javaScriptCallName = mkVarOcc "javaScript"
-- data Safety = ...
unsafeName, safeName, interruptibleName :: KnownOcc
-unsafeName = libFun (fsLit "unsafe") unsafeIdKey
-safeName = libFun (fsLit "safe") safeIdKey
-interruptibleName = libFun (fsLit "interruptible") interruptibleIdKey
+unsafeName = mkVarOcc "unsafe"
+safeName = mkVarOcc "safe"
+interruptibleName = mkVarOcc "interruptible"
-- data RuleBndr = ...
ruleVarName, typedRuleVarName :: KnownOcc
-ruleVarName = libFun (fsLit ("ruleVar")) ruleVarIdKey
-typedRuleVarName = libFun (fsLit ("typedRuleVar")) typedRuleVarIdKey
+ruleVarName = mkVarOcc "ruleVar"
+typedRuleVarName = mkVarOcc "typedRuleVar"
-- data FunDep = ...
funDepName :: KnownOcc
-funDepName = libFun (fsLit "funDep") funDepIdKey
+funDepName = mkVarOcc "funDep"
-- data TySynEqn = ...
tySynEqnName :: KnownOcc
-tySynEqnName = libFun (fsLit "tySynEqn") tySynEqnIdKey
+tySynEqnName = mkVarOcc "tySynEqn"
-- data AnnTarget = ...
valueAnnotationName, typeAnnotationName, moduleAnnotationName :: KnownOcc
-valueAnnotationName = libFun (fsLit "valueAnnotation") valueAnnotationIdKey
-typeAnnotationName = libFun (fsLit "typeAnnotation") typeAnnotationIdKey
-moduleAnnotationName = libFun (fsLit "moduleAnnotation") moduleAnnotationIdKey
+valueAnnotationName = mkVarOcc "valueAnnotation"
+typeAnnotationName = mkVarOcc "typeAnnotation"
+moduleAnnotationName = mkVarOcc "moduleAnnotation"
-- type DerivClause = ...
derivClauseName :: KnownOcc
-derivClauseName = libFun (fsLit "derivClause") derivClauseIdKey
+derivClauseName = mkVarOcc "derivClause"
-- data DerivStrategy = ...
stockStrategyName, anyclassStrategyName, newtypeStrategyName,
viaStrategyName :: KnownOcc
-stockStrategyName = libFun (fsLit "stockStrategy") stockStrategyIdKey
-anyclassStrategyName = libFun (fsLit "anyclassStrategy") anyclassStrategyIdKey
-newtypeStrategyName = libFun (fsLit "newtypeStrategy") newtypeStrategyIdKey
-viaStrategyName = libFun (fsLit "viaStrategy") viaStrategyIdKey
+stockStrategyName = mkVarOcc "stockStrategy"
+anyclassStrategyName = mkVarOcc "anyclassStrategy"
+newtypeStrategyName = mkVarOcc "newtypeStrategy"
+viaStrategyName = mkVarOcc "viaStrategy"
patQTyConOcc, expQTyConOcc, stmtTyConOcc,
conTyConOcc, bangTypeTyConOcc,
@@ -433,276 +430,42 @@ derivStrategyTyConOcc = mkTcOcc "DerivStrategy"
-- quasiquoting
quoteExpName, quotePatName, quoteDecName, quoteTypeName :: KnownOcc
-quoteExpName = qqFld (fsLit "quoteExp") quoteExpKey
-quotePatName = qqFld (fsLit "quotePat") quotePatKey
-quoteDecName = qqFld (fsLit "quoteDec") quoteDecKey
-quoteTypeName = qqFld (fsLit "quoteType") quoteTypeKey
+quoteExpName = mkRecFieldOcc (fsLit "QuasiQuoter") "quoteExp"
+quotePatName = mkRecFieldOcc (fsLit "QuasiQuoter") "quotePat"
+quoteDecName = mkRecFieldOcc (fsLit "QuasiQuoter") "quoteDec"
+quoteTypeName = mkRecFieldOcc (fsLit "QuasiQuoter") "quoteType"
-- data Inline = ...
noInlineDataConName, inlineDataConName, inlinableDataConName :: KnownOcc
-noInlineDataConName = thCon (fsLit "NoInline") noInlineDataConKey
-inlineDataConName = thCon (fsLit "Inline") inlineDataConKey
-inlinableDataConName = thCon (fsLit "Inlinable") inlinableDataConKey
+noInlineDataConName = mkDataOcc "NoInline"
+inlineDataConName = mkDataOcc "Inline"
+inlinableDataConName = mkDataOcc "Inlinable"
-- data RuleMatch = ...
conLikeDataConName, funLikeDataConName :: KnownOcc
-conLikeDataConName = thCon (fsLit "ConLike") conLikeDataConKey
-funLikeDataConName = thCon (fsLit "FunLike") funLikeDataConKey
+conLikeDataConName = mkDataOcc "ConLike"
+funLikeDataConName = mkDataOcc "FunLike"
-- data Phases = ...
allPhasesDataConName, fromPhaseDataConName, beforePhaseDataConName :: KnownOcc
-allPhasesDataConName = thCon (fsLit "AllPhases") allPhasesDataConKey
-fromPhaseDataConName = thCon (fsLit "FromPhase") fromPhaseDataConKey
-beforePhaseDataConName = thCon (fsLit "BeforePhase") beforePhaseDataConKey
+allPhasesDataConName = mkDataOcc "AllPhases"
+fromPhaseDataConName = mkDataOcc "FromPhase"
+beforePhaseDataConName = mkDataOcc "BeforePhase"
-- data Overlap = ...
overlappableDataConName,
overlappingDataConName,
overlapsDataConName,
incoherentDataConName :: KnownOcc
-overlappableDataConName = thCon (fsLit "Overlappable") overlappableDataConKey
-overlappingDataConName = thCon (fsLit "Overlapping") overlappingDataConKey
-overlapsDataConName = thCon (fsLit "Overlaps") overlapsDataConKey
-incoherentDataConName = thCon (fsLit "Incoherent") incoherentDataConKey
+overlappableDataConName = mkDataOcc "Overlappable"
+overlappingDataConName = mkDataOcc "Overlapping"
+overlapsDataConName = mkDataOcc "Overlaps"
+incoherentDataConName = mkDataOcc "Incoherent"
-- data NamespaceSpecifier = ...
noNamespaceSpecifierDataConName,
typeNamespaceSpecifierDataConName,
dataNamespaceSpecifierDataConName :: KnownOcc
-noNamespaceSpecifierDataConName =
- thCon (fsLit "NoNamespaceSpecifier") noNamespaceSpecifierDataConKey
-typeNamespaceSpecifierDataConName =
- thCon (fsLit "TypeNamespaceSpecifier") typeNamespaceSpecifierDataConKey
-dataNamespaceSpecifierDataConName =
- thCon (fsLit "DataNamespaceSpecifier") dataNamespaceSpecifierDataConKey
-
-{- *********************************************************************
-* *
- Class keys
-* *
-********************************************************************* -}
-
--- ClassUniques available: 200-299
--- Check in GHC.Builtin.KnownKeys if you want to change this
-
-liftClassKey :: Unique
-liftClassKey = mkPreludeClassUnique 200
-
-{- *********************************************************************
-* *
- TyCon keys
-* *
-********************************************************************* -}
-
--- TyConUniques available: 200-299
--- Check in GHC.Builtin.KnownKeys if you want to change this
-
-
-{- *********************************************************************
-* *
- DataCon keys
-* *
-********************************************************************* -}
-
--- DataConUniques available: 100-150
--- If you want to change this, make sure you check in GHC.Builtin.KnownKeys
-
--- data Inline = ...
-noInlineDataConKey, inlineDataConKey, inlinableDataConKey :: Unique
-noInlineDataConKey = mkPreludeDataConUnique 200
-inlineDataConKey = mkPreludeDataConUnique 201
-inlinableDataConKey = mkPreludeDataConUnique 202
-
--- data RuleMatch = ...
-conLikeDataConKey, funLikeDataConKey :: Unique
-conLikeDataConKey = mkPreludeDataConUnique 204
-funLikeDataConKey = mkPreludeDataConUnique 205
-
--- data Phases = ...
-allPhasesDataConKey, fromPhaseDataConKey, beforePhaseDataConKey :: Unique
-allPhasesDataConKey = mkPreludeDataConUnique 206
-fromPhaseDataConKey = mkPreludeDataConUnique 207
-beforePhaseDataConKey = mkPreludeDataConUnique 208
-
--- data Overlap = ..
-overlappableDataConKey,
- overlappingDataConKey,
- overlapsDataConKey,
- incoherentDataConKey :: Unique
-overlappableDataConKey = mkPreludeDataConUnique 209
-overlappingDataConKey = mkPreludeDataConUnique 210
-overlapsDataConKey = mkPreludeDataConUnique 211
-incoherentDataConKey = mkPreludeDataConUnique 212
-
--- data NamespaceSpecifier = ...
-noNamespaceSpecifierDataConKey,
- typeNamespaceSpecifierDataConKey,
- dataNamespaceSpecifierDataConKey :: Unique
-noNamespaceSpecifierDataConKey = mkPreludeDataConUnique 213
-typeNamespaceSpecifierDataConKey = mkPreludeDataConUnique 214
-dataNamespaceSpecifierDataConKey = mkPreludeDataConUnique 215
-{- *********************************************************************
-* *
- Id keys
-* *
-********************************************************************* -}
-
--- IdUniques available: 200-499
--- If you want to change this, make sure you check in GHC.Builtin.KnownKeys
-
--- type BangType = ...
-bangTKey :: Unique
-bangTKey = mkPreludeMiscIdUnique 375
-
--- type VarBangType = ...
-varBangTKey :: Unique
-varBangTKey = mkPreludeMiscIdUnique 376
-
--- data PatSynDir = ...
-unidirPatSynIdKey, implBidirPatSynIdKey, explBidirPatSynIdKey :: Unique
-unidirPatSynIdKey = mkPreludeMiscIdUnique 377
-implBidirPatSynIdKey = mkPreludeMiscIdUnique 378
-explBidirPatSynIdKey = mkPreludeMiscIdUnique 379
-
--- data PatSynArgs = ...
-prefixPatSynIdKey, infixPatSynIdKey, recordPatSynIdKey :: Unique
-prefixPatSynIdKey = mkPreludeMiscIdUnique 380
-infixPatSynIdKey = mkPreludeMiscIdUnique 381
-recordPatSynIdKey = mkPreludeMiscIdUnique 382
-
--- data Type = ...
-forallTIdKey, forallVisTIdKey, varTIdKey, conTIdKey, tupleTIdKey,
- unboxedTupleTIdKey, unboxedSumTIdKey, arrowTIdKey, listTIdKey, appTIdKey,
- appKindTIdKey, sigTIdKey, equalityTIdKey, litTIdKey, promotedTIdKey,
- promotedTupleTIdKey, promotedNilTIdKey, promotedConsTIdKey,
- wildCardTIdKey, implicitParamTIdKey, infixTIdKey :: Unique
-forallTIdKey = mkPreludeMiscIdUnique 390
-forallVisTIdKey = mkPreludeMiscIdUnique 391
-varTIdKey = mkPreludeMiscIdUnique 392
-conTIdKey = mkPreludeMiscIdUnique 393
-tupleTIdKey = mkPreludeMiscIdUnique 394
-unboxedTupleTIdKey = mkPreludeMiscIdUnique 395
-unboxedSumTIdKey = mkPreludeMiscIdUnique 396
-arrowTIdKey = mkPreludeMiscIdUnique 397
-listTIdKey = mkPreludeMiscIdUnique 398
-appTIdKey = mkPreludeMiscIdUnique 399
-appKindTIdKey = mkPreludeMiscIdUnique 400
-sigTIdKey = mkPreludeMiscIdUnique 401
-equalityTIdKey = mkPreludeMiscIdUnique 402
-litTIdKey = mkPreludeMiscIdUnique 403
-promotedTIdKey = mkPreludeMiscIdUnique 404
-promotedTupleTIdKey = mkPreludeMiscIdUnique 405
-promotedNilTIdKey = mkPreludeMiscIdUnique 406
-promotedConsTIdKey = mkPreludeMiscIdUnique 407
-wildCardTIdKey = mkPreludeMiscIdUnique 408
-implicitParamTIdKey = mkPreludeMiscIdUnique 409
-infixTIdKey = mkPreludeMiscIdUnique 410
-
--- data TyLit = ...
-numTyLitIdKey, strTyLitIdKey, charTyLitIdKey :: Unique
-numTyLitIdKey = mkPreludeMiscIdUnique 411
-strTyLitIdKey = mkPreludeMiscIdUnique 412
-charTyLitIdKey = mkPreludeMiscIdUnique 413
-
--- data TyVarBndr = ...
-plainTVIdKey, kindedTVIdKey :: Unique
-plainTVIdKey = mkPreludeMiscIdUnique 414
-kindedTVIdKey = mkPreludeMiscIdUnique 415
-
-plainInvisTVIdKey, kindedInvisTVIdKey :: Unique
-plainInvisTVIdKey = mkPreludeMiscIdUnique 482
-kindedInvisTVIdKey = mkPreludeMiscIdUnique 483
-
-plainBndrTVIdKey, kindedBndrTVIdKey :: Unique
-plainBndrTVIdKey = mkPreludeMiscIdUnique 484
-kindedBndrTVIdKey = mkPreludeMiscIdUnique 485
-
--- data Role = ...
-nominalRIdKey, representationalRIdKey, phantomRIdKey, inferRIdKey :: Unique
-nominalRIdKey = mkPreludeMiscIdUnique 416
-representationalRIdKey = mkPreludeMiscIdUnique 417
-phantomRIdKey = mkPreludeMiscIdUnique 418
-inferRIdKey = mkPreludeMiscIdUnique 419
-
--- data Kind = ...
-starKIdKey, constraintKIdKey :: Unique
-starKIdKey = mkPreludeMiscIdUnique 425
-constraintKIdKey = mkPreludeMiscIdUnique 426
-
--- data FamilyResultSig = ...
-noSigIdKey, kindSigIdKey, tyVarSigIdKey :: Unique
-noSigIdKey = mkPreludeMiscIdUnique 427
-kindSigIdKey = mkPreludeMiscIdUnique 428
-tyVarSigIdKey = mkPreludeMiscIdUnique 429
-
--- data InjectivityAnn = ...
-injectivityAnnIdKey :: Unique
-injectivityAnnIdKey = mkPreludeMiscIdUnique 430
-
--- data Callconv = ...
-cCallIdKey, stdCallIdKey, cApiCallIdKey, primCallIdKey,
- javaScriptCallIdKey :: Unique
-cCallIdKey = mkPreludeMiscIdUnique 431
-stdCallIdKey = mkPreludeMiscIdUnique 432
-cApiCallIdKey = mkPreludeMiscIdUnique 433
-primCallIdKey = mkPreludeMiscIdUnique 434
-javaScriptCallIdKey = mkPreludeMiscIdUnique 435
-
--- data Safety = ...
-unsafeIdKey, safeIdKey, interruptibleIdKey :: Unique
-unsafeIdKey = mkPreludeMiscIdUnique 440
-safeIdKey = mkPreludeMiscIdUnique 441
-interruptibleIdKey = mkPreludeMiscIdUnique 442
-
--- data FunDep = ...
-funDepIdKey :: Unique
-funDepIdKey = mkPreludeMiscIdUnique 445
-
--- mulArrow
-mulArrowTIdKey :: Unique
-mulArrowTIdKey = mkPreludeMiscIdUnique 446
-
--- data TySynEqn = ...
-tySynEqnIdKey :: Unique
-tySynEqnIdKey = mkPreludeMiscIdUnique 460
-
--- quasiquoting
-quoteExpKey, quotePatKey, quoteDecKey, quoteTypeKey :: Unique
-quoteExpKey = mkPreludeMiscIdUnique 470
-quotePatKey = mkPreludeMiscIdUnique 471
-quoteDecKey = mkPreludeMiscIdUnique 472
-quoteTypeKey = mkPreludeMiscIdUnique 473
-
--- data RuleBndr = ...
-ruleVarIdKey, typedRuleVarIdKey :: Unique
-ruleVarIdKey = mkPreludeMiscIdUnique 480
-typedRuleVarIdKey = mkPreludeMiscIdUnique 481
-
--- data AnnTarget = ...
-valueAnnotationIdKey, typeAnnotationIdKey, moduleAnnotationIdKey :: Unique
-valueAnnotationIdKey = mkPreludeMiscIdUnique 490
-typeAnnotationIdKey = mkPreludeMiscIdUnique 491
-moduleAnnotationIdKey = mkPreludeMiscIdUnique 492
-
--- type DerivPred = ...
-derivClauseIdKey :: Unique
-derivClauseIdKey = mkPreludeMiscIdUnique 493
-
--- data DerivStrategy = ...
-stockStrategyIdKey, anyclassStrategyIdKey, newtypeStrategyIdKey,
- viaStrategyIdKey :: Unique
-stockStrategyIdKey = mkPreludeDataConUnique 494
-anyclassStrategyIdKey = mkPreludeDataConUnique 495
-newtypeStrategyIdKey = mkPreludeDataConUnique 496
-viaStrategyIdKey = mkPreludeDataConUnique 497
-
--- data Specificity = ...
-specifiedSpecKey, inferredSpecKey :: Unique
-specifiedSpecKey = mkPreludeMiscIdUnique 498
-inferredSpecKey = mkPreludeMiscIdUnique 499
-
--- data BndrVis = ...
-bndrReqKey, bndrInvisKey :: Unique
-bndrReqKey = mkPreludeMiscIdUnique 800 -- TODO (int-index): make up some room in the 5** numberspace?
-bndrInvisKey = mkPreludeMiscIdUnique 801
-
+noNamespaceSpecifierDataConName = mkDataOcc "NoNamespaceSpecifier"
+typeNamespaceSpecifierDataConName = mkDataOcc "TypeNamespaceSpecifier"
+dataNamespaceSpecifierDataConName = mkDataOcc "DataNamespaceSpecifier"
=====================================
compiler/GHC/HsToCore/Quote.hs
=====================================
@@ -887,7 +887,7 @@ repC (L _ (ConDeclH98 { con_name = con
; ctxt' <- repMbContext mcxt
; if not is_existential && isNothing mcxt
then return c'
- else rep2 forallCName ([unC ex_bndrs, unC ctxt', unC c'])
+ else rep2 forallCOcc ([unC ex_bndrs, unC ctxt', unC c'])
}
repC (L l (ConDeclGADT { con_names = cons
@@ -908,12 +908,12 @@ repC (L l (ConDeclGADT { con_names = cons
let loop last_bndrs' [] = do
ctxt' <- repMbContext mcxt
c' <- repGadtDataCons cons args res_ty
- rep2 forallCName ([unC last_bndrs', unC ctxt', unC c'])
+ rep2 forallCOcc ([unC last_bndrs', unC ctxt', unC c'])
loop last_bndrs' (bndrs : bndrs_s) =
addHsTyVarBinds FreshNamesOnly bndrs $ \bndrs' -> do
body_c' <- loop bndrs' bndrs_s
ctxt' <- repContext []
- rep2 forallCName [unC last_bndrs', unC ctxt', unC body_c']
+ rep2 forallCOcc [unC last_bndrs', unC ctxt', unC body_c']
in loop outer_bndrs' invis_inner_bndrs
| Nothing <- m_invis_inner_bndrs
@@ -935,14 +935,14 @@ repMbContext Nothing = repContext []
repMbContext (Just (L _ cxt)) = repContext cxt
repSrcUnpackedness :: SrcUnpackedness -> MetaM (Core (M TH.SourceUnpackedness))
-repSrcUnpackedness SrcUnpack = rep2 sourceUnpackName []
-repSrcUnpackedness SrcNoUnpack = rep2 sourceNoUnpackName []
-repSrcUnpackedness NoSrcUnpack = rep2 noSourceUnpackednessName []
+repSrcUnpackedness SrcUnpack = rep2 sourceUnpackOcc []
+repSrcUnpackedness SrcNoUnpack = rep2 sourceNoUnpackOcc []
+repSrcUnpackedness NoSrcUnpack = rep2 noSourceUnpackednessOcc []
repSrcStrictness :: SrcStrictness -> MetaM (Core (M TH.SourceStrictness))
-repSrcStrictness SrcLazy = rep2 sourceLazyName []
-repSrcStrictness SrcStrict = rep2 sourceStrictName []
-repSrcStrictness NoSrcStrict = rep2 noSourceStrictnessName []
+repSrcStrictness SrcLazy = rep2 sourceLazyOcc []
+repSrcStrictness SrcStrict = rep2 sourceStrictOcc []
+repSrcStrictness NoSrcStrict = rep2 noSourceStrictnessOcc []
repConDeclField :: HsConDeclField GhcRn -> MetaM (Core (M TH.BangType))
repConDeclField (CDF { cdf_unpack, cdf_bang, cdf_type }) = do
@@ -2344,7 +2344,7 @@ globalVarLocal unique name
= do { MkC occ <- occNameLit name
; platform <- targetPlatform <$> getDynFlags
; let uni = mkIntegerExpr platform (toInteger $ getKey unique)
- ; rep2_nwDsM mkNameLName [occ,uni] }
+ ; rep2_nwDsM mkNameLOcc [occ,uni] }
globalVarExternal :: Module -> OccName -> DsM (Core TH.Name)
globalVarExternal mod name_occ
@@ -2352,14 +2352,14 @@ globalVarExternal mod name_occ
; MkC pkg <- coreStringLit name_pkg
; MkC occ <- occNameLit name_occ
; if | isDataOcc name_occ
- -> rep2_nwDsM mkNameG_dName [pkg,mod,occ]
+ -> rep2_nwDsM mkNameG_dOcc [pkg,mod,occ]
| isVarOcc name_occ
- -> rep2_nwDsM mkNameG_vName [pkg,mod,occ]
+ -> rep2_nwDsM mkNameG_vOcc [pkg,mod,occ]
| isTcOcc name_occ
- -> rep2_nwDsM mkNameG_tcName [pkg,mod,occ]
+ -> rep2_nwDsM mkNameG_tcOcc [pkg,mod,occ]
| Just con_fs <- fieldOcc_maybe name_occ
-> do { MkC con <- coreStringLit con_fs
- ; rep2_nwDsM mkNameG_fldName [pkg,mod,con,occ] }
+ ; rep2_nwDsM mkNameG_fldOcc [pkg,mod,con,occ] }
| otherwise
-> pprPanic "GHC.HsToCore.Quote.globalVar" (ppr name_occ)
}
@@ -2465,11 +2465,11 @@ krep2X lift_dsm get_wrap n xs = do
-dataCon' :: Name -> [CoreExpr] -> MetaM (Core a)
-dataCon' n args = do { id <- lift $ dsLookupDataCon n
+dataCon' :: KnownOcc -> [CoreExpr] -> MetaM (Core a)
+dataCon' n args = do { id <- lift $ dsLookupKnownOccDataCon n
; return $ MkC $ mkCoreConApps id args }
-dataCon :: Name -> MetaM (Core a)
+dataCon :: KnownOcc -> MetaM (Core a)
dataCon n = dataCon' n []
@@ -2615,7 +2615,7 @@ repDoBlock doName maybeModName (MkC ss) = do
coreModNameM = case maybeModName of
Just m -> do
MkC s <- lift $ coreStringLit (moduleNameFS m)
- mName <- rep2_nw mkModNameName [s]
+ mName <- rep2_nw mkModNameOcc [s]
coreJust modNameTyConOcc mName
_ -> coreNothing modNameTyConOcc
@@ -2918,15 +2918,15 @@ repH98DataCon con details
case details of
PrefixCon ps -> do
arg_tys <- repPrefixConArgs IsNotPrefixConGADT ps
- rep2 normalCName [unC con', unC arg_tys]
+ rep2 normalCOcc [unC con', unC arg_tys]
InfixCon st1 st2 -> do
verifyLinearFields IsNotPrefixConGADT [st1, st2]
arg1 <- repConDeclField st1
arg2 <- repConDeclField st2
- rep2 infixCName [unC arg1, unC con', unC arg2]
+ rep2 infixCOcc [unC arg1, unC con', unC arg2]
RecCon ips -> do
arg_vtys <- repRecConArgs ips
- rep2 recCName [unC con', unC arg_vtys]
+ rep2 recCOcc [unC con', unC arg_vtys]
repGadtDataCons :: NonEmpty (LocatedN Name)
-> HsConDeclGADTDetails GhcRn
@@ -2938,11 +2938,11 @@ repGadtDataCons cons details res_ty
PrefixConGADT _ ps -> do
arg_tys <- repPrefixConArgs IsPrefixConGADT ps
res_ty' <- repLTy res_ty
- rep2 gadtCName [ unC (nonEmptyCoreList' cons'), unC arg_tys, unC res_ty']
+ rep2 gadtCOcc [ unC (nonEmptyCoreList' cons'), unC arg_tys, unC res_ty']
RecConGADT _ ips -> do
arg_vtys <- repRecConArgs ips
res_ty' <- repLTy res_ty
- rep2 recGadtCName [unC (nonEmptyCoreList' cons'), unC arg_vtys,
+ rep2 recGadtCOcc [unC (nonEmptyCoreList' cons'), unC arg_vtys,
unC res_ty']
-- TH currently only supports linear constructors.
@@ -3197,15 +3197,15 @@ repRdrName rdr_name = do
-- used for holes anyway so it probably never happens
repNameS :: Core String -> MetaM (Core TH.Name)
-repNameS (MkC name) = rep2_nw mkNameSName [name]
+repNameS (MkC name) = rep2_nw mkNameSOcc [name]
repNameQ :: Core String -> Core String -> MetaM (Core TH.Name)
-repNameQ (MkC mn) (MkC name) = rep2_nw mkNameQName [mn, name]
+repNameQ (MkC mn) (MkC name) = rep2_nw mkNameQOcc [mn, name]
--------------- Miscellaneous -------------------
repGensym :: Core String -> MetaM (Core (M TH.Name))
-repGensym (MkC lit_str) = rep2 newNameName [lit_str]
+repGensym (MkC lit_str) = rep2 newNameOcc [lit_str]
repBindM :: Type -> Type -- a and b
-> Core (M a) -> Core (a -> M b) -> MetaM (Core (M b))
=====================================
compiler/GHC/Rename/Splice.hs
=====================================
@@ -337,10 +337,10 @@ runRnSplice flavour run_meta ppr_res splice
Just h -> h splice
-- TODO: Should call tcUntypedSplice here
- ; let the_expr = case splice' of
- HsUntypedSpliceExpr _ e -> e
- HsQuasiQuote _ q str -> mkQuasiQuoteExpr flavour q str
- XUntypedSplice {} -> pprPanic "runRnSplice: XUntypedSplice" (pprUntypedSplice False Nothing splice')
+ ; the_expr <- case splice' of
+ HsUntypedSpliceExpr _ e -> pure e
+ HsQuasiQuote _ q str -> fst <$> rnLExpr (mkQuasiQuoteExpr flavour q str)
+ XUntypedSplice {} -> pprPanic "runRnSplice: XUntypedSplice" (pprUntypedSplice False Nothing splice')
-- Typecheck the expression
; meta_exp_ty <- tcMetaKnownOccTy meta_ty_name
@@ -392,18 +392,18 @@ recordPendingSplice _ _ (TcPending _ _ _) = panic "impossible"
------------------
mkQuasiQuoteExpr :: UntypedSpliceFlavour -> LIdP GhcRn
-> XRec GhcPs FastString
- -> LHsExpr GhcRn
+ -> LHsExpr GhcPs
-- Return the expression (quoter "...quote...")
-- which is what we must run in a quasi-quote
mkQuasiQuoteExpr flavour quoter (L q_span' quote)
= L q_span $ HsApp noExtField (L q_span
$ HsApp noExtField (L q_span
- (mkHsVar (L (l2l q_span) quote_selector)))
+ (mkHsVar (L (l2l q_span) (Exact (ExactOcc quote_selector)))))
quoterExpr)
quoteExpr
where
q_span = noAnnSrcSpan (locA q_span')
- quoterExpr = L (l2l quoter) $! mkHsVar $! quoter
+ quoterExpr = L (l2l quoter) $! mkHsVar $! Exact . ExactName <$> quoter
quoteExpr = L q_span $! HsLit noExtField $! HsString NoSourceText quote
quote_selector = case flavour of
UntypedExpSplice -> quoteExpName
=====================================
compiler/GHC/Tc/Gen/Splice.hs
=====================================
@@ -834,7 +834,7 @@ tcUntypedSplice (QuoteWrapper _ m_var) splice_name (HsQuasiQuote (HsQuasiQuoteEx
res_co <- unifyInvisibleType InvisibleKind splice_ty quote_ty
-- 3. Lookup the relevant field selector from QuasiQuoter
- sel <- tcLookupId qq_sel_name
+ sel <- tcLookupKnownOccId qq_sel_name
-- 4. Apply the selector to the quasi-quoter
let expr' = mkLHsWrapCo res_co $
@@ -877,7 +877,7 @@ tcPendingSpliceTyped q@(QuoteWrapper _ m_var) splice_name (HsTypedSpliceExpr _ e
; let rep = getRuntimeRep res_ty
; meta_exp_ty <- tcCodeTy m_var res_ty
; expr' <- tcCheckMonoExpr expr meta_exp_ty
- ; untype_code <- tcLookupId unTypeCodeName
+ ; untype_code <- tcLookupKnownOccId unTypeCodeOcc
; let expr'' = mkHsApp
(mkLHsWrap (applyQuoteWrapper q)
(nlHsTyApp untype_code [rep, res_ty])) expr'
=====================================
libraries/base/src/GHC/Essentials.hs
=====================================
@@ -195,7 +195,7 @@ module GHC.Essentials
, Lift, Quote -- The Lift and Quote classeso
, Q, DecsQ, ExpQ, TypeQ, PatQ
, Name, Decs, TH.Type, FunDep
- , Pred, Code, InjectivityAnn, Overlap, ModName, QuasiQuoter
+ , Pred, Code, InjectivityAnn, ModName
, Con, BangType, VarBangType, RuleBndr, TySynEqn, Role, DerivClause
, Kind, TyVarBndrUnit, TyVarBndrSpec, TyVarBndrVis, DerivStrategy
, sequenceQ, newName, mkName, mkNameG_v, mkNameG_d, mkNameG_tc, mkNameG_fld, mkNameL
@@ -221,6 +221,9 @@ module GHC.Essentials
, letE, caseE, doE, mdoE, compE, fromE, fromThenE, fromToE, fromThenToE
, listE, sigE, recConE, recUpdE, staticE, unboundVarE, labelE, implicitParamVarE
, getFieldE, projectionE, typeE, forallE, forallVisE, constrainedE
+ , TH.cxt
+ , TH.noSourceUnpackedness, TH.sourceNoUnpack, TH.sourceUnpack
+ , TH.noSourceStrictness, TH.sourceLazy, TH.sourceStrict
, FieldExp, fieldExp
, FieldPat, fieldPat
, Match, match
@@ -228,6 +231,35 @@ module GHC.Essentials
, Stmt, bindS, letS, noBindS, parS, recS
, Body, normalB, guardedB
, Guard, normalGE, patGE
+ , normalC, recC, infixC, forallC, gadtC, recGadtC
+ , TH.bang, TH.bangType, TH.varBangType
+ , TH.unidir, TH.implBidir, TH.explBidir
+ , TH.prefixPatSyn, TH.recordPatSyn, TH.infixPatSyn
+ , forallT, forallVisT, varT, conT, infixT, tupleT,
+ , unboxedTupleT, unboxedSumT, arrowT, mulArrowT, listT,
+ , appT, appKindT, sigT, equalityT, litT, promotedT,
+ , promotedTupleT, promotedNilT, promotedConsT,
+ , wildCardT, implicitParamT
+ , numTyLit, strTyLit, charTyLit
+ , plainTV, kindedTV
+ , plainInvisTV, kindedInvisTV
+ , specifiedSpec, inferredSpec
+ , bndrReq, bndrInvis
+ , nominalR, representationalR, phantomR, inferR
+ , starK, constraintK
+ , noSig, kindSig, tyVarSig
+ , injectivityAnn
+ , TH.cCall, TH.stdCall, TH.cApiCall, TH.primCall, TH.javaScriptCall
+ , TH.unsafe, TH.safe, TH.interruptible
+ , TH.ruleVar, TH.typedRuleVar
+ , TH.funDep, TH.tySynEqn
+ , TH.valueAnnotation, TH.typeAnnotation, TH.moduleAnnotation
+ , TH.derivClause
+ , TH.stockStrategy, TH.anyclassStrategy, TH.newtypeStrategy, TH.viaStrategy
+ , TH.QuasiQuoter(..)
+ , TH.Inline(..), TH.RuleMatch(..)
+ , TH.Phases(..) , TH.Overlap(..)
+ , TH.NamespaceSpecifier(..)
-- GHCi
, GHCiSandboxIO(ghciStepIO)
@@ -298,7 +330,7 @@ import GHC.Internal.TH.Syntax as TH
hiding( Fixity(..), SourceUnpackedness(..), SourceStrictness(..)
, DecidedStrictness(..) )
-- hiding(Fixity) see Note [Tricky known-occ cases] in GHC.Builtin.KnownOccs
-import GHC.Internal.TH.Lib
+import GHC.Internal.TH.Lib as TH
import GHC.Internal.TH.Lift
import GHC.Internal.TH.Monad
import GHC.Internal.TopHandler
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/cec620e84ff1f6bb18ed942c2f13e8…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/cec620e84ff1f6bb18ed942c2f13e8…
You're receiving this email because of your account on gitlab.haskell.org.
1
0
18 May '26
Simon Jakobi pushed new branch wip/sjakobi/T27103-nub at Glasgow Haskell Compiler / GHC
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/sjakobi/T27103-nub
You're receiving this email because of your account on gitlab.haskell.org.
1
0
[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 12 commits: Do not use mkCast during typechecking
by Marge Bot (@marge-bot) 18 May '26
by Marge Bot (@marge-bot) 18 May '26
18 May '26
Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC
Commits:
217773a7 by Simon Peyton Jones at 2026-05-18T08:51:39-04:00
Do not use mkCast during typechecking
This commit fixes #27219. The problem was that the typechecker was using
`mkCast`, whose assertion checks legitimately fail when applied to types
that contain unification variables.
- - - - -
c1a1c528 by Simon Peyton Jones at 2026-05-18T08:51:40-04:00
Major refactor of the Simplifier
The main payload of this patch is to refactor the Simplifer to avoid
repeated simplification when using Plan (AFTER) for rule rewrites.
The need for this was shown up by #26989.
See Note [Avoid repeated simplification] in GHC.Core.Opt.Simplify.Iteration.
Related refactoring:
* Refactor the two fields `sc_dup` and `sc_env` in `ApplyToVal` into one, `sc_env`.
Reason: the envt is irrelevant in the "simplified" case, so the data type describes
the possiblitiies much more accurately now.
* Some refactoring in `knownCon` to split off `wrapDataConFloats`.
* Refactor `lookupRule` and its auxiliary functions to return `RuleMatch`,
a new data type. See Note [data RuleMatch] in GHC.Core. Ditto for BuiltinRule.
This RuleMatch returns fragments of the target in rm_args and rm_floats,
leaving `rm_rhs` to be the stuff from the RULE itself.
Doing this has routine consequences in GHC.Core.Opt.ConstantFold. Many changes
there but all routine.
* When doing occurrence analysis on RULEs, make the occ-info on the rule
binders relate just to the RHS, not the LHS. See (OUR1) in
Note Note [OccInfo in unfoldings and rules]
This means that Lint must not complain about the fact that the patterns
in the RULE mentions binders that are marked dead.
See Note [Dead occurrences] in GHC.Core.Lint.
I changed the Core pretty-printer so that it didn't suppress dead binders,
else I can't see those binders in RULEs. That led to quite a lot of testsuite wibbles.
* Refactor FloatBinds, so that it is used both by
`exprIsConApp_mabye` and by `lookupRule`
* Move the definition of FloatBinds out of GHc.Core.Make, into GHC.Core.
* Add FloatTick as an extra constructor.
* Refactor `lookupRule` to use `FloatBinds` instead of `BindWrapper`.
This refactor just shares more code.
(Rename GHC.Core.Opt.FloatOut.FloatBinds to FloatLets, to avoid gratuitious
name clash with GHC.Core.FloatBinds.)
Corecion optimisation
* In simpleOpt, when composing coercions, call new function `optTransCo`.
This is much lighter weight than full blown coercion optimisation.
* Make `GHC.Core.Opt.Arity.pushCoValArg` and `pushCoTyArg` return the
coercionLKind of the coercion. This saves recomputing that coercionLKind
at the key call sites in GHC.Core.Opt.Simplify.Iteration.pushCast.
* Rename `addCoerce` in GHC.Core.Simplify.Iteration to become `pushCast`.
* In the `ApplyToVal` case of `pushCast` we had a very unsavoury call to `simplArg`.
I eliminated it by adding a field `sc_cast` to `ApplyToVal` that records any
pending casts. Much nicer now. See Note [The sc_cast field of ApplyToVal].
* Don't optimise coercions if the type-substitution is empty.
See Note [Optimising coercions] in GHC.Core.Opt.Simplify.Iteration.
The fix for #26838 is dramatic. For the test in perf/compiler/T26839 we have
Compiler allocs: Before: 7,363M
After: 688M
Compile time goes down generally. Here are compiler-alloc changes
over 0.5%:
CoOpt_Read(normal) 729,184,920 -0.7%
CoOpt_Singletons(normal) 666,916,960 -4.6% GOOD
LargeRecord(normal) 1,227,056,876 +1.1%
T12227(normal) 256,827,604 -4.6% GOOD
T12425(optasm) 76,879,410 -0.8%
T12545(normal) 787,826,918 -10.8% GOOD
T12707(normal) 775,186,464 -0.9%
T13253(normal) 318,599,596 -0.8%
T14766(normal) 685,857,320 -1.0%
T15304(normal) 1,123,333,422 -2.2%
T15630(normal) 123,142,330 -2.6%
T15630a(normal) 123,092,100 -2.6%
T15703(normal) 299,751,682 -2.9% GOOD
T17516(normal) 964,072,280 +1.0%
T18223(normal) 367,016,820 -6.2% GOOD
T18730(optasm) 130,643,770 -3.3% GOOD
T20261(normal) 535,608,584 -0.7%
T21839c(normal) 340,340,436 -0.9%
T24984(normal) 85,568,392 -1.9%
T3064(normal) 174,631,992 -1.2%
T3294(normal) 1,215,886,432 -0.7%
T5030(normal) 141,449,704 -17.2% GOOD
T5321Fun(normal) 258,484,744 -1.9%
T8095(normal) 770,532,232 -2.7%
T9630(normal) 858,423,408 -14.5% GOOD
T9872c(normal) 1,591,709,448 +0.7%
info_table_map_perf(normal) 19,700,614,458 -1.3%
geo. mean -0.7%
minimum -17.2%
maximum +1.1%
However, strangely there seems to be a 5.0% increase in CoOpt_Read in
the x86_64-linux-fedora43-validate+debug_info+ubsan job, although
there generally a /decrease/ in this test in other builds. The baseline
value looks strange. Anyway I'll just accept it.
Metric Decrease:
CoOpt_Singletons
T12227
T12545
T15703
T18223
T18730
T21839c
T5030
T9630
Metric Increase:
CoOpt_Read
- - - - -
afcc36df by Vladislav Zavialov at 2026-05-18T08:51:41-04:00
Add type families: Tuple, Constraints, Tuple#, Sum# (#27179)
These type families map tuples of types to the corresponding Tuple<N>,
Tuple<N>#, CTuple<N>, and Sum<N># types. Some examples at N=2:
Tuple (Int, Bool) = Tuple2 Int Bool
Constraints (Show a, Eq a) = CTuple2 (Show a) (Eq a)
Tuple# (Int#, Float#) = Tuple2# Int# Float#
Sum# (Int#, Float#) = Sum2# Int# Float#
See GHC Proposal #145 "Non-punning list and tuple syntax".
To make the Sum# instance at N=64 possible, this patch also introduces
the Sum64# constructor declaration and bumps mAX_SUM_SIZE from 63 to 64.
Metric Increase:
ghc_experimental_dir
- - - - -
93de8040 by fendor at 2026-05-18T08:51:42-04:00
Fix regression T27202: `:load` and `:add` work in GHCi
To fix the regression there are conceptually two major things that we
fix:
* We don't remove the `importDirs` from `interactive-session`
* When `:add`ing a module, we don't try to find them via PackageImports
* The PackageImport is wrong as we can't know the package-name at
this stage in ghc/UI.hs
What does it mean to not remove the `importDirs` from
`interactive-session`?
It means that, given some initial `DynFlags`, we will use those
`importDirs` in `interactive-session`.
The initial `DynFlags`, however, depend on how you initialise the GHC
session.
For a simple session, initialised by
ghc -isrc -this-unit-id main
It is simple, just use the `DynFlags` given on the cli.
Thus, `main` and `interactive-session` will have the same `DynFlags`,
except for the `homeUnitId` and `interactive-session` depends on `main`
by construction of the GHCi session.
What about a multiple home unit session, though?
ghc -unit @unit1 -unit @unit2
What are the `DynFlags` in this cli invocation? It shouldn't be either
`@unti1` nor `@unit2`, as the order shouldn't matter or any other
implicit condition.
For consistency, we decide that the initial `DynFlags` are the top
`DynFlags` on the cli, ignoring `-unit` flags.
Thus, in this example, there are no `importsDirs` regardless of what we
might find in `@unit1` and `@unit2`.
But in this invocation:
ghc -isrc -unit @unit1 -unit @unit2
The `interactive-session` will have the `importsDirs` `src`.
Note, `-isrc` will be inherited in `@unit1` and `@unit2`, so you need to
explicitly use `-i` to clear the `importsDirs`, in order to avoid
accidentally adding `src` as an import directory to all other home
units.
This fix has been made possible by the improvements introduced in
!15888, which avoids ambiguity when a home unit shares the `importsDirs`
with the `interactive-session`, on top of being much faster for multiple
home units.
Adds regression tests for T27202 for `:load`ing and `:add`ing modules
that are located in import directories.
- - - - -
b82de225 by fendor at 2026-05-18T08:51:42-04:00
Use home unit package db stacks in GHCi prompt and session unit
In order to import modules from home unit dependencies (e.g., `Data.Map`),
the ghci prompt unit needs to populate its `UnitState`.
This is tricky to handle correctly, which `PackageDBFlag`s should we use
to populate the `UnitState`?
We decide, the most intuitive solution for users is to depend on all
`PackageDBFlag`s, so that any dependency can be imported in GHCi.
This assumes consistency in the `PackageDBFlag`s, so no two home units
specify `PackageDBFlag`s that are inconsistent with each other.
We could simply concat all the `PackageDBFlag`s of the existing home
units, but later `PackageDBFlag`s shadow earlier ones, leading to the
last processed home units' `PackageDBFlag`s to shadow the earlier ones.
This is hard to fix, we need to give users the capability to provide ghc
options for the ghci prompt home unit.
However, as this is considerably more work, we decided on an
approximation that should work out most of the time.
Package Db stacks in cabal and stack follow a certain structure:
-no-user-package-db > -package-db $cabal-store > -package-db $local-db
The first two arguments are always the same, namely the
`-no-user-package-db` and `-package-db`.
We compute the longest common prefix over all home units, and use that
as the start of the package db stack. Then, over the rest of the
`PackageDBFlag`s, we simply take the union and append them to our
initial stack.
We assume, that the rest of package dbs only defines very few, "local"
units that are usually not shadowing each other.
This allows us to get a relatively consistent package database stack for
the ghci prompt home unit.
Similar reasoning applies to the session unit in order to add modules to
the session and have dependencies available in the module.
We do something similar for `-package` flags, to make sure only the
correct units are actually visible in the ghci session.
This time, we simply take the union of all `PackageFlag`s, allowing us
to import modules from the home unit dependencies.
In the future, it would be beneficial to allow the user to provide the
exact ghc options to control the visibilities. For now, this will have
to do.
- - - - -
25d25057 by Wen Kokke at 2026-05-18T08:51:43-04:00
rts: Add IPE event class for -l
This commit adds a new IPE event class to the -l RTS flag.
Previously, IPE events were enabled unconditionally.
However, the IPE events can easily grow to hundreds or thousands of megabytes.
With the new event class you can pass, e.g., -l-I to disable IPE events.
- - - - -
b5fa3694 by Wen Kokke at 2026-05-18T08:51:43-04:00
ghc-internal: Add TraceFlags.traceIPE
- - - - -
eaf76269 by Wen Kokke at 2026-05-18T08:51:43-04:00
testsuite: Add test for TraceFlags.traceIpe
- - - - -
bd95e14b by Wen Kokke at 2026-05-18T08:51:44-04:00
ghc-internal: Add DebugFlags.ipe
- - - - -
d7f0aef0 by Wen Kokke at 2026-05-18T08:51:44-04:00
testsuite: Add test for DebugFlags.ipe
- - - - -
d9a1dfa8 by Duncan Coutts at 2026-05-18T08:51:45-04:00
Document removal of the signal-based interval timer
Update mentions within the RTS section of the users guide.
Add a changelog entry.
- - - - -
296562c8 by Duncan Coutts at 2026-05-18T08:51:45-04:00
Fix section for an recent changelog entry
- - - - -
164 changed files:
- + changelog.d/T27202
- changelog.d/dynamic-trace-flags
- + changelog.d/ipe-event-class
- + changelog.d/lib-add-tuple-tyfam-27179
- + changelog.d/no-more-timer-signal
- compiler/GHC/Core.hs
- compiler/GHC/Core/Coercion.hs
- compiler/GHC/Core/Coercion/Opt.hs
- compiler/GHC/Core/Lint.hs
- compiler/GHC/Core/Make.hs
- compiler/GHC/Core/Opt/Arity.hs
- compiler/GHC/Core/Opt/ConstantFold.hs
- compiler/GHC/Core/Opt/FloatIn.hs
- compiler/GHC/Core/Opt/FloatOut.hs
- compiler/GHC/Core/Opt/OccurAnal.hs
- compiler/GHC/Core/Opt/Simplify/Env.hs
- compiler/GHC/Core/Opt/Simplify/Iteration.hs
- compiler/GHC/Core/Opt/Simplify/Utils.hs
- compiler/GHC/Core/Opt/SpecConstr.hs
- compiler/GHC/Core/Opt/Specialise.hs
- compiler/GHC/Core/Ppr.hs
- compiler/GHC/Core/Rules.hs
- compiler/GHC/Core/SimpleOpt.hs
- compiler/GHC/Core/TyCo/Subst.hs
- compiler/GHC/CoreToStg/Prep.hs
- compiler/GHC/Data/List/SetOps.hs
- compiler/GHC/Driver/Config/Core/Lint.hs
- compiler/GHC/Driver/DynFlags.hs
- compiler/GHC/HsToCore/Pmc/Solver.hs
- compiler/GHC/IfaceToCore.hs
- compiler/GHC/Settings/Constants.hs
- compiler/GHC/Tc/Types/Evidence.hs
- compiler/GHC/Types/Id/Make.hs
- compiler/GHC/Unit/State.hs
- docs/users_guide/profiling.rst
- docs/users_guide/runtime_control.rst
- ghc/GHCi/UI.hs
- ghc/Main.hs
- libraries/base/src/GHC/Base.hs
- libraries/base/src/GHC/Exts.hs
- libraries/ghc-experimental/src/Data/Sum/Experimental.hs
- libraries/ghc-experimental/src/Data/Tuple/Experimental.hs
- libraries/ghc-internal/src/GHC/Internal/Base.hs
- libraries/ghc-internal/src/GHC/Internal/Exts.hs
- libraries/ghc-internal/src/GHC/Internal/RTS/Flags.hsc
- libraries/ghc-internal/src/GHC/Internal/Types.hs
- rts/IPE.c
- rts/RtsFlags.c
- rts/Trace.c
- rts/Trace.h
- rts/include/rts/EventLogWriter.h
- rts/include/rts/Flags.h
- testsuite/tests/codeGen/should_compile/T25177.stderr
- testsuite/tests/deSugar/should_compile/T13208.stdout
- testsuite/tests/driver/fat-iface/fat014.stdout
- + testsuite/tests/ghci/prog-mhu006/Makefile
- + testsuite/tests/ghci/prog-mhu006/a/A.hs
- + testsuite/tests/ghci/prog-mhu006/all.T
- + testsuite/tests/ghci/prog-mhu006/b/B.hs
- + testsuite/tests/ghci/prog-mhu006/prog-mhu006a.script
- + testsuite/tests/ghci/prog-mhu006/prog-mhu006a.stdout
- + testsuite/tests/ghci/prog-mhu006/unitA
- + testsuite/tests/ghci/prog-mhu006/unitB
- testsuite/tests/ghci/prog018/prog018.stdout
- testsuite/tests/ghci/prog020/Makefile
- testsuite/tests/ghci/prog020/all.T
- testsuite/tests/ghci/prog020/ghci.prog020.script → testsuite/tests/ghci/prog020/ghci.prog020a.script
- testsuite/tests/ghci/prog020/ghci.prog020.stderr → testsuite/tests/ghci/prog020/ghci.prog020a.stderr
- testsuite/tests/ghci/prog020/ghci.prog020.stdout → testsuite/tests/ghci/prog020/ghci.prog020a.stdout
- + testsuite/tests/ghci/prog020/ghci.prog020b.script
- + testsuite/tests/ghci/prog020/ghci.prog020b.stderr
- + testsuite/tests/ghci/prog020/ghci.prog020b.stdout
- + testsuite/tests/ghci/prog023/Makefile
- + testsuite/tests/ghci/prog023/all.T
- + testsuite/tests/ghci/prog023/prog023a.script
- + testsuite/tests/ghci/prog023/prog023a.stdout
- + testsuite/tests/ghci/prog023/prog023b.script
- + testsuite/tests/ghci/prog023/prog023b.stdout
- + testsuite/tests/ghci/prog023/src/A.hs
- + testsuite/tests/ghci/prog024/Makefile
- + testsuite/tests/ghci/prog024/all.T
- + testsuite/tests/ghci/prog024/prog024a.script
- + testsuite/tests/ghci/prog024/prog024a.stdout
- + testsuite/tests/ghci/prog024/prog024b.script
- + testsuite/tests/ghci/prog024/prog024b.stdout
- + testsuite/tests/ghci/prog024/prog024c.script
- + testsuite/tests/ghci/prog024/prog024c.stderr
- + testsuite/tests/ghci/prog024/prog024c.stdout
- + testsuite/tests/ghci/prog024/prog024d.script
- + testsuite/tests/ghci/prog024/prog024d.stderr
- + testsuite/tests/ghci/prog024/prog024d.stdout
- + testsuite/tests/ghci/prog024/prog024e.script
- + testsuite/tests/ghci/prog024/prog024e.stdout
- + testsuite/tests/ghci/prog024/prog024f.script
- + testsuite/tests/ghci/prog024/prog024f.stdout
- + testsuite/tests/ghci/prog024/src/A.hs
- + testsuite/tests/ghci/prog024/src/B.hs
- + testsuite/tests/ghci/prog025/Makefile
- + testsuite/tests/ghci/prog025/a/A.hs
- + testsuite/tests/ghci/prog025/all.T
- + testsuite/tests/ghci/prog025/prog025a.script
- + testsuite/tests/ghci/prog025/prog025a.stdout
- + testsuite/tests/ghci/prog025/prog025b.script
- + testsuite/tests/ghci/prog025/prog025b.stdout
- + testsuite/tests/ghci/prog025/testpkg/Test.hs
- + testsuite/tests/ghci/prog025/testpkg/testpkg-0.1.0.0.pkg
- + testsuite/tests/ghci/prog025/testpkg/testpkg-0.2.0.0.pkg
- + testsuite/tests/ghci/prog025/unitA
- testsuite/tests/ghci/scripts/ListTuplePunsPprNoAbbrevTuple.stdout
- testsuite/tests/ghci/scripts/T13997.stdout
- testsuite/tests/ghci/scripts/T1914.stdout
- testsuite/tests/ghci/scripts/T20217.stdout
- testsuite/tests/ghci/scripts/T8042.stdout
- testsuite/tests/ghci/scripts/T8042recomp.stdout
- testsuite/tests/ghci/scripts/all.T
- testsuite/tests/ghci/should_run/T10920.stderr
- testsuite/tests/interface-stability/ghc-experimental-exports.stdout
- testsuite/tests/interface-stability/ghc-experimental-exports.stdout-mingw32
- testsuite/tests/interface-stability/ghc-prim-exports.stdout
- testsuite/tests/interface-stability/ghc-prim-exports.stdout-mingw32
- testsuite/tests/linters/notes.stdout
- testsuite/tests/numeric/should_compile/T15547.stderr
- testsuite/tests/numeric/should_compile/T20347.stderr
- testsuite/tests/numeric/should_compile/T20374.stderr
- testsuite/tests/numeric/should_compile/T20376.stderr
- testsuite/tests/parser/should_compile/ListTuplePunsSuccess1.hs
- testsuite/tests/parser/should_compile/all.T
- + testsuite/tests/parser/should_fail/ListTuplePunsFail6.hs
- + testsuite/tests/parser/should_fail/ListTuplePunsFail6.stderr
- testsuite/tests/parser/should_fail/all.T
- testsuite/tests/parser/should_run/ListTuplePunsConstraints.hs
- + testsuite/tests/perf/compiler/T26989.hs
- + testsuite/tests/perf/compiler/T26989a.hs
- testsuite/tests/perf/compiler/all.T
- testsuite/tests/printer/T18052a.stderr
- testsuite/tests/profiling/should_run/callstack001.stdout
- + testsuite/tests/rts/T25275/DebugIpe.hs
- + testsuite/tests/rts/T25275/T25275_A.stdout
- + testsuite/tests/rts/T25275/T25275_B.stdout
- + testsuite/tests/rts/T25275/T25275_C.stdout
- + testsuite/tests/rts/T25275/T25275_D.stdout
- + testsuite/tests/rts/T25275/TraceIpe.hs
- + testsuite/tests/rts/T25275/all.T
- testsuite/tests/simplCore/should_compile/DsSpecPragmas.stderr
- testsuite/tests/simplCore/should_compile/RewriteHigherOrderPatterns.stderr
- testsuite/tests/simplCore/should_compile/T15205.stderr
- testsuite/tests/simplCore/should_compile/T18668.stderr
- testsuite/tests/simplCore/should_compile/T19246.stderr
- testsuite/tests/simplCore/should_compile/T19599.stderr
- testsuite/tests/simplCore/should_compile/T19599a.stderr
- testsuite/tests/simplCore/should_compile/T21917.stderr
- testsuite/tests/simplCore/should_compile/T23074.stderr
- testsuite/tests/simplCore/should_compile/T24359a.stderr
- testsuite/tests/simplCore/should_compile/T25160.stderr
- testsuite/tests/simplCore/should_compile/T25718c.stderr-ws-32
- testsuite/tests/simplCore/should_compile/T25718c.stderr-ws-64
- testsuite/tests/simplCore/should_compile/T26051.stderr
- testsuite/tests/simplCore/should_compile/T26116.stderr
- testsuite/tests/simplCore/should_compile/T8331.stderr
- testsuite/tests/simplCore/should_compile/T8848a.stderr
- testsuite/tests/simplCore/should_compile/spec004.stderr
- testsuite/tests/typecheck/should_compile/T13032.stderr
- + testsuite/tests/typecheck/should_compile/T23135.hs
- testsuite/tests/typecheck/should_compile/all.T
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/31528dd950767b547abdf42f52abe0…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/31528dd950767b547abdf42f52abe0…
You're receiving this email because of your account on gitlab.haskell.org.
1
0
[Git][ghc/ghc][wip/jeltsch/trustworthy-to-safe-in-base] Turn `Trustworthy` into `Safe` in `base` where possible
by Wolfgang Jeltsch (@jeltsch) 18 May '26
by Wolfgang Jeltsch (@jeltsch) 18 May '26
18 May '26
Wolfgang Jeltsch pushed to branch wip/jeltsch/trustworthy-to-safe-in-base at Glasgow Haskell Compiler / GHC
Commits:
c6461eb8 by Wolfgang Jeltsch at 2026-05-18T15:13:21+03:00
Turn `Trustworthy` into `Safe` in `base` where possible
- - - - -
8 changed files:
- libraries/base/src/Control/Exception.hs
- libraries/base/src/Control/Monad/IO/Class.hs
- libraries/base/src/Data/Fixed.hs
- libraries/base/src/Data/List/NonEmpty.hs
- libraries/base/src/System/Timeout.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
Changes:
=====================================
libraries/base/src/Control/Exception.hs
=====================================
@@ -1,4 +1,4 @@
-{-# LANGUAGE Trustworthy #-}
+{-# LANGUAGE Safe #-}
-- |
--
=====================================
libraries/base/src/Control/Monad/IO/Class.hs
=====================================
@@ -1,4 +1,4 @@
-{-# LANGUAGE Trustworthy #-}
+{-# LANGUAGE Safe #-}
-----------------------------------------------------------------------------
-- |
=====================================
libraries/base/src/Data/Fixed.hs
=====================================
@@ -1,4 +1,4 @@
-{-# LANGUAGE Trustworthy #-}
+{-# LANGUAGE Safe #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE FlexibleInstances #-}
=====================================
libraries/base/src/Data/List/NonEmpty.hs
=====================================
@@ -1,4 +1,4 @@
-{-# LANGUAGE Trustworthy #-} -- can't use Safe due to IsList instance
+{-# LANGUAGE Safe #-}
{-# LANGUAGE TypeFamilies #-}
-----------------------------------------------------------------------------
=====================================
libraries/base/src/System/Timeout.hs
=====================================
@@ -1,5 +1,5 @@
{-# LANGUAGE CPP #-}
-{-# LANGUAGE Trustworthy #-}
+{-# LANGUAGE Safe #-}
-------------------------------------------------------------------------------
-- |
=====================================
testsuite/tests/interface-stability/base-exports.stdout
=====================================
@@ -213,7 +213,7 @@ module Control.Concurrent.QSemN where
waitQSemN :: QSemN -> GHC.Internal.Types.Int -> GHC.Internal.Types.IO ()
module Control.Exception where
- -- Safety: Trustworthy
+ -- Safety: Safe
type AllocationLimitExceeded :: *
data AllocationLimitExceeded = AllocationLimitExceeded
type ArithException :: *
@@ -508,7 +508,7 @@ module Control.Monad.Fix where
fix :: forall a. (a -> a) -> a
module Control.Monad.IO.Class where
- -- Safety: Trustworthy
+ -- Safety: Safe
type MonadIO :: (* -> *) -> Constraint
class GHC.Internal.Base.Monad m => MonadIO m where
liftIO :: forall a. GHC.Internal.Types.IO a -> m a
@@ -994,7 +994,7 @@ module Data.Eq where
{-# MINIMAL (==) | (/=) #-}
module Data.Fixed where
- -- Safety: Trustworthy
+ -- Safety: Safe
type Centi :: *
type Centi = Fixed E2
type Deci :: *
@@ -1438,7 +1438,7 @@ module Data.List where
zipWith7 :: forall a b c d e f g h. (a -> b -> c -> d -> e -> f -> g -> h) -> [a] -> [b] -> [c] -> [d] -> [e] -> [f] -> [g] -> [h]
module Data.List.NonEmpty where
- -- Safety: Trustworthy
+ -- Safety: Safe
(!!) :: forall a. GHC.Internal.Stack.Types.HasCallStack => NonEmpty a -> GHC.Internal.Types.Int -> a
(<|) :: forall a. a -> NonEmpty a -> NonEmpty a
type NonEmpty :: * -> *
@@ -10253,7 +10253,7 @@ module System.Posix.Types where
module System.Timeout where
- -- Safety: Trustworthy
+ -- Safety: Safe
type Timeout :: *
newtype Timeout = ...
timeout :: forall a. GHC.Internal.Types.Int -> GHC.Internal.Types.IO a -> GHC.Internal.Types.IO (GHC.Internal.Maybe.Maybe a)
@@ -10572,14 +10572,14 @@ instance forall x y z. Data.Bitraversable.Bitraversable ((,,,,) x y z) -- Define
instance forall x y z w. Data.Bitraversable.Bitraversable ((,,,,,) x y z w) -- Defined in ‘Data.Bitraversable’
instance forall x y z w v. Data.Bitraversable.Bitraversable ((,,,,,,) x y z w v) -- Defined in ‘Data.Bitraversable’
instance Data.Bitraversable.Bitraversable Data.Semigroup.Arg -- Defined in ‘Data.Semigroup’
-instance forall (n :: GHC.Internal.TypeNats.Nat). GHC.Internal.TypeNats.KnownNat n => Data.Fixed.HasResolution n -- Defined in ‘Data.Fixed’
-instance Data.Fixed.HasResolution Data.Fixed.E0 -- Defined in ‘Data.Fixed’
-instance Data.Fixed.HasResolution Data.Fixed.E1 -- Defined in ‘Data.Fixed’
-instance Data.Fixed.HasResolution Data.Fixed.E12 -- Defined in ‘Data.Fixed’
-instance Data.Fixed.HasResolution Data.Fixed.E2 -- Defined in ‘Data.Fixed’
-instance Data.Fixed.HasResolution Data.Fixed.E3 -- Defined in ‘Data.Fixed’
-instance Data.Fixed.HasResolution Data.Fixed.E6 -- Defined in ‘Data.Fixed’
-instance Data.Fixed.HasResolution Data.Fixed.E9 -- Defined in ‘Data.Fixed’
+instance [safe] forall (n :: GHC.Internal.TypeNats.Nat). GHC.Internal.TypeNats.KnownNat n => Data.Fixed.HasResolution n -- Defined in ‘Data.Fixed’
+instance [safe] Data.Fixed.HasResolution Data.Fixed.E0 -- Defined in ‘Data.Fixed’
+instance [safe] Data.Fixed.HasResolution Data.Fixed.E1 -- Defined in ‘Data.Fixed’
+instance [safe] Data.Fixed.HasResolution Data.Fixed.E12 -- Defined in ‘Data.Fixed’
+instance [safe] Data.Fixed.HasResolution Data.Fixed.E2 -- Defined in ‘Data.Fixed’
+instance [safe] Data.Fixed.HasResolution Data.Fixed.E3 -- Defined in ‘Data.Fixed’
+instance [safe] Data.Fixed.HasResolution Data.Fixed.E6 -- Defined in ‘Data.Fixed’
+instance [safe] Data.Fixed.HasResolution Data.Fixed.E9 -- Defined in ‘Data.Fixed’
instance forall (f :: * -> *) (g :: * -> *). (Data.Foldable1.Foldable1 f, Data.Foldable1.Foldable1 g) => Data.Foldable1.Foldable1 (f GHC.Internal.Generics.:*: g) -- Defined in ‘Data.Foldable1’
instance forall (f :: * -> *) (g :: * -> *). (Data.Foldable1.Foldable1 f, Data.Foldable1.Foldable1 g) => Data.Foldable1.Foldable1 (f GHC.Internal.Generics.:+: g) -- Defined in ‘Data.Foldable1’
instance forall (f :: * -> *) (g :: * -> *). (Data.Foldable1.Foldable1 f, Data.Foldable1.Foldable1 g) => Data.Foldable1.Foldable1 (f GHC.Internal.Generics.:.: g) -- Defined in ‘Data.Foldable1’
@@ -11240,7 +11240,7 @@ instance forall k (s :: k). GHC.Internal.Classes.Eq (GHC.Internal.Data.Proxy.Pro
instance GHC.Internal.Classes.Eq ghc-internal-10.100.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep -- Defined in ‘ghc-internal-10.100.0:GHC.Internal.Data.Typeable.Internal’
instance forall k (a :: k). GHC.Internal.Classes.Eq (ghc-internal-10.100.0:GHC.Internal.Data.Typeable.Internal.TypeRep a) -- Defined in ‘ghc-internal-10.100.0:GHC.Internal.Data.Typeable.Internal’
instance forall a b. (GHC.Internal.Classes.Eq a, GHC.Internal.Classes.Eq b) => GHC.Internal.Classes.Eq (GHC.Internal.Data.Either.Either a b) -- Defined in ‘GHC.Internal.Data.Either’
-instance forall k (a :: k). GHC.Internal.Classes.Eq (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’
+instance [safe] forall k (a :: k). GHC.Internal.Classes.Eq (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’
instance forall k1 k2 (f :: k1 -> *) (g :: k2 -> k1) (a :: k2). GHC.Internal.Classes.Eq (f (g a)) => GHC.Internal.Classes.Eq (Data.Functor.Compose.Compose f g a) -- Defined in ‘Data.Functor.Compose’
instance forall a. GHC.Internal.Classes.Eq a => GHC.Internal.Classes.Eq (GHC.Internal.Data.Functor.Identity.Identity a) -- Defined in ‘GHC.Internal.Data.Functor.Identity’
instance [safe] forall k (f :: k -> *) (a :: k) (g :: k -> *). (GHC.Internal.Classes.Eq (f a), GHC.Internal.Classes.Eq (g a)) => GHC.Internal.Classes.Eq (Data.Functor.Product.Product f g a) -- Defined in ‘Data.Functor.Product’
@@ -11371,7 +11371,7 @@ instance forall (c :: GHC.Internal.Types.Char). GHC.Internal.Classes.Eq (GHC.Int
instance forall (s :: GHC.Internal.Types.Symbol). GHC.Internal.Classes.Eq (GHC.Internal.TypeLits.SSymbol s) -- Defined in ‘GHC.Internal.TypeLits’
instance GHC.Internal.Classes.Eq GHC.Internal.TypeLits.SomeChar -- Defined in ‘GHC.Internal.TypeLits’
instance GHC.Internal.Classes.Eq GHC.Internal.TypeLits.SomeSymbol -- Defined in ‘GHC.Internal.TypeLits’
-instance GHC.Internal.Classes.Eq System.Timeout.Timeout -- Defined in ‘System.Timeout’
+instance [safe] GHC.Internal.Classes.Eq System.Timeout.Timeout -- Defined in ‘System.Timeout’
instance GHC.Internal.Classes.Eq GHC.Internal.Text.Read.Lex.Lexeme -- Defined in ‘GHC.Internal.Text.Read.Lex’
instance GHC.Internal.Classes.Eq GHC.Internal.Text.Read.Lex.Number -- Defined in ‘GHC.Internal.Text.Read.Lex’
instance forall a. GHC.Internal.Classes.Ord a => GHC.Internal.Classes.Ord (GHC.Internal.Base.NonEmpty a) -- Defined in ‘GHC.Internal.Base’
@@ -11419,7 +11419,7 @@ instance forall k (s :: k). GHC.Internal.Classes.Ord (GHC.Internal.Data.Proxy.Pr
instance GHC.Internal.Classes.Ord ghc-internal-10.100.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep -- Defined in ‘ghc-internal-10.100.0:GHC.Internal.Data.Typeable.Internal’
instance forall k (a :: k). GHC.Internal.Classes.Ord (ghc-internal-10.100.0:GHC.Internal.Data.Typeable.Internal.TypeRep a) -- Defined in ‘ghc-internal-10.100.0:GHC.Internal.Data.Typeable.Internal’
instance forall a b. (GHC.Internal.Classes.Ord a, GHC.Internal.Classes.Ord b) => GHC.Internal.Classes.Ord (GHC.Internal.Data.Either.Either a b) -- Defined in ‘GHC.Internal.Data.Either’
-instance forall k (a :: k). GHC.Internal.Classes.Ord (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’
+instance [safe] forall k (a :: k). GHC.Internal.Classes.Ord (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’
instance forall k1 k2 (f :: k1 -> *) (g :: k2 -> k1) (a :: k2). GHC.Internal.Classes.Ord (f (g a)) => GHC.Internal.Classes.Ord (Data.Functor.Compose.Compose f g a) -- Defined in ‘Data.Functor.Compose’
instance forall a. GHC.Internal.Classes.Ord a => GHC.Internal.Classes.Ord (GHC.Internal.Data.Functor.Identity.Identity a) -- Defined in ‘GHC.Internal.Data.Functor.Identity’
instance [safe] forall k (f :: k -> *) (a :: k) (g :: k -> *). (GHC.Internal.Classes.Ord (f a), GHC.Internal.Classes.Ord (g a)) => GHC.Internal.Classes.Ord (Data.Functor.Product.Product f g a) -- Defined in ‘Data.Functor.Product’
@@ -11729,7 +11729,7 @@ instance GHC.Internal.Data.Data.Data GHC.Internal.Word.Word64 -- Defined in ‘G
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 a. GHC.Internal.Data.Data.Data a => GHC.Internal.Data.Data.Data (GHC.Internal.Functor.ZipList.ZipList a) -- Defined in ‘GHC.Internal.Data.Data’
-instance forall k (a :: k). (ghc-internal-10.100.0:GHC.Internal.Data.Typeable.Internal.Typeable k, ghc-internal-10.100.0:GHC.Internal.Data.Typeable.Internal.Typeable a) => GHC.Internal.Data.Data.Data (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’
+instance [safe] forall k (a :: k). (ghc-internal-10.100.0:GHC.Internal.Data.Typeable.Internal.Typeable k, ghc-internal-10.100.0:GHC.Internal.Data.Typeable.Internal.Typeable a) => GHC.Internal.Data.Data.Data (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’
instance forall k1 k2 (f :: k1 -> *) (g :: k2 -> k1) (a :: k2). (ghc-internal-10.100.0:GHC.Internal.Data.Typeable.Internal.Typeable a, ghc-internal-10.100.0:GHC.Internal.Data.Typeable.Internal.Typeable f, ghc-internal-10.100.0:GHC.Internal.Data.Typeable.Internal.Typeable g, ghc-internal-10.100.0:GHC.Internal.Data.Typeable.Internal.Typeable k1, ghc-internal-10.100.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-10.100.0:GHC.Internal.Data.Typeable.Internal.Typeable a, ghc-internal-10.100.0:GHC.Internal.Data.Typeable.Internal.Typeable f, ghc-internal-10.100.0:GHC.Internal.Data.Typeable.Internal.Typeable g, ghc-internal-10.100.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-10.100.0:GHC.Internal.Data.Typeable.Internal.Typeable a, ghc-internal-10.100.0:GHC.Internal.Data.Typeable.Internal.Typeable f, ghc-internal-10.100.0:GHC.Internal.Data.Typeable.Internal.Typeable g, ghc-internal-10.100.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’
@@ -11949,7 +11949,7 @@ instance GHC.Internal.Enum.Enum GHC.Internal.Unicode.GeneralCategory -- Defined
instance forall k (a :: k) (b :: k). (a ~ b) => GHC.Internal.Enum.Enum (a GHC.Internal.Data.Type.Equality.:~: b) -- Defined in ‘GHC.Internal.Data.Type.Equality’
instance forall k1 k2 (a :: k1) (b :: k2). (a ~~ b) => GHC.Internal.Enum.Enum (a GHC.Internal.Data.Type.Equality.:~~: b) -- Defined in ‘GHC.Internal.Data.Type.Equality’
instance forall k (s :: k). GHC.Internal.Enum.Enum (GHC.Internal.Data.Proxy.Proxy s) -- Defined in ‘GHC.Internal.Data.Proxy’
-instance forall k (a :: k). GHC.Internal.Enum.Enum (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’
+instance [safe] forall k (a :: k). GHC.Internal.Enum.Enum (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’
instance forall k1 k2 (f :: k1 -> *) (g :: k2 -> k1) (a :: k2). GHC.Internal.Enum.Enum (f (g a)) => GHC.Internal.Enum.Enum (Data.Functor.Compose.Compose f g a) -- Defined in ‘Data.Functor.Compose’
instance forall a. GHC.Internal.Enum.Enum a => GHC.Internal.Enum.Enum (GHC.Internal.Data.Functor.Identity.Identity a) -- Defined in ‘GHC.Internal.Data.Functor.Identity’
instance GHC.Internal.Enum.Enum GHC.Internal.Int.Int16 -- Defined in ‘GHC.Internal.Int’
@@ -12040,7 +12040,7 @@ instance GHC.Internal.Exception.Type.Exception GHC.Internal.Control.Exception.Ba
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-10.100.0:GHC.Internal.IO.Handle.Lock.Common.FileLockingNotSupported -- Defined in ‘ghc-internal-10.100.0:GHC.Internal.IO.Handle.Lock.Common’
-instance GHC.Internal.Exception.Type.Exception System.Timeout.Timeout -- Defined in ‘System.Timeout’
+instance [safe] GHC.Internal.Exception.Type.Exception System.Timeout.Timeout -- Defined in ‘System.Timeout’
instance forall k a (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’
instance forall a. GHC.Internal.Float.RealFloat a => GHC.Internal.Float.Floating (Data.Complex.Complex a) -- Defined in ‘Data.Complex’
instance forall k1 k2 (f :: k1 -> *) (g :: k2 -> k1) (a :: k2). GHC.Internal.Float.Floating (f (g a)) => GHC.Internal.Float.Floating (Data.Functor.Compose.Compose f g a) -- Defined in ‘Data.Functor.Compose’
@@ -12373,7 +12373,7 @@ instance GHC.Internal.Ix.Ix GHC.Internal.IO.Device.SeekMode -- Defined in ‘GHC
instance GHC.Internal.Ix.Ix GHC.Internal.IO.IOMode.IOMode -- Defined in ‘GHC.Internal.IO.IOMode’
instance forall k a (b :: k). GHC.Internal.Num.Num a => GHC.Internal.Num.Num (GHC.Internal.Data.Functor.Const.Const a b) -- Defined in ‘GHC.Internal.Data.Functor.Const’
instance forall a. GHC.Internal.Float.RealFloat a => GHC.Internal.Num.Num (Data.Complex.Complex a) -- Defined in ‘Data.Complex’
-instance forall k (a :: k). Data.Fixed.HasResolution a => GHC.Internal.Num.Num (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’
+instance [safe] forall k (a :: k). Data.Fixed.HasResolution a => GHC.Internal.Num.Num (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’
instance forall k1 k2 (f :: k1 -> *) (g :: k2 -> k1) (a :: k2). GHC.Internal.Num.Num (f (g a)) => GHC.Internal.Num.Num (Data.Functor.Compose.Compose f g a) -- Defined in ‘Data.Functor.Compose’
instance forall a b. GHC.Internal.Num.Num a => GHC.Internal.Num.Num (Data.Functor.Contravariant.Op a b) -- Defined in ‘Data.Functor.Contravariant’
instance forall a. GHC.Internal.Num.Num a => GHC.Internal.Num.Num (GHC.Internal.Data.Functor.Identity.Identity a) -- Defined in ‘GHC.Internal.Data.Functor.Identity’
@@ -12476,7 +12476,7 @@ instance forall k (a :: k) (b :: k). (a ~ b) => GHC.Internal.Read.Read (a GHC.In
instance forall k1 k2 (a :: k1) (b :: k2). (a ~~ b) => GHC.Internal.Read.Read (a GHC.Internal.Data.Type.Equality.:~~: b) -- Defined in ‘GHC.Internal.Data.Type.Equality’
instance forall k (t :: k). GHC.Internal.Read.Read (GHC.Internal.Data.Proxy.Proxy t) -- Defined in ‘GHC.Internal.Data.Proxy’
instance forall a b. (GHC.Internal.Read.Read a, GHC.Internal.Read.Read b) => GHC.Internal.Read.Read (GHC.Internal.Data.Either.Either a b) -- Defined in ‘GHC.Internal.Data.Either’
-instance forall k (a :: k). Data.Fixed.HasResolution a => GHC.Internal.Read.Read (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’
+instance [safe] forall k (a :: k). Data.Fixed.HasResolution a => GHC.Internal.Read.Read (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’
instance forall k1 k2 (f :: k1 -> *) (g :: k2 -> k1) (a :: k2). GHC.Internal.Read.Read (f (g a)) => GHC.Internal.Read.Read (Data.Functor.Compose.Compose f g a) -- Defined in ‘Data.Functor.Compose’
instance forall a. GHC.Internal.Read.Read a => GHC.Internal.Read.Read (GHC.Internal.Data.Functor.Identity.Identity a) -- Defined in ‘GHC.Internal.Data.Functor.Identity’
instance [safe] forall k (f :: k -> *) (a :: k) (g :: k -> *). (GHC.Internal.Read.Read (f a), GHC.Internal.Read.Read (g a)) => GHC.Internal.Read.Read (Data.Functor.Product.Product f g a) -- Defined in ‘Data.Functor.Product’
@@ -12558,7 +12558,7 @@ instance GHC.Internal.Read.Read GHC.Internal.IO.Handle.Types.NewlineMode -- Defi
instance GHC.Internal.Read.Read GHC.Internal.IO.Device.SeekMode -- Defined in ‘System.IO’
instance forall k a (b :: k). GHC.Internal.Real.Fractional a => GHC.Internal.Real.Fractional (GHC.Internal.Data.Functor.Const.Const a b) -- Defined in ‘GHC.Internal.Data.Functor.Const’
instance forall a. GHC.Internal.Float.RealFloat a => GHC.Internal.Real.Fractional (Data.Complex.Complex a) -- Defined in ‘Data.Complex’
-instance forall k (a :: k). Data.Fixed.HasResolution a => GHC.Internal.Real.Fractional (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’
+instance [safe] forall k (a :: k). Data.Fixed.HasResolution a => GHC.Internal.Real.Fractional (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’
instance forall k1 k2 (f :: k1 -> *) (g :: k2 -> k1) (a :: k2). GHC.Internal.Real.Fractional (f (g a)) => GHC.Internal.Real.Fractional (Data.Functor.Compose.Compose f g a) -- Defined in ‘Data.Functor.Compose’
instance forall a b. GHC.Internal.Real.Fractional a => GHC.Internal.Real.Fractional (Data.Functor.Contravariant.Op a b) -- Defined in ‘Data.Functor.Contravariant’
instance forall a. GHC.Internal.Real.Fractional a => GHC.Internal.Real.Fractional (GHC.Internal.Data.Functor.Identity.Identity a) -- Defined in ‘GHC.Internal.Data.Functor.Identity’
@@ -12606,7 +12606,7 @@ instance GHC.Internal.Real.Integral GHC.Internal.Foreign.C.Types.CULong -- Defin
instance GHC.Internal.Real.Integral GHC.Internal.Foreign.C.Types.CUShort -- Defined in ‘GHC.Internal.Foreign.C.Types’
instance GHC.Internal.Real.Integral GHC.Internal.Foreign.C.Types.CWchar -- Defined in ‘GHC.Internal.Foreign.C.Types’
instance forall k a (b :: k). GHC.Internal.Real.Real a => GHC.Internal.Real.Real (GHC.Internal.Data.Functor.Const.Const a b) -- Defined in ‘GHC.Internal.Data.Functor.Const’
-instance forall k (a :: k). Data.Fixed.HasResolution a => GHC.Internal.Real.Real (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’
+instance [safe] forall k (a :: k). Data.Fixed.HasResolution a => GHC.Internal.Real.Real (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’
instance forall k1 k2 (f :: k1 -> *) (g :: k2 -> k1) (a :: k2). GHC.Internal.Real.Real (f (g a)) => GHC.Internal.Real.Real (Data.Functor.Compose.Compose f g a) -- Defined in ‘Data.Functor.Compose’
instance forall a. GHC.Internal.Real.Real a => GHC.Internal.Real.Real (GHC.Internal.Data.Functor.Identity.Identity a) -- Defined in ‘GHC.Internal.Data.Functor.Identity’
instance GHC.Internal.Real.Real GHC.Internal.Int.Int16 -- Defined in ‘GHC.Internal.Int’
@@ -12654,7 +12654,7 @@ instance GHC.Internal.Real.Real GHC.Internal.Foreign.C.Types.CWchar -- Defined i
instance GHC.Internal.Real.Real GHC.Internal.Types.Double -- Defined in ‘GHC.Internal.Float’
instance GHC.Internal.Real.Real GHC.Internal.Types.Float -- Defined in ‘GHC.Internal.Float’
instance forall k a (b :: k). GHC.Internal.Real.RealFrac a => GHC.Internal.Real.RealFrac (GHC.Internal.Data.Functor.Const.Const a b) -- Defined in ‘GHC.Internal.Data.Functor.Const’
-instance forall k (a :: k). Data.Fixed.HasResolution a => GHC.Internal.Real.RealFrac (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’
+instance [safe] forall k (a :: k). Data.Fixed.HasResolution a => GHC.Internal.Real.RealFrac (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’
instance forall k1 k2 (f :: k1 -> *) (g :: k2 -> k1) (a :: k2). GHC.Internal.Real.RealFrac (f (g a)) => GHC.Internal.Real.RealFrac (Data.Functor.Compose.Compose f g a) -- Defined in ‘Data.Functor.Compose’
instance forall a. GHC.Internal.Real.RealFrac a => GHC.Internal.Real.RealFrac (GHC.Internal.Data.Functor.Identity.Identity a) -- Defined in ‘GHC.Internal.Data.Functor.Identity’
instance forall a. GHC.Internal.Real.RealFrac a => GHC.Internal.Real.RealFrac (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’
@@ -12755,7 +12755,7 @@ instance GHC.Internal.Show.Show ghc-internal-10.100.0:GHC.Internal.Data.Typeable
instance forall k (a :: k). GHC.Internal.Show.Show (ghc-internal-10.100.0:GHC.Internal.Data.Typeable.Internal.TypeRep a) -- Defined in ‘ghc-internal-10.100.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’
+instance [safe] forall k (a :: k). Data.Fixed.HasResolution a => GHC.Internal.Show.Show (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’
instance forall k1 k2 (f :: k1 -> *) (g :: k2 -> k1) (a :: k2). GHC.Internal.Show.Show (f (g a)) => GHC.Internal.Show.Show (Data.Functor.Compose.Compose f g a) -- Defined in ‘Data.Functor.Compose’
instance forall a. GHC.Internal.Show.Show a => GHC.Internal.Show.Show (GHC.Internal.Data.Functor.Identity.Identity a) -- Defined in ‘GHC.Internal.Data.Functor.Identity’
instance [safe] forall k (f :: k -> *) (a :: k) (g :: k -> *). (GHC.Internal.Show.Show (f a), GHC.Internal.Show.Show (g a)) => GHC.Internal.Show.Show (Data.Functor.Product.Product f g a) -- Defined in ‘Data.Functor.Product’
@@ -12895,10 +12895,10 @@ instance forall (c :: GHC.Internal.Types.Char). GHC.Internal.Show.Show (GHC.Inte
instance forall (s :: GHC.Internal.Types.Symbol). GHC.Internal.Show.Show (GHC.Internal.TypeLits.SSymbol s) -- Defined in ‘GHC.Internal.TypeLits’
instance GHC.Internal.Show.Show GHC.Internal.TypeLits.SomeChar -- Defined in ‘GHC.Internal.TypeLits’
instance GHC.Internal.Show.Show GHC.Internal.TypeLits.SomeSymbol -- Defined in ‘GHC.Internal.TypeLits’
-instance GHC.Internal.Show.Show System.Timeout.Timeout -- Defined in ‘System.Timeout’
+instance [safe] GHC.Internal.Show.Show System.Timeout.Timeout -- Defined in ‘System.Timeout’
instance GHC.Internal.Show.Show GHC.Internal.Text.Read.Lex.Lexeme -- Defined in ‘GHC.Internal.Text.Read.Lex’
instance GHC.Internal.Show.Show GHC.Internal.Text.Read.Lex.Number -- Defined in ‘GHC.Internal.Text.Read.Lex’
instance [safe] forall a b. GHC.Internal.Show.Show (a -> b) -- Defined in ‘Text.Show.Functions’
instance GHC.Internal.StaticPtr.IsStatic GHC.Internal.StaticPtr.StaticPtr -- Defined in ‘GHC.Internal.StaticPtr’
instance GHC.Internal.TH.Lift.Lift Data.Array.Byte.ByteArray -- Defined in ‘Data.Array.Byte’
-instance forall k (a :: k). GHC.Internal.TH.Lift.Lift (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’
+instance [safe] forall k (a :: k). GHC.Internal.TH.Lift.Lift (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’
=====================================
testsuite/tests/interface-stability/base-exports.stdout-javascript-unknown-ghcjs
=====================================
@@ -213,7 +213,7 @@ module Control.Concurrent.QSemN where
waitQSemN :: QSemN -> GHC.Internal.Types.Int -> GHC.Internal.Types.IO ()
module Control.Exception where
- -- Safety: Trustworthy
+ -- Safety: Safe
type AllocationLimitExceeded :: *
data AllocationLimitExceeded = AllocationLimitExceeded
type ArithException :: *
@@ -508,7 +508,7 @@ module Control.Monad.Fix where
fix :: forall a. (a -> a) -> a
module Control.Monad.IO.Class where
- -- Safety: Trustworthy
+ -- Safety: Safe
type MonadIO :: (* -> *) -> Constraint
class GHC.Internal.Base.Monad m => MonadIO m where
liftIO :: forall a. GHC.Internal.Types.IO a -> m a
@@ -994,7 +994,7 @@ module Data.Eq where
{-# MINIMAL (==) | (/=) #-}
module Data.Fixed where
- -- Safety: Trustworthy
+ -- Safety: Safe
type Centi :: *
type Centi = Fixed E2
type Deci :: *
@@ -1438,7 +1438,7 @@ module Data.List where
zipWith7 :: forall a b c d e f g h. (a -> b -> c -> d -> e -> f -> g -> h) -> [a] -> [b] -> [c] -> [d] -> [e] -> [f] -> [g] -> [h]
module Data.List.NonEmpty where
- -- Safety: Trustworthy
+ -- Safety: Safe
(!!) :: forall a. GHC.Internal.Stack.Types.HasCallStack => NonEmpty a -> GHC.Internal.Types.Int -> a
(<|) :: forall a. a -> NonEmpty a -> NonEmpty a
type NonEmpty :: * -> *
@@ -10291,7 +10291,7 @@ module System.Posix.Types where
module System.Timeout where
- -- Safety: Trustworthy
+ -- Safety: Safe
type Timeout :: *
newtype Timeout = ...
timeout :: forall a. GHC.Internal.Types.Int -> GHC.Internal.Types.IO a -> GHC.Internal.Types.IO (GHC.Internal.Maybe.Maybe a)
@@ -10610,14 +10610,14 @@ instance forall x y z. Data.Bitraversable.Bitraversable ((,,,,) x y z) -- Define
instance forall x y z w. Data.Bitraversable.Bitraversable ((,,,,,) x y z w) -- Defined in ‘Data.Bitraversable’
instance forall x y z w v. Data.Bitraversable.Bitraversable ((,,,,,,) x y z w v) -- Defined in ‘Data.Bitraversable’
instance Data.Bitraversable.Bitraversable Data.Semigroup.Arg -- Defined in ‘Data.Semigroup’
-instance forall (n :: GHC.Internal.TypeNats.Nat). GHC.Internal.TypeNats.KnownNat n => Data.Fixed.HasResolution n -- Defined in ‘Data.Fixed’
-instance Data.Fixed.HasResolution Data.Fixed.E0 -- Defined in ‘Data.Fixed’
-instance Data.Fixed.HasResolution Data.Fixed.E1 -- Defined in ‘Data.Fixed’
-instance Data.Fixed.HasResolution Data.Fixed.E12 -- Defined in ‘Data.Fixed’
-instance Data.Fixed.HasResolution Data.Fixed.E2 -- Defined in ‘Data.Fixed’
-instance Data.Fixed.HasResolution Data.Fixed.E3 -- Defined in ‘Data.Fixed’
-instance Data.Fixed.HasResolution Data.Fixed.E6 -- Defined in ‘Data.Fixed’
-instance Data.Fixed.HasResolution Data.Fixed.E9 -- Defined in ‘Data.Fixed’
+instance [safe] forall (n :: GHC.Internal.TypeNats.Nat). GHC.Internal.TypeNats.KnownNat n => Data.Fixed.HasResolution n -- Defined in ‘Data.Fixed’
+instance [safe] Data.Fixed.HasResolution Data.Fixed.E0 -- Defined in ‘Data.Fixed’
+instance [safe] Data.Fixed.HasResolution Data.Fixed.E1 -- Defined in ‘Data.Fixed’
+instance [safe] Data.Fixed.HasResolution Data.Fixed.E12 -- Defined in ‘Data.Fixed’
+instance [safe] Data.Fixed.HasResolution Data.Fixed.E2 -- Defined in ‘Data.Fixed’
+instance [safe] Data.Fixed.HasResolution Data.Fixed.E3 -- Defined in ‘Data.Fixed’
+instance [safe] Data.Fixed.HasResolution Data.Fixed.E6 -- Defined in ‘Data.Fixed’
+instance [safe] Data.Fixed.HasResolution Data.Fixed.E9 -- Defined in ‘Data.Fixed’
instance forall (f :: * -> *) (g :: * -> *). (Data.Foldable1.Foldable1 f, Data.Foldable1.Foldable1 g) => Data.Foldable1.Foldable1 (f GHC.Internal.Generics.:*: g) -- Defined in ‘Data.Foldable1’
instance forall (f :: * -> *) (g :: * -> *). (Data.Foldable1.Foldable1 f, Data.Foldable1.Foldable1 g) => Data.Foldable1.Foldable1 (f GHC.Internal.Generics.:+: g) -- Defined in ‘Data.Foldable1’
instance forall (f :: * -> *) (g :: * -> *). (Data.Foldable1.Foldable1 f, Data.Foldable1.Foldable1 g) => Data.Foldable1.Foldable1 (f GHC.Internal.Generics.:.: g) -- Defined in ‘Data.Foldable1’
@@ -11272,7 +11272,7 @@ instance forall k (s :: k). GHC.Internal.Classes.Eq (GHC.Internal.Data.Proxy.Pro
instance GHC.Internal.Classes.Eq ghc-internal-10.100.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep -- Defined in ‘ghc-internal-10.100.0:GHC.Internal.Data.Typeable.Internal’
instance forall k (a :: k). GHC.Internal.Classes.Eq (ghc-internal-10.100.0:GHC.Internal.Data.Typeable.Internal.TypeRep a) -- Defined in ‘ghc-internal-10.100.0:GHC.Internal.Data.Typeable.Internal’
instance forall a b. (GHC.Internal.Classes.Eq a, GHC.Internal.Classes.Eq b) => GHC.Internal.Classes.Eq (GHC.Internal.Data.Either.Either a b) -- Defined in ‘GHC.Internal.Data.Either’
-instance forall k (a :: k). GHC.Internal.Classes.Eq (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’
+instance [safe] forall k (a :: k). GHC.Internal.Classes.Eq (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’
instance forall k1 k2 (f :: k1 -> *) (g :: k2 -> k1) (a :: k2). GHC.Internal.Classes.Eq (f (g a)) => GHC.Internal.Classes.Eq (Data.Functor.Compose.Compose f g a) -- Defined in ‘Data.Functor.Compose’
instance forall a. GHC.Internal.Classes.Eq a => GHC.Internal.Classes.Eq (GHC.Internal.Data.Functor.Identity.Identity a) -- Defined in ‘GHC.Internal.Data.Functor.Identity’
instance [safe] forall k (f :: k -> *) (a :: k) (g :: k -> *). (GHC.Internal.Classes.Eq (f a), GHC.Internal.Classes.Eq (g a)) => GHC.Internal.Classes.Eq (Data.Functor.Product.Product f g a) -- Defined in ‘Data.Functor.Product’
@@ -11398,7 +11398,7 @@ instance forall (c :: GHC.Internal.Types.Char). GHC.Internal.Classes.Eq (GHC.Int
instance forall (s :: GHC.Internal.Types.Symbol). GHC.Internal.Classes.Eq (GHC.Internal.TypeLits.SSymbol s) -- Defined in ‘GHC.Internal.TypeLits’
instance GHC.Internal.Classes.Eq GHC.Internal.TypeLits.SomeChar -- Defined in ‘GHC.Internal.TypeLits’
instance GHC.Internal.Classes.Eq GHC.Internal.TypeLits.SomeSymbol -- Defined in ‘GHC.Internal.TypeLits’
-instance GHC.Internal.Classes.Eq System.Timeout.Timeout -- Defined in ‘System.Timeout’
+instance [safe] GHC.Internal.Classes.Eq System.Timeout.Timeout -- Defined in ‘System.Timeout’
instance GHC.Internal.Classes.Eq GHC.Internal.Text.Read.Lex.Lexeme -- Defined in ‘GHC.Internal.Text.Read.Lex’
instance GHC.Internal.Classes.Eq GHC.Internal.Text.Read.Lex.Number -- Defined in ‘GHC.Internal.Text.Read.Lex’
instance forall a. GHC.Internal.Classes.Ord a => GHC.Internal.Classes.Ord (GHC.Internal.Base.NonEmpty a) -- Defined in ‘GHC.Internal.Base’
@@ -11446,7 +11446,7 @@ instance forall k (s :: k). GHC.Internal.Classes.Ord (GHC.Internal.Data.Proxy.Pr
instance GHC.Internal.Classes.Ord ghc-internal-10.100.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep -- Defined in ‘ghc-internal-10.100.0:GHC.Internal.Data.Typeable.Internal’
instance forall k (a :: k). GHC.Internal.Classes.Ord (ghc-internal-10.100.0:GHC.Internal.Data.Typeable.Internal.TypeRep a) -- Defined in ‘ghc-internal-10.100.0:GHC.Internal.Data.Typeable.Internal’
instance forall a b. (GHC.Internal.Classes.Ord a, GHC.Internal.Classes.Ord b) => GHC.Internal.Classes.Ord (GHC.Internal.Data.Either.Either a b) -- Defined in ‘GHC.Internal.Data.Either’
-instance forall k (a :: k). GHC.Internal.Classes.Ord (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’
+instance [safe] forall k (a :: k). GHC.Internal.Classes.Ord (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’
instance forall k1 k2 (f :: k1 -> *) (g :: k2 -> k1) (a :: k2). GHC.Internal.Classes.Ord (f (g a)) => GHC.Internal.Classes.Ord (Data.Functor.Compose.Compose f g a) -- Defined in ‘Data.Functor.Compose’
instance forall a. GHC.Internal.Classes.Ord a => GHC.Internal.Classes.Ord (GHC.Internal.Data.Functor.Identity.Identity a) -- Defined in ‘GHC.Internal.Data.Functor.Identity’
instance [safe] forall k (f :: k -> *) (a :: k) (g :: k -> *). (GHC.Internal.Classes.Ord (f a), GHC.Internal.Classes.Ord (g a)) => GHC.Internal.Classes.Ord (Data.Functor.Product.Product f g a) -- Defined in ‘Data.Functor.Product’
@@ -11756,7 +11756,7 @@ instance GHC.Internal.Data.Data.Data GHC.Internal.Word.Word64 -- Defined in ‘G
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 a. GHC.Internal.Data.Data.Data a => GHC.Internal.Data.Data.Data (GHC.Internal.Functor.ZipList.ZipList a) -- Defined in ‘GHC.Internal.Data.Data’
-instance forall k (a :: k). (ghc-internal-10.100.0:GHC.Internal.Data.Typeable.Internal.Typeable k, ghc-internal-10.100.0:GHC.Internal.Data.Typeable.Internal.Typeable a) => GHC.Internal.Data.Data.Data (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’
+instance [safe] forall k (a :: k). (ghc-internal-10.100.0:GHC.Internal.Data.Typeable.Internal.Typeable k, ghc-internal-10.100.0:GHC.Internal.Data.Typeable.Internal.Typeable a) => GHC.Internal.Data.Data.Data (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’
instance forall k1 k2 (f :: k1 -> *) (g :: k2 -> k1) (a :: k2). (ghc-internal-10.100.0:GHC.Internal.Data.Typeable.Internal.Typeable a, ghc-internal-10.100.0:GHC.Internal.Data.Typeable.Internal.Typeable f, ghc-internal-10.100.0:GHC.Internal.Data.Typeable.Internal.Typeable g, ghc-internal-10.100.0:GHC.Internal.Data.Typeable.Internal.Typeable k1, ghc-internal-10.100.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-10.100.0:GHC.Internal.Data.Typeable.Internal.Typeable a, ghc-internal-10.100.0:GHC.Internal.Data.Typeable.Internal.Typeable f, ghc-internal-10.100.0:GHC.Internal.Data.Typeable.Internal.Typeable g, ghc-internal-10.100.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-10.100.0:GHC.Internal.Data.Typeable.Internal.Typeable a, ghc-internal-10.100.0:GHC.Internal.Data.Typeable.Internal.Typeable f, ghc-internal-10.100.0:GHC.Internal.Data.Typeable.Internal.Typeable g, ghc-internal-10.100.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’
@@ -11976,7 +11976,7 @@ instance GHC.Internal.Enum.Enum GHC.Internal.Unicode.GeneralCategory -- Defined
instance forall k (a :: k) (b :: k). (a ~ b) => GHC.Internal.Enum.Enum (a GHC.Internal.Data.Type.Equality.:~: b) -- Defined in ‘GHC.Internal.Data.Type.Equality’
instance forall k1 k2 (a :: k1) (b :: k2). (a ~~ b) => GHC.Internal.Enum.Enum (a GHC.Internal.Data.Type.Equality.:~~: b) -- Defined in ‘GHC.Internal.Data.Type.Equality’
instance forall k (s :: k). GHC.Internal.Enum.Enum (GHC.Internal.Data.Proxy.Proxy s) -- Defined in ‘GHC.Internal.Data.Proxy’
-instance forall k (a :: k). GHC.Internal.Enum.Enum (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’
+instance [safe] forall k (a :: k). GHC.Internal.Enum.Enum (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’
instance forall k1 k2 (f :: k1 -> *) (g :: k2 -> k1) (a :: k2). GHC.Internal.Enum.Enum (f (g a)) => GHC.Internal.Enum.Enum (Data.Functor.Compose.Compose f g a) -- Defined in ‘Data.Functor.Compose’
instance forall a. GHC.Internal.Enum.Enum a => GHC.Internal.Enum.Enum (GHC.Internal.Data.Functor.Identity.Identity a) -- Defined in ‘GHC.Internal.Data.Functor.Identity’
instance GHC.Internal.Enum.Enum GHC.Internal.Int.Int16 -- Defined in ‘GHC.Internal.Int’
@@ -12069,7 +12069,7 @@ instance GHC.Internal.Exception.Type.Exception GHC.Internal.Data.Dynamic.Dynamic
instance [safe] GHC.Internal.Exception.Type.Exception ghc-internal-10.100.0:GHC.Internal.IO.Handle.Lock.Common.FileLockingNotSupported -- Defined in ‘ghc-internal-10.100.0:GHC.Internal.IO.Handle.Lock.Common’
instance GHC.Internal.Exception.Type.Exception GHC.Internal.JS.Prim.JSException -- Defined in ‘GHC.Internal.JS.Prim’
instance GHC.Internal.Exception.Type.Exception GHC.Internal.JS.Prim.WouldBlockException -- Defined in ‘GHC.Internal.JS.Prim’
-instance GHC.Internal.Exception.Type.Exception System.Timeout.Timeout -- Defined in ‘System.Timeout’
+instance [safe] GHC.Internal.Exception.Type.Exception System.Timeout.Timeout -- Defined in ‘System.Timeout’
instance forall k a (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’
instance forall a. GHC.Internal.Float.RealFloat a => GHC.Internal.Float.Floating (Data.Complex.Complex a) -- Defined in ‘Data.Complex’
instance forall k1 k2 (f :: k1 -> *) (g :: k2 -> k1) (a :: k2). GHC.Internal.Float.Floating (f (g a)) => GHC.Internal.Float.Floating (Data.Functor.Compose.Compose f g a) -- Defined in ‘Data.Functor.Compose’
@@ -12402,7 +12402,7 @@ instance GHC.Internal.Ix.Ix GHC.Internal.IO.Device.SeekMode -- Defined in ‘GHC
instance GHC.Internal.Ix.Ix GHC.Internal.IO.IOMode.IOMode -- Defined in ‘GHC.Internal.IO.IOMode’
instance forall k a (b :: k). GHC.Internal.Num.Num a => GHC.Internal.Num.Num (GHC.Internal.Data.Functor.Const.Const a b) -- Defined in ‘GHC.Internal.Data.Functor.Const’
instance forall a. GHC.Internal.Float.RealFloat a => GHC.Internal.Num.Num (Data.Complex.Complex a) -- Defined in ‘Data.Complex’
-instance forall k (a :: k). Data.Fixed.HasResolution a => GHC.Internal.Num.Num (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’
+instance [safe] forall k (a :: k). Data.Fixed.HasResolution a => GHC.Internal.Num.Num (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’
instance forall k1 k2 (f :: k1 -> *) (g :: k2 -> k1) (a :: k2). GHC.Internal.Num.Num (f (g a)) => GHC.Internal.Num.Num (Data.Functor.Compose.Compose f g a) -- Defined in ‘Data.Functor.Compose’
instance forall a b. GHC.Internal.Num.Num a => GHC.Internal.Num.Num (Data.Functor.Contravariant.Op a b) -- Defined in ‘Data.Functor.Contravariant’
instance forall a. GHC.Internal.Num.Num a => GHC.Internal.Num.Num (GHC.Internal.Data.Functor.Identity.Identity a) -- Defined in ‘GHC.Internal.Data.Functor.Identity’
@@ -12505,7 +12505,7 @@ instance forall k (a :: k) (b :: k). (a ~ b) => GHC.Internal.Read.Read (a GHC.In
instance forall k1 k2 (a :: k1) (b :: k2). (a ~~ b) => GHC.Internal.Read.Read (a GHC.Internal.Data.Type.Equality.:~~: b) -- Defined in ‘GHC.Internal.Data.Type.Equality’
instance forall k (t :: k). GHC.Internal.Read.Read (GHC.Internal.Data.Proxy.Proxy t) -- Defined in ‘GHC.Internal.Data.Proxy’
instance forall a b. (GHC.Internal.Read.Read a, GHC.Internal.Read.Read b) => GHC.Internal.Read.Read (GHC.Internal.Data.Either.Either a b) -- Defined in ‘GHC.Internal.Data.Either’
-instance forall k (a :: k). Data.Fixed.HasResolution a => GHC.Internal.Read.Read (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’
+instance [safe] forall k (a :: k). Data.Fixed.HasResolution a => GHC.Internal.Read.Read (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’
instance forall k1 k2 (f :: k1 -> *) (g :: k2 -> k1) (a :: k2). GHC.Internal.Read.Read (f (g a)) => GHC.Internal.Read.Read (Data.Functor.Compose.Compose f g a) -- Defined in ‘Data.Functor.Compose’
instance forall a. GHC.Internal.Read.Read a => GHC.Internal.Read.Read (GHC.Internal.Data.Functor.Identity.Identity a) -- Defined in ‘GHC.Internal.Data.Functor.Identity’
instance [safe] forall k (f :: k -> *) (a :: k) (g :: k -> *). (GHC.Internal.Read.Read (f a), GHC.Internal.Read.Read (g a)) => GHC.Internal.Read.Read (Data.Functor.Product.Product f g a) -- Defined in ‘Data.Functor.Product’
@@ -12587,7 +12587,7 @@ instance GHC.Internal.Read.Read GHC.Internal.IO.Handle.Types.NewlineMode -- Defi
instance GHC.Internal.Read.Read GHC.Internal.IO.Device.SeekMode -- Defined in ‘System.IO’
instance forall k a (b :: k). GHC.Internal.Real.Fractional a => GHC.Internal.Real.Fractional (GHC.Internal.Data.Functor.Const.Const a b) -- Defined in ‘GHC.Internal.Data.Functor.Const’
instance forall a. GHC.Internal.Float.RealFloat a => GHC.Internal.Real.Fractional (Data.Complex.Complex a) -- Defined in ‘Data.Complex’
-instance forall k (a :: k). Data.Fixed.HasResolution a => GHC.Internal.Real.Fractional (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’
+instance [safe] forall k (a :: k). Data.Fixed.HasResolution a => GHC.Internal.Real.Fractional (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’
instance forall k1 k2 (f :: k1 -> *) (g :: k2 -> k1) (a :: k2). GHC.Internal.Real.Fractional (f (g a)) => GHC.Internal.Real.Fractional (Data.Functor.Compose.Compose f g a) -- Defined in ‘Data.Functor.Compose’
instance forall a b. GHC.Internal.Real.Fractional a => GHC.Internal.Real.Fractional (Data.Functor.Contravariant.Op a b) -- Defined in ‘Data.Functor.Contravariant’
instance forall a. GHC.Internal.Real.Fractional a => GHC.Internal.Real.Fractional (GHC.Internal.Data.Functor.Identity.Identity a) -- Defined in ‘GHC.Internal.Data.Functor.Identity’
@@ -12635,7 +12635,7 @@ instance GHC.Internal.Real.Integral GHC.Internal.Foreign.C.Types.CULong -- Defin
instance GHC.Internal.Real.Integral GHC.Internal.Foreign.C.Types.CUShort -- Defined in ‘GHC.Internal.Foreign.C.Types’
instance GHC.Internal.Real.Integral GHC.Internal.Foreign.C.Types.CWchar -- Defined in ‘GHC.Internal.Foreign.C.Types’
instance forall k a (b :: k). GHC.Internal.Real.Real a => GHC.Internal.Real.Real (GHC.Internal.Data.Functor.Const.Const a b) -- Defined in ‘GHC.Internal.Data.Functor.Const’
-instance forall k (a :: k). Data.Fixed.HasResolution a => GHC.Internal.Real.Real (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’
+instance [safe] forall k (a :: k). Data.Fixed.HasResolution a => GHC.Internal.Real.Real (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’
instance forall k1 k2 (f :: k1 -> *) (g :: k2 -> k1) (a :: k2). GHC.Internal.Real.Real (f (g a)) => GHC.Internal.Real.Real (Data.Functor.Compose.Compose f g a) -- Defined in ‘Data.Functor.Compose’
instance forall a. GHC.Internal.Real.Real a => GHC.Internal.Real.Real (GHC.Internal.Data.Functor.Identity.Identity a) -- Defined in ‘GHC.Internal.Data.Functor.Identity’
instance GHC.Internal.Real.Real GHC.Internal.Int.Int16 -- Defined in ‘GHC.Internal.Int’
@@ -12683,7 +12683,7 @@ instance GHC.Internal.Real.Real GHC.Internal.Foreign.C.Types.CWchar -- Defined i
instance GHC.Internal.Real.Real GHC.Internal.Types.Double -- Defined in ‘GHC.Internal.Float’
instance GHC.Internal.Real.Real GHC.Internal.Types.Float -- Defined in ‘GHC.Internal.Float’
instance forall k a (b :: k). GHC.Internal.Real.RealFrac a => GHC.Internal.Real.RealFrac (GHC.Internal.Data.Functor.Const.Const a b) -- Defined in ‘GHC.Internal.Data.Functor.Const’
-instance forall k (a :: k). Data.Fixed.HasResolution a => GHC.Internal.Real.RealFrac (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’
+instance [safe] forall k (a :: k). Data.Fixed.HasResolution a => GHC.Internal.Real.RealFrac (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’
instance forall k1 k2 (f :: k1 -> *) (g :: k2 -> k1) (a :: k2). GHC.Internal.Real.RealFrac (f (g a)) => GHC.Internal.Real.RealFrac (Data.Functor.Compose.Compose f g a) -- Defined in ‘Data.Functor.Compose’
instance forall a. GHC.Internal.Real.RealFrac a => GHC.Internal.Real.RealFrac (GHC.Internal.Data.Functor.Identity.Identity a) -- Defined in ‘GHC.Internal.Data.Functor.Identity’
instance forall a. GHC.Internal.Real.RealFrac a => GHC.Internal.Real.RealFrac (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’
@@ -12784,7 +12784,7 @@ instance GHC.Internal.Show.Show ghc-internal-10.100.0:GHC.Internal.Data.Typeable
instance forall k (a :: k). GHC.Internal.Show.Show (ghc-internal-10.100.0:GHC.Internal.Data.Typeable.Internal.TypeRep a) -- Defined in ‘ghc-internal-10.100.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’
+instance [safe] forall k (a :: k). Data.Fixed.HasResolution a => GHC.Internal.Show.Show (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’
instance forall k1 k2 (f :: k1 -> *) (g :: k2 -> k1) (a :: k2). GHC.Internal.Show.Show (f (g a)) => GHC.Internal.Show.Show (Data.Functor.Compose.Compose f g a) -- Defined in ‘Data.Functor.Compose’
instance forall a. GHC.Internal.Show.Show a => GHC.Internal.Show.Show (GHC.Internal.Data.Functor.Identity.Identity a) -- Defined in ‘GHC.Internal.Data.Functor.Identity’
instance [safe] forall k (f :: k -> *) (a :: k) (g :: k -> *). (GHC.Internal.Show.Show (f a), GHC.Internal.Show.Show (g a)) => GHC.Internal.Show.Show (Data.Functor.Product.Product f g a) -- Defined in ‘Data.Functor.Product’
@@ -12919,10 +12919,10 @@ instance forall (c :: GHC.Internal.Types.Char). GHC.Internal.Show.Show (GHC.Inte
instance forall (s :: GHC.Internal.Types.Symbol). GHC.Internal.Show.Show (GHC.Internal.TypeLits.SSymbol s) -- Defined in ‘GHC.Internal.TypeLits’
instance GHC.Internal.Show.Show GHC.Internal.TypeLits.SomeChar -- Defined in ‘GHC.Internal.TypeLits’
instance GHC.Internal.Show.Show GHC.Internal.TypeLits.SomeSymbol -- Defined in ‘GHC.Internal.TypeLits’
-instance GHC.Internal.Show.Show System.Timeout.Timeout -- Defined in ‘System.Timeout’
+instance [safe] GHC.Internal.Show.Show System.Timeout.Timeout -- Defined in ‘System.Timeout’
instance GHC.Internal.Show.Show GHC.Internal.Text.Read.Lex.Lexeme -- Defined in ‘GHC.Internal.Text.Read.Lex’
instance GHC.Internal.Show.Show GHC.Internal.Text.Read.Lex.Number -- Defined in ‘GHC.Internal.Text.Read.Lex’
instance [safe] forall a b. GHC.Internal.Show.Show (a -> b) -- Defined in ‘Text.Show.Functions’
instance GHC.Internal.StaticPtr.IsStatic GHC.Internal.StaticPtr.StaticPtr -- Defined in ‘GHC.Internal.StaticPtr’
instance GHC.Internal.TH.Lift.Lift Data.Array.Byte.ByteArray -- Defined in ‘Data.Array.Byte’
-instance forall k (a :: k). GHC.Internal.TH.Lift.Lift (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’
+instance [safe] forall k (a :: k). GHC.Internal.TH.Lift.Lift (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’
=====================================
testsuite/tests/interface-stability/base-exports.stdout-mingw32
=====================================
@@ -213,7 +213,7 @@ module Control.Concurrent.QSemN where
waitQSemN :: QSemN -> GHC.Internal.Types.Int -> GHC.Internal.Types.IO ()
module Control.Exception where
- -- Safety: Trustworthy
+ -- Safety: Safe
type AllocationLimitExceeded :: *
data AllocationLimitExceeded = AllocationLimitExceeded
type ArithException :: *
@@ -508,7 +508,7 @@ module Control.Monad.Fix where
fix :: forall a. (a -> a) -> a
module Control.Monad.IO.Class where
- -- Safety: Trustworthy
+ -- Safety: Safe
type MonadIO :: (* -> *) -> Constraint
class GHC.Internal.Base.Monad m => MonadIO m where
liftIO :: forall a. GHC.Internal.Types.IO a -> m a
@@ -994,7 +994,7 @@ module Data.Eq where
{-# MINIMAL (==) | (/=) #-}
module Data.Fixed where
- -- Safety: Trustworthy
+ -- Safety: Safe
type Centi :: *
type Centi = Fixed E2
type Deci :: *
@@ -1438,7 +1438,7 @@ module Data.List where
zipWith7 :: forall a b c d e f g h. (a -> b -> c -> d -> e -> f -> g -> h) -> [a] -> [b] -> [c] -> [d] -> [e] -> [f] -> [g] -> [h]
module Data.List.NonEmpty where
- -- Safety: Trustworthy
+ -- Safety: Safe
(!!) :: forall a. GHC.Internal.Stack.Types.HasCallStack => NonEmpty a -> GHC.Internal.Types.Int -> a
(<|) :: forall a. a -> NonEmpty a -> NonEmpty a
type NonEmpty :: * -> *
@@ -10515,7 +10515,7 @@ module System.Posix.Types where
module System.Timeout where
- -- Safety: Trustworthy
+ -- Safety: Safe
type Timeout :: *
newtype Timeout = ...
timeout :: forall a. GHC.Internal.Types.Int -> GHC.Internal.Types.IO a -> GHC.Internal.Types.IO (GHC.Internal.Maybe.Maybe a)
@@ -10834,14 +10834,14 @@ instance forall x y z. Data.Bitraversable.Bitraversable ((,,,,) x y z) -- Define
instance forall x y z w. Data.Bitraversable.Bitraversable ((,,,,,) x y z w) -- Defined in ‘Data.Bitraversable’
instance forall x y z w v. Data.Bitraversable.Bitraversable ((,,,,,,) x y z w v) -- Defined in ‘Data.Bitraversable’
instance Data.Bitraversable.Bitraversable Data.Semigroup.Arg -- Defined in ‘Data.Semigroup’
-instance forall (n :: GHC.Internal.TypeNats.Nat). GHC.Internal.TypeNats.KnownNat n => Data.Fixed.HasResolution n -- Defined in ‘Data.Fixed’
-instance Data.Fixed.HasResolution Data.Fixed.E0 -- Defined in ‘Data.Fixed’
-instance Data.Fixed.HasResolution Data.Fixed.E1 -- Defined in ‘Data.Fixed’
-instance Data.Fixed.HasResolution Data.Fixed.E12 -- Defined in ‘Data.Fixed’
-instance Data.Fixed.HasResolution Data.Fixed.E2 -- Defined in ‘Data.Fixed’
-instance Data.Fixed.HasResolution Data.Fixed.E3 -- Defined in ‘Data.Fixed’
-instance Data.Fixed.HasResolution Data.Fixed.E6 -- Defined in ‘Data.Fixed’
-instance Data.Fixed.HasResolution Data.Fixed.E9 -- Defined in ‘Data.Fixed’
+instance [safe] forall (n :: GHC.Internal.TypeNats.Nat). GHC.Internal.TypeNats.KnownNat n => Data.Fixed.HasResolution n -- Defined in ‘Data.Fixed’
+instance [safe] Data.Fixed.HasResolution Data.Fixed.E0 -- Defined in ‘Data.Fixed’
+instance [safe] Data.Fixed.HasResolution Data.Fixed.E1 -- Defined in ‘Data.Fixed’
+instance [safe] Data.Fixed.HasResolution Data.Fixed.E12 -- Defined in ‘Data.Fixed’
+instance [safe] Data.Fixed.HasResolution Data.Fixed.E2 -- Defined in ‘Data.Fixed’
+instance [safe] Data.Fixed.HasResolution Data.Fixed.E3 -- Defined in ‘Data.Fixed’
+instance [safe] Data.Fixed.HasResolution Data.Fixed.E6 -- Defined in ‘Data.Fixed’
+instance [safe] Data.Fixed.HasResolution Data.Fixed.E9 -- Defined in ‘Data.Fixed’
instance forall (f :: * -> *) (g :: * -> *). (Data.Foldable1.Foldable1 f, Data.Foldable1.Foldable1 g) => Data.Foldable1.Foldable1 (f GHC.Internal.Generics.:*: g) -- Defined in ‘Data.Foldable1’
instance forall (f :: * -> *) (g :: * -> *). (Data.Foldable1.Foldable1 f, Data.Foldable1.Foldable1 g) => Data.Foldable1.Foldable1 (f GHC.Internal.Generics.:+: g) -- Defined in ‘Data.Foldable1’
instance forall (f :: * -> *) (g :: * -> *). (Data.Foldable1.Foldable1 f, Data.Foldable1.Foldable1 g) => Data.Foldable1.Foldable1 (f GHC.Internal.Generics.:.: g) -- Defined in ‘Data.Foldable1’
@@ -11498,7 +11498,7 @@ instance forall k (s :: k). GHC.Internal.Classes.Eq (GHC.Internal.Data.Proxy.Pro
instance GHC.Internal.Classes.Eq ghc-internal-10.100.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep -- Defined in ‘ghc-internal-10.100.0:GHC.Internal.Data.Typeable.Internal’
instance forall k (a :: k). GHC.Internal.Classes.Eq (ghc-internal-10.100.0:GHC.Internal.Data.Typeable.Internal.TypeRep a) -- Defined in ‘ghc-internal-10.100.0:GHC.Internal.Data.Typeable.Internal’
instance forall a b. (GHC.Internal.Classes.Eq a, GHC.Internal.Classes.Eq b) => GHC.Internal.Classes.Eq (GHC.Internal.Data.Either.Either a b) -- Defined in ‘GHC.Internal.Data.Either’
-instance forall k (a :: k). GHC.Internal.Classes.Eq (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’
+instance [safe] forall k (a :: k). GHC.Internal.Classes.Eq (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’
instance forall k1 k2 (f :: k1 -> *) (g :: k2 -> k1) (a :: k2). GHC.Internal.Classes.Eq (f (g a)) => GHC.Internal.Classes.Eq (Data.Functor.Compose.Compose f g a) -- Defined in ‘Data.Functor.Compose’
instance forall a. GHC.Internal.Classes.Eq a => GHC.Internal.Classes.Eq (GHC.Internal.Data.Functor.Identity.Identity a) -- Defined in ‘GHC.Internal.Data.Functor.Identity’
instance [safe] forall k (f :: k -> *) (a :: k) (g :: k -> *). (GHC.Internal.Classes.Eq (f a), GHC.Internal.Classes.Eq (g a)) => GHC.Internal.Classes.Eq (Data.Functor.Product.Product f g a) -- Defined in ‘Data.Functor.Product’
@@ -11627,7 +11627,7 @@ instance forall (c :: GHC.Internal.Types.Char). GHC.Internal.Classes.Eq (GHC.Int
instance forall (s :: GHC.Internal.Types.Symbol). GHC.Internal.Classes.Eq (GHC.Internal.TypeLits.SSymbol s) -- Defined in ‘GHC.Internal.TypeLits’
instance GHC.Internal.Classes.Eq GHC.Internal.TypeLits.SomeChar -- Defined in ‘GHC.Internal.TypeLits’
instance GHC.Internal.Classes.Eq GHC.Internal.TypeLits.SomeSymbol -- Defined in ‘GHC.Internal.TypeLits’
-instance GHC.Internal.Classes.Eq System.Timeout.Timeout -- Defined in ‘System.Timeout’
+instance [safe] GHC.Internal.Classes.Eq System.Timeout.Timeout -- Defined in ‘System.Timeout’
instance GHC.Internal.Classes.Eq GHC.Internal.Text.Read.Lex.Lexeme -- Defined in ‘GHC.Internal.Text.Read.Lex’
instance GHC.Internal.Classes.Eq GHC.Internal.Text.Read.Lex.Number -- Defined in ‘GHC.Internal.Text.Read.Lex’
instance forall a. GHC.Internal.Classes.Ord a => GHC.Internal.Classes.Ord (GHC.Internal.Base.NonEmpty a) -- Defined in ‘GHC.Internal.Base’
@@ -11675,7 +11675,7 @@ instance forall k (s :: k). GHC.Internal.Classes.Ord (GHC.Internal.Data.Proxy.Pr
instance GHC.Internal.Classes.Ord ghc-internal-10.100.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep -- Defined in ‘ghc-internal-10.100.0:GHC.Internal.Data.Typeable.Internal’
instance forall k (a :: k). GHC.Internal.Classes.Ord (ghc-internal-10.100.0:GHC.Internal.Data.Typeable.Internal.TypeRep a) -- Defined in ‘ghc-internal-10.100.0:GHC.Internal.Data.Typeable.Internal’
instance forall a b. (GHC.Internal.Classes.Ord a, GHC.Internal.Classes.Ord b) => GHC.Internal.Classes.Ord (GHC.Internal.Data.Either.Either a b) -- Defined in ‘GHC.Internal.Data.Either’
-instance forall k (a :: k). GHC.Internal.Classes.Ord (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’
+instance [safe] forall k (a :: k). GHC.Internal.Classes.Ord (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’
instance forall k1 k2 (f :: k1 -> *) (g :: k2 -> k1) (a :: k2). GHC.Internal.Classes.Ord (f (g a)) => GHC.Internal.Classes.Ord (Data.Functor.Compose.Compose f g a) -- Defined in ‘Data.Functor.Compose’
instance forall a. GHC.Internal.Classes.Ord a => GHC.Internal.Classes.Ord (GHC.Internal.Data.Functor.Identity.Identity a) -- Defined in ‘GHC.Internal.Data.Functor.Identity’
instance [safe] forall k (f :: k -> *) (a :: k) (g :: k -> *). (GHC.Internal.Classes.Ord (f a), GHC.Internal.Classes.Ord (g a)) => GHC.Internal.Classes.Ord (Data.Functor.Product.Product f g a) -- Defined in ‘Data.Functor.Product’
@@ -11987,7 +11987,7 @@ instance GHC.Internal.Data.Data.Data GHC.Internal.Word.Word64 -- Defined in ‘G
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 a. GHC.Internal.Data.Data.Data a => GHC.Internal.Data.Data.Data (GHC.Internal.Functor.ZipList.ZipList a) -- Defined in ‘GHC.Internal.Data.Data’
-instance forall k (a :: k). (ghc-internal-10.100.0:GHC.Internal.Data.Typeable.Internal.Typeable k, ghc-internal-10.100.0:GHC.Internal.Data.Typeable.Internal.Typeable a) => GHC.Internal.Data.Data.Data (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’
+instance [safe] forall k (a :: k). (ghc-internal-10.100.0:GHC.Internal.Data.Typeable.Internal.Typeable k, ghc-internal-10.100.0:GHC.Internal.Data.Typeable.Internal.Typeable a) => GHC.Internal.Data.Data.Data (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’
instance forall k1 k2 (f :: k1 -> *) (g :: k2 -> k1) (a :: k2). (ghc-internal-10.100.0:GHC.Internal.Data.Typeable.Internal.Typeable a, ghc-internal-10.100.0:GHC.Internal.Data.Typeable.Internal.Typeable f, ghc-internal-10.100.0:GHC.Internal.Data.Typeable.Internal.Typeable g, ghc-internal-10.100.0:GHC.Internal.Data.Typeable.Internal.Typeable k1, ghc-internal-10.100.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-10.100.0:GHC.Internal.Data.Typeable.Internal.Typeable a, ghc-internal-10.100.0:GHC.Internal.Data.Typeable.Internal.Typeable f, ghc-internal-10.100.0:GHC.Internal.Data.Typeable.Internal.Typeable g, ghc-internal-10.100.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-10.100.0:GHC.Internal.Data.Typeable.Internal.Typeable a, ghc-internal-10.100.0:GHC.Internal.Data.Typeable.Internal.Typeable f, ghc-internal-10.100.0:GHC.Internal.Data.Typeable.Internal.Typeable g, ghc-internal-10.100.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’
@@ -12207,7 +12207,7 @@ instance GHC.Internal.Enum.Enum GHC.Internal.Unicode.GeneralCategory -- Defined
instance forall k (a :: k) (b :: k). (a ~ b) => GHC.Internal.Enum.Enum (a GHC.Internal.Data.Type.Equality.:~: b) -- Defined in ‘GHC.Internal.Data.Type.Equality’
instance forall k1 k2 (a :: k1) (b :: k2). (a ~~ b) => GHC.Internal.Enum.Enum (a GHC.Internal.Data.Type.Equality.:~~: b) -- Defined in ‘GHC.Internal.Data.Type.Equality’
instance forall k (s :: k). GHC.Internal.Enum.Enum (GHC.Internal.Data.Proxy.Proxy s) -- Defined in ‘GHC.Internal.Data.Proxy’
-instance forall k (a :: k). GHC.Internal.Enum.Enum (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’
+instance [safe] forall k (a :: k). GHC.Internal.Enum.Enum (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’
instance forall k1 k2 (f :: k1 -> *) (g :: k2 -> k1) (a :: k2). GHC.Internal.Enum.Enum (f (g a)) => GHC.Internal.Enum.Enum (Data.Functor.Compose.Compose f g a) -- Defined in ‘Data.Functor.Compose’
instance forall a. GHC.Internal.Enum.Enum a => GHC.Internal.Enum.Enum (GHC.Internal.Data.Functor.Identity.Identity a) -- Defined in ‘GHC.Internal.Data.Functor.Identity’
instance GHC.Internal.Enum.Enum GHC.Internal.Int.Int16 -- Defined in ‘GHC.Internal.Int’
@@ -12299,7 +12299,7 @@ instance GHC.Internal.Exception.Type.Exception GHC.Internal.Control.Exception.Ba
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-10.100.0:GHC.Internal.IO.Handle.Lock.Common.FileLockingNotSupported -- Defined in ‘ghc-internal-10.100.0:GHC.Internal.IO.Handle.Lock.Common’
-instance GHC.Internal.Exception.Type.Exception System.Timeout.Timeout -- Defined in ‘System.Timeout’
+instance [safe] GHC.Internal.Exception.Type.Exception System.Timeout.Timeout -- Defined in ‘System.Timeout’
instance forall k a (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’
instance forall a. GHC.Internal.Float.RealFloat a => GHC.Internal.Float.Floating (Data.Complex.Complex a) -- Defined in ‘Data.Complex’
instance forall k1 k2 (f :: k1 -> *) (g :: k2 -> k1) (a :: k2). GHC.Internal.Float.Floating (f (g a)) => GHC.Internal.Float.Floating (Data.Functor.Compose.Compose f g a) -- Defined in ‘Data.Functor.Compose’
@@ -12644,7 +12644,7 @@ instance GHC.Internal.Ix.Ix GHC.Internal.IO.Device.SeekMode -- Defined in ‘GHC
instance GHC.Internal.Ix.Ix GHC.Internal.IO.IOMode.IOMode -- Defined in ‘GHC.Internal.IO.IOMode’
instance forall k a (b :: k). GHC.Internal.Num.Num a => GHC.Internal.Num.Num (GHC.Internal.Data.Functor.Const.Const a b) -- Defined in ‘GHC.Internal.Data.Functor.Const’
instance forall a. GHC.Internal.Float.RealFloat a => GHC.Internal.Num.Num (Data.Complex.Complex a) -- Defined in ‘Data.Complex’
-instance forall k (a :: k). Data.Fixed.HasResolution a => GHC.Internal.Num.Num (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’
+instance [safe] forall k (a :: k). Data.Fixed.HasResolution a => GHC.Internal.Num.Num (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’
instance forall k1 k2 (f :: k1 -> *) (g :: k2 -> k1) (a :: k2). GHC.Internal.Num.Num (f (g a)) => GHC.Internal.Num.Num (Data.Functor.Compose.Compose f g a) -- Defined in ‘Data.Functor.Compose’
instance forall a b. GHC.Internal.Num.Num a => GHC.Internal.Num.Num (Data.Functor.Contravariant.Op a b) -- Defined in ‘Data.Functor.Contravariant’
instance forall a. GHC.Internal.Num.Num a => GHC.Internal.Num.Num (GHC.Internal.Data.Functor.Identity.Identity a) -- Defined in ‘GHC.Internal.Data.Functor.Identity’
@@ -12747,7 +12747,7 @@ instance forall k (a :: k) (b :: k). (a ~ b) => GHC.Internal.Read.Read (a GHC.In
instance forall k1 k2 (a :: k1) (b :: k2). (a ~~ b) => GHC.Internal.Read.Read (a GHC.Internal.Data.Type.Equality.:~~: b) -- Defined in ‘GHC.Internal.Data.Type.Equality’
instance forall k (t :: k). GHC.Internal.Read.Read (GHC.Internal.Data.Proxy.Proxy t) -- Defined in ‘GHC.Internal.Data.Proxy’
instance forall a b. (GHC.Internal.Read.Read a, GHC.Internal.Read.Read b) => GHC.Internal.Read.Read (GHC.Internal.Data.Either.Either a b) -- Defined in ‘GHC.Internal.Data.Either’
-instance forall k (a :: k). Data.Fixed.HasResolution a => GHC.Internal.Read.Read (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’
+instance [safe] forall k (a :: k). Data.Fixed.HasResolution a => GHC.Internal.Read.Read (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’
instance forall k1 k2 (f :: k1 -> *) (g :: k2 -> k1) (a :: k2). GHC.Internal.Read.Read (f (g a)) => GHC.Internal.Read.Read (Data.Functor.Compose.Compose f g a) -- Defined in ‘Data.Functor.Compose’
instance forall a. GHC.Internal.Read.Read a => GHC.Internal.Read.Read (GHC.Internal.Data.Functor.Identity.Identity a) -- Defined in ‘GHC.Internal.Data.Functor.Identity’
instance [safe] forall k (f :: k -> *) (a :: k) (g :: k -> *). (GHC.Internal.Read.Read (f a), GHC.Internal.Read.Read (g a)) => GHC.Internal.Read.Read (Data.Functor.Product.Product f g a) -- Defined in ‘Data.Functor.Product’
@@ -12830,7 +12830,7 @@ instance GHC.Internal.Read.Read GHC.Internal.IO.Handle.Types.NewlineMode -- Defi
instance GHC.Internal.Read.Read GHC.Internal.IO.Device.SeekMode -- Defined in ‘System.IO’
instance forall k a (b :: k). GHC.Internal.Real.Fractional a => GHC.Internal.Real.Fractional (GHC.Internal.Data.Functor.Const.Const a b) -- Defined in ‘GHC.Internal.Data.Functor.Const’
instance forall a. GHC.Internal.Float.RealFloat a => GHC.Internal.Real.Fractional (Data.Complex.Complex a) -- Defined in ‘Data.Complex’
-instance forall k (a :: k). Data.Fixed.HasResolution a => GHC.Internal.Real.Fractional (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’
+instance [safe] forall k (a :: k). Data.Fixed.HasResolution a => GHC.Internal.Real.Fractional (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’
instance forall k1 k2 (f :: k1 -> *) (g :: k2 -> k1) (a :: k2). GHC.Internal.Real.Fractional (f (g a)) => GHC.Internal.Real.Fractional (Data.Functor.Compose.Compose f g a) -- Defined in ‘Data.Functor.Compose’
instance forall a b. GHC.Internal.Real.Fractional a => GHC.Internal.Real.Fractional (Data.Functor.Contravariant.Op a b) -- Defined in ‘Data.Functor.Contravariant’
instance forall a. GHC.Internal.Real.Fractional a => GHC.Internal.Real.Fractional (GHC.Internal.Data.Functor.Identity.Identity a) -- Defined in ‘GHC.Internal.Data.Functor.Identity’
@@ -12878,7 +12878,7 @@ instance GHC.Internal.Real.Integral GHC.Internal.Foreign.C.Types.CULong -- Defin
instance GHC.Internal.Real.Integral GHC.Internal.Foreign.C.Types.CUShort -- Defined in ‘GHC.Internal.Foreign.C.Types’
instance GHC.Internal.Real.Integral GHC.Internal.Foreign.C.Types.CWchar -- Defined in ‘GHC.Internal.Foreign.C.Types’
instance forall k a (b :: k). GHC.Internal.Real.Real a => GHC.Internal.Real.Real (GHC.Internal.Data.Functor.Const.Const a b) -- Defined in ‘GHC.Internal.Data.Functor.Const’
-instance forall k (a :: k). Data.Fixed.HasResolution a => GHC.Internal.Real.Real (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’
+instance [safe] forall k (a :: k). Data.Fixed.HasResolution a => GHC.Internal.Real.Real (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’
instance forall k1 k2 (f :: k1 -> *) (g :: k2 -> k1) (a :: k2). GHC.Internal.Real.Real (f (g a)) => GHC.Internal.Real.Real (Data.Functor.Compose.Compose f g a) -- Defined in ‘Data.Functor.Compose’
instance forall a. GHC.Internal.Real.Real a => GHC.Internal.Real.Real (GHC.Internal.Data.Functor.Identity.Identity a) -- Defined in ‘GHC.Internal.Data.Functor.Identity’
instance GHC.Internal.Real.Real GHC.Internal.Int.Int16 -- Defined in ‘GHC.Internal.Int’
@@ -12926,7 +12926,7 @@ instance GHC.Internal.Real.Real GHC.Internal.Foreign.C.Types.CWchar -- Defined i
instance GHC.Internal.Real.Real GHC.Internal.Types.Double -- Defined in ‘GHC.Internal.Float’
instance GHC.Internal.Real.Real GHC.Internal.Types.Float -- Defined in ‘GHC.Internal.Float’
instance forall k a (b :: k). GHC.Internal.Real.RealFrac a => GHC.Internal.Real.RealFrac (GHC.Internal.Data.Functor.Const.Const a b) -- Defined in ‘GHC.Internal.Data.Functor.Const’
-instance forall k (a :: k). Data.Fixed.HasResolution a => GHC.Internal.Real.RealFrac (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’
+instance [safe] forall k (a :: k). Data.Fixed.HasResolution a => GHC.Internal.Real.RealFrac (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’
instance forall k1 k2 (f :: k1 -> *) (g :: k2 -> k1) (a :: k2). GHC.Internal.Real.RealFrac (f (g a)) => GHC.Internal.Real.RealFrac (Data.Functor.Compose.Compose f g a) -- Defined in ‘Data.Functor.Compose’
instance forall a. GHC.Internal.Real.RealFrac a => GHC.Internal.Real.RealFrac (GHC.Internal.Data.Functor.Identity.Identity a) -- Defined in ‘GHC.Internal.Data.Functor.Identity’
instance forall a. GHC.Internal.Real.RealFrac a => GHC.Internal.Real.RealFrac (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’
@@ -13027,7 +13027,7 @@ instance GHC.Internal.Show.Show ghc-internal-10.100.0:GHC.Internal.Data.Typeable
instance forall k (a :: k). GHC.Internal.Show.Show (ghc-internal-10.100.0:GHC.Internal.Data.Typeable.Internal.TypeRep a) -- Defined in ‘ghc-internal-10.100.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’
+instance [safe] forall k (a :: k). Data.Fixed.HasResolution a => GHC.Internal.Show.Show (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’
instance forall k1 k2 (f :: k1 -> *) (g :: k2 -> k1) (a :: k2). GHC.Internal.Show.Show (f (g a)) => GHC.Internal.Show.Show (Data.Functor.Compose.Compose f g a) -- Defined in ‘Data.Functor.Compose’
instance forall a. GHC.Internal.Show.Show a => GHC.Internal.Show.Show (GHC.Internal.Data.Functor.Identity.Identity a) -- Defined in ‘GHC.Internal.Data.Functor.Identity’
instance [safe] forall k (f :: k -> *) (a :: k) (g :: k -> *). (GHC.Internal.Show.Show (f a), GHC.Internal.Show.Show (g a)) => GHC.Internal.Show.Show (Data.Functor.Product.Product f g a) -- Defined in ‘Data.Functor.Product’
@@ -13167,10 +13167,10 @@ instance forall (c :: GHC.Internal.Types.Char). GHC.Internal.Show.Show (GHC.Inte
instance forall (s :: GHC.Internal.Types.Symbol). GHC.Internal.Show.Show (GHC.Internal.TypeLits.SSymbol s) -- Defined in ‘GHC.Internal.TypeLits’
instance GHC.Internal.Show.Show GHC.Internal.TypeLits.SomeChar -- Defined in ‘GHC.Internal.TypeLits’
instance GHC.Internal.Show.Show GHC.Internal.TypeLits.SomeSymbol -- Defined in ‘GHC.Internal.TypeLits’
-instance GHC.Internal.Show.Show System.Timeout.Timeout -- Defined in ‘System.Timeout’
+instance [safe] GHC.Internal.Show.Show System.Timeout.Timeout -- Defined in ‘System.Timeout’
instance GHC.Internal.Show.Show GHC.Internal.Text.Read.Lex.Lexeme -- Defined in ‘GHC.Internal.Text.Read.Lex’
instance GHC.Internal.Show.Show GHC.Internal.Text.Read.Lex.Number -- Defined in ‘GHC.Internal.Text.Read.Lex’
instance [safe] forall a b. GHC.Internal.Show.Show (a -> b) -- Defined in ‘Text.Show.Functions’
instance GHC.Internal.StaticPtr.IsStatic GHC.Internal.StaticPtr.StaticPtr -- Defined in ‘GHC.Internal.StaticPtr’
instance GHC.Internal.TH.Lift.Lift Data.Array.Byte.ByteArray -- Defined in ‘Data.Array.Byte’
-instance forall k (a :: k). GHC.Internal.TH.Lift.Lift (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’
+instance [safe] forall k (a :: k). GHC.Internal.TH.Lift.Lift (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/c6461eb865a806b475ed05591616e49…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/c6461eb865a806b475ed05591616e49…
You're receiving this email because of your account on gitlab.haskell.org.
1
0
[Git][ghc/ghc][wip/davide/ghc-toolchain-llvm-versions] ghc-toolchain: implement llvm program versioning logic
by David Eichmann (@DavidEichmann) 18 May '26
by David Eichmann (@DavidEichmann) 18 May '26
18 May '26
David Eichmann pushed to branch wip/davide/ghc-toolchain-llvm-versions at Glasgow Haskell Compiler / GHC
Commits:
1c662025 by David Eichmann at 2026-05-18T10:23:05+01:00
ghc-toolchain: implement llvm program versioning logic
- - - - -
3 changed files:
- m4/ghc_toolchain.m4
- utils/ghc-toolchain/exe/Main.hs
- utils/ghc-toolchain/src/GHC/Toolchain/Program.hs
Changes:
=====================================
m4/ghc_toolchain.m4
=====================================
@@ -143,7 +143,17 @@ AC_DEFUN([FIND_GHC_TOOLCHAIN_BIN],[
GHC_TOOLCHAIN_BIN="bin/${CrossCompilePrefix}ghc-toolchain-bin"
;;
NO)
- # We're in the source tree, so compile ghc-toolchain
+ # We're in the source tree
+
+ # Check for consistency of LLVM versions
+ hs_min_llvm=$(sed -n 's/^minLlvmVersion = //p' utils/ghc-toolchain/src/GHC/Toolchain/Program.hs)
+ hs_max_llvm=$(sed -n 's/^maxLlvmVersionExcl = //p' utils/ghc-toolchain/src/GHC/Toolchain/Program.hs)
+ test "$hs_min_llvm" = "$LlvmMinVersion" || \
+ AC_MSG_ERROR([minLlvmVersion ($hs_min_llvm) in utils/ghc-toolchain/src/GHC/Toolchain/Program.hs must equal LlvmMinVersion ($LlvmMinVersion) in configure.ac])
+ test "$hs_max_llvm" = "$LlvmMaxVersion" || \
+ AC_MSG_ERROR([maxLlvmVersionExcl ($hs_max_llvm) in utils/ghc-toolchain/src/GHC/Toolchain/Program.hs must equal LlvmMaxVersion ($LlvmMaxVersion) in configure.ac])
+
+ # Compile ghc-toolchain
"$GHC" -v0 \
-ilibraries/ghc-platform/src -iutils/ghc-toolchain/src \
-XNoImplicitPrelude \
=====================================
utils/ghc-toolchain/exe/Main.hs
=====================================
@@ -289,13 +289,9 @@ formatOpts = [
validateOpts :: Opts -> [String]
validateOpts opts = mconcat
- [ assertJust _optTriple "missing --triple flag"
- , assertJust _optOutput "missing --output flag"
+ [ ["missing --triple flag" | isNothing (optTriple opts)]
+ , ["missing --output flag" | isNothing (optOutput opts)]
]
- where
- assertJust :: Lens Opts (Maybe a) -> String -> [String]
- assertJust lens msg =
- [ msg | Nothing <- pure $ view lens opts ]
main :: IO ()
main = do
@@ -480,13 +476,13 @@ mkTarget opts = do
throwE "Neither a object-merging tool (e.g. ld -r) nor an ar that supports -L is available"
-- LLVM toolchain
- llc <- optional $ findProgram "llc" (optLlc opts) ["llc"]
- opt <- optional $ findProgram "opt" (optOpt opts) ["opt"]
- llvmAs <- optional $ findProgram "llvm assembler" (optLlvmAs opts) ["clang"]
+ llc <- optional $ findLlvmProgram "llc" (optLlc opts) "llc" True
+ opt <- optional $ findLlvmProgram "opt" (optOpt opts) "opt" True
+ llvmAs <- optional $ findLlvmProgram "llvm assembler" (optLlvmAs opts) "clang" True
-- for windows, also used for cross compiling
windres <- optional $ findProgram "windres" (optWindres opts) ["windres"]
- dlltool <- optional $ findProgram "dlltool" (optDlltool opts) ["llvm-dlltool"]
+ dlltool <- optional $ findLlvmProgram "dlltool" (optDlltool opts) "llvm-dlltool" False
-- Darwin-specific utilities
(otool, installNameTool) <-
=====================================
utils/ghc-toolchain/src/GHC/Toolchain/Program.hs
=====================================
@@ -16,6 +16,7 @@ module GHC.Toolchain.Program
, _poPath
, _poFlags
, findProgram
+ , findLlvmProgram
-- * Compiler programs
, compile
, supportsTarget
@@ -23,7 +24,8 @@ module GHC.Toolchain.Program
import Control.Monad
import Control.Monad.IO.Class
-import Data.List (intercalate, isPrefixOf)
+import Data.Char (isDigit)
+import Data.List (find, intercalate, isPrefixOf, tails)
import Data.Maybe
import System.FilePath
import System.Directory
@@ -131,17 +133,13 @@ programFromOpt userSpec path flags = Program { prgPath = fromMaybe path (poPath
-- in the given list of candidates.
--
-- If the 'ProgOpt' program flags are unspecified the program will have an empty list of flags.
-findProgram :: String
+findProgram :: String -- ^ The program description
-> ProgOpt -- ^ path provided by user
-> [FilePath] -- ^ candidate names
-> M Program
findProgram description userSpec candidates
- | Just path <- poPath userSpec = do
- let err =
- [ "Failed to find " ++ description ++ "."
- , "Looked for user-specified program '" ++ path ++ "' in the system search path."
- ]
- toProgram <$> find_it path <|> throwEs err
+ | Just findProgramFromProgOpts <- maybeFindProgramFromProgOpts description userSpec
+ = findProgramFromProgOpts
| otherwise = do
env <- getEnv
@@ -154,17 +152,91 @@ findProgram description userSpec candidates
[ "Failed to find " ++ description ++ "."
, "Looked for one of " ++ show candidates' ++ " in the system search path."
]
- toProgram <$> oneOf' err (map find_it candidates') <|> throwEs err
+ path <- oneOf' err (map findExecutableErr candidates')
+ return Program { prgPath = path, prgFlags = fromMaybe [] (poFlags userSpec) }
+
+-- Note that @configure.ac@ checks these llvm version constants (using @sed@) to
+-- ensure they are the same as the @$LlvmMinVersion@ and @$LlvmMaxVersion@
+-- defined in @configure.ac@.
+
+-- Min llvm version (inclusive)
+minLlvmVersion :: Int
+minLlvmVersion = 13
+
+-- Max llvm version (exclusive)
+maxLlvmVersionExcl :: Int
+maxLlvmVersionExcl = 23
+
+-- Max llvm version (inclusive)
+maxLlvmVersion :: Int
+maxLlvmVersion = maxLlvmVersionExcl - 1
+
+-- | Tries to find an llvm program with the highest supported llvm versions.
+-- This searches for an explicitly versioned executable (postfixed with the llvm version).
+-- If an explicitly versioned executable is not found, then this searches for a non-explicitly
+-- versioned executable. If supported, the llvm version is checked by passing @--version@ to
+-- the executable.
+--
+-- If the 'ProgOpt' program flags are unspecified the program will have an empty list of flags.
+findLlvmProgram :: String -- ^ The llvm program description
+ -> ProgOpt -- ^ path provided by user
+ -> FilePath -- ^ Candidate name
+ -> Bool -- ^ True if the program supports the @--version@ flag and the output
+ -- contains the llvm version number in the form @version <LLVM_VERSION>@
+ -> M Program
+findLlvmProgram description userSpec candidate checkVersion
+ | Just findProgramFromProgOpts <- maybeFindProgramFromProgOpts description userSpec
+ = findProgramFromProgOpts
+
+ | otherwise = do
+ program <- findProgram description userSpec (versionedCandidates ++ [candidate])
+ when checkVersion $ do
+ -- Extract the version from the `--version` output
+ versionOutput <- readProgramStdout program ["--version"]
+ let versionStrPrefix = "version "
+
+ versionMay :: Maybe Int
+ versionMay = fmap (read . takeWhile isDigit . drop (length versionStrPrefix))
+ . find (versionStrPrefix `isPrefixOf`)
+ $ tails versionOutput
+
+ errSupportedVersions = prgPath program <> ": We only support llvm " <> show minLlvmVersion <> " upto " <> show maxLlvmVersion <> " (non-inclusive)"
+ case versionMay of
+ Nothing -> throwE (errSupportedVersions <> " (no version found).")
+ Just version -> when
+ (version < minLlvmVersion || version > maxLlvmVersion)
+ (throwE $ errSupportedVersions <> " (found " <> show version <> ").")
+ return program
where
- toProgram path = Program { prgPath = path, prgFlags = fromMaybe [] (poFlags userSpec) }
-
- find_it name = do
- r <- liftIO $ findExecutable name
- case r of
- Nothing -> throwE $ name ++ " not found in search path"
- -- Use the given `prgPath` or candidate name rather than the
- -- absolute path returned by `findExecutable`.
- Just _x -> return name
+ versionedCandidates =
+ [ candidate <> postfix
+ | llvmVersion <- show <$> [maxLlvmVersion, maxLlvmVersion-1 .. minLlvmVersion]
+ , postfix <-
+ [ "-" <> llvmVersion
+ , "-" <> llvmVersion <> ".0"
+ , llvmVersion
+ ]
+ ]
+
+maybeFindProgramFromProgOpts :: String -> ProgOpt -> Maybe (M Program)
+maybeFindProgramFromProgOpts description userSpec = case poPath userSpec of
+ Nothing -> Nothing
+ Just path -> Just $ do
+ let err =
+ [ "Failed to find " ++ description ++ "."
+ , "Looked for user-specified program '" ++ path ++ "' in the system search path."
+ ]
+ path' <- findExecutableErr path <|> throwEs err
+ return Program { prgPath = path', prgFlags = fromMaybe [] (poFlags userSpec) }
+
+findExecutableErr :: String -> M FilePath
+findExecutableErr name = do
+ r <- liftIO $ findExecutable name
+ case r of
+ Nothing -> throwE $ name ++ " not found in search path"
+ -- Use the given `prgPath` or candidate name rather than the
+ -- absolute path returned by `findExecutable`.
+ Just _x -> return name
-------------------- Compiling utilities --------------------
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/1c662025970f29945436f7e33047a21…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/1c662025970f29945436f7e33047a21…
You're receiving this email because of your account on gitlab.haskell.org.
1
0
[Git][ghc/ghc][wip/mangoiv/ghc-9.12-bp] 2 commits: fixup! bytecode: Carefully SLIDE off the end of a stack chunk
by Magnus (@MangoIV) 18 May '26
by Magnus (@MangoIV) 18 May '26
18 May '26
Magnus pushed to branch wip/mangoiv/ghc-9.12-bp at Glasgow Haskell Compiler / GHC
Commits:
36956070 by mangoiv at 2026-05-18T10:35:40+02:00
fixup! bytecode: Carefully SLIDE off the end of a stack chunk
- - - - -
b4cc2def by mangoiv at 2026-05-18T10:39:34+02:00
fixup! rts: Align stack to 64-byte boundary in StgRun on x86
- - - - -
2 changed files:
- testsuite/tests/bytecode/T27001.stdout
- testsuite/tests/simd/should_run/all.T
Changes:
=====================================
testsuite/tests/bytecode/T27001.stdout
=====================================
@@ -1,4 +1 @@
-(0.15 secs,)
-it :: ()
100000.0
-(0.09 secs, 51,566,104 bytes)
=====================================
testsuite/tests/simd/should_run/all.T
=====================================
@@ -130,9 +130,6 @@ test('T26410_prim'
, compile_and_run if have_cpu_feature('avx512f') else compile
, [''])
-test('FloatConstant', [], compile_and_run, [''])
-test('IntConstant', [], compile_and_run, [''])
-
test('StackAlignment32'
, [ only_ways(llvm_ways) # SIMD NCG TODO: support 256-bit wide vectors
, unless(arch('x86_64') or arch('i386'), skip)
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/1b1b3be060a6c37982534b7ee81cca…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/1b1b3be060a6c37982534b7ee81cca…
You're receiving this email because of your account on gitlab.haskell.org.
1
0
[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 12 commits: Do not use mkCast during typechecking
by Marge Bot (@marge-bot) 18 May '26
by Marge Bot (@marge-bot) 18 May '26
18 May '26
Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC
Commits:
c6acdd1b by Simon Peyton Jones at 2026-05-18T02:59:21-04:00
Do not use mkCast during typechecking
This commit fixes #27219. The problem was that the typechecker was using
`mkCast`, whose assertion checks legitimately fail when applied to types
that contain unification variables.
- - - - -
e4c444a0 by Simon Peyton Jones at 2026-05-18T02:59:22-04:00
Major refactor of the Simplifier
The main payload of this patch is to refactor the Simplifer to avoid
repeated simplification when using Plan (AFTER) for rule rewrites.
The need for this was shown up by #26989.
See Note [Avoid repeated simplification] in GHC.Core.Opt.Simplify.Iteration.
Related refactoring:
* Refactor the two fields `sc_dup` and `sc_env` in `ApplyToVal` into one, `sc_env`.
Reason: the envt is irrelevant in the "simplified" case, so the data type describes
the possiblitiies much more accurately now.
* Some refactoring in `knownCon` to split off `wrapDataConFloats`.
* Refactor `lookupRule` and its auxiliary functions to return `RuleMatch`,
a new data type. See Note [data RuleMatch] in GHC.Core. Ditto for BuiltinRule.
This RuleMatch returns fragments of the target in rm_args and rm_floats,
leaving `rm_rhs` to be the stuff from the RULE itself.
Doing this has routine consequences in GHC.Core.Opt.ConstantFold. Many changes
there but all routine.
* When doing occurrence analysis on RULEs, make the occ-info on the rule
binders relate just to the RHS, not the LHS. See (OUR1) in
Note Note [OccInfo in unfoldings and rules]
This means that Lint must not complain about the fact that the patterns
in the RULE mentions binders that are marked dead.
See Note [Dead occurrences] in GHC.Core.Lint.
I changed the Core pretty-printer so that it didn't suppress dead binders,
else I can't see those binders in RULEs. That led to quite a lot of testsuite wibbles.
* Refactor FloatBinds, so that it is used both by
`exprIsConApp_mabye` and by `lookupRule`
* Move the definition of FloatBinds out of GHc.Core.Make, into GHC.Core.
* Add FloatTick as an extra constructor.
* Refactor `lookupRule` to use `FloatBinds` instead of `BindWrapper`.
This refactor just shares more code.
(Rename GHC.Core.Opt.FloatOut.FloatBinds to FloatLets, to avoid gratuitious
name clash with GHC.Core.FloatBinds.)
Corecion optimisation
* In simpleOpt, when composing coercions, call new function `optTransCo`.
This is much lighter weight than full blown coercion optimisation.
* Make `GHC.Core.Opt.Arity.pushCoValArg` and `pushCoTyArg` return the
coercionLKind of the coercion. This saves recomputing that coercionLKind
at the key call sites in GHC.Core.Opt.Simplify.Iteration.pushCast.
* Rename `addCoerce` in GHC.Core.Simplify.Iteration to become `pushCast`.
* In the `ApplyToVal` case of `pushCast` we had a very unsavoury call to `simplArg`.
I eliminated it by adding a field `sc_cast` to `ApplyToVal` that records any
pending casts. Much nicer now. See Note [The sc_cast field of ApplyToVal].
* Don't optimise coercions if the type-substitution is empty.
See Note [Optimising coercions] in GHC.Core.Opt.Simplify.Iteration.
The fix for #26838 is dramatic. For the test in perf/compiler/T26839 we have
Compiler allocs: Before: 7,363M
After: 688M
Compile time goes down generally. Here are compiler-alloc changes
over 0.5%:
CoOpt_Read(normal) 729,184,920 -0.7%
CoOpt_Singletons(normal) 666,916,960 -4.6% GOOD
LargeRecord(normal) 1,227,056,876 +1.1%
T12227(normal) 256,827,604 -4.6% GOOD
T12425(optasm) 76,879,410 -0.8%
T12545(normal) 787,826,918 -10.8% GOOD
T12707(normal) 775,186,464 -0.9%
T13253(normal) 318,599,596 -0.8%
T14766(normal) 685,857,320 -1.0%
T15304(normal) 1,123,333,422 -2.2%
T15630(normal) 123,142,330 -2.6%
T15630a(normal) 123,092,100 -2.6%
T15703(normal) 299,751,682 -2.9% GOOD
T17516(normal) 964,072,280 +1.0%
T18223(normal) 367,016,820 -6.2% GOOD
T18730(optasm) 130,643,770 -3.3% GOOD
T20261(normal) 535,608,584 -0.7%
T21839c(normal) 340,340,436 -0.9%
T24984(normal) 85,568,392 -1.9%
T3064(normal) 174,631,992 -1.2%
T3294(normal) 1,215,886,432 -0.7%
T5030(normal) 141,449,704 -17.2% GOOD
T5321Fun(normal) 258,484,744 -1.9%
T8095(normal) 770,532,232 -2.7%
T9630(normal) 858,423,408 -14.5% GOOD
T9872c(normal) 1,591,709,448 +0.7%
info_table_map_perf(normal) 19,700,614,458 -1.3%
geo. mean -0.7%
minimum -17.2%
maximum +1.1%
However, strangely there seems to be a 5.0% increase in CoOpt_Read in
the x86_64-linux-fedora43-validate+debug_info+ubsan job, although
there generally a /decrease/ in this test in other builds. The baseline
value looks strange. Anyway I'll just accept it.
Metric Decrease:
CoOpt_Singletons
T12227
T12545
T15703
T18223
T18730
T21839c
T5030
T9630
Metric Increase:
CoOpt_Read
- - - - -
54359609 by Vladislav Zavialov at 2026-05-18T02:59:23-04:00
Add type families: Tuple, Constraints, Tuple#, Sum# (#27179)
These type families map tuples of types to the corresponding Tuple<N>,
Tuple<N>#, CTuple<N>, and Sum<N># types. Some examples at N=2:
Tuple (Int, Bool) = Tuple2 Int Bool
Constraints (Show a, Eq a) = CTuple2 (Show a) (Eq a)
Tuple# (Int#, Float#) = Tuple2# Int# Float#
Sum# (Int#, Float#) = Sum2# Int# Float#
See GHC Proposal #145 "Non-punning list and tuple syntax".
To make the Sum# instance at N=64 possible, this patch also introduces
the Sum64# constructor declaration and bumps mAX_SUM_SIZE from 63 to 64.
Metric Increase:
ghc_experimental_dir
- - - - -
68827ac9 by fendor at 2026-05-18T02:59:23-04:00
Fix regression T27202: `:load` and `:add` work in GHCi
To fix the regression there are conceptually two major things that we
fix:
* We don't remove the `importDirs` from `interactive-session`
* When `:add`ing a module, we don't try to find them via PackageImports
* The PackageImport is wrong as we can't know the package-name at
this stage in ghc/UI.hs
What does it mean to not remove the `importDirs` from
`interactive-session`?
It means that, given some initial `DynFlags`, we will use those
`importDirs` in `interactive-session`.
The initial `DynFlags`, however, depend on how you initialise the GHC
session.
For a simple session, initialised by
ghc -isrc -this-unit-id main
It is simple, just use the `DynFlags` given on the cli.
Thus, `main` and `interactive-session` will have the same `DynFlags`,
except for the `homeUnitId` and `interactive-session` depends on `main`
by construction of the GHCi session.
What about a multiple home unit session, though?
ghc -unit @unit1 -unit @unit2
What are the `DynFlags` in this cli invocation? It shouldn't be either
`@unti1` nor `@unit2`, as the order shouldn't matter or any other
implicit condition.
For consistency, we decide that the initial `DynFlags` are the top
`DynFlags` on the cli, ignoring `-unit` flags.
Thus, in this example, there are no `importsDirs` regardless of what we
might find in `@unit1` and `@unit2`.
But in this invocation:
ghc -isrc -unit @unit1 -unit @unit2
The `interactive-session` will have the `importsDirs` `src`.
Note, `-isrc` will be inherited in `@unit1` and `@unit2`, so you need to
explicitly use `-i` to clear the `importsDirs`, in order to avoid
accidentally adding `src` as an import directory to all other home
units.
This fix has been made possible by the improvements introduced in
!15888, which avoids ambiguity when a home unit shares the `importsDirs`
with the `interactive-session`, on top of being much faster for multiple
home units.
Adds regression tests for T27202 for `:load`ing and `:add`ing modules
that are located in import directories.
- - - - -
f5ad0150 by fendor at 2026-05-18T02:59:24-04:00
Use home unit package db stacks in GHCi prompt and session unit
In order to import modules from home unit dependencies (e.g., `Data.Map`),
the ghci prompt unit needs to populate its `UnitState`.
This is tricky to handle correctly, which `PackageDBFlag`s should we use
to populate the `UnitState`?
We decide, the most intuitive solution for users is to depend on all
`PackageDBFlag`s, so that any dependency can be imported in GHCi.
This assumes consistency in the `PackageDBFlag`s, so no two home units
specify `PackageDBFlag`s that are inconsistent with each other.
We could simply concat all the `PackageDBFlag`s of the existing home
units, but later `PackageDBFlag`s shadow earlier ones, leading to the
last processed home units' `PackageDBFlag`s to shadow the earlier ones.
This is hard to fix, we need to give users the capability to provide ghc
options for the ghci prompt home unit.
However, as this is considerably more work, we decided on an
approximation that should work out most of the time.
Package Db stacks in cabal and stack follow a certain structure:
-no-user-package-db > -package-db $cabal-store > -package-db $local-db
The first two arguments are always the same, namely the
`-no-user-package-db` and `-package-db`.
We compute the longest common prefix over all home units, and use that
as the start of the package db stack. Then, over the rest of the
`PackageDBFlag`s, we simply take the union and append them to our
initial stack.
We assume, that the rest of package dbs only defines very few, "local"
units that are usually not shadowing each other.
This allows us to get a relatively consistent package database stack for
the ghci prompt home unit.
Similar reasoning applies to the session unit in order to add modules to
the session and have dependencies available in the module.
We do something similar for `-package` flags, to make sure only the
correct units are actually visible in the ghci session.
This time, we simply take the union of all `PackageFlag`s, allowing us
to import modules from the home unit dependencies.
In the future, it would be beneficial to allow the user to provide the
exact ghc options to control the visibilities. For now, this will have
to do.
- - - - -
c4457765 by Wen Kokke at 2026-05-18T02:59:24-04:00
rts: Add IPE event class for -l
This commit adds a new IPE event class to the -l RTS flag.
Previously, IPE events were enabled unconditionally.
However, the IPE events can easily grow to hundreds or thousands of megabytes.
With the new event class you can pass, e.g., -l-I to disable IPE events.
- - - - -
641e73b5 by Wen Kokke at 2026-05-18T02:59:25-04:00
ghc-internal: Add TraceFlags.traceIPE
- - - - -
51dd2b0c by Wen Kokke at 2026-05-18T02:59:25-04:00
testsuite: Add test for TraceFlags.traceIpe
- - - - -
11a4f6e8 by Wen Kokke at 2026-05-18T02:59:25-04:00
ghc-internal: Add DebugFlags.ipe
- - - - -
40d1e212 by Wen Kokke at 2026-05-18T02:59:25-04:00
testsuite: Add test for DebugFlags.ipe
- - - - -
635f3d7f by Duncan Coutts at 2026-05-18T02:59:26-04:00
Document removal of the signal-based interval timer
Update mentions within the RTS section of the users guide.
Add a changelog entry.
- - - - -
31528dd9 by Duncan Coutts at 2026-05-18T02:59:26-04:00
Fix section for an recent changelog entry
- - - - -
164 changed files:
- + changelog.d/T27202
- changelog.d/dynamic-trace-flags
- + changelog.d/ipe-event-class
- + changelog.d/lib-add-tuple-tyfam-27179
- + changelog.d/no-more-timer-signal
- compiler/GHC/Core.hs
- compiler/GHC/Core/Coercion.hs
- compiler/GHC/Core/Coercion/Opt.hs
- compiler/GHC/Core/Lint.hs
- compiler/GHC/Core/Make.hs
- compiler/GHC/Core/Opt/Arity.hs
- compiler/GHC/Core/Opt/ConstantFold.hs
- compiler/GHC/Core/Opt/FloatIn.hs
- compiler/GHC/Core/Opt/FloatOut.hs
- compiler/GHC/Core/Opt/OccurAnal.hs
- compiler/GHC/Core/Opt/Simplify/Env.hs
- compiler/GHC/Core/Opt/Simplify/Iteration.hs
- compiler/GHC/Core/Opt/Simplify/Utils.hs
- compiler/GHC/Core/Opt/SpecConstr.hs
- compiler/GHC/Core/Opt/Specialise.hs
- compiler/GHC/Core/Ppr.hs
- compiler/GHC/Core/Rules.hs
- compiler/GHC/Core/SimpleOpt.hs
- compiler/GHC/Core/TyCo/Subst.hs
- compiler/GHC/CoreToStg/Prep.hs
- compiler/GHC/Data/List/SetOps.hs
- compiler/GHC/Driver/Config/Core/Lint.hs
- compiler/GHC/Driver/DynFlags.hs
- compiler/GHC/HsToCore/Pmc/Solver.hs
- compiler/GHC/IfaceToCore.hs
- compiler/GHC/Settings/Constants.hs
- compiler/GHC/Tc/Types/Evidence.hs
- compiler/GHC/Types/Id/Make.hs
- compiler/GHC/Unit/State.hs
- docs/users_guide/profiling.rst
- docs/users_guide/runtime_control.rst
- ghc/GHCi/UI.hs
- ghc/Main.hs
- libraries/base/src/GHC/Base.hs
- libraries/base/src/GHC/Exts.hs
- libraries/ghc-experimental/src/Data/Sum/Experimental.hs
- libraries/ghc-experimental/src/Data/Tuple/Experimental.hs
- libraries/ghc-internal/src/GHC/Internal/Base.hs
- libraries/ghc-internal/src/GHC/Internal/Exts.hs
- libraries/ghc-internal/src/GHC/Internal/RTS/Flags.hsc
- libraries/ghc-internal/src/GHC/Internal/Types.hs
- rts/IPE.c
- rts/RtsFlags.c
- rts/Trace.c
- rts/Trace.h
- rts/include/rts/EventLogWriter.h
- rts/include/rts/Flags.h
- testsuite/tests/codeGen/should_compile/T25177.stderr
- testsuite/tests/deSugar/should_compile/T13208.stdout
- testsuite/tests/driver/fat-iface/fat014.stdout
- + testsuite/tests/ghci/prog-mhu006/Makefile
- + testsuite/tests/ghci/prog-mhu006/a/A.hs
- + testsuite/tests/ghci/prog-mhu006/all.T
- + testsuite/tests/ghci/prog-mhu006/b/B.hs
- + testsuite/tests/ghci/prog-mhu006/prog-mhu006a.script
- + testsuite/tests/ghci/prog-mhu006/prog-mhu006a.stdout
- + testsuite/tests/ghci/prog-mhu006/unitA
- + testsuite/tests/ghci/prog-mhu006/unitB
- testsuite/tests/ghci/prog018/prog018.stdout
- testsuite/tests/ghci/prog020/Makefile
- testsuite/tests/ghci/prog020/all.T
- testsuite/tests/ghci/prog020/ghci.prog020.script → testsuite/tests/ghci/prog020/ghci.prog020a.script
- testsuite/tests/ghci/prog020/ghci.prog020.stderr → testsuite/tests/ghci/prog020/ghci.prog020a.stderr
- testsuite/tests/ghci/prog020/ghci.prog020.stdout → testsuite/tests/ghci/prog020/ghci.prog020a.stdout
- + testsuite/tests/ghci/prog020/ghci.prog020b.script
- + testsuite/tests/ghci/prog020/ghci.prog020b.stderr
- + testsuite/tests/ghci/prog020/ghci.prog020b.stdout
- + testsuite/tests/ghci/prog023/Makefile
- + testsuite/tests/ghci/prog023/all.T
- + testsuite/tests/ghci/prog023/prog023a.script
- + testsuite/tests/ghci/prog023/prog023a.stdout
- + testsuite/tests/ghci/prog023/prog023b.script
- + testsuite/tests/ghci/prog023/prog023b.stdout
- + testsuite/tests/ghci/prog023/src/A.hs
- + testsuite/tests/ghci/prog024/Makefile
- + testsuite/tests/ghci/prog024/all.T
- + testsuite/tests/ghci/prog024/prog024a.script
- + testsuite/tests/ghci/prog024/prog024a.stdout
- + testsuite/tests/ghci/prog024/prog024b.script
- + testsuite/tests/ghci/prog024/prog024b.stdout
- + testsuite/tests/ghci/prog024/prog024c.script
- + testsuite/tests/ghci/prog024/prog024c.stderr
- + testsuite/tests/ghci/prog024/prog024c.stdout
- + testsuite/tests/ghci/prog024/prog024d.script
- + testsuite/tests/ghci/prog024/prog024d.stderr
- + testsuite/tests/ghci/prog024/prog024d.stdout
- + testsuite/tests/ghci/prog024/prog024e.script
- + testsuite/tests/ghci/prog024/prog024e.stdout
- + testsuite/tests/ghci/prog024/prog024f.script
- + testsuite/tests/ghci/prog024/prog024f.stdout
- + testsuite/tests/ghci/prog024/src/A.hs
- + testsuite/tests/ghci/prog024/src/B.hs
- + testsuite/tests/ghci/prog025/Makefile
- + testsuite/tests/ghci/prog025/a/A.hs
- + testsuite/tests/ghci/prog025/all.T
- + testsuite/tests/ghci/prog025/prog025a.script
- + testsuite/tests/ghci/prog025/prog025a.stdout
- + testsuite/tests/ghci/prog025/prog025b.script
- + testsuite/tests/ghci/prog025/prog025b.stdout
- + testsuite/tests/ghci/prog025/testpkg/Test.hs
- + testsuite/tests/ghci/prog025/testpkg/testpkg-0.1.0.0.pkg
- + testsuite/tests/ghci/prog025/testpkg/testpkg-0.2.0.0.pkg
- + testsuite/tests/ghci/prog025/unitA
- testsuite/tests/ghci/scripts/ListTuplePunsPprNoAbbrevTuple.stdout
- testsuite/tests/ghci/scripts/T13997.stdout
- testsuite/tests/ghci/scripts/T1914.stdout
- testsuite/tests/ghci/scripts/T20217.stdout
- testsuite/tests/ghci/scripts/T8042.stdout
- testsuite/tests/ghci/scripts/T8042recomp.stdout
- testsuite/tests/ghci/scripts/all.T
- testsuite/tests/ghci/should_run/T10920.stderr
- testsuite/tests/interface-stability/ghc-experimental-exports.stdout
- testsuite/tests/interface-stability/ghc-experimental-exports.stdout-mingw32
- testsuite/tests/interface-stability/ghc-prim-exports.stdout
- testsuite/tests/interface-stability/ghc-prim-exports.stdout-mingw32
- testsuite/tests/linters/notes.stdout
- testsuite/tests/numeric/should_compile/T15547.stderr
- testsuite/tests/numeric/should_compile/T20347.stderr
- testsuite/tests/numeric/should_compile/T20374.stderr
- testsuite/tests/numeric/should_compile/T20376.stderr
- testsuite/tests/parser/should_compile/ListTuplePunsSuccess1.hs
- testsuite/tests/parser/should_compile/all.T
- + testsuite/tests/parser/should_fail/ListTuplePunsFail6.hs
- + testsuite/tests/parser/should_fail/ListTuplePunsFail6.stderr
- testsuite/tests/parser/should_fail/all.T
- testsuite/tests/parser/should_run/ListTuplePunsConstraints.hs
- + testsuite/tests/perf/compiler/T26989.hs
- + testsuite/tests/perf/compiler/T26989a.hs
- testsuite/tests/perf/compiler/all.T
- testsuite/tests/printer/T18052a.stderr
- testsuite/tests/profiling/should_run/callstack001.stdout
- + testsuite/tests/rts/T25275/DebugIpe.hs
- + testsuite/tests/rts/T25275/T25275_A.stdout
- + testsuite/tests/rts/T25275/T25275_B.stdout
- + testsuite/tests/rts/T25275/T25275_C.stdout
- + testsuite/tests/rts/T25275/T25275_D.stdout
- + testsuite/tests/rts/T25275/TraceIpe.hs
- + testsuite/tests/rts/T25275/all.T
- testsuite/tests/simplCore/should_compile/DsSpecPragmas.stderr
- testsuite/tests/simplCore/should_compile/RewriteHigherOrderPatterns.stderr
- testsuite/tests/simplCore/should_compile/T15205.stderr
- testsuite/tests/simplCore/should_compile/T18668.stderr
- testsuite/tests/simplCore/should_compile/T19246.stderr
- testsuite/tests/simplCore/should_compile/T19599.stderr
- testsuite/tests/simplCore/should_compile/T19599a.stderr
- testsuite/tests/simplCore/should_compile/T21917.stderr
- testsuite/tests/simplCore/should_compile/T23074.stderr
- testsuite/tests/simplCore/should_compile/T24359a.stderr
- testsuite/tests/simplCore/should_compile/T25160.stderr
- testsuite/tests/simplCore/should_compile/T25718c.stderr-ws-32
- testsuite/tests/simplCore/should_compile/T25718c.stderr-ws-64
- testsuite/tests/simplCore/should_compile/T26051.stderr
- testsuite/tests/simplCore/should_compile/T26116.stderr
- testsuite/tests/simplCore/should_compile/T8331.stderr
- testsuite/tests/simplCore/should_compile/T8848a.stderr
- testsuite/tests/simplCore/should_compile/spec004.stderr
- testsuite/tests/typecheck/should_compile/T13032.stderr
- + testsuite/tests/typecheck/should_compile/T23135.hs
- testsuite/tests/typecheck/should_compile/all.T
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/f35007a36c04c8b76b8e3b43a42baf…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/f35007a36c04c8b76b8e3b43a42baf…
You're receiving this email because of your account on gitlab.haskell.org.
1
0
[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 12 commits: Do not use mkCast during typechecking
by Marge Bot (@marge-bot) 18 May '26
by Marge Bot (@marge-bot) 18 May '26
18 May '26
Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC
Commits:
c5199fe4 by Simon Peyton Jones at 2026-05-17T21:05:29-04:00
Do not use mkCast during typechecking
This commit fixes #27219. The problem was that the typechecker was using
`mkCast`, whose assertion checks legitimately fail when applied to types
that contain unification variables.
- - - - -
5b844ed5 by Simon Peyton Jones at 2026-05-17T21:05:29-04:00
Major refactor of the Simplifier
The main payload of this patch is to refactor the Simplifer to avoid
repeated simplification when using Plan (AFTER) for rule rewrites.
The need for this was shown up by #26989.
See Note [Avoid repeated simplification] in GHC.Core.Opt.Simplify.Iteration.
Related refactoring:
* Refactor the two fields `sc_dup` and `sc_env` in `ApplyToVal` into one, `sc_env`.
Reason: the envt is irrelevant in the "simplified" case, so the data type describes
the possiblitiies much more accurately now.
* Some refactoring in `knownCon` to split off `wrapDataConFloats`.
* Refactor `lookupRule` and its auxiliary functions to return `RuleMatch`,
a new data type. See Note [data RuleMatch] in GHC.Core. Ditto for BuiltinRule.
This RuleMatch returns fragments of the target in rm_args and rm_floats,
leaving `rm_rhs` to be the stuff from the RULE itself.
Doing this has routine consequences in GHC.Core.Opt.ConstantFold. Many changes
there but all routine.
* When doing occurrence analysis on RULEs, make the occ-info on the rule
binders relate just to the RHS, not the LHS. See (OUR1) in
Note Note [OccInfo in unfoldings and rules]
This means that Lint must not complain about the fact that the patterns
in the RULE mentions binders that are marked dead.
See Note [Dead occurrences] in GHC.Core.Lint.
I changed the Core pretty-printer so that it didn't suppress dead binders,
else I can't see those binders in RULEs. That led to quite a lot of testsuite wibbles.
* Refactor FloatBinds, so that it is used both by
`exprIsConApp_mabye` and by `lookupRule`
* Move the definition of FloatBinds out of GHc.Core.Make, into GHC.Core.
* Add FloatTick as an extra constructor.
* Refactor `lookupRule` to use `FloatBinds` instead of `BindWrapper`.
This refactor just shares more code.
(Rename GHC.Core.Opt.FloatOut.FloatBinds to FloatLets, to avoid gratuitious
name clash with GHC.Core.FloatBinds.)
Corecion optimisation
* In simpleOpt, when composing coercions, call new function `optTransCo`.
This is much lighter weight than full blown coercion optimisation.
* Make `GHC.Core.Opt.Arity.pushCoValArg` and `pushCoTyArg` return the
coercionLKind of the coercion. This saves recomputing that coercionLKind
at the key call sites in GHC.Core.Opt.Simplify.Iteration.pushCast.
* Rename `addCoerce` in GHC.Core.Simplify.Iteration to become `pushCast`.
* In the `ApplyToVal` case of `pushCast` we had a very unsavoury call to `simplArg`.
I eliminated it by adding a field `sc_cast` to `ApplyToVal` that records any
pending casts. Much nicer now. See Note [The sc_cast field of ApplyToVal].
* Don't optimise coercions if the type-substitution is empty.
See Note [Optimising coercions] in GHC.Core.Opt.Simplify.Iteration.
The fix for #26838 is dramatic. For the test in perf/compiler/T26839 we have
Compiler allocs: Before: 7,363M
After: 688M
Compile time goes down generally. Here are compiler-alloc changes
over 0.5%:
CoOpt_Read(normal) 729,184,920 -0.7%
CoOpt_Singletons(normal) 666,916,960 -4.6% GOOD
LargeRecord(normal) 1,227,056,876 +1.1%
T12227(normal) 256,827,604 -4.6% GOOD
T12425(optasm) 76,879,410 -0.8%
T12545(normal) 787,826,918 -10.8% GOOD
T12707(normal) 775,186,464 -0.9%
T13253(normal) 318,599,596 -0.8%
T14766(normal) 685,857,320 -1.0%
T15304(normal) 1,123,333,422 -2.2%
T15630(normal) 123,142,330 -2.6%
T15630a(normal) 123,092,100 -2.6%
T15703(normal) 299,751,682 -2.9% GOOD
T17516(normal) 964,072,280 +1.0%
T18223(normal) 367,016,820 -6.2% GOOD
T18730(optasm) 130,643,770 -3.3% GOOD
T20261(normal) 535,608,584 -0.7%
T21839c(normal) 340,340,436 -0.9%
T24984(normal) 85,568,392 -1.9%
T3064(normal) 174,631,992 -1.2%
T3294(normal) 1,215,886,432 -0.7%
T5030(normal) 141,449,704 -17.2% GOOD
T5321Fun(normal) 258,484,744 -1.9%
T8095(normal) 770,532,232 -2.7%
T9630(normal) 858,423,408 -14.5% GOOD
T9872c(normal) 1,591,709,448 +0.7%
info_table_map_perf(normal) 19,700,614,458 -1.3%
geo. mean -0.7%
minimum -17.2%
maximum +1.1%
However, strangely there seems to be a 5.0% increase in CoOpt_Read in
the x86_64-linux-fedora43-validate+debug_info+ubsan job, although
there generally a /decrease/ in this test in other builds. The baseline
value looks strange. Anyway I'll just accept it.
Metric Decrease:
CoOpt_Singletons
T12227
T12545
T15703
T18223
T18730
T21839c
T5030
T9630
Metric Increase:
CoOpt_Read
- - - - -
ad3fa224 by Vladislav Zavialov at 2026-05-17T21:05:30-04:00
Add type families: Tuple, Constraints, Tuple#, Sum# (#27179)
These type families map tuples of types to the corresponding Tuple<N>,
Tuple<N>#, CTuple<N>, and Sum<N># types. Some examples at N=2:
Tuple (Int, Bool) = Tuple2 Int Bool
Constraints (Show a, Eq a) = CTuple2 (Show a) (Eq a)
Tuple# (Int#, Float#) = Tuple2# Int# Float#
Sum# (Int#, Float#) = Sum2# Int# Float#
See GHC Proposal #145 "Non-punning list and tuple syntax".
To make the Sum# instance at N=64 possible, this patch also introduces
the Sum64# constructor declaration and bumps mAX_SUM_SIZE from 63 to 64.
Metric Increase:
ghc_experimental_dir
- - - - -
9a6ecdb5 by fendor at 2026-05-17T21:05:31-04:00
Fix regression T27202: `:load` and `:add` work in GHCi
To fix the regression there are conceptually two major things that we
fix:
* We don't remove the `importDirs` from `interactive-session`
* When `:add`ing a module, we don't try to find them via PackageImports
* The PackageImport is wrong as we can't know the package-name at
this stage in ghc/UI.hs
What does it mean to not remove the `importDirs` from
`interactive-session`?
It means that, given some initial `DynFlags`, we will use those
`importDirs` in `interactive-session`.
The initial `DynFlags`, however, depend on how you initialise the GHC
session.
For a simple session, initialised by
ghc -isrc -this-unit-id main
It is simple, just use the `DynFlags` given on the cli.
Thus, `main` and `interactive-session` will have the same `DynFlags`,
except for the `homeUnitId` and `interactive-session` depends on `main`
by construction of the GHCi session.
What about a multiple home unit session, though?
ghc -unit @unit1 -unit @unit2
What are the `DynFlags` in this cli invocation? It shouldn't be either
`@unti1` nor `@unit2`, as the order shouldn't matter or any other
implicit condition.
For consistency, we decide that the initial `DynFlags` are the top
`DynFlags` on the cli, ignoring `-unit` flags.
Thus, in this example, there are no `importsDirs` regardless of what we
might find in `@unit1` and `@unit2`.
But in this invocation:
ghc -isrc -unit @unit1 -unit @unit2
The `interactive-session` will have the `importsDirs` `src`.
Note, `-isrc` will be inherited in `@unit1` and `@unit2`, so you need to
explicitly use `-i` to clear the `importsDirs`, in order to avoid
accidentally adding `src` as an import directory to all other home
units.
This fix has been made possible by the improvements introduced in
!15888, which avoids ambiguity when a home unit shares the `importsDirs`
with the `interactive-session`, on top of being much faster for multiple
home units.
Adds regression tests for T27202 for `:load`ing and `:add`ing modules
that are located in import directories.
- - - - -
260bdb10 by fendor at 2026-05-17T21:05:31-04:00
Use home unit package db stacks in GHCi prompt and session unit
In order to import modules from home unit dependencies (e.g., `Data.Map`),
the ghci prompt unit needs to populate its `UnitState`.
This is tricky to handle correctly, which `PackageDBFlag`s should we use
to populate the `UnitState`?
We decide, the most intuitive solution for users is to depend on all
`PackageDBFlag`s, so that any dependency can be imported in GHCi.
This assumes consistency in the `PackageDBFlag`s, so no two home units
specify `PackageDBFlag`s that are inconsistent with each other.
We could simply concat all the `PackageDBFlag`s of the existing home
units, but later `PackageDBFlag`s shadow earlier ones, leading to the
last processed home units' `PackageDBFlag`s to shadow the earlier ones.
This is hard to fix, we need to give users the capability to provide ghc
options for the ghci prompt home unit.
However, as this is considerably more work, we decided on an
approximation that should work out most of the time.
Package Db stacks in cabal and stack follow a certain structure:
-no-user-package-db > -package-db $cabal-store > -package-db $local-db
The first two arguments are always the same, namely the
`-no-user-package-db` and `-package-db`.
We compute the longest common prefix over all home units, and use that
as the start of the package db stack. Then, over the rest of the
`PackageDBFlag`s, we simply take the union and append them to our
initial stack.
We assume, that the rest of package dbs only defines very few, "local"
units that are usually not shadowing each other.
This allows us to get a relatively consistent package database stack for
the ghci prompt home unit.
Similar reasoning applies to the session unit in order to add modules to
the session and have dependencies available in the module.
We do something similar for `-package` flags, to make sure only the
correct units are actually visible in the ghci session.
This time, we simply take the union of all `PackageFlag`s, allowing us
to import modules from the home unit dependencies.
In the future, it would be beneficial to allow the user to provide the
exact ghc options to control the visibilities. For now, this will have
to do.
- - - - -
f92ec6c7 by Wen Kokke at 2026-05-17T21:05:32-04:00
rts: Add IPE event class for -l
This commit adds a new IPE event class to the -l RTS flag.
Previously, IPE events were enabled unconditionally.
However, the IPE events can easily grow to hundreds or thousands of megabytes.
With the new event class you can pass, e.g., -l-I to disable IPE events.
- - - - -
ea259e9e by Wen Kokke at 2026-05-17T21:05:33-04:00
ghc-internal: Add TraceFlags.traceIPE
- - - - -
908b4c6b by Wen Kokke at 2026-05-17T21:05:33-04:00
testsuite: Add test for TraceFlags.traceIpe
- - - - -
e4465b81 by Wen Kokke at 2026-05-17T21:05:33-04:00
ghc-internal: Add DebugFlags.ipe
- - - - -
49ac48ce by Wen Kokke at 2026-05-17T21:05:33-04:00
testsuite: Add test for DebugFlags.ipe
- - - - -
57b22938 by Duncan Coutts at 2026-05-17T21:05:34-04:00
Document removal of the signal-based interval timer
Update mentions within the RTS section of the users guide.
Add a changelog entry.
- - - - -
f35007a3 by Duncan Coutts at 2026-05-17T21:05:34-04:00
Fix section for an recent changelog entry
- - - - -
164 changed files:
- + changelog.d/T27202
- changelog.d/dynamic-trace-flags
- + changelog.d/ipe-event-class
- + changelog.d/lib-add-tuple-tyfam-27179
- + changelog.d/no-more-timer-signal
- compiler/GHC/Core.hs
- compiler/GHC/Core/Coercion.hs
- compiler/GHC/Core/Coercion/Opt.hs
- compiler/GHC/Core/Lint.hs
- compiler/GHC/Core/Make.hs
- compiler/GHC/Core/Opt/Arity.hs
- compiler/GHC/Core/Opt/ConstantFold.hs
- compiler/GHC/Core/Opt/FloatIn.hs
- compiler/GHC/Core/Opt/FloatOut.hs
- compiler/GHC/Core/Opt/OccurAnal.hs
- compiler/GHC/Core/Opt/Simplify/Env.hs
- compiler/GHC/Core/Opt/Simplify/Iteration.hs
- compiler/GHC/Core/Opt/Simplify/Utils.hs
- compiler/GHC/Core/Opt/SpecConstr.hs
- compiler/GHC/Core/Opt/Specialise.hs
- compiler/GHC/Core/Ppr.hs
- compiler/GHC/Core/Rules.hs
- compiler/GHC/Core/SimpleOpt.hs
- compiler/GHC/Core/TyCo/Subst.hs
- compiler/GHC/CoreToStg/Prep.hs
- compiler/GHC/Data/List/SetOps.hs
- compiler/GHC/Driver/Config/Core/Lint.hs
- compiler/GHC/Driver/DynFlags.hs
- compiler/GHC/HsToCore/Pmc/Solver.hs
- compiler/GHC/IfaceToCore.hs
- compiler/GHC/Settings/Constants.hs
- compiler/GHC/Tc/Types/Evidence.hs
- compiler/GHC/Types/Id/Make.hs
- compiler/GHC/Unit/State.hs
- docs/users_guide/profiling.rst
- docs/users_guide/runtime_control.rst
- ghc/GHCi/UI.hs
- ghc/Main.hs
- libraries/base/src/GHC/Base.hs
- libraries/base/src/GHC/Exts.hs
- libraries/ghc-experimental/src/Data/Sum/Experimental.hs
- libraries/ghc-experimental/src/Data/Tuple/Experimental.hs
- libraries/ghc-internal/src/GHC/Internal/Base.hs
- libraries/ghc-internal/src/GHC/Internal/Exts.hs
- libraries/ghc-internal/src/GHC/Internal/RTS/Flags.hsc
- libraries/ghc-internal/src/GHC/Internal/Types.hs
- rts/IPE.c
- rts/RtsFlags.c
- rts/Trace.c
- rts/Trace.h
- rts/include/rts/EventLogWriter.h
- rts/include/rts/Flags.h
- testsuite/tests/codeGen/should_compile/T25177.stderr
- testsuite/tests/deSugar/should_compile/T13208.stdout
- testsuite/tests/driver/fat-iface/fat014.stdout
- + testsuite/tests/ghci/prog-mhu006/Makefile
- + testsuite/tests/ghci/prog-mhu006/a/A.hs
- + testsuite/tests/ghci/prog-mhu006/all.T
- + testsuite/tests/ghci/prog-mhu006/b/B.hs
- + testsuite/tests/ghci/prog-mhu006/prog-mhu006a.script
- + testsuite/tests/ghci/prog-mhu006/prog-mhu006a.stdout
- + testsuite/tests/ghci/prog-mhu006/unitA
- + testsuite/tests/ghci/prog-mhu006/unitB
- testsuite/tests/ghci/prog018/prog018.stdout
- testsuite/tests/ghci/prog020/Makefile
- testsuite/tests/ghci/prog020/all.T
- testsuite/tests/ghci/prog020/ghci.prog020.script → testsuite/tests/ghci/prog020/ghci.prog020a.script
- testsuite/tests/ghci/prog020/ghci.prog020.stderr → testsuite/tests/ghci/prog020/ghci.prog020a.stderr
- testsuite/tests/ghci/prog020/ghci.prog020.stdout → testsuite/tests/ghci/prog020/ghci.prog020a.stdout
- + testsuite/tests/ghci/prog020/ghci.prog020b.script
- + testsuite/tests/ghci/prog020/ghci.prog020b.stderr
- + testsuite/tests/ghci/prog020/ghci.prog020b.stdout
- + testsuite/tests/ghci/prog023/Makefile
- + testsuite/tests/ghci/prog023/all.T
- + testsuite/tests/ghci/prog023/prog023a.script
- + testsuite/tests/ghci/prog023/prog023a.stdout
- + testsuite/tests/ghci/prog023/prog023b.script
- + testsuite/tests/ghci/prog023/prog023b.stdout
- + testsuite/tests/ghci/prog023/src/A.hs
- + testsuite/tests/ghci/prog024/Makefile
- + testsuite/tests/ghci/prog024/all.T
- + testsuite/tests/ghci/prog024/prog024a.script
- + testsuite/tests/ghci/prog024/prog024a.stdout
- + testsuite/tests/ghci/prog024/prog024b.script
- + testsuite/tests/ghci/prog024/prog024b.stdout
- + testsuite/tests/ghci/prog024/prog024c.script
- + testsuite/tests/ghci/prog024/prog024c.stderr
- + testsuite/tests/ghci/prog024/prog024c.stdout
- + testsuite/tests/ghci/prog024/prog024d.script
- + testsuite/tests/ghci/prog024/prog024d.stderr
- + testsuite/tests/ghci/prog024/prog024d.stdout
- + testsuite/tests/ghci/prog024/prog024e.script
- + testsuite/tests/ghci/prog024/prog024e.stdout
- + testsuite/tests/ghci/prog024/prog024f.script
- + testsuite/tests/ghci/prog024/prog024f.stdout
- + testsuite/tests/ghci/prog024/src/A.hs
- + testsuite/tests/ghci/prog024/src/B.hs
- + testsuite/tests/ghci/prog025/Makefile
- + testsuite/tests/ghci/prog025/a/A.hs
- + testsuite/tests/ghci/prog025/all.T
- + testsuite/tests/ghci/prog025/prog025a.script
- + testsuite/tests/ghci/prog025/prog025a.stdout
- + testsuite/tests/ghci/prog025/prog025b.script
- + testsuite/tests/ghci/prog025/prog025b.stdout
- + testsuite/tests/ghci/prog025/testpkg/Test.hs
- + testsuite/tests/ghci/prog025/testpkg/testpkg-0.1.0.0.pkg
- + testsuite/tests/ghci/prog025/testpkg/testpkg-0.2.0.0.pkg
- + testsuite/tests/ghci/prog025/unitA
- testsuite/tests/ghci/scripts/ListTuplePunsPprNoAbbrevTuple.stdout
- testsuite/tests/ghci/scripts/T13997.stdout
- testsuite/tests/ghci/scripts/T1914.stdout
- testsuite/tests/ghci/scripts/T20217.stdout
- testsuite/tests/ghci/scripts/T8042.stdout
- testsuite/tests/ghci/scripts/T8042recomp.stdout
- testsuite/tests/ghci/scripts/all.T
- testsuite/tests/ghci/should_run/T10920.stderr
- testsuite/tests/interface-stability/ghc-experimental-exports.stdout
- testsuite/tests/interface-stability/ghc-experimental-exports.stdout-mingw32
- testsuite/tests/interface-stability/ghc-prim-exports.stdout
- testsuite/tests/interface-stability/ghc-prim-exports.stdout-mingw32
- testsuite/tests/linters/notes.stdout
- testsuite/tests/numeric/should_compile/T15547.stderr
- testsuite/tests/numeric/should_compile/T20347.stderr
- testsuite/tests/numeric/should_compile/T20374.stderr
- testsuite/tests/numeric/should_compile/T20376.stderr
- testsuite/tests/parser/should_compile/ListTuplePunsSuccess1.hs
- testsuite/tests/parser/should_compile/all.T
- + testsuite/tests/parser/should_fail/ListTuplePunsFail6.hs
- + testsuite/tests/parser/should_fail/ListTuplePunsFail6.stderr
- testsuite/tests/parser/should_fail/all.T
- testsuite/tests/parser/should_run/ListTuplePunsConstraints.hs
- + testsuite/tests/perf/compiler/T26989.hs
- + testsuite/tests/perf/compiler/T26989a.hs
- testsuite/tests/perf/compiler/all.T
- testsuite/tests/printer/T18052a.stderr
- testsuite/tests/profiling/should_run/callstack001.stdout
- + testsuite/tests/rts/T25275/DebugIpe.hs
- + testsuite/tests/rts/T25275/T25275_A.stdout
- + testsuite/tests/rts/T25275/T25275_B.stdout
- + testsuite/tests/rts/T25275/T25275_C.stdout
- + testsuite/tests/rts/T25275/T25275_D.stdout
- + testsuite/tests/rts/T25275/TraceIpe.hs
- + testsuite/tests/rts/T25275/all.T
- testsuite/tests/simplCore/should_compile/DsSpecPragmas.stderr
- testsuite/tests/simplCore/should_compile/RewriteHigherOrderPatterns.stderr
- testsuite/tests/simplCore/should_compile/T15205.stderr
- testsuite/tests/simplCore/should_compile/T18668.stderr
- testsuite/tests/simplCore/should_compile/T19246.stderr
- testsuite/tests/simplCore/should_compile/T19599.stderr
- testsuite/tests/simplCore/should_compile/T19599a.stderr
- testsuite/tests/simplCore/should_compile/T21917.stderr
- testsuite/tests/simplCore/should_compile/T23074.stderr
- testsuite/tests/simplCore/should_compile/T24359a.stderr
- testsuite/tests/simplCore/should_compile/T25160.stderr
- testsuite/tests/simplCore/should_compile/T25718c.stderr-ws-32
- testsuite/tests/simplCore/should_compile/T25718c.stderr-ws-64
- testsuite/tests/simplCore/should_compile/T26051.stderr
- testsuite/tests/simplCore/should_compile/T26116.stderr
- testsuite/tests/simplCore/should_compile/T8331.stderr
- testsuite/tests/simplCore/should_compile/T8848a.stderr
- testsuite/tests/simplCore/should_compile/spec004.stderr
- testsuite/tests/typecheck/should_compile/T13032.stderr
- + testsuite/tests/typecheck/should_compile/T23135.hs
- testsuite/tests/typecheck/should_compile/all.T
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/0d8659989b365bacd3fcb79d4ed187…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/0d8659989b365bacd3fcb79d4ed187…
You're receiving this email because of your account on gitlab.haskell.org.
1
0
[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 11 commits: Do not use mkCast during typechecking
by Marge Bot (@marge-bot) 17 May '26
by Marge Bot (@marge-bot) 17 May '26
17 May '26
Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC
Commits:
eaf50ac2 by Simon Peyton Jones at 2026-05-17T16:30:05-04:00
Do not use mkCast during typechecking
This commit fixes #27219. The problem was that the typechecker was using
`mkCast`, whose assertion checks legitimately fail when applied to types
that contain unification variables.
- - - - -
07ae785d by Simon Peyton Jones at 2026-05-17T16:30:05-04:00
Major refactor of the Simplifier
The main payload of this patch is to refactor the Simplifer to avoid
repeated simplification when using Plan (AFTER) for rule rewrites.
The need for this was shown up by #26989.
See Note [Avoid repeated simplification] in GHC.Core.Opt.Simplify.Iteration.
Related refactoring:
* Refactor the two fields `sc_dup` and `sc_env` in `ApplyToVal` into one, `sc_env`.
Reason: the envt is irrelevant in the "simplified" case, so the data type describes
the possiblitiies much more accurately now.
* Some refactoring in `knownCon` to split off `wrapDataConFloats`.
* Refactor `lookupRule` and its auxiliary functions to return `RuleMatch`,
a new data type. See Note [data RuleMatch] in GHC.Core. Ditto for BuiltinRule.
This RuleMatch returns fragments of the target in rm_args and rm_floats,
leaving `rm_rhs` to be the stuff from the RULE itself.
Doing this has routine consequences in GHC.Core.Opt.ConstantFold. Many changes
there but all routine.
* When doing occurrence analysis on RULEs, make the occ-info on the rule
binders relate just to the RHS, not the LHS. See (OUR1) in
Note Note [OccInfo in unfoldings and rules]
This means that Lint must not complain about the fact that the patterns
in the RULE mentions binders that are marked dead.
See Note [Dead occurrences] in GHC.Core.Lint.
I changed the Core pretty-printer so that it didn't suppress dead binders,
else I can't see those binders in RULEs. That led to quite a lot of testsuite wibbles.
* Refactor FloatBinds, so that it is used both by
`exprIsConApp_mabye` and by `lookupRule`
* Move the definition of FloatBinds out of GHc.Core.Make, into GHC.Core.
* Add FloatTick as an extra constructor.
* Refactor `lookupRule` to use `FloatBinds` instead of `BindWrapper`.
This refactor just shares more code.
(Rename GHC.Core.Opt.FloatOut.FloatBinds to FloatLets, to avoid gratuitious
name clash with GHC.Core.FloatBinds.)
Corecion optimisation
* In simpleOpt, when composing coercions, call new function `optTransCo`.
This is much lighter weight than full blown coercion optimisation.
* Make `GHC.Core.Opt.Arity.pushCoValArg` and `pushCoTyArg` return the
coercionLKind of the coercion. This saves recomputing that coercionLKind
at the key call sites in GHC.Core.Opt.Simplify.Iteration.pushCast.
* Rename `addCoerce` in GHC.Core.Simplify.Iteration to become `pushCast`.
* In the `ApplyToVal` case of `pushCast` we had a very unsavoury call to `simplArg`.
I eliminated it by adding a field `sc_cast` to `ApplyToVal` that records any
pending casts. Much nicer now. See Note [The sc_cast field of ApplyToVal].
* Don't optimise coercions if the type-substitution is empty.
See Note [Optimising coercions] in GHC.Core.Opt.Simplify.Iteration.
The fix for #26838 is dramatic. For the test in perf/compiler/T26839 we have
Compiler allocs: Before: 7,363M
After: 688M
Compile time goes down generally. Here are compiler-alloc changes
over 0.5%:
CoOpt_Read(normal) 729,184,920 -0.7%
CoOpt_Singletons(normal) 666,916,960 -4.6% GOOD
LargeRecord(normal) 1,227,056,876 +1.1%
T12227(normal) 256,827,604 -4.6% GOOD
T12425(optasm) 76,879,410 -0.8%
T12545(normal) 787,826,918 -10.8% GOOD
T12707(normal) 775,186,464 -0.9%
T13253(normal) 318,599,596 -0.8%
T14766(normal) 685,857,320 -1.0%
T15304(normal) 1,123,333,422 -2.2%
T15630(normal) 123,142,330 -2.6%
T15630a(normal) 123,092,100 -2.6%
T15703(normal) 299,751,682 -2.9% GOOD
T17516(normal) 964,072,280 +1.0%
T18223(normal) 367,016,820 -6.2% GOOD
T18730(optasm) 130,643,770 -3.3% GOOD
T20261(normal) 535,608,584 -0.7%
T21839c(normal) 340,340,436 -0.9%
T24984(normal) 85,568,392 -1.9%
T3064(normal) 174,631,992 -1.2%
T3294(normal) 1,215,886,432 -0.7%
T5030(normal) 141,449,704 -17.2% GOOD
T5321Fun(normal) 258,484,744 -1.9%
T8095(normal) 770,532,232 -2.7%
T9630(normal) 858,423,408 -14.5% GOOD
T9872c(normal) 1,591,709,448 +0.7%
info_table_map_perf(normal) 19,700,614,458 -1.3%
geo. mean -0.7%
minimum -17.2%
maximum +1.1%
However, strangely there seems to be a 5.0% increase in CoOpt_Read in
the x86_64-linux-fedora43-validate+debug_info+ubsan job, although
there generally a /decrease/ in this test in other builds. The baseline
value looks strange. Anyway I'll just accept it.
Metric Decrease:
CoOpt_Singletons
T12227
T12545
T15703
T18223
T18730
T21839c
T5030
T9630
Metric Increase:
CoOpt_Read
- - - - -
d21e020d by fendor at 2026-05-17T16:30:06-04:00
Fix regression T27202: `:load` and `:add` work in GHCi
To fix the regression there are conceptually two major things that we
fix:
* We don't remove the `importDirs` from `interactive-session`
* When `:add`ing a module, we don't try to find them via PackageImports
* The PackageImport is wrong as we can't know the package-name at
this stage in ghc/UI.hs
What does it mean to not remove the `importDirs` from
`interactive-session`?
It means that, given some initial `DynFlags`, we will use those
`importDirs` in `interactive-session`.
The initial `DynFlags`, however, depend on how you initialise the GHC
session.
For a simple session, initialised by
ghc -isrc -this-unit-id main
It is simple, just use the `DynFlags` given on the cli.
Thus, `main` and `interactive-session` will have the same `DynFlags`,
except for the `homeUnitId` and `interactive-session` depends on `main`
by construction of the GHCi session.
What about a multiple home unit session, though?
ghc -unit @unit1 -unit @unit2
What are the `DynFlags` in this cli invocation? It shouldn't be either
`@unti1` nor `@unit2`, as the order shouldn't matter or any other
implicit condition.
For consistency, we decide that the initial `DynFlags` are the top
`DynFlags` on the cli, ignoring `-unit` flags.
Thus, in this example, there are no `importsDirs` regardless of what we
might find in `@unit1` and `@unit2`.
But in this invocation:
ghc -isrc -unit @unit1 -unit @unit2
The `interactive-session` will have the `importsDirs` `src`.
Note, `-isrc` will be inherited in `@unit1` and `@unit2`, so you need to
explicitly use `-i` to clear the `importsDirs`, in order to avoid
accidentally adding `src` as an import directory to all other home
units.
This fix has been made possible by the improvements introduced in
!15888, which avoids ambiguity when a home unit shares the `importsDirs`
with the `interactive-session`, on top of being much faster for multiple
home units.
Adds regression tests for T27202 for `:load`ing and `:add`ing modules
that are located in import directories.
- - - - -
1488ef59 by fendor at 2026-05-17T16:30:06-04:00
Use home unit package db stacks in GHCi prompt and session unit
In order to import modules from home unit dependencies (e.g., `Data.Map`),
the ghci prompt unit needs to populate its `UnitState`.
This is tricky to handle correctly, which `PackageDBFlag`s should we use
to populate the `UnitState`?
We decide, the most intuitive solution for users is to depend on all
`PackageDBFlag`s, so that any dependency can be imported in GHCi.
This assumes consistency in the `PackageDBFlag`s, so no two home units
specify `PackageDBFlag`s that are inconsistent with each other.
We could simply concat all the `PackageDBFlag`s of the existing home
units, but later `PackageDBFlag`s shadow earlier ones, leading to the
last processed home units' `PackageDBFlag`s to shadow the earlier ones.
This is hard to fix, we need to give users the capability to provide ghc
options for the ghci prompt home unit.
However, as this is considerably more work, we decided on an
approximation that should work out most of the time.
Package Db stacks in cabal and stack follow a certain structure:
-no-user-package-db > -package-db $cabal-store > -package-db $local-db
The first two arguments are always the same, namely the
`-no-user-package-db` and `-package-db`.
We compute the longest common prefix over all home units, and use that
as the start of the package db stack. Then, over the rest of the
`PackageDBFlag`s, we simply take the union and append them to our
initial stack.
We assume, that the rest of package dbs only defines very few, "local"
units that are usually not shadowing each other.
This allows us to get a relatively consistent package database stack for
the ghci prompt home unit.
Similar reasoning applies to the session unit in order to add modules to
the session and have dependencies available in the module.
We do something similar for `-package` flags, to make sure only the
correct units are actually visible in the ghci session.
This time, we simply take the union of all `PackageFlag`s, allowing us
to import modules from the home unit dependencies.
In the future, it would be beneficial to allow the user to provide the
exact ghc options to control the visibilities. For now, this will have
to do.
- - - - -
e7309be4 by Wen Kokke at 2026-05-17T16:30:07-04:00
rts: Add IPE event class for -l
This commit adds a new IPE event class to the -l RTS flag.
Previously, IPE events were enabled unconditionally.
However, the IPE events can easily grow to hundreds or thousands of megabytes.
With the new event class you can pass, e.g., -l-I to disable IPE events.
- - - - -
60769911 by Wen Kokke at 2026-05-17T16:30:07-04:00
ghc-internal: Add TraceFlags.traceIPE
- - - - -
1727357c by Wen Kokke at 2026-05-17T16:30:07-04:00
testsuite: Add test for TraceFlags.traceIpe
- - - - -
1110425b by Wen Kokke at 2026-05-17T16:30:08-04:00
ghc-internal: Add DebugFlags.ipe
- - - - -
66c4ef08 by Wen Kokke at 2026-05-17T16:30:08-04:00
testsuite: Add test for DebugFlags.ipe
- - - - -
60f611c9 by Duncan Coutts at 2026-05-17T16:30:08-04:00
Document removal of the signal-based interval timer
Update mentions within the RTS section of the users guide.
Add a changelog entry.
- - - - -
0d865998 by Duncan Coutts at 2026-05-17T16:30:08-04:00
Fix section for an recent changelog entry
- - - - -
142 changed files:
- + changelog.d/T27202
- changelog.d/dynamic-trace-flags
- + changelog.d/ipe-event-class
- + changelog.d/no-more-timer-signal
- compiler/GHC/Core.hs
- compiler/GHC/Core/Coercion.hs
- compiler/GHC/Core/Coercion/Opt.hs
- compiler/GHC/Core/Lint.hs
- compiler/GHC/Core/Make.hs
- compiler/GHC/Core/Opt/Arity.hs
- compiler/GHC/Core/Opt/ConstantFold.hs
- compiler/GHC/Core/Opt/FloatIn.hs
- compiler/GHC/Core/Opt/FloatOut.hs
- compiler/GHC/Core/Opt/OccurAnal.hs
- compiler/GHC/Core/Opt/Simplify/Env.hs
- compiler/GHC/Core/Opt/Simplify/Iteration.hs
- compiler/GHC/Core/Opt/Simplify/Utils.hs
- compiler/GHC/Core/Opt/SpecConstr.hs
- compiler/GHC/Core/Opt/Specialise.hs
- compiler/GHC/Core/Ppr.hs
- compiler/GHC/Core/Rules.hs
- compiler/GHC/Core/SimpleOpt.hs
- compiler/GHC/Core/TyCo/Subst.hs
- compiler/GHC/CoreToStg/Prep.hs
- compiler/GHC/Data/List/SetOps.hs
- compiler/GHC/Driver/Config/Core/Lint.hs
- compiler/GHC/Driver/DynFlags.hs
- compiler/GHC/HsToCore/Pmc/Solver.hs
- compiler/GHC/IfaceToCore.hs
- compiler/GHC/Tc/Types/Evidence.hs
- compiler/GHC/Types/Id/Make.hs
- compiler/GHC/Unit/State.hs
- docs/users_guide/profiling.rst
- docs/users_guide/runtime_control.rst
- ghc/GHCi/UI.hs
- ghc/Main.hs
- libraries/ghc-internal/src/GHC/Internal/RTS/Flags.hsc
- rts/IPE.c
- rts/RtsFlags.c
- rts/Trace.c
- rts/Trace.h
- rts/include/rts/EventLogWriter.h
- rts/include/rts/Flags.h
- testsuite/tests/codeGen/should_compile/T25177.stderr
- testsuite/tests/deSugar/should_compile/T13208.stdout
- testsuite/tests/driver/fat-iface/fat014.stdout
- + testsuite/tests/ghci/prog-mhu006/Makefile
- + testsuite/tests/ghci/prog-mhu006/a/A.hs
- + testsuite/tests/ghci/prog-mhu006/all.T
- + testsuite/tests/ghci/prog-mhu006/b/B.hs
- + testsuite/tests/ghci/prog-mhu006/prog-mhu006a.script
- + testsuite/tests/ghci/prog-mhu006/prog-mhu006a.stdout
- + testsuite/tests/ghci/prog-mhu006/unitA
- + testsuite/tests/ghci/prog-mhu006/unitB
- testsuite/tests/ghci/prog018/prog018.stdout
- testsuite/tests/ghci/prog020/Makefile
- testsuite/tests/ghci/prog020/all.T
- testsuite/tests/ghci/prog020/ghci.prog020.script → testsuite/tests/ghci/prog020/ghci.prog020a.script
- testsuite/tests/ghci/prog020/ghci.prog020.stderr → testsuite/tests/ghci/prog020/ghci.prog020a.stderr
- testsuite/tests/ghci/prog020/ghci.prog020.stdout → testsuite/tests/ghci/prog020/ghci.prog020a.stdout
- + testsuite/tests/ghci/prog020/ghci.prog020b.script
- + testsuite/tests/ghci/prog020/ghci.prog020b.stderr
- + testsuite/tests/ghci/prog020/ghci.prog020b.stdout
- + testsuite/tests/ghci/prog023/Makefile
- + testsuite/tests/ghci/prog023/all.T
- + testsuite/tests/ghci/prog023/prog023a.script
- + testsuite/tests/ghci/prog023/prog023a.stdout
- + testsuite/tests/ghci/prog023/prog023b.script
- + testsuite/tests/ghci/prog023/prog023b.stdout
- + testsuite/tests/ghci/prog023/src/A.hs
- + testsuite/tests/ghci/prog024/Makefile
- + testsuite/tests/ghci/prog024/all.T
- + testsuite/tests/ghci/prog024/prog024a.script
- + testsuite/tests/ghci/prog024/prog024a.stdout
- + testsuite/tests/ghci/prog024/prog024b.script
- + testsuite/tests/ghci/prog024/prog024b.stdout
- + testsuite/tests/ghci/prog024/prog024c.script
- + testsuite/tests/ghci/prog024/prog024c.stderr
- + testsuite/tests/ghci/prog024/prog024c.stdout
- + testsuite/tests/ghci/prog024/prog024d.script
- + testsuite/tests/ghci/prog024/prog024d.stderr
- + testsuite/tests/ghci/prog024/prog024d.stdout
- + testsuite/tests/ghci/prog024/prog024e.script
- + testsuite/tests/ghci/prog024/prog024e.stdout
- + testsuite/tests/ghci/prog024/prog024f.script
- + testsuite/tests/ghci/prog024/prog024f.stdout
- + testsuite/tests/ghci/prog024/src/A.hs
- + testsuite/tests/ghci/prog024/src/B.hs
- + testsuite/tests/ghci/prog025/Makefile
- + testsuite/tests/ghci/prog025/a/A.hs
- + testsuite/tests/ghci/prog025/all.T
- + testsuite/tests/ghci/prog025/prog025a.script
- + testsuite/tests/ghci/prog025/prog025a.stdout
- + testsuite/tests/ghci/prog025/prog025b.script
- + testsuite/tests/ghci/prog025/prog025b.stdout
- + testsuite/tests/ghci/prog025/testpkg/Test.hs
- + testsuite/tests/ghci/prog025/testpkg/testpkg-0.1.0.0.pkg
- + testsuite/tests/ghci/prog025/testpkg/testpkg-0.2.0.0.pkg
- + testsuite/tests/ghci/prog025/unitA
- testsuite/tests/ghci/scripts/T13997.stdout
- testsuite/tests/ghci/scripts/T1914.stdout
- testsuite/tests/ghci/scripts/T20217.stdout
- testsuite/tests/ghci/scripts/T8042.stdout
- testsuite/tests/ghci/scripts/T8042recomp.stdout
- testsuite/tests/ghci/should_run/T10920.stderr
- testsuite/tests/interface-stability/ghc-experimental-exports.stdout
- testsuite/tests/interface-stability/ghc-experimental-exports.stdout-mingw32
- testsuite/tests/linters/notes.stdout
- testsuite/tests/numeric/should_compile/T15547.stderr
- testsuite/tests/numeric/should_compile/T20347.stderr
- testsuite/tests/numeric/should_compile/T20374.stderr
- testsuite/tests/numeric/should_compile/T20376.stderr
- + testsuite/tests/perf/compiler/T26989.hs
- + testsuite/tests/perf/compiler/T26989a.hs
- testsuite/tests/perf/compiler/all.T
- testsuite/tests/printer/T18052a.stderr
- + testsuite/tests/rts/T25275/DebugIpe.hs
- + testsuite/tests/rts/T25275/T25275_A.stdout
- + testsuite/tests/rts/T25275/T25275_B.stdout
- + testsuite/tests/rts/T25275/T25275_C.stdout
- + testsuite/tests/rts/T25275/T25275_D.stdout
- + testsuite/tests/rts/T25275/TraceIpe.hs
- + testsuite/tests/rts/T25275/all.T
- testsuite/tests/simplCore/should_compile/DsSpecPragmas.stderr
- testsuite/tests/simplCore/should_compile/RewriteHigherOrderPatterns.stderr
- testsuite/tests/simplCore/should_compile/T15205.stderr
- testsuite/tests/simplCore/should_compile/T18668.stderr
- testsuite/tests/simplCore/should_compile/T19246.stderr
- testsuite/tests/simplCore/should_compile/T19599.stderr
- testsuite/tests/simplCore/should_compile/T19599a.stderr
- testsuite/tests/simplCore/should_compile/T21917.stderr
- testsuite/tests/simplCore/should_compile/T23074.stderr
- testsuite/tests/simplCore/should_compile/T24359a.stderr
- testsuite/tests/simplCore/should_compile/T25160.stderr
- testsuite/tests/simplCore/should_compile/T25718c.stderr-ws-32
- testsuite/tests/simplCore/should_compile/T25718c.stderr-ws-64
- testsuite/tests/simplCore/should_compile/T26051.stderr
- testsuite/tests/simplCore/should_compile/T26116.stderr
- testsuite/tests/simplCore/should_compile/T8331.stderr
- testsuite/tests/simplCore/should_compile/T8848a.stderr
- testsuite/tests/simplCore/should_compile/spec004.stderr
- testsuite/tests/typecheck/should_compile/T13032.stderr
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/65dccb9f7ee2c79cec3b4020694b6e…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/65dccb9f7ee2c79cec3b4020694b6e…
You're receiving this email because of your account on gitlab.haskell.org.
1
0