From 273a86816238b156938fda9e432f2f6644895c3b Mon Sep 17 00:00:00 2001 From: Benjamin Loison Date: Sun, 18 Dec 2022 14:45:23 +0100 Subject: [PATCH] Simplify `cp_value` for boolean constants in `src/cprint.ml` --- src/cprint.ml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/cprint.ml b/src/cprint.ml index d5a1662..a36ca3e 100644 --- a/src/cprint.ml +++ b/src/cprint.ml @@ -119,8 +119,7 @@ let rec cp_value fmt (value, (hloc: (ident * bool, string * int) Hashtbl.t)) = | CVariable (CVInput s) -> Format.fprintf fmt "%s" s | CVariable (CVStored (arr, idx)) -> Format.fprintf fmt "state->%s[%d]" arr idx | CConst (CInt i) -> Format.fprintf fmt "%d" i - | CConst (CBool true) -> Format.fprintf fmt "true" - | CConst (CBool false) -> Format.fprintf fmt "false" + | CConst (CBool b) -> Format.fprintf fmt "%s" (Bool.to_string b) | CConst (CReal r) -> Format.fprintf fmt "%f" r | CMonOp (MOp_not, v) -> Format.fprintf fmt "! (%a)" cp_value (v, hloc) | CMonOp (MOp_minus, v) -> Format.fprintf fmt "- (%a)" cp_value (v, hloc)