-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Reify a recursive data structure into an explicit graph. -- @package data-reify @version 0.6.1 -- | This is the shared definition of a Graph in Data.Reify. module Data.Reify.Graph -- | Graph is a basic graph structure over nodes of the higher kind -- e, with a single root. There is an assumption that there is -- no Unique used in a node which does not have a corresponding entry is -- the association list. The idea with this structure is that it is -- trivial to convert into an Array, IntMap, or into a -- Martin Erwig's Functional Graph, as required. data Graph e Graph :: [(Unique, e Unique)] -> Unique -> Graph e type Unique = Int instance Show (e Int) => Show (Graph e) module Data.Reify -- | MuRef is a class that provided a way to reference into a -- specific type, and a way to map over the deferenced internals. class MuRef a where type family DeRef a :: * -> * mapDeRef :: (MuRef a, Applicative f) => (forall b. (MuRef b, DeRef a ~ DeRef b) => b -> f u) -> a -> f (DeRef a u) -- | 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. reifyGraph :: MuRef s => s -> IO (Graph (DeRef s)) instance Eq DynStableName