graphene-0.1.0.3: A minimal Graph Theory library.

Safe HaskellSafe-Inferred

Graphene.Class

Synopsis

Documentation

data Graph e v Source

Graph with edge type e and vertex type v

Constructors

Graph 

Fields

_vertices :: [v]
 
_edges :: [(e, (v, v))]
 

Instances

Bifunctor Graph

map over both vertices and edges

Bifoldable Graph

fold over both vertices and edges

Functor (Graph e)

map over vertices

Foldable (Graph e)

fold over vertices

(Eq e, Eq v) => Eq (Graph e v) 
(Show e, Show v) => Show (Graph e v) 
Monoid (Graph v e)

identity + binary function (mappend)

edges :: Lens' (Graph e v) [(e, (v, v))]Source