Skip to content

Commit f25b190

Browse files
committed
remove toplevel open
1 parent cda8f90 commit f25b190

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

analysis/src/State.ml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
1-
open Infix
2-
open TopTypes
3-
41
let isMl path =
52
Filename.check_suffix path ".ml" || Filename.check_suffix path ".mli"
63

74
let converter src =
85
let mlToOutput s = [s] in
9-
fold src mlToOutput (fun src ->
6+
Infix.fold src mlToOutput (fun src ->
107
match isMl src with true -> mlToOutput | false -> fun x -> [x])
118

129
let newDocsForCmt ~moduleName cmtCache changed cmt src =
10+
let open Infix in
1311
let uri = Uri2.fromPath (src |? cmt) in
1412
match Process_406.fileForCmt ~moduleName ~uri cmt (converter src) with
1513
| Error e ->
@@ -20,7 +18,7 @@ let newDocsForCmt ~moduleName cmtCache changed cmt src =
2018
Some file
2119

2220
let docsForCmt ~moduleName cmt src state =
23-
if Hashtbl.mem state.cmtCache cmt then
21+
if Hashtbl.mem state.TopTypes.cmtCache cmt then
2422
let mtime, docs = Hashtbl.find state.cmtCache cmt in
2523
(* TODO: I should really throttle this mtime checking to like every 50 ms or so *)
2624
match Files.getMtime cmt with
@@ -62,7 +60,7 @@ let getFullFromCmt ~state ~uri =
6260
| None -> Error ("can't find module " ^ moduleName))
6361

6462
let docsForModule modname state ~package =
65-
if Hashtbl.mem package.pathsForModule modname then (
63+
if Hashtbl.mem package.TopTypes.pathsForModule modname then (
6664
let paths = Hashtbl.find package.pathsForModule modname in
6765
(* TODO: do better *)
6866
let cmt = SharedTypes.getCmt paths in

0 commit comments

Comments
 (0)