File tree 2 files changed +19
-2
lines changed
2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -343,6 +343,24 @@ let rec forItem ~env ~(exported : exported) item =
343
343
mb_attributes exported.modules env.stamps.modules
344
344
in
345
345
[{declared with item = Module declared.item}]
346
+ | Tstr_modtype
347
+ {
348
+ mtd_name = name;
349
+ mtd_id;
350
+ mtd_attributes;
351
+ mtd_type = Some {mty_type = modType};
352
+ mtd_loc;
353
+ } ->
354
+ let env =
355
+ {env with modulePath = ExportedModule (name.txt, env.modulePath)}
356
+ in
357
+ let modTypeItem = forModuleType env modType in
358
+ let declared =
359
+ addItem ~item: modTypeItem ~name ~extent: mtd_loc
360
+ ~stamp: (Ident. binding_time mtd_id)
361
+ ~env mtd_attributes exported.modules env.stamps.modules
362
+ in
363
+ [{declared with item = Module modTypeItem}]
346
364
| Tstr_include {incl_mod; incl_type} ->
347
365
let env =
348
366
match getModulePath incl_mod.mod_desc with
@@ -375,7 +393,6 @@ let rec forItem ~env ~(exported : exported) item =
375
393
| _ -> Types. Trec_next
376
394
in
377
395
decl |> forTypeDeclaration ~env ~exported ~rec Status)
378
- | Tstr_modtype _ -> []
379
396
| _ -> []
380
397
381
398
and forModule env mod_desc moduleName =
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ Hover tests/src/Hover.res 44:10
29
29
{"contents": "```rescript\nint\n```"}
30
30
31
31
Hover tests/src/Hover.res 47:13
32
- null
32
+ {"contents": "```rescript\nmodule Logger = {\n let log: string => unit\n}\n```"}
33
33
34
34
Hover tests/src/Hover.res 52:7
35
35
{"contents": "```rescript\nmodule JsLogger = {\n let log: string => unit\n let _oneMore: int\n}\n```"}
You can’t perform that action at this time.
0 commit comments