Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Automatic generation of mli files
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Yang Shouxun <yangsx@f...>
Subject: Re: [Caml-list] Automatic generation of mli files
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