Skip to content

Commit c485964

Browse files
committed
cleanup path
1 parent ef22038 commit c485964

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

analysis/src/NewCompletions.ml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -556,12 +556,12 @@ let isCapitalized name =
556556
match c with 'A' .. 'Z' -> true | _ -> false
557557

558558
type completion =
559-
| QualifiedRecordAccess of string list (* e.g. _.A.B.field where _ indicates a path ending in a lowercase id *)
560-
| RecordAccess of string list * string list * string (* e.g. A.B.var .f1.f2 .f3 *)
561-
| Path of string list
559+
| QualifiedRecordAccess of path (* e.g. _.A.B.field where _ indicates a path ending in a lowercase id *)
560+
| RecordAccess of path * path * string (* e.g. A.B.var .f1.f2 .f3 *)
561+
| Path of path
562562
(* e.g. A.B.var or A.B *)
563563

564-
let determineCompletion dotpath =
564+
let determineCompletion (dotpath : path) =
565565
let rec loop dotpath =
566566
match dotpath with
567567
| [] -> assert false

analysis/src/SharedTypes.ml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,9 @@ let tipToString tip =
177177
| Constructor a -> "Constructor(" ^ a ^ ")"
178178
| Module -> "Module"
179179

180-
let pathToString path = path |> String.concat "."
180+
type path = string list
181+
182+
let pathToString (path : path) = path |> String.concat "."
181183

182184
type locKind =
183185
| LocalReference of int * tip

0 commit comments

Comments
 (0)