[commit: ghc] master: Remove graphFromVerticesAndAdjacency (07f6418)
git at git.haskell.org
git at git.haskell.org
Mon Sep 21 21:51:00 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/07f6418e690bc44b7b24ca3e376494287679e544/ghc
>---------------------------------------------------------------
commit 07f6418e690bc44b7b24ca3e376494287679e544
Author: Bartosz Nitka <niteria at gmail.com>
Date: Mon Sep 21 16:52:10 2015 -0500
Remove graphFromVerticesAndAdjacency
It's not used anywhere.
Reviewed By: austin
Differential Revision: https://phabricator.haskell.org/D1266
>---------------------------------------------------------------
07f6418e690bc44b7b24ca3e376494287679e544
compiler/utils/Digraph.hs | 20 +-------------------
1 file changed, 1 insertion(+), 19 deletions(-)
diff --git a/compiler/utils/Digraph.hs b/compiler/utils/Digraph.hs
index 3f6ee29..d5924a9 100644
--- a/compiler/utils/Digraph.hs
+++ b/compiler/utils/Digraph.hs
@@ -4,7 +4,7 @@
-- For Functor SCC. ToDo: Remove me when 7.10 is released
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Digraph(
- Graph, graphFromVerticesAndAdjacency, graphFromEdgedVertices,
+ Graph, graphFromEdgedVertices,
SCC(..), Node, flattenSCC, flattenSCCs,
stronglyConnCompG,
@@ -96,24 +96,6 @@ type Node key payload = (payload, key, [key])
emptyGraph :: Graph a
emptyGraph = Graph (array (1, 0) []) (error "emptyGraph") (const Nothing)
-graphFromVerticesAndAdjacency
- :: Ord key
- => [(node, key)]
- -> [(key, key)] -- First component is source vertex key,
- -- second is target vertex key (thing depended on)
- -- Unlike the other interface I insist they correspond to
- -- actual vertices because the alternative hides bugs. I can't
- -- do the same thing for the other one for backcompat reasons.
- -> Graph (node, key)
-graphFromVerticesAndAdjacency [] _ = emptyGraph
-graphFromVerticesAndAdjacency vertices edges = Graph graph vertex_node (key_vertex . key_extractor)
- where key_extractor = snd
- (bounds, vertex_node, key_vertex, _) = reduceNodesIntoVertices vertices key_extractor
- key_vertex_pair (a, b) = (expectJust "graphFromVerticesAndAdjacency" $ key_vertex a,
- expectJust "graphFromVerticesAndAdjacency" $ key_vertex b)
- reduced_edges = map key_vertex_pair edges
- graph = buildG bounds reduced_edges
-
graphFromEdgedVertices
:: Ord key
=> [Node key payload] -- The graph; its ok for the
More information about the ghc-commits
mailing list