File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change 1
- open Infix
2
- open TopTypes
3
-
4
1
let isMl path =
5
2
Filename. check_suffix path " .ml" || Filename. check_suffix path " .mli"
6
3
7
4
let converter src =
8
5
let mlToOutput s = [s] in
9
- fold src mlToOutput (fun src ->
6
+ Infix. fold src mlToOutput (fun src ->
10
7
match isMl src with true -> mlToOutput | false -> fun x -> [x])
11
8
12
9
let newDocsForCmt ~moduleName cmtCache changed cmt src =
10
+ let open Infix in
13
11
let uri = Uri2. fromPath (src |? cmt) in
14
12
match Process_406. fileForCmt ~module Name ~uri cmt (converter src) with
15
13
| Error e ->
@@ -20,7 +18,7 @@ let newDocsForCmt ~moduleName cmtCache changed cmt src =
20
18
Some file
21
19
22
20
let docsForCmt ~moduleName cmt src state =
23
- if Hashtbl. mem state.cmtCache cmt then
21
+ if Hashtbl. mem state.TopTypes. cmtCache cmt then
24
22
let mtime, docs = Hashtbl. find state.cmtCache cmt in
25
23
(* TODO: I should really throttle this mtime checking to like every 50 ms or so *)
26
24
match Files. getMtime cmt with
@@ -62,7 +60,7 @@ let getFullFromCmt ~state ~uri =
62
60
| None -> Error (" can't find module " ^ moduleName))
63
61
64
62
let docsForModule modname state ~package =
65
- if Hashtbl. mem package.pathsForModule modname then (
63
+ if Hashtbl. mem package.TopTypes. pathsForModule modname then (
66
64
let paths = Hashtbl. find package.pathsForModule modname in
67
65
(* TODO: do better *)
68
66
let cmt = SharedTypes. getCmt paths in
You can’t perform that action at this time.
0 commit comments