Hi Paolo,<div><br></div><div>I agree that this would be useful.  In fact, a couple of years ago I implemented this in GHC, but after some discussion folks were not convinced that it&#39;s a good idea.  I don&#39;t remember the details but as far as I recall we &quot;agreed to disagree&quot; :-)   The e-mail thread is over here:</div>
<div><br></div><div><a href="http://www.haskell.org/pipermail/glasgow-haskell-users/2010-March/018575.html">http://www.haskell.org/pipermail/glasgow-haskell-users/2010-March/018575.html</a></div><div><br></div><div>The patch should be there too, but I suspect that GHC has moved on since than, but perhaps there&#39;s still something useful there.</div>
<div><br></div><div>-Iavor</div><div><br></div><div><br></div><div>On Thu, Jul 5, 2012 at 5:13 AM, Paolo Capriotti <span dir="ltr">&lt;<a href="mailto:p.capriotti@gmail.com" target="_blank">p.capriotti@gmail.com</a>&gt;</span> wrote:</div>
<div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">As explained in detail here:<br>
<a href="http://www.haskell.org/pipermail/ffi/2012-June/001867.html" target="_blank">http://www.haskell.org/pipermail/ffi/2012-June/001867.html</a>,<br>
it may be useful to have a form of foreign declaration that creates a<br>
static stub for a haskell function without exporting a symbol.<br>
<br>
Here is a ticket for that: <a href="http://hackage.haskell.org/trac/ghc/ticket/7048" target="_blank">http://hackage.haskell.org/trac/ghc/ticket/7048</a>.<br>
<br>
It is not particularly clear how such a declaration would look like<br>
syntactically. In the ticket I proposed the following:<br>
<br>
    foreign import ccall myCallbackPtr :: FunPtr (IO ()) = myCallback<br>
<br>
but please do suggest better alternatives.<br>
<br>
It would also be useful to see some use cases of this new form of<br>
declaration. Library binding authors: would this be a welcome addition<br>
for you?<br>
<br>
BR,<br>
Paolo<br>
<br>
_______________________________________________<br>
Glasgow-haskell-users mailing list<br>
<a href="mailto:Glasgow-haskell-users@haskell.org">Glasgow-haskell-users@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/glasgow-haskell-users" target="_blank">http://www.haskell.org/mailman/listinfo/glasgow-haskell-users</a><br>
</blockquote></div><br></div>