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 GAA11901; Mon, 9 Jun 2003 06:54:23 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id GAA11889 for ; Mon, 9 Jun 2003 06:54:21 +0200 (MET DST) X-SPAM-Warning: Sending machine is listed in blackholes.five-ten-sg.com Received: from mail.fltrp.com ([211.101.185.130]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h594sIT04185 for ; Mon, 9 Jun 2003 06:54:20 +0200 (MET DST) Received: from delbian [129.0.5.6] by mail.fltrp.com with ESMTP (SMTPD32-7.13) id A21E4A0238; Mon, 09 Jun 2003 12:50:38 +0800 From: Yang Shouxun Organization: FLTRP To: caml-list@inria.fr Subject: Re: [Caml-list] Automatic generation of mli files Date: Mon, 9 Jun 2003 12:59:11 +0800 User-Agent: KMail/1.5.2 References: <4.3.2.7.2.20030606112653.039b1838@localhost> <20030606203843.GD27432@crhc.uiuc.edu> <200306091226.13255.yangsx@fltrp.com> In-Reply-To: <200306091226.13255.yangsx@fltrp.com> MIME-Version: 1.0 Content-Type: text/plain; charset="gb18030" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200306091259.11782.yangsx@fltrp.com> X-Spam: no; 0.00; shouxun:01 yangsx:01 fltrp:01 caml-list:01 mli:01 38,:01 val:01 foo:01 preferrable:01 ocamldoc:01 ocaml:01 caml:01 literate:01 06,:02 thread:02 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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. 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. shouxun ------------------- 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