netwire-5.0.1: Functional reactive programming library

Copyright(c) 2013 Ertugrul Soeylemez
LicenseBSD3
MaintainerErtugrul Soeylemez <es@ertes.de>
Safe HaskellNone
LanguageHaskell2010

Control.Wire.Unsafe.Event

Contents

Description

 

Synopsis

Events

data Event a Source

Denotes a stream of values, each together with time of occurrence. Since Event is commonly used for functional reactive programming it does not define most of the usual instances to protect continuous time and discrete event occurrence semantics.

Constructors

Event a 
NoEvent 

Instances

Helper functions

event :: b -> (a -> b) -> Event a -> b Source

Fold the given event.

merge :: (a -> a -> a) -> Event a -> Event a -> Event a Source

Merge two events using the given function when both occur at the same time.

occurred :: Event a -> Bool Source

Did the given event occur?

onEventM :: Monad m => (a -> m b) -> Wire s e m (Event a) (Event b) Source

Each time the given event occurs, perform the given action with the value the event carries. The resulting event carries the result of the action.

  • Depends: now.