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

Safe Haskell | Safe-Inferred
Language | Haskell2010

Data.Generics.Biplate

Description

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

Requires multi-parameter type classes, so is no longer Haskell 98. These operations are easier to use and construct than the equivalent Data.Generics.UniplateStrOn methods, but perform the same operation.

It is recommended that instead of importing this module, you import one of the following modules, to construct instances:

- Data.Generics.PlateDirect - does not require overlapping instances, highest performance but requires O(n^2) instances in the worst case.
- Data.Generics.PlateTypeable - requires the Data.Typeable class for all data structures.
- Data.Generics.PlateData - requires Data.Generics and the `Data` class, which is only available on GHC, but automatically infers instances.

Synopsis

- module Data.Generics.UniplateStrOn
- class Uniplate to => Biplate from to where
  - biplate :: BiplateType from to
- descendBi :: Biplate from to => (to -> to) -> from -> from
- descendBiM :: (Monad m, Biplate from to) => (to -> m to) -> from -> m from
- universeBi :: Biplate from to => from -> [to]
- childrenBi :: Biplate from to => from -> [to]
- transformBi :: Biplate from to => (to -> to) -> from -> from
- transformBiM :: (Monad m, Biplate from to) => (to -> m to) -> from -> m from
- rewriteBi :: Biplate from to => (to -> Maybe to) -> from -> from
- rewriteBiM :: (Monad m, Biplate from to) => (to -> m (Maybe to)) -> from -> m from
- contextsBi :: Biplate from to => from -> [(to, to -> from)]
- holesBi :: Biplate from to => from -> [(to, to -> from)]
- biplateList :: Biplate from to => from -> ([to], [to] -> from)

# Documentation

module Data.Generics.UniplateStrOn

class Uniplate to => Biplate from to where #

Children are defined as the top-most items of type to starting at the root.

Methods

biplate :: BiplateType from to #

#### Instances

Instances details

(Typeable a, Typeable b, Uniplate b, PlateAll a b) => Biplate a b # |
Instance details Defined in Data.Generics.PlateTypeable Methods biplate :: BiplateType a b #
(Data a, Data b, Uniplate b, Typeable a, Typeable b) => Biplate a b # |
Instance details Defined in Data.Generics.PlateData Methods biplate :: BiplateType a b #

descendBi :: Biplate from to => (to -> to) -> from -> from #

descendBiM :: (Monad m, Biplate from to) => (to -> m to) -> from -> m from #

universeBi :: Biplate from to => from -> [to] #

childrenBi :: Biplate from to => from -> [to] #

transformBi :: Biplate from to => (to -> to) -> from -> from #

transformBiM :: (Monad m, Biplate from to) => (to -> m to) -> from -> m from #

rewriteBi :: Biplate from to => (to -> Maybe to) -> from -> from #

rewriteBiM :: (Monad m, Biplate from to) => (to -> m (Maybe to)) -> from -> m from #

contextsBi :: Biplate from to => from -> [(to, to -> from)] #

holesBi :: Biplate from to => from -> [(to, to -> from)] #

biplateList :: Biplate from to => from -> ([to], [to] -> from) #

Compatibility method, for direct users of the `biplate` function