Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- findClosures :: (HeapGraphEntry a -> Bool) -> HeapGraph a -> [HeapGraphEntry a]
- findConstructors :: String -> HeapGraph a -> [HeapGraphEntry a]
- findWithInfoTable :: InfoTablePtr -> HeapGraph a -> [HeapGraphEntry a]
- data HeapGraph a = HeapGraph {
- roots :: !(NonEmpty ClosurePtr)
- graph :: !(IntMap (HeapGraphEntry a))
- data HeapGraphEntry a = HeapGraphEntry {}
Documentation
findClosures :: (HeapGraphEntry a -> Bool) -> HeapGraph a -> [HeapGraphEntry a] Source #
findConstructors :: String -> HeapGraph a -> [HeapGraphEntry a] Source #
findWithInfoTable :: InfoTablePtr -> HeapGraph a -> [HeapGraphEntry a] Source #
The whole graph. The suggested interface is to only use lookupHeapGraph
,
as the internal representation may change. Nevertheless, we export it here:
Sometimes the user knows better what he needs than we do.
HeapGraph | |
|
Instances
Foldable HeapGraph | |
Defined in GHC.Debug.Types.Graph fold :: Monoid m => HeapGraph m -> m # foldMap :: Monoid m => (a -> m) -> HeapGraph a -> m # foldMap' :: Monoid m => (a -> m) -> HeapGraph a -> m # foldr :: (a -> b -> b) -> b -> HeapGraph a -> b # foldr' :: (a -> b -> b) -> b -> HeapGraph a -> b # foldl :: (b -> a -> b) -> b -> HeapGraph a -> b # foldl' :: (b -> a -> b) -> b -> HeapGraph a -> b # foldr1 :: (a -> a -> a) -> HeapGraph a -> a # foldl1 :: (a -> a -> a) -> HeapGraph a -> a # toList :: HeapGraph a -> [a] # length :: HeapGraph a -> Int # elem :: Eq a => a -> HeapGraph a -> Bool # maximum :: Ord a => HeapGraph a -> a # minimum :: Ord a => HeapGraph a -> a # | |
Traversable HeapGraph | |
Functor HeapGraph | |
Show a => Show (HeapGraph a) | |
data HeapGraphEntry a #
For heap graphs, i.e. data structures that also represent sharing and
cyclic structures, these are the entries. If the referenced value is
Nothing
, then we do not have that value in the map, most likely due to
exceeding the recursion bound passed to buildHeapGraph
.
Besides a pointer to the stored value and the closure representation we have a slot for arbitrary data, for the user's convenience.