geniplate-0.5.0.0: Use template Haskell to generate Uniplate-like functions.

Data.Generics.Geniplate

Synopsis

Documentation

genUniverseBi :: Name -> Q ExpSource

Generate TH code for a function that extracts all subparts of a certain type. The argument to genUniverseBi is a name with the type S -> [T], for some types S and T. The function will extract all subparts of type T from S.

genUniverseBiT :: [TypeQ] -> Name -> Q ExpSource

Same as genUniverseBi, but does not look inside any types mention in the list of types.

genTransformBi :: Name -> Q ExpSource

Generate TH code for a function that transforms all subparts of a certain type. The argument to genTransformBi is a name with the type (S->S) -> T -> T, for some types S and T. The function will transform all subparts of type S inside T using the given function.

genTransformBiT :: [TypeQ] -> Name -> Q ExpSource

Same as genTransformBi, but does not look inside any types mention in the list of types.

class UniverseBi s t whereSource

Methods

universeBi :: s -> [t]Source

universe :: UniverseBi a a => a -> [a]Source

class TransformBi s t whereSource

Methods

transformBi :: (s -> s) -> t -> tSource

transform :: TransformBi a a => (a -> a) -> a -> aSource

class TransformBiM m s t whereSource

Methods

transformBiM :: (s -> m s) -> t -> m tSource

transformM :: TransformBiM m a a => (a -> m a) -> a -> m aSource