RE: [Haskell-cafe] compilation to C, not via-C

2009-04-25 Thread Sam Martin
From: Ryan Ingram [mailto:ryani.s...@gmail.com] Sent: 24 April 2009 18:14 To: Sam Martin Cc: haskell-cafe@haskell.org Subject: Re: [Haskell-cafe] compilation to C, not via-C Sam, I work on graphics engine/pipeline for Spore at Electronic Arts, and I've had some similar thoughts as you.

Re: [Haskell-cafe] compilation to C, not via-C

2009-04-24 Thread wren ng thornton
Sam Martin wrote: In short, I'd like to use Haskell as a code-generator. I can't see that this would be unachievable, particularly given it's generating C already. Have I missed something? For the case of GHC at least, you may be. The "C" that GHC compiles Haskell into isn't C in the normal l

RE: [Haskell-cafe] compilation to C, not via-C

2009-04-24 Thread Sittampalam, Ganesh
Ryan Ingram wrote: > There was > another talk about compiling Haskell into Excel spreadsheets for > finance, but I can't seem to locate it right now. It was an ICFP experience report. http://www.earth.li/~ganesh/research/paradise-icfp08 Ganesh ===

Re: [Haskell-cafe] compilation to C, not via-C

2009-04-24 Thread Alex Queiroz
Hallo, On 4/24/09, Donn Cave wrote: > Quoth Alex Queiroz , > > > > Actually some Scheme compilers have a "c-declare" form that lets > > you create C functions, which can be called from C, Haskell, Java, > > Ruby etc. > > > That would be like what you get with Haskell FFI "export"? > > Wh

Re: [Haskell-cafe] compilation to C, not via-C

2009-04-24 Thread Donn Cave
Quoth Alex Queiroz , > Actually some Scheme compilers have a "c-declare" form that lets > you create C functions, which can be called from C, Haskell, Java, > Ruby etc. That would be like what you get with Haskell FFI "export"? When I do this with nhc98, I need a nhc98 "main", and I would e

Re: [Haskell-cafe] compilation to C, not via-C

2009-04-24 Thread Jason Dagit
On Fri, Apr 24, 2009 at 10:09 AM, Sam Martin wrote: > Thanks Bulat and Miguel. > > Unless I've missed something, the FFI is an great description of how to > bind C and Haskell - I think it's fine. I've read most of the content > either on or referenced by the wiki - although I could well be missin

Re: [Haskell-cafe] compilation to C, not via-C

2009-04-24 Thread Ryan Ingram
Sam, I work on graphics engine/pipeline for Spore at Electronic Arts, and I've had some similar thoughts as you. But I don't think this is the right path for games right now. The "via C" compiler does generate C code that it puts through GCC. There is a post-process step after the code is conver

RE: [Haskell-cafe] compilation to C, not via-C

2009-04-24 Thread Sam Martin
g? Cheers, Sam -Original Message- From: Bulat Ziganshin [mailto:bulat.zigans...@gmail.com] Sent: 24 April 2009 17:53 To: Sam Martin Cc: haskell-cafe@haskell.org Subject: Re: [Haskell-cafe] compilation to C, not via-C Hello Sam, Friday, April 24, 2009, 8:36:50 PM, you wrote: > I work

Re: [Haskell-cafe] compilation to C, not via-C

2009-04-24 Thread Alex Queiroz
Hallo, On 4/24/09, Bulat Ziganshin wrote: > > so, if you just need haskell-C++ interaction, you may look into using > FFI [1,2]. if you believe that you can compile some > java/ruby/haskellwhatever code down to C++ and incorporate it into > your function - sorry, they all have too different c

Re: [Haskell-cafe] compilation to C, not via-C

2009-04-24 Thread Bulat Ziganshin
Hello Sam, Friday, April 24, 2009, 8:36:50 PM, you wrote: > I work in Games middleware, and am very interested in looking at how > Haskell could help us. We basically sell C++ libraries. I would like to > be able to write some areas of our libraries in Haskell, compile the > Haskell to C and inco

Re: [Haskell-cafe] compilation to C, not via-C

2009-04-24 Thread Miguel Mitrofanov
Have you considered using FFI? On 24 Apr 2009, at 20:36, Sam Martin wrote: Hi Everyone, It appears the GHC compiler (and other) compile Haskell *via-C* but not *to C*. I've never really understood why there isn't a C generation option, or why GDC ships with its own compulsory copy of gcc.