Is my question bad ?
Pablo Dejuan
pdejuan@ucu.edu.uy
Mon, 02 Jun 2003 01:07:34 +0200
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
<title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
Karl M Syring wrote:<br>
<blockquote type="cite" cite="midbba9m3$9n1$1@main.gmane.org">
<pre wrap="">Antoine Utonium wrote on Sat, 31 May 2003 13:29:09 +0200:
</pre>
<blockquote type="cite">
<pre wrap="">I recently asked you who knows how to link haskell-made code to C apps, or
call haskell code from C code, or encapsulate, traduce, Haskell code in C
code.
I just want to use haskell when I need advanced algorithms, & C for I/O, and
GUI (under windows)..
If my question has been answered yet, or if my english is too bad, please
say me, or give me links to answers.
Thanks.
Antoine Utonium wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Everything is in the title. I like "simplicity" of Haskell and would
like to use what i write in my c/c++ programs.
Thanks a lot by advance.
</pre>
</blockquote>
</blockquote>
<pre wrap=""><!---->
I guess, there are people who have tried, but failed :-)
The easiest way would be to make a COM server in Haskell.
You should have a look at the HDirect sources, where there are
some examples. Generally using a COM dll from Haskell seems to
work, while the other way round seems to be problematic.
Karl M. Syring
</pre>
</blockquote>
If you are using GHC, you could compile your ".hs" to a Haskell C
(".hc") which is a C file, this way:<br>
ghc -C myfile.hs<br>
<br>
There are also other options like compiling an ".o" but I've never
tried'em. Wish you luck.<br>
<br>
</body>
</html>