Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Literate programming
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: kahl@c...
Subject: Re: [Caml-list] Literate programming
 > 
 > Is there any literate programming tool supporting Ocaml (well)?

FunnelWeb --- http://www.ross.net/funnelweb/ --- is language independent;
my main uses for OCaml programming,
besides literate documentation itself, are:

* Have ``val'' and ``let'' clauses together in the literate source
  by using alternating incrementally defined macros
  going into the .mli and into the .ml file.

* Write exported type declarations only once, in macros that are invoked in
  both the .mli and the .ml files.

* I find that changes affecting many modules become much easier
  through the fact that all 50 modules are in a single source file.
  (However, this setup might not easily work well for a multi-person project,
   and is not a necessity when using FunnelWeb.)

* Parameterized macros for families of (typically small) similar functions ---
  one argument goes into (at least) the function name,
  others may go into the parameter list,
  and definitely some into the implementation.

* To a much lesser extent, using parameterised macro setups for signatures
  shared between parametrically polymorphic and functorised data structures
  (e.g., for being able to switch the underlying implementation
   from Map to HashTable and back).


Wolfram

-------------------
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