Basement.Sized.UVect

basement-0.0.16: Foundation scrap box of array & string

Safe Haskell | None
Language | Haskell2010

Basement.Sized.UVect

# Documentation

data UVect (n :: Nat) a #

#### Instances

Instances details

NormalForm (UVect n a) # |
Instance details Defined in Basement.Sized.UVect Methods toNormalForm :: UVect n a -> () #
(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 #
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 #

data MUVect (n :: Nat) ty st #

unUVect :: UVect n a -> UArray a #

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

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

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

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

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

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

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

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

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

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

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 #

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

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

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

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

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

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

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

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

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