diff --git a/.ocamlformat b/.ocamlformat index 484d5d0d..dfe4da87 100644 --- a/.ocamlformat +++ b/.ocamlformat @@ -4,4 +4,4 @@ exp-grouping = preserve break-fun-decl = smart wrap-comments parse-docstrings -version=0.20.1 +version=0.21.0 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d5fd3af5..95f5acbb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -89,7 +89,7 @@ You can look at the [online OCaml documentation](https://catala-lang.org/ocaml_docs/) for the different modules' interfaces as well as high-level architecture documentation. -Please note that the `ocamlformat` version this project uses is `0.20.1`. +Please note that the `ocamlformat` version this project uses is `0.21.0`. Using another version may cause spurious diffs to appear in your pull requests. ### Example: adding a builtin function diff --git a/Makefile b/Makefile index 905cf269..29414dd8 100644 --- a/Makefile +++ b/Makefile @@ -41,7 +41,7 @@ COMPILER_DIR=compiler BUILD_SYSTEM_DIR=build_system format: - dune build @fmt --auto-promote + dune build @fmt --auto-promote >/dev/null #> build_dev : Builds the Catala compiler, without formatting code build_dev: diff --git a/compiler/dcalc/ast.ml b/compiler/dcalc/ast.ml index 281096f7..e22f9cb7 100644 --- a/compiler/dcalc/ast.ml +++ b/compiler/dcalc/ast.ml @@ -481,8 +481,7 @@ let make_let_in let empty_thunked_term : expr Pos.marked = let silent = Var.make ("_", Pos.no_pos) in Bindlib.unbox - (make_abs - (Array.of_list [ silent ]) + (make_abs (Array.of_list [ silent ]) (Bindlib.box (ELit LEmptyError, Pos.no_pos)) Pos.no_pos [ (TLit TUnit, Pos.no_pos) ] @@ -611,9 +610,7 @@ let build_whole_scope_expr (pos_scope : Pos.t) : 'expr Pos.marked Bindlib.box = let var, body_expr = Bindlib.unbind body.scope_body_expr in let body_expr = unfold_scope_body_expr ~box_expr ~make_let_in ctx body_expr in - make_abs - (Array.of_list [ var ]) - body_expr pos_scope + make_abs (Array.of_list [ var ]) body_expr pos_scope [ ( TTuple ( List.map snd diff --git a/compiler/desugared/ast.ml b/compiler/desugared/ast.ml index 3e0398e7..5a05affb 100644 --- a/compiler/desugared/ast.ml +++ b/compiler/desugared/ast.ml @@ -321,9 +321,7 @@ let make_let_in (e2 : expr Pos.marked Bindlib.box) : expr Pos.marked Bindlib.box = Bindlib.box_apply2 (fun e u -> (EApp (e, u), Pos.get_position (Bindlib.unbox e2))) - (make_abs - (Array.of_list [ x ]) - e2 + (make_abs (Array.of_list [ x ]) e2 (Pos.get_position (Bindlib.unbox e2)) [ tau ] (Pos.get_position (Bindlib.unbox e2))) diff --git a/compiler/scopelang/ast.ml b/compiler/scopelang/ast.ml index 5793112f..c2e57127 100644 --- a/compiler/scopelang/ast.ml +++ b/compiler/scopelang/ast.ml @@ -193,9 +193,7 @@ let make_let_in (e2 : expr Pos.marked Bindlib.box) : expr Pos.marked Bindlib.box = Bindlib.box_apply2 (fun e u -> (EApp (e, u), Pos.get_position (Bindlib.unbox e2))) - (make_abs - (Array.of_list [ x ]) - e2 + (make_abs (Array.of_list [ x ]) e2 (Pos.get_position (Bindlib.unbox e2)) [ tau ] (Pos.get_position (Bindlib.unbox e2)))