Safe Haskell | Ignore |
---|---|
Language | GHC2021 |
GHC.Exts.Heap.Closures
Synopsis
- type Closure = GenClosure Box
- data GenClosure b
- = ConstrClosure { }
- | FunClosure {
- info :: !StgInfoTable
- ptrArgs :: ![b]
- dataArgs :: ![Word]
- | ThunkClosure {
- info :: !StgInfoTable
- ptrArgs :: ![b]
- dataArgs :: ![Word]
- | SelectorClosure {
- info :: !StgInfoTable
- selectee :: !b
- | PAPClosure { }
- | APClosure { }
- | APStackClosure {
- info :: !StgInfoTable
- fun :: !b
- payload :: ![b]
- | IndClosure {
- info :: !StgInfoTable
- indirectee :: !b
- | BCOClosure { }
- | BlackholeClosure {
- info :: !StgInfoTable
- indirectee :: !b
- | ArrWordsClosure { }
- | MutArrClosure {
- info :: !StgInfoTable
- mccPtrs :: !Word
- mccSize :: !Word
- mccPayload :: ![b]
- | SmallMutArrClosure {
- info :: !StgInfoTable
- mccPtrs :: !Word
- mccPayload :: ![b]
- | MVarClosure {
- info :: !StgInfoTable
- queueHead :: !b
- queueTail :: !b
- value :: !b
- | IOPortClosure {
- info :: !StgInfoTable
- queueHead :: !b
- queueTail :: !b
- value :: !b
- | MutVarClosure {
- info :: !StgInfoTable
- var :: !b
- | BlockingQueueClosure { }
- | WeakClosure {
- info :: !StgInfoTable
- cfinalizers :: !b
- key :: !b
- value :: !b
- finalizer :: !b
- weakLink :: !(Maybe b)
- | TSOClosure {
- info :: !StgInfoTable
- link :: !b
- global_link :: !b
- tsoStack :: !b
- trec :: !b
- blocked_exceptions :: !b
- bq :: !b
- thread_label :: !(Maybe b)
- what_next :: !WhatNext
- why_blocked :: !WhyBlocked
- flags :: ![TsoFlags]
- threadId :: !Word64
- saved_errno :: !Word32
- tso_dirty :: !Word32
- alloc_limit :: !Int64
- tot_stack_size :: !Word32
- prof :: !(Maybe StgTSOProfInfo)
- | StackClosure {
- info :: !StgInfoTable
- stack_size :: !Word32
- stack_dirty :: !Word8
- stack_marking :: !Word8
- | IntClosure { }
- | WordClosure { }
- | Int64Closure { }
- | Word64Closure { }
- | AddrClosure { }
- | FloatClosure { }
- | DoubleClosure { }
- | OtherClosure {
- info :: !StgInfoTable
- hvalues :: ![b]
- rawWords :: ![Word]
- | UnsupportedClosure {
- info :: !StgInfoTable
- | UnknownTypeWordSizedPrimitive { }
- data PrimType
- data WhatNext
- data WhyBlocked
- data TsoFlags
- allClosures :: GenClosure b -> [b]
- closureSize :: Box -> Int
- type StgStackClosure = GenStgStackClosure Box
- data GenStgStackClosure b = GenStgStackClosure {
- ssc_info :: !StgInfoTable
- ssc_stack_size :: !Word32
- ssc_stack :: ![GenStackFrame b]
- type StackFrame = GenStackFrame Box
- data GenStackFrame b
- = UpdateFrame {
- info_tbl :: !StgInfoTable
- updatee :: !b
- | CatchFrame {
- info_tbl :: !StgInfoTable
- handler :: !b
- | CatchStmFrame {
- info_tbl :: !StgInfoTable
- catchFrameCode :: !b
- handler :: !b
- | CatchRetryFrame {
- info_tbl :: !StgInfoTable
- running_alt_code :: !Word
- first_code :: !b
- alt_code :: !b
- | AtomicallyFrame {
- info_tbl :: !StgInfoTable
- atomicallyFrameCode :: !b
- result :: !b
- | UnderflowFrame {
- info_tbl :: !StgInfoTable
- nextChunk :: !(GenStgStackClosure b)
- | StopFrame {
- info_tbl :: !StgInfoTable
- | RetSmall {
- info_tbl :: !StgInfoTable
- stack_payload :: ![GenStackField b]
- | RetBig {
- info_tbl :: !StgInfoTable
- stack_payload :: ![GenStackField b]
- | RetFun {
- info_tbl :: !StgInfoTable
- retFunSize :: !Word
- retFunFun :: !b
- retFunPayload :: ![GenStackField b]
- | RetBCO {
- info_tbl :: !StgInfoTable
- bco :: !b
- bcoArgs :: ![GenStackField b]
- = UpdateFrame {
- type StackField = GenStackField Box
- data GenStackField b
- data Box = Box (Any :: Type)
- areBoxesEqual :: Box -> Box -> IO Bool
- asBox :: a -> Box
Closures
type Closure = GenClosure Box #
data GenClosure b #
This is the representation of a Haskell value on the heap. It reflects https://gitlab.haskell.org/ghc/ghc/blob/master/rts/include/rts/storage/Closures.h
The data type is parametrized by b
: the type to store references in.
Usually this is a Box
with the type synonym Closure
.
All Heap objects have the same basic layout. A header containing a pointer to
the info table and a payload with various fields. The info
field below
always refers to the info table pointed to by the header. The remaining
fields are the payload.
See https://gitlab.haskell.org/ghc/ghc/wikis/commentary/rts/storage/heap-objects for more information.
Constructors
ConstrClosure | A data constructor |
FunClosure | A function |
Fields
| |
ThunkClosure | A thunk, an expression not obviously in head normal form |
Fields
| |
SelectorClosure | A thunk which performs a simple selection operation |
Fields
| |
PAPClosure | An unsaturated function application |
Fields
| |
APClosure | A function application |
Fields
| |
APStackClosure | A suspended thunk evaluation |
Fields
| |
IndClosure | A pointer to another closure, introduced when a thunk is updated to point at its value |
Fields
| |
BCOClosure | A byte-code object (BCO) which can be interpreted by GHC's byte-code interpreter (e.g. as used by GHCi) |
Fields
| |
BlackholeClosure | A thunk under evaluation by another thread |
Fields
| |
ArrWordsClosure | A |
MutArrClosure | A |
Fields
| |
SmallMutArrClosure | A Since: 8.10.1 |
Fields
| |
MVarClosure | An |
Fields
| |
IOPortClosure | An |
Fields
| |
MutVarClosure | A |
Fields
| |
BlockingQueueClosure | An STM blocking queue. |
WeakClosure | |
Fields
| |
TSOClosure | Representation of StgTSO: A Thread State Object. The values for
|
Fields
| |
StackClosure | Representation of StgStack: The 'tsoStack ' of a |
Fields
| |
IntClosure | Primitive Int |
WordClosure | Primitive Word |
Int64Closure | Primitive Int64 |
Word64Closure | Primitive Word64 |
AddrClosure | Primitive Addr |
FloatClosure | Primitive Float |
DoubleClosure | Primitive Double |
OtherClosure | Another kind of closure |
Fields
| |
UnsupportedClosure | |
Fields
| |
UnknownTypeWordSizedPrimitive | A primitive word from a bitmap encoded stack frame payload The type itself cannot be restored (i.e. it might represent a Word8# or an Int#). |
Instances
Instances
Binary PrimType # | |||||
Generic PrimType # | |||||
Defined in GHC.Exts.Heap.Closures Associated Types
| |||||
Show PrimType # | |||||
Eq PrimType # | |||||
Ord PrimType # | |||||
Defined in GHC.Exts.Heap.Closures | |||||
type Rep PrimType # | |||||
Defined in GHC.Exts.Heap.Closures type Rep PrimType = D1 ('MetaData "PrimType" "GHC.Exts.Heap.Closures" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) ((C1 ('MetaCons "PInt" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "PWord" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PInt64" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "PWord64" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PAddr" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "PFloat" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PDouble" 'PrefixI 'False) (U1 :: Type -> Type)))) |
Constructors
ThreadRunGHC | |
ThreadInterpret | |
ThreadKilled | |
ThreadComplete | |
WhatNextUnknownValue Word16 | Please report this as a bug |
Instances
Binary WhatNext # | |||||
Generic WhatNext # | |||||
Defined in GHC.Exts.Heap.Closures Associated Types
| |||||
Show WhatNext # | |||||
Eq WhatNext # | |||||
Ord WhatNext # | |||||
Defined in GHC.Exts.Heap.Closures | |||||
type Rep WhatNext # | |||||
Defined in GHC.Exts.Heap.Closures type Rep WhatNext = D1 ('MetaData "WhatNext" "GHC.Exts.Heap.Closures" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) ((C1 ('MetaCons "ThreadRunGHC" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ThreadInterpret" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ThreadKilled" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ThreadComplete" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "WhatNextUnknownValue" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word16))))) |
data WhyBlocked #
Constructors
NotBlocked | |
BlockedOnMVar | |
BlockedOnMVarRead | |
BlockedOnBlackHole | |
BlockedOnRead | |
BlockedOnWrite | |
BlockedOnDelay | |
BlockedOnSTM | |
BlockedOnDoProc | |
BlockedOnCCall | |
BlockedOnCCall_Interruptible | |
BlockedOnMsgThrowTo | |
ThreadMigrating | |
WhyBlockedUnknownValue Word16 | Please report this as a bug |
Instances
Binary WhyBlocked # | |||||
Defined in GHCi.Message | |||||
Generic WhyBlocked # | |||||
Defined in GHC.Exts.Heap.Closures Associated Types
| |||||
Show WhyBlocked # | |||||
Defined in GHC.Exts.Heap.Closures Methods showsPrec :: Int -> WhyBlocked -> ShowS # show :: WhyBlocked -> String # showList :: [WhyBlocked] -> ShowS # | |||||
Eq WhyBlocked # | |||||
Defined in GHC.Exts.Heap.Closures | |||||
Ord WhyBlocked # | |||||
Defined in GHC.Exts.Heap.Closures Methods compare :: WhyBlocked -> WhyBlocked -> Ordering # (<) :: WhyBlocked -> WhyBlocked -> Bool # (<=) :: WhyBlocked -> WhyBlocked -> Bool # (>) :: WhyBlocked -> WhyBlocked -> Bool # (>=) :: WhyBlocked -> WhyBlocked -> Bool # max :: WhyBlocked -> WhyBlocked -> WhyBlocked # min :: WhyBlocked -> WhyBlocked -> WhyBlocked # | |||||
type Rep WhyBlocked # | |||||
Defined in GHC.Exts.Heap.Closures type Rep WhyBlocked = D1 ('MetaData "WhyBlocked" "GHC.Exts.Heap.Closures" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (((C1 ('MetaCons "NotBlocked" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "BlockedOnMVar" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BlockedOnMVarRead" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "BlockedOnBlackHole" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BlockedOnRead" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "BlockedOnWrite" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BlockedOnDelay" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "BlockedOnSTM" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "BlockedOnDoProc" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BlockedOnCCall" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "BlockedOnCCall_Interruptible" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BlockedOnMsgThrowTo" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ThreadMigrating" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "WhyBlockedUnknownValue" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word16)))))) |
Constructors
TsoLocked | |
TsoBlockx | |
TsoInterruptible | |
TsoStoppedOnBreakpoint | |
TsoMarked | |
TsoSqueezed | |
TsoAllocLimit | |
TsoFlagsUnknownValue Word32 | Please report this as a bug |
Instances
Binary TsoFlags # | |||||
Generic TsoFlags # | |||||
Defined in GHC.Exts.Heap.Closures Associated Types
| |||||
Show TsoFlags # | |||||
Eq TsoFlags # | |||||
Ord TsoFlags # | |||||
Defined in GHC.Exts.Heap.Closures | |||||
type Rep TsoFlags # | |||||
Defined in GHC.Exts.Heap.Closures type Rep TsoFlags = D1 ('MetaData "TsoFlags" "GHC.Exts.Heap.Closures" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (((C1 ('MetaCons "TsoLocked" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TsoBlockx" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "TsoInterruptible" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TsoStoppedOnBreakpoint" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "TsoMarked" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TsoSqueezed" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "TsoAllocLimit" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TsoFlagsUnknownValue" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word32))))) |
allClosures :: GenClosure b -> [b] #
For generic code, this function returns all referenced closures.
closureSize :: Box -> Int #
Get the size of the top-level closure in words. Includes header and payload. Does not follow pointers.
Since: 8.10.1
Stack
type StgStackClosure = GenStgStackClosure Box #
data GenStgStackClosure b #
A decoded StgStack
with StackFrame
s
Stack related data structures (GenStgStackClosure
, GenStackField
,
GenStackFrame
) are defined separately from GenClosure
as their related
functions are very different. Though, both are closures in the sense of RTS
structures, their decoding logic differs: While it's safe to keep a reference
to a heap closure, the garbage collector does not update references to stack
located closures.
Additionally, stack frames don't appear outside of the stack. Thus, keeping
GenStackFrame
and GenClosure
separated, makes these types more precise
(in the sense what values to expect.)
Constructors
GenStgStackClosure | |
Fields
|
Instances
Functor GenStgStackClosure # | |||||
Defined in GHC.Exts.Heap.Closures Methods fmap :: (a -> b) -> GenStgStackClosure a -> GenStgStackClosure b # (<$) :: a -> GenStgStackClosure b -> GenStgStackClosure a # | |||||
Foldable GenStgStackClosure # | |||||
Defined in GHC.Exts.Heap.Closures Methods fold :: Monoid m => GenStgStackClosure m -> m # foldMap :: Monoid m => (a -> m) -> GenStgStackClosure a -> m # foldMap' :: Monoid m => (a -> m) -> GenStgStackClosure a -> m # foldr :: (a -> b -> b) -> b -> GenStgStackClosure a -> b # foldr' :: (a -> b -> b) -> b -> GenStgStackClosure a -> b # foldl :: (b -> a -> b) -> b -> GenStgStackClosure a -> b # foldl' :: (b -> a -> b) -> b -> GenStgStackClosure a -> b # foldr1 :: (a -> a -> a) -> GenStgStackClosure a -> a # foldl1 :: (a -> a -> a) -> GenStgStackClosure a -> a # toList :: GenStgStackClosure a -> [a] # null :: GenStgStackClosure a -> Bool # length :: GenStgStackClosure a -> Int # elem :: Eq a => a -> GenStgStackClosure a -> Bool # maximum :: Ord a => GenStgStackClosure a -> a # minimum :: Ord a => GenStgStackClosure a -> a # sum :: Num a => GenStgStackClosure a -> a # product :: Num a => GenStgStackClosure a -> a # | |||||
Traversable GenStgStackClosure # | |||||
Defined in GHC.Exts.Heap.Closures Methods traverse :: Applicative f => (a -> f b) -> GenStgStackClosure a -> f (GenStgStackClosure b) # sequenceA :: Applicative f => GenStgStackClosure (f a) -> f (GenStgStackClosure a) # mapM :: Monad m => (a -> m b) -> GenStgStackClosure a -> m (GenStgStackClosure b) # sequence :: Monad m => GenStgStackClosure (m a) -> m (GenStgStackClosure a) # | |||||
Generic (GenStgStackClosure b) # | |||||
Defined in GHC.Exts.Heap.Closures Associated Types
Methods from :: GenStgStackClosure b -> Rep (GenStgStackClosure b) x # to :: Rep (GenStgStackClosure b) x -> GenStgStackClosure b # | |||||
Show b => Show (GenStgStackClosure b) # | |||||
Defined in GHC.Exts.Heap.Closures Methods showsPrec :: Int -> GenStgStackClosure b -> ShowS # show :: GenStgStackClosure b -> String # showList :: [GenStgStackClosure b] -> ShowS # | |||||
type Rep (GenStgStackClosure b) # | |||||
Defined in GHC.Exts.Heap.Closures type Rep (GenStgStackClosure b) = D1 ('MetaData "GenStgStackClosure" "GHC.Exts.Heap.Closures" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (C1 ('MetaCons "GenStgStackClosure" 'PrefixI 'True) (S1 ('MetaSel ('Just "ssc_info") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 StgInfoTable) :*: (S1 ('MetaSel ('Just "ssc_stack_size") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word32) :*: S1 ('MetaSel ('Just "ssc_stack") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [GenStackFrame b])))) |
type StackFrame = GenStackFrame Box #
data GenStackFrame b #
A single stack frame
Constructors
UpdateFrame | |
Fields
| |
CatchFrame | |
Fields
| |
CatchStmFrame | |
Fields
| |
CatchRetryFrame | |
Fields
| |
AtomicallyFrame | |
Fields
| |
UnderflowFrame | |
Fields
| |
StopFrame | |
Fields
| |
RetSmall | |
Fields
| |
RetBig | |
Fields
| |
RetFun | |
Fields
| |
RetBCO | |
Fields
|
Instances
Functor GenStackFrame # | |||||
Defined in GHC.Exts.Heap.Closures Methods fmap :: (a -> b) -> GenStackFrame a -> GenStackFrame b # (<$) :: a -> GenStackFrame b -> GenStackFrame a # | |||||
Foldable GenStackFrame # | |||||
Defined in GHC.Exts.Heap.Closures Methods fold :: Monoid m => GenStackFrame m -> m # foldMap :: Monoid m => (a -> m) -> GenStackFrame a -> m # foldMap' :: Monoid m => (a -> m) -> GenStackFrame a -> m # foldr :: (a -> b -> b) -> b -> GenStackFrame a -> b # foldr' :: (a -> b -> b) -> b -> GenStackFrame a -> b # foldl :: (b -> a -> b) -> b -> GenStackFrame a -> b # foldl' :: (b -> a -> b) -> b -> GenStackFrame a -> b # foldr1 :: (a -> a -> a) -> GenStackFrame a -> a # foldl1 :: (a -> a -> a) -> GenStackFrame a -> a # toList :: GenStackFrame a -> [a] # null :: GenStackFrame a -> Bool # length :: GenStackFrame a -> Int # elem :: Eq a => a -> GenStackFrame a -> Bool # maximum :: Ord a => GenStackFrame a -> a # minimum :: Ord a => GenStackFrame a -> a # sum :: Num a => GenStackFrame a -> a # product :: Num a => GenStackFrame a -> a # | |||||
Traversable GenStackFrame # | |||||
Defined in GHC.Exts.Heap.Closures Methods traverse :: Applicative f => (a -> f b) -> GenStackFrame a -> f (GenStackFrame b) # sequenceA :: Applicative f => GenStackFrame (f a) -> f (GenStackFrame a) # mapM :: Monad m => (a -> m b) -> GenStackFrame a -> m (GenStackFrame b) # sequence :: Monad m => GenStackFrame (m a) -> m (GenStackFrame a) # | |||||
Generic (GenStackFrame b) # | |||||
Defined in GHC.Exts.Heap.Closures Associated Types
Methods from :: GenStackFrame b -> Rep (GenStackFrame b) x # to :: Rep (GenStackFrame b) x -> GenStackFrame b # | |||||
Show b => Show (GenStackFrame b) # | |||||
Defined in GHC.Exts.Heap.Closures Methods showsPrec :: Int -> GenStackFrame b -> ShowS # show :: GenStackFrame b -> String # showList :: [GenStackFrame b] -> ShowS # | |||||
type Rep (GenStackFrame b) # | |||||
Defined in GHC.Exts.Heap.Closures type Rep (GenStackFrame b) = D1 ('MetaData "GenStackFrame" "GHC.Exts.Heap.Closures" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (((C1 ('MetaCons "UpdateFrame" 'PrefixI 'True) (S1 ('MetaSel ('Just "info_tbl") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 StgInfoTable) :*: S1 ('MetaSel ('Just "updatee") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b)) :+: C1 ('MetaCons "CatchFrame" 'PrefixI 'True) (S1 ('MetaSel ('Just "info_tbl") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 StgInfoTable) :*: S1 ('MetaSel ('Just "handler") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b))) :+: (C1 ('MetaCons "CatchStmFrame" 'PrefixI 'True) (S1 ('MetaSel ('Just "info_tbl") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 StgInfoTable) :*: (S1 ('MetaSel ('Just "catchFrameCode") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b) :*: S1 ('MetaSel ('Just "handler") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b))) :+: (C1 ('MetaCons "CatchRetryFrame" 'PrefixI 'True) ((S1 ('MetaSel ('Just "info_tbl") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 StgInfoTable) :*: S1 ('MetaSel ('Just "running_alt_code") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word)) :*: (S1 ('MetaSel ('Just "first_code") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b) :*: S1 ('MetaSel ('Just "alt_code") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b))) :+: C1 ('MetaCons "AtomicallyFrame" 'PrefixI 'True) (S1 ('MetaSel ('Just "info_tbl") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 StgInfoTable) :*: (S1 ('MetaSel ('Just "atomicallyFrameCode") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b) :*: S1 ('MetaSel ('Just "result") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b)))))) :+: ((C1 ('MetaCons "UnderflowFrame" 'PrefixI 'True) (S1 ('MetaSel ('Just "info_tbl") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 StgInfoTable) :*: S1 ('MetaSel ('Just "nextChunk") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (GenStgStackClosure b))) :+: (C1 ('MetaCons "StopFrame" 'PrefixI 'True) (S1 ('MetaSel ('Just "info_tbl") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 StgInfoTable)) :+: C1 ('MetaCons "RetSmall" 'PrefixI 'True) (S1 ('MetaSel ('Just "info_tbl") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 StgInfoTable) :*: S1 ('MetaSel ('Just "stack_payload") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [GenStackField b])))) :+: (C1 ('MetaCons "RetBig" 'PrefixI 'True) (S1 ('MetaSel ('Just "info_tbl") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 StgInfoTable) :*: S1 ('MetaSel ('Just "stack_payload") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [GenStackField b])) :+: (C1 ('MetaCons "RetFun" 'PrefixI 'True) ((S1 ('MetaSel ('Just "info_tbl") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 StgInfoTable) :*: S1 ('MetaSel ('Just "retFunSize") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word)) :*: (S1 ('MetaSel ('Just "retFunFun") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b) :*: S1 ('MetaSel ('Just "retFunPayload") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [GenStackField b]))) :+: C1 ('MetaCons "RetBCO" 'PrefixI 'True) (S1 ('MetaSel ('Just "info_tbl") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 StgInfoTable) :*: (S1 ('MetaSel ('Just "bco") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b) :*: S1 ('MetaSel ('Just "bcoArgs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [GenStackField b]))))))) |
type StackField = GenStackField Box #
data GenStackField b #
Bitmap-encoded payload on the stack
Instances
Functor GenStackField # | |||||
Defined in GHC.Exts.Heap.Closures Methods fmap :: (a -> b) -> GenStackField a -> GenStackField b # (<$) :: a -> GenStackField b -> GenStackField a # | |||||
Foldable GenStackField # | |||||
Defined in GHC.Exts.Heap.Closures Methods fold :: Monoid m => GenStackField m -> m # foldMap :: Monoid m => (a -> m) -> GenStackField a -> m # foldMap' :: Monoid m => (a -> m) -> GenStackField a -> m # foldr :: (a -> b -> b) -> b -> GenStackField a -> b # foldr' :: (a -> b -> b) -> b -> GenStackField a -> b # foldl :: (b -> a -> b) -> b -> GenStackField a -> b # foldl' :: (b -> a -> b) -> b -> GenStackField a -> b # foldr1 :: (a -> a -> a) -> GenStackField a -> a # foldl1 :: (a -> a -> a) -> GenStackField a -> a # toList :: GenStackField a -> [a] # null :: GenStackField a -> Bool # length :: GenStackField a -> Int # elem :: Eq a => a -> GenStackField a -> Bool # maximum :: Ord a => GenStackField a -> a # minimum :: Ord a => GenStackField a -> a # sum :: Num a => GenStackField a -> a # product :: Num a => GenStackField a -> a # | |||||
Traversable GenStackField # | |||||
Defined in GHC.Exts.Heap.Closures Methods traverse :: Applicative f => (a -> f b) -> GenStackField a -> f (GenStackField b) # sequenceA :: Applicative f => GenStackField (f a) -> f (GenStackField a) # mapM :: Monad m => (a -> m b) -> GenStackField a -> m (GenStackField b) # sequence :: Monad m => GenStackField (m a) -> m (GenStackField a) # | |||||
Generic (GenStackField b) # | |||||
Defined in GHC.Exts.Heap.Closures Associated Types
Methods from :: GenStackField b -> Rep (GenStackField b) x # to :: Rep (GenStackField b) x -> GenStackField b # | |||||
Show b => Show (GenStackField b) # | |||||
Defined in GHC.Exts.Heap.Closures Methods showsPrec :: Int -> GenStackField b -> ShowS # show :: GenStackField b -> String # showList :: [GenStackField b] -> ShowS # | |||||
type Rep (GenStackField b) # | |||||
Defined in GHC.Exts.Heap.Closures type Rep (GenStackField b) = D1 ('MetaData "GenStackField" "GHC.Exts.Heap.Closures" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (C1 ('MetaCons "StackWord" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word)) :+: C1 ('MetaCons "StackBox" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b))) |
Boxes
An arbitrary Haskell value in a safe Box. The point is that even
unevaluated thunks can safely be moved around inside the Box, and when
required, e.g. in getBoxedClosureData
, the function knows how far it has
to evaluate the argument.