úÎm“hãL      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJK experimentalconal@conal.net as a function Constant-optimized functions  experimentalconal@conal.net0Access a future value. Blocks until available. LBlock forever Make a  5 and a way to fill it. The filler should be invoked  only once. Make a  ", given a way to compute a value. MRace to extract a value. Run an N-action-valued  . Value available in the future.    experimentalconal@conal.net- <Reactive value from an initial value and a new-value event. !Apply a unary function inside an 89 representation. !Apply a unary function inside an 89 representation. O Merge two   streams into one.  Switch between reactive values. DMake an event and a sink for feeding the event. Each value sent to . the sink becomes an occurrence of the event. Tracing variant of  Show specialization of  Run an event in a new thread. 2Subscribe a listener to an event. Wrapper around  and P. $Run an event in the current thread. ERun a reactive value in a new thread. The initial action happens in  the current thread. 9Accumulating event, starting from an initial value and a " update-function event. See also $. Like Q for events. See also %. AAccumulate values from a monoid-valued event. Specialization of  , using R  and S  . See also &. EPair each event value with the previous one, given an initial value. BCount occurrences of an event, remembering the occurrence values.  See also . FCount occurrences of an event, forgetting the occurrence values. See  also  . See also ). ,Difference of successive event occurrences. 4Snapshot a reactive value whenever an event occurs. Like " but discarding event data (often a is ()). ?Filter an event according to whether a boolean source is true. 'Just the first occurrence of an event. !Tracing of events. "AMake an extensible event. The returned sink is a way to add new # events to mix. You can often use '(>>=)' or T  instead. Warning: / this function might be removed at some point. $EReactive value from an initial value and an updater event. See also  . %Like Q for reactive values. See also . &AAccumulate values from a monoid-valued event. Specialization of  , using R  and S  . See also . 'Start out blank (U ), latching onto each new a, and blanking  on each b5. If you just want to latch and not blank, then use  S  for lose. ('Flip-flopping source. Turns true when ea occurs and false when  eb occurs. ))Count occurrences of an event. See also . *Tracing of reactive values +*Replace a functor value with a given one. ,%Forget a functor value, replace with () - Pass through Just occurrences. .Pass through values satisfying p. / Value sink 0+Convenient alias for dropping parentheses. 1'Reactive behaviors. Simply a reactive ction value. Wrapped in  a type composition to get V and W  for free. 2Time for continuous behaviors 3?Compatibility synonym (for ease of transition from DataDriven) 4EReactive value: a discretely changing value. Reactive values can be H understood in terms of (a) a simple denotational semantics of reactive F values as functions of time, and (b) the corresponding instances for 4 functions. The semantics is given by the function (%$) :: Reactive a  -> (Time -> a)4. A reactive value also has a current value and an " event (stream of future values). Instances for 4  X : a typical lifted monoid. If o is a monoid, then   Reactive o is a monoid, with mempty = pure mempty, and  mappend =  liftA2 mappend. In other words, mempty %$ t == mempty, and (r  R  s) %$ t == (r %$ t) R  (s %$ t).  V: fmap f r %$ t == f (r %$ t).  W : pure a %$ t == a, and (s <*> r) %$ t ==  (s %$ t) (r %$ t).  Y: return a %$ t == a, and join rr %$ t == (rr %$ t)  %$ t. As always, (r >>= f) == join (fmap f r). 6initial value 7waiting for event 84Event, i.e., a stream of future values. Instances:  X : S % is the event that never occurs, and e R   e'- is the event that combines occurrences from e and e'. (Fran's  neverE and (.|.).)  V: fmap f e# is the event that occurs whenever e occurs, 0 and whose occurrence values come from applying f to the values from  e. (Fran's (==>).)  W : pure a' is an event with a single occurrence, ( available from the beginning of time. ef <*> ex is an event whose  occurrences are made from the product of the occurrences of ef and  ex. For every occurrence f at time tf of ef and occurrence x  at time tx of ex, ef <*> ex has an occurrence f x at time max  tf tx.  Y: return a is the same as pure a (as always). In e >>=  f, each occurrence of e leads, through f, to a new event.  Similarly for join ee+, which is somehow simpler for me to think  about. The occurrences of e >>= f (or join ee) correspond to the D union of the occurrences of all such events. For example, suppose  we'Bre playing Asteroids and tracking collisions. Each collision can F break an asteroid into more of them, each of which has to be tracked ; for more collisions. Another example: A chat room has an enter 2 event, whose occurrences contain new events like speak. An + especially useful monad-based function is -, which filters a  Maybe-valued event. 0  !"#$%&'()*+,-./0123456789:089:45673  !"#$%&'()*21+,0/-. experimentalconal@conal.net;A future's time <A future's value =5Make a future container into a container of futures. >=Wrap a type into one having new least and greatest elements, # preserving the existing ordering. BOrdered monoid under Z. EOrdered monoid under [. HA future value of type a with time type t. Semantically, just a  time/:value pair, but those values would not be available until  forced, which could block. K0Time of some event occurrence, which can be any Ord type. In an E actual implementation, we would not usually have access to the time E value until (slightly after) that time. Extracting the actual time B would block until the time is known. The added bounds represent G -Infinity and +Infinity. Pure values have time minBound (-Infinity), D while eternally unknowable values (non-occurring events) have time  maxBound (+Infinity). ;<=>?@ABCDEFGHIJKKHIJ;<=EFGBCD>?@A\  !"#$%&'()*+,-./0123456789:;<=>?@ABCCDEFGHIJKLLMNNOP=QRSTUV W X Y Z[ \ ]^_`a reactive-0.5Data.Fun Data.Future Data.Reactive Data.SFuturebase GHC.IOBaseGHC.BaseGHC.List Data.Monoid Control.Monad Data.MaybeControl.ApplicativeapplyFunKforce newFuturefuture runFutureFutureNeverstepperinEventinEvent2switchermkEvent mkEventTrace mkEventShowforkE subscriberunEforkRaccumEscanlEmonoidE withPrevEcountEcountE_diffEsnapshot snapshot_whenEoncetraceEeventX mkReactiveaccumRscanlRmonoidRmaybeRflipFlopcountRtraceRreplaceforget joinMaybesfilterMPSinkAction ReactiveBTimeSourceReactiveStepperrInitrEventEventeFuturefutTimefutVal sequenceF AddBoundsMaxBoundNoBoundMinBoundMingetMinMaxgetMaxunFuturehangraceIOmergefmapscanlmappendmemptyjoinNothingFunctor ApplicativeMonoidMonadminmax