diff options
author | Jacques Garrigue <garrigue at math.nagoya-u.ac.jp> | 2006-12-21 12:07:53 +0000 |
---|---|---|
committer | Jacques Garrigue <garrigue at math.nagoya-u.ac.jp> | 2006-12-21 12:07:53 +0000 |
commit | a4fe6ac9606e599257389046dfe8068db901b2da (patch) | |
tree | 97826f83d663de55397f6421728c97ff6422bd23 | |
parent | b5eb82e24d5838338ee2bb9dd6ef78dff95a5118 (diff) |
keep sharing when not using -principal
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7778 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r-- | typing/typetexp.ml | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/typing/typetexp.ml b/typing/typetexp.ml index 8c954e4f4..5171adf1b 100644 --- a/typing/typetexp.ml +++ b/typing/typetexp.ml @@ -248,7 +248,7 @@ let rec transl_type env policy styp = end; ty with Not_found -> - begin_def (); + if !Clflags.principal then begin_def (); let t = newvar () in used_variables := Tbl.add alias (t, styp.ptyp_loc) !used_variables; let ty = transl_type env policy st in @@ -256,8 +256,10 @@ let rec transl_type env policy styp = let trace = swap_list trace in raise(Error(styp.ptyp_loc, Alias_type_mismatch trace)) end; - end_def (); - generalize_structure t; + if !Clflags.principal then begin + end_def (); + generalize_structure t; + end; instance t end | Ptyp_variant(fields, closed, present) -> |