| |||||||||||||||||||||||
| |||||||||||||||||||||||
| Description | |||||||||||||||||||||||
SYB compatibility layer. This module serves as a drop-in replacement in some situations for some of the SYB operations. Users should also import Data.Generics.Uniplate.Data. SYB is described in the paper: "Scrap your boilerplate: a practical design pattern for generic programming" by Ralf Lammel and Simon Peyton Jones. | |||||||||||||||||||||||
| Synopsis | |||||||||||||||||||||||
| |||||||||||||||||||||||
| Documentation | |||||||||||||||||||||||
| gmapT :: Uniplate a => (a -> a) -> a -> a | |||||||||||||||||||||||
gmapT == descend | |||||||||||||||||||||||
| gmapQl :: Uniplate a => (r -> r' -> r) -> r -> (a -> r') -> a -> r | |||||||||||||||||||||||
| Use children and foldl | |||||||||||||||||||||||
| gmapQr :: Uniplate a => (r' -> r -> r) -> r -> (a -> r') -> a -> r | |||||||||||||||||||||||
| Use children and foldr | |||||||||||||||||||||||
| gmapQ :: Uniplate a => (a -> u) -> a -> [u] | |||||||||||||||||||||||
| Use children | |||||||||||||||||||||||
| gmapQi :: Uniplate a => Int -> (a -> u) -> a -> u | |||||||||||||||||||||||
| Use children and !! | |||||||||||||||||||||||
| gmapM :: (Uniplate a, Monad m) => (a -> m a) -> a -> m a | |||||||||||||||||||||||
gmapM == descendM | |||||||||||||||||||||||
| mkT :: (a -> a) -> a -> a | |||||||||||||||||||||||
mkT == id | |||||||||||||||||||||||
| everywhere :: Biplate b a => (a -> a) -> b -> b | |||||||||||||||||||||||
everywhere == transformBi | |||||||||||||||||||||||
| mkM :: Monad m => (a -> m a) -> a -> m a | |||||||||||||||||||||||
mkM == id | |||||||||||||||||||||||
| everywhereM :: (Biplate b a, Monad m) => (a -> m a) -> b -> m b | |||||||||||||||||||||||
everywhereM == transformBiM | |||||||||||||||||||||||
| mkQ :: r -> (a -> r) -> (r, a -> r) | |||||||||||||||||||||||
| Only for use with everything | |||||||||||||||||||||||
| everything :: Biplate b a => (r -> r -> r) -> (r, a -> r) -> b -> r | |||||||||||||||||||||||
Use universe or universeBi, perhaps followed by a fold. Not an exact equivalent to the SYB everything, as the operators may be applied in different orders. | |||||||||||||||||||||||
| Produced by Haddock version 2.7.2 |