Skip to content

Commit fe4aa23

Browse files
authored
Actually avoid the Forest synonym in Data.Graph (#930)
1 parent 848286d commit fe4aa23

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

containers/src/Data/Graph.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -493,10 +493,10 @@ dff g = dfs g (vertices g)
493493
-- This function deviates from King and Launchbury's implementation by
494494
-- bundling together the functions generate, prune, and chop for efficiency
495495
-- reasons.
496-
dfs :: Graph -> [Vertex] -> Forest Vertex
496+
dfs :: Graph -> [Vertex] -> [Tree Vertex]
497497
dfs g vs0 = run (bounds g) $ go vs0
498498
where
499-
go :: [Vertex] -> SetM s (Forest Vertex)
499+
go :: [Vertex] -> SetM s [Tree Vertex]
500500
go [] = pure []
501501
go (v:vs) = do
502502
visited <- contains v
@@ -743,7 +743,7 @@ bcc g = concatMap bicomps forest
743743
dnum = preArr (bounds g) forest
744744

745745
-- Wraps up the component of every child of the root
746-
bicomps :: Tree Vertex -> Forest [Vertex]
746+
bicomps :: Tree Vertex -> [Tree [Vertex]]
747747
bicomps (Node v tws) =
748748
[Node (v : curw []) (donew []) | (_, curw, donew) <- map collect tws]
749749

0 commit comments

Comments
 (0)