basement-0.0.10: Foundation scrap box of array & string

Safe HaskellNone
LanguageHaskell2010

Basement.Sized.UVect

Documentation

data UVect (n :: Nat) a Source #

Instances
PrimType a => Eq (UVect n a) Source # 
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) Source # 
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) Source # 
Instance details

Defined in Basement.Sized.UVect

Methods

toNormalForm :: UVect n a -> () Source #

data MUVect (n :: Nat) ty st Source #

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

empty :: PrimType ty => UVect 0 ty Source #

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

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

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

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

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

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

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

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

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

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

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

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 Source #

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

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

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) Source #

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

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

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

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

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

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