English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

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 "my_utils.ml"
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 caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners