caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] filling function pointers with oasis
@ 2017-05-10 16:19 Olaf Hering
  0 siblings, 0 replies; only message in thread
From: Olaf Hering @ 2017-05-10 16:19 UTC (permalink / raw)
  To: caml-list

[-- 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 --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-05-10 16:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-10 16:19 [Caml-list] filling function pointers with oasis Olaf Hering

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).