Rattus-0.5: A modal FRP language
Safe HaskellNone
LanguageHaskell2010

Rattus.ToHaskell

Description

Helper functions to convert streams and signal functions from Rattus into Haskell.

Synopsis

Documentation

runTransducer :: (Str a -> Str b) -> Trans a b Source #

Turn a stream function into a state machine.

runSF :: SF a b -> Trans (a, Double) b Source #

Turn a signal function into a state machine from inputs of type a and time (since last input) to output of type b.

fromStr :: Str a -> [a] Source #

Turns a stream into a lazy infinite list.

toStr :: [a] -> Str a Source #

Turns a lazy infinite list into a stream.

data Trans a b Source #

A state machine that takes inputs of type a and produces output of type b. In addition to the output of type b the underlying function also returns the new state of the state machine.

Constructors

Trans (a -> (b, Trans a b))