Passing a matrix from C to Haskell

Simon Marlow simonmar at
Wed Feb 8 12:10:21 EST 2006

Cyril Schmidt wrote:
> 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.

Yes, it's new since 6.4.x.  It will be in 6.6.


More information about the Glasgow-haskell-users mailing list