Version française
Home     About     Download     Resources     Contact us    
Browse thread
Re: type declaration in */mli & *.ml
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: kahl@d...
Subject: Re: type declaration in */mli & *.ml
Hendrik Tews writes:
 > I am writing again about a topic we had on the list last year
 > (cf. http://pauillac.inria.fr/caml/caml-list/0676.html and
 > http://pauillac.inria.fr/caml/caml-list/0680.html).

 > As Xavier writes it is a pain that in some circumstances
 > (specifications of types and signatures) the same code has to be
 > written twice, first in the specification and then in the
 > implementation.

 > Is there any solution to this? 

 > Has anybody tried to include parts of an interface into an
 > implementation (for instance by means of a preprocessor)?

I am using FunnelWeb (a language-independent literate programming system)
for almost everything, and it is a nice solution to this problem, too.

For my current project, I edit a single FunnelWeb file (currently >800k)
in the folding-mode of Emacs, and a single run of FunnelWeb
(8 seconds on a SparcStation 20) produces a Makefile, 48 OLabl modules
with interfaces, among these 4 lexers and 4 parsers, several special
auxiliary files, and a LaTeX file containing 400+ pages of documented code.

The documented code in the literate programming style can be very nice
and useful, but even if you do not want to go literate,
FunnelWeb is still a very useful preprocessor
(I must admit that I am sometimes lazy on documentation, too...)


FunnelWeb is available via:
  URL: http://www.ross.net/funnelweb/introduction.html

There is also a modified version (which I haven't tried yet)
that allows HTML output and line directives:
  URL: http://www.physics.uq.oz.au:8001/people/coates/funnelweb.html


Happy weaving!

Wolfram