h&      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUV Trustworthylogict-sequence(Convert a list of anything to a list of .(c) Atze van der Ploeg 2014 (c) David Feuer 2021 BSD-styleDavid.Feuer@gmail.com provisionalportable Safe-Inferred8dlogict-sequence4A scheduled Banker's Queue, as described by Okasaki.Wlogict-sequenceA strict-spined snoc-listXlogict-sequenceAppend a snoc list to a list.Precondition: |f| = |r| - 1Ylogict-sequence f| = |r| - 1Z5Safe)*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:;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-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 \ 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  | s!logict-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 a 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 b m a.  toLogicT = *-logict-sequence'This function is the implementation of c for :. The passed function is required to be a monad morphism..logict-sequence A version of c that uses the d instance for n rather than for m. Like hoist:, the passed function is required to be a monad morphism./logict-sequence A version of c that works for arbitrary functions, rather than just monad morphisms.0logict-sequence A version of . that works for arbitrary functions, rather than just monad morphisms. This should be preferred when the d instance for n! is less expensive than that for m.6logict-sequencec is -." !"#$%&'()*+,-./0#$(&)%'*-./0+, !"#5 Safe-Inferred(3*+,UV*+,UVSafe]efdghijklmnopqrstuvwxyz{|}~] !"#$%&'() !"#$(&)%' Safe-Inferred-./0/.0-          !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUV')WXYZ[\][^_[^`abcdbce[fgbhijkl[^m[no[^p[^q[^r[^s[^t[^u[^v[wx[wy[z{[z|[}~[}[n[n[n[n[n[n[n[n[n[n[n[n[n[n[z[[[[[[^[^[^[^[^[^[^[^[^[^*logict-sequence-0.2-HDubWq6jJsI7PcKgXxHl2R)Control.Monad.Logic.Sequence.Internal.Any4Control.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.MorphAny toAnyListQueue$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