From 688e0bce71ca6d11e8223d912959d1fb63542a4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9onard=20G=C3=A9rard?= Date: Mon, 14 Feb 2011 16:28:50 +0100 Subject: [PATCH] Bug fix in Typing. --- compiler/global/global_printer.ml | 3 ++- compiler/global/types.ml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/compiler/global/global_printer.ml b/compiler/global/global_printer.ml index 814895c..a009006 100644 --- a/compiler/global/global_printer.ml +++ b/compiler/global/global_printer.ml @@ -48,7 +48,8 @@ and print_type ff = function | Tid id -> print_qualname ff id | Tarray (ty, n) -> fprintf ff "@[%a^%a@]" print_type ty print_static_exp n - | Tunit -> fprintf ff "()" + | Tunit -> fprintf ff "unit" + let print_field ff field = fprintf ff "@[%a: %a@]" print_qualname field.f_name print_type field.f_type diff --git a/compiler/global/types.ml b/compiler/global/types.ml index c2832b0..d23b0a9 100644 --- a/compiler/global/types.ml +++ b/compiler/global/types.ml @@ -35,7 +35,7 @@ and ty = let invalid_type = Tprod [] let prod = function - | [] -> assert false + | [] -> Tunit | [ty] -> ty | ty_list -> Tprod ty_list