basement-0.0.16: Foundation scrap box of array & string
Safe HaskellNone
LanguageHaskell2010

Basement.Sized.UVect

Documentation

data UVect (n :: Nat) a Source #

Instances

Instances details
(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 #

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 #

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

toUVect :: forall (n :: Nat) 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 :: Nat) ty. (KnownNat n, Countable ty n, PrimType ty) => ty -> UVect n ty Source #

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

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

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

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

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

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

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

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

elem :: forall ty (n :: Nat). PrimType ty => ty -> UVect n ty -> Bool Source #

sub :: forall (i :: Nat) (j :: Nat) (n :: Nat) 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 :: Natural) ty. (CmpNat 0 n ~ 'LT, PrimType ty, KnownNat n, Offsetable ty n) => UVect n ty -> (ty, UVect (n - 1) ty) Source #

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

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

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

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

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

reverse :: forall ty (n :: Nat). PrimType ty => UVect n ty -> UVect n ty Source #

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

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