Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Camlmix 1.0
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-05-02 (17:00)
From: Martin Jambon <martin_jambon@e...>
Subject: [Caml-list] Camlmix 1.0
Announcement: Camlmix 1.0 (first release)

Camlmix is a command-line tool for preprocessing any kind of file using
Objective Caml as an embedded language for inline expansion.
It has 3 major properties:
- easy: no obscure syntax, no complex library
- flexible: lets you use full featured OCaml
- universal: is not specialized in handling any specific file format

Short example:

File foo.tpl:
# load "unix.cma"
# use ""
let my_name () = print_string "Camlmix"
This text has been generated by ## my_name () ##.

  camlmix foo.tpl -o foo.txt

Result file foo.txt:

This text has been generated by Camlmix.

I use Camlmix for my few static web pages. It is not supposed to replace
any already existing tool, but just provide an OCaml centric
general-purpose preprocessor.

It can of course be used to preprocess OCaml programs themselves, but I
would not recommend this. It allows to create easily a primitive template
system for OCaml and probably many other kinds of dirty hacks (see
the example on the web page).

Once again, it's here:

Have fun!

-- Martin Jambon

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: