Magnus pushed to branch wip/mangoiv/unused-type at Glasgow Haskell Compiler / GHC

Commits:

17 changed files:

Changes:

  • changelog.d/unused-type
    1
    +section: compiler
    
    2
    +synopsis: Rename ZonkAny to UnusedType and add pretty printing logic for it.
    
    3
    +issues: #27390
    
    4
    +mrs: !16212
    
    5
    +
    
    6
    +description: {
    
    7
    +  After unification, GHC fills in unconstrained type variables such as ``alpha`` in
    
    8
    +  ``(length :: [alpha] -> Int) ([] :: List alpha) :: Int`` with a fixed type. 
    
    9
    +  This type was, confusingly to the user, called ``ZonkAny``. 
    
    10
    +  This type is now renamed ``UnusedType``, with special pretty-printing logic to make
    
    11
    +  it display like an ordinary metavariable.
    
    12
    +}

  • compiler/GHC/Builtin/Names.hs
    ... ... @@ -1904,8 +1904,8 @@ unsatisfiableClassNameKey = mkPreludeTyConUnique 170
    1904 1904
     anyTyConKey :: Unique
    
    1905 1905
     anyTyConKey = mkPreludeTyConUnique 171
    
    1906 1906
     
    
    1907
    -zonkAnyTyConKey :: Unique
    
    1908
    -zonkAnyTyConKey = mkPreludeTyConUnique 172
    
    1907
    +unusedTypeTyConKey :: Unique
    
    1908
    +unusedTypeTyConKey = mkPreludeTyConUnique 172
    
    1909 1909
     
    
    1910 1910
     -- Custom user type-errors
    
    1911 1911
     errorMessageTypeErrorFamKey :: Unique
    

  • compiler/GHC/Builtin/Types.hs
    ... ... @@ -93,7 +93,7 @@ module GHC.Builtin.Types (
    93 93
             cTupleSelId, cTupleSelIdName,
    
    94 94
     
    
    95 95
             -- * Any
    
    96
    -        anyTyCon, anyTy, anyTypeOfKind, zonkAnyTyCon,
    
    96
    +        anyTyCon, anyTy, anyTypeOfKind, unusedTypeTyCon,
    
    97 97
     
    
    98 98
             -- * Recovery TyCon
    
    99 99
             makeRecoveryTyCon,
    
    ... ... @@ -300,7 +300,7 @@ wiredInTyCons :: [TyCon]
    300 300
     
    
    301 301
     wiredInTyCons = map (dataConTyCon . snd) boxingDataCons
    
    302 302
                  ++ [ anyTyCon
    
    303
    -                , zonkAnyTyCon
    
    303
    +                , unusedTypeTyCon
    
    304 304
                     , boolTyCon
    
    305 305
                     , charTyCon
    
    306 306
                     , stringTyCon
    
    ... ... @@ -412,13 +412,13 @@ doubleDataConName = mkWiredInDataConName UserSyntax gHC_TYPES (fsLit "D#")
    412 412
     {-
    
    413 413
     Note [Any types]
    
    414 414
     ~~~~~~~~~~~~~~~~
    
    415
    -The type constructors `Any` and `ZonkAny` are closed type families declared thus:
    
    415
    +The type constructors `Any` and `UnusedType` are closed type families declared thus:
    
    416 416
     
    
    417
    -    type family Any     :: forall k.        k where { }
    
    418
    -    type family ZonkAny :: forall k. Nat -> k where { }
    
    417
    +    type family Any        :: forall k.                  k where { }
    
    418
    +    type family UnusedType :: forall k. Nat -> Symbol -> k where { }
    
    419 419
     
    
    420 420
     They are used when we want a type of a particular kind, but we don't really care
    
    421
    -what that type is.  The leading example is this: `ZonkAny` is used to instantiate
    
    421
    +what that type is. The leading example is this: `UnusedType` is used to instantiate
    
    422 422
     un-constrained type variables after type checking. For example, consider the
    
    423 423
     term (length [] :: Int), where
    
    424 424
     
    
    ... ... @@ -431,26 +431,26 @@ The typechecker will end up with
    431 431
       length @alpha ([] @alpha)
    
    432 432
     
    
    433 433
     where `alpha` is an un-constrained unification variable.  The "zonking" process zaps
    
    434
    -that unconstrained `alpha` to an arbitrary type (ZonkAny @Type 3), where the `3` is
    
    435
    -arbitrary (see wrinkle (Any5) below).  This is done in `GHC.Tc.Zonk.Type.commitFlexi`.
    
    436
    -So we end up with
    
    434
    +that unconstrained `alpha` to an arbitrary type (UnusedType @Type 3 "a"), where the `3` is
    
    435
    +arbitrary (see wrinkle (Any5) below) and "a" is the name string of the meta variable.
    
    436
    +This is done in `GHC.Tc.Zonk.Type.commitFlexi`. So we end up with
    
    437 437
     
    
    438
    -  length @(ZonkAny @Type 3) ([] @(ZonkAny @Type 3))
    
    438
    +  length @(UnusedType @Type 3 "a") ([] @(UnusedType @Type 3 "a"))
    
    439 439
     
    
    440
    -`Any` and `ZonkAny` differ only in the presence of the `Nat` argument; see
    
    441
    -wrinkle (Any4).
    
    440
    +`Any` and `UnusedType` differ only in the presence of the `Nat` and the `Symbol` arguments;
    
    441
    +see wrinkle (Any4).
    
    442 442
     
    
    443 443
     Wrinkles:
    
    444 444
     
    
    445
    -(Any1) `Any` and `ZonkAny` are kind polymorphic since in some program we may
    
    446
    -   need to use `ZonkAny` to fill in a type variable of some kind other than *
    
    445
    +(Any1) `Any` and `UnusedType` are kind polymorphic since in some program we may
    
    446
    +   need to use `UnusedType` to fill in a type variable of some kind other than *
    
    447 447
        (see #959 for examples).
    
    448 448
     
    
    449 449
     (Any2) They are /closed/ type families, with no instances.  For example, suppose that
    
    450 450
        with  alpha :: '(k1, k2)  we add a given coercion
    
    451 451
                  g :: alpha ~ (Fst alpha, Snd alpha)
    
    452
    -   and we zonked alpha = ZonkAny @(k1,k2) n.  Then, if `ZonkAny` was a /data/ type,
    
    453
    -   we'd get inconsistency because we'd have a Given equality with `ZonkAny` on one
    
    452
    +   and we zonked alpha = UnusedType @(k1,k2) n.  Then, if `UnusedType` was a /data/ type,
    
    453
    +   we'd get inconsistency because we'd have a Given equality with `UnusedType` on one
    
    454 454
        side and '(,) on the other. See also #9097 and #9636.
    
    455 455
     
    
    456 456
        See #25244 for a suggestion that we instead use an /open/ type family for which
    
    ... ... @@ -460,7 +460,7 @@ Wrinkles:
    460 460
        the code generator, because the code gen may /enter/ a data value
    
    461 461
        but never enters a function value.
    
    462 462
     
    
    463
    -(Any4) `ZonkAny` takes a `Nat` argument so that we can readily make up /distinct/
    
    463
    +(Any4) `UnusedType` takes a `Nat` argument so that we can readily make up /distinct/
    
    464 464
        types (#24817).  Consider
    
    465 465
     
    
    466 466
          data SBool a where { STrue :: SBool True; SFalse :: SBool False }
    
    ... ... @@ -475,44 +475,57 @@ Wrinkles:
    475 475
        Now, what are `alpha` and `beta`? If we zonk both of them to the same type
    
    476 476
        `Any @Type`, the pattern-match checker will (wrongly) report that the first
    
    477 477
        branch is inaccessible.  So we zonk them to two /different/ types:
    
    478
    -       alpha :=  ZonkAny @Type 4   and   beta :=  ZonkAny @Type k 5
    
    478
    +       alpha :=  UnusedType @Type 4 "a"  and   beta :=  UnusedType @Type k 5 "b"
    
    479 479
        (The actual numbers are arbitrary; they just need to differ.)
    
    480 480
     
    
    481 481
        The unique-name generation comes from field `tcg_zany_n` of `TcGblEnv`; and
    
    482
    -   `GHC.Tc.Zonk.Type.commitFlexi` calls `GHC.Tc.Utils.Monad.newZonkAnyType` to
    
    482
    +   `GHC.Tc.Zonk.Type.commitFlexi` calls `GHC.Tc.Utils.Monad.newUnusedTypeType` to
    
    483 483
        make up a fresh type.
    
    484 484
     
    
    485 485
        If this example seems unconvincing (e.g. in this case foo must be bottom)
    
    486 486
        see #24817 for larger but more compelling examples.
    
    487 487
     
    
    488
    -(Any5) `Any` and `ZonkAny` are wired-in so we can easily refer to it where we
    
    489
    -    don't have a name environment (e.g. see Rules.matchRule for one example)
    
    488
    +(Any9)
    
    489
    +   `UnusedType` takes a `Symbol` argument, which we use to neatly display zonked unfilled
    
    490
    +   metavariables without leaking internal type families.
    
    490 491
     
    
    491
    -(Any6) `Any` is defined in library module ghc-prim:GHC.Types, and exported so that
    
    492
    -    it is available to users.  For this reason it's treated like any other
    
    493
    -    wired-in type:
    
    494
    -      - has a fixed unique, anyTyConKey,
    
    495
    -      - lives in the global name cache
    
    496
    -    Currently `ZonkAny` is not available to users; but it could easily be.
    
    492
    +   See T13292 for an example of this in action.
    
    493
    +
    
    494
    +   `UnusedType` is handled specially in the pretty-printer to avoid confusing compiler output.
    
    495
    +   For example, `UnusedType 3 "foo" :: Type` is displayed as `foo3`
    
    497 496
     
    
    498
    -(Any7) Properties of `Any`:
    
    499
    -  * When `Any` is instantiated at a lifted type it is inhabited by at least one value,
    
    500
    -    namely bottom.
    
    497
    +   That special handling is implemented in GHC.Iface.Type.pprTyTcApp and more specifically
    
    498
    +   ppr_iface_unused_ty_tycon.
    
    501 499
     
    
    502
    -  * You can safely coerce any /lifted/ type to `Any` and back with `unsafeCoerce`.
    
    500
    +   Historical note: in the past, `UnusedType` was called `ZonkAny` (or `Any` before that).
    
    501
    +   We renamed it to `UnusedType` and added this special treatment in the pretty-printer to avoid
    
    502
    +   confusing mentions of zonking.
    
    503 503
     
    
    504
    -  * You can safely coerce any /unlifted/ type to `Any` and back with `unsafeCoerceUnlifted`.
    
    504
    +(Any5) `Any` and `UnusedType` are wired-in so we can easily refer to it where we
    
    505
    +    don't have a name environment (e.g. see Rules.matchRule for one example)
    
    506
    +
    
    507
    +(Any6) `Any` is defined in library module ghc-internal:GHC.Internal.Types, and exported.
    
    508
    +    `Any` should be available to users mainly because it is a useful type in userspace
    
    509
    +    and is thus re-exported from `GHC.Exts`.
    
    505 510
     
    
    506
    -  * You can coerce /any/ type to `Any` and back with `unsafeCoerce#`, but it's only safe when
    
    507
    -    the kinds of both the type and `Any` match.
    
    511
    +    `UnusedType` *could* be exported mainly for documentation in case a user stumbles over it
    
    512
    +    in debug output of GHC. However, since we don't want to actually have the user use that type
    
    513
    +    and discoverability of internal modules is (and should be) low, and the fact that we
    
    514
    +    cannot depend on `Natural` in ghc-internal:GHC.Internal.Types, we do not export it.
    
    508 515
     
    
    509
    -  * For lifted/unlifted types `unsafeCoerce[Unlifted]` should be preferred over
    
    510
    -    `unsafeCoerce#` as they prevent accidentally coercing between types with kinds
    
    511
    -    that don't match.
    
    516
    +    `Any` is treated like any other wired-in types:
    
    517
    +      - it has a fixed unique, anyTyConKey
    
    518
    +      - lives in the global name cache
    
    512 519
     
    
    513
    -    See examples in ghc-prim:GHC.Types
    
    520
    +     The key property of 'Any' is that it is safe to coerce a type to 'Any' as long
    
    521
    +     as the representation is unchanged. That is, it is OK to use 'unsafeCoerce#' to
    
    522
    +     go from 'ty :: TYPE r to 'Any :: TYPE r' and back, but it is never OK to coerce
    
    523
    +     between types of different representations (including between lifted and unlifted
    
    524
    +     boxed representations).
    
    525
    +     That is, it is useful when e.g. implementing dependent maps or similar typed container
    
    526
    +     types, storing values of type `Any`.
    
    514 527
     
    
    515
    -(Any8) Warning about unused bindings of type `Any` and `ZonkAny` are suppressed,
    
    528
    +(Any8) Warning about unused bindings of type `Any` and `UnusedType` are suppressed,
    
    516 529
         following the same rationale of supressing warning about the unit type.
    
    517 530
     
    
    518 531
         For example, consider (#25895):
    
    ... ... @@ -520,7 +533,7 @@ Wrinkles:
    520 533
          do { forever (return ()); blah }
    
    521 534
     
    
    522 535
         where forever :: forall a b. IO a -> IO b
    
    523
    -    Nothing constrains `b`, so it will be instantiates with `Any` or `ZonkAny`.
    
    536
    +    Nothing constrains `b`, so it will be instantiates with `Any` or `UnusedType`.
    
    524 537
         But we certainly don't want to complain about a discarded do-binding.
    
    525 538
     
    
    526 539
     The Any tycon used to be quite magic, but we have since been able to
    
    ... ... @@ -550,22 +563,23 @@ anyTy = mkTyConTy anyTyCon
    550 563
     anyTypeOfKind :: Kind -> Type
    
    551 564
     anyTypeOfKind kind = mkTyConApp anyTyCon [kind]
    
    552 565
     
    
    553
    -zonkAnyTyConName :: Name
    
    554
    -zonkAnyTyConName =
    
    555
    -    mkWiredInTyConName UserSyntax gHC_TYPES (fsLit "ZonkAny") zonkAnyTyConKey zonkAnyTyCon
    
    566
    +unusedTypeTyConName :: Name
    
    567
    +unusedTypeTyConName =
    
    568
    +    mkWiredInTyConName UserSyntax gHC_TYPES (fsLit "UnusedType") unusedTypeTyConKey unusedTypeTyCon
    
    556 569
     
    
    557
    -zonkAnyTyCon :: TyCon
    
    558
    --- ZonkAnyTyCon :: forall k. Nat -> k
    
    570
    +unusedTypeTyCon :: TyCon
    
    571
    +-- unusedTypeTyCon :: forall k. Nat -> Symbol -> k
    
    559 572
     -- See Note [Any types]
    
    560
    -zonkAnyTyCon = mkFamilyTyCon zonkAnyTyConName kind bndrs 0 res_kind
    
    573
    +unusedTypeTyCon = mkFamilyTyCon unusedTypeTyConName kind bndrs 0 res_kind
    
    561 574
                              Nothing
    
    562 575
                              (ClosedSynFamilyTyCon Nothing)
    
    563 576
                              Nothing
    
    564 577
                              NotInjective
    
    565 578
       where
    
    566
    -    [kv,nat_kv] = mkTemplateKindVars [liftedTypeKind, naturalTy]
    
    579
    +    [kv,nat_kv,sym_kv] = mkTemplateKindVars [liftedTypeKind, naturalTy, typeSymbolKind]
    
    567 580
         bndrs = [ mkNamedTyConBinder Specified kv
    
    568
    -            , mkAnonTyConBinder nat_kv ]
    
    581
    +            , mkAnonTyConBinder nat_kv
    
    582
    +            , mkAnonTyConBinder sym_kv ]
    
    569 583
         res_kind = mkTyVarTy kv
    
    570 584
         kind = mkTyConKind bndrs res_kind
    
    571 585
     
    

  • compiler/GHC/HsToCore/Expr.hs
    ... ... @@ -1281,11 +1281,11 @@ warnDiscardedDoBindings rhs@(L rhs_loc _) m_ty elt_ty
    1281 1281
         do { fam_inst_envs <- dsGetFamInstEnvs
    
    1282 1282
            ; let norm_elt_ty = topNormaliseType fam_inst_envs elt_ty
    
    1283 1283
                  supressible_ty =
    
    1284
    -               isUnitTy norm_elt_ty || isAnyTy norm_elt_ty || isZonkAnyTy norm_elt_ty
    
    1284
    +               isUnitTy norm_elt_ty || isAnyTy norm_elt_ty || isUnusedTypeTy norm_elt_ty
    
    1285 1285
              -- Warn about discarding things in 'monadic' binding,
    
    1286 1286
              -- however few types are excluded:
    
    1287 1287
              --   * Unit type `()`
    
    1288
    -         --   * `ZonkAny` or `Any` type see (Any8) of Note [Any types]
    
    1288
    +         --   * `UnusedType` or `Any` type see (Any8) of Note [Any types]
    
    1289 1289
            ; if warn_unused && not supressible_ty
    
    1290 1290
              then diagnosticDs (DsUnusedDoBind rhs elt_ty)
    
    1291 1291
              else
    

  • compiler/GHC/Iface/Type.hs
    ... ... @@ -7,7 +7,7 @@ This module defines interface types and binders
    7 7
     -}
    
    8 8
     
    
    9 9
     
    
    10
    -{-# LANGUAGE MultiWayIf #-}
    
    10
    +{-# LANGUAGE MultiWayIf, OverloadedRecordDot #-}
    
    11 11
     module GHC.Iface.Type (
    
    12 12
             IfExtName,
    
    13 13
             IfLclName(..), mkIfLclName, ifLclNameFS,
    
    ... ... @@ -1740,6 +1740,7 @@ pprTyTcApp ctxt_prec tc tys =
    1740 1740
         sdocOption sdocPrintExplicitKinds $ \print_kinds ->
    
    1741 1741
         sdocOption sdocPrintTypeAbbreviations $ \print_type_abbreviations ->
    
    1742 1742
         getPprDebug $ \debug ->
    
    1743
    +    getPprStyle $ \style ->
    
    1743 1744
     
    
    1744 1745
         if | ifaceTyConName tc `hasKey` ipClassKey
    
    1745 1746
            , IA_Arg (IfaceLitTy (IfaceStrTyLit n))
    
    ... ... @@ -1791,6 +1792,13 @@ pprTyTcApp ctxt_prec tc tys =
    1791 1792
            | Just doc <- ppr_equality ctxt_prec tc (appArgsIfaceTypes tys)
    
    1792 1793
            -> doc
    
    1793 1794
     
    
    1795
    +       -- See Note [Any types], specifically (Any4) and (Any9)
    
    1796
    +       | ifaceTyConName tc `hasKey` unusedTypeTyConKey
    
    1797
    +       , (arg_k : IfaceLitTy (IfaceNumTyLit arg_n) : IfaceLitTy (IfaceStrTyLit arg_nm) : _) <- appArgsIfaceTypes tys
    
    1798
    +         -- if arg_k is a kind with more than 0 arguments, then _ might not be [] here
    
    1799
    +       , userStyle style
    
    1800
    +       -> ppr_iface_unused_ty_tycon ctxt_prec arg_k arg_n arg_nm
    
    1801
    +
    
    1794 1802
            | otherwise
    
    1795 1803
            -> ppr_iface_tc_app ppr_app_arg ctxt_prec tc $
    
    1796 1804
               appArgsIfaceTypesForAllTyFlags $ stripInvisArgs (PrintExplicitKinds print_kinds) tys
    
    ... ... @@ -1802,6 +1810,19 @@ ppr_kind_type ctxt_prec = sdocOption sdocStarIsType $ \case
    1802 1810
        False -> pprPrefixOcc liftedTypeKindTyConName
    
    1803 1811
        True  -> maybeParen ctxt_prec starPrec starLit
    
    1804 1812
     
    
    1813
    +-- | user-style printer that pretty-prints an 'UnusedType @k 3 "foo" to foo3.
    
    1814
    +-- If -fprint-explicit-kinds or -fprint-explicit-runtime-reps are set, instead
    
    1815
    +-- prints them to (foo3 :: k).
    
    1816
    +-- See Note [Any types], specifically (Any4) and (Any9) for why this is useful.
    
    1817
    +ppr_iface_unused_ty_tycon :: PprPrec -> IfaceType -> Integer -> LexicalFastString -> SDoc
    
    1818
    +ppr_iface_unused_ty_tycon ctxt_prec arg_k arg_n arg_nm
    
    1819
    +  = sdocOption sdocPrintExplicitKinds       $ \print_kinds ->
    
    1820
    +    sdocOption sdocPrintExplicitRuntimeReps $ \print_reps  ->
    
    1821
    +      if print_kinds || print_reps
    
    1822
    +      then maybeParen ctxt_prec sigPrec $ prettyMeta <+> text "::" <+> pprIfaceType arg_k
    
    1823
    +      else prettyMeta
    
    1824
    +  where prettyMeta = ppr arg_nm <> ppr arg_n
    
    1825
    +
    
    1805 1826
     -- | Pretty-print a type-level equality.
    
    1806 1827
     -- Returns (Just doc) if the argument is a /saturated/ application
    
    1807 1828
     -- of   eqTyCon          (~)
    
    ... ... @@ -2190,7 +2211,8 @@ instance Binary IfaceTyConSort where
    2190 2211
              0 -> return IfaceNormalTyCon
    
    2191 2212
              1 -> IfaceTupleTyCon <$> get bh <*> get bh
    
    2192 2213
              2 -> IfaceSumTyCon <$> get bh
    
    2193
    -         _ -> return IfaceEqualityTyCon
    
    2214
    +         3 -> return IfaceEqualityTyCon
    
    2215
    +         _ -> panic "get IfaceTyConSort"
    
    2194 2216
     
    
    2195 2217
     instance Binary IfaceTyConInfo where
    
    2196 2218
        put_ bh (IfaceTyConInfo i s) = put_ bh i >> put_ bh s
    

  • compiler/GHC/Tc/Types.hs
    ... ... @@ -582,7 +582,7 @@ data TcGblEnv
    582 582
               -- ^ Allows us to choose unique DFun names.
    
    583 583
     
    
    584 584
             tcg_zany_n :: TcRef Integer,
    
    585
    -          -- ^ A source of unique identities for ZonkAny instances
    
    585
    +          -- ^ A source of unique identities for UnusedType instances
    
    586 586
               -- See Note [Any types] in GHC.Builtin.Types, wrinkle (Any4)
    
    587 587
     
    
    588 588
             tcg_merged :: [(Module, Fingerprint)],
    

  • compiler/GHC/Tc/Utils/Monad.hs
    ... ... @@ -154,7 +154,7 @@ module GHC.Tc.Utils.Monad(
    154 154
       getCCIndexM, getCCIndexTcM,
    
    155 155
     
    
    156 156
       -- * Zonking
    
    157
    -  liftZonkM, newZonkAnyType,
    
    157
    +  liftZonkM, newUnusedType,
    
    158 158
     
    
    159 159
       -- * Complete matches
    
    160 160
       localAndImportedCompleteMatches, getCompleteMatchesTcM,
    
    ... ... @@ -168,7 +168,7 @@ import GHC.Prelude
    168 168
     
    
    169 169
     
    
    170 170
     import GHC.Builtin.Names
    
    171
    -import GHC.Builtin.Types( zonkAnyTyCon )
    
    171
    +import GHC.Builtin.Types( unusedTypeTyCon )
    
    172 172
     
    
    173 173
     import GHC.Tc.Errors.Types
    
    174 174
     import GHC.Tc.Errors.Hole.Plugin ( HoleFitPlugin, HoleFitPluginR (..) )
    
    ... ... @@ -197,7 +197,7 @@ import GHC.Core.Coercion ( isReflCo )
    197 197
     import GHC.Core.Multiplicity
    
    198 198
     import GHC.Core.InstEnv
    
    199 199
     import GHC.Core.FamInstEnv
    
    200
    -import GHC.Core.Type( mkNumLitTy )
    
    200
    +import GHC.Core.Type( mkNumLitTy, mkStrLitTy )
    
    201 201
     import GHC.Core.TyCo.Rep( CoercionHole(..) )
    
    202 202
     import GHC.Core.TyCo.FVs( coVarsOfCo )
    
    203 203
     import GHC.Core.TyCon ( TyCon )
    
    ... ... @@ -2258,17 +2258,17 @@ chooseUniqueOccTc fn =
    2258 2258
          ; writeTcRef dfun_n_var (extendOccSet set occ)
    
    2259 2259
          ; return occ }
    
    2260 2260
     
    
    2261
    -newZonkAnyType :: Kind -> TcM Type
    
    2262
    --- Return a type (ZonkAny @k n), where n is fresh
    
    2263
    --- Recall  ZonkAny :: forall k. Natural -> k
    
    2261
    +newUnusedType :: Name -> Kind -> TcM Type
    
    2262
    +-- Return a type (UnusedType @k n sym), where n is fresh
    
    2263
    +-- Recall  UnusedType :: forall k. Natural -> Symbol -> k
    
    2264 2264
     -- See Note [Any types] in GHC.Builtin.Types, wrinkle (Any4)
    
    2265
    -newZonkAnyType kind
    
    2265
    +newUnusedType name kind
    
    2266 2266
       = do { env <- getGblEnv
    
    2267 2267
            ; let zany_n_var = tcg_zany_n env
    
    2268 2268
            ; i <- readTcRef zany_n_var
    
    2269 2269
            ; let !i2 = i+1
    
    2270 2270
            ; writeTcRef zany_n_var i2
    
    2271
    -       ; return (mkTyConApp zonkAnyTyCon [kind, mkNumLitTy i]) }
    
    2271
    +       ; return (mkTyConApp unusedTypeTyCon [kind, mkNumLitTy i, mkStrLitTy $ getOccFS name ]) }
    
    2272 2272
     
    
    2273 2273
     getConstraintVar :: TcM (TcRef WantedConstraints)
    
    2274 2274
     getConstraintVar = do { env <- getLclEnv; return (tcl_lie env) }
    

  • compiler/GHC/Tc/Utils/TcType.hs
    ... ... @@ -85,7 +85,7 @@ module GHC.Tc.Utils.TcType (
    85 85
       isSigmaTy, isRhoTy, isRhoExpTy, isOverloadedTy,
    
    86 86
       isFloatingPrimTy, isDoubleTy, isFloatTy, isIntTy, isWordTy, isStringTy,
    
    87 87
       isIntegerTy, isNaturalTy,
    
    88
    -  isBoolTy, isUnitTy, isAnyTy, isZonkAnyTy, isCharTy,
    
    88
    +  isBoolTy, isUnitTy, isAnyTy, isUnusedTypeTy, isCharTy,
    
    89 89
       isTauTy, isTauTyCon, tcIsTyVarTy,
    
    90 90
       isPredTy, isSimplePredTy, isTyVarClassPred,
    
    91 91
       checkValidClsArgs, hasTyVarHead,
    
    ... ... @@ -2057,7 +2057,7 @@ isFloatTy, isDoubleTy,
    2057 2057
         isFloatPrimTy, isDoublePrimTy,
    
    2058 2058
         isIntegerTy, isNaturalTy,
    
    2059 2059
         isIntTy, isWordTy, isBoolTy,
    
    2060
    -    isUnitTy, isAnyTy, isZonkAnyTy, isCharTy :: Type -> Bool
    
    2060
    +    isUnitTy, isAnyTy, isUnusedTypeTy, isCharTy :: Type -> Bool
    
    2061 2061
     isFloatTy      = is_tc floatTyConKey
    
    2062 2062
     isDoubleTy     = is_tc doubleTyConKey
    
    2063 2063
     isFloatPrimTy  = is_tc floatPrimTyConKey
    
    ... ... @@ -2069,7 +2069,7 @@ isWordTy = is_tc wordTyConKey
    2069 2069
     isBoolTy       = is_tc boolTyConKey
    
    2070 2070
     isUnitTy       = is_tc unitTyConKey
    
    2071 2071
     isAnyTy        = is_tc anyTyConKey
    
    2072
    -isZonkAnyTy    = is_tc zonkAnyTyConKey
    
    2072
    +isUnusedTypeTy = is_tc unusedTypeTyConKey
    
    2073 2073
     isCharTy       = is_tc charTyConKey
    
    2074 2074
     
    
    2075 2075
     -- | Check whether the type is of the form @Any :: k@,
    

  • compiler/GHC/Tc/Zonk/Type.hs
    1
    +{-# LANGUAGE OverloadedRecordDot #-}
    
    1 2
     {-
    
    2 3
     (c) The University of Glasgow 2006
    
    3 4
     (c) The AQUA Project, Glasgow University, 1996-1998
    
    ... ... @@ -43,7 +44,7 @@ import GHC.Tc.Types.TcRef
    43 44
     import GHC.Tc.TyCl.Build ( TcMethInfo, MethInfo )
    
    44 45
     import GHC.Tc.Utils.Env ( tcLookupGlobalOnly )
    
    45 46
     import GHC.Tc.Utils.TcType
    
    46
    -import GHC.Tc.Utils.Monad ( newZonkAnyType, setSrcSpanA, liftZonkM, traceTc, addErr )
    
    47
    +import GHC.Tc.Utils.Monad ( newUnusedType, setSrcSpanA, liftZonkM, traceTc, addErr )
    
    47 48
     import GHC.Tc.Types.Evidence
    
    48 49
     import GHC.Tc.Errors.Types
    
    49 50
     import GHC.Tc.Zonk.Env
    
    ... ... @@ -470,11 +471,11 @@ commitFlexi DefaultFlexi tv zonked_kind
    470 471
            ; return manyDataConTy }
    
    471 472
       | Just (ConcreteFRR origin) <- isConcreteTyVar_maybe tv
    
    472 473
       = do { addErr $ TcRnZonkerMessage (ZonkerCannotDefaultConcrete origin)
    
    473
    -       ; newZonkAnyType zonked_kind }
    
    474
    +       ; newUnusedType tv.varName zonked_kind }
    
    474 475
       | otherwise
    
    475
    -  = do { traceTc "Defaulting flexi tyvar to ZonkAny:" (pprTyVar tv)
    
    476
    +  = do { traceTc "Defaulting flexi tyvar to UnusedType:" (pprTyVar tv)
    
    476 477
               -- See Note [Any types] in GHC.Builtin.Types, esp wrinkle (Any4)
    
    477
    -       ; newZonkAnyType zonked_kind }
    
    478
    +       ; newUnusedType tv.varName zonked_kind }
    
    478 479
     
    
    479 480
     zonkCoVarOcc :: CoVar -> ZonkTcM Coercion
    
    480 481
     zonkCoVarOcc cv
    

  • libraries/ghc-internal/src/GHC/Internal/Types.hs
    ... ... @@ -35,6 +35,7 @@ module GHC.Internal.Types (
    35 35
             SPEC(..),
    
    36 36
             Symbol,
    
    37 37
             Any,
    
    38
    +        UnusedType,
    
    38 39
     
    
    39 40
             -- * Type equality
    
    40 41
             type (~), type (~~), Coercible,
    
    ... ... @@ -284,43 +285,33 @@ data Symbol
    284 285
     *                                                                      *
    
    285 286
     ********************************************************************* -}
    
    286 287
     
    
    287
    --- | The type constructor @Any :: forall k. k@ is a type to which you can unsafely coerce any type, and back.
    
    288
    +-- | The type constructor @Any :: forall k. k@ allows creating an arbitrary type
    
    289
    +-- of the given kind.
    
    288 290
     --
    
    289
    --- For @unsafeCoerce@ this means for all lifted types @t@ that
    
    290
    --- @unsafeCoerce (unsafeCoerce x :: Any) :: t@ is equivalent to @x@ and safe.
    
    291
    +-- It can be used to create a placeholder type when you only have a kind in hand.
    
    291 292
     --
    
    292
    --- The same is true for *all* types when using
    
    293
    --- @
    
    294
    ---   unsafeCoerce# :: forall (r1 :: RuntimeRep) (r2 :: RuntimeRep)
    
    295
    ---                   (a :: TYPE r1) (b :: TYPE r2).
    
    296
    ---                   a -> b
    
    297
    --- @
    
    298
    --- but /only/ if you instantiate @r1@ and @r2@ to the /same/ runtime representation.
    
    299
    --- For example using @(unsafeCoerce# :: forall (a :: TYPE IntRep) (b :: TYPE IntRep). a -> b) x@
    
    300
    --- is fine, but @(unsafeCoerce# :: forall (a :: TYPE IntRep) (b :: TYPE FloatRep). a -> b)@
    
    301
    --- will likely cause seg-faults or worse.
    
    302
    --- For this resason, users should always prefer unsafeCoerce over unsafeCoerce# when possible.
    
    293
    +-- You can use 'unsafeCoerce#' to unsafely coerce a value from @ty :: k@ to @Any \@k@
    
    294
    +-- and back. As per the documentation of 'unsafeCoerce#', this is only sound if both
    
    295
    +-- sides have the __exact same__runtime representation. Some examples:
    
    303 296
     --
    
    304
    --- Here are some more examples:
    
    305 297
     -- @
    
    306
    ---    bad_a1 :: Any @(TYPE 'IntRep)
    
    307
    ---    bad_a1 = unsafeCoerce# True
    
    308
    ---
    
    309
    ---    bad_a2 :: Any @(TYPE ('BoxedRep 'UnliftedRep))
    
    310
    ---    bad_a2 = unsafeCoerce# True
    
    298
    +--    unsafeCoerce# True :: (Any :: Type)                -- OK
    
    299
    +--    unsafeCoerce# (1# :: Int#) :: (Any :: TYPE IntRep) -- OK
    
    300
    +--    unsafeCoerce# True :: (Any :: Type IntRep)         -- INVALID
    
    301
    +--    unsafeCoerce  True :: (Any :: UnliftedType)        -- INVALID
    
    302
    +--    unsafeCoerce  (ba :: ByteArray#) :: (Any :: Type)  -- INVALID
    
    311 303
     -- @
    
    312
    --- Here @bad_a1@ is bad because we started with @True :: (Bool :: Type)@, represented by a boxed heap pointer,
    
    313
    --- and coerced it to @a1 :: Any @(TYPE 'IntRep)@, whose representation is a non-pointer integer.
    
    314
    --- That's why we had to use `unsafeCoerce#`; it is really unsafe because it can change representations.
    
    315
    --- Similarly @bad_a2@ is bad because although both @True@ and @bad_a2@ are represented by a heap pointer,
    
    316
    --- @True@ is lifted but @bad_a2@ is not; bugs here may be rather subtle.
    
    317 304
     --
    
    318
    --- If you must use unsafeCoerce# to cast to `Any`, type annotations are recommended
    
    319
    --- to make sure that @Any@ has the correct kind. As casting between different runtimereps is
    
    320
    --- unsound. For example to cast a @ByteArray#@ to @Any@ you might use:
    
    321
    --- @
    
    322
    ---    unsafeCoerce# b :: (Any :: TYPE ('BoxedRep 'Unlifted))
    
    323
    --- @
    
    305
    +-- To avoid accidentally unsafe-coercing between different representations,
    
    306
    +-- it is recommended to:
    
    307
    +--  - use explicit type annotations or type applications at every use-site
    
    308
    +--    of 'unsafeCoerce#'
    
    309
    +--  - use representation-monomorphic variants such as 'unsafeCoerce' or
    
    310
    +--    'unsafeCoerceUnlifted'.
    
    311
    +--
    
    312
    +-- In particular, this also implies it is safe to round-trip unsafe-coercion via 'Any',
    
    313
    +-- as long as the kinds line up e.g. @unsafeCoerce (unsafeCoerce (val :: a) :: 'Any') :: a@
    
    314
    +-- is safe in that way.
    
    324 315
     type family Any :: k where { }
    
    325 316
     -- See Note [Any types] in GHC.Builtin.Types. Also, for a bit of history on Any see
    
    326 317
     -- #10886. Note that this must be a *closed* type family: we need to ensure
    

  • testsuite/tests/perf/compiler/T11068.stdout
    ... ... @@ -23,137 +23,137 @@
    23 23
                                `cast` (GHC.Internal.Generics.N:M1
    
    24 24
                                `cast` (GHC.Internal.Generics.N:M1
    
    25 25
       = GHC.Internal.Generics.L1
    
    26
    -      ((GHC.Internal.Generics.U1 @(*) @(GHC.Internal.Types.ZonkAny 0))
    
    26
    +      ((GHC.Internal.Generics.U1
    
    27 27
            `cast` (Sym (GHC.Internal.Generics.N:M1
    
    28 28
       = GHC.Internal.Generics.L1
    
    29 29
       = GHC.Internal.Generics.L1
    
    30 30
       = GHC.Internal.Generics.L1
    
    31
    -      ((GHC.Internal.Generics.U1 @(*) @(GHC.Internal.Types.ZonkAny 0))
    
    31
    +      ((GHC.Internal.Generics.U1
    
    32 32
            `cast` (Sym (GHC.Internal.Generics.N:M1
    
    33 33
       = GHC.Internal.Generics.R1
    
    34 34
       = GHC.Internal.Generics.L1
    
    35 35
       = GHC.Internal.Generics.L1
    
    36 36
       = GHC.Internal.Generics.R1
    
    37
    -      ((GHC.Internal.Generics.U1 @(*) @(GHC.Internal.Types.ZonkAny 0))
    
    37
    +      ((GHC.Internal.Generics.U1
    
    38 38
            `cast` (Sym (GHC.Internal.Generics.N:M1
    
    39 39
       = GHC.Internal.Generics.R1
    
    40 40
       = GHC.Internal.Generics.L1
    
    41 41
       = GHC.Internal.Generics.L1
    
    42 42
       = GHC.Internal.Generics.L1
    
    43
    -      ((GHC.Internal.Generics.U1 @(*) @(GHC.Internal.Types.ZonkAny 0))
    
    43
    +      ((GHC.Internal.Generics.U1
    
    44 44
            `cast` (Sym (GHC.Internal.Generics.N:M1
    
    45 45
       = GHC.Internal.Generics.R1
    
    46 46
       = GHC.Internal.Generics.L1
    
    47 47
       = GHC.Internal.Generics.L1
    
    48
    -      ((GHC.Internal.Generics.U1 @(*) @(GHC.Internal.Types.ZonkAny 0))
    
    48
    +      ((GHC.Internal.Generics.U1
    
    49 49
            `cast` (Sym (GHC.Internal.Generics.N:M1
    
    50 50
       = GHC.Internal.Generics.R1
    
    51 51
       = GHC.Internal.Generics.R1
    
    52 52
       = GHC.Internal.Generics.L1
    
    53 53
       = GHC.Internal.Generics.R1
    
    54
    -      ((GHC.Internal.Generics.U1 @(*) @(GHC.Internal.Types.ZonkAny 0))
    
    54
    +      ((GHC.Internal.Generics.U1
    
    55 55
            `cast` (Sym (GHC.Internal.Generics.N:M1
    
    56 56
       = GHC.Internal.Generics.R1
    
    57 57
       = GHC.Internal.Generics.R1
    
    58 58
       = GHC.Internal.Generics.L1
    
    59 59
       = GHC.Internal.Generics.L1
    
    60
    -      ((GHC.Internal.Generics.U1 @(*) @(GHC.Internal.Types.ZonkAny 0))
    
    60
    +      ((GHC.Internal.Generics.U1
    
    61 61
            `cast` (Sym (GHC.Internal.Generics.N:M1
    
    62 62
       = GHC.Internal.Generics.L1
    
    63 63
       = GHC.Internal.Generics.R1
    
    64 64
       = GHC.Internal.Generics.L1
    
    65
    -      ((GHC.Internal.Generics.U1 @(*) @(GHC.Internal.Types.ZonkAny 0))
    
    65
    +      ((GHC.Internal.Generics.U1
    
    66 66
            `cast` (Sym (GHC.Internal.Generics.N:M1
    
    67 67
       = GHC.Internal.Generics.R1
    
    68 68
       = GHC.Internal.Generics.L1
    
    69 69
       = GHC.Internal.Generics.R1
    
    70 70
       = GHC.Internal.Generics.R1
    
    71
    -      ((GHC.Internal.Generics.U1 @(*) @(GHC.Internal.Types.ZonkAny 0))
    
    71
    +      ((GHC.Internal.Generics.U1
    
    72 72
            `cast` (Sym (GHC.Internal.Generics.N:M1
    
    73 73
       = GHC.Internal.Generics.R1
    
    74 74
       = GHC.Internal.Generics.L1
    
    75 75
       = GHC.Internal.Generics.R1
    
    76 76
       = GHC.Internal.Generics.L1
    
    77
    -      ((GHC.Internal.Generics.U1 @(*) @(GHC.Internal.Types.ZonkAny 0))
    
    77
    +      ((GHC.Internal.Generics.U1
    
    78 78
            `cast` (Sym (GHC.Internal.Generics.N:M1
    
    79 79
       = GHC.Internal.Generics.R1
    
    80 80
       = GHC.Internal.Generics.R1
    
    81 81
       = GHC.Internal.Generics.L1
    
    82
    -      ((GHC.Internal.Generics.U1 @(*) @(GHC.Internal.Types.ZonkAny 0))
    
    82
    +      ((GHC.Internal.Generics.U1
    
    83 83
            `cast` (Sym (GHC.Internal.Generics.N:M1
    
    84 84
       = GHC.Internal.Generics.R1
    
    85 85
       = GHC.Internal.Generics.R1
    
    86 86
       = GHC.Internal.Generics.R1
    
    87 87
       = GHC.Internal.Generics.R1
    
    88
    -      ((GHC.Internal.Generics.U1 @(*) @(GHC.Internal.Types.ZonkAny 0))
    
    88
    +      ((GHC.Internal.Generics.U1
    
    89 89
            `cast` (Sym (GHC.Internal.Generics.N:M1
    
    90 90
       = GHC.Internal.Generics.R1
    
    91 91
       = GHC.Internal.Generics.R1
    
    92 92
       = GHC.Internal.Generics.R1
    
    93 93
       = GHC.Internal.Generics.L1
    
    94
    -      ((GHC.Internal.Generics.U1 @(*) @(GHC.Internal.Types.ZonkAny 0))
    
    94
    +      ((GHC.Internal.Generics.U1
    
    95 95
            `cast` (Sym (GHC.Internal.Generics.N:M1
    
    96 96
       = GHC.Internal.Generics.L1
    
    97 97
       = GHC.Internal.Generics.L1
    
    98 98
       = GHC.Internal.Generics.L1
    
    99
    -      ((GHC.Internal.Generics.U1 @(*) @(GHC.Internal.Types.ZonkAny 0))
    
    99
    +      ((GHC.Internal.Generics.U1
    
    100 100
            `cast` (Sym (GHC.Internal.Generics.N:M1
    
    101 101
       = GHC.Internal.Generics.R1
    
    102 102
       = GHC.Internal.Generics.L1
    
    103 103
       = GHC.Internal.Generics.L1
    
    104 104
       = GHC.Internal.Generics.R1
    
    105
    -      ((GHC.Internal.Generics.U1 @(*) @(GHC.Internal.Types.ZonkAny 0))
    
    105
    +      ((GHC.Internal.Generics.U1
    
    106 106
            `cast` (Sym (GHC.Internal.Generics.N:M1
    
    107 107
       = GHC.Internal.Generics.R1
    
    108 108
       = GHC.Internal.Generics.L1
    
    109 109
       = GHC.Internal.Generics.L1
    
    110 110
       = GHC.Internal.Generics.L1
    
    111
    -      ((GHC.Internal.Generics.U1 @(*) @(GHC.Internal.Types.ZonkAny 0))
    
    111
    +      ((GHC.Internal.Generics.U1
    
    112 112
            `cast` (Sym (GHC.Internal.Generics.N:M1
    
    113 113
       = GHC.Internal.Generics.R1
    
    114 114
       = GHC.Internal.Generics.L1
    
    115 115
       = GHC.Internal.Generics.L1
    
    116
    -      ((GHC.Internal.Generics.U1 @(*) @(GHC.Internal.Types.ZonkAny 0))
    
    116
    +      ((GHC.Internal.Generics.U1
    
    117 117
            `cast` (Sym (GHC.Internal.Generics.N:M1
    
    118 118
       = GHC.Internal.Generics.R1
    
    119 119
       = GHC.Internal.Generics.R1
    
    120 120
       = GHC.Internal.Generics.L1
    
    121 121
       = GHC.Internal.Generics.R1
    
    122
    -      ((GHC.Internal.Generics.U1 @(*) @(GHC.Internal.Types.ZonkAny 0))
    
    122
    +      ((GHC.Internal.Generics.U1
    
    123 123
            `cast` (Sym (GHC.Internal.Generics.N:M1
    
    124 124
       = GHC.Internal.Generics.R1
    
    125 125
       = GHC.Internal.Generics.R1
    
    126 126
       = GHC.Internal.Generics.L1
    
    127 127
       = GHC.Internal.Generics.L1
    
    128
    -      ((GHC.Internal.Generics.U1 @(*) @(GHC.Internal.Types.ZonkAny 0))
    
    128
    +      ((GHC.Internal.Generics.U1
    
    129 129
            `cast` (Sym (GHC.Internal.Generics.N:M1
    
    130 130
       = GHC.Internal.Generics.L1
    
    131 131
       = GHC.Internal.Generics.R1
    
    132 132
       = GHC.Internal.Generics.L1
    
    133
    -      ((GHC.Internal.Generics.U1 @(*) @(GHC.Internal.Types.ZonkAny 0))
    
    133
    +      ((GHC.Internal.Generics.U1
    
    134 134
            `cast` (Sym (GHC.Internal.Generics.N:M1
    
    135 135
       = GHC.Internal.Generics.R1
    
    136 136
       = GHC.Internal.Generics.L1
    
    137 137
       = GHC.Internal.Generics.R1
    
    138 138
       = GHC.Internal.Generics.R1
    
    139
    -      ((GHC.Internal.Generics.U1 @(*) @(GHC.Internal.Types.ZonkAny 0))
    
    139
    +      ((GHC.Internal.Generics.U1
    
    140 140
            `cast` (Sym (GHC.Internal.Generics.N:M1
    
    141 141
       = GHC.Internal.Generics.R1
    
    142 142
       = GHC.Internal.Generics.L1
    
    143 143
       = GHC.Internal.Generics.R1
    
    144 144
       = GHC.Internal.Generics.L1
    
    145
    -      ((GHC.Internal.Generics.U1 @(*) @(GHC.Internal.Types.ZonkAny 0))
    
    145
    +      ((GHC.Internal.Generics.U1
    
    146 146
            `cast` (Sym (GHC.Internal.Generics.N:M1
    
    147 147
       = GHC.Internal.Generics.R1
    
    148 148
       = GHC.Internal.Generics.R1
    
    149 149
       = GHC.Internal.Generics.L1
    
    150
    -      ((GHC.Internal.Generics.U1 @(*) @(GHC.Internal.Types.ZonkAny 0))
    
    150
    +      ((GHC.Internal.Generics.U1
    
    151 151
            `cast` (Sym (GHC.Internal.Generics.N:M1
    
    152 152
       = GHC.Internal.Generics.R1
    
    153 153
       = GHC.Internal.Generics.R1
    
    154 154
       = GHC.Internal.Generics.R1
    
    155 155
       = GHC.Internal.Generics.R1
    
    156
    -      ((GHC.Internal.Generics.U1 @(*) @(GHC.Internal.Types.ZonkAny 0))
    
    156
    +      ((GHC.Internal.Generics.U1
    
    157 157
            `cast` (Sym (GHC.Internal.Generics.N:M1
    
    158 158
       = GHC.Internal.Generics.R1
    
    159 159
       = GHC.Internal.Generics.R1
    

  • testsuite/tests/pmcheck/should_compile/T12957.stderr
    1 1
     T12957.hs:4:5: warning: [GHC-62161] [-Wincomplete-patterns (in -Wextra)]
    
    2 2
         Pattern match(es) are non-exhaustive
    
    3
    -    In a case alternative:
    
    4
    -        Patterns of type ‘[GHC.Internal.Types.ZonkAny 0]’ not matched: []
    
    3
    +    In a case alternative: Patterns of type ‘[a0]’ not matched: []
    
    5 4
     
    
    6 5
     T12957.hs:4:16: warning: [GHC-53633] [-Woverlapping-patterns (in -Wdefault)]
    
    7 6
         Pattern match is redundant
    

  • testsuite/tests/profiling/should_run/staticcallstack002.stdout
    1
    -Just (InfoProv {ipName = "sat_s1Rh_info", ipDesc = THUNK, ipTyDesc = "ZonkAny 0", ipLabel = "main", ipUnitId = "main", ipMod = "Main", ipSrcFile = "staticcallstack002.hs", ipSrcSpan = "10:23-39"})
    
    2
    -Just (InfoProv {ipName = "sat_s1RB_info", ipDesc = THUNK, ipTyDesc = "ZonkAny 1", ipLabel = "main", ipUnitId = "main", ipMod = "Main", ipSrcFile = "staticcallstack002.hs", ipSrcSpan = "11:23-42"})
    
    3
    -Just (InfoProv {ipName = "sat_s1RV_info", ipDesc = THUNK, ipTyDesc = "ZonkAny 2", ipLabel = "main", ipUnitId = "main", ipMod = "Main", ipSrcFile = "staticcallstack002.hs", ipSrcSpan = "12:23-46"})
    
    4
    -Just (InfoProv {ipName = "sat_s1Sf_info", ipDesc = THUNK, ipTyDesc = "ZonkAny 3", ipLabel = "main", ipUnitId = "main", ipMod = "Main", ipSrcFile = "staticcallstack002.hs", ipSrcSpan = "13:23-44"})
    1
    +Just (InfoProv {ipName = "main_sat_t2fs_info", ipDesc = THUNK, ipTyDesc = "UnusedType 0 \"a\"", ipLabel = "main", ipUnitId = "main", ipMod = "Main", ipSrcFile = "staticcallstack002.hs", ipSrcSpan = "10:23-39"})
    
    2
    +Just (InfoProv {ipName = "main_sat_t2fJ_info", ipDesc = THUNK, ipTyDesc = "UnusedType 1 \"a\"", ipLabel = "main", ipUnitId = "main", ipMod = "Main", ipSrcFile = "staticcallstack002.hs", ipSrcSpan = "11:23-42"})
    
    3
    +Just (InfoProv {ipName = "main_sat_t2g0_info", ipDesc = THUNK, ipTyDesc = "UnusedType 2 \"a\"", ipLabel = "main", ipUnitId = "main", ipMod = "Main", ipSrcFile = "staticcallstack002.hs", ipSrcSpan = "12:23-46"})
    
    4
    +Just (InfoProv {ipName = "main_sat_t2gh_info", ipDesc = THUNK, ipTyDesc = "UnusedType 3 \"a\"", ipLabel = "main", ipUnitId = "main", ipMod = "Main", ipSrcFile = "staticcallstack002.hs", ipSrcSpan = "13:23-44"})

  • testsuite/tests/simplCore/should_compile/Makefile
    ... ... @@ -188,7 +188,7 @@ T13155:
    188 188
     
    
    189 189
     T13156:
    
    190 190
     	$(RM) -f T13156.hi T13156.o
    
    191
    -	'$(TEST_HC)' $(TEST_HC_OPTS) -c T13156.hs -O -ddump-prep -dsuppress-uniques | grep "case.*Any"
    
    191
    +	'$(TEST_HC)' $(TEST_HC_OPTS) -c T13156.hs -O -ddump-prep -dsuppress-uniques | grep "case.*UnusedType"
    
    192 192
             # There should be a single 'case r @ GHC.Types.Any'
    
    193 193
     
    
    194 194
     .PHONY: T4138
    

  • testsuite/tests/simplCore/should_compile/T13156.stdout
    1
    -      case r @(GHC.Internal.Types.ZonkAny 0) of { __DEFAULT ->
    
    2
    -      case r @(GHC.Internal.Types.ZonkAny 1) of { __DEFAULT -> r @a }
    1
    +      case r @(GHC.Internal.Types.UnusedType 0 "a") of { __DEFAULT ->
    
    2
    +      case r @(GHC.Internal.Types.UnusedType 1 "a") of { __DEFAULT ->

  • testsuite/tests/simplCore/should_compile/T26615.stderr
    ... ... @@ -2,7 +2,7 @@
    2 2
     
    
    3 3
     ==================== Tidy Core ====================
    
    4 4
     Result size of Tidy Core
    
    5
    -  = {terms: 1,209, types: 1,139, coercions: 18, joins: 17/29}
    
    5
    +  = {terms: 1,209, types: 1,155, 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
    
    ... ... @@ -15,45 +15,29 @@ unArray :: forall a. Array a -> SmallArray# a
    15 15
     unArray = \ (@a) (ds :: Array a) -> case ds of { Array ds1 -> ds1 }
    
    16 16
     
    
    17 17
     -- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
    
    18
    -T26615a.$trModule4 :: Addr#
    
    19
    -[GblId,
    
    20
    - Unf=Unf{Src=<vanilla>, TopLvl=True,
    
    21
    -         Value=True, ConLike=True, WorkFree=True, Expandable=True,
    
    22
    -         Guidance=IF_ARGS [] 20 0}]
    
    23
    -T26615a.$trModule4 = "main"#
    
    18
    +$trModule1 :: Addr#
    
    19
    +[GblId, Unf=OtherCon []]
    
    20
    +$trModule1 = "main"#
    
    24 21
     
    
    25 22
     -- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
    
    26
    -T26615a.$trModule3 :: GHC.Internal.Types.TrName
    
    27
    -[GblId,
    
    28
    - Unf=Unf{Src=<vanilla>, TopLvl=True,
    
    29
    -         Value=True, ConLike=True, WorkFree=True, Expandable=True,
    
    30
    -         Guidance=IF_ARGS [] 10 10}]
    
    31
    -T26615a.$trModule3 = GHC.Internal.Types.TrNameS T26615a.$trModule4
    
    23
    +$trModule2 :: GHC.Internal.Types.TrName
    
    24
    +[GblId, Unf=OtherCon []]
    
    25
    +$trModule2 = GHC.Internal.Types.TrNameS $trModule1
    
    32 26
     
    
    33 27
     -- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
    
    34
    -T26615a.$trModule2 :: Addr#
    
    35
    -[GblId,
    
    36
    - Unf=Unf{Src=<vanilla>, TopLvl=True,
    
    37
    -         Value=True, ConLike=True, WorkFree=True, Expandable=True,
    
    38
    -         Guidance=IF_ARGS [] 30 0}]
    
    39
    -T26615a.$trModule2 = "T26615a"#
    
    28
    +$trModule3 :: Addr#
    
    29
    +[GblId, Unf=OtherCon []]
    
    30
    +$trModule3 = "T26615a"#
    
    40 31
     
    
    41 32
     -- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
    
    42
    -T26615a.$trModule1 :: GHC.Internal.Types.TrName
    
    43
    -[GblId,
    
    44
    - Unf=Unf{Src=<vanilla>, TopLvl=True,
    
    45
    -         Value=True, ConLike=True, WorkFree=True, Expandable=True,
    
    46
    -         Guidance=IF_ARGS [] 10 10}]
    
    47
    -T26615a.$trModule1 = GHC.Internal.Types.TrNameS T26615a.$trModule2
    
    33
    +$trModule4 :: GHC.Internal.Types.TrName
    
    34
    +[GblId, Unf=OtherCon []]
    
    35
    +$trModule4 = GHC.Internal.Types.TrNameS $trModule3
    
    48 36
     
    
    49 37
     -- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
    
    50
    -T26615a.$trModule :: GHC.Internal.Types.Module
    
    51
    -[GblId,
    
    52
    - Unf=Unf{Src=<vanilla>, TopLvl=True,
    
    53
    -         Value=True, ConLike=True, WorkFree=True, Expandable=True,
    
    54
    -         Guidance=IF_ARGS [] 10 10}]
    
    55
    -T26615a.$trModule
    
    56
    -  = GHC.Internal.Types.Module T26615a.$trModule3 T26615a.$trModule1
    
    38
    +T26615a.$trModule [InlPrag=[~]] :: GHC.Internal.Types.Module
    
    39
    +[GblId, Unf=OtherCon []]
    
    40
    +T26615a.$trModule = GHC.Internal.Types.Module $trModule2 $trModule4
    
    57 41
     
    
    58 42
     -- RHS size: {terms: 3, types: 1, coercions: 0, joins: 0/0}
    
    59 43
     $krep :: GHC.Internal.Types.KindRep
    
    ... ... @@ -104,33 +88,24 @@ $krep6
    104 88
           GHC.Internal.Types.$tcSmallArray# $krep5
    
    105 89
     
    
    106 90
     -- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
    
    107
    -T26615a.$tcLeaf2 :: Addr#
    
    108
    -[GblId,
    
    109
    - Unf=Unf{Src=<vanilla>, TopLvl=True,
    
    110
    -         Value=True, ConLike=True, WorkFree=True, Expandable=True,
    
    111
    -         Guidance=IF_ARGS [] 20 0}]
    
    112
    -T26615a.$tcLeaf2 = "Leaf"#
    
    91
    +$tcLeaf1 :: Addr#
    
    92
    +[GblId, Unf=OtherCon []]
    
    93
    +$tcLeaf1 = "Leaf"#
    
    113 94
     
    
    114 95
     -- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
    
    115
    -T26615a.$tcLeaf1 :: GHC.Internal.Types.TrName
    
    116
    -[GblId,
    
    117
    - Unf=Unf{Src=<vanilla>, TopLvl=True,
    
    118
    -         Value=True, ConLike=True, WorkFree=True, Expandable=True,
    
    119
    -         Guidance=IF_ARGS [] 10 10}]
    
    120
    -T26615a.$tcLeaf1 = GHC.Internal.Types.TrNameS T26615a.$tcLeaf2
    
    96
    +$tcLeaf2 :: GHC.Internal.Types.TrName
    
    97
    +[GblId, Unf=OtherCon []]
    
    98
    +$tcLeaf2 = GHC.Internal.Types.TrNameS $tcLeaf1
    
    121 99
     
    
    122 100
     -- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
    
    123
    -T26615a.$tcLeaf :: GHC.Internal.Types.TyCon
    
    124
    -[GblId,
    
    125
    - Unf=Unf{Src=<vanilla>, TopLvl=True,
    
    126
    -         Value=True, ConLike=True, WorkFree=True, Expandable=True,
    
    127
    -         Guidance=IF_ARGS [] 10 10}]
    
    101
    +T26615a.$tcLeaf [InlPrag=[~]] :: GHC.Internal.Types.TyCon
    
    102
    +[GblId, Unf=OtherCon []]
    
    128 103
     T26615a.$tcLeaf
    
    129 104
       = GHC.Internal.Types.TyCon
    
    130 105
           13798714324392902582#Word64
    
    131 106
           3237499036029031497#Word64
    
    132 107
           T26615a.$trModule
    
    133
    -      T26615a.$tcLeaf1
    
    108
    +      $tcLeaf2
    
    134 109
           0#
    
    135 110
           GHC.Internal.Types.krep$*->*->*
    
    136 111
     
    
    ... ... @@ -160,372 +135,284 @@ $krep10 :: GHC.Internal.Types.KindRep
    160 135
     $krep10 = GHC.Internal.Types.KindRepFun $krep2 $krep9
    
    161 136
     
    
    162 137
     -- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
    
    163
    -T26615a.$tc'L1 [InlPrag=[~]] :: GHC.Internal.Types.KindRep
    
    138
    +$krep11 :: GHC.Internal.Types.KindRep
    
    164 139
     [GblId, Unf=OtherCon []]
    
    165
    -T26615a.$tc'L1 = GHC.Internal.Types.KindRepFun $krep3 $krep10
    
    140
    +$krep11 = GHC.Internal.Types.KindRepFun $krep3 $krep10
    
    166 141
     
    
    167 142
     -- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
    
    168
    -T26615a.$tc'L3 :: Addr#
    
    169
    -[GblId,
    
    170
    - Unf=Unf{Src=<vanilla>, TopLvl=True,
    
    171
    -         Value=True, ConLike=True, WorkFree=True, Expandable=True,
    
    172
    -         Guidance=IF_ARGS [] 20 0}]
    
    173
    -T26615a.$tc'L3 = "'L"#
    
    143
    +$tc'L1 :: Addr#
    
    144
    +[GblId, Unf=OtherCon []]
    
    145
    +$tc'L1 = "'L"#
    
    174 146
     
    
    175 147
     -- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
    
    176
    -T26615a.$tc'L2 :: GHC.Internal.Types.TrName
    
    177
    -[GblId,
    
    178
    - Unf=Unf{Src=<vanilla>, TopLvl=True,
    
    179
    -         Value=True, ConLike=True, WorkFree=True, Expandable=True,
    
    180
    -         Guidance=IF_ARGS [] 10 10}]
    
    181
    -T26615a.$tc'L2 = GHC.Internal.Types.TrNameS T26615a.$tc'L3
    
    148
    +$tc'L2 :: GHC.Internal.Types.TrName
    
    149
    +[GblId, Unf=OtherCon []]
    
    150
    +$tc'L2 = GHC.Internal.Types.TrNameS $tc'L1
    
    182 151
     
    
    183 152
     -- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
    
    184
    -T26615a.$tc'L :: GHC.Internal.Types.TyCon
    
    185
    -[GblId,
    
    186
    - Unf=Unf{Src=<vanilla>, TopLvl=True,
    
    187
    -         Value=True, ConLike=True, WorkFree=True, Expandable=True,
    
    188
    -         Guidance=IF_ARGS [] 10 10}]
    
    153
    +T26615a.$tc'L [InlPrag=[~]] :: GHC.Internal.Types.TyCon
    
    154
    +[GblId, Unf=OtherCon []]
    
    189 155
     T26615a.$tc'L
    
    190 156
       = GHC.Internal.Types.TyCon
    
    191 157
           8570419491837374712#Word64
    
    192 158
           2090006989092642392#Word64
    
    193 159
           T26615a.$trModule
    
    194
    -      T26615a.$tc'L2
    
    160
    +      $tc'L2
    
    195 161
           2#
    
    196
    -      T26615a.$tc'L1
    
    162
    +      $krep11
    
    197 163
     
    
    198 164
     -- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
    
    199
    -T26615a.$tcArray2 :: Addr#
    
    200
    -[GblId,
    
    201
    - Unf=Unf{Src=<vanilla>, TopLvl=True,
    
    202
    -         Value=True, ConLike=True, WorkFree=True, Expandable=True,
    
    203
    -         Guidance=IF_ARGS [] 30 0}]
    
    204
    -T26615a.$tcArray2 = "Array"#
    
    165
    +$tcArray1 :: Addr#
    
    166
    +[GblId, Unf=OtherCon []]
    
    167
    +$tcArray1 = "Array"#
    
    205 168
     
    
    206 169
     -- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
    
    207
    -T26615a.$tcArray1 :: GHC.Internal.Types.TrName
    
    208
    -[GblId,
    
    209
    - Unf=Unf{Src=<vanilla>, TopLvl=True,
    
    210
    -         Value=True, ConLike=True, WorkFree=True, Expandable=True,
    
    211
    -         Guidance=IF_ARGS [] 10 10}]
    
    212
    -T26615a.$tcArray1 = GHC.Internal.Types.TrNameS T26615a.$tcArray2
    
    170
    +$tcArray2 :: GHC.Internal.Types.TrName
    
    171
    +[GblId, Unf=OtherCon []]
    
    172
    +$tcArray2 = GHC.Internal.Types.TrNameS $tcArray1
    
    213 173
     
    
    214 174
     -- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
    
    215
    -T26615a.$tcArray :: GHC.Internal.Types.TyCon
    
    216
    -[GblId,
    
    217
    - Unf=Unf{Src=<vanilla>, TopLvl=True,
    
    218
    -         Value=True, ConLike=True, WorkFree=True, Expandable=True,
    
    219
    -         Guidance=IF_ARGS [] 10 10}]
    
    175
    +T26615a.$tcArray [InlPrag=[~]] :: GHC.Internal.Types.TyCon
    
    176
    +[GblId, Unf=OtherCon []]
    
    220 177
     T26615a.$tcArray
    
    221 178
       = GHC.Internal.Types.TyCon
    
    222 179
           10495761415291712389#Word64
    
    223 180
           7580086293698619153#Word64
    
    224 181
           T26615a.$trModule
    
    225
    -      T26615a.$tcArray1
    
    182
    +      $tcArray2
    
    226 183
           0#
    
    227 184
           GHC.Internal.Types.krep$*Arr*
    
    228 185
     
    
    229 186
     -- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
    
    230
    -$krep11 :: GHC.Internal.Types.KindRep
    
    187
    +$krep12 :: GHC.Internal.Types.KindRep
    
    231 188
     [GblId, Unf=OtherCon []]
    
    232
    -$krep11
    
    189
    +$krep12
    
    233 190
       = GHC.Internal.Types.KindRepTyConApp T26615a.$tcArray $krep4
    
    234 191
     
    
    235 192
     -- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
    
    236
    -T26615a.$tc'Array1 [InlPrag=[~]] :: GHC.Internal.Types.KindRep
    
    193
    +$krep13 :: GHC.Internal.Types.KindRep
    
    237 194
     [GblId, Unf=OtherCon []]
    
    238
    -T26615a.$tc'Array1 = GHC.Internal.Types.KindRepFun $krep6 $krep11
    
    195
    +$krep13 = GHC.Internal.Types.KindRepFun $krep6 $krep12
    
    239 196
     
    
    240 197
     -- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
    
    241
    -T26615a.$tc'Array3 :: Addr#
    
    242
    -[GblId,
    
    243
    - Unf=Unf{Src=<vanilla>, TopLvl=True,
    
    244
    -         Value=True, ConLike=True, WorkFree=True, Expandable=True,
    
    245
    -         Guidance=IF_ARGS [] 30 0}]
    
    246
    -T26615a.$tc'Array3 = "'Array"#
    
    198
    +$tc'Array1 :: Addr#
    
    199
    +[GblId, Unf=OtherCon []]
    
    200
    +$tc'Array1 = "'Array"#
    
    247 201
     
    
    248 202
     -- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
    
    249
    -T26615a.$tc'Array2 :: GHC.Internal.Types.TrName
    
    250
    -[GblId,
    
    251
    - Unf=Unf{Src=<vanilla>, TopLvl=True,
    
    252
    -         Value=True, ConLike=True, WorkFree=True, Expandable=True,
    
    253
    -         Guidance=IF_ARGS [] 10 10}]
    
    254
    -T26615a.$tc'Array2 = GHC.Internal.Types.TrNameS T26615a.$tc'Array3
    
    203
    +$tc'Array2 :: GHC.Internal.Types.TrName
    
    204
    +[GblId, Unf=OtherCon []]
    
    205
    +$tc'Array2 = GHC.Internal.Types.TrNameS $tc'Array1
    
    255 206
     
    
    256 207
     -- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
    
    257
    -T26615a.$tc'Array :: GHC.Internal.Types.TyCon
    
    258
    -[GblId,
    
    259
    - Unf=Unf{Src=<vanilla>, TopLvl=True,
    
    260
    -         Value=True, ConLike=True, WorkFree=True, Expandable=True,
    
    261
    -         Guidance=IF_ARGS [] 10 10}]
    
    208
    +T26615a.$tc'Array [InlPrag=[~]] :: GHC.Internal.Types.TyCon
    
    209
    +[GblId, Unf=OtherCon []]
    
    262 210
     T26615a.$tc'Array
    
    263 211
       = GHC.Internal.Types.TyCon
    
    264 212
           12424115309881832159#Word64
    
    265 213
           15542868641947707803#Word64
    
    266 214
           T26615a.$trModule
    
    267
    -      T26615a.$tc'Array2
    
    215
    +      $tc'Array2
    
    268 216
           1#
    
    269
    -      T26615a.$tc'Array1
    
    217
    +      $krep13
    
    270 218
     
    
    271 219
     -- RHS size: {terms: 3, types: 2, coercions: 0, joins: 0/0}
    
    272
    -$krep12 :: [GHC.Internal.Types.KindRep]
    
    220
    +$krep14 :: [GHC.Internal.Types.KindRep]
    
    273 221
     [GblId, Unf=OtherCon []]
    
    274
    -$krep12
    
    222
    +$krep14
    
    275 223
       = GHC.Internal.Types.:
    
    276 224
           @GHC.Internal.Types.KindRep
    
    277 225
           $krep9
    
    278 226
           (GHC.Internal.Types.[] @GHC.Internal.Types.KindRep)
    
    279 227
     
    
    280 228
     -- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
    
    281
    -$krep13 :: GHC.Internal.Types.KindRep
    
    229
    +$krep15 :: GHC.Internal.Types.KindRep
    
    282 230
     [GblId, Unf=OtherCon []]
    
    283
    -$krep13
    
    284
    -  = GHC.Internal.Types.KindRepTyConApp T26615a.$tcArray $krep12
    
    231
    +$krep15
    
    232
    +  = GHC.Internal.Types.KindRepTyConApp T26615a.$tcArray $krep14
    
    285 233
     
    
    286 234
     -- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
    
    287
    -T26615a.$tcHashMap2 :: Addr#
    
    288
    -[GblId,
    
    289
    - Unf=Unf{Src=<vanilla>, TopLvl=True,
    
    290
    -         Value=True, ConLike=True, WorkFree=True, Expandable=True,
    
    291
    -         Guidance=IF_ARGS [] 30 0}]
    
    292
    -T26615a.$tcHashMap2 = "HashMap"#
    
    235
    +$tcHashMap1 :: Addr#
    
    236
    +[GblId, Unf=OtherCon []]
    
    237
    +$tcHashMap1 = "HashMap"#
    
    293 238
     
    
    294 239
     -- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
    
    295
    -T26615a.$tcHashMap1 :: GHC.Internal.Types.TrName
    
    296
    -[GblId,
    
    297
    - Unf=Unf{Src=<vanilla>, TopLvl=True,
    
    298
    -         Value=True, ConLike=True, WorkFree=True, Expandable=True,
    
    299
    -         Guidance=IF_ARGS [] 10 10}]
    
    300
    -T26615a.$tcHashMap1
    
    301
    -  = GHC.Internal.Types.TrNameS T26615a.$tcHashMap2
    
    240
    +$tcHashMap2 :: GHC.Internal.Types.TrName
    
    241
    +[GblId, Unf=OtherCon []]
    
    242
    +$tcHashMap2 = GHC.Internal.Types.TrNameS $tcHashMap1
    
    302 243
     
    
    303 244
     -- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
    
    304
    -T26615a.$tcHashMap :: GHC.Internal.Types.TyCon
    
    305
    -[GblId,
    
    306
    - Unf=Unf{Src=<vanilla>, TopLvl=True,
    
    307
    -         Value=True, ConLike=True, WorkFree=True, Expandable=True,
    
    308
    -         Guidance=IF_ARGS [] 10 10}]
    
    245
    +T26615a.$tcHashMap [InlPrag=[~]] :: GHC.Internal.Types.TyCon
    
    246
    +[GblId, Unf=OtherCon []]
    
    309 247
     T26615a.$tcHashMap
    
    310 248
       = GHC.Internal.Types.TyCon
    
    311 249
           2021755758654901686#Word64
    
    312 250
           8209241086311595496#Word64
    
    313 251
           T26615a.$trModule
    
    314
    -      T26615a.$tcHashMap1
    
    252
    +      $tcHashMap2
    
    315 253
           0#
    
    316 254
           GHC.Internal.Types.krep$*->*->*
    
    317 255
     
    
    318 256
     -- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
    
    319
    -T26615a.$tc'Empty1 [InlPrag=[~]] :: GHC.Internal.Types.KindRep
    
    257
    +$krep16 :: GHC.Internal.Types.KindRep
    
    320 258
     [GblId, Unf=OtherCon []]
    
    321
    -T26615a.$tc'Empty1
    
    259
    +$krep16
    
    322 260
       = GHC.Internal.Types.KindRepTyConApp T26615a.$tcHashMap $krep8
    
    323 261
     
    
    324 262
     -- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
    
    325
    -T26615a.$tc'Empty3 :: Addr#
    
    326
    -[GblId,
    
    327
    - Unf=Unf{Src=<vanilla>, TopLvl=True,
    
    328
    -         Value=True, ConLike=True, WorkFree=True, Expandable=True,
    
    329
    -         Guidance=IF_ARGS [] 30 0}]
    
    330
    -T26615a.$tc'Empty3 = "'Empty"#
    
    263
    +$tc'Empty1 :: Addr#
    
    264
    +[GblId, Unf=OtherCon []]
    
    265
    +$tc'Empty1 = "'Empty"#
    
    331 266
     
    
    332 267
     -- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
    
    333
    -T26615a.$tc'Empty2 :: GHC.Internal.Types.TrName
    
    334
    -[GblId,
    
    335
    - Unf=Unf{Src=<vanilla>, TopLvl=True,
    
    336
    -         Value=True, ConLike=True, WorkFree=True, Expandable=True,
    
    337
    -         Guidance=IF_ARGS [] 10 10}]
    
    338
    -T26615a.$tc'Empty2 = GHC.Internal.Types.TrNameS T26615a.$tc'Empty3
    
    268
    +$tc'Empty2 :: GHC.Internal.Types.TrName
    
    269
    +[GblId, Unf=OtherCon []]
    
    270
    +$tc'Empty2 = GHC.Internal.Types.TrNameS $tc'Empty1
    
    339 271
     
    
    340 272
     -- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
    
    341
    -T26615a.$tc'Empty :: GHC.Internal.Types.TyCon
    
    342
    -[GblId,
    
    343
    - Unf=Unf{Src=<vanilla>, TopLvl=True,
    
    344
    -         Value=True, ConLike=True, WorkFree=True, Expandable=True,
    
    345
    -         Guidance=IF_ARGS [] 10 10}]
    
    273
    +T26615a.$tc'Empty [InlPrag=[~]] :: GHC.Internal.Types.TyCon
    
    274
    +[GblId, Unf=OtherCon []]
    
    346 275
     T26615a.$tc'Empty
    
    347 276
       = GHC.Internal.Types.TyCon
    
    348 277
           2520556399233147460#Word64
    
    349 278
           17224648764450205443#Word64
    
    350 279
           T26615a.$trModule
    
    351
    -      T26615a.$tc'Empty2
    
    280
    +      $tc'Empty2
    
    352 281
           2#
    
    353
    -      T26615a.$tc'Empty1
    
    282
    +      $krep16
    
    354 283
     
    
    355 284
     -- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
    
    356
    -$krep14 :: GHC.Internal.Types.KindRep
    
    285
    +$krep17 :: GHC.Internal.Types.KindRep
    
    357 286
     [GblId, Unf=OtherCon []]
    
    358
    -$krep14 = GHC.Internal.Types.KindRepFun $krep9 T26615a.$tc'Empty1
    
    287
    +$krep17 = GHC.Internal.Types.KindRepFun $krep9 $krep16
    
    359 288
     
    
    360 289
     -- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
    
    361
    -T26615a.$tc'Leaf1 [InlPrag=[~]] :: GHC.Internal.Types.KindRep
    
    290
    +$krep18 :: GHC.Internal.Types.KindRep
    
    362 291
     [GblId, Unf=OtherCon []]
    
    363
    -T26615a.$tc'Leaf1 = GHC.Internal.Types.KindRepFun $krep1 $krep14
    
    292
    +$krep18 = GHC.Internal.Types.KindRepFun $krep1 $krep17
    
    364 293
     
    
    365 294
     -- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
    
    366
    -T26615a.$tc'Leaf3 :: Addr#
    
    367
    -[GblId,
    
    368
    - Unf=Unf{Src=<vanilla>, TopLvl=True,
    
    369
    -         Value=True, ConLike=True, WorkFree=True, Expandable=True,
    
    370
    -         Guidance=IF_ARGS [] 30 0}]
    
    371
    -T26615a.$tc'Leaf3 = "'Leaf"#
    
    295
    +$tc'Leaf1 :: Addr#
    
    296
    +[GblId, Unf=OtherCon []]
    
    297
    +$tc'Leaf1 = "'Leaf"#
    
    372 298
     
    
    373 299
     -- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
    
    374
    -T26615a.$tc'Leaf2 :: GHC.Internal.Types.TrName
    
    375
    -[GblId,
    
    376
    - Unf=Unf{Src=<vanilla>, TopLvl=True,
    
    377
    -         Value=True, ConLike=True, WorkFree=True, Expandable=True,
    
    378
    -         Guidance=IF_ARGS [] 10 10}]
    
    379
    -T26615a.$tc'Leaf2 = GHC.Internal.Types.TrNameS T26615a.$tc'Leaf3
    
    300
    +$tc'Leaf2 :: GHC.Internal.Types.TrName
    
    301
    +[GblId, Unf=OtherCon []]
    
    302
    +$tc'Leaf2 = GHC.Internal.Types.TrNameS $tc'Leaf1
    
    380 303
     
    
    381 304
     -- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
    
    382
    -T26615a.$tc'Leaf :: GHC.Internal.Types.TyCon
    
    383
    -[GblId,
    
    384
    - Unf=Unf{Src=<vanilla>, TopLvl=True,
    
    385
    -         Value=True, ConLike=True, WorkFree=True, Expandable=True,
    
    386
    -         Guidance=IF_ARGS [] 10 10}]
    
    305
    +T26615a.$tc'Leaf [InlPrag=[~]] :: GHC.Internal.Types.TyCon
    
    306
    +[GblId, Unf=OtherCon []]
    
    387 307
     T26615a.$tc'Leaf
    
    388 308
       = GHC.Internal.Types.TyCon
    
    389 309
           5773656560257991946#Word64
    
    390 310
           17028074687139582545#Word64
    
    391 311
           T26615a.$trModule
    
    392
    -      T26615a.$tc'Leaf2
    
    312
    +      $tc'Leaf2
    
    393 313
           2#
    
    394
    -      T26615a.$tc'Leaf1
    
    314
    +      $krep18
    
    395 315
     
    
    396 316
     -- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
    
    397
    -$krep15 :: GHC.Internal.Types.KindRep
    
    317
    +$krep19 :: GHC.Internal.Types.KindRep
    
    398 318
     [GblId, Unf=OtherCon []]
    
    399
    -$krep15 = GHC.Internal.Types.KindRepFun $krep13 T26615a.$tc'Empty1
    
    319
    +$krep19 = GHC.Internal.Types.KindRepFun $krep15 $krep16
    
    400 320
     
    
    401 321
     -- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
    
    402
    -T26615a.$tc'Collision1 [InlPrag=[~]] :: GHC.Internal.Types.KindRep
    
    322
    +$krep20 :: GHC.Internal.Types.KindRep
    
    403 323
     [GblId, Unf=OtherCon []]
    
    404
    -T26615a.$tc'Collision1
    
    405
    -  = GHC.Internal.Types.KindRepFun $krep1 $krep15
    
    324
    +$krep20 = GHC.Internal.Types.KindRepFun $krep1 $krep19
    
    406 325
     
    
    407 326
     -- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
    
    408
    -T26615a.$tc'Collision3 :: Addr#
    
    409
    -[GblId,
    
    410
    - Unf=Unf{Src=<vanilla>, TopLvl=True,
    
    411
    -         Value=True, ConLike=True, WorkFree=True, Expandable=True,
    
    412
    -         Guidance=IF_ARGS [] 40 0}]
    
    413
    -T26615a.$tc'Collision3 = "'Collision"#
    
    327
    +$tc'Collision1 :: Addr#
    
    328
    +[GblId, Unf=OtherCon []]
    
    329
    +$tc'Collision1 = "'Collision"#
    
    414 330
     
    
    415 331
     -- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
    
    416
    -T26615a.$tc'Collision2 :: GHC.Internal.Types.TrName
    
    417
    -[GblId,
    
    418
    - Unf=Unf{Src=<vanilla>, TopLvl=True,
    
    419
    -         Value=True, ConLike=True, WorkFree=True, Expandable=True,
    
    420
    -         Guidance=IF_ARGS [] 10 10}]
    
    421
    -T26615a.$tc'Collision2
    
    422
    -  = GHC.Internal.Types.TrNameS T26615a.$tc'Collision3
    
    332
    +$tc'Collision2 :: GHC.Internal.Types.TrName
    
    333
    +[GblId, Unf=OtherCon []]
    
    334
    +$tc'Collision2 = GHC.Internal.Types.TrNameS $tc'Collision1
    
    423 335
     
    
    424 336
     -- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
    
    425
    -T26615a.$tc'Collision :: GHC.Internal.Types.TyCon
    
    426
    -[GblId,
    
    427
    - Unf=Unf{Src=<vanilla>, TopLvl=True,
    
    428
    -         Value=True, ConLike=True, WorkFree=True, Expandable=True,
    
    429
    -         Guidance=IF_ARGS [] 10 10}]
    
    337
    +T26615a.$tc'Collision [InlPrag=[~]] :: GHC.Internal.Types.TyCon
    
    338
    +[GblId, Unf=OtherCon []]
    
    430 339
     T26615a.$tc'Collision
    
    431 340
       = GHC.Internal.Types.TyCon
    
    432 341
           18175105753528304021#Word64
    
    433 342
           13986842878006680511#Word64
    
    434 343
           T26615a.$trModule
    
    435
    -      T26615a.$tc'Collision2
    
    344
    +      $tc'Collision2
    
    436 345
           2#
    
    437
    -      T26615a.$tc'Collision1
    
    346
    +      $krep20
    
    438 347
     
    
    439 348
     -- RHS size: {terms: 3, types: 2, coercions: 0, joins: 0/0}
    
    440
    -$krep16 :: [GHC.Internal.Types.KindRep]
    
    349
    +$krep21 :: [GHC.Internal.Types.KindRep]
    
    441 350
     [GblId, Unf=OtherCon []]
    
    442
    -$krep16
    
    351
    +$krep21
    
    443 352
       = GHC.Internal.Types.:
    
    444 353
           @GHC.Internal.Types.KindRep
    
    445
    -      T26615a.$tc'Empty1
    
    354
    +      $krep16
    
    446 355
           (GHC.Internal.Types.[] @GHC.Internal.Types.KindRep)
    
    447 356
     
    
    448 357
     -- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
    
    449
    -$krep17 :: GHC.Internal.Types.KindRep
    
    358
    +$krep22 :: GHC.Internal.Types.KindRep
    
    450 359
     [GblId, Unf=OtherCon []]
    
    451
    -$krep17
    
    452
    -  = GHC.Internal.Types.KindRepTyConApp T26615a.$tcArray $krep16
    
    360
    +$krep22
    
    361
    +  = GHC.Internal.Types.KindRepTyConApp T26615a.$tcArray $krep21
    
    453 362
     
    
    454 363
     -- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
    
    455
    -T26615a.$tc'Full1 [InlPrag=[~]] :: GHC.Internal.Types.KindRep
    
    364
    +$krep23 :: GHC.Internal.Types.KindRep
    
    456 365
     [GblId, Unf=OtherCon []]
    
    457
    -T26615a.$tc'Full1
    
    458
    -  = GHC.Internal.Types.KindRepFun $krep17 T26615a.$tc'Empty1
    
    366
    +$krep23 = GHC.Internal.Types.KindRepFun $krep22 $krep16
    
    459 367
     
    
    460 368
     -- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
    
    461
    -T26615a.$tc'Full3 :: Addr#
    
    462
    -[GblId,
    
    463
    - Unf=Unf{Src=<vanilla>, TopLvl=True,
    
    464
    -         Value=True, ConLike=True, WorkFree=True, Expandable=True,
    
    465
    -         Guidance=IF_ARGS [] 30 0}]
    
    466
    -T26615a.$tc'Full3 = "'Full"#
    
    369
    +$tc'Full1 :: Addr#
    
    370
    +[GblId, Unf=OtherCon []]
    
    371
    +$tc'Full1 = "'Full"#
    
    467 372
     
    
    468 373
     -- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
    
    469
    -T26615a.$tc'Full2 :: GHC.Internal.Types.TrName
    
    470
    -[GblId,
    
    471
    - Unf=Unf{Src=<vanilla>, TopLvl=True,
    
    472
    -         Value=True, ConLike=True, WorkFree=True, Expandable=True,
    
    473
    -         Guidance=IF_ARGS [] 10 10}]
    
    474
    -T26615a.$tc'Full2 = GHC.Internal.Types.TrNameS T26615a.$tc'Full3
    
    374
    +$tc'Full2 :: GHC.Internal.Types.TrName
    
    375
    +[GblId, Unf=OtherCon []]
    
    376
    +$tc'Full2 = GHC.Internal.Types.TrNameS $tc'Full1
    
    475 377
     
    
    476 378
     -- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
    
    477
    -T26615a.$tc'Full :: GHC.Internal.Types.TyCon
    
    478
    -[GblId,
    
    479
    - Unf=Unf{Src=<vanilla>, TopLvl=True,
    
    480
    -         Value=True, ConLike=True, WorkFree=True, Expandable=True,
    
    481
    -         Guidance=IF_ARGS [] 10 10}]
    
    379
    +T26615a.$tc'Full [InlPrag=[~]] :: GHC.Internal.Types.TyCon
    
    380
    +[GblId, Unf=OtherCon []]
    
    482 381
     T26615a.$tc'Full
    
    483 382
       = GHC.Internal.Types.TyCon
    
    484 383
           12008762105994325570#Word64
    
    485 384
           13514145886440831186#Word64
    
    486 385
           T26615a.$trModule
    
    487
    -      T26615a.$tc'Full2
    
    386
    +      $tc'Full2
    
    488 387
           2#
    
    489
    -      T26615a.$tc'Full1
    
    388
    +      $krep23
    
    490 389
     
    
    491 390
     -- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
    
    492
    -T26615a.$tc'BitmapIndexed1 [InlPrag=[~]]
    
    493
    -  :: GHC.Internal.Types.KindRep
    
    391
    +$krep24 :: GHC.Internal.Types.KindRep
    
    494 392
     [GblId, Unf=OtherCon []]
    
    495
    -T26615a.$tc'BitmapIndexed1
    
    496
    -  = GHC.Internal.Types.KindRepFun $krep1 T26615a.$tc'Full1
    
    393
    +$krep24 = GHC.Internal.Types.KindRepFun $krep1 $krep23
    
    497 394
     
    
    498 395
     -- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
    
    499
    -T26615a.$tc'BitmapIndexed3 :: Addr#
    
    500
    -[GblId,
    
    501
    - Unf=Unf{Src=<vanilla>, TopLvl=True,
    
    502
    -         Value=True, ConLike=True, WorkFree=True, Expandable=True,
    
    503
    -         Guidance=IF_ARGS [] 50 0}]
    
    504
    -T26615a.$tc'BitmapIndexed3 = "'BitmapIndexed"#
    
    396
    +$tc'BitmapIndexed1 :: Addr#
    
    397
    +[GblId, Unf=OtherCon []]
    
    398
    +$tc'BitmapIndexed1 = "'BitmapIndexed"#
    
    505 399
     
    
    506 400
     -- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
    
    507
    -T26615a.$tc'BitmapIndexed2 :: GHC.Internal.Types.TrName
    
    508
    -[GblId,
    
    509
    - Unf=Unf{Src=<vanilla>, TopLvl=True,
    
    510
    -         Value=True, ConLike=True, WorkFree=True, Expandable=True,
    
    511
    -         Guidance=IF_ARGS [] 10 10}]
    
    512
    -T26615a.$tc'BitmapIndexed2
    
    513
    -  = GHC.Internal.Types.TrNameS T26615a.$tc'BitmapIndexed3
    
    401
    +$tc'BitmapIndexed2 :: GHC.Internal.Types.TrName
    
    402
    +[GblId, Unf=OtherCon []]
    
    403
    +$tc'BitmapIndexed2 = GHC.Internal.Types.TrNameS $tc'BitmapIndexed1
    
    514 404
     
    
    515 405
     -- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
    
    516
    -T26615a.$tc'BitmapIndexed :: GHC.Internal.Types.TyCon
    
    517
    -[GblId,
    
    518
    - Unf=Unf{Src=<vanilla>, TopLvl=True,
    
    519
    -         Value=True, ConLike=True, WorkFree=True, Expandable=True,
    
    520
    -         Guidance=IF_ARGS [] 10 10}]
    
    406
    +T26615a.$tc'BitmapIndexed [InlPrag=[~]] :: GHC.Internal.Types.TyCon
    
    407
    +[GblId, Unf=OtherCon []]
    
    521 408
     T26615a.$tc'BitmapIndexed
    
    522 409
       = GHC.Internal.Types.TyCon
    
    523 410
           15226751910432948177#Word64
    
    524 411
           957331387129868915#Word64
    
    525 412
           T26615a.$trModule
    
    526
    -      T26615a.$tc'BitmapIndexed2
    
    413
    +      $tc'BitmapIndexed2
    
    527 414
           2#
    
    528
    -      T26615a.$tc'BitmapIndexed1
    
    415
    +      $krep24
    
    529 416
     
    
    530 417
     -- RHS size: {terms: 98, types: 109, coercions: 0, joins: 3/4}
    
    531 418
     T26615a.$wdisjointCollisions [InlPrag=INLINABLE[2]]
    
    ... ... @@ -538,7 +425,7 @@ T26615a.$wdisjointCollisions [InlPrag=INLINABLE[2]]
    538 425
      Str=<LP(SC(S,C(1,L)),A)><L><1L><L><L>,
    
    539 426
      Unf=Unf{Src=StableUser, TopLvl=True,
    
    540 427
              Value=True, ConLike=True, WorkFree=True, Expandable=True,
    
    541
    -         Guidance=IF_ARGS [30 0 20 0 0] 406 10
    
    428
    +         Guidance=IF_ARGS [90 0 20 0 0] 406 10
    
    542 429
              Tmpl= \ (@k)
    
    543 430
                      (@a)
    
    544 431
                      (@b)
    
    ... ... @@ -586,7 +473,7 @@ T26615a.$wdisjointCollisions [InlPrag=INLINABLE[2]]
    586 473
                                       Arity=5,
    
    587 474
                                       Str=<L><L><L><L><L>,
    
    588 475
                                       Unf=OtherCon []]
    
    589
    -                                 lookupInArrayCont_ _ [Occ=Dead]
    
    476
    +                                 lookupInArrayCont_ ($dEq1 [Occ=Dead] :: Eq k)
    
    590 477
                                                         (k1 [Occ=Once1] :: k)
    
    591 478
                                                         (ary1 [Occ=Once1!] :: Array (Leaf k b))
    
    592 479
                                                         (i1 [Occ=Once1!] :: Int)
    
    ... ... @@ -654,24 +541,23 @@ T26615a.$wdisjointCollisions
    654 541
                 $s$wfoldr_ [InlPrag=[2],
    
    655 542
                             Occ=LoopBreaker,
    
    656 543
                             Dmd=SC(S,C(1,C(1,C(1,L))))]
    
    657
    -              :: Bool -> Int# -> Int# -> SmallArray# (Leaf k a) -> Bool
    
    544
    +              :: SmallArray# (Leaf k a) -> Int# -> Int# -> Bool -> Bool
    
    658 545
                 [LclId[JoinId(4)(Nothing)],
    
    659 546
                  Arity=4,
    
    660 547
                  Str=<L><L><L><L>,
    
    661 548
                  Unf=OtherCon []]
    
    662
    -            $s$wfoldr_ (sc :: Bool)
    
    549
    +            $s$wfoldr_ (sc :: SmallArray# (Leaf k a))
    
    663 550
                            (sc1 :: Int#)
    
    664 551
                            (sc2 :: Int#)
    
    665
    -                       (sc3 :: SmallArray# (Leaf k a))
    
    666
    -              = case >=# sc1 sc2 of {
    
    552
    +                       (sc3 :: Bool)
    
    553
    +              = case >=# sc2 sc1 of {
    
    667 554
                       __DEFAULT ->
    
    668
    -                    case indexSmallArray# @Lifted @(Leaf k a) sc3 sc1 of
    
    669
    -                    { (# ipv1 #) ->
    
    555
    +                    case indexSmallArray# @Lifted @(Leaf k a) sc sc2 of { (# ipv1 #) ->
    
    670 556
                         case ipv1 of { L kA ds1 ->
    
    671 557
                         join {
    
    672 558
                           $j :: Bool
    
    673 559
                           [LclId[JoinId(0)(Nothing)]]
    
    674
    -                      $j = jump $s$wfoldr_ sc (+# sc1 1#) sc2 sc3 } in
    
    560
    +                      $j = jump $s$wfoldr_ sc sc1 (+# sc2 1#) sc3 } in
    
    675 561
                         joinrec {
    
    676 562
                           $wlookupInArrayCont_ [InlPrag=[2],
    
    677 563
                                                 Occ=LoopBreaker,
    
    ... ... @@ -703,13 +589,13 @@ T26615a.$wdisjointCollisions
    703 589
                         jump $wlookupInArrayCont_ kA ww2 0# lvl2
    
    704 590
                         }
    
    705 591
                         };
    
    706
    -                  1# -> sc
    
    592
    +                  1# -> sc3
    
    707 593
                     }; } in
    
    708 594
               jump $s$wfoldr_
    
    709
    -            GHC.Internal.Types.True
    
    710
    -            0#
    
    711
    -            (sizeofSmallArray# @Lifted @(Leaf k a) ipv)
    
    712 595
                 ipv
    
    596
    +            (sizeofSmallArray# @Lifted @(Leaf k a) ipv)
    
    597
    +            0#
    
    598
    +            GHC.Internal.Types.True
    
    713 599
           }
    
    714 600
           }
    
    715 601
     
    
    ... ... @@ -728,28 +614,28 @@ Rec {
    728 614
     -- RHS size: {terms: 133, types: 126, coercions: 0, joins: 1/2}
    
    729 615
     T26615a.disjointSubtrees_$s$wdisjointSubtrees [InlPrag=INLINABLE[2],
    
    730 616
                                                    Occ=LoopBreaker]
    
    731
    -  :: forall b a k.
    
    732
    -     Word#
    
    733
    -     -> SmallArray# (Leaf k a) -> Int# -> Eq k => HashMap k b -> Bool
    
    617
    +  :: forall k a b.
    
    618
    +     Eq k =>
    
    619
    +     Int# -> Word# -> SmallArray# (Leaf k a) -> HashMap k b -> Bool
    
    734 620
     [GblId[StrictWorker([~, ~, ~, ~, !])],
    
    735 621
      Arity=5,
    
    736
    - Str=<L><L><L><LP(SC(S,C(1,L)),A)><1L>,
    
    622
    + Str=<LP(SC(S,C(1,L)),A)><L><L><L><1L>,
    
    737 623
      Unf=OtherCon []]
    
    738 624
     T26615a.disjointSubtrees_$s$wdisjointSubtrees
    
    739
    -  = \ (@b)
    
    625
    +  = \ (@k)
    
    740 626
           (@a)
    
    741
    -      (@k)
    
    742
    -      (sc :: Word#)
    
    743
    -      (sc1 :: SmallArray# (Leaf k a))
    
    744
    -      (sc2 :: Int#)
    
    745
    -      (sc3 :: Eq k)
    
    627
    +      (@b)
    
    628
    +      (sc :: Eq k)
    
    629
    +      (sc1 :: Int#)
    
    630
    +      (sc2 :: Word#)
    
    631
    +      (sc3 :: SmallArray# (Leaf k a))
    
    746 632
           (_b :: HashMap k b) ->
    
    747 633
           case _b of {
    
    748 634
             Empty -> GHC.Internal.Types.True;
    
    749 635
             Leaf bx ds ->
    
    750 636
               case ds of { L kB ds1 ->
    
    751 637
               case kB of k0 { __DEFAULT ->
    
    752
    -          case eqWord# bx sc of {
    
    638
    +          case eqWord# bx sc2 of {
    
    753 639
                 __DEFAULT -> GHC.Internal.Types.True;
    
    754 640
                 1# ->
    
    755 641
                   joinrec {
    
    ... ... @@ -770,7 +656,7 @@ T26615a.disjointSubtrees_$s$wdisjointSubtrees
    770 656
                           __DEFAULT ->
    
    771 657
                             case indexSmallArray# @Lifted @(Leaf k a) ww ww1 of { (# ipv #) ->
    
    772 658
                             case ipv of { L kx v ->
    
    773
    -                        case == @k sc3 k2 kx of {
    
    659
    +                        case == @k sc k2 kx of {
    
    774 660
                               False -> jump $wlookupInArrayCont_ k2 ww (+# ww1 1#) ww2;
    
    775 661
                               True -> GHC.Internal.Types.False
    
    776 662
                             }
    
    ... ... @@ -780,19 +666,19 @@ T26615a.disjointSubtrees_$s$wdisjointSubtrees
    780 666
                         }
    
    781 667
                         }; } in
    
    782 668
                   jump $wlookupInArrayCont_
    
    783
    -                k0 sc1 0# (sizeofSmallArray# @Lifted @(Leaf k a) sc1)
    
    669
    +                k0 sc3 0# (sizeofSmallArray# @Lifted @(Leaf k a) sc3)
    
    784 670
               }
    
    785 671
               }
    
    786 672
               };
    
    787 673
             Collision bx bx1 ->
    
    788 674
               T26615a.$wdisjointCollisions
    
    789
    -            @k @a @b sc3 sc (T26615a.Array @(Leaf k a) sc1) bx bx1;
    
    675
    +            @k @a @b sc sc2 (T26615a.Array @(Leaf k a) sc3) bx bx1;
    
    790 676
             BitmapIndexed bx bx1 ->
    
    791 677
               let {
    
    792 678
                 m :: Word#
    
    793 679
                 [LclId]
    
    794 680
                 m = uncheckedShiftL#
    
    795
    -                  1## (word2Int# (and# (uncheckedShiftRL# sc sc2) 31##)) } in
    
    681
    +                  1## (word2Int# (and# (uncheckedShiftRL# sc2 sc1) 31##)) } in
    
    796 682
               case and# m bx of {
    
    797 683
                 __DEFAULT ->
    
    798 684
                   case indexSmallArray#
    
    ... ... @@ -803,7 +689,7 @@ T26615a.disjointSubtrees_$s$wdisjointSubtrees
    803 689
                   of
    
    804 690
                   { (# ipv #) ->
    
    805 691
                   T26615a.disjointSubtrees_$s$wdisjointSubtrees
    
    806
    -                @b @a @k sc sc1 (+# sc2 5#) sc3 ipv
    
    692
    +                @k @a @b sc (+# sc1 5#) sc2 sc3 ipv
    
    807 693
                   };
    
    808 694
                 0## -> GHC.Internal.Types.True
    
    809 695
               };
    
    ... ... @@ -812,17 +698,17 @@ T26615a.disjointSubtrees_$s$wdisjointSubtrees
    812 698
                      @Lifted
    
    813 699
                      @(HashMap k b)
    
    814 700
                      bx
    
    815
    -                 (word2Int# (and# (uncheckedShiftRL# sc sc2) 31##))
    
    701
    +                 (word2Int# (and# (uncheckedShiftRL# sc2 sc1) 31##))
    
    816 702
               of
    
    817 703
               { (# ipv #) ->
    
    818 704
               T26615a.disjointSubtrees_$s$wdisjointSubtrees
    
    819
    -            @b @a @k sc sc1 (+# sc2 5#) sc3 ipv
    
    705
    +            @k @a @b sc (+# sc1 5#) sc2 sc3 ipv
    
    820 706
               }
    
    821 707
           }
    
    822 708
     end Rec }
    
    823 709
     
    
    824 710
     Rec {
    
    825
    --- RHS size: {terms: 705, types: 732, coercions: 18, joins: 13/23}
    
    711
    +-- RHS size: {terms: 705, types: 748, coercions: 18, joins: 13/23}
    
    826 712
     T26615a.$wdisjointSubtrees [InlPrag=INLINABLE[2], Occ=LoopBreaker]
    
    827 713
       :: forall k a b. Eq k => Int# -> HashMap k a -> HashMap k b -> Bool
    
    828 714
     [GblId[StrictWorker([~, ~, !])],
    
    ... ... @@ -841,7 +727,7 @@ T26615a.$wdisjointSubtrees [InlPrag=INLINABLE[2], Occ=LoopBreaker]
    841 727
                      join {
    
    842 728
                        fail [Occ=Once3!T[1]] :: (# #) -> Bool
    
    843 729
                        [LclId[JoinId(1)(Nothing)], Arity=1, Str=<L>, Unf=OtherCon []]
    
    844
    -                   fail _ [Occ=Dead, OS=OneShot]
    
    730
    +                   fail (ds1 [Occ=Dead, OS=OneShot] :: (# #))
    
    845 731
                          = case _b of wild [Occ=Once1] {
    
    846 732
                              __DEFAULT ->
    
    847 733
                                case GHC.Internal.Control.Exception.Base.patError
    
    ... ... @@ -860,7 +746,7 @@ T26615a.$wdisjointSubtrees [InlPrag=INLINABLE[2], Occ=LoopBreaker]
    860 746
                                   Arity=5,
    
    861 747
                                   Str=<L><L><L><L><L>,
    
    862 748
                                   Unf=OtherCon []]
    
    863
    -                             lookupCont_ _ [Occ=Dead]
    
    749
    +                             lookupCont_ ($dEq1 [Occ=Dead] :: Eq k)
    
    864 750
                                              (ds4 [Occ=Once1!] :: Word)
    
    865 751
                                              (ds5 [Occ=Once1] :: k)
    
    866 752
                                              (ds6 [Occ=Once1!] :: Int)
    
    ... ... @@ -896,7 +782,7 @@ T26615a.$wdisjointSubtrees [InlPrag=INLINABLE[2], Occ=LoopBreaker]
    896 782
                                                 Arity=5,
    
    897 783
                                                 Str=<L><L><L><L><L>,
    
    898 784
                                                 Unf=OtherCon []]
    
    899
    -                                           lookupInArrayCont_ _ [Occ=Dead]
    
    785
    +                                           lookupInArrayCont_ ($dEq2 [Occ=Dead] :: Eq k)
    
    900 786
                                                                   (k1 [Occ=Once1] :: k)
    
    901 787
                                                                   (ary [Occ=Once1!] :: Array (Leaf k a))
    
    902 788
                                                                   (i [Occ=Once1!] :: Int)
    
    ... ... @@ -1000,7 +886,7 @@ T26615a.$wdisjointSubtrees [InlPrag=INLINABLE[2], Occ=LoopBreaker]
    1000 886
                                 Arity=5,
    
    1001 887
                                 Str=<L><L><L><L><L>,
    
    1002 888
                                 Unf=OtherCon []]
    
    1003
    -                           lookupCont_ _ [Occ=Dead]
    
    889
    +                           lookupCont_ ($dEq1 [Occ=Dead] :: Eq k)
    
    1004 890
                                            (ds3 [Occ=Once1!] :: Word)
    
    1005 891
                                            (ds4 [Occ=Once1] :: k)
    
    1006 892
                                            (ds5 [Occ=Once1!] :: Int)
    
    ... ... @@ -1034,7 +920,7 @@ T26615a.$wdisjointSubtrees [InlPrag=INLINABLE[2], Occ=LoopBreaker]
    1034 920
                                               Arity=5,
    
    1035 921
                                               Str=<L><L><L><L><L>,
    
    1036 922
                                               Unf=OtherCon []]
    
    1037
    -                                         lookupInArrayCont_ _ [Occ=Dead]
    
    923
    +                                         lookupInArrayCont_ ($dEq2 [Occ=Dead] :: Eq k)
    
    1038 924
                                                                 (k1 [Occ=Once1] :: k)
    
    1039 925
                                                                 (ary [Occ=Once1!] :: Array (Leaf k b))
    
    1040 926
                                                                 (i [Occ=Once1!] :: Int)
    
    ... ... @@ -1179,23 +1065,23 @@ T26615a.$wdisjointSubtrees [InlPrag=INLINABLE[2], Occ=LoopBreaker]
    1179 1065
                                         @(*)
    
    1180 1066
                                         @(SmallArray# (HashMap k a)
    
    1181 1067
                                           -> SmallArray# (HashMap k b) -> Int#)
    
    1182
    -                                    @(GHC.Internal.Types.ZonkAny 0
    
    1183
    -                                      -> GHC.Internal.Types.ZonkAny 1 -> Int#)
    
    1068
    +                                    @(GHC.Internal.Types.UnusedType 0 "a"
    
    1069
    +                                      -> GHC.Internal.Types.UnusedType 1 "b" -> Int#)
    
    1184 1070
                                  of
    
    1185 1071
                                  { GHC.Internal.Unsafe.Coerce.UnsafeRefl v2 ->
    
    1186 1072
                                  case reallyUnsafePtrEquality#
    
    1187 1073
                                         @Lifted
    
    1188 1074
                                         @Lifted
    
    1189
    -                                    @(GHC.Internal.Types.ZonkAny 0)
    
    1190
    -                                    @(GHC.Internal.Types.ZonkAny 1)
    
    1075
    +                                    @(GHC.Internal.Types.UnusedType 0 "a")
    
    1076
    +                                    @(GHC.Internal.Types.UnusedType 1 "b")
    
    1191 1077
                                         (bx1
    
    1192 1078
                                          `cast` (SelCo:Fun(arg) (Sub (Sym v2))
    
    1193 1079
                                                  :: SmallArray# (HashMap k a)
    
    1194
    -                                                ~R# GHC.Internal.Types.ZonkAny 0))
    
    1080
    +                                                ~R# GHC.Internal.Types.UnusedType 0 "a"))
    
    1195 1081
                                         (bx3
    
    1196 1082
                                          `cast` (SelCo:Fun(arg) (SelCo:Fun(res) (Sub (Sym v2)))
    
    1197 1083
                                                  :: SmallArray# (HashMap k b)
    
    1198
    -                                                ~R# GHC.Internal.Types.ZonkAny 1))
    
    1084
    +                                                ~R# GHC.Internal.Types.UnusedType 1 "b"))
    
    1199 1085
                                  of {
    
    1200 1086
                                    __DEFAULT ->
    
    1201 1087
                                      joinrec {
    
    ... ... @@ -1324,51 +1210,49 @@ T26615a.$wdisjointSubtrees [InlPrag=INLINABLE[2], Occ=LoopBreaker]
    1324 1210
                                    }; } in
    
    1325 1211
                              jump go (GHC.Internal.Types.W# (and# 4294967295## bx1));
    
    1326 1212
                            Full bx1 ->
    
    1213
    +                         joinrec {
    
    1214
    +                           go [Occ=LoopBreakerT[1]] :: Int -> Bool
    
    1215
    +                           [LclId[JoinId(1)(Nothing)], Arity=1, Str=<L>, Unf=OtherCon []]
    
    1216
    +                           go (i :: Int)
    
    1217
    +                             = case GHC.Internal.Classes.ltInt i (GHC.Internal.Types.I# 0#) of {
    
    1218
    +                                 False ->
    
    1219
    +                                   case i of { I# i# ->
    
    1220
    +                                   case indexSmallArray# @Lifted @(HashMap k a) bx i# of
    
    1221
    +                                   { (# ipv [Occ=Once1] #) ->
    
    1222
    +                                   case indexSmallArray# @Lifted @(HashMap k b) bx1 i# of
    
    1223
    +                                   { (# ipv1 [Occ=Once1] #) ->
    
    1224
    +                                   case T26615a.$wdisjointSubtrees @k @a @b $dEq (+# ww 5#) ipv ipv1
    
    1225
    +                                   of {
    
    1226
    +                                     False -> GHC.Internal.Types.False;
    
    1227
    +                                     True -> jump go (GHC.Internal.Types.I# (-# i# 1#))
    
    1228
    +                                   }
    
    1229
    +                                   }
    
    1230
    +                                   }
    
    1231
    +                                   };
    
    1232
    +                                 True -> GHC.Internal.Types.True
    
    1233
    +                               }; } in
    
    1327 1234
                              case GHC.Internal.Unsafe.Coerce.unsafeEqualityProof
    
    1328 1235
                                     @(*)
    
    1329 1236
                                     @(SmallArray# (HashMap k a) -> SmallArray# (HashMap k b) -> Int#)
    
    1330
    -                                @(GHC.Internal.Types.ZonkAny 0
    
    1331
    -                                  -> GHC.Internal.Types.ZonkAny 1 -> Int#)
    
    1237
    +                                @(GHC.Internal.Types.UnusedType 0 "a"
    
    1238
    +                                  -> GHC.Internal.Types.UnusedType 1 "b" -> Int#)
    
    1332 1239
                              of
    
    1333 1240
                              { GHC.Internal.Unsafe.Coerce.UnsafeRefl v2 ->
    
    1334 1241
                              case reallyUnsafePtrEquality#
    
    1335 1242
                                     @Lifted
    
    1336 1243
                                     @Lifted
    
    1337
    -                                @(GHC.Internal.Types.ZonkAny 0)
    
    1338
    -                                @(GHC.Internal.Types.ZonkAny 1)
    
    1244
    +                                @(GHC.Internal.Types.UnusedType 0 "a")
    
    1245
    +                                @(GHC.Internal.Types.UnusedType 1 "b")
    
    1339 1246
                                     (bx
    
    1340 1247
                                      `cast` (SelCo:Fun(arg) (Sub (Sym v2))
    
    1341 1248
                                              :: SmallArray# (HashMap k a)
    
    1342
    -                                            ~R# GHC.Internal.Types.ZonkAny 0))
    
    1249
    +                                            ~R# GHC.Internal.Types.UnusedType 0 "a"))
    
    1343 1250
                                     (bx1
    
    1344 1251
                                      `cast` (SelCo:Fun(arg) (SelCo:Fun(res) (Sub (Sym v2)))
    
    1345 1252
                                              :: SmallArray# (HashMap k b)
    
    1346
    -                                            ~R# GHC.Internal.Types.ZonkAny 1))
    
    1253
    +                                            ~R# GHC.Internal.Types.UnusedType 1 "b"))
    
    1347 1254
                              of {
    
    1348
    -                           __DEFAULT ->
    
    1349
    -                             joinrec {
    
    1350
    -                               go [Occ=LoopBreakerT[1]] :: Int -> Bool
    
    1351
    -                               [LclId[JoinId(1)(Nothing)], Arity=1, Str=<L>, Unf=OtherCon []]
    
    1352
    -                               go (i :: Int)
    
    1353
    -                                 = case GHC.Internal.Classes.ltInt i (GHC.Internal.Types.I# 0#) of {
    
    1354
    -                                     False ->
    
    1355
    -                                       case i of { I# i# ->
    
    1356
    -                                       case indexSmallArray# @Lifted @(HashMap k a) bx i# of
    
    1357
    -                                       { (# ipv [Occ=Once1] #) ->
    
    1358
    -                                       case indexSmallArray# @Lifted @(HashMap k b) bx1 i# of
    
    1359
    -                                       { (# ipv1 [Occ=Once1] #) ->
    
    1360
    -                                       case T26615a.$wdisjointSubtrees
    
    1361
    -                                              @k @a @b $dEq (+# ww 5#) ipv ipv1
    
    1362
    -                                       of {
    
    1363
    -                                         False -> GHC.Internal.Types.False;
    
    1364
    -                                         True -> jump go (GHC.Internal.Types.I# (-# i# 1#))
    
    1365
    -                                       }
    
    1366
    -                                       }
    
    1367
    -                                       }
    
    1368
    -                                       };
    
    1369
    -                                     True -> GHC.Internal.Types.True
    
    1370
    -                                   }; } in
    
    1371
    -                             jump go (GHC.Internal.Types.I# 31#);
    
    1255
    +                           __DEFAULT -> jump go (GHC.Internal.Types.I# 31#);
    
    1372 1256
                                1# -> GHC.Internal.Types.False
    
    1373 1257
                              }
    
    1374 1258
                              }
    
    ... ... @@ -1385,7 +1269,7 @@ T26615a.$wdisjointSubtrees
    1385 1269
           join {
    
    1386 1270
             fail [Dmd=MC(1,L)] :: (# #) -> Bool
    
    1387 1271
             [LclId[JoinId(1)(Nothing)], Arity=1, Str=<A>, Unf=OtherCon []]
    
    1388
    -        fail _ [Occ=Dead, OS=OneShot]
    
    1272
    +        fail (ds1 [Occ=Dead, OS=OneShot] :: (# #))
    
    1389 1273
               = case _b of {
    
    1390 1274
                   __DEFAULT -> case lvl1 of {};
    
    1391 1275
                   Empty -> GHC.Internal.Types.True;
    
    ... ... @@ -1508,7 +1392,7 @@ T26615a.$wdisjointSubtrees
    1508 1392
                     };
    
    1509 1393
                   Collision bx bx1 ->
    
    1510 1394
                     T26615a.disjointSubtrees_$s$wdisjointSubtrees
    
    1511
    -                  @a @b @k bx bx1 ww $dEq ds
    
    1395
    +                  @k @b @a $dEq ww bx bx1 ds
    
    1512 1396
                 } } in
    
    1513 1397
           case ds of {
    
    1514 1398
             Empty -> GHC.Internal.Types.True;
    
    ... ... @@ -1661,7 +1545,7 @@ T26615a.$wdisjointSubtrees
    1661 1545
                       of
    
    1662 1546
                       { (# ipv #) ->
    
    1663 1547
                       T26615a.disjointSubtrees_$s$wdisjointSubtrees
    
    1664
    -                    @b @a @k bx bx1 (+# ww 5#) $dEq ipv
    
    1548
    +                    @k @a @b $dEq (+# ww 5#) bx bx1 ipv
    
    1665 1549
                       };
    
    1666 1550
                     0## -> GHC.Internal.Types.True
    
    1667 1551
                   };
    
    ... ... @@ -1674,7 +1558,7 @@ T26615a.$wdisjointSubtrees
    1674 1558
                   of
    
    1675 1559
                   { (# ipv #) ->
    
    1676 1560
                   T26615a.disjointSubtrees_$s$wdisjointSubtrees
    
    1677
    -                @b @a @k bx bx1 (+# ww 5#) $dEq ipv
    
    1561
    +                @k @a @b $dEq (+# ww 5#) bx bx1 ipv
    
    1678 1562
                   }
    
    1679 1563
               };
    
    1680 1564
             BitmapIndexed bx bx1 ->
    
    ... ... @@ -1686,21 +1570,23 @@ T26615a.$wdisjointSubtrees
    1686 1570
                       case GHC.Internal.Unsafe.Coerce.unsafeEqualityProof
    
    1687 1571
                              @(*)
    
    1688 1572
                              @(SmallArray# (HashMap k a) -> SmallArray# (HashMap k b) -> Int#)
    
    1689
    -                         @(GHC.Internal.Types.ZonkAny 0
    
    1690
    -                           -> GHC.Internal.Types.ZonkAny 1 -> Int#)
    
    1573
    +                         @(GHC.Internal.Types.UnusedType 0 "a"
    
    1574
    +                           -> GHC.Internal.Types.UnusedType 1 "b" -> Int#)
    
    1691 1575
                       of
    
    1692 1576
                       { GHC.Internal.Unsafe.Coerce.UnsafeRefl v2 ->
    
    1693 1577
                       case reallyUnsafePtrEquality#
    
    1694 1578
                              @Lifted
    
    1695 1579
                              @Lifted
    
    1696
    -                         @(GHC.Internal.Types.ZonkAny 0)
    
    1697
    -                         @(GHC.Internal.Types.ZonkAny 1)
    
    1580
    +                         @(GHC.Internal.Types.UnusedType 0 "a")
    
    1581
    +                         @(GHC.Internal.Types.UnusedType 1 "b")
    
    1698 1582
                              (bx1
    
    1699 1583
                               `cast` (SelCo:Fun(arg) (Sub (Sym v2))
    
    1700
    -                                  :: SmallArray# (HashMap k a) ~R# GHC.Internal.Types.ZonkAny 0))
    
    1584
    +                                  :: SmallArray# (HashMap k a)
    
    1585
    +                                     ~R# GHC.Internal.Types.UnusedType 0 "a"))
    
    1701 1586
                              (bx3
    
    1702 1587
                               `cast` (SelCo:Fun(arg) (SelCo:Fun(res) (Sub (Sym v2)))
    
    1703
    -                                  :: SmallArray# (HashMap k b) ~R# GHC.Internal.Types.ZonkAny 1))
    
    1588
    +                                  :: SmallArray# (HashMap k b)
    
    1589
    +                                     ~R# GHC.Internal.Types.UnusedType 1 "b"))
    
    1704 1590
                       of {
    
    1705 1591
                         __DEFAULT ->
    
    1706 1592
                           let {
    
    ... ... @@ -1829,21 +1715,23 @@ T26615a.$wdisjointSubtrees
    1829 1715
                   case GHC.Internal.Unsafe.Coerce.unsafeEqualityProof
    
    1830 1716
                          @(*)
    
    1831 1717
                          @(SmallArray# (HashMap k a) -> SmallArray# (HashMap k b) -> Int#)
    
    1832
    -                     @(GHC.Internal.Types.ZonkAny 0
    
    1833
    -                       -> GHC.Internal.Types.ZonkAny 1 -> Int#)
    
    1718
    +                     @(GHC.Internal.Types.UnusedType 0 "a"
    
    1719
    +                       -> GHC.Internal.Types.UnusedType 1 "b" -> Int#)
    
    1834 1720
                   of
    
    1835 1721
                   { GHC.Internal.Unsafe.Coerce.UnsafeRefl v2 ->
    
    1836 1722
                   case reallyUnsafePtrEquality#
    
    1837 1723
                          @Lifted
    
    1838 1724
                          @Lifted
    
    1839
    -                     @(GHC.Internal.Types.ZonkAny 0)
    
    1840
    -                     @(GHC.Internal.Types.ZonkAny 1)
    
    1725
    +                     @(GHC.Internal.Types.UnusedType 0 "a")
    
    1726
    +                     @(GHC.Internal.Types.UnusedType 1 "b")
    
    1841 1727
                          (bx
    
    1842 1728
                           `cast` (SelCo:Fun(arg) (Sub (Sym v2))
    
    1843
    -                              :: SmallArray# (HashMap k a) ~R# GHC.Internal.Types.ZonkAny 0))
    
    1729
    +                              :: SmallArray# (HashMap k a)
    
    1730
    +                                 ~R# GHC.Internal.Types.UnusedType 0 "a"))
    
    1844 1731
                          (bx1
    
    1845 1732
                           `cast` (SelCo:Fun(arg) (SelCo:Fun(res) (Sub (Sym v2)))
    
    1846
    -                              :: SmallArray# (HashMap k b) ~R# GHC.Internal.Types.ZonkAny 1))
    
    1733
    +                              :: SmallArray# (HashMap k b)
    
    1734
    +                                 ~R# GHC.Internal.Types.UnusedType 1 "b"))
    
    1847 1735
                   of {
    
    1848 1736
                     __DEFAULT ->
    
    1849 1737
                       let {
    
    ... ... @@ -1910,88 +1798,72 @@ disjointSubtrees
    1910 1798
     
    
    1911 1799
     ------ Local rules for imported ids --------
    
    1912 1800
     "SC:$wdisjointSubtrees1" [1]
    
    1913
    -    forall (@a)
    
    1801
    +    forall (@k)
    
    1914 1802
                (@b)
    
    1915
    -           (@k)
    
    1916
    -           (sc :: Word#)
    
    1917
    -           (sc1 :: SmallArray# (Leaf k a))
    
    1803
    +           (@a)
    
    1804
    +           (sc :: Eq k)
    
    1805
    +           (sc1 :: Int#)
    
    1918 1806
                (sc2 :: Word#)
    
    1919 1807
                (sc3 :: SmallArray# (Leaf k b))
    
    1920
    -           (sc4 :: Int#)
    
    1921
    -           (sc5 :: Eq k).
    
    1808
    +           (sc4 :: Word#)
    
    1809
    +           (sc5 :: SmallArray# (Leaf k a)).
    
    1922 1810
           T26615a.$wdisjointSubtrees @k
    
    1923 1811
                                      @b
    
    1924 1812
                                      @a
    
    1925
    -                                 sc5
    
    1926
    -                                 sc4
    
    1813
    +                                 sc
    
    1814
    +                                 sc1
    
    1927 1815
                                      (T26615a.Collision @k @b sc2 sc3)
    
    1928
    -                                 (T26615a.Collision @k @a sc sc1)
    
    1816
    +                                 (T26615a.Collision @k @a sc4 sc5)
    
    1929 1817
           = T26615a.$wdisjointCollisions
    
    1930
    -          @k @b @a sc5 sc2 (T26615a.Array @(Leaf k b) sc3) sc sc1
    
    1818
    +          @k @b @a sc sc2 (T26615a.Array @(Leaf k b) sc3) sc4 sc5
    
    1931 1819
     "SC:$wdisjointSubtrees0" [1]
    
    1932
    -    forall (@b)
    
    1820
    +    forall (@k)
    
    1933 1821
                (@a)
    
    1934
    -           (@k)
    
    1935
    -           (sc :: Word#)
    
    1936
    -           (sc1 :: SmallArray# (Leaf k a))
    
    1937
    -           (sc2 :: Int#)
    
    1938
    -           (sc3 :: Eq k).
    
    1822
    +           (@b)
    
    1823
    +           (sc :: Eq k)
    
    1824
    +           (sc1 :: Int#)
    
    1825
    +           (sc2 :: Word#)
    
    1826
    +           (sc3 :: SmallArray# (Leaf k a)).
    
    1939 1827
           T26615a.$wdisjointSubtrees @k
    
    1940 1828
                                      @a
    
    1941 1829
                                      @b
    
    1942
    -                                 sc3
    
    1943
    -                                 sc2
    
    1944
    -                                 (T26615a.Collision @k @a sc sc1)
    
    1830
    +                                 sc
    
    1831
    +                                 sc1
    
    1832
    +                                 (T26615a.Collision @k @a sc2 sc3)
    
    1945 1833
           = T26615a.disjointSubtrees_$s$wdisjointSubtrees
    
    1946
    -          @b @a @k sc sc1 sc2 sc3
    
    1834
    +          @k @a @b sc sc1 sc2 sc3
    
    1947 1835
     
    
    1948 1836
     
    
    1949 1837
     [2 of 2] Compiling T26615           ( T26615.hs, T26615.o )
    
    1950 1838
     
    
    1951 1839
     ==================== Tidy Core ====================
    
    1952 1840
     Result size of Tidy Core
    
    1953
    -  = {terms: 614, types: 666, coercions: 18, joins: 8/14}
    
    1841
    +  = {terms: 614, types: 682, coercions: 18, joins: 8/14}
    
    1954 1842
     
    
    1955 1843
     -- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
    
    1956
    -T26615.$trModule2 :: GHC.Internal.Prim.Addr#
    
    1957
    -[GblId,
    
    1958
    - Unf=Unf{Src=<vanilla>, TopLvl=True,
    
    1959
    -         Value=True, ConLike=True, WorkFree=True, Expandable=True,
    
    1960
    -         Guidance=IF_ARGS [] 30 0}]
    
    1961
    -T26615.$trModule2 = "T26615"#
    
    1844
    +$trModule1 :: GHC.Internal.Prim.Addr#
    
    1845
    +[GblId, Unf=OtherCon []]
    
    1846
    +$trModule1 = "T26615"#
    
    1962 1847
     
    
    1963 1848
     -- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
    
    1964
    -T26615.$trModule1 :: GHC.Internal.Types.TrName
    
    1965
    -[GblId,
    
    1966
    - Unf=Unf{Src=<vanilla>, TopLvl=True,
    
    1967
    -         Value=True, ConLike=True, WorkFree=True, Expandable=True,
    
    1968
    -         Guidance=IF_ARGS [] 10 10}]
    
    1969
    -T26615.$trModule1 = GHC.Internal.Types.TrNameS T26615.$trModule2
    
    1849
    +$trModule2 :: GHC.Internal.Types.TrName
    
    1850
    +[GblId, Unf=OtherCon []]
    
    1851
    +$trModule2 = GHC.Internal.Types.TrNameS $trModule1
    
    1970 1852
     
    
    1971 1853
     -- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
    
    1972
    -T26615.$trModule4 :: GHC.Internal.Prim.Addr#
    
    1973
    -[GblId,
    
    1974
    - Unf=Unf{Src=<vanilla>, TopLvl=True,
    
    1975
    -         Value=True, ConLike=True, WorkFree=True, Expandable=True,
    
    1976
    -         Guidance=IF_ARGS [] 20 0}]
    
    1977
    -T26615.$trModule4 = "main"#
    
    1854
    +$trModule3 :: GHC.Internal.Prim.Addr#
    
    1855
    +[GblId, Unf=OtherCon []]
    
    1856
    +$trModule3 = "main"#
    
    1978 1857
     
    
    1979 1858
     -- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
    
    1980
    -T26615.$trModule3 :: GHC.Internal.Types.TrName
    
    1981
    -[GblId,
    
    1982
    - Unf=Unf{Src=<vanilla>, TopLvl=True,
    
    1983
    -         Value=True, ConLike=True, WorkFree=True, Expandable=True,
    
    1984
    -         Guidance=IF_ARGS [] 10 10}]
    
    1985
    -T26615.$trModule3 = GHC.Internal.Types.TrNameS T26615.$trModule4
    
    1859
    +$trModule4 :: GHC.Internal.Types.TrName
    
    1860
    +[GblId, Unf=OtherCon []]
    
    1861
    +$trModule4 = GHC.Internal.Types.TrNameS $trModule3
    
    1986 1862
     
    
    1987 1863
     -- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
    
    1988
    -T26615.$trModule :: GHC.Internal.Types.Module
    
    1989
    -[GblId,
    
    1990
    - Unf=Unf{Src=<vanilla>, TopLvl=True,
    
    1991
    -         Value=True, ConLike=True, WorkFree=True, Expandable=True,
    
    1992
    -         Guidance=IF_ARGS [] 10 10}]
    
    1993
    -T26615.$trModule
    
    1994
    -  = GHC.Internal.Types.Module T26615.$trModule3 T26615.$trModule1
    
    1864
    +T26615.$trModule [InlPrag=[~]] :: GHC.Internal.Types.Module
    
    1865
    +[GblId, Unf=OtherCon []]
    
    1866
    +T26615.$trModule = GHC.Internal.Types.Module $trModule4 $trModule2
    
    1995 1867
     
    
    1996 1868
     -- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
    
    1997 1869
     lvl :: GHC.Internal.Prim.Addr#
    
    ... ... @@ -2128,7 +2000,7 @@ $wpoly_lookupCont_
    2128 2000
     end Rec }
    
    2129 2001
     
    
    2130 2002
     Rec {
    
    2131
    --- RHS size: {terms: 448, types: 507, coercions: 18, joins: 8/13}
    
    2003
    +-- RHS size: {terms: 448, types: 523, coercions: 18, joins: 8/13}
    
    2132 2004
     T26615.$s$wdisjointSubtrees [InlPrag=[~], Occ=LoopBreaker]
    
    2133 2005
       :: forall a b.
    
    2134 2006
          GHC.Internal.Prim.Int#
    
    ... ... @@ -2143,7 +2015,7 @@ T26615.$s$wdisjointSubtrees
    2143 2015
           join {
    
    2144 2016
             fail [Dmd=MC(1,L)] :: (# #) -> Bool
    
    2145 2017
             [LclId[JoinId(1)(Nothing)], Arity=1, Str=<A>, Unf=OtherCon []]
    
    2146
    -        fail _ [Occ=Dead, OS=OneShot]
    
    2018
    +        fail (ds1 [Occ=Dead, OS=OneShot] :: (# #))
    
    2147 2019
               = case _b of wild {
    
    2148 2020
                   __DEFAULT -> case lvl1 of {};
    
    2149 2021
                   T26615a.Empty -> GHC.Internal.Types.True;
    
    ... ... @@ -2190,30 +2062,28 @@ T26615.$s$wdisjointSubtrees
    2190 2062
                         $s$wfoldr_ [InlPrag=[2],
    
    2191 2063
                                     Occ=LoopBreaker,
    
    2192 2064
                                     Dmd=SC(S,C(1,C(1,C(1,L))))]
    
    2193
    -                      :: Bool
    
    2194
    -                         -> GHC.Internal.Prim.Int#
    
    2195
    -                         -> GHC.Internal.Prim.Int#
    
    2196
    -                         -> GHC.Internal.Prim.SmallArray# (T26615a.Leaf [Char] a)
    
    2197
    -                         -> Bool
    
    2065
    +                      :: GHC.Internal.Prim.SmallArray# (T26615a.Leaf [Char] a)
    
    2066
    +                         -> GHC.Internal.Prim.Int# -> GHC.Internal.Prim.Int# -> Bool -> Bool
    
    2198 2067
                         [LclId[JoinId(4)(Nothing)],
    
    2199 2068
                          Arity=4,
    
    2200 2069
                          Str=<L><L><L><L>,
    
    2201 2070
                          Unf=OtherCon []]
    
    2202
    -                    $s$wfoldr_ (sc :: Bool)
    
    2071
    +                    $s$wfoldr_ (sc
    
    2072
    +                                  :: GHC.Internal.Prim.SmallArray# (T26615a.Leaf [Char] a))
    
    2203 2073
                                    (sc1 :: GHC.Internal.Prim.Int#)
    
    2204 2074
                                    (sc2 :: GHC.Internal.Prim.Int#)
    
    2205
    -                               (sc3 :: GHC.Internal.Prim.SmallArray# (T26615a.Leaf [Char] a))
    
    2206
    -                      = case GHC.Internal.Prim.>=# sc1 sc2 of {
    
    2075
    +                               (sc3 :: Bool)
    
    2076
    +                      = case GHC.Internal.Prim.>=# sc2 sc1 of {
    
    2207 2077
                               __DEFAULT ->
    
    2208 2078
                                 case GHC.Internal.Prim.indexSmallArray#
    
    2209
    -                                   @GHC.Internal.Types.Lifted @(T26615a.Leaf String a) sc3 sc1
    
    2079
    +                                   @GHC.Internal.Types.Lifted @(T26615a.Leaf String a) sc sc2
    
    2210 2080
                                 of
    
    2211 2081
                                 { (# ipv1 #) ->
    
    2212 2082
                                 case ipv1 of { T26615a.L kA ds2 ->
    
    2213 2083
                                 join {
    
    2214 2084
                                   $j :: Bool
    
    2215 2085
                                   [LclId[JoinId(0)(Nothing)]]
    
    2216
    -                              $j = jump $s$wfoldr_ sc (GHC.Internal.Prim.+# sc1 1#) sc2 sc3 } in
    
    2086
    +                              $j = jump $s$wfoldr_ sc sc1 (GHC.Internal.Prim.+# sc2 1#) sc3 } in
    
    2217 2087
                                 joinrec {
    
    2218 2088
                                   $wlookupInArrayCont_ [InlPrag=[2],
    
    2219 2089
                                                         Occ=LoopBreaker,
    
    ... ... @@ -2258,14 +2128,14 @@ T26615.$s$wdisjointSubtrees
    2258 2128
                                 jump $wlookupInArrayCont_ kA bx3 0# lvl2
    
    2259 2129
                                 }
    
    2260 2130
                                 };
    
    2261
    -                          1# -> sc
    
    2131
    +                          1# -> sc3
    
    2262 2132
                             }; } in
    
    2263 2133
                       jump $s$wfoldr_
    
    2264
    -                    GHC.Internal.Types.True
    
    2265
    -                    0#
    
    2134
    +                    bx1
    
    2266 2135
                         (GHC.Internal.Prim.sizeofSmallArray#
    
    2267 2136
                            @GHC.Internal.Types.Lifted @(T26615a.Leaf String a) bx1)
    
    2268
    -                    bx1
    
    2137
    +                    0#
    
    2138
    +                    GHC.Internal.Types.True
    
    2269 2139
                   };
    
    2270 2140
                 T26615a.BitmapIndexed bx2 bx3 ->
    
    2271 2141
                   let {
    
    ... ... @@ -2317,23 +2187,23 @@ T26615.$s$wdisjointSubtrees
    2317 2187
                              @(GHC.Internal.Prim.SmallArray# (HashMap String a)
    
    2318 2188
                                -> GHC.Internal.Prim.SmallArray# (HashMap String b)
    
    2319 2189
                                -> GHC.Internal.Prim.Int#)
    
    2320
    -                         @(GHC.Internal.Types.ZonkAny 0
    
    2321
    -                           -> GHC.Internal.Types.ZonkAny 1 -> GHC.Internal.Prim.Int#)
    
    2190
    +                         @(GHC.Internal.Types.UnusedType 0 "a"
    
    2191
    +                           -> GHC.Internal.Types.UnusedType 1 "b" -> GHC.Internal.Prim.Int#)
    
    2322 2192
                       of
    
    2323 2193
                       { GHC.Internal.Unsafe.Coerce.UnsafeRefl v2 ->
    
    2324 2194
                       case GHC.Internal.Prim.reallyUnsafePtrEquality#
    
    2325 2195
                              @GHC.Internal.Types.Lifted
    
    2326 2196
                              @GHC.Internal.Types.Lifted
    
    2327
    -                         @(GHC.Internal.Types.ZonkAny 0)
    
    2328
    -                         @(GHC.Internal.Types.ZonkAny 1)
    
    2197
    +                         @(GHC.Internal.Types.UnusedType 0 "a")
    
    2198
    +                         @(GHC.Internal.Types.UnusedType 1 "b")
    
    2329 2199
                              (bx1
    
    2330 2200
                               `cast` (SelCo:Fun(arg) (Sub (Sym v2))
    
    2331 2201
                                       :: GHC.Internal.Prim.SmallArray# (HashMap String a)
    
    2332
    -                                     ~R# GHC.Internal.Types.ZonkAny 0))
    
    2202
    +                                     ~R# GHC.Internal.Types.UnusedType 0 "a"))
    
    2333 2203
                              (bx3
    
    2334 2204
                               `cast` (SelCo:Fun(arg) (SelCo:Fun(res) (Sub (Sym v2)))
    
    2335 2205
                                       :: GHC.Internal.Prim.SmallArray# (HashMap String b)
    
    2336
    -                                     ~R# GHC.Internal.Types.ZonkAny 1))
    
    2206
    +                                     ~R# GHC.Internal.Types.UnusedType 1 "b"))
    
    2337 2207
                       of {
    
    2338 2208
                         __DEFAULT ->
    
    2339 2209
                           joinrec {
    
    ... ... @@ -2495,23 +2365,23 @@ T26615.$s$wdisjointSubtrees
    2495 2365
                          @(GHC.Internal.Prim.SmallArray# (HashMap String a)
    
    2496 2366
                            -> GHC.Internal.Prim.SmallArray# (HashMap String b)
    
    2497 2367
                            -> GHC.Internal.Prim.Int#)
    
    2498
    -                     @(GHC.Internal.Types.ZonkAny 0
    
    2499
    -                       -> GHC.Internal.Types.ZonkAny 1 -> GHC.Internal.Prim.Int#)
    
    2368
    +                     @(GHC.Internal.Types.UnusedType 0 "a"
    
    2369
    +                       -> GHC.Internal.Types.UnusedType 1 "b" -> GHC.Internal.Prim.Int#)
    
    2500 2370
                   of
    
    2501 2371
                   { GHC.Internal.Unsafe.Coerce.UnsafeRefl v2 ->
    
    2502 2372
                   case GHC.Internal.Prim.reallyUnsafePtrEquality#
    
    2503 2373
                          @GHC.Internal.Types.Lifted
    
    2504 2374
                          @GHC.Internal.Types.Lifted
    
    2505
    -                     @(GHC.Internal.Types.ZonkAny 0)
    
    2506
    -                     @(GHC.Internal.Types.ZonkAny 1)
    
    2375
    +                     @(GHC.Internal.Types.UnusedType 0 "a")
    
    2376
    +                     @(GHC.Internal.Types.UnusedType 1 "b")
    
    2507 2377
                          (bx
    
    2508 2378
                           `cast` (SelCo:Fun(arg) (Sub (Sym v2))
    
    2509 2379
                                   :: GHC.Internal.Prim.SmallArray# (HashMap String a)
    
    2510
    -                                 ~R# GHC.Internal.Types.ZonkAny 0))
    
    2380
    +                                 ~R# GHC.Internal.Types.UnusedType 0 "a"))
    
    2511 2381
                          (bx1
    
    2512 2382
                           `cast` (SelCo:Fun(arg) (SelCo:Fun(res) (Sub (Sym v2)))
    
    2513 2383
                                   :: GHC.Internal.Prim.SmallArray# (HashMap String b)
    
    2514
    -                                 ~R# GHC.Internal.Types.ZonkAny 1))
    
    2384
    +                                 ~R# GHC.Internal.Types.UnusedType 1 "b"))
    
    2515 2385
                   of {
    
    2516 2386
                     __DEFAULT ->
    
    2517 2387
                       joinrec {
    
    ... ... @@ -2564,7 +2434,7 @@ f = \ (@a)
    2564 2434
     
    
    2565 2435
     ------ Local rules for imported ids --------
    
    2566 2436
     "SPEC/T26615 $wdisjointSubtrees @String @_ @_" [2]
    
    2567
    -    forall (@a) (@b) ($dEq :: Eq String).
    
    2437
    +    forall (@a) (@b) ($dEq [Occ=Dead] :: Eq String).
    
    2568 2438
           T26615a.$wdisjointSubtrees @String @a @b $dEq
    
    2569 2439
           = T26615.$s$wdisjointSubtrees @a @b
    
    2570 2440
     
    

  • testsuite/tests/typecheck/should_fail/T13292.stderr
    ... ... @@ -14,15 +14,15 @@ T13292a.hs:4:12: warning: [GHC-39999] [-Wdeferred-type-errors (in -Wdefault)]
    14 14
           In an equation for ‘someFunc’: someFunc = return ()
    
    15 15
     
    
    16 16
     T13292.hs:6:1: warning: [GHC-83865] [-Wdeferred-type-errors (in -Wdefault)]
    
    17
    -    • Couldn't match type ‘GHC.Internal.Types.ZonkAny 0’ with ‘IO’
    
    17
    +    • Couldn't match type ‘m00’ with ‘IO’
    
    18 18
           Expected: IO ()
    
    19
    -        Actual: GHC.Internal.Types.ZonkAny 0 ()
    
    19
    +        Actual: m00
    
    20 20
         • When checking the type of the IO action ‘main’
    
    21 21
     
    
    22 22
     T13292.hs:6:1: warning: [GHC-83865] [-Wdeferred-type-errors (in -Wdefault)]
    
    23
    -    • Couldn't match type ‘GHC.Internal.Types.ZonkAny 0’ with ‘IO’
    
    23
    +    • Couldn't match type ‘m00’ with ‘IO’
    
    24 24
           Expected: IO ()
    
    25
    -        Actual: GHC.Internal.Types.ZonkAny 0 ()
    
    25
    +        Actual: m00
    
    26 26
         • In the expression: main
    
    27 27
           When checking the type of the IO action ‘main’
    
    28 28