hgraph is a Haskell library for heterogeneous, fully statically typed graphs whose nodes can perform computations on the node data of their predecessors.
git clone git://github.com/peddie/hgraph.git
cd hgraph
cabal install
-
a heterogeneously typed
HList
akin to Oleg's one, but this one uses associated type families rather than functional dependencies and undecideable instances. These have a convenient type operator syntax. -
an
HGraph
class for heterogenous, statically typed directed graphs, and anHGraphApply
subclass for acyclicHGraph
s whose nodes perform computations on the node data of their predecessors. -
two example
HGraphApply
instances, one built directly onHList
s and the other built on a newHNode
data type. -
Data
andTypeable
instances for everything, so you can scrap your boilerplate and your zippers.
-
No graph algorithms yet; all you can do is build and inspect graphs and apply graph nodes. You can't apply entire graphs yet either.
-
No unit tests yet.
-
Type errors are, for the most part, intimidating and inscrutable.
-
The library doesn't implement everything in Oleg's
HList
yet, although most of it should be straightforward. -
The typechecker gets upset about ambiguity, so you have to tell it the types of literals and of some polymorphic functions. I expect this to be less of a problem when the graph has all your own types.