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

Copyright2011-2012 Universiteit Utrecht, University of Oxford
LicenseBSD3
Maintainergenerics@haskell.org
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell98

Generics.Deriving.Uniplate

Contents

Description

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

Synopsis

Documentation

class Uniplate a where Source

Minimal complete definition

Nothing

Methods

children :: a -> [a] Source

context :: a -> [a] -> a Source

descend :: (a -> a) -> a -> a Source

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

transform :: (a -> a) -> a -> a Source

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

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 -> a Source

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

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

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

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

Default definitions

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

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

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

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

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

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