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. This module
overloads basic combinators to enable uniform treatment of TU and TP
strategies. The overloading scheme is motivated in the
"... Polymorphic Symphony" paper. The names in the present module
deviate from the paper in that they are postfixed by an "...S"
in order to rule out name clashes and to avoid labour-intensive
resolution. The class constraints in this module seem to be outrageous
but this has to do with a type inferencing bug for class hierarchies
in hugs. This bug is removed in the October 2002 release.
- class Monad m => Strategy s m where
- class (Strategy s m, Monad m, Term t) => StrategyApply s m t x | s t -> x where
- class (Monad m, Strategy s m) => StrategyMonoid s m where
- class (Strategy s m, Monad m, MonadPlus m) => StrategyPlus s m where
- monoS :: (StrategyApply s m t x, StrategyPlus s m) => (t -> m x) -> s m
- class StrategyMSubst s where
Unconstrained
class Monad m => Strategy s m where Source #
Overload completely unconstrained strategy combinators
class (Strategy s m, Monad m, Term t) => StrategyApply s m t x | s t -> x where Source #
Overload apply and adhoc combinators
Involving Monoid, MonadPlus,
class (Monad m, Strategy s m) => StrategyMonoid s m where Source #
Overload basic combinators which might involve a monoid
class (Strategy s m, Monad m, MonadPlus m) => StrategyPlus s m where Source #
Overload basic combinators which involve MonadPlus
monoS :: (StrategyApply s m t x, StrategyPlus s m) => (t -> m x) -> s m Source #
Overloaded lifting with failure