caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Olaf Hering <olaf@aepfle.de>
To: caml-list@inria.fr
Subject: [Caml-list] filling function pointers with oasis
Date: Wed, 10 May 2017 18:19:24 +0200	[thread overview]
Message-ID: <20170510161924.GA14116@aepfle.de> (raw)

[-- Attachment #1: Type: text/plain, Size: 749 bytes --]

I'm trying to build virt-top with oasis 0.4.6. This works fine beside
the fact that virt-top calls into optional components like
xml-light/calendar/csv. Its custom Makefile builds these optional .ml
files if they are present, and uses them when linking the executable. It
looks like the linking fills the function pointers and the fuctionality
can be used at runtime.

In _oasis I tried to use 'Object', but this fails because each one
creates a META file. Does oasis support something like this (pseudo code)?

x.ml:
 let ext_fn : (string -> float) ref =
  ref (
    fun _ ->
      failwith (s_"X was compiled without support for ext_fn")
  )
x.mli:
 val ext_fn : (string -> float) ref

x_ext.ml:
 X.ext_fn :=
 fun arg ->
  let ....


Thanks,
Olaf

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

                 reply	other threads:[~2017-05-10 16:19 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170510161924.GA14116@aepfle.de \
    --to=olaf@aepfle.de \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).