caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Nathaniel Gray" <n8gray@gmail.com>
To: "Maxence Guesdon" <maxence.guesdon@inria.fr>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Extending .annot files
Date: Wed, 24 Sep 2008 00:50:40 -0700	[thread overview]
Message-ID: <aee06c9e0809240050v58ef4484gfc6e50923dbc5628@mail.gmail.com> (raw)
In-Reply-To: <20080922080824.38b9cc59@alcazar.inria.fr>

On Sun, Sep 21, 2008 at 11:08 PM, Maxence Guesdon
<maxence.guesdon@inria.fr> wrote:
> On Fri, 19 Sep 2008 11:20:36 -0700
> "Nathaniel Gray" <n8gray@gmail.com> wrote:
>>
>> For any identifier it would be good to know:
>> 1. Its inferred type
>> 2. Its fully-qualified module "path"
>
> All identifiers have not a fully qualified path (think of y in
>  let x = let y = ... in ...)

That's a good point.  I tend to think of those variables as being
private parts of the current module, but perhaps that's inaccurate.
So we can amend this request to be for "its fully qualified module
path, if such a path exists".

> and two identifiers may have the same
> fully-qualified path. (e.g.: let x = 1;; let x = 2;;)

That's fine.  Nobody said it had to be unique.  :)

>> 3. Where it was defined, if it was defined in the current file.
>
> Would it be possible to have the location of the definition of all
> identifiers, including the ones defined in another module (if there is
> a .annot file for this module, of course) ?

This strikes me as being beyond the scope of what the compiler can
reasonably provide.  If we're given the info that:

1. x resolves to Foo.Bar.x
2. Foo.Bar came from file /home/n8gray/src/foo/bar.cmo

We can write the code that decides whether/how to find bar.annot,
since that will be very build-system dependent.

>> In addition, for each module referenced in the file it would be good
>> to know what file the module was read from.  (This will allow some
>> hope of tracking down definitions in other files)
>>
>> It's hard for me to think of anything else that belongs in .annot
>> files.  If I stretch a bit I suppose annotating variable definitions
>> with their range of scope might be cute.  Maybe other people can think
>> of more original ideas.
>
> A module containing the functions to read .annot files, so that
> all developers using these files do not develop their own module.

I agree, but this is something that can be developed outside the INRIA
team if necessary.

Cheers,
-n8

-- 
>>>-- Nathaniel Gray -- Caltech Computer Science ------>
>>>-- Mojave Project -- http://mojave.cs.caltech.edu -->


      reply	other threads:[~2008-09-24  7:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-19 18:20 Nathaniel Gray
2008-09-22  2:15 ` Jun Furuse
2008-09-24  7:33   ` [Caml-list] " Nathaniel Gray
2008-09-24 16:19     ` Jun Furuse
2008-09-22  6:08 ` [Caml-list] " Maxence Guesdon
2008-09-24  7:50   ` Nathaniel Gray [this message]

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=aee06c9e0809240050v58ef4484gfc6e50923dbc5628@mail.gmail.com \
    --to=n8gray@gmail.com \
    --cc=caml-list@yquem.inria.fr \
    --cc=maxence.guesdon@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).