Re: [Haskell-cafe] Consequences of implementing a library in Haskell for C consumption?

2008-09-05 Thread David Roundy
On Thu, Sep 04, 2008 at 08:04:25PM -0500, Austin Seipp wrote: Excerpts from Justin Bailey's message of Thu Sep 04 17:00:58 -0500 2008: Looking at the package, I think would be pretty painful though. It seems I'd have to build the AST by hand, The AST Language.C defines for C is actually

[Haskell-cafe] Consequences of implementing a library in Haskell for C consumption?

2008-09-04 Thread Justin Bailey
I am thinking of writing a simple library in Haskell which would be useful in a number of different scenarios, and not always with programs written in Haskell. That makes me think the library should be C-compatible and able to link with C programs. Reading over chapter 9 of the GHC manual (Foreign

Re: [Haskell-cafe] Consequences of implementing a library in Haskell for C consumption?

2008-09-04 Thread Don Stewart
jgbailey: I am thinking of writing a simple library in Haskell which would be useful in a number of different scenarios, and not always with programs written in Haskell. That makes me think the library should be C-compatible and able to link with C programs. Reading over chapter 9 of the GHC

Re: [Haskell-cafe] Consequences of implementing a library in Haskell for C consumption?

2008-09-04 Thread Justin Bailey
On Thu, Sep 4, 2008 at 2:52 PM, Philippa Cowderoy [EMAIL PROTECTED] wrote: Would writing Haskell to generate the C via Language.C be an option? Effectively you'd be using Haskell as a typeful macro system. Interesting idea, and I've done similar things with haskelldb (generating SQL queries).

Re: [Haskell-cafe] Consequences of implementing a library in Haskell for C consumption?

2008-09-04 Thread Brandon S. Allbery KF8NH
On 2008 Sep 4, at 18:00, Justin Bailey wrote: On Thu, Sep 4, 2008 at 2:52 PM, Philippa Cowderoy [EMAIL PROTECTED] wrote: Would writing Haskell to generate the C via Language.C be an option? Effectively you'd be using Haskell as a typeful macro system. Interesting idea, and I've done similar

Re: [Haskell-cafe] Consequences of implementing a library in Haskell for C consumption?

2008-09-04 Thread Austin Seipp
Excerpts from Justin Bailey's message of Thu Sep 04 17:00:58 -0500 2008: Looking at the package, I think would be pretty painful though. It seems I'd have to build the AST by hand, The AST Language.C defines for C is actually fairly regular once you wrap your head around it - I got it to