-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Please see the README on GitHub
@package contiguous-checked
@version 0.3.0.0
module Data.Primitive.Contiguous
-- | A contiguous array of elements.
class Contiguous (arr :: Type -> Type)
-- | A typeclass that is satisfied by all types. This is used used to
-- provide a fake constraint for Array and SmallArray.
class Always a
empty :: Contiguous arr => arr a
null :: Contiguous arr => arr b -> Bool
replicateM :: (Contiguous arr, PrimMonad m, Element arr b) => Int -> b -> m Mutable arr PrimState m b
rnf :: (Contiguous arr, NFData a, Element arr a) => arr a -> ()
new :: (HasCallStack, Contiguous arr, Element arr b, PrimMonad m) => Int -> m (Mutable arr (PrimState m) b)
index :: (HasCallStack, Contiguous arr, Element arr b) => arr b -> Int -> b
index# :: (HasCallStack, Contiguous arr, Element arr b) => arr b -> Int -> (# b #)
indexM :: (HasCallStack, Contiguous arr, Element arr b, Monad m) => arr b -> Int -> m b
read :: (HasCallStack, Contiguous arr, Element arr b, PrimMonad m) => Mutable arr (PrimState m) b -> Int -> m b
write :: (HasCallStack, Contiguous arr, Element arr b, PrimMonad m) => Mutable arr (PrimState m) b -> Int -> b -> m ()
resize :: (HasCallStack, Contiguous arr, Element arr b, PrimMonad m) => Mutable arr (PrimState m) b -> Int -> m (Mutable arr (PrimState m) b)
size :: (Contiguous arr, Element arr b) => arr b -> Int
sizeMutable :: (Contiguous arr, PrimMonad m, Element arr b) => Mutable arr PrimState m b -> m Int
unsafeFreeze :: (Contiguous arr, PrimMonad m) => Mutable arr PrimState m b -> m arr b
copy :: (HasCallStack, Contiguous arr, Element arr b, PrimMonad m) => Mutable arr (PrimState m) b -> Int -> arr b -> Int -> Int -> m ()
copyMutable :: (HasCallStack, Contiguous arr, Element arr b, PrimMonad m) => Mutable arr (PrimState m) b -> Int -> Mutable arr (PrimState m) b -> Int -> Int -> m ()
clone :: (HasCallStack, Contiguous arr, Element arr b) => arr b -> Int -> Int -> arr b
cloneMutable :: (HasCallStack, Contiguous arr, Element arr b, PrimMonad m) => Mutable arr (PrimState m) b -> Int -> Int -> m (Mutable arr (PrimState m) b)
equals :: (Contiguous arr, Element arr b, Eq b) => arr b -> arr b -> Bool
unlift :: Contiguous arr => arr b -> ArrayArray#
lift :: Contiguous arr => ArrayArray# -> arr b
-- | Map over the elements of an array.
map :: (Contiguous arr1, Element arr1 b, Contiguous arr2, Element arr2 c) => b -> c -> arr1 b -> arr2 c
-- | Right fold over the element of an array.
foldr :: (Contiguous arr, Element arr a) => a -> b -> b -> b -> arr a -> b
-- | Strict left fold over the elements of an array.
foldl' :: (Contiguous arr, Element arr a) => b -> a -> b -> b -> arr a -> b
-- | Strict right fold over the elements of an array.
foldr' :: (Contiguous arr, Element arr a) => a -> b -> b -> b -> arr a -> b
-- | Monoidal fold over the element of an array.
foldMap :: (Contiguous arr, Element arr a, Monoid m) => a -> m -> arr a -> m
-- | Strict monoidal fold over the elements of an array.
foldMap' :: (Contiguous arr, Element arr a, Monoid m) => a -> m -> arr a -> m
-- | Strict left monadic fold over the elements of an array.
foldlM' :: (Contiguous arr, Element arr a, Monad m) => b -> a -> m b -> b -> arr a -> m b
traverse_ :: (Contiguous arr, Element arr a, Applicative f) => a -> f b -> arr a -> f ()
itraverse_ :: (Contiguous arr, Element arr a, Applicative f) => Int -> a -> f b -> arr a -> f ()
unsafeFromListN :: (Contiguous arr, Element arr a) => Int -> [a] -> arr a
unsafeFromListReverseN :: (Contiguous arr, Element arr a) => Int -> [a] -> arr a
liftHashWithSalt :: (Contiguous arr, Element arr a) => Int -> a -> Int -> Int -> arr a -> Int
-- | This function does not behave deterministically. Optimization level
-- and inlining can affect its results. However, the one thing that can
-- be counted on is that if it returns True, the two immutable
-- arrays are definitely the same. This is useful as shortcut for
-- equality tests. However, keep in mind that a result of False
-- tells us nothing about the arguments.
same :: Contiguous arr => arr a -> arr a -> Bool