basement-0.0.10: Foundation scrap box of array & string

Safe HaskellNone
LanguageHaskell2010

Basement.Sized.UVect

Documentation

data UVect (n :: Nat) a #

Instances
PrimType a => Eq (UVect n a) # 
Instance details

Defined in Basement.Sized.UVect

Methods

(==) :: UVect n a -> UVect n a -> Bool #

(/=) :: UVect n a -> UVect n a -> Bool #

(PrimType a, Show a) => Show (UVect n a) # 
Instance details

Defined in Basement.Sized.UVect

Methods

showsPrec :: Int -> UVect n a -> ShowS #

show :: UVect n a -> String #

showList :: [UVect n a] -> ShowS #

NormalForm (UVect n a) # 
Instance details

Defined in Basement.Sized.UVect

Methods

toNormalForm :: UVect n a -> () #

data MUVect (n :: Nat) ty st #

unUVect :: UVect n a -> UArray a #

toUVect :: forall n ty. (PrimType ty, KnownNat n, Countable ty n) => UArray ty -> Maybe (UVect n ty) #

empty :: PrimType ty => UVect 0 ty #

singleton :: PrimType ty => ty -> UVect 1 ty #

replicate :: forall n ty. (KnownNat n, Countable ty n, PrimType ty) => ty -> UVect n ty #

thaw :: (KnownNat n, PrimMonad prim, PrimType ty) => UVect n ty -> prim (MUVect n ty (PrimState prim)) #

freeze :: (PrimMonad prim, PrimType ty, Countable ty n) => MUVect n ty (PrimState prim) -> prim (UVect n ty) #

index :: forall i n ty. PrimType ty => UVect n ty -> Offset ty -> ty #

map :: (PrimType a, PrimType b) => (a -> b) -> UVect n a -> UVect n b #

foldl' :: PrimType ty => (a -> ty -> a) -> a -> UVect n ty -> a #

foldr :: PrimType ty => (ty -> a -> a) -> a -> UVect n ty -> a #

cons :: PrimType ty => ty -> UVect n ty -> UVect (n + 1) ty #

snoc :: PrimType ty => UVect n ty -> ty -> UVect (n + 1) ty #

elem :: PrimType ty => ty -> UVect n ty -> Bool #

sub :: forall i j n ty. ((i <=? n) ~ True, (j <=? n) ~ True, (i <=? j) ~ True, PrimType ty, KnownNat i, KnownNat j, Offsetable ty i, Offsetable ty j) => UVect n ty -> UVect (j - i) ty #

uncons :: forall n ty. (CmpNat 0 n ~ LT, PrimType ty, KnownNat n, Offsetable ty n) => UVect n ty -> (ty, UVect (n - 1) ty) #

unsnoc :: forall n ty. (CmpNat 0 n ~ LT, KnownNat n, PrimType ty, Offsetable ty n) => UVect n ty -> (UVect (n - 1) ty, ty) #

splitAt :: forall i n ty. (CmpNat i n ~ LT, PrimType ty, KnownNat i, Countable ty i) => UVect n ty -> (UVect i ty, UVect (n - i) ty) #

all :: PrimType ty => (ty -> Bool) -> UVect n ty -> Bool #

any :: PrimType ty => (ty -> Bool) -> UVect n ty -> Bool #

find :: PrimType ty => (ty -> Bool) -> UVect n ty -> Maybe ty #

reverse :: PrimType ty => UVect n ty -> UVect n ty #

sortBy :: PrimType ty => (ty -> ty -> Ordering) -> UVect n ty -> UVect n ty #

intersperse :: (CmpNat n 1 ~ GT, PrimType ty) => ty -> UVect n ty -> UVect ((n + n) - 1) ty #