foundation-0.0.30: Alternative prelude with batteries and no dependencies

License | BSD-style
Maintainer | Vincent Hanquez <vincent@snarc.org>
Stability | experimental
Portability | portable
Safe Haskell | None
Language | Haskell2010

Foundation.Array

Description

Simple Array and Almost-Array-like data structure

Generally accessible in o(1)

Synopsis

- data Array a
- data MArray a st
- data UArray ty
- data MUArray ty st
- data ChunkedUArray ty
- data Bitmap
- data MutableBitmap st
- class Eq ty => PrimType ty
- data OutOfBound

# Documentation

data Array a Source #

Array of a

#### Instances

Instances details

Mappable Array Source # |
Instance details Defined in Foundation.Collection.Mappable Methods traverse :: Applicative f => (a -> f b) -> Array a -> f (Array b) Source # sequenceA :: Applicative f => Array (f a) -> f (Array a) Source # mapM :: (Applicative m, Monad m) => (a -> m b) -> Array a -> m (Array b) Source # sequence :: (Applicative m, Monad m) => Array (m a) -> m (Array a) Source #
Functor Array |
Instance details Defined in Basement.BoxedArray Methods fmap :: (a -> b) -> Array a -> Array b Source # (<$) :: a -> Array b -> Array a Source #
NormalForm a => NormalForm (Array a) |
Instance details Defined in Basement.BoxedArray Methods toNormalForm :: Array a -> () Source #
Buildable (Array ty) Source # |

Instance details

Defined in Foundation.Collection.Buildable

Associated Types

type Mutable (Array ty) |
Instance details Defined in Foundation.Collection.Buildable type Mutable (Array ty) = MArray ty
type Step (Array ty) |
Instance details Defined in Foundation.Collection.Buildable type Step (Array ty) = ty

Methods

append :: forall (prim :: Type -> Type) err. PrimMonad prim => Element (Array ty) -> Builder (Array ty) (Mutable (Array ty)) (Step (Array ty)) prim err () Source #

build :: PrimMonad prim => Int -> Builder (Array ty) (Mutable (Array ty)) (Step (Array ty)) prim err () -> prim (Either err (Array ty)) Source #

Collection (Array ty) Source # |

Instance details

Defined in Foundation.Collection.Collection

Methods

null :: Array ty -> Bool Source #

length :: Array ty -> CountOf (Element (Array ty)) Source #

elem :: (Eq a, a ~ Element (Array ty)) => Element (Array ty) -> Array ty -> Bool Source #

notElem :: (Eq a, a ~ Element (Array ty)) => Element (Array ty) -> Array ty -> Bool Source #

maximum :: (Ord a, a ~ Element (Array ty)) => NonEmpty (Array ty) -> Element (Array ty) Source #

minimum :: (Ord a, a ~ Element (Array ty)) => NonEmpty (Array ty) -> Element (Array ty) Source #

any :: (Element (Array ty) -> Bool) -> Array ty -> Bool Source #

all :: (Element (Array ty) -> Bool) -> Array ty -> Bool Source #

Copy (Array ty) Source # |
Instance details Defined in Foundation.Collection.Copy Methods copy :: Array ty -> Array ty Source #
Fold1able (Array ty) Source # |
Instance details Defined in Foundation.Collection.Foldable Methods foldl1' :: (Element (Array ty) -> Element (Array ty) -> Element (Array ty)) -> NonEmpty (Array ty) -> Element (Array ty) Source # foldr1 :: (Element (Array ty) -> Element (Array ty) -> Element (Array ty)) -> NonEmpty (Array ty) -> Element (Array ty) Source #
Foldable (Array ty) Source # |
Instance details Defined in Foundation.Collection.Foldable Methods foldl' :: (a -> Element (Array ty) -> a) -> a -> Array ty -> a Source # foldr :: (Element (Array ty) -> a -> a) -> a -> Array ty -> a Source # foldr' :: (Element (Array ty) -> a -> a) -> a -> Array ty -> a Source #
IndexedCollection (Array ty) Source # |
Instance details Defined in Foundation.Collection.Indexed Methods (!) :: Array ty -> Offset (Element (Array ty)) -> Maybe (Element (Array ty)) Source # findIndex :: (Element (Array ty) -> Bool) -> Array ty -> Maybe (Offset (Element (Array ty))) Source #
InnerFunctor (Array ty) Source # |
Instance details Defined in Foundation.Collection.InnerFunctor Methods imap :: (Element (Array ty) -> Element (Array ty)) -> Array ty -> Array ty Source #
Sequential (Array ty) Source # |

Instance details

Defined in Foundation.Collection.Sequential

Methods

take :: CountOf (Element (Array ty)) -> Array ty -> Array ty Source #

revTake :: CountOf (Element (Array ty)) -> Array ty -> Array ty Source #

drop :: CountOf (Element (Array ty)) -> Array ty -> Array ty Source #

revDrop :: CountOf (Element (Array ty)) -> Array ty -> Array ty Source #

splitAt :: CountOf (Element (Array ty)) -> Array ty -> (Array ty, Array ty) Source #

revSplitAt :: CountOf (Element (Array ty)) -> Array ty -> (Array ty, Array ty) Source #

splitOn :: (Element (Array ty) -> Bool) -> Array ty -> [Array ty] Source #

break :: (Element (Array ty) -> Bool) -> Array ty -> (Array ty, Array ty) Source #

breakEnd :: (Element (Array ty) -> Bool) -> Array ty -> (Array ty, Array ty) Source #

breakElem :: Element (Array ty) -> Array ty -> (Array ty, Array ty) Source #

takeWhile :: (Element (Array ty) -> Bool) -> Array ty -> Array ty Source #

dropWhile :: (Element (Array ty) -> Bool) -> Array ty -> Array ty Source #

intersperse :: Element (Array ty) -> Array ty -> Array ty Source #

intercalate :: Element (Array ty) -> Array ty -> Element (Array ty) Source #

span :: (Element (Array ty) -> Bool) -> Array ty -> (Array ty, Array ty) Source #

spanEnd :: (Element (Array ty) -> Bool) -> Array ty -> (Array ty, Array ty) Source #

filter :: (Element (Array ty) -> Bool) -> Array ty -> Array ty Source #

partition :: (Element (Array ty) -> Bool) -> Array ty -> (Array ty, Array ty) Source #

reverse :: Array ty -> Array ty Source #

uncons :: Array ty -> Maybe (Element (Array ty), Array ty) Source #

unsnoc :: Array ty -> Maybe (Array ty, Element (Array ty)) Source #

snoc :: Array ty -> Element (Array ty) -> Array ty Source #

cons :: Element (Array ty) -> Array ty -> Array ty Source #

find :: (Element (Array ty) -> Bool) -> Array ty -> Maybe (Element (Array ty)) Source #

sortBy :: (Element (Array ty) -> Element (Array ty) -> Ordering) -> Array ty -> Array ty Source #

singleton :: Element (Array ty) -> Array ty Source #

head :: NonEmpty (Array ty) -> Element (Array ty) Source #

last :: NonEmpty (Array ty) -> Element (Array ty) Source #

tail :: NonEmpty (Array ty) -> Array ty Source #

init :: NonEmpty (Array ty) -> Array ty Source #

replicate :: CountOf (Element (Array ty)) -> Element (Array ty) -> Array ty Source #

isPrefixOf :: Array ty -> Array ty -> Bool Source #

isSuffixOf :: Array ty -> Array ty -> Bool Source #

isInfixOf :: Array ty -> Array ty -> Bool Source #

stripPrefix :: Array ty -> Array ty -> Maybe (Array ty) Source #

stripSuffix :: Array ty -> Array ty -> Maybe (Array ty) Source #

BoxedZippable (Array ty) Source # |

Instance details

Defined in Foundation.Collection.Zippable

Methods

zip :: (Sequential a, Sequential b, Element (Array ty) ~ (Element a, Element b)) => a -> b -> Array ty Source #

zip3 :: (Sequential a, Sequential b, Sequential c, Element (Array ty) ~ (Element a, Element b, Element c)) => a -> b -> c -> Array ty Source #

zip4 :: (Sequential a, Sequential b, Sequential c, Sequential d, Element (Array ty) ~ (Element a, Element b, Element c, Element d)) => a -> b -> c -> d -> Array ty Source #

zip5 :: (Sequential a, Sequential b, Sequential c, Sequential d, Sequential e, Element (Array ty) ~ (Element a, Element b, Element c, Element d, Element e)) => a -> b -> c -> d -> e -> Array ty Source #

zip6 :: (Sequential a, Sequential b, Sequential c, Sequential d, Sequential e, Sequential f, Element (Array ty) ~ (Element a, Element b, Element c, Element d, Element e, Element f)) => a -> b -> c -> d -> e -> f -> Array ty Source #

zip7 :: (Sequential a, Sequential b, Sequential c, Sequential d, Sequential e, Sequential f, Sequential g, Element (Array ty) ~ (Element a, Element b, Element c, Element d, Element e, Element f, Element g)) => a -> b -> c -> d -> e -> f -> g -> Array ty Source #

unzip :: (Sequential a, Sequential b, Element (Array ty) ~ (Element a, Element b)) => Array ty -> (a, b) Source #

unzip3 :: (Sequential a, Sequential b, Sequential c, Element (Array ty) ~ (Element a, Element b, Element c)) => Array ty -> (a, b, c) Source #

unzip4 :: (Sequential a, Sequential b, Sequential c, Sequential d, Element (Array ty) ~ (Element a, Element b, Element c, Element d)) => Array ty -> (a, b, c, d) Source #

unzip5 :: (Sequential a, Sequential b, Sequential c, Sequential d, Sequential e, Element (Array ty) ~ (Element a, Element b, Element c, Element d, Element e)) => Array ty -> (a, b, c, d, e) Source #

unzip6 :: (Sequential a, Sequential b, Sequential c, Sequential d, Sequential e, Sequential f, Element (Array ty) ~ (Element a, Element b, Element c, Element d, Element e, Element f)) => Array ty -> (a, b, c, d, e, f) Source #

unzip7 :: (Sequential a, Sequential b, Sequential c, Sequential d, Sequential e, Sequential f, Sequential g, Element (Array ty) ~ (Element a, Element b, Element c, Element d, Element e, Element f, Element g)) => Array ty -> (a, b, c, d, e, f, g) Source #

Zippable (Array ty) Source # |

Instance details

Defined in Foundation.Collection.Zippable

Methods

zipWith :: (Sequential a, Sequential b) => (Element a -> Element b -> Element (Array ty)) -> a -> b -> Array ty Source #

zipWith3 :: (Sequential a, Sequential b, Sequential c) => (Element a -> Element b -> Element c -> Element (Array ty)) -> a -> b -> c -> Array ty Source #

zipWith4 :: (Sequential a, Sequential b, Sequential c, Sequential d) => (Element a -> Element b -> Element c -> Element d -> Element (Array ty)) -> a -> b -> c -> d -> Array ty Source #

zipWith5 :: (Sequential a, Sequential b, Sequential c, Sequential d, Sequential e) => (Element a -> Element b -> Element c -> Element d -> Element e -> Element (Array ty)) -> a -> b -> c -> d -> e -> Array ty Source #

zipWith6 :: (Sequential a, Sequential b, Sequential c, Sequential d, Sequential e, Sequential f) => (Element a -> Element b -> Element c -> Element d -> Element e -> Element f -> Element (Array ty)) -> a -> b -> c -> d -> e -> f -> Array ty Source #

zipWith7 :: (Sequential a, Sequential b, Sequential c, Sequential d, Sequential e, Sequential f, Sequential g) => (Element a -> Element b -> Element c -> Element d -> Element e -> Element f -> Element g -> Element (Array ty)) -> a -> b -> c -> d -> e -> f -> g -> Array ty Source #

Hashable a => Hashable (Array a) Source # |
Instance details Defined in Foundation.Hashing.Hashable Methods hashMix :: Hasher st => Array a -> st -> st Source #
Monoid (Array a) |
Instance details Defined in Basement.BoxedArray Methods mempty :: Array a Source # mappend :: Array a -> Array a -> Array a Source # mconcat :: [Array a] -> Array a Source #
Semigroup (Array a) |
Instance details Defined in Basement.BoxedArray Methods (<>) :: Array a -> Array a -> Array a Source # sconcat :: NonEmpty (Array a) -> Array a Source # stimes :: Integral b => b -> Array a -> Array a Source #
Data ty => Data (Array ty) |

Instance details

Defined in Basement.BoxedArray

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Array ty -> c (Array ty) Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Array ty) Source #

toConstr :: Array ty -> Constr Source #

dataTypeOf :: Array ty -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Array ty)) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Array ty)) Source #

gmapT :: (forall b. Data b => b -> b) -> Array ty -> Array ty Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Array ty -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Array ty -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> Array ty -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Array ty -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Array ty -> m (Array ty) Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Array ty -> m (Array ty) Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Array ty -> m (Array ty) Source #

IsList (Array ty) |

Instance details

Defined in Basement.BoxedArray

Associated Types

type Item (Array ty) |
Instance details Defined in Basement.BoxedArray type Item (Array ty) = ty

Methods

fromList :: [Item (Array ty)] -> Array ty Source #

fromListN :: Int -> [Item (Array ty)] -> Array ty Source #

toList :: Array ty -> [Item (Array ty)] Source #

Show a => Show (Array a) |
Instance details Defined in Basement.BoxedArray Methods showsPrec :: Int -> Array a -> ShowS Source # show :: Array a -> String Source # showList :: [Array a] -> ShowS Source #
Eq a => Eq (Array a) |
Instance details Defined in Basement.BoxedArray Methods (==) :: Array a -> Array a -> Bool Source # (/=) :: Array a -> Array a -> Bool Source #
Ord a => Ord (Array a) |
Instance details Defined in Basement.BoxedArray Methods compare :: Array a -> Array a -> Ordering Source # (<) :: Array a -> Array a -> Bool Source # (<=) :: Array a -> Array a -> Bool Source # (>) :: Array a -> Array a -> Bool Source # (>=) :: Array a -> Array a -> Bool Source # max :: Array a -> Array a -> Array a Source # min :: Array a -> Array a -> Array a Source #
PrimType ty => From (Array ty) (Block ty) |
Instance details Defined in Basement.From Methods from :: Array ty -> Block ty Source #
PrimType ty => From (Array ty) (UArray ty) |
Instance details Defined in Basement.From Methods from :: Array ty -> UArray ty Source #
PrimType ty => From (UArray ty) (Array ty) |
Instance details Defined in Basement.From Methods from :: UArray ty -> Array ty Source #
(NatWithinBound (CountOf ty) n, KnownNat n, PrimType ty) => TryFrom (Array ty) (BlockN n ty) |
Instance details Defined in Basement.From Methods tryFrom :: Array ty -> Maybe (BlockN n ty) Source #
(NatWithinBound Int n, PrimType ty) => From (BlockN n ty) (Array ty) |
Instance details Defined in Basement.From Methods from :: BlockN n ty -> Array ty Source #
type Mutable (Array ty) Source # |
Instance details Defined in Foundation.Collection.Buildable type Mutable (Array ty) = MArray ty
type Step (Array ty) Source # |
Instance details Defined in Foundation.Collection.Buildable type Step (Array ty) = ty
type Element (Array ty) Source # |
Instance details Defined in Foundation.Collection.Element type Element (Array ty) = ty
type Item (Array ty) |
Instance details Defined in Basement.BoxedArray type Item (Array ty) = ty

data MArray a st Source #

Mutable Array of a

#### Instances

Instances details

MutableCollection (MArray ty) Source # |

Instance details

Defined in Foundation.Collection.Mutable

Associated Types

type MutableFreezed (MArray ty) |
Instance details Defined in Foundation.Collection.Mutable type MutableFreezed (MArray ty) = Array ty
type MutableKey (MArray ty) |
Instance details Defined in Foundation.Collection.Mutable type MutableKey (MArray ty) = Offset ty
type MutableValue (MArray ty) |
Instance details Defined in Foundation.Collection.Mutable type MutableValue (MArray ty) = ty

Methods

unsafeThaw :: PrimMonad prim => MutableFreezed (MArray ty) -> prim (MArray ty (PrimState prim)) Source #

unsafeFreeze :: PrimMonad prim => MArray ty (PrimState prim) -> prim (MutableFreezed (MArray ty)) Source #

thaw :: PrimMonad prim => MutableFreezed (MArray ty) -> prim (MArray ty (PrimState prim)) Source #

freeze :: PrimMonad prim => MArray ty (PrimState prim) -> prim (MutableFreezed (MArray ty)) Source #

mutNew :: PrimMonad prim => CountOf (MutableValue (MArray ty)) -> prim (MArray ty (PrimState prim)) Source #

mutUnsafeWrite :: PrimMonad prim => MArray ty (PrimState prim) -> MutableKey (MArray ty) -> MutableValue (MArray ty) -> prim () Source #

mutWrite :: PrimMonad prim => MArray ty (PrimState prim) -> MutableKey (MArray ty) -> MutableValue (MArray ty) -> prim () Source #

mutUnsafeRead :: PrimMonad prim => MArray ty (PrimState prim) -> MutableKey (MArray ty) -> prim (MutableValue (MArray ty)) Source #

mutRead :: PrimMonad prim => MArray ty (PrimState prim) -> MutableKey (MArray ty) -> prim (MutableValue (MArray ty)) Source #

(PrimMonad prim, st ~ PrimState prim) => RandomAccess (MArray ty st) prim ty |
Instance details Defined in Basement.BoxedArray Methods read :: MArray ty st -> Offset ty -> prim ty write :: MArray ty st -> Offset ty -> ty -> prim ()
type MutableFreezed (MArray ty) Source # |
Instance details Defined in Foundation.Collection.Mutable type MutableFreezed (MArray ty) = Array ty
type MutableKey (MArray ty) Source # |
Instance details Defined in Foundation.Collection.Mutable type MutableKey (MArray ty) = Offset ty
type MutableValue (MArray ty) Source # |
Instance details Defined in Foundation.Collection.Mutable type MutableValue (MArray ty) = ty

data UArray ty Source #

An array of type built on top of GHC primitive.

The elements need to have fixed sized and the representation is a packed contiguous array in memory that can easily be passed to foreign interface

#### Instances

Instances details

From AsciiString (UArray Word8) |
Instance details Defined in Basement.From Methods from :: AsciiString -> UArray Word8 Source #
From String (UArray Word8) |
Instance details Defined in Basement.From Methods from :: String -> UArray Word8 Source #
NormalForm (UArray ty) |
Instance details Defined in Basement.UArray.Base Methods toNormalForm :: UArray ty -> () Source #
PrimType ty => Buildable (UArray ty) Source # |

Instance details

Defined in Foundation.Collection.Buildable

Associated Types

type Mutable (UArray ty) |
Instance details Defined in Foundation.Collection.Buildable type Mutable (UArray ty) = MUArray ty
type Step (UArray ty) |
Instance details Defined in Foundation.Collection.Buildable type Step (UArray ty) = ty

Methods

append :: forall (prim :: Type -> Type) err. PrimMonad prim => Element (UArray ty) -> Builder (UArray ty) (Mutable (UArray ty)) (Step (UArray ty)) prim err () Source #

build :: PrimMonad prim => Int -> Builder (UArray ty) (Mutable (UArray ty)) (Step (UArray ty)) prim err () -> prim (Either err (UArray ty)) Source #

PrimType ty => Collection (UArray ty) Source # |

Instance details

Defined in Foundation.Collection.Collection

Methods

null :: UArray ty -> Bool Source #

length :: UArray ty -> CountOf (Element (UArray ty)) Source #

elem :: (Eq a, a ~ Element (UArray ty)) => Element (UArray ty) -> UArray ty -> Bool Source #

notElem :: (Eq a, a ~ Element (UArray ty)) => Element (UArray ty) -> UArray ty -> Bool Source #

maximum :: (Ord a, a ~ Element (UArray ty)) => NonEmpty (UArray ty) -> Element (UArray ty) Source #

minimum :: (Ord a, a ~ Element (UArray ty)) => NonEmpty (UArray ty) -> Element (UArray ty) Source #

any :: (Element (UArray ty) -> Bool) -> UArray ty -> Bool Source #

all :: (Element (UArray ty) -> Bool) -> UArray ty -> Bool Source #

PrimType ty => Copy (UArray ty) Source # |
Instance details Defined in Foundation.Collection.Copy Methods copy :: UArray ty -> UArray ty Source #
PrimType ty => Fold1able (UArray ty) Source # |
Instance details Defined in Foundation.Collection.Foldable Methods foldl1' :: (Element (UArray ty) -> Element (UArray ty) -> Element (UArray ty)) -> NonEmpty (UArray ty) -> Element (UArray ty) Source # foldr1 :: (Element (UArray ty) -> Element (UArray ty) -> Element (UArray ty)) -> NonEmpty (UArray ty) -> Element (UArray ty) Source #
PrimType ty => Foldable (UArray ty) Source # |
Instance details Defined in Foundation.Collection.Foldable Methods foldl' :: (a -> Element (UArray ty) -> a) -> a -> UArray ty -> a Source # foldr :: (Element (UArray ty) -> a -> a) -> a -> UArray ty -> a Source # foldr' :: (Element (UArray ty) -> a -> a) -> a -> UArray ty -> a Source #
PrimType ty => IndexedCollection (UArray ty) Source # |
Instance details Defined in Foundation.Collection.Indexed Methods (!) :: UArray ty -> Offset (Element (UArray ty)) -> Maybe (Element (UArray ty)) Source # findIndex :: (Element (UArray ty) -> Bool) -> UArray ty -> Maybe (Offset (Element (UArray ty))) Source #
PrimType ty => InnerFunctor (UArray ty) Source # |
Instance details Defined in Foundation.Collection.InnerFunctor Methods imap :: (Element (UArray ty) -> Element (UArray ty)) -> UArray ty -> UArray ty Source #
PrimType ty => Sequential (UArray ty) Source # |

Instance details

Defined in Foundation.Collection.Sequential

Methods

take :: CountOf (Element (UArray ty)) -> UArray ty -> UArray ty Source #

revTake :: CountOf (Element (UArray ty)) -> UArray ty -> UArray ty Source #

drop :: CountOf (Element (UArray ty)) -> UArray ty -> UArray ty Source #

revDrop :: CountOf (Element (UArray ty)) -> UArray ty -> UArray ty Source #

splitAt :: CountOf (Element (UArray ty)) -> UArray ty -> (UArray ty, UArray ty) Source #

revSplitAt :: CountOf (Element (UArray ty)) -> UArray ty -> (UArray ty, UArray ty) Source #

splitOn :: (Element (UArray ty) -> Bool) -> UArray ty -> [UArray ty] Source #

break :: (Element (UArray ty) -> Bool) -> UArray ty -> (UArray ty, UArray ty) Source #

breakEnd :: (Element (UArray ty) -> Bool) -> UArray ty -> (UArray ty, UArray ty) Source #

breakElem :: Element (UArray ty) -> UArray ty -> (UArray ty, UArray ty) Source #

takeWhile :: (Element (UArray ty) -> Bool) -> UArray ty -> UArray ty Source #

dropWhile :: (Element (UArray ty) -> Bool) -> UArray ty -> UArray ty Source #

intersperse :: Element (UArray ty) -> UArray ty -> UArray ty Source #

intercalate :: Element (UArray ty) -> UArray ty -> Element (UArray ty) Source #

span :: (Element (UArray ty) -> Bool) -> UArray ty -> (UArray ty, UArray ty) Source #

spanEnd :: (Element (UArray ty) -> Bool) -> UArray ty -> (UArray ty, UArray ty) Source #

filter :: (Element (UArray ty) -> Bool) -> UArray ty -> UArray ty Source #

partition :: (Element (UArray ty) -> Bool) -> UArray ty -> (UArray ty, UArray ty) Source #

reverse :: UArray ty -> UArray ty Source #

uncons :: UArray ty -> Maybe (Element (UArray ty), UArray ty) Source #

unsnoc :: UArray ty -> Maybe (UArray ty, Element (UArray ty)) Source #

snoc :: UArray ty -> Element (UArray ty) -> UArray ty Source #

cons :: Element (UArray ty) -> UArray ty -> UArray ty Source #

find :: (Element (UArray ty) -> Bool) -> UArray ty -> Maybe (Element (UArray ty)) Source #

sortBy :: (Element (UArray ty) -> Element (UArray ty) -> Ordering) -> UArray ty -> UArray ty Source #

singleton :: Element (UArray ty) -> UArray ty Source #

head :: NonEmpty (UArray ty) -> Element (UArray ty) Source #

last :: NonEmpty (UArray ty) -> Element (UArray ty) Source #

tail :: NonEmpty (UArray ty) -> UArray ty Source #

init :: NonEmpty (UArray ty) -> UArray ty Source #

replicate :: CountOf (Element (UArray ty)) -> Element (UArray ty) -> UArray ty Source #

isPrefixOf :: UArray ty -> UArray ty -> Bool Source #

isSuffixOf :: UArray ty -> UArray ty -> Bool Source #

isInfixOf :: UArray ty -> UArray ty -> Bool Source #

stripPrefix :: UArray ty -> UArray ty -> Maybe (UArray ty) Source #

stripSuffix :: UArray ty -> UArray ty -> Maybe (UArray ty) Source #

PrimType ty => Zippable (UArray ty) Source # |

Instance details

Defined in Foundation.Collection.Zippable

Methods

zipWith :: (Sequential a, Sequential b) => (Element a -> Element b -> Element (UArray ty)) -> a -> b -> UArray ty Source #

zipWith3 :: (Sequential a, Sequential b, Sequential c) => (Element a -> Element b -> Element c -> Element (UArray ty)) -> a -> b -> c -> UArray ty Source #

zipWith4 :: (Sequential a, Sequential b, Sequential c, Sequential d) => (Element a -> Element b -> Element c -> Element d -> Element (UArray ty)) -> a -> b -> c -> d -> UArray ty Source #

zipWith5 :: (Sequential a, Sequential b, Sequential c, Sequential d, Sequential e) => (Element a -> Element b -> Element c -> Element d -> Element e -> Element (UArray ty)) -> a -> b -> c -> d -> e -> UArray ty Source #

zipWith6 :: (Sequential a, Sequential b, Sequential c, Sequential d, Sequential e, Sequential f) => (Element a -> Element b -> Element c -> Element d -> Element e -> Element f -> Element (UArray ty)) -> a -> b -> c -> d -> e -> f -> UArray ty Source #

zipWith7 :: (Sequential a, Sequential b, Sequential c, Sequential d, Sequential e, Sequential f, Sequential g) => (Element a -> Element b -> Element c -> Element d -> Element e -> Element f -> Element g -> Element (UArray ty)) -> a -> b -> c -> d -> e -> f -> g -> UArray ty Source #

PrimType a => Hashable (UArray a) Source # |
Instance details Defined in Foundation.Hashing.Hashable Methods hashMix :: Hasher st => UArray a -> st -> st Source #
PrimType ty => Monoid (UArray ty) |
Instance details Defined in Basement.UArray.Base Methods mempty :: UArray ty Source # mappend :: UArray ty -> UArray ty -> UArray ty Source # mconcat :: [UArray ty] -> UArray ty Source #
PrimType ty => Semigroup (UArray ty) |
Instance details Defined in Basement.UArray.Base Methods (<>) :: UArray ty -> UArray ty -> UArray ty Source # sconcat :: NonEmpty (UArray ty) -> UArray ty Source # stimes :: Integral b => b -> UArray ty -> UArray ty Source #
Data ty => Data (UArray ty) |

Instance details

Defined in Basement.UArray.Base

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> UArray ty -> c (UArray ty) Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (UArray ty) Source #

toConstr :: UArray ty -> Constr Source #

dataTypeOf :: UArray ty -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (UArray ty)) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (UArray ty)) Source #

gmapT :: (forall b. Data b => b -> b) -> UArray ty -> UArray ty Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> UArray ty -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> UArray ty -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> UArray ty -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> UArray ty -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> UArray ty -> m (UArray ty) Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> UArray ty -> m (UArray ty) Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> UArray ty -> m (UArray ty) Source #

PrimType ty => IsList (UArray ty) |

Instance details

Defined in Basement.UArray.Base

Associated Types

type Item (UArray ty) |
Instance details Defined in Basement.UArray.Base type Item (UArray ty) = ty

Methods

fromList :: [Item (UArray ty)] -> UArray ty Source #

fromListN :: Int -> [Item (UArray ty)] -> UArray ty Source #

toList :: UArray ty -> [Item (UArray ty)] Source #

(PrimType ty, Show ty) => Show (UArray ty) |
Instance details Defined in Basement.UArray.Base Methods showsPrec :: Int -> UArray ty -> ShowS Source # show :: UArray ty -> String Source # showList :: [UArray ty] -> ShowS Source #
(PrimType ty, Eq ty) => Eq (UArray ty) |
Instance details Defined in Basement.UArray.Base Methods (==) :: UArray ty -> UArray ty -> Bool Source # (/=) :: UArray ty -> UArray ty -> Bool Source #
(PrimType ty, Ord ty) => Ord (UArray ty) |

Instance details

Defined in Basement.UArray.Base

Methods

compare :: UArray ty -> UArray ty -> Ordering Source #

(<) :: UArray ty -> UArray ty -> Bool Source #

(<=) :: UArray ty -> UArray ty -> Bool Source #

(>) :: UArray ty -> UArray ty -> Bool Source #

(>=) :: UArray ty -> UArray ty -> Bool Source #

max :: UArray ty -> UArray ty -> UArray ty Source #

min :: UArray ty -> UArray ty -> UArray ty Source #

TryFrom (UArray Word8) String |
Instance details Defined in Basement.From Methods tryFrom :: UArray Word8 -> Maybe String Source #
PrimType ty => From (Block ty) (UArray ty) |
Instance details Defined in Basement.From Methods from :: Block ty -> UArray ty Source #
PrimType ty => From (Array ty) (UArray ty) |
Instance details Defined in Basement.From Methods from :: Array ty -> UArray ty Source #
PrimType ty => From (UArray ty) (Block ty) |
Instance details Defined in Basement.From Methods from :: UArray ty -> Block ty Source #
PrimType ty => From (UArray ty) (Array ty) |
Instance details Defined in Basement.From Methods from :: UArray ty -> Array ty Source #
(NatWithinBound (CountOf ty) n, KnownNat n, PrimType ty) => TryFrom (UArray ty) (BlockN n ty) |
Instance details Defined in Basement.From Methods tryFrom :: UArray ty -> Maybe (BlockN n ty) Source #
(NatWithinBound Int n, PrimType ty) => From (BlockN n ty) (UArray ty) |
Instance details Defined in Basement.From Methods from :: BlockN n ty -> UArray ty Source #
type Mutable (UArray ty) Source # |
Instance details Defined in Foundation.Collection.Buildable type Mutable (UArray ty) = MUArray ty
type Step (UArray ty) Source # |
Instance details Defined in Foundation.Collection.Buildable type Step (UArray ty) = ty
type Element (UArray ty) Source # |
Instance details Defined in Foundation.Collection.Element type Element (UArray ty) = ty
type Item (UArray ty) |
Instance details Defined in Basement.UArray.Base type Item (UArray ty) = ty

data MUArray ty st Source #

A Mutable array of types built on top of GHC primitive.

Element in this array can be modified in place.

#### Instances

Instances details

PrimType ty => MutableCollection (MUArray ty) Source # |

Instance details

Defined in Foundation.Collection.Mutable

Associated Types

type MutableFreezed (MUArray ty) |
Instance details Defined in Foundation.Collection.Mutable type MutableFreezed (MUArray ty) = UArray ty
type MutableKey (MUArray ty) |
Instance details Defined in Foundation.Collection.Mutable type MutableKey (MUArray ty) = Offset ty
type MutableValue (MUArray ty) |
Instance details Defined in Foundation.Collection.Mutable type MutableValue (MUArray ty) = ty

Methods

unsafeThaw :: PrimMonad prim => MutableFreezed (MUArray ty) -> prim (MUArray ty (PrimState prim)) Source #

unsafeFreeze :: PrimMonad prim => MUArray ty (PrimState prim) -> prim (MutableFreezed (MUArray ty)) Source #

thaw :: PrimMonad prim => MutableFreezed (MUArray ty) -> prim (MUArray ty (PrimState prim)) Source #

freeze :: PrimMonad prim => MUArray ty (PrimState prim) -> prim (MutableFreezed (MUArray ty)) Source #

mutNew :: PrimMonad prim => CountOf (MutableValue (MUArray ty)) -> prim (MUArray ty (PrimState prim)) Source #

mutUnsafeWrite :: PrimMonad prim => MUArray ty (PrimState prim) -> MutableKey (MUArray ty) -> MutableValue (MUArray ty) -> prim () Source #

mutWrite :: PrimMonad prim => MUArray ty (PrimState prim) -> MutableKey (MUArray ty) -> MutableValue (MUArray ty) -> prim () Source #

mutUnsafeRead :: PrimMonad prim => MUArray ty (PrimState prim) -> MutableKey (MUArray ty) -> prim (MutableValue (MUArray ty)) Source #

mutRead :: PrimMonad prim => MUArray ty (PrimState prim) -> MutableKey (MUArray ty) -> prim (MutableValue (MUArray ty)) Source #

type MutableFreezed (MUArray ty) Source # |
Instance details Defined in Foundation.Collection.Mutable type MutableFreezed (MUArray ty) = UArray ty
type MutableKey (MUArray ty) Source # |
Instance details Defined in Foundation.Collection.Mutable type MutableKey (MUArray ty) = Offset ty
type MutableValue (MUArray ty) Source # |
Instance details Defined in Foundation.Collection.Mutable type MutableValue (MUArray ty) = ty

data ChunkedUArray ty Source #

#### Instances

Instances details

NormalForm (ChunkedUArray ty) Source # |
Instance details Defined in Foundation.Array.Chunked.Unboxed Methods toNormalForm :: ChunkedUArray ty -> () Source #
PrimType ty => Collection (ChunkedUArray ty) Source # |

Instance details

Defined in Foundation.Array.Chunked.Unboxed

Methods

null :: ChunkedUArray ty -> Bool Source #

length :: ChunkedUArray ty -> CountOf (Element (ChunkedUArray ty)) Source #

elem :: (Eq a, a ~ Element (ChunkedUArray ty)) => Element (ChunkedUArray ty) -> ChunkedUArray ty -> Bool Source #

notElem :: (Eq a, a ~ Element (ChunkedUArray ty)) => Element (ChunkedUArray ty) -> ChunkedUArray ty -> Bool Source #

maximum :: (Ord a, a ~ Element (ChunkedUArray ty)) => NonEmpty (ChunkedUArray ty) -> Element (ChunkedUArray ty) Source #

minimum :: (Ord a, a ~ Element (ChunkedUArray ty)) => NonEmpty (ChunkedUArray ty) -> Element (ChunkedUArray ty) Source #

any :: (Element (ChunkedUArray ty) -> Bool) -> ChunkedUArray ty -> Bool Source #

all :: (Element (ChunkedUArray ty) -> Bool) -> ChunkedUArray ty -> Bool Source #

PrimType ty => Foldable (ChunkedUArray ty) Source # |
Instance details Defined in Foundation.Array.Chunked.Unboxed Methods foldl' :: (a -> Element (ChunkedUArray ty) -> a) -> a -> ChunkedUArray ty -> a Source # foldr :: (Element (ChunkedUArray ty) -> a -> a) -> a -> ChunkedUArray ty -> a Source # foldr' :: (Element (ChunkedUArray ty) -> a -> a) -> a -> ChunkedUArray ty -> a Source #
PrimType ty => IndexedCollection (ChunkedUArray ty) Source # |
Instance details Defined in Foundation.Array.Chunked.Unboxed Methods (!) :: ChunkedUArray ty -> Offset (Element (ChunkedUArray ty)) -> Maybe (Element (ChunkedUArray ty)) Source # findIndex :: (Element (ChunkedUArray ty) -> Bool) -> ChunkedUArray ty -> Maybe (Offset (Element (ChunkedUArray ty))) Source #
PrimType ty => Sequential (ChunkedUArray ty) Source # |

Instance details

Defined in Foundation.Array.Chunked.Unboxed

Methods

take :: CountOf (Element (ChunkedUArray ty)) -> ChunkedUArray ty -> ChunkedUArray ty Source #

revTake :: CountOf (Element (ChunkedUArray ty)) -> ChunkedUArray ty -> ChunkedUArray ty Source #

drop :: CountOf (Element (ChunkedUArray ty)) -> ChunkedUArray ty -> ChunkedUArray ty Source #

revDrop :: CountOf (Element (ChunkedUArray ty)) -> ChunkedUArray ty -> ChunkedUArray ty Source #

splitAt :: CountOf (Element (ChunkedUArray ty)) -> ChunkedUArray ty -> (ChunkedUArray ty, ChunkedUArray ty) Source #

revSplitAt :: CountOf (Element (ChunkedUArray ty)) -> ChunkedUArray ty -> (ChunkedUArray ty, ChunkedUArray ty) Source #

splitOn :: (Element (ChunkedUArray ty) -> Bool) -> ChunkedUArray ty -> [ChunkedUArray ty] Source #

break :: (Element (ChunkedUArray ty) -> Bool) -> ChunkedUArray ty -> (ChunkedUArray ty, ChunkedUArray ty) Source #

breakEnd :: (Element (ChunkedUArray ty) -> Bool) -> ChunkedUArray ty -> (ChunkedUArray ty, ChunkedUArray ty) Source #

breakElem :: Element (ChunkedUArray ty) -> ChunkedUArray ty -> (ChunkedUArray ty, ChunkedUArray ty) Source #

takeWhile :: (Element (ChunkedUArray ty) -> Bool) -> ChunkedUArray ty -> ChunkedUArray ty Source #

dropWhile :: (Element (ChunkedUArray ty) -> Bool) -> ChunkedUArray ty -> ChunkedUArray ty Source #

intersperse :: Element (ChunkedUArray ty) -> ChunkedUArray ty -> ChunkedUArray ty Source #

intercalate :: Element (ChunkedUArray ty) -> ChunkedUArray ty -> Element (ChunkedUArray ty) Source #

span :: (Element (ChunkedUArray ty) -> Bool) -> ChunkedUArray ty -> (ChunkedUArray ty, ChunkedUArray ty) Source #

spanEnd :: (Element (ChunkedUArray ty) -> Bool) -> ChunkedUArray ty -> (ChunkedUArray ty, ChunkedUArray ty) Source #

filter :: (Element (ChunkedUArray ty) -> Bool) -> ChunkedUArray ty -> ChunkedUArray ty Source #

partition :: (Element (ChunkedUArray ty) -> Bool) -> ChunkedUArray ty -> (ChunkedUArray ty, ChunkedUArray ty) Source #

reverse :: ChunkedUArray ty -> ChunkedUArray ty Source #

uncons :: ChunkedUArray ty -> Maybe (Element (ChunkedUArray ty), ChunkedUArray ty) Source #

unsnoc :: ChunkedUArray ty -> Maybe (ChunkedUArray ty, Element (ChunkedUArray ty)) Source #

snoc :: ChunkedUArray ty -> Element (ChunkedUArray ty) -> ChunkedUArray ty Source #

cons :: Element (ChunkedUArray ty) -> ChunkedUArray ty -> ChunkedUArray ty Source #

find :: (Element (ChunkedUArray ty) -> Bool) -> ChunkedUArray ty -> Maybe (Element (ChunkedUArray ty)) Source #

sortBy :: (Element (ChunkedUArray ty) -> Element (ChunkedUArray ty) -> Ordering) -> ChunkedUArray ty -> ChunkedUArray ty Source #

singleton :: Element (ChunkedUArray ty) -> ChunkedUArray ty Source #

head :: NonEmpty (ChunkedUArray ty) -> Element (ChunkedUArray ty) Source #

last :: NonEmpty (ChunkedUArray ty) -> Element (ChunkedUArray ty) Source #

tail :: NonEmpty (ChunkedUArray ty) -> ChunkedUArray ty Source #

init :: NonEmpty (ChunkedUArray ty) -> ChunkedUArray ty Source #

replicate :: CountOf (Element (ChunkedUArray ty)) -> Element (ChunkedUArray ty) -> ChunkedUArray ty Source #

isPrefixOf :: ChunkedUArray ty -> ChunkedUArray ty -> Bool Source #

isSuffixOf :: ChunkedUArray ty -> ChunkedUArray ty -> Bool Source #

isInfixOf :: ChunkedUArray ty -> ChunkedUArray ty -> Bool Source #

stripPrefix :: ChunkedUArray ty -> ChunkedUArray ty -> Maybe (ChunkedUArray ty) Source #

stripSuffix :: ChunkedUArray ty -> ChunkedUArray ty -> Maybe (ChunkedUArray ty) Source #

Monoid (ChunkedUArray a) Source # |
Instance details Defined in Foundation.Array.Chunked.Unboxed Methods mempty :: ChunkedUArray a Source # mappend :: ChunkedUArray a -> ChunkedUArray a -> ChunkedUArray a Source # mconcat :: [ChunkedUArray a] -> ChunkedUArray a Source #
Semigroup (ChunkedUArray a) Source # |
Instance details Defined in Foundation.Array.Chunked.Unboxed Methods (<>) :: ChunkedUArray a -> ChunkedUArray a -> ChunkedUArray a Source # sconcat :: NonEmpty (ChunkedUArray a) -> ChunkedUArray a Source # stimes :: Integral b => b -> ChunkedUArray a -> ChunkedUArray a Source #
PrimType ty => IsList (ChunkedUArray ty) Source # |

Instance details

Defined in Foundation.Array.Chunked.Unboxed

Associated Types

type Item (ChunkedUArray ty) |
Instance details Defined in Foundation.Array.Chunked.Unboxed type Item (ChunkedUArray ty) = ty

Methods

fromList :: [Item (ChunkedUArray ty)] -> ChunkedUArray ty Source #

fromListN :: Int -> [Item (ChunkedUArray ty)] -> ChunkedUArray ty Source #

toList :: ChunkedUArray ty -> [Item (ChunkedUArray ty)] Source #

(PrimType ty, Show ty) => Show (ChunkedUArray ty) Source # |
Instance details Defined in Foundation.Array.Chunked.Unboxed Methods showsPrec :: Int -> ChunkedUArray ty -> ShowS Source # show :: ChunkedUArray ty -> String Source # showList :: [ChunkedUArray ty] -> ShowS Source #
PrimType ty => Eq (ChunkedUArray ty) Source # |
Instance details Defined in Foundation.Array.Chunked.Unboxed Methods (==) :: ChunkedUArray ty -> ChunkedUArray ty -> Bool Source # (/=) :: ChunkedUArray ty -> ChunkedUArray ty -> Bool Source #
(PrimType ty, Ord ty) => Ord (ChunkedUArray ty) Source # |

Instance details

Defined in Foundation.Array.Chunked.Unboxed

Methods

compare :: ChunkedUArray ty -> ChunkedUArray ty -> Ordering Source #

(<) :: ChunkedUArray ty -> ChunkedUArray ty -> Bool Source #

(<=) :: ChunkedUArray ty -> ChunkedUArray ty -> Bool Source #

(>) :: ChunkedUArray ty -> ChunkedUArray ty -> Bool Source #

(>=) :: ChunkedUArray ty -> ChunkedUArray ty -> Bool Source #

max :: ChunkedUArray ty -> ChunkedUArray ty -> ChunkedUArray ty Source #

min :: ChunkedUArray ty -> ChunkedUArray ty -> ChunkedUArray ty Source #

type Element (ChunkedUArray ty) Source # |
Instance details Defined in Foundation.Array.Chunked.Unboxed type Element (ChunkedUArray ty) = ty
type Item (ChunkedUArray ty) Source # |
Instance details Defined in Foundation.Array.Chunked.Unboxed type Item (ChunkedUArray ty) = ty

data Bitmap Source #

#### Instances

Instances details

Collection Bitmap Source # |

Instance details

Defined in Foundation.Array.Bitmap

Methods

null :: Bitmap -> Bool Source #

length :: Bitmap -> CountOf (Element Bitmap) Source #

elem :: (Eq a, a ~ Element Bitmap) => Element Bitmap -> Bitmap -> Bool Source #

notElem :: (Eq a, a ~ Element Bitmap) => Element Bitmap -> Bitmap -> Bool Source #

maximum :: (Ord a, a ~ Element Bitmap) => NonEmpty Bitmap -> Element Bitmap Source #

minimum :: (Ord a, a ~ Element Bitmap) => NonEmpty Bitmap -> Element Bitmap Source #

any :: (Element Bitmap -> Bool) -> Bitmap -> Bool Source #

all :: (Element Bitmap -> Bool) -> Bitmap -> Bool Source #

Foldable Bitmap Source # |
Instance details Defined in Foundation.Array.Bitmap Methods foldl' :: (a -> Element Bitmap -> a) -> a -> Bitmap -> a Source # foldr :: (Element Bitmap -> a -> a) -> a -> Bitmap -> a Source # foldr' :: (Element Bitmap -> a -> a) -> a -> Bitmap -> a Source #
IndexedCollection Bitmap Source # |
Instance details Defined in Foundation.Array.Bitmap Methods (!) :: Bitmap -> Offset (Element Bitmap) -> Maybe (Element Bitmap) Source # findIndex :: (Element Bitmap -> Bool) -> Bitmap -> Maybe (Offset (Element Bitmap)) Source #
InnerFunctor Bitmap Source # |
Instance details Defined in Foundation.Array.Bitmap Methods imap :: (Element Bitmap -> Element Bitmap) -> Bitmap -> Bitmap Source #
Sequential Bitmap Source # |

Instance details

Defined in Foundation.Array.Bitmap

Methods

take :: CountOf (Element Bitmap) -> Bitmap -> Bitmap Source #

revTake :: CountOf (Element Bitmap) -> Bitmap -> Bitmap Source #

drop :: CountOf (Element Bitmap) -> Bitmap -> Bitmap Source #

revDrop :: CountOf (Element Bitmap) -> Bitmap -> Bitmap Source #

splitAt :: CountOf (Element Bitmap) -> Bitmap -> (Bitmap, Bitmap) Source #

revSplitAt :: CountOf (Element Bitmap) -> Bitmap -> (Bitmap, Bitmap) Source #

splitOn :: (Element Bitmap -> Bool) -> Bitmap -> [Bitmap] Source #

break :: (Element Bitmap -> Bool) -> Bitmap -> (Bitmap, Bitmap) Source #

breakEnd :: (Element Bitmap -> Bool) -> Bitmap -> (Bitmap, Bitmap) Source #

breakElem :: Element Bitmap -> Bitmap -> (Bitmap, Bitmap) Source #

takeWhile :: (Element Bitmap -> Bool) -> Bitmap -> Bitmap Source #

dropWhile :: (Element Bitmap -> Bool) -> Bitmap -> Bitmap Source #

intersperse :: Element Bitmap -> Bitmap -> Bitmap Source #

intercalate :: Element Bitmap -> Bitmap -> Element Bitmap Source #

span :: (Element Bitmap -> Bool) -> Bitmap -> (Bitmap, Bitmap) Source #

spanEnd :: (Element Bitmap -> Bool) -> Bitmap -> (Bitmap, Bitmap) Source #

filter :: (Element Bitmap -> Bool) -> Bitmap -> Bitmap Source #

partition :: (Element Bitmap -> Bool) -> Bitmap -> (Bitmap, Bitmap) Source #

reverse :: Bitmap -> Bitmap Source #

uncons :: Bitmap -> Maybe (Element Bitmap, Bitmap) Source #

unsnoc :: Bitmap -> Maybe (Bitmap, Element Bitmap) Source #

snoc :: Bitmap -> Element Bitmap -> Bitmap Source #

cons :: Element Bitmap -> Bitmap -> Bitmap Source #

find :: (Element Bitmap -> Bool) -> Bitmap -> Maybe (Element Bitmap) Source #

sortBy :: (Element Bitmap -> Element Bitmap -> Ordering) -> Bitmap -> Bitmap Source #

singleton :: Element Bitmap -> Bitmap Source #

head :: NonEmpty Bitmap -> Element Bitmap Source #

last :: NonEmpty Bitmap -> Element Bitmap Source #

tail :: NonEmpty Bitmap -> Bitmap Source #

init :: NonEmpty Bitmap -> Bitmap Source #

replicate :: CountOf (Element Bitmap) -> Element Bitmap -> Bitmap Source #

isPrefixOf :: Bitmap -> Bitmap -> Bool Source #

isSuffixOf :: Bitmap -> Bitmap -> Bool Source #

isInfixOf :: Bitmap -> Bitmap -> Bool Source #

stripPrefix :: Bitmap -> Bitmap -> Maybe Bitmap Source #

stripSuffix :: Bitmap -> Bitmap -> Maybe Bitmap Source #

Monoid Bitmap Source # |
Instance details Defined in Foundation.Array.Bitmap Methods mempty :: Bitmap Source # mappend :: Bitmap -> Bitmap -> Bitmap Source # mconcat :: [Bitmap] -> Bitmap Source #
Semigroup Bitmap Source # |
Instance details Defined in Foundation.Array.Bitmap Methods (<>) :: Bitmap -> Bitmap -> Bitmap Source # sconcat :: NonEmpty Bitmap -> Bitmap Source # stimes :: Integral b => b -> Bitmap -> Bitmap Source #
IsList Bitmap Source # |

Instance details

Defined in Foundation.Array.Bitmap

Associated Types

type Item Bitmap |
Instance details Defined in Foundation.Array.Bitmap type Item Bitmap = Bool

Methods

fromList :: [Item Bitmap] -> Bitmap Source #

fromListN :: Int -> [Item Bitmap] -> Bitmap Source #

toList :: Bitmap -> [Item Bitmap] Source #

Show Bitmap Source # |
Instance details Defined in Foundation.Array.Bitmap Methods showsPrec :: Int -> Bitmap -> ShowS Source # show :: Bitmap -> String Source # showList :: [Bitmap] -> ShowS Source #
Eq Bitmap Source # |
Instance details Defined in Foundation.Array.Bitmap Methods (==) :: Bitmap -> Bitmap -> Bool Source # (/=) :: Bitmap -> Bitmap -> Bool Source #
Ord Bitmap Source # |
Instance details Defined in Foundation.Array.Bitmap Methods compare :: Bitmap -> Bitmap -> Ordering Source # (<) :: Bitmap -> Bitmap -> Bool Source # (<=) :: Bitmap -> Bitmap -> Bool Source # (>) :: Bitmap -> Bitmap -> Bool Source # (>=) :: Bitmap -> Bitmap -> Bool Source # max :: Bitmap -> Bitmap -> Bitmap Source # min :: Bitmap -> Bitmap -> Bitmap Source #
type Element Bitmap Source # |
Instance details Defined in Foundation.Array.Bitmap type Element Bitmap = Bool
type Item Bitmap Source # |
Instance details Defined in Foundation.Array.Bitmap type Item Bitmap = Bool

data MutableBitmap st Source #

#### Instances

Instances details

MutableCollection MutableBitmap Source # |

Instance details

Defined in Foundation.Array.Bitmap

Associated Types

type MutableFreezed MutableBitmap |
Instance details Defined in Foundation.Array.Bitmap type MutableFreezed MutableBitmap = Bitmap
type MutableKey MutableBitmap |
Instance details Defined in Foundation.Array.Bitmap type MutableKey MutableBitmap = Offset Bool
type MutableValue MutableBitmap |
Instance details Defined in Foundation.Array.Bitmap type MutableValue MutableBitmap = Bool

Methods

unsafeThaw :: PrimMonad prim => MutableFreezed MutableBitmap -> prim (MutableBitmap (PrimState prim)) Source #

unsafeFreeze :: PrimMonad prim => MutableBitmap (PrimState prim) -> prim (MutableFreezed MutableBitmap) Source #

thaw :: PrimMonad prim => MutableFreezed MutableBitmap -> prim (MutableBitmap (PrimState prim)) Source #

freeze :: PrimMonad prim => MutableBitmap (PrimState prim) -> prim (MutableFreezed MutableBitmap) Source #

mutNew :: PrimMonad prim => CountOf (MutableValue MutableBitmap) -> prim (MutableBitmap (PrimState prim)) Source #

mutUnsafeWrite :: PrimMonad prim => MutableBitmap (PrimState prim) -> MutableKey MutableBitmap -> MutableValue MutableBitmap -> prim () Source #

mutWrite :: PrimMonad prim => MutableBitmap (PrimState prim) -> MutableKey MutableBitmap -> MutableValue MutableBitmap -> prim () Source #

mutUnsafeRead :: PrimMonad prim => MutableBitmap (PrimState prim) -> MutableKey MutableBitmap -> prim (MutableValue MutableBitmap) Source #

mutRead :: PrimMonad prim => MutableBitmap (PrimState prim) -> MutableKey MutableBitmap -> prim (MutableValue MutableBitmap) Source #

type MutableFreezed MutableBitmap Source # |
Instance details Defined in Foundation.Array.Bitmap type MutableFreezed MutableBitmap = Bitmap
type MutableKey MutableBitmap Source # |
Instance details Defined in Foundation.Array.Bitmap type MutableKey MutableBitmap = Offset Bool
type MutableValue MutableBitmap Source # |
Instance details Defined in Foundation.Array.Bitmap type MutableValue MutableBitmap = Bool

class Eq ty => PrimType ty Source #

Represent the accessor for types that can be stored in the UArray and MUArray.

Types need to be a instance of storable and have fixed sized.

Minimal complete definition

primSizeInBytes, primShiftToBytes, primBaUIndex, primMbaURead, primMbaUWrite, primAddrIndex, primAddrRead, primAddrWrite

#### Instances

Instances details

PrimType Char7 |

Instance details

Defined in Basement.PrimType

Associated Types

type PrimSize Char7 |
Instance details Defined in Basement.PrimType type PrimSize Char7 = 1

Methods

primSizeInBytes :: Proxy Char7 -> CountOf Word8 Source #

primShiftToBytes :: Proxy Char7 -> Int Source #

primBaUIndex :: ByteArray# -> Offset Char7 -> Char7 Source #

primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Char7 -> prim Char7 Source #

primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Char7 -> Char7 -> prim () Source #

primAddrIndex :: Addr# -> Offset Char7 -> Char7 Source #

primAddrRead :: PrimMonad prim => Addr# -> Offset Char7 -> prim Char7 Source #

primAddrWrite :: PrimMonad prim => Addr# -> Offset Char7 -> Char7 -> prim () Source #

PrimType Word128 |

Instance details

Defined in Basement.PrimType

Associated Types

type PrimSize Word128 |
Instance details Defined in Basement.PrimType type PrimSize Word128 = 16

Methods

primSizeInBytes :: Proxy Word128 -> CountOf Word8 Source #

primShiftToBytes :: Proxy Word128 -> Int Source #

primBaUIndex :: ByteArray# -> Offset Word128 -> Word128 Source #

primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Word128 -> prim Word128 Source #

primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Word128 -> Word128 -> prim () Source #

primAddrIndex :: Addr# -> Offset Word128 -> Word128 Source #

primAddrRead :: PrimMonad prim => Addr# -> Offset Word128 -> prim Word128 Source #

primAddrWrite :: PrimMonad prim => Addr# -> Offset Word128 -> Word128 -> prim () Source #

PrimType Word256 |

Instance details

Defined in Basement.PrimType

Associated Types

type PrimSize Word256 |
Instance details Defined in Basement.PrimType type PrimSize Word256 = 32

Methods

primSizeInBytes :: Proxy Word256 -> CountOf Word8 Source #

primShiftToBytes :: Proxy Word256 -> Int Source #

primBaUIndex :: ByteArray# -> Offset Word256 -> Word256 Source #

primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Word256 -> prim Word256 Source #

primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Word256 -> Word256 -> prim () Source #

primAddrIndex :: Addr# -> Offset Word256 -> Word256 Source #

primAddrRead :: PrimMonad prim => Addr# -> Offset Word256 -> prim Word256 Source #

primAddrWrite :: PrimMonad prim => Addr# -> Offset Word256 -> Word256 -> prim () Source #

PrimType NanoSeconds Source # |

Instance details

Defined in Foundation.Time.Types

Associated Types

type PrimSize NanoSeconds |
Instance details Defined in Foundation.Time.Types type PrimSize NanoSeconds = 8

Methods

primSizeInBytes :: Proxy NanoSeconds -> CountOf Word8 Source #

primShiftToBytes :: Proxy NanoSeconds -> Int Source #

primBaUIndex :: ByteArray# -> Offset NanoSeconds -> NanoSeconds Source #

primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset NanoSeconds -> prim NanoSeconds Source #

primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset NanoSeconds -> NanoSeconds -> prim () Source #

primAddrIndex :: Addr# -> Offset NanoSeconds -> NanoSeconds Source #

primAddrRead :: PrimMonad prim => Addr# -> Offset NanoSeconds -> prim NanoSeconds Source #

primAddrWrite :: PrimMonad prim => Addr# -> Offset NanoSeconds -> NanoSeconds -> prim () Source #

PrimType Seconds Source # |

Instance details

Defined in Foundation.Time.Types

Associated Types

type PrimSize Seconds |
Instance details Defined in Foundation.Time.Types type PrimSize Seconds = 8

Methods

primSizeInBytes :: Proxy Seconds -> CountOf Word8 Source #

primShiftToBytes :: Proxy Seconds -> Int Source #

primBaUIndex :: ByteArray# -> Offset Seconds -> Seconds Source #

primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Seconds -> prim Seconds Source #

primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Seconds -> Seconds -> prim () Source #

primAddrIndex :: Addr# -> Offset Seconds -> Seconds Source #

primAddrRead :: PrimMonad prim => Addr# -> Offset Seconds -> prim Seconds Source #

primAddrWrite :: PrimMonad prim => Addr# -> Offset Seconds -> Seconds -> prim () Source #

PrimType CChar |

Instance details

Defined in Basement.PrimType

Associated Types

type PrimSize CChar |
Instance details Defined in Basement.PrimType type PrimSize CChar = 1

Methods

primSizeInBytes :: Proxy CChar -> CountOf Word8 Source #

primShiftToBytes :: Proxy CChar -> Int Source #

primBaUIndex :: ByteArray# -> Offset CChar -> CChar Source #

primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset CChar -> prim CChar Source #

primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset CChar -> CChar -> prim () Source #

primAddrIndex :: Addr# -> Offset CChar -> CChar Source #

primAddrRead :: PrimMonad prim => Addr# -> Offset CChar -> prim CChar Source #

primAddrWrite :: PrimMonad prim => Addr# -> Offset CChar -> CChar -> prim () Source #

PrimType CUChar |

Instance details

Defined in Basement.PrimType

Associated Types

type PrimSize CUChar |
Instance details Defined in Basement.PrimType type PrimSize CUChar = 1

Methods

primSizeInBytes :: Proxy CUChar -> CountOf Word8 Source #

primShiftToBytes :: Proxy CUChar -> Int Source #

primBaUIndex :: ByteArray# -> Offset CUChar -> CUChar Source #

primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset CUChar -> prim CUChar Source #

primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset CUChar -> CUChar -> prim () Source #

primAddrIndex :: Addr# -> Offset CUChar -> CUChar Source #

primAddrRead :: PrimMonad prim => Addr# -> Offset CUChar -> prim CUChar Source #

primAddrWrite :: PrimMonad prim => Addr# -> Offset CUChar -> CUChar -> prim () Source #

PrimType Int16 |

Instance details

Defined in Basement.PrimType

Associated Types

type PrimSize Int16 |
Instance details Defined in Basement.PrimType type PrimSize Int16 = 2

Methods

primSizeInBytes :: Proxy Int16 -> CountOf Word8 Source #

primShiftToBytes :: Proxy Int16 -> Int Source #

primBaUIndex :: ByteArray# -> Offset Int16 -> Int16 Source #

primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Int16 -> prim Int16 Source #

primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Int16 -> Int16 -> prim () Source #

primAddrIndex :: Addr# -> Offset Int16 -> Int16 Source #

primAddrRead :: PrimMonad prim => Addr# -> Offset Int16 -> prim Int16 Source #

primAddrWrite :: PrimMonad prim => Addr# -> Offset Int16 -> Int16 -> prim () Source #

PrimType Int32 |

Instance details

Defined in Basement.PrimType

Associated Types

type PrimSize Int32 |
Instance details Defined in Basement.PrimType type PrimSize Int32 = 4

Methods

primSizeInBytes :: Proxy Int32 -> CountOf Word8 Source #

primShiftToBytes :: Proxy Int32 -> Int Source #

primBaUIndex :: ByteArray# -> Offset Int32 -> Int32 Source #

primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Int32 -> prim Int32 Source #

primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Int32 -> Int32 -> prim () Source #

primAddrIndex :: Addr# -> Offset Int32 -> Int32 Source #

primAddrRead :: PrimMonad prim => Addr# -> Offset Int32 -> prim Int32 Source #

primAddrWrite :: PrimMonad prim => Addr# -> Offset Int32 -> Int32 -> prim () Source #

PrimType Int64 |

Instance details

Defined in Basement.PrimType

Associated Types

type PrimSize Int64 |
Instance details Defined in Basement.PrimType type PrimSize Int64 = 8

Methods

primSizeInBytes :: Proxy Int64 -> CountOf Word8 Source #

primShiftToBytes :: Proxy Int64 -> Int Source #

primBaUIndex :: ByteArray# -> Offset Int64 -> Int64 Source #

primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Int64 -> prim Int64 Source #

primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Int64 -> Int64 -> prim () Source #

primAddrIndex :: Addr# -> Offset Int64 -> Int64 Source #

primAddrRead :: PrimMonad prim => Addr# -> Offset Int64 -> prim Int64 Source #

primAddrWrite :: PrimMonad prim => Addr# -> Offset Int64 -> Int64 -> prim () Source #

PrimType Int8 |

Instance details

Defined in Basement.PrimType

Associated Types

type PrimSize Int8 |
Instance details Defined in Basement.PrimType type PrimSize Int8 = 1

Methods

primSizeInBytes :: Proxy Int8 -> CountOf Word8 Source #

primShiftToBytes :: Proxy Int8 -> Int Source #

primBaUIndex :: ByteArray# -> Offset Int8 -> Int8 Source #

primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Int8 -> prim Int8 Source #

primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Int8 -> Int8 -> prim () Source #

primAddrIndex :: Addr# -> Offset Int8 -> Int8 Source #

primAddrRead :: PrimMonad prim => Addr# -> Offset Int8 -> prim Int8 Source #

primAddrWrite :: PrimMonad prim => Addr# -> Offset Int8 -> Int8 -> prim () Source #

PrimType Word16 |

Instance details

Defined in Basement.PrimType

Associated Types

type PrimSize Word16 |
Instance details Defined in Basement.PrimType type PrimSize Word16 = 2

Methods

primSizeInBytes :: Proxy Word16 -> CountOf Word8 Source #

primShiftToBytes :: Proxy Word16 -> Int Source #

primBaUIndex :: ByteArray# -> Offset Word16 -> Word16 Source #

primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Word16 -> prim Word16 Source #

primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Word16 -> Word16 -> prim () Source #

primAddrIndex :: Addr# -> Offset Word16 -> Word16 Source #

primAddrRead :: PrimMonad prim => Addr# -> Offset Word16 -> prim Word16 Source #

primAddrWrite :: PrimMonad prim => Addr# -> Offset Word16 -> Word16 -> prim () Source #

PrimType Word32 |

Instance details

Defined in Basement.PrimType

Associated Types

type PrimSize Word32 |
Instance details Defined in Basement.PrimType type PrimSize Word32 = 4

Methods

primSizeInBytes :: Proxy Word32 -> CountOf Word8 Source #

primShiftToBytes :: Proxy Word32 -> Int Source #

primBaUIndex :: ByteArray# -> Offset Word32 -> Word32 Source #

primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Word32 -> prim Word32 Source #

primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Word32 -> Word32 -> prim () Source #

primAddrIndex :: Addr# -> Offset Word32 -> Word32 Source #

primAddrRead :: PrimMonad prim => Addr# -> Offset Word32 -> prim Word32 Source #

primAddrWrite :: PrimMonad prim => Addr# -> Offset Word32 -> Word32 -> prim () Source #

PrimType Word64 |

Instance details

Defined in Basement.PrimType

Associated Types

type PrimSize Word64 |
Instance details Defined in Basement.PrimType type PrimSize Word64 = 8

Methods

primSizeInBytes :: Proxy Word64 -> CountOf Word8 Source #

primShiftToBytes :: Proxy Word64 -> Int Source #

primBaUIndex :: ByteArray# -> Offset Word64 -> Word64 Source #

primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Word64 -> prim Word64 Source #

primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Word64 -> Word64 -> prim () Source #

primAddrIndex :: Addr# -> Offset Word64 -> Word64 Source #

primAddrRead :: PrimMonad prim => Addr# -> Offset Word64 -> prim Word64 Source #

primAddrWrite :: PrimMonad prim => Addr# -> Offset Word64 -> Word64 -> prim () Source #

PrimType Word8 |

Instance details

Defined in Basement.PrimType

Associated Types

type PrimSize Word8 |
Instance details Defined in Basement.PrimType type PrimSize Word8 = 1

Methods

primSizeInBytes :: Proxy Word8 -> CountOf Word8 Source #

primShiftToBytes :: Proxy Word8 -> Int Source #

primBaUIndex :: ByteArray# -> Offset Word8 -> Word8 Source #

primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Word8 -> prim Word8 Source #

primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Word8 -> Word8 -> prim () Source #

primAddrIndex :: Addr# -> Offset Word8 -> Word8 Source #

primAddrRead :: PrimMonad prim => Addr# -> Offset Word8 -> prim Word8 Source #

primAddrWrite :: PrimMonad prim => Addr# -> Offset Word8 -> Word8 -> prim () Source #

PrimType Char |

Instance details

Defined in Basement.PrimType

Associated Types

type PrimSize Char |
Instance details Defined in Basement.PrimType type PrimSize Char = 4

Methods

primSizeInBytes :: Proxy Char -> CountOf Word8 Source #

primShiftToBytes :: Proxy Char -> Int Source #

primBaUIndex :: ByteArray# -> Offset Char -> Char Source #

primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Char -> prim Char Source #

primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Char -> Char -> prim () Source #

primAddrIndex :: Addr# -> Offset Char -> Char Source #

primAddrRead :: PrimMonad prim => Addr# -> Offset Char -> prim Char Source #

primAddrWrite :: PrimMonad prim => Addr# -> Offset Char -> Char -> prim () Source #

PrimType Double |

Instance details

Defined in Basement.PrimType

Associated Types

type PrimSize Double |
Instance details Defined in Basement.PrimType type PrimSize Double = 8

Methods

primSizeInBytes :: Proxy Double -> CountOf Word8 Source #

primShiftToBytes :: Proxy Double -> Int Source #

primBaUIndex :: ByteArray# -> Offset Double -> Double Source #

primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Double -> prim Double Source #

primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Double -> Double -> prim () Source #

primAddrIndex :: Addr# -> Offset Double -> Double Source #

primAddrRead :: PrimMonad prim => Addr# -> Offset Double -> prim Double Source #

primAddrWrite :: PrimMonad prim => Addr# -> Offset Double -> Double -> prim () Source #

PrimType Float |

Instance details

Defined in Basement.PrimType

Associated Types

type PrimSize Float |
Instance details Defined in Basement.PrimType type PrimSize Float = 4

Methods

primSizeInBytes :: Proxy Float -> CountOf Word8 Source #

primShiftToBytes :: Proxy Float -> Int Source #

primBaUIndex :: ByteArray# -> Offset Float -> Float Source #

primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Float -> prim Float Source #

primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Float -> Float -> prim () Source #

primAddrIndex :: Addr# -> Offset Float -> Float Source #

primAddrRead :: PrimMonad prim => Addr# -> Offset Float -> prim Float Source #

primAddrWrite :: PrimMonad prim => Addr# -> Offset Float -> Float -> prim () Source #

PrimType Int |

Instance details

Defined in Basement.PrimType

Associated Types

type PrimSize Int |
Instance details Defined in Basement.PrimType type PrimSize Int = 8

Methods

primSizeInBytes :: Proxy Int -> CountOf Word8 Source #

primShiftToBytes :: Proxy Int -> Int Source #

primBaUIndex :: ByteArray# -> Offset Int -> Int Source #

primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Int -> prim Int Source #

primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Int -> Int -> prim () Source #

primAddrIndex :: Addr# -> Offset Int -> Int Source #

primAddrRead :: PrimMonad prim => Addr# -> Offset Int -> prim Int Source #

primAddrWrite :: PrimMonad prim => Addr# -> Offset Int -> Int -> prim () Source #

PrimType Word |

Instance details

Defined in Basement.PrimType

Associated Types

type PrimSize Word |
Instance details Defined in Basement.PrimType type PrimSize Word = 8

Methods

primSizeInBytes :: Proxy Word -> CountOf Word8 Source #

primShiftToBytes :: Proxy Word -> Int Source #

primBaUIndex :: ByteArray# -> Offset Word -> Word Source #

primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Word -> prim Word Source #

primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Word -> Word -> prim () Source #

primAddrIndex :: Addr# -> Offset Word -> Word Source #

primAddrRead :: PrimMonad prim => Addr# -> Offset Word -> prim Word Source #

primAddrWrite :: PrimMonad prim => Addr# -> Offset Word -> Word -> prim () Source #

PrimType a => PrimType (BE a) |

Instance details

Defined in Basement.PrimType

Associated Types

type PrimSize (BE a) |
Instance details Defined in Basement.PrimType type PrimSize (BE a) = PrimSize a

Methods

primSizeInBytes :: Proxy (BE a) -> CountOf Word8 Source #

primShiftToBytes :: Proxy (BE a) -> Int Source #

primBaUIndex :: ByteArray# -> Offset (BE a) -> BE a Source #

primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset (BE a) -> prim (BE a) Source #

primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset (BE a) -> BE a -> prim () Source #

primAddrIndex :: Addr# -> Offset (BE a) -> BE a Source #

primAddrRead :: PrimMonad prim => Addr# -> Offset (BE a) -> prim (BE a) Source #

primAddrWrite :: PrimMonad prim => Addr# -> Offset (BE a) -> BE a -> prim () Source #

PrimType a => PrimType (LE a) |

Instance details

Defined in Basement.PrimType

Associated Types

type PrimSize (LE a) |
Instance details Defined in Basement.PrimType type PrimSize (LE a) = PrimSize a

Methods

primSizeInBytes :: Proxy (LE a) -> CountOf Word8 Source #

primShiftToBytes :: Proxy (LE a) -> Int Source #

primBaUIndex :: ByteArray# -> Offset (LE a) -> LE a Source #

primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset (LE a) -> prim (LE a) Source #

primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset (LE a) -> LE a -> prim () Source #

primAddrIndex :: Addr# -> Offset (LE a) -> LE a Source #

primAddrRead :: PrimMonad prim => Addr# -> Offset (LE a) -> prim (LE a) Source #

primAddrWrite :: PrimMonad prim => Addr# -> Offset (LE a) -> LE a -> prim () Source #

data OutOfBound Source #

Exception during an operation accessing the vector out of bound

Represent the type of operation, the index accessed, and the total length of the vector.

#### Instances

Instances details

Exception OutOfBound |
Instance details Defined in Basement.Exception Methods toException :: OutOfBound -> SomeException Source # fromException :: SomeException -> Maybe OutOfBound Source # displayException :: OutOfBound -> String Source # backtraceDesired :: OutOfBound -> Bool Source #
Show OutOfBound |
Instance details Defined in Basement.Exception Methods showsPrec :: Int -> OutOfBound -> ShowS Source # show :: OutOfBound -> String Source # showList :: [OutOfBound] -> ShowS Source #