h&      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRST(c) Atze van der Ploeg 2014 (c) David Feuer 2021 BSD-styleDavid.Feuer@gmail.com provisionalportable Safe-Inferred8logict-sequence4A scheduled Banker's Queue, as described by Okasaki.Ulogict-sequenceA strict-spined snoc-listVlogict-sequenceAppend a snoc list to a list.Precondition: |f| = |r| - 1Wlogict-sequence f| = |r| - 1X5Safe)*89:-logict-sequenceBased on the LogicT improvements in the paper, Reflection without Remorse. Code is based on the code provided in: 2https://github.com/atzeus/reflectionwithoutremorseNote: that code is provided under an MIT license, so we use that as well. Trustworthy()*589:;L logict-sequenceA specialization of  to the Y- 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 Z or [ applications.logict-sequenceAn 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 Z 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 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 ^. 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 _ 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 ` m a.  toLogicT = (+logict-sequence'This function is the implementation of a for :. The passed function is required to be a monad morphism.,logict-sequence A version of a that uses the b instance for n rather than for m. Like hoist:, the passed function is required to be a monad morphism.-logict-sequence A version of a 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 b instance for n! is less expensive than that for m.4logict-sequencea is +."  !"#$%&'()*+,-.# "&$'#%(+,-.)* !5 Safe-Inferred(()*ST()*STSafecdbefghijklmnopqrstuvwxyz{|}~[  !"#$%&'  !"&$'#% Safe-Inferred+,-.-,.+         !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRS$&TUVWXYZX[\X[]^_`a_`bXcd_efghiX[jXklX[mX[nX[oX[pX[qX[rX[sXtuXtvXwxXwyXz{Xz|Xk}Xk~XkXkXkXkXkXkXkXkXkXkXkXkXwXXXXXX[X[X[X[X[X[X[X[X[X[.logict-sequence-0.2.0.1-4fqFdbP4tNv6bY7HLdCqTR4Control.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.MorphQueue$fTraversableQueue$fFoldableQueue$fSequenceQueue$fFunctorQueue $fFunctorSL $fMonoidQueue$fSemigroupQueueSeqSeqTViewViewTEmpty:<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:>baseData.Functor.IdentityIdentityGHC.Base<|>mplusinterleaveViewT%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