Browse files

[fix] compiler, typer: The TM_export_cyclic mark should seen as TM_no…

…t_seen out of exportation
  • Loading branch information...
1 parent d267726 commit b9ccc6961b41ee35f7b953cea9c9796a0c25fd4b @BourgerieQuentin BourgerieQuentin committed Dec 4, 2012
View
7 compiler/libqmlcompil/typer_w/w_PrintTypes.ml
@@ -20,11 +20,11 @@
*)
-type print_level =
+type print_level =
| Function
| Function_With_N_Arguments
| Function_With_Some_SubType
- | Complete_Type
+ | Complete_Type
type context = {
mutable print_level : print_level ;
@@ -35,7 +35,7 @@ type context = {
(* depends *)
module Format = Base.Format
-let context =
+let context =
{ print_level = Complete_Type;
print_fake_record = false ;
error_type1 = W_CoreTypes.type_int () ;
@@ -220,6 +220,7 @@ let rec __prepare_print_simple_type ty =
| W_Algebra.TM_print_prep_seen xtimes ->
(* Increment the number of times the type was seen. *)
incr xtimes
+ | W_Algebra.TM_export_cyclic _
| W_Algebra.TM_not_seen | W_Algebra.TM_print_prep_seen_not_rec-> (
(* The type was never seen of just seen but as non-recursive. We will
tell that temporarily, if it seen without telling if it is
View
5 compiler/libqmlcompil/typer_w/w_SchemeGenAndInst.ml
@@ -1,5 +1,5 @@
(*
- Copyright © 2011 MLstate
+ Copyright © 2011, 2012 MLstate
This file is part of Opa.
@@ -99,7 +99,7 @@ let __generalize ~forbid_non_gen_vars ~extra_variables initial_ty =
1) This variable is shared with another function whose type was already
generalized. In this case the variable will not yet be in effect in
the list of the scheme's parameters we are bulding.
- 2) This variable is the one of a type forall present in the type we are
+ 2) This variable is the one of a type forall present in the type we are
generalizing. In this case, this variable *must* not be inserted in
the list the the parameters of the scheme we are bulding since it
already belongs to the type forall's scheme.
@@ -443,6 +443,7 @@ let (__specialize, specialize_with_given_variables_mapping) =
| W_Algebra.TM_copy_copied_as aliased_as ->
(* Type was already seen. Its copy is recorded here. *)
aliased_as
+ | W_Algebra.TM_export_cyclic _
| W_Algebra.TM_not_seen -> (
(* We must say we already saw ourself before recursing on the type
structure, otherwise we can loop. Because we don't still know

0 comments on commit b9ccc69

Please sign in to comment.