Maintainer | bastiaan.heeren@ou.nl |
---|---|
Stability | provisional |
Portability | portable (depends on ghc) |
Safe Haskell | Safe-Inferred |
Language | Haskell98 |
Processes must support choices and sequences. This module defines a type class, an implementation, and utility functions.
- class (Choice f, Sequence f) => IsProcess f where
- data Process a
- menu :: Firsts s => s -> Menu (MenuItem (Elem s) s)
- eqProcessBy :: (a -> a -> Bool) -> Process a -> Process a -> Bool
- data Builder a
- ready :: Firsts s => s -> Bool
- stopped :: Firsts s => s -> Bool
- firsts :: Firsts s => s -> [(Elem s, s)]
- fold :: Choice f => (a -> f b -> f b) -> f b -> Process a -> f b
- accum :: (a -> b -> [b]) -> b -> Process a -> Menu b
- scan :: (s -> a -> [(s, b)]) -> s -> Process a -> Process b
- prune :: (a -> Bool) -> Process a -> Process a
IsProcess type class
Process data type
menu :: Firsts s => s -> Menu (MenuItem (Elem s) s) Source
The menu offers single steps (with the remainder) and done
steps.
eqProcessBy :: (a -> a -> Bool) -> Process a -> Process a -> Bool Source
Generalized equality of processes, which takes an equality function for the symbols.