extraction: improved extraction of constants 0 and 1 of type int

parent f09527ac
...@@ -434,6 +434,8 @@ module Print = struct ...@@ -434,6 +434,8 @@ module Print = struct
| _ -> assert false in | _ -> assert false in
(match query_syntax info.info_literal id with (match query_syntax info.info_literal id with
| Some s -> syntax_arguments s print_constant fmt [e] | Some s -> syntax_arguments s print_constant fmt [e]
| None when n = "0" -> fprintf fmt "Z.zero"
| None when n = "1" -> fprintf fmt "Z.one"
| None -> fprintf fmt (protect_on paren "Z.of_string \"%s\"") n) | None -> fprintf fmt (protect_on paren "Z.of_string \"%s\"") n)
| Evar pvs -> | Evar pvs ->
(print_lident info) fmt (pv_name pvs) (print_lident info) fmt (pv_name pvs)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment