Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- newEmptySmallArray :: PrimMonad m => Int -> m (SmallMutableArray (PrimState m) a)
- list :: [a] -> SmallArray a
- unset :: Int -> SmallArray a -> SmallArray a
- set :: Int -> a -> SmallArray a -> SmallArray a
- insert :: Int -> a -> SmallArray a -> SmallArray a
- adjust :: (a -> a) -> Int -> SmallArray a -> SmallArray a
- unsafeAdjust :: (a -> a) -> Int -> SmallArray a -> SmallArray a
- unsafeAdjustWithSize :: (a -> a) -> Int -> Int -> SmallArray a -> SmallArray a
- cons :: a -> SmallArray a -> SmallArray a
- orderedPair :: Int -> e -> Int -> e -> SmallArray e
- findAndReplace :: (a -> Maybe a) -> SmallArray a -> SmallArray a
- findAndMap :: (a -> Maybe b) -> SmallArray a -> Maybe b
- find :: (a -> Bool) -> SmallArray a -> Maybe a
- findWithIndex :: (a -> Bool) -> SmallArray a -> Maybe (Int, a)
- elementsUnfoldlM :: forall (m :: Type -> Type) e. Monad m => SmallArray e -> UnfoldlM m e
- elementsListT :: forall (m :: Type -> Type) a. Monad m => SmallArray a -> ListT m a
- onFoundElementFocus :: forall (m :: Type -> Type) a b. Monad m => (a -> Bool) -> (a -> Bool) -> Focus a m b -> Focus (SmallArray a) m b
- focusOnFoundElement :: Monad m => Focus a m b -> (a -> Bool) -> (a -> Bool) -> SmallArray a -> m (b, SmallArray a)
- toList :: SmallArray a -> [a]
Documentation
newEmptySmallArray :: PrimMonad m => Int -> m (SmallMutableArray (PrimState m) a) Source #
A workaround for the weird forcing of undefined
values int newSmallArray
list :: [a] -> SmallArray a Source #
unset :: Int -> SmallArray a -> SmallArray a Source #
Remove an element.
set :: Int -> a -> SmallArray a -> SmallArray a Source #
insert :: Int -> a -> SmallArray a -> SmallArray a Source #
adjust :: (a -> a) -> Int -> SmallArray a -> SmallArray a Source #
unsafeAdjust :: (a -> a) -> Int -> SmallArray a -> SmallArray a Source #
unsafeAdjustWithSize :: (a -> a) -> Int -> Int -> SmallArray a -> SmallArray a Source #
cons :: a -> SmallArray a -> SmallArray a Source #
orderedPair :: Int -> e -> Int -> e -> SmallArray e Source #
findAndReplace :: (a -> Maybe a) -> SmallArray a -> SmallArray a Source #
findAndMap :: (a -> Maybe b) -> SmallArray a -> Maybe b Source #
findWithIndex :: (a -> Bool) -> SmallArray a -> Maybe (Int, a) Source #
elementsUnfoldlM :: forall (m :: Type -> Type) e. Monad m => SmallArray e -> UnfoldlM m e Source #
elementsListT :: forall (m :: Type -> Type) a. Monad m => SmallArray a -> ListT m a Source #
onFoundElementFocus :: forall (m :: Type -> Type) a b. Monad m => (a -> Bool) -> (a -> Bool) -> Focus a m b -> Focus (SmallArray a) m b Source #
focusOnFoundElement :: Monad m => Focus a m b -> (a -> Bool) -> (a -> Bool) -> SmallArray a -> m (b, SmallArray a) Source #
toList :: SmallArray a -> [a] Source #