diff options
author | Jacques Garrigue <garrigue at math.nagoya-u.ac.jp> | 2011-07-29 01:39:09 +0000 |
---|---|---|
committer | Jacques Garrigue <garrigue at math.nagoya-u.ac.jp> | 2011-07-29 01:39:09 +0000 |
commit | d89c73b659e08bf2260563e3d37d480c9d2b130c (patch) | |
tree | 29e6fdd4b9be4ae315a04bae51a5a95c77d3a2ca | |
parent | 3b507dd1aa286684543a35cc7da763feebf9aa8d (diff) |
allow using Printyp.raw_type_expr in Btype
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11157 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r-- | typing/btype.ml | 5 | ||||
-rw-r--r-- | typing/btype.mli | 4 | ||||
-rw-r--r-- | typing/printtyp.ml | 2 |
3 files changed, 11 insertions, 0 deletions
diff --git a/typing/btype.ml b/typing/btype.ml index faba4a4c9..97870badd 100644 --- a/typing/btype.ml +++ b/typing/btype.ml @@ -16,6 +16,11 @@ open Types +(**** Forward declarations ****) + +let print_raw = + ref (fun _ -> assert false : Format.formatter -> type_expr -> unit) + (**** Type level management ****) let generic_level = 100000000 diff --git a/typing/btype.mli b/typing/btype.mli index 0d71e8397..7fe7344a6 100644 --- a/typing/btype.mli +++ b/typing/btype.mli @@ -153,3 +153,7 @@ val set_commu: commutable ref -> commutable -> unit (* Set references, logging the old value *) val log_type: type_expr -> unit (* Log the old value of a type, before modifying it by hand *) + +(**** Forward declarations ****) +val print_raw: (Format.formatter -> type_expr -> unit) ref + diff --git a/typing/printtyp.ml b/typing/printtyp.ml index 27adf0163..ec7ef07f9 100644 --- a/typing/printtyp.ml +++ b/typing/printtyp.ml @@ -183,6 +183,8 @@ let raw_type_expr ppf t = raw_type ppf t; visited := [] +let () = Btype.print_raw := raw_type_expr + (* Print a type expression *) let names = ref ([] : (type_expr * string) list) |