h$SGLʖ      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ Trustworthy# Safe]Safe./3U%vecEasily fuseable .It unpurpose don't have bad (fusion-wise) instances, like  Traversable4. Generally, there aren't functions which would be  bad consumers or  bad producers.vecEmpty .vec with exactly one element.L.fromPull $ singleton True True ::: VNilvecConvert  to list.vecConvert  to NonEmpty.vec Convert list [a] to  n a . Returns  if lengths don't match exactly.:L.fromPull <$> fromList "foo" :: Maybe (L.Vec N.Nat3 Char)#Just ('f' ::: 'o' ::: 'o' ::: VNil);L.fromPull <$> fromList "quux" :: Maybe (L.Vec N.Nat3 Char)Nothing9L.fromPull <$> fromList "xy" :: Maybe (L.Vec N.Nat3 Char)Nothingvec Convert list [a] to  n a . Returns  if input list is too short.L.fromPull <$> fromListPrefix "foo" :: Maybe (L.Vec N.Nat3 Char)#Just ('f' ::: 'o' ::: 'o' ::: VNil)L.fromPull <$> fromListPrefix "quux" :: Maybe (L.Vec N.Nat3 Char)#Just ('q' ::: 'u' ::: 'u' ::: VNil)?L.fromPull <$> fromListPrefix "xy" :: Maybe (L.Vec N.Nat3 Char)Nothing vecReify any list [a] to  n a.reifyList "foo" length3 vec Indexing. vecCons an element in front of a . vec%Add a single element at the end of a .vecThe first element of a .vecThe last element of a .vecThe elements after the  of a .vecThe elements before the  of a .vecReverse .vec?L.fromPull $ map not $ L.toPull $ True L.::: False L.::: L.VNilFalse ::: True ::: VNilvecL.fromPull $ imap (,) $ L.toPull $ 'a' L.::: 'b' L.::: 'c' L.::: L.VNil((0,'a') ::: (1,'b') ::: (2,'c') ::: VNilvecSee .vecSee  .vecSee .vec"There is no type-class for this :(vec Right fold.vecRight fold with an index.vecStrict left fold.vecYield the length of a .vecTest whether a  is empty.vecStrict .vecStrict . vecZip two s with a function.!vecZip two 9s. with a function that also takes the elements' indices."vec Repeat value#vec Monadic bind.$vec Monadic join.%vecGet all  n in a  n.0L.fromPull (universe :: Vec N.Nat3 (Fin N.Nat3))0 ::: 1 ::: 2 ::: VNil/vec0vec&  !"#$%&  !"#$%Safe'(/23>$R94vecWrite functions on 7. Use them with tuples.4 can be used to avoid "this function won't change the length of the list" in DSLs.bad: Instead of /[x, y] <- badDslMagic ["foo", "bar"] -- list! good: we can write <(x, y) <- betterDslMagic ("foo", "bar") -- homogenic tuple! where betterDslMagic can be defined using 6. Moreally lens Each< should be a superclass, but there's no strict need for it.7vec!Vector, i.e. length-indexed list.:vecEmpty 7.;vec7 with exactly one element.singleton True True ::: VNil<vecO(n) . Recover  (and ) dictionary from a 7 value. Example:  is constrained with  n, but if we have a 7 n a!, we can recover that dictionary:let f :: forall n a. Vec n a -> N.Nat; f v = withDict v (N.reflect (Proxy :: Proxy n)) in f (True ::: VNil)1Note: using  will be suboptimal, as if GHC has no opportunity to optimise the code, the recusion won't be unfold. How bad such code will perform? I don't know, we'll need benchmarks.=vecConvert to pull .>vecConvert from pull .?vecConvert 7 to list.%toList $ 'f' ::: 'o' ::: 'o' ::: VNil"foo"@vec#toNonEmpty $ 1 ::: 2 ::: 3 ::: VNil 1 :| [2,3]Avec Convert list [a] to 7 n a . Returns  if lengths don't match exactly.)fromList "foo" :: Maybe (Vec N.Nat3 Char)#Just ('f' ::: 'o' ::: 'o' ::: VNil)*fromList "quux" :: Maybe (Vec N.Nat3 Char)Nothing(fromList "xy" :: Maybe (Vec N.Nat3 Char)NothingBvec Convert list [a] to 7 n a . Returns  if input list is too short./fromListPrefix "foo" :: Maybe (Vec N.Nat3 Char)#Just ('f' ::: 'o' ::: 'o' ::: VNil)0fromListPrefix "quux" :: Maybe (Vec N.Nat3 Char)#Just ('q' ::: 'u' ::: 'u' ::: VNil).fromListPrefix "xy" :: Maybe (Vec N.Nat3 Char)NothingCvecReify any list [a] to 7 n a.reifyList "foo" length3Dvec Indexing.&('a' ::: 'b' ::: 'c' ::: VNil) ! FS FZ'b'EvecTabulating, inverse of D.&tabulate id :: Vec N.Nat3 (Fin N.Nat3)0 ::: 1 ::: 2 ::: VNilFvecCons an element in front of a 7.Gvec%Add a single element at the end of a 7.HvecThe first element of a 7.IvecThe last element of a 7.JvecThe elements after the H of a 7.KvecThe elements before the I of a 7.LvecReverse 7.&reverse ('a' ::: 'b' ::: 'c' ::: VNil)'c' ::: 'b' ::: 'a' ::: VNilMvec Append two 7.0('a' ::: 'b' ::: VNil) ++ ('c' ::: 'd' ::: VNil)$'a' ::: 'b' ::: 'c' ::: 'd' ::: VNilNvec(Split vector into two parts. Inverse of M.split ('a' ::: 'b' ::: 'c' ::: VNil) :: (Vec N.Nat1 Char, Vec N.Nat2 Char)#('a' ::: VNil,'b' ::: 'c' ::: VNil)uncurry (++) (split ('a' ::: 'b' ::: 'c' ::: VNil) :: (Vec N.Nat1 Char, Vec N.Nat2 Char))'a' ::: 'b' ::: 'c' ::: VNilOvecMap over all the elements of a 7 and concatenate the resulting 7s.9concatMap (\x -> x ::: x ::: VNil) ('a' ::: 'b' ::: VNil)$'a' ::: 'a' ::: 'b' ::: 'b' ::: VNilPvec O Qvec Inverse of P.chunks <$> fromListPrefix [1..] :: Maybe (Vec N.Nat2 (Vec N.Nat3 Int))Just ((1 ::: 2 ::: 3 ::: VNil) ::: (4 ::: 5 ::: 6 ::: VNil) ::: VNil).let idVec x = x :: Vec N.Nat2 (Vec N.Nat3 Int)0concat . idVec . chunks <$> fromListPrefix [1..]/Just (1 ::: 2 ::: 3 ::: 4 ::: 5 ::: 6 ::: VNil)Rvec5let xs = 'a' ::: 'b' ::: 'c' ::: 'd' ::: 'e' ::: VNiltake xs :: Vec N.Nat3 Char'a' ::: 'b' ::: 'c' ::: VNilSvec5let xs = 'a' ::: 'b' ::: 'c' ::: 'd' ::: 'e' ::: VNildrop xs :: Vec N.Nat3 Char'c' ::: 'd' ::: 'e' ::: VNilTvec!map not $ True ::: False ::: VNilFalse ::: True ::: VNilUvec'imap (,) $ 'a' ::: 'b' ::: 'c' ::: VNil((0,'a') ::: (1,'b') ::: (2,'c') ::: VNilVvec&Apply an action to every element of a 7 , yielding a 7 of results.WvecApply an action to non-empty 7 , yielding a 7 of results.Xvec&Apply an action to every element of a 7 and its index, yielding a 7 of results.Yvec&Apply an action to every element of a 7% and its index, ignoring the results.ZvecSee .[vecSee .\vecSee  .]vec"There is no type-class for this :(^vec Right fold._vecRight fold with an index.`vecStrict left fold.avecYield the length of a 7. O(n)bvecTest whether a 7 is empty. O(1)cvec Non-strict c.dvec Non-strict d.evecZip two 7s with a function.fvecZip two 79s. with a function that also takes the elements' indices.gvecRepeat a value.repeat 'x' :: Vec N.Nat3 Char'x' ::: 'x' ::: 'x' ::: VNilhvec Monadic bind.ivec Monadic join.join $ ('a' ::: 'b' ::: VNil) ::: ('c' ::: 'd' ::: VNil) ::: VNil'a' ::: 'd' ::: VNiljvecGet all  n in a 7 n.#universe :: Vec N.Nat3 (Fin N.Nat3)0 ::: 1 ::: 2 ::: VNilovecpvecqvec~vecvecvec7456798:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghij7798:;<=>?@ABCDEFGHIJKLMNOPQRSZ[\]^_`abcdTUVWXYefghij45695M5Safe'(/>2&vecConvert to pull .vecConvert from pull .vecConvert 7 to list.%toList $ 'f' ::: 'o' ::: 'o' ::: VNil"foo"vec#toNonEmpty $ 1 ::: 2 ::: 3 ::: VNil 1 :| [2,3]vec Convert list [a] to 7 n a . Returns  if lengths don't match exactly.)fromList "foo" :: Maybe (Vec N.Nat3 Char)#Just ('f' ::: 'o' ::: 'o' ::: VNil)*fromList "quux" :: Maybe (Vec N.Nat3 Char)Nothing(fromList "xy" :: Maybe (Vec N.Nat3 Char)Nothingvec Convert list [a] to 7 n a . Returns  if input list is too short./fromListPrefix "foo" :: Maybe (Vec N.Nat3 Char)#Just ('f' ::: 'o' ::: 'o' ::: VNil)0fromListPrefix "quux" :: Maybe (Vec N.Nat3 Char)#Just ('q' ::: 'u' ::: 'u' ::: VNil).fromListPrefix "xy" :: Maybe (Vec N.Nat3 Char)Nothingvec Indexing.&('a' ::: 'b' ::: 'c' ::: VNil) ! FS FZ'b'vecTabulating, inverse of .&tabulate id :: Vec N.Nat3 (Fin N.Nat3)0 ::: 1 ::: 2 ::: VNilvec%Add a single element at the end of a 7.vecThe last element of a 7.vecThe elements before the  of a 7.vecReverse 7.&reverse ('a' ::: 'b' ::: 'c' ::: VNil)'c' ::: 'b' ::: 'a' ::: VNilvec Append two 7.0('a' ::: 'b' ::: VNil) ++ ('c' ::: 'd' ::: VNil)$'a' ::: 'b' ::: 'c' ::: 'd' ::: VNilvec(Split vector into two parts. Inverse of .split ('a' ::: 'b' ::: 'c' ::: VNil) :: (Vec N.Nat1 Char, Vec N.Nat2 Char)#('a' ::: VNil,'b' ::: 'c' ::: VNil)uncurry (++) (split ('a' ::: 'b' ::: 'c' ::: VNil) :: (Vec N.Nat1 Char, Vec N.Nat2 Char))'a' ::: 'b' ::: 'c' ::: VNilvecMap over all the elements of a 7 and concatenate the resulting 7s.9concatMap (\x -> x ::: x ::: VNil) ('a' ::: 'b' ::: VNil)$'a' ::: 'a' ::: 'b' ::: 'b' ::: VNilvec  vec Inverse of .chunks <$> fromListPrefix [1..] :: Maybe (Vec N.Nat2 (Vec N.Nat3 Int))Just ((1 ::: 2 ::: 3 ::: VNil) ::: (4 ::: 5 ::: 6 ::: VNil) ::: VNil).let idVec x = x :: Vec N.Nat2 (Vec N.Nat3 Int)0concat . idVec . chunks <$> fromListPrefix [1..]/Just (1 ::: 2 ::: 3 ::: 4 ::: 5 ::: 6 ::: VNil)vec!map not $ True ::: False ::: VNilFalse ::: True ::: VNilvec'imap (,) $ 'a' ::: 'b' ::: 'c' ::: VNil((0,'a') ::: (1,'b') ::: (2,'c') ::: VNilvec&Apply an action to every element of a 7 , yielding a 7 of results.vecApply an action to non-empty 7 , yielding a 7 of results.vec&Apply an action to every element of a 7 and its index, yielding a 7 of results.vec&Apply an action to every element of a 7% and its index, ignoring the results.vecSee  .vecSee  .vecSee  .vec"There is no type-class for this :(vec Right fold.vecRight fold with an index.vecYield the length of a 7. O(n)vec Non-strict .vec Non-strict .vecZip two 7s with a function.vecZip two 79s. with a function that also takes the elements' indices.vec Repeat valuerepeat 'x' :: Vec N.Nat3 Char'x' ::: 'x' ::: 'x' ::: VNilvec Monadic bind.vec Monadic join.join $ ('a' ::: 'b' ::: VNil) ::: ('c' ::: 'd' ::: VNil) ::: VNil'a' ::: 'd' ::: VNilvecGet all  n in a 7 n.#universe :: Vec N.Nat3 (Fin N.Nat3)0 ::: 1 ::: 2 ::: VNil3456798:;CFHJb3798:;CFHJb4565Safe/0>E7vec!Vector, i.e. length-indexed list.vecEmpty .vec with exactly one element.singleton True True ::: VNilvecConvert to pull .vecConvert from pull .vecConvert  to list.%toList $ 'f' ::: 'o' ::: 'o' ::: VNil"foo"vec#toNonEmpty $ 1 ::: 2 ::: 3 ::: VNil 1 :| [2,3]vec Convert list [a] to  n a . Returns  if lengths don't match exactly.)fromList "foo" :: Maybe (Vec N.Nat3 Char)#Just ('f' ::: 'o' ::: 'o' ::: VNil)*fromList "quux" :: Maybe (Vec N.Nat3 Char)Nothing(fromList "xy" :: Maybe (Vec N.Nat3 Char)Nothingvec Convert list [a] to  n a . Returns  if input list is too short./fromListPrefix "foo" :: Maybe (Vec N.Nat3 Char)#Just ('f' ::: 'o' ::: 'o' ::: VNil)0fromListPrefix "quux" :: Maybe (Vec N.Nat3 Char)#Just ('q' ::: 'u' ::: 'u' ::: VNil).fromListPrefix "xy" :: Maybe (Vec N.Nat3 Char)NothingvecReify any list [a] to  n a.reifyList "foo" length3vec Indexing.&('a' ::: 'b' ::: 'c' ::: VNil) ! FS FZ'b'vecTabulating, inverse of .&tabulate id :: Vec N.Nat3 (Fin N.Nat3)0 ::: 1 ::: 2 ::: VNilvecCons an element in front of a .vec%Add a single element at the end of a .vecThe first element of a .vecThe elements after the  of a .vecThe last element of a .vecThe elements before the  of a .vecReverse .&reverse ('a' ::: 'b' ::: 'c' ::: VNil)'c' ::: 'b' ::: 'a' ::: VNilvec Append two .0('a' ::: 'b' ::: VNil) ++ ('c' ::: 'd' ::: VNil)$'a' ::: 'b' ::: 'c' ::: 'd' ::: VNilvec(Split vector into two parts. Inverse of .split ('a' ::: 'b' ::: 'c' ::: VNil) :: (Vec N.Nat1 Char, Vec N.Nat2 Char)#('a' ::: VNil,'b' ::: 'c' ::: VNil)uncurry (++) (split ('a' ::: 'b' ::: 'c' ::: VNil) :: (Vec N.Nat1 Char, Vec N.Nat2 Char))'a' ::: 'b' ::: 'c' ::: VNilvecMap over all the elements of a  and concatenate the resulting s.9concatMap (\x -> x ::: x ::: VNil) ('a' ::: 'b' ::: VNil)$'a' ::: 'a' ::: 'b' ::: 'b' ::: VNilvec  vec Inverse of .chunks <$> fromListPrefix [1..] :: Maybe (Vec N.Nat2 (Vec N.Nat3 Int))Just ((1 ::: 2 ::: 3 ::: VNil) ::: (4 ::: 5 ::: 6 ::: VNil) ::: VNil).let idVec x = x :: Vec N.Nat2 (Vec N.Nat3 Int)0concat . idVec . chunks <$> fromListPrefix [1..]/Just (1 ::: 2 ::: 3 ::: 4 ::: 5 ::: 6 ::: VNil)vec!map not $ True ::: False ::: VNilFalse ::: True ::: VNilvec'imap (,) $ 'a' ::: 'b' ::: 'c' ::: VNil((0,'a') ::: (1,'b') ::: (2,'c') ::: VNilvec&Apply an action to every element of a  , yielding a  of results.vecApply an action to non-empty  , yielding a  of results.vec&Apply an action to every element of a  and its index, yielding a  of results.vec&Apply an action to every element of a % and its index, ignoring the results.vecSee .vecSee .vecSee  .vec"There is no type-class for this :(vec Right fold.vecRight fold with an index.vecYield the length of a . O(n)vecTest whether a  is empty. O(1)vec Non-strict .vec Non-strict .vecZip two s with a function.vecZip two 9s. with a function that also takes the elements' indices.vec Repeat valuerepeat 'x' :: Vec N.Nat3 Char'x' ::: 'x' ::: 'x' ::: VNilvec Monadic bind.vec Monadic join.join $ ('a' ::: 'b' ::: VNil) ::: ('c' ::: 'd' ::: VNil) ::: VNil'a' ::: 'd' ::: VNilvecGet all  n in a  n.#universe :: Vec N.Nat3 (Fin N.Nat3)0 ::: 1 ::: 2 ::: VNilvec Ensure spine.If we have an undefined ,&let v = error "err" :: Vec N.Nat3 CharAnd insert data into it later:let setHead :: a -> Vec ('S n) a -> Vec ('S n) a; setHead x (_ ::: xs) = x ::: xs#Then without a spine, it will fail:head $ setHead 'x' v*** Exception: err...But with the spine, it won't:"head $ setHead 'x' $ ensureSpine v'x'vecvecvecvecvec,'a' ::: 'b' ::: VNil == 'a' ::: 'c' ::: VNilFalsevecvec5compare ('a' ::: 'b' ::: VNil) ('a' ::: 'c' ::: VNil)LTvec1155Safe-./9>?Lvec'Constraint for the class that computes .vec'Constraint for the class that computes .vecCompute the size from the type.vecGeneric pigeonholes. Examples:from (Identity 'a') 'a' ::: VNil0data Values a = Values a a a deriving (Generic1)instance Pigeonhole Valuesfrom (Values 1 2 3)1 ::: 2 ::: 3 ::: VNilvecThe size of a pigeonholevecConverts a value to vectorvecConverts back from vector.vecIndex.*gindex (Identity 'y') (Proxy :: Proxy Int)'y'0data Key = Key1 | Key2 | Key3 deriving (Generic)0data Values a = Values a a a deriving (Generic1) gindex (Values 'a' 'b' 'c') Key2'b'vec Tabulate.'gtabulate (\() -> 'x') :: Identity Char Identity 'x'!gtabulate absurd :: Proxy IntegerProxy!gtabulate absurd :: Proxy IntegerProxyvecA lens. i -> Lens' (t a) a!Lens.view (gix ()) (Identity 'x')'x')Lens.over (gix ()) toUpper (Identity 'x') Identity 'X'vecGeneric traverse. Don't use , rather use DeriveTraversablevecTraverse with index.6data Key = Key1 | Key2 | Key3 deriving (Show, Generic)0data Values a = Values a a a deriving (Generic1)?gitraverse (\i a -> Const [(i :: Key, a)]) (Values 'a' 'b' 'c')(Const [(Key1,'a'),(Key2,'b'),(Key3,'c')]vecGeneric version of .vecGeneric version of .vec f g x ~ x ^ (size f + size g)vec x ~ x ^ 0vec x ~ x ^ 1    !"#$%&'()*+,-./0123456789:;<=>?@A BCDEFGHIJKLMNOPQ "!#$%&'()*+,-./0RSTUVWX12345678YZ[9\:;]<=^_`ab>EFGHIJKNOPQ "!#$%')*+,-./0 CBEFGHIJKNOPQ "!#$%'()*+,-./0cRSTU12345678\:;][9<=X>WbV^ZYdefghijklmnopqrstuvwxyz{|}~}}  }}}}vec-0.4-DxCSxAh17tm77Vn7UO50HP Data.Vec.Pull Data.Vec.LazyData.Vec.Lazy.InlineData.Vec.DataFamily.SpineStrict*Data.Vec.DataFamily.SpineStrict.PigeonholeControl.Lens.YoctoData.Functor.ConfusingIFoldableWithIndexFoldable Foldable1VecunVecempty singletontoList toNonEmptyfromListfromListPrefix reifyList!tabulateconssnocheadlasttailinitreversemapimapfoldMapifoldMapfoldMap1 ifoldMap1foldrifoldrfoldl'lengthnullsumproductzipWithizipWithrepeatbindjoinuniverse $fBindVec $fApplyVec $fMonoidVec$fSemigroupVec$fRepresentableVec$fDistributiveVec $fMonadVec$fApplicativeVec$fFoldable1Vec$fFoldableWithIndexFinVec$fFunctorWithIndexFinVec $fFoldableVec $fFunctorVec$fEqVecVecEach mapWithVectraverseWithVecVNil:::withDicttoPullfromPull++split concatMapconcatchunkstakedroptraverse traverse1 itraverse itraverse_ $fFunctionVec$fCoArbitraryVec$fArbitraryVec$fArbitrary1Vec $fShow1Vec $fOrd1Vec$fEq1Vec $fHashableVec $fNFDataVec$fTraversable1Vec$fTraversableWithIndexFinVec$fTraversableVec $fShowVec$fVecEach(,,,)(,,,)ab$fVecEach(,,)(,,)ab$fVecEach(,)(,)ab$fOrdVec ensureSpineGToGFromGPigeonholeSize PigeonholePigeonholeSizefromtogindex gtabulategix gtraverse gitraversegfromgto $fGFromRep1U1$fGFromRep1Par1 $fGFromRep1M1$fGFromRep1:*: $fGToRep1U1 $fGToRep1Par1 $fGToRep1:*: $fGToRep1M1$fPigeonholeProduct$fPigeonholeProxy$fPigeonholeIdentitybase Data.Functor<&> Traversal' TraversalLens'Lens LensLike'LensLikeOptic'OpticviewsetoverYoneda runYonedaCurried runCurried FLensLike IxLensLikefusing confusingliftCurriedYonedayapifusing iconfusingffusing fconfusing liftCurried lowerCurried liftYoneda lowerYoneda GHC.MaybeNothing Data.Foldable*semigroupoids-5.3.5-4VXEKygpgR48yFJmBKDNcTData.Semigroup.Foldable.Classfin-0.2-EKO9wlXoaXt2hjspAidB2tData.FinFin Data.Type.NatSNatIreflectGHC.BaseidData.Functor.ProductProduct Data.ProxyProxyData.Functor.IdentityIdentity