summaryrefslogtreecommitdiffstats
path: root/typing
diff options
context:
space:
mode:
authorJacques Garrigue <garrigue at math.nagoya-u.ac.jp>1999-12-08 17:25:36 +0000
committerJacques Garrigue <garrigue at math.nagoya-u.ac.jp>1999-12-08 17:25:36 +0000
commitb1231d6d1d68c0151a744919bec073d3940cc11e (patch)
tree7ea7c18581c634836fccf291456d0932f2728e5b /typing
parent77d4f18ce657800ebd85530c510521b467d7c3dd (diff)
variant types
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2678 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'typing')
-rw-r--r--typing/printtyp.ml10
1 files changed, 7 insertions, 3 deletions
diff --git a/typing/printtyp.ml b/typing/printtyp.ml
index 81e3e19e1..aa8e9e799 100644
--- a/typing/printtyp.ml
+++ b/typing/printtyp.ml
@@ -285,14 +285,18 @@ let rec typexp sch prio0 ty =
if not (row.row_closed && all_present) && sch &&
px.level <> generic_level then print_string "_["
else print_char '[';
- if row.row_closed && all_present then () else
- if all_present then print_char '>' else print_char '<';
+ if all_present then begin
+ if row.row_closed then () else
+ if fields = [] then print_string "< .." else
+ print_char '>'
+ end else
+ print_char '<';
print_list (row_field sch) (fun () -> printf "@,|") fields;
if not (row.row_closed || all_present) then printf "@,| ..";
if present <> [] && not all_present then begin
print_space ();
open_hovbox 2;
- print_string "|>";
+ print_string ">";
print_list (fun (s,_) -> print_char '`'; print_string s)
print_space present;
close_box ()