Îõ³h&aÜ]ä¬      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š ‹ Œ  Ž   ‘ ’ “ ” • – — ˜ ™ š › œ  ž Ÿ   ¡ ¢ £ ¤ ¥ ¦ § ¨ © ª« Ç(c) Ivan Perez, 2014-2023 (c) George Giorgidze, 2007-2012 (c) Henrik Nilsson, 2005-2006 (c) Antony Courtney and Henrik Nilsson, Yale University, 2003-2004BSD3ivan.perez@keera.co.uk provisionalportable Safe-InferredüI bearriverDuplicate an input.J bearriver%Lift a binary function onto an arrow.K bearriver$Lift a 3-ary function onto an arrow.L bearriver$Lift a 4-ary function onto an arrow.M bearriver$Lift a 5-ary function onto an arrow.IJKLMIJKLMÇ(c) Ivan Perez, 2014-2022 (c) George Giorgidze, 2007-2012 (c) Henrik Nilsson, 2005-2006 (c) Antony Courtney and Henrik Nilsson, Yale University, 2003-2004BSD3ivan.perez@keera.co.uk provisionalportable Safe-InferredcN bearriver“A single possible event occurrence, that is, a value that may or may not occur. Events are used to represent values that are not produced continuously, such as mouse clicks (only produced when the mouse is clicked, as opposed to mouse positions, which are always defined).Q bearriver“Make the NoEvent constructor available. Useful e.g. for initialization, ((-->) & friends), and it's easily available anyway (e.g. mergeEvents []).R bearriver4Suppress any event in the first component of a pair.S bearriver5Suppress any event in the second component of a pair.T bearriver-An event-based version of the maybe function.U bearriver)Y bearriverÍTags an (occurring) event with a value ("replacing" the old value). Same as X with the arguments swapped.,Applicative-based definition: tagWith = (<$)Z bearriver;Attaches an extra value to the value of an occurring event.[ bearriver?Left-biased event merge (always prefer left event, if present).\ bearriverÁRight-biased event merge (always prefer right event, if present).] bearriver:Unbiased event merge: simultaneous occurrence is an error.^ bearriver t (Event a) -> Event a mergeEvents = asuma bearriver9Collect simultaneous event occurrences; no event if none.b bearriverÏJoin (conjunction) of two events. Only produces an event if both events exist.1Applicative-based definition: joinE = liftA2 (,)c bearriver+Split event carrying pairs into two events.d bearriver4Filter out events that don't satisfy some predicate.e bearriver2Combined event mapping and filtering. Note: since N is a ­, see ®: for a simpler version of this function with no filtering.f bearriverÀEnable/disable event occurrences based on an external condition.g bearriver$Convert a maybe value into a event (N is isomorphic to ¯).h bearriverNFData instance.i bearriverAlternative instance.j bearriverMonadFail instancek bearriverMonad instance.l bearriver!Applicative instance (similar to ¯).m bearriver$Functor instance (could be derived)._ bearriver2Mapping function used when first event is present. bearriver3Mapping function used when second event is present. bearriver3Mapping function used when both events are present. bearriver First event bearriver Second eventNOPQRSTUVWXYZ[\]^_`abcdefgNOPQRSTUVWXYZ[\]^_`abcdefgX8Z8[6\6]6b7f8 Ç(c) Ivan Perez, 2014-2022 (c) George Giorgidze, 2007-2012 (c) Henrik Nilsson, 2005-2006 (c) Antony Courtney and Henrik Nilsson, Yale University, 2003-20044BSD-style (see the LICENSE file in the distribution)ivan.perez@keera.co.uk provisionalnon-portable (GHC extensions) Safe-Inferredúq bearriver$Information on the progress of time.° bearriverìExtensible signal function (signal function with a notion of time, but which can be extended with actions).ÆSignal function that transforms a signal carrying values of some type a- into a signal carrying values of some type bÝ. You can think of it as (Signal a -> Signal b). A signal is, conceptually, a function from s to value.r bearriver¢DTime is the time type for lengths of sample intervals. Conceptually, DTime = R+ = { x in R | x > 0 }. Don't assume Time and DTime have the same representation.s bearriveræTime is used both for time intervals (duration), and time w.r.t. some agreed reference point in time.q°rsÔ(c) Ivan Perez, 2019-2023 (c) Ivan Perez and Manuel Baerenz, 2016-2018BSD3ivan.perez@keera.co.uk Safe-Inferredšt bearriver%Integration using the rectangle rule.± bearriver¡Integrate using an auxiliary function that takes the current and the last input, the time between those samples, and the last output, and returns a new output.u bearriverûA very crude version of a derivative. It simply divides the value difference by the time difference. Use at your own risk.² bearriverûA very crude version of a derivative. It simply divides the value difference by the time difference. Use at your own risk.6 to every input. Freezes temporarily if the input is P, and continues as soon as an N is received.Ÿ bearriver Convert an N into a ¯ value.ÍBoth types are isomorphic, where a value containing an event is mapped to a ³, and P is mapped to ´ý. There is, however, a semantic difference: a signal carrying a Maybe may change constantly, but, for a signal carrying an Nó, there should be a bounded frequency such that sampling the signal faster does not render more event occurrences.  bearriverCreate an event if a ¸ is µ.¡ bearriverZero-order hold.ŠConverts a discrete-time signal into a continuous-time signal, by holding the last value until it changes in the input signal. The given parameter may be used for time zero, and until the first event occurs in the input signal, so hold is always well-initialized.×embed (hold 1) (deltaEncode 0.1 [NoEvent, NoEvent, Event 2, NoEvent, Event 3, NoEvent]) [1,1,2,2,3,3]¢ bearriver7Accumulator parameterized by the accumulation function.£ bearriverÇZero-order hold accumulator parameterized by the accumulation function.¤ bearriver9Loop with an initial value for the signal being fed back.¥ bearriver©Stochastic event source with events occurring on average once every tAvg seconds. However, no more than one event results from any one sampling interval in the case of relatively sparse sampling, thus avoiding an "event backlog" should sampling become more frequent at some later point in time.¦ bearriverûConvenience function to run a signal function indefinitely, using a IO actions to obtain new input and process the output.ûThis function first runs the initialization action, which provides the initial input for the signal transformer at time 0.ŒAfterwards, an input sensing action is used to obtain new input (if any) and the time since the last iteration. The argument to the input sensing function indicates if it can block. If no new input is received, it is assumed to be the same as in the last iteration.ÝAfter applying the signal function to the input, the actuation IO action is executed. The first argument indicates if the output has changed, the second gives the actual output). Actuation functions may choose to ignore the first argument altogether. This action should return True if the reactimation must stop, and False if it should continue.%Note that this becomes the program's  main loop£, which makes using this function incompatible with GLUT, Gtk and other graphics libraries. It may also impose a sizeable constraint in larger projects in which different subparts run at different time steps. If you need to control the main loop yourself for these or other reasons, use  reactInit and react.§ bearriver;Evaluate an SF, and return an output and an initialized SF.WARNù: Do not use this function for standard simulation. This function is intended only for debugging/testing. Apart from being potentially slower and consuming more memory, it also breaks the FRP abstraction by making samples discrete and step based.¨ bearriverÄEvaluate an initialized SF, and return an output and a continuation.WARNù: Do not use this function for standard simulation. This function is intended only for debugging/testing. Apart from being potentially slower and consuming more memory, it also breaks the FRP abstraction by making samples discrete and step based.© bearriverGiven a signal function and time delta, it moves the signal function into the future, returning a new uninitialized SF and the initial output.“While the input sample refers to the present, the time delta refers to the future (or to the time between the current sample and the next sample).WARNù: Do not use this function for standard simulation. This function is intended only for debugging/testing. Apart from being potentially slower and consuming more memory, it also breaks the FRP abstraction by making samples discrete and step based.¥ bearriver The time q5 after which the event should be produced on average bearriver!Value to produce at time of event¢   !"#$%&'()*+,-./0123456789:;<=>H?@ABCDEGFIJKLMNOPQRSTUVWXYZ[\]^_`abcdefgq°rstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨© žŸ ¡¢£¤¥¦§¨©Ô(c) Ivan Perez, 2019-2022 (c) Ivan Perez and Manuel Baerenz, 2016-2018BSD3ivan.perez@keera.co.uk Safe-Inferred\@ª bearriverâFuture signal function (conceptually, a function between future signals that respects causality).ÄA future signal is a signal that is only defined for positive times.« bearriverÔSignal function (conceptually, a function between signals that respects causality).£   !"#$%&'()*+,-./0123456789:;<=>H?@ABCDEGFIJKLMNOPQRSTUVWXYZ[\]^_`abcdefgqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«£   !"#$%&'()*+,-./0123456789:;<=>H?@ABCDEGFIJKLMNOPQRSTUVWXYZ[\]^_`abcdefgqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©«ª¹ !"#$%&'()*+,-,./01/02/03/04/05/06/07/08/09/0:/0;/0</0=/0>/0?/0@/0A/0B/0C/DE/DF/DG/DH/DI/DJ/DK/DL/MN/MO/MP/MQRSTRSURSVRSWRSXRSYRSZRS[RS\RS]^_`abccdefghijklmnopqrstuvwxyz{|}~€‚ƒ„ … † ‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œ ž Ÿ   ¡ ¢ £ ¤ ¥ ¦ § ¨ © ª « ¬ ­ ® ¯ ° ± ² ³ ´ µ ¶ · ¸ ¹ º » ¼ ½¾¿ÀÁÀÂÀÃÄÅ ¿ÆÇÄÈÄÉÊËÌÊËÍ ÎÊËÏÐ&bearriver-0.14.6-3boWdomIP9iY4ExbskeFJ FRP.YampaFRP.BearRiver.ArrowFRP.BearRiver.EventFRP.BearRiver.IntegrationFRP.BearRiver.BasicFRP.BearRiver.ScanFRP.BearRiver.DelaysFRP.BearRiver.SwitchesFRP.BearRiver.EventSFRP.BearRiver.ConditionalFRP.BearRiver.Time FRP.BearRiverFRP.BearRiver.InternalCorebase Control.Arrowarrfirstapp|||loop runKleisliKleisli zeroArrow ArrowZero<+> ArrowPlus ArrowMonad ArrowLooprightleft+++ ArrowChoice ArrowApplysecond***&&&ArrowreturnAleftApp^>>^<<>>^<<^Control.Category>>><<<#dunai-0.12.1-Lth0EgsVV85HRyDvjgPyjtData.MonadicStreamFunction.UtilpauseOn traceWhen traceWithunfoldmealyaccumulateWith mappendFrommappendSsumFromsumScountfifonextiPostwithSideEffect_withSideEffect mapMaybeSMStreamMSinkData.MonadicStreamFunction.CoremorphS liftTransS>>>^^>>> liftBaseS liftBaseMarrMconstM'Data.MonadicStreamFunction.InternalCoreembedfeedbackmorphGSMSF0simple-affine-space-0.2.1-5U7b2jMMVKYG6R5JnFSAHBData.VectorSpace normalizenormdot negateVector^-^^+^^/*^ zeroVector VectorSpaceduparr2arr3arr4arr5EventNoEventnoEvent noEventFst noEventSndevent fromEventisEvent isNoEventtagtagWithattachlMergerMergemergemergeBymapMerge mergeEvents catEventsjoinEsplitEfilterE mapFilterEgate maybeToEvent $fNFDataEvent$fAlternativeEvent$fMonadFailEvent $fMonadEvent$fApplicativeEvent$fFunctorEvent $fEqEvent $fOrdEvent $fShowEvent ClockInfoDTimeTimeintegral derivativeiterFromidentityconstant-->-:>>---=>>=- initiallysscan sscanPrimpreiPrefbydelayswitchdSwitchparB dpSwitchBparCnevernowafter repeatedly afterEach afterEachCatedgeiEdgeedgeTagedgeJustedgeBynotYetonce takeEvents dropEventssnapprovidedpause localTimetime mapEventS eventToMaybe boolToEventholdaccumBy accumHoldByloopPre occasionally reactimate evalAtZeroevalAt evalFutureFutureSFSFGHC.BaseidFunctorfmap GHC.MaybeMaybe integralFromderivativeFromJustNothingghc-prim GHC.TypesTrueFalseedgeFromBool