Source codeContentsIndex
GuardedEvents
Synopsis
data GuardedEvent guard a = GuardedEvent !(guard -> Event a) !guard
class (Guard guard) => HasGuard eventType guard where
(|>) :: eventType a -> guard -> eventType a
class Guard guard where
nullGuard :: guard
andGuard :: guard -> guard -> guard
class HasListen chan where
listen :: (Guard guard) => chan guard a -> GuardedEvent guard a
Documentation
data GuardedEvent guard a
A GuardedEvent guard a represents a source of values of type a, which may be selected from according to guards of type guard.
Constructors
GuardedEvent !(guard -> Event a) !guard
Instances
(Guard guard) => HasGuard (GuardedEvent guard) guard
(Guard guard) => HasEvent (GuardedEvent guard)
class (Guard guard) => HasGuard eventType guard where
Methods
(|>) :: eventType a -> guard -> eventType a
Instances
(Guard guard) => HasGuard (GuardedEvent guard) guard
class Guard guard where
A Guard represents some condition on a value which we impose on a channel, selecting those values we are interested in.
Methods
nullGuard :: guard
this should be the guard that always matches
andGuard :: guard -> guard -> guard
this should be the guard that corresponds to the conjunction of the two given guards.
Instances
(Ord key) => Guard (EqMatch key)
Guard (Match v)
Guard ()
class HasListen chan where
Class of those channels which have guarded events.
Methods
listen :: (Guard guard) => chan guard a -> GuardedEvent guard a
Instances
HasListen GuardedChannel
Produced by Haddock version 0.3