Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data SmallArray a = SmallArray (SmallArray# a)
- data SmallMutableArray s a = SmallMutableArray (SmallMutableArray# s a)
- newSmallArray :: (HasCallStack, PrimMonad m) => Int -> a -> m (SmallMutableArray (PrimState m) a)
- readSmallArray :: (HasCallStack, PrimMonad m) => SmallMutableArray (PrimState m) a -> Int -> m a
- writeSmallArray :: (HasCallStack, PrimMonad m) => SmallMutableArray (PrimState m) a -> Int -> a -> m ()
- indexSmallArray :: HasCallStack => SmallArray a -> Int -> a
- indexSmallArray## :: HasCallStack => SmallArray a -> Int -> (#a#)
- indexSmallArrayM :: (HasCallStack, Monad m) => SmallArray a -> Int -> m a
- freezeSmallArray :: (HasCallStack, PrimMonad m) => SmallMutableArray (PrimState m) a -> Int -> Int -> m (SmallArray a)
- thawSmallArray :: (HasCallStack, PrimMonad m) => SmallArray a -> Int -> Int -> m (SmallMutableArray (PrimState m) a)
- unsafeFreezeSmallArray :: PrimMonad m => SmallMutableArray (PrimState m) a -> m (SmallArray a)
- unsafeThawSmallArray :: PrimMonad m => SmallArray a -> m (SmallMutableArray (PrimState m) a)
- copySmallArray :: (HasCallStack, PrimMonad m) => SmallMutableArray (PrimState m) a -> Int -> SmallArray a -> Int -> Int -> m ()
- copySmallMutableArray :: (HasCallStack, PrimMonad m) => SmallMutableArray (PrimState m) a -> Int -> SmallMutableArray (PrimState m) a -> Int -> Int -> m ()
- cloneSmallArray :: HasCallStack => SmallArray a -> Int -> Int -> SmallArray a
- cloneSmallMutableArray :: (HasCallStack, PrimMonad m) => SmallMutableArray (PrimState m) a -> Int -> Int -> m (SmallMutableArray (PrimState m) a)
- sizeofSmallArray :: SmallArray a -> Int
- sizeofSmallMutableArray :: SmallMutableArray s a -> Int
Documentation
data SmallArray a #
Instances
data SmallMutableArray s a #
Instances
Eq (SmallMutableArray s a) | |
Defined in Data.Primitive.SmallArray (==) :: SmallMutableArray s a -> SmallMutableArray s a -> Bool # (/=) :: SmallMutableArray s a -> SmallMutableArray s a -> Bool # | |
(Typeable s, Typeable a) => Data (SmallMutableArray s a) | |
Defined in Data.Primitive.SmallArray gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SmallMutableArray s a -> c (SmallMutableArray s a) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (SmallMutableArray s a) # toConstr :: SmallMutableArray s a -> Constr # dataTypeOf :: SmallMutableArray s a -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (SmallMutableArray s a)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (SmallMutableArray s a)) # gmapT :: (forall b. Data b => b -> b) -> SmallMutableArray s a -> SmallMutableArray s a # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SmallMutableArray s a -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SmallMutableArray s a -> r # gmapQ :: (forall d. Data d => d -> u) -> SmallMutableArray s a -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> SmallMutableArray s a -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> SmallMutableArray s a -> m (SmallMutableArray s a) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SmallMutableArray s a -> m (SmallMutableArray s a) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SmallMutableArray s a -> m (SmallMutableArray s a) # | |
PrimUnlifted (SmallMutableArray s a) | |
Defined in Data.Primitive.UnliftedArray toArrayArray# :: SmallMutableArray s a -> ArrayArray# # fromArrayArray# :: ArrayArray# -> SmallMutableArray s a # |
newSmallArray :: (HasCallStack, PrimMonad m) => Int -> a -> m (SmallMutableArray (PrimState m) a) Source #
readSmallArray :: (HasCallStack, PrimMonad m) => SmallMutableArray (PrimState m) a -> Int -> m a Source #
writeSmallArray :: (HasCallStack, PrimMonad m) => SmallMutableArray (PrimState m) a -> Int -> a -> m () Source #
indexSmallArray :: HasCallStack => SmallArray a -> Int -> a Source #
indexSmallArray## :: HasCallStack => SmallArray a -> Int -> (#a#) Source #
indexSmallArrayM :: (HasCallStack, Monad m) => SmallArray a -> Int -> m a Source #
:: (HasCallStack, PrimMonad m) | |
=> SmallMutableArray (PrimState m) a | source |
-> Int | offset |
-> Int | length |
-> m (SmallArray a) |
:: (HasCallStack, PrimMonad m) | |
=> SmallArray a | source |
-> Int | offset |
-> Int | length |
-> m (SmallMutableArray (PrimState m) a) |
unsafeFreezeSmallArray :: PrimMonad m => SmallMutableArray (PrimState m) a -> m (SmallArray a) #
Render a mutable array immutable.
This operation performs no copying, so care must be taken not to modify the input array after freezing.
unsafeThawSmallArray :: PrimMonad m => SmallArray a -> m (SmallMutableArray (PrimState m) a) #
Render an immutable array mutable.
This operation performs no copying, so care must be taken with its use.
:: (HasCallStack, PrimMonad m) | |
=> SmallMutableArray (PrimState m) a | destination array |
-> Int | offset into destination array |
-> SmallArray a | source array |
-> Int | offset into source array |
-> Int | number of elements to copy |
-> m () |
copySmallMutableArray Source #
:: (HasCallStack, PrimMonad m) | |
=> SmallMutableArray (PrimState m) a | destination array |
-> Int | offset into destination array |
-> SmallMutableArray (PrimState m) a | source array |
-> Int | offset into source array |
-> Int | number of elements to copy |
-> m () |
:: HasCallStack | |
=> SmallArray a | source array |
-> Int | offset into destination array |
-> Int | number of elements to copy |
-> SmallArray a |
cloneSmallMutableArray Source #
:: (HasCallStack, PrimMonad m) | |
=> SmallMutableArray (PrimState m) a | source array |
-> Int | offset into destination array |
-> Int | number of elements to copy |
-> m (SmallMutableArray (PrimState m) a) |
sizeofSmallArray :: SmallArray a -> Int #
sizeofSmallMutableArray :: SmallMutableArray s a -> Int #