diff options
author | Jacques Le Normand <rathereasy@gmail.com> | 2010-09-19 04:55:40 +0000 |
---|---|---|
committer | Jacques Le Normand <rathereasy@gmail.com> | 2010-09-19 04:55:40 +0000 |
commit | 56624533fb6f8e045ee3d2b18bd4c5a0246176eb (patch) | |
tree | ec061ca55f09e984da3ceec2e7eb4f2dc73ba4e4 /typing/btype.ml | |
parent | 8fc4a75a01551088be4202d322705a23f1049909 (diff) | |
download | ocaml-56624533fb6f8e045ee3d2b18bd4c5a0246176eb.tar.gz |
switched to abstract types, still needs work on exhaustion type. the code needs to be cleaned up. printfs need to be removed
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadts@10682 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'typing/btype.ml')
-rw-r--r-- | typing/btype.ml | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/typing/btype.ml b/typing/btype.ml index 759ed50f52..edfc4bee45 100644 --- a/typing/btype.ml +++ b/typing/btype.ml @@ -23,7 +23,7 @@ let generic_level = 100000000 (* Used to mark a type during a traversal. *) let lowest_level = 0 let pivot_level = 2 * lowest_level - 1 - (* pivot_level - lowest_level < lowest_level *) + (* pivot_level - lowest_level < lowest_level *) (**** Some type creators ****) @@ -197,6 +197,11 @@ let iter_type_expr f ty = | Tpoly (ty, tyl) -> f ty; List.iter f tyl | Tpackage (_, _, l) -> List.iter f l + + + + + let rec iter_abbrev f = function Mnil -> () | Mcons(_, _, ty, ty', rem) -> f ty; f ty'; iter_abbrev f rem @@ -286,7 +291,7 @@ let cleanup_types () = (* Mark a type. *) let rec mark_type ty = - let ty = repr ty in + let ty = repr ty in (* GAH : why do we call repr? *) if ty.level >= lowest_level then begin ty.level <- pivot_level - ty.level; iter_type_expr mark_type ty @@ -520,6 +525,7 @@ let backtrack (changes, old) = last_snapshot := old; Weak.set trail 0 (Some changes) + (**** Sets, maps and hashtables of types ****) module TypeSet = Set.Make(TypeOps) |