uniplate-1.6.13: Help writing simple, concise and fast generic operations.
Safe HaskellNone
LanguageHaskell2010

Data.Generics.UniplateStrOn

Description

DEPRECATED: Use Data.Generics.Uniplate.Operations instead.

This module retained Haskell 98 compatability, but users who are happy with multi-parameter type classes should look towards Data.Generics.Biplate.

The only function missing from Data.Generics.Uniplate is fold, as it can be constructed from children and has little meaning in a multi-typed setting.

All operations, apart from childrenOn, descendOn and holesOn should perform identically to their non On counterparts.

Synopsis

Documentation

type BiplateType from to = from -> (Str to, Str to -> from) Source #

Return all the top most children of type to within from.

If from == to then this function should return the root as the single child.

universeOn :: Uniplate to => BiplateType from to -> from -> [to] Source #

childrenOn :: Uniplate to => BiplateType from to -> from -> [to] Source #

Return the children of a type. If to == from then it returns the original element (in contrast to children)

transformOn :: Uniplate to => BiplateType from to -> (to -> to) -> from -> from Source #

transformOnM :: (Monad m, Uniplate to) => BiplateType from to -> (to -> m to) -> from -> m from Source #

rewriteOn :: Uniplate to => BiplateType from to -> (to -> Maybe to) -> from -> from Source #

rewriteOnM :: (Monad m, Uniplate to) => BiplateType from to -> (to -> m (Maybe to)) -> from -> m from Source #

descendOn :: Uniplate to => BiplateType from to -> (to -> to) -> from -> from Source #

descendOnM :: (Monad m, Uniplate to) => BiplateType from to -> (to -> m to) -> from -> m from Source #

holesOn :: Uniplate to => BiplateType from to -> from -> [(to, to -> from)] Source #

contextsOn :: Uniplate to => BiplateType from to -> from -> [(to, to -> from)] Source #

uniplateOnList :: BiplateType a b -> BiplateType [a] b Source #

Used for defining instances UniplateFoo a => UniplateFoo [a]