@@ -112,7 +112,7 @@ let definedForLoc ~file ~getModule locKind =
112
112
maybeLog " Yes!! got it" ;
113
113
Some res))))
114
114
115
- let alternateDeclared ~file ~pathsForModule ~ getUri declared tip =
115
+ let alternateDeclared ~file ~pathsForModule declared tip =
116
116
match Hashtbl. find_opt pathsForModule file.moduleName with
117
117
| None -> None
118
118
| Some paths -> (
@@ -123,7 +123,7 @@ let alternateDeclared ~file ~pathsForModule ~getUri declared tip =
123
123
let intfUri = Uri2. fromPath intf in
124
124
let implUri = Uri2. fromPath impl in
125
125
if intfUri = file.uri then
126
- match getUri implUri with
126
+ match State. fileForUri implUri with
127
127
| Error e ->
128
128
Log. log e;
129
129
None
@@ -135,7 +135,7 @@ let alternateDeclared ~file ~pathsForModule ~getUri declared tip =
135
135
| None -> None
136
136
| Some declared -> Some (file, extra, declared))
137
137
else
138
- match getUri intfUri with
138
+ match State. fileForUri intfUri with
139
139
| Error e ->
140
140
Log. log e;
141
141
None
@@ -248,7 +248,7 @@ let orLog message v =
248
248
None
249
249
| _ -> v
250
250
251
- let definitionForLoc ~pathsForModule ~file ~getUri ~ getModule loc =
251
+ let definitionForLoc ~pathsForModule ~file ~getModule loc =
252
252
match loc with
253
253
| Typed (_ , Definition (stamp , tip )) -> (
254
254
maybeLog " Trying to find a defintion for a definition" ;
@@ -258,7 +258,7 @@ let definitionForLoc ~pathsForModule ~file ~getUri ~getModule loc =
258
258
maybeLog " Declared" ;
259
259
if declared.exported then (
260
260
maybeLog (" exported, looking for alternate " ^ file.moduleName);
261
- match alternateDeclared ~paths ForModule ~file ~get Uri declared tip with
261
+ match alternateDeclared ~paths ForModule ~file declared tip with
262
262
| None -> None
263
263
| Some (file , _extra , declared ) ->
264
264
let loc = validateLoc declared.name.loc declared.extentLoc in
@@ -325,8 +325,8 @@ let rec pathFromVisibility visibilityPath current =
325
325
let pathFromVisibility visibilityPath tipName =
326
326
pathFromVisibility visibilityPath (Tip tipName)
327
327
328
- let forLocalStamp ~pathsForModule ~file ~extra ~allModules ~getModule ~getUri
329
- ~ getExtra stamp tip =
328
+ let forLocalStamp ~pathsForModule ~file ~extra ~allModules ~getModule ~getExtra
329
+ stamp tip =
330
330
let env = Query. fileEnv file in
331
331
let open Infix in
332
332
match
@@ -348,9 +348,7 @@ let forLocalStamp ~pathsForModule ~file ~extra ~allModules ~getModule ~getUri
348
348
| Some declared ->
349
349
if isVisible declared then (
350
350
let alternativeReferences =
351
- match
352
- alternateDeclared ~paths ForModule ~file ~get Uri declared tip
353
- with
351
+ match alternateDeclared ~paths ForModule ~file declared tip with
354
352
| None -> []
355
353
| Some (file , extra , {stamp} ) -> (
356
354
match
@@ -417,15 +415,15 @@ let allReferencesForLoc ~pathsForModule ~getUri ~file ~extra ~allModules
417
415
| TopLevelModule _ | Constant _ ->
418
416
[]
419
417
| TypeDefinition (_ , _ , stamp ) ->
420
- forLocalStamp ~paths ForModule ~get Uri ~ file ~extra ~all Modules ~get Module
421
- ~get Extra stamp Type
418
+ forLocalStamp ~paths ForModule ~file ~extra ~all Modules ~get Module ~get Extra
419
+ stamp Type
422
420
| Typed (_, (LocalReference (stamp, tip) | Definition (stamp, tip)))
423
421
| LModule (LocalReference (stamp , tip ) | Definition (stamp , tip )) ->
424
422
maybeLog
425
423
(" Finding references for " ^ Uri2. toString file.uri ^ " and stamp "
426
424
^ string_of_int stamp ^ " and tip " ^ tipToString tip);
427
- forLocalStamp ~paths ForModule ~get Uri ~ file ~extra ~all Modules ~get Module
428
- ~get Extra stamp tip
425
+ forLocalStamp ~paths ForModule ~file ~extra ~all Modules ~get Module ~get Extra
426
+ stamp tip
429
427
| LModule (GlobalReference (moduleName, path, tip))
430
428
| Typed (_ , GlobalReference (moduleName , path , tip )) -> (
431
429
match getModule moduleName with
@@ -445,5 +443,5 @@ let allReferencesForLoc ~pathsForModule ~getUri ~file ~extra ~allModules
445
443
(" Finding references for (global) " ^ Uri2. toString env.file.uri
446
444
^ " and stamp " ^ string_of_int stamp ^ " and tip "
447
445
^ tipToString tip);
448
- forLocalStamp ~paths ForModule ~get Uri ~ file ~extra ~all Modules
449
- ~get Module ~ get Extra stamp tip))))
446
+ forLocalStamp ~paths ForModule ~file ~extra ~all Modules ~get Module
447
+ ~get Extra stamp tip))))
0 commit comments