Îõ³h&.„,Ü      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[(c) 2011 Brent YorgeyBSD-style (see LICENSE)byorgey@cis.upenn.edu Safe-Inferred(8ÁÂÃÄÅÌÑÙÚÜ,3active"An abstract type for representing points in time6. Note that literal numeric values may be used as Times, thanks to the the \ and ] instances. activeAn abstract type representing  elapsed timeï between two points in time. Note that durations can be negative. Literal numeric values may be used as Durations thanks to the \ and ] instances. activeÅA convenient wrapper function to convert a numeric value into a time. activeÄA convenient unwrapper function to turn a time into a numeric value.activeÉA convenient wrapper function to convert a numeric value into a duration.activeÈA convenient unwrapper function to turn a duration into a numeric value.!activeThere are two types of Active values:An ! can simply be a ">, that is, a time-varying value with start and end times.An !æ value can also be a constant: a single value, constant across time, with no start and end times.'The addition of constant values enable ^ and _ instances for !."activeA  Dynamic a can be thought of as an a7 value that changes over the course of a particular &. It's envisioned that DynamicÁ will be mostly an internal implementation detail and that !Û will be most commonly used. But you never know what uses people might find for things.&activeAn Eraä is a concrete span of time, that is, a pair of times representing the start and end of the era. Era.s form a semigroup: the combination of two Eras is the smallest Era- which contains both. They do not form a ^, since there is no EraÈ which acts as the identity with respect to this combining operation.Era is abstract. To construct Era values, use '; to deconstruct, use ( and ).'active Create an & by specifying start and end s.(activeGet the start  of an &.)active Get the end  of an &.*active Compute the   of an &.+active Create a "= from a start time, an end time, and a time-varying value.,active Fold for ".-activeShift a " value by a certain duration.0active" a is a ` whenever aà is: the eras are combined according to their semigroup structure, and the values of type a$ are combined pointwise. Note that " a cannot be an instance of ^ since & is not.1active" is an instance of a (i.e. _ without b­): a time-varying function is applied to a time-varying value pointwise; the era of the result is the combination of the function and value eras. Note, however, that " is not an instance of _' since there is no way to implement bÚ: the era would have to be empty, but there is no such thing as an empty era (that is, & is not an instance of ^).8active Create an ! value from a ".9activeCreate a dynamic != from a start time, an end time, and a time-varying value.:active Fold for !€s. Process an 'Active a', given a function to apply if it is a pure (constant) value, and a function to apply if it is a ".;active Modify an !É value using a case analysis to see whether it is constant or dynamic.<active Interpret an ! value as a function from time.=activeGet the value of an Active a at the beginning of its era.>activeGet the value of an Active a at the end of its era.?activeGet the & of an ! value (or c$ if it is a constant/pure value).@activeTest whether an ! value is constant.AactiveTest whether an ! value is ".Bactiveui represents the  unit interval, which takes on the value t at time t, and has as its era [0,1]. It is equivalent to C 0 1#, and can be visualized as follows: :diagrams/src_Data_Active_uiDia.svg#diagram=uiDia&width=200*On the x-axis is time, and the value that uiâ takes on is on the y-axis. The shaded portion represents the era. Note that the value of ui¼ (as with any active) is still defined outside its era, and this can make a difference when it is combined with other active values with different eras. Applying a function with dð affects all values, both inside and outside the era. To manipulate values outside the era specifically, see J and M. To alter the values that ui/ takes on without altering its era, use its e and _ instances. For example,  (*2) <$> ui varies from 0 to 2 over the era [0,1]$. To alter the era, you can use D or G.Cactive interval a b% is an active value starting at time a, ending at time b, and taking the value t at time t.Dactive stretch s act "stretches" the active act so that it takes s/ times as long (retaining the same start time).Eactive stretchTo d Des an ! so it has duration d. Has no effect if (1) d is non-positive, or (2) the !" value is constant, or (3) the !Ý value has zero duration. [AJG: conditions (1) and (3) no longer true: to consider changing]Factivea1 `during` a2 Des and Gs a1# so that it has the same era as a2. Has no effect if either of a1 or a2 are constant.Gactive shift d act shifts the start time of act by duration d&. Has no effect on constant values.HactiveèReverse an active value so the start of its era gets mapped to the end and vice versa. For example,  backwards B can be visualized as Èdiagrams/src_Data_Active_backwardsDia.svg#diagram=backwardsDia&width=200IactiveÜTake a "snapshot" of an active value at a particular time, resulting in a constant value.JactiveÝ"Clamp" an active value so that it is constant before and after its era. Before the era, clamp a takes on the value of a7 at the start of the era. Likewise, after the era, clamp a takes on the value of a at the end of the era. clamp% has no effect on constant values. For example, clamp B can be visualized as Àdiagrams/src_Data_Active_clampDia.svg#diagram=clampDia&width=200 See also K and L<, which clamp only before or after the era, respectively.KactiveÜ"Clamp" an active value so that it is constant before the start of its era. For example,  clampBefore B can be visualized as Ìdiagrams/src_Data_Active_clampBeforeDia.svg#diagram=clampBeforeDia&width=200See the documentation of J for more information.LactiveÚ"Clamp" an active value so that it is constant after the end of its era. For example,  clampBefore B can be visualized as Êdiagrams/src_Data_Active_clampAfterDia.svg#diagram=clampAfterDia&width=200See the documentation of J for more information.Mactive?"Trim" an active value so that it is empty outside its era. trim" has no effect on constant values. For example, trim B can be visualized as >diagrams/src_Data_Active_trimDia.svg#diagram=trimDia&width=200 Actually, trim ui7 is not well-typed, since it is not guaranteed that uiÿ's values will be monoidal (and usually they won't be)! But the above image still provides a good intuitive idea of what trimÄ is doing. To make this precise we could consider something like trim (First . Just  $ ui). See also N and  trimActive;, which trim only before or after the era, respectively.Nactive+"Trim" an active value so that it is empty before' the start of its era. For example,  trimBefore B can be visualized as Êdiagrams/src_Data_Active_trimBeforeDia.svg#diagram=trimBeforeDia&width=200See the documentation of M for more details.Oactive+"Trim" an active value so that it is empty after& the end of its era. For example,  trimAfter B can be visualized as Èdiagrams/src_Data_Active_trimAfterDia.svg#diagram=trimAfterDia&width=200See the documentation of M for more details.PactiveSet the era of an !2 value. Note that this will change a constant !É into a dynamic one which happens to have the same value at all times.Qactive atTime t a. is an active value with the same behavior as a', shifted so that it starts at time t. If a) is constant it is returned unchanged.Ractive a1 `after` a2& produces an active that behaves like a1/ but is shifted to start at the end time of a2 . If either a1 or a2 are constant, a1 is returned unchanged.SactiveSequence/overlay two !É values: shift the second to start immediately after the first (using R), then compose them (using f).Tactive "Splice" two !Ò values together: shift the second to start immediately after the first (using R§), and produce the value which acts like the first up to the common end/start point, then like the second after that. If both are constant, return the first.Uactive.Splice together a list of active values using T . The list must be nonempty.Vactive Create an ActiveÈ which takes on each value in the given list in turn during the time [0,1]Ç, with each value getting an equal amount of time. In other words, discrete¡ creates a "slide show" that starts at time 0 and ends at time 1. The first element is used prior to time 0, and the last element is used after time 1.It is an error to call discrete on the empty list.Wactivesimulate r act simulates the ! value act˜, returning a list of "snapshots" taken at regular intervals from the start time to the end time. The interval used is determined by the rate rÔ, which denotes the "frame rate", that is, the number of snapshots per unit time.If the !ý value is constant (and thus has no start or end times), a list of length 1 is returned, containing the constant value.Yactive!Active values over a type with a `% instance are also an instance of `ä. Two active values are combined pointwise; the resulting value is constant iff both inputs are.3 !"#$%&'()*+,-89:;<=>?@ABCDEFGHIJKLMNOPQRSTUVW3 &'()*"#$%+,-!98@A:;BCDEFGHIJKLMNORSTUVWS5ç      !"#$$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_]`a]bc]bd]befgh]bi]jk]bl]bm]bnï&active-0.2.0.18-7wxgaASWZsKCrVxtPFELNF Data.ActiveTime$fEqTime $fOrdTime $fShowTime $fReadTime $fEnumTime $fNumTime$fFractionalTime $fRealTime$fRealFracTime $fFunctorTimeDurationtoTimefromTime toDuration fromDuration $fWrappedTime$fRewrappedTimet $fAffineTime$fMonoidDuration$fSemigroupDuration$fAdditiveDuration$fApplicativeDuration $fEqDuration $fOrdDuration$fShowDuration$fReadDuration$fEnumDuration $fNumDuration$fFractionalDuration$fRealDuration$fRealFracDuration$fFunctorDurationActiveDynamicera runDynamicEramkErastartendduration mkDynamic onDynamic shiftDynamic$fWrappedDuration$fRewrappedDurationt$fSemigroupDynamic$fApplyDynamic$fFunctorActive $fApplyActive$fApplicativeActive$fFunctorDynamic $fShowEra$fSemigroupEra fromDynamicmkActiveonActive modActive runActive activeStart activeEnd activeEra isConstant isDynamicuiintervalstretch stretchToduringshift backwardssnapshotclamp clampBefore clampAftertrim trimBefore trimAftersetEraatTimeafter->>|>>moviediscretesimulate$fMonoidActive$fSemigroupActive$fWrappedActive$fRewrappedActivetbaseGHC.NumNumGHC.Real FractionalGHC.BaseMonoid Applicative Semigroup,semigroupoids-6.0.0.1-2NmXSOMDe6YJU5aMtEwMWiData.Functor.Bind.ClassApplypure GHC.MaybeNothingfmapFunctor<>