Zubin pushed to branch wip/backports-9.12.4 at Glasgow Haskell Compiler / GHC Commits: 6b0e956c by Matthew Pickering at 2026-03-02T16:31:32+05:30 determinism: Use deterministic map for Strings in TyLitMap When generating typeable evidence the types we need evidence for all cached in a TypeMap, the order terms are retrieved from a type map determines the order the bindings appear in the program. A TypeMap is quite diligent to use deterministic maps, apart from in the TyLitMap, which uses a UniqFM for storing strings, whose ordering depends on the Unique of the FastString. This can cause non-deterministic .hi and .o files. An unexpected side-effect is the error message but RecordDotSyntaxFail8 changing. I looked into this with Sam and this change caused the constraints to be solved in a different order which results in a slightly different error message. I have accepted the new test, since the output before was non-deterministic and the new output is consistent with the other messages in that file. Fixes #26846 (cherry picked from commit aeeb4a2034e80e26503eb88f5abde85e87a82f7b) - - - - - e71ceeb6 by Andrew Lelechenko at 2026-03-02T16:32:06+05:30 Upgrade text submodule to 2.1.4 (cherry picked from commit 9e4d70c2764d117c5cf753127f93056d66e4f0d7) - - - - - ad61e24e by Zubin Duggal at 2026-03-02T16:32:12+05:30 Bump transformers submodule to 0.6.3.0 Fixes #26790 (cherry picked from commit ea0d1317a630799a6b7bea12b24ef7e1ea6ed512) - - - - - a85c480a by Matthew Pickering at 2026-03-02T16:32:18+05:30 determinism: Use a stable sort in WithHsDocIdentifiers binary instance `WithHsDocIdentifiers` is defined as ``` 71 data WithHsDocIdentifiers a pass = WithHsDocIdentifiers 72 { hsDocString :: !a 73 , hsDocIdentifiers :: ![Located (IdP pass)] 74 } ``` This list of names is populated from `rnHsDocIdentifiers`, which calls `lookupGRE`, which calls `lookupOccEnv_AllNameSpaces`, which calls `nonDetEltsUFM` and returns the results in an order depending on uniques. Sorting the list with a stable sort before returning the interface makes the output deterministic and follows the approach taken by other fields in `Docs`. Fixes #26858 (cherry picked from commit 0020e38a021b5f0371c48fe73cddf8987acb1eb1) - - - - - ddfc5434 by Simon Peyton Jones at 2026-03-02T16:35:43+05:30 Fix subtle bug in cast worker/wrapper See (CWw4) in Note [Cast worker/wrapper]. The true payload is in the change to the definition of GHC.Types.Id.Info.hasInlineUnfolding Everthing else is just documentation. There is a 2% compile time decrease for T13056; I'll take the win! Metric Decrease: T13056 (cherry picked from commit 99d8c146c12146e1e21b1f2d31809845d4afe9d4) - - - - - b80be63d by Cheng Shao at 2026-03-02T16:37:31+05:30 wasm: use import.meta.main for proper distinction of nodejs main modules This patch uses `import.meta.main` for proper distinction of nodejs main modules, especially when the main module might be installed as a symlink. Fixes #26916. (cherry picked from commit 039f19778e35b193af0de2a2c6ed89556038627a) - - - - - 18 changed files: - compiler/GHC/Core/Map/Type.hs - compiler/GHC/Core/Opt/Simplify/Iteration.hs - compiler/GHC/Core/Opt/WorkWrap.hs - compiler/GHC/Driver/Config/Core/Lint.hs - compiler/GHC/Hs/Doc.hs - compiler/GHC/Types/Id/Info.hs - libraries/text - libraries/transformers - + testsuite/tests/ghc-api/TypeMapStringLiteral.hs - testsuite/tests/ghc-api/all.T - testsuite/tests/showIface/DocsInHiFile1.stdout - testsuite/tests/showIface/HaddockSpanIssueT24378.stdout - testsuite/tests/showIface/MagicHashInHaddocks.stdout - + testsuite/tests/simplCore/should_compile/T26903.hs - + testsuite/tests/simplCore/should_compile/T26903.stderr - testsuite/tests/simplCore/should_compile/all.T - utils/jsffi/dyld.mjs - utils/jsffi/post-link.mjs Changes: ===================================== compiler/GHC/Core/Map/Type.hs ===================================== @@ -47,7 +47,7 @@ import GHC.Types.Name import GHC.Types.Name.Env import GHC.Types.Var import GHC.Types.Var.Env -import GHC.Types.Unique.FM +import GHC.Types.Unique.DFM import GHC.Utils.Outputable import GHC.Utils.Panic @@ -364,14 +364,14 @@ filterT f (TM { tm_var = tvar, tm_app = tapp, tm_tycon = ttycon ------------------------ data TyLitMap a = TLM { tlm_number :: Map.Map Integer a - , tlm_string :: UniqFM FastString a + , tlm_string :: UniqDFM FastString a , tlm_char :: Map.Map Char a } -- TODO(22292): derive instance Functor TyLitMap where fmap f TLM { tlm_number = tn, tlm_string = ts, tlm_char = tc } = TLM - { tlm_number = Map.map f tn, tlm_string = mapUFM f ts, tlm_char = Map.map f tc } + { tlm_number = Map.map f tn, tlm_string = mapUDFM f ts, tlm_char = Map.map f tc } instance TrieMap TyLitMap where type Key TyLitMap = TyLit @@ -382,30 +382,30 @@ instance TrieMap TyLitMap where filterTM = filterTyLit emptyTyLitMap :: TyLitMap a -emptyTyLitMap = TLM { tlm_number = Map.empty, tlm_string = emptyUFM, tlm_char = Map.empty } +emptyTyLitMap = TLM { tlm_number = Map.empty, tlm_string = emptyUDFM, tlm_char = Map.empty } lkTyLit :: TyLit -> TyLitMap a -> Maybe a lkTyLit l = case l of NumTyLit n -> tlm_number >.> Map.lookup n - StrTyLit n -> tlm_string >.> (`lookupUFM` n) + StrTyLit n -> tlm_string >.> (`lookupUDFM` n) CharTyLit n -> tlm_char >.> Map.lookup n xtTyLit :: TyLit -> XT a -> TyLitMap a -> TyLitMap a xtTyLit l f m = case l of NumTyLit n -> m { tlm_number = Map.alter f n (tlm_number m) } - StrTyLit n -> m { tlm_string = alterUFM f (tlm_string m) n } + StrTyLit n -> m { tlm_string = alterUDFM f (tlm_string m) n } CharTyLit n -> m { tlm_char = Map.alter f n (tlm_char m) } foldTyLit :: (a -> b -> b) -> TyLitMap a -> b -> b -foldTyLit l m = flip (nonDetFoldUFM l) (tlm_string m) +foldTyLit l m = flip (foldUDFM l) (tlm_string m) . flip (Map.foldr l) (tlm_number m) . flip (Map.foldr l) (tlm_char m) filterTyLit :: (a -> Bool) -> TyLitMap a -> TyLitMap a filterTyLit f (TLM { tlm_number = tn, tlm_string = ts, tlm_char = tc }) - = TLM { tlm_number = Map.filter f tn, tlm_string = filterUFM f ts, tlm_char = Map.filter f tc } + = TLM { tlm_number = Map.filter f tn, tlm_string = filterUDFM f ts, tlm_char = Map.filter f tc } ------------------------------------------------- -- | @TypeMap a@ is a map from 'Type' to @a@. If you are a client, this ===================================== compiler/GHC/Core/Opt/Simplify/Iteration.hs ===================================== @@ -474,14 +474,14 @@ leaving a simpler job for demand-analysis worker/wrapper. See #19874. Wrinkles -1. We must /not/ do cast w/w on +(CWW1) We must /not/ do cast w/w on f = g |> co otherwise it'll just keep repeating forever! You might think this is avoided because the call to tryCastWorkerWrapper is guarded by - preInlineUnconditinally, but I'm worried that a loop-breaker or an - exported Id might say False to preInlineUnonditionally. + preInlineUnconditionally, but I'm worried that a loop-breaker or an + exported Id might say False to preInlineUnconditionally. -2. We need to be careful with inline/noinline pragmas: +(CWW2) We need to be careful with inline/noinline pragmas: rec { {-# NOINLINE f #-} f = (...g...) |> co ; g = ...f... } @@ -496,15 +496,15 @@ Wrinkles f = $wf |> co ; g = ...f... } and that is bad: the whole point is that we want to inline that - cast! We want to transfer the pagma to $wf: + cast! We want to transfer the pragma to $wf: rec { {-# NOINLINE $wf #-} $wf = ...g... ; f = $wf |> co ; g = ...f... } c.f. Note [Worker/wrapper for NOINLINE functions] in GHC.Core.Opt.WorkWrap. -3. We should still do cast w/w even if `f` is INLINEABLE. E.g. - {- f: Stable unfolding = <stable-big> -} +(CWW3) We should still do cast w/w even if `f` is INLINEABLE. E.g. + {- f: Stable unfolding (arity 2) = <stable-big> -} f = (\xy. <big-body>) |> co Then we want to w/w to {- $wf: Stable unfolding = <stable-big> |> sym co -} @@ -513,15 +513,43 @@ Wrinkles Notice that the stable unfolding moves to the worker! Now demand analysis will work fine on $wf, whereas it has trouble with the original f. c.f. Note [Worker/wrapper for INLINABLE functions] in GHC.Core.Opt.WorkWrap. - This point also applies to strong loopbreakers with INLINE pragmas, see - wrinkle (4). -4. We should /not/ do cast w/w for non-loop-breaker INLINE functions (hence - hasInlineUnfolding in tryCastWorkerWrapper, which responds False to - loop-breakers) because they'll definitely be inlined anyway, cast and - all. And if we do cast w/w for an INLINE function with arity zero, we get +(CWW4) We should /not/ do cast w/w for INLINE functions (hence `hasInlineUnfolding` + in `tryCastWorkerWrapper`) because they'll definitely be inlined anyway, cast + and all. + + Moreover, if we do cast w/w for an INLINE function with arity zero, we get something really silly: we inline that "worker" right back into the wrapper! - Worse than a no-op, because we have then lost the stable unfolding. + In fact it is Much Worse than a no-op, because we have then lost the stable + unfolding --- aargh (see #26903). E.g. similar example to (CWW3) + {- g: Stable unfolding (arity 0) = <stable-big> -} NB arity 0! + g = (\xy. <big-body>) |> co + If we w/w to this: + {- $wg: Stable unfolding (arity 0) = <stable-big> |> sym co -} + $wg = \xy. <big-body> + g = $wg |> co + then we'll inline $wg at the call site in `g` giving + {- $wg: Stable unfolding (arity 0) = <stable-big> |> sym co -} + $wg = \xy. <big-body> + g = (<stable-big> |> sym co) |> co + and now we'll drop `$wg` as dead and we have lost the unfolding on `g`. + (We could /also/ give the binding `g = $wf |> co` a stable unfolding. Then + things would work right; but there is also no point in doing the cast + worker/wrapper in the first place.) + + NB: you might wonder about a loop-breaker with an INLINE pragma; after all, a + loop breaker won't "definitely be inlined anyway", so arguably we should not + disable cast w/w/ for it. But a Rec group can /look/ recursive at an early + stage, and subsequently /become/ non-recursive after some simplification. + (This is common in instance decls; see Note [Checking for INLINE loop breakers] + in GHC.Core.Lint.) So the danger is that we'll permanently lose that stable + unfolding that we specifically wanted (#26903). Simple solution: disable cast + w/w for /any/ INLINE function. See the defn + of `GHC.Types.Id.Info.hasInlineUnfolding`. + + The danger is that an INLINE pragma on a genuninely-recursive function + will kill worker-wrapper. Well, so be it. They are pretty suspicious anyway; + see Note [Checking for INLINE loop breakers]. All these wrinkles are exactly like worker/wrapper for strictness analysis: f is the wrapper and must inline like crazy @@ -586,11 +614,11 @@ tryCastWorkerWrapper env bind_cxt old_bndr bndr (Cast rhs co) | BC_Let top_lvl is_rec <- bind_cxt -- Not join points , not (isDFunId bndr) -- nor DFuns; cast w/w is no help, and we can't transform -- a DFunUnfolding in mk_worker_unfolding - , not (exprIsTrivial rhs) -- Not x = y |> co; Wrinkle 1 - , not (hasInlineUnfolding info) -- Not INLINE things: Wrinkle 4 - , typeHasFixedRuntimeRep work_ty -- Don't peel off a cast if doing so would - -- lose the underlying runtime representation. - -- See Note [Preserve RuntimeRep info in cast w/w] + , not (exprIsTrivial rhs) -- Not x = y |> co; see (CWW1) + , not (hasInlineUnfolding info) -- Not INLINE things: see (CWW4) + , typeHasFixedRuntimeRep work_ty -- Don't peel off a cast if doing so would + -- lose the underlying runtime representation. + -- See Note [Preserve RuntimeRep info in cast w/w] , not (isOpaquePragma (idInlinePragma old_bndr)) -- Not for OPAQUE bindings -- See Note [OPAQUE pragma] = do { uniq <- getUniqueM @@ -637,13 +665,13 @@ tryCastWorkerWrapper env bind_cxt old_bndr bndr (Cast rhs co) `setArityInfo` work_arity -- We do /not/ want to transfer OccInfo, Rules -- Note [Preserve strictness in cast w/w] - -- and Wrinkle 2 of Note [Cast worker/wrapper] + -- and (CWW2) of Note [Cast worker/wrapper] ----------- Worker unfolding ----------- -- Stable case: if there is a stable unfolding we have to compose with (Sym co); -- the next round of simplification will do the job -- Non-stable case: use work_rhs - -- Wrinkle 3 of Note [Cast worker/wrapper] + -- See (CWW4) of Note [Cast worker/wrapper] mk_worker_unfolding top_lvl work_id work_rhs = case realUnfoldingInfo info of -- NB: the real one, even for loop-breakers unf@(CoreUnfolding { uf_tmpl = unf_rhs, uf_src = src }) ===================================== compiler/GHC/Core/Opt/WorkWrap.hs ===================================== @@ -176,8 +176,9 @@ several liked-named Ids bouncing around at the same time---absolute mischief.) Notice that we refrain from w/w'ing an INLINE function even if it is -in a recursive group. It might not be the loop breaker. (We could -test for loop-breaker-hood, but I'm not sure that ever matters.) +in a recursive group. It might not be the loop breaker. (We used to +test for loop-breaker-hood, but see (CWW4) in Note [Cast worker/wrapper] +in GHC.Core.Opt.Simplify.Iteration.) Note [Worker/wrapper for INLINABLE functions] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ===================================== compiler/GHC/Driver/Config/Core/Lint.hs ===================================== @@ -147,6 +147,12 @@ perPassFlags dflags pass check_lbs = case pass of CoreDesugar -> False CoreDesugarOpt -> False + + -- Disable Lint warnings on the first simplifier pass, because + -- there may be some INLINE knots still tied, which is tiresomely noisy + CoreDoSimplify cfg + | InitialPhase <- sm_phase (so_mode cfg) + -> False _ -> True -- See Note [Checking StaticPtrs] ===================================== compiler/GHC/Hs/Doc.hs ===================================== @@ -50,6 +50,7 @@ import qualified GHC.Utils.Outputable as O import GHC.Hs.Extension import GHC.Types.Unique.Map import Data.List (sortBy) +import Data.Function import GHC.Hs.DocString @@ -88,7 +89,7 @@ instance Outputable a => Outputable (WithHsDocIdentifiers a pass) where instance Binary a => Binary (WithHsDocIdentifiers a GhcRn) where put_ bh (WithHsDocIdentifiers s ids) = do put_ bh s - put_ bh $ BinLocated <$> ids + put_ bh $ BinLocated <$> (sortBy (stableNameCmp `on` getName) ids) get bh = liftA2 WithHsDocIdentifiers (get bh) (fmap unBinLocated <$> get bh) ===================================== compiler/GHC/Types/Id/Info.hs ===================================== @@ -568,7 +568,12 @@ hasInlineUnfolding :: IdInfo -> Bool -- ^ True of a /non-loop-breaker/ Id that has a /stable/ unfolding that is -- (a) always inlined; that is, with an `UnfWhen` guidance, or -- (b) a DFunUnfolding which never needs to be inlined -hasInlineUnfolding info = isInlineUnfolding (unfoldingInfo info) +-- +-- Very important that this work with `realUnfoldingInfo` and so returns +-- True even for a loop-breaker that has an INLINE pragma. +-- See (CWW4) in Note [Cast worker/wrapper] in GHC.Core.Opt.Simplify.Iteration +-- for discussion, and #26903 for the dire consequences of getting this wrong. +hasInlineUnfolding info = isInlineUnfolding (realUnfoldingInfo info) setArityInfo :: IdInfo -> ArityInfo -> IdInfo setArityInfo info ar = ===================================== libraries/text ===================================== @@ -1 +1 @@ -Subproject commit 5f343f668f421bfb30cead594e52d0ac6206ff67 +Subproject commit 423fd981e576bd17a8b5fa48d0ad6b9a0c370e77 ===================================== libraries/transformers ===================================== @@ -1 +1 @@ -Subproject commit cee47cca7705edafe0a5839439e679edbd61890a +Subproject commit 0d615bc2457d5d2c695dcfdb902d88c1225beff3 ===================================== testsuite/tests/ghc-api/TypeMapStringLiteral.hs ===================================== @@ -0,0 +1,58 @@ +{-# LANGUAGE OverloadedStrings #-} +module Main (main) where + +import Control.Monad (unless) +import qualified Data.ByteString.Char8 as BSC +import qualified Data.ByteString.Short as SBS +import Data.Char (ord) +import Data.List (foldl') +import GHC.Core.Map.Type (TypeMap, emptyTypeMap, extendTypeMap, foldTypeMap) +import GHC.Core.Type (Type, mkStrLitTy) +import GHC.Data.FastString (FastString (..), FastZString (..)) +import GHC.Utils.Encoding (zEncodeString) + +main :: IO () +main = do + let logicalEntries = + [ ("alpha", "payload-alpha") + , ("beta", "payload-beta") + , ("gamma", "payload-gamma") + ] + uniquesOne = [1, 2, 3] + uniquesTwo = [200, 100, 500] + + tmOne = buildMap logicalEntries uniquesOne + tmTwo = buildMap logicalEntries uniquesTwo + + foldedOne = foldValues tmOne + foldedTwo = foldValues tmTwo + + assert "foldTypeMap order independent of FastString uniques" $ + foldedOne == foldedTwo + + +buildMap :: [(String, a)] -> [Int] -> TypeMap a +buildMap entries uniques = + foldl' insertEntry emptyTypeMap (zip uniques entries) + where + insertEntry :: TypeMap a -> (Int, (String, a)) -> TypeMap a + insertEntry tm (u, (txt, payload)) = + extendTypeMap tm (strLiteralWithUnique u txt) payload + +foldValues :: TypeMap a -> [a] +foldValues tm = foldTypeMap (:) [] tm + +strLiteralWithUnique :: Int -> String -> Type +strLiteralWithUnique u = mkStrLitTy . fakeFastString u + +fakeFastString :: Int -> String -> FastString +fakeFastString u s = FastString + { uniq = u + , n_chars = length s + , fs_sbs = SBS.pack (map (fromIntegral . ord) s) + , fs_zenc = error "unused" + } + +assert :: String -> Bool -> IO () +assert label condition = unless condition $ + error ("TypeMap string literal test failed: " ++ label) ===================================== testsuite/tests/ghc-api/all.T ===================================== @@ -43,3 +43,4 @@ test('T20757', [unless(opsys('mingw32'), skip), exit_code(1), normalise_version( ['-package ghc']) test('PrimOpEffect_Sanity', normal, compile_and_run, ['-Wall -Werror -package ghc']) test('T26120', [], compile_and_run, ['-package ghc']) +test('TypeMapStringLiteral', normal, compile_and_run, ['-package ghc']) ===================================== testsuite/tests/showIface/DocsInHiFile1.stdout ===================================== @@ -6,14 +6,14 @@ docs: '<>', ':=:', 'Bool' -} identifiers: + {DocsInHiFile.hs:4:2-3} + GHC.Internal.Base.<> {DocsInHiFile.hs:2:6-9} GHC.Internal.Data.Foldable.elem - {DocsInHiFile.hs:2:6-9} - elem {DocsInHiFile.hs:2:14-18} GHC.Internal.System.IO.print - {DocsInHiFile.hs:4:2-3} - GHC.Internal.Base.<> + {DocsInHiFile.hs:2:6-9} + elem {DocsInHiFile.hs:4:15-18} GHC.Types.Bool export docs: ===================================== testsuite/tests/showIface/HaddockSpanIssueT24378.stdout ===================================== @@ -6,14 +6,14 @@ docs: '<>', ':=:', 'Bool' -} identifiers: + {HaddockSpanIssueT24378.hs:3:2-3} + GHC.Internal.Base.<> {HaddockSpanIssueT24378.hs:1:6-9} GHC.Internal.Data.Foldable.elem - {HaddockSpanIssueT24378.hs:1:6-9} - elem {HaddockSpanIssueT24378.hs:1:14-18} GHC.Internal.System.IO.print - {HaddockSpanIssueT24378.hs:3:2-3} - GHC.Internal.Base.<> + {HaddockSpanIssueT24378.hs:1:6-9} + elem {HaddockSpanIssueT24378.hs:3:15-18} GHC.Types.Bool export docs: ===================================== testsuite/tests/showIface/MagicHashInHaddocks.stdout ===================================== @@ -3,10 +3,10 @@ docs: Just text: -- | 'foo#' `Bar##` `*##` identifiers: - {MagicHashInHaddocks.hs:3:7-10} - foo# {MagicHashInHaddocks.hs:3:14-18} Bar## + {MagicHashInHaddocks.hs:3:7-10} + foo# export docs: [] declaration docs: ===================================== testsuite/tests/simplCore/should_compile/T26903.hs ===================================== @@ -0,0 +1,23 @@ +{-# LANGUAGE DefaultSignatures #-} +module T26903 where + +newtype T a = MkT [a] + +class C a where + op :: [a] -> [a] -> T a + + -- This default method + -- * Has an INLINE pragma + -- * Is too big to inline without a pragma + -- * Has arity zero + {-# INLINE[1] op #-} + default op :: Ord a => [a] -> [a] -> T a + op = \xs ys -> MkT $ if xs>ys then reverse (reverse (reverse (reverse xs))) + else reverse (reverse (reverse (reverse (xs ++ ys)))) + +instance C Int where {} + +test :: [Int] -> T Int +test xs = op [] xs + -- We expect to see `op` inlined into the RHS of `test` + ===================================== testsuite/tests/simplCore/should_compile/T26903.stderr ===================================== @@ -0,0 +1,52 @@ + +==================== Tidy Core ==================== +Result size of Tidy Core + = {terms: 127, types: 130, coercions: 48, joins: 0/0} + +$dmop + = (\ @a _ $dOrd xs ys -> + case $fOrdList_$ccompare $dOrd xs ys of { + __DEFAULT -> + reverse1 (reverse1 (reverse1 (reverse1 (++ xs ys) []) []) []) []; + GT -> reverse1 (reverse1 (reverse1 (reverse xs) []) []) [] + }) + `cast` <Co:20> :: ... + +$fCInt_$cop + = (\ xs ys -> + case $fOrdList_$s$ccompare xs ys of { + __DEFAULT -> + reverse1 (reverse1 (reverse1 (reverse1 (++ xs ys) []) []) []) []; + GT -> reverse1 (reverse1 (reverse1 (reverse xs) []) []) [] + }) + `cast` <Co:11> :: ... + +$fCInt1 + = \ xs ys -> + case $fOrdList_$s$ccompare xs ys of { + __DEFAULT -> + reverse1 (reverse1 (reverse1 (reverse1 (++ xs ys) []) []) []) []; + GT -> reverse1 (reverse1 (reverse1 (reverse xs) []) []) [] + } + +$fCInt = C:C ($fCInt1 `cast` <Co:11> :: ...) + +test4 = reverse1 [] [] + +test3 = reverse1 test4 [] + +test2 = reverse1 test3 [] + +test1 = reverse1 test2 [] + +test + = \ xs -> + case $fOrdList_$s$ccompare [] xs of { + __DEFAULT -> + (reverse1 (reverse1 (reverse1 (reverse1 (++ [] xs) []) []) []) []) + `cast` <Co:3> :: ...; + GT -> test1 `cast` <Co:3> :: ... + } + + + ===================================== testsuite/tests/simplCore/should_compile/all.T ===================================== @@ -537,3 +537,4 @@ test('T25883b', normal, compile_grep_core, ['']) test('T25883c', normal, compile_grep_core, ['']) test('T25883d', [extra_files(['T25883d_import.hs'])], multimod_compile_filter, ['T25883d', '-O -ddump-simpl -dno-typeable-binds -dsuppress-all -dsuppress-uniques', r'grep -e "y ="']) test('T26681', normal, compile, ['-O']) +test('T26903', [grep_errmsg(r'reverse')], compile, ['-O -dno-typeable-binds -ddump-simpl -dsuppress-uniques -dsuppress-all']) ===================================== utils/jsffi/dyld.mjs ===================================== @@ -850,7 +850,7 @@ class DyLD { } function isMain() { - return import.meta.filename === process.argv[1]; + return import.meta.main; } if (isMain()) { ===================================== utils/jsffi/post-link.mjs ===================================== @@ -75,7 +75,7 @@ export async function postLink(mod) { } function isMain() { - return import.meta.filename === process.argv[1]; + return import.meta.main; } async function main() { View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/abc4b2368d78eeae32efb40f119ba98... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/abc4b2368d78eeae32efb40f119ba98... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Zubin (@wz1000)