Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A graph construction language for Haskell

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 src
Octocat-spinner-32 test
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Graph.hs
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.md
Octocat-spinner-32 Setup.hs
Octocat-spinner-32 Test.hs
Octocat-spinner-32 graphbuilder.cabal
README.md

Data.Graph.Builder

"Data.Graph.Builder" is a declarative, monadic language for building graphs, especially trees. It supports both undirected ('UGraphBuilder' and 'buildUGraph') and directed ('DiGraphBuilder', 'buildDiGraph') graphs and allows for optional polymorphic labels on both the vertices and the edges.

The types chosen are designed for easy import from the builder into some other graph library such as FGL or Graphviz.

Here's an example of building a simple, unlabeled, digraph

g = runDiGraphBuilder $ do
  [a, b, c] <- vtcs_ 3
  link_ a b
  d <- vtc_ [b, c]
  link_ d a
  graph_

Still to do

  • Graph unfolds
  • Pointed graphs
  • Graph gluing
Something went wrong with that request. Please try again.