rp      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ Trustworthy;=>?QVf)The empty type, used to close output endsA m is a monad transformer that receives and sends information on both an upstream and downstream interface.The type variables signify:a' and a! - The upstream interface, where (a') s go out and (a)s come inb' and b# - The downstream interface, where (b) s go out and (b')s come inm  - The base monadr  - The return value is like  , but faster.This is labeled as unsafe because you will break the monad transformer laws if you do not pass a monad morphism as the first argument. This function is safe if you pass a monad morphism as the first argument.?The monad transformer laws are correct when viewed through the  function:  ( ( r)) =  ( r)  ( (m  f)) =  ( m    f) ZThis correctness comes at a small cost to performance, so use this function sparingly.-This function is a convenience for low-level pipes+ implementers. You do not need to use  if you stick to the safe API. Use   to "handle" impossible outputs    TrustworthyQVB[!Like , but with a polymorphic typeLike , but with a polymorphic typeLike  , but with a polymorphic typeLike ", but with a polymorphic typeLike #, but with a polymorphic type Server b' b receives requests of type b'! and sends responses of type b.s only % and never (. Client a' a sends requests of type a'$ and receives responses of type a.s only ( and never %.   s can only !! s can both  and "" s can only #An effect in the base monad# s neither  nor $Run a self-contained #&, converting it back to the base monad%Send a value of type a6 downstream and block waiting for a reply of type a'%) is the identity of the respond category.&*Compose two unfolds, creating a new unfold (f & g) x = f x ' g (&6) is the composition operator of the respond category.' (p //> f) replaces each % in p with f.Point-ful version of (&)(Send a value of type a'0 upstream and block waiting for a reply of type a() is the identity of the request category.)&Compose two folds, creating a new fold (f ) g) x = f * g x ()6) is the composition operator of the request category.* (f >\\ p) replaces each ( in p with f.Point-ful version of ())+&Forward responses followed by requests + = %   (   + +& is the identity of the push category.,"Compose two proxies blocked while (1ing data, creating a new proxy blocked while (ing data (f , g) x = f x - g (,3) is the composition operator of the push category.- (p >>~ f) pairs each % in p with a ( in f.Point-ful version of (,).'Forward requests followed by responses: . = (   %   . .& is the identity of the pull category./-Compose two proxies blocked in the middle of %7ing, creating a new proxy blocked in the middle of %ing (f / g) x = f 0 g x (/3) is the composition operator of the pull category.0 (f +>> p) pairs each ( in p with a % in f.Point-ful version of (/)1'Switch the upstream and downstream ends2Equivalent to (&) with the arguments flipped3Equivalent to ()) with the arguments flipped4Equivalent to (,) with the arguments flipped5Equivalent to (/) with the arguments flipped6Equivalent to (') with the arguments flipped7Equivalent to (*) with the arguments flipped8Equivalent to (-) with the arguments flipped9Equivalent to (0) with the arguments flipped&')*,-/023456789$  !"#$%&'()*+,-./0123456789$$%&'()*+,-./01#"! 23485679 &4'3)5*4,8-7/7062435485763748796 Trustworthy;=>?QV:: generalizes   ), converting effectful containers to <s. Instances of : must satisfy these two laws: qtoListT (return r) = return r toListT $ do x <- m = do x <- toListT m f x toListT (f x)In other words, ; is monad morphism.<FThe list monad transformer, which extends a monad with non-determinism corresponds to ?, yielding a single value() corresponds to @N, calling the second computation once for each time the first computation ?s.?Produce a value ? ::  m => a -> ! x a m () @ (for p body) loops over p replacing each ? with body. @ ::  m => " b m r -> (b -> # m ()) -> # m r @ ::  m => " b m r -> (b -> " c m ()) -> " c m r @ ::  m => ! x b m r -> (b ->   x m ()) ->   x m r @ ::  m => ! x b m r -> (b -> ! x c m ()) -> ! x c m r 4The following diagrams show the flow of information:  .---> b / | +-----------+ / +-----|-----+ +---------------+ | | / | v | | | | | / | | | | x ==> p ==> b ---' x ==> body ==> c = x ==> @ p body ==> c | | | | | | | | | | | | | | | +-----|-----+ +-----|-----+ +-------|-------+ v v v r () r >For a more complete diagram including bidirectional flow, see Pipes.Core#respond-diagram.ACompose loop bodies (A) ::  m => (a -> " b m r) -> (b -> # m ()) -> (a -> # m r) (A) ::  m => (a -> " b m r) -> (b -> " c m ()) -> (a -> " c m r) (A) ::  m => (a -> ! x b m r) -> (b ->   x m ()) -> (a ->   x m r) (A) ::  m => (a -> ! x b m r) -> (b -> ! x c m ()) -> (a -> ! x c m r) 4The following diagrams show the flow of information:  a .---> b a | / | | +-----|-----+ / +-----|-----+ +------|------+ | v | / | v | | v | | | / | | | | x ==> f ==> b ---' x ==> g ==> c = x ==> f A g ==> c | | | | | | | | | | | | | | | +-----|-----+ +-----|-----+ +------|------+ v v v r () r >For a more complete diagram including bidirectional flow, see Pipes.Core#respond-diagram.B(A) with the arguments flippedCConsume a value C ::  m => ! a y m a D (draw >~ p) loops over p replacing each C with draw (D) ::  m => # m b ->   b m c -> # m c (D) ::  m =>   a m b ->   b m c ->   a m c (D) ::  m => " y m b -> ! b y m c -> " y m c (D) ::  m => ! a y m b -> ! b y m c -> ! a y m c 4The following diagrams show the flow of information: 3 +-----------+ +-----------+ +-------------+ | | | | | | | | | | | | a ==> f ==> y .---> b ==> g ==> y = a ==> f D g ==> y | | / | | | | | | | / | | | | | | +-----|-----+ / +-----|-----+ +------|------+ v / v v b ----' c c >For a more complete diagram including bidirectional flow, see Pipes.Core#request-diagram.E(D) with the arguments flippedF The identity !, analogous to the Unix cat programG!1 composition, analogous to the Unix pipe operator (G) ::  m => " b m r ->   b m r -> # m r (G) ::  m => " b m r -> ! b c m r -> " c m r (G) ::  m => ! a b m r ->   b m r ->   a m r (G) ::  m => ! a b m r -> ! b c m r -> ! a c m r 4The following diagrams show the flow of information:  +-----------+ +-----------+ +-------------+ | | | | | | | | | | | | a ==> f ==> b ==> g ==> c = a ==> f GK g ==> c | | | | | | | | | | | | | | | +-----|-----+ +-----|-----+ +------|------+ v v v r r r >For a more complete diagram including bidirectional flow, see Pipes.Core#pull-diagram.HRun a self-contained < computationIConsume the first value from a "I either fails with a  if the "# terminates or succeeds with a 3 providing the next value and the remainder of the ".J Convert a  to a "K Convert an : to a "LDiscards a valueM(G) with the arguments flipped@ABDEGM+ !"#$:;<=>?@ABCDEFGHIJKLM#$"?@AB CDE!FGM<=>H:;IJKL:;<=>A4B4D5E5G7M7Safef Distribute  over a monad transformergWrap the base monad in hRun  in the base monadi Catch an error in the base monadj8Catch an error using a catch function for the base monadkWrap the base monad in lRun  in the base monadmWrap the base monad in nRun  in the base monadoWrap the base monad in pRun  in the base monadq Evaluate  in the base monadrExecute  in the base monadsWrap the base monad in tRun  in the base monaduExecute  in the base monadvWrap the base monad in wRun  in the base monadx Evaluate  in the base monadyExecute  in the base monadfijfghijklmnopqrstuvwxyfghijklmnopqrstuvwxy TrustworthyQVJ=zRead s from  using Terminates on end of input{ values from , ignoring failed parses|Read  s from a  using Terminates on end of input}&Repeat a monadic action indefinitely, ?ing each result~1Repeat a monadic action a fixed number of times, ?ing each result hreplicateM 0 x = return () replicateM (m + n) x = replicateM m x >> replicateM n x -- 0 <= {m,n}Write s to  using Unlike , . gracefully terminates on a broken output pipeWrite s to  using QThis does not handle a broken output pipe, but has a polymorphic return value+Consume all values using a monadic function values to Write s to a  using L all incoming values1Apply a function to all values flowing downstream +map id = cat map (g . f) = map f >-> map g9Apply a monadic function to all values flowing downstream 5mapM return = cat mapM (f >=> g) = mapM f >-> mapM g1Convert a stream of actions to a stream of values_Apply a function to all values flowing downstream, and forward each element of the result.(filter predicate)1 only forwards values that satisfy the predicate. Nfilter (pure True) = cat filter (liftA2 (&&) p1 p2) = filter p1 >-> filter p2(filterM predicate)< only forwards values that satisfy the monadic predicate bfilterM (pure (pure True)) = cat filterM (liftA2 (liftA2 (&&)) p1 p2) = filterM p1 >-> filterM p2(take n) only allows n values to pass through 3take 0 = return () take (m + n) = take m >> take n 9take <infinity> = cat take (min m n) = take m >-> take n (takeWhile p)L allows values to pass downstream so long as they satisfy the predicate p. ZtakeWhile (pure True) = cat takeWhile (liftA2 (&&) p1 p2) = takeWhile p1 >-> takeWhile p2(takeWhile' p)L is a version of takeWhile that returns the value failing the predicate. ^takeWhile' (pure True) = cat takeWhile' (liftA2 (&&) p1 p2) = takeWhile' p1 >-> takeWhile' p2(drop n) discards n values going downstream .drop 0 = cat drop (m + n) = drop m >-> drop n (dropWhile p)G discards values going downstream until one violates the predicate p. [dropWhile (pure False) = cat dropWhile (liftA2 (||) p1 p2) = dropWhile p1 >-> dropWhile p2 Flatten all  elements flowing downstream@Outputs the indices of all elements that match the given element@Outputs the indices of all elements that satisfied the predicateStrict left scan @Control.Foldl.purely scan :: Monad m => Fold a b -> Pipe a b m rStrict, monadic left scan EControl.Foldl.impurely scan :: Monad m => FoldM a m b -> Pipe a b m r0Apply an action to all values flowing downstream Qchain (pure (return ())) = cat chain (liftA2 (>>) m1 m2) = chain m1 >-> chain m2Parse <able values, only forwarding the value if the parse succeedsConvert able values to s.Evaluate all values flowing downstream to WHNF Create a ! from a < transformation 9loop (k1 >=> k2) = loop k1 >-> loop k2 loop return = cat!Strict fold of the elements of a " JControl.Foldl.purely fold :: Monad m => Fold a b -> Producer a m () -> m b!Strict fold of the elements of a " that preserves the return value OControl.Foldl.purely fold' :: Monad m => Fold a b -> Producer a m r -> m (b, r)*Strict, monadic fold of the elements of a " NControl.Foldl.impurely foldM :: Monad m => FoldM a b -> Producer a m () -> m b*Strict, monadic fold of the elements of a " SControl.Foldl.impurely foldM' :: Monad m => FoldM a b -> Producer a m r -> m (b, r)(all predicate p)( determines whether all the elements of p satisfy the predicate.(any predicate p)# determines whether any element of p satisfies the predicate.$Determines whether all elements are "Determines whether any element is  (elem a p) returns  if p has an element equal to a,  otherwise (notElem a) returns  if p has an element equal to a,  otherwiseFind the first element of a " that satisfies the predicate)Find the index of the first element of a "! that satisfies the predicate"Retrieve the first element from a " Index into a "!Retrieve the last element from a ""Count the number of elements in a "Find the maximum element of a "Find the minimum element of a "Determine if a " is empty%Compute the sum of the elements of a ")Compute the product of the elements of a "Convert a pure " into a listConvert an effectful " into a listNote:  is not an idiomatic use of pipes?, but I provide it for simple testing purposes. Idiomatic pipess style consumes the elements immediately as they are generated instead of loading all elements into memory.Convert an effectful "' into a list alongside the return valueNote:  is not an idiomatic use of pipes?, but I provide it for simple testing purposes. Idiomatic pipess style consumes the elements immediately as they are generated instead of loading all elements into memory.Zip two "sZip two "'s using the provided combining function Transform a   to a !2 that reforwards all values further downstreamTransform a unidirectional ! to a bidirectional  Kgeneralize (f >-> g) = generalize f >+> generalize g generalize cat = pullThe natural unfold into a "! with a step function and a seed unfoldr next = id=z{|}~=z{|}~ Safej   !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~          "pipes-4.3.8-CxwyrRznxAXDkTQI1XqjebPipesPipes.Internal Pipes.Core Pipes.Lift Pipes.Preludeawaityield Control.Monad>=> Data.FoldableFoldablePipes.TutorialbaseXProxyRequestRespondMPure unsafeHoistobserveclosed$fMonadCatchProxy$fMonadThrowProxy$fMonadErroreProxy$fMonadWriterwProxy$fMonadStatesProxy$fMonadReaderrProxy$fMonadIOProxy $fMMonadProxy$fMFunctorTYPEProxy$fMonadTransProxy $fMonoidProxy$fSemigroupProxy $fMonadProxy$fApplicativeProxy$fFunctorProxyClient'Server' Consumer' Producer'Effect'ServerClientConsumerPipeProducerEffect runEffectrespond/>///>request\>\>\\push>~>>>~pull>+>+>>reflect\<\/<~>~~<cat>->runListTnexteacheverydiscard<-<$fMonadZipListT$fMonadCatchListT$fMonadThrowListT$fMonadErroreListT$fMonadReaderiListT$fMonadWriterwListT$fMonadStatesListT $fMonoidListT$fSemigroupListT $fMMonadListT$fMFunctorTYPEListT$fMonadPlusListT$fAlternativeListT$fMonadIOListT$fMonadTransListT$fTraversableListT$fFoldableListT $fMonadListT$fApplicativeListT$fFunctorListT$fEnumerableExceptT$fEnumerableMaybeT$fEnumerableIdentityT$fEnumerableListT distributeexceptP runExceptP catchErrorliftCatchErrormaybeP runMaybePreaderP runReaderPstateP runStateP evalStateP execStatePwriterP runWriterP execWriterPrwsPrunRWSPevalRWSPexecRWSPstdinLnreadLn fromHandlerepeatM replicateMstdoutLn stdoutLn'mapM_printtoHandledrainmapmapMsequence mapFoldablefilterfilterMtake takeWhile takeWhile'drop dropWhileconcat elemIndices findIndicesscanscanMchainreadshowseqloopfoldfold'foldMfoldM'allanyandorelemnotElemfind findIndexheadindexlastlengthmaximumminimumnullsumproducttoListtoListMtoListM'zipzipWithtee generalizeunfoldr#mmorph-1.1.1-HyxFzqxsqTOEotnEvLrpxbControl.Monad.Morphhoisttransformers-0.5.2.0Control.Monad.Trans.ClassliftGHC.Basereturn>>=.Monad Data.EitherLeftRightControl.Monad.IO.ClassMonadIOliftIO Data.Functorvoid MonadPlusmzeromplusMFunctorMMonadembed MonadTransControl.Monad.Trans.ExceptExceptTControl.Monad.Trans.MaybeMaybeTControl.Monad.Trans.ReaderReaderT Control.Monad.Trans.State.StrictStateT!Control.Monad.Trans.Writer.StrictWriterTControl.Monad.Trans.RWS.StrictRWSTStringGHC.IO.Handle.FDstdin System.IOgetLineGHC.IO.Handle.TypesHandleGHC.IO.Handle.TexthGetLinestdoutputStrLn hPutStrLnGHC.ReadReadGHC.ShowShowghc-prim GHC.TypesTrueFalse