ocamlspotter support in core

Jun Furuse jun.furuse at gmail.com
Sun Nov 13 02:06:51 GMT 2011


Hi,

It is now rather off-topic and non related with core, but

If you set OCAML_ANNOT environment variable with something non-empty,
the patched compiler creates .annot/.spot/.spit files automatically
even w/o -annot option. Thus I compile OCaml library packages with
annot/spot/spit files even if the build scripts are not with -annot.

Installation of spot/spit files of such packages untouching the build
scripts is bit more tricky. I have written a small tool automatically
finds those in source directories and copy into ocamlfind destdirs. It
is not documented at all but you can try it:

  https://bitbucket.org/camlspotter/spotinstall  (It requires
https://bitbucket.org/camlspotter/spotlib)

Jun


On Sun, Nov 13, 2011 at 9:25 AM, Sean McLaughlin <seanmcl at gmail.com> wrote:
> To generate .spot files, all you need is the -annot flag to
> ocaml{c,opt}.  It seems harmless
> to enable this flag by default.  Doesn't it?  I'm not sure of the full
> implications.
>
> On Sat, Nov 12, 2011 at 1:22 PM, Yaron Minsky <yminsky at gmail.com> wrote:
>> Well, you can't create spot files without a patched version of the compiler,
>> which seems unreasonable to expect.  You could imagine making the configure
>> script discover if you have an ocamlspotter-capable compiler available, but
>> I don't really know oasis well enough to do that myself.
>> The -annot flag gives you some help (you can figure out the types of
>> expressions), but not quite as much as ocamlspotter does.  I'm hoping we'll
>> get something ocamlspotter-ish into the compiler proper by 3.13...
>> y
>>
>> On Sat, Nov 12, 2011 at 12:10 PM, Sean McLaughlin <seanmcl at gmail.com> wrote:
>>>
>>> The default make setup doesn't build spot files.  Perhaps we can
>>> include the -annot option as a default compiler flag, which doesn't
>>> seem to hurt if you're not using an ocamlspotter version of ocaml, but
>>> makes it possible to jump to function definitions in core from user
>>> programs.
>>
>>
>



More information about the core mailing list