generic-deriving-1.6.2: Generic programming library for generalised deriving.

Portabilitynon-portable
Stabilityexperimental
Maintainergenerics@haskell.org
Safe HaskellNone

Generics.Deriving.Uniplate

Contents

Description

Summary: Functions inspired by the Uniplate generic programming library, mostly implemented by Sean Leather.

Synopsis

Documentation

class Uniplate a whereSource

Methods

children :: a -> [a]Source

context :: a -> [a] -> aSource

descend :: (a -> a) -> a -> aSource

descendM :: Monad m => (a -> m a) -> a -> m aSource

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

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

Instances

Uniplate Bool 
Uniplate Char 
Uniplate Double 
Uniplate Float 
Uniplate Int 
Uniplate () 
Uniplate [a] 
Uniplate (Maybe a) 
Uniplate (Either a b) 
Uniplate (b, c) 
Uniplate (b, c, d) 
Uniplate (b, c, d, e) 
Uniplate (b, c, d, e, f) 
Uniplate (b, c, d, e, f, g) 
Uniplate (b, c, d, e, f, g, h) 

Derived functions

uniplate :: Uniplate a => a -> ([a], [a] -> a)Source

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

rewrite :: Uniplate a => (a -> Maybe a) -> a -> aSource

rewriteM :: (Monad m, Uniplate a) => (a -> m (Maybe a)) -> a -> m aSource

contexts :: Uniplate a => a -> [(a, a -> a)]Source

holes :: Uniplate a => a -> [(a, a -> a)]Source

para :: Uniplate a => (a -> [r] -> r) -> a -> rSource

Default definitions

childrendefault :: (Generic a, Uniplate' (Rep a) a) => a -> [a]Source

contextdefault :: (Generic a, Context' (Rep a) a) => a -> [a] -> aSource

descenddefault :: (Generic a, Uniplate' (Rep a) a) => (a -> a) -> a -> aSource

descendMdefault :: (Generic a, Uniplate' (Rep a) a, Monad m) => (a -> m a) -> a -> m aSource

transformdefault :: (Generic a, Uniplate' (Rep a) a) => (a -> a) -> a -> aSource

transformMdefault :: (Generic a, Uniplate' (Rep a) a, Monad m) => (a -> m a) -> a -> m aSource