File tree Expand file tree Collapse file tree 1 file changed +82
-0
lines changed
tests/test-dirs/type-enclosing Expand file tree Collapse file tree 1 file changed +82
-0
lines changed Original file line number Diff line number Diff line change 1+ $ cat > main. ml << EOF
2+ > module type T = sig
3+ > type ' a t
4+ > end
5+ >
6+ > module N = struct
7+ > module M (T : T) = struct
8+ > type t = int T.t
9+ > end
10+ > end
11+ >
12+ > module F = struct
13+ > module T = struct type ' a t end
14+ > end
15+ >
16+ > type u = N. M(F. T). t
17+ > EOF
18+
19+ FIXME, this should return the type of `t` not the M functor (line 7 )
20+ $ $ MERLIN single type-enclosing -position 15 : 18 -verbosity 1 \
21+ > -filename main. ml < main. ml
22+ {
23+ " class" : " return" ,
24+ " value" : [
25+ {
26+ " start" : {
27+ " line" : 15 ,
28+ " col" : 9
29+ },
30+ " end" : {
31+ " line" : 15 ,
32+ " col" : 19
33+ },
34+ " type" : " functor (T : T) -> sig type t = int T.t end" ,
35+ " tail" : " no"
36+ },
37+ {
38+ " start" : {
39+ " line" : 15 ,
40+ " col" : 9
41+ },
42+ " end" : {
43+ " line" : 15 ,
44+ " col" : 19
45+ },
46+ " type" : " int F.T.t" ,
47+ " tail" : " no"
48+ },
49+ {
50+ " start" : {
51+ " line" : 15 ,
52+ " col" : 0
53+ },
54+ " end" : {
55+ " line" : 15 ,
56+ " col" : 19
57+ },
58+ " type" : " type u = int F.T.t" ,
59+ " tail" : " no"
60+ }
61+ ],
62+ " notifications" : []
63+ }
64+ Type of T (line 12 )
65+ $ $ MERLIN single type-enclosing -position 15 : 15 \
66+ > -filename main. ml < main. ml | jq ' .value[0].type'
67+ " sig type 'a t end"
68+
69+ Type of F (line 11 )
70+ $ $ MERLIN single type-enclosing -position 15 : 13 \
71+ > -filename main. ml < main. ml | jq ' .value[0].type'
72+ " sig module T : sig type 'a t end end"
73+
74+ Type of M (line 6 )
75+ $ $ MERLIN single type-enclosing -position 15 : 11 \
76+ > -filename main. ml < main. ml | jq ' .value[0].type'
77+ " functor (T : T) -> sig type t = int T.t end"
78+
79+ Type of N (line 5 )
80+ $ $ MERLIN single type-enclosing -position 15 : 9 \
81+ > -filename main. ml < main. ml | jq ' .value[0].type'
82+ " sig module M : functor (T : T) -> sig type t = int T.t end end"
You can’t perform that action at this time.
0 commit comments