cabal-install-solver-3.10.2.1: The command-line interface for Cabal and Hackage.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Distribution.Solver.Modular.LabeledGraph

Description

Wrapper around Data.Graph with support for edge labels

Synopsis

Graphs

type Graph e = Array Vertex [(e, Vertex)] #

type Vertex = Int #

Abstract representation of vertices.

Building graphs

graphFromEdges :: Ord key => [(node, key, [(edge, key)])] -> (Graph edge, Vertex -> (node, key, [(edge, key)]), key -> Maybe Vertex) #

Construct an edge-labeled graph

This is a simple adaptation of the definition in Data.Graph

graphFromEdges' :: Ord key => [(node, key, [(edge, key)])] -> (Graph edge, Vertex -> (node, key, [(edge, key)])) #

buildG :: Bounds -> [Edge e] -> Graph e #

Graph properties

edges :: Graph e -> [Edge e] #

Operations on the underlying unlabeled graph

topSort :: Graph e -> [Vertex] #