projects
/
ghc-heap-view.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
176afe1
)
Improve haddock wording
author
Joachim Breitner
<mail@joachim-breitner.de>
Wed, 20 Feb 2013 13:07:34 +0000
(13:07 +0000)
committer
Joachim Breitner
<mail@joachim-breitner.de>
Wed, 20 Feb 2013 13:07:34 +0000
(13:07 +0000)
src/GHC/HeapView.hs
patch
|
blob
|
history
diff --git
a/src/GHC/HeapView.hs
b/src/GHC/HeapView.hs
index
1bc9235
..
7c4eb25
100644
(file)
--- a/
src/GHC/HeapView.hs
+++ b/
src/GHC/HeapView.hs
@@
-763,12
+763,17
@@
buildHeapGraph :: Int -> Box -> IO HeapGraph
buildHeapGraph limit initialBox = fst <$> generalBuildHeapGraph [] [0..] limit [((),initialBox)]
-- | Creates a 'HeapGraph' for the values in multiple boxes, but not recursing
buildHeapGraph limit initialBox = fst <$> generalBuildHeapGraph [] [0..] limit [((),initialBox)]
-- | Creates a 'HeapGraph' for the values in multiple boxes, but not recursing
--- further than the given limit. The indices of initial values are returned.
+-- further than the given limit.
+--
+-- Returns the 'HeapGraph' and the indices of initial values. The arbitrary
+-- type @a@ can be used to make the connection between the input and the
+-- resulting list of indices.
multiBuildHeapGraph :: Int -> [(a, Box)] -> IO (HeapGraph, [(a, HeapGraphIndex)])
multiBuildHeapGraph = generalBuildHeapGraph [] [0..]
multiBuildHeapGraph :: Int -> [(a, Box)] -> IO (HeapGraph, [(a, HeapGraphIndex)])
multiBuildHeapGraph = generalBuildHeapGraph [] [0..]
--- | Adds an entry to an existing 'HeapGraph'. The index of the initial value
--- is also returned.
+-- | Adds an entry to an existing 'HeapGraph'.
+--
+-- Returns the updated 'HeapGraph' and the index of the added value.
addHeapGraph :: HeapGraph -> Int -> Box -> IO (HeapGraphIndex, HeapGraph)
addHeapGraph (HeapGraph hg) limit initialBox = do
newStart <- foldM toStartList [] $ M.toList hg
addHeapGraph :: HeapGraph -> Int -> Box -> IO (HeapGraphIndex, HeapGraph)
addHeapGraph (HeapGraph hg) limit initialBox = do
newStart <- foldM toStartList [] $ M.toList hg