Passing a matrix from C to Haskell
cschmidt at deds.nl
Wed Feb 8 11:33:31 EST 2006
Simon Marlow wrote:
> Bulat Ziganshin wrote:
>> i think we should define "secret door" to construct StorableArray from
>> a pointer to allow to use full power of MArray interface on foreign
> You mean this?
> -- |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.
> :: ForeignPtr e -> (i,i) -> IO (StorableArray i e)
It looks like this function is not available in GHC 6.4.1 (see
It is, however, documented at
but I don't know which version of GHC it applies to.
More information about the Glasgow-haskell-users