I would find a ForeignData extension incredibly helpful. This will be crucial if Haskell ever wants to target out of the ordinary systems.<br><br clear="all">/jve<br>
<br><br><div class="gmail_quote">On Mon, Dec 1, 2008 at 8:38 PM, John Meacham <span dir="ltr">&lt;<a href="mailto:john@repetae.net">john@repetae.net</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">On Mon, Dec 01, 2008 at 04:55:14PM -0800, Evan Laforge wrote:<br>
&gt; On Mon, Dec 1, 2008 at 4:39 PM, Andrea Rossato<br>
&gt; &lt;<a href="mailto:mailing_list@istitutocolli.org">mailing_list@istitutocolli.org</a>&gt; wrote:<br>
&gt; &gt; Hello,<br>
&gt; &gt;<br>
&gt; &gt; I&#39;m writing the bindings to a C library which uses, in some functions,<br>
&gt; &gt; global variables.<br>
&gt; &gt;<br>
&gt; &gt; To make it clearer, those functions need a global variable to be<br>
&gt; &gt; defined. A C program using my_function, one of the library functions,<br>
&gt; &gt; would look like:<br>
&gt;<br>
&gt; I don&#39;t think you can use the FFI to declare symbols for C. &nbsp;One<br>
&gt; not-so-pretty but effective way to do it is create a stub.c with the<br>
&gt; variables declared along with setting functions, then bind those<br>
&gt; functions like any other.<br>
<br>
</div>Yes, it is unfortunate this is the case. my ForeignData proposal was<br>
meant to address this:<br>
<br>
<a href="http://hackage.haskell.org/trac/haskell-prime/wiki/ForeignData" target="_blank">http://hackage.haskell.org/trac/haskell-prime/wiki/ForeignData</a><br>
<br>
I am not entirely sure about the proposal as described, but I think<br>
something like it should be done.<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp;John<br>
<font color="#888888"><br>
--<br>
John Meacham - ⑆<a href="http://repetae.net" target="_blank">repetae.net</a>⑆john⑈<br>
</font><div><div></div><div class="Wj3C7c">_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
</div></div></blockquote></div><br>