Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
-
9b714c4c
by Zubin Duggal at 2026-07-05T09:40:36+05:30
-
4a59b3ee
by Zubin Duggal at 2026-07-05T09:40:36+05:30
15 changed files:
- + changelog.d/fix-absent-dict-projection
- compiler/GHC/Core/Make.hs
- compiler/GHC/Core/Opt/Specialise.hs
- compiler/GHC/Core/Opt/WorkWrap.hs
- compiler/GHC/Core/Opt/WorkWrap/Utils.hs
- compiler/GHC/CoreToStg/Prep.hs
- compiler/GHC/Types/Literal.hs
- + testsuite/tests/core-to-stg/T25924/B.hs
- + testsuite/tests/core-to-stg/T25924/Main.hs
- + testsuite/tests/core-to-stg/T25924/all.T
- + testsuite/tests/core-to-stg/T25924a.hs
- + testsuite/tests/core-to-stg/T25924a.stdout
- testsuite/tests/core-to-stg/all.T
- testsuite/tests/dmdanal/should_compile/T18982.stderr
- testsuite/tests/simplCore/should_compile/T26615.stderr
Changes:
| 1 | +section: compiler
|
|
| 2 | +synopsis: Fix a miscompilation that could project a field out of an absent dictionary, resulting in a segfault.
|
|
| 3 | +issues: #25924
|
|
| 4 | +mrs: !16219
|
|
| 5 | +description:
|
|
| 6 | + We no longer make an absent filler (a rubbish literal or error thunk) for an
|
|
| 7 | + absent dictionary or other terminating type. We also no longer speculatively
|
|
| 8 | + evaluate a binding once we have discovered that it is absent. |
| ... | ... | @@ -227,13 +227,16 @@ mkLitRubbish :: Type -> Maybe CoreExpr |
| 227 | 227 | -- Fail (returning Nothing) if
|
| 228 | 228 | -- * the RuntimeRep of the Type is not monomorphic;
|
| 229 | 229 | -- * the type is (a ~# b), the type of coercion
|
| 230 | --- See INVARIANT 1 and 2 of item (2) in Note [Rubbish literals]
|
|
| 230 | +-- * the type is terminating (isTerminatingType), e.g. a dictionary
|
|
| 231 | +-- See INVARIANT 1, 2 and 3 of item (2) in Note [Rubbish literals]
|
|
| 231 | 232 | -- in GHC.Types.Literal
|
| 232 | 233 | mkLitRubbish ty
|
| 233 | 234 | | not (noFreeVarsOfType rep)
|
| 234 | 235 | = Nothing -- Satisfy INVARIANT 1
|
| 235 | 236 | | isEqPred ty
|
| 236 | 237 | = Nothing -- Satisfy INVARIANT 2
|
| 238 | + | isTerminatingType ty
|
|
| 239 | + = Nothing -- Satisfy INVARIANT 3
|
|
| 237 | 240 | | otherwise
|
| 238 | 241 | = Just (Lit (LitRubbish torc rep) `mkTyApps` [ty])
|
| 239 | 242 | where
|
| ... | ... | @@ -19,12 +19,13 @@ import GHC.Core.SimpleOpt( defaultSimpleOpts, simpleOptExprWith, exprIsConApp_ma |
| 19 | 19 | import GHC.Core.Predicate
|
| 20 | 20 | import GHC.Core.Class( classMethods )
|
| 21 | 21 | import GHC.Core.Coercion( Coercion )
|
| 22 | -import GHC.Core.DataCon (dataConTyCon)
|
|
| 22 | +import GHC.Core.DataCon (dataConTyCon, StrictnessMark(NotMarkedStrict))
|
|
| 23 | 23 | |
| 24 | 24 | import qualified GHC.Core.Subst as Core
|
| 25 | 25 | import GHC.Core.Unfold.Make
|
| 26 | 26 | import GHC.Core
|
| 27 | -import GHC.Core.Make ( mkLitRubbish, wrapFloats )
|
|
| 27 | +import GHC.Core.Make ( wrapFloats )
|
|
| 28 | +import GHC.Core.Opt.WorkWrap.Utils ( mkAbsentFiller )
|
|
| 28 | 29 | import GHC.Core.Unify ( tcMatchTy )
|
| 29 | 30 | import GHC.Core.Rules
|
| 30 | 31 | import GHC.Core.Subst (substTickish)
|
| ... | ... | @@ -1669,7 +1670,7 @@ specCalls spec_imp env existing_rules calls_for_me fn rhs |
| 1669 | 1670 | | otherwise = UnspecArg
|
| 1670 | 1671 | |
| 1671 | 1672 | ; (useful, subst', rule_bndrs, rule_lhs_args, spec_bndrs, dx_binds, spec_args)
|
| 1672 | - <- specHeader subst rhs_bndrs all_call_args
|
|
| 1673 | + <- specHeader this_mod subst rhs_bndrs all_call_args
|
|
| 1673 | 1674 | ; let env' = env { se_subst = subst' }
|
| 1674 | 1675 | |
| 1675 | 1676 | -- Check for (a) usefulness and (b) not already covered
|
| ... | ... | @@ -2573,7 +2574,8 @@ isSpecDict _ = False |
| 2573 | 2574 | -- , [T1, T2, c, i, dEqT1, dShow1]
|
| 2574 | 2575 | -- )
|
| 2575 | 2576 | specHeader
|
| 2576 | - :: Core.Subst -- This substitution applies to the [InBndr]
|
|
| 2577 | + :: Module -- The module being compiled, for mkAbsentFiller
|
|
| 2578 | + -> Core.Subst -- This substitution applies to the [InBndr]
|
|
| 2577 | 2579 | -> [InBndr] -- Binders from the original function `f`
|
| 2578 | 2580 | -> [SpecArg] -- From the CallInfo
|
| 2579 | 2581 | -> SpecM ( Bool -- True <=> some useful specialisation happened
|
| ... | ... | @@ -2598,13 +2600,13 @@ specHeader |
| 2598 | 2600 | |
| 2599 | 2601 | -- If we run out of binders, stop immediately
|
| 2600 | 2602 | -- See Note [Specialisation Must Preserve Sharing]
|
| 2601 | -specHeader subst [] _ = pure (False, subst, [], [], [], [], [])
|
|
| 2602 | -specHeader subst _ [] = pure (False, subst, [], [], [], [], [])
|
|
| 2603 | +specHeader _ subst [] _ = pure (False, subst, [], [], [], [], [])
|
|
| 2604 | +specHeader _ subst _ [] = pure (False, subst, [], [], [], [], [])
|
|
| 2603 | 2605 | |
| 2604 | 2606 | -- We want to specialise on type 'T1', and so we must construct a substitution
|
| 2605 | 2607 | -- 'a->T1', as well as a LHS argument for the resulting RULE and unfolding
|
| 2606 | 2608 | -- details.
|
| 2607 | -specHeader subst (bndr:bndrs) (SpecType ty : args)
|
|
| 2609 | +specHeader mod subst (bndr:bndrs) (SpecType ty : args)
|
|
| 2608 | 2610 | = do { -- Find free_tvs, the type variables to add to the binders for the rule
|
| 2609 | 2611 | -- Namely those deeply free in `ty` that aren't in scope
|
| 2610 | 2612 | -- See (MP2) in Note [Specialising polymorphic dictionaries]
|
| ... | ... | @@ -2617,7 +2619,7 @@ specHeader subst (bndr:bndrs) (SpecType ty : args) |
| 2617 | 2619 | |
| 2618 | 2620 | ; let subst2 = Core.extendTvSubst subst1 bndr ty
|
| 2619 | 2621 | ; (useful, subst3, rule_bs, rule_args, spec_bs, dx, spec_args)
|
| 2620 | - <- specHeader subst2 bndrs args
|
|
| 2622 | + <- specHeader mod subst2 bndrs args
|
|
| 2621 | 2623 | ; pure ( useful, subst3
|
| 2622 | 2624 | , free_tvs ++ rule_bs, Type ty : rule_args
|
| 2623 | 2625 | , free_tvs ++ spec_bs, dx, Type ty : spec_args ) }
|
| ... | ... | @@ -2626,29 +2628,34 @@ specHeader subst (bndr:bndrs) (SpecType ty : args) |
| 2626 | 2628 | -- a substitution on it (in case the type refers to 'a'). Additionally, we need
|
| 2627 | 2629 | -- to produce a binder, LHS argument and RHS argument for the resulting rule,
|
| 2628 | 2630 | -- /and/ a binder for the specialised body.
|
| 2629 | -specHeader subst (bndr:bndrs) (UnspecType : args)
|
|
| 2631 | +specHeader mod subst (bndr:bndrs) (UnspecType : args)
|
|
| 2630 | 2632 | = do { let (subst1, bndr') = Core.substBndr subst bndr
|
| 2631 | 2633 | ; (useful, subst2, rule_bs, rule_es, spec_bs, dx, spec_args)
|
| 2632 | - <- specHeader subst1 bndrs args
|
|
| 2634 | + <- specHeader mod subst1 bndrs args
|
|
| 2633 | 2635 | ; let ty_e' = Type (mkTyVarTy bndr')
|
| 2634 | 2636 | ; pure ( useful, subst2
|
| 2635 | 2637 | , bndr' : rule_bs, ty_e' : rule_es
|
| 2636 | 2638 | , bndr' : spec_bs, dx, ty_e' : spec_args ) }
|
| 2637 | 2639 | |
| 2638 | -specHeader subst (bndr:bndrs) (_ : args)
|
|
| 2640 | +specHeader mod subst (bndr:bndrs) (_ : args)
|
|
| 2639 | 2641 | | isDeadBinder bndr
|
| 2640 | 2642 | , let (subst1, bndr') = Core.substBndr subst (zapIdOccInfo bndr)
|
| 2641 | - , Just rubbish_lit <- mkLitRubbish (idType bndr')
|
|
| 2643 | + , Just filler <- mkAbsentFiller mod bndr' NotMarkedStrict
|
|
| 2644 | + -- NB: mkAbsentFiller returns Nothing for a terminating type (e.g. a
|
|
| 2645 | + -- dictionary), so this guard fails and we fall through, keeping the
|
|
| 2646 | + -- argument instead of dropping it.
|
|
| 2647 | + -- See Note [Don't make fillers for terminating types]
|
|
| 2648 | + -- in GHC.Core.Opt.WorkWrap.Utils
|
|
| 2642 | 2649 | = -- See Note [Drop dead args from specialisations]
|
| 2643 | - do { (useful, subst2, rule_bs, rule_es, spec_bs, dx, spec_args) <- specHeader subst1 bndrs args
|
|
| 2650 | + do { (useful, subst2, rule_bs, rule_es, spec_bs, dx, spec_args) <- specHeader mod subst1 bndrs args
|
|
| 2644 | 2651 | ; pure ( useful, subst2
|
| 2645 | 2652 | , bndr' : rule_bs, Var bndr' : rule_es
|
| 2646 | - , spec_bs, dx, rubbish_lit : spec_args ) }
|
|
| 2653 | + , spec_bs, dx, filler : spec_args ) }
|
|
| 2647 | 2654 | |
| 2648 | 2655 | -- Next we want to specialise the 'Eq a' dict away. We need to construct
|
| 2649 | 2656 | -- a wildcard binder to match the dictionary (See Note [Specialising Calls] for
|
| 2650 | 2657 | -- the nitty-gritty), as a LHS rule and unfolding details.
|
| 2651 | -specHeader subst (bndr:bndrs) (SpecDict dict_arg : args)
|
|
| 2658 | +specHeader mod subst (bndr:bndrs) (SpecDict dict_arg : args)
|
|
| 2652 | 2659 | = do { -- Make up a fresh binder to use in the RULE
|
| 2653 | 2660 | -- It might turn into a dict binding (via bindAuxiliaryDict) which we
|
| 2654 | 2661 | -- then float, so we use cloneIdBndr to get a completely fresh binder
|
| ... | ... | @@ -2659,7 +2666,7 @@ specHeader subst (bndr:bndrs) (SpecDict dict_arg : args) |
| 2659 | 2666 | -- Extend the substitution to map bndr :-> dict_arg, for use in the RHS
|
| 2660 | 2667 | ; let (subst2, dx_bind, spec_dict) = bindAuxiliaryDict subst1 bndr bndr' dict_arg
|
| 2661 | 2668 | |
| 2662 | - ; (_, subst3, rule_bs, rule_es, spec_bs, dx, spec_args) <- specHeader subst2 bndrs args
|
|
| 2669 | + ; (_, subst3, rule_bs, rule_es, spec_bs, dx, spec_args) <- specHeader mod subst2 bndrs args
|
|
| 2663 | 2670 | |
| 2664 | 2671 | ; let dx' = case dx_bind of { Nothing -> dx; Just d -> d : dx }
|
| 2665 | 2672 | ; pure ( True, subst3 -- Ha! A useful specialisation!
|
| ... | ... | @@ -2674,10 +2681,10 @@ specHeader subst (bndr:bndrs) (SpecDict dict_arg : args) |
| 2674 | 2681 | -- why 'i' doesn't appear in our RULE above. But we have no guarantee that
|
| 2675 | 2682 | -- there aren't 'UnspecArg's which come /before/ all of the dictionaries, so
|
| 2676 | 2683 | -- this case must be here.
|
| 2677 | -specHeader subst (bndr:bndrs) (UnspecArg : args)
|
|
| 2684 | +specHeader mod subst (bndr:bndrs) (UnspecArg : args)
|
|
| 2678 | 2685 | = do { let (subst1, bndr') = Core.substBndr subst (zapIdOccInfo bndr)
|
| 2679 | 2686 | -- zapIdOccInfo: see Note [Zap occ info in rule binders]
|
| 2680 | - ; (useful, subst2, rule_bs, rule_es, spec_bs, dx, spec_args) <- specHeader subst1 bndrs args
|
|
| 2687 | + ; (useful, subst2, rule_bs, rule_es, spec_bs, dx, spec_args) <- specHeader mod subst1 bndrs args
|
|
| 2681 | 2688 | |
| 2682 | 2689 | ; let dummy_arg = varToCoreExpr bndr'
|
| 2683 | 2690 | -- dummy_arg is usually just (Var bndr),
|
| ... | ... | @@ -554,7 +554,7 @@ tryWW ww_opts is_rec fn_id rhs |
| 554 | 554 | -- See Note [Drop absent bindings]
|
| 555 | 555 | | isAbsDmd (demandInfo fn_info)
|
| 556 | 556 | , not (isJoinId fn_id)
|
| 557 | - , Just filler <- mkAbsentFiller ww_opts fn_id NotMarkedStrict
|
|
| 557 | + , Just filler <- mkAbsentFiller (wo_module ww_opts) fn_id NotMarkedStrict
|
|
| 558 | 558 | = return [(new_fn_id, filler)]
|
| 559 | 559 | |
| 560 | 560 | -- See Note [Don't w/w INLINE things]
|
| ... | ... | @@ -30,7 +30,6 @@ import GHC.Core.Subst |
| 30 | 30 | import GHC.Core.Type
|
| 31 | 31 | import GHC.Core.Multiplicity
|
| 32 | 32 | import GHC.Core.Coercion
|
| 33 | -import GHC.Core.Predicate( isDictTy )
|
|
| 34 | 33 | import GHC.Core.Reduction
|
| 35 | 34 | import GHC.Core.FamInstEnv
|
| 36 | 35 | import GHC.Core.Predicate( isEqualityClass )
|
| ... | ... | @@ -996,7 +995,7 @@ mkWWstr_one opts arg str_mark = |
| 996 | 995 | _ | isTyVar arg -> do_nothing
|
| 997 | 996 | |
| 998 | 997 | DropAbsent
|
| 999 | - | Just absent_filler <- mkAbsentFiller opts arg str_mark
|
|
| 998 | + | Just absent_filler <- mkAbsentFiller (wo_module opts) arg str_mark
|
|
| 1000 | 999 | -- Absent case. Drop the argument from the worker.
|
| 1001 | 1000 | -- We can't always handle absence for arbitrary
|
| 1002 | 1001 | -- unlifted types, so we need to choose just the cases we can
|
| ... | ... | @@ -1067,14 +1066,20 @@ unbox_one_arg opts arg_var |
| 1067 | 1066 | --
|
| 1068 | 1067 | -- If @mkAbsentFiller _ id == Just e@, then @e@ is an absent filler with the
|
| 1069 | 1068 | -- same type as @id@. Otherwise, no suitable filler could be found.
|
| 1070 | -mkAbsentFiller :: WwOpts -> Id -> StrictnessMark -> Maybe CoreExpr
|
|
| 1071 | -mkAbsentFiller opts arg str
|
|
| 1069 | +mkAbsentFiller :: Module -> Id -> StrictnessMark -> Maybe CoreExpr
|
|
| 1070 | +mkAbsentFiller mod arg str
|
|
| 1071 | + -- We never make a filler for a terminating type: it might be speculatively
|
|
| 1072 | + -- evaluated or have a field projected out of it.
|
|
| 1073 | + -- See (AF4) in Note [Absent fillers], and
|
|
| 1074 | + -- Note [Don't make fillers for terminating types].
|
|
| 1075 | + | isTerminatingType arg_ty
|
|
| 1076 | + = Nothing
|
|
| 1077 | + |
|
| 1072 | 1078 | -- The lifted case: bind 'absentError'. See (AF1) in Note [Absent fillers]
|
| 1073 | 1079 | -- We want to use this case if possible, because we get a nice runtime panic message
|
| 1074 | 1080 | -- if we are wrong (like we were in #11126). Otherwise we fall through to the
|
| 1075 | 1081 | -- less-desirable mkLitRubbish case.
|
| 1076 | 1082 | | mightBeLiftedType arg_ty
|
| 1077 | - , not (isDictTy arg_ty) -- See (AF4) in Note [Absent fillers]
|
|
| 1078 | 1083 | , not (isStrictDmd (idDemandInfo arg)) -- See (AF2)
|
| 1079 | 1084 | , not (isMarkedStrict str) -- in Note [Absent fillers]
|
| 1080 | 1085 | = Just (mkAbsentErrorApp arg_ty msg)
|
| ... | ... | @@ -1101,7 +1106,7 @@ mkAbsentFiller opts arg str |
| 1101 | 1106 | -- will have different lengths and hence different costs for
|
| 1102 | 1107 | -- the inliner leading to different inlining.
|
| 1103 | 1108 | -- See also Note [Unique Determinism] in GHC.Types.Unique
|
| 1104 | - file_msg = text "In module" <+> quotes (ppr $ wo_module opts)
|
|
| 1109 | + file_msg = text "In module" <+> quotes (ppr mod)
|
|
| 1105 | 1110 | |
| 1106 | 1111 | {- Note [Worker/wrapper for Strictness and Absence]
|
| 1107 | 1112 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
| ... | ... | @@ -1295,27 +1300,8 @@ Needless to say, there are some wrinkles: |
| 1295 | 1300 | have to be representation monomorphic. But in the future, we might allow
|
| 1296 | 1301 | levity polymorphism, e.g. a polymorphic levity variable in 'BoxedRep'.
|
| 1297 | 1302 | |
| 1298 | -(AF4) Consider (#24934)
|
|
| 1299 | - f :: (a~b) => blah {-# INLINE f #-}
|
|
| 1300 | - f d x = case eq_sel d of co -> body
|
|
| 1301 | - In #24934 it turned out that `co` was unused; and we discarded the
|
|
| 1302 | - entire case-scrutinisation via the `exprOkToDiscard` test in
|
|
| 1303 | - `GHC.Core.Opt.Simplify.Iteration.rebuildCase`. So now `d` is absent.
|
|
| 1304 | - But in the /unfolding/ for some reason we did not discard the `case`;
|
|
| 1305 | - so when we inline `f` we end up evaluating that `d` argument. So we had
|
|
| 1306 | - better not replace it with an error thunk!
|
|
| 1307 | - |
|
| 1308 | - The root of it is this: `exprOkToDiscard` assumes that a dictionary is
|
|
| 1309 | - non-bottom (Note [exprOkForSpeculation and type classes]); but then we replace
|
|
| 1310 | - the (a~b) dictionary with an error thunk, breaking the invariant that every
|
|
| 1311 | - dictionary is non-bottom. (If -XDictsStrict is on, the invariant is even
|
|
| 1312 | - more important.)
|
|
| 1313 | - |
|
| 1314 | - Simple solution: never use an error thunk for a dictionary; instead fall
|
|
| 1315 | - through to mkRubbishLit. (The only downside is that we lose the compiler
|
|
| 1316 | - debugging advantages of (AF1).)
|
|
| 1317 | - |
|
| 1318 | - This is quite delicate.
|
|
| 1303 | +(AF4) We never make an absent filler for a terminating type.
|
|
| 1304 | + See Note [Don't make fillers for terminating types].
|
|
| 1319 | 1305 | |
| 1320 | 1306 | While (AF1) and (AF2) are simply an optimisation in terms of compiler debugging
|
| 1321 | 1307 | experience, (AF3) should be irrelevant in most programs, if not all.
|
| ... | ... | @@ -1337,6 +1323,47 @@ fragile |
| 1337 | 1323 | because `MkT` is strict in its Int# argument, so we get an absentError
|
| 1338 | 1324 | exception when we shouldn't. Very annoying!
|
| 1339 | 1325 | |
| 1326 | +Note [Don't make fillers for terminating types]
|
|
| 1327 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
| 1328 | +We never make an absent filler, error thunk or rubbish literal, for a terminating
|
|
| 1329 | +type (isTerminatingType): a non-unary class dictionary, a boxed equality, or a
|
|
| 1330 | +constraint tuple.
|
|
| 1331 | + |
|
| 1332 | +GHC relies on a dictionary value never being bottom (see
|
|
| 1333 | +Note [NON-BOTTOM-DICTS invariant] in GHC.Core). GHC uses "speculation" to
|
|
| 1334 | +evaluated guaranteed-non-bottom values: see Note [Speculative evaluation] in
|
|
| 1335 | +GHC.CoreToStg.Prep. This speculative evaluation is fundamentally incompatible
|
|
| 1336 | +with replacing a dictionary with an absent filler. Attempts to to do so gave
|
|
| 1337 | +rise to a succession of bugs including:
|
|
| 1338 | + |
|
| 1339 | + * #24934: we evaluated an absent dictionary
|
|
| 1340 | + * #25924: we selected a superclass from an absent dictionary
|
|
| 1341 | + |
|
| 1342 | +A terminating type is exactly what speculation will force: see
|
|
| 1343 | +Note [exprOkForSpeculation and type classes] in GHC.Core.Utils. So we refuse to
|
|
| 1344 | +make a filler for precisely those types.
|
|
| 1345 | + |
|
| 1346 | +So the safe thing is to make no filler at all for a terminating type. Then there
|
|
| 1347 | +is no bogus dictionary to evaluate or project from. Specifically
|
|
| 1348 | + |
|
| 1349 | + * `mkAbsentFiller` returns `Nothing` for a terminating type, so worker/wrapper
|
|
| 1350 | + keeps the real argument.
|
|
| 1351 | + |
|
| 1352 | + * `Specialise.specHeader` calls `mkAbsentFiller` too, so it likewise keeps the
|
|
| 1353 | + dead dictionary argument rather than dropping it for a filler.
|
|
| 1354 | + |
|
| 1355 | +Prior failed approaches
|
|
| 1356 | + |
|
| 1357 | +We used to paper over this. !13233 replaced the error thunk for an absent
|
|
| 1358 | +dictionary with a rubbish literal, so that it could at least be evaluated
|
|
| 1359 | +without complaint. But #25924 showed that this is not enough, because we do not
|
|
| 1360 | +only evaluate the absent dictionary, we also select a superclass from it.
|
|
| 1361 | + |
|
| 1362 | +We could instead teach speculation to leave absent bindings alone, and we do
|
|
| 1363 | +that too (see Note [Speculative evaluation] in GHC.CoreToStg.Prep). But that is
|
|
| 1364 | +not a guarantee. After optimisation a binding that holds an absent filler may no
|
|
| 1365 | +longer be marked absent, so we cannot rely on the demand to protect us.
|
|
| 1366 | + |
|
| 1340 | 1367 | Note [Unboxing through unboxed tuples]
|
| 1341 | 1368 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
| 1342 | 1369 | We should not to a worker/wrapper split just for unboxing the components of
|
| ... | ... | @@ -1995,6 +1995,20 @@ It is also similar to Note [Do not strictify a DFun's parameter dictionaries], |
| 1995 | 1995 | where marking recursive DFuns (of undecidable *instances*) strict in dictionary
|
| 1996 | 1996 | *parameters* leads to quite the same change in termination as above.
|
| 1997 | 1997 | |
| 1998 | +Belt and braces: do not speculate absent bindings
|
|
| 1999 | + |
|
| 2000 | +In 'decideFloatInfo' we decline to speculate a binding whose demand is absent.
|
|
| 2001 | +There is no point in speculating an absent binding, since its value is
|
|
| 2002 | +(presumably) not needed.
|
|
| 2003 | + |
|
| 2004 | +This used to matter more. Worker/wrapper would bind an absent dictionary to a
|
|
| 2005 | +rubbish literal filler, and speculation could force a superclass selection out
|
|
| 2006 | +of that rubbish literal, causing a segfault (#25924). Nowadays we never make a
|
|
| 2007 | +filler for a dictionary in the first place, so this can no longer happen and
|
|
| 2008 | +the guard is merely belt and braces.
|
|
| 2009 | +See Note [Don't make fillers for terminating types]
|
|
| 2010 | +in GHC.Core.Opt.WorkWrap.Utils.
|
|
| 2011 | + |
|
| 1998 | 2012 | Note [BindInfo and FloatInfo]
|
| 1999 | 2013 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
| 2000 | 2014 | The `BindInfo` of a `Float` describes whether it will be case-bound or
|
| ... | ... | @@ -2253,12 +2267,16 @@ decideFloatInfo FIA{fia_levity=lev, fia_demand=dmd, fia_is_hnf=is_hnf, |
| 2253 | 2267 | | is_string = (CaseBound, TopLvlFloatable)
|
| 2254 | 2268 | -- String literals are unboxed (so must be case-bound) and float to
|
| 2255 | 2269 | -- the top-level
|
| 2256 | - | ok_for_spec = (CaseBound, case lev of Unlifted -> LazyContextFloatable
|
|
| 2270 | + | ok_for_spec
|
|
| 2271 | + , not (isAbsDmd dmd) = (CaseBound, case lev of Unlifted -> LazyContextFloatable
|
|
| 2257 | 2272 | Lifted -> TopLvlFloatable)
|
| 2258 | 2273 | -- See Note [Speculative evaluation]
|
| 2259 | 2274 | -- Ok-for-spec-eval things will be case-bound, lifted or not.
|
| 2260 | 2275 | -- But when it's lifted we are ok with floating it to top-level
|
| 2261 | 2276 | -- (where it is actually bound lazily).
|
| 2277 | + --
|
|
| 2278 | + -- Don't speculate an absent binding. See #25924 and
|
|
| 2279 | + -- "Belt and braces" in Note [Speculative evaluation].
|
|
| 2262 | 2280 | | Unlifted <- lev = (CaseBound, StrictContextFloatable)
|
| 2263 | 2281 | | isStrUsedDmd dmd = (CaseBound, StrictContextFloatable)
|
| 2264 | 2282 | -- These will never be floated out of a lazy RHS context
|
| ... | ... | @@ -1003,6 +1003,14 @@ data type. Here are the moving parts: |
| 1003 | 1003 | |
| 1004 | 1004 | This is sad, though: see #18983.
|
| 1005 | 1005 | |
| 1006 | + INVARIANT 3: we never make a rubbish literal of a terminating type
|
|
| 1007 | + (isTerminatingType), such as a class dictionary. GHC relies on a value of
|
|
| 1008 | + a terminating type never being bottom, and so may speculatively evaluate
|
|
| 1009 | + a dictionary or select a superclass from it. Either would crash on a
|
|
| 1010 | + rubbish literal (#24934, #25924).
|
|
| 1011 | + See Note [Don't make fillers for terminating types]
|
|
| 1012 | + in GHC.Core.Opt.WorkWrap.Utils.
|
|
| 1013 | + |
|
| 1006 | 1014 | 3. STG: The type app in `RUBBISH[IntRep] @Int# :: Int#` is erased and we get
|
| 1007 | 1015 | the (untyped) 'StgLit' `RUBBISH[IntRep] :: Int#` in STG.
|
| 1008 | 1016 |
| 1 | +{-# LANGUAGE AllowAmbiguousTypes, TypeFamilies, QuantifiedConstraints, TypeAbstractions #-}
|
|
| 2 | +module B where
|
|
| 3 | + |
|
| 4 | +import Data.Kind
|
|
| 5 | + |
|
| 6 | +class ABITypeable a where
|
|
| 7 | + abiTypeInfo :: String
|
|
| 8 | + abiTypeInfo = ""
|
|
| 9 | + |
|
| 10 | + unused :: a -> a
|
|
| 11 | + unused x = x
|
|
| 12 | + |
|
| 13 | +data REF a
|
|
| 14 | + |
|
| 15 | +instance ABITypeable () where
|
|
| 16 | +instance ABITypeable a => ABITypeable (REF a) where
|
|
| 17 | + |
|
| 18 | +class (ABITypeable a, ABITypeable a) => YulCatObj a where -- crash stops without duplicate constraint
|
|
| 19 | +instance YulCatObj ()
|
|
| 20 | +instance YulCatObj a => YulCatObj (REF a)
|
|
| 21 | + |
|
| 22 | +type YulO1 a = YulCatObj a
|
|
| 23 | +type YulO2 a b = (YulCatObj a, YulCatObj b)
|
|
| 24 | + |
|
| 25 | + |
|
| 26 | +type YulCat :: Type -> Type -> Type
|
|
| 27 | +data YulCat a b where
|
|
| 28 | + YulExtendType :: forall b. (YulO2 () b) => YulCat () b
|
|
| 29 | + YulComp :: forall a b c. YulCat c b -> YulCat a c -> YulCat a b
|
|
| 30 | + YulJmpB :: forall a b. (YulO2 a b) => YulCat a b
|
|
| 31 | + |
|
| 32 | +data Trie a b where
|
|
| 33 | + Z :: Trie a a
|
|
| 34 | + (:.) :: (YulCatObj a, YulCatObj b) => YulCat a b -> Trie b c -> Trie a c
|
|
| 35 | + |
|
| 36 | +type Cat a b = forall c. Trie b c -> Trie a c
|
|
| 37 | + |
|
| 38 | +normalize :: forall a b unused ξ. (Int ~ unused, YulCatObj a, YulCatObj b)
|
|
| 39 | + => Trie a b -> (forall c. YulCatObj c => Trie a c -> YulCat c b -> ξ) -> ξ
|
|
| 40 | +normalize t0 k = case t0 of
|
|
| 41 | + Z -> k Z undefined
|
|
| 42 | + φ :. f -> normalize f $ \f' s -> case f' of
|
|
| 43 | + Z -> k Z (s `YulComp` φ)
|
|
| 44 | + _ -> undefined
|
|
| 45 | + |
|
| 46 | + |
|
| 47 | +toSMC :: forall a b . (YulCatObj a, YulCatObj b) => Cat a b -> YulCat a b
|
|
| 48 | +toSMC t = normalize (t Z) $ \f g -> case f of
|
|
| 49 | + Z -> g
|
|
| 50 | + _ -> error "toSMC: normalisation process failed"
|
|
| 51 | + |
|
| 52 | + |
|
| 53 | +encode :: (YulCatObj r, YulCatObj a, YulCatObj b) => (a `YulCat` b) -> (P r a -> P r b)
|
|
| 54 | +encode φ (Y f) = Y (\x -> f (φ :. x))
|
|
| 55 | + |
|
| 56 | + |
|
| 57 | +type P :: Type -> Type -> Type
|
|
| 58 | +data P r a = Y (Cat r a)
|
|
| 59 | + |
|
| 60 | +fromP :: P r a -> Cat r a
|
|
| 61 | +fromP (Y f) = f
|
|
| 62 | + |
|
| 63 | + |
|
| 64 | +decode :: (YulCatObj a, YulCatObj b) => (P a a -> P a b) -> YulCat a b
|
|
| 65 | +decode f = toSMC (extract f)
|
|
| 66 | + |
|
| 67 | +extract ::(YulCatObj a, YulCatObj b) => (P a a -> P a b) -> Cat a b
|
|
| 68 | +extract f = fromP (f (Y id))
|
|
| 69 | + |
|
| 70 | + |
|
| 71 | +yulShow :: YulCat a' b' -> String
|
|
| 72 | +yulShow (YulExtendType @b) = "Te" <> abiTypeInfo @b
|
|
| 73 | +yulShow (YulComp cb ac) = yulShow ac <> yulShow cb
|
|
| 74 | +yulShow YulJmpB = "Jb"
|
|
| 75 | + |
|
| 76 | + |
|
| 77 | +lfn' :: forall b unused.
|
|
| 78 | + ( YulO1 (REF b)
|
|
| 79 | + , () ~ unused
|
|
| 80 | + ) =>
|
|
| 81 | + (forall r. YulO1 r => P r () -> P r (REF b)) -> String
|
|
| 82 | +lfn' f = yulShow (decode f)
|
|
| 83 | + |
|
| 84 | + |
|
| 85 | +extendType'l :: forall a r. (YulO1 a, YulO1 r) => P r () -> P r a
|
|
| 86 | +extendType'l = encode YulExtendType
|
|
| 87 | + |
|
| 88 | +keccak256'l :: forall a r. YulO2 r a => P r a -> P r ()
|
|
| 89 | +keccak256'l = encode YulJmpB |
| 1 | +module Main where
|
|
| 2 | +import B
|
|
| 3 | + |
|
| 4 | +getCounterRef' :: forall b r.
|
|
| 5 | + ( YulO1 b
|
|
| 6 | + , YulO1 r
|
|
| 7 | + -- , YulO1 (REF b)
|
|
| 8 | + ) =>
|
|
| 9 | + P r () -> P r (REF b)
|
|
| 10 | +getCounterRef' a = extendType'l (keccak256'l a)
|
|
| 11 | +{-# NOINLINE getCounterRef' #-}
|
|
| 12 | + |
|
| 13 | +main :: IO ()
|
|
| 14 | +main = putStrLn $ lfn' @() getCounterRef' |
| 1 | +test('T25924',
|
|
| 2 | + [exit_code(1), ignore_stderr, extra_files(['Main.hs', 'B.hs'])],
|
|
| 3 | + multimod_compile_and_run,
|
|
| 4 | + ['Main', '-O']) |
| 1 | +{-# LANGUAGE GADTs, TypeApplications, ScopedTypeVariables, AllowAmbiguousTypes #-}
|
|
| 2 | +module Main where
|
|
| 3 | + |
|
| 4 | +class D a where
|
|
| 5 | + m :: a -> Int
|
|
| 6 | + m _ = 0
|
|
| 7 | + n :: a -> Int
|
|
| 8 | + n _ = 0
|
|
| 9 | + |
|
| 10 | +class (D a, D a) => C a
|
|
| 11 | + |
|
| 12 | +data T a
|
|
| 13 | + |
|
| 14 | +instance D a => D (T a)
|
|
| 15 | +instance C a => C (T a)
|
|
| 16 | + |
|
| 17 | +instance D ()
|
|
| 18 | +instance C ()
|
|
| 19 | + |
|
| 20 | +data G where
|
|
| 21 | + MkG :: forall a. C (T a) => T a -> G
|
|
| 22 | + |
|
| 23 | +sh :: G -> Int
|
|
| 24 | +sh (MkG x) = m x
|
|
| 25 | + |
|
| 26 | +f :: forall b. C b => G
|
|
| 27 | +f = MkG (undefined :: T b)
|
|
| 28 | +{-# NOINLINE f #-}
|
|
| 29 | + |
|
| 30 | +main :: IO ()
|
|
| 31 | +main = print (sh (f @())) |
| 1 | +0 |
| ... | ... | @@ -8,3 +8,4 @@ test('T24124', normal, compile, ['-O -ddump-stg-final -dno-typeable-binds -dsupp |
| 8 | 8 | test('T23865', normal, compile, ['-O -dlint'])
|
| 9 | 9 | test('T24334', normal, compile_and_run, ['-O'])
|
| 10 | 10 | test('T24463', normal, compile, ['-O'])
|
| 11 | +test('T25924a', [ignore_stderr], compile_and_run, ['-O']) |
| 1 | 1 | |
| 2 | 2 | ==================== Tidy Core ====================
|
| 3 | -Result size of Tidy Core = {terms: 295, types: 206, coercions: 4, joins: 0/0}
|
|
| 4 | - |
|
| 5 | --- RHS size: {terms: 8, types: 9, coercions: 1, joins: 0/0}
|
|
| 6 | -T18982.$WExGADT :: forall e. (e ~ Int) => e %1 -> Int %1 -> ExGADT Int
|
|
| 7 | -T18982.$WExGADT = \ (@e) (conrep :: e ~ Int) (conrep1 :: e) (conrep2 :: Int) -> T18982.ExGADT @Int @e @~(<Int>_N :: Int GHC.Internal.Prim.~# Int) conrep conrep1 conrep2
|
|
| 8 | - |
|
| 9 | --- RHS size: {terms: 3, types: 2, coercions: 1, joins: 0/0}
|
|
| 10 | -T18982.$WGADT :: Int %1 -> GADT Int
|
|
| 11 | -T18982.$WGADT = \ (conrep :: Int) -> T18982.GADT @Int @~(<Int>_N :: Int GHC.Internal.Prim.~# Int) conrep
|
|
| 12 | - |
|
| 13 | --- RHS size: {terms: 7, types: 6, coercions: 0, joins: 0/0}
|
|
| 14 | -T18982.$WEx :: forall e a. e %1 -> a %1 -> Ex a
|
|
| 15 | -T18982.$WEx = \ (@e) (@a) (conrep :: e) (conrep1 :: a) -> T18982.Ex @a @e conrep conrep1
|
|
| 3 | +Result size of Tidy Core = {terms: 276, types: 179, coercions: 2, joins: 0/0}
|
|
| 16 | 4 | |
| 17 | 5 | -- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
|
| 18 | -T18982.$trModule4 :: GHC.Internal.Prim.Addr#
|
|
| 19 | -T18982.$trModule4 = "main"#
|
|
| 6 | +$trModule1 :: GHC.Internal.Prim.Addr#
|
|
| 7 | +$trModule1 = "main"#
|
|
| 20 | 8 | |
| 21 | 9 | -- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
|
| 22 | -T18982.$trModule3 :: GHC.Internal.Types.TrName
|
|
| 23 | -T18982.$trModule3 = GHC.Internal.Types.TrNameS T18982.$trModule4
|
|
| 10 | +$trModule2 :: GHC.Internal.Types.TrName
|
|
| 11 | +$trModule2 = GHC.Internal.Types.TrNameS $trModule1
|
|
| 24 | 12 | |
| 25 | 13 | -- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
|
| 26 | -T18982.$trModule2 :: GHC.Internal.Prim.Addr#
|
|
| 27 | -T18982.$trModule2 = "T18982"#
|
|
| 14 | +$trModule3 :: GHC.Internal.Prim.Addr#
|
|
| 15 | +$trModule3 = "T18982"#
|
|
| 28 | 16 | |
| 29 | 17 | -- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
|
| 30 | -T18982.$trModule1 :: GHC.Internal.Types.TrName
|
|
| 31 | -T18982.$trModule1 = GHC.Internal.Types.TrNameS T18982.$trModule2
|
|
| 18 | +$trModule4 :: GHC.Internal.Types.TrName
|
|
| 19 | +$trModule4 = GHC.Internal.Types.TrNameS $trModule3
|
|
| 32 | 20 | |
| 33 | 21 | -- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
|
| 34 | 22 | T18982.$trModule :: GHC.Internal.Types.Module
|
| 35 | -T18982.$trModule = GHC.Internal.Types.Module T18982.$trModule3 T18982.$trModule1
|
|
| 23 | +T18982.$trModule = GHC.Internal.Types.Module $trModule2 $trModule4
|
|
| 36 | 24 | |
| 37 | 25 | -- RHS size: {terms: 3, types: 1, coercions: 0, joins: 0/0}
|
| 38 | 26 | $krep :: GHC.Internal.Types.KindRep
|
| ... | ... | @@ -47,16 +35,16 @@ $krep2 :: GHC.Internal.Types.KindRep |
| 47 | 35 | $krep2 = GHC.Internal.Types.KindRepVar 0#
|
| 48 | 36 | |
| 49 | 37 | -- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
|
| 50 | -T18982.$tcBox2 :: GHC.Internal.Prim.Addr#
|
|
| 51 | -T18982.$tcBox2 = "Box"#
|
|
| 38 | +$tcBox1 :: GHC.Internal.Prim.Addr#
|
|
| 39 | +$tcBox1 = "Box"#
|
|
| 52 | 40 | |
| 53 | 41 | -- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
|
| 54 | -T18982.$tcBox1 :: GHC.Internal.Types.TrName
|
|
| 55 | -T18982.$tcBox1 = GHC.Internal.Types.TrNameS T18982.$tcBox2
|
|
| 42 | +$tcBox2 :: GHC.Internal.Types.TrName
|
|
| 43 | +$tcBox2 = GHC.Internal.Types.TrNameS $tcBox1
|
|
| 56 | 44 | |
| 57 | 45 | -- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
|
| 58 | 46 | T18982.$tcBox :: GHC.Internal.Types.TyCon
|
| 59 | -T18982.$tcBox = GHC.Internal.Types.TyCon 16948648223906549518#Word64 2491460178135962649#Word64 T18982.$trModule T18982.$tcBox1 0# GHC.Internal.Types.krep$*Arr*
|
|
| 47 | +T18982.$tcBox = GHC.Internal.Types.TyCon 16948648223906549518#Word64 2491460178135962649#Word64 T18982.$trModule $tcBox2 0# GHC.Internal.Types.krep$*Arr*
|
|
| 60 | 48 | |
| 61 | 49 | -- RHS size: {terms: 3, types: 2, coercions: 0, joins: 0/0}
|
| 62 | 50 | $krep3 :: [GHC.Internal.Types.KindRep]
|
| ... | ... | @@ -67,140 +55,140 @@ $krep4 :: GHC.Internal.Types.KindRep |
| 67 | 55 | $krep4 = GHC.Internal.Types.KindRepTyConApp T18982.$tcBox $krep3
|
| 68 | 56 | |
| 69 | 57 | -- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
|
| 70 | -T18982.$tc'Box1 :: GHC.Internal.Types.KindRep
|
|
| 71 | -T18982.$tc'Box1 = GHC.Internal.Types.KindRepFun $krep2 $krep4
|
|
| 58 | +$krep5 :: GHC.Internal.Types.KindRep
|
|
| 59 | +$krep5 = GHC.Internal.Types.KindRepFun $krep2 $krep4
|
|
| 72 | 60 | |
| 73 | 61 | -- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
|
| 74 | -T18982.$tc'Box3 :: GHC.Internal.Prim.Addr#
|
|
| 75 | -T18982.$tc'Box3 = "'Box"#
|
|
| 62 | +$tc'Box1 :: GHC.Internal.Prim.Addr#
|
|
| 63 | +$tc'Box1 = "'Box"#
|
|
| 76 | 64 | |
| 77 | 65 | -- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
|
| 78 | -T18982.$tc'Box2 :: GHC.Internal.Types.TrName
|
|
| 79 | -T18982.$tc'Box2 = GHC.Internal.Types.TrNameS T18982.$tc'Box3
|
|
| 66 | +$tc'Box2 :: GHC.Internal.Types.TrName
|
|
| 67 | +$tc'Box2 = GHC.Internal.Types.TrNameS $tc'Box1
|
|
| 80 | 68 | |
| 81 | 69 | -- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
|
| 82 | 70 | T18982.$tc'Box :: GHC.Internal.Types.TyCon
|
| 83 | -T18982.$tc'Box = GHC.Internal.Types.TyCon 1412068769125067428#Word64 8727214667407894081#Word64 T18982.$trModule T18982.$tc'Box2 1# T18982.$tc'Box1
|
|
| 71 | +T18982.$tc'Box = GHC.Internal.Types.TyCon 1412068769125067428#Word64 8727214667407894081#Word64 T18982.$trModule $tc'Box2 1# $krep5
|
|
| 84 | 72 | |
| 85 | 73 | -- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
|
| 86 | -T18982.$tcEx2 :: GHC.Internal.Prim.Addr#
|
|
| 87 | -T18982.$tcEx2 = "Ex"#
|
|
| 74 | +$tcEx1 :: GHC.Internal.Prim.Addr#
|
|
| 75 | +$tcEx1 = "Ex"#
|
|
| 88 | 76 | |
| 89 | 77 | -- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
|
| 90 | -T18982.$tcEx1 :: GHC.Internal.Types.TrName
|
|
| 91 | -T18982.$tcEx1 = GHC.Internal.Types.TrNameS T18982.$tcEx2
|
|
| 78 | +$tcEx2 :: GHC.Internal.Types.TrName
|
|
| 79 | +$tcEx2 = GHC.Internal.Types.TrNameS $tcEx1
|
|
| 92 | 80 | |
| 93 | 81 | -- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
|
| 94 | 82 | T18982.$tcEx :: GHC.Internal.Types.TyCon
|
| 95 | -T18982.$tcEx = GHC.Internal.Types.TyCon 4376661818164435927#Word64 18005417598910668817#Word64 T18982.$trModule T18982.$tcEx1 0# GHC.Internal.Types.krep$*Arr*
|
|
| 83 | +T18982.$tcEx = GHC.Internal.Types.TyCon 4376661818164435927#Word64 18005417598910668817#Word64 T18982.$trModule $tcEx2 0# GHC.Internal.Types.krep$*Arr*
|
|
| 96 | 84 | |
| 97 | 85 | -- RHS size: {terms: 3, types: 2, coercions: 0, joins: 0/0}
|
| 98 | -$krep5 :: [GHC.Internal.Types.KindRep]
|
|
| 99 | -$krep5 = GHC.Internal.Types.: @GHC.Internal.Types.KindRep $krep1 (GHC.Internal.Types.[] @GHC.Internal.Types.KindRep)
|
|
| 86 | +$krep6 :: [GHC.Internal.Types.KindRep]
|
|
| 87 | +$krep6 = GHC.Internal.Types.: @GHC.Internal.Types.KindRep $krep1 (GHC.Internal.Types.[] @GHC.Internal.Types.KindRep)
|
|
| 100 | 88 | |
| 101 | 89 | -- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
|
| 102 | -$krep6 :: GHC.Internal.Types.KindRep
|
|
| 103 | -$krep6 = GHC.Internal.Types.KindRepTyConApp T18982.$tcEx $krep5
|
|
| 90 | +$krep7 :: GHC.Internal.Types.KindRep
|
|
| 91 | +$krep7 = GHC.Internal.Types.KindRepTyConApp T18982.$tcEx $krep6
|
|
| 104 | 92 | |
| 105 | 93 | -- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
|
| 106 | -$krep7 :: GHC.Internal.Types.KindRep
|
|
| 107 | -$krep7 = GHC.Internal.Types.KindRepFun $krep1 $krep6
|
|
| 94 | +$krep8 :: GHC.Internal.Types.KindRep
|
|
| 95 | +$krep8 = GHC.Internal.Types.KindRepFun $krep1 $krep7
|
|
| 108 | 96 | |
| 109 | 97 | -- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
|
| 110 | -T18982.$tc'Ex1 :: GHC.Internal.Types.KindRep
|
|
| 111 | -T18982.$tc'Ex1 = GHC.Internal.Types.KindRepFun $krep2 $krep7
|
|
| 98 | +$krep9 :: GHC.Internal.Types.KindRep
|
|
| 99 | +$krep9 = GHC.Internal.Types.KindRepFun $krep2 $krep8
|
|
| 112 | 100 | |
| 113 | 101 | -- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
|
| 114 | -T18982.$tc'Ex3 :: GHC.Internal.Prim.Addr#
|
|
| 115 | -T18982.$tc'Ex3 = "'Ex"#
|
|
| 102 | +$tc'Ex1 :: GHC.Internal.Prim.Addr#
|
|
| 103 | +$tc'Ex1 = "'Ex"#
|
|
| 116 | 104 | |
| 117 | 105 | -- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
|
| 118 | -T18982.$tc'Ex2 :: GHC.Internal.Types.TrName
|
|
| 119 | -T18982.$tc'Ex2 = GHC.Internal.Types.TrNameS T18982.$tc'Ex3
|
|
| 106 | +$tc'Ex2 :: GHC.Internal.Types.TrName
|
|
| 107 | +$tc'Ex2 = GHC.Internal.Types.TrNameS $tc'Ex1
|
|
| 120 | 108 | |
| 121 | 109 | -- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
|
| 122 | 110 | T18982.$tc'Ex :: GHC.Internal.Types.TyCon
|
| 123 | -T18982.$tc'Ex = GHC.Internal.Types.TyCon 14609381081172201359#Word64 3077219645053200509#Word64 T18982.$trModule T18982.$tc'Ex2 2# T18982.$tc'Ex1
|
|
| 111 | +T18982.$tc'Ex = GHC.Internal.Types.TyCon 14609381081172201359#Word64 3077219645053200509#Word64 T18982.$trModule $tc'Ex2 2# $krep9
|
|
| 124 | 112 | |
| 125 | 113 | -- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
|
| 126 | -T18982.$tcGADT2 :: GHC.Internal.Prim.Addr#
|
|
| 127 | -T18982.$tcGADT2 = "GADT"#
|
|
| 114 | +$tcGADT1 :: GHC.Internal.Prim.Addr#
|
|
| 115 | +$tcGADT1 = "GADT"#
|
|
| 128 | 116 | |
| 129 | 117 | -- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
|
| 130 | -T18982.$tcGADT1 :: GHC.Internal.Types.TrName
|
|
| 131 | -T18982.$tcGADT1 = GHC.Internal.Types.TrNameS T18982.$tcGADT2
|
|
| 118 | +$tcGADT2 :: GHC.Internal.Types.TrName
|
|
| 119 | +$tcGADT2 = GHC.Internal.Types.TrNameS $tcGADT1
|
|
| 132 | 120 | |
| 133 | 121 | -- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
|
| 134 | 122 | T18982.$tcGADT :: GHC.Internal.Types.TyCon
|
| 135 | -T18982.$tcGADT = GHC.Internal.Types.TyCon 9243924476135839950#Word64 5096619276488416461#Word64 T18982.$trModule T18982.$tcGADT1 0# GHC.Internal.Types.krep$*Arr*
|
|
| 123 | +T18982.$tcGADT = GHC.Internal.Types.TyCon 9243924476135839950#Word64 5096619276488416461#Word64 T18982.$trModule $tcGADT2 0# GHC.Internal.Types.krep$*Arr*
|
|
| 136 | 124 | |
| 137 | 125 | -- RHS size: {terms: 3, types: 2, coercions: 0, joins: 0/0}
|
| 138 | -$krep8 :: [GHC.Internal.Types.KindRep]
|
|
| 139 | -$krep8 = GHC.Internal.Types.: @GHC.Internal.Types.KindRep $krep (GHC.Internal.Types.[] @GHC.Internal.Types.KindRep)
|
|
| 126 | +$krep10 :: [GHC.Internal.Types.KindRep]
|
|
| 127 | +$krep10 = GHC.Internal.Types.: @GHC.Internal.Types.KindRep $krep (GHC.Internal.Types.[] @GHC.Internal.Types.KindRep)
|
|
| 140 | 128 | |
| 141 | 129 | -- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
|
| 142 | -$krep9 :: GHC.Internal.Types.KindRep
|
|
| 143 | -$krep9 = GHC.Internal.Types.KindRepTyConApp T18982.$tcGADT $krep8
|
|
| 130 | +$krep11 :: GHC.Internal.Types.KindRep
|
|
| 131 | +$krep11 = GHC.Internal.Types.KindRepTyConApp T18982.$tcGADT $krep10
|
|
| 144 | 132 | |
| 145 | 133 | -- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
|
| 146 | -T18982.$tc'GADT1 :: GHC.Internal.Types.KindRep
|
|
| 147 | -T18982.$tc'GADT1 = GHC.Internal.Types.KindRepFun $krep $krep9
|
|
| 134 | +$krep12 :: GHC.Internal.Types.KindRep
|
|
| 135 | +$krep12 = GHC.Internal.Types.KindRepFun $krep $krep11
|
|
| 148 | 136 | |
| 149 | 137 | -- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
|
| 150 | -T18982.$tc'GADT3 :: GHC.Internal.Prim.Addr#
|
|
| 151 | -T18982.$tc'GADT3 = "'GADT"#
|
|
| 138 | +$tc'GADT1 :: GHC.Internal.Prim.Addr#
|
|
| 139 | +$tc'GADT1 = "'GADT"#
|
|
| 152 | 140 | |
| 153 | 141 | -- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
|
| 154 | -T18982.$tc'GADT2 :: GHC.Internal.Types.TrName
|
|
| 155 | -T18982.$tc'GADT2 = GHC.Internal.Types.TrNameS T18982.$tc'GADT3
|
|
| 142 | +$tc'GADT2 :: GHC.Internal.Types.TrName
|
|
| 143 | +$tc'GADT2 = GHC.Internal.Types.TrNameS $tc'GADT1
|
|
| 156 | 144 | |
| 157 | 145 | -- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
|
| 158 | 146 | T18982.$tc'GADT :: GHC.Internal.Types.TyCon
|
| 159 | -T18982.$tc'GADT = GHC.Internal.Types.TyCon 2077850259354179864#Word64 16731205864486799217#Word64 T18982.$trModule T18982.$tc'GADT2 0# T18982.$tc'GADT1
|
|
| 147 | +T18982.$tc'GADT = GHC.Internal.Types.TyCon 2077850259354179864#Word64 16731205864486799217#Word64 T18982.$trModule $tc'GADT2 0# $krep12
|
|
| 160 | 148 | |
| 161 | 149 | -- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
|
| 162 | -T18982.$tcExGADT2 :: GHC.Internal.Prim.Addr#
|
|
| 163 | -T18982.$tcExGADT2 = "ExGADT"#
|
|
| 150 | +$tcExGADT1 :: GHC.Internal.Prim.Addr#
|
|
| 151 | +$tcExGADT1 = "ExGADT"#
|
|
| 164 | 152 | |
| 165 | 153 | -- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
|
| 166 | -T18982.$tcExGADT1 :: GHC.Internal.Types.TrName
|
|
| 167 | -T18982.$tcExGADT1 = GHC.Internal.Types.TrNameS T18982.$tcExGADT2
|
|
| 154 | +$tcExGADT2 :: GHC.Internal.Types.TrName
|
|
| 155 | +$tcExGADT2 = GHC.Internal.Types.TrNameS $tcExGADT1
|
|
| 168 | 156 | |
| 169 | 157 | -- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
|
| 170 | 158 | T18982.$tcExGADT :: GHC.Internal.Types.TyCon
|
| 171 | -T18982.$tcExGADT = GHC.Internal.Types.TyCon 6470898418160489500#Word64 10361108917441214060#Word64 T18982.$trModule T18982.$tcExGADT1 0# GHC.Internal.Types.krep$*Arr*
|
|
| 159 | +T18982.$tcExGADT = GHC.Internal.Types.TyCon 6470898418160489500#Word64 10361108917441214060#Word64 T18982.$trModule $tcExGADT2 0# GHC.Internal.Types.krep$*Arr*
|
|
| 172 | 160 | |
| 173 | 161 | -- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
|
| 174 | -$krep10 :: GHC.Internal.Types.KindRep
|
|
| 175 | -$krep10 = GHC.Internal.Types.KindRepTyConApp T18982.$tcExGADT $krep8
|
|
| 162 | +$krep13 :: GHC.Internal.Types.KindRep
|
|
| 163 | +$krep13 = GHC.Internal.Types.KindRepTyConApp T18982.$tcExGADT $krep10
|
|
| 176 | 164 | |
| 177 | 165 | -- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
|
| 178 | -$krep11 :: GHC.Internal.Types.KindRep
|
|
| 179 | -$krep11 = GHC.Internal.Types.KindRepFun $krep $krep10
|
|
| 166 | +$krep14 :: GHC.Internal.Types.KindRep
|
|
| 167 | +$krep14 = GHC.Internal.Types.KindRepFun $krep $krep13
|
|
| 180 | 168 | |
| 181 | 169 | -- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
|
| 182 | -T18982.$tc'ExGADT1 :: GHC.Internal.Types.KindRep
|
|
| 183 | -T18982.$tc'ExGADT1 = GHC.Internal.Types.KindRepFun $krep2 $krep11
|
|
| 170 | +$krep15 :: GHC.Internal.Types.KindRep
|
|
| 171 | +$krep15 = GHC.Internal.Types.KindRepFun $krep2 $krep14
|
|
| 184 | 172 | |
| 185 | 173 | -- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
|
| 186 | -T18982.$tc'ExGADT3 :: GHC.Internal.Prim.Addr#
|
|
| 187 | -T18982.$tc'ExGADT3 = "'ExGADT"#
|
|
| 174 | +$tc'ExGADT1 :: GHC.Internal.Prim.Addr#
|
|
| 175 | +$tc'ExGADT1 = "'ExGADT"#
|
|
| 188 | 176 | |
| 189 | 177 | -- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
|
| 190 | -T18982.$tc'ExGADT2 :: GHC.Internal.Types.TrName
|
|
| 191 | -T18982.$tc'ExGADT2 = GHC.Internal.Types.TrNameS T18982.$tc'ExGADT3
|
|
| 178 | +$tc'ExGADT2 :: GHC.Internal.Types.TrName
|
|
| 179 | +$tc'ExGADT2 = GHC.Internal.Types.TrNameS $tc'ExGADT1
|
|
| 192 | 180 | |
| 193 | 181 | -- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
|
| 194 | 182 | T18982.$tc'ExGADT :: GHC.Internal.Types.TyCon
|
| 195 | -T18982.$tc'ExGADT = GHC.Internal.Types.TyCon 8468257409157161049#Word64 5503123603717080600#Word64 T18982.$trModule T18982.$tc'ExGADT2 1# T18982.$tc'ExGADT1
|
|
| 183 | +T18982.$tc'ExGADT = GHC.Internal.Types.TyCon 8468257409157161049#Word64 5503123603717080600#Word64 T18982.$trModule $tc'ExGADT2 1# $krep15
|
|
| 196 | 184 | |
| 197 | --- RHS size: {terms: 11, types: 10, coercions: 0, joins: 0/0}
|
|
| 198 | -T18982.$wi :: forall a e. (a GHC.Internal.Prim.~# Int) => e -> GHC.Internal.Prim.Int# -> GHC.Internal.Prim.Int#
|
|
| 199 | -T18982.$wi = \ (@a) (@e) (ww :: a GHC.Internal.Prim.~# Int) (ww1 :: e) (ww2 :: GHC.Internal.Prim.Int#) -> case ww1 of { __DEFAULT -> GHC.Internal.Prim.+# ww2 1# }
|
|
| 185 | +-- RHS size: {terms: 12, types: 14, coercions: 0, joins: 0/0}
|
|
| 186 | +T18982.$wi :: forall a e. (a GHC.Internal.Prim.~# Int, e ~ Int) => e -> GHC.Internal.Prim.Int# -> GHC.Internal.Prim.Int#
|
|
| 187 | +T18982.$wi = \ (@a) (@e) (ww :: a GHC.Internal.Prim.~# Int) (ww1 :: e ~ Int) (ww2 :: e) (ww3 :: GHC.Internal.Prim.Int#) -> case ww2 of { __DEFAULT -> GHC.Internal.Prim.+# ww3 1# }
|
|
| 200 | 188 | |
| 201 | --- RHS size: {terms: 15, types: 22, coercions: 1, joins: 0/0}
|
|
| 189 | +-- RHS size: {terms: 16, types: 22, coercions: 1, joins: 0/0}
|
|
| 202 | 190 | i :: forall a. ExGADT a -> Int
|
| 203 | -i = \ (@a) (ds :: ExGADT a) -> case ds of { ExGADT @e ww ww1 ww2 ww3 -> case ww3 of { GHC.Internal.Types.I# ww4 -> case T18982.$wi @a @e @~(ww :: a GHC.Internal.Prim.~# Int) ww2 ww4 of ww5 { __DEFAULT -> GHC.Internal.Types.I# ww5 } } }
|
|
| 191 | +i = \ (@a) (ds :: ExGADT a) -> case ds of { ExGADT @e ww ww1 ww2 ww3 -> case ww3 of { GHC.Internal.Types.I# ww4 -> case T18982.$wi @a @e @~(ww :: a GHC.Internal.Prim.~# Int) ww1 ww2 ww4 of ww5 { __DEFAULT -> GHC.Internal.Types.I# ww5 } } }
|
|
| 204 | 192 | |
| 205 | 193 | -- RHS size: {terms: 6, types: 7, coercions: 0, joins: 0/0}
|
| 206 | 194 | T18982.$wh :: forall a. (a GHC.Internal.Prim.~# Int) => GHC.Internal.Prim.Int# -> GHC.Internal.Prim.Int#
|
| ... | ... | @@ -2,7 +2,7 @@ |
| 2 | 2 | |
| 3 | 3 | ==================== Tidy Core ====================
|
| 4 | 4 | Result size of Tidy Core
|
| 5 | - = {terms: 1,209, types: 1,155, coercions: 18, joins: 17/29}
|
|
| 5 | + = {terms: 1,229, types: 1,163, coercions: 18, joins: 17/29}
|
|
| 6 | 6 | |
| 7 | 7 | -- RHS size: {terms: 6, types: 8, coercions: 0, joins: 0/0}
|
| 8 | 8 | unArray :: forall a. Array a -> SmallArray# a
|
| ... | ... | @@ -414,7 +414,7 @@ T26615a.$tc'BitmapIndexed |
| 414 | 414 | 2#
|
| 415 | 415 | $krep24
|
| 416 | 416 | |
| 417 | --- RHS size: {terms: 98, types: 109, coercions: 0, joins: 3/4}
|
|
| 417 | +-- RHS size: {terms: 101, types: 113, coercions: 0, joins: 3/4}
|
|
| 418 | 418 | T26615a.$wdisjointCollisions [InlPrag=INLINABLE[2]]
|
| 419 | 419 | :: forall k a b.
|
| 420 | 420 | Eq k =>
|
| ... | ... | @@ -561,13 +561,14 @@ T26615a.$wdisjointCollisions |
| 561 | 561 | joinrec {
|
| 562 | 562 | $wlookupInArrayCont_ [InlPrag=[2],
|
| 563 | 563 | Occ=LoopBreaker,
|
| 564 | - Dmd=SC(S,C(1,C(1,C(1,L))))]
|
|
| 565 | - :: k -> SmallArray# (Leaf k b) -> Int# -> Int# -> Bool
|
|
| 566 | - [LclId[JoinId(4)(Just [!])],
|
|
| 567 | - Arity=4,
|
|
| 568 | - Str=<1L><L><L><L>,
|
|
| 564 | + Dmd=SC(S,C(1,C(1,C(1,C(1,L)))))]
|
|
| 565 | + :: Eq k => k -> SmallArray# (Leaf k b) -> Int# -> Int# -> Bool
|
|
| 566 | + [LclId[JoinId(5)(Just [~, !])],
|
|
| 567 | + Arity=5,
|
|
| 568 | + Str=<A><1L><L><L><L>,
|
|
| 569 | 569 | Unf=OtherCon []]
|
| 570 | - $wlookupInArrayCont_ (k1 :: k)
|
|
| 570 | + $wlookupInArrayCont_ ($dEq1 [Occ=Dead] :: Eq k)
|
|
| 571 | + (k1 :: k)
|
|
| 571 | 572 | (ww3 :: SmallArray# (Leaf k b))
|
| 572 | 573 | (ww4 :: Int#)
|
| 573 | 574 | (ww5 :: Int#)
|
| ... | ... | @@ -578,7 +579,7 @@ T26615a.$wdisjointCollisions |
| 578 | 579 | { (# ipv2 #) ->
|
| 579 | 580 | case ipv2 of { L kx v ->
|
| 580 | 581 | case == @k $dEq k2 kx of {
|
| 581 | - False -> jump $wlookupInArrayCont_ k2 ww3 (+# ww4 1#) ww5;
|
|
| 582 | + False -> jump $wlookupInArrayCont_ $dEq k2 ww3 (+# ww4 1#) ww5;
|
|
| 582 | 583 | True -> GHC.Internal.Types.False
|
| 583 | 584 | }
|
| 584 | 585 | }
|
| ... | ... | @@ -586,7 +587,7 @@ T26615a.$wdisjointCollisions |
| 586 | 587 | 1# -> jump $j
|
| 587 | 588 | }
|
| 588 | 589 | }; } in
|
| 589 | - jump $wlookupInArrayCont_ kA ww2 0# lvl2
|
|
| 590 | + jump $wlookupInArrayCont_ $dEq kA ww2 0# lvl2
|
|
| 590 | 591 | }
|
| 591 | 592 | };
|
| 592 | 593 | 1# -> sc3
|
| ... | ... | @@ -611,7 +612,7 @@ lvl1 |
| 611 | 612 | = GHC.Internal.Control.Exception.Base.patError @LiftedRep @() lvl
|
| 612 | 613 | |
| 613 | 614 | Rec {
|
| 614 | --- RHS size: {terms: 133, types: 126, coercions: 0, joins: 1/2}
|
|
| 615 | +-- RHS size: {terms: 136, types: 130, coercions: 0, joins: 1/2}
|
|
| 615 | 616 | T26615a.disjointSubtrees_$s$wdisjointSubtrees [InlPrag=INLINABLE[2],
|
| 616 | 617 | Occ=LoopBreaker]
|
| 617 | 618 | :: forall k a b.
|
| ... | ... | @@ -641,13 +642,14 @@ T26615a.disjointSubtrees_$s$wdisjointSubtrees |
| 641 | 642 | joinrec {
|
| 642 | 643 | $wlookupInArrayCont_ [InlPrag=[2],
|
| 643 | 644 | Occ=LoopBreaker,
|
| 644 | - Dmd=SC(S,C(1,C(1,C(1,L))))]
|
|
| 645 | - :: k -> SmallArray# (Leaf k a) -> Int# -> Int# -> Bool
|
|
| 646 | - [LclId[JoinId(4)(Just [!])],
|
|
| 647 | - Arity=4,
|
|
| 648 | - Str=<1L><L><L><L>,
|
|
| 645 | + Dmd=SC(S,C(1,C(1,C(1,C(1,L)))))]
|
|
| 646 | + :: Eq k => k -> SmallArray# (Leaf k a) -> Int# -> Int# -> Bool
|
|
| 647 | + [LclId[JoinId(5)(Just [~, !])],
|
|
| 648 | + Arity=5,
|
|
| 649 | + Str=<A><1L><L><L><L>,
|
|
| 649 | 650 | Unf=OtherCon []]
|
| 650 | - $wlookupInArrayCont_ (k1 :: k)
|
|
| 651 | + $wlookupInArrayCont_ ($dEq [Occ=Dead] :: Eq k)
|
|
| 652 | + (k1 :: k)
|
|
| 651 | 653 | (ww :: SmallArray# (Leaf k a))
|
| 652 | 654 | (ww1 :: Int#)
|
| 653 | 655 | (ww2 :: Int#)
|
| ... | ... | @@ -657,7 +659,7 @@ T26615a.disjointSubtrees_$s$wdisjointSubtrees |
| 657 | 659 | case indexSmallArray# @Lifted @(Leaf k a) ww ww1 of { (# ipv #) ->
|
| 658 | 660 | case ipv of { L kx v ->
|
| 659 | 661 | case == @k sc k2 kx of {
|
| 660 | - False -> jump $wlookupInArrayCont_ k2 ww (+# ww1 1#) ww2;
|
|
| 662 | + False -> jump $wlookupInArrayCont_ sc k2 ww (+# ww1 1#) ww2;
|
|
| 661 | 663 | True -> GHC.Internal.Types.False
|
| 662 | 664 | }
|
| 663 | 665 | }
|
| ... | ... | @@ -666,7 +668,7 @@ T26615a.disjointSubtrees_$s$wdisjointSubtrees |
| 666 | 668 | }
|
| 667 | 669 | }; } in
|
| 668 | 670 | jump $wlookupInArrayCont_
|
| 669 | - k0 sc3 0# (sizeofSmallArray# @Lifted @(Leaf k a) sc3)
|
|
| 671 | + sc k0 sc3 0# (sizeofSmallArray# @Lifted @(Leaf k a) sc3)
|
|
| 670 | 672 | }
|
| 671 | 673 | }
|
| 672 | 674 | };
|
| ... | ... | @@ -708,7 +710,7 @@ T26615a.disjointSubtrees_$s$wdisjointSubtrees |
| 708 | 710 | end Rec }
|
| 709 | 711 | |
| 710 | 712 | Rec {
|
| 711 | --- RHS size: {terms: 705, types: 748, coercions: 18, joins: 13/23}
|
|
| 713 | +-- RHS size: {terms: 719, types: 748, coercions: 18, joins: 13/23}
|
|
| 712 | 714 | T26615a.$wdisjointSubtrees [InlPrag=INLINABLE[2], Occ=LoopBreaker]
|
| 713 | 715 | :: forall k a b. Eq k => Int# -> HashMap k a -> HashMap k b -> Bool
|
| 714 | 716 | [GblId[StrictWorker([~, ~, !])],
|
| ... | ... | @@ -1065,23 +1067,23 @@ T26615a.$wdisjointSubtrees [InlPrag=INLINABLE[2], Occ=LoopBreaker] |
| 1065 | 1067 | @(*)
|
| 1066 | 1068 | @(SmallArray# (HashMap k a)
|
| 1067 | 1069 | -> SmallArray# (HashMap k b) -> Int#)
|
| 1068 | - @(GHC.Internal.Types.UnusedType 0 "a"
|
|
| 1069 | - -> GHC.Internal.Types.UnusedType 1 "b" -> Int#)
|
|
| 1070 | + @(GHC.Internal.Types.UnusedType "a_0"
|
|
| 1071 | + -> GHC.Internal.Types.UnusedType "b_1" -> Int#)
|
|
| 1070 | 1072 | of
|
| 1071 | 1073 | { GHC.Internal.Unsafe.Coerce.UnsafeRefl v2 ->
|
| 1072 | 1074 | case reallyUnsafePtrEquality#
|
| 1073 | 1075 | @Lifted
|
| 1074 | 1076 | @Lifted
|
| 1075 | - @(GHC.Internal.Types.UnusedType 0 "a")
|
|
| 1076 | - @(GHC.Internal.Types.UnusedType 1 "b")
|
|
| 1077 | + @(GHC.Internal.Types.UnusedType "a_0")
|
|
| 1078 | + @(GHC.Internal.Types.UnusedType "b_1")
|
|
| 1077 | 1079 | (bx1
|
| 1078 | 1080 | `cast` (SelCo:Fun(arg) (Sub (Sym v2))
|
| 1079 | 1081 | :: SmallArray# (HashMap k a)
|
| 1080 | - ~R# GHC.Internal.Types.UnusedType 0 "a"))
|
|
| 1082 | + ~R# GHC.Internal.Types.UnusedType "a_0"))
|
|
| 1081 | 1083 | (bx3
|
| 1082 | 1084 | `cast` (SelCo:Fun(arg) (SelCo:Fun(res) (Sub (Sym v2)))
|
| 1083 | 1085 | :: SmallArray# (HashMap k b)
|
| 1084 | - ~R# GHC.Internal.Types.UnusedType 1 "b"))
|
|
| 1086 | + ~R# GHC.Internal.Types.UnusedType "b_1"))
|
|
| 1085 | 1087 | of {
|
| 1086 | 1088 | __DEFAULT ->
|
| 1087 | 1089 | joinrec {
|
| ... | ... | @@ -1234,23 +1236,23 @@ T26615a.$wdisjointSubtrees [InlPrag=INLINABLE[2], Occ=LoopBreaker] |
| 1234 | 1236 | case GHC.Internal.Unsafe.Coerce.unsafeEqualityProof
|
| 1235 | 1237 | @(*)
|
| 1236 | 1238 | @(SmallArray# (HashMap k a) -> SmallArray# (HashMap k b) -> Int#)
|
| 1237 | - @(GHC.Internal.Types.UnusedType 0 "a"
|
|
| 1238 | - -> GHC.Internal.Types.UnusedType 1 "b" -> Int#)
|
|
| 1239 | + @(GHC.Internal.Types.UnusedType "a_0"
|
|
| 1240 | + -> GHC.Internal.Types.UnusedType "b_1" -> Int#)
|
|
| 1239 | 1241 | of
|
| 1240 | 1242 | { GHC.Internal.Unsafe.Coerce.UnsafeRefl v2 ->
|
| 1241 | 1243 | case reallyUnsafePtrEquality#
|
| 1242 | 1244 | @Lifted
|
| 1243 | 1245 | @Lifted
|
| 1244 | - @(GHC.Internal.Types.UnusedType 0 "a")
|
|
| 1245 | - @(GHC.Internal.Types.UnusedType 1 "b")
|
|
| 1246 | + @(GHC.Internal.Types.UnusedType "a_0")
|
|
| 1247 | + @(GHC.Internal.Types.UnusedType "b_1")
|
|
| 1246 | 1248 | (bx
|
| 1247 | 1249 | `cast` (SelCo:Fun(arg) (Sub (Sym v2))
|
| 1248 | 1250 | :: SmallArray# (HashMap k a)
|
| 1249 | - ~R# GHC.Internal.Types.UnusedType 0 "a"))
|
|
| 1251 | + ~R# GHC.Internal.Types.UnusedType "a_0"))
|
|
| 1250 | 1252 | (bx1
|
| 1251 | 1253 | `cast` (SelCo:Fun(arg) (SelCo:Fun(res) (Sub (Sym v2)))
|
| 1252 | 1254 | :: SmallArray# (HashMap k b)
|
| 1253 | - ~R# GHC.Internal.Types.UnusedType 1 "b"))
|
|
| 1255 | + ~R# GHC.Internal.Types.UnusedType "b_1"))
|
|
| 1254 | 1256 | of {
|
| 1255 | 1257 | __DEFAULT -> jump go (GHC.Internal.Types.I# 31#);
|
| 1256 | 1258 | 1# -> GHC.Internal.Types.False
|
| ... | ... | @@ -1310,13 +1312,14 @@ T26615a.$wdisjointSubtrees |
| 1310 | 1312 | joinrec {
|
| 1311 | 1313 | $wlookupInArrayCont_ [InlPrag=[2],
|
| 1312 | 1314 | Occ=LoopBreaker,
|
| 1313 | - Dmd=SC(S,C(1,C(1,C(1,L))))]
|
|
| 1314 | - :: k -> SmallArray# (Leaf k a) -> Int# -> Int# -> Bool
|
|
| 1315 | - [LclId[JoinId(4)(Just [!])],
|
|
| 1316 | - Arity=4,
|
|
| 1317 | - Str=<1L><L><L><L>,
|
|
| 1315 | + Dmd=SC(S,C(1,C(1,C(1,C(1,L)))))]
|
|
| 1316 | + :: Eq k => k -> SmallArray# (Leaf k a) -> Int# -> Int# -> Bool
|
|
| 1317 | + [LclId[JoinId(5)(Just [~, !])],
|
|
| 1318 | + Arity=5,
|
|
| 1319 | + Str=<A><1L><L><L><L>,
|
|
| 1318 | 1320 | Unf=OtherCon []]
|
| 1319 | - $wlookupInArrayCont_ (k1 :: k)
|
|
| 1321 | + $wlookupInArrayCont_ ($dEq1 [Occ=Dead] :: Eq k)
|
|
| 1322 | + (k1 :: k)
|
|
| 1320 | 1323 | (ww2 :: SmallArray# (Leaf k a))
|
| 1321 | 1324 | (ww3 :: Int#)
|
| 1322 | 1325 | (ww4 :: Int#)
|
| ... | ... | @@ -1327,7 +1330,8 @@ T26615a.$wdisjointSubtrees |
| 1327 | 1330 | { (# ipv #) ->
|
| 1328 | 1331 | case ipv of { L kx v ->
|
| 1329 | 1332 | case == @k $dEq k2 kx of {
|
| 1330 | - False -> jump $wlookupInArrayCont_ k2 ww2 (+# ww3 1#) ww4;
|
|
| 1333 | + False ->
|
|
| 1334 | + jump $wlookupInArrayCont_ $dEq k2 ww2 (+# ww3 1#) ww4;
|
|
| 1331 | 1335 | True -> GHC.Internal.Types.False
|
| 1332 | 1336 | }
|
| 1333 | 1337 | }
|
| ... | ... | @@ -1336,18 +1340,19 @@ T26615a.$wdisjointSubtrees |
| 1336 | 1340 | }
|
| 1337 | 1341 | }; } in
|
| 1338 | 1342 | jump $wlookupInArrayCont_
|
| 1339 | - ds4 bx2 0# (sizeofSmallArray# @Lifted @(Leaf k a) bx2)
|
|
| 1343 | + $dEq ds4 bx2 0# (sizeofSmallArray# @Lifted @(Leaf k a) bx2)
|
|
| 1340 | 1344 | } } in
|
| 1341 | 1345 | joinrec {
|
| 1342 | 1346 | $wlookupCont_ [InlPrag=[2],
|
| 1343 | 1347 | Occ=LoopBreaker,
|
| 1344 | - Dmd=SC(S,C(1,C(1,C(1,L))))]
|
|
| 1345 | - :: Word# -> k -> Int# -> HashMap k a -> Bool
|
|
| 1346 | - [LclId[JoinId(4)(Just [~, !, ~, !])],
|
|
| 1347 | - Arity=4,
|
|
| 1348 | - Str=<L><1L><L><1L>,
|
|
| 1348 | + Dmd=SC(S,C(1,C(1,C(1,C(1,L)))))]
|
|
| 1349 | + :: Eq k => Word# -> k -> Int# -> HashMap k a -> Bool
|
|
| 1350 | + [LclId[JoinId(5)(Just [~, ~, !, ~, !])],
|
|
| 1351 | + Arity=5,
|
|
| 1352 | + Str=<A><L><1L><L><1L>,
|
|
| 1349 | 1353 | Unf=OtherCon []]
|
| 1350 | - $wlookupCont_ (ww1 :: Word#)
|
|
| 1354 | + $wlookupCont_ ($dEq1 [Occ=Dead] :: Eq k)
|
|
| 1355 | + (ww1 :: Word#)
|
|
| 1351 | 1356 | (ds4 :: k)
|
| 1352 | 1357 | (ww2 :: Int#)
|
| 1353 | 1358 | (ds5 :: HashMap k a)
|
| ... | ... | @@ -1371,7 +1376,7 @@ T26615a.$wdisjointSubtrees |
| 1371 | 1376 | (word2Int# (popCnt# (and# bx1 (minusWord# m 1##))))
|
| 1372 | 1377 | of
|
| 1373 | 1378 | { (# ipv #) ->
|
| 1374 | - jump $wlookupCont_ ww1 ds6 (+# ww2 5#) ipv
|
|
| 1379 | + jump $wlookupCont_ $dEq ww1 ds6 (+# ww2 5#) ipv
|
|
| 1375 | 1380 | };
|
| 1376 | 1381 | 0## -> GHC.Internal.Types.True
|
| 1377 | 1382 | };
|
| ... | ... | @@ -1383,11 +1388,11 @@ T26615a.$wdisjointSubtrees |
| 1383 | 1388 | (word2Int# (and# (uncheckedShiftRL# ww1 ww2) 31##))
|
| 1384 | 1389 | of
|
| 1385 | 1390 | { (# ipv #) ->
|
| 1386 | - jump $wlookupCont_ ww1 ds6 (+# ww2 5#) ipv
|
|
| 1391 | + jump $wlookupCont_ $dEq ww1 ds6 (+# ww2 5#) ipv
|
|
| 1387 | 1392 | }
|
| 1388 | 1393 | }
|
| 1389 | 1394 | }; } in
|
| 1390 | - jump $wlookupCont_ bx k0 ww ds
|
|
| 1395 | + jump $wlookupCont_ $dEq bx k0 ww ds
|
|
| 1391 | 1396 | }
|
| 1392 | 1397 | };
|
| 1393 | 1398 | Collision bx bx1 ->
|
| ... | ... | @@ -1435,13 +1440,14 @@ T26615a.$wdisjointSubtrees |
| 1435 | 1440 | joinrec {
|
| 1436 | 1441 | $wlookupInArrayCont_ [InlPrag=[2],
|
| 1437 | 1442 | Occ=LoopBreaker,
|
| 1438 | - Dmd=SC(S,C(1,C(1,C(1,L))))]
|
|
| 1439 | - :: k -> SmallArray# (Leaf k b) -> Int# -> Int# -> Bool
|
|
| 1440 | - [LclId[JoinId(4)(Just [!])],
|
|
| 1441 | - Arity=4,
|
|
| 1442 | - Str=<1L><L><L><L>,
|
|
| 1443 | + Dmd=SC(S,C(1,C(1,C(1,C(1,L)))))]
|
|
| 1444 | + :: Eq k => k -> SmallArray# (Leaf k b) -> Int# -> Int# -> Bool
|
|
| 1445 | + [LclId[JoinId(5)(Just [~, !])],
|
|
| 1446 | + Arity=5,
|
|
| 1447 | + Str=<A><1L><L><L><L>,
|
|
| 1443 | 1448 | Unf=OtherCon []]
|
| 1444 | - $wlookupInArrayCont_ (k1 :: k)
|
|
| 1449 | + $wlookupInArrayCont_ ($dEq1 [Occ=Dead] :: Eq k)
|
|
| 1450 | + (k1 :: k)
|
|
| 1445 | 1451 | (ww2 :: SmallArray# (Leaf k b))
|
| 1446 | 1452 | (ww3 :: Int#)
|
| 1447 | 1453 | (ww4 :: Int#)
|
| ... | ... | @@ -1452,7 +1458,7 @@ T26615a.$wdisjointSubtrees |
| 1452 | 1458 | { (# ipv #) ->
|
| 1453 | 1459 | case ipv of { L kx v ->
|
| 1454 | 1460 | case == @k $dEq k2 kx of {
|
| 1455 | - False -> jump $wlookupInArrayCont_ k2 ww2 (+# ww3 1#) ww4;
|
|
| 1461 | + False -> jump $wlookupInArrayCont_ $dEq k2 ww2 (+# ww3 1#) ww4;
|
|
| 1456 | 1462 | True -> GHC.Internal.Types.False
|
| 1457 | 1463 | }
|
| 1458 | 1464 | }
|
| ... | ... | @@ -1461,18 +1467,19 @@ T26615a.$wdisjointSubtrees |
| 1461 | 1467 | }
|
| 1462 | 1468 | }; } in
|
| 1463 | 1469 | jump $wlookupInArrayCont_
|
| 1464 | - ds3 bx2 0# (sizeofSmallArray# @Lifted @(Leaf k b) bx2)
|
|
| 1470 | + $dEq ds3 bx2 0# (sizeofSmallArray# @Lifted @(Leaf k b) bx2)
|
|
| 1465 | 1471 | } } in
|
| 1466 | 1472 | joinrec {
|
| 1467 | 1473 | $wlookupCont_ [InlPrag=[2],
|
| 1468 | 1474 | Occ=LoopBreaker,
|
| 1469 | - Dmd=SC(S,C(1,C(1,C(1,L))))]
|
|
| 1470 | - :: Word# -> k -> Int# -> HashMap k b -> Bool
|
|
| 1471 | - [LclId[JoinId(4)(Just [~, !, ~, !])],
|
|
| 1472 | - Arity=4,
|
|
| 1473 | - Str=<L><1L><L><1L>,
|
|
| 1475 | + Dmd=SC(S,C(1,C(1,C(1,C(1,L)))))]
|
|
| 1476 | + :: Eq k => Word# -> k -> Int# -> HashMap k b -> Bool
|
|
| 1477 | + [LclId[JoinId(5)(Just [~, ~, !, ~, !])],
|
|
| 1478 | + Arity=5,
|
|
| 1479 | + Str=<A><L><1L><L><1L>,
|
|
| 1474 | 1480 | Unf=OtherCon []]
|
| 1475 | - $wlookupCont_ (ww1 :: Word#)
|
|
| 1481 | + $wlookupCont_ ($dEq1 [Occ=Dead] :: Eq k)
|
|
| 1482 | + (ww1 :: Word#)
|
|
| 1476 | 1483 | (ds3 :: k)
|
| 1477 | 1484 | (ww2 :: Int#)
|
| 1478 | 1485 | (ds4 :: HashMap k b)
|
| ... | ... | @@ -1496,7 +1503,7 @@ T26615a.$wdisjointSubtrees |
| 1496 | 1503 | (word2Int# (popCnt# (and# bx1 (minusWord# m 1##))))
|
| 1497 | 1504 | of
|
| 1498 | 1505 | { (# ipv #) ->
|
| 1499 | - jump $wlookupCont_ ww1 ds5 (+# ww2 5#) ipv
|
|
| 1506 | + jump $wlookupCont_ $dEq ww1 ds5 (+# ww2 5#) ipv
|
|
| 1500 | 1507 | };
|
| 1501 | 1508 | 0## -> GHC.Internal.Types.True
|
| 1502 | 1509 | };
|
| ... | ... | @@ -1508,11 +1515,11 @@ T26615a.$wdisjointSubtrees |
| 1508 | 1515 | (word2Int# (and# (uncheckedShiftRL# ww1 ww2) 31##))
|
| 1509 | 1516 | of
|
| 1510 | 1517 | { (# ipv #) ->
|
| 1511 | - jump $wlookupCont_ ww1 ds5 (+# ww2 5#) ipv
|
|
| 1518 | + jump $wlookupCont_ $dEq ww1 ds5 (+# ww2 5#) ipv
|
|
| 1512 | 1519 | }
|
| 1513 | 1520 | }
|
| 1514 | 1521 | }; } in
|
| 1515 | - jump $wlookupCont_ bx k0 ww wild2
|
|
| 1522 | + jump $wlookupCont_ $dEq bx k0 ww wild2
|
|
| 1516 | 1523 | };
|
| 1517 | 1524 | Leaf bx1 ds3 ->
|
| 1518 | 1525 | case ds3 of { L kB ds4 ->
|
| ... | ... | @@ -1570,23 +1577,23 @@ T26615a.$wdisjointSubtrees |
| 1570 | 1577 | case GHC.Internal.Unsafe.Coerce.unsafeEqualityProof
|
| 1571 | 1578 | @(*)
|
| 1572 | 1579 | @(SmallArray# (HashMap k a) -> SmallArray# (HashMap k b) -> Int#)
|
| 1573 | - @(GHC.Internal.Types.UnusedType 0 "a"
|
|
| 1574 | - -> GHC.Internal.Types.UnusedType 1 "b" -> Int#)
|
|
| 1580 | + @(GHC.Internal.Types.UnusedType "a_0"
|
|
| 1581 | + -> GHC.Internal.Types.UnusedType "b_1" -> Int#)
|
|
| 1575 | 1582 | of
|
| 1576 | 1583 | { GHC.Internal.Unsafe.Coerce.UnsafeRefl v2 ->
|
| 1577 | 1584 | case reallyUnsafePtrEquality#
|
| 1578 | 1585 | @Lifted
|
| 1579 | 1586 | @Lifted
|
| 1580 | - @(GHC.Internal.Types.UnusedType 0 "a")
|
|
| 1581 | - @(GHC.Internal.Types.UnusedType 1 "b")
|
|
| 1587 | + @(GHC.Internal.Types.UnusedType "a_0")
|
|
| 1588 | + @(GHC.Internal.Types.UnusedType "b_1")
|
|
| 1582 | 1589 | (bx1
|
| 1583 | 1590 | `cast` (SelCo:Fun(arg) (Sub (Sym v2))
|
| 1584 | 1591 | :: SmallArray# (HashMap k a)
|
| 1585 | - ~R# GHC.Internal.Types.UnusedType 0 "a"))
|
|
| 1592 | + ~R# GHC.Internal.Types.UnusedType "a_0"))
|
|
| 1586 | 1593 | (bx3
|
| 1587 | 1594 | `cast` (SelCo:Fun(arg) (SelCo:Fun(res) (Sub (Sym v2)))
|
| 1588 | 1595 | :: SmallArray# (HashMap k b)
|
| 1589 | - ~R# GHC.Internal.Types.UnusedType 1 "b"))
|
|
| 1596 | + ~R# GHC.Internal.Types.UnusedType "b_1"))
|
|
| 1590 | 1597 | of {
|
| 1591 | 1598 | __DEFAULT ->
|
| 1592 | 1599 | let {
|
| ... | ... | @@ -1715,23 +1722,23 @@ T26615a.$wdisjointSubtrees |
| 1715 | 1722 | case GHC.Internal.Unsafe.Coerce.unsafeEqualityProof
|
| 1716 | 1723 | @(*)
|
| 1717 | 1724 | @(SmallArray# (HashMap k a) -> SmallArray# (HashMap k b) -> Int#)
|
| 1718 | - @(GHC.Internal.Types.UnusedType 0 "a"
|
|
| 1719 | - -> GHC.Internal.Types.UnusedType 1 "b" -> Int#)
|
|
| 1725 | + @(GHC.Internal.Types.UnusedType "a_0"
|
|
| 1726 | + -> GHC.Internal.Types.UnusedType "b_1" -> Int#)
|
|
| 1720 | 1727 | of
|
| 1721 | 1728 | { GHC.Internal.Unsafe.Coerce.UnsafeRefl v2 ->
|
| 1722 | 1729 | case reallyUnsafePtrEquality#
|
| 1723 | 1730 | @Lifted
|
| 1724 | 1731 | @Lifted
|
| 1725 | - @(GHC.Internal.Types.UnusedType 0 "a")
|
|
| 1726 | - @(GHC.Internal.Types.UnusedType 1 "b")
|
|
| 1732 | + @(GHC.Internal.Types.UnusedType "a_0")
|
|
| 1733 | + @(GHC.Internal.Types.UnusedType "b_1")
|
|
| 1727 | 1734 | (bx
|
| 1728 | 1735 | `cast` (SelCo:Fun(arg) (Sub (Sym v2))
|
| 1729 | 1736 | :: SmallArray# (HashMap k a)
|
| 1730 | - ~R# GHC.Internal.Types.UnusedType 0 "a"))
|
|
| 1737 | + ~R# GHC.Internal.Types.UnusedType "a_0"))
|
|
| 1731 | 1738 | (bx1
|
| 1732 | 1739 | `cast` (SelCo:Fun(arg) (SelCo:Fun(res) (Sub (Sym v2)))
|
| 1733 | 1740 | :: SmallArray# (HashMap k b)
|
| 1734 | - ~R# GHC.Internal.Types.UnusedType 1 "b"))
|
|
| 1741 | + ~R# GHC.Internal.Types.UnusedType "b_1"))
|
|
| 1735 | 1742 | of {
|
| 1736 | 1743 | __DEFAULT ->
|
| 1737 | 1744 | let {
|
| ... | ... | @@ -1838,7 +1845,7 @@ disjointSubtrees |
| 1838 | 1845 | |
| 1839 | 1846 | ==================== Tidy Core ====================
|
| 1840 | 1847 | Result size of Tidy Core
|
| 1841 | - = {terms: 614, types: 682, coercions: 18, joins: 8/14}
|
|
| 1848 | + = {terms: 622, types: 674, coercions: 18, joins: 8/14}
|
|
| 1842 | 1849 | |
| 1843 | 1850 | -- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
|
| 1844 | 1851 | $trModule1 :: GHC.Internal.Prim.Addr#
|
| ... | ... | @@ -1878,20 +1885,22 @@ lvl1 |
| 1878 | 1885 | @GHC.Internal.Types.LiftedRep @() lvl
|
| 1879 | 1886 | |
| 1880 | 1887 | Rec {
|
| 1881 | --- RHS size: {terms: 37, types: 30, coercions: 0, joins: 0/0}
|
|
| 1888 | +-- RHS size: {terms: 39, types: 32, coercions: 0, joins: 0/0}
|
|
| 1882 | 1889 | $wpoly_lookupInArrayCont_
|
| 1883 | 1890 | :: forall a.
|
| 1891 | + Eq String =>
|
|
| 1884 | 1892 | String
|
| 1885 | 1893 | -> GHC.Internal.Prim.SmallArray# (T26615a.Leaf String a)
|
| 1886 | 1894 | -> GHC.Internal.Prim.Int#
|
| 1887 | 1895 | -> GHC.Internal.Prim.Int#
|
| 1888 | 1896 | -> Bool
|
| 1889 | -[GblId[StrictWorker([!])],
|
|
| 1890 | - Arity=4,
|
|
| 1891 | - Str=<1L><L><L><L>,
|
|
| 1897 | +[GblId[StrictWorker([~, !])],
|
|
| 1898 | + Arity=5,
|
|
| 1899 | + Str=<A><1L><L><L><L>,
|
|
| 1892 | 1900 | Unf=OtherCon []]
|
| 1893 | 1901 | $wpoly_lookupInArrayCont_
|
| 1894 | 1902 | = \ (@a)
|
| 1903 | + ($dEq2 [Occ=Dead] :: Eq String)
|
|
| 1895 | 1904 | (k1 :: String)
|
| 1896 | 1905 | (ww :: GHC.Internal.Prim.SmallArray# (T26615a.Leaf String a))
|
| 1897 | 1906 | (ww1 :: GHC.Internal.Prim.Int#)
|
| ... | ... | @@ -1907,7 +1916,12 @@ $wpoly_lookupInArrayCont_ |
| 1907 | 1916 | case GHC.Internal.Base.eqString k2 kx of {
|
| 1908 | 1917 | False ->
|
| 1909 | 1918 | $wpoly_lookupInArrayCont_
|
| 1910 | - @a k2 ww (GHC.Internal.Prim.+# ww1 1#) ww2;
|
|
| 1919 | + @a
|
|
| 1920 | + GHC.Internal.Classes.$fEqList_$s$fEqList1
|
|
| 1921 | + k2
|
|
| 1922 | + ww
|
|
| 1923 | + (GHC.Internal.Prim.+# ww1 1#)
|
|
| 1924 | + ww2;
|
|
| 1911 | 1925 | True -> GHC.Internal.Types.False
|
| 1912 | 1926 | }
|
| 1913 | 1927 | }
|
| ... | ... | @@ -1918,17 +1932,19 @@ $wpoly_lookupInArrayCont_ |
| 1918 | 1932 | end Rec }
|
| 1919 | 1933 | |
| 1920 | 1934 | Rec {
|
| 1921 | --- RHS size: {terms: 98, types: 73, coercions: 0, joins: 0/1}
|
|
| 1935 | +-- RHS size: {terms: 102, types: 75, coercions: 0, joins: 0/1}
|
|
| 1922 | 1936 | $wpoly_lookupCont_
|
| 1923 | 1937 | :: forall a.
|
| 1938 | + Eq String =>
|
|
| 1924 | 1939 | GHC.Internal.Prim.Word#
|
| 1925 | 1940 | -> String -> GHC.Internal.Prim.Int# -> HashMap String a -> Bool
|
| 1926 | -[GblId[StrictWorker([~, !, ~, !])],
|
|
| 1927 | - Arity=4,
|
|
| 1928 | - Str=<L><1L><L><1L>,
|
|
| 1941 | +[GblId[StrictWorker([~, ~, !, ~, !])],
|
|
| 1942 | + Arity=5,
|
|
| 1943 | + Str=<A><L><1L><L><1L>,
|
|
| 1929 | 1944 | Unf=OtherCon []]
|
| 1930 | 1945 | $wpoly_lookupCont_
|
| 1931 | 1946 | = \ (@a)
|
| 1947 | + ($dEq1 [Occ=Dead] :: Eq String)
|
|
| 1932 | 1948 | (ww :: GHC.Internal.Prim.Word#)
|
| 1933 | 1949 | (ds5 :: String)
|
| 1934 | 1950 | (ww1 :: GHC.Internal.Prim.Int#)
|
| ... | ... | @@ -1953,6 +1969,7 @@ $wpoly_lookupCont_ |
| 1953 | 1969 | 1# ->
|
| 1954 | 1970 | $wpoly_lookupInArrayCont_
|
| 1955 | 1971 | @a
|
| 1972 | + GHC.Internal.Classes.$fEqList_$s$fEqList1
|
|
| 1956 | 1973 | ds9
|
| 1957 | 1974 | bx2
|
| 1958 | 1975 | 0#
|
| ... | ... | @@ -1979,7 +1996,13 @@ $wpoly_lookupCont_ |
| 1979 | 1996 | (GHC.Internal.Prim.and# bx1 (GHC.Internal.Prim.minusWord# m 1##))))
|
| 1980 | 1997 | of
|
| 1981 | 1998 | { (# ipv2 #) ->
|
| 1982 | - $wpoly_lookupCont_ @a ww ds9 (GHC.Internal.Prim.+# ww1 5#) ipv2
|
|
| 1999 | + $wpoly_lookupCont_
|
|
| 2000 | + @a
|
|
| 2001 | + GHC.Internal.Classes.$fEqList_$s$fEqList1
|
|
| 2002 | + ww
|
|
| 2003 | + ds9
|
|
| 2004 | + (GHC.Internal.Prim.+# ww1 5#)
|
|
| 2005 | + ipv2
|
|
| 1983 | 2006 | };
|
| 1984 | 2007 | 0## -> GHC.Internal.Types.True
|
| 1985 | 2008 | };
|
| ... | ... | @@ -1993,14 +2016,20 @@ $wpoly_lookupCont_ |
| 1993 | 2016 | (GHC.Internal.Prim.uncheckedShiftRL# ww ww1) 31##))
|
| 1994 | 2017 | of
|
| 1995 | 2018 | { (# ipv2 #) ->
|
| 1996 | - $wpoly_lookupCont_ @a ww ds9 (GHC.Internal.Prim.+# ww1 5#) ipv2
|
|
| 2019 | + $wpoly_lookupCont_
|
|
| 2020 | + @a
|
|
| 2021 | + GHC.Internal.Classes.$fEqList_$s$fEqList1
|
|
| 2022 | + ww
|
|
| 2023 | + ds9
|
|
| 2024 | + (GHC.Internal.Prim.+# ww1 5#)
|
|
| 2025 | + ipv2
|
|
| 1997 | 2026 | }
|
| 1998 | 2027 | }
|
| 1999 | 2028 | }
|
| 2000 | 2029 | end Rec }
|
| 2001 | 2030 | |
| 2002 | 2031 | Rec {
|
| 2003 | --- RHS size: {terms: 448, types: 523, coercions: 18, joins: 8/13}
|
|
| 2032 | +-- RHS size: {terms: 450, types: 507, coercions: 18, joins: 8/13}
|
|
| 2004 | 2033 | T26615.$s$wdisjointSubtrees [InlPrag=[~], Occ=LoopBreaker]
|
| 2005 | 2034 | :: forall a b.
|
| 2006 | 2035 | GHC.Internal.Prim.Int#
|
| ... | ... | @@ -2021,7 +2050,8 @@ T26615.$s$wdisjointSubtrees |
| 2021 | 2050 | T26615a.Empty -> GHC.Internal.Types.True;
|
| 2022 | 2051 | T26615a.Leaf bx ds2 ->
|
| 2023 | 2052 | case ds2 of { T26615a.L kB ds3 ->
|
| 2024 | - $wpoly_lookupCont_ @a bx kB ww ds
|
|
| 2053 | + $wpoly_lookupCont_
|
|
| 2054 | + @a GHC.Internal.Classes.$fEqList_$s$fEqList1 bx kB ww ds
|
|
| 2025 | 2055 | };
|
| 2026 | 2056 | T26615a.Collision bx bx1 ->
|
| 2027 | 2057 | T26615.$s$wdisjointSubtrees @b @a ww wild ds
|
| ... | ... | @@ -2031,7 +2061,9 @@ T26615.$s$wdisjointSubtrees |
| 2031 | 2061 | T26615a.Leaf bx ds1 ->
|
| 2032 | 2062 | case ds1 of { T26615a.L kA ds2 ->
|
| 2033 | 2063 | case _b of wild2 {
|
| 2034 | - __DEFAULT -> $wpoly_lookupCont_ @b bx kA ww wild2;
|
|
| 2064 | + __DEFAULT ->
|
|
| 2065 | + $wpoly_lookupCont_
|
|
| 2066 | + @b GHC.Internal.Classes.$fEqList_$s$fEqList1 bx kA ww wild2;
|
|
| 2035 | 2067 | T26615a.Leaf bx1 ds3 ->
|
| 2036 | 2068 | case ds3 of { T26615a.L kB ds4 ->
|
| 2037 | 2069 | case GHC.Internal.Prim.neWord# bx bx1 of {
|
| ... | ... | @@ -2085,9 +2117,9 @@ T26615.$s$wdisjointSubtrees |
| 2085 | 2117 | [LclId[JoinId(0)(Nothing)]]
|
| 2086 | 2118 | $j = jump $s$wfoldr_ sc sc1 (GHC.Internal.Prim.+# sc2 1#) sc3 } in
|
| 2087 | 2119 | joinrec {
|
| 2088 | - $wlookupInArrayCont_ [InlPrag=[2],
|
|
| 2089 | - Occ=LoopBreaker,
|
|
| 2090 | - Dmd=SC(S,C(1,C(1,C(1,L))))]
|
|
| 2120 | + $w$slookupInArrayCont_ [InlPrag=[2],
|
|
| 2121 | + Occ=LoopBreaker,
|
|
| 2122 | + Dmd=SC(S,C(1,C(1,C(1,L))))]
|
|
| 2091 | 2123 | :: String
|
| 2092 | 2124 | -> GHC.Internal.Prim.SmallArray# (T26615a.Leaf String b)
|
| 2093 | 2125 | -> GHC.Internal.Prim.Int#
|
| ... | ... | @@ -2097,12 +2129,12 @@ T26615.$s$wdisjointSubtrees |
| 2097 | 2129 | Arity=4,
|
| 2098 | 2130 | Str=<1L><L><L><L>,
|
| 2099 | 2131 | Unf=OtherCon []]
|
| 2100 | - $wlookupInArrayCont_ (k1 :: String)
|
|
| 2101 | - (ww1
|
|
| 2102 | - :: GHC.Internal.Prim.SmallArray#
|
|
| 2103 | - (T26615a.Leaf String b))
|
|
| 2104 | - (ww2 :: GHC.Internal.Prim.Int#)
|
|
| 2105 | - (ww3 :: GHC.Internal.Prim.Int#)
|
|
| 2132 | + $w$slookupInArrayCont_ (k1 :: String)
|
|
| 2133 | + (ww1
|
|
| 2134 | + :: GHC.Internal.Prim.SmallArray#
|
|
| 2135 | + (T26615a.Leaf String b))
|
|
| 2136 | + (ww2 :: GHC.Internal.Prim.Int#)
|
|
| 2137 | + (ww3 :: GHC.Internal.Prim.Int#)
|
|
| 2106 | 2138 | = case k1 of k2 { __DEFAULT ->
|
| 2107 | 2139 | case GHC.Internal.Prim.>=# ww2 ww3 of {
|
| 2108 | 2140 | __DEFAULT ->
|
| ... | ... | @@ -2116,7 +2148,7 @@ T26615.$s$wdisjointSubtrees |
| 2116 | 2148 | case ipv5 of { T26615a.L kx v ->
|
| 2117 | 2149 | case GHC.Internal.Base.eqString k2 kx of {
|
| 2118 | 2150 | False ->
|
| 2119 | - jump $wlookupInArrayCont_
|
|
| 2151 | + jump $w$slookupInArrayCont_
|
|
| 2120 | 2152 | k2 ww1 (GHC.Internal.Prim.+# ww2 1#) ww3;
|
| 2121 | 2153 | True -> GHC.Internal.Types.False
|
| 2122 | 2154 | }
|
| ... | ... | @@ -2125,7 +2157,7 @@ T26615.$s$wdisjointSubtrees |
| 2125 | 2157 | 1# -> jump $j
|
| 2126 | 2158 | }
|
| 2127 | 2159 | }; } in
|
| 2128 | - jump $wlookupInArrayCont_ kA bx3 0# lvl2
|
|
| 2160 | + jump $w$slookupInArrayCont_ kA bx3 0# lvl2
|
|
| 2129 | 2161 | }
|
| 2130 | 2162 | };
|
| 2131 | 2163 | 1# -> sc3
|
| ... | ... | @@ -2187,23 +2219,23 @@ T26615.$s$wdisjointSubtrees |
| 2187 | 2219 | @(GHC.Internal.Prim.SmallArray# (HashMap String a)
|
| 2188 | 2220 | -> GHC.Internal.Prim.SmallArray# (HashMap String b)
|
| 2189 | 2221 | -> GHC.Internal.Prim.Int#)
|
| 2190 | - @(GHC.Internal.Types.UnusedType 0 "a"
|
|
| 2191 | - -> GHC.Internal.Types.UnusedType 1 "b" -> GHC.Internal.Prim.Int#)
|
|
| 2222 | + @(GHC.Internal.Types.UnusedType "a_0"
|
|
| 2223 | + -> GHC.Internal.Types.UnusedType "b_1" -> GHC.Internal.Prim.Int#)
|
|
| 2192 | 2224 | of
|
| 2193 | 2225 | { GHC.Internal.Unsafe.Coerce.UnsafeRefl v2 ->
|
| 2194 | 2226 | case GHC.Internal.Prim.reallyUnsafePtrEquality#
|
| 2195 | 2227 | @GHC.Internal.Types.Lifted
|
| 2196 | 2228 | @GHC.Internal.Types.Lifted
|
| 2197 | - @(GHC.Internal.Types.UnusedType 0 "a")
|
|
| 2198 | - @(GHC.Internal.Types.UnusedType 1 "b")
|
|
| 2229 | + @(GHC.Internal.Types.UnusedType "a_0")
|
|
| 2230 | + @(GHC.Internal.Types.UnusedType "b_1")
|
|
| 2199 | 2231 | (bx1
|
| 2200 | 2232 | `cast` (SelCo:Fun(arg) (Sub (Sym v2))
|
| 2201 | 2233 | :: GHC.Internal.Prim.SmallArray# (HashMap String a)
|
| 2202 | - ~R# GHC.Internal.Types.UnusedType 0 "a"))
|
|
| 2234 | + ~R# GHC.Internal.Types.UnusedType "a_0"))
|
|
| 2203 | 2235 | (bx3
|
| 2204 | 2236 | `cast` (SelCo:Fun(arg) (SelCo:Fun(res) (Sub (Sym v2)))
|
| 2205 | 2237 | :: GHC.Internal.Prim.SmallArray# (HashMap String b)
|
| 2206 | - ~R# GHC.Internal.Types.UnusedType 1 "b"))
|
|
| 2238 | + ~R# GHC.Internal.Types.UnusedType "b_1"))
|
|
| 2207 | 2239 | of {
|
| 2208 | 2240 | __DEFAULT ->
|
| 2209 | 2241 | joinrec {
|
| ... | ... | @@ -2365,23 +2397,23 @@ T26615.$s$wdisjointSubtrees |
| 2365 | 2397 | @(GHC.Internal.Prim.SmallArray# (HashMap String a)
|
| 2366 | 2398 | -> GHC.Internal.Prim.SmallArray# (HashMap String b)
|
| 2367 | 2399 | -> GHC.Internal.Prim.Int#)
|
| 2368 | - @(GHC.Internal.Types.UnusedType 0 "a"
|
|
| 2369 | - -> GHC.Internal.Types.UnusedType 1 "b" -> GHC.Internal.Prim.Int#)
|
|
| 2400 | + @(GHC.Internal.Types.UnusedType "a_0"
|
|
| 2401 | + -> GHC.Internal.Types.UnusedType "b_1" -> GHC.Internal.Prim.Int#)
|
|
| 2370 | 2402 | of
|
| 2371 | 2403 | { GHC.Internal.Unsafe.Coerce.UnsafeRefl v2 ->
|
| 2372 | 2404 | case GHC.Internal.Prim.reallyUnsafePtrEquality#
|
| 2373 | 2405 | @GHC.Internal.Types.Lifted
|
| 2374 | 2406 | @GHC.Internal.Types.Lifted
|
| 2375 | - @(GHC.Internal.Types.UnusedType 0 "a")
|
|
| 2376 | - @(GHC.Internal.Types.UnusedType 1 "b")
|
|
| 2407 | + @(GHC.Internal.Types.UnusedType "a_0")
|
|
| 2408 | + @(GHC.Internal.Types.UnusedType "b_1")
|
|
| 2377 | 2409 | (bx
|
| 2378 | 2410 | `cast` (SelCo:Fun(arg) (Sub (Sym v2))
|
| 2379 | 2411 | :: GHC.Internal.Prim.SmallArray# (HashMap String a)
|
| 2380 | - ~R# GHC.Internal.Types.UnusedType 0 "a"))
|
|
| 2412 | + ~R# GHC.Internal.Types.UnusedType "a_0"))
|
|
| 2381 | 2413 | (bx1
|
| 2382 | 2414 | `cast` (SelCo:Fun(arg) (SelCo:Fun(res) (Sub (Sym v2)))
|
| 2383 | 2415 | :: GHC.Internal.Prim.SmallArray# (HashMap String b)
|
| 2384 | - ~R# GHC.Internal.Types.UnusedType 1 "b"))
|
|
| 2416 | + ~R# GHC.Internal.Types.UnusedType "b_1"))
|
|
| 2385 | 2417 | of {
|
| 2386 | 2418 | __DEFAULT ->
|
| 2387 | 2419 | joinrec {
|