pangraph-0.2.1: A set of parsers for graph languages and conversions to graph libaries.

Safe HaskellNone
LanguageHaskell2010

Pangraph.Internal.ProtoGraph

Description

This module provides common boilerplate code which implements constructing a Pangraph from either ASTs or Graph types.

It is exported as internal for now as it is intended use by modules which will not re-export it.

Synopsis

Documentation

data ProtoEdge Source #

Instances
Eq ProtoEdge Source # 
Instance details

Defined in Pangraph.Internal.ProtoGraph

Show ProtoEdge Source # 
Instance details

Defined in Pangraph.Internal.ProtoGraph

makeProtoVertex :: [Attribute] -> ProtoVertex Source #

ProtoVertex constructor

makeProtoEdge :: [Attribute] -> ProtoEdge Source #

ProtoEdge constructor

class BuildPangraph t Source #

Minimal complete definition

getProtoVertex, getProtoEdge

buildPangraph :: BuildPangraph t => t -> (ProtoVertex -> VertexID) -> (ProtoEdge -> (VertexID, VertexID)) -> Maybe Pangraph Source #

Given an Instance t of the BuildGraph will attempt to construct a Pangraph. This can be used to avoid boilerplate code which is common many implementations.