File tree 3 files changed +9
-1
lines changed
3 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -629,6 +629,8 @@ type any_creation_reason =
629
629
| Dummy_jkind
630
630
| Type_expression_call
631
631
| Inside_of_Tarrow
632
+ | Wildcard
633
+ | Unification_var
632
634
633
635
type float64_creation_reason = Primitive of Ident .t
634
636
@@ -988,6 +990,8 @@ end = struct
988
990
| Type_expression_call ->
989
991
fprintf ppf " a call to [type_expression] via the ocaml API"
990
992
| Inside_of_Tarrow -> fprintf ppf " argument or result of a Tarrow"
993
+ | Wildcard -> fprintf ppf " a _ in a type"
994
+ | Unification_var -> fprintf ppf " a fresh unification variable"
991
995
992
996
let format_immediate_creation_reason ppf : immediate_creation_reason -> _ =
993
997
function
@@ -1359,6 +1363,8 @@ module Debug_printers = struct
1359
1363
| Dummy_jkind -> fprintf ppf " Dummy_jkind"
1360
1364
| Type_expression_call -> fprintf ppf " Type_expression_call"
1361
1365
| Inside_of_Tarrow -> fprintf ppf " Inside_of_Tarrow"
1366
+ | Wildcard -> fprintf ppf " Wildcard"
1367
+ | Unification_var -> fprintf ppf " Unification_var"
1362
1368
1363
1369
let immediate_creation_reason ppf : immediate_creation_reason -> _ = function
1364
1370
| Empty_record -> fprintf ppf " Empty_record"
Original file line number Diff line number Diff line change @@ -256,6 +256,8 @@ type any_creation_reason =
256
256
unified to correct levels *)
257
257
| Type_expression_call
258
258
| Inside_of_Tarrow
259
+ | Wildcard
260
+ | Unification_var
259
261
260
262
type float64_creation_reason = Primitive of Ident .t
261
263
Original file line number Diff line number Diff line change @@ -432,7 +432,7 @@ end = struct
432
432
433
433
let new_jkind ~is_named { jkind_initialization } =
434
434
match jkind_initialization with
435
- | Any -> Jkind. any ~why: Dummy_jkind
435
+ | Any -> Jkind. any ~why: ( if is_named then Unification_var else Wildcard )
436
436
| Sort -> Jkind. of_new_sort ~why: (if is_named then Unification_var else Wildcard )
437
437
438
438
You can’t perform that action at this time.
0 commit comments