netwire-5.0.3: Functional reactive programming library

Copyright | (c) 2013 Ertugrul Soeylemez
License | BSD3
Maintainer | Ertugrul Soeylemez <es@ertes.de>
Safe Haskell | None
Language | Haskell2010

Control.Wire.Interval

Contents

- Basic intervals
- Time intervals
- Signal analysis
- Event-based intervals

Description

Synopsis

- inhibit :: forall e s (m :: Type -> Type) a b. e -> Wire s e m a b
- after :: forall t s e (m :: Type -> Type) a. (HasTime t s, Monoid e) => t -> Wire s e m a a
- for :: forall t s e (m :: Type -> Type) a. (HasTime t s, Monoid e) => t -> Wire s e m a a
- unless :: forall e a s (m :: Type -> Type). Monoid e => (a -> Bool) -> Wire s e m a a
- when :: forall e a s (m :: Type -> Type). Monoid e => (a -> Bool) -> Wire s e m a a
- asSoonAs :: forall e s (m :: Type -> Type) a. Monoid e => Wire s e m (Event a) a
- between :: forall e s (m :: Type -> Type) a b c. Monoid e => Wire s e m (a, Event b, Event c) a
- hold :: forall e s (m :: Type -> Type) a. Monoid e => Wire s e m (Event a) a
- holdFor :: forall t s e (m :: Type -> Type) a. (HasTime t s, Monoid e) => t -> Wire s e m (Event a) a
- until :: forall e s (m :: Type -> Type) a b. Monoid e => Wire s e m (a, Event b) a

# Basic intervals

inhibit :: forall e s (m :: Type -> Type) a b. e -> Wire s e m a b Source #

Inhibit forever with the given value.

- Inhibits: always.

# Time intervals

after :: forall t s e (m :: Type -> Type) a. (HasTime t s, Monoid e) => t -> Wire s e m a a Source #

After the given time period.

- Depends: now after the given time period.
- Inhibits: for the given time period.

for :: forall t s e (m :: Type -> Type) a. (HasTime t s, Monoid e) => t -> Wire s e m a a Source #

For the given time period.

- Depends: now for the given time period.
- Inhibits: after the given time period.

# Signal analysis

unless :: forall e a s (m :: Type -> Type). Monoid e => (a -> Bool) -> Wire s e m a a Source #

When the given predicate is false for the input signal.

- Depends: now.
- Inhibits: unless the predicate is false.

when :: forall e a s (m :: Type -> Type). Monoid e => (a -> Bool) -> Wire s e m a a Source #

When the given predicate is true for the input signal.

- Depends: now.
- Inhibits: when the predicate is false.

# Event-based intervals

asSoonAs :: forall e s (m :: Type -> Type) a. Monoid e => Wire s e m (Event a) a Source #

Alias for `hold`.

between :: forall e s (m :: Type -> Type) a b c. Monoid e => Wire s e m (a, Event b, Event c) a Source #

Start each time the left event occurs, stop each time the right event occurs.

- Depends: now when active.
- Inhibits: after the right event occurred, before the left event occurs.

hold :: forall e s (m :: Type -> Type) a. Monoid e => Wire s e m (Event a) a Source #

Start when the event occurs for the first time reflecting its latest value.

- Depends: now.
- Inhibits: until the event occurs for the first time.

holdFor :: forall t s e (m :: Type -> Type) a. (HasTime t s, Monoid e) => t -> Wire s e m (Event a) a Source #

Hold each event occurrence for the given time period. Inhibits when no event occurred for the given amount of time. New occurrences override old occurrences, even when they are still held.

- Depends: now.
- Inhibits: when no event occurred for the given amount of time.

until :: forall e s (m :: Type -> Type) a b. Monoid e => Wire s e m (a, Event b) a Source #

Produce until the given event occurs. When it occurs, inhibit with its value forever.

- Depends: now until event occurs.
- Inhibits: forever after event occurs.