ghc-heap-view-0.5.10: Extract the heap representation of Haskell values and thunks

Safe HaskellSafe
LanguageHaskell2010

GHC.Disassembler

Description

A disassembler for ByteCode objects as used by GHCi.

Synopsis

Documentation

toBytes :: Word -> [Word] -> ByteString Source #

Converts the first n bytes of this list of Words to a ByteString.

disassemble :: forall box. [box] -> [Word] -> ByteString -> [BCI box] Source #

Given a list of pointers, a list of literals and a ByteString containing byte code instructions, disassembles them into a list of byte code instructions.

data BCI box Source #

The various byte code instructions that GHCi supports.

Instances

Functor BCI Source # 

Methods

fmap :: (a -> b) -> BCI a -> BCI b #

(<$) :: a -> BCI b -> BCI a #

Foldable BCI Source # 

Methods

fold :: Monoid m => BCI m -> m #

foldMap :: Monoid m => (a -> m) -> BCI a -> m #

foldr :: (a -> b -> b) -> b -> BCI a -> b #

foldr' :: (a -> b -> b) -> b -> BCI a -> b #

foldl :: (b -> a -> b) -> b -> BCI a -> b #

foldl' :: (b -> a -> b) -> b -> BCI a -> b #

foldr1 :: (a -> a -> a) -> BCI a -> a #

foldl1 :: (a -> a -> a) -> BCI a -> a #

toList :: BCI a -> [a] #

null :: BCI a -> Bool #

length :: BCI a -> Int #

elem :: Eq a => a -> BCI a -> Bool #

maximum :: Ord a => BCI a -> a #

minimum :: Ord a => BCI a -> a #

sum :: Num a => BCI a -> a #

product :: Num a => BCI a -> a #

Traversable BCI Source # 

Methods

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

sequenceA :: Applicative f => BCI (f a) -> f (BCI a) #

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

sequence :: Monad m => BCI (m a) -> m (BCI a) #

Show box => Show (BCI box) Source # 

Methods

showsPrec :: Int -> BCI box -> ShowS #

show :: BCI box -> String #

showList :: [BCI box] -> ShowS #