<div dir="ltr">Hi Nicola,<div><br></div><div>You can sort of do this, but as far as I know there are still some missing pieces to getting everything you would want.  I'm in the process of doing this for some STM implementations with some colleagues and what I have so far has a few changes to GHC (teaching the GC about some new heap objects) some cmm code in the library imported as foreign prim's and some C code in the library.  I build this with a cabal file and use the "--extra-include-dirs" flag to pass the path to the "rts/" directory for ghc.  This last bit is the unfortunate part that I imagine once we work out what all we need exposed, we could include in what is installed with GHC.  It might already be there, I'm not sure.</div><div><br></div><div>Ryan</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 8, 2015 at 2:24 PM, Nicola Gigante <span dir="ltr"><<a href="mailto:nicola.gigante@gmail.com" target="_blank">nicola.gigante@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi everybody,<br>
<br>
suppose to have an Haskell library which is in part implemented in C<br>
for whatever reason. Can the C part talk with the runtime, in particular<br>
the scheduler? In other words, does the runtime expose the functionality<br>
needed to implement, for example, the STM library from outside the GHC<br>
runtime itself?<br>
<br>
Thank you,<br>
Nicola<br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
</blockquote></div><br></div>