data-treify-0.3.4: Reify a recursive data structure into an explicit graph.

Safe HaskellNone

Data.Reify.TGraph

Synopsis

Documentation

class ShowF f whereSource

Methods

showF :: f a -> StringSource

Instances

ShowF (V ty) 

type Id = IntSource

Identifiers

data V ty a Source

Typed variables

Constructors

V Id (ty a) 

Instances

ShowF (V ty) 
Eq (V ty a) 
Show (V ty a) 

data Bind ty n Source

Typed binding pair, parameterized by variable and node type constructors.

Constructors

forall a . IsTyConstraint ty a => Bind (V ty a) (n (V ty) a) 

Instances

ShowF (n (V ty)) => Show (Bind ty n) 

bindEnv :: forall ty n. [Bind ty n] -> forall a. (IsTy ty, IsTyConstraint ty a) => V ty a -> n (V ty) aSource

Fast version, using an IntMap. Important: partially apply.

data Graph ty n a Source

Graph, described by bindings and a root variable

Constructors

Graph [Bind ty n] (V ty a) 

Instances

(ShowF (n (V ty)), Show (V ty a)) => Show (Graph ty n a)