<rgrinberg>
dons what are you planning to use the lsif for?
<dons>
i'm looking for a way to index ocaml source code for navigation and search (via glean). to do so needs an indexer, either a "native" that emits code information, or an lsif-based one
<dons>
lsif is a bit of a gronky format, but at least its semi standard
<dons>
(for Meta-internal code search/code navigation stuff, there's a few ocaml projects that i'm trying to support a bit better)
<dons>
but need an indexer
<dons>
the cheap way would be something that already exists, works with dune, and emits an lsif dump.
<dons>
slightly more expensive, would be something that exists, and emits a format that's parseable (e.g. thrift, protobufs, json), and has locations/files/references/symbol names/hovers
<rgrinberg>
the most reliable thing would be to compile the projects with dune and construct the index from the produced cmt's
<dons>
ok. the .cmt binary files
<dons>
that looks plausible. would need to scoop them up, parse them. write the results. is the format documented somewhere?
<dons>
yes, the cmt looks right. similar approach in ghc, where the .hie files are scooped up and become the index.
<rgrinberg>
cmt_format.mli in the ocaml repo. parsing them would be a pain, but you can easily unmarshal them in ocaml
<dons>
yeah , would write a little ocaml indexer to do the conversion
<dons>
thanks. that's a good lead
vicfred has joined #ocaml
gereedy has joined #ocaml
Haudegen has quit [Ping timeout: 258 seconds]
hyphen has quit [Ping timeout: 255 seconds]
hyphen has joined #ocaml
gereedy has quit [Quit: gereedy]
waleee has quit [Ping timeout: 258 seconds]
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rgrinberg has joined #ocaml
amosbird- has left #ocaml [WeeChat 2.8-dev]
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<d_bot>
<octachron> It is not particularly useful to encode the list length. Using a heterogeneous list (as replacement for an n-ary tuple type) is a better fit.
<d_bot>
<inkbottle> Hum, I could use some pointers here
<d_bot>
<NULL> Then have fun putting whatever in a single list
<d_bot>
<NULL> Oh, I forgot this was #general since there are barely any bots in the current view. Sorry for if this spammed
klu has joined #ocaml
klu has quit [Changing host]
klu has joined #ocaml
<d_bot>
<octachron> Note that you also need to define a companion index type to define the heterogeneous version of `nth`: `get: ('elt,'list) index -> 'list hlist -> 'elt`.
<d_bot>
<inkbottle> Yes, I thought as much
<d_bot>
<NULL> `type (_, _) index = | O: ('a, 'a * 'b) index | S: ('a, 'b) index -> ('a, 'c * 'b) index` would work
<d_bot>
<NULL> Writing nth is left as an exercise to the reader
<d_bot>
<inkbottle> I'll tell you when I've put it all together