rhine-0.1.1.0: Functional Reactive Programming with type-level clocks

Safe HaskellNone
LanguageHaskell2010

FRP.Rhine.Clock.Select

Contents

Synopsis

Documentation

data SelectClock cl a Source #

A clock that selects certain subevents of type a, from the tag of a main clock.

Constructors

SelectClock 

Fields

  • mainClock :: cl

    The main clock | Return Nothing if no tick of the subclock is required, or 'Just a' if the subclock should tick, with tag a.

  • select :: Tag cl -> Maybe a
     

Instances

(Monad m, Clock m cl) => Clock m (SelectClock cl a) Source # 

Associated Types

type TimeDomainOf (SelectClock cl a) :: * Source #

type Tag (SelectClock cl a) :: * Source #

Methods

startClock :: SelectClock cl a -> m (MSF m () (TimeDomainOf (SelectClock cl a), Tag (SelectClock cl a)), TimeDomainOf (SelectClock cl a)) Source #

type TimeDomainOf (SelectClock cl _) Source # 
type Tag (SelectClock cl a) Source # 
type Tag (SelectClock cl a) = a

schedSelectClocks :: (Monad m, Monoid cl, Clock m cl) => Schedule m (SelectClock cl a) (SelectClock cl b) Source #

A universal schedule for two subclocks of the same main clock. The main clock must be a monoid (e.g. a singleton).

To be ported to dunai

concatS :: Monad m => MStream m [b] -> MStream m b Source #

filterS :: Monad m => MSF m () (Maybe b) -> MSF m () b Source #