úÎofkÃ.      !"#$%&'()*+,-None/029:;DIRTnA wrapper around a container which encodes its minimum length in the type system. This allows functions like  and  to be made safe without using .. The length, nat, is encoded as a  &https://wiki.haskell.org/Peano_numbers Peano number, which starts with the  > constructor and is made one larger with each application of  (  for 0,    for 1,  (  )S for 2, etc.). Functions which require at least one element, then, are typed with Succ nat , where nat is either  " or any number of applications of :  :: / mono =>  ( nat) mono -> 0 mono The length is also a  %https://wiki.haskell.org/Phantom_type phantom typed, i.e. it is only used on the left hand side of the type and doesn't exist at runtime. Notice how   & isn't included in the printed output: >   [1,2,3] :: . ( (  ) [1]) 2 ( {unMinLen = [1,2,3]}) You can still use GHCI's :i- command to see the phantom type information:  > let xs =  1 $   [] > :i xs xs :: 3 t =>  (  ) [t] 'Get the monomorphic container out of a  wrapper.2Calculates the maximum of two type-level naturals.See the  type signature for an example. > :t  ::  ( (  )) (  )  ::  ( (  )) (  ) ::  (  ) Adds two type-level naturals.See the  type signature for an example. > :t  ::  ( (  )) (  )  ::  ( (  )) (  ) ::  ( (  )) +Type-level natural number utility typeclass.Turn a type-level natural number into a number >    0 >  ( ( (  ))) 3 2Get a data representation of a natural number type >  ::  (  Ž) Succ (Succ Zero) -- Errors because Succ and Zero have no Show typeclass, -- But this is what it would look like if it did. ? represents the next number in the sequence of natural numbers. It takes a nat# (a natural number) as an argument.  is a nat , allowing    to represent 1. is also a nat,, so it can be applied to itself, allowing  (  ) to represent 2,  ( (  )) to represent 3, and so on.  ) is the base value for the Peano numbers.4BThis function is unsafe, and must not be exposed from this module.5Get the  of a  container. ^Types a container as having a minimum length of zero. This is useful when combined with other 4 functions that increase the size of the container.Examples  > 1 `mlcons`   []  {unMinLen = [1]} Attempts to add a ' constraint to a monomorphic container.Examples  > let xs =   [1,2,3] :: . ( (  ) [1]) > xs 2 (& {unMinLen = [1,2,3]}) > :i xs xs :: . ( (  ) [1]) >   [] :: . ( (  ) [1]) 6 Unsafe[Although this function itself cannot cause a segfault, it breaks the safety guarantees of A and can lead to a segfault when using otherwise safe functions.Examples  > let xs =  [] ::  (  ) [1] > 7 xs 0 > 6 xs *** Exception: Data.MonoTraversable.headEx: empty KAdds an element to the front of a list, increasing its minimum length by 1.Examples  > let xs =  [1,2,3] ::  (  ) [1] > 0 `mlcons` xs  {unMinLen = [0,1,2,3]} AConcatenate two sequences, adding their minimum lengths together.Examples  > let xs =  [1,2,3] ::  (  ) [1] > xs `mlappend` xs  {unMinLen = [1,2,3,1,2,3]} 4Return the first element of a monomorphic container.Safe version of 85, only works on monomorphic containers wrapped in a  ( nat).3Return the last element of a monomorphic container.Safe version of 95, only works on monomorphic containers wrapped in a  ( nat).>Returns all but the first element of a sequence, reducing its  by 1.+Safe, only works on sequences wrapped in a  ( nat).Examples  > let xs =   [1,2,3] :: . ( (  ) [1]) > :  xs 2 ( {unMinLen = [2,3]}) =Returns all but the last element of a sequence, reducing its  by 1.+Safe, only works on sequences wrapped in a  ( nat).Examples  > let xs =   [1,2,3] :: . ( (  ) [1]) > :  xs 2 ( {unMinLen = [1,2]}) )Joins two semigroups, keeping the larger  of the two.Examples  > let xs =  [1] ::  (  ) [1"] > let ys = xs `mlunion` xs > ys # {unMinLen = [1,1]} > :i ys ys ::  (  ) [1] UMap each element of a monomorphic container to a semigroup, and combine the results.Safe version of ;5, only works on monomorphic containers wrapped in a  ( nat).Examples > let xs = ("hello", 1 :: Integer#) `mlcons` (" world", 2) `mlcons` (  []) >  fst xs "hello world" 1Join a monomorphic container, whose elements are < s, together.8Safe, only works on monomorphic containers wrapped in a  ( nat).Examples 3> let xs = "a" `mlcons` "b" `mlcons` "c" `mlcons` (  []) > xs  {unMinLen = ["a","b","c"]} >  xs "abc" GRight-associative fold of a monomorphic container with no base element.Safe version of =5, only works on monomorphic containers wrapped in a  ( nat). foldr1 f = Prelude. f . >Examples 3> let xs = "a" `mlcons` "b" `mlcons` "c" `mlcons` (  []) >  (++) xs "abc" NStrict left-associative fold of a monomorphic container with no base element.Safe version of ?5, only works on monomorphic containers wrapped in a  ( nat). foldl1' f = Prelude. f . >Examples 3> let xs = "a" `mlcons` "b" `mlcons` "c" `mlcons` (  []) >  (++) xs "abc" 3Get the maximum element of a monomorphic container.Safe version of @5, only works on monomorphic containers wrapped in a  ( nat).Examples  > let xs =   [1,2,3] :: . ( (  ) [1]) > :  xs 2 3 3Get the minimum element of a monomorphic container.Safe version of A5, only works on monomorphic containers wrapped in a  ( nat).Examples  > let xs =   [1,2,3] :: . ( (  ) [1]) > :  xs 2 1 `Get the maximum element of a monomorphic container, using a supplied element ordering function.Safe version of B5, only works on monomorphic containers wrapped in a  ( nat).`Get the minimum element of a monomorphic container, using a supplied element ordering function.Safe version of C5, only works on monomorphic containers wrapped in a  ( nat).D is .For E f , the new mono is populated by applying f to successive tails of the original mono.For example, for  (  ) [1], or NonNull [1]: EÛ f [1,2,3,4,5] = [ f [1, 2, 3, 4, 5] , f [2, 3, 4, 5] , f [3, 4, 5] , f [4, 5] , f [5] ] 1Meant to be a direct analogy to the instance for NonEmpty a.(F 45  !"#$%    "F  45  !"#$%5G      !"#$%&'()*+,-./0123456789:34;3<=>?34@ABC34DE3FGHIJKLMNOPQ%minlen-0.1.0.0-8GxA8CyoWsf8iJ7xvd6vbx Data.MinLenPreludefoldr1foldl1'-mono-traversable-1.0.0-Dcw43DthwhL7IQSTSFZdBAData.MonoTraversable GrowingAppendMinLenunMinLenMaxNatAddNatTypeNat toValueNattypeNatSuccZero toMinLenZerotoMinLenunsafeToMinLenmlconsmlappendheadlasttailMLinitMLmlunion ofoldMap1ofold1ofoldr1ofoldl1'maximumminimum maximumBy minimumBy$fMonoComonadMinLen$fMonoPointedMinLen$fMonoPointedMinLen0$fSemiSequenceMinLen$fSemigroupMinLen$fMonoTraversableMinLen $fTypeNatSucc $fTypeNatZero $fEqMinLen $fOrdMinLen $fReadMinLen $fShowMinLen $fDataMinLen$fGrowingAppendMinLen$fMonoFoldableMinLen$fMonoFunctorMinLenbaseGHC.BaseMaybeMonoTraversableElementghc-prim GHC.TypesIntJustGHC.NumNum unsafeMapnatProxyNothingolengthheadExlastExfmap ofoldMap1ExData.Semigroup Semigroup ofoldr1ExotoList ofoldl1Ex' maximumEx minimumEx maximumByEx minimumByExoextractoextend