Ξυ³h&φεΥ      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTΐ(c) Atze van der Ploeg 2014 (c) David Feuer 2021 BSD-styleDavid.Feuer@gmail.com provisionalportable Safe-Inferred8Ήlogict-sequenceκA scheduled banker's queue, as described by Okasaki. In theory, we only need a queue supporting constant  amortized„ time operations. In practice, once a queue gets large, linear-time pauses and cache effects relating to rebuilding start to hurt.Ulogict-sequenceA strict-spined snoc-listVlogict-sequenceAppend a snoc list to a list.Precondition: |f| = |r| - 1Wlogict-sequence f| = |r| - 1X5 Trustworthy)*89:logict-sequenceΑA peculiarly lazy catenable queue. Note that appending multiple YΙ queues to a non-empty queue can break the amortized constant bound for Z in the persistent case.ϊContextual note: We could actually make these *non-empty* catenable queues, in which case the wonkiness around appending empty would go away. In ,  SeqT Empty/ is really just an optimized representation of SeqT (singleton (pure Empty)) where the Empty in the latter is an empty ViewT. Trustworthy()*589:;ΑΒΓΔΕΧάλ› logict-sequenceA specialization of  to the [- monad. You can imagine that this is defined 5newtype Seq a = MkSeq { getSeq :: ViewT Identity a }  Using the  pattern synonym with ’, you can pretend it's really defined this way! However, the real implementation is different, so as to be more efficient in the face of deeply left-associated \ or ] applications.logict-sequenceμAn asymptotically efficient logic monad transformer. It is generally best to think of this as being defined newtype SeqT m a =  {  :: m ( m a) }  Using the  pattern synonym with «, you can (almost) pretend it's really defined this way! However, the real implementation is different, so as to be more efficient in the face of deeply left-associated \ or ] applications.logict-sequenceA view of the front end of a .logict-sequenceA catamorphism for slogict-sequenceA catamorphism for 8s. Note that this is just a type-restricted version of .^logict-sequence $altViewT s t = toViewT (fromViewT s  | t) 1Question: is this actually good for optimization?logict-sequence cons a s = pure a  | slogict-sequence consM m s = lift m  | s_logict-sequence A version of `$ that produces a view instead of a . This lets us avoid toViewT . fromViewT in a. logict-sequence choose = foldr (a s -> pure a  | s) empty $choose :: Monad m => [a] -> SeqT m a!logict-sequence !chooseM = foldr (ma s -> lift ma  | s) empty 'chooseM :: Monad m => [m a] -> SeqT m a"logict-sequencePerform all the actions in a  and gather the results.#logict-sequencePerform actions in a / until one of them produces a result. Returns b if there are no results.$logict-sequenceobserveManyT n s performs actions in s until it produces n> results or terminates. All the gathered results are returned.%logict-sequenceGet the first result in a  , if there is one.&logict-sequenceGet all the results in a  .'logict-sequenceobserveMany n s gets up to n results from a  .(logict-sequenceConvert  m a to t m a when t( is some other logic monad transformer.)logict-sequenceConvert  m a to c m a.  toLogicT = (+logict-sequence'This function is the implementation of d for :. The passed function is required to be a monad morphism.,logict-sequence A version of d that uses the e instance for n rather than for m. Like hoist:, the passed function is required to be a monad morphism.-logict-sequence A version of dΗ that works for arbitrary functions, rather than just monad morphisms..logict-sequence A version of ,κ that works for arbitrary functions, rather than just monad morphisms. This should be preferred when the e instance for n! is less expensive than that for m.4logict-sequenced is +."  !"#$%&'()*+,-.# "&$'#%(+,-.)* !5 Safe-Inferred(()*ST()*STSafeλ9Κfgehijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ]‰Š‹ŒŽ‘’“  !"#$%&'  !"&$'#% Safe-InferredΩ+,-.-,.+”          !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRS$&TUVWXYZXY[\]^\_`\_abcdefdeg\hidjklmn\_o\pq\_r\_s\_t\_u\_v\_w\_x\yz\y{\|}\|~\€\\p‚\pƒ\p„\p…\p†\p‡\pˆ\p‰\pŠ\p‹\pŒ\p\pŽ\p\|\‘’\‘“\‘”\‘•\–—\_˜\_™\_š\_›\_œ\_\_ž\_Ÿ\_ \_‘’£€’£₯¦.logict-sequence-0.2.0.2-7cNyMP86HzmGU2N4KULIVf4Control.Monad.Logic.Sequence.Internal.ScheduledQueue+Control.Monad.Logic.Sequence.Internal.QueueControl.Monad.Logic.Sequence%Control.Monad.Logic.Sequence.Internal#Control.Monad.Logic.Sequence.Compat"Control.Monad.Logic.Sequence.MorphSeqTQueue$fTraversableQueue$fFoldableQueue$fSequenceQueue$fFunctorQueue $fFunctorSL $fMonoidQueue$fSemigroupQueueSeqViewViewTEmpty:<MkSeqgetSeqMkSeqTgetSeqTviewTview fromViewTfromViewtoViewTtoViewconsconsMchoosechooseM observeAllTobserveT observeManyTobserve observeAll observeManyfromSeqTtoLogicT fromLogicThoistPre hoistPosthoistPreUnexposedhoistPostUnexposed$fMonadZipSeqT$fMonadErroreSeqT$fMonadStatesSeqT$fMonadReadereSeqT $fMonadIOSeqT$fMFunctorTYPESeqT$fTraversableSeqT$fFoldableSeqT$fMonadLogicSeqT$fMonadTransSeqT $fMonoidSeqT$fSemigroupSeqT$fMonadPlusSeqT$fMonadFailSeqT $fMonadSeqT$fAlternativeSeqT$fApplicativeSeqT $fFunctorSeqT $fShow1SeqT $fOrd1SeqT $fEq1SeqT $fOrdSeqT$fEqSeqT $fReadSeqT $fShowSeqT $fShow1ViewT $fOrd1ViewT $fEq1ViewT$fTraversableViewT$fGenericViewT$fFoldableViewT$fFunctorViewT $fOrdViewT $fEqViewT $fReadViewT $fShowViewTSLappendSLrotate:>'sequence-0.9.9.0-4ZH1meHk9L4BKvSyhJnwkaData.SequenceClassemptyviewlbaseData.Functor.IdentityIdentityGHC.Base<|>mplusaltViewTinterleaveViewT%logict-0.7.1.0-LKxj4hJ5nsCBJ8rmnqowYSControl.Monad.Logic.Class interleave>>- GHC.MaybeNothingControl.Monad.LogicLogicT#mmorph-1.2.0-2QS7EC8bAGz8JRqyuvM0sbControl.Monad.MorphhoistMonad Control.Monadguardjoin>>>>=returnFunctorfmap<$Control.Monad.Fail MonadFailfailData.TraversablesequencemapMControl.Monad.IO.ClassMonadIOliftIO zipWithM_zipWithMunless replicateM_ replicateMmfilter mapAndUnzipMforeverfoldM_foldMfilterM>=><=<<$!>forM Data.Foldable sequence_msummapM_forM_ Data.Functorvoid MonadPlusmzerowhenliftM5liftM4liftM3liftM2liftMap=<<transformers-0.5.6.2Control.Monad.Trans.Class MonadTranslift