Maintainer | bastiaan.heeren@ou.nl |
---|---|
Stability | provisional |
Portability | portable (depends on ghc) |
Safe Haskell | None |
Language | Haskell98 |
- data Strategy a
- class IsStrategy f where
- toStrategy :: f a -> Strategy a
- data LabeledStrategy a
- label :: (IsId l, IsStrategy f) => l -> f a -> LabeledStrategy a
- unlabel :: LabeledStrategy a -> Strategy a
- derivationList :: IsStrategy f => (Rule a -> Rule a -> Ordering) -> f a -> a -> [Derivation (Rule a, Environment) a]
- emptyPrefix :: IsStrategy f => f a -> a -> Prefix a
- replayPath :: IsStrategy f => Path -> f a -> a -> ([Step a], Prefix a)
- replayPaths :: IsStrategy f => [Path] -> f a -> a -> Prefix a
- replayStrategy :: (Monad m, IsStrategy f) => Path -> f a -> a -> m (a, Prefix a)
- rulesInStrategy :: IsStrategy f => f a -> [Rule a]
- mapRules :: (Rule a -> Rule b) -> LabeledStrategy a -> LabeledStrategy b
- mapRulesS :: (Rule a -> Rule b) -> Strategy a -> Strategy b
- cleanUpStrategy :: (a -> a) -> LabeledStrategy a -> LabeledStrategy a
- cleanUpStrategyAfter :: (a -> a) -> LabeledStrategy a -> LabeledStrategy a
- toCore :: IsStrategy f => f a -> Core a
- fromCore :: Core a -> Strategy a
- liftCore :: IsStrategy f => (Core a -> Core a) -> f a -> Strategy a
- liftCore2 :: (IsStrategy f, IsStrategy g) => (Core a -> Core a -> Core a) -> f a -> g a -> Strategy a
- noInterleaving :: IsStrategy f => f a -> Strategy a
Documentation
Abstract data type for strategies
class IsStrategy f where Source
Type class to turn values into strategies
toStrategy :: f a -> Strategy a Source
data LabeledStrategy a Source
A strategy which is labeled with an identifier
label :: (IsId l, IsStrategy f) => l -> f a -> LabeledStrategy a Source
unlabel :: LabeledStrategy a -> Strategy a Source
Removes the label from a strategy
derivationList :: IsStrategy f => (Rule a -> Rule a -> Ordering) -> f a -> a -> [Derivation (Rule a, Environment) a] Source
emptyPrefix :: IsStrategy f => f a -> a -> Prefix a Source
Construct the empty prefix for a labeled strategy
replayPath :: IsStrategy f => Path -> f a -> a -> ([Step a], Prefix a) Source
Construct a prefix for a path and a labeled strategy. The third argument is the current term.
replayPaths :: IsStrategy f => [Path] -> f a -> a -> Prefix a Source
Construct a prefix for a list of paths and a labeled strategy. The third argument is the current term.
replayStrategy :: (Monad m, IsStrategy f) => Path -> f a -> a -> m (a, Prefix a) Source
Construct a prefix for a path and a labeled strategy. The third argument is the initial term.
rulesInStrategy :: IsStrategy f => f a -> [Rule a] Source
Returns a list of all major rules that are part of a labeled strategy
mapRules :: (Rule a -> Rule b) -> LabeledStrategy a -> LabeledStrategy b Source
Apply a function to all the rules that make up a labeled strategy
cleanUpStrategy :: (a -> a) -> LabeledStrategy a -> LabeledStrategy a Source
Use a function as do-after hook for all rules in a labeled strategy, but also use the function beforehand
cleanUpStrategyAfter :: (a -> a) -> LabeledStrategy a -> LabeledStrategy a Source
Use a function as do-after hook for all rules in a labeled strategy
toCore :: IsStrategy f => f a -> Core a Source
liftCore2 :: (IsStrategy f, IsStrategy g) => (Core a -> Core a -> Core a) -> f a -> g a -> Strategy a Source
noInterleaving :: IsStrategy f => f a -> Strategy a Source