File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 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 =
381381let valueDetail (typ : Types.type_expr ) =
382382 let rec collectSignatureTypes (typ_desc : Types.type_desc ) =
383383 match typ_desc with
384- | Tlink t -> collectSignatureTypes t.desc
384+ | Tlink t | Tsubst t -> collectSignatureTypes t.desc
385385 | Tconstr (Path. Pident {name = "function$" } , [t ; _ ], _ ) ->
386386 collectSignatureTypes t.desc
387387 | Tconstr (path , ts , _ ) -> (
@@ -398,6 +398,15 @@ 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)
401410 | _ -> []
402411 in
403412 match collectSignatureTypes typ.desc with
You can’t perform that action at this time.
0 commit comments