mirror of
https://github.com/CatalaLang/catala.git
synced 2024-09-19 16:28:12 +03:00
Format code
This commit is contained in:
parent
d3c27799de
commit
51ea9d8cff
@ -917,12 +917,14 @@ let translate_scope_decl
|
||||
ctx scope_variables
|
||||
in
|
||||
let date_rounding : date_rounding =
|
||||
match List.find_opt
|
||||
(function Desugared.Ast.DateRounding _ -> true)
|
||||
sigma.scope_options with
|
||||
| Some (Desugared.Ast.DateRounding Desugared.Ast.Increasing) -> RoundUp
|
||||
| Some (DateRounding Decreasing) -> RoundDown
|
||||
| None -> AbortOnRound
|
||||
match
|
||||
List.find_opt
|
||||
(function Desugared.Ast.DateRounding _ -> true)
|
||||
sigma.scope_options
|
||||
with
|
||||
| Some (Desugared.Ast.DateRounding Desugared.Ast.Increasing) -> RoundUp
|
||||
| Some (DateRounding Decreasing) -> RoundDown
|
||||
| None -> AbortOnRound
|
||||
in
|
||||
let ctx = { ctx with date_rounding } in
|
||||
let scope_input_var = scope_sig.scope_sig_input_var in
|
||||
|
@ -1151,7 +1151,11 @@ let process_scope_use_item
|
||||
| Surface.Ast.Decreasing -> Ast.Decreasing
|
||||
in
|
||||
let new_scope =
|
||||
match List.find_opt (fun scope_opt -> scope_opt = Ast.DateRounding _) scope.scope_options with
|
||||
match
|
||||
List.find_opt
|
||||
(fun scope_opt -> scope_opt = Ast.DateRounding _)
|
||||
scope.scope_options
|
||||
with
|
||||
| Some _ ->
|
||||
Errors.raise_spanned_error (Marked.get_mark item)
|
||||
"A date rounding mode has already been specified"
|
||||
|
Loading…
Reference in New Issue
Block a user