Commit 88b69e40 authored by Pietro Abate's avatar Pietro Abate
Browse files

[r2004-03-14 16:16:10 by beppe] Empty log message

Original author: beppe
Date: 2004-03-14 16:16:10+00:00
parent fdae6d32
......@@ -7,18 +7,19 @@
<p>
When you have to write a large program you often need to manage some
persistent data. A really elegant and widespread technique, to fulfill
this goal, is to use XML based documents. And a really safe and robust
way to treat XML files is to write a small program in CDuce. In this,
section, we present a way to call CDuce functions from OCaml to
couple the power of CDuce with the power of OCaml.
persistent data. An elegant and widespread technique to fulfill
this goal, is to use XML based documents. And a safe and robust
way to treat XML files is to write a small program in CDuce.
</p>
<p>
This page explains how to write an interface file between CDuce and
OCaml and call CDuce code from OCaml programs.
This page explains how to call CDuce functions from OCaml to couple. It is very
simple all you need to do is to write an OCaml interface file for the CDuce
functions you want to export to OCaml. This requires that CDuce was compiled
with support for OCaml interface (<code>ML_INTERFACE=true</code>).
</p>
</box>
<box title="The interface file" link="interface">
......@@ -74,7 +75,7 @@ Note that there are two rules to respect when creating your interface file:
Every value defined in your OCaml file (<code>.mli</code>) has to
be defined in your CDuce file. Whereas the opposite is not
necessary: you can have much more (top-level) values in your CDuce file than in
your OCaml interface, only the latter are exported but the module.
your OCaml interface, only the latter are exported by the module.
</li>
<li>
Every type associated to a CDuce expression by the <code>.mli</code> file
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment