-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | API for hierarchical multilevel collections. -- -- Two-argument typeclass that generalizes Foldable, Functor, and -- Traversable for monomorphic multi-level collections. Transitive -- instances allow for folding and mapping over any subordinate level of -- the hierarchy. -- -- Main interface for hPDB library. -- -- Contains convenience TemplateHaskell methods for generating Iterable -- instances that have Vector containers. @package iterable @version 2.0 -- | Declares Iterable class for handling multi-level, heterogeneous, -- monomorphic collections that allow nested iteration. module Data.Iterable -- | Class for iterating all nested components b of type -- a. class Iterable a b where itmap f e = runIdentity $ itmapM (return . f) e itmapM :: (Iterable a b, Monad m) => (b -> m b) -> a -> m a itmap :: Iterable a b => (b -> b) -> a -> a itfoldM :: (Iterable a b, Monad m) => (c -> b -> m c) -> c -> a -> m c itfoldr :: Iterable a b => (b -> c -> c) -> c -> a -> c itfoldl :: Iterable a b => (c -> b -> c) -> c -> a -> c itfoldl' :: Iterable a b => (c -> b -> c) -> c -> a -> c itlength :: Iterable a b => b -> a -> Int -- | Helpers for instantiating transitive and reflexive instances of -- Iterable. module Data.Iterable.Instantiate -- | Generates convenience function for iterating over a single object. -- self_iterable typA = gen_iterable typA typA [e| id |] [e| L.singleton -- |] self_iterable :: Q Type -> DecsQ -- | Generates a transitive instance of Iterable between $typA and -- $typC, assuming existence of Iterable $typA $typB, and -- Iterable $typB $typC. trans_iterable :: Q Type -> Q Type -> Q Type -> DecsQ -- | Helpers for instantiating Iterable for types with Vector containers. module Data.Iterable.Instantiate.Vector -- | Generates a direct instance of iterable between $typA and $typB with -- given names of getter and setter, so that: $getter :: $typA -> -- $typB $setter :: $typB -> $typA -> $typA gen_vector_iterable :: Q Type -> Q Type -> Q Exp -> Q Exp -> DecsQ