ghc-lib-parser-9.14.1.20251220: The GHC API, decoupled from GHC versions

Copyright | (c) 2012 Joachim Breitner
License | BSD3
Maintainer | Joachim Breitner <mail@joachim-breitner.de>
Safe Haskell | Ignore
Language | GHC2021

GHC.Exts.Heap

Contents

- Closure types
- Info Table types
- Cost Centre (profiling) types
- Closure inspection
- Boxes

Description

With this module, you can investigate the heap representation of Haskell values, i.e. to investigate sharing and lazy evaluation.

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
    }
  - | 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 ClosureType
  - = INVALID_OBJECT
  - | CONSTR
  - | CONSTR_1_0
  - | CONSTR_0_1
  - | CONSTR_2_0
  - | CONSTR_1_1
  - | CONSTR_0_2
  - | CONSTR_NOCAF
  - | FUN
  - | FUN_1_0
  - | FUN_0_1
  - | FUN_2_0
  - | FUN_1_1
  - | FUN_0_2
  - | FUN_STATIC
  - | THUNK
  - | THUNK_1_0
  - | THUNK_0_1
  - | THUNK_2_0
  - | THUNK_1_1
  - | THUNK_0_2
  - | THUNK_STATIC
  - | THUNK_SELECTOR
  - | BCO
  - | AP
  - | PAP
  - | AP_STACK
  - | IND
  - | IND_STATIC
  - | RET_BCO
  - | RET_SMALL
  - | RET_BIG
  - | RET_FUN
  - | UPDATE_FRAME
  - | CATCH_FRAME
  - | UNDERFLOW_FRAME
  - | STOP_FRAME
  - | BLOCKING_QUEUE
  - | BLACKHOLE
  - | MVAR_CLEAN
  - | MVAR_DIRTY
  - | TVAR
  - | ARR_WORDS
  - | MUT_ARR_PTRS_CLEAN
  - | MUT_ARR_PTRS_DIRTY
  - | MUT_ARR_PTRS_FROZEN_DIRTY
  - | MUT_ARR_PTRS_FROZEN_CLEAN
  - | MUT_VAR_CLEAN
  - | MUT_VAR_DIRTY
  - | WEAK
  - | PRIM
  - | MUT_PRIM
  - | TSO
  - | STACK
  - | TREC_CHUNK
  - | ATOMICALLY_FRAME
  - | CATCH_RETRY_FRAME
  - | CATCH_STM_FRAME
  - | WHITEHOLE
  - | SMALL_MUT_ARR_PTRS_CLEAN
  - | SMALL_MUT_ARR_PTRS_DIRTY
  - | SMALL_MUT_ARR_PTRS_FROZEN_DIRTY
  - | SMALL_MUT_ARR_PTRS_FROZEN_CLEAN
  - | COMPACT_NFDATA
  - | CONTINUATION
  - | N_CLOSURE_TYPES
- 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
  - | TsoStopNextBreakpoint
  - | TsoStopAfterReturn
  - | TsoFlagsUnknownValue Word32
- class HasHeapRep (a :: TYPE rep) where
  - getClosureData :: a -> IO Closure
- getClosureInfoTbl :: HasCallStack => GenClosure b -> StgInfoTable
- getClosureInfoTbl_maybe :: GenClosure b -> Maybe StgInfoTable
- getClosurePtrArgs :: HasCallStack => GenClosure b -> [b]
- getClosurePtrArgs_maybe :: GenClosure b -> Maybe [b]
- getClosureDataFromHeapRep :: ByteArray# -> Ptr StgInfoTable -> [b] -> IO (GenClosure b)
- getClosureDataFromHeapRepPrim :: IO (String, String, String) -> (Ptr a -> IO (Maybe CostCentreStack)) -> StgInfoTable -> ByteArray# -> [b] -> IO (GenClosure b)
- data StgInfoTable = StgInfoTable {
  - entry :: Maybe EntryFunPtr
  - ptrs :: HalfWord
  - nptrs :: HalfWord
  - tipe :: ClosureType
  - srtlen :: HalfWord
  - code :: Maybe ItblCodes
  }
- type EntryFunPtr = FunPtr (Ptr () -> IO (Ptr ()))
- data HalfWord
- type ItblCodes = Either [Word8] [Word32]
- itblSize :: Int
- peekItbl :: Ptr StgInfoTable -> IO StgInfoTable
- pokeItbl :: Ptr StgInfoTable -> StgInfoTable -> IO ()
- newtype StgTSOProfInfo = StgTSOProfInfo {
  - cccs :: Maybe CostCentreStack
  }
- data IndexTable = IndexTable {
  - it_cc :: CostCentre
  - it_ccs :: Maybe CostCentreStack
  - it_next :: Maybe IndexTable
  - it_back_edge :: Bool
  }
- data CostCentre = CostCentre {
  - cc_ccID :: Int
  - cc_label :: String
  - cc_module :: String
  - cc_srcloc :: Maybe String
  - cc_mem_alloc :: Word64
  - cc_time_ticks :: Word
  - cc_is_caf :: Bool
  - cc_link :: Maybe CostCentre
  }
- data CostCentreStack = CostCentreStack {
  - ccs_ccsID :: Int
  - ccs_cc :: CostCentre
  - ccs_prevStack :: Maybe CostCentreStack
  - ccs_indexTable :: Maybe IndexTable
  - ccs_root :: Maybe CostCentreStack
  - ccs_depth :: Word
  - ccs_scc_count :: Word64
  - ccs_selected :: Word
  - ccs_time_ticks :: Word
  - ccs_mem_alloc :: Word64
  - ccs_inherited_alloc :: Word64
  - ccs_inherited_ticks :: Word
  }
- getBoxedClosureData :: Box -> IO Closure
- allClosures :: GenClosure b -> [b]
- data Box = Box (Any :: Type)
- asBox :: a -> Box
- areBoxesEqual :: Box -> Box -> IO Bool

# Closure types

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
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: 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
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 # |
Instance details Defined in GHC.Internal.Heap.Closures Methods fmap :: (a -> b) -> GenClosure a -> GenClosure b # (<$) :: a -> GenClosure b -> GenClosure a #
Foldable GenClosure # |
Instance details Defined in GHC.Internal.Heap.Closures Methods fold :: Monoid m => GenClosure m -> m # foldMap :: Monoid m => (a -> m) -> GenClosure a -> m # foldMap' :: Monoid m => (a -> m) -> GenClosure a -> m # foldr :: (a -> b -> b) -> b -> GenClosure a -> b # foldr' :: (a -> b -> b) -> b -> GenClosure a -> b # foldl :: (b -> a -> b) -> b -> GenClosure a -> b # foldl' :: (b -> a -> b) -> b -> GenClosure a -> b # foldr1 :: (a -> a -> a) -> GenClosure a -> a # foldl1 :: (a -> a -> a) -> GenClosure a -> a # toList :: GenClosure a -> [a] # null :: GenClosure a -> Bool # length :: GenClosure a -> Int # elem :: Eq a => a -> GenClosure a -> Bool # maximum :: Ord a => GenClosure a -> a # minimum :: Ord a => GenClosure a -> a # sum :: Num a => GenClosure a -> a # product :: Num a => GenClosure a -> a #
Traversable GenClosure # |
Instance details Defined in GHC.Internal.Heap.Closures Methods traverse :: Applicative f => (a -> f b) -> GenClosure a -> f (GenClosure b) # sequenceA :: Applicative f => GenClosure (f a) -> f (GenClosure a) # mapM :: Monad m => (a -> m b) -> GenClosure a -> m (GenClosure b) # sequence :: Monad m => GenClosure (m a) -> m (GenClosure a) #
Binary a => Binary (GenClosure a) # |
Instance details Defined in GHCi.Message Methods put :: GenClosure a -> Put # get :: Get (GenClosure a) # putList :: [GenClosure a] -> Put #
Generic (GenClosure b) # |
Instance details Defined in GHC.Internal.Heap.Closures Associated Types
type Rep (GenClosure b) |
Instance details Defined in GHC.Internal.Heap.Closures type Rep (GenClosure b) = D1 ('MetaData "GenClosure" "GHC.Internal.Heap.Closures" "ghc-lib-parser-9.14.1.20251220-PtFrlL5ZJN3Qo3Axa3c6X" '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 "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 # to :: Rep (GenClosure b) x -> GenClosure b #
Show b => Show (GenClosure b) # |
Instance details Defined in GHC.Internal.Heap.Closures Methods showsPrec :: Int -> GenClosure b -> ShowS # show :: GenClosure b -> String # showList :: [GenClosure b] -> ShowS #
type Rep (GenClosure b) # |
Instance details Defined in GHC.Internal.Heap.Closures type Rep (GenClosure b) = D1 ('MetaData "GenClosure" "GHC.Internal.Heap.Closures" "ghc-lib-parser-9.14.1.20251220-PtFrlL5ZJN3Qo3Axa3c6X" '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 "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 ClosureType #

Enum representing closure types This is a mirror of: `rtsincludertsstorageClosureTypes.h`

Since: ghc-internal-0.1.0.0

Constructors

INVALID_OBJECT |
CONSTR |
CONSTR_1_0 |
CONSTR_0_1 |
CONSTR_2_0 |
CONSTR_1_1 |
CONSTR_0_2 |
CONSTR_NOCAF |
FUN |
FUN_1_0 |
FUN_0_1 |
FUN_2_0 |
FUN_1_1 |
FUN_0_2 |
FUN_STATIC |
THUNK |
THUNK_1_0 |
THUNK_0_1 |
THUNK_2_0 |
THUNK_1_1 |
THUNK_0_2 |
THUNK_STATIC |
THUNK_SELECTOR |
BCO |
AP |
PAP |
AP_STACK |
IND |
IND_STATIC |
RET_BCO |
RET_SMALL |
RET_BIG |
RET_FUN |
UPDATE_FRAME |
CATCH_FRAME |
UNDERFLOW_FRAME |
STOP_FRAME |
BLOCKING_QUEUE |
BLACKHOLE |
MVAR_CLEAN |
MVAR_DIRTY |
TVAR |
ARR_WORDS |
MUT_ARR_PTRS_CLEAN |
MUT_ARR_PTRS_DIRTY |
MUT_ARR_PTRS_FROZEN_DIRTY |
MUT_ARR_PTRS_FROZEN_CLEAN |
MUT_VAR_CLEAN |
MUT_VAR_DIRTY |
WEAK |
PRIM |
MUT_PRIM |
TSO |
STACK |
TREC_CHUNK |
ATOMICALLY_FRAME |
CATCH_RETRY_FRAME |
CATCH_STM_FRAME |
WHITEHOLE |
SMALL_MUT_ARR_PTRS_CLEAN |
SMALL_MUT_ARR_PTRS_DIRTY |
SMALL_MUT_ARR_PTRS_FROZEN_DIRTY |
SMALL_MUT_ARR_PTRS_FROZEN_CLEAN |
COMPACT_NFDATA |
CONTINUATION |
N_CLOSURE_TYPES |

#### Instances

Instances details

Binary ClosureType # |
Instance details Defined in GHCi.Message Methods put :: ClosureType -> Put # get :: Get ClosureType # putList :: [ClosureType] -> Put #
Enum ClosureType |
Instance details Defined in GHC.Internal.ClosureTypes Methods succ :: ClosureType -> ClosureType # pred :: ClosureType -> ClosureType # toEnum :: Int -> ClosureType # fromEnum :: ClosureType -> Int # enumFrom :: ClosureType -> [ClosureType] # enumFromThen :: ClosureType -> ClosureType -> [ClosureType] # enumFromTo :: ClosureType -> ClosureType -> [ClosureType] # enumFromThenTo :: ClosureType -> ClosureType -> ClosureType -> [ClosureType] #
Generic ClosureType |
Instance details Defined in GHC.Internal.ClosureTypes Associated Types
type Rep ClosureType |
Instance details Defined in GHC.Internal.ClosureTypes type Rep ClosureType = D1 ('MetaData "ClosureType" "GHC.Internal.ClosureTypes" "ghc-internal" 'False) ((((((C1 ('MetaCons "INVALID_OBJECT" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CONSTR" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "CONSTR_1_0" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CONSTR_0_1" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "CONSTR_2_0" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CONSTR_1_1" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "CONSTR_0_2" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CONSTR_NOCAF" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: (((C1 ('MetaCons "FUN" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "FUN_1_0" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "FUN_0_1" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "FUN_2_0" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "FUN_1_1" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "FUN_0_2" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "FUN_STATIC" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "THUNK" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: ((((C1 ('MetaCons "THUNK_1_0" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "THUNK_0_1" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "THUNK_2_0" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "THUNK_1_1" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "THUNK_0_2" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "THUNK_STATIC" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "THUNK_SELECTOR" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BCO" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: (((C1 ('MetaCons "AP" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PAP" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "AP_STACK" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "IND" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "IND_STATIC" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "RET_BCO" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "RET_SMALL" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "RET_BIG" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "RET_FUN" 'PrefixI 'False) (U1 :: Type -> Type))))))) :+: (((((C1 ('MetaCons "UPDATE_FRAME" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CATCH_FRAME" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "UNDERFLOW_FRAME" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "STOP_FRAME" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "BLOCKING_QUEUE" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BLACKHOLE" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "MVAR_CLEAN" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MVAR_DIRTY" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: (((C1 ('MetaCons "TVAR" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ARR_WORDS" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "MUT_ARR_PTRS_CLEAN" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MUT_ARR_PTRS_DIRTY" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "MUT_ARR_PTRS_FROZEN_DIRTY" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MUT_ARR_PTRS_FROZEN_CLEAN" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "MUT_VAR_CLEAN" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MUT_VAR_DIRTY" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: ((((C1 ('MetaCons "WEAK" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PRIM" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "MUT_PRIM" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TSO" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "STACK" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TREC_CHUNK" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ATOMICALLY_FRAME" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CATCH_RETRY_FRAME" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: (((C1 ('MetaCons "CATCH_STM_FRAME" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "WHITEHOLE" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "SMALL_MUT_ARR_PTRS_CLEAN" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SMALL_MUT_ARR_PTRS_DIRTY" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "SMALL_MUT_ARR_PTRS_FROZEN_DIRTY" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SMALL_MUT_ARR_PTRS_FROZEN_CLEAN" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "COMPACT_NFDATA" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "CONTINUATION" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "N_CLOSURE_TYPES" 'PrefixI 'False) (U1 :: Type -> Type))))))))
Methods from :: ClosureType -> Rep ClosureType x # to :: Rep ClosureType x -> ClosureType #
Show ClosureType |
Instance details Defined in GHC.Internal.ClosureTypes Methods showsPrec :: Int -> ClosureType -> ShowS # show :: ClosureType -> String # showList :: [ClosureType] -> ShowS #
Eq ClosureType |
Instance details Defined in GHC.Internal.ClosureTypes Methods (==) :: ClosureType -> ClosureType -> Bool # (/=) :: ClosureType -> ClosureType -> Bool #
Ord ClosureType |
Instance details Defined in GHC.Internal.ClosureTypes Methods compare :: ClosureType -> ClosureType -> Ordering # (<) :: ClosureType -> ClosureType -> Bool # (<=) :: ClosureType -> ClosureType -> Bool # (>) :: ClosureType -> ClosureType -> Bool # (>=) :: ClosureType -> ClosureType -> Bool # max :: ClosureType -> ClosureType -> ClosureType # min :: ClosureType -> ClosureType -> ClosureType #
type Rep ClosureType |
Instance details Defined in GHC.Internal.ClosureTypes type Rep ClosureType = D1 ('MetaData "ClosureType" "GHC.Internal.ClosureTypes" "ghc-internal" 'False) ((((((C1 ('MetaCons "INVALID_OBJECT" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CONSTR" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "CONSTR_1_0" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CONSTR_0_1" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "CONSTR_2_0" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CONSTR_1_1" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "CONSTR_0_2" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CONSTR_NOCAF" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: (((C1 ('MetaCons "FUN" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "FUN_1_0" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "FUN_0_1" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "FUN_2_0" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "FUN_1_1" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "FUN_0_2" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "FUN_STATIC" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "THUNK" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: ((((C1 ('MetaCons "THUNK_1_0" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "THUNK_0_1" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "THUNK_2_0" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "THUNK_1_1" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "THUNK_0_2" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "THUNK_STATIC" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "THUNK_SELECTOR" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BCO" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: (((C1 ('MetaCons "AP" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PAP" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "AP_STACK" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "IND" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "IND_STATIC" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "RET_BCO" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "RET_SMALL" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "RET_BIG" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "RET_FUN" 'PrefixI 'False) (U1 :: Type -> Type))))))) :+: (((((C1 ('MetaCons "UPDATE_FRAME" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CATCH_FRAME" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "UNDERFLOW_FRAME" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "STOP_FRAME" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "BLOCKING_QUEUE" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BLACKHOLE" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "MVAR_CLEAN" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MVAR_DIRTY" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: (((C1 ('MetaCons "TVAR" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ARR_WORDS" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "MUT_ARR_PTRS_CLEAN" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MUT_ARR_PTRS_DIRTY" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "MUT_ARR_PTRS_FROZEN_DIRTY" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MUT_ARR_PTRS_FROZEN_CLEAN" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "MUT_VAR_CLEAN" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MUT_VAR_DIRTY" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: ((((C1 ('MetaCons "WEAK" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PRIM" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "MUT_PRIM" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TSO" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "STACK" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TREC_CHUNK" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ATOMICALLY_FRAME" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CATCH_RETRY_FRAME" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: (((C1 ('MetaCons "CATCH_STM_FRAME" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "WHITEHOLE" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "SMALL_MUT_ARR_PTRS_CLEAN" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SMALL_MUT_ARR_PTRS_DIRTY" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "SMALL_MUT_ARR_PTRS_FROZEN_DIRTY" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SMALL_MUT_ARR_PTRS_FROZEN_CLEAN" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "COMPACT_NFDATA" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "CONTINUATION" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "N_CLOSURE_TYPES" 'PrefixI 'False) (U1 :: Type -> Type))))))))

data PrimType #

Constructors

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

#### Instances

Instances details

Binary PrimType # |
Instance details Defined in GHCi.Message Methods put :: PrimType -> Put # get :: Get PrimType # putList :: [PrimType] -> Put #
Generic PrimType # |
Instance details Defined in GHC.Internal.Heap.Closures Associated Types
type Rep PrimType |
Instance details Defined in GHC.Internal.Heap.Closures type Rep PrimType = D1 ('MetaData "PrimType" "GHC.Internal.Heap.Closures" "ghc-lib-parser-9.14.1.20251220-PtFrlL5ZJN3Qo3Axa3c6X" '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 # to :: Rep PrimType x -> PrimType #
Show PrimType # |
Instance details Defined in GHC.Internal.Heap.Closures Methods showsPrec :: Int -> PrimType -> ShowS # show :: PrimType -> String # showList :: [PrimType] -> ShowS #
Eq PrimType # |
Instance details Defined in GHC.Internal.Heap.Closures Methods (==) :: PrimType -> PrimType -> Bool # (/=) :: PrimType -> PrimType -> Bool #
Ord PrimType # |
Instance details Defined in GHC.Internal.Heap.Closures Methods compare :: PrimType -> PrimType -> Ordering # (<) :: PrimType -> PrimType -> Bool # (<=) :: PrimType -> PrimType -> Bool # (>) :: PrimType -> PrimType -> Bool # (>=) :: PrimType -> PrimType -> Bool # max :: PrimType -> PrimType -> PrimType # min :: PrimType -> PrimType -> PrimType #
type Rep PrimType # |
Instance details Defined in GHC.Internal.Heap.Closures type Rep PrimType = D1 ('MetaData "PrimType" "GHC.Internal.Heap.Closures" "ghc-lib-parser-9.14.1.20251220-PtFrlL5ZJN3Qo3Axa3c6X" '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 #

Constructors

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

#### Instances

Instances details

Binary WhatNext # |
Instance details Defined in GHCi.Message Methods put :: WhatNext -> Put # get :: Get WhatNext # putList :: [WhatNext] -> Put #
Generic WhatNext # |
Instance details Defined in GHC.Internal.Heap.Closures Associated Types
type Rep WhatNext |
Instance details Defined in GHC.Internal.Heap.Closures type Rep WhatNext = D1 ('MetaData "WhatNext" "GHC.Internal.Heap.Closures" "ghc-lib-parser-9.14.1.20251220-PtFrlL5ZJN3Qo3Axa3c6X" '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 # to :: Rep WhatNext x -> WhatNext #
Show WhatNext # |
Instance details Defined in GHC.Internal.Heap.Closures Methods showsPrec :: Int -> WhatNext -> ShowS # show :: WhatNext -> String # showList :: [WhatNext] -> ShowS #
Eq WhatNext # |
Instance details Defined in GHC.Internal.Heap.Closures Methods (==) :: WhatNext -> WhatNext -> Bool # (/=) :: WhatNext -> WhatNext -> Bool #
Ord WhatNext # |
Instance details Defined in GHC.Internal.Heap.Closures Methods compare :: WhatNext -> WhatNext -> Ordering # (<) :: WhatNext -> WhatNext -> Bool # (<=) :: WhatNext -> WhatNext -> Bool # (>) :: WhatNext -> WhatNext -> Bool # (>=) :: WhatNext -> WhatNext -> Bool # max :: WhatNext -> WhatNext -> WhatNext # min :: WhatNext -> WhatNext -> WhatNext #
type Rep WhatNext # |
Instance details Defined in GHC.Internal.Heap.Closures type Rep WhatNext = D1 ('MetaData "WhatNext" "GHC.Internal.Heap.Closures" "ghc-lib-parser-9.14.1.20251220-PtFrlL5ZJN3Qo3Axa3c6X" '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

Instances details

Binary WhyBlocked # |
Instance details Defined in GHCi.Message Methods put :: WhyBlocked -> Put # get :: Get WhyBlocked # putList :: [WhyBlocked] -> Put #
Generic WhyBlocked # |
Instance details Defined in GHC.Internal.Heap.Closures Associated Types
type Rep WhyBlocked |
Instance details Defined in GHC.Internal.Heap.Closures type Rep WhyBlocked = D1 ('MetaData "WhyBlocked" "GHC.Internal.Heap.Closures" "ghc-lib-parser-9.14.1.20251220-PtFrlL5ZJN3Qo3Axa3c6X" '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 # to :: Rep WhyBlocked x -> WhyBlocked #
Show WhyBlocked # |
Instance details Defined in GHC.Internal.Heap.Closures Methods showsPrec :: Int -> WhyBlocked -> ShowS # show :: WhyBlocked -> String # showList :: [WhyBlocked] -> ShowS #
Eq WhyBlocked # |
Instance details Defined in GHC.Internal.Heap.Closures Methods (==) :: WhyBlocked -> WhyBlocked -> Bool # (/=) :: WhyBlocked -> WhyBlocked -> Bool #
Ord WhyBlocked # |
Instance details Defined in GHC.Internal.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 # |
Instance details Defined in GHC.Internal.Heap.Closures type Rep WhyBlocked = D1 ('MetaData "WhyBlocked" "GHC.Internal.Heap.Closures" "ghc-lib-parser-9.14.1.20251220-PtFrlL5ZJN3Qo3Axa3c6X" '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 #

Constructors

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

#### Instances

Instances details

Binary TsoFlags # |
Instance details Defined in GHCi.Message Methods put :: TsoFlags -> Put # get :: Get TsoFlags # putList :: [TsoFlags] -> Put #
Generic TsoFlags # |
Instance details Defined in GHC.Internal.Heap.Closures Associated Types
type Rep TsoFlags |
Instance details Defined in GHC.Internal.Heap.Closures type Rep TsoFlags = D1 ('MetaData "TsoFlags" "GHC.Internal.Heap.Closures" "ghc-lib-parser-9.14.1.20251220-PtFrlL5ZJN3Qo3Axa3c6X" '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 "TsoStopNextBreakpoint" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "TsoStopAfterReturn" '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 # to :: Rep TsoFlags x -> TsoFlags #
Show TsoFlags # |
Instance details Defined in GHC.Internal.Heap.Closures Methods showsPrec :: Int -> TsoFlags -> ShowS # show :: TsoFlags -> String # showList :: [TsoFlags] -> ShowS #
Eq TsoFlags # |
Instance details Defined in GHC.Internal.Heap.Closures Methods (==) :: TsoFlags -> TsoFlags -> Bool # (/=) :: TsoFlags -> TsoFlags -> Bool #
Ord TsoFlags # |
Instance details Defined in GHC.Internal.Heap.Closures Methods compare :: TsoFlags -> TsoFlags -> Ordering # (<) :: TsoFlags -> TsoFlags -> Bool # (<=) :: TsoFlags -> TsoFlags -> Bool # (>) :: TsoFlags -> TsoFlags -> Bool # (>=) :: TsoFlags -> TsoFlags -> Bool # max :: TsoFlags -> TsoFlags -> TsoFlags # min :: TsoFlags -> TsoFlags -> TsoFlags #
type Rep TsoFlags # |
Instance details Defined in GHC.Internal.Heap.Closures type Rep TsoFlags = D1 ('MetaData "TsoFlags" "GHC.Internal.Heap.Closures" "ghc-lib-parser-9.14.1.20251220-PtFrlL5ZJN3Qo3Axa3c6X" '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 "TsoStopNextBreakpoint" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "TsoStopAfterReturn" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TsoFlagsUnknownValue" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word32))))))

class HasHeapRep (a :: TYPE rep) where #

Methods

getClosureData #

Arguments

:: a | Closure to decode.
-> IO Closure | Heap representation of the closure.

Decode a closure to it's heap representation (`GenClosure`).

#### Instances

Instances details

Addr# ~ a => HasHeapRep (a :: TYPE 'AddrRep) # |
Instance details Defined in GHC.Exts.Heap Methods getClosureData :: a -> IO Closure #
Double# ~ a => HasHeapRep (a :: TYPE 'DoubleRep) # |
Instance details Defined in GHC.Exts.Heap Methods getClosureData :: a -> IO Closure #
Float# ~ a => HasHeapRep (a :: TYPE 'FloatRep) # |
Instance details Defined in GHC.Exts.Heap Methods getClosureData :: a -> IO Closure #
Int64# ~ a => HasHeapRep (a :: TYPE 'Int64Rep) # |
Instance details Defined in GHC.Exts.Heap Methods getClosureData :: a -> IO Closure #
Int# ~ a => HasHeapRep (a :: TYPE 'IntRep) # |
Instance details Defined in GHC.Exts.Heap Methods getClosureData :: a -> IO Closure #
HasHeapRep (a :: Type) # |
Instance details Defined in GHC.Exts.Heap Methods getClosureData :: a -> IO Closure #
HasHeapRep (a :: UnliftedType) # |
Instance details Defined in GHC.Exts.Heap Methods getClosureData :: a -> IO Closure #
Word64# ~ a => HasHeapRep (a :: TYPE 'Word64Rep) # |
Instance details Defined in GHC.Exts.Heap Methods getClosureData :: a -> IO Closure #
Word# ~ a => HasHeapRep (a :: TYPE 'WordRep) # |
Instance details Defined in GHC.Exts.Heap Methods getClosureData :: a -> IO Closure #

getClosureInfoTbl :: HasCallStack => GenClosure b -> StgInfoTable #

Partial version of getClosureInfoTbl_maybe for when we know we deal with a heap closure.

Since: 9.14.1

getClosureInfoTbl_maybe :: GenClosure b -> Maybe StgInfoTable #

Get the info table for a heap closure, or Nothing for a prim value

Since: 9.14.1

getClosurePtrArgs :: HasCallStack => GenClosure b -> [b] #

Partial version of getClosureInfoTbl_maybe for when we know we deal with a heap closure.

Since: 9.14.1

getClosurePtrArgs_maybe :: GenClosure b -> Maybe [b] #

Get the info table for a heap closure, or Nothing for a prim value

Since: 9.14.1

getClosureDataFromHeapRep :: ByteArray# -> Ptr StgInfoTable -> [b] -> IO (GenClosure b) #

Convert an unpacked heap object, to a `GenClosure b`. The inputs to this function can be generated from a heap object using `unpackClosure#`.

getClosureDataFromHeapRepPrim #

Arguments

:: IO (String, String, String) | A continuation used to decode the constructor description field, in ghc-debug this code can lead to segfaults because dataConNames will dereference a random part of memory.
-> (Ptr a -> IO (Maybe CostCentreStack)) | A continuation which is used to decode a cost centre stack In ghc-debug, this code will need to call back into the debuggee to fetch the representation of the CCS before decoding it. Using `peekTopCCS` for this argument can lead to segfaults in ghc-debug as the CCS argument will point outside the copied closure.
-> StgInfoTable | The `StgInfoTable` of the closure, extracted from the heap representation.
-> ByteArray# | Heap representation of the closure as returned by `unpackClosure#`. This includes all of the object including the header, info table pointer, pointer data, and non-pointer data. The ByteArray# may be pinned or unpinned.
-> [b] | Pointers in the payload of the closure, extracted from the heap representation as returned by `collect_pointers()` in `c`. The type `b` is some representation of a pointer e.g. `Any` or `Ptr Any`.
-> IO (GenClosure b) | Heap representation of the closure.

# Info Table types

data StgInfoTable #

This is a somewhat faithful representation of an info table. See https://gitlab.haskell.org/ghc/ghc/blob/master/rts/include/rts/storage/InfoTables.h for more details on this data structure.

Constructors

StgInfoTable |
Fields entry :: Maybe EntryFunPtr ptrs :: HalfWord nptrs :: HalfWord tipe :: ClosureType srtlen :: HalfWord code :: Maybe ItblCodes

#### Instances

Instances details

Binary StgInfoTable # |
Instance details Defined in GHCi.Message Methods put :: StgInfoTable -> Put # get :: Get StgInfoTable # putList :: [StgInfoTable] -> Put #
Generic StgInfoTable # |
Instance details Defined in GHC.Internal.Heap.InfoTable.Types Associated Types
type Rep StgInfoTable |
Instance details Defined in GHC.Internal.Heap.InfoTable.Types type Rep StgInfoTable = D1 ('MetaData "StgInfoTable" "GHC.Internal.Heap.InfoTable.Types" "ghc-lib-parser-9.14.1.20251220-PtFrlL5ZJN3Qo3Axa3c6X" 'False) (C1 ('MetaCons "StgInfoTable" 'PrefixI 'True) ((S1 ('MetaSel ('Just "entry") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe EntryFunPtr)) :*: (S1 ('MetaSel ('Just "ptrs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 HalfWord) :*: S1 ('MetaSel ('Just "nptrs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 HalfWord))) :*: (S1 ('MetaSel ('Just "tipe") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ClosureType) :*: (S1 ('MetaSel ('Just "srtlen") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 HalfWord) :*: S1 ('MetaSel ('Just "code") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe ItblCodes))))))
Methods from :: StgInfoTable -> Rep StgInfoTable x # to :: Rep StgInfoTable x -> StgInfoTable #
Show StgInfoTable # |
Instance details Defined in GHC.Internal.Heap.InfoTable.Types Methods showsPrec :: Int -> StgInfoTable -> ShowS # show :: StgInfoTable -> String # showList :: [StgInfoTable] -> ShowS #
Eq StgInfoTable # |
Instance details Defined in GHC.Internal.Heap.InfoTable.Types Methods (==) :: StgInfoTable -> StgInfoTable -> Bool # (/=) :: StgInfoTable -> StgInfoTable -> Bool #
type Rep StgInfoTable # |
Instance details Defined in GHC.Internal.Heap.InfoTable.Types type Rep StgInfoTable = D1 ('MetaData "StgInfoTable" "GHC.Internal.Heap.InfoTable.Types" "ghc-lib-parser-9.14.1.20251220-PtFrlL5ZJN3Qo3Axa3c6X" 'False) (C1 ('MetaCons "StgInfoTable" 'PrefixI 'True) ((S1 ('MetaSel ('Just "entry") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe EntryFunPtr)) :*: (S1 ('MetaSel ('Just "ptrs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 HalfWord) :*: S1 ('MetaSel ('Just "nptrs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 HalfWord))) :*: (S1 ('MetaSel ('Just "tipe") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ClosureType) :*: (S1 ('MetaSel ('Just "srtlen") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 HalfWord) :*: S1 ('MetaSel ('Just "code") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe ItblCodes))))))

type EntryFunPtr = FunPtr (Ptr () -> IO (Ptr ())) #

data HalfWord #

#### Instances

Instances details

Binary HalfWord # |
Instance details Defined in GHCi.Message Methods put :: HalfWord -> Put # get :: Get HalfWord # putList :: [HalfWord] -> Put #
Enum HalfWord # |
Instance details Defined in GHC.Internal.Heap.InfoTable.Types Methods succ :: HalfWord -> HalfWord # pred :: HalfWord -> HalfWord # toEnum :: Int -> HalfWord # fromEnum :: HalfWord -> Int # enumFrom :: HalfWord -> [HalfWord] # enumFromThen :: HalfWord -> HalfWord -> [HalfWord] # enumFromTo :: HalfWord -> HalfWord -> [HalfWord] # enumFromThenTo :: HalfWord -> HalfWord -> HalfWord -> [HalfWord] #
Storable HalfWord # |
Instance details Defined in GHC.Internal.Heap.InfoTable.Types Methods sizeOf :: HalfWord -> Int # alignment :: HalfWord -> Int # peekElemOff :: Ptr HalfWord -> Int -> IO HalfWord # pokeElemOff :: Ptr HalfWord -> Int -> HalfWord -> IO () # peekByteOff :: Ptr b -> Int -> IO HalfWord # pokeByteOff :: Ptr b -> Int -> HalfWord -> IO () # peek :: Ptr HalfWord -> IO HalfWord # poke :: Ptr HalfWord -> HalfWord -> IO () #
Num HalfWord # |
Instance details Defined in GHC.Internal.Heap.InfoTable.Types Methods (+) :: HalfWord -> HalfWord -> HalfWord # (-) :: HalfWord -> HalfWord -> HalfWord # (*) :: HalfWord -> HalfWord -> HalfWord # negate :: HalfWord -> HalfWord # abs :: HalfWord -> HalfWord # signum :: HalfWord -> HalfWord # fromInteger :: Integer -> HalfWord #
Integral HalfWord # |
Instance details Defined in GHC.Internal.Heap.InfoTable.Types Methods quot :: HalfWord -> HalfWord -> HalfWord # rem :: HalfWord -> HalfWord -> HalfWord # div :: HalfWord -> HalfWord -> HalfWord # mod :: HalfWord -> HalfWord -> HalfWord # quotRem :: HalfWord -> HalfWord -> (HalfWord, HalfWord) # divMod :: HalfWord -> HalfWord -> (HalfWord, HalfWord) # toInteger :: HalfWord -> Integer #
Real HalfWord # |
Instance details Defined in GHC.Internal.Heap.InfoTable.Types Methods toRational :: HalfWord -> Rational #
Show HalfWord # |
Instance details Defined in GHC.Internal.Heap.InfoTable.Types Methods showsPrec :: Int -> HalfWord -> ShowS # show :: HalfWord -> String # showList :: [HalfWord] -> ShowS #
Eq HalfWord # |
Instance details Defined in GHC.Internal.Heap.InfoTable.Types Methods (==) :: HalfWord -> HalfWord -> Bool # (/=) :: HalfWord -> HalfWord -> Bool #
Ord HalfWord # |
Instance details Defined in GHC.Internal.Heap.InfoTable.Types Methods compare :: HalfWord -> HalfWord -> Ordering # (<) :: HalfWord -> HalfWord -> Bool # (<=) :: HalfWord -> HalfWord -> Bool # (>) :: HalfWord -> HalfWord -> Bool # (>=) :: HalfWord -> HalfWord -> Bool # max :: HalfWord -> HalfWord -> HalfWord # min :: HalfWord -> HalfWord -> HalfWord #

type ItblCodes = Either [Word8] [Word32] #

itblSize :: Int #

Size in bytes of a standard InfoTable

peekItbl :: Ptr StgInfoTable -> IO StgInfoTable #

Read an InfoTable from the heap into a haskell type. WARNING: This code assumes it is passed a pointer to a "standard" info table. If tables_next_to_code is disabled, it will look 1 word before the start for the entry field.

pokeItbl :: Ptr StgInfoTable -> StgInfoTable -> IO () #

# Cost Centre (profiling) types

newtype StgTSOProfInfo #

This is a somewhat faithful representation of StgTSOProfInfo. See https://gitlab.haskell.org/ghc/ghc/blob/master/rts/include/rts/storage/TSO.h for more details on this data structure.

Constructors

StgTSOProfInfo |
Fields cccs :: Maybe CostCentreStack

#### Instances

Instances details

Binary StgTSOProfInfo # |
Instance details Defined in GHCi.Message Methods put :: StgTSOProfInfo -> Put # get :: Get StgTSOProfInfo # putList :: [StgTSOProfInfo] -> Put #
Generic StgTSOProfInfo # |
Instance details Defined in GHC.Internal.Heap.ProfInfo.Types Associated Types
type Rep StgTSOProfInfo |
Instance details Defined in GHC.Internal.Heap.ProfInfo.Types type Rep StgTSOProfInfo = D1 ('MetaData "StgTSOProfInfo" "GHC.Internal.Heap.ProfInfo.Types" "ghc-lib-parser-9.14.1.20251220-PtFrlL5ZJN3Qo3Axa3c6X" 'True) (C1 ('MetaCons "StgTSOProfInfo" 'PrefixI 'True) (S1 ('MetaSel ('Just "cccs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe CostCentreStack))))
Methods from :: StgTSOProfInfo -> Rep StgTSOProfInfo x # to :: Rep StgTSOProfInfo x -> StgTSOProfInfo #
Show StgTSOProfInfo # |
Instance details Defined in GHC.Internal.Heap.ProfInfo.Types Methods showsPrec :: Int -> StgTSOProfInfo -> ShowS # show :: StgTSOProfInfo -> String # showList :: [StgTSOProfInfo] -> ShowS #
Eq StgTSOProfInfo # |
Instance details Defined in GHC.Internal.Heap.ProfInfo.Types Methods (==) :: StgTSOProfInfo -> StgTSOProfInfo -> Bool # (/=) :: StgTSOProfInfo -> StgTSOProfInfo -> Bool #
Ord StgTSOProfInfo # |
Instance details Defined in GHC.Internal.Heap.ProfInfo.Types Methods compare :: StgTSOProfInfo -> StgTSOProfInfo -> Ordering # (<) :: StgTSOProfInfo -> StgTSOProfInfo -> Bool # (<=) :: StgTSOProfInfo -> StgTSOProfInfo -> Bool # (>) :: StgTSOProfInfo -> StgTSOProfInfo -> Bool # (>=) :: StgTSOProfInfo -> StgTSOProfInfo -> Bool # max :: StgTSOProfInfo -> StgTSOProfInfo -> StgTSOProfInfo # min :: StgTSOProfInfo -> StgTSOProfInfo -> StgTSOProfInfo #
type Rep StgTSOProfInfo # |
Instance details Defined in GHC.Internal.Heap.ProfInfo.Types type Rep StgTSOProfInfo = D1 ('MetaData "StgTSOProfInfo" "GHC.Internal.Heap.ProfInfo.Types" "ghc-lib-parser-9.14.1.20251220-PtFrlL5ZJN3Qo3Axa3c6X" 'True) (C1 ('MetaCons "StgTSOProfInfo" 'PrefixI 'True) (S1 ('MetaSel ('Just "cccs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe CostCentreStack))))

data IndexTable #

This is a somewhat faithful representation of IndexTable. See https://gitlab.haskell.org/ghc/ghc/blob/master/rts/include/rts/prof/CCS.h for more details on this data structure.

Constructors

IndexTable |
Fields it_cc :: CostCentre it_ccs :: Maybe CostCentreStack it_next :: Maybe IndexTable it_back_edge :: Bool

#### Instances

Instances details

Binary IndexTable # |
Instance details Defined in GHCi.Message Methods put :: IndexTable -> Put # get :: Get IndexTable # putList :: [IndexTable] -> Put #
Generic IndexTable # |
Instance details Defined in GHC.Internal.Heap.ProfInfo.Types Associated Types
type Rep IndexTable |
Instance details Defined in GHC.Internal.Heap.ProfInfo.Types type Rep IndexTable = D1 ('MetaData "IndexTable" "GHC.Internal.Heap.ProfInfo.Types" "ghc-lib-parser-9.14.1.20251220-PtFrlL5ZJN3Qo3Axa3c6X" 'False) (C1 ('MetaCons "IndexTable" 'PrefixI 'True) ((S1 ('MetaSel ('Just "it_cc") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CostCentre) :*: S1 ('MetaSel ('Just "it_ccs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe CostCentreStack))) :*: (S1 ('MetaSel ('Just "it_next") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe IndexTable)) :*: S1 ('MetaSel ('Just "it_back_edge") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool))))
Methods from :: IndexTable -> Rep IndexTable x # to :: Rep IndexTable x -> IndexTable #
Show IndexTable # |
Instance details Defined in GHC.Internal.Heap.ProfInfo.Types Methods showsPrec :: Int -> IndexTable -> ShowS # show :: IndexTable -> String # showList :: [IndexTable] -> ShowS #
Eq IndexTable # |
Instance details Defined in GHC.Internal.Heap.ProfInfo.Types Methods (==) :: IndexTable -> IndexTable -> Bool # (/=) :: IndexTable -> IndexTable -> Bool #
Ord IndexTable # |
Instance details Defined in GHC.Internal.Heap.ProfInfo.Types Methods compare :: IndexTable -> IndexTable -> Ordering # (<) :: IndexTable -> IndexTable -> Bool # (<=) :: IndexTable -> IndexTable -> Bool # (>) :: IndexTable -> IndexTable -> Bool # (>=) :: IndexTable -> IndexTable -> Bool # max :: IndexTable -> IndexTable -> IndexTable # min :: IndexTable -> IndexTable -> IndexTable #
type Rep IndexTable # |
Instance details Defined in GHC.Internal.Heap.ProfInfo.Types type Rep IndexTable = D1 ('MetaData "IndexTable" "GHC.Internal.Heap.ProfInfo.Types" "ghc-lib-parser-9.14.1.20251220-PtFrlL5ZJN3Qo3Axa3c6X" 'False) (C1 ('MetaCons "IndexTable" 'PrefixI 'True) ((S1 ('MetaSel ('Just "it_cc") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CostCentre) :*: S1 ('MetaSel ('Just "it_ccs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe CostCentreStack))) :*: (S1 ('MetaSel ('Just "it_next") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe IndexTable)) :*: S1 ('MetaSel ('Just "it_back_edge") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool))))

data CostCentre #

This is a somewhat faithful representation of CostCentre. See https://gitlab.haskell.org/ghc/ghc/blob/master/rts/include/rts/prof/CCS.h for more details on this data structure.

Constructors

CostCentre |
Fields cc_ccID :: Int cc_label :: String cc_module :: String cc_srcloc :: Maybe String cc_mem_alloc :: Word64 cc_time_ticks :: Word cc_is_caf :: Bool cc_link :: Maybe CostCentre

#### Instances

Instances details

Binary CostCentre # |
Instance details Defined in GHCi.Message Methods put :: CostCentre -> Put # get :: Get CostCentre # putList :: [CostCentre] -> Put #
Generic CostCentre # |
Instance details Defined in GHC.Internal.Heap.ProfInfo.Types Associated Types
type Rep CostCentre |
Instance details Defined in GHC.Internal.Heap.ProfInfo.Types type Rep CostCentre = D1 ('MetaData "CostCentre" "GHC.Internal.Heap.ProfInfo.Types" "ghc-lib-parser-9.14.1.20251220-PtFrlL5ZJN3Qo3Axa3c6X" 'False) (C1 ('MetaCons "CostCentre" 'PrefixI 'True) (((S1 ('MetaSel ('Just "cc_ccID") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "cc_label") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String)) :*: (S1 ('MetaSel ('Just "cc_module") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: S1 ('MetaSel ('Just "cc_srcloc") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe String)))) :*: ((S1 ('MetaSel ('Just "cc_mem_alloc") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64) :*: S1 ('MetaSel ('Just "cc_time_ticks") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word)) :*: (S1 ('MetaSel ('Just "cc_is_caf") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "cc_link") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe CostCentre))))))
Methods from :: CostCentre -> Rep CostCentre x # to :: Rep CostCentre x -> CostCentre #
Show CostCentre # |
Instance details Defined in GHC.Internal.Heap.ProfInfo.Types Methods showsPrec :: Int -> CostCentre -> ShowS # show :: CostCentre -> String # showList :: [CostCentre] -> ShowS #
Eq CostCentre # |
Instance details Defined in GHC.Internal.Heap.ProfInfo.Types Methods (==) :: CostCentre -> CostCentre -> Bool # (/=) :: CostCentre -> CostCentre -> Bool #
Ord CostCentre # |
Instance details Defined in GHC.Internal.Heap.ProfInfo.Types Methods compare :: CostCentre -> CostCentre -> Ordering # (<) :: CostCentre -> CostCentre -> Bool # (<=) :: CostCentre -> CostCentre -> Bool # (>) :: CostCentre -> CostCentre -> Bool # (>=) :: CostCentre -> CostCentre -> Bool # max :: CostCentre -> CostCentre -> CostCentre # min :: CostCentre -> CostCentre -> CostCentre #
type Rep CostCentre # |
Instance details Defined in GHC.Internal.Heap.ProfInfo.Types type Rep CostCentre = D1 ('MetaData "CostCentre" "GHC.Internal.Heap.ProfInfo.Types" "ghc-lib-parser-9.14.1.20251220-PtFrlL5ZJN3Qo3Axa3c6X" 'False) (C1 ('MetaCons "CostCentre" 'PrefixI 'True) (((S1 ('MetaSel ('Just "cc_ccID") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "cc_label") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String)) :*: (S1 ('MetaSel ('Just "cc_module") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: S1 ('MetaSel ('Just "cc_srcloc") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe String)))) :*: ((S1 ('MetaSel ('Just "cc_mem_alloc") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64) :*: S1 ('MetaSel ('Just "cc_time_ticks") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word)) :*: (S1 ('MetaSel ('Just "cc_is_caf") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "cc_link") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe CostCentre))))))

data CostCentreStack #

This is a somewhat faithful representation of CostCentreStack. See https://gitlab.haskell.org/ghc/ghc/blob/master/rts/include/rts/prof/CCS.h for more details on this data structure.

Constructors

CostCentreStack |
Fields ccs_ccsID :: Int ccs_cc :: CostCentre ccs_prevStack :: Maybe CostCentreStack ccs_indexTable :: Maybe IndexTable ccs_root :: Maybe CostCentreStack ccs_depth :: Word ccs_scc_count :: Word64 ccs_selected :: Word ccs_time_ticks :: Word ccs_mem_alloc :: Word64 ccs_inherited_alloc :: Word64 ccs_inherited_ticks :: Word

#### Instances

Instances details

Binary CostCentreStack # |
Instance details Defined in GHCi.Message Methods put :: CostCentreStack -> Put # get :: Get CostCentreStack # putList :: [CostCentreStack] -> Put #
Generic CostCentreStack # |
Instance details Defined in GHC.Internal.Heap.ProfInfo.Types Associated Types
type Rep CostCentreStack |
Instance details Defined in GHC.Internal.Heap.ProfInfo.Types type Rep CostCentreStack = D1 ('MetaData "CostCentreStack" "GHC.Internal.Heap.ProfInfo.Types" "ghc-lib-parser-9.14.1.20251220-PtFrlL5ZJN3Qo3Axa3c6X" 'False) (C1 ('MetaCons "CostCentreStack" 'PrefixI 'True) (((S1 ('MetaSel ('Just "ccs_ccsID") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: (S1 ('MetaSel ('Just "ccs_cc") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CostCentre) :*: S1 ('MetaSel ('Just "ccs_prevStack") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe CostCentreStack)))) :*: (S1 ('MetaSel ('Just "ccs_indexTable") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe IndexTable)) :*: (S1 ('MetaSel ('Just "ccs_root") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe CostCentreStack)) :*: S1 ('MetaSel ('Just "ccs_depth") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word)))) :*: ((S1 ('MetaSel ('Just "ccs_scc_count") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64) :*: (S1 ('MetaSel ('Just "ccs_selected") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word) :*: S1 ('MetaSel ('Just "ccs_time_ticks") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word))) :*: (S1 ('MetaSel ('Just "ccs_mem_alloc") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64) :*: (S1 ('MetaSel ('Just "ccs_inherited_alloc") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64) :*: S1 ('MetaSel ('Just "ccs_inherited_ticks") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word))))))
Methods from :: CostCentreStack -> Rep CostCentreStack x # to :: Rep CostCentreStack x -> CostCentreStack #
Show CostCentreStack # |
Instance details Defined in GHC.Internal.Heap.ProfInfo.Types Methods showsPrec :: Int -> CostCentreStack -> ShowS # show :: CostCentreStack -> String # showList :: [CostCentreStack] -> ShowS #
Eq CostCentreStack # |
Instance details Defined in GHC.Internal.Heap.ProfInfo.Types Methods (==) :: CostCentreStack -> CostCentreStack -> Bool # (/=) :: CostCentreStack -> CostCentreStack -> Bool #
Ord CostCentreStack # |
Instance details Defined in GHC.Internal.Heap.ProfInfo.Types Methods compare :: CostCentreStack -> CostCentreStack -> Ordering # (<) :: CostCentreStack -> CostCentreStack -> Bool # (<=) :: CostCentreStack -> CostCentreStack -> Bool # (>) :: CostCentreStack -> CostCentreStack -> Bool # (>=) :: CostCentreStack -> CostCentreStack -> Bool # max :: CostCentreStack -> CostCentreStack -> CostCentreStack # min :: CostCentreStack -> CostCentreStack -> CostCentreStack #
type Rep CostCentreStack # |
Instance details Defined in GHC.Internal.Heap.ProfInfo.Types type Rep CostCentreStack = D1 ('MetaData "CostCentreStack" "GHC.Internal.Heap.ProfInfo.Types" "ghc-lib-parser-9.14.1.20251220-PtFrlL5ZJN3Qo3Axa3c6X" 'False) (C1 ('MetaCons "CostCentreStack" 'PrefixI 'True) (((S1 ('MetaSel ('Just "ccs_ccsID") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: (S1 ('MetaSel ('Just "ccs_cc") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CostCentre) :*: S1 ('MetaSel ('Just "ccs_prevStack") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe CostCentreStack)))) :*: (S1 ('MetaSel ('Just "ccs_indexTable") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe IndexTable)) :*: (S1 ('MetaSel ('Just "ccs_root") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe CostCentreStack)) :*: S1 ('MetaSel ('Just "ccs_depth") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word)))) :*: ((S1 ('MetaSel ('Just "ccs_scc_count") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64) :*: (S1 ('MetaSel ('Just "ccs_selected") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word) :*: S1 ('MetaSel ('Just "ccs_time_ticks") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word))) :*: (S1 ('MetaSel ('Just "ccs_mem_alloc") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64) :*: (S1 ('MetaSel ('Just "ccs_inherited_alloc") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64) :*: S1 ('MetaSel ('Just "ccs_inherited_ticks") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word))))))

# Closure inspection

getBoxedClosureData :: Box -> IO Closure #

Like `getClosureData`, but taking a `Box`, so it is easier to work with.

allClosures :: GenClosure b -> [b] #

For generic code, this function returns all referenced closures.

# Boxes

data Box #

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 # |
Instance details Defined in GHC.Internal.Heap.Closures Methods showsPrec :: Int -> Box -> ShowS # show :: Box -> String # showList :: [Box] -> ShowS #

asBox :: a -> Box #

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

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

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