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

Safe HaskellSafe-Inferred

Data.Reify.TGraph

Synopsis

Documentation

class ShowF f whereSource

Methods

showF :: f a -> StringSource

Instances

ShowF Op 
ShowF (V ty) 
ShowF v => ShowF (N v) 

type Id = IntSource

Identifiers

data V ty a Source

Typed variables

Constructors

V Id (ty a) 

Instances

ShowF (V ty) 
Eq (V ty a) 
(Typeable a, Show a, Num a) => Num (E (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 . Bind (V ty a) (n (V ty) a) 

Instances

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

bindEnv :: forall ty n a. IsTy ty => [Bind ty n] -> 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)