h$      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`  TrustworthysequenceConvert anything to .sequence(Convert a list of anything to a list of .(c) Atze van der Ploeg 2014 BSD-styleatzeus@gmail.org provisionalportable Safe-Inferred '(2>  sequenceA view of the right end of a  .sequenceA view of the left end of a  . sequence#A type class for (finite) sequencesInstances should be  free monoids ( 7http://comonad.com/reader/2015/free-monoids-in-haskell/>ignoring issues with infinite and partially defined structures), just like lists, with  singleton as the canonical injection and foldMap factoring functions. In particular, they should satisfy the following laws: Semigroup and Monoid laws: +(><) == (Data.Semigroup.<>) empty == mempty!In particular, this requires that =empty >< x == x x >< empty == x (x >< y) >< z = x >< (y >< z)FoldMap/ singleton laws:For any a m and any function  f :: c -> m, b f is a monoid morphism: b f c = c b f (m d n) = b f m <> b f nb undoes  : b f .   = fObservation laws: 8viewl (singleton e >< s) == e :< s viewl empty == EmptyLThe behaviour of ,, and < is implied by the above laws and their default definitions.Warning: the default definitions are typically awful. Check them carefully before relying on them. In particular, they may well work in O(n^2) time (or worse?) when even definitions that convert to and from lists would work in O(n) time. Exceptions: for sequences with constant time concatenation, the defaults for  and , are okay. For sequences with constant time , the default for  is okay. sequenceAppend two sequences sequenceView a sequence from the leftsequenceView a sequence from the rightDefault definition: viewr q = case viewl q of EmptyL -> EmptyR h :< t -> case viewr t of EmptyR -> empty :> h p :> l -> (h <| p) :> lsequence$Append a single element to the rightDefault definition: l |> r = l >< singleton rsequence#Append a single element to the leftDefault definition: l <| r = singleton l >< rsequenceConvert a list to a sequenceDefault definition: fromList = foldl' (|>) empty        9 9 555(c) Atze van der Ploeg 2013 BSD-styleatzeus@gmail.org provisionalportable Safe-Inferred '(2567 ?sequenceThe catenable queue type. The first type argument is the type of the queue we use (|>)(c) Atze van der Ploeg 2013 BSD-styleatzeus@gmail.org provisionalportable Safe-Inferred     (c) Atze van der Ploeg 2014 BSD-styleatzeus@gmail.org provisionalportable Safe-Inferred '(/2567 b$sequenceA queue. $%&'()*+, $%&'+,()* (c) Atze van der Ploeg 2014 BSD-styleatzeus@gmail.org provisionalportable Safe-Inferred     $$(c) Atze van der Ploeg 2014 (c) David Feuer 2021 BSD-styleatzeus@gmail.org provisionalportable Safe-Inferred5>sequence8A scheduled Banker's FastQueue, as described by Okasaki.@sequenceA lazy-spined snoc-list. Why lazy-spined? Only because that's better for e. In theory, strict-spined should be a bit better for everything else, but in practice it makes no measurable difference.CsequenceAppend a snoc list to a list.>?@BACD>?@BACDB5 (c) Atze van der Ploeg 2014 (c) David Feuer 2021 BSD-styleatzeus@gmail.org provisionalportable Safe-Inferred    >>(c) Atze van der Ploeg 2014 BSD-styleatzeus@gmail.org provisionalportable Safe-Inferred2QsequenceA catenable queue.    QQ(c) Atze van der Ploeg 2014 BSD-styleatzeus@gmail.org provisionalportable Safe-Inferred '(/567Rsequence-A catenable queue intended for ephemeral use.RUSTRUST (c) Atze van der Ploeg 2014 BSD-styleatzeus@gmail.org provisionalportable Safe-Inferred{    RR   !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnloplmqlmrlms'sequence-0.9.9.0-3DiVM8ebQqCFMxXrpTvnJY$Data.Sequence.FastQueue.Internal.AnyData.SequenceClass!Data.Sequence.ToCatQueue.InternalData.Sequence.Queue.Internal Data.Sequence.FastQueue.InternalData.Sequence.FastCatQueueData.Sequence.BSeq.InternalData.Sequence.ToCatQueueData.Sequence.QueueData.Sequence.FastQueueData.Sequence.BSeqAnytoAny toAnyListViewREmptyR:>ViewLEmptyL:<Sequenceempty singleton><viewlviewr|><|fromList $fSequence[] $fSequenceSeq $fShowViewR $fShowViewL ToCatQueueC0CN$fMonoidToCatQueue$fSemigroupToCatQueue$fSequenceToCatQueue$fOrdToCatQueue$fEqToCatQueue$fReadToCatQueue$fShow1ToCatQueue$fShowToCatQueue$fTraversableToCatQueue$fFoldableToCatQueue$fFunctorToCatQueueQueueQ0Q1QNBB1B2P:* $fOrdQueue $fEqQueue $fReadQueue $fShow1Queue $fShowQueue$fSequenceQueue $fMonoidQueue$fSemigroupQueue $fFunctorP $fFoldableP$fTraversableP$fTraversableQueue$fFoldableQueue$fFunctorQueue$fTraversableB $fFoldableB $fFunctorB FastQueueRQSLSNilappendSLqueue$fMonoidFastQueue$fSemigroupFastQueue$fTraversableFastQueue$fFoldableFastQueue$fOrdFastQueue $fEqFastQueue$fReadFastQueue$fShow1FastQueue$fShowFastQueue$fSequenceFastQueue$fFunctorFastQueue $fFunctorSL FastTCQueueBSeqEmptyLeafNode$fSequenceBSeq $fOrdBSeq$fEqBSeq $fReadBSeq $fShow1BSeq $fShowBSeq $fMonoidBSeq$fSemigroupBSeq$fFoldableBSeq $fFunctorBSeq$fTraversableBSeqbaseGHC.BaseMonoid Data.FoldablefoldMapmempty<>fmap