AFSM-0.1.1.1: Arrowized functional state machines

Copyright(c) Hanzhong Xu 2016,
LicenseMIT License
Maintainerhanzh.xu@gmail.com
Stabilityexperimental
Portabilityportable
Safe HaskellSafe
LanguageHaskell2010

Control.AFSM

Contents

Description

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.

Synopsis

Documentation

The SM type

data SM a b Source

SM is a type representing a state machine.

The SMState type

type SMState r a b = r -> a -> (SM a b, b) Source

Constructors

newSM :: r -> SMState r a b -> SM a b Source

simpleSM :: r -> (r -> a -> (r, b)) -> SM a b Source

High order functions

execSM :: SM a b -> SM [a] [b] Source

Evaluation

exec :: SM a b -> [a] -> (SM a b, [b]) Source