File tree 1 file changed +10
-1
lines changed
1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -381,7 +381,7 @@ let path_to_string path =
381
381
let valueDetail (typ : Types.type_expr ) =
382
382
let rec collectSignatureTypes (typ_desc : Types.type_desc ) =
383
383
match typ_desc with
384
- | Tlink t -> collectSignatureTypes t.desc
384
+ | Tlink t | Tsubst t -> collectSignatureTypes t.desc
385
385
| Tconstr (Path. Pident {name = "function$" } , [t ; _ ], _ ) ->
386
386
collectSignatureTypes t.desc
387
387
| Tconstr (path , ts , _ ) -> (
@@ -398,6 +398,15 @@ let valueDetail (typ : Types.type_expr) =
398
398
| Tarrow (_ , t1 , t2 , _ ) ->
399
399
collectSignatureTypes t1.desc @ collectSignatureTypes t2.desc
400
400
| 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)
401
410
| _ -> []
402
411
in
403
412
match collectSignatureTypes typ.desc with
You can’t perform that action at this time.
0 commit comments