File tree Expand file tree Collapse file tree 1 file changed +61
-0
lines changed Expand file tree Collapse file tree 1 file changed +61
-0
lines changed Original file line number Diff line number Diff line change 1+ $ cat > main. ml << EOF
2+ > module Bar : sig
3+ > module Foo : sig
4+ > val v : int
5+ > end
6+ > end = struct
7+ > module Foo = struct
8+ > let v = 42
9+ > end
10+ > end
11+ > module Foo = Bar. Foo
12+ > let _ = Foo. v
13+ > EOF
14+
15+ $ cat > other. ml << EOF
16+ > module Foo = Main. Bar. Foo
17+ > let _ = Foo. v
18+ > EOF
19+
20+ $ $ OCAMLC -c -bin-annot main. ml other. ml
21+
22+ $ $ MERLIN single locate -look-for ml -position 11 : 10 \
23+ > -filename . /main. ml < . /main. ml | jq ' .value'
24+ {
25+ " file" : " $ TESTCASE_ROOT /main.ml" ,
26+ " pos" : {
27+ " line" : 6 ,
28+ " col" : 2
29+ }
30+ }
31+
32+ FIXME: it would be more useful to traverse the alias and jump to 2 : 2
33+ $ $ MERLIN single locate -look-for mli -position 11 : 10 \
34+ > -filename . /main. ml < . /main. ml | jq ' .value'
35+ {
36+ " file" : " $ TESTCASE_ROOT /main.ml" ,
37+ " pos" : {
38+ " line" : 10 ,
39+ " col" : 0
40+ }
41+ }
42+ $ $ MERLIN single locate -look-for ml -position 2 : 10 \
43+ > -filename . /other. ml < . /other. ml | jq ' .value'
44+ {
45+ " file" : " $ TESTCASE_ROOT /main.ml" ,
46+ " pos" : {
47+ " line" : 6 ,
48+ " col" : 2
49+ }
50+ }
51+
52+ FIXME: it would be more useful to traverse the alias and jump to main 2 : 2
53+ $ $ MERLIN single locate -look-for mli -position 2 : 10 \
54+ > -filename . /other. ml < . /other. ml | jq ' .value'
55+ {
56+ " file" : " $ TESTCASE_ROOT /other.ml" ,
57+ " pos" : {
58+ " line" : 1 ,
59+ " col" : 0
60+ }
61+ }
You can’t perform that action at this time.
0 commit comments