@@ -562,7 +562,7 @@ let completionForExporteds iterExported getDeclared ~prefix ~exact ~env
562
562
with
563
563
deprecated = declared.deprecated;
564
564
docstring = declared.docstring;
565
- modulePath = ModulePath. toFullPath declared.modulePath;
565
+ modulePath = declared.modulePath;
566
566
}
567
567
:: ! res
568
568
| _ -> () );
@@ -1358,20 +1358,20 @@ let rec getCompletionsForContextPath ~package ~opens ~rawOpens ~allFiles ~pos
1358
1358
| [] -> modulePath
1359
1359
in
1360
1360
match lhsPath with
1361
- | Some modulePath -> (
1362
- match modulePath with
1361
+ | Some lhsPath -> (
1362
+ match lhsPath with
1363
1363
| _ :: _ ->
1364
- let modulePathMinusOpens =
1365
- modulePath
1364
+ let lhsPathMinusOpens =
1365
+ lhsPath
1366
1366
|> removeRawOpens package.opens
1367
1367
|> removeRawOpens rawOpens |> String. concat " ."
1368
1368
in
1369
1369
let completionName name =
1370
- if modulePathMinusOpens = " " then name
1371
- else modulePathMinusOpens ^ " ." ^ name
1370
+ if lhsPathMinusOpens = " " then name
1371
+ else lhsPathMinusOpens ^ " ." ^ name
1372
1372
in
1373
1373
let completions =
1374
- modulePath @ [funNamePrefix]
1374
+ lhsPath @ [funNamePrefix]
1375
1375
|> getCompletionsForPath ~completion Context:Value ~exact: false
1376
1376
~package ~opens ~all Files ~pos ~env ~scope
1377
1377
in
@@ -1388,22 +1388,22 @@ let rec getCompletionsForContextPath ~package ~opens ~rawOpens ~allFiles ~pos
1388
1388
file module name it was found in. We pluck that off here if the env
1389
1389
we're in is the same as the completion item was found in. This ensures
1390
1390
that a correct qualified path can be produced. *)
1391
- let modulePath =
1392
- match completionItemModulePath with
1391
+ let completionPath =
1392
+ match ModulePath. toFullPath completionItemModulePath with
1393
1393
| topModule :: rest when topModule = env.file.moduleName -> rest
1394
1394
| modulePath -> modulePath
1395
1395
in
1396
- let modulePathMinusOpens =
1397
- modulePath
1396
+ let completionPathMinusOpens =
1397
+ completionPath
1398
1398
|> removeRawOpens package.opens
1399
1399
|> removeRawOpens rawOpens |> String. concat " ."
1400
1400
in
1401
1401
let completionName name =
1402
- if modulePathMinusOpens = " " then name
1403
- else modulePathMinusOpens ^ " ." ^ name
1402
+ if completionPathMinusOpens = " " then name
1403
+ else completionPathMinusOpens ^ " ." ^ name
1404
1404
in
1405
1405
let completions =
1406
- completionItemModulePath @ [funNamePrefix]
1406
+ completionPath @ [funNamePrefix]
1407
1407
|> getCompletionsForPath ~completion Context:Value ~exact: false
1408
1408
~package ~opens ~all Files ~pos ~env ~scope
1409
1409
in
0 commit comments