mirror of
https://github.com/CatalaLang/catala.git
synced 2024-09-19 16:28:12 +03:00
Upgrade ocamlformat version
This commit is contained in:
parent
6cb0d581a6
commit
ac85d8dbb4
@ -4,4 +4,4 @@ exp-grouping = preserve
|
|||||||
break-fun-decl = smart
|
break-fun-decl = smart
|
||||||
wrap-comments
|
wrap-comments
|
||||||
parse-docstrings
|
parse-docstrings
|
||||||
version=0.20.1
|
version=0.21.0
|
||||||
|
@ -89,7 +89,7 @@ You can look at the
|
|||||||
[online OCaml documentation](https://catala-lang.org/ocaml_docs/) for the
|
[online OCaml documentation](https://catala-lang.org/ocaml_docs/) for the
|
||||||
different modules' interfaces as well as high-level architecture documentation.
|
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.
|
Using another version may cause spurious diffs to appear in your pull requests.
|
||||||
|
|
||||||
### Example: adding a builtin function
|
### Example: adding a builtin function
|
||||||
|
2
Makefile
2
Makefile
@ -41,7 +41,7 @@ COMPILER_DIR=compiler
|
|||||||
BUILD_SYSTEM_DIR=build_system
|
BUILD_SYSTEM_DIR=build_system
|
||||||
|
|
||||||
format:
|
format:
|
||||||
dune build @fmt --auto-promote
|
dune build @fmt --auto-promote >/dev/null
|
||||||
|
|
||||||
#> build_dev : Builds the Catala compiler, without formatting code
|
#> build_dev : Builds the Catala compiler, without formatting code
|
||||||
build_dev:
|
build_dev:
|
||||||
|
@ -481,8 +481,7 @@ let make_let_in
|
|||||||
let empty_thunked_term : expr Pos.marked =
|
let empty_thunked_term : expr Pos.marked =
|
||||||
let silent = Var.make ("_", Pos.no_pos) in
|
let silent = Var.make ("_", Pos.no_pos) in
|
||||||
Bindlib.unbox
|
Bindlib.unbox
|
||||||
(make_abs
|
(make_abs (Array.of_list [ silent ])
|
||||||
(Array.of_list [ silent ])
|
|
||||||
(Bindlib.box (ELit LEmptyError, Pos.no_pos))
|
(Bindlib.box (ELit LEmptyError, Pos.no_pos))
|
||||||
Pos.no_pos
|
Pos.no_pos
|
||||||
[ (TLit TUnit, 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 =
|
(pos_scope : Pos.t) : 'expr Pos.marked Bindlib.box =
|
||||||
let var, body_expr = Bindlib.unbind body.scope_body_expr in
|
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
|
let body_expr = unfold_scope_body_expr ~box_expr ~make_let_in ctx body_expr in
|
||||||
make_abs
|
make_abs (Array.of_list [ var ]) body_expr pos_scope
|
||||||
(Array.of_list [ var ])
|
|
||||||
body_expr pos_scope
|
|
||||||
[
|
[
|
||||||
( TTuple
|
( TTuple
|
||||||
( List.map snd
|
( List.map snd
|
||||||
|
@ -321,9 +321,7 @@ let make_let_in
|
|||||||
(e2 : expr Pos.marked Bindlib.box) : expr Pos.marked Bindlib.box =
|
(e2 : expr Pos.marked Bindlib.box) : expr Pos.marked Bindlib.box =
|
||||||
Bindlib.box_apply2
|
Bindlib.box_apply2
|
||||||
(fun e u -> (EApp (e, u), Pos.get_position (Bindlib.unbox e2)))
|
(fun e u -> (EApp (e, u), Pos.get_position (Bindlib.unbox e2)))
|
||||||
(make_abs
|
(make_abs (Array.of_list [ x ]) e2
|
||||||
(Array.of_list [ x ])
|
|
||||||
e2
|
|
||||||
(Pos.get_position (Bindlib.unbox e2))
|
(Pos.get_position (Bindlib.unbox e2))
|
||||||
[ tau ]
|
[ tau ]
|
||||||
(Pos.get_position (Bindlib.unbox e2)))
|
(Pos.get_position (Bindlib.unbox e2)))
|
||||||
|
@ -193,9 +193,7 @@ let make_let_in
|
|||||||
(e2 : expr Pos.marked Bindlib.box) : expr Pos.marked Bindlib.box =
|
(e2 : expr Pos.marked Bindlib.box) : expr Pos.marked Bindlib.box =
|
||||||
Bindlib.box_apply2
|
Bindlib.box_apply2
|
||||||
(fun e u -> (EApp (e, u), Pos.get_position (Bindlib.unbox e2)))
|
(fun e u -> (EApp (e, u), Pos.get_position (Bindlib.unbox e2)))
|
||||||
(make_abs
|
(make_abs (Array.of_list [ x ]) e2
|
||||||
(Array.of_list [ x ])
|
|
||||||
e2
|
|
||||||
(Pos.get_position (Bindlib.unbox e2))
|
(Pos.get_position (Bindlib.unbox e2))
|
||||||
[ tau ]
|
[ tau ]
|
||||||
(Pos.get_position (Bindlib.unbox e2)))
|
(Pos.get_position (Bindlib.unbox e2)))
|
||||||
|
Loading…
Reference in New Issue
Block a user