Go to the first, previous, next, last section, table of contents.

The state type

The primitive type `State#' represents the state of a state transformer. It is parameterised on the desired type of state, which serves to keep states from distinct threads distinct from one another. But the only effect of this parameterisation is in the type system: all values of type `State#' are represented in the same way. Indeed, they are all represented by nothing at all! The code generator "knows" to generate no code, and allocate no registers etc, for primitive states.
type State# s
The type `GHC.RealWorld' is truly opaque: there are no values defined of this type, and no operations over it. It is "primitive" in that sense -- but it is not unboxed! Its only role in life is to be the type which distinguishes the `IO' state transformer.
data RealWorld

Go to the first, previous, next, last section, table of contents.