Portability | non-portable |
---|---|
Stability | experimental |
Maintainer | generics@haskell.org |
Safe Haskell | None |
Summary: Functions inspired by the Uniplate generic programming library, mostly implemented by Sean Leather.
- class Uniplate a where
- uniplate :: Uniplate a => a -> ([a], [a] -> a)
- universe :: Uniplate a => a -> [a]
- rewrite :: Uniplate a => (a -> Maybe a) -> a -> a
- rewriteM :: (Monad m, Uniplate a) => (a -> m (Maybe a)) -> a -> m a
- contexts :: Uniplate a => a -> [(a, a -> a)]
- holes :: Uniplate a => a -> [(a, a -> a)]
- para :: Uniplate a => (a -> [r] -> r) -> a -> r
- childrendefault :: (Generic a, Uniplate' (Rep a) a) => a -> [a]
- contextdefault :: (Generic a, Context' (Rep a) a) => a -> [a] -> a
- descenddefault :: (Generic a, Uniplate' (Rep a) a) => (a -> a) -> a -> a
- descendMdefault :: (Generic a, Uniplate' (Rep a) a, Monad m) => (a -> m a) -> a -> m a
- transformdefault :: (Generic a, Uniplate' (Rep a) a) => (a -> a) -> a -> a
- transformMdefault :: (Generic a, Uniplate' (Rep a) a, Monad m) => (a -> m a) -> a -> m a
Documentation
Derived functions
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