Maintainer | Ralf Laemmel, Joost Visser |
---|---|
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell98 |
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.
- 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 Source #
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 Source #
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 Source #
Apply a transformation strictly below a node where a condition holds.
beloweqTP :: MonadPlus m => TP m -> TU () m -> TP m Source #
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 Source #
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 Source #
Select or transform a node above or at a node where a condition holds.