Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data Graph node = Graph {}
- nodes ∷ Graph node → Set node
- opGraph ∷ Graph node → Graph node
- subtractGraph ∷ Ord node ⇒ Graph node → Graph node → Graph node
- dependency ∷ Ord node ⇒ node → Set node → Graph node
- irreflexiveDependencyOn ∷ Ord node ⇒ Set node → Set node → Graph node
- transitiveDependencies ∷ Ord node ⇒ node → Graph node → Set node
- transitiveClosure ∷ Ord node ⇒ Graph node → Graph node
- noDependencies ∷ Ord node ⇒ Set node → Graph node
- topsort ∷ Ord node ⇒ Graph node → Either [node] [node]
- findCycle ∷ Ord node ⇒ Graph node → node → [node]
- dependencies ∷ Ord node ⇒ node → Graph node → Set node
- dependsOn ∷ Ord node ⇒ node → node → Graph node → Bool
- deleteNode ∷ Ord node ⇒ node → Graph node → Graph node
Documentation
dependency ∷ Ord node ⇒ node → Set node → Graph node Source #
irreflexiveDependencyOn ∷ Ord node ⇒ Set node → Set node → Graph node Source #
transitiveDependencies ∷ Ord node ⇒ node → Graph node → Set node Source #
transitiveClosure ∷ Ord node ⇒ Graph node → Graph node Source #
noDependencies ∷ Ord node ⇒ Set node → Graph node Source #
topsort ∷ Ord node ⇒ Graph node → Either [node] [node] Source #
Topsort the graph, returning a cycle (`Left cycle`) on failure.
findCycle ∷ Ord node ⇒ Graph node → node → [node] Source #
Simple DFS cycle finding TODO: tests for this, currently it can produce a stem with a cycle after it
dependencies ∷ Ord node ⇒ node → Graph node → Set node Source #
deleteNode ∷ Ord node ⇒ node → Graph node → Graph node Source #