ghc-heap-9.10.3: Functions for walking GHC's heap

Safe Haskell | None
Language | Haskell2010

GHC.Exts.Heap.Closures

Contents

- Closures
- Stack
- Boxes

Synopsis

- type Closure = GenClosure Box
- data GenClosure b
  - = ConstrClosure {
    - info :: !StgInfoTable
    - ptrArgs :: ![b]
    - dataArgs :: ![Word]
    - pkg :: !String
    - modl :: !String
    - name :: !String
    }
  - | FunClosure {
    - info :: !StgInfoTable
    - ptrArgs :: ![b]
    - dataArgs :: ![Word]
    }
  - | ThunkClosure {
    - info :: !StgInfoTable
    - ptrArgs :: ![b]
    - dataArgs :: ![Word]
    }
  - | SelectorClosure {
    - info :: !StgInfoTable
    - selectee :: !b
    }
  - | PAPClosure {
    - info :: !StgInfoTable
    - arity :: !HalfWord
    - n_args :: !HalfWord
    - fun :: !b
    - payload :: ![b]
    }
  - | APClosure {
    - info :: !StgInfoTable
    - arity :: !HalfWord
    - n_args :: !HalfWord
    - fun :: !b
    - payload :: ![b]
    }
  - | APStackClosure {
    - info :: !StgInfoTable
    - fun :: !b
    - payload :: ![b]
    }
  - | IndClosure {
    - info :: !StgInfoTable
    - indirectee :: !b
    }
  - | BCOClosure {
    - info :: !StgInfoTable
    - instrs :: !b
    - literals :: !b
    - bcoptrs :: !b
    - arity :: !HalfWord
    - size :: !HalfWord
    - bitmap :: ![Word]
    }
  - | BlackholeClosure {
    - info :: !StgInfoTable
    - indirectee :: !b
    }
  - | ArrWordsClosure {
    - info :: !StgInfoTable
    - bytes :: !Word
    - arrWords :: ![Word]
    }
  - | 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 {
    - info :: !StgInfoTable
    - link :: !b
    - blackHole :: !b
    - owner :: !b
    - queue :: !b
    }
  - | 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 {
    - ptipe :: PrimType
    - intVal :: !Int
    }
  - | WordClosure {
    - ptipe :: PrimType
    - wordVal :: !Word
    }
  - | Int64Closure {
    - ptipe :: PrimType
    - int64Val :: !Int64
    }
  - | Word64Closure {
    - ptipe :: PrimType
    - word64Val :: !Word64
    }
  - | AddrClosure {
    - ptipe :: PrimType
    - addrVal :: !(Ptr ())
    }
  - | FloatClosure {
    - ptipe :: PrimType
    - floatVal :: !Float
    }
  - | DoubleClosure {
    - ptipe :: PrimType
    - doubleVal :: !Double
    }
  - | OtherClosure {
    - info :: !StgInfoTable
    - hvalues :: ![b]
    - rawWords :: ![Word]
    }
  - | UnsupportedClosure {
    - info :: !StgInfoTable
    }
  - | UnknownTypeWordSizedPrimitive {
    - wordVal :: !Word
    }
- data PrimType
  - = PInt
  - | PWord
  - | PInt64
  - | PWord64
  - | PAddr
  - | PFloat
  - | PDouble
- data WhatNext
  - = ThreadRunGHC
  - | ThreadInterpret
  - | ThreadKilled
  - | ThreadComplete
  - | WhatNextUnknownValue Word16
- data WhyBlocked
  - = NotBlocked
  - | BlockedOnMVar
  - | BlockedOnMVarRead
  - | BlockedOnBlackHole
  - | BlockedOnRead
  - | BlockedOnWrite
  - | BlockedOnDelay
  - | BlockedOnSTM
  - | BlockedOnDoProc
  - | BlockedOnCCall
  - | BlockedOnCCall_Interruptible
  - | BlockedOnMsgThrowTo
  - | ThreadMigrating
  - | WhyBlockedUnknownValue Word16
- data TsoFlags
  - = TsoLocked
  - | TsoBlockx
  - | TsoInterruptible
  - | TsoStoppedOnBreakpoint
  - | TsoMarked
  - | TsoSqueezed
  - | TsoAllocLimit
  - | TsoFlagsUnknownValue Word32
- 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]
    }
- type StackField = GenStackField Box
- data GenStackField b
  - = StackWord !Word
  - | StackBox !b
- data Box = Box (Any :: Type)
- areBoxesEqual :: Box -> Box -> IO Bool
- asBox :: a -> Box

# Closures

type Closure = GenClosure Box Source #

data GenClosure b Source #

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

Fields

- info :: !StgInfoTable
- ptrArgs :: ![b]

  Pointer arguments

- dataArgs :: ![Word]

  Non-pointer arguments

- pkg :: !String

  Package name

- modl :: !String

  Module name

- name :: !String

  Constructor name

FunClosure | A function

Fields

- info :: !StgInfoTable
- ptrArgs :: ![b]

  Pointer arguments

- dataArgs :: ![Word]

  Non-pointer arguments

ThunkClosure | A thunk, an expression not obviously in head normal form

Fields

- info :: !StgInfoTable
- ptrArgs :: ![b]

  Pointer arguments

- dataArgs :: ![Word]

  Non-pointer arguments

SelectorClosure | A thunk which performs a simple selection operation

Fields

- info :: !StgInfoTable
- selectee :: !b

  Pointer to the object being selected from

PAPClosure | An unsaturated function application

Fields

- info :: !StgInfoTable
- arity :: !HalfWord

  Arity of the partial application

- n_args :: !HalfWord

  Size of the payload in words

- fun :: !b

  Pointer to a `FunClosure`

- payload :: ![b]

  Sequence of already applied arguments

APClosure | A function application

Fields

- info :: !StgInfoTable
- arity :: !HalfWord

  Arity of the partial application

- n_args :: !HalfWord

  Size of the payload in words

- fun :: !b

  Pointer to a `FunClosure`

- payload :: ![b]

  Sequence of already applied arguments

APStackClosure | A suspended thunk evaluation

Fields

- info :: !StgInfoTable
- fun :: !b

  Pointer to a `FunClosure`

- payload :: ![b]

  Sequence of already applied arguments

IndClosure | A pointer to another closure, introduced when a thunk is updated to point at its value

Fields

- info :: !StgInfoTable
- indirectee :: !b

  Target closure

BCOClosure | A byte-code object (BCO) which can be interpreted by GHC's byte-code interpreter (e.g. as used by GHCi)

Fields

- info :: !StgInfoTable
- instrs :: !b

  A pointer to an ArrWords of instructions

- literals :: !b

  A pointer to an ArrWords of literals

- bcoptrs :: !b

  A pointer to an ArrWords of byte code objects

- arity :: !HalfWord

  Arity of the partial application

- size :: !HalfWord

  The size of this BCO in words

- bitmap :: ![Word]

  An StgLargeBitmap describing the pointerhood of its args/free vars

BlackholeClosure | A thunk under evaluation by another thread

Fields

- info :: !StgInfoTable
- indirectee :: !b

  Target closure

ArrWordsClosure | A `ByteArray#`

Fields

- info :: !StgInfoTable
- bytes :: !Word

  Size of array in bytes

- arrWords :: ![Word]

  Array payload

MutArrClosure | A `MutableByteArray#`

Fields

- info :: !StgInfoTable
- mccPtrs :: !Word

  Number of pointers

- mccSize :: !Word

  ?? Closures.h vs ClosureMacros.h

- mccPayload :: ![b]

  Array payload Card table ignored

SmallMutArrClosure | A `SmallMutableArray#` Since: ghc-heap-8.10.1

Fields

- info :: !StgInfoTable
- mccPtrs :: !Word

  Number of pointers

- mccPayload :: ![b]

  Array payload Card table ignored

MVarClosure | An `MVar#`, with a queue of thread state objects blocking on them

Fields

- info :: !StgInfoTable
- queueHead :: !b

  Pointer to head of queue

- queueTail :: !b

  Pointer to tail of queue

- value :: !b

  Pointer to closure

IOPortClosure | An `IOPort#`, with a queue of thread state objects blocking on them

Fields

- info :: !StgInfoTable
- queueHead :: !b

  Pointer to head of queue

- queueTail :: !b

  Pointer to tail of queue

- value :: !b

  Pointer to closure

MutVarClosure | A `MutVar#`

Fields

- info :: !StgInfoTable
- var :: !b

  Pointer to contents

BlockingQueueClosure | An STM blocking queue.

Fields

- info :: !StgInfoTable
- link :: !b

  ?? Here so it looks like an IND

- blackHole :: !b

  The blackhole closure

- owner :: !b

  The owning thread state object

- queue :: !b

  ??

WeakClosure |

Fields

- info :: !StgInfoTable
- cfinalizers :: !b
- key :: !b
- value :: !b

  Pointer to closure

- finalizer :: !b
- weakLink :: !(Maybe b)

  next weak pointer for the capability

TSOClosure | Representation of StgTSO: A Thread State Object. The values for `what_next`, `why_blocked` and `flags` are defined in `Constants.h`.

Fields

- info :: !StgInfoTable
- link :: !b

  ?? Here so it looks like an IND

- global_link :: !b
- tsoStack :: !b

  stackobj from StgTSO

- 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

  non-zero => dirty

- alloc_limit :: !Int64
- tot_stack_size :: !Word32
- prof :: !(Maybe StgTSOProfInfo)

StackClosure | Representation of StgStack: The 'tsoStack ' of a `TSOClosure`.

Fields

- info :: !StgInfoTable
- stack_size :: !Word32

  stack size in *words*

- stack_dirty :: !Word8

  non-zero => dirty

- stack_marking :: !Word8

IntClosure | Primitive Int

Fields

- ptipe :: PrimType
- intVal :: !Int

WordClosure | Primitive Word

Fields

- ptipe :: PrimType
- wordVal :: !Word

Int64Closure | Primitive Int64

Fields

- ptipe :: PrimType
- int64Val :: !Int64

Word64Closure | Primitive Word64

Fields

- ptipe :: PrimType
- word64Val :: !Word64

AddrClosure | Primitive Addr

Fields

- ptipe :: PrimType
- addrVal :: !(Ptr ())

FloatClosure | Primitive Float

Fields

- ptipe :: PrimType
- floatVal :: !Float

DoubleClosure | Primitive Double

Fields

- ptipe :: PrimType
- doubleVal :: !Double

OtherClosure | Another kind of closure

Fields

- info :: !StgInfoTable
- hvalues :: ![b]
- rawWords :: ![Word]

UnsupportedClosure |

Fields

- info :: !StgInfoTable

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#).

Fields

- wordVal :: !Word

#### Instances

Instances details

Functor GenClosure Source # |
Instance details Defined in GHC.Exts.Heap.Closures Methods fmap :: (a -> b) -> GenClosure a -> GenClosure b Source # (<$) :: a -> GenClosure b -> GenClosure a Source #
Foldable GenClosure Source # |

Instance details

Defined in GHC.Exts.Heap.Closures

Methods

fold :: Monoid m => GenClosure m -> m Source #

foldMap :: Monoid m => (a -> m) -> GenClosure a -> m Source #

foldMap' :: Monoid m => (a -> m) -> GenClosure a -> m Source #

foldr :: (a -> b -> b) -> b -> GenClosure a -> b Source #

foldr' :: (a -> b -> b) -> b -> GenClosure a -> b Source #

foldl :: (b -> a -> b) -> b -> GenClosure a -> b Source #

foldl' :: (b -> a -> b) -> b -> GenClosure a -> b Source #

foldr1 :: (a -> a -> a) -> GenClosure a -> a Source #

foldl1 :: (a -> a -> a) -> GenClosure a -> a Source #

toList :: GenClosure a -> [a] Source #

null :: GenClosure a -> Bool Source #

length :: GenClosure a -> Int Source #

elem :: Eq a => a -> GenClosure a -> Bool Source #

maximum :: Ord a => GenClosure a -> a Source #

minimum :: Ord a => GenClosure a -> a Source #

sum :: Num a => GenClosure a -> a Source #

product :: Num a => GenClosure a -> a Source #

Traversable GenClosure Source # |
Instance details Defined in GHC.Exts.Heap.Closures Methods traverse :: Applicative f => (a -> f b) -> GenClosure a -> f (GenClosure b) Source # sequenceA :: Applicative f => GenClosure (f a) -> f (GenClosure a) Source # mapM :: Monad m => (a -> m b) -> GenClosure a -> m (GenClosure b) Source # sequence :: Monad m => GenClosure (m a) -> m (GenClosure a) Source #
Generic (GenClosure b) Source # |

Instance details

Defined in GHC.Exts.Heap.Closures

Associated Types

type Rep (GenClosure b) |

Instance details

Defined in GHC.Exts.Heap.Closures

type Rep (GenClosure b) = D1 ('MetaData "GenClosure" "GHC.Exts.Heap.Closures" "ghc-heap-9.10.3-60eb" 'False) ((((C1 ('MetaCons "ConstrClosure" 'PrefixI 'True) ((S1 ('MetaSel ('Just "info") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 StgInfoTable) :*: (S1 ('MetaSel ('Just "ptrArgs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [b]) :*: S1 ('MetaSel ('Just "dataArgs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Word]))) :*: (S1 ('MetaSel ('Just "pkg") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 String) :*: (S1 ('MetaSel ('Just "modl") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 String) :*: S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 String)))) :+: (C1 ('MetaCons "FunClosure" 'PrefixI 'True) (S1 ('MetaSel ('Just "info") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 StgInfoTable) :*: (S1 ('MetaSel ('Just "ptrArgs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [b]) :*: S1 ('MetaSel ('Just "dataArgs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Word]))) :+: C1 ('MetaCons "ThunkClosure" 'PrefixI 'True) (S1 ('MetaSel ('Just "info") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 StgInfoTable) :*: (S1 ('MetaSel ('Just "ptrArgs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [b]) :*: S1 ('MetaSel ('Just "dataArgs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Word]))))) :+: ((C1 ('MetaCons "SelectorClosure" 'PrefixI 'True) (S1 ('MetaSel ('Just "info") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 StgInfoTable) :*: S1 ('MetaSel ('Just "selectee") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b)) :+: C1 ('MetaCons "PAPClosure" 'PrefixI 'True) ((S1 ('MetaSel ('Just "info") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 StgInfoTable) :*: S1 ('MetaSel ('Just "arity") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 HalfWord)) :*: (S1 ('MetaSel ('Just "n_args") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 HalfWord) :*: (S1 ('MetaSel ('Just "fun") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b) :*: S1 ('MetaSel ('Just "payload") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [b]))))) :+: (C1 ('MetaCons "APClosure" 'PrefixI 'True) ((S1 ('MetaSel ('Just "info") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 StgInfoTable) :*: S1 ('MetaSel ('Just "arity") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 HalfWord)) :*: (S1 ('MetaSel ('Just "n_args") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 HalfWord) :*: (S1 ('MetaSel ('Just "fun") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b) :*: S1 ('MetaSel ('Just "payload") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [b])))) :+: C1 ('MetaCons "APStackClosure" 'PrefixI 'True) (S1 ('MetaSel ('Just "info") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 StgInfoTable) :*: (S1 ('MetaSel ('Just "fun") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b) :*: S1 ('MetaSel ('Just "payload") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [b])))))) :+: (((C1 ('MetaCons "IndClosure" 'PrefixI 'True) (S1 ('MetaSel ('Just "info") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 StgInfoTable) :*: S1 ('MetaSel ('Just "indirectee") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b)) :+: C1 ('MetaCons "BCOClosure" 'PrefixI 'True) ((S1 ('MetaSel ('Just "info") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 StgInfoTable) :*: (S1 ('MetaSel ('Just "instrs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b) :*: S1 ('MetaSel ('Just "literals") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b))) :*: ((S1 ('MetaSel ('Just "bcoptrs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b) :*: S1 ('MetaSel ('Just "arity") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 HalfWord)) :*: (S1 ('MetaSel ('Just "size") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 HalfWord) :*: S1 ('MetaSel ('Just "bitmap") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Word]))))) :+: (C1 ('MetaCons "BlackholeClosure" 'PrefixI 'True) (S1 ('MetaSel ('Just "info") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 StgInfoTable) :*: S1 ('MetaSel ('Just "indirectee") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b)) :+: C1 ('MetaCons "ArrWordsClosure" 'PrefixI 'True) (S1 ('MetaSel ('Just "info") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 StgInfoTable) :*: (S1 ('MetaSel ('Just "bytes") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word) :*: S1 ('MetaSel ('Just "arrWords") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Word]))))) :+: ((C1 ('MetaCons "MutArrClosure" 'PrefixI 'True) ((S1 ('MetaSel ('Just "info") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 StgInfoTable) :*: S1 ('MetaSel ('Just "mccPtrs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word)) :*: (S1 ('MetaSel ('Just "mccSize") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word) :*: S1 ('MetaSel ('Just "mccPayload") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [b]))) :+: C1 ('MetaCons "SmallMutArrClosure" 'PrefixI 'True) (S1 ('MetaSel ('Just "info") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 StgInfoTable) :*: (S1 ('MetaSel ('Just "mccPtrs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word) :*: S1 ('MetaSel ('Just "mccPayload") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [b])))) :+: (C1 ('MetaCons "MVarClosure" 'PrefixI 'True) ((S1 ('MetaSel ('Just "info") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 StgInfoTable) :*: S1 ('MetaSel ('Just "queueHead") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b)) :*: (S1 ('MetaSel ('Just "queueTail") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b) :*: S1 ('MetaSel ('Just "value") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b))) :+: C1 ('MetaCons "IOPortClosure" 'PrefixI 'True) ((S1 ('MetaSel ('Just "info") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 StgInfoTable) :*: S1 ('MetaSel ('Just "queueHead") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b)) :*: (S1 ('MetaSel ('Just "queueTail") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b) :*: S1 ('MetaSel ('Just "value") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b))))))) :+: (((C1 ('MetaCons "MutVarClosure" 'PrefixI 'True) (S1 ('MetaSel ('Just "info") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 StgInfoTable) :*: S1 ('MetaSel ('Just "var") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b)) :+: (C1 ('MetaCons "BlockingQueueClosure" 'PrefixI 'True) ((S1 ('MetaSel ('Just "info") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 StgInfoTable) :*: S1 ('MetaSel ('Just "link") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b)) :*: (S1 ('MetaSel ('Just "blackHole") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b) :*: (S1 ('MetaSel ('Just "owner") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b) :*: S1 ('MetaSel ('Just "queue") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b)))) :+: C1 ('MetaCons "WeakClosure" 'PrefixI 'True) ((S1 ('MetaSel ('Just "info") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 StgInfoTable) :*: (S1 ('MetaSel ('Just "cfinalizers") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b) :*: S1 ('MetaSel ('Just "key") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b))) :*: (S1 ('MetaSel ('Just "value") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b) :*: (S1 ('MetaSel ('Just "finalizer") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b) :*: S1 ('MetaSel ('Just "weakLink") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe b))))))) :+: ((C1 ('MetaCons "TSOClosure" 'PrefixI 'True) ((((S1 ('MetaSel ('Just "info") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 StgInfoTable) :*: S1 ('MetaSel ('Just "link") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b)) :*: (S1 ('MetaSel ('Just "global_link") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b) :*: S1 ('MetaSel ('Just "tsoStack") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b))) :*: ((S1 ('MetaSel ('Just "trec") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b) :*: S1 ('MetaSel ('Just "blocked_exceptions") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b)) :*: (S1 ('MetaSel ('Just "bq") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b) :*: S1 ('MetaSel ('Just "thread_label") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe b))))) :*: (((S1 ('MetaSel ('Just "what_next") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 WhatNext) :*: S1 ('MetaSel ('Just "why_blocked") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 WhyBlocked)) :*: (S1 ('MetaSel ('Just "flags") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [TsoFlags]) :*: S1 ('MetaSel ('Just "threadId") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word64))) :*: ((S1 ('MetaSel ('Just "saved_errno") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word32) :*: S1 ('MetaSel ('Just "tso_dirty") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word32)) :*: (S1 ('MetaSel ('Just "alloc_limit") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int64) :*: (S1 ('MetaSel ('Just "tot_stack_size") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word32) :*: S1 ('MetaSel ('Just "prof") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe StgTSOProfInfo))))))) :+: C1 ('MetaCons "StackClosure" 'PrefixI 'True) ((S1 ('MetaSel ('Just "info") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 StgInfoTable) :*: S1 ('MetaSel ('Just "stack_size") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word32)) :*: (S1 ('MetaSel ('Just "stack_dirty") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word8) :*: S1 ('MetaSel ('Just "stack_marking") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word8)))) :+: (C1 ('MetaCons "IntClosure" 'PrefixI 'True) (S1 ('MetaSel ('Just "ptipe") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PrimType) :*: S1 ('MetaSel ('Just "intVal") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int)) :+: C1 ('MetaCons "WordClosure" 'PrefixI 'True) (S1 ('MetaSel ('Just "ptipe") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PrimType) :*: S1 ('MetaSel ('Just "wordVal") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word))))) :+: (((C1 ('MetaCons "Int64Closure" 'PrefixI 'True) (S1 ('MetaSel ('Just "ptipe") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PrimType) :*: S1 ('MetaSel ('Just "int64Val") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int64)) :+: C1 ('MetaCons "Word64Closure" 'PrefixI 'True) (S1 ('MetaSel ('Just "ptipe") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PrimType) :*: S1 ('MetaSel ('Just "word64Val") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word64))) :+: (C1 ('MetaCons "AddrClosure" 'PrefixI 'True) (S1 ('MetaSel ('Just "ptipe") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PrimType) :*: S1 ('MetaSel ('Just "addrVal") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Ptr ()))) :+: C1 ('MetaCons "FloatClosure" 'PrefixI 'True) (S1 ('MetaSel ('Just "ptipe") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PrimType) :*: S1 ('MetaSel ('Just "floatVal") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Float)))) :+: ((C1 ('MetaCons "DoubleClosure" 'PrefixI 'True) (S1 ('MetaSel ('Just "ptipe") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PrimType) :*: S1 ('MetaSel ('Just "doubleVal") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Double)) :+: C1 ('MetaCons "OtherClosure" 'PrefixI 'True) (S1 ('MetaSel ('Just "info") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 StgInfoTable) :*: (S1 ('MetaSel ('Just "hvalues") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [b]) :*: S1 ('MetaSel ('Just "rawWords") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Word])))) :+: (C1 ('MetaCons "UnsupportedClosure" 'PrefixI 'True) (S1 ('MetaSel ('Just "info") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 StgInfoTable)) :+: C1 ('MetaCons "UnknownTypeWordSizedPrimitive" 'PrefixI 'True) (S1 ('MetaSel ('Just "wordVal") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word)))))))

Methods

from :: GenClosure b -> Rep (GenClosure b) x Source #

to :: Rep (GenClosure b) x -> GenClosure b Source #

Show b => Show (GenClosure b) Source # |
Instance details Defined in GHC.Exts.Heap.Closures Methods showsPrec :: Int -> GenClosure b -> ShowS Source # show :: GenClosure b -> String Source # showList :: [GenClosure b] -> ShowS Source #
type Rep (GenClosure b) Source # |

Instance details

Defined in GHC.Exts.Heap.Closures

type Rep (GenClosure b) = D1 ('MetaData "GenClosure" "GHC.Exts.Heap.Closures" "ghc-heap-9.10.3-60eb" 'False) ((((C1 ('MetaCons "ConstrClosure" 'PrefixI 'True) ((S1 ('MetaSel ('Just "info") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 StgInfoTable) :*: (S1 ('MetaSel ('Just "ptrArgs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [b]) :*: S1 ('MetaSel ('Just "dataArgs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Word]))) :*: (S1 ('MetaSel ('Just "pkg") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 String) :*: (S1 ('MetaSel ('Just "modl") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 String) :*: S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 String)))) :+: (C1 ('MetaCons "FunClosure" 'PrefixI 'True) (S1 ('MetaSel ('Just "info") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 StgInfoTable) :*: (S1 ('MetaSel ('Just "ptrArgs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [b]) :*: S1 ('MetaSel ('Just "dataArgs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Word]))) :+: C1 ('MetaCons "ThunkClosure" 'PrefixI 'True) (S1 ('MetaSel ('Just "info") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 StgInfoTable) :*: (S1 ('MetaSel ('Just "ptrArgs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [b]) :*: S1 ('MetaSel ('Just "dataArgs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Word]))))) :+: ((C1 ('MetaCons "SelectorClosure" 'PrefixI 'True) (S1 ('MetaSel ('Just "info") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 StgInfoTable) :*: S1 ('MetaSel ('Just "selectee") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b)) :+: C1 ('MetaCons "PAPClosure" 'PrefixI 'True) ((S1 ('MetaSel ('Just "info") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 StgInfoTable) :*: S1 ('MetaSel ('Just "arity") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 HalfWord)) :*: (S1 ('MetaSel ('Just "n_args") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 HalfWord) :*: (S1 ('MetaSel ('Just "fun") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b) :*: S1 ('MetaSel ('Just "payload") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [b]))))) :+: (C1 ('MetaCons "APClosure" 'PrefixI 'True) ((S1 ('MetaSel ('Just "info") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 StgInfoTable) :*: S1 ('MetaSel ('Just "arity") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 HalfWord)) :*: (S1 ('MetaSel ('Just "n_args") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 HalfWord) :*: (S1 ('MetaSel ('Just "fun") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b) :*: S1 ('MetaSel ('Just "payload") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [b])))) :+: C1 ('MetaCons "APStackClosure" 'PrefixI 'True) (S1 ('MetaSel ('Just "info") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 StgInfoTable) :*: (S1 ('MetaSel ('Just "fun") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b) :*: S1 ('MetaSel ('Just "payload") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [b])))))) :+: (((C1 ('MetaCons "IndClosure" 'PrefixI 'True) (S1 ('MetaSel ('Just "info") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 StgInfoTable) :*: S1 ('MetaSel ('Just "indirectee") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b)) :+: C1 ('MetaCons "BCOClosure" 'PrefixI 'True) ((S1 ('MetaSel ('Just "info") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 StgInfoTable) :*: (S1 ('MetaSel ('Just "instrs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b) :*: S1 ('MetaSel ('Just "literals") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b))) :*: ((S1 ('MetaSel ('Just "bcoptrs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b) :*: S1 ('MetaSel ('Just "arity") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 HalfWord)) :*: (S1 ('MetaSel ('Just "size") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 HalfWord) :*: S1 ('MetaSel ('Just "bitmap") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Word]))))) :+: (C1 ('MetaCons "BlackholeClosure" 'PrefixI 'True) (S1 ('MetaSel ('Just "info") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 StgInfoTable) :*: S1 ('MetaSel ('Just "indirectee") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b)) :+: C1 ('MetaCons "ArrWordsClosure" 'PrefixI 'True) (S1 ('MetaSel ('Just "info") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 StgInfoTable) :*: (S1 ('MetaSel ('Just "bytes") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word) :*: S1 ('MetaSel ('Just "arrWords") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Word]))))) :+: ((C1 ('MetaCons "MutArrClosure" 'PrefixI 'True) ((S1 ('MetaSel ('Just "info") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 StgInfoTable) :*: S1 ('MetaSel ('Just "mccPtrs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word)) :*: (S1 ('MetaSel ('Just "mccSize") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word) :*: S1 ('MetaSel ('Just "mccPayload") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [b]))) :+: C1 ('MetaCons "SmallMutArrClosure" 'PrefixI 'True) (S1 ('MetaSel ('Just "info") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 StgInfoTable) :*: (S1 ('MetaSel ('Just "mccPtrs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word) :*: S1 ('MetaSel ('Just "mccPayload") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [b])))) :+: (C1 ('MetaCons "MVarClosure" 'PrefixI 'True) ((S1 ('MetaSel ('Just "info") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 StgInfoTable) :*: S1 ('MetaSel ('Just "queueHead") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b)) :*: (S1 ('MetaSel ('Just "queueTail") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b) :*: S1 ('MetaSel ('Just "value") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b))) :+: C1 ('MetaCons "IOPortClosure" 'PrefixI 'True) ((S1 ('MetaSel ('Just "info") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 StgInfoTable) :*: S1 ('MetaSel ('Just "queueHead") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b)) :*: (S1 ('MetaSel ('Just "queueTail") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b) :*: S1 ('MetaSel ('Just "value") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b))))))) :+: (((C1 ('MetaCons "MutVarClosure" 'PrefixI 'True) (S1 ('MetaSel ('Just "info") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 StgInfoTable) :*: S1 ('MetaSel ('Just "var") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b)) :+: (C1 ('MetaCons "BlockingQueueClosure" 'PrefixI 'True) ((S1 ('MetaSel ('Just "info") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 StgInfoTable) :*: S1 ('MetaSel ('Just "link") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b)) :*: (S1 ('MetaSel ('Just "blackHole") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b) :*: (S1 ('MetaSel ('Just "owner") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b) :*: S1 ('MetaSel ('Just "queue") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b)))) :+: C1 ('MetaCons "WeakClosure" 'PrefixI 'True) ((S1 ('MetaSel ('Just "info") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 StgInfoTable) :*: (S1 ('MetaSel ('Just "cfinalizers") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b) :*: S1 ('MetaSel ('Just "key") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b))) :*: (S1 ('MetaSel ('Just "value") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b) :*: (S1 ('MetaSel ('Just "finalizer") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b) :*: S1 ('MetaSel ('Just "weakLink") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe b))))))) :+: ((C1 ('MetaCons "TSOClosure" 'PrefixI 'True) ((((S1 ('MetaSel ('Just "info") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 StgInfoTable) :*: S1 ('MetaSel ('Just "link") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b)) :*: (S1 ('MetaSel ('Just "global_link") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b) :*: S1 ('MetaSel ('Just "tsoStack") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b))) :*: ((S1 ('MetaSel ('Just "trec") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b) :*: S1 ('MetaSel ('Just "blocked_exceptions") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b)) :*: (S1 ('MetaSel ('Just "bq") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 b) :*: S1 ('MetaSel ('Just "thread_label") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe b))))) :*: (((S1 ('MetaSel ('Just "what_next") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 WhatNext) :*: S1 ('MetaSel ('Just "why_blocked") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 WhyBlocked)) :*: (S1 ('MetaSel ('Just "flags") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [TsoFlags]) :*: S1 ('MetaSel ('Just "threadId") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word64))) :*: ((S1 ('MetaSel ('Just "saved_errno") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word32) :*: S1 ('MetaSel ('Just "tso_dirty") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word32)) :*: (S1 ('MetaSel ('Just "alloc_limit") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int64) :*: (S1 ('MetaSel ('Just "tot_stack_size") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word32) :*: S1 ('MetaSel ('Just "prof") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe StgTSOProfInfo))))))) :+: C1 ('MetaCons "StackClosure" 'PrefixI 'True) ((S1 ('MetaSel ('Just "info") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 StgInfoTable) :*: S1 ('MetaSel ('Just "stack_size") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word32)) :*: (S1 ('MetaSel ('Just "stack_dirty") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word8) :*: S1 ('MetaSel ('Just "stack_marking") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word8)))) :+: (C1 ('MetaCons "IntClosure" 'PrefixI 'True) (S1 ('MetaSel ('Just "ptipe") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PrimType) :*: S1 ('MetaSel ('Just "intVal") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int)) :+: C1 ('MetaCons "WordClosure" 'PrefixI 'True) (S1 ('MetaSel ('Just "ptipe") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PrimType) :*: S1 ('MetaSel ('Just "wordVal") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word))))) :+: (((C1 ('MetaCons "Int64Closure" 'PrefixI 'True) (S1 ('MetaSel ('Just "ptipe") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PrimType) :*: S1 ('MetaSel ('Just "int64Val") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int64)) :+: C1 ('MetaCons "Word64Closure" 'PrefixI 'True) (S1 ('MetaSel ('Just "ptipe") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PrimType) :*: S1 ('MetaSel ('Just "word64Val") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word64))) :+: (C1 ('MetaCons "AddrClosure" 'PrefixI 'True) (S1 ('MetaSel ('Just "ptipe") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PrimType) :*: S1 ('MetaSel ('Just "addrVal") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Ptr ()))) :+: C1 ('MetaCons "FloatClosure" 'PrefixI 'True) (S1 ('MetaSel ('Just "ptipe") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PrimType) :*: S1 ('MetaSel ('Just "floatVal") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Float)))) :+: ((C1 ('MetaCons "DoubleClosure" 'PrefixI 'True) (S1 ('MetaSel ('Just "ptipe") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PrimType) :*: S1 ('MetaSel ('Just "doubleVal") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Double)) :+: C1 ('MetaCons "OtherClosure" 'PrefixI 'True) (S1 ('MetaSel ('Just "info") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 StgInfoTable) :*: (S1 ('MetaSel ('Just "hvalues") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [b]) :*: S1 ('MetaSel ('Just "rawWords") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Word])))) :+: (C1 ('MetaCons "UnsupportedClosure" 'PrefixI 'True) (S1 ('MetaSel ('Just "info") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 StgInfoTable)) :+: C1 ('MetaCons "UnknownTypeWordSizedPrimitive" 'PrefixI 'True) (S1 ('MetaSel ('Just "wordVal") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word)))))))

data PrimType Source #

Constructors

PInt |
PWord |
PInt64 |
PWord64 |
PAddr |
PFloat |
PDouble |

#### Instances

Instances details

Generic PrimType Source # |

Instance details

Defined in GHC.Exts.Heap.Closures

Associated Types

type Rep PrimType |

Instance details

Defined in GHC.Exts.Heap.Closures

type Rep PrimType = D1 ('MetaData "PrimType" "GHC.Exts.Heap.Closures" "ghc-heap-9.10.3-60eb" '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))))

Methods

from :: PrimType -> Rep PrimType x Source #

to :: Rep PrimType x -> PrimType Source #

Show PrimType Source # |
Instance details Defined in GHC.Exts.Heap.Closures Methods showsPrec :: Int -> PrimType -> ShowS Source # show :: PrimType -> String Source # showList :: [PrimType] -> ShowS Source #
Eq PrimType Source # |
Instance details Defined in GHC.Exts.Heap.Closures Methods (==) :: PrimType -> PrimType -> Bool Source # (/=) :: PrimType -> PrimType -> Bool Source #
Ord PrimType Source # |
Instance details Defined in GHC.Exts.Heap.Closures Methods compare :: PrimType -> PrimType -> Ordering Source # (<) :: PrimType -> PrimType -> Bool Source # (<=) :: PrimType -> PrimType -> Bool Source # (>) :: PrimType -> PrimType -> Bool Source # (>=) :: PrimType -> PrimType -> Bool Source # max :: PrimType -> PrimType -> PrimType Source # min :: PrimType -> PrimType -> PrimType Source #
type Rep PrimType Source # |

Instance details

Defined in GHC.Exts.Heap.Closures

type Rep PrimType = D1 ('MetaData "PrimType" "GHC.Exts.Heap.Closures" "ghc-heap-9.10.3-60eb" '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))))

data WhatNext Source #

Constructors

ThreadRunGHC |
ThreadInterpret |
ThreadKilled |
ThreadComplete |
WhatNextUnknownValue Word16 | Please report this as a bug

#### Instances

Instances details

Generic WhatNext Source # |

Instance details

Defined in GHC.Exts.Heap.Closures

Associated Types

type Rep WhatNext |

Instance details

Defined in GHC.Exts.Heap.Closures

type Rep WhatNext = D1 ('MetaData "WhatNext" "GHC.Exts.Heap.Closures" "ghc-heap-9.10.3-60eb" '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)))))

Methods

from :: WhatNext -> Rep WhatNext x Source #

to :: Rep WhatNext x -> WhatNext Source #

Show WhatNext Source # |
Instance details Defined in GHC.Exts.Heap.Closures Methods showsPrec :: Int -> WhatNext -> ShowS Source # show :: WhatNext -> String Source # showList :: [WhatNext] -> ShowS Source #
Eq WhatNext Source # |
Instance details Defined in GHC.Exts.Heap.Closures Methods (==) :: WhatNext -> WhatNext -> Bool Source # (/=) :: WhatNext -> WhatNext -> Bool Source #
Ord WhatNext Source # |
Instance details Defined in GHC.Exts.Heap.Closures Methods compare :: WhatNext -> WhatNext -> Ordering Source # (<) :: WhatNext -> WhatNext -> Bool Source # (<=) :: WhatNext -> WhatNext -> Bool Source # (>) :: WhatNext -> WhatNext -> Bool Source # (>=) :: WhatNext -> WhatNext -> Bool Source # max :: WhatNext -> WhatNext -> WhatNext Source # min :: WhatNext -> WhatNext -> WhatNext Source #
type Rep WhatNext Source # |

Instance details

Defined in GHC.Exts.Heap.Closures

type Rep WhatNext = D1 ('MetaData "WhatNext" "GHC.Exts.Heap.Closures" "ghc-heap-9.10.3-60eb" '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 Source #

Constructors

NotBlocked |
BlockedOnMVar |
BlockedOnMVarRead |
BlockedOnBlackHole |
BlockedOnRead |
BlockedOnWrite |
BlockedOnDelay |
BlockedOnSTM |
BlockedOnDoProc |
BlockedOnCCall |
BlockedOnCCall_Interruptible |
BlockedOnMsgThrowTo |
ThreadMigrating |
WhyBlockedUnknownValue Word16 | Please report this as a bug

#### Instances

Instances details

Generic WhyBlocked Source # |

Instance details

Defined in GHC.Exts.Heap.Closures

Associated Types

type Rep WhyBlocked |

Instance details

Defined in GHC.Exts.Heap.Closures

type Rep WhyBlocked = D1 ('MetaData "WhyBlocked" "GHC.Exts.Heap.Closures" "ghc-heap-9.10.3-60eb" '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))))))

Methods

from :: WhyBlocked -> Rep WhyBlocked x Source #

to :: Rep WhyBlocked x -> WhyBlocked Source #

Show WhyBlocked Source # |
Instance details Defined in GHC.Exts.Heap.Closures Methods showsPrec :: Int -> WhyBlocked -> ShowS Source # show :: WhyBlocked -> String Source # showList :: [WhyBlocked] -> ShowS Source #
Eq WhyBlocked Source # |
Instance details Defined in GHC.Exts.Heap.Closures Methods (==) :: WhyBlocked -> WhyBlocked -> Bool Source # (/=) :: WhyBlocked -> WhyBlocked -> Bool Source #
Ord WhyBlocked Source # |

Instance details

Defined in GHC.Exts.Heap.Closures

Methods

compare :: WhyBlocked -> WhyBlocked -> Ordering Source #

(<) :: WhyBlocked -> WhyBlocked -> Bool Source #

(<=) :: WhyBlocked -> WhyBlocked -> Bool Source #

(>) :: WhyBlocked -> WhyBlocked -> Bool Source #

(>=) :: WhyBlocked -> WhyBlocked -> Bool Source #

max :: WhyBlocked -> WhyBlocked -> WhyBlocked Source #

min :: WhyBlocked -> WhyBlocked -> WhyBlocked Source #

type Rep WhyBlocked Source # |

Instance details

Defined in GHC.Exts.Heap.Closures

type Rep WhyBlocked = D1 ('MetaData "WhyBlocked" "GHC.Exts.Heap.Closures" "ghc-heap-9.10.3-60eb" '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))))))

data TsoFlags Source #

Constructors

TsoLocked |
TsoBlockx |
TsoInterruptible |
TsoStoppedOnBreakpoint |
TsoMarked |
TsoSqueezed |
TsoAllocLimit |
TsoFlagsUnknownValue Word32 | Please report this as a bug

#### Instances

Instances details

Generic TsoFlags Source # |

Instance details

Defined in GHC.Exts.Heap.Closures

Associated Types

type Rep TsoFlags |

Instance details

Defined in GHC.Exts.Heap.Closures

type Rep TsoFlags = D1 ('MetaData "TsoFlags" "GHC.Exts.Heap.Closures" "ghc-heap-9.10.3-60eb" '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)))))

Methods

from :: TsoFlags -> Rep TsoFlags x Source #

to :: Rep TsoFlags x -> TsoFlags Source #

Show TsoFlags Source # |
Instance details Defined in GHC.Exts.Heap.Closures Methods showsPrec :: Int -> TsoFlags -> ShowS Source # show :: TsoFlags -> String Source # showList :: [TsoFlags] -> ShowS Source #
Eq TsoFlags Source # |
Instance details Defined in GHC.Exts.Heap.Closures Methods (==) :: TsoFlags -> TsoFlags -> Bool Source # (/=) :: TsoFlags -> TsoFlags -> Bool Source #
Ord TsoFlags Source # |
Instance details Defined in GHC.Exts.Heap.Closures Methods compare :: TsoFlags -> TsoFlags -> Ordering Source # (<) :: TsoFlags -> TsoFlags -> Bool Source # (<=) :: TsoFlags -> TsoFlags -> Bool Source # (>) :: TsoFlags -> TsoFlags -> Bool Source # (>=) :: TsoFlags -> TsoFlags -> Bool Source # max :: TsoFlags -> TsoFlags -> TsoFlags Source # min :: TsoFlags -> TsoFlags -> TsoFlags Source #
type Rep TsoFlags Source # |

Instance details

Defined in GHC.Exts.Heap.Closures

type Rep TsoFlags = D1 ('MetaData "TsoFlags" "GHC.Exts.Heap.Closures" "ghc-heap-9.10.3-60eb" '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] Source #

For generic code, this function returns all referenced closures.

closureSize :: Box -> Int Source #

Get the size of the top-level closure in words. Includes header and payload. Does not follow pointers.

Since: ghc-heap-8.10.1

# Stack

type StgStackClosure = GenStgStackClosure Box Source #

data GenStgStackClosure b Source #

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

- ssc_info :: !StgInfoTable
- ssc_stack_size :: !Word32

  stack size in *words*

- ssc_stack :: ![GenStackFrame b]

#### Instances

Instances details

Functor GenStgStackClosure Source # |
Instance details Defined in GHC.Exts.Heap.Closures Methods fmap :: (a -> b) -> GenStgStackClosure a -> GenStgStackClosure b Source # (<$) :: a -> GenStgStackClosure b -> GenStgStackClosure a Source #
Foldable GenStgStackClosure Source # |

Instance details

Defined in GHC.Exts.Heap.Closures

Methods

fold :: Monoid m => GenStgStackClosure m -> m Source #

foldMap :: Monoid m => (a -> m) -> GenStgStackClosure a -> m Source #

foldMap' :: Monoid m => (a -> m) -> GenStgStackClosure a -> m Source #

foldr :: (a -> b -> b) -> b -> GenStgStackClosure a -> b Source #

foldr' :: (a -> b -> b) -> b -> GenStgStackClosure a -> b Source #

foldl :: (b -> a -> b) -> b -> GenStgStackClosure a -> b Source #

foldl' :: (b -> a -> b) -> b -> GenStgStackClosure a -> b Source #

foldr1 :: (a -> a -> a) -> GenStgStackClosure a -> a Source #

foldl1 :: (a -> a -> a) -> GenStgStackClosure a -> a Source #

toList :: GenStgStackClosure a -> [a] Source #

null :: GenStgStackClosure a -> Bool Source #

length :: GenStgStackClosure a -> Int Source #

elem :: Eq a => a -> GenStgStackClosure a -> Bool Source #

maximum :: Ord a => GenStgStackClosure a -> a Source #

minimum :: Ord a => GenStgStackClosure a -> a Source #

sum :: Num a => GenStgStackClosure a -> a Source #

product :: Num a => GenStgStackClosure a -> a Source #

Traversable GenStgStackClosure Source # |

Instance details

Defined in GHC.Exts.Heap.Closures

Methods

traverse :: Applicative f => (a -> f b) -> GenStgStackClosure a -> f (GenStgStackClosure b) Source #

sequenceA :: Applicative f => GenStgStackClosure (f a) -> f (GenStgStackClosure a) Source #

mapM :: Monad m => (a -> m b) -> GenStgStackClosure a -> m (GenStgStackClosure b) Source #

sequence :: Monad m => GenStgStackClosure (m a) -> m (GenStgStackClosure a) Source #

Generic (GenStgStackClosure b) Source # |

Instance details

Defined in GHC.Exts.Heap.Closures

Associated Types

type Rep (GenStgStackClosure b) |

Instance details

Defined in GHC.Exts.Heap.Closures

type Rep (GenStgStackClosure b) = D1 ('MetaData "GenStgStackClosure" "GHC.Exts.Heap.Closures" "ghc-heap-9.10.3-60eb" '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]))))

Methods

from :: GenStgStackClosure b -> Rep (GenStgStackClosure b) x Source #

to :: Rep (GenStgStackClosure b) x -> GenStgStackClosure b Source #

Show b => Show (GenStgStackClosure b) Source # |
Instance details Defined in GHC.Exts.Heap.Closures Methods showsPrec :: Int -> GenStgStackClosure b -> ShowS Source # show :: GenStgStackClosure b -> String Source # showList :: [GenStgStackClosure b] -> ShowS Source #
type Rep (GenStgStackClosure b) Source # |

Instance details

Defined in GHC.Exts.Heap.Closures

type Rep (GenStgStackClosure b) = D1 ('MetaData "GenStgStackClosure" "GHC.Exts.Heap.Closures" "ghc-heap-9.10.3-60eb" '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 Source #

data GenStackFrame b Source #

A single stack frame

Constructors

UpdateFrame |

Fields

- info_tbl :: !StgInfoTable
- updatee :: !b

CatchFrame |

Fields

- info_tbl :: !StgInfoTable
- handler :: !b

CatchStmFrame |

Fields

- info_tbl :: !StgInfoTable
- catchFrameCode :: !b
- handler :: !b

CatchRetryFrame |

Fields

- info_tbl :: !StgInfoTable
- running_alt_code :: !Word
- first_code :: !b
- alt_code :: !b

AtomicallyFrame |

Fields

- info_tbl :: !StgInfoTable
- atomicallyFrameCode :: !b
- result :: !b

UnderflowFrame |

Fields

- info_tbl :: !StgInfoTable
- nextChunk :: !(GenStgStackClosure b)

StopFrame |

Fields

- info_tbl :: !StgInfoTable

RetSmall |

Fields

- info_tbl :: !StgInfoTable
- stack_payload :: ![GenStackField b]

RetBig |

Fields

- info_tbl :: !StgInfoTable
- stack_payload :: ![GenStackField b]

RetFun |

Fields

- info_tbl :: !StgInfoTable
- retFunSize :: !Word
- retFunFun :: !b
- retFunPayload :: ![GenStackField b]

RetBCO |

Fields

- info_tbl :: !StgInfoTable
- bco :: !b

  always a BCOClosure

- bcoArgs :: ![GenStackField b]

#### Instances

Instances details

Functor GenStackFrame Source # |
Instance details Defined in GHC.Exts.Heap.Closures Methods fmap :: (a -> b) -> GenStackFrame a -> GenStackFrame b Source # (<$) :: a -> GenStackFrame b -> GenStackFrame a Source #
Foldable GenStackFrame Source # |

Instance details

Defined in GHC.Exts.Heap.Closures

Methods

fold :: Monoid m => GenStackFrame m -> m Source #

foldMap :: Monoid m => (a -> m) -> GenStackFrame a -> m Source #

foldMap' :: Monoid m => (a -> m) -> GenStackFrame a -> m Source #

foldr :: (a -> b -> b) -> b -> GenStackFrame a -> b Source #

foldr' :: (a -> b -> b) -> b -> GenStackFrame a -> b Source #

foldl :: (b -> a -> b) -> b -> GenStackFrame a -> b Source #

foldl' :: (b -> a -> b) -> b -> GenStackFrame a -> b Source #

foldr1 :: (a -> a -> a) -> GenStackFrame a -> a Source #

foldl1 :: (a -> a -> a) -> GenStackFrame a -> a Source #

toList :: GenStackFrame a -> [a] Source #

null :: GenStackFrame a -> Bool Source #

length :: GenStackFrame a -> Int Source #

elem :: Eq a => a -> GenStackFrame a -> Bool Source #

maximum :: Ord a => GenStackFrame a -> a Source #

minimum :: Ord a => GenStackFrame a -> a Source #

sum :: Num a => GenStackFrame a -> a Source #

product :: Num a => GenStackFrame a -> a Source #

Traversable GenStackFrame Source # |
Instance details Defined in GHC.Exts.Heap.Closures Methods traverse :: Applicative f => (a -> f b) -> GenStackFrame a -> f (GenStackFrame b) Source # sequenceA :: Applicative f => GenStackFrame (f a) -> f (GenStackFrame a) Source # mapM :: Monad m => (a -> m b) -> GenStackFrame a -> m (GenStackFrame b) Source # sequence :: Monad m => GenStackFrame (m a) -> m (GenStackFrame a) Source #
Generic (GenStackFrame b) Source # |

Instance details

Defined in GHC.Exts.Heap.Closures

Associated Types

type Rep (GenStackFrame b) |

Instance details

Defined in GHC.Exts.Heap.Closures

type Rep (GenStackFrame b) = D1 ('MetaData "GenStackFrame" "GHC.Exts.Heap.Closures" "ghc-heap-9.10.3-60eb" '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])))))))

Methods

from :: GenStackFrame b -> Rep (GenStackFrame b) x Source #

to :: Rep (GenStackFrame b) x -> GenStackFrame b Source #

Show b => Show (GenStackFrame b) Source # |
Instance details Defined in GHC.Exts.Heap.Closures Methods showsPrec :: Int -> GenStackFrame b -> ShowS Source # show :: GenStackFrame b -> String Source # showList :: [GenStackFrame b] -> ShowS Source #
type Rep (GenStackFrame b) Source # |

Instance details

Defined in GHC.Exts.Heap.Closures

type Rep (GenStackFrame b) = D1 ('MetaData "GenStackFrame" "GHC.Exts.Heap.Closures" "ghc-heap-9.10.3-60eb" '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 Source #

data GenStackField b Source #

Bitmap-encoded payload on the stack

Constructors

StackWord !Word | A non-pointer field
StackBox !b | A pointer field

#### Instances

Instances details

Functor GenStackField Source # |
Instance details Defined in GHC.Exts.Heap.Closures Methods fmap :: (a -> b) -> GenStackField a -> GenStackField b Source # (<$) :: a -> GenStackField b -> GenStackField a Source #
Foldable GenStackField Source # |

Instance details

Defined in GHC.Exts.Heap.Closures

Methods

fold :: Monoid m => GenStackField m -> m Source #

foldMap :: Monoid m => (a -> m) -> GenStackField a -> m Source #

foldMap' :: Monoid m => (a -> m) -> GenStackField a -> m Source #

foldr :: (a -> b -> b) -> b -> GenStackField a -> b Source #

foldr' :: (a -> b -> b) -> b -> GenStackField a -> b Source #

foldl :: (b -> a -> b) -> b -> GenStackField a -> b Source #

foldl' :: (b -> a -> b) -> b -> GenStackField a -> b Source #

foldr1 :: (a -> a -> a) -> GenStackField a -> a Source #

foldl1 :: (a -> a -> a) -> GenStackField a -> a Source #

toList :: GenStackField a -> [a] Source #

null :: GenStackField a -> Bool Source #

length :: GenStackField a -> Int Source #

elem :: Eq a => a -> GenStackField a -> Bool Source #

maximum :: Ord a => GenStackField a -> a Source #

minimum :: Ord a => GenStackField a -> a Source #

sum :: Num a => GenStackField a -> a Source #

product :: Num a => GenStackField a -> a Source #

Traversable GenStackField Source # |
Instance details Defined in GHC.Exts.Heap.Closures Methods traverse :: Applicative f => (a -> f b) -> GenStackField a -> f (GenStackField b) Source # sequenceA :: Applicative f => GenStackField (f a) -> f (GenStackField a) Source # mapM :: Monad m => (a -> m b) -> GenStackField a -> m (GenStackField b) Source # sequence :: Monad m => GenStackField (m a) -> m (GenStackField a) Source #
Generic (GenStackField b) Source # |

Instance details

Defined in GHC.Exts.Heap.Closures

Associated Types

type Rep (GenStackField b) |

Instance details

Defined in GHC.Exts.Heap.Closures

type Rep (GenStackField b) = D1 ('MetaData "GenStackField" "GHC.Exts.Heap.Closures" "ghc-heap-9.10.3-60eb" '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)))

Methods

from :: GenStackField b -> Rep (GenStackField b) x Source #

to :: Rep (GenStackField b) x -> GenStackField b Source #

Show b => Show (GenStackField b) Source # |
Instance details Defined in GHC.Exts.Heap.Closures Methods showsPrec :: Int -> GenStackField b -> ShowS Source # show :: GenStackField b -> String Source # showList :: [GenStackField b] -> ShowS Source #
type Rep (GenStackField b) Source # |

Instance details

Defined in GHC.Exts.Heap.Closures

type Rep (GenStackField b) = D1 ('MetaData "GenStackField" "GHC.Exts.Heap.Closures" "ghc-heap-9.10.3-60eb" '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

data Box Source #

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.

Constructors

Box (Any :: Type) |

#### Instances

Instances details

Show Box Source # |
Instance details Defined in GHC.Exts.Heap.Closures Methods showsPrec :: Int -> Box -> ShowS Source # show :: Box -> String Source # showList :: [Box] -> ShowS Source #

areBoxesEqual :: Box -> Box -> IO Bool Source #

Boxes can be compared, but this is not pure, as different heap objects can, after garbage collection, become the same object.

asBox :: a -> Box Source #

This takes an arbitrary value and puts it into a box. Note that calls like

    asBox (head list)

will put the thunk "head list" into the box, not the element at the head of the list. For that, use careful case expressions:

    case list of x:_ -> asBox x