@@ -112,8 +112,8 @@ let definedForLoc ~file ~getModule locKind =
112
112
maybeLog " Yes!! got it" ;
113
113
Some res))))
114
114
115
- let alternateDeclared ~file ~pathsForModule declared tip =
116
- match Hashtbl. find_opt pathsForModule file.moduleName with
115
+ let alternateDeclared ~file ~package declared tip =
116
+ match Hashtbl. find_opt package. TopTypes. pathsForModule file.moduleName with
117
117
| None -> None
118
118
| Some paths -> (
119
119
maybeLog (" paths for " ^ file.moduleName);
@@ -248,7 +248,7 @@ let orLog message v =
248
248
None
249
249
| _ -> v
250
250
251
- let definitionForLoc ~pathsForModule ~file ~getModule loc =
251
+ let definitionForLoc ~package ~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 ~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 declared tip with
261
+ match alternateDeclared ~package ~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
@@ -274,7 +274,7 @@ let definitionForLoc ~pathsForModule ~file ~getModule loc =
274
274
maybeLog (" Toplevel " ^ name);
275
275
let open Infix in
276
276
match
277
- Hashtbl. find_opt pathsForModule name
277
+ Hashtbl. find_opt package. pathsForModule name
278
278
|> orLog " No paths found" |?> getSrc |> orLog " No src found"
279
279
with
280
280
| None -> None
@@ -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 ~getExtra
329
- stamp tip =
328
+ let forLocalStamp ~package ~file ~extra ~allModules ~getModule ~getExtra stamp
329
+ tip =
330
330
let env = Query. fileEnv file in
331
331
let open Infix in
332
332
match
@@ -348,7 +348,7 @@ let forLocalStamp ~pathsForModule ~file ~extra ~allModules ~getModule ~getExtra
348
348
| Some declared ->
349
349
if isVisible declared then (
350
350
let alternativeReferences =
351
- match alternateDeclared ~paths ForModule ~file declared tip with
351
+ match alternateDeclared ~package ~file declared tip with
352
352
| None -> []
353
353
| Some (file , extra , {stamp} ) -> (
354
354
match
@@ -406,24 +406,24 @@ let forLocalStamp ~pathsForModule ~file ~extra ~allModules ~getModule ~getExtra
406
406
in
407
407
(file.uri, local) :: externals)
408
408
409
- let allReferencesForLoc ~pathsForModule ~getUri ~file ~extra ~allModules
410
- ~getModule ~ getExtra loc =
409
+ let allReferencesForLoc ~package ~getUri ~file ~extra ~allModules ~ getModule
410
+ ~getExtra loc =
411
411
match loc with
412
412
| Explanation _
413
413
| Typed (_, NotFound )
414
414
| LModule NotFound
415
415
| TopLevelModule _ | Constant _ ->
416
416
[]
417
417
| TypeDefinition (_ , _ , stamp ) ->
418
- forLocalStamp ~paths ForModule ~file ~extra ~all Modules ~get Module ~get Extra
419
- stamp Type
418
+ forLocalStamp ~package ~file ~extra ~all Modules ~get Module ~get Extra stamp
419
+ Type
420
420
| Typed (_, (LocalReference (stamp, tip) | Definition (stamp, tip)))
421
421
| LModule (LocalReference (stamp , tip ) | Definition (stamp , tip )) ->
422
422
maybeLog
423
423
(" Finding references for " ^ Uri2. toString file.uri ^ " and stamp "
424
424
^ string_of_int stamp ^ " and tip " ^ tipToString tip);
425
- forLocalStamp ~paths ForModule ~file ~extra ~all Modules ~get Module ~get Extra
426
- stamp tip
425
+ forLocalStamp ~package ~file ~extra ~all Modules ~get Module ~get Extra stamp
426
+ tip
427
427
| LModule (GlobalReference (moduleName, path, tip))
428
428
| Typed (_ , GlobalReference (moduleName , path , tip )) -> (
429
429
match getModule moduleName with
@@ -443,5 +443,5 @@ let allReferencesForLoc ~pathsForModule ~getUri ~file ~extra ~allModules
443
443
(" Finding references for (global) " ^ Uri2. toString env.file.uri
444
444
^ " and stamp " ^ string_of_int stamp ^ " and tip "
445
445
^ tipToString tip);
446
- forLocalStamp ~paths ForModule ~file ~extra ~all Modules ~get Module
447
- ~get Extra stamp tip))))
446
+ forLocalStamp ~package ~file ~extra ~all Modules ~get Module ~get Extra
447
+ stamp tip))))
0 commit comments