úÎ!ºô‚ú      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùNoneSX úûüýþÿSafeSX ƒ     None-.2@AHSVX,Ì 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)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)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)NothingvecReify 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 elements after the   of a .vecReverse .vec?L.fromPull $ map not $ L.toPull $ True L.::: False L.::: L.VNilFalse ::: True ::: VNilvecGL.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#  !"#  !"None&'.12=?@ACHSVXfnö./vecWrite functions on 2. Use them with tuples./S 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 1. Moreally lens Each< should be a superclass, but there's no strict need for it.2vec!Vector, i.e. length-indexed list.5vecEmpty 2.6vec2 with exactly one element.singleton True True ::: VNil7vecO(n) . Recover  (and  ) dictionary from a 2 value. Example: ! is constrained with   n, but if we have a 2 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.8vecConvert to pull .9vecConvert from pull .:vecConvert 2 to list.%toList $ 'f' ::: 'o' ::: 'o' ::: VNil"foo";vec Convert list [a] to 2 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<vec Convert list [a] to 2 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 2 n a.reifyList "foo" length3>vec Indexing.&('a' ::: 'b' ::: 'c' ::: VNil) ! FS FZ'b'?vecTabulating, inverse of >.&tabulate id :: Vec N.Nat3 (Fin N.Nat3)0 ::: 1 ::: 2 ::: VNil@vecCons an element in front of a 2.Avec%Add a single element at the end of a 2.BvecThe first element of a 2.CvecThe elements after the B of a 2.DvecReverse 2.&reverse ('a' ::: 'b' ::: 'c' ::: VNil)'c' ::: 'b' ::: 'a' ::: VNilEvec Append two 2.0('a' ::: 'b' ::: VNil) ++ ('c' ::: 'd' ::: VNil)$'a' ::: 'b' ::: 'c' ::: 'd' ::: VNilFvec(Split vector into two parts. Inverse of E.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' ::: VNilGvecMap over all the elements of a 2 and concatenate the resulting 2s.9concatMap (\x -> x ::: x ::: VNil) ('a' ::: 'b' ::: VNil)$'a' ::: 'a' ::: 'b' ::: 'b' ::: VNilHvec G "Ivec Inverse of H.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)Jvec!map not $ True ::: False ::: VNilFalse ::: True ::: VNilKvec'imap (,) $ 'a' ::: 'b' ::: 'c' ::: VNil((0,'a') ::: (1,'b') ::: (2,'c') ::: VNilLvec&Apply an action to every element of a 2 , yielding a 2 of results.MvecApply an action to non-empty 2 , yielding a 2 of results.Nvec&Apply an action to every element of a 2 and its index, yielding a 2 of results.Ovec&Apply an action to every element of a 2% and its index, ignoring the results.PvecSee .QvecSee .RvecSee  .Svec"There is no type-class for this :(Tvec Right fold.UvecRight fold with an index.VvecStrict left fold.WvecYield the length of a 2. O(n)XvecTest whether a 2 is empty. O(1)Yvec Non-strict Y.Zvec Non-strict Z.[vecZip two 2s with a function.\vecZip two 29s. with a function that also takes the elements' indices.]vecRepeat a value.repeat 'x' :: Vec N.Nat3 Char'x' ::: 'x' ::: 'x' ::: VNil^vec Monadic bind._vec Monadic join.Ajoin $ ('a' ::: 'b' ::: VNil) ::: ('c' ::: 'd' ::: VNil) ::: VNil'a' ::: 'd' ::: VNil`vecGet all  n in a 2 n.#universe :: Vec N.Nat3 (Fin N.Nat3)0 ::: 1 ::: 2 ::: VNil2/0124356789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`224356789:;<=>?@ABCDEFGHIPQRSTUVWXYZJKLMNO[\]^_`/0145E5None&'.=?@AHSVXž#zvecConvert to pull .{vecConvert from pull .|vecConvert 2 to list.%toList $ 'f' ::: 'o' ::: 'o' ::: VNil"foo"}vec Convert list [a] to 2 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~vec Convert list [a] to 2 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 2.‚vecReverse 2.&reverse ('a' ::: 'b' ::: 'c' ::: VNil)'c' ::: 'b' ::: 'a' ::: VNilƒvec Append two 2.0('a' ::: 'b' ::: VNil) ++ ('c' ::: 'd' ::: VNil)$'a' ::: 'b' ::: 'c' ::: 'd' ::: VNil„vec(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' ::: VNil…vecMap over all the elements of a 2 and concatenate the resulting 2s.9concatMap (\x -> x ::: x ::: VNil) ('a' ::: 'b' ::: VNil)$'a' ::: 'a' ::: 'b' ::: 'b' ::: VNil†vec … "‡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 ::: VNil‰vec'imap (,) $ 'a' ::: 'b' ::: 'c' ::: VNil((0,'a') ::: (1,'b') ::: (2,'c') ::: VNilŠvec&Apply an action to every element of a 2 , yielding a 2 of results.‹vecApply an action to non-empty 2 , yielding a 2 of results.Œvec&Apply an action to every element of a 2 and its index, yielding a 2 of results.vec&Apply an action to every element of a 2% 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 2. O(n)•vec Non-strict •.–vec Non-strict –.—vecZip two 2s with a function.˜vecZip two 29s. with a function that also takes the elements' indices.™vec Repeat valuerepeat 'x' :: Vec N.Nat3 Char'x' ::: 'x' ::: 'x' ::: VNilšvec Monadic bind.›vec Monadic join.Ajoin $ ('a' ::: 'b' ::: VNil) ::: ('c' ::: 'd' ::: VNil) ::: VNil'a' ::: 'd' ::: VNilœvecGet all  n in a 2 n.#universe :: Vec N.Nat3 (Fin N.Nat3)0 ::: 1 ::: 2 ::: VNil0/0124356=@BCXz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œ024356z{|}~=€@BCƒ„…†‡‚Ž‘’“”X•–ˆ‰Š‹Œ—˜™š›œ/01ƒ5None.=?@AHSVXÚ&.vec!Vector, i.e. length-indexed list. vecEmpty .¡vec with exactly one element.singleton True True ::: VNil¢vecConvert to pull .£vecConvert from pull .¤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)Nothing¦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)Nothing§vecReify any list [a] to  n a.reifyList "foo" length3¨vec Indexing.&('a' ::: 'b' ::: 'c' ::: VNil) ! FS FZ'b'©vecTabulating, inverse of ¨.&tabulate id :: Vec N.Nat3 (Fin N.Nat3)0 ::: 1 ::: 2 ::: VNilªvecCons 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 .®vecReverse .&reverse ('a' ::: 'b' ::: 'c' ::: VNil)'c' ::: 'b' ::: 'a' ::: VNil¯vec Append two .0('a' ::: 'b' ::: VNil) ++ ('c' ::: 'd' ::: VNil)$'a' ::: 'b' ::: 'c' ::: 'd' ::: VNil°vec(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' ::: VNil±vecMap over all the elements of a  and concatenate the resulting s.9concatMap (\x -> x ::: x ::: VNil) ('a' ::: 'b' ::: VNil)$'a' ::: 'a' ::: 'b' ::: 'b' ::: VNil²vec ± "³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 ::: VNilµvec'imap (,) $ 'a' ::: 'b' ::: 'c' ::: VNil((0,'a') ::: (1,'b') ::: (2,'c') ::: VNil¶vec&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' ::: VNilÇvec Monadic bind.Èvec Monadic join.Ajoin $ ('a' ::: 'b' ::: VNil) ::: ('c' ::: 'd' ::: VNil) ::: VNil'a' ::: 'd' ::: VNilÉvecGet all  n in a  n.#universe :: Vec N.Nat3 (Fin N.Nat3)0 ::: 1 ::: 2 ::: VNilÊvec Ensure spine.If we have an undefined ,&let v = error "err" :: Vec N.Nat3 CharAnd insert data into it later:Qlet 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'Üvec,'a' ::: 'b' ::: VNil == 'a' ::: 'c' ::: VNilFalseÝvec5compare ('a' ::: 'b' ::: VNil) ('a' ::: 'c' ::: VNil)LT.žŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊ.žŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³º»¼½¾¿ÀÁÂôµ¶·¸¹ÄÅÆÇÈÉÊž5¯5None,-.8=>?@AHUVXôávec'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 ::: VNilåvecThe size of a pigeonholeævecConverts a value to vectorçvecConverts 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 IntegerProxyêvecA lens. i -> Lens' (t a) a!Lens.view (gix ()) (Identity 'x')'x')Lens.over (gix ()) toUpper (Identity 'x') Identity 'X'#vec Index lens.5Lens.view (ix (FS FZ)) ('a' ::: 'b' ::: 'c' ::: VNil)'b'8Lens.set (ix (FS FZ)) 'x' ('a' ::: 'b' ::: 'c' ::: VNil)'a' ::: 'x' ::: 'c' ::: VNil$vec Head lens. Note: lens   is a û.ëvecGeneric traverse. Don't use , rather use DeriveTraversableìvecTraverse 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 ^ 0ùvec' x ~ x ^ 1áâãäåæçèéêëìíîäåæçèéêëìíâîáã( !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKL! "#$%&'()*+,-./MNOP01234567QRS8T9:UVWXY;BCDEFGHIJKL! "#$&()*+,-./@?BCDEFGHIJKL! "#$&'()*+,-./ZMNOP01234567TS89:;YURQ[\]^_`abcdefghijklmnopqrstuvwxy z{|}~€‚ƒƒ„…†{‡ˆ‰Š‹ŒŽ‘’t“”t• –— ˜™š˜›œ˜›˜›žtŸ ¡¢t£¤t¥¦t§¨©vec-0.3-KZi1gXlw11DH41pKdpeuwe Data.Vec.Pull Data.Vec.LazyData.Vec.Lazy.InlineData.Vec.DataFamily.SpineStrict*Data.Vec.DataFamily.SpineStrict.PigeonholeControl.Lens.YoctoData.Functor.ConfusingIFoldableWithIndexFoldable Foldable1Lens_headVecunVecempty singletontoListfromListfromListPrefix reifyList!tabulateconssnocheadtailreversemapimapfoldMapifoldMapfoldMap1 ifoldMap1foldrifoldrfoldl'lengthnullsumproductzipWithizipWithrepeatbindjoinuniverse $fBindVec $fApplyVec $fMonoidVec$fSemigroupVec$fRepresentableVec$fDistributiveVec $fMonadVec$fApplicativeVec$fFoldable1Vec $fFoldableVec $fFunctorVec$fEqVecVecEach mapWithVectraverseWithVecVNil:::withDicttoPullfromPull++split concatMapconcatchunkstraverse traverse1 itraverse itraverse_ $fFunctionVec$fCoArbitraryVec$fArbitraryVec$fArbitrary1Vec $fHashableVec $fNFDataVec$fTraversable1Vec$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' LensLike'LensLikeOptic'OpticviewsetoverYoneda runYonedaCurried runCurried FLensLike IxLensLikefusing confusingliftCurriedYonedayapifusing iconfusingffusing fconfusing liftCurried lowerCurried liftYoneda lowerYoneda GHC.MaybeNothing Data.Foldable)semigroupoids-5.3.4-w5wpvXNssmA4BCVoX2GwVData.Semigroup.Foldable.Class fin-0.1.1-CmlKX4I25sbDg8chH2xNz3Data.FinFin Data.Type.NatInlineInductionSNatIreflectGHC.Baseidix_tailData.Functor.ProductProduct Data.ProxyProxyData.Functor.IdentityIdentity