Skip to content

Commit

Permalink
[debug] Unification: In hope to understand how to fix OPA-728 :'(
Browse files Browse the repository at this point in the history
  • Loading branch information
fpessaux committed Aug 12, 2011
1 parent 0bf039c commit 6341cb2
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions libqmlcompil/typer_w/w_Unify.ml
Expand Up @@ -561,7 +561,9 @@ let rec __unify_simple_type env seen_expansions ty1 ty2 =
(* Same remark about trivially cyclic types than in the previous (* Same remark about trivially cyclic types than in the previous
match case. *) match case. *)
#<If:TYPER $minlevel 11> (* <---------- DEBUG *) #<If:TYPER $minlevel 11> (* <---------- DEBUG *)
OManager.printf "Case SType_named manifest / other@." ; OManager.printf "Case SType_named manifest / other: %a VERSUS %a@."
W_PrintTypes.pp_simple_type_start_sequence ty1
W_PrintTypes.pp_simple_type_end_sequence ty2 ;
#<End> ; (* <---------- END DEBUG *) #<End> ; (* <---------- END DEBUG *)
if ty1 == (W_CoreTypes.simple_type_repr manifest) then if ty1 == (W_CoreTypes.simple_type_repr manifest) then
raise raise
Expand All @@ -572,7 +574,9 @@ let rec __unify_simple_type env seen_expansions ty1 ty2 =
__unify_simple_type env seen_expansions ty2 manifest __unify_simple_type env seen_expansions ty2 manifest
| (_, (W_Algebra.SType_named { W_Algebra.nst_unwinded = Some manifest })) -> | (_, (W_Algebra.SType_named { W_Algebra.nst_unwinded = Some manifest })) ->
#<If:TYPER $minlevel 11> (* <---------- DEBUG *) #<If:TYPER $minlevel 11> (* <---------- DEBUG *)
OManager.printf "Case other / SType_named manifest@." ; OManager.printf "Case other / SType_named manifest: %a VERSUS %a@."
W_PrintTypes.pp_simple_type_start_sequence ty1
W_PrintTypes.pp_simple_type_end_sequence ty2 ;
#<End> ; (* <---------- END DEBUG *) #<End> ; (* <---------- END DEBUG *)
(* Same remark about trivially cyclic types than in the previous (* Same remark about trivially cyclic types than in the previous
match case. *) match case. *)
Expand All @@ -583,7 +587,9 @@ let rec __unify_simple_type env seen_expansions ty1 ty2 =
__unify_simple_type env seen_expansions ty1 manifest __unify_simple_type env seen_expansions ty1 manifest
| ((W_Algebra.SType_named { W_Algebra.nst_unwinded = None }), _) -> ( | ((W_Algebra.SType_named { W_Algebra.nst_unwinded = None }), _) -> (
#<If:TYPER $minlevel 11> (* <---------- DEBUG *) #<If:TYPER $minlevel 11> (* <---------- DEBUG *)
OManager.printf "Case SType_named non-manifest / other@." ; OManager.printf "Case SType_named non-manifest / other: %a VERSUS %a@."
W_PrintTypes.pp_simple_type_start_sequence ty1
W_PrintTypes.pp_simple_type_end_sequence ty2 ;
#<End> ; (* <---------- END DEBUG *) #<End> ; (* <---------- END DEBUG *)
let (ty1', seen_expansions') = let (ty1', seen_expansions') =
W_TypeAbbrevs.incrementally_expand_abbrev env seen_expansions ty1 in W_TypeAbbrevs.incrementally_expand_abbrev env seen_expansions ty1 in
Expand All @@ -599,7 +605,9 @@ let rec __unify_simple_type env seen_expansions ty1 ty2 =
) )
| (_, (W_Algebra.SType_named { W_Algebra.nst_unwinded = None })) -> ( | (_, (W_Algebra.SType_named { W_Algebra.nst_unwinded = None })) -> (
#<If:TYPER $minlevel 11> (* <---------- DEBUG *) #<If:TYPER $minlevel 11> (* <---------- DEBUG *)
OManager.printf "Case other / SType_named non-manifest@." ; OManager.printf "Case other / SType_named non-manifest: %a VERSUS %a@."
W_PrintTypes.pp_simple_type_start_sequence ty1
W_PrintTypes.pp_simple_type_end_sequence ty2 ;
#<End> ; (* <---------- END DEBUG *) #<End> ; (* <---------- END DEBUG *)
let (ty2', seen_expansions') = let (ty2', seen_expansions') =
W_TypeAbbrevs.incrementally_expand_abbrev env seen_expansions ty2 in W_TypeAbbrevs.incrementally_expand_abbrev env seen_expansions ty2 in
Expand Down

0 comments on commit 6341cb2

Please sign in to comment.