@@ -292,7 +292,7 @@ let orLog message v =
292
292
None
293
293
| _ -> v
294
294
295
- let definitionForLoc ~package ~file ~ getModule loc =
295
+ let definitionForLoc ~package ~file loc =
296
296
match loc with
297
297
| Typed (_ , Definition (stamp , tip )) -> (
298
298
maybeLog " Trying to find a defintion for a definition" ;
@@ -332,7 +332,7 @@ let definitionForLoc ~package ~file ~getModule loc =
332
332
maybeLog
333
333
(" Global defn " ^ moduleName ^ " " ^ pathToString path ^ " : "
334
334
^ tipToString tip);
335
- match getModule moduleName with
335
+ match ProcessCmt. fileForModule ~package moduleName with
336
336
| None -> None
337
337
| Some file -> (
338
338
let env = ProcessCmt. fileEnv file in
@@ -369,8 +369,7 @@ let rec pathFromVisibility visibilityPath current =
369
369
let pathFromVisibility visibilityPath tipName =
370
370
pathFromVisibility visibilityPath (Tip tipName)
371
371
372
- let forLocalStamp ~package ~file ~extra ~allModules ~getModule ~getExtra stamp
373
- tip =
372
+ let forLocalStamp ~package ~file ~extra ~allModules ~getExtra stamp tip =
374
373
let env = ProcessCmt. fileEnv file in
375
374
let open Infix in
376
375
match
@@ -420,7 +419,7 @@ let forLocalStamp ~package ~file ~extra ~allModules ~getModule ~getExtra stamp
420
419
allModules
421
420
|> List. filter (fun name -> name <> file.moduleName)
422
421
|> Utils. filterMap (fun name ->
423
- match getModule name with
422
+ match ProcessCmt. fileForModule ~package name with
424
423
| None -> None
425
424
| Some file -> (
426
425
match getExtra name with
@@ -448,27 +447,25 @@ let forLocalStamp ~package ~file ~extra ~allModules ~getModule ~getExtra stamp
448
447
in
449
448
(file.uri, local) :: externals)
450
449
451
- let allReferencesForLoc ~package ~getUri ~file ~extra ~allModules ~getModule
452
- ~ getExtra loc =
450
+ let allReferencesForLoc ~package ~getUri ~file ~extra ~allModules ~getExtra loc
451
+ =
453
452
match loc with
454
453
| Explanation _
455
454
| Typed (_, NotFound )
456
455
| LModule NotFound
457
456
| TopLevelModule _ | Constant _ ->
458
457
[]
459
458
| TypeDefinition (_ , _ , stamp ) ->
460
- forLocalStamp ~package ~file ~extra ~all Modules ~get Module ~get Extra stamp
461
- Type
459
+ forLocalStamp ~package ~file ~extra ~all Modules ~get Extra stamp Type
462
460
| Typed (_, (LocalReference (stamp, tip) | Definition (stamp, tip)))
463
461
| LModule (LocalReference (stamp , tip ) | Definition (stamp , tip )) ->
464
462
maybeLog
465
463
(" Finding references for " ^ Uri2. toString file.uri ^ " and stamp "
466
464
^ string_of_int stamp ^ " and tip " ^ tipToString tip);
467
- forLocalStamp ~package ~file ~extra ~all Modules ~get Module ~get Extra stamp
468
- tip
465
+ forLocalStamp ~package ~file ~extra ~all Modules ~get Extra stamp tip
469
466
| LModule (GlobalReference (moduleName, path, tip))
470
467
| Typed (_ , GlobalReference (moduleName , path , tip )) -> (
471
- match getModule moduleName with
468
+ match ProcessCmt. fileForModule ~package moduleName with
472
469
| None -> []
473
470
| Some file -> (
474
471
let env = ProcessCmt. fileEnv file in
@@ -485,5 +482,5 @@ let allReferencesForLoc ~package ~getUri ~file ~extra ~allModules ~getModule
485
482
(" Finding references for (global) " ^ Uri2. toString env.file.uri
486
483
^ " and stamp " ^ string_of_int stamp ^ " and tip "
487
484
^ tipToString tip);
488
- forLocalStamp ~package ~file ~extra ~all Modules ~get Module ~ get Extra
489
- stamp tip) )))
485
+ forLocalStamp ~package ~file ~extra ~all Modules ~get Extra stamp tip)
486
+ )))
0 commit comments