From cd48a79e8fd18d343435be0b4d262dc100a83bae Mon Sep 17 00:00:00 2001 From: Jan Midtgaard Date: Wed, 25 Jun 2025 14:09:14 +0200 Subject: [PATCH 1/3] Fix Lin int32 and int64 printer to add 'l' and 'L' suffixes --- lib/lin.ml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/lin.ml b/lib/lin.ml index a2b5c790..912070a1 100644 --- a/lib/lin.ml +++ b/lib/lin.ml @@ -181,9 +181,9 @@ let int = GenDeconstr (QCheck.int, QCheck.Print.int, (=)) let int_small = GenDeconstr (QCheck.small_int, QCheck.Print.int, (=)) let int_pos = GenDeconstr (QCheck.pos_int, QCheck.Print.int, (=)) let int_bound b = GenDeconstr (QCheck.int_bound b, QCheck.Print.int, (=)) -let int32 = GenDeconstr (QCheck.int32, Int32.to_string, Int32.equal) -let int64 = GenDeconstr (QCheck.int64, Int64.to_string, Int64.equal) -let nat64_small = GenDeconstr (qcheck_nat64_small, Int64.to_string, Int64.equal) +let int32 = GenDeconstr (QCheck.int32, QCheck.Print.int32, Int32.equal) +let int64 = GenDeconstr (QCheck.int64, QCheck.Print.int64, Int64.equal) +let nat64_small = GenDeconstr (qcheck_nat64_small, QCheck.Print.int64, Int64.equal) let float = GenDeconstr (QCheck.float, QCheck.Print.float, Float.equal) let string = GenDeconstr (string, QCheck.Print.string, String.equal) let string_small = GenDeconstr (string_small, QCheck.Print.string, String.equal) From 6cf94a6779eb753a3832dcd3c15b106e93350f0d Mon Sep 17 00:00:00 2001 From: Jan Midtgaard Date: Wed, 25 Jun 2025 14:09:26 +0200 Subject: [PATCH 2/3] Fix STM int32 and int64 printer to add 'l' and 'L' suffixes --- lib/STM.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/STM.ml b/lib/STM.ml index 88090b71..142972d3 100644 --- a/lib/STM.ml +++ b/lib/STM.ml @@ -27,8 +27,8 @@ let unit = (Unit, QCheck.Print.unit) let bool = (Bool, QCheck.Print.bool) let char = (Char, QCheck.Print.char) let int = (Int, QCheck.Print.int) -let int32 = (Int32, Int32.to_string) -let int64 = (Int64, Int64.to_string) +let int32 = (Int32, QCheck.Print.int32) +let int64 = (Int64, QCheck.Print.int64) let float = (Float, QCheck.Print.float) let string = (String, QCheck.Print.string) let bytes = (Bytes, QCheck.Print.bytes) From 0808b2f72fefe51afcfa81610e2496df379e09c6 Mon Sep 17 00:00:00 2001 From: Jan Midtgaard Date: Wed, 25 Jun 2025 14:09:43 +0200 Subject: [PATCH 3/3] Add CHANGES entry --- CHANGES.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index f911673d..db696257 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,6 +2,8 @@ ## NEXT RELEASE +- #562: Fix the `int32` and `int64` printers in both `Lin` and `STM` to add + missing `l` and `L` suffixes on literals. - #560: Change `Lin.{constructible,deconstructible}` from an empty variant type to an abstract type to get `Lin` compiling on `5.5.0+trunk` again, due to https://github.com/ocaml/ocaml/pull/13994 removing special handling