Note [magicIds]

GHC/Types/Id/Make.hs:144 compiler

The magicIds

  * Are exported from GHC.Magic

  * Can be defined in Haskell (and are, in ghc-prim:GHC/Magic.hs).
    This definition at least generates Haddock documentation for them.

  * May or may not have a CompulsoryUnfolding.

  * But have some special behaviour that can't be done via an
    unfolding from an interface file.

  * May have IdInfo that differs from what would be imported from GHC.Magic.hi.
    For example, 'lazy' gets a lazy strictness signature, per Note [lazyId magic].

  The two remaining identifiers in GHC.Magic, runRW# and inline, are not
  listed in magicIds: they have special behavior but they can be known-key and
  not wired-in.
  Similarly for GHC.Internal.IO.seq# and GHC.Internal.Exts.considerAccessible.
  runRW#:             see Note [Simplification of runRW#] in Prep,
                      runRW# code in Simplifier, Note [Linting of runRW#].
  seq#:               see Note [seq# magic]
  inline:             see Note [inlineId magic]
  considerAccessible: see Note [considerAccessible]

References 6

Referenced by 4