Îõ³h$$©!‡’      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘  Safe-Inferred,>?ÀÁÂÉÔ×ÙÐboxâa 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.ÄThis is useful for keeping the commit end of a box or pipeline open.boxäThis 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 Seq.ÞSeq is used because only a finite number of commits are expected and because snoc'ing is cool.boxlist committer   Safe-Inferred>?ÀÁÂÔÙÓbox.sometimes you have no choice but to void it upboxéA 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  33 Safe-Inferred >?ÀÁÂÉÔ×Ù %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/boxÆadd a post-emit monadic action on the emitted value (if there was any)0boxturn an emitter into a list1boxemit from a StateT Seq4FIXME: This compiles but is an infinite "a" emitter:Úlet e1 = hoist (flip evalStateT (Seq.fromList ["a", "b"::Text])) stateE :: Emitter IO Text2box4convert a list emitter to a Stateful element emitter3boxStop an % after n 's4box$Take from an emitter until predicate5box*Filter emissions according to a predicate.%&'()*+,-./012345%&'(+,)*-./021345 Safe-Inferred >?ÀÁÂÉÔ×Ùî >box combines ’ and “Abox combines ”• and –—Dboxí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.Hbox&Wrong signature for the MFunctor classIboxa profunctor dimapMaybeJboxcomposition of monadic boxesKbox?@ABCDEFGHIJKLMNDEFGIHKLMNJABC>?@None >?ÀÁÂÉÔ×ÙîôTboxT" specifies how messages are queued[box"create a queue, returning the ends\box$turn a queue into a box (and a seal)]boxÐturn a queue into a box (and a seal), and lift from stm to the underlying monad.^box5wait for the first action, and then cancel the second_boxÅrun two actions concurrently, but wait and return on the left result.`boxÆrun two actions concurrently, but wait and return on the right result.aboxÛconnect a committer and emitter action via spawning a queue, and wait for both to complete.bboxÛconnect a committer and emitter action via spawning a queue, and wait for both to complete.cbox7create an unbounded queue, returning the emitter resultdbox7create an unbounded queue, returning the emitter resulteboxlift a box from STMfbox)turn a box action into a box continuationgbox)connect up two box actions via two queuesTVWZUXY[\]^_`abcdefgTVWZUXYcd^[ba\]e_`fgNone ,>?ÀÁÂÉÔ×Ù¯hboxTurn a list into an % continuation via a Tibox1fromList_ directly supplies to a committer actionÌFIXME: fromList_ combined with cRef is failing dejavu concurrency testing...jbox)toList_ directly receives from an emitterTODO: check isomorphism toList_ == toListEkbox-Glues a committer and emitter, taking n emitsÈglueN 4 <$> pure (contramap (pack . show) toStdout) <*.> fromListE [1..]1234lboxÄtake 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.mboxÄhook a committer action to a queue, creating an emitter continuationnboxÄhook a committer action to a queue, creating an emitter continuationobox finite sinkpbox finite sourceqbox?ÀÁÂÉÔ×Ùh wboxemit Text from stdin inputs:t emit fromStdin!emit fromStdin :: IO (Maybe Text)xboxcommit to stdout*commit toStdout ("I'm committed!" :: Text)I'm committed!Trueyboxfinite console emitterzboxfinite console committer{box,read from console, throwing away read errors|boxshow to stdout}box"Emits lines of Text from a handle.~box!Commit lines of Text to a handle.box Emits lines of Text from a file.€box Commits lines of Text to a file.box+Commits lines of Text, appending to a file.‚boxcommit to an IORefƒboxemit from a list IORef wxyz{|}~€‚ƒ wxyz{|}~‚ƒ€None,/?ÔÙ ¤„box"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 stampŒbox'wait until Stamped time before emittingbox£reset the emitter stamps to by in sync with the current time and adjust the speed > let e1 = fromListE (zipWith (x a -> Stamped (addUTCTime x t) a) [0..5] [0..5])ŽboxËsimulate a delay from a (Stamped a) Emitter relative to the first timestamp „…‡†ˆ‰Š‹ŒŽ ˆ‰„…‡†Š‹ŒŽ None,>?ÀÁÂÉÔ×Ùî!ð%&'()*+,-./012345>?@ABCDEFGHIJKLMNTYXUZVW[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…‡†ˆ‰Š‹ŒŽ˜      !"#$%&'()*+,,-./0123456789:;<=>?@ABCDEFGHI  JKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆˆ‰Š‹ŒŽ‘’“”•–—˜™š•–›•–œ˜™˜™žŸ box-0.7.0-CoeLPwc3Ca2CBafsOA97U2 Box.CommitterBox.Cont Box.EmitterBox.Box Box.QueueBox.ConnectorsBox.IOBox.TimeBox CommittercommitdrainmapCpremapCpostmapCstateClistC$fDecidableCommitter$fDivisibleCommitter$fContravariantCommitter$fMonoidCommitter$fSemigroupCommitter$fMFunctorTYPECommitterCont_with_ContwithrunContrunCont_<$.><*.> $fMonoidCont$fSemigroupCont $fMonadIOCont $fMonadCont$fApplicativeCont $fFunctorCont $fMonoidCont_$fSemigroupCont_$fMonadIOCont_ $fMonadCont_$fApplicativeCont_$fFunctorCont_EmitteremitmapEparseEparseE_readEreadE_premapEpostmapEpostmapMtoListEstateEunlistEtakeE takeUntilEfilterE$fMonoidEmitter$fSemigroupEmitter$fMonadPlusEmitter$fAlternativeEmitter$fMonadEmitter$fApplicativeEmitter$fFunctorEmitter$fMFunctorTYPEEmitterDecAltchoicelossDivapdivapconpur committeremitterhoistbbmapdotbglueglue_gluebfuse $fMonoidBox$fSemigroupBox$fProfunctorBox $fDivapBox $fDecAltBoxQueue UnboundedBoundedSingleLatestNewestNewendstoBoxtoBoxM waitCancelconcurrentlyLeftconcurrentlyRightwithQCwithQEqueueCqueueEliftB fromAction fuseActions fromListE fromList_toList_glueN fromToList_emitQcommitQsinksourceforkEmitqueueCommitter queueEmitter concurrentE concurrentCfeedback fromStdintoStdout fromStdinN toStdoutN readStdin showStdouthandleEhandleCfileE fileWriteC fileAppendCcRefeRefStampedstampvaluesleep sleepUntilstampNowstampEemitOnplaybacksimulate $fEqStamped $fShowStamped $fReadStamped*contravariant-1.5.5-Ahm1naNh6BQEDiMrfTOLxo$Data.Functor.Contravariant.Divisible DecidablebaseGHC.Base AlternativedivideconquerliftA2pure