Skip to content

Commit 04e198b

Browse files
committed
cleanup
1 parent e7fd99f commit 04e198b

File tree

3 files changed

+1
-12
lines changed

3 files changed

+1
-12
lines changed

analysis/src/CompletionBackEnd.ml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1499,11 +1499,8 @@ let rec extractType ~env ~package (t : Types.type_expr) =
14991499
match t.desc with
15001500
| Tlink t1 | Tsubst t1 | Tpoly (t1, []) -> extractType ~env ~package t1
15011501
| Tconstr (Path.Pident {name = "option"}, [payloadTypeExpr], _) ->
1502-
(* Handle option. TODO: Look up how the compiler does this and copy that behavior. *)
15031502
Some (Toption (env, payloadTypeExpr))
1504-
| Tconstr (Path.Pident {name = "bool"}, [], _) ->
1505-
(* Handle bool. TODO: Look up how the compiler does this and copy that behavior. *)
1506-
Some (Tbool env)
1503+
| Tconstr (Path.Pident {name = "bool"}, [], _) -> Some (Tbool env)
15071504
| Tconstr (path, _, _) -> (
15081505
match References.digConstructor ~env ~package path with
15091506
| Some (env, {item = {decl = {type_manifest = Some t1}}}) ->

analysis/src/CompletionFrontEnd.ml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,6 @@ let findArgCompletables ~(args : arg list) ~endPos ~posBeforeCursor
149149
{contextPath; argumentLabel = Labelled labelled.name; prefix = ""})
150150
else loop rest
151151
| {label = None; exp} :: rest ->
152-
(* TODO: Better guard for this... This is so completion does not trigger
153-
inside of template string calls, which are regular calls *)
154152
if Res_parsetree_viewer.isTemplateLiteral exp then None
155153
else if exp.pexp_loc |> Loc.hasPos ~pos:posBeforeCursor then
156154
(* Completing in an unlabelled argument *)

analysis/src/SharedTypes.ml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -498,12 +498,6 @@ let locItemToString {loc = {Location.loc_start; loc_end}; locType} =
498498
(* needed for debugging *)
499499
let _ = locItemToString
500500

501-
type polyVariantConstructor = {
502-
name: string;
503-
payload: Types.type_expr option;
504-
args: Types.type_expr list;
505-
}
506-
507501
module Completable = struct
508502
(* Completion context *)
509503
type completionContext = Type | Value | Module | Field

0 commit comments

Comments
 (0)