<p><br>
Em 15/07/2012 18:38, &quot;Albert Y. C. Lai&quot; &lt;<a href="mailto:trebla@vex.net">trebla@vex.net</a>&gt; escreveu:<br>
&gt;<br>
&gt; On 12-07-10 11:35 PM, Brandon Allbery wrote:<br>
&gt;&gt;<br>
&gt;&gt; Quoth the Fine Manual (8.2.1.1. Using your own main()<br>
&gt;&gt; &lt;<a href="http://www.haskell.org/ghc/docs/latest/html/users_guide/ffi-ghc.html#using-own-main">http://www.haskell.org/ghc/docs/latest/html/users_guide/ffi-ghc.html#using-own-main</a>&gt;):<br>
&gt;&gt;<br>
&gt;&gt; There can be multiple calls to |hs_init()|, but each one should be<br>
&gt;&gt; matched by one (and only one) call to |hs_exit()|^[14<br>
&gt;&gt; &lt;<a href="http://www.haskell.org/ghc/docs/latest/html/users_guide/ffi-ghc.html#ftn.id740774">http://www.haskell.org/ghc/docs/latest/html/users_guide/ffi-ghc.html#ftn.id740774</a>&gt;]<br>
&gt;&gt;<br>
&gt;&gt; .<br>
&gt;&gt;<br>
&gt;&gt; So this should theoretically work.<br>
&gt;<br>
&gt;<br>
&gt; Except that [14] says: the outermost hs_exit() de-initialises, and afterwards, cannot reliably re-initialise in current implementations.<br>
&gt;<br>
&gt; So the currently working use-case is just:<br>
&gt; Prog ::= nop | hs_init(); Prog; hs_exit()</p>
<p>Would that be:</p>
<p>Prog ::= nop | hs_init(); Prog&#39;; hs_exit();<br>
Prog&#39; ::= nop | hs_init(); Prog&#39;; hs_exit(); | Prog&#39; Prog&#39;</p>
<p>Cheers, </p>
<p>--<br>
Felipe – enviado do meu Galaxy Tab. <br>
</p>