← Package details

array0.5.8.0

Verified build. The service reproduced this documentation.

Target: Linux on x86-64. Some inferred types, re-exported declarations, and resolved links are not available.

Data.Array.Storable.Internals

Maintainer : libraries@haskell.org Stability : experimental Portability : non-portable (uses Data.Array.MArray)

Actual implementation of Data.Array.Storable.

WARNING

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.

StorableArraydata

StorableArray i e

The array type

StorableArrayconstructor

i -> i -> Int -> (ForeignPtr e) -> StorableArray i e

withStorableArrayfunction

StorableArray i e -> (Ptr e -> IO a) -> IO a

The 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.

touchStorableArrayfunction

StorableArray i e -> IO ()

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.

unsafeForeignPtrToStorableArrayfunction

Ix i => ForeignPtr e -> (i, i) -> IO (StorableArray i e)

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.

Instances

Storable e => MArray StorableArray e IO
Build record and source files

Generator: aihc-haddock-7b0c8493-web-1

Metadata snapshot: 10bf2eab3c8818e91375122614fd52da6b643c8772e4ede6e094d3ea680122b7

Open the dependency plan · Download the documentation model

Import a package

Enter a package name and an exact version from Hackage. The site contains imported versions only.