Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[Caml-list] [ANN] OCamlSpotter: OCaml compiler extension for source browsing

1 view
Skip to first unread message

Jun Furuse

unread,
Sep 8, 2008, 7:24:28 AM9/8/08
to caml...@yquem.inria.fr
Hi,

I have written a small compiler patch called ocamlspotter. It extends
-annot option and records all the variable definition locations, so
that we can jump from variable uses to their definitions easily from
editors such as emacs.

It is still in a beta version quality, but it is already very useful
to browse very complex ocaml project trees.

The source is available as a diff against a cvs version of OCaml compiler at:

http://www.furuse.info/jun/hacks/ocamlspotter/

Comments and suggestions are welcome.

Regards,
Jun FURUSE

_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

Jon Harrop

unread,
Sep 8, 2008, 9:29:28 AM9/8/08
to caml...@yquem.inria.fr
On Monday 08 September 2008 12:24:02 Jun Furuse wrote:
> Hi,
>
> I have written a small compiler patch called ocamlspotter. It extends
> -annot option and records all the variable definition locations, so
> that we can jump from variable uses to their definitions easily from
> editors such as emacs.
>
> It is still in a beta version quality, but it is already very useful
> to browse very complex ocaml project trees.
>
> The source is available as a diff against a cvs version of OCaml compiler
> at:
>
> http://www.furuse.info/jun/hacks/ocamlspotter/
>
> Comments and suggestions are welcome.

Brilliant idea!

Throwback should also include the ocamldoc comment for the original definition
and, as Yann Le Du recently suggested for F#, typeset LaTeX. :-)

--
Dr Jon Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/?e

Nathaniel Gray

unread,
Sep 9, 2008, 1:18:11 AM9/9/08
to Jun Furuse, caml...@yquem.inria.fr
On Mon, Sep 8, 2008 at 4:24 AM, Jun Furuse <jun.f...@gmail.com> wrote:
> Hi,
>
> I have written a small compiler patch called ocamlspotter. It extends
> -annot option and records all the variable definition locations, so
> that we can jump from variable uses to their definitions easily from
> editors such as emacs.

You have completely blown my mind. I was thinking about this very
idea about 10 minutes ago in my car, and *blam* there it is. I should
think about some other, more profitable ideas...

I would suggest submitting this as a patch for inclusion. I've heard
there are going to be enhancements to the .annot format in 3.11 so
it's not unprecedented.

Cheers,
-n8

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

Jun Furuse

unread,
Sep 9, 2008, 6:09:13 AM9/9/08
to Nathaniel Gray, caml...@yquem.inria.fr
Hi,

Of course, I've already expressed my hope of incorporating it into the
official compiler to the dev team.

But I think it is not the right moment. I am sure it has some bugs and
many things to be improved. Hopefully in future, when things become
more stable and if the dev team is convinced.

Cheers,
Jun

Xavier Leroy

unread,
Sep 18, 2008, 1:02:38 PM9/18/08
to Nathaniel Gray, Jun Furuse, caml...@yquem.inria.fr
>> I have written a small compiler patch called ocamlspotter. It extends
>> -annot option and records all the variable definition locations, so
>> that we can jump from variable uses to their definitions easily from
>> editors such as emacs.
>
> You have completely blown my mind. I was thinking about this very
> idea about 10 minutes ago in my car, and *blam* there it is. I should
> think about some other, more profitable ideas...
>
> I would suggest submitting this as a patch for inclusion. I've heard
> there are going to be enhancements to the .annot format in 3.11 so
> it's not unprecedented.

>From what I've heard, there's also an OCaml summer of code project
that enriched the info found in .annot files. So, it's certainly time
to discuss extensions to .annot files, but let's do that globally, not
one at a time. It is probably too late for inclusion in 3.11, but as
long as these extensions are backward compatible, inclusion in bugfix
releases can be considered.

- Xavier Leroy

0 new messages