Re: [Haskell-cafe] modeling ANSI C structs in Haskell?

2008-02-04 Thread Peter Gammie

Vasili,

On 04/02/2008, at 10:04 PM, Galchin Vasili wrote:

  I am reading through the FFI doc. Any suggestions on enabling  
Haskell programmers to model ANSI C structs that will be passed down  
to C run-time?


The FFI spec is a wonderful document, but is of limited use in  
learning to use the FFI for practical tasks. I suggest you look into  
c2hs or some other tool that tries to help you with marshalling data  
structures (as compared to providing mechanisms sufficient for doing  
marshalling).


I suggest you do this even if you don't end up using a tool, as the  
generated Haskell has some carefully designed idioms that will  
definitely help.


cheers
peter
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] modeling ANSI C structs in Haskell?

2008-02-04 Thread Magnus Therning
On 2/4/08, Galchin Vasili [EMAIL PROTECTED] wrote:

 Hello,

   I am reading through the FFI doc. Any suggestions on enabling
 Haskell programmers to model ANSI C structs that will be passed down to C
 run-time?


Maybe this could offer some help http://therning.org/magnus/archives/315

/M
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] modeling ANSI C structs in Haskell?

2008-02-04 Thread Galchin Vasili
Hello,

  I am reading through the FFI doc. Any suggestions on enabling Haskell
programmers to model ANSI C structs that will be passed down to C run-time?

Vasili
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe