[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MirageOS-devel] pretty charts from OCaml and js_of_ocaml

> Andy: this seems like a good time to figure out how to best embed HTML
> toplevel printers in IOCamlJS from these sorts of libraries (it also came up
> in the URI library, which wanted to embed a hyperlink). Are there any best
> practises for this in terms of ocamlfind packaging and such, or is it just a
> matter of building a custom toplevel formatter and calling some
> initialisation code in the notebook?

The simplest option might be to provide a "xyz.notebook" subpackage
which references the main library and installs the iocaml printers.

Another solution could be to define an ocamlfind predicate such as
"notebook" which will automatically add the printers from the META

archive(notebook) += "xyz_iocaml_printers.cma"

For iocamljs the kernel would then need to be compiled with
"-predicates notebook" added to the ocamlfind build command.  For
bytecode iocaml you would need to add "Topfind.add_predicates [
"notebook" ];" to the init file.

I am not so sure this second solution will play all that nicely with
the likes of oasis though - to do it properly the tools will need to
be taught about the notebook predicate in the same way they handle the
toploop predicate currently.


MirageOS-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.