[Git][ghc/ghc][wip/spj-reinstallable-base2] Knot-tying nonsense [skip ci]
by Simon Peyton Jones (@simonpj) 17 Apr '26
by Simon Peyton Jones (@simonpj) 17 Apr '26
17 Apr '26
Simon Peyton Jones pushed to branch wip/spj-reinstallable-base2 at Glasgow Haskell Compiler / GHC
Commits:
eae15e45 by Simon Peyton Jones at 2026-04-17T12:55:28+01:00
Knot-tying nonsense [skip ci]
I ended up extending KKKNS_InScope
- - - - -
13 changed files:
- compiler/GHC/Driver/Env.hs
- compiler/GHC/Driver/Env/Types.hs
- compiler/GHC/Driver/Pipeline/Execute.hs
- compiler/GHC/HsToCore/Monad.hs
- compiler/GHC/HsToCore/Types.hs
- compiler/GHC/Iface/Load.hs
- compiler/GHC/Rename/Env.hs
- compiler/GHC/Tc/Instance/Typeable.hs
- compiler/GHC/Tc/Module.hs
- compiler/GHC/Tc/Types.hs
- compiler/GHC/Tc/Utils/Backpack.hs
- compiler/GHC/Tc/Utils/Env.hs
- compiler/GHC/Tc/Utils/Monad.hs
Changes:
=====================================
compiler/GHC/Driver/Env.hs
=====================================
@@ -178,16 +178,16 @@ configured via command-line flags (in `GHC.setTopSessionDynFlags`).
-- Note [hsc_type_env_var hack]
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--- hsc_type_env_var is used to initialize tcg_type_env_var, and
+-- hsc_type_env_var is used to initialize tcg_knot_vars, and
-- eventually it is the mutable variable that is queried from
-- if_rec_types to get a TypeEnv. So, clearly, it's something
-- related to knot-tying (see Note [Tying the knot]).
-- hsc_type_env_var is used in two places: initTcRn (where
--- it initializes tcg_type_env_var) and initIfaceCheck
+-- it initializes tcg_knot_vars) and initIfaceCheck
-- (where it initializes if_rec_types).
--
-- But why do we need a way to feed a mutable variable in? Why
--- can't we just initialize tcg_type_env_var when we start
+-- can't we just initialize tcg_knot_vars when we start
-- typechecking? The problem is we need to knot-tie the
-- EPS, and we may start adding things to the EPS before type
-- checking starts.
=====================================
compiler/GHC/Driver/Env/Types.hs
=====================================
@@ -83,8 +83,8 @@ data HscEnv
hsc_type_env_vars :: KnotVars (IORef TypeEnv)
-- ^ Used for one-shot compilation only, to initialise
- -- the 'IfGblEnv'. See 'GHC.Tc.Utils.tcg_type_env_var' for
- -- 'GHC.Tc.Utils.TcGblEnv'. See also Note [hsc_type_env_var hack]
+ -- the 'IfGblEnv'. See 'tcg_knot_vars' in 'GHC.Tc.Utils.TcGblEnv'.
+ -- See also Note [hsc_type_env_var hack]
, hsc_interp :: Maybe Interp
-- ^ target code interpreter (if any) to use for TH and GHCi.
=====================================
compiler/GHC/Driver/Pipeline/Execute.hs
=====================================
@@ -731,7 +731,7 @@ runHscPhase pipe_env hsc_env0 input_fn src_flavour = do
mg <- downsweepThunk hsc_env mod_summary
-- Need to set the knot-tying mutable variable for interface
- -- files. See GHC.Tc.Utils.TcGblEnv.tcg_type_env_var.
+ -- files. See GHC.Tc.Utils.TcGblEnv.tcg_knot_vars
-- See also Note [hsc_type_env_var hack]
type_env_var <- newIORef emptyNameEnv
let hsc_env' =
=====================================
compiler/GHC/HsToCore/Monad.hs
=====================================
@@ -578,8 +578,10 @@ dsGetKnownKeySource :: DsM KnownKeyNameSource
dsGetKnownKeySource
= do { rebindable_path <- goptM Opt_RebindableKnownKeyNames
; if rebindable_path
- then do { rdr_env <- dsGetGlobalRdrEnv
- ; return (KKNS_InScope rdr_env) }
+ then do { env <- getGblEnv
+ ; return (KKNS_InScope (ds_mod env)
+ (ds_gbl_rdr_env env)
+ (ds_type_env env)) }
else return KKNS_FromModule }
--------------------------------------
=====================================
compiler/GHC/HsToCore/Types.hs
=====================================
@@ -59,12 +59,14 @@ presumably include source-file location information:
data DsGblEnv
= DsGblEnv
{ ds_mod :: Module -- For SCC profiling
- , ds_fam_inst_env :: FamInstEnv -- Like tcg_fam_inst_env
, ds_gbl_rdr_env :: GlobalRdrEnv
-- The GlobalRdrEnv is needed for the following reasons:
-- - to know what newtype constructors are in scope
-- - to check whether all members of a COMPLETE pragma are in scope
-- - when looking up know-key names
+ , ds_fam_inst_env :: FamInstEnv -- Like tcg_fam_inst_env
+ , ds_type_env :: TypeEnv -- Like tcg_type_enb
+
, ds_name_ppr_ctx :: NamePprCtx
, ds_msgs :: IORef (Messages DsMessage) -- Diagnostic messages
, ds_if_env :: (IfGblEnv, IfLclEnv) -- Used for looking up global,
=====================================
compiler/GHC/Iface/Load.hs
=====================================
@@ -155,7 +155,7 @@ import qualified GHC.Unit.Home.Graph as HUG
********************************************************************* -}
data KnownKeyNameSource
- = KKNS_InScope GlobalRdrEnv
+ = KKNS_InScope Module GlobalRdrEnv TypeEnv
-- Look up the known-key name in this GlobalRdrEnv, which
-- is the top-level scope of the current module.
-- This happens when -frebindable-known-key-name is set, usually when
@@ -167,17 +167,17 @@ data KnownKeyNameSource
-- is /not/ set
instance Outputable KnownKeyNameSource where
- ppr KKNS_FromModule = text "FromModule"
- ppr (KKNS_InScope env) = text "InScope" <> braces (ppr env)
+ ppr KKNS_FromModule = text "FromModule"
+ ppr (KKNS_InScope mod rdr_env type_env) = text "InScope" <> braces (ppr rdr_env)
lookupKnownKeyThing :: HasDebugCallStack
=> KnownKey -> KnownKeyNameSource
-> IfM lcl (MaybeErr IfaceMessage TyThing)
-lookupKnownKeyThing key mb_gbl_rdr_env
- = do { mb_name <- lookupKnownKeyName key mb_gbl_rdr_env
+lookupKnownKeyThing key kk_ns
+ = do { mb_name <- lookupKnownKeyName key kk_ns
; case mb_name of
Failed err -> return (Failed err)
- Succeeded name -> lookupGlobalName name }
+ Succeeded name -> lookupKnownName kk_ns name }
lookupKnownKeyName :: HasDebugCallStack
=> KnownKey -> KnownKeyNameSource
@@ -199,7 +199,7 @@ lookupKnownKeyName key KKNS_FromModule
| otherwise
-> return (Failed (MissingKnownKey1 key)) }
-lookupKnownKeyName key (KKNS_InScope gbl_rdr_env)
+lookupKnownKeyName key (KKNS_InScope _ gbl_rdr_env _)
-- Just gbl_rdr_env: we have -frebindable-known-key-names on, and
-- here is the top-level GlobalRdrEnv
-- Look up the /un-qualified/ known-key OccName in the GlobalRdrEnv
@@ -238,11 +238,11 @@ lookupKnownGRE rdr_env occ
lookupKnownOccThing :: HasDebugCallStack
=> KnownOcc -> KnownKeyNameSource
-> IfM lcl (MaybeErr IfaceMessage TyThing)
-lookupKnownOccThing occ mb_gbl_rdr_env
- = do { mb_name <- lookupKnownOccName occ mb_gbl_rdr_env
+lookupKnownOccThing occ kk_ns
+ = do { mb_name <- lookupKnownOccName occ kk_ns
; case mb_name of
Failed err -> return (Failed err)
- Succeeded name -> lookupGlobalName name }
+ Succeeded name -> lookupKnownName kk_ns name }
lookupKnownOccName :: HasDebugCallStack
=> KnownOcc -> KnownKeyNameSource
@@ -253,7 +253,7 @@ lookupKnownOccName occ KKNS_FromModule
Just name -> return (Succeeded name)
Nothing -> return (Failed (MissingKnownKey3 occ)) }
-lookupKnownOccName occ (KKNS_InScope gbl_rdr_env)
+lookupKnownOccName occ (KKNS_InScope _ gbl_rdr_env _)
-- Just gbl_rdr_env: we have -frebindable-known-key-names on, and
-- here is the top-level GlobalRdrEnv
-- Look up the /un-qualified/ known-key OccName in the GlobalRdrEnv
@@ -265,6 +265,24 @@ lookupKnownOccName occ (KKNS_InScope gbl_rdr_env)
; return (Succeeded name) }
Failed err -> return (Failed err)
+lookupKnownName :: HasDebugCallStack
+ => KnownKeyNameSource -> Name
+ -> IfM lcl (MaybeErr IfaceMessage TyThing)
+-- Go from a known Name to its TyThing
+-- If we are in KKNS_InScope, look up in the current module's type environment
+-- in case it is defined right here in this module rather than imported
+lookupKnownName kk_ns name
+ = case kk_ns of
+ KKNS_InScope this_mod _ type_env
+ | name_mod == this_mod
+ -> case lookupTypeEnv type_env name of
+ Just thing -> return (Succeeded thing)
+ Nothing -> return (Failed ...)
+
+ _ -> loadGlobalName name name_mod
+ where
+ name_mod = nameModule name
+
loadKnownKeyOccMaps :: IfM lcl KnownKeyNameMaps
loadKnownKeyOccMaps
= do { eps <- getEps
@@ -331,16 +349,12 @@ checkKnownKeyNamesIface known_key_names_occ_map
* *
********************************************************************* -}
-lookupGlobalName :: HasDebugCallStack
- => Name -> IfM lcl (MaybeErr IfaceMessage TyThing)
--- Only works for External Names that have a Module
-lookupGlobalName name = loadGlobalName name (nameModule name)
-
loadGlobalName :: forall lcl.
HasDebugCallStack
=> Name
-> Module -- Use this for non-External Names (maybe Backpack-related?)
-> IfM lcl (MaybeErr IfaceMessage TyThing)
+-- Only works for External Names that have a Module
loadGlobalName name mod
= do { env <- getGblEnv
; case lookupKnotVars (if_rec_types env) mod of
@@ -357,7 +371,7 @@ loadGlobalName name mod
; via_external }
}
- _ -> do { traceIf (text "loadGlobalName4" <+> ppr name)
+ _ -> do { traceIf (text "loadGlobalName4" <+> ppr name $$ ppr (if_rec_types env) $$ text "stack" <+> callStackDoc)
; via_external } }
where
via_external = do { hsc_env <- getTopEnv
=====================================
compiler/GHC/Rename/Env.hs
=====================================
@@ -1049,7 +1049,7 @@ lookup_known_occ KKNS_FromModule occ
Just name -> return (Succeeded name)
Nothing -> return (Failed (MissingKnownKey3 occ)) }
-lookup_known_occ (KKNS_InScope gbl_rdr_env) occ
+lookup_known_occ (KKNS_InScope _ gbl_rdr_env _) occ
= case lookupKnownGRE gbl_rdr_env occ of
Succeeded gre -> do { addUsedGRE NoDeprecationWarnings gre
; let name = greName gre
=====================================
compiler/GHC/Tc/Instance/Typeable.hs
=====================================
@@ -51,6 +51,7 @@ import GHC.Driver.DynFlags
import GHC.Utils.Fingerprint(Fingerprint(..), fingerprintString, fingerprintFingerprints)
import GHC.Utils.Outputable
import GHC.Utils.Panic
+import GHC.Utils.Misc
import GHC.Data.FastString ( FastString, mkFastString, fsLit )
import Control.Monad.Trans.State.Strict
@@ -316,7 +317,7 @@ We use it in:
-- 'tcRnSrcDecls'.
--
-- See Note [Grand plan for Typeable] in "GHC.Tc.Instance.Typeable".
-mkTypeableBinds :: TcM TcGblEnv
+mkTypeableBinds :: HasDebugCallStack => TcM TcGblEnv
mkTypeableBinds
= do { dflags <- getDynFlags
; tcg_env <- getGblEnv
@@ -324,6 +325,8 @@ mkTypeableBinds
tycons_that_need = filter tc_needs_typeable (tcg_tcs tcg_env)
-- These tycons will need some typeable bindings
+ ; traceTc "mkTypableBinds" (ppr this_mod $$ ppr tycons_that_need $$ callStackDoc)
+
-- Stop now if we don't need any typable bindings
-- See (GPT8) in Note [Grand plan for Typeable]
; if no_typeable_binds_needed dflags this_mod tycons_that_need
=====================================
compiler/GHC/Tc/Module.hs
=====================================
@@ -332,13 +332,17 @@ tcRnModuleTcRnM hsc_env mod_sum
; whenM (goptM Opt_DoCoreLinting) $
lintGblEnv (hsc_logger hsc_env) (hsc_dflags hsc_env) tcg_env
+ -- Sync the knot-tied type environment before checking
+ -- the M.hi-boot interface, if any
+ ; syncTypeEnvKnotVars tcg_env
+
; setGblEnv tcg_env
$ do { -- Compare hi-boot iface (if any) with the real thing
-- Must be done after processing the exports
tcg_env <- checkHiBootIface tcg_env boot_info
; -- The new type env is already available to stuff
- -- slurped from interface files, via
- -- GHC.Tc.Utils.Env.setGlobalTypeEnv. It's important that this
+ -- slurped from interface files, via syncTypeEnvKnotVars,
+ -- itself called by tcRnSrcDecls. It's important that this
-- includes the stuff in checkHiBootIface,
-- because the latter might add new bindings for
-- boot_dfuns, which may be mentioned in imported
@@ -553,6 +557,7 @@ tcRnSrcDecls :: Bool -- False => no 'module M(..) where' header at all
tcRnSrcDecls explicit_mod_hdr export_ies decls
= do { -- Do all the declarations
; (tcg_env, tcl_env, lie) <- tc_rn_src_decls decls
+ ; traceTc "tcRnSrcDecls" (ppr (tcg_type_env tcg_env))
------ Simplify constraints ---------
--
@@ -570,7 +575,13 @@ tcRnSrcDecls explicit_mod_hdr export_ies decls
; ev_binds <- simplifyTop (lie `andWC` lie_main)
; return (tcg_env `addEvBinds` ev_binds) }
+ -- Update the knot-tied type environment to include everything
+ -- bound in this module. Do this now because when compiling GHC.Internal.Types,
+ -- mkTypeableBinds needs to "see" the definition of `Module`
+ ; syncTypeEnvKnotVars tcg_env
+
-- Emit Typeable bindings
+ ; traceTc "Before mkTypeableBinds" (ppr (tcg_type_env tcg_env))
; tcg_env <- setGblEnv tcg_env $
mkTypeableBinds
@@ -643,15 +654,15 @@ tcRnSrcDecls explicit_mod_hdr export_ies decls
-- to the previous tcg_env
; tcg_env' = tcg_env
- { tcg_binds = binds' ++ binds_mf
+ { tcg_type_env = final_type_env
+ , tcg_binds = binds' ++ binds_mf
, tcg_ev_binds = ev_binds' `unionBags` ev_binds_mf
, tcg_imp_specs = imp_specs' ++ imp_specs_mf
, tcg_rules = rules' ++ rules_mf
, tcg_fords = fords' ++ fords_mf
, tcg_patsyns = pat_syns' ++ patsyns_mf } } ;
- ; setGlobalTypeEnv tcg_env' final_type_env
- }
+ ; return tcg_env' }
zonkTcGblEnv :: TcGblEnv
-> TcM (TypeEnv, Bag EvBind, LHsBinds GhcTc,
@@ -710,6 +721,7 @@ tc_rn_src_decls ds
; (tcg_env, rn_decls) <- rnTopSrcDecls first_group
-- rnTopSrcDecls fails if there are any errors
+ ; traceRn "tc_rn_src_decls 77" empty
-- Get TH-generated top-level declarations and make sure they don't
-- contain any splices since we don't handle that at the moment
--
@@ -730,8 +742,8 @@ tc_rn_src_decls ds
AddTopDeclsUnexpectedDeclarationSplice
}
-- Rename TH-generated top-level declarations
- ; (tcg_env, th_rn_decls) <- setGblEnv tcg_env
- $ rnTopSrcDecls th_group
+ ; (tcg_env, th_rn_decls) <- setGblEnv tcg_env
+ $ rnTopSrcDecls th_group
-- Dump generated top-level declarations
; let msg = "top-level declarations added with 'addTopDecls'"
@@ -747,6 +759,7 @@ tc_rn_src_decls ds
-- NB: set the env **before** captureTopConstraints so that error messages
-- get reported w.r.t. the right GlobalRdrEnv. It is for this reason that
-- the captureTopConstraints must go here, not in tcRnSrcDecls.
+ ; traceRn "about to typechecke decls" (ppr rn_decls)
; ((tcg_env, tcl_env), lie1) <- setGblEnv tcg_env $
captureTopConstraints $
tcTopSrcDecls rn_decls
@@ -834,10 +847,11 @@ tcRnHsBootDecls boot_or_sig decls
; let { type_env0 = tcg_type_env gbl_env
; type_env1 = extendTypeEnvWithIds type_env0 val_ids
; type_env2 = extendTypeEnvWithIds type_env1 dfun_ids
- ; dfun_ids = map iDFunId inst_infos
+ ; dfun_ids = map iDFunId inst_infos
+ ; gbl_env' = gbl_env { tcg_type_env = type_env2 }
}
- ; setGlobalTypeEnv gbl_env type_env2
+ ; return gbl_env'
}}}
; traceTc "boot" (ppr lie); return gbl_env }
@@ -875,20 +889,14 @@ checkHiBootIface tcg_env boot_info
--
-- to (a) the type envt, and (b) the top-level bindings
; let boot_impedance_bds = map fst imp_prs
- type_env' = extendTypeEnvWithIds local_type_env boot_impedance_bds
+ !type_env' = extendTypeEnvWithIds local_type_env boot_impedance_bds
impedance_binds = [ mkVarBind boot_id (nlHsVar id)
| (boot_id, id) <- imp_prs ]
tcg_env_w_binds
- = tcg_env { tcg_binds = binds ++ impedance_binds }
+ = tcg_env { tcg_type_env = type_env'
+ , tcg_binds = binds ++ impedance_binds }
- ; type_env' `seq`
- -- Why the seq? Without, we will put a TypeEnv thunk in
- -- tcg_type_env_var. That thunk will eventually get
- -- forced if we are typechecking interfaces, but that
- -- is no good if we are trying to typecheck the very
- -- DFun we were going to put in.
- -- TODO: Maybe setGlobalTypeEnv should be strict.
- setGlobalTypeEnv tcg_env_w_binds type_env' }
+ ; return tcg_env_w_binds }
{- Note [DFun impedance matching]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -978,7 +986,7 @@ This most works well, but there is one problem: DFuns! We do not want
to look at the mb_insts of the ModDetails in SelfBootInfo, because a
dfun in one of those ClsInsts is gotten (in GHC.IfaceToCore.tcIfaceInst) by a
(lazily evaluated) lookup in the if_rec_types. We could extend the
-type env, do a setGloblaTypeEnv etc; but that all seems very indirect.
+type env, do a syncTypeEnvKnotVars etc; but that all seems very indirect.
It is much more directly simply to extract the DFunIds from the
md_types of the SelfBootInfo.
=====================================
compiler/GHC/Tc/Types.hs
=====================================
@@ -487,7 +487,7 @@ data TcGblEnv
-- NB: for what "things in this module" means, see
-- Note [The interactive package] in "GHC.Runtime.Context"
- tcg_type_env_var :: KnotVars (IORef TypeEnv),
+ tcg_knot_vars :: KnotVars (IORef TypeEnv),
-- Used only to initialise the interface-file
-- typechecker in initIfaceTcRn, so that it can see stuff
-- bound in this module when dealing with hi-boot recursions
=====================================
compiler/GHC/Tc/Utils/Backpack.hs
=====================================
@@ -739,7 +739,7 @@ mergeSignatures
, rdr_elt <- lookupGRE rdr_env (LookupOccName occ AllRelevantGREs) ]
-- STEP 5: Typecheck the interfaces
- let type_env_var = tcg_type_env_var tcg_env
+ let knot_type_env = tcg_knot_vars tcg_env
-- typecheckIfacesForMerging does two things:
-- 1. It merges the all of the ifaces together, and typechecks the
@@ -748,7 +748,7 @@ mergeSignatures
-- resolving to the merged type_env from (1).
-- See typecheckIfacesForMerging for more details.
(type_env, detailss) <- initIfaceTcRn $
- typecheckIfacesForMerging inner_mod ifaces type_env_var
+ typecheckIfacesForMerging inner_mod ifaces knot_type_env
let infos = zip ifaces detailss
-- Test for cycles
@@ -764,7 +764,7 @@ mergeSignatures
-- NB: Why do we set tcg_tcs/tcg_patsyns/tcg_type_env directly,
-- rather than use tcExtendGlobalEnv (the normal method to add newly
-- defined types to TcGblEnv?) tcExtendGlobalEnv adds these
- -- TyThings to 'tcg_type_env_var', which is consulted when
+ -- TyThings to 'tcg_knot_vars', which is consulted when
-- we read in interfaces to tie the knot. But *these TyThings themselves
-- come from interface*, so that would result in deadlock. Don't
-- update it!
=====================================
compiler/GHC/Tc/Utils/Env.hs
=====================================
@@ -16,7 +16,7 @@ module GHC.Tc.Utils.Env(
-- Global environment
tcExtendGlobalEnv, tcExtendTyConEnv,
- tcExtendGlobalEnvImplicit, setGlobalTypeEnv,
+ tcExtendGlobalEnvImplicit, syncTypeEnvKnotVars,
tcExtendGlobalValEnv, tcTyThBinders,
tcLookupLocatedGlobal, tcLookupGlobal, tcLookupGlobalOnly,
tcLookupTyCon, tcLookupClass,
@@ -515,8 +515,10 @@ getKnownKeySource :: TcRn KnownKeyNameSource
getKnownKeySource
= do { rebindable_path <- goptM Opt_RebindableKnownKeyNames
; if rebindable_path
- then do { rdr_env <- getGlobalRdrEnv
- ; return (KKNS_InScope rdr_env) }
+ then do { env <- getGlobalEnv
+ ; return (KKNS_InScope (tcg_mod env)
+ (tcg_rdr_env env)
+ (tcg_type_env env)) }
else return KKNS_FromModule }
tcrn_wrapper :: HasDebugCallStack
@@ -606,16 +608,21 @@ get_id do_the_lookup
************************************************************************
-}
-setGlobalTypeEnv :: TcGblEnv -> TypeEnv -> TcM TcGblEnv
--- Use this to update the global type env
--- It updates both * the normal tcg_type_env field
--- * the tcg_type_env_var field seen by interface files
-setGlobalTypeEnv tcg_env new_type_env
- = do { -- Sync the type-envt variable seen by interface files
- ; case lookupKnotVars (tcg_type_env_var tcg_env) (tcg_mod tcg_env) of
- Just tcg_env_var -> writeMutVar tcg_env_var new_type_env
- Nothing -> return ()
- ; return (tcg_env { tcg_type_env = new_type_env }) }
+syncTypeEnvKnotVars :: TcGblEnv -> TcM ()
+-- Use this to sync the tcg_knot_vars with the current type env
+-- so that interface-file and known-key/occ lookups will find the
+-- current bindings
+--
+-- Why the "!" before writing it into the variable? Without, we will put
+-- a TypeEnv thunk into the knot-tied variable. That thunk will eventually get
+-- forced if we are typechecking interfaces, but that is no good if we are
+-- trying to typecheck the very DFun we were going to put in.
+syncTypeEnvKnotVars tcg_env
+ = case lookupKnotVars (tcg_knot_vars tcg_env) (tcg_mod tcg_env) of
+ Just tcg_env_var -> do { let !type_env = tcg_type_env tcg_env
+ -- Why the "!"? See comment on the function
+ ; writeMutVar tcg_env_var type_env }
+ Nothing -> return ()
tcExtendGlobalEnvImplicit :: [TyThing] -> TcM r -> TcM r
@@ -623,8 +630,9 @@ tcExtendGlobalEnvImplicit :: [TyThing] -> TcM r -> TcM r
-- Do not extend tcg_tcs, tcg_patsyns etc
tcExtendGlobalEnvImplicit things thing_inside
= do { tcg_env <- getGblEnv
- ; let ge' = extendTypeEnvList (tcg_type_env tcg_env) things
- ; tcg_env' <- setGlobalTypeEnv tcg_env ge'
+ ; let !type_env' = extendTypeEnvList (tcg_type_env tcg_env) things
+ tcg_env' = tcg_env { tcg_type_env = type_env' }
+ ; syncTypeEnvKnotVars tcg_env'
; setGblEnv tcg_env' thing_inside }
tcExtendGlobalEnv :: [TyThing] -> TcM r -> TcM r
@@ -677,8 +685,8 @@ tcExtendRecEnv gbl_stuff thing_inside
= do { tcg_env <- getGblEnv
; let ge' = extendNameEnvList (tcg_type_env tcg_env) gbl_stuff
tcg_env' = tcg_env { tcg_type_env = ge' }
- -- No need for setGlobalTypeEnv (which side-effects the
- -- tcg_type_env_var); tcExtendRecEnv is used just
+ -- No need for syncTypeEnvKnotVars (which side-effects the
+ -- tcg_knot_vars); tcExtendRecEnv is used just
-- when kind-check a group of type/class decls. It would
-- in any case be wrong for an interface-file decl to end up
-- with a TcTyCon in it!
=====================================
compiler/GHC/Tc/Utils/Monad.hs
=====================================
@@ -353,7 +353,7 @@ initTcGblEnv hsc_env hsc_src keep_rn_syntax mod loc =
, tcg_default = emptyDefaultEnv
, tcg_default_exports = emptyDefaultEnv
, tcg_type_env = emptyNameEnv
- , tcg_type_env_var = hsc_type_env_vars hsc_env
+ , tcg_knot_vars = hsc_type_env_vars hsc_env
, tcg_inst_env = emptyInstEnv
, tcg_fam_inst_env = emptyFamInstEnv
, tcg_ann_env = emptyAnnEnv
@@ -2404,7 +2404,7 @@ initIfaceTcRn thing_inside
; hsc_env <- getTopEnv
-- bangs to avoid leaking the envs (#19356)
; let !mhome_unit = hsc_home_unit_maybe hsc_env
- !knot_vars = tcg_type_env_var tcg_env
+ !knot_vars = tcg_knot_vars tcg_env
-- When we are instantiating a signature,
-- we DEFINITELY do not want to knot tie.
is_instantiate = fromMaybe False (isHomeUnitInstantiating <$> mhome_unit)
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/eae15e45a0251b349fa32e359ef6f67…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/eae15e45a0251b349fa32e359ef6f67…
You're receiving this email because of your account on gitlab.haskell.org.
1
0
[Git][ghc/ghc][wip/27162/hadrian-linkhs-response-file] 7 commits: Simplify mkTick
by David Eichmann (@DavidEichmann) 17 Apr '26
by David Eichmann (@DavidEichmann) 17 Apr '26
17 Apr '26
David Eichmann pushed to branch wip/27162/hadrian-linkhs-response-file at Glasgow Haskell Compiler / GHC
Commits:
2dadf3b0 by sheaf at 2026-04-16T13:28:39-04:00
Simplify mkTick
This commit simplifies 'GHC.Core.Utils.mkTick', removing the
accumulating parameter 'rest' which was suspiciously treating a bunch of
different ticks as a group, and moving the group as a whole around the
AST, ignoring that the ticks in the group might have different placement
properties.
The most important change is that we revert the logic (added in 85b0aae2)
that allowed ticks to be placed around coercions, which caused serious
issues (e.g. #27121). It was just a mistake, as it doesn't make sense
to put a tick around a coercion.
Also adds Note [Pushing SCCs inwards] which clarifies the logic for
pushing SCCs into lambdas, constructor applications, and dropping SCCs
around non-function variables (in particular the treatment of splittable
ticks).
A few other changes are also implemented:
- simplify 'can_split' predicate (no functional change)
- combine profiling ticks into one when possible
Fixes #26878, #26941 and #27121
Co-authored-by: simonpj <simon.peytonjones(a)gmail.com>
- - - - -
a0d6f1f4 by Simon Jakobi at 2026-04-16T13:29:28-04:00
Add regression test for #9074
Closes #9074.
- - - - -
d178ee89 by Sylvain Henry at 2026-04-16T13:30:25-04:00
Add changelog for #15973
- - - - -
e8a196c6 by sheaf at 2026-04-16T13:31:19-04:00
Deal with 'noSpec' in 'coreExprToPmLit'
This commit makes two separate changes relating to
'GHC.HsToCore.Pmc.Solver.Types.coreExprAsPmLit':
1. Commit 7124e4ad mistakenly marked deferred errors as non-canonical,
which led to the introduction of 'nospec' wrappers in the
generated Core. This reverts that accident by declaring deferred
errors as being canonical, avoiding spurious 'nospec' wrapping.
2. Look through magic identity-like Ids such as 'nospec', 'inline' and
'lazy' in 'coreExprAsPmLit', just like Core Prep does.
There might genuinely be incoherent evidence, but that shouldn't
obstruct the pattern match checker. See test T27124a.
Fixes #25926 #27124
-------------------------
Metric Decrease:
T3294
-------------------------
- - - - -
8cb99552 by Sylvain Henry at 2026-04-16T19:22:43-04:00
hadrian: warn when package index is missing (#16484)
Since cabal-install 3.0 we can query the path of remote-repo-cache and
check if hackage package index is present.
Fixes #16484
- - - - -
d6ce7477 by Richard Eisenberg at 2026-04-16T19:23:25-04:00
Teach hadrian to --skip-test.
Fixes #27188.
This adds the --skip-test flag to `hadrian build`, as documented in the
patch.
- - - - -
d390a264 by Duncan Coutts at 2026-04-17T11:01:22+00:00
Use response files for hadrian linking with ghc (support long command lines)
In future support for windows dynamic linking, we expect long command
lines for linking dll files with ghc. Experiments with dynamic linking the
ghc-internal library yielded a link command well over 32kb. We did not
encounter this before for static libs, since we already use ar's @file
feature (if available, which it is for the llvm toolchain).
Co-authored-by: David Eichmann <davide(a)well-typed.com>
- - - - -
44 changed files:
- + changelog.d/T15973
- + changelog.d/T27121.md
- + changelog.d/T27124.md
- + changelog.d/hadrian-warn-missing-package-index-16484
- + changelog.d/skip-test
- compiler/GHC/Core/Opt/FloatOut.hs
- compiler/GHC/Core/Utils.hs
- compiler/GHC/CoreToStg/Prep.hs
- compiler/GHC/HsToCore/Pmc/Solver/Types.hs
- compiler/GHC/Stg/Debug.hs
- compiler/GHC/Tc/Errors.hs
- compiler/GHC/Types/Tickish.hs
- hadrian/build-cabal
- hadrian/build-cabal.bat
- hadrian/doc/make.md
- hadrian/doc/testsuite.md
- hadrian/src/Builder.hs
- hadrian/src/CommandLine.hs
- hadrian/src/Hadrian/Builder.hs
- hadrian/src/Settings/Builders/Ghc.hs
- hadrian/src/Settings/Builders/RunTest.hs
- libraries/ghc-heap/tests/tso_and_stack_closures.hs
- testsuite/driver/runtests.py
- testsuite/driver/testglobals.py
- testsuite/driver/testlib.py
- + testsuite/tests/ghci/T9074/Makefile
- + testsuite/tests/ghci/T9074/T9074.hs
- + testsuite/tests/ghci/T9074/T9074.stdout
- + testsuite/tests/ghci/T9074/T9074a.c
- + testsuite/tests/ghci/T9074/T9074b.c
- + testsuite/tests/ghci/T9074/all.T
- + testsuite/tests/overloadedstrings/should_fail/T25926.hs
- + testsuite/tests/overloadedstrings/should_fail/T25926.stderr
- + testsuite/tests/overloadedstrings/should_fail/T27124.hs
- + testsuite/tests/overloadedstrings/should_fail/T27124.stderr
- + testsuite/tests/overloadedstrings/should_fail/all.T
- + testsuite/tests/overloadedstrings/should_run/T27124a.hs
- testsuite/tests/overloadedstrings/should_run/all.T
- + testsuite/tests/profiling/should_compile/T27121.hs
- + testsuite/tests/profiling/should_compile/T27121_aux.hs
- testsuite/tests/profiling/should_compile/all.T
- + testsuite/tests/simplCore/should_compile/T26941.hs
- + testsuite/tests/simplCore/should_compile/T26941_aux.hs
- testsuite/tests/simplCore/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/5ab0507c0fe36a10c84059679ce05d…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/5ab0507c0fe36a10c84059679ce05d…
You're receiving this email because of your account on gitlab.haskell.org.
1
0
17 Apr '26
Simon Peyton Jones pushed to branch wip/T27078 at Glasgow Haskell Compiler / GHC
Commits:
2dadf3b0 by sheaf at 2026-04-16T13:28:39-04:00
Simplify mkTick
This commit simplifies 'GHC.Core.Utils.mkTick', removing the
accumulating parameter 'rest' which was suspiciously treating a bunch of
different ticks as a group, and moving the group as a whole around the
AST, ignoring that the ticks in the group might have different placement
properties.
The most important change is that we revert the logic (added in 85b0aae2)
that allowed ticks to be placed around coercions, which caused serious
issues (e.g. #27121). It was just a mistake, as it doesn't make sense
to put a tick around a coercion.
Also adds Note [Pushing SCCs inwards] which clarifies the logic for
pushing SCCs into lambdas, constructor applications, and dropping SCCs
around non-function variables (in particular the treatment of splittable
ticks).
A few other changes are also implemented:
- simplify 'can_split' predicate (no functional change)
- combine profiling ticks into one when possible
Fixes #26878, #26941 and #27121
Co-authored-by: simonpj <simon.peytonjones(a)gmail.com>
- - - - -
a0d6f1f4 by Simon Jakobi at 2026-04-16T13:29:28-04:00
Add regression test for #9074
Closes #9074.
- - - - -
d178ee89 by Sylvain Henry at 2026-04-16T13:30:25-04:00
Add changelog for #15973
- - - - -
e8a196c6 by sheaf at 2026-04-16T13:31:19-04:00
Deal with 'noSpec' in 'coreExprToPmLit'
This commit makes two separate changes relating to
'GHC.HsToCore.Pmc.Solver.Types.coreExprAsPmLit':
1. Commit 7124e4ad mistakenly marked deferred errors as non-canonical,
which led to the introduction of 'nospec' wrappers in the
generated Core. This reverts that accident by declaring deferred
errors as being canonical, avoiding spurious 'nospec' wrapping.
2. Look through magic identity-like Ids such as 'nospec', 'inline' and
'lazy' in 'coreExprAsPmLit', just like Core Prep does.
There might genuinely be incoherent evidence, but that shouldn't
obstruct the pattern match checker. See test T27124a.
Fixes #25926 #27124
-------------------------
Metric Decrease:
T3294
-------------------------
- - - - -
8cb99552 by Sylvain Henry at 2026-04-16T19:22:43-04:00
hadrian: warn when package index is missing (#16484)
Since cabal-install 3.0 we can query the path of remote-repo-cache and
check if hackage package index is present.
Fixes #16484
- - - - -
d6ce7477 by Richard Eisenberg at 2026-04-16T19:23:25-04:00
Teach hadrian to --skip-test.
Fixes #27188.
This adds the --skip-test flag to `hadrian build`, as documented in the
patch.
- - - - -
50829162 by Simon Peyton Jones at 2026-04-17T10:33:39+01:00
Kill off the substitution in Lint
Now that we have invariant (NoTypeShadowing) we no longer
need Lint to carry an ambient substitution. This makes it
simpler and faster. A really worthwhile refactor.
There are some knock-on effects
* Linting join points after worker/wrapper. See
Note [Join points and beta redexes]
* Running a type substitution after the desugarer.
See Note [Substituting type-lets] in
the new module GHC.Core.SubstTypeLets
Implements #27078
Most perf tests don't use Lint so we won't see a perf incresae.
But T1969, which uses -O0 and Lint, gets a bit worse because it has
to run the SubstTypeLets pass which is a somewhat expensive no-op
Metric Iecrease:
T1969
- - - - -
50 changed files:
- + changelog.d/T15973
- + changelog.d/T27121.md
- + changelog.d/T27124.md
- + changelog.d/hadrian-warn-missing-package-index-16484
- + changelog.d/skip-test
- compiler/GHC/Core/Lint.hs
- + compiler/GHC/Core/Lint/SubstTypeLets.hs
- compiler/GHC/Core/Opt/FloatOut.hs
- compiler/GHC/Core/Opt/OccurAnal.hs
- compiler/GHC/Core/Opt/WorkWrap/Utils.hs
- compiler/GHC/Core/Subst.hs
- compiler/GHC/Core/Utils.hs
- compiler/GHC/CoreToStg/Prep.hs
- compiler/GHC/Driver/Config/Core/Lint.hs
- compiler/GHC/HsToCore/Pmc/Solver/Types.hs
- compiler/GHC/Stg/Debug.hs
- compiler/GHC/Tc/Errors.hs
- compiler/GHC/Types/Tickish.hs
- compiler/ghc.cabal.in
- hadrian/build-cabal
- hadrian/build-cabal.bat
- hadrian/doc/make.md
- hadrian/doc/testsuite.md
- hadrian/src/CommandLine.hs
- hadrian/src/Settings/Builders/RunTest.hs
- libraries/ghc-heap/tests/tso_and_stack_closures.hs
- testsuite/driver/runtests.py
- testsuite/driver/testglobals.py
- testsuite/driver/testlib.py
- testsuite/tests/corelint/LintEtaExpand.stderr
- testsuite/tests/corelint/T21115b.stderr
- + testsuite/tests/ghci/T9074/Makefile
- + testsuite/tests/ghci/T9074/T9074.hs
- + testsuite/tests/ghci/T9074/T9074.stdout
- + testsuite/tests/ghci/T9074/T9074a.c
- + testsuite/tests/ghci/T9074/T9074b.c
- + testsuite/tests/ghci/T9074/all.T
- + testsuite/tests/overloadedstrings/should_fail/T25926.hs
- + testsuite/tests/overloadedstrings/should_fail/T25926.stderr
- + testsuite/tests/overloadedstrings/should_fail/T27124.hs
- + testsuite/tests/overloadedstrings/should_fail/T27124.stderr
- + testsuite/tests/overloadedstrings/should_fail/all.T
- + testsuite/tests/overloadedstrings/should_run/T27124a.hs
- testsuite/tests/overloadedstrings/should_run/all.T
- + testsuite/tests/profiling/should_compile/T27121.hs
- + testsuite/tests/profiling/should_compile/T27121_aux.hs
- testsuite/tests/profiling/should_compile/all.T
- + testsuite/tests/simplCore/should_compile/T26941.hs
- + testsuite/tests/simplCore/should_compile/T26941_aux.hs
- testsuite/tests/simplCore/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/78b203955e230d7a297cda16926003…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/78b203955e230d7a297cda16926003…
You're receiving this email because of your account on gitlab.haskell.org.
1
0
[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 4 commits: hadrian: warn when package index is missing (#16484)
by Marge Bot (@marge-bot) 17 Apr '26
by Marge Bot (@marge-bot) 17 Apr '26
17 Apr '26
Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC
Commits:
8cb99552 by Sylvain Henry at 2026-04-16T19:22:43-04:00
hadrian: warn when package index is missing (#16484)
Since cabal-install 3.0 we can query the path of remote-repo-cache and
check if hackage package index is present.
Fixes #16484
- - - - -
d6ce7477 by Richard Eisenberg at 2026-04-16T19:23:25-04:00
Teach hadrian to --skip-test.
Fixes #27188.
This adds the --skip-test flag to `hadrian build`, as documented in the
patch.
- - - - -
0a59df15 by Fendor at 2026-04-17T04:40:29-04:00
Migrate `ghc-pkg` to use `OsPath` and `file-io`
`ghc-pkg` should use UNC paths as much as possible to avoid MAX_PATH
issues on windows.
`file-io` uses UNC Paths by default on windows, ensuring we use the
correct APIs and that we finally are no longer plagued by MAX_PATH
issues in CI and private machines.
On top of it, the higher correctness of `OsPath` is appreciated in this
small codebase. Also, we improve memory usage very slightly, due to the
more efficient memory representation of `OsPath` over `FilePath`
Adds `ghc-pkg` regression test for MAX_PATH on windows
Make sure `ghc-pkg` behaves as expected when long paths (> 255) are
involved on windows.
Let's generate a testcase where we can actually observe that `ghc-pkg`
behaves as epxected.
See the documentation for windows on Maximum Path Length Limitation:
* `https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation`
Adds changelog entry for long path support in ghc-pkg.
- - - - -
749ff44c by Wolfgang Jeltsch at 2026-04-17T04:40:30-04:00
Move most of the `System.IO` implementation into `base`
This involves a rewrite of the `combine` helper function to avoid the
use of `last`, which would now be flagged as an error.
Metric Decrease:
T3294
Metric Increase:
T12227
T12707
T5642
- - - - -
47 changed files:
- + changelog.d/ghc-pkg-long-path-support
- + changelog.d/hadrian-warn-missing-package-index-16484
- + changelog.d/skip-test
- compiler/GHC/Unit/State.hs
- hadrian/build-cabal
- hadrian/build-cabal.bat
- hadrian/doc/make.md
- hadrian/doc/testsuite.md
- hadrian/src/CommandLine.hs
- hadrian/src/Settings/Builders/RunTest.hs
- libraries/base/src/Control/Concurrent.hs
- libraries/base/src/GHC/IO/Handle.hs
- libraries/base/src/Prelude.hs
- libraries/base/src/System/IO.hs
- libraries/base/src/Text/Printf.hs
- libraries/ghc-boot/GHC/Unit/Database.hs
- libraries/ghc-boot/ghc-boot.cabal.in
- libraries/ghc-internal/src/GHC/Internal/System/IO.hs
- testsuite/driver/runtests.py
- testsuite/driver/testglobals.py
- testsuite/driver/testlib.py
- testsuite/tests/cabal/Makefile
- testsuite/tests/cabal/all.T
- + testsuite/tests/cabal/ghcpkg10.stdout
- testsuite/tests/interface-stability/base-exports.stdout
- testsuite/tests/interface-stability/base-exports.stdout-javascript-unknown-ghcjs
- testsuite/tests/interface-stability/base-exports.stdout-mingw32
- testsuite/tests/interface-stability/base-exports.stdout-ws-32
- testsuite/tests/typecheck/should_compile/T9497a.stderr
- testsuite/tests/typecheck/should_compile/holes.stderr
- testsuite/tests/typecheck/should_compile/holes3.stderr
- testsuite/tests/typecheck/should_compile/valid_hole_fits.stderr
- testsuite/tests/typecheck/should_fail/T9497d.stderr
- testsuite/tests/typecheck/should_run/T9497a-run.stderr
- testsuite/tests/typecheck/should_run/T9497b-run.stderr
- testsuite/tests/typecheck/should_run/T9497c-run.stderr
- utils/ghc-pkg/Main.hs
- utils/ghc-pkg/ghc-pkg.cabal.in
- utils/haddock/html-test/ref/Bug1004.html
- utils/haddock/html-test/ref/Bug973.html
- utils/haddock/html-test/ref/ConstructorPatternExport.html
- utils/haddock/html-test/ref/DefaultSignatures.html
- utils/haddock/html-test/ref/Hash.html
- utils/haddock/html-test/ref/PatternSyns.html
- utils/haddock/html-test/ref/PatternSyns2.html
- utils/haddock/html-test/ref/QuasiExpr.html
- utils/haddock/html-test/ref/Test.html
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/ef709b2c1abe99ee6e0b7722ab35e3…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/ef709b2c1abe99ee6e0b7722ab35e3…
You're receiving this email because of your account on gitlab.haskell.org.
1
0
[Git][ghc/ghc][wip/torsten.schmits/mwb-26-01/fixed] 153 commits: rts/linker: Don't unload code when profiling is enabled
by Torsten Schmits (@torsten.schmits) 17 Apr '26
by Torsten Schmits (@torsten.schmits) 17 Apr '26
17 Apr '26
Torsten Schmits pushed to branch wip/torsten.schmits/mwb-26-01/fixed at Glasgow Haskell Compiler / GHC
Commits:
09d92280 by Ben Gamari at 2024-03-12T10:14:28-04:00
rts/linker: Don't unload code when profiling is enabled
The heap census may contain references (e.g. `Counter.identity`) to
static data which must be available when the census is reported at the
end of execution.
Fixes #24512.
- - - - -
a27a477d by Ben Gamari at 2024-03-12T10:14:28-04:00
rts/linker: Don't unload native objects when dlinfo isn't available
To do so is unsafe as we have no way of identifying references to
symbols provided by the object.
Fixes #24513. Fixes #23993.
- - - - -
63928aeb by Ben Gamari at 2024-03-12T10:14:28-04:00
rel_eng/upload: Purge both $rel_name/ and $ver/
This is necessary for prereleases, where GHCup accesses the release via
`$ver/`
- - - - -
2e713fdb by Ben Gamari at 2024-03-12T10:14:28-04:00
gitlab-ci: Allow test-primops to fail
It's still a bit sensitive to warnings, unfortunately.
- - - - -
66c51e75 by Ben Gamari at 2024-03-12T10:14:28-04:00
hadrian: Package mingw toolchain in expected location
This fixes #24525, a regression due to 41cbaf44a6ab5eb9fa676d65d32df8377898dc89.
Specifically, GHC expects to find the mingw32 toolchain in the binary distribution
root. However, after this patch it was packaged in the `lib/` directory.
- - - - -
d574a10d by Ben Gamari at 2024-03-12T10:14:28-04:00
hadrian/bindist: Eliminate extraneous `dirname` invocation
Previously we would call `dirname` twice per installed library file.
We now instead reuse this result. This helps appreciably on Windows, where
processes are quite expensive.
- - - - -
9f85900d by Ben Gamari at 2024-03-13T08:59:50-04:00
mk/relpath: Fix quoting
Previously there were two instances in this script which lacked proper
quoting. This resulted in `relpath` invocations in the binary
distribution Makefile producing incorrect results on Windows, leading to
confusing failures from `sed` and the production of empty package
registrations.
Fixes #24538.
- - - - -
47272633 by Ben Gamari at 2024-03-13T18:21:37-04:00
docs: Drop old release notes
- - - - -
db8a17a0 by Ben Gamari at 2024-03-13T18:33:12-04:00
gitlab/rel_eng: More upload.sh tweaks
- - - - -
b55e0ef9 by Ben Gamari at 2024-03-13T18:33:17-04:00
rel_eng: Drop dead prepare_docs codepath
- - - - -
548da279 by Ben Gamari at 2024-03-14T09:13:15-04:00
rel_env/recompress_all: Decompress xz before recompressing
Previously we would rather compress the xz *again*, before in addition
compressing it with the desired scheme.
Fixes #24545.
- - - - -
cf814fe9 by Teo Camarasu at 2024-03-21T11:44:15-04:00
Add preamble to 9.10 release notes
Resolves #24567
- - - - -
b09cbad8 by Zubin Duggal at 2024-03-25T12:21:37-04:00
Revert "Apply shellcheck suggestion to SUBST_TOOLDIR"
This reverts commit c82770f57977a2b5add6e1378f234f8dd6153392.
The shellcheck suggestion is spurious and results in SUBST_TOOLDIR being a
no-op. `set` sets positional arguments for bash, but we want to set the variable
given as the first autoconf argument.
Fixes #24542
Metric decreases because the paths in the settings file are now shorter,
so we allocate less when we read the settings file.
-------------------------
Metric Decrease:
T12425
T13035
T9198
-------------------------
(cherry picked from commit 576f8b7ec292382aaa47fceab504b5abf4cc1f8a)
- - - - -
0d4ee209 by Andrei Borzenkov at 2024-03-25T12:27:07-04:00
Fix compiler crash caused by implicit RHS quantification in type synonyms (#24470)
(cherry picked from commit 7ea971d314c4eba59e12e94bf3eb8edb95fbfac5)
- - - - -
688cb2ff by Cheng Shao at 2024-03-25T12:28:00-04:00
Revert "compiler: make genSym use C-based atomic increment on non-JS 32-bit platforms"
This reverts commit 615eb855416ce536e02ed935ecc5a6f25519ae16. It was
originally intended to fix #24449, but it was merely sweeping the bug
under the rug. 3836a110577b5c9343915fd96c1b2c64217e0082 has properly
fixed the fragile test, and we no longer need the C version of genSym.
Furthermore, the C implementation causes trouble when compiling with
clang that targets i386 due to alignment warning and libatomic linking
issue, so it makes sense to revert it.
(cherry picked from commit 39f3ac3e1b47e9fdac8fcf2d1edcc300a37deb82)
- - - - -
c5c19c14 by Cheng Shao at 2024-03-25T12:28:01-04:00
compiler: fix out-of-bound memory access of genSym on 32-bit
This commit fixes an unnoticed out-of-bound memory access of genSym on
32-bit. ghc_unique_inc is 32-bit sized/aligned on 32-bit platforms,
but we mistakenly treat it as a Word64 pointer in genSym, and
therefore will accidentally load 2 garbage higher bytes, or with a
small but non-zero chance, overwrite something else in the data
section depends on how the linker places the data segments. This
regression was introduced in !11802 and fixed here.
(cherry picked from commit e6bfb85c842edca36754bb8914e725fbaa1a83a6)
- - - - -
67defa84 by Alan Zimmerman at 2024-03-25T12:28:15-04:00
EPA: Fix regression discarding comments in contexts
Closes #24533
(cherry picked from commit 7da7f8f643f1bfc4aa034a731f2f85cda007b286)
- - - - -
97afcca5 by Alan Zimmerman at 2024-03-25T12:28:31-04:00
EPA: Address more 9.10.1-alpha1 regressions from recent changes
Closes #24533
Hopefully for good this time
(cherry picked from commit bd8209eb8e447a5ae1d736f034f4a3986e0727f7)
- - - - -
850fc30e by Alan Zimmerman at 2024-03-25T12:28:48-04:00
EPA: Clean up Exactprint helper functions a bit
- Introduce a helper lens to compose on `EpAnn a` vs `a` versions
- Rename some prime versions of functions back to non-prime
They were renamed during the rework
(cherry picked from commit 5f27517687c711593a23f1c9e5bd09ad9ec22fa4)
- - - - -
01a6a717 by Vladislav Zavialov at 2024-03-25T12:29:02-04:00
Type operators in promoteOccName (#24570)
Type operators differ from term operators in that they are lexically
classified as (type) constructors, not as (type) variables.
Prior to this change, promoteOccName did not account for this
difference, causing a scoping issue that affected RequiredTypeArguments.
type (!@#) = Bool
f = idee (!@#) -- Not in scope: ‘!@#’ (BUG)
Now we have a special case in promoteOccName to account for this.
(cherry picked from commit da2a10ceab7498fbbd5723dee0393ce75f2bb562)
- - - - -
e5b111e9 by Simon Peyton Jones at 2024-03-25T12:29:15-04:00
Expand untyped splices in tcPolyExprCheck
Fixes #24559
(cherry picked from commit 97a2bb1cdfa4b244a58374658aec6d48ce23a54a)
- - - - -
222a5240 by Andrei Borzenkov at 2024-03-25T12:29:27-04:00
Fix TH handling in `pat_to_type_pat` function (#24571)
There was missing case for `SplicePat` in `pat_to_type_at` function,
hence patterns with splicing that checked against `forall->` doesn't work
properly because they fall into the "illegal pattern" case.
Code example that is now accepted:
g :: forall a -> ()
g $([p| a |]) = ()
(cherry picked from commit 6fafc51e9206abd62881131c282ec3b9e1584c5b)
- - - - -
c394cfa7 by Ben Gamari at 2024-03-26T13:46:41-04:00
Bump haddock submodule
Fixes #24485 by fixing the default hyperlinked sources URL pattern.
- - - - -
337a5073 by Ben Gamari at 2024-03-26T19:53:32-04:00
Add build ordering edge for GHC.IO.Encoding.Iconv
- - - - -
6f4b0335 by Ben Gamari at 2024-03-26T21:32:47-04:00
mk-ghcup-metadata: Fix directory of testsuite tarball
As reported in #24546, the `dlTest` artifact should be extracted into
the `testsuite` directory.
(cherry picked from commit 9d936c5799daadf96392211b03e38520925aea17)
- - - - -
878e8529 by Ben Gamari at 2024-03-26T21:32:49-04:00
ghcup-metadata: Don't populate dlOutput unless necessary
ghcup can apparently infer the output name of an artifact from its URL.
Consequently, we should only include the `dlOutput` field when it would
differ from the filename of `dlUri`.
Fixes #24547.
(cherry picked from commit 6d398066b6084a971248da8ce37bc40c53a83525)
- - - - -
725343aa by Rodrigo Mesquita at 2024-03-26T22:34:19-04:00
bindist: Clean xattrs of bin and lib at configure time
For issue #21506, we started cleaning the extended attributes of
binaries and libraries from the bindist *after* they were installed to
workaround notarisation (#17418), as part of `make install`.
However, the `ghc-toolchain` binary that is now shipped with the bindist
must be run at `./configure` time. Since we only cleaned the xattributes
of the binaries and libs after they were installed, in some situations
users would be unable to run `ghc-toolchain` from the bindist, failing
at configure time (#24554).
In this commit we move the xattr cleaning logic to the configure script.
Fixes #24554
(cherry picked from commit bf65a7c388b399b7b3c6b97f25d97164390b75f1)
- - - - -
5dd67b52 by Alan Zimmerman at 2024-03-27T08:37:54-04:00
EPA: Do not extend declaration range for trailine zero len semi
The lexer inserts virtual semicolons having zero width.
Do not use them to extend the list span of items in a list.
(cherry picked from commit 0acfe391583d77a72051d505f05fab0ada056c49)
- - - - -
10829530 by Rodrigo Mesquita at 2024-03-27T08:38:20-04:00
configure: Use LDFLAGS when trying linkers
A user may configure `LDFLAGS` but not `LD`. When choosing a linker, we
will prefer `ldd`, then `ld.gold`, then `ld.bfd` -- however, we have to
check for a working linker. If either of these fail, we try the next in
line.
However, we were not considering the `$LDFLAGS` when checking if these
linkers worked. So we would pick a linker that does not support the
current $LDFLAGS and fail further down the line when we used that linker
with those flags.
Fixes #24565, where `LDFLAGS=-Wl,-z,pack-relative-relocs` is not
supported by `ld.gold` but that was being picked still.
(cherry picked from commit 32a8103f3b3e22907fdd67b69c919c5251d8cc20)
- - - - -
3914808d by Cheng Shao at 2024-03-27T08:38:35-04:00
libffi-tarballs: bump libffi-tarballs submodule to libffi 3.4.6
This commit bumps the libffi-tarballs submodule to libffi 3.4.6, which
includes numerous upstream libffi fixes, especially
https://github.com/libffi/libffi/issues/760.
(cherry picked from commit 810660b780e1111b36c91326bcd0041e1f62706b)
- - - - -
6ecd5f2f by Cheng Shao at 2024-03-27T08:38:49-04:00
rts: fix clang compilation on aarch64
This patch fixes function prototypes in ARMOutlineAtomicsSymbols.h
which causes "error: address argument to atomic operation must be a
pointer to _Atomic type" when compiling with clang on aarch64.
(cherry picked from commit 7db8c9927fae3369fc4ecff68f80c4cb32eea757)
- - - - -
a17965fc by Alan Zimmerman at 2024-03-28T15:50:35-04:00
EPA: Fix FamDecl range
The span was incorrect if opt_datafam_kind_sig was empty
- - - - -
89dee1d6 by Alan Zimmerman at 2024-03-28T15:50:39-04:00
EPA: do not duplicate comments in signature RHS
(cherry picked from commit d2ba41e8c3e71d70a0f80dcc3f588ecbdc5ce4b2)
- - - - -
7d9c2102 by Ben Gamari at 2024-03-28T15:50:56-04:00
compiler: Allow more types in GHCForeignImportPrim
For many, many years `GHCForeignImportPrim` has suffered from the rather
restrictive limitation of not allowing any non-trivial types in arguments
or results. This limitation was justified by the code generator allegely
barfing in the presence of such types.
However, this restriction appears to originate well before the NCG
rewrite and the new NCG does not appear to have any trouble with such
types (see the added `T24598` test). Lift this restriction.
Fixes #24598.
- - - - -
16e1fca2 by Ben Gamari at 2024-03-28T15:51:22-04:00
Fix type of _get_osfhandle foreign import
Fixes #24601.
- - - - -
76a0e7f6 by Ben Gamari at 2024-03-29T17:02:25-04:00
Bump parsec submodule to 3.1.17.0
- - - - -
5a85e5b1 by Ben Gamari at 2024-04-04T14:24:55-04:00
Bump Cabal submodule to current state of 3.12 branch
- - - - -
0fb5c97d by Ben Gamari at 2024-04-08T13:36:25-04:00
base: Deprecate GHC.Pack
See #21461.
- - - - -
834fe22d by Apoorv Ingle at 2024-04-09T21:17:38-04:00
Fix for #24552 (see testcase T24552)
Fixes for a bug in desugaring pattern synonyms matches, introduced
while working on on expanding `do`-blocks in #18324
The `matchWrapper` unecessarily (and incorrectly) filtered out the
default wild patterns in a match. Now the wild pattern alternative is
simply ignored by the pm check as its origin is `Generated`.
The current code now matches the expected semantics according to the language spec.
(cherry picked from commit 0c48f2b952ad4ee995e4eafa458b7a8d3c442415)
- - - - -
76a0f8f2 by Ben Gamari at 2024-04-11T00:07:21-04:00
Bump process submodule to 1.6.19.0
Addresses Windows command-line injection vulnerability.
- - - - -
086698ba by Ben Gamari at 2024-04-11T00:07:21-04:00
Bump unix submodule to 2.8.5.1
Closes #24640.
- - - - -
21c9c1bc by Ben Gamari at 2024-04-11T00:07:21-04:00
ghcup-metadata: Use Debian 9 binaries on Ubuntu 16, 17
Closes #24646.
- - - - -
aa5b34e1 by Ben Gamari at 2024-04-11T00:07:21-04:00
Bump stm submodule
Fixing #24643
- - - - -
8212c3c6 by Alan Zimmerman at 2024-04-11T09:32:07-04:00
EPA: Remove unnecessary XRec in CompleteMatchSig
The XRec for [LIdP pass] is not needed for exact printing, remove it.
(cherry picked from commit 1b1a92bd25c3f7249cf922c5dbf4415d2de44a36)
- - - - -
6b480460 by Sebastian Graf at 2024-04-11T09:32:18-04:00
Simplifier: Re-do dependency analysis in abstractFloats (#24551)
In #24551, we abstracted a string literal binding over a type variable,
triggering a CoreLint error when that binding floated to top-level.
The solution implemented in this patch fixes this by re-doing dependency
analysis on a simplified recursive let binding that is about to be type
abstracted, in order to find the minimal set of type variables to abstract over.
See wrinkle (AB5) of Note [Floating and type abstraction] for more details.
Fixes #24551
(cherry picked from commit 3e0b2b1f14e5e82eaa1dc6fbf8dceb5f539f5aa3)
- - - - -
ca9bb80e by Rodrigo Mesquita at 2024-04-11T09:32:41-04:00
th: Hide the Language.Haskell.TH.Lib.Internal module from haddock
Fixes #24562
(cherry picked from commit 817e89362e74b5177c02deee31f16cec862052cc)
- - - - -
a13e9b69 by Matthew Pickering at 2024-04-11T09:32:49-04:00
Fix off by one error in seekBinNoExpand and seekBin
(cherry picked from commit 28009fbc26e4aca7a3b05cedb60c5c9baa31223d)
- - - - -
770dcce2 by Andrei Borzenkov at 2024-04-11T09:33:40-04:00
Change how invisible patterns represented in haskell syntax and TH AST (#24557)
Before this patch:
data ArgPat p
= InvisPat (LHsType p)
| VisPat (LPat p)
With this patch:
data Pat p
= ...
| InvisPat (LHsType p)
...
And the same transformation in the TH land. The rest of the
changes is just updating code to handle new AST and writing tests
to check if it is possible to create invalid states using TH.
Metric Increase:
MultiLayerModulesTH_OneShot
(cherry picked from commit 36a75b80ebe592f582f3f349e8c73b8293d49ed1)
- - - - -
03bfe160 by Alan Zimmerman at 2024-04-11T09:33:53-04:00
EPA: Capture all comments in a ClassDecl
Hopefully the final fix needed for #24533
(cherry picked from commit be3bdddebdf119007d753bebe32709a1ce726cc0)
- - - - -
eca47e5b by Alan Zimmerman at 2024-04-11T09:34:02-04:00
EPA: Use EpaLocation in WarningTxt
This allows us to use an EpDelta if needed when using makeDeltaAst.
(cherry picked from commit 3b7b0c1c1337fe4cf470987d891f1f3944840688)
- - - - -
6ce42495 by Sylvain Henry at 2024-04-11T14:06:46-04:00
JS: reenable h$appendToHsString optimization (#24495)
The optimization introducing h$appendToHsString wasn't kicking in
anymore (while it did in 9.8.1) because of the changes introduced in #23270 (7e0c8b3bab30).
This patch reenables the optimization by matching on case-expression, as
done in Cmm for unpackCString# standard thunks.
The test is also T24495 added in the next commits (two commits for ease
of backporting to 9.8).
(cherry picked from commit b36ee57bfbecc628b7f0919e1e59b7066495034f)
- - - - -
cc690f6e by Sylvain Henry at 2024-04-11T14:06:46-04:00
JS: fix h$appendToHsString implementation (#24495)
h$appendToHsString needs to wrap its argument in an updatable thunk
to behave like unpackAppendCString#. Otherwise if a SingleEntry thunk is
passed, it is stored as-is in a CONS cell, making the resulting list
impossible to deepseq (forcing the thunk doesn't update the contents of
the CONS cell)!
The added test checks that the optimization kicks in and that
h$appendToHsString works as intended.
Fix #24495
(cherry picked from commit 527616e950fd8942c182be903d176f4b9890ee5a)
- - - - -
656395ec by Luite Stegeman at 2024-04-11T14:06:46-04:00
Update correct counter in bumpTickyAllocd
(cherry picked from commit 0c4a96862081f03e2946a2ed7e80c108f06205a1)
- - - - -
fb7dfdf0 by Ben Gamari at 2024-04-11T14:06:46-04:00
testsuite: Fix T24598 with unregisterised compiler
(cherry picked from commit 9b9e031b67dbc812c156a4773c0c9d293451fefa)
- - - - -
0dd8f0bc by Alan Zimmerman at 2024-04-11T14:06:46-04:00
EPA: Use EpaLocation not SrcSpan in ForeignDecls
This allows us to update them for makeDeltaAst in ghc-exactprint
(cherry picked from commit 1324b8626aeb4dc2d6a04f7605d307ef13d1e0e9)
- - - - -
9745a63e by Simon Peyton Jones at 2024-04-11T14:06:46-04:00
Deal with duplicate tyvars in type declarations
GHC was outright crashing before this fix: #24604
(cherry picked from commit faa30b41a6f941627ddeeba805815b2742d312d1)
- - - - -
ed927271 by Alan Zimmerman at 2024-04-11T14:06:46-04:00
EPA: Use EpaLocation for RecFieldsDotDot
So we can update it to a delta position in makeDeltaAst if needed.
(cherry picked from commit 19883a23b8bc704118fa663d8bab00a503b5a527)
- - - - -
220cda2c by Alan Zimmerman at 2024-04-11T14:06:46-04:00
EPA: Move DeltaPos and EpaLocation' into GHC.Types.SrcLoc
This allows us to use a NoCommentsLocation for the possibly trailing
comma location in a StringLiteral.
This in turn allows us to correctly roundtrip via makeDeltaAst.
(cherry picked from commit 12b997df559365e6188824fb10f5f61c2e9075e4)
- - - - -
2d1c6074 by Ben Gamari at 2024-04-12T10:27:25-04:00
Bump parsec submodule to upstream master
- - - - -
6efe55ef by Ben Gamari at 2024-04-12T10:27:27-04:00
testsuite: More aggressive normalisation of process004 output
It turns out that this test uses `execvp`, not `exec` on CentOS 7.
Normalise this spurious difference away.
- - - - -
702ff84e by Ben Gamari at 2024-04-12T11:35:06-04:00
Bump array, binary, stm submodules
- - - - -
3a18d9e7 by Ben Gamari at 2024-04-12T15:49:07-04:00
hadrian: Refactor treatment of extra dependencies
The previous implementation was both hard to follow and repeated itself,
making changes quite error-prone. Refactor this to be a bit more easier
to reason about.
- - - - -
2ed72644 by Ben Gamari at 2024-04-12T17:51:15-04:00
Bump time submodule to 1.14
As requested in #24528.
- - - - -
3b63186d by Ben Gamari at 2024-04-13T09:07:57-04:00
Revert "Bump time submodule to 1.14"
Unfortunately the `Lift` instances introduced in 1.14 trigger #22229.
While it's unlikely that an end-user will observe this breakage, we
cannot to ship a release with the CI breakage that this implies (as
multi-component support would have no validation). Consequently, we have
no choice but to try to fix #22229 and bump again in 9.12.
This reverts commit 2ed7264434a2edee97ab441c9ccbdf675e0d7896.
- - - - -
b9b3b007 by Matthew Craven at 2024-04-15T10:57:59-04:00
Add release notes entry for GHC proposal 575
- - - - -
26b6c7fd by Matthew Craven at 2024-04-15T10:59:17-04:00
Users' guide: Fix base-ref links containing symbols
- - - - -
f15a854e by Alan Zimmerman at 2024-04-21T09:59:45+01:00
EPA: Add additional comments field to AnnsModule
This is used in exact printing to store comments coming after the
`where` keyword but before any comments allocated to imports or decls.
It is used in ghc-exactprint, see
https://github.com/alanz/ghc-exactprint/commit/44bbed311fd8f0d053053fef195b…
- - - - -
c8d25501 by Alan Zimmerman at 2024-04-21T10:41:35+01:00
EPA: Fix comments in mkListSyntaxTy0
Also extend the test to confirm.
Addresses #24669, 1 of 4
(cherry picked from commit f07015858fd79dca41983dbf3a249dfecd8d2eea)
- - - - -
7d6ae7aa by Alan Zimmerman at 2024-04-21T11:39:48+01:00
EPA: Provide correct span for PatBind
And remove unused parameter in checkPatBind
Contributes to #24669
(cherry picked from commit c90c60390aa3949b400f26ee0534273c56e19005)
- - - - -
64013156 by Alan Zimmerman at 2024-04-21T12:43:22+01:00
EPA: Fix span for PatBuilderAppType
Include the location of the prefix @ in the span for InVisPat.
Also removes unnecessary annotations from HsTP.
Contributes to #24669
(cherry picked from commit 26036f96919b1a8b99715dd99724163012c719fc)
- - - - -
898fcbd2 by Alan Zimmerman at 2024-04-21T13:49:41+01:00
EPA: Avoid duplicated comments in splice decls
Contributes to #24669
(cherry picked from commit 2f8e3a254a20f4573aec26fc85ab74b51d661472)
- - - - -
9f509a09 by Alan Zimmerman at 2024-04-21T15:32:17+01:00
EPA: Extend StringLiteral range to include trailing commas
This goes slightly against the exact printing philosophy where
trailing decorations should be in an annotation, but the
practicalities of adding it to the WarningTxt environment, and the
problems caused by deviating do not make a more principles approach
worthwhile.
(cherry picked from commit 00d3ecf0775c1a3f1ab8495e5e125f21d450394e)
- - - - -
45cc3064 by Ben Gamari at 2024-04-24T11:00:59-04:00
Merge remote-tracking branch 'origin/wip/az/ghc-9.10-backports-1' into HEAD
- - - - -
d9cd4bde by Ben Gamari at 2024-04-24T11:01:34-04:00
ghc-internal: Fix mentions of ghc-internal in deprecation warnings
Closes #24609.
(cherry picked from commit 55eb8c98895308d2dd025f7bd64c0b80fce6ace3)
- - - - -
b8f9880c by Zubin Duggal at 2024-04-24T11:01:34-04:00
driver: Make `checkHomeUnitsClosed` faster
The implementation of `checkHomeUnitsClosed` was traversing every single path
in the unit dependency graph - this grows exponentially and quickly grows to be
infeasible on larger unit dependency graphs.
Instead we replace this with a faster implementation which follows from the
specificiation of the closure property - there is a closure error if there are
units which are both are both (transitively) depended upon by home units and
(transitively) depend on home units, but are not themselves home units.
To compute the set of units required for closure, we first compute the closure
of the unit dependency graph, then the transpose of this closure, and find all
units that are reachable from the home units in the transpose of the closure.
(cherry picked from commit a933aff37992ea311a60be878379e7abf650e9fb)
- - - - -
6d6c2640 by Ben Gamari at 2024-04-24T11:01:37-04:00
template-haskell: Declare TH.Lib.Internal as not-home
Rather than `hide`.
Closes #24659.
(cherry picked from commit d7a3d6b5ee5e0c16af295579da3c54d8f0c37a05)
- - - - -
88e31848 by Teo Camarasu at 2024-04-24T11:01:37-04:00
Fix ghc API link in docs/index.html
This was missing part of the unit ID meaning it would 404.
Resolves #24674
(cherry picked from commit f30e4984fb048818051465698ef8e4e20dacb577)
- - - - -
1261ec2f by Simon Peyton Jones at 2024-04-24T11:01:37-04:00
Clone CoVars in CorePrep
This MR addresses #24463. It's all explained in the new
Note [Cloning CoVars and TyVars]
(cherry picked from commit 9d38bfa0c0f910208822579acaa999f87c2f8c65)
- - - - -
bcb5a91d by Jade at 2024-04-24T11:06:13-04:00
Put the newline after errors instead of before them
This mainly has consequences for GHCi but also slightly alters how the
output of GHC on the commandline looks.
Fixes: #22499
(cherry picked from commit 275e41a902f4aec8552707ec9924f2d0a20346d0)
- - - - -
be59c02c by Ben Gamari at 2024-04-25T12:51:45-04:00
Bump Cabal submodule to 3.12
- - - - -
5f4848c0 by Cheng Shao at 2024-04-25T12:54:20-04:00
ghc-bignum: remove obsolete ln script
This commit removes an obsolete ln script in ghc-bignum/gmp. See
060251c24ad160264ae8553efecbb8bed2f06360 for its original intention,
but it's been obsolete for a long time, especially since the removal
of the make build system. Hence the house cleaning.
(cherry picked from commit c62dc317c21026396a7a5581b90d17ef4c44f9ac)
- - - - -
f845a792 by Cheng Shao at 2024-04-25T12:54:22-04:00
ghc-bignum: update gmp to 6.3.0
This patch bumps the gmp-tarballs submodule and updates gmp to 6.3.0.
The tarball format is now xz, and gmpsrc.patch has been patched into
the tarball so hadrian no longer needs to deal with patching logic
when building in-tree GMP.
(cherry picked from commit 6399d52ba10d510a94c9db6552a4ea8aae8e003b)
- - - - -
92065500 by Cheng Shao at 2024-04-25T12:54:23-04:00
hadrian: remove obsolete Patch logic
This commit removes obsolete Patch logic from hadrian, given we no
longer need to patch the gmp tarball when building in-tree GMP.
(cherry picked from commit 65b4b92fa1e1989d055108a6077cc9119ee28acd)
- - - - -
1e77ded1 by Cheng Shao at 2024-04-25T12:54:24-04:00
autoconf: remove obsolete patch detection
This commit removes obsolete deletection logic of the patch command
from autoconf scripts, given we no longer need to patch anything in
the GHC build process.
(cherry picked from commit 71f28958454872db9c21c7d974dd0f0a7c7e8f3d)
- - - - -
bb67e8d5 by Sylvain Henry at 2024-04-25T12:56:03-04:00
JS: correctly handle RUBBISH literals (#24664)
(cherry picked from commit daeda83478d5b800d29661408dd67cc4b23df374)
- - - - -
57b07e02 by Ben Gamari at 2024-04-26T09:26:51-04:00
docs: Don't use str.isascii
`str.isascii` is only supported in Python 3.7 and later.
- - - - -
2c6375b9 by Hécate Moonlight at 2024-05-01T01:44:10+02:00
Add missing entries in the base-4.20 release notes
- - - - -
b8c66bf3 by Rodrigo Mesquita at 2024-05-08T02:08:37-04:00
bindist: Fix xattr cleaning
The original fix (725343aa) was incorrect because it used the shell
bracket syntax which is the quoting syntax in autoconf, making the test
for existence be incorrect and therefore `xattr` was never run.
Fixes #24554
(cherry picked from commit e03760db6713068ad8ba953d2252ec12b3278c9b)
- - - - -
250c5df7 by Ben Gamari at 2024-05-08T02:08:37-04:00
ghcup-metadata: Drop output_name field
This is entirely redundant to the filename of the URL. There is no
compelling reason to name the downloaded file differently from its
source.
- - - - -
7b327164 by Alan Zimmerman at 2024-05-08T02:08:37-04:00
EPA: check-exact: check that the roundtrip reproduces the source
Closes #24670
(cherry picked from commit 981c2c2c5017cb7ae47babff4d2163324d7cbde6)
- - - - -
a8c27c7c by Alan Zimmerman at 2024-05-08T02:09:14-04:00
EPA: Preserve comments in Match Pats
Closes #24708
Closes #24715
Closes #24734
(cherry picked from commit 1c2fd963d6fd78d1c752a21348c7db85f5d64df2)
- - - - -
e8603c75 by Alan Zimmerman at 2024-05-08T02:09:27-04:00
EPA: Preserve comments for PrefixCon
Preserve comments in
fun (Con {- c1 -} a b)
= undefined
Closes #24736
(cherry picked from commit 40026ac30fcdbe84a551f445f5e20691c0527ded)
- - - - -
015a0430 by Alan Zimmerman at 2024-05-08T02:09:27-04:00
EPA: fix span for empty \case(s)
In
instance SDecide Nat where
SZero %~ (SSucc _) = Disproved (\case)
Ensure the span for the HsLam covers the full construct.
Closes #24748
(cherry picked from commit 167a56a003106ed84742e3970cc2189ffb98b0c7)
- - - - -
c5a65a7f by Alan Zimmerman at 2024-05-08T02:09:27-04:00
EPA: preserve comments in class and data decls
Fix checkTyClHdr which was discarding comments.
Closes #24755
(cherry picked from commit 35d34fde62cd9e0002ac42f10bf705552f5c654e)
- - - - -
43a7dc68 by Alan Zimmerman at 2024-05-08T02:09:27-04:00
EPA: fix mkHsOpTyPV duplicating comments
Closes #24753
(cherry picked from commit 18f4ff84b323236f6dfd07f3bbc2842308a01e91)
- - - - -
01eeecec by Alan Zimmerman at 2024-05-08T02:09:27-04:00
EPA: preserve comments in data decls
Closes #24771
(cherry picked from commit 46328a49d988143111ab530d7907b9426b58311a)
- - - - -
2c7a0cf7 by Simon Peyton Jones at 2024-05-08T02:09:27-04:00
Track in-scope variables in ruleCheckProgram
This small patch fixes #24726, by tracking in-scope variables
properly in -drule-check. Not hard to do!
(cherry picked from commit be1e60eec0ec37da41643af17d78c698ab2a7083)
- - - - -
4896c50b by Andrew Lelechenko at 2024-05-08T02:09:27-04:00
Document that setEnv is not thread-safe
(cherry picked from commit a86167471a7a471fb75ae9ba6c641bd1e74bc16d)
- - - - -
843f95b1 by Matthew Pickering at 2024-05-08T02:09:27-04:00
Don't depend on registerPackage function in Cabal
More recent versions of Cabal modify the behaviour of libAbiHash which
breaks our usage of registerPackage.
It is simpler to inline the part of registerPackage that we need and
avoid any additional dependency and complication using the higher-level
function introduces.
(cherry picked from commit 3fff09779d5830549ae455a15907b7bb9fe7859a)
- - - - -
720ff1f9 by Hécate Moonlight at 2024-05-08T02:09:27-04:00
Correct `@since` metadata in HpcFlags
It was introduced in base-4.20, not 4.22.
Fix #24721
(cherry picked from commit 9213478931b18402998c18f5c4e6f0ee09054b18)
- - - - -
7f9b05a8 by Teo Camarasu at 2024-05-08T02:09:27-04:00
doc: Fix type error in hs_try_putmvar example
(cherry picked from commit 06f7db4001e4eee0f3076d949876f8f4af0eb6fb)
- - - - -
d5f45368 by Cheng Shao at 2024-05-08T09:39:29+01:00
driver: always merge objects when possible
This patch makes the driver always merge objects with `ld -r` when
possible, and only fall back to calling `ar -L` when merge objects
command is unavailable. This completely reverts !8887 and !12313,
given more fixes in Cabal seems to be needed to avoid breaking certain
configurations and the maintainence cost is exceeding the behefits in
this case :/
(cherry picked from commit 631cefec222e2db951c58db0b15a8d80ef5549cb)
- - - - -
255f44e7 by Alan Zimmerman at 2024-05-08T20:07:57+01:00
EPA: Fix range for GADT decl with sig only
Closes #24714
(cherry picked from commit d5bea4d6bce785b1d09f1b8faad7451af23b728d)
- - - - -
ea1bca98 by Alan Zimmerman at 2024-05-08T20:36:04+01:00
EPA: Preserve comments for pattern synonym sig
Closes #24749
(cherry picked from commit bf3d4db0894233ec72f092a4a34bce9ed4ff4e21)
- - - - -
2cb0fb44 by Alan Zimmerman at 2024-05-08T20:36:33+01:00
EPA: Widen stmtslist to include last semicolon
Closes #24754
(cherry picked from commit 7eab4e019205cfced90f06242a9afa23dfcaa70b)
- - - - -
776fa6e1 by Alan Zimmerman at 2024-05-08T20:49:33+01:00
EPA: Keep comments in a CaseAlt match
The comments now live in the surrounding location, not inside the
Match. Make sure we keep them.
Closes #24707
(cherry picked from commit e916fc9215e66b15c7e2387cc087a9d1cc57bf77)
- - - - -
c192d254 by Ben Gamari at 2024-05-09T11:49:25-04:00
Revert "ghcup-metadata: Drop output_name field"
This reverts commit 250c5df7875658f172804f511cd7eb325392f347.
- - - - -
923e21bc by Ben Gamari at 2024-05-09T11:49:26-04:00
ghcup-metadata: Drop output_name
This is entirely redundant to the filename of the URL. There is no
compelling reason to name the downloaded file differently from its
source.
- - - - -
78092043 by Ryan Scott at 2024-05-09T11:49:26-04:00
unboxedSum{Type,Data}Name: Use GHC.Types as the module
Unboxed sum constructors are now defined in the `GHC.Types` module, so if you
manually quote an unboxed sum (e.g., `''Sum2#`), you will get a `Name` like:
```hs
GHC.Types.Sum2#
```
The `unboxedSumTypeName` function in `template-haskell`, however, mistakenly
believes that unboxed sum constructors are defined in `GHC.Prim`, so
`unboxedSumTypeName 2` would return an entirely different `Name`:
```hs
GHC.Prim.(#|#)
```
This is a problem for Template Haskell users, as it means that they can't be
sure which `Name` is the correct one. (Similarly for `unboxedSumDataName`.)
This patch fixes the implementations of `unboxedSum{Type,Data}Name` to use
`GHC.Types` as the module. For consistency with `unboxedTupleTypeName`, the
`unboxedSumTypeName` function now uses the non-punned syntax for unboxed sums
(`Sum<N>#`) as the `OccName`.
Fixes #24750.
- - - - -
2cc6968a by Andrei Borzenkov at 2024-05-09T11:51:06-04:00
Fix tuple puns renaming (24702)
Move tuple renaming short cutter from `isBuiltInOcc_maybe` to `isPunOcc_maybe`, so we consider incoming module.
I also fixed some hidden bugs that raised after the change was done.
(cherry picked from commit 94da936507c685aa8101a714e7619b4d428d0187)
- - - - -
017c52b7 by Ben Gamari at 2024-05-09T18:39:46-04:00
Bump version to 9.10.1
- - - - -
d07219d8 by Ben Gamari at 2024-05-09T22:52:06-04:00
generate_bootstrap_plans: Update
- - - - -
6d779c0f by Ben Gamari at 2024-05-10T00:36:54-04:00
base: Fix release date in changelog
- - - - -
66c914d6 by Rodrigo Mesquita at 2024-12-09T07:51:56-08:00
rts: free error message before returning
Fixes a memory leak in rts/linker/PEi386.c
- - - - -
5583003b by Alexis King at 2024-12-09T08:02:21-08:00
linker: Avoid linear search when looking up Haskell symbols via dlsym
See the primary Note [Looking up symbols in the relevant objects] for a
more in-depth explanation.
When dynamically loading a Haskell symbol (typical when running a splice or
GHCi expression), before this commit we would search for the symbol in
all dynamic libraries that were loaded. However, this could be very
inefficient when too many packages are loaded (which can happen if there are
many package dependencies) because the time to lookup the would be
linear in the number of packages loaded.
This commit drastically improves symbol loading performance by
introducing a mapping from units to the handles of corresponding loaded
dlls. These handles are returned by dlopen when we load a dll, and can
then be used to look up in a specific dynamic library.
Looking up a given Name is now much more precise because we can get
lookup its unit in the mapping and lookup the symbol solely in the
handles of the dynamic libraries loaded for that unit.
In one measurement, the wait time before the expression was executed
went from +-38 seconds down to +-2s.
This commit also includes Note [Symbols may not be found in pkgs_loaded],
explaining the fallback to the old behaviour in case no dll can be found
in the unit mapping for a given Name.
Fixes #23415
Co-authored-by: Rodrigo Mesquita (@alt-romes)
- - - - -
9e24947f by Rodrigo Mesquita at 2024-12-09T08:02:43-08:00
rts: Make addDLL a wrapper around loadNativeObj
Rewrite the implementation of `addDLL` as a wrapper around the more
principled `loadNativeObj` rts linker function. The latter should be
preferred while the former is preserved for backwards compatibility.
`loadNativeObj` was previously only available on ELF platforms, so this
commit further refactors the rts linker to transform loadNativeObj_ELF
into loadNativeObj_POSIX, which is available in ELF and MachO platforms.
The refactor made it possible to remove the `dl_mutex` mutex in favour
of always using `linker_mutex` (rather than a combination of both).
Lastly, we implement `loadNativeObj` for Windows too.
- - - - -
82df3315 by Rodrigo Mesquita at 2024-12-09T08:05:17-08:00
Use symbol cache in internal interpreter too
This commit makes the symbol cache that was used by the external
interpreter available for the internal interpreter too.
This follows from the analysis in #23415 that suggests the internal
interpreter could benefit from this cache too, and that there is no good
reason not to have the cache for it too. It also makes it a bit more
uniform to have the symbol cache range over both the internal and
external interpreter.
This commit also refactors the cache into a function which is used by
both `lookupSymbol` and also by `lookupSymbolInDLL`, extending the
caching logic to `lookupSymbolInDLL` too.
- - - - -
2275dad5 by Ben Gamari at 2024-12-09T08:11:14-08:00
testsuite: Add test for lookupSymbolInNativeObj
- - - - -
37f0cf5c by Zubin Duggal at 2024-12-09T09:46:45-08:00
Don't store a GlobalRdrEnv in `mi_globals` for GHCi.
GHCi only needs the `mi_globals` field for modules imported with
:module +*SomeModule.
It uses this field to make the top level environment in `SomeModule` available
to the repl.
By default, only the first target in the command line parameters is
"star" loaded into GHCi. Other modules have to be manually "star" loaded
into the repl.
Storing the top level GlobalRdrEnv for each module is very wasteful, especially
given that we will most likely never need most of these environments.
Instead we store only the information needed to reconstruct the top level environment
in a module, which is the `IfaceTopEnv` data structure, consisting of all import statements
as well as all top level symbols defined in the module (not taking export lists into account)
When a particular module is "star-loaded" into GHCi (as the first commandline target, or via
an explicit `:module +*SomeModule`, we reconstruct the top level environment on demand using
the `IfaceTopEnv`.
- - - - -
55cf74b3 by Cheng Shao at 2024-12-09T09:46:45-08:00
driver: add -dep-json -opt-json flags to ghc -M
docs: document -dep-json -opt-json flags
Rework protocol
merge opt-json into dep-json
normalize source filenames
include more canonical variant of the package id
choose the main library when -package matches multiple units with the same version
allow specifying library deps with -package pkg:lib
Backported to GHC 9.10
- - - - -
d8900f97 by Torsten Schmits at 2024-12-09T09:46:45-08:00
Parallelize getRootSummary computations in dep analysis downsweep
This reuses the upsweep step's infrastructure to process batches of
modules in parallel.
I benchmarked this by running `ghc -M` on two sets of 10,000 modules;
one with a linear dependency chain and the other with a binary tree.
Comparing different values for the number of modules per thread
suggested an optimum at `length targets `div` (n_cap * 2)`, with results
similar to this one (6 cores, 12 threads):
```
Benchmark 1: linear 1 jobs
Time (mean ± σ): 1.775 s ± 0.026 s [User: 1.377 s, System: 0.399 s]
Range (min … max): 1.757 s … 1.793 s 2 runs
Benchmark 2: linear 6 jobs
Time (mean ± σ): 876.2 ms ± 20.9 ms [User: 1833.2 ms, System: 518.6 ms]
Range (min … max): 856.2 ms … 898.0 ms 3 runs
Benchmark 3: linear 12 jobs
Time (mean ± σ): 793.5 ms ± 23.2 ms [User: 2318.9 ms, System: 718.6 ms]
Range (min … max): 771.9 ms … 818.0 ms 3 runs
```
Results don't differ much when the batch size is reduced to a quarter
of that, but there's significant thread scheduling overhead for a size
of 1:
```
Benchmark 1: linear 1 jobs
Time (mean ± σ): 2.611 s ± 0.029 s [User: 2.851 s, System: 0.783 s]
Range (min … max): 2.591 s … 2.632 s 2 runs
Benchmark 2: linear 6 jobs
Time (mean ± σ): 1.189 s ± 0.007 s [User: 2.707 s, System: 1.103 s]
Range (min … max): 1.184 s … 1.194 s 2 runs
Benchmark 3: linear 12 jobs
Time (mean ± σ): 1.097 s ± 0.006 s [User: 2.938 s, System: 1.300 s]
Range (min … max): 1.093 s … 1.101 s 2 runs
```
Larger batches also slightly worsen performance.
- - - - -
1fd9b9b0 by Ben Gamari at 2025-07-09T13:41:43+02:00
testsuite: Add broken test for CApiFFI with -fprefer-bytecode
See #24634.
- - - - -
c9cf4bb9 by Fendor at 2025-07-09T13:41:51+02:00
Typecheck corebindings lazily during bytecode generation
This delays typechecking the corebindings until the bytecode generation
happens.
We also avoid allocating a thunk that is retained by `unsafeInterleaveIO`.
In general, we shouldn't retain values of the hydrated `Type`, as not evaluating
the bytecode object keeps it alive.
It is better if we retain the unhydrated `IfaceType`.
See Note [Hydrating Modules]
- - - - -
7812dbe8 by Sylvain Henry at 2025-07-09T13:42:51+02:00
Linker: some refactoring to prepare for #24886
- Rename LoadedBCOs into LazyBCOs
- Bundle SptEntries with CompiledByteCode and removed [SptEntry] field
from the BCOs constructor
- Rename Linkable's LM constructor into Linkable: in the past we had LM
and LP for Module and Package, now we only have the former.
- Rename Unlinked into LinkablePart (and linkableUnlinked into
linkableParts)
- Use NonEmpty to encode invariant in Linkable's linkableParts type
- Add helpers: linkableLibs, linkableBCOs, etc.
- Add documentation
- Remove partial nameOfObject
- Rename nameOfObject_maybe into linkablePartPath
- Rename byteCodeOfObject into linkablePartAllBCOs.
- Refactor linkablePartAllBCOs to avoid a panic if a LazyBCO has a C
stub. Document the fact that LazyBCOs are returned in this case
(contrary to linkableBCOs which only returns non-lazy ones)
Refactoring done while trying to understand how to adapt the linker code
to support the JS backend too (cf #24886).
- - - - -
5cbf25ba by Cheng Shao at 2025-07-09T23:00:48+02:00
compiler: Store ForeignStubs and foreign C files in interfaces
This data is used alongside Core bindings to reconstruct intermediate
build products when linking Template Haskell splices with bytecode.
Since foreign stubs and files are generated in the pipeline, they were
lost with only Core bindings stored in interfaces.
The interface codec type `IfaceForeign` contains a simplified
representation of `ForeignStubs` and the set of foreign sources that
were manually added by the user.
When the backend phase writes an interface, `mkFullIface` calls
`encodeIfaceForeign` to read foreign source file contents and assemble
`IfaceForeign`.
After the recompilation status check of an upstream module,
`initWholeCoreBindings` calls `decodeIfaceForeign` to restore
`ForeignStubs` and write the contents of foreign sources to the file
system as temporary files.
The restored foreign inputs are then processed by `hscInteractive` in
the same manner as in a regular pipeline.
When linking the stub objects for splices, they are excluded from suffix
adjustment for the interpreter way through a new flag in `Unlinked`.
For details about these processes, please consult Note [Foreign stubs
and TH bytecode linking].
Metric Decrease:
T13701
- - - - -
058b242b by Torsten Schmits at 2025-07-09T23:00:48+02:00
Build foreign objects for TH with interpreter's way when loading from iface
Fixes #25211
When linking bytecode for TH from interface core bindings with
`-fprefer-byte-code`, foreign sources are loaded from the interface as
well and compiled to object code in an ad-hoc manner.
The results are then loaded by the interpreter, whose way may differ
from the current build's target way.
This patch ensures that foreign objects are compiled with the
interpreter's way.
- - - - -
9e7ce01f by Cheng Shao at 2025-07-09T23:00:48+02:00
Link bytecode from interface-stored core bindings in oneshot mode
!13042
Part of #T25090
If the flag `-fprefer-byte-code` is given when compiling a module
containing TH, GHC will use Core bindings stored in interfaces to
compile and link bytecode for splices.
This was only implemented for `--make` mode initially, so this commit
adds the same mechanism to oneshot mode (`-c`).
When an interface is loaded into the EPS in `loadInterface` that has
dehydrated Core bindings, an entry is added to the new field
`eps_iface_bytecode`, containing an IO action that produces a bytecode
`Linkable`, lazily processing the `mi_extra_decls` by calling
`loadIfaceByteCode`.
When Template Haskell dependencies are resolved in `getLinkDeps`, this
action is looked up after loading a module's interface.
If it exists, the action is evaluated and the bytecode is added to the
set of `Linkable`s used for execution of the splice; otherwise it falls
back on the traditional object file.
Metric Decrease:
MultiLayerModules
T13701
- - - - -
501a027c by Cheng Shao at 2025-07-09T23:00:48+02:00
testsuite: add T25414 test case marked as broken
This commit adds T25414 test case to demonstrate #25414. It is marked
as broken and will be fixed by the next commit.
- - - - -
2b97ea5e by Cheng Shao at 2025-07-09T23:00:48+02:00
driver: fix foreign stub handling logic in hscParsedDecls
This patch fixes foreign stub handling logic in `hscParsedDecls`.
Previously foreign stubs were simply ignored here, so any feature that
involve foreign stubs would not work in ghci (e.g. CApiFFI). The patch
reuses `generateByteCode` logic and eliminates a large chunk of
duplicate logic that implements Core to bytecode generation pipeline
here. Fixes #25414.
- - - - -
3668b3e3 by Torsten Schmits at 2025-07-09T23:00:48+02:00
Link interface bytecode from package DBs if possible
Part of #25090.
MR !13068
When splices are executed with `-fprefer-byte-code`, the loader will
compile Core bindings to bytecode if those are present in interfaces of
module dependencies.
So far, this only applied to local modules (i.e. home modules in make
mode and non-package deps in oneshot mode).
This patch extends support to interfaces loaded from a package DB.
In `getLinkDeps`, the dependencies chosen for recursion were restricted
to `dep_direct_mods`, which has been changed to include external
dependencies, stored in a new field named `dep_direct_pkg_mods`.
In order to unify treatment of the different link variants across
make/oneshot mode, the algorithm's intermediate results have been
abstracted into the data types `LinkDep` and `LinkModule`.
Metric Decrease:
MultiLayerModulesTH_Make
MultiLayerModulesTH_OneShot
- - - - -
8918fb72 by Cheng Shao at 2025-07-09T23:00:48+02:00
compiler: implement --show-iface-abi-hash major mode
- - - - -
2eac507f by Ian-Woo Kim at 2025-07-09T23:00:48+02:00
set extra_decls = Nothing in interpreter after interface generation
- - - - -
75c6f24b by Ben Gamari at 2025-07-09T23:00:48+02:00
rts: Tighten up invariants of PACK
- - - - -
1bd1bdbe by Ben Gamari at 2025-07-09T23:00:48+02:00
StgToByteCode: Don't assume that data con workers are nullary
Previously StgToByteCode assumed that all data-con workers were of a
nullary representation. This is not a valid assumption, as seen
in #23210, where an unsaturated application of a unary data
constructor's worker resulted in invalid bytecode. Sadly, I have not yet
been able to reduce a minimal testcase for this.
Fixes #23210.
- - - - -
4c808a96 by Cheng Shao at 2025-07-09T23:00:48+02:00
driver: fix hpc undefined symbol issue in TH with -fprefer-byte-code
This commit fixes an undefined symbol error in RTS linker when
attempting to compile home modules with -fhpc and
-fbyte-code-and-object-code/-fprefer-byte-code, see #25510 for
detailed description and analysis of the bug.
Also adds T25510/T25510c regression tests to test make mode/oneshot
mode of the bug.
backported to GHC 9.10.
- - - - -
c8d26872 by Rebecca Turner at 2025-07-09T23:00:48+02:00
ghc-internal: No trailing whitespace in exceptions
This is a backport of the *behavior* in
https://gitlab.haskell.org/ghc/ghc/-/commit/bfe600f5bb3ecd2c8fa71c536c63d3c…
The commit upstream depends on a bunch of other changes to the exception
reporting infrastructure, so I've chosen to recreate its behavior here
rather than pulling in all the dependent patches.
This fixes a regression where GHC 9.10.1 adds a trailing newline to the
`displayException` implementation for `SomeException`. This has been
reverted in `master` but 9.10.2 isn't out yet and there's various
changes the upstream commit depends on, so this is a simple one-line
fix.
See: https://gitlab.haskell.org/ghc/ghc/-/issues/25052
- - - - -
661995d3 by Torsten Schmits at 2025-07-09T23:00:49+02:00
refactor quadratic search in warnMissingHomeModules
- - - - -
0a2b61de by Rodrigo Mesquita at 2025-07-09T23:00:49+02:00
Improve reachability queries on ModuleGraph
Introduces `ReachabilityIndex`, an index constructed from a
`GHC.Data.Graph.Directed` `Graph` that supports fast reachability
queries (in $O(1)$). This abstract data structure is exposed from
`GHC.Data.Graph.Directed.Reachability`.
This index is constructed from the module graph nodes and cached in
`ModuleGraph`, enabling efficient reachability queries on the module
graph. Previously, we'd construct a Map of Set of ModuleGraph nodes
which used a lot of memory (`O(n^2)` in the number of nodes) and cache
that in the `ModuleGraph`. By using the reachability index we get rid of
this space leak in the module graph -- even though the index is still
quadratic in the number of modules, it is much, much more space
efficient due to its representation using an IntMap of IntSet as opposed
to the transitive closure we previously cached.
In a memory profile of MultiLayerModules with 100x100 modules, memory
usage improved from 6GB residency to 2.8GB, out of which roughly 1.8GB
are caused by a second space leak related to ModuleGraph. On the same
program, it brings compile time from 7.5s to 5.5s.
Note how we simplify `checkHomeUnitsClosed` in terms of
`isReachableMany` and by avoiding constructing a second graph with the
full transitive closure -- it suffices to answer the reachability query
on the full graph without collapsing the transitive closure completely
into nodes.
Unfortunately, solving this leak means we have to do a little bit more
work since we can no longer cache the result of turning vertex indices
into nodes. This results in a slight regression in MultiLayerModulesTH_Make,
but results in large performance and memory wins when compiling large
amounts of modules.
-------------------------
Metric Decrease:
mhu-perf
Metric Increase:
MultiLayerModulesTH_Make
-------------------------
- - - - -
b3079fa3 by Ian-Woo Kim at 2025-07-09T23:00:49+02:00
similarize the parallel downsweep to GHC HEAD version.
- - - - -
b6cd4810 by Matthew Pickering at 2025-07-09T23:00:49+02:00
Use deterministic names for temporary files
When there are multiple threads they can race to create a temporary
file, in some situations the thread will create ghc_1.c and in some it
will create ghc_2.c. This filename ends up in the debug info for object
files after compiling a C file, therefore contributes to object
nondeterminism.
In order to fix this we store a prefix in `TmpFs` which serves to
namespace temporary files. The prefix is populated from the counter in
TmpFs when the TmpFs is forked. Therefore the TmpFs must be forked
outside the thread which consumes it, in a deterministic order, so each
thread always receives a TmpFs with the same prefix.
This assumes that after the initial TmpFs is created, all other TmpFs
are created from forking the original TmpFs. Which should have been try
anyway as otherwise there would be file collisions and non-determinism.
Fixes #25224
- - - - -
f6d625eb by Ian-Woo Kim at 2025-07-09T23:00:49+02:00
monotonic FinderCache. missed part from parallel downsweep latest GHC HEAD patch
- - - - -
0d3a068a by Andreas Klebinger at 2025-07-09T23:00:49+02:00
SpecConstr: Introduce a separate argument limit for forced specs.
We used to put no limit at all on specializations forced via the SPEC
argument. This isn't always reasonable so we introduce a very high limit
that applies to forced specializations, a flag to control it, and we now
emit a warning if we fail a specialization because we exceed the
warning.
Fixes #25197
- - - - -
6eba53b2 by Ian-Woo Kim at 2025-07-10T12:40:09+02:00
No in-memory resident mi_extra_decls in compilation.
They are transiently loaded and removed after byte-code generation.
- - - - -
207e5674 by Georgios Karachalias at 2025-12-02T22:28:52+01:00
Use OsPath in PkgDbRef and UnitDatabase, not FilePath
- - - - -
fd00538d by Matthew Pickering at 2025-12-12T01:48:57+01:00
Various downsweep perf tweaks
- - - - -
f2fab894 by Torsten Schmits at 2025-12-12T01:48:57+01:00
Abstract out parts of mkUnitState into a handler type
- - - - -
8a88d4ee by Torsten Schmits at 2025-12-12T01:48:57+01:00
Abstract out module provider queries into a handler type
- - - - -
66c776ea by Torsten Schmits at 2025-12-12T01:48:57+01:00
Use unit index for name printing
- - - - -
b989904c by Fendor at 2026-01-16T17:26:40+01:00
Bunch of backports
- - - - -
ff5e16b0 by Sjoerd Visscher at 2026-03-13T16:20:54+01:00
Don't store boot locations in finder cache
Partially reverts commit fff55592a7b
Amends add(Home)ModuleToFinder so that locations for boot files are not stored in the finder cache.
Removes InstalledModule field from InstalledFound constructor since it's the same as the key that was searched for.
- - - - -
ffceb7e6 by Sjoerd Visscher at 2026-03-13T16:36:00+01:00
Concentrate boot extension logic in Finder
With new mkHomeModLocation that takes an extra HscSource to add boot extensions if required.
- - - - -
65d1ec83 by Torsten Schmits at 2026-03-13T16:39:40+01:00
Add a complete pragma for `ModLocation`
- - - - -
2a1c0d24 by Torsten Schmits at 2026-04-17T01:38:02+02:00
Fixed nodes
- - - - -
496 changed files:
- .gitlab-ci.yml
- .gitlab/rel_eng/mk-ghcup-metadata/mk_ghcup_metadata.py
- .gitlab/rel_eng/recompress-all
- .gitlab/rel_eng/upload.sh
- compiler/GHC.hs
- compiler/GHC/Builtin/Names/TH.hs
- compiler/GHC/Builtin/Types.hs
- compiler/GHC/ByteCode/Asm.hs
- compiler/GHC/ByteCode/Linker.hs
- compiler/GHC/ByteCode/Types.hs
- compiler/GHC/Cmm/CLabel.hs
- compiler/GHC/Core/Map/Expr.hs
- compiler/GHC/Core/Opt/Pipeline.hs
- compiler/GHC/Core/Opt/Simplify/Utils.hs
- compiler/GHC/Core/Opt/SpecConstr.hs
- compiler/GHC/Core/Rules.hs
- compiler/GHC/Core/TyCo/Rep.hs
- compiler/GHC/Core/TyCo/Subst.hs
- compiler/GHC/Core/Type.hs
- compiler/GHC/CoreToIface.hs
- compiler/GHC/CoreToStg/Prep.hs
- compiler/GHC/Data/FastString.hs
- + compiler/GHC/Data/FlatBag.hs
- compiler/GHC/Data/Graph/Directed.hs
- + compiler/GHC/Data/Graph/Directed/Internal.hs
- + compiler/GHC/Data/Graph/Directed/Reachability.hs
- compiler/GHC/Data/IOEnv.hs
- + compiler/GHC/Data/OsPath.hs
- compiler/GHC/Data/SmallArray.hs
- compiler/GHC/Data/Strict.hs
- compiler/GHC/Data/TrieMap.hs
- compiler/GHC/Driver/Backend.hs
- compiler/GHC/Driver/Backpack.hs
- compiler/GHC/Driver/CodeOutput.hs
- compiler/GHC/Driver/Config/Finder.hs
- compiler/GHC/Driver/Config/StgToCmm.hs
- compiler/GHC/Driver/DynFlags.hs
- compiler/GHC/Driver/Env.hs
- compiler/GHC/Driver/Flags.hs
- compiler/GHC/Driver/Hooks.hs
- compiler/GHC/Driver/Main.hs
- + compiler/GHC/Driver/Main.hs-boot
- compiler/GHC/Driver/Make.hs
- compiler/GHC/Driver/MakeFile.hs
- + compiler/GHC/Driver/MakeFile/JSON.hs
- compiler/GHC/Driver/Phases.hs
- compiler/GHC/Driver/Pipeline.hs
- compiler/GHC/Driver/Pipeline/Execute.hs
- compiler/GHC/Driver/Plugins.hs
- compiler/GHC/Driver/Session.hs
- compiler/GHC/Hs.hs
- compiler/GHC/Hs/Binds.hs
- compiler/GHC/Hs/Decls.hs
- compiler/GHC/Hs/Expr.hs
- compiler/GHC/Hs/Instances.hs
- compiler/GHC/Hs/Pat.hs
- compiler/GHC/Hs/Syn/Type.hs
- compiler/GHC/Hs/Type.hs
- compiler/GHC/Hs/Utils.hs
- compiler/GHC/HsToCore.hs
- compiler/GHC/HsToCore/Arrows.hs
- compiler/GHC/HsToCore/Coverage.hs
- compiler/GHC/HsToCore/Expr.hs
- compiler/GHC/HsToCore/Match.hs
- compiler/GHC/HsToCore/Monad.hs
- compiler/GHC/HsToCore/Pmc/Desugar.hs
- compiler/GHC/HsToCore/Quote.hs
- compiler/GHC/HsToCore/Ticks.hs
- compiler/GHC/HsToCore/Usage.hs
- compiler/GHC/HsToCore/Utils.hs
- compiler/GHC/Iface/Binary.hs
- compiler/GHC/Iface/Decl.hs
- compiler/GHC/Iface/Env.hs
- compiler/GHC/Iface/Errors.hs
- compiler/GHC/Iface/Ext/Ast.hs
- compiler/GHC/Iface/Ext/Binary.hs
- compiler/GHC/Iface/Ext/Fields.hs
- compiler/GHC/Iface/Ext/Utils.hs
- compiler/GHC/Iface/Load.hs
- compiler/GHC/Iface/Make.hs
- compiler/GHC/Iface/Recomp.hs
- compiler/GHC/Iface/Recomp/Binary.hs
- compiler/GHC/Iface/Recomp/Flags.hs
- compiler/GHC/Iface/Rename.hs
- compiler/GHC/Iface/Syntax.hs
- compiler/GHC/Iface/Tidy.hs
- compiler/GHC/Iface/Type.hs
- compiler/GHC/IfaceToCore.hs
- compiler/GHC/IfaceToCore.hs-boot
- compiler/GHC/Linker/Deps.hs
- compiler/GHC/Linker/ExtraObj.hs
- compiler/GHC/Linker/Loader.hs
- compiler/GHC/Linker/MacOS.hs
- compiler/GHC/Linker/Static.hs
- compiler/GHC/Linker/Types.hs
- compiler/GHC/Parser.y
- compiler/GHC/Parser/Annotation.hs
- compiler/GHC/Parser/PostProcess.hs
- compiler/GHC/Rename/Bind.hs
- compiler/GHC/Rename/Env.hs
- compiler/GHC/Rename/Expr.hs
- compiler/GHC/Rename/HsType.hs
- compiler/GHC/Rename/Module.hs
- compiler/GHC/Rename/Names.hs
- compiler/GHC/Rename/Pat.hs
- compiler/GHC/Rename/Unbound.hs
- compiler/GHC/Rename/Utils.hs
- compiler/GHC/Runtime/Context.hs
- compiler/GHC/Runtime/Eval.hs
- compiler/GHC/Runtime/Interpreter.hs
- compiler/GHC/Runtime/Interpreter/JS.hs
- compiler/GHC/Runtime/Interpreter/Types.hs
- compiler/GHC/Runtime/Loader.hs
- compiler/GHC/Runtime/Utils.hs
- compiler/GHC/Stg/CSE.hs
- compiler/GHC/Stg/Utils.hs
- compiler/GHC/StgToByteCode.hs
- compiler/GHC/StgToCmm.hs
- compiler/GHC/StgToCmm/Config.hs
- compiler/GHC/StgToCmm/Hpc.hs
- compiler/GHC/StgToCmm/Ticky.hs
- compiler/GHC/StgToJS/Apply.hs
- compiler/GHC/StgToJS/Expr.hs
- compiler/GHC/StgToJS/Linker/Linker.hs
- compiler/GHC/StgToJS/Linker/Utils.hs
- compiler/GHC/StgToJS/Literal.hs
- compiler/GHC/StgToJS/Object.hs
- compiler/GHC/StgToJS/Rts/Rts.hs
- compiler/GHC/SysTools/Cpp.hs
- compiler/GHC/Tc/Deriv/Functor.hs
- compiler/GHC/Tc/Deriv/Generate.hs
- compiler/GHC/Tc/Errors/Hole.hs
- compiler/GHC/Tc/Errors/Ppr.hs
- compiler/GHC/Tc/Errors/Types.hs
- compiler/GHC/Tc/Gen/App.hs
- compiler/GHC/Tc/Gen/Bind.hs
- compiler/GHC/Tc/Gen/Do.hs
- compiler/GHC/Tc/Gen/Expr.hs
- compiler/GHC/Tc/Gen/Foreign.hs
- compiler/GHC/Tc/Gen/Head.hs
- compiler/GHC/Tc/Gen/HsType.hs
- compiler/GHC/Tc/Gen/Pat.hs
- compiler/GHC/Tc/Gen/Splice.hs
- compiler/GHC/Tc/Gen/Splice.hs-boot
- compiler/GHC/Tc/Instance/Family.hs
- compiler/GHC/Tc/Module.hs
- compiler/GHC/Tc/TyCl/PatSyn.hs
- compiler/GHC/Tc/Types.hs
- compiler/GHC/Tc/Utils/Backpack.hs
- compiler/GHC/Tc/Utils/Monad.hs
- compiler/GHC/Tc/Zonk/Type.hs
- compiler/GHC/ThToHs.hs
- compiler/GHC/Types/Basic.hs
- compiler/GHC/Types/Error/Codes.hs
- compiler/GHC/Types/FieldLabel.hs
- compiler/GHC/Types/Name.hs
- compiler/GHC/Types/Name/Occurrence.hs
- compiler/GHC/Types/Name/Ppr.hs
- compiler/GHC/Types/Name/Reader.hs
- compiler/GHC/Types/PkgQual.hs
- compiler/GHC/Types/SourceText.hs
- + compiler/GHC/Types/SptEntry.hs
- compiler/GHC/Types/SrcLoc.hs
- compiler/GHC/Types/Unique/Set.hs
- compiler/GHC/Types/Unique/Supply.hs
- compiler/GHC/Types/Var.hs
- compiler/GHC/Unit/Env.hs
- compiler/GHC/Unit/External.hs
- compiler/GHC/Unit/Finder.hs
- compiler/GHC/Unit/Finder/Types.hs
- + compiler/GHC/Unit/Home/Graph.hs
- compiler/GHC/Unit/Home/ModInfo.hs
- + compiler/GHC/Unit/Home/PackageTable.hs
- compiler/GHC/Unit/Info.hs
- compiler/GHC/Unit/Module/Graph.hs
- compiler/GHC/Unit/Module/Location.hs
- compiler/GHC/Unit/Module/ModGuts.hs
- compiler/GHC/Unit/Module/ModIface.hs
- compiler/GHC/Unit/Module/ModSummary.hs
- compiler/GHC/Unit/Module/Status.hs
- compiler/GHC/Unit/Module/Warnings.hs
- compiler/GHC/Unit/Module/WholeCoreBindings.hs
- compiler/GHC/Unit/State.hs
- compiler/GHC/Utils/Binary.hs
- compiler/GHC/Utils/Binary/Typeable.hs
- compiler/GHC/Utils/Logger.hs
- compiler/GHC/Utils/TmpFs.hs
- compiler/Language/Haskell/Syntax/Binds.hs
- compiler/Language/Haskell/Syntax/Expr.hs
- compiler/Language/Haskell/Syntax/Extension.hs
- compiler/Language/Haskell/Syntax/ImpExp.hs
- compiler/Language/Haskell/Syntax/Pat.hs
- compiler/Language/Haskell/Syntax/Type.hs
- compiler/Language/Haskell/Syntax/Type.hs-boot
- compiler/cbits/genSym.c
- compiler/ghc.cabal.in
- configure.ac
- distrib/configure.ac.in
- docs/index.html.in
- docs/users_guide/9.10.1-notes.rst
- − docs/users_guide/9.6.1-notes.rst
- − docs/users_guide/9.8.1-notes.rst
- docs/users_guide/conf.py
- docs/users_guide/expected-undocumented-flags.txt
- docs/users_guide/exts/ffi.rst
- docs/users_guide/phases.rst
- docs/users_guide/separate_compilation.rst
- docs/users_guide/using-optimisation.rst
- docs/users_guide/using.rst
- ghc/GHCi/Leak.hs
- ghc/GHCi/UI.hs
- ghc/GHCi/UI/Info.hs
- ghc/GHCi/UI/Monad.hs
- ghc/Main.hs
- ghc/ghc-bin.cabal.in
- hadrian/bindist/Makefile
- hadrian/bootstrap/generate_bootstrap_plans
- − hadrian/bootstrap/plan-9_4_1.json
- − hadrian/bootstrap/plan-9_4_2.json
- − hadrian/bootstrap/plan-9_4_3.json
- − hadrian/bootstrap/plan-9_4_6.json
- − hadrian/bootstrap/plan-9_4_7.json
- hadrian/bootstrap/plan-9_4_8.json
- hadrian/bootstrap/plan-9_6_1.json
- hadrian/bootstrap/plan-9_6_2.json
- hadrian/bootstrap/plan-9_6_3.json
- hadrian/bootstrap/plan-9_6_4.json
- hadrian/bootstrap/plan-9_4_5.json → hadrian/bootstrap/plan-9_6_5.json
- hadrian/bootstrap/plan-9_8_1.json
- hadrian/bootstrap/plan-9_4_4.json → hadrian/bootstrap/plan-9_8_2.json
- − hadrian/bootstrap/plan-bootstrap-9_4_2.json
- − hadrian/bootstrap/plan-bootstrap-9_4_3.json
- − hadrian/bootstrap/plan-bootstrap-9_4_4.json
- − hadrian/bootstrap/plan-bootstrap-9_4_6.json
- − hadrian/bootstrap/plan-bootstrap-9_4_7.json
- hadrian/bootstrap/plan-bootstrap-9_4_8.json
- hadrian/bootstrap/plan-bootstrap-9_6_1.json
- hadrian/bootstrap/plan-bootstrap-9_6_2.json
- hadrian/bootstrap/plan-bootstrap-9_6_3.json
- hadrian/bootstrap/plan-bootstrap-9_6_4.json
- hadrian/bootstrap/plan-bootstrap-9_4_5.json → hadrian/bootstrap/plan-bootstrap-9_6_5.json
- hadrian/bootstrap/plan-bootstrap-9_8_1.json
- hadrian/bootstrap/plan-bootstrap-9_4_1.json → hadrian/bootstrap/plan-bootstrap-9_8_2.json
- hadrian/cfg/system.config.in
- hadrian/src/Builder.hs
- hadrian/src/Hadrian/Haskell/Cabal/Parse.hs
- hadrian/src/Rules/BinaryDist.hs
- hadrian/src/Rules/Dependencies.hs
- hadrian/src/Rules/Generate.hs
- hadrian/src/Rules/Gmp.hs
- libffi-tarballs
- libraries/Cabal
- libraries/array
- libraries/base/changelog.md
- libraries/base/src/GHC/IO/Encoding/Iconv.hs
- libraries/base/src/GHC/Pack.hs
- libraries/binary
- libraries/ghc-bignum/gmp/gmp-tarballs
- − libraries/ghc-bignum/gmp/gmpsrc.patch
- − libraries/ghc-bignum/gmp/ln
- libraries/ghc-boot/GHC/Utils/Encoding.hs
- libraries/ghc-internal/src/GHC/Internal/Exception/Type.hs
- libraries/ghc-internal/src/GHC/Internal/Foreign/Marshal/Error.hs
- libraries/ghc-internal/src/GHC/Internal/List.hs
- libraries/ghc-internal/src/GHC/Internal/RTS/Flags.hsc
- libraries/ghc-internal/src/GHC/Internal/System/Environment.hs
- libraries/ghc-internal/src/GHC/Internal/System/Environment/Blank.hsc
- libraries/ghci/GHCi/CreateBCO.hs
- libraries/ghci/GHCi/Message.hs
- libraries/ghci/GHCi/ObjLink.hs
- libraries/ghci/GHCi/ResolvedBCO.hs
- libraries/ghci/GHCi/Run.hs
- libraries/ghci/GHCi/TH/Binary.hs
- libraries/parsec
- libraries/process
- libraries/stm
- libraries/template-haskell/Language/Haskell/TH.hs
- libraries/template-haskell/Language/Haskell/TH/Lib.hs
- libraries/template-haskell/Language/Haskell/TH/Lib/Internal.hs
- libraries/template-haskell/Language/Haskell/TH/Ppr.hs
- libraries/template-haskell/Language/Haskell/TH/Syntax.hs
- libraries/template-haskell/changelog.md
- libraries/unix
- m4/fp_cc_linker_flag_try.m4
- m4/fp_settings.m4
- mk/relpath.sh
- rts/ARMOutlineAtomicsSymbols.h
- rts/CheckUnload.c
- rts/Interpreter.c
- rts/Linker.c
- rts/LinkerInternals.h
- rts/RtsSymbols.c
- rts/include/rts/Linker.h
- rts/include/rts/storage/InfoTables.h
- rts/js/string.js
- rts/linker/Elf.c
- rts/linker/Elf.h
- + rts/linker/LoadNativeObjPosix.c
- + rts/linker/LoadNativeObjPosix.h
- rts/linker/PEi386.c
- rts/linker/PEi386.h
- rts/rts.cabal
- + testsuite/tests/bytecode/T24634/Hello.hs
- + testsuite/tests/bytecode/T24634/Main.hs
- + testsuite/tests/bytecode/T24634/Makefile
- + testsuite/tests/bytecode/T24634/T24634a.stdout
- + testsuite/tests/bytecode/T24634/T24634b.stdout
- + testsuite/tests/bytecode/T24634/all.T
- + testsuite/tests/bytecode/T24634/hello_c.c
- + testsuite/tests/bytecode/T24634/hello_c.h
- + testsuite/tests/bytecode/T25090/A.hs
- + testsuite/tests/bytecode/T25090/B.hs
- + testsuite/tests/bytecode/T25090/C.hs
- + testsuite/tests/bytecode/T25090/C.hs-boot
- + testsuite/tests/bytecode/T25090/D.hs
- + testsuite/tests/bytecode/T25090/Dep.hs
- + testsuite/tests/bytecode/T25090/DepApi.hs
- + testsuite/tests/bytecode/T25090/Local.hs
- + testsuite/tests/bytecode/T25090/Makefile
- + testsuite/tests/bytecode/T25090/Num.hs
- + testsuite/tests/bytecode/T25090/Num.hs-boot
- + testsuite/tests/bytecode/T25090/PkgBytecode.hs
- + testsuite/tests/bytecode/T25090/PkgBytecode.stdout
- + testsuite/tests/bytecode/T25090/T25090-debug.stderr
- + testsuite/tests/bytecode/T25090/T25090.stdout
- + testsuite/tests/bytecode/T25090/all.T
- + testsuite/tests/bytecode/T25090/dep.conf
- + testsuite/tests/bytecode/T25090/prep.bash
- + testsuite/tests/bytecode/T25090/run.bash
- + testsuite/tests/bytecode/T25090/unit1
- + testsuite/tests/bytecode/T25090/unit2
- + testsuite/tests/bytecode/T25510/Makefile
- + testsuite/tests/bytecode/T25510/T25510A.hs
- + testsuite/tests/bytecode/T25510/T25510B.hs
- + testsuite/tests/bytecode/T25510/all.T
- + testsuite/tests/core-to-stg/T24463.hs
- testsuite/tests/core-to-stg/all.T
- testsuite/tests/count-deps/CountDepsAst.stdout
- testsuite/tests/count-deps/CountDepsParser.stdout
- + testsuite/tests/driver/T24384/A.hs
- + testsuite/tests/driver/T24384/B.hs
- + testsuite/tests/driver/T24384/C.hs
- + testsuite/tests/driver/T24384/C.hs-boot
- + testsuite/tests/driver/T24384/D.hs
- + testsuite/tests/driver/T24384/E.hs
- + testsuite/tests/driver/T24384/Makefile
- + testsuite/tests/driver/T24384/T24384.stdout
- + testsuite/tests/driver/T24384/all.T
- + testsuite/tests/driver/T24384/preproc.sh
- + testsuite/tests/driver/T24384/setup-dep.sh
- + testsuite/tests/driver/multipleHomeUnits/mhu-perf/Makefile
- + testsuite/tests/driver/multipleHomeUnits/mhu-perf/Setup.hs
- + testsuite/tests/driver/multipleHomeUnits/mhu-perf/all.T
- + testsuite/tests/driver/multipleHomeUnits/mhu-perf/genLargeHMU
- + testsuite/tests/driver/multipleHomeUnits/mhu-perf/mhu-perf.stderr
- testsuite/tests/ffi/should_fail/ccfail001.stderr
- + testsuite/tests/ffi/should_run/T24598.hs
- + testsuite/tests/ffi/should_run/T24598.stdout
- + testsuite/tests/ffi/should_run/T24598_cmm.cmm
- + testsuite/tests/ffi/should_run/T24598b.hs
- + testsuite/tests/ffi/should_run/T24598b.stdout
- + testsuite/tests/ffi/should_run/T24598b_cmm.cmm
- + testsuite/tests/ffi/should_run/T24598c.hs
- + testsuite/tests/ffi/should_run/T24598c.stdout
- + testsuite/tests/ffi/should_run/T24598c_cmm.cmm
- testsuite/tests/ffi/should_run/all.T
- testsuite/tests/ghc-api/T6145.hs
- testsuite/tests/ghc-api/exactprint/T22919.stderr
- testsuite/tests/ghc-api/exactprint/Test20239.stderr
- testsuite/tests/ghc-api/exactprint/ZeroWidthSemi.stderr
- testsuite/tests/ghci/linking/dyn/T3372.hs
- testsuite/tests/ghci/prog018/prog018.stdout
- testsuite/tests/ghci/scripts/T11098.stdout
- + testsuite/tests/ghci/scripts/T25414.script
- testsuite/tests/ghci/scripts/T9140.stdout
- testsuite/tests/ghci/scripts/all.T
- testsuite/tests/haddock/should_compile_flag_haddock/T17544.stderr
- testsuite/tests/haddock/should_compile_flag_haddock/T17544_kw.stderr
- testsuite/tests/haddock/should_compile_flag_haddock/T24221.stderr
- + testsuite/tests/javascript/Makefile
- + testsuite/tests/javascript/T24495.hs
- + testsuite/tests/javascript/T24495.stdout
- testsuite/tests/javascript/all.T
- testsuite/tests/layout/layout001.stdout
- testsuite/tests/layout/layout003.stdout
- testsuite/tests/layout/layout004.stdout
- testsuite/tests/layout/layout006.stdout
- testsuite/tests/linear/should_fail/LinearLet6.stderr
- testsuite/tests/linear/should_fail/LinearLet7.stderr
- testsuite/tests/module/mod185.stderr
- testsuite/tests/overloadedrecflds/ghci/GHCiDRF.stdout
- testsuite/tests/overloadedrecflds/ghci/T19314.stdout
- testsuite/tests/overloadedrecflds/ghci/duplicaterecfldsghci01.stdout
- testsuite/tests/overloadedrecflds/should_compile/T22424.hs
- testsuite/tests/parser/should_compile/DumpParsedAst.stderr
- testsuite/tests/parser/should_compile/DumpParsedAstComments.stderr
- testsuite/tests/parser/should_compile/DumpSemis.stderr
- testsuite/tests/parser/should_compile/KindSigs.stderr
- testsuite/tests/parser/should_compile/T15323.stderr
- testsuite/tests/parser/should_compile/T20452.stderr
- testsuite/tests/parser/should_compile/T20718.stderr
- testsuite/tests/parser/should_compile/T20718b.stderr
- testsuite/tests/parser/should_compile/T20846.stderr
- testsuite/tests/parser/should_compile/T23315/T23315.stderr
- + testsuite/tests/patsyn/should_run/T24552.hs
- + testsuite/tests/patsyn/should_run/T24552.stdout
- testsuite/tests/patsyn/should_run/all.T
- testsuite/tests/printer/AnnotationNoListTuplePuns.hs
- + testsuite/tests/printer/AnnotationNoListTuplePuns.stdout
- + testsuite/tests/printer/CaseAltComments.hs
- + testsuite/tests/printer/DataDeclShort.hs
- testsuite/tests/printer/Makefile
- + testsuite/tests/printer/MatchPatComments.hs
- testsuite/tests/printer/PprExportWarn.hs
- + testsuite/tests/printer/PprLetIn.hs
- + testsuite/tests/printer/PrefixConComment.hs
- testsuite/tests/printer/T18791.stderr
- testsuite/tests/printer/Test20297.stdout
- + testsuite/tests/printer/Test24533.hs
- + testsuite/tests/printer/Test24533.stdout
- + testsuite/tests/printer/Test24748.hs
- + testsuite/tests/printer/Test24749.hs
- + testsuite/tests/printer/Test24753.hs
- + testsuite/tests/printer/Test24754.hs
- + testsuite/tests/printer/Test24755.hs
- + testsuite/tests/printer/Test24771.hs
- testsuite/tests/printer/all.T
- testsuite/tests/process/all.T
- testsuite/tests/process/process004.stdout
- testsuite/tests/rename/should_compile/T13839.stdout
- testsuite/tests/rename/should_fail/T17594b.stderr
- testsuite/tests/rts/linker/T2615.hs
- + testsuite/tests/rts/linker/lookupSymbolInNativeObj/Makefile
- + testsuite/tests/rts/linker/lookupSymbolInNativeObj/all.T
- + testsuite/tests/rts/linker/lookupSymbolInNativeObj/lookupSymbolInNativeObj1.c
- + testsuite/tests/rts/linker/lookupSymbolInNativeObj/lookupSymbolInNativeObj1.stdout
- + testsuite/tests/rts/linker/lookupSymbolInNativeObj/obj.c
- testsuite/tests/rts/linker/unload_multiple_objs/linker_unload_multiple_objs.c
- testsuite/tests/saks/should_compile/saks018.hs
- testsuite/tests/saks/should_compile/saks021.hs
- testsuite/tests/saks/should_fail/all.T
- + testsuite/tests/saks/should_fail/saks018-fail.hs
- + testsuite/tests/saks/should_fail/saks018-fail.stderr
- + testsuite/tests/saks/should_fail/saks021-fail.hs
- + testsuite/tests/saks/should_fail/saks021-fail.stderr
- + testsuite/tests/simplCore/should_compile/T24551.hs
- + testsuite/tests/simplCore/should_compile/T24726.hs
- + testsuite/tests/simplCore/should_compile/T24726.stderr
- testsuite/tests/simplCore/should_compile/all.T
- testsuite/tests/th/T10945.hs
- + testsuite/tests/th/T24557a.hs
- + testsuite/tests/th/T24557a.stderr
- + testsuite/tests/th/T24557b.hs
- + testsuite/tests/th/T24557b.stderr
- + testsuite/tests/th/T24557c.hs
- + testsuite/tests/th/T24557c.stderr
- + testsuite/tests/th/T24557d.hs
- + testsuite/tests/th/T24557d.stderr
- + testsuite/tests/th/T24557e.hs
- + testsuite/tests/th/T24559.hs
- + testsuite/tests/th/T24571.hs
- + testsuite/tests/th/T24702a.hs
- + testsuite/tests/th/T24702b.hs
- testsuite/tests/th/T3899a.hs
- testsuite/tests/th/T5379.hs
- testsuite/tests/th/T5508.hs
- testsuite/tests/th/T5508.stderr
- testsuite/tests/th/T5700a.hs
- testsuite/tests/th/T7276a.stdout
- testsuite/tests/th/T8625.stdout
- testsuite/tests/th/T9022.hs
- testsuite/tests/th/TH_repPatSig_asserts.hs
- testsuite/tests/th/TH_tuple1.stdout
- testsuite/tests/th/all.T
- testsuite/tests/th/overloaded/TH_overloaded_extract.stdout
- + testsuite/tests/typecheck/should_compile/T24470b.hs
- testsuite/tests/typecheck/should_compile/all.T
- testsuite/tests/typecheck/should_fail/T17594c.stderr
- testsuite/tests/typecheck/should_fail/T17594d.stderr
- testsuite/tests/typecheck/should_fail/T17594g.stderr
- + testsuite/tests/typecheck/should_fail/T24470a.hs
- + testsuite/tests/typecheck/should_fail/T24470a.stderr
- testsuite/tests/typecheck/should_fail/all.T
- + testsuite/tests/vdq-rta/should_compile/T24570.hs
- testsuite/tests/vdq-rta/should_compile/all.T
- + testsuite/tests/vdq-rta/should_fail/T24604.hs
- + testsuite/tests/vdq-rta/should_fail/T24604.stderr
- + testsuite/tests/vdq-rta/should_fail/T24604a.hs
- + testsuite/tests/vdq-rta/should_fail/T24604a.stderr
- testsuite/tests/vdq-rta/should_fail/all.T
- testsuite/tests/warnings/should_fail/CaretDiagnostics1.stderr
- testsuite/tests/wasm/should_run/control-flow/LoadCmmGroup.hs
- utils/check-exact/ExactPrint.hs
- utils/check-exact/Main.hs
- utils/dump-decls/Main.hs
- utils/haddock
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/99d4164fcd5cbc23c1f00bf5fd2e8f…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/99d4164fcd5cbc23c1f00bf5fd2e8f…
You're receiving this email because of your account on gitlab.haskell.org.
1
0
[Git][ghc/ghc] Pushed new branch wip/torsten.schmits/mwb-26-01/fixed
by Torsten Schmits (@torsten.schmits) 17 Apr '26
by Torsten Schmits (@torsten.schmits) 17 Apr '26
17 Apr '26
Torsten Schmits pushed new branch wip/torsten.schmits/mwb-26-01/fixed at Glasgow Haskell Compiler / GHC
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/torsten.schmits/mwb-26-01/fix…
You're receiving this email because of your account on gitlab.haskell.org.
1
0
16 Apr '26
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
d6ce7477 by Richard Eisenberg at 2026-04-16T19:23:25-04:00
Teach hadrian to --skip-test.
Fixes #27188.
This adds the --skip-test flag to `hadrian build`, as documented in the
patch.
- - - - -
8 changed files:
- + changelog.d/skip-test
- hadrian/doc/make.md
- hadrian/doc/testsuite.md
- hadrian/src/CommandLine.hs
- hadrian/src/Settings/Builders/RunTest.hs
- testsuite/driver/runtests.py
- testsuite/driver/testglobals.py
- testsuite/driver/testlib.py
Changes:
=====================================
changelog.d/skip-test
=====================================
@@ -0,0 +1,13 @@
+section: build-tools
+synopsis: The testsuite driver and Hadrian now support a ``--skip-test`` flag
+ (``--skip`` in the Python driver) to skip specific tests.
+issues: #27188
+mrs: !15915
+
+description: {
+ A new ``--skip-test`` flag has been added to Hadrian, passed through
+ as ``--skip`` to the testsuite driver. This is the complement of
+ ``--only``: it removes named tests from the set of tests to run.
+ If a test appears in both ``--only`` and ``--skip-test``, it is skipped.
+ Multiple ``--skip-test`` flags are unioned together.
+}
=====================================
hadrian/doc/make.md
=====================================
@@ -133,7 +133,8 @@ time you fire up a build. This is not possible with the Make build system.
As illustrated in the examples above, you can use the `TEST` environment
variable, the `--only=...` flag or even both to restrict your testsuite run
- to some (usually small) subset of the testsuite.
+ to some (usually small) subset of the testsuite. You can also skip specific
+ tests with `--skip-test=...` (e.g. `build test --skip-test="test1 test2"`).
See [the docs for the test rules](./testsuite.md) if you want to know about
all the options that hadrian supports and what they correspond to in the Make
=====================================
hadrian/doc/testsuite.md
=====================================
@@ -60,6 +60,29 @@ TEST="test1 test2" build test
TEST="test1 test2" build test --only="test3 test4"
```
+### Skipping specific tests
+
+You can use the `--skip-test=...` command line argument to skip specific
+tests. This is useful when some tests are known to fail or are too slow
+in your environment.
+
+``` sh
+# skip the test named 'slowtest'
+build test --skip-test=slowtest
+
+# skip 'test1' and 'test2'
+build test --skip-test="test1 test2"
+```
+
+`--skip-test` can be combined with `--only`: if a test appears in both,
+it is skipped. This lets you start from a set of tests and then subtract
+from it:
+
+``` sh
+# run test1 and test3, but not test2
+build test --only="test1 test2 test3" --skip-test=test2
+```
+
### Whole directories of tests
You can also ask Hadrian to run all the tests that live under one or
=====================================
hadrian/src/CommandLine.hs
=====================================
@@ -71,6 +71,7 @@ data TestArgs = TestArgs
, testJUnit :: Maybe FilePath
, testMetricsFile:: Maybe FilePath
, testOnly :: [String]
+ , testSkip :: [String]
, testOnlyPerf :: Bool
, testSkipPerf :: Bool
, testRootDirs :: [FilePath]
@@ -100,6 +101,7 @@ defaultTestArgs = TestArgs
, testJUnit = Nothing
, testMetricsFile= Nothing
, testOnly = []
+ , testSkip = []
, testOnlyPerf = False
, testSkipPerf = False
, testRootDirs = []
@@ -191,6 +193,13 @@ readTestOnly tests = Right $ \flags ->
where tests' = maybe [] words tests
tests'' flags = testOnly (testArgs flags) ++ tests'
+readTestSkip :: Maybe String -> Either String (CommandLineArgs -> CommandLineArgs)
+readTestSkip tests = Right $ \flags ->
+ flags { testArgs = (testArgs flags) { testSkip = tests'' flags } }
+
+ where tests' = maybe [] words tests
+ tests'' flags = testSkip (testArgs flags) ++ tests'
+
readTestOnlyPerf :: Either String (CommandLineArgs -> CommandLineArgs)
readTestOnlyPerf = Right $ \flags -> flags { testArgs = (testArgs flags) { testOnlyPerf = True } }
@@ -306,6 +315,8 @@ optDescrs =
"Output testsuite performance metrics summary."
, Option [] ["only"] (OptArg readTestOnly "TESTS")
"Test cases to run."
+ , Option [] ["skip-test"] (OptArg readTestSkip "TESTS")
+ "Test cases to skip."
, Option [] ["only-perf"] (NoArg readTestOnlyPerf)
"Only run performance tests."
, Option [] ["skip-perf"] (NoArg readTestSkipPerf)
=====================================
hadrian/src/Settings/Builders/RunTest.hs
=====================================
@@ -360,6 +360,7 @@ getTestArgs = do
haveDocs <- willDocsBeBuilt
let configFileArg= ["--config-file=" ++ (testConfigFile args)]
testOnlyArg = map ("--only=" ++) (testOnly args ++ testEnvTargets)
+ testSkipArg = map ("--skip=" ++) (testSkip args)
onlyPerfArg = if testOnlyPerf args
then Just "--only-perf-tests"
else Nothing
@@ -399,7 +400,7 @@ getTestArgs = do
inTreeArg = [ "-e", "config.in_tree_compiler=" ++
show (isInTreeCompiler (testCompiler args) || testHasInTreeFiles args) ]
- pure $ configFileArg ++ testOnlyArg ++ speedArg
+ pure $ configFileArg ++ testOnlyArg ++ testSkipArg ++ speedArg
++ catMaybes [ onlyPerfArg, skipPerfArg, summaryArg
, junitArg, metricsArg, verbosityArg ]
++ configArgs ++ wayArgs ++ compilerArg ++ ghcPkgArg
=====================================
testsuite/driver/runtests.py
=====================================
@@ -79,6 +79,7 @@ parser.add_argument("--summary-file", help="file in which to save the (human-rea
parser.add_argument("--unexpected-output-dir", help="directory in which to place unexpected output")
parser.add_argument("--target-wrapper", help="wrapper executable to use when executing binaries compiled for the target")
parser.add_argument("--only", action="append", help="just this test (can be give multiple --only= flags)")
+parser.add_argument("--skip", action="append", help="skip this test (can be given multiple --skip= flags)")
parser.add_argument("--way", action="append", help="just this way")
parser.add_argument("--skipway", action="append", help="skip this way")
parser.add_argument("--threads", type=int, help="threads to run simultaneously")
@@ -135,6 +136,9 @@ if args.only:
config.only = args.only
config.run_only_some_tests = True
+if args.skip:
+ config.skip = set(args.skip)
+
if args.way:
for way in args.way:
if way not in all_ways:
=====================================
testsuite/driver/testglobals.py
=====================================
@@ -31,6 +31,9 @@ class TestConfig:
self.run_only_some_tests = False
self.only = set()
+ # Skip these tests
+ self.skip = set()
+
# Don't fail on out-of-tolerance stat failures
self.ignore_perf_increases = False
self.ignore_perf_decreases = False
=====================================
testsuite/driver/testlib.py
=====================================
@@ -1526,6 +1526,9 @@ def test(name: TestName,
# report on any tests we couldn't find and error out.
config.only.remove(name)
+ if name in config.skip:
+ return
+
# Make a deep copy of the default_testopts, as we need our own copy
# of any dictionaries etc inside it. Otherwise, if one test modifies
# them, all tests will see the modified version!
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/d6ce7477c90b2de2d1f557cac7a7bdd…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/d6ce7477c90b2de2d1f557cac7a7bdd…
You're receiving this email because of your account on gitlab.haskell.org.
1
0
[Git][ghc/ghc][master] hadrian: warn when package index is missing (#16484)
by Marge Bot (@marge-bot) 16 Apr '26
by Marge Bot (@marge-bot) 16 Apr '26
16 Apr '26
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
8cb99552 by Sylvain Henry at 2026-04-16T19:22:43-04:00
hadrian: warn when package index is missing (#16484)
Since cabal-install 3.0 we can query the path of remote-repo-cache and
check if hackage package index is present.
Fixes #16484
- - - - -
3 changed files:
- + changelog.d/hadrian-warn-missing-package-index-16484
- hadrian/build-cabal
- hadrian/build-cabal.bat
Changes:
=====================================
changelog.d/hadrian-warn-missing-package-index-16484
=====================================
@@ -0,0 +1,5 @@
+section: packaging
+synopsis: Hadrian now warns when the Hackage package index is missing instead of
+ failing with an unhelpful error message.
+issues: #16484
+mrs: !15878
=====================================
hadrian/build-cabal
=====================================
@@ -23,14 +23,19 @@ fi
CABVERSTR=$("$CABAL" --numeric-version)
CABVER=( ${CABVERSTR//./ } )
-if [ "${CABVER[0]}" -gt 2 -o "${CABVER[0]}" -eq 2 -a "${CABVER[1]}" -ge 2 ];
-then
- "$CABAL" --project-file="$PROJ" new-build "${CABFLAGS[@]}" -j exe:hadrian
- # use new-exec instead of new-run to make sure that the build-tools (alex & happy) are in PATH
- "$CABAL" --project-file="$PROJ" new-exec "${CABFLAGS[@]}" hadrian -- \
- --directory "$PWD" \
- "$@"
-else
+if [ "${CABVER[0]}" -lt 3 ]; then
echo "Cabal version is too old; you need at least cabal-install 3.0"
exit 2
fi
+
+REMOTE_REPO_CACHE=$("$CABAL" --with-compiler="$GHC" path --output-format=key-value 2>/dev/null | awk '/^remote-repo-cache:/ { print $2 }')
+if ! [ -d "$REMOTE_REPO_CACHE/hackage.haskell.org" ]; then
+ echo "Please run 'cabal update' first"
+ exit 2
+fi
+
+"$CABAL" --project-file="$PROJ" new-build "${CABFLAGS[@]}" -j exe:hadrian
+# use new-exec instead of new-run to make sure that the build-tools (alex & happy) are in PATH
+"$CABAL" --project-file="$PROJ" new-exec "${CABFLAGS[@]}" hadrian -- \
+ --directory "$PWD" \
+ "$@"
=====================================
hadrian/build-cabal.bat
=====================================
@@ -34,18 +34,20 @@ for /F "delims=. tokens=1,2,3,4" %%a in ("%CABVERSTR%") do (
set CABPATCH=%%d
)
-set "_cabal_ok=0"
-if %CABMAJOR% gtr 2 set _cabal_ok=1
-if %CABMAJOR% equ 2 (
- if %CABMINOR% geq 2 set _cabal_ok=1
-)
-if %_cabal_ok% equ 1 (
- "%CABAL%" --project-file=%PROJ% new-build %CABFLAGS% -j exe:hadrian
- rem use new-exec instead of new-run to make sure that the build-tools (alex & happy) are in PATH
- "%CABAL%" --project-file=%PROJ% new-exec %CABFLAGS% hadrian -- ^
- --directory "%CD%" ^
- %*
-) else (
- echo Cabal version is too old; you need at least cabal-install 2.2
+if %CABMAJOR% lss 3 (
+ echo Cabal version is too old; you need at least cabal-install 3.0
exit /B 2
)
+
+for /F "tokens=*" %%a in ('"%CABAL%" --with-compiler=%GHC% path --output-format=key-value 2^>NUL ^| findstr /B "remote-repo-cache:"') do set REMOTE_REPO_CACHE=%%a
+set REMOTE_REPO_CACHE=%REMOTE_REPO_CACHE:remote-repo-cache: =%
+if not exist "%REMOTE_REPO_CACHE%\hackage.haskell.org" (
+ echo Please run 'cabal update' first
+ exit /B 2
+)
+
+"%CABAL%" --project-file=%PROJ% new-build %CABFLAGS% -j exe:hadrian
+rem use new-exec instead of new-run to make sure that the build-tools (alex & happy) are in PATH
+"%CABAL%" --project-file=%PROJ% new-exec %CABFLAGS% hadrian -- ^
+ --directory "%CD%" ^
+ %*
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/8cb99552f607f6bc4000e45ab32532d…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/8cb99552f607f6bc4000e45ab32532d…
You're receiving this email because of your account on gitlab.haskell.org.
1
0
16 Apr '26
Simon Peyton Jones pushed to branch wip/spj-try-opt-coercion at Glasgow Haskell Compiler / GHC
Commits:
f024f6b6 by Simon Peyton Jones at 2026-04-17T00:12:16+01:00
Wibbles
- - - - -
2 changed files:
- compiler/GHC/Core/Coercion/Opt.hs
- compiler/GHC/Core/LateCC/TopLevelBinds.hs
Changes:
=====================================
compiler/GHC/Core/Coercion/Opt.hs
=====================================
@@ -321,13 +321,10 @@ opt_co_refl subst co
go (Refl ty) = Refl (substTy subst ty)
go (GRefl r ty mco) = GRefl r $!! go_ty ty $!! go_m mco
go (CoVarCo cv) = substCoVar subst cv
- go (HoleCo h) = HoleCo $!! go_hole h
- go (SymCo co) = mkSymCo $!! go co
- go (KindCo co) = mkKindCo $!! go co
- go (SubCo co) = mkSubCo $!! (let co' = go co in
- if isReflexiveCo co' && not (isReflCo co')
- then pprTrace "yuike" (ppr co $$ ppr co') co'
- else co')
+ go (HoleCo h) = HoleCo $!! go_hole h
+ go (SymCo co) = mkSymCo $!! go co
+ go (KindCo co) = mkKindCo $!! go co
+ go (SubCo co) = mkSubCo $!! go co
go (SelCo n co) = mkSelCo n $!! go co
go (LRCo n co) = mkLRCo n $!! go co
go (AppCo co1 co2) = mkAppCo $!! go co1 $!! go co2
=====================================
compiler/GHC/Core/LateCC/TopLevelBinds.hs
=====================================
@@ -117,9 +117,11 @@ topLevelBindsCC pred core_bind =
-- executions of the RHS. Note that the lambdas might be hidden under ticks
-- or casts. So look through these as well.
addCC :: Id -> CoreExpr -> LateCCM s CoreExpr
- addCC bndr (Cast rhs co) = pure Cast <*> addCC bndr rhs <*> pure co
- addCC bndr (Tick t rhs) = (Tick t) <$> addCC bndr rhs
- addCC bndr (Lam b rhs) = Lam b <$> addCC bndr rhs
+ addCC bndr (Cast rhs co) = Cast <$> addCC bndr rhs <*> pure co
+ addCC bndr (Tick t rhs) = Tick t <$> addCC bndr rhs
+ addCC bndr (Lam b rhs) = Lam b <$> addCC bndr rhs
+ addCC _ e@(Coercion {}) = return e -- Do not add cost centres
+ addCC _ e@(Type {}) = return e -- around coercions or types
addCC bndr rhs = do
let name = idName bndr
cc_loc = nameSrcSpan name
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/f024f6b65ad9489aee6e961fc04887d…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/f024f6b65ad9489aee6e961fc04887d…
You're receiving this email because of your account on gitlab.haskell.org.
1
0
[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 6 commits: Simplify mkTick
by Marge Bot (@marge-bot) 16 Apr '26
by Marge Bot (@marge-bot) 16 Apr '26
16 Apr '26
Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC
Commits:
2dadf3b0 by sheaf at 2026-04-16T13:28:39-04:00
Simplify mkTick
This commit simplifies 'GHC.Core.Utils.mkTick', removing the
accumulating parameter 'rest' which was suspiciously treating a bunch of
different ticks as a group, and moving the group as a whole around the
AST, ignoring that the ticks in the group might have different placement
properties.
The most important change is that we revert the logic (added in 85b0aae2)
that allowed ticks to be placed around coercions, which caused serious
issues (e.g. #27121). It was just a mistake, as it doesn't make sense
to put a tick around a coercion.
Also adds Note [Pushing SCCs inwards] which clarifies the logic for
pushing SCCs into lambdas, constructor applications, and dropping SCCs
around non-function variables (in particular the treatment of splittable
ticks).
A few other changes are also implemented:
- simplify 'can_split' predicate (no functional change)
- combine profiling ticks into one when possible
Fixes #26878, #26941 and #27121
Co-authored-by: simonpj <simon.peytonjones(a)gmail.com>
- - - - -
a0d6f1f4 by Simon Jakobi at 2026-04-16T13:29:28-04:00
Add regression test for #9074
Closes #9074.
- - - - -
d178ee89 by Sylvain Henry at 2026-04-16T13:30:25-04:00
Add changelog for #15973
- - - - -
e8a196c6 by sheaf at 2026-04-16T13:31:19-04:00
Deal with 'noSpec' in 'coreExprToPmLit'
This commit makes two separate changes relating to
'GHC.HsToCore.Pmc.Solver.Types.coreExprAsPmLit':
1. Commit 7124e4ad mistakenly marked deferred errors as non-canonical,
which led to the introduction of 'nospec' wrappers in the
generated Core. This reverts that accident by declaring deferred
errors as being canonical, avoiding spurious 'nospec' wrapping.
2. Look through magic identity-like Ids such as 'nospec', 'inline' and
'lazy' in 'coreExprAsPmLit', just like Core Prep does.
There might genuinely be incoherent evidence, but that shouldn't
obstruct the pattern match checker. See test T27124a.
Fixes #25926 #27124
-------------------------
Metric Decrease:
T3294
-------------------------
- - - - -
7b1cdc02 by Sylvain Henry at 2026-04-16T14:42:08-04:00
hadrian: warn when package index is missing (#16484)
Since cabal-install 3.0 we can query the path of remote-repo-cache and
check if hackage package index is present.
Fixes #16484
- - - - -
ef709b2c by Richard Eisenberg at 2026-04-16T14:42:09-04:00
Teach hadrian to --skip-test.
Fixes #27188.
This adds the --skip-test flag to `hadrian build`, as documented in the
patch.
- - - - -
41 changed files:
- + changelog.d/T15973
- + changelog.d/T27121.md
- + changelog.d/T27124.md
- + changelog.d/hadrian-warn-missing-package-index-16484
- + changelog.d/skip-test
- compiler/GHC/Core/Opt/FloatOut.hs
- compiler/GHC/Core/Utils.hs
- compiler/GHC/CoreToStg/Prep.hs
- compiler/GHC/HsToCore/Pmc/Solver/Types.hs
- compiler/GHC/Stg/Debug.hs
- compiler/GHC/Tc/Errors.hs
- compiler/GHC/Types/Tickish.hs
- hadrian/build-cabal
- hadrian/build-cabal.bat
- hadrian/doc/make.md
- hadrian/doc/testsuite.md
- hadrian/src/CommandLine.hs
- hadrian/src/Settings/Builders/RunTest.hs
- libraries/ghc-heap/tests/tso_and_stack_closures.hs
- testsuite/driver/runtests.py
- testsuite/driver/testglobals.py
- testsuite/driver/testlib.py
- + testsuite/tests/ghci/T9074/Makefile
- + testsuite/tests/ghci/T9074/T9074.hs
- + testsuite/tests/ghci/T9074/T9074.stdout
- + testsuite/tests/ghci/T9074/T9074a.c
- + testsuite/tests/ghci/T9074/T9074b.c
- + testsuite/tests/ghci/T9074/all.T
- + testsuite/tests/overloadedstrings/should_fail/T25926.hs
- + testsuite/tests/overloadedstrings/should_fail/T25926.stderr
- + testsuite/tests/overloadedstrings/should_fail/T27124.hs
- + testsuite/tests/overloadedstrings/should_fail/T27124.stderr
- + testsuite/tests/overloadedstrings/should_fail/all.T
- + testsuite/tests/overloadedstrings/should_run/T27124a.hs
- testsuite/tests/overloadedstrings/should_run/all.T
- + testsuite/tests/profiling/should_compile/T27121.hs
- + testsuite/tests/profiling/should_compile/T27121_aux.hs
- testsuite/tests/profiling/should_compile/all.T
- + testsuite/tests/simplCore/should_compile/T26941.hs
- + testsuite/tests/simplCore/should_compile/T26941_aux.hs
- testsuite/tests/simplCore/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/61a2e2657f8d4982a8d6bcb1c850cf…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/61a2e2657f8d4982a8d6bcb1c850cf…
You're receiving this email because of your account on gitlab.haskell.org.
1
0