primitive-maybe-0.1.0: Arrays of Maybes

Safe HaskellNone
LanguageHaskell2010

Data.Primitive.SmallArray.Maybe

Description

This provides an interface to working with boxed arrays with elements of type Maybe a. That is:

SmallMaybeArray a ≅ SmallArray (Maybe a)

However, this type provided by this module is more efficient than its naive SmallArray counterpart. It consumes less memory and has fewer heap indirections.

Synopsis

Documentation

sequenceSmallMaybeArray :: SmallMaybeArray a -> Maybe (SmallArray a) Source #

This is like calling sequence on a SmallArray. However, in the event that all the values are Just, it does not need to allocate a new array since the array backing the SmallMaybeArray can be reused.