summaryrefslogtreecommitdiffstats
path: root/typing/typedecl.ml
diff options
context:
space:
mode:
authorJacques Garrigue <garrigue at math.nagoya-u.ac.jp>2012-06-01 05:12:44 +0000
committerJacques Garrigue <garrigue at math.nagoya-u.ac.jp>2012-06-01 05:12:44 +0000
commit6219455e62d20cb17eb7bdcb4faa742128c1b4ac (patch)
treebff1ce78a59ef3617e9d1043a99b63cc77fa34ad /typing/typedecl.ml
parenta430934c06bf4737d963b43da69b1d5203dc20bf (diff)
Fix PR#5224
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12533 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
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) =