From: Louis Gesbert <louis.gesbert@ocamlpro.com>
To: Gerd Stolpmann <info@gerd-stolpmann.de>, caml-list@inria.fr
Subject: Re: [Caml-list] Warnings opening modules (was: why is building ocaml hard?)
Date: Wed, 20 Jul 2016 09:49:35 +0200 [thread overview]
Message-ID: <15799265.czqJrqsjN9@agaric> (raw)
In-Reply-To: <1468602243.25014.134.camel@e130.lan.sumadev.de>
[-- Attachment #1: Type: text/plain, Size: 1343 bytes --]
ocp-index does that, in the most simple way possible: the file is parsed to find any scope-changing constructs (open, include, functor parameters...), then it tries to resolve the identifier, reading any .cmi file corresponding to an open module it can find to check for a match.
It's not 100% perfect (e.g. in its current version, it won't distinguish identifiers corresponding to values, field names, or types), but it works extremely well in practice and, using it, pulling hair because I have to lose time looking up an identifier in the presence of 'open' statements is a thing of the past. Just run '(ocp-index-print-info-at-point)' in emacs (and from the shell, it's 'ocp-index print IDENT --context FILE:LINE:COL "%p"')
Of course, it's not as light-weight, but if you have Merlin configured on your project and working, that's even better: in either case you get jump-to-source which also gives that information, and Merlin is more accurate.
> - Gerd Stolpmann, 15/07/2016 19:04 -
> Am Freitag, den 15.07.2016, 12:13 -0400 schrieb Hendrik Boom:
> > Or is there some kind of code browsing tool that explicates all this?
>
> I don't know any tool that just shows the full path of identifiers.
> Merlin could do it (has all infos) but it doesn't so far. It "only"
> shows the type (also useful, but in a different way).
>
> Gerd
>
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2016-07-20 7:49 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-10 11:57 David Allsopp
2016-07-10 19:45 ` Gerd Stolpmann
2016-07-13 12:08 ` David Allsopp
2016-07-13 12:20 ` Gerd Stolpmann
2016-07-13 12:30 ` David Allsopp
2016-07-14 9:03 ` Goswin von Brederlow
2016-07-15 9:52 ` David Allsopp
2016-07-15 16:13 ` Hendrik Boom
2016-07-15 16:57 ` Yotam Barnoy
2016-07-15 18:09 ` Jeremy Yallop
2016-07-15 18:26 ` Hendrik Boom
2016-07-15 18:58 ` Yotam Barnoy
2016-07-15 19:26 ` Hezekiah M. Carty
2016-07-15 19:42 ` Yotam Barnoy
2016-07-15 19:52 ` Jeremy Yallop
2016-07-15 20:25 ` Yotam Barnoy
2016-07-15 18:50 ` Alain Frisch
2016-07-15 19:44 ` Hendrik Boom
2016-07-15 17:04 ` Gerd Stolpmann
2016-07-20 7:49 ` Louis Gesbert [this message]
2016-07-16 7:40 ` Petter A. Urkedal
2016-07-16 9:58 ` vrotaru.md
2016-07-19 16:37 ` Yotam Barnoy
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=15799265.czqJrqsjN9@agaric \
--to=louis.gesbert@ocamlpro.com \
--cc=caml-list@inria.fr \
--cc=info@gerd-stolpmann.de \
/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