[MLton] MLton import headers

Vesa Karvonen vesa.a.j.k at gmail.com
Mon Oct 13 01:22:56 PDT 2008


On Sat, Oct 4, 2008 at 12:28 AM, Vesa Karvonen <vesa.a.j.k at gmail.com> wrote:
> On Fri, Oct 3, 2008 at 11:21 PM, Matthew Fluet <fluet at tti-c.org> wrote:
>> Finally, importing a MLton library (either static or dynamic) into another
>> MLton library or executable seems to be a fairly obscure usage. [...]
>
> I could certainly imagine some more or less plausible practical
> reasons to do so, such as cutting compilation time. Although, given
> the limited set of types available for interfacing with such
> libraries, many such uses could just as well be written by compiling
> the MLton "library" as a regular program that is spawned by the host
> program as a separate process and communicated with via some form of
> IPC. BTW, according to Armstrong's book this is a preferred way of
> using foreign language libraries in Erlang.

Continuing on that thought, I just committed an experimental (and
somewhat incomplete with respect to what I want it to do) RPC (Remove
Procedure Call) library to mltonlib
(http://mlton.org/cgi-bin/viewsvn.cgi/mltonlib/trunk/org/mlton/vesak/rpc-lib/unstable/)
that allows one to do that fairly easily.  There is also simple
example of using the library.  To try the example, first build it then
start the server and finally run the client.

-Vesa Karvonen



More information about the MLton mailing list