From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id KAA14114; Mon, 9 Jun 2003 10:10:49 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id KAA14325 for ; Mon, 9 Jun 2003 10:10:48 +0200 (MET DST) Received: from carme.kasserver.com (h-62.141.48.121.keyweb.de [62.141.48.121] (may be forged)) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h598AlH26832 for ; Mon, 9 Jun 2003 10:10:47 +0200 (MET DST) Received: from kunz.ratzer (dclient217-162-174-4.hispeed.ch [217.162.174.4]) by carme.kasserver.com (8.11.6/8.11.6) with ESMTP id h598Al521451 for ; Mon, 9 Jun 2003 10:10:47 +0200 Received: from stefan by kunz.ratzer with local (Exim 3.35 #1 (Debian)) id 19PHjv-0000nQ-00 for ; Mon, 09 Jun 2003 10:10:51 +0200 Date: Mon, 9 Jun 2003 10:10:51 +0200 From: Stefan Heimann To: caml-list@inria.fr Subject: Re: Re: [Caml-list] Automatic generation of mli files Message-ID: <20030609081051.GA1378@kunz.ratzer> Mail-Followup-To: caml-list@inria.fr References: <4.3.2.7.2.20030606112653.039b1838@localhost> <20030606203843.GD27432@crhc.uiuc.edu> <200306091226.13255.yangsx@fltrp.com> <200306091259.11782.yangsx@fltrp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200306091259.11782.yangsx@fltrp.com> User-Agent: Mutt/1.3.28i X-Spam: no; 0.00; caml-list:01 mli:01 shouxun:01 38,:01 val:01 foo:01 preferrable:01 ocamldoc:01 ocaml:01 caml:01 literate:01 06,:02 thread:02 wrote:03 interface:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hi, On Mon, Jun 09, 2003 at 12:59:11PM +0800, Yang Shouxun wrote: > On Saturday 07 June 2003 04:38, Jeffrey J. Cook wrote: > > > On Fri, Jun 06, 2003 at 02:16:59PM -0500, Brian Hurt wrote: > > > > > > You could make an annotation in the comment of the method: > > > > > > (** > > > val add: t -> foo -> bar -> bang -> t > > > *) > > > let add a x y z = a > > > > Why not just: > > > > let add (a : t) (x : foo) (y : bar) (z : bang ) : t = ... > > > > I find this notation insanely helpful, especially for code inspection. > > I guess annotation in the comment is preferrable, because that allows the > interface be more specific or general than the implementation. The same can be achivieved with type constraints. But maybe it's the best to offer both possibilities. > I have raised the same issue last year. See the thread "automatic extraction > of mli file?" at http://caml.inria.fr/archives/200210/msg00273.html . > > My idea is to conceive the procedure as part of literate programming in OCaml, > though the feedback indicates my idea is not popular among the OCaml gurus by > that time. > > I still believe the tool is very valuable and worthwile to develop. Or it can > be accomplished by enhancing ocamldoc. But I didn't try it. > > If anybody wants to develop the tool, I'd be glad to discuss it further. I've started and played around a little bit with different ways to extract the information from the .ml file. I think the easiest way to do it is the write a generator for ocamldoc. I'll clean up the code written so far and send it to you by email (maybe today, maybe tomorrow). Then we can discuss everything else. Bye, Stefan -- Stefan Heimann http://www.stefanheimann.net :: personal website. http://cvsshell.sf.net :: CvsShell, a console based cvs client. ------------------- 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