[Haskell-cafe] Troubles with FFI
Bulat Ziganshin
bulat.ziganshin at gmail.com
Mon May 15 07:20:03 EDT 2006
Hello Donald,
Saturday, May 13, 2006, 11:47:34 AM, you wrote:
> * Visit haskell.org
> * Click on "Books and tutorials"
> * Scroll to "Using Monads"
> * First entry in the list is this paper.
but novices don't know what monads is a Haskell way to do I/O and
interface with C!
>> It was certainly dismaying to see that even the simplest IO requires
>> at least a minimal understanding of monads,
i think that most of Haskell programmers don't know anything about
monads except that they helps in doing I/O and other funny things :)
>> the automated ones, seemed to handle the case of passing numerical
>> arrays to C, and having them get updated and passed back. That is my
>> primary interest in the FFI and yet no obvious solution or example
>> could be found after days of internet searching and pouring over
>> tutorials etc.
> Regarding arrays, generally you'd use a Foreign array, allocate it on
> the C side, and access it via a Foreign Ptr, no marshalling.
it's named StorableArray
--
Best regards,
Bulat mailto:Bulat.Ziganshin at gmail.com
More information about the Haskell-Cafe
mailing list