Maintainer | bastiaan.heeren@ou.nl |
---|---|
Stability | provisional |
Portability | portable (depends on ghc) |
Safe Haskell | None |
Language | Haskell98 |
Representation of a strategy as a cyclic tree with explicit fixed-points. The nodes in the tree are named strategy combinators. The leafs are rules.
- type StrategyTree a = CyclicTree (Decl Nary) (Rule a)
- data Decl f
- type Combinator f = forall a. f (Process (Rule a))
- associative :: Decl f -> Decl f
- isAssociative :: Decl f -> Bool
- combinator :: Decl f -> Combinator f
- (.=.) :: IsId n => n -> Combinator f -> Decl f
- applyDecl :: Arity f => Decl f -> f (StrategyTree a)
- class Arity f where
- listify :: f a -> [a] -> Maybe a
- toArity :: ([a] -> a) -> f a
- liftIso :: Isomorphism a b -> f a -> f b
- data Nullary a = Nullary {
- fromNullary :: a
- data Unary a = Unary {
- fromUnary :: a -> a
- data Binary a = Binary {
- fromBinary :: a -> a -> a
- data Nary a = Nary {
- fromNary :: [a] -> a
StrategyTree type synonym
type StrategyTree a = CyclicTree (Decl Nary) (Rule a) Source
Declarations (named combinators)
type Combinator f = forall a. f (Process (Rule a)) Source
associative :: Decl f -> Decl f Source
isAssociative :: Decl f -> Bool Source
combinator :: Decl f -> Combinator f Source
(.=.) :: IsId n => n -> Combinator f -> Decl f infix 1 Source
applyDecl :: Arity f => Decl f -> f (StrategyTree a) Source