Copyright | (C) 2012 Edward Kmett |
---|---|
License | BSD-style (see the file LICENSE) |
Maintainer | Edward Kmett <ekmett@gmail.com> |
Stability | provisional |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Documentation
Mealy
machines
Examples
We can enumerate inputs:
>>>
let countingMealy = unfoldMealy (\i x -> ((i, x), i + 1)) 0
>>>
run (auto countingMealy <~ source "word")
[(0,'w'),(1,'o'),(2,'r'),(3,'d')]
Arrow Mealy Source # | |
ArrowChoice Mealy Source # | |
ArrowApply Mealy Source # | |
Corepresentable Mealy Source # | |
Closed Mealy Source # | |
Choice Mealy Source # | |
Strong Mealy Source # | |
Costrong Mealy Source # | |
Profunctor Mealy Source # | |
Automaton Mealy Source # | |
Cosieve Mealy NonEmpty Source # | |
Monad (Mealy a) Source # | slow diagonalization |
Functor (Mealy a) Source # | |
MonadFix (Mealy a) Source # | |
Applicative (Mealy a) Source # | |
Distributive (Mealy a) Source # | |
Representable (Mealy a) Source # | |
MonadZip (Mealy a) Source # | |
Pointed (Mealy a) Source # | |
Extend (Mealy a) Source # | |
Category * Mealy Source # | |
MonadReader (NonEmpty a) (Mealy a) Source # | |
type Corep Mealy Source # | |
type Rep (Mealy a) Source # | |
unfoldMealy :: (s -> a -> (b, s)) -> s -> Mealy a b Source #
A Mealy
machine modeled with explicit state.