From 80f24b747c75805ab47e3929ad9a14e004183f02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Pasteur?= Date: Mon, 26 Sep 2011 10:19:48 +0200 Subject: [PATCH] Updated comments --- compiler/global/names.ml | 3 +-- compiler/heptagon/hept_printer.ml | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/global/names.ml b/compiler/global/names.ml index 31f76b7..e5d499a 100644 --- a/compiler/global/names.ml +++ b/compiler/global/names.ml @@ -93,8 +93,7 @@ open Format let print_name ff n = let n = if is_infix n - then "(" ^ (n ^ ")") (* do not remove the space around n, since for example - "(*" would create bugs *) + then "(" ^ (n ^ ")") (* printers should have a special case to print '*' infix *) else n in fprintf ff "%s" n diff --git a/compiler/heptagon/hept_printer.ml b/compiler/heptagon/hept_printer.ml index d0a0c66..596e4d0 100644 --- a/compiler/heptagon/hept_printer.ml +++ b/compiler/heptagon/hept_printer.ml @@ -167,6 +167,7 @@ and print_every ff reset = and print_app ff (app, args) = match app.a_op with | Etuple -> print_exp_tuple ff args + (* we need a special case for '*' and '*.' as printing (_*_) is incorrect *) | Efun { name = n } when (n = "*" or n = "*.") -> let a1, a2 = assert_2 args in fprintf ff "@[%a@, %s@, %a@]" print_exp a1 n print_exp a2