úÎ!‹Xƒ8      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„… † ‡ ˆ ‰ Š ‹ Œ  Ž  None=>?@ADHSVXbmboxba Committer a "commits" values of type a. A Sink and a Consumer are some other metaphors for this.„A Committer absorbs the value being committed; the value disappears into the opaque thing that is a Committer from the pov of usage.box*Do nothing with values that are committed.DThis is useful for keeping the commit end of a box or pipeline open.boxdThis is a contramapMaybe, if such a thing existed, as the contravariant version of a mapMaybe. See .https://hackage.haskell.org/package/witherable witherablebox&adds a monadic action to the committerbox2adds a post-commit monadic action to the committerboxcommit to a StateT listboxlist committer  None =>?@ADSXb¯box.sometimes you have no choice but to void it upboxiA continuation similar to ` Control.Monad.ContT` but where the result type is swallowed by an existentialboxfinally run a continuationboxfinally run a Cont_box1fmap over a continuation and then run the result.*The . position is towards the continuationbox1fmap over a continuation and then run the result.*The . position is towards the continuation  33None=>?@ADHSVX_b*x %boxan %{ "emits" values of type a. A Source & a Producer (of a's) are the two other alternative but overloaded metaphors out there.¢An Emitter "reaches into itself" for the value to emit, where itself is an opaque thing from the pov of usage. An Emitter is named for its main action: it emits.(boxlike a monadic mapMaybe. (See  .https://hackage.haskell.org/package/witherable witherable))box8parse emitter which returns the original text on failure*boxno error-reporting parsing+box:read parse emitter, returning the original string on error,boxno error-reporting reading-box-adds a pre-emit monadic action to the emitter.box.adds a post-emit monadic action to the emitter/boxFadd a post-emit monadic action on the emitted value (if there was any)0boxturn an emitter into a list1boxemit from a StateT list-This compiles but is an infinite "a" emitter:Klet e1 = hoist (flip evalStateT ["a", "b"::Text]) stateE :: Emitter IO Text2box4convert a list emitter to a Stateful element emitter%&'()*+,-./012%&'(+,)*-./021None=>?@ADHSVXb:œ;boxÿíA Box is a product of a Committer m and an Emitter. Think of a box with an incoming wire and an outgoing wire. Now notice that the abstraction is reversable: are you looking at two wires from "inside a box"; a blind erlang grunt communicating with the outside world via the two thin wires, or are you looking from "outside the box"; interacting with a black box object. Either way, it's a box. And either way, the committer is contravariant and the emitter covariant so it forms a profunctor.a Box can also be seen as having an input tape and output tape, thus available for turing and finite-state machine metaphorics.?box&Wrong signature for the MFunctor class@boxa profunctor dimapMaybeAboxcomposition of monadic boxesBbox<Connect an emitter directly to a committer of the same type.7The monadic action returns when the committer finishes.Cbox Short-circuit a homophonuos box.Dbox fuse a box 5fuse (pure . pure) == glueb == etc () (Transducer id) ;<=>?@ABCD ;<=>@?BCDANone=>?@ADHSVXbJ8HboxH" specifies how messages are queuedObox"create a queue, returning the endsbox#write to a queue, checking the seal‘box*read from a queue, and retry if not sealedPbox$turn a queue into a box (and a seal)QboxPturn a queue into a box (and a seal), and lift from stm to the underlying monad.Rbox5wait for the first action, and then cancel the secondSboxErun two actions concurrently, but wait and return on the left result.TboxFrun two actions concurrently, but wait and return on the right result.Ubox[connect a committer and emitter action via spawning a queue, and wait for both to complete.Vbox[connect a committer and emitter action via spawning a queue, and wait for both to complete.Wbox7create an unbounded queue, returning the emitter resultXbox7create an unbounded queue, returning the emitter resultYboxlift a box from STMZbox)turn a box action into a box continuation[box)connect up two box actions via two queuesHJKNILMOPQRSTUVWXYZ[HJKNILMWXROVUPQYSTZ[None=>?@ADHSVXb^\boxTurn a list into an % continuation via a H]box1fromList_ directly supplies to a committer actionLFIXME: fromList_ combined with cRef is failing dejavu concurrency testing...^box)toList_ directly receives from an emitterTODO: check isomorphism toList_ == toListE_boxDtake a list, emit it through a box, and output the committed result.šThe pure nature of this computation is highly useful for testing, especially where parts of the box under investigation has non-deterministic attributes.`boxDhook a committer action to a queue, creating an emitter continuationaboxDhook a committer action to a queue, creating an emitter continuation’boxsingleton sinkbbox finite sink“boxsingleton sourcecbox finite sourcedbox<glues an emitter to a committer, then resupplies the emittereboxfuse a committer to a bufferfboxfuse an emitter to a buffergboxconcurrently run two emittersËThis differs from mappend in that the monoidal (and alternative) instance of an Emitter is left-biased (The left emitter exhausts before the right one is begun). This is non-deterministically concurrent.hboxrun two committers concurrentlyibox5a box modifier that feeds commits back to the emitter\]^_`abcdefghi\]^_`abcdiefghNone=>?@ADHSVXbgÆ jboxemit Text from stdin inputs:t emit fromStdin!emit fromStdin :: IO (Maybe Text)kboxcommit to stdout*commit toStdout ("I'm committed!" :: Text)I'm committed!Truelboxfinite console emittermboxfinite console committernbox,read from console, throwing away read errorsoboxshow to stdoutpbox"Emits lines of Text from a handle.qbox!Commit lines of Text to a handle.rbox Emits lines of Text from a file.sbox Commits lines of Text to a file.tbox+Commits lines of Text, appending to a file.uboxcommit to a list IORefvboxemit from a list IORef jklmnopqrstuv jklmnopquvrstNone.>DSXboüwbox"A value with a UTCTime annotation.{boxsleep for x seconds|box*sleep until a certain time (in the future)}boxAdd the current time~boxadding a time stampbox'wait until Stamped time before emitting€box²reset the emitter stamps to by in sync with the current time and adjust the speed >>> let e1 = fromListE (zipWith (x a -> Stamped (addUTCTime (fromDouble x) t) a) [0..5] [0..5])boxKsimulate a delay from a (Stamped a) Emitter relative to the first timestamp wxzy{|}~€ {|wxzy}~€ None=>?@ADHSVXb€z…boxtransduction  (https://en.wikipedia.org/wiki/TransducerwikiŽ says: "A transducer is a device that converts energy from one form to another." Translated to context, this Transducer converts a stream of type a to a stream of a different type.ˆboxemit - transduce - commitÿwith etc, you're in the box, and inside the box, there are no effects: just a stream of a's, pure functions and state tracking. It's a nice way to code, and very friendly for the compiler. When the committing and emitting is done, the box collapses to state.€The combination of an input tape, an output tape, and a state-based stream computation lends itself to the etc computation as a  5https://en.wikipedia.org/wiki/Finite-state_transducerfinite-state transducer or mealy machine.‰box.create an committer from a stream continuationŠboxcreate an emitter from a stream‹boxturn an emitter into a streamŒboxturn a stream into a committerboxcreate a committer from a foldŽboxcreate a committer from a sink …†‡ˆ‰Š‹ŒŽ …†‡ˆ‰Š‹ŒŽ None=>?@ADHSVXbxo%&'()*+,-./012;<=>?@ABCDHJKNILMOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxzy{|}~€…†‡ˆ‰Š‹ŒŽ”     !"#$%&'()*+,--./0123456789:;<=>?@A  BCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{||}~€‚ƒ„…†‡ˆ ‰ ‰ Š ‹ Œ  Ž   ‘ ’“”•–— box-0.5.0-DWHCWXK5ixc8KwG8jBAi6A Box.CommitterBox.Cont Box.EmitterBox.Box Box.QueueBox.ConnectorsBox.IOBox.TimeBox.TransducerBox CommittercommitdrainmapCpremapCpostmapCstateClistC$fDecidableCommitter$fDivisibleCommitter$fContravariantCommitter$fMonoidCommitter$fSemigroupCommitter$fMFunctorTYPECommitterCont_with_ContwithrunContrunCont_<$.><*.> $fMonoidCont$fSemigroupCont $fMonadIOCont $fMonadCont$fApplicativeCont $fFunctorCont $fMonoidCont_$fSemigroupCont_$fMonadIOCont_ $fMonadCont_$fApplicativeCont_$fFunctorCont_EmitteremitmapEparseEparseE_readEreadE_premapEpostmapEpostmapMtoListEstateEunlistE$fMonoidEmitter$fSemigroupEmitter$fMonadPlusEmitter$fAlternativeEmitter$fMonadEmitter$fApplicativeEmitter$fFunctorEmitter$fMFunctorTYPEEmitter committeremitterhoistbbmapdotbgluegluebfuse $fMonoidBox$fSemigroupBox$fProfunctorBoxQueue UnboundedBoundedSingleLatestNewestNewendstoBoxtoBoxM waitCancelconcurrentlyLeftconcurrentlyRightwithQCwithQEqueueCqueueEliftB fromAction fuseActions fromListE fromList_toList_ fromToList_emitQcommitQsinksourceforkEmitqueueCommitter queueEmitter concurrentE concurrentCfeedback fromStdintoStdout fromStdinN toStdoutN readStdin showStdouthandleEhandleCfileE fileWriteC fileAppendCcRefeRefStampedstampvaluesleep sleepUntilstampNowstampEemitOnplaybacksimulate $fEqStamped $fShowStamped $fReadStamped Transducer transduceetc toCommitter toEmittertoStream fromStream foldCommitter sinkCommitter$fCategoryTYPETransducer writeCheck readChecksink1source1