data-reify-0.4: Reify a recursive data structure into an explicit graph.

Portabilityghc
Stabilityunstable
MaintainerAndy Gill <andygill@ku.edu>

Data.Dynamic.Reify

Description

This is a Dynamic version of Data.Reify, that can reify nodes of different types inside a sigle graph, provided they unify to a common representation.

Synopsis

Documentation

class MuRef a whereSource

MuRef is a class that provided a way to reference into a specific type, and a way to map over the deferenced internals.

Associated Types

type DeRef a :: * -> *Source

Methods

mapDeRef :: Applicative f => (forall b. (MuRef b, Typeable b, DeRef a ~ DeRef b) => b -> f u) -> a -> f (DeRef a u)Source

reifyGraph :: (MuRef s, Typeable s) => s -> IO (Graph (DeRef s))Source

reifyGraph takes a data structure that admits MuRef, and returns a Graph that contains the dereferenced nodes, with their children as Int rather than recursive values.