Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data SmallArray a = SmallArray (SmallArray# a)
- data SmallMutableArray s a = SmallMutableArray (SmallMutableArray# s a)
- newSmallArray :: (DebugCallStack, PrimMonad m) => Int -> a -> m (SmallMutableArray (PrimState m) a)
- runSmallArray :: (forall s. ST s (SmallMutableArray s a)) -> SmallArray a
- unsafeFreezeSmallArray :: PrimMonad m => SmallMutableArray (PrimState m) a -> m (SmallArray a)
- unsafeThawSmallArray :: PrimMonad m => SmallArray a -> m (SmallMutableArray (PrimState m) a)
- sizeofSmallArray :: DebugCallStack => SmallArray a -> Int
- sizeofSmallMutableArray :: DebugCallStack => SmallMutableArray s a -> Int
- indexSmallArray :: DebugCallStack => SmallArray a -> Int -> (# a #)
- readSmallArray :: (DebugCallStack, PrimMonad m) => SmallMutableArray (PrimState m) a -> Int -> m a
- writeSmallArray :: (DebugCallStack, PrimMonad m) => SmallMutableArray (PrimState m) a -> Int -> a -> m ()
- copySmallArray :: (DebugCallStack, PrimMonad m) => SmallMutableArray (PrimState m) a -> Int -> SmallArray a -> Int -> Int -> m ()
- cloneSmallArray :: DebugCallStack => SmallArray a -> Int -> Int -> SmallArray a
- copySmallMutableArray :: (DebugCallStack, PrimMonad m) => SmallMutableArray (PrimState m) a -> Int -> SmallMutableArray (PrimState m) a -> Int -> Int -> m ()
- cloneSmallMutableArray :: (DebugCallStack, PrimMonad m) => SmallMutableArray (PrimState m) a -> Int -> Int -> m (SmallMutableArray (PrimState m) a)
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 :: forall r r'. (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) # |
newSmallArray :: (DebugCallStack, PrimMonad m) => Int -> a -> m (SmallMutableArray (PrimState m) a) Source #
runSmallArray :: (forall s. ST s (SmallMutableArray s a)) -> SmallArray 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.
sizeofSmallArray :: DebugCallStack => SmallArray a -> Int Source #
sizeofSmallMutableArray :: DebugCallStack => SmallMutableArray s a -> Int Source #
indexSmallArray :: DebugCallStack => SmallArray a -> Int -> (# a #) Source #
readSmallArray :: (DebugCallStack, PrimMonad m) => SmallMutableArray (PrimState m) a -> Int -> m a Source #
writeSmallArray :: (DebugCallStack, PrimMonad m) => SmallMutableArray (PrimState m) a -> Int -> a -> m () Source #
copySmallArray :: (DebugCallStack, PrimMonad m) => SmallMutableArray (PrimState m) a -> Int -> SmallArray a -> Int -> Int -> m () Source #
cloneSmallArray :: DebugCallStack => SmallArray a -> Int -> Int -> SmallArray a Source #
copySmallMutableArray :: (DebugCallStack, PrimMonad m) => SmallMutableArray (PrimState m) a -> Int -> SmallMutableArray (PrimState m) a -> Int -> Int -> m () Source #
cloneSmallMutableArray :: (DebugCallStack, PrimMonad m) => SmallMutableArray (PrimState m) a -> Int -> Int -> m (SmallMutableArray (PrimState m) a) Source #