License | BSD-style |
---|---|
Maintainer | Haskell Foundation |
Safe Haskell | None |
Language | Haskell2010 |
A Nat-sized version of Block
Documentation
data BlockN (n :: Nat) a Source #
(NatWithinBound (CountOf ty) n, KnownNat n, PrimType ty) => TryFrom (Block ty) (BlockN n ty) Source # | |
(NatWithinBound (CountOf ty) n, KnownNat n, PrimType ty) => TryFrom (UArray ty) (BlockN n ty) Source # | |
(NatWithinBound (CountOf ty) n, KnownNat n, PrimType ty) => TryFrom (Array ty) (BlockN n ty) Source # | |
PrimType a => Eq (BlockN n a) Source # | |
(Show a, PrimType a) => Show (BlockN n a) Source # | |
NormalForm (BlockN n a) Source # | |
(NatWithinBound Int n, PrimType ty) => From (BlockN n ty) (Array ty) Source # | |
(NatWithinBound Int n, PrimType ty) => From (BlockN n ty) (UArray ty) Source # | |
From (BlockN n ty) (Block ty) Source # | |
data MutableBlockN (n :: Nat) ty st Source #
toBlockN :: forall n ty. (PrimType ty, KnownNat n, Countable ty n) => Block ty -> Maybe (BlockN n ty) Source #
thaw :: (KnownNat n, PrimMonad prim, PrimType ty) => BlockN n ty -> prim (MutableBlockN n ty (PrimState prim)) Source #
freeze :: (PrimMonad prim, PrimType ty, Countable ty n) => MutableBlockN n ty (PrimState prim) -> prim (BlockN n ty) Source #
indexStatic :: forall i n ty. (KnownNat i, CmpNat i n ~ LT, PrimType ty, Offsetable ty i) => BlockN n ty -> ty 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) => BlockN n ty -> BlockN (j - i) ty Source #
uncons :: forall n ty. (CmpNat 0 n ~ LT, PrimType ty, KnownNat n, Offsetable ty n) => BlockN n ty -> (ty, BlockN (n - 1) ty) Source #
unsnoc :: forall n ty. (CmpNat 0 n ~ LT, KnownNat n, PrimType ty, Offsetable ty n) => BlockN n ty -> (BlockN (n - 1) ty, ty) Source #