Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cduce
cduce
Commits
08150e7b
Commit
08150e7b
authored
Oct 05, 2007
by
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
04a04452
Changes
1
Hide whitespace changes
Inline
Side-by-side
web/manual/interface.xml
View file @
08150e7b
...
...
@@ -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 b
ut
the module.
your OCaml interface, only the latter are exported b
y
the module.
</li>
<li>
Every type associated to a CDuce expression by the
<code>
.mli
</code>
file
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment