ghc-7.7.20130829: The GHC API

Safe HaskellNone

SMRep

Contents

Synopsis

Words and bytes

Immutable arrays of StgWords

listArray :: Ix i => (i, i) -> [StgWord] -> UArrayStgWord iSource

toByteArray :: UArrayStgWord i -> ByteArray#Source

Closure repesentation

data SMRep Source

A description of the layout of a closure. Corresponds directly to the closure types in includesrtsstorage/ClosureTypes.h.

Instances

type IsStatic = BoolSource

True = This is a static closure. Affects how we garbage-collect it. Static closure have an extra static link field at the end.

data ClosureTypeInfo Source

Constructors

Constr ConstrTag ConstrDescription 
Fun FunArity ArgDescr 
Thunk 
ThunkSelector SelectorOffset 
BlackHole 
IndStatic 

Construction

Predicates

Size-related things

fixedHdrSize :: DynFlags -> WordOffSource

Size of a closure header (StgHeader in includesrtsstorage/Closures.h)

profHdrSize :: DynFlags -> WordOffSource

Size of the profiling part of a closure header (StgProfHeader in includesrtsstorage/Closures.h)

RTS closure types

rtsClosureType :: SMRep -> IntSource

Derives the RTS closure type from an SMRep

Operations over [Word8] strings that don't belong here