| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
WidgetRattus.Channels
Documentation
class Producer p a | p -> a where Source #
A type p satisfying Producer p a is essentially a signal that
produces values of type a but it might not produce such values at
each tick.
Methods
getCurrent :: p -> Maybe' a Source #
Get the current value of the producer if any.
getNext :: p -> (forall q. Producer q a => O q -> b) -> b Source #
Get the next state of the producer. Morally, the type of this method should be
getNext :: p -> (exists q. Producer q a => O q)
We encode the existential type using continuation-passing style.