machines-0.6.4: Networked stream transducers

Copyright(C) 2012 Edward Kmett
LicenseBSD-style (see the file LICENSE)
MaintainerEdward Kmett <ekmett@gmail.com>
Stabilityprovisional
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Data.Machine.Moore

Description

Synopsis

Documentation

data Moore a b Source #

Moore machines

Constructors

Moore b (a -> Moore a b) 
Instances
Profunctor Moore Source # 
Instance details

Defined in Data.Machine.Moore

Methods

dimap :: (a -> b) -> (c -> d) -> Moore b c -> Moore a d #

lmap :: (a -> b) -> Moore b c -> Moore a c #

rmap :: (b -> c) -> Moore a b -> Moore a c #

(#.) :: Coercible c b => q b c -> Moore a b -> Moore a c #

(.#) :: Coercible b a => Moore b c -> q a b -> Moore a c #

Corepresentable Moore Source # 
Instance details

Defined in Data.Machine.Moore

Associated Types

type Corep Moore :: * -> * #

Methods

cotabulate :: (Corep Moore d -> c) -> Moore d c #

Closed Moore Source # 
Instance details

Defined in Data.Machine.Moore

Methods

closed :: Moore a b -> Moore (x -> a) (x -> b) #

Costrong Moore Source # 
Instance details

Defined in Data.Machine.Moore

Methods

unfirst :: Moore (a, d) (b, d) -> Moore a b #

unsecond :: Moore (d, a) (d, b) -> Moore a b #

Automaton Moore Source # 
Instance details

Defined in Data.Machine.Moore

Methods

auto :: Moore a b -> Process a b Source #

Cosieve Moore [] Source # 
Instance details

Defined in Data.Machine.Moore

Methods

cosieve :: Moore a b -> [a] -> b #

Monad (Moore a) Source #

slow diagonalization

Instance details

Defined in Data.Machine.Moore

Methods

(>>=) :: Moore a a0 -> (a0 -> Moore a b) -> Moore a b #

(>>) :: Moore a a0 -> Moore a b -> Moore a b #

return :: a0 -> Moore a a0 #

fail :: String -> Moore a a0 #

Functor (Moore a) Source # 
Instance details

Defined in Data.Machine.Moore

Methods

fmap :: (a0 -> b) -> Moore a a0 -> Moore a b #

(<$) :: a0 -> Moore a b -> Moore a a0 #

MonadFix (Moore a) Source # 
Instance details

Defined in Data.Machine.Moore

Methods

mfix :: (a0 -> Moore a a0) -> Moore a a0 #

Applicative (Moore a) Source # 
Instance details

Defined in Data.Machine.Moore

Methods

pure :: a0 -> Moore a a0 #

(<*>) :: Moore a (a0 -> b) -> Moore a a0 -> Moore a b #

liftA2 :: (a0 -> b -> c) -> Moore a a0 -> Moore a b -> Moore a c #

(*>) :: Moore a a0 -> Moore a b -> Moore a b #

(<*) :: Moore a a0 -> Moore a b -> Moore a a0 #

Distributive (Moore a) Source # 
Instance details

Defined in Data.Machine.Moore

Methods

distribute :: Functor f => f (Moore a a0) -> Moore a (f a0) #

collect :: Functor f => (a0 -> Moore a b) -> f a0 -> Moore a (f b) #

distributeM :: Monad m => m (Moore a a0) -> Moore a (m a0) #

collectM :: Monad m => (a0 -> Moore a b) -> m a0 -> Moore a (m b) #

Representable (Moore a) Source # 
Instance details

Defined in Data.Machine.Moore

Associated Types

type Rep (Moore a) :: * #

Methods

tabulate :: (Rep (Moore a) -> a0) -> Moore a a0 #

index :: Moore a a0 -> Rep (Moore a) -> a0 #

MonadZip (Moore a) Source # 
Instance details

Defined in Data.Machine.Moore

Methods

mzip :: Moore a a0 -> Moore a b -> Moore a (a0, b) #

mzipWith :: (a0 -> b -> c) -> Moore a a0 -> Moore a b -> Moore a c #

munzip :: Moore a (a0, b) -> (Moore a a0, Moore a b) #

Comonad (Moore a) Source # 
Instance details

Defined in Data.Machine.Moore

Methods

extract :: Moore a a0 -> a0 #

duplicate :: Moore a a0 -> Moore a (Moore a a0) #

extend :: (Moore a a0 -> b) -> Moore a a0 -> Moore a b #

ComonadApply (Moore a) Source # 
Instance details

Defined in Data.Machine.Moore

Methods

(<@>) :: Moore a (a0 -> b) -> Moore a a0 -> Moore a b #

(@>) :: Moore a a0 -> Moore a b -> Moore a b #

(<@) :: Moore a a0 -> Moore a b -> Moore a a0 #

Pointed (Moore a) Source # 
Instance details

Defined in Data.Machine.Moore

Methods

point :: a0 -> Moore a a0 #

Copointed (Moore a) Source # 
Instance details

Defined in Data.Machine.Moore

Methods

copoint :: Moore a a0 -> a0 #

MonadReader [a] (Moore a) Source # 
Instance details

Defined in Data.Machine.Moore

Methods

ask :: Moore a [a] #

local :: ([a] -> [a]) -> Moore a a0 -> Moore a a0 #

reader :: ([a] -> a0) -> Moore a a0 #

type Corep Moore Source # 
Instance details

Defined in Data.Machine.Moore

type Corep Moore = []
type Rep (Moore a) Source # 
Instance details

Defined in Data.Machine.Moore

type Rep (Moore a) = [a]

logMoore :: Monoid m => Moore m m Source #

Accumulate the input as a sequence.

unfoldMoore :: (s -> (b, a -> s)) -> s -> Moore a b Source #

Construct a Moore machine from a state valuation and transition function