Commit 318001e
New Haskell Indexer
Summary:
Redesigned the schema and rewrote the indexer. Compared with the previous indexer:
* this captures a lot more xrefs (e.g. local variables)
* it has more information (distinguishes functions/classes/constructors etc.)
* it is much simpler and probably faster, because it doesn't go via hiedb, it reads .hie files directly.
* it is probably more correct, I fixed a lot of things.
The schema is carefully designed so that a Name uniquely identifies an entity and corresponds fairly closely to GHC's Name, including OccName. The main difference is we don't store Uniques, instead we distinguish local Names by including their ByteSpan.
There are a couple of snapshot tests, one for the plain indexer and one for the codemarkup layer, and a Glass regression test.
Not done yet:
* we can extract types from the .hie file too, and provide type hovers in Glass. That wouldn't be too hard.
* extracting more structure so that we can reconstruct data/class decls should be possible but it's not straightforward using .hie. I'm still thinking about how best to do that.
X-link: facebookincubator/Glean#511
Reviewed By: rubmary
Differential Revision: D74400980
Pulled By: jjuliamolin
fbshipit-source-id: 6cb183b96ef1c7030c8b7278434f84a4d72ceb281 parent 3736579 commit 318001e
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
0 commit comments