The array type
Constructors
StorableArray !i !i Int !(ForeignPtr e)
Instances1MArray
Storable e => MArray StorableArray e IODefined in array-0.5.8.0 · Data.Array.Storable.Internals
:: a typeCtrl KGHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27
Modulearray-0.5.8.0Haskell2010
Actual implementation of Data.Array.Storable.
This module is considered internal.
The Package Versioning Policy does not apply.
The contents of this module may change in any way whatsoever and without any warning between minor versions of this package.
Authors importing this module are expected to track development closely.
The array type
StorableArray !i !i Int !(ForeignPtr e)Storable e => MArray StorableArray e IODefined in array-0.5.8.0 · Data.Array.Storable.InternalsThe pointer to the array contents is obtained by withStorableArray. The idea is similar to ForeignPtr (used internally here). The pointer should be used only during execution of the IO action retured by the function passed as argument to withStorableArray.
If you want to use it afterwards, ensure that you touchStorableArray after the last use of the pointer, so the array is not freed too early.
Construct a StorableArray from an arbitrary ForeignPtr. It is the caller's responsibility to ensure that the ForeignPtr points to an area of memory sufficient for the specified bounds.