summaryrefslogtreecommitdiffstats
path: root/typing/typedecl.ml
diff options
context:
space:
mode:
Diffstat (limited to 'typing/typedecl.ml')
-rw-r--r--typing/typedecl.ml5
1 files changed, 3 insertions, 2 deletions
diff --git a/typing/typedecl.ml b/typing/typedecl.ml
index f53b893d1..d1e0be5ea 100644
--- a/typing/typedecl.ml
+++ b/typing/typedecl.ml
@@ -444,7 +444,7 @@ let check_recursion env loc path decl to_check =
end;
List.iter (check_regular cpath args prev_exp) args'
| Tpoly (ty, tl) ->
- let (_, ty) = Ctype.instance_poly false tl ty in
+ let (_, ty) = Ctype.instance_poly ~keep_names:true false tl ty in
check_regular cpath args prev_exp ty
| _ ->
Btype.iter_type_expr (check_regular cpath args prev_exp) ty
@@ -463,7 +463,8 @@ let check_recursion env loc path decl to_check =
(* Check that recursion is regular *)
if decl.type_params = [] then () else
let (args, body) =
- Ctype.instance_parameterized_type decl.type_params body in
+ Ctype.instance_parameterized_type
+ ~keep_names:true decl.type_params body in
check_regular path args [] body
let check_abbrev_recursion env id_loc_list (id, _, tdecl) =