caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Stefan Heimann <lists@stefanheimann.net>
To: caml-list@inria.fr
Subject: Re: Re: [Caml-list] Automatic generation of mli files
Date: Mon, 9 Jun 2003 10:10:51 +0200	[thread overview]
Message-ID: <20030609081051.GA1378@kunz.ratzer> (raw)
In-Reply-To: <200306091259.11782.yangsx@fltrp.com>

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


  reply	other threads:[~2003-06-09  8:10 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-06  9:57 Stefan Heimann
2003-06-06 11:53 ` Maxence Guesdon
2003-06-06 15:33 ` Brian Hurt
2003-06-06 15:59   ` Stefan Heimann
2003-06-06 16:17     ` Ville-Pertti Keinonen
2003-06-06 18:30   ` Chris Hecker
2003-06-06 19:16     ` Brian Hurt
2003-06-06 19:21       ` Chris Hecker
2003-06-06 21:06         ` Manos Renieris
2003-06-06 22:06           ` Chris Hecker
2003-06-06 20:24       ` Stefan Heimann
2003-06-06 20:38         ` Jeffrey J. Cook
     [not found]           ` <200306091226.13255.yangsx@fltrp.com>
2003-06-09  4:59             ` Yang Shouxun
2003-06-09  8:10               ` Stefan Heimann [this message]
2003-06-07  0:27       ` John Max Skaller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030609081051.GA1378@kunz.ratzer \
    --to=lists@stefanheimann.net \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).