Download and installation
This page contains the old versions of OCamlDuce based on OCaml 3.10.2 and CDuce 0.4.2. It is distributed under the same terms as these two projects. (See the file LICENSE in the distribution for more information.) For latest releases check this page
- Compiler, version 3.08.4, patch level 5 (to be used with OCaml 3.08.4)
- Compiler, version 3.09.1, patch level 1 (to be used with OCaml 3.09.1)
- Compiler, version 3.09.2, patch level 2 (to be used with OCaml 3.09.2)
- Compiler version 3.09.3pl1 (to be used with OCaml 3.09.3)
- Compiler version 3.10.0 (to be used with OCaml 3.10.0)
- Compiler version 3.10.2 (to be used with OCaml 3.10.2)
The following describes the installation procedure for the 3.09.2 release. OCamlDuce is installed on top of an existing OCaml installation (whose version number must match) and it requires a recent version of findlib. The build procedure is: make all && make opt && make install. The configuration is taken from OCaml's Makefile.config.
The tools are named ocamlduce, ocamlducec, ocamlduceopt, ocamlducedep, ocamlducemktop, ocamlducemktop, ocamlducefind. They are installed in the same directory as the ocaml compiler itself.
In addition, a library called ocamlduce.cma/.cmxa is built. It depends on the nums library. A findlib package named ocamlduce is created by the make install target. Normally, you don't need to care about the package except if you insist to link your modules with the regular OCaml compilers (not OCamlDuce), but there is no good reason to do so.
To generate the ocamldoc documentation for the Ocamlduce module: make htdoc.
Compiling, linking, calling the toplevel
Starting from OCamlDuce 3.09.2, you don't need to struggle with extra command-line options. You must simply use the OCamlDuce tools:
Call the toplevel: ocamlduce Compile: ocamlducec -c x.ml Link: ocamlducec -o x x.cmo Use ocamlfind: ocamlducefind ocamlc -o -linkpkg -package pcre x.ml
Building from the CVS
The following commands will extract the current development version of OCamlDuce (from OCaml CVS repository and CDuce SVN repository) and compile it:
cvs -f -d ":pserver:anoncvs@camlcvs.inria.fr:/caml" co -r cducetrunk ocaml svn co https://svn.cduce.org/cduce/trunk cduce cd ocaml (cd cduce && make link) make all make opt
Ports and packages
GODI
There is a godi-ocamlduce package available in GODI (sections 3.08, 3.09 and 3.10).
DarwinPorts and OpenBSD
Anil Madhavapeddy contributed two ports of OCamlDuce for DarwinPorts (in dports/lang/ocamlduce) and for OpenBSD (in ports/lang/ocamlduce).
pkgsrc
Jaap Boender maintains a port of OCamlDuce for http://pkgsrc.se/lang/ocamlduce, http://ftp.netbsd.org/pub/pkgsrc/current/pkgsrc/lang/ocamlduce/README.html.