h&YSܙ      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ Safe-Inferred)*  AsyncRattus,The "stable" type modality. A value of type Box a is a time-independent computation that produces a value of type a. Use  and  to construct and consume -types. AsyncRattus A type is Stable0 if it is a strict type and the later modality O% and function types only occur under Box.%For example, these types are stable: Int,  Box (a -> b),  Box (O Int), Box (Sig a -> Sig b). But these types are not stable: [Int]) (because the list type is not strict),  Int -> Int!, (function type is not stable), O Int, Sig Int. AsyncRattusThe return type of the  primitive. AsyncRattus#The "later" type modality. A value v of type O 1 consists of two components: Its clock, denoted cl(v)?, and a delayed computation that will produce a value of type  as soon as the clock cl(v) ticks. The clock cl(v) is only used for type checking and is not directly accessible, whereas the delayed computation is accessible via  and . AsyncRattus1This is the constructor for the "later" modality : :  N E t ::  --------------------  E delay t :: O +The typing rule requires that its argument t$ typecheck with an additional tick N of some clock . AsyncRattus0This is the eliminator for the "later" modality :   E t :: O  ' tick-free ---------------------------------  Ncl(t) ' E adv t :: It requires that a tick N= is in the context whose clock matches exactly the clock of t, i.e.   = cl(t). AsyncRattusIf we want to eliminate more than one delayed computation, i.e. two s :: O  and t :: O , we need to use  instead of just .   E s :: O   E t :: O  ' tick-free --------------------------------------------------  Ncl(s)Ecl(t) ' E select s t :: Select   It requires that we have a tick N in the context whose clock matches the union of the clocks of s and t, i.e.  = cl(s)Ecl(t). The union of two clocks ticks whenever either of the two clocks ticks, i.e.  cl(s)Ecl(t) , whenever cl(s) or cl(t) ticks.That means there are three possible outcomes, which are reflected in the result type of  select s t . A value of  Select   is eithera value of type # and a delayed computation of type O  , if cl(s) ticks before cl(t),a value of type # and a delayed computation of type O  , if cl(t) ticks before cl(s), ora value of type  and a value of type , if cl(s) andcl(s) tick simultaneously. AsyncRattus The clock of  never :: O > will never tick, i.e. it will never produce a value of type . With 3 we can for example implement the constant signal  x ::: never of type Sig a for any x :: a. AsyncRattus2This is the constructor for the "stable" modality : 8 L E t ::  --------------------  E box t :: Box where L is obtained from  by removing all ticks and all variables x :: , where  is not a stable type. AsyncRattus2This is the eliminator for the "stable" modality : 5  E t :: Box  ------------------  E unbox t ::     Safe-Inferred6q AsyncRattus.This annotation type is for internal use only. AsyncRattusUse this type to mark a Haskell function definition as an Asynchronous Rattus function: "{-# ANN myFunction AsyncRattus #-}Or mark a whole module as consisting of Asynchronous Rattus functions only: {-# ANN module AsyncRattus #-}If you use the latter option, you can mark exceptions (i.e. functions that should be treated as ordinary Haskell function definitions) as follows: %{-# ANN myFunction NotAsyncRattus #-}By default all Asynchronous Rattus functions are checked for use of lazy data types, since these may cause memory leaks. If any lazy data types are used, a warning is issued. These warnings can be disabled by annotating the module or the function with   {-# ANN myFunction AllowLazyData #-} {-# ANN module AllowLazyData #-}Asynchronous Rattus only allows guarded recursion, i.e. recursive calls must occur in the scope of a tick. Structural recursion over strict data types is safe as well, but is currently not checked. To disable the guarded recursion check, annotate the module or function with !. ! !  Safe-Inferred)* AsyncRattus"Syntax that may contain variables. AsyncRattusCompute the set of variables occurring in the given piece of syntax. The name falsely suggests that returns free variables, but in fact it returns all variable occurrences, no matter whether they are free or bound. AsyncRattusComputes the variables that are bound by a given piece of syntax. AsyncRattusCompute the dependencies of a bag of bindings, returning a list of the strongly-connected components.  Safe-Inferred"8z AsyncRattus!The set of stable built-in types. AsyncRattus t4, this function returns the list of type variables  [a1,...,am]" for which there is a constraint  Stable ai among  C1, ... Cn. AsyncRattusChecks a top-level definition group, which is either a single non-recursive definition or a group of (mutual) recursive definitions. AsyncRattusStabilizes the given context, i.e. remove all non-stable types and any tick. This is performed on checking box, and guarded recursive definitions. To provide better error messages a reason has to be given as well. AsyncRattus AsyncRattus)takes a default value, a function, and a - value. If the - value is /, the function returns the default value. Otherwise, it applies the function to the value inside the . and returns the result.@ AsyncRattusFirst projection function.A AsyncRattusSecond projection function.+,-/.0123456789:;<=>?@ABC0123456798:;<=+,-/.>?@ABC+2,228 Safe-Inferred)*=0N AsyncRattusA type p satisfying  Producer p a7 is essentially a signal that produces values of type a4 but it might not produce such values at each tick.O AsyncRattus-Get the current value of the producer if any.P AsyncRattusGet 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.Q AsyncRattusThis function can be used to implement input signals. It returns a boxed delayed computation s and a callback function cb. The signal mkSig s will produce a new value v! whenever the callback function cb is called with argument v.R AsyncRattus>This function can be used to produces outputs. Given a signal s and function f , the call  setOutput s f registers f6 as a callback function that is called with argument v+ whenever the signal produces a new value v. For this function to work, U must be called.S AsyncRattus0This function is essentially the composition of Q and R&. It turns any producer into a signal.T AsyncRattustimer n1 produces a delayed computation that ticks every n milliseconds. In particular mkSig (timer n). is a signal that produces a new value every n milliseconds.U AsyncRattus In order for R) to work, this IO action must be invoked.NOPQRSTUQRSUTNOP Safe-Inferred=f, !+,-/.0123456789:;<=>?@ABCX !X Safe-Inferred QY AsyncRattusSig a is a stream of values of type a.[ AsyncRattus"Get the current value of a signal.\ AsyncRattusGet the future the signal.] AsyncRattus*Apply a function to the value of a signal.^ AsyncRattus Variant of Q? that returns a signal instead of a boxed delayed computation._ AsyncRattus4Turn a producer into a signal. This is a variant of S? that returns a signal instead of a boxed delayed computation.` AsyncRattus0This function is essentially the composition of b with ]. The signal produced by  filterMap f s has the value v whenever s has the value u such that unbox f u = Just' v.a AsyncRattusThis function is similar to `# but takes a delayed signal (type  O (Sig a)&) as an argument instead of a signal (Sig a).b AsyncRattusFilter the given signal using a predicate. The signal produced by  filter p s contains only values from s that satisfy the predicate p.c AsyncRattusThis function is similar to b# but takes a delayed signal (type  O (Sig a)&) as an argument instead of a signal (Sig a).d AsyncRattusThis function is a variant of q . Whereas zipWith f xs ys produces a new value whenever xs or ys produce a new value, trigger f xs ys9 only produces a new value when xs produces a new value.Example:  xs: 1 2 3 2 ys: 1 0 5 2 zipWith (box (+)) xs ys: 2 3 4 3 8 4 trigger (box (+)) xy ys: 2 3 8 4e AsyncRattusThis function is similar to d# but takes a delayed signal (type  O (Sig a)&) as an argument instead of a signal (Sig a).f AsyncRattus A version of map for delayed signals.g AsyncRattus8Turns a boxed delayed computation into a delayed signal.h AsyncRattus Variant of g$ that returns a boxed delayed signali AsyncRattus/Construct a constant signal that never updates.j AsyncRattusConstruct a signal by repeatedly applying a function to a given start element. That is, unfold (box f) x will produce the signal x ::: f x ::: f (f x) ::: ... unfold :: Stable a => Box (a -> a) -> a -> Sig a unfold f x = x ::: delay (unfold f (unbox f x))Similar to Haskell's . scan (box f) x (v1 ::: v2 ::: v3 ::: ... ) == (x `f` v1) ::: ((x `f` v1) `f` v2) ::: ... Note: Unlike , j starts with x f v1, not x.l AsyncRattusl is a composition of ] and j: "scanMap f g x === map g . scan f xm AsyncRattusThis function allows to switch from one signal to another one dynamically. The signal defined by  switch xs ys first behaves like xs, but as soon as ys produces a new value,  switch xs ys behaves like ys.Example:  xs: 1 2 3 4 5 6 7 8 9 ys: 1 2 3 4 5 6 switch xs ys: 1 2 3 1 2 4 3 4 5 6n AsyncRattusThis function is similar to m, but the (future) second signal may depend on the last value of the first signal.o AsyncRattusThis function is similar to m2 but works on delayed signals instead of signals.p AsyncRattus?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ij}{|onqprstkxy                                           i&AsyncRattus-0.1-CErCCFdBJ7BGwmEWwtsgv5AsyncRattus.InternalPrimitivesAsyncRattus.Plugin.AnnotationAsyncRattus.PluginAsyncRattus.StrictAsyncRattus.Channels AsyncRattusAsyncRattus.SignalAsyncRattus.FutureAsyncRattus.Plugin.DependencyAsyncRattus.Plugin.UtilsAsyncRattus.Plugin.StrictifyAsyncRattus.Plugin.StableSolverAsyncRattus.Plugin.SingleTickAsyncRattus.Plugin.ScopeCheckAsyncRattus.Plugin.PrimExprAsyncRattus.Plugin.Transform*AsyncRattus.Plugin.CheckClockCompatibilityAsyncRattus.PrimitivesBoxStableSelectFstSndBothODelay InputValueClockInputChannelIdentifiersingletonClock clockUnion channelMemberasyncRattusErrordelay extractClockadv'advselectselect'neverboxunbox InternalAnn ExpectError ExpectWarningNotAsyncRattus AllowLazyDataAllowRecursion$fDataInternalAnn$fShowInternalAnn$fEqInternalAnn$fOrdInternalAnn$fDataAsyncRattus$fShowAsyncRattus$fOrdAsyncRattus$fEqAsyncRattusplugin:*Maybe'Just'Nothing'ListNil:! singletonfromListtoListinit'reverse' listToMaybe'+++map'zip'zipWith' mapMaybe'maybe' fromMaybe'fst'snd'curry'uncurry' $fShowList$fEqList $fFunctorList$fFoldableList $fShowMaybe' $fEqMaybe'$fVectorSpace:*a$fEq:*$fShow:* $fFunctor:*Producer getCurrentgetNextgetInput setOutputmkInputtimerstartEventLoop$fProducerBoxa $fProducerOamapOSig:::currentfuturemap getInputSig mkInputSig filterMapfilterMapAwaitfilter filterAwaittrigger triggerAwaitmapAwaitmkSigmkBoxSigconstscan scanAwaitscanMapswitchswitchS switchAwait interleavezipWithzipWith3condzipintegral derivative$fProducerSiga$fProducerSigMaybeaSigF:>:FNowWaitbindFmapFsyncsyncFmkSigFmkSigF'fromSig zipWithAwait $fProducerFa$fProducerOneShota$fProducerSigFaHasFVgetFVHasBV dependencygetBV printBindsghcStableTypesisStable isStableRec isStrictRecghcGHC.Types.ErrorSeveritySevDumpSevErrorSevFatalSevInfoSevInteractive SevOutput SevWarning getMaybeVargetVarisVarisType printMessageadv'Var select'VarbigDelay inputValueVarextractClockVarunionVar getModuleFS isRattModule isGhcModule getNameModule isTemporalisStrictsplitForAllTys' userFunctiontypeClassFunctionmkSysLocalFromVarmkSysLocalFromExprfromRealSrcSpannoLocationInfomkAltgetAlt strictifyExprcheckStrictDataSCxtsrcSpantcStable toSingleTick NotSupportedcheck checkBind ScopeBindScopeGetCtxtPrimHidden NoTickReason HiddenReasonRecDefLCtxtCtxtearlierhiddensrcLocrecDef stableTypes primAliasallowRecursion emptyCtxtsetCtxt modifyCtxtcheckAllbase System.Exit exitFailure filterBindscheckRecursiveBindsgetAllBVisStableConstrextractStableConstrcheckSCC stabilizegetScopeprimMapisPrim isPrimExpraddVars printMessage'printMessageCheckghc-prim GHC.TypesFalsePrimInfoDelayAppAdvApp SelectAppBoxAppAdvfunctionprim transform CheckExpr recursiveSet allowRecExpoldExprverbose checkExprstrictifyProgram GHC.MaybeMaybeGHC.Listscanldt