Rodrigo Mesquita pushed to branch wip/spj-reinstallable-base2 at Glasgow Haskell Compiler / GHC
Commits:
-
6558f6c0
by Rodrigo Mesquita at 2026-05-11T16:31:36+01:00
4 changed files:
- compiler/GHC/Builtin/WiredIn/Prim.hs
- compiler/GHC/HsToCore.hs
- compiler/GHC/HsToCore/Monad.hs
- compiler/GHC/Tc/Module.hs
Changes:
| ... | ... | @@ -879,7 +879,7 @@ generator never has to manipulate a value of type 'a :: TYPE rr'. |
| 879 | 879 | * error :: forall (rr::RuntimeRep) (a::TYPE rr). String -> a
|
| 880 | 880 | Code generator never has to manipulate the return value.
|
| 881 | 881 | |
| 882 | -* unsafeCoerce#, defined in Desugar.mkUnsafeCoercePair:
|
|
| 882 | +* unsafeCoerce#, defined in Desugar.mkUnsafeCoercePrimPair:
|
|
| 883 | 883 | Always inlined to be a no-op
|
| 884 | 884 | unsafeCoerce# :: forall (r1 :: RuntimeRep) (r2 :: RuntimeRep)
|
| 885 | 885 | (a :: TYPE r1) (b :: TYPE r2).
|
| ... | ... | @@ -599,6 +599,8 @@ even if we need pure access; note that wiring-in an Id requires all |
| 599 | 599 | entities used in its definition *also* to be wired in, transitively
|
| 600 | 600 | and recursively. This can be a huge pain. The little trick
|
| 601 | 601 | documented here allows us to have the best of both worlds.
|
| 602 | +(This has been improved with the new known-occ/keys work.
|
|
| 603 | + See Note [Overview of known entities] in GHC.Builtin.)
|
|
| 602 | 604 | |
| 603 | 605 | Motivating example: unsafeCoerce#. See [Wiring in unsafeCoerce#] for the
|
| 604 | 606 | details.
|
| ... | ... | @@ -616,7 +616,7 @@ dsLookupKnownOccId uniq = tyThingId <$> dsLookupKnownOccThing uniq |
| 616 | 616 | --------------------------------------
|
| 617 | 617 | -- Lookups for known-key things
|
| 618 | 618 | |
| 619 | -dsLookupKnownKeyName :: KnownKey -> DsM Name
|
|
| 619 | +dsLookupKnownKeyName :: HasDebugCallStack => KnownKey -> DsM Name
|
|
| 620 | 620 | dsLookupKnownKeyName uniq
|
| 621 | 621 | = do { rebindable_src <- dsGetKnownKeySource
|
| 622 | 622 | ; dsToIfL $
|
| ... | ... | @@ -2566,7 +2566,7 @@ tcGhciStmts stmts |
| 2566 | 2566 | -- We use Any rather than a dummy type such as () because of
|
| 2567 | 2567 | -- the rules of unsafeCoerce#; see Unsafe/Coerce.hs for the details.
|
| 2568 | 2568 | |
| 2569 | - ; AnId unsafe_coerce_id <- tcLookupKnownKeyGlobal unsafeCoercePrimIdKey
|
|
| 2569 | + ; unsafe_coerce_id <- tcLookupKnownKeyId unsafeCoercePrimIdKey
|
|
| 2570 | 2570 | -- We use unsafeCoerce# here because of (U11) in
|
| 2571 | 2571 | -- Note [Implementing unsafeCoerce] in base:Unsafe.Coerce
|
| 2572 | 2572 |