Bytecode pipeline assumes that all top-level unlifted values are of type Addr#
The GHC.StgToByteCode.pushAtom
pipeline currently has this code to handle string literals:
-- see Note [Generating code for top-level string literal bindings]
| isUnliftedType (idType var) -> do
massert (idType var `eqType` addrPrimTy)
return (unitOL (PUSH_ADDR (getName var)), szb)
This is clearly bogus. As noted in #25638, unlifted nullary data constructor workers can also appear at the top-level and are obviously not of type Addr#
.