[Haskell-cafe] compilation to C, not via-C
miguelimo38 at yandex.ru
Fri Apr 24 12:50:09 EDT 2009
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
> *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.
> 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
> be able to write some areas of our libraries in Haskell, compile the
> Haskell to C and incorporate that code into a C++ library.
> As an example, I think Haskell would be great at doing geometry
> processing. I don't want to write all our geometry processing code in
> C++. I'd prefer to write a big chunk of it in Haskell and wrap that in
> The pattern here is using Haskell to generate C code as the end
> It sounds like this end result isn't that far out of reach, so I'm
> curious as to why it doesn't appear to be possible at present.
> Have I missed something? Is there some fundamental reason this isn't
> possible? Has anyone wished for this before?
> Any thoughts/help much appreciated,
> Sam Martin
> Lead Programmer
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
More information about the Haskell-Cafe