caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* OCamlSpotter for OCaml 3.12.0+rc1
@ 2010-07-24  6:29 Jun Furuse
  2010-07-25 18:37 ` [Caml-list] " Yoann Padioleau
  0 siblings, 1 reply; 3+ messages in thread
From: Jun Furuse @ 2010-07-24  6:29 UTC (permalink / raw)
  To: caml-list

Hi Caml-list,

I have updated OCamlSpotter, a compiler enhancement for source code
browsing, to version 3.12.0.0.0, which supports new syntax constructs
introduced in OCaml 3.12.0+rc1. This is a very quick porting version
for people who are already using OCamlSpotter with OCaml 3.11.2.

OCamlSpotter is a tool which finds definition places of various names
(identifiers, type names, modules, etc) in OCaml programs
automatically for you. The original OCaml's -annot option provides the
same sort of functionality but OCamlSpotter provides much more
powerful browsing: it can find definitions hidden in the deep nested
module aliases and functor applications.

 - The -annot option of ocamlc and ocamlopt is extended and creates
<module>.spot files (<module>.spit for .mli), which record the
location information of the names defined and used in the module.

 - A small application ocamlspot provides automatic where-about
spotting of the definition of the name you are interested in, using
<module>.spot files created by the patched compilers.

 - ocamlspot.el provides interactive ocaml-spotting of definition
locations in emacs.

 - Interfaces for other editors such as vi could be built easily, if you want.

The source code is available from Mercurial repo at ocamlforge:

Further information and download is available at:

   http://hg.ocamlcore.org/cgi-bin/hgwebdir.cgi/ocamlspotter/ocamlspotter/

Documents are available currently at:

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

which will be moved to ocamlforge soon.

Happy hacking.
Jun


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] OCamlSpotter for OCaml 3.12.0+rc1
  2010-07-24  6:29 OCamlSpotter for OCaml 3.12.0+rc1 Jun Furuse
@ 2010-07-25 18:37 ` Yoann Padioleau
  2010-07-26 14:10   ` Jun Furuse
  0 siblings, 1 reply; 3+ messages in thread
From: Yoann Padioleau @ 2010-07-25 18:37 UTC (permalink / raw)
  To: Jun Furuse; +Cc: caml-list


On Jul 23, 2010, at 11:29 PM, Jun Furuse wrote:

> 
> Hi Caml-list,
> 
> I have updated OCamlSpotter, a compiler enhancement for source code
> browsing, to version 3.12.0.0.0, which supports new syntax constructs
> introduced in OCaml 3.12.0+rc1. This is a very quick porting version
> for people who are already using OCamlSpotter with OCaml 3.11.2.
> 
> OCamlSpotter is a tool which finds definition places of various names
> (identifiers, type names, modules, etc) in OCaml programs
> automatically for you. The original OCaml's -annot option provides the
> same sort of functionality

Really ? What is the difference between -annot and -dtypes. To me
-dtypes only help to print type information under the cursor (With C-c C-t).
It does not help to find the definition of a name (like otags).

> but OCamlSpotter provides much more
> powerful browsing: it can find definitions hidden in the deep nested
> module aliases and functor applications.

This looks really useful. Any chance of this being integrated in the official
OCaml distribution ? I don't feel comfortable overwriting my current
ocaml binaries. Also how does it interact with previously compiled object files ?
I am using godi so once I have overwritten the ocaml binaries from godi, do
I have to reinstall all the libraries ?


> 
> - The -annot option of ocamlc and ocamlopt is extended and creates
> <module>.spot files (<module>.spit for .mli), which record the
> location information of the names defined and used in the module.
> 
> - A small application ocamlspot provides automatic where-about
> spotting of the definition of the name you are interested in, using
> <module>.spot files created by the patched compilers.
> 
> - ocamlspot.el provides interactive ocaml-spotting of definition
> locations in emacs.
> 
> - Interfaces for other editors such as vi could be built easily, if you want.
> 
> The source code is available from Mercurial repo at ocamlforge:
> 
> Further information and download is available at:
> 
>   http://hg.ocamlcore.org/cgi-bin/hgwebdir.cgi/ocamlspotter/ocamlspotter/
> 
> Documents are available currently at:
> 
>   http://jun.furuse.info/hacks/ocamlspotter
> 
> which will be moved to ocamlforge soon.
> 
> Happy hacking.
> Jun
> 
> _______________________________________________
> 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
> 




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] OCamlSpotter for OCaml 3.12.0+rc1
  2010-07-25 18:37 ` [Caml-list] " Yoann Padioleau
@ 2010-07-26 14:10   ` Jun Furuse
  0 siblings, 0 replies; 3+ messages in thread
From: Jun Furuse @ 2010-07-26 14:10 UTC (permalink / raw)
  To: Yoann Padioleau; +Cc: caml-list

Hi,

> Really ? What is the difference between -annot and -dtypes. To me
> -dtypes only help to print type information under the cursor (With C-c C-t).
> It does not help to find the definition of a name (like otags).

No difference. -dtype was superseded by -annot while ago. OCamlSpotter
extends these options to produce extra files for code browsing.

>> but OCamlSpotter provides much more
>> powerful browsing: it can find definitions hidden in the deep nested
>> module aliases and functor applications.
>
> This looks really useful. Any chance of this being integrated in the official
> OCaml distribution ? I don't feel comfortable overwriting my current
> ocaml binaries. Also how does it interact with previously compiled object files ?
> I am using godi so once I have overwritten the ocaml binaries from godi, do
> I have to reinstall all the libraries ?

The patch does not touch any part of compilation, or at least I was
careful to keep the compilation part untouched. This means patched
compiler and the orignal should produce the same object codes. It
should be safe linking of objects from the original and the patched
together, as far as you use the same compiler versions. Of course,
there are no spot/spit files for library modules compiled by the
original compiler and you cannot browse them.

If you want to be very careful, use the patched compiler just for
spot/spit file creation and use the object files from the original
compiler. In this case you need to tweak your build scripts (Makefile,
OMakefile, ocamlbuild or whatever) somehow. Probably I can add
-annotonly option for the next version of OCamlSpotter to make it
easier.

I am not sure about the possibility of official integration of the
patch. Caml-dev team is generally conservative for a good reason: they
are responsible for keeping ocaml maintenable by themselves.
OCamlSpotter was made based on some non-trivial (probably wrong)
design choices. Maybe some people find OCamlWizard
(http://ocamlwizard.lri.fr/) is better. Or others like pretty heavy
weight solutions like Scion server for Haskell.

Jun


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-07-26 14:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-24  6:29 OCamlSpotter for OCaml 3.12.0+rc1 Jun Furuse
2010-07-25 18:37 ` [Caml-list] " Yoann Padioleau
2010-07-26 14:10   ` Jun Furuse

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).