netwire-5.0.0: Functional reactive programming library

MaintainerErtugrul Soeylemez <>
Safe HaskellNone







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.


Event a 

Helper functions

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

Fold the given event.

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

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

occurred :: Event a -> BoolSource

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.