summaryrefslogtreecommitdiff
path: root/compiler/ghc.cabal.in
diff options
context:
space:
mode:
authorNorman Ramsey <nr@cs.tufts.edu>2022-10-21 13:32:13 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-11-11 00:26:55 -0500
commitb2035823daa804d7bc83f4a4b8d51c7ed14da9a0 (patch)
treeddf359eb1ab7f97dfb0f49bbc84b0205ed0f101f /compiler/ghc.cabal.in
parent8104f6f5524d324e56fe903d07aab4cad16ceaf5 (diff)
downloadhaskell-b2035823daa804d7bc83f4a4b8d51c7ed14da9a0.tar.gz
add the two key graph modules from Martin Erwig's FGL
Martin Erwig's FGL (Functional Graph Library) provides an "inductive" representation of graphs. A general graph has labeled nodes and labeled edges. The key operation on a graph is to decompose it by removing one node, together with the edges that connect the node to the rest of the graph. There is also an inverse composition operation. The decomposition and composition operations make this representation of graphs exceptionally well suited to implement graph algorithms in which the graph is continually changing, as alluded to in #21259. This commit adds `GHC.Data.Graph.Inductive.Graph`, which defines the interface, and `GHC.Data.Graph.Inductive.PatriciaTree`, which provides an implementation. Both modules are taken from `fgl-5.7.0.3` on Hackage, with these changes: - Copyright and license text have been copied into the files themselves, not stored separately. - Some calls to `error` have been replaced with calls to `panic`. - Conditional-compilation support for older versions of GHC, `containers`, and `base` has been removed.
Diffstat (limited to 'compiler/ghc.cabal.in')
-rw-r--r--compiler/ghc.cabal.in2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/ghc.cabal.in b/compiler/ghc.cabal.in
index d065f4194e..28a472a24e 100644
--- a/compiler/ghc.cabal.in
+++ b/compiler/ghc.cabal.in
@@ -374,6 +374,8 @@ Library
GHC.Data.Graph.Base
GHC.Data.Graph.Color
GHC.Data.Graph.Directed
+ GHC.Data.Graph.Inductive.Graph
+ GHC.Data.Graph.Inductive.PatriciaTree
GHC.Data.Graph.Ops
GHC.Data.Graph.Ppr
GHC.Data.Graph.UnVar