Skip to content

Commit e53702a

Browse files
committed
Update processing of Tpoly
1 parent 555792d commit e53702a

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

tools/src/tools.ml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ let path_to_string path =
381381
let valueDetail (typ : Types.type_expr) =
382382
let rec collectSignatureTypes (typ_desc : Types.type_desc) =
383383
match typ_desc with
384-
| Tlink t | Tsubst t -> collectSignatureTypes t.desc
384+
| Tlink t | Tsubst t | Tpoly (t, []) -> collectSignatureTypes t.desc
385385
| Tconstr (Path.Pident {name = "function$"}, [t; _], _) ->
386386
collectSignatureTypes t.desc
387387
| Tconstr (path, ts, _) -> (
@@ -398,15 +398,6 @@ let valueDetail (typ : Types.type_expr) =
398398
| Tarrow (_, t1, t2, _) ->
399399
collectSignatureTypes t1.desc @ collectSignatureTypes t2.desc
400400
| Tvar None -> [{path = "_"; genericParameters = []}]
401-
| Tpoly (t, ts) -> (
402-
let genericParameters =
403-
List.concat_map
404-
(fun (t : Types.type_expr) -> collectSignatureTypes t.desc)
405-
ts
406-
in
407-
match collectSignatureTypes t.desc with
408-
| [{path; genericParameters = []}] -> [{path; genericParameters}]
409-
| rest -> rest @ genericParameters)
410401
| _ -> []
411402
in
412403
match collectSignatureTypes typ.desc with

0 commit comments

Comments
 (0)