Module

Data.FastVect.Common

Package
purescript-fast-vect
Repository
sigma-andex/purescript-fast-vect

#Replicate Source

type Replicate :: (Int -> Type -> Type) -> Int -> Type -> Typetype Replicate vect len elem = Compare len NegOne GT => Reflectable len Int => Proxy len -> elem -> vect len elem

#Empty Source

type Empty :: forall k1 k2. (Int -> k1 -> k2) -> k1 -> k2type Empty vect elem = vect Zero elem

#Sparse Source

type Sparse :: forall k1 k2 k3. (k1 -> k2 -> k3) -> k1 -> k2 -> k3type Sparse vect n elem = vect n elem

#Singleton Source

type Singleton :: (Int -> Type -> Type) -> Type -> Typetype Singleton vect elem = elem -> vect One elem

#Append Source

type Append :: forall k. (Int -> k -> Type) -> Int -> Int -> Int -> k -> Typetype Append vect m n m_plus_n elem = Add m n m_plus_n => Compare m NegOne GT => Reflectable m Int => Compare n NegOne GT => vect m elem -> vect n elem -> vect m_plus_n elem

#Drop Source

type Drop :: forall k. (Int -> k -> Type) -> Int -> Int -> Int -> k -> Typetype Drop vect m n m_plus_n elem = Add m n m_plus_n => Reflectable m Int => Compare m NegOne GT => Compare n NegOne GT => Proxy m -> vect m_plus_n elem -> vect n elem

#Take Source

type Take :: forall k. (Int -> k -> Type) -> Int -> Int -> Int -> k -> Typetype Take vect m n m_plus_n elem = Add m n m_plus_n => Reflectable m Int => Compare m NegOne GT => Compare n NegOne GT => Proxy m -> vect m_plus_n elem -> vect m elem

#SplitAt Source

type SplitAt :: forall k. (Int -> k -> Type) -> Int -> Int -> Int -> k -> Typetype SplitAt vect m n m_plus_n elem = Add m n m_plus_n => Reflectable m Int => Compare m NegOne GT => Compare n NegOne GT => Proxy m -> vect m_plus_n elem -> { after :: vect n elem, before :: vect m elem }

#Modify Source

type Modify :: (Int -> Type -> Type) -> Int -> Int -> Type -> Typetype Modify vect m n elem = Reflectable m Int => Compare m NegOne GT => Compare n NegOne GT => Compare m n LT => Proxy m -> (elem -> elem) -> vect n elem -> vect n elem

#Set Source

type Set :: (Int -> Type -> Type) -> Int -> Int -> Type -> Typetype Set vect m n elem = Reflectable m Int => Compare m NegOne GT => Compare n NegOne GT => Compare m n LT => Proxy m -> elem -> vect n elem -> vect n elem

#Index Source

type Index :: (Int -> Type -> Type) -> Int -> Int -> Int -> Int -> Type -> Typetype Index vect m m_minus_one i n elem = Compare m_minus_one NegOne GT => Add One m_minus_one m => Compare n NegOne GT => Add i n m_minus_one => Compare i NegOne GT => Reflectable i Int => Proxy i -> vect m elem -> elem

#IndexModulo Source

type IndexModulo :: (Int -> Type -> Type) -> Int -> Type -> Typetype IndexModulo vect m elem = Compare m Zero GT => Reflectable m Int => Int -> vect m elem -> elem

#Head Source

type Head :: (Int -> Type -> Type) -> Int -> Type -> Typetype Head vect m elem = Compare m Zero GT => vect m elem -> elem

#IndexM Source

type IndexM :: (Int -> Type -> Type) -> Int -> Int -> Int -> Int -> Type -> Typetype IndexM vect m m_minus_one i n elem = Compare m_minus_one NegOne GT => Add One m_minus_one m => Compare n NegOne GT => Add i n m_minus_one => Compare i NegOne GT => Reflectable i Int => Proxy i -> vect m elem -> Maybe elem

#IndexModuloM Source

type IndexModuloM :: (Int -> Type -> Type) -> Int -> Type -> Typetype IndexModuloM vect m elem = Compare m Zero GT => Reflectable m Int => Int -> vect m elem -> Maybe elem

#HeadM Source

type HeadM :: (Int -> Type -> Type) -> Int -> Type -> Typetype HeadM vect m elem = Compare m Zero GT => vect m elem -> Maybe elem

#Cons Source

type Cons :: (Int -> Type -> Type) -> Int -> Int -> Type -> Typetype Cons vect len len_plus_1 elem = Add One len len_plus_1 => Compare len NegOne GT => elem -> vect len elem -> vect len_plus_1 elem

#Snoc Source

type Snoc :: (Int -> Type -> Type) -> Int -> Int -> Type -> Typetype Snoc vect len len_plus_1 elem = Add One len len_plus_1 => Reflectable len Int => Compare len NegOne GT => vect len elem -> elem -> vect len_plus_1 elem

#Zero Source

type Zero :: Inttype Zero = 0

#NegOne Source

type NegOne :: Inttype NegOne = -1

#One Source

type One :: Inttype One = 1

#IsVect Source

class IsVect :: (Type -> Type) -> Constraintclass (TraversableWithIndex Int f) <= IsVect f 

#term Source

term :: forall (i :: Int). Proxy i

#toInt Source

toInt :: forall (len :: Int). Reflectable len Int => Proxy len -> Int