Copyright | (c) Hanzhong Xu, Meng Meng 2016, |
---|---|
License | MIT License |
Maintainer | hanzh.xu@gmail.com |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe |
Language | Haskell2010 |
Arrowized functional state machines.
This module is inspired by Yampa and the paper Functional Reactive Programming, Continued* written by Henrik Nilsson, Antony Courtney and John Peterson.
Documentation
module Control.Arrow
The SM
type
SM
is a type representing a state machine.
The SMState
type
Constructors
simpleSM :: s -> (s -> a -> (s, b)) -> SM a b Source
simpleSM is to build a simple SM which have only one SMState.
Basic State Machines
High order functions
execSM :: SM a b -> SM [a] [b] Source
execSM converts SM a b -> SM [a] [b], it is very useful to compose SM a [b] and SM b c to SM a [c].