h$#       !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ None >?aboxa 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.boxThis 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 >?`box.sometimes you have no choice but to void it upboxA 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 >? N%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/boxadd 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:let e1 = hoist (flip evalStateT ["a", "b"::Text]) stateE :: Emitter IO Text2box4convert a list emitter to a Stateful element emitter4box$Take from an emitter until predicate5box*Filter emissions according to a predicate.%&'()*+,-./012345%&'(+,)*-./021345None >?DboxA 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)]boxturn 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_boxrun two actions concurrently, but wait and return on the left result.`boxrun two actions concurrently, but wait and return on the right result.aboxconnect a committer and emitter action via spawning a queue, and wait for both to complete.bboxconnect 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 actionFIXME: 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 show toStdout) <*.> fromListE [1..]1234lboxtake 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.mboxhook a committer action to a queue, creating an emitter continuationnboxhook a committer action to a queue, creating an emitter continuationobox finite sinkpbox finite sourceqbox?^ 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 a list IORefboxemit from a list IORef wxyz{|}~ wxyz{|}~None /?box"A value with a UTCTime annotation.boxsleep for x secondsbox*sleep until a certain time (in the future)boxAdd the current timeboxadding a time stampbox'wait until Stamped time before emittingboxreset 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])boxsimulate a delay from a (Stamped a) Emitter relative to the first timestamp   None >? %&'()*+,-./012345>?@ABCDEFGHIJKLMNTYXUZVW[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,,-./0123456789:;<=>?@ABCDEFGHI  JKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~box-0.6.2-inplace 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