[Omake] extending omake with ocaml
ben kuin
benkuin at gmail.com
Mon May 3 09:25:37 PDT 2010
> OTOH, a lot can be implemented in OMake language, and if some useful
> functionality is missing, I may be able to add it to the distribution.
thank you for this answer, what do you think about adding a
functionality that makes it possible to access methods of a
dynamically loaded bytecode module. What I mean is something like this
(serious pseudocode):
The new omake builtin: omake_builtin_loadbc.ml:
~~~~~~~~~~~~~~~~~
open Dynlink
let bc_file = ...
let bc_module = loadfile bc_file
let getval bc_module funcname params = ...
~~~~~~~~~~~~~~~~~
The Ocaml module for my osh script: my_extern_test.ml:
~~~~~~~~~~~~
let extest x = x + 5
The osh script: call_extern_test.osh:
~~~~~~~~~~~~
open loadbc
extmod = $(bc_module("my_extern_test"))
retval = $(getval $(extmod "extest" 25))
~~~~~~~~~~~~~
This is just a conceptual idea. Does it make any sense?
ben
More information about the Omake
mailing list