diff options
-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) |