StrategyLib-4.0.0.0ContentsIndex
Data.Generics.Strafunski.StrategyLib.PathTheme
Portabilityportable
Stabilityexperimental
MaintainerRalf Laemmel, Joost Visser
Contents
Below
Strictly below
Below or at the same height
Type-specialised versions
Above
Strictly above
Above or at the same height
Type-specialised versions
Description
This module is part of StrategyLib, a library of functional strategy combinators, including combinators for generic traversal. In this module, we define path combinator to constrain selection and transformation of nodes or subtrees by path conditions.
Synopsis
belowS :: (MonadPlus m, Strategy s m, StrategyPlus s m) => s m -> TU () m -> s m
beloweqS :: (MonadPlus m, Strategy s m, StrategyPlus s m) => s m -> TU () m -> s m
belowTP :: MonadPlus m => TP m -> TU () m -> TP m
beloweqTP :: MonadPlus m => TP m -> TU () m -> TP m
aboveS :: (MonadPlus m, Strategy s m, StrategyPlus s m) => s m -> TU () m -> s m
aboveeqS :: (MonadPlus m, Strategy s m, StrategyPlus s m) => s m -> TU () m -> s m
aboveTP :: MonadPlus m => TP m -> TU () m -> TP m
aboveeqTP :: MonadPlus m => TP m -> TU () m -> TP m
Below
Strictly below
belowS :: (MonadPlus m, Strategy s m, StrategyPlus s m) => s m -> TU () m -> s m
Select or transform a node below a node where a condition holds. We find the top-most node which admits selection or transformation below the top-most node which meets the condition. Thus, the distance between guard and application node is minimized.
Below or at the same height
beloweqS :: (MonadPlus m, Strategy s m, StrategyPlus s m) => s m -> TU () m -> s m
Select or transform a node below or at a node where a condition holds.
Type-specialised versions
belowTP :: MonadPlus m => TP m -> TU () m -> TP m
Apply a transformation strictly below a node where a condition holds.
beloweqTP :: MonadPlus m => TP m -> TU () m -> TP m
Apply a transformation below or at a node where a condition holds.
Above
Strictly above
aboveS :: (MonadPlus m, Strategy s m, StrategyPlus s m) => s m -> TU () m -> s m
Select or transform a node above a node where a condition holds. The distance between guard and application node is minimized.
Above or at the same height
aboveeqS :: (MonadPlus m, Strategy s m, StrategyPlus s m) => s m -> TU () m -> s m
Select or transform a node above or at a node where a condition holds.
Type-specialised versions
aboveTP :: MonadPlus m => TP m -> TU () m -> TP m
Apply a transformation strictly above a node where a condition holds.
aboveeqTP :: MonadPlus m => TP m -> TU () m -> TP m
Apply a transformation above or at a node where a condition holds.
Produced by Haddock version 0.8