recover-rtti-0.1.0.0: Recover run-time type information from the GHC heap
Safe HaskellNone
LanguageHaskell2010

Debug.RecoverRTTI.FlatClosure

Contents

Synopsis

Documentation

data FlatClosure Source #

Flattened form of Closure (with indirection nodes removed)

We only include the fields of Closure that we are interested in.

TODO: For functions (FunClosure, PAPClosure) we don't currently include any information at all. We could potentially do better here.

Constructors

ConstrClosure

Constructor application

Fields

FunClosure

Functions

We map FunClosure, PAPClosure and H.BCOClosure' all to this.

OtherClosure Closure

Unrecognized closure type

Instances

Instances details
Show FlatClosure Source # 
Instance details

Defined in Debug.RecoverRTTI.FlatClosure

Re-exports

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.Exts.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