License | BSD-style |
---|---|
Maintainer | Haskell Foundation |
Safe Haskell | None |
Language | Haskell2010 |
Foundation.Primitive.BlockN
Description
A Nat-sized version of Block
Documentation
data MutableBlockN n ty st #
toBlockN :: forall n ty. (PrimType ty, KnownNat n, NatWithinBound Int n) => Block ty -> Maybe (BlockN n ty) #
thaw :: (KnownNat n, PrimMonad prim, PrimType ty) => BlockN n ty -> prim (MutableBlockN n ty (PrimState prim)) #
freeze :: (PrimMonad prim, PrimType ty, NatWithinBound Int n) => MutableBlockN n ty (PrimState prim) -> prim (BlockN n ty) #
index :: forall i n ty. (KnownNat i, CmpNat i n ~ LT, PrimType ty, NatWithinBound Int i) => BlockN n ty -> ty #
sub :: forall i j n ty. ((i <=? n) ~ True, (j <=? n) ~ True, (i <=? j) ~ True, PrimType ty, KnownNat i, NatWithinBound Int i, KnownNat j, NatWithinBound Int j) => BlockN n ty -> BlockN (j - i) ty #
uncons :: forall n ty. (CmpNat 0 n ~ LT, PrimType ty, KnownNat n, NatWithinBound Int n) => BlockN n ty -> (ty, BlockN (n - 1) ty) #
unsnoc :: forall n ty. (CmpNat 0 n ~ LT, KnownNat n, PrimType ty, NatWithinBound Int n) => BlockN n ty -> (BlockN (n - 1) ty, ty) #