!      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~     SafeSX3 None -.2@AHSVX3!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.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)NothingvecPrism from list.vec 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)AL.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. vec Index lens.@('a' L.::: 'b' L.::: 'c' L.::: L.VNil) ^. L._Pull . ix (F.S F.Z)'b'F('a' L.::: 'b' L.::: 'c' L.::: L.VNil) & L._Pull . ix (F.S F.Z) .~ 'x''a' ::: 'x' ::: 'c' ::: VNil vecMatch on non-empty .Note: lens " is a # . In fact,  n a cannot have an instance of $ as types don't match. vec Head lens. Note: lens % is a &.9('a' L.::: 'b' L.::: 'c' L.::: L.VNil) ^. L._Pull . _head'a'?('a' L.::: 'b' L.::: 'c' L.::: L.VNil) & L._Pull . _head .~ 'x''x' ::: 'b' ::: 'c' ::: VNilvec Head lens. Note: lens % is a &.vecThe first element of a .vecThe elements after the  of a .vec6over L._Pull (map not) (True L.::: False L.::: L.VNil)False ::: True ::: VNilvec>over L._Pull (imap (,)) ('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 Monadic bind.!vec Monadic join."vecGet all * n in a  n.0L.fromPull (universe :: Vec N.Nat3 (Fin N.Nat3))0 ::: 1 ::: 2 ::: VNil#  !"#  !"None&'.12=?@ACHSVXf|10vecWrite functions on 3. Use them with tuples.0S 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 2.3vec!Vector, i.e. length-indexed list.6vecEmpty 3.7vec3 with exactly one element.singleton True True ::: VNil8vecO(n) . Recover + (and ,) dictionary from a 3 value. Example: - is constrained with , n, but if we have a 3 n a!, we can recover that dictionary:klet 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.9vecConvert to pull .:vecConvert from pull .;vecAn . from 9 and :.<vecConvert 3 to list.%toList $ 'f' ::: 'o' ::: 'o' ::: VNil"foo"=vec Convert list [a] to 3 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)Nothing>vecPrism from list.("foo" ^? _Vec :: Maybe (Vec N.Nat3 Char)#Just ('f' ::: 'o' ::: 'o' ::: VNil)("foo" ^? _Vec :: Maybe (Vec N.Nat2 Char)Nothing _Vec # (True ::: False ::: VNil) [True,False]?vec Convert list [a] to 3 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)Nothing@vecReify any list [a] to 3 n a.reifyList "foo" length3Avec Indexing.(('a' ::: 'b' ::: 'c' ::: VNil) ! F.S F.Z'b'Bvec Index lens..('a' ::: 'b' ::: 'c' ::: VNil) ^. ix (F.S F.Z)'b'4('a' ::: 'b' ::: 'c' ::: VNil) & ix (F.S F.Z) .~ 'x''a' ::: 'x' ::: 'c' ::: VNilCvecMatch on non-empty 3.Note: lens " is a # . In fact, 3 n a cannot have an instance of $ as types don't match.Dvec Head lens. Note: lens % is a &.'('a' ::: 'b' ::: 'c' ::: VNil) ^. _head'a'-('a' ::: 'b' ::: 'c' ::: VNil) & _head .~ 'x''x' ::: 'b' ::: 'c' ::: VNilEvec Head lens. Note: lens % is a &.FvecCons an element in front of a 3.GvecThe first element of a 3.HvecThe elements after the G of a 3.Ivec Append two 3.0('a' ::: 'b' ::: VNil) ++ ('c' ::: 'd' ::: VNil)$'a' ::: 'b' ::: 'c' ::: 'd' ::: VNilJvec(Split vector into two parts. Inverse of I.Jsplit ('a' ::: 'b' ::: 'c' ::: VNil) :: (Vec N.Nat1 Char, Vec N.Nat2 Char)#('a' ::: VNil,'b' ::: 'c' ::: VNil)Yuncurry (++) (split ('a' ::: 'b' ::: 'c' ::: VNil) :: (Vec N.Nat1 Char, Vec N.Nat2 Char))'a' ::: 'b' ::: 'c' ::: VNilKvecMap over all the elements of a 3 and concatenate the resulting 3s.9concatMap (\x -> x ::: x ::: VNil) ('a' ::: 'b' ::: VNil)$'a' ::: 'a' ::: 'b' ::: 'b' ::: VNilLvec K /Mvec Inverse of L.Fchunks <$> fromListPrefix [1..] :: Maybe (Vec N.Nat2 (Vec N.Nat3 Int))EJust ((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)Nvec!map not $ True ::: False ::: VNilFalse ::: True ::: VNilOvec'imap (,) $ 'a' ::: 'b' ::: 'c' ::: VNil((0,'a') ::: (1,'b') ::: (2,'c') ::: VNilPvec&Apply an action to every element of a 3 , yielding a 3 of results.QvecApply an action to non-empty 3 , yielding a 3 of results.Rvec&Apply an action to every element of a 3 and its index, yielding a 3 of results.Svec&Apply an action to every element of a 3% and its index, ignoring the results.TvecSee '.UvecSee (.VvecSee ).Wvec"There is no type-class for this :(Xvec Right fold.YvecRight fold with an index.ZvecStrict left fold.[vecYield the length of a 3. O(n)\vecTest whether a 3 is empty. O(1)]vec Non-strict ].^vec Non-strict ^._vecZip two 3s with a function.`vecZip two 39s. with a function that also takes the elements' indices.avec Monadic bind.bvec Monadic join.Ajoin $ ('a' ::: 'b' ::: VNil) ::: ('c' ::: 'd' ::: VNil) ::: VNil'a' ::: 'd' ::: VNilcvecGet all * n in a 3 n.#universe :: Vec N.Nat3 (Fin N.Nat3)0 ::: 1 ::: 2 ::: VNilmvec3 doesn't have 0 instance, as we cannot remove value from 3. See B in  Data.Vec.Lazy module for an 1 (not 2).40123546789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abc43546789:;<=>?@ABCDEFGHIJKLMTUVWXYZ[\]^NOPQRS_`abc01255I5None&'.=?@ACHSVXf"vecConvert to pull .vecConvert from pull .vecAn . from  and .vecConvert 3 to list.%toList $ 'f' ::: 'o' ::: 'o' ::: VNil"foo"vec Convert list [a] to 3 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)NothingvecPrism from list.("foo" ^? _Vec :: Maybe (Vec N.Nat3 Char)#Just ('f' ::: 'o' ::: 'o' ::: VNil)("foo" ^? _Vec :: Maybe (Vec N.Nat2 Char)Nothing _Vec # (True ::: False ::: VNil) [True,False]vec Convert list [a] to 3 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) ! F.S F.Z'b'vec Index lens..('a' ::: 'b' ::: 'c' ::: VNil) ^. ix (F.S F.Z)'b'4('a' ::: 'b' ::: 'c' ::: VNil) & ix (F.S F.Z) .~ 'x''a' ::: 'x' ::: 'c' ::: VNilvec Append two 3.0('a' ::: 'b' ::: VNil) ++ ('c' ::: 'd' ::: VNil)$'a' ::: 'b' ::: 'c' ::: 'd' ::: VNilvec(Split vector into two parts. Inverse of .Jsplit ('a' ::: 'b' ::: 'c' ::: VNil) :: (Vec N.Nat1 Char, Vec N.Nat2 Char)#('a' ::: VNil,'b' ::: 'c' ::: VNil)Yuncurry (++) (split ('a' ::: 'b' ::: 'c' ::: VNil) :: (Vec N.Nat1 Char, Vec N.Nat2 Char))'a' ::: 'b' ::: 'c' ::: VNilvecMap over all the elements of a 3 and concatenate the resulting 3s.9concatMap (\x -> x ::: x ::: VNil) ('a' ::: 'b' ::: VNil)$'a' ::: 'a' ::: 'b' ::: 'b' ::: VNilvec  /vec Inverse of .Fchunks <$> fromListPrefix [1..] :: Maybe (Vec N.Nat2 (Vec N.Nat3 Int))EJust ((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 3 , yielding a 3 of results.vecApply an action to non-empty 3 , yielding a 3 of results.vec&Apply an action to every element of a 3 and its index, yielding a 3 of results.vec&Apply an action to every element of a 3% 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 3. O(n)vec Non-strict .vec Non-strict .vecZip two 3s with a function.vecZip two 39s. with a function that also takes the elements' indices.vec Monadic bind.vec Monadic join.Ajoin $ ('a' ::: 'b' ::: VNil) ::: ('c' ::: 'd' ::: VNil) ::: VNil'a' ::: 'd' ::: VNilvecGet all * n in a 3 n.#universe :: Vec N.Nat3 (Fin N.Nat3)0 ::: 1 ::: 2 ::: VNil201235467@CDEFGH\235467@CDEFGH\0125None.=?@AHSVX1vec!Vector, i.e. length-indexed list.vecEmpty .vec with exactly one element.singleton True True ::: VNilvecConvert to pull .vecConvert from pull .vecAn . from  and .vecConvert  to list.%toList $ 'f' ::: 'o' ::: 'o' ::: VNil"foo"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)NothingvecPrism from list.("foo" ^? _Vec :: Maybe (Vec N.Nat3 Char)#Just ('f' ::: 'o' ::: 'o' ::: VNil)("foo" ^? _Vec :: Maybe (Vec N.Nat2 Char)Nothing _Vec # (True ::: False ::: VNil) [True,False]vec 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) ! F.S F.Z'b'vec Index lens..('a' ::: 'b' ::: 'c' ::: VNil) ^. ix (F.S F.Z)'b'4('a' ::: 'b' ::: 'c' ::: VNil) & ix (F.S F.Z) .~ 'x''a' ::: 'x' ::: 'c' ::: VNilvecMatch on non-empty .Note: lens " is a # . In fact,  n a cannot have an instance of $ as types don't match.vec Head lens. Note: lens % is a &.'('a' ::: 'b' ::: 'c' ::: VNil) ^. _head'a'-('a' ::: 'b' ::: 'c' ::: VNil) & _head .~ 'x''x' ::: 'b' ::: 'c' ::: VNilvec Head lens. Note: lens % is a &.vecCons an element in front of a .vecThe first element of a .vecThe elements after the  of a .vec Append two .0('a' ::: 'b' ::: VNil) ++ ('c' ::: 'd' ::: VNil)$'a' ::: 'b' ::: 'c' ::: 'd' ::: VNilvec(Split vector into two parts. Inverse of .Jsplit ('a' ::: 'b' ::: 'c' ::: VNil) :: (Vec N.Nat1 Char, Vec N.Nat2 Char)#('a' ::: VNil,'b' ::: 'c' ::: VNil)Yuncurry (++) (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 .Fchunks <$> fromListPrefix [1..] :: Maybe (Vec N.Nat2 (Vec N.Nat3 Int))EJust ((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 Monadic bind.vec Monadic join.Ajoin $ ('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.Gview (ix F.fin1) $ set (ix F.fin1) 'x' (error "err" :: Vec N.Nat2 Char)*** Exception: err...Uview (ix F.fin1) $ set (ix F.fin1) 'x' $ ensureSpine (error "err" :: Vec N.Nat2 Char)'x'vec doesn't have 0 instance, as we cannot remove value from . See  in Data.Vec.DataFamily.SpineStrict module for an 1 (not 2).vec,'a' ::: 'b' ::: VNil == 'a' ::: 'c' ::: VNilFalsevec5compare ('a' ::: 'b' ::: VNil) ('a' ::: 'c' ::: VNil)LT0055None,-.8=>?@ACHUVXhvec'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.&tabulate (\() -> 'x') :: Identity Char Identity 'x' tabulate absurd :: Proxy IntegerProxy tabulate absurd :: Proxy IntegerProxyvecGeneric 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 .vec3 f g x ~ x ^ (size f + size g)vec4 x ~ x ^ 0vec5 x ~ x ^ 1  6      !"#$%&'()*+,-./0123456789:; <=  >?@ABCDEFGHIJK !"#$%&'()*+LMNOPQRSTUVW,-./012345XYZ[\67]^_`a8?@ACDEFGHIJK !#%&'()*+ =<  ?@ABCDEFGHIJK !#$%&'()*+bLMNOPQRSTUVW,-./012345Z[\678a]YXcdefghijklmnopqrstuvwxyz{{|}}~  vec-0.1.1-5Gx1mdQI2TdGA6UMaGdvGD Data.Vec.Pull Data.Vec.LazyData.Vec.Lazy.InlineData.Vec.DataFamily.SpineStrict*Data.Vec.DataFamily.SpineStrict.PigeonholeData.Functor.ConfusingIFoldable Foldable1VecunVecempty singletontoListfromList_VecfromListPrefix reifyList!ix_Cons_head_tailheadtailmapimapfoldMapfoldMap1ifoldMap ifoldMap1foldrifoldrfoldl'lengthnullsumproductzipWithizipWithbindjoinuniverse$fFoldableWithIndexFinVec$fFunctorWithIndexFinVec $fBindVec $fApplyVec $fMonoidVec$fSemigroupVec$fRepresentableVec$fDistributiveVec $fMonadVec$fApplicativeVec $fFoldableVec $fFunctorVec$fEqVecVecEach mapWithVectraverseWithVecVNil:::withDicttoPullfromPull_Pullcons++split concatMapconcatchunkstraverse traverse1 itraverse itraverse_$fField9VecVecaa$fField8VecVecaa$fField7VecVecaa$fField6VecVecaa$fField5VecVecaa$fField4VecVecaa$fField3VecVecaa$fField2VecVecaa$fField1VecVecaa $fIxedVec$fEachVecVecab$fTraversableWithIndexFinVec $fHashableVec $fNFDataVec$fTraversable1Vec$fTraversableVec$fFoldable1Vec $fShowVec$fVecEach(,,,)(,,,)ab$fVecEach(,,)(,,)ab$fVecEach(,)(,)ab$fOrdVec ensureSpineGToGFromGPigeonholeSize PigeonholePigeonholeSizefromtogindex gtabulate gtraverse gitraversegfromgto $fGFromRep1U1$fGFromRep1Par1 $fGFromRep1M1$fGFromRep1:*: $fGToRep1U1 $fGToRep1Par1 $fGToRep1:*: $fGToRep1M1$fPigeonholeProduct$fPigeonholeProxy$fPigeonholeIdentityYoneda runYonedaCurried runCurried IxLensLikeLensLike confusing iconfusingliftCurriedYonedayap liftCurried lowerCurried liftYoneda lowerYonedabase GHC.MaybeNothing lens-4.17-5R1nkIDzovdC6jcuCd3LNEControl.Lens.ConsControl.Lens.TypePrismCons Traversal' Data.Foldable*semigroupoids-5.3.2-7SYmTspzpbUFHQFapWvcfuData.Semigroup.Foldable.ClassControl.Lens.IndexedFoldableWithIndex fin-0.0.2-2B9C2iBZrSAE7MRbTaclnYData.FinFin Data.Type.NatInlineInductionSNatIreflectIsoGHC.BaseidControl.Lens.AtAtLens TraversalData.Functor.ProductProduct Data.ProxyProxyData.Functor.IdentityIdentity