Skip to content

Commit 93cda2f

Browse files
authored
Merge pull request #1512 from stan-dev/fmt.0.10.0
Bump fmt to 0.10.0
2 parents bd59dd7 + 2d3f4a4 commit 93cda2f

File tree

7 files changed

+11
-11
lines changed

7 files changed

+11
-11
lines changed

docs/dependencies.mld

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ These are automatically installed through the [scripts/install_ocaml.sh] and
1515
- {{:https://v3.ocaml.org/p/core/latest/doc/index.html}Core} v0.16.1 (a standard library replacement)
1616
- {{:http://gallium.inria.fr/~fpottier/menhir/manual.html}Menhir} 20230608 (a parser generator and parsing library)
1717
- {{:https://github.com/ocaml-ppx/ppx_deriving}ppx_deriving} 5.2.1 (a tool for generating boilerplate code)
18-
- {{:https://erratique.ch/software/fmt}fmt} 0.9.0 (a library for pretty-printing of formatted text)
18+
- {{:https://erratique.ch/software/fmt}fmt} 0.10.0 (a library for pretty-printing of formatted text)
1919
- {{:https://erratique.ch/software/cmdliner}cmdliner} 1.3.0 (a library for command line parsing)
2020
- yojson 2.1.0 (a library for producing JSON files)
2121

dune-project

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
(ppx_deriving
2222
(= 5.2.1))
2323
(fmt
24-
(= 0.9.0))
24+
(= 0.10.0))
2525
(yojson
2626
(= 2.1.0))
2727
(cmdliner

scripts/install_build_deps.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ eval $(opam env)
77

88
opam pin -y core v0.16.0 --no-action
99

10-
opam install -y dune core.v0.16.0 menhir.20230608 ppx_deriving.5.2.1 fmt.0.9.0 yojson.2.1.0 cmdliner.1.3.0
10+
opam install -y dune core.v0.16.0 menhir.20230608 ppx_deriving.5.2.1 fmt.0.10.0 yojson.2.1.0 cmdliner.1.3.0
1111

1212
eval $(opam env)

scripts/install_build_deps_windows.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ opam install -y "ocaml-windows64=4.14.1"
1717

1818
# Install dependencies
1919
opam install -y core.v0.16.1 core-windows.v0.16.1 menhir.20230608 menhir-windows.20230608 ppx_deriving.5.2.1 ppx_deriving-windows.5.2.1\
20-
fmt.0.9.0 fmt-windows.0.9.0 yojson.2.1.0 yojson-windows.2.1.0 cmdliner.1.3.0 cmdliner-windows.1.3.0
20+
fmt.0.10.0 fmt-windows.0.10.0 yojson.2.1.0 yojson-windows.2.1.0 cmdliner.1.3.0 cmdliner-windows.1.3.0
2121

2222
eval $(opam env)

src/frontend/SignatureMismatch.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ let pp_math_lib_assignmentoperator_sigs ppf (lt, op) =
435435
Fmt.pf ppf "@[<v>%a%a@]"
436436
(Fmt.list ~sep:Fmt.cut UnsizedType.pp_math_sig)
437437
signatures
438-
(if omitted then Fmt.pf else Fmt.nop)
438+
Fmt.(if' omitted pf)
439439
"@ (Additional signatures omitted)" in
440440
Fmt.pf ppf "%a"
441441
(Fmt.option ~none:(Fmt.any "No matching signatures") pp_sigs)

src/stan_math_backend/Cpp.ml

+5-5
Original file line numberDiff line numberDiff line change
@@ -645,13 +645,13 @@ module Printing = struct
645645

646646
let pp_constructor ppf (name, {args; init_list; body}) =
647647
let pp_init ppf (id, es) = pf ppf "%s(%a)" id (list ~sep:comma pp_expr) es in
648-
let pp_inits =
649-
if List.length init_list = 0 then Fmt.nop
650-
else fun ppf inits -> pf ppf ": @[%a@] " (list ~sep:comma pp_init) inits
651-
in
648+
let pp_inits ppf inits =
649+
pf ppf ": @[%a@] " (list ~sep:comma pp_init) inits in
652650
pf ppf "@[<v 2>@[<hov 4>%s(@[%a@])@ %a@]{@,%a@]@,}" name
653651
(list ~sep:comma (pair ~sep:sp pp_type_ pp_identifier))
654-
args pp_inits init_list (list ~sep:cut pp_stmt) body
652+
args
653+
(if' (not (List.is_empty init_list)) pp_inits)
654+
init_list (list ~sep:cut pp_stmt) body
655655

656656
let rec pp_directive ppf direct =
657657
match direct with

stanc.opam

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ depends: [
77
"core" {= "v0.16.1"}
88
"menhir" {= "20230608"}
99
"ppx_deriving" {= "5.2.1"}
10-
"fmt" {= "0.9.0"}
10+
"fmt" {= "0.10.0"}
1111
"yojson" {= "2.1.0"}
1212
"cmdliner" {= "1.3.0"}
1313
"ocamlformat" {with-test & = "0.26.1"}

0 commit comments

Comments
 (0)