From 50113586e316f85efd98069b45fb9f2b339a1015 Mon Sep 17 00:00:00 2001 From: Denis Merigoux Date: Mon, 19 Jun 2023 17:08:16 +0200 Subject: [PATCH] With @aminata-dev update Messages.Content --- build_system/clerk_driver.ml | 2 +- compiler/catala_utils/message.ml | 195 ++++++++---------- compiler/catala_utils/message.mli | 42 ++-- compiler/driver.ml | 8 +- .../tests/test_nsw_social_housie.catala_en | 36 ++-- .../catala_legifrance/catala_legifrance.ml | 4 +- .../bad/division_by_zero.catala_en | 6 - .../bad/logical_prio.catala_en | 5 +- tests/test_array/bad/fold_error.catala_en | 3 - tests/test_bool/bad/bad_assert.catala_en | 3 - .../test_bool/bad/test_xor_with_int.catala_en | 3 - .../bad/rounding_option_conflict.catala_en | 2 - .../bad/uncomparable_duration.catala_en | 20 +- tests/test_default/bad/conflict.catala_en | 5 +- tests/test_default/bad/empty.catala_en | 5 +- .../bad/empty_with_rules.catala_en | 4 +- .../good/mutliple_definitions.catala_en | 2 - tests/test_enum/bad/ambiguous_cases.catala_en | 4 +- .../bad/ambiguous_wildcard.catala_en | 4 +- tests/test_enum/bad/duplicate_case.catala_en | 2 - tests/test_enum/bad/empty.catala_en | 4 +- tests/test_enum/bad/missing_case.catala_en | 2 - .../bad/not_ending_wildcard.catala_en | 4 - tests/test_enum/bad/quick_pattern_2.catala_en | 3 - tests/test_enum/bad/quick_pattern_3.catala_en | 3 - tests/test_enum/bad/quick_pattern_4.catala_en | 3 - .../bad/quick_pattern_fail.catala_en | 4 +- tests/test_enum/bad/too_many_cases.catala_en | 4 +- .../test_enum/bad/useless_wildcard.catala_en | 1 - tests/test_enum/bad/wrong_cons.catala_en | 6 +- .../ambiguous_unlabeled_exception.catala_en | 6 +- .../bad/dangling_exception.catala_en | 1 - .../bad/exceptions_cycle.catala_en | 6 +- .../missing_unlabeled_definition.catala_en | 1 - .../bad/one_ambiguous_exception.catala_en | 6 +- .../bad/self_exception.catala_en | 1 - .../bad/two_exceptions.catala_en | 5 +- .../good/double_definition.catala_en | 4 - tests/test_func/bad/bad_func.catala_en | 5 +- .../bad/param_inconsistency.catala_en | 5 +- .../bad/param_inconsistency2.catala_en | 5 +- .../bad/param_inconsistency3.catala_en | 5 +- tests/test_func/bad/recursive.catala_en | 4 +- tests/test_func/good/context_func.catala_en | 18 +- tests/test_io/bad/forgot_input.catala_en | 5 +- .../bad/inputing_to_not_input.catala_en | 6 +- tests/test_io/bad/redefining_input.catala_en | 5 +- tests/test_io/bad/using_non_output.catala_en | 7 +- tests/test_money/bad/no_mingle.catala_en | 3 - .../bad/toplevel_defs.catala_en | 1 - .../bad/dates_get_year-empty.catala_en | 5 +- tests/test_proof/bad/enums-empty.catala_en | 1 - .../bad/enums-nonbool-empty.catala_en | 1 - .../bad/enums-nonbool-overlap.catala_en | 1 - tests/test_proof/bad/enums-overlap.catala_en | 1 - .../test_proof/bad/enums_inj-empty.catala_en | 1 - .../bad/prolala_motivating_example.catala_en | 6 +- tests/test_proof/good/enums-arith.catala_en | 1 - tests/test_proof/good/enums-nonbool.catala_en | 1 - tests/test_proof/good/enums.catala_en | 1 - tests/test_scope/bad/cycle_in_scope.catala_en | 8 +- .../bad/cyclic_scope_calls.catala_en | 8 +- tests/test_scope/bad/cyclic_scopes.catala_en | 6 +- tests/test_scope/bad/scope.catala_en | 5 +- .../bad/scope_call_duplicate.catala_en | 1 - .../test_scope/bad/scope_call_extra.catala_en | 2 - .../bad/scope_call_missing.catala_en | 2 - .../bad/sub_vars_in_sub_var.catala_en | 4 +- tests/test_scope/good/nothing.catala_en | 1 - tests/test_struct/bad/bug_107.catala_en | 2 - tests/test_struct/bad/empty_struct.catala_en | 4 +- tests/test_struct/bad/nested.catala_en | 5 +- tests/test_struct/bad/nested2.catala_en | 7 - .../bad/nonexisting_struct.catala_en | 1 - .../bad/wrong_qualified_field.catala_en | 1 - .../good/ambiguous_fields.catala_en | 2 - .../good/same_name_fields.catala_en | 2 - tests/test_typing/bad/err1.catala_en | 3 - tests/test_typing/bad/err2.catala_en | 10 +- tests/test_typing/bad/err3.catala_en | 8 - tests/test_typing/bad/err4.catala_en | 6 - tests/test_typing/bad/err5.catala_en | 10 +- tests/test_typing/bad/err6.catala_en | 3 - .../bad/def_no_state.catala_en | 5 +- .../bad/double_same_state.catala_en | 5 +- .../bad/no_cross_exceptions.catala_en | 1 - .../bad/self_reference_first_state.catala_en | 4 +- .../bad/state_cycle.catala_en | 9 +- .../bad/unknown_state.catala_en | 2 - 89 files changed, 233 insertions(+), 401 deletions(-) diff --git a/build_system/clerk_driver.ml b/build_system/clerk_driver.ml index da5d1cb0..90a1432f 100644 --- a/build_system/clerk_driver.ml +++ b/build_system/clerk_driver.ml @@ -957,7 +957,7 @@ let driver | _ -> Message.raise_error "The command \"%s\" is unknown to clerk." command with Message.CompilerError content -> let bt = Printexc.get_raw_backtrace () in - Message.emit_content content Error; + Message.Content.emit content Error; if Printexc.backtrace_status () then Printexc.print_raw_backtrace stderr bt; return_err diff --git a/compiler/catala_utils/message.ml b/compiler/catala_utils/message.ml index 4d8863e0..5e7432a8 100644 --- a/compiler/catala_utils/message.ml +++ b/compiler/catala_utils/message.ml @@ -116,96 +116,76 @@ let pp_marker target ppf = module Content = struct type message = Format.formatter -> unit type position = { pos_message : message option; pos : Pos.t } - type suggestions = string list option - type t = { - message : message; - positions : position list; - suggestions : suggestions; - } + type message_element = + | MainMessage of message + | Position of position + | Suggestion of message + | Result of message - let of_message (message : message) : t = - { message; positions = []; suggestions = None } + type t = message_element list + + let of_message (message : message) : t = [MainMessage message] + let of_result (message : message) : t = [Result message] + let prepend_message (content : t) prefix : t = MainMessage prefix :: content + + let to_internal_error (content : t) : t = + let internal_error_prefix ppf = + Format.pp_print_string ppf + "Internal Error, please report to \ + https://github.com/CatalaLang/catala/issues." + in + prepend_message content internal_error_prefix + + let add_suggestion (content : t) (suggestion : message) = + content @ [Suggestion suggestion] let of_string (s : string) : t = - { - message = (fun ppf -> Format.pp_print_string ppf s); - positions = []; - suggestions = None; - } + [MainMessage (fun ppf -> Format.pp_print_string ppf s)] - let internal_error_prefix = - "Internal Error, please report to \ - https://github.com/CatalaLang/catala/issues: " - - let prepend_message (content : t) prefix : t = - { - content with - message = (fun ppf -> Format.fprintf ppf "%t@,%t" prefix content.message); - } - - let mark_as_internal_error (content : t) : t = - { - content with - message = - (fun ppf -> - Format.fprintf ppf "%s@,%t" internal_error_prefix content.message); - } + let emit (content : t) (target : content_type) : unit = + match Cli.globals.message_format with + | Cli.Human -> + let ppf = get_ppf target in + Format.fprintf ppf "@[%t%t%a@]@." (pp_marker target) + (fun (ppf : Format.formatter) -> + match content, target with + | MainMessage _ :: _, (Result | Error) -> Format.pp_print_space ppf () + | _ -> Format.pp_print_char ppf ' ') + (fun (ppf : Format.formatter) (message_elements : t) -> + Format.pp_print_list + ~pp_sep:(fun fmt () -> Format.fprintf fmt "@.") + (fun ppf (elt : message_element) -> + match elt with + | Position pos -> + Option.iter + (fun msg -> Format.fprintf ppf "%t@." msg) + pos.pos_message; + Pos.format_loc_text ppf pos.pos + | MainMessage msg -> msg ppf + | Result msg -> msg ppf + | Suggestion msg -> + Format.fprintf ppf "Maybe you wanted to write %t" msg) + ppf message_elements) + content + | Cli.GNU -> failwith "unimplemented until the message library stabilises" + (* (* The top message doesn't come with a position, which is not something the + GNU standard allows. So we look the position list and put the top message + everywhere there is not a more precise message. If we can't find a position + without a more precise message, we just take the first position in the list + to pair with the message. *) let ppf = get_ppf target in let () = if + positions != [] && List.for_all (fun (pos' : Content.position) -> + Option.is_some pos'.pos_message) positions then Format.fprintf ppf + "@{%s@}: %t %s@\n" (Pos.to_string_short (List.hd positions).pos) + (pp_marker target) (unformat message) in Format.pp_print_list + ~pp_sep:Format.pp_print_newline (fun ppf pos' -> Format.fprintf ppf + "@{%s@}: %t %s" (Pos.to_string_short pos'.pos) (pp_marker target) + (match pos'.pos_message with | None -> unformat message | Some msg' -> + unformat msg')) ppf positions *) end open Content -let emit_content (content : Content.t) (target : content_type) : unit = - let { message; positions; suggestions } = content in - match Cli.globals.message_format with - | Cli.Human -> - let ppf = get_ppf target in - Format.fprintf ppf "@[@[%t%t%t@]%a@]@." (pp_marker target) - (fun ppf -> - match target with - | Log | Error | Warning | Debug -> Format.pp_print_char ppf ' ' - | Result -> Format.pp_print_space ppf ()) - message - (fun ppf l -> - Format.pp_print_list - ~pp_sep:(fun _ () -> ()) - (fun ppf pos -> - Format.pp_print_cut ppf (); - Format.pp_print_cut ppf (); - Option.iter - (fun msg -> Format.fprintf ppf "%t@," msg) - pos.pos_message; - Pos.format_loc_text ppf pos.pos) - ppf l) - positions - | Cli.GNU -> - (* The top message doesn't come with a position, which is not something the - GNU standard allows. So we look the position list and put the top message - everywhere there is not a more precise message. If we can't find a - position without a more precise message, we just take the first position - in the list to pair with the message. *) - let ppf = get_ppf target in - let () = - if - positions != [] - && List.for_all - (fun (pos' : Content.position) -> Option.is_some pos'.pos_message) - positions - then - Format.fprintf ppf "@{%s@}: %t %s@\n" - (Pos.to_string_short (List.hd positions).pos) - (pp_marker target) (unformat message) - in - Format.pp_print_list ~pp_sep:Format.pp_print_newline - (fun ppf pos' -> - Format.fprintf ppf "@{%s@}: %t %s" - (Pos.to_string_short pos'.pos) - (pp_marker target) - (match pos'.pos_message with - | None -> unformat message - | Some msg' -> unformat msg')) - ppf positions - (** {1 Error exception} *) exception CompilerError of Content.t @@ -214,18 +194,18 @@ exception CompilerError of Content.t let raise_spanned_error ?(span_msg : Content.message option) + ?(suggestion : Content.message option) (span : Pos.t) - ?(suggestions : string list option) format = Format.kdprintf (fun message -> raise (CompilerError - { - message; - positions = [{ pos_message = span_msg; pos = span }]; - suggestions; - })) + ([ + MainMessage message; + Position { pos_message = span_msg; pos = span }; + ] + @ match suggestion with None -> [] | Some sug -> [Suggestion sug]))) format let raise_multispanned_error_full @@ -235,12 +215,10 @@ let raise_multispanned_error_full (fun message -> raise (CompilerError - { - message; - positions = - List.map (fun (pos_message, pos) -> { pos_message; pos }) spans; - suggestions = None; - })) + (MainMessage message + :: List.map + (fun (pos_message, pos) -> Position { pos_message; pos }) + spans))) format let raise_multispanned_error spans format = @@ -253,12 +231,14 @@ let raise_multispanned_error spans format = let raise_error format = Format.kdprintf - (fun message -> - raise (CompilerError { message; positions = []; suggestions = None })) + (fun message -> raise (CompilerError [MainMessage message])) format let raise_internal_error format = - raise_error ("%s" ^^ format) internal_error_prefix + Format.kdprintf + (fun message -> + raise (CompilerError (Content.to_internal_error [MainMessage message]))) + format (** {1 Warning printing}*) @@ -271,13 +251,11 @@ let emit_multispanned_warning format = Format.kdprintf (fun message -> - emit_content - { - message; - positions = - List.map (fun (pos_message, pos) -> { pos_message; pos }) pos; - suggestions = None; - } + Content.emit + (MainMessage message + :: List.map + (fun (pos_message, pos) -> Position { pos_message; pos }) + pos) Warning) format @@ -290,19 +268,14 @@ let emit_spanned_warning let emit_warning format = emit_multispanned_warning [] format let emit_log format = - Format.kdprintf - (fun message -> - emit_content { message; positions = []; suggestions = None } Log) - format + Format.kdprintf (fun message -> Content.emit [MainMessage message] Log) format let emit_debug format = Format.kdprintf - (fun message -> - emit_content { message; positions = []; suggestions = None } Debug) + (fun message -> Content.emit [MainMessage message] Debug) format let emit_result format = Format.kdprintf - (fun message -> - emit_content { message; positions = []; suggestions = None } Result) + (fun message -> Content.emit [MainMessage message] Result) format diff --git a/compiler/catala_utils/message.mli b/compiler/catala_utils/message.mli index 7d0204ad..5bae5054 100644 --- a/compiler/catala_utils/message.mli +++ b/compiler/catala_utils/message.mli @@ -27,21 +27,35 @@ (** {1 Message content} *) -module Content : sig - type message = Format.formatter -> unit - type position = { pos_message : message option; pos : Pos.t } - type suggestions = string list option - type t - - val of_message : (Format.formatter -> unit) -> t - val of_string : string -> t - val mark_as_internal_error : t -> t - val prepend_message : t -> (Format.formatter -> unit) -> t -end - type content_type = Error | Warning | Debug | Log | Result -val emit_content : Content.t -> content_type -> unit +module Content : sig + (** {2 Types}*) + + type message = Format.formatter -> unit + type t + + (** {2 Content creation}*) + + val of_message : message -> t + + val of_result : message -> t + (** Similar as [of_message] but tailored for when you want to print the result + of a value, etc. *) + + val of_string : string -> t + val prepend_message : t -> (Format.formatter -> unit) -> t + + (** {2 Content manipulation}*) + + val to_internal_error : t -> t + val add_suggestion : t -> message -> t + + (** {2 Content emission}*) + + val emit : t -> content_type -> unit +end + (** This functions emits the message according to the emission type defined by [Cli.message_format_flag]. *) @@ -53,8 +67,8 @@ exception CompilerError of Content.t val raise_spanned_error : ?span_msg:Content.message -> + ?suggestion:Content.message -> Pos.t -> - ?suggestions:string list -> ('a, Format.formatter, unit, 'b) format4 -> 'a diff --git a/compiler/driver.ml b/compiler/driver.ml index 28dbf5fe..311e00f1 100644 --- a/compiler/driver.ml +++ b/compiler/driver.ml @@ -124,7 +124,7 @@ module Passes = struct let bt = Printexc.get_raw_backtrace () in Printexc.raise_with_backtrace (Message.CompilerError - (Message.Content.mark_as_internal_error error_content)) + (Message.Content.to_internal_error error_content)) bt in if check_invariants then ( @@ -883,19 +883,19 @@ let main () = | exception Cli.Exit_with n -> exit n | exception Message.CompilerError content -> let bt = Printexc.get_raw_backtrace () in - Message.emit_content content Error; + Message.Content.emit content Error; if Cli.globals.debug then Printexc.print_raw_backtrace stderr bt; exit Cmd.Exit.some_error | exception Sys_error msg -> let bt = Printexc.get_raw_backtrace () in - Message.emit_content + Message.Content.emit (Message.Content.of_string ("System error: " ^ msg)) Error; if Printexc.backtrace_status () then Printexc.print_raw_backtrace stderr bt; exit Cmd.Exit.internal_error | exception e -> let bt = Printexc.get_raw_backtrace () in - Message.emit_content + Message.Content.emit (Message.Content.of_string ("Unexpected error: " ^ Printexc.to_string e)) Error; if Printexc.backtrace_status () then Printexc.print_raw_backtrace stderr bt; diff --git a/examples/NSW_community_gaming/tests/test_nsw_social_housie.catala_en b/examples/NSW_community_gaming/tests/test_nsw_social_housie.catala_en index f75005f1..be1f0de1 100644 --- a/examples/NSW_community_gaming/tests/test_nsw_social_housie.catala_en +++ b/examples/NSW_community_gaming/tests/test_nsw_social_housie.catala_en @@ -28,17 +28,16 @@ scope Test1: ```catala-test-inline $ catala Interpret -s Test1 -[ERROR] Syntax error at token "scope" - Message: expected either 'condition', or 'content' followed by the expected variable type - Autosuggestion: did you mean "content", or maybe "condition"? - +[ERROR] +Syntax error at token "scope" +Message: expected either 'condition', or 'content' followed by the expected variable type +Autosuggestion: did you mean "content", or maybe "condition"? Error token: ┌─⯈ examples/NSW_community_gaming/tests/test_nsw_social_housie.catala_en:11.21-11.26: └──┐ 11 │ context my_gaming scope GamingAuthorized │ ‾‾‾‾‾ - Last good token: ┌─⯈ examples/NSW_community_gaming/tests/test_nsw_social_housie.catala_en:11.11-11.20: └──┐ @@ -72,17 +71,16 @@ scope Test2: ``` ```catala-test-inline $ catala Interpret -s Test2 -[ERROR] Syntax error at token "scope" - Message: expected either 'condition', or 'content' followed by the expected variable type - Autosuggestion: did you mean "content", or maybe "condition"? - +[ERROR] +Syntax error at token "scope" +Message: expected either 'condition', or 'content' followed by the expected variable type +Autosuggestion: did you mean "content", or maybe "condition"? Error token: ┌─⯈ examples/NSW_community_gaming/tests/test_nsw_social_housie.catala_en:11.21-11.26: └──┐ 11 │ context my_gaming scope GamingAuthorized │ ‾‾‾‾‾ - Last good token: ┌─⯈ examples/NSW_community_gaming/tests/test_nsw_social_housie.catala_en:11.11-11.20: └──┐ @@ -116,17 +114,16 @@ scope Test3: ``` ```catala-test-inline $ catala Interpret -s Test3 -[ERROR] Syntax error at token "scope" - Message: expected either 'condition', or 'content' followed by the expected variable type - Autosuggestion: did you mean "content", or maybe "condition"? - +[ERROR] +Syntax error at token "scope" +Message: expected either 'condition', or 'content' followed by the expected variable type +Autosuggestion: did you mean "content", or maybe "condition"? Error token: ┌─⯈ examples/NSW_community_gaming/tests/test_nsw_social_housie.catala_en:11.21-11.26: └──┐ 11 │ context my_gaming scope GamingAuthorized │ ‾‾‾‾‾ - Last good token: ┌─⯈ examples/NSW_community_gaming/tests/test_nsw_social_housie.catala_en:11.11-11.20: └──┐ @@ -162,17 +159,16 @@ scope Test4: ```catala-test-inline $ catala Interpret -s Test4 -[ERROR] Syntax error at token "scope" - Message: expected either 'condition', or 'content' followed by the expected variable type - Autosuggestion: did you mean "content", or maybe "condition"? - +[ERROR] +Syntax error at token "scope" +Message: expected either 'condition', or 'content' followed by the expected variable type +Autosuggestion: did you mean "content", or maybe "condition"? Error token: ┌─⯈ examples/NSW_community_gaming/tests/test_nsw_social_housie.catala_en:11.21-11.26: └──┐ 11 │ context my_gaming scope GamingAuthorized │ ‾‾‾‾‾ - Last good token: ┌─⯈ examples/NSW_community_gaming/tests/test_nsw_social_housie.catala_en:11.11-11.20: └──┐ diff --git a/french_law/catala_legifrance/catala_legifrance.ml b/french_law/catala_legifrance/catala_legifrance.ml index 993ed315..af98f52b 100644 --- a/french_law/catala_legifrance/catala_legifrance.ml +++ b/french_law/catala_legifrance/catala_legifrance.ml @@ -283,7 +283,7 @@ let driver_lwt Lwt.return 0 with Message.CompilerError content -> let bt = Printexc.get_raw_backtrace () in - Message.emit_content content Error; + Message.Content.emit content Error; if Printexc.backtrace_status () then Printexc.print_raw_backtrace stderr bt; Lwt.return (-1) @@ -293,7 +293,7 @@ let driver file debug diff expiration custom_date client_id client_secret = (driver_lwt file debug diff expiration custom_date client_id client_secret) with Message.CompilerError content -> let bt = Printexc.get_raw_backtrace () in - Message.emit_content content Error; + Message.Content.emit content Error; if Printexc.backtrace_status () then Printexc.print_raw_backtrace stderr bt; -1 diff --git a/tests/test_arithmetic/bad/division_by_zero.catala_en b/tests/test_arithmetic/bad/division_by_zero.catala_en index 09095273..a44a132f 100644 --- a/tests/test_arithmetic/bad/division_by_zero.catala_en +++ b/tests/test_arithmetic/bad/division_by_zero.catala_en @@ -34,7 +34,6 @@ scope Money: ```catala-test-inline $ catala Interpret -s Dec [ERROR] division by zero at runtime - The division operator: ┌─⯈ tests/test_arithmetic/bad/division_by_zero.catala_en:20.23-20.30: └──┐ @@ -42,7 +41,6 @@ The division operator: │ ‾‾‾‾‾‾‾ └┬ `Division_by_zero` exception management └─ with decimals - The null denominator: ┌─⯈ tests/test_arithmetic/bad/division_by_zero.catala_en:20.28-20.30: └──┐ @@ -56,7 +54,6 @@ The null denominator: ```catala-test-inline $ catala Interpret -s Int [ERROR] division by zero at runtime - The division operator: ┌─⯈ tests/test_arithmetic/bad/division_by_zero.catala_en:10.23-10.28: └──┐ @@ -64,7 +61,6 @@ The division operator: │ ‾‾‾‾‾ └┬ `Division_by_zero` exception management └─ with integers - The null denominator: ┌─⯈ tests/test_arithmetic/bad/division_by_zero.catala_en:10.27-10.28: └──┐ @@ -78,7 +74,6 @@ The null denominator: ```catala-test-inline $ catala Interpret -s Money [ERROR] division by zero at runtime - The division operator: ┌─⯈ tests/test_arithmetic/bad/division_by_zero.catala_en:30.23-30.35: └──┐ @@ -86,7 +81,6 @@ The division operator: │ ‾‾‾‾‾‾‾‾‾‾‾‾ └┬ `Division_by_zero` exception management └─ with money - The null denominator: ┌─⯈ tests/test_arithmetic/bad/division_by_zero.catala_en:30.31-30.35: └──┐ diff --git a/tests/test_arithmetic/bad/logical_prio.catala_en b/tests/test_arithmetic/bad/logical_prio.catala_en index e9931045..840d7594 100644 --- a/tests/test_arithmetic/bad/logical_prio.catala_en +++ b/tests/test_arithmetic/bad/logical_prio.catala_en @@ -8,14 +8,13 @@ scope S1: ```catala-test-inline $ catala typecheck -[ERROR] Please add parentheses to explicit which of these operators should be applied first - +[ERROR] +Please add parentheses to explicit which of these operators should be applied first ┌─⯈ tests/test_arithmetic/bad/logical_prio.catala_en:6.28-6.31: └─┐ 6 │ definition o equals true and (false and true and true) or false │ ‾‾‾ - ┌─⯈ tests/test_arithmetic/bad/logical_prio.catala_en:6.58-6.60: └─┐ 6 │ definition o equals true and (false and true and true) or false diff --git a/tests/test_array/bad/fold_error.catala_en b/tests/test_array/bad/fold_error.catala_en index d5396f48..138c091a 100644 --- a/tests/test_array/bad/fold_error.catala_en +++ b/tests/test_array/bad/fold_error.catala_en @@ -13,20 +13,17 @@ scope A: ```catala-test-inline $ catala Interpret -s A [ERROR] I don't know how to apply operator >= on types integer and money - ┌─⯈ tests/test_array/bad/fold_error.catala_en:10.50-10.52: └──┐ 10 │ definition list_high_count equals number of (m >= $7) for m among list │ ‾‾ └─ Article - Type integer coming from expression: ┌─⯈ tests/test_array/bad/fold_error.catala_en:5.35-5.42: └─┐ 5 │ context list content collection integer │ ‾‾‾‾‾‾‾ └─ Article - Type money coming from expression: ┌─⯈ tests/test_array/bad/fold_error.catala_en:10.53-10.55: └──┐ diff --git a/tests/test_bool/bad/bad_assert.catala_en b/tests/test_bool/bad/bad_assert.catala_en index 4d7b8271..6dcddc57 100644 --- a/tests/test_bool/bad/bad_assert.catala_en +++ b/tests/test_bool/bad/bad_assert.catala_en @@ -15,21 +15,18 @@ $ catala Interpret -s Foo [ERROR] Error during typechecking, incompatible types: ┌─⯈ integer └─⯈ bool - Error coming from typechecking the following expression: ┌─⯈ tests/test_bool/bad/bad_assert.catala_en:9.13-9.14: └─┐ 9 │ assertion x │ ‾ └─ Test - Type integer coming from expression: ┌─⯈ tests/test_bool/bad/bad_assert.catala_en:5.20-5.27: └─┐ 5 │ output x content integer │ ‾‾‾‾‾‾‾ └─ Test - Type bool coming from expression: ┌─⯈ tests/test_bool/bad/bad_assert.catala_en:9.13-9.14: └─┐ diff --git a/tests/test_bool/bad/test_xor_with_int.catala_en b/tests/test_bool/bad/test_xor_with_int.catala_en index 30705f6b..7e764b4a 100644 --- a/tests/test_bool/bad/test_xor_with_int.catala_en +++ b/tests/test_bool/bad/test_xor_with_int.catala_en @@ -13,21 +13,18 @@ $ catala Typecheck [ERROR] Error during typechecking, incompatible types: ┌─⯈ integer └─⯈ bool - Error coming from typechecking the following expression: ┌─⯈ tests/test_bool/bad/test_xor_with_int.catala_en:8.30-8.32: └─┐ 8 │ definition test_var equals 10 xor 20 │ ‾‾ └─ 'xor' should be a boolean operator - Type integer coming from expression: ┌─⯈ tests/test_bool/bad/test_xor_with_int.catala_en:8.30-8.32: └─┐ 8 │ definition test_var equals 10 xor 20 │ ‾‾ └─ 'xor' should be a boolean operator - Type bool coming from expression: ┌─⯈ tests/test_bool/bad/test_xor_with_int.catala_en:8.33-8.36: └─┐ diff --git a/tests/test_date/bad/rounding_option_conflict.catala_en b/tests/test_date/bad/rounding_option_conflict.catala_en index d3d508a9..36f1a609 100644 --- a/tests/test_date/bad/rounding_option_conflict.catala_en +++ b/tests/test_date/bad/rounding_option_conflict.catala_en @@ -26,13 +26,11 @@ scope Test: ```catala-test-inline $ catala Interpret -s Test [ERROR] You cannot set multiple date rounding modes - ┌─⯈ tests/test_date/bad/rounding_option_conflict.catala_en:10.14-10.24: └──┐ 10 │ date round decreasing │ ‾‾‾‾‾‾‾‾‾‾ - ┌─⯈ tests/test_date/bad/rounding_option_conflict.catala_en:12.14-12.24: └──┐ 12 │ date round increasing diff --git a/tests/test_date/bad/uncomparable_duration.catala_en b/tests/test_date/bad/uncomparable_duration.catala_en index b056e26f..c321d152 100644 --- a/tests/test_date/bad/uncomparable_duration.catala_en +++ b/tests/test_date/bad/uncomparable_duration.catala_en @@ -42,15 +42,14 @@ scope Ge: ```catala-test-inline $ catala Interpret -s Ge -[ERROR] Cannot compare together durations that cannot be converted to a precise number of days - +[ERROR] +Cannot compare together durations that cannot be converted to a precise number of days ┌─⯈ tests/test_date/bad/uncomparable_duration.catala_en:40.23-40.30: └──┐ 40 │ definition d equals 1 month >= 2 day │ ‾‾‾‾‾‾‾ └┬ `UncomparableDurations` exception management └─ `>=` operator - ┌─⯈ tests/test_date/bad/uncomparable_duration.catala_en:40.34-40.39: └──┐ 40 │ definition d equals 1 month >= 2 day @@ -62,15 +61,14 @@ $ catala Interpret -s Ge ```catala-test-inline $ catala Interpret -s Gt -[ERROR] Cannot compare together durations that cannot be converted to a precise number of days - +[ERROR] +Cannot compare together durations that cannot be converted to a precise number of days ┌─⯈ tests/test_date/bad/uncomparable_duration.catala_en:30.23-30.30: └──┐ 30 │ definition d equals 1 month > 2 day │ ‾‾‾‾‾‾‾ └┬ `UncomparableDurations` exception management └─ `<=` operator - ┌─⯈ tests/test_date/bad/uncomparable_duration.catala_en:30.33-30.38: └──┐ 30 │ definition d equals 1 month > 2 day @@ -82,15 +80,14 @@ $ catala Interpret -s Gt ```catala-test-inline $ catala Interpret -s Le -[ERROR] Cannot compare together durations that cannot be converted to a precise number of days - +[ERROR] +Cannot compare together durations that cannot be converted to a precise number of days ┌─⯈ tests/test_date/bad/uncomparable_duration.catala_en:20.23-20.30: └──┐ 20 │ definition d equals 1 month <= 2 day │ ‾‾‾‾‾‾‾ └┬ `UncomparableDurations` exception management └─ `<=` operator - ┌─⯈ tests/test_date/bad/uncomparable_duration.catala_en:20.34-20.39: └──┐ 20 │ definition d equals 1 month <= 2 day @@ -102,15 +99,14 @@ $ catala Interpret -s Le ```catala-test-inline $ catala Interpret -s Lt -[ERROR] Cannot compare together durations that cannot be converted to a precise number of days - +[ERROR] +Cannot compare together durations that cannot be converted to a precise number of days ┌─⯈ tests/test_date/bad/uncomparable_duration.catala_en:10.23-10.30: └──┐ 10 │ definition d equals 1 month < 2 day │ ‾‾‾‾‾‾‾ └┬ `UncomparableDurations` exception management └─ `<` operator - ┌─⯈ tests/test_date/bad/uncomparable_duration.catala_en:10.33-10.38: └──┐ 10 │ definition d equals 1 month < 2 day diff --git a/tests/test_default/bad/conflict.catala_en b/tests/test_default/bad/conflict.catala_en index eb926788..6f195de3 100644 --- a/tests/test_default/bad/conflict.catala_en +++ b/tests/test_default/bad/conflict.catala_en @@ -11,15 +11,14 @@ scope A: ```catala-test-inline $ catala Interpret -s A -[ERROR] There is a conflict between multiple valid consequences for assigning the same variable. - +[ERROR] +There is a conflict between multiple valid consequences for assigning the same variable. This consequence has a valid justification: ┌─⯈ tests/test_default/bad/conflict.catala_en:8.56-8.57: └─┐ 8 │ definition x under condition true consequence equals 1 │ ‾ └─ Article - This consequence has a valid justification: ┌─⯈ tests/test_default/bad/conflict.catala_en:9.56-9.57: └─┐ diff --git a/tests/test_default/bad/empty.catala_en b/tests/test_default/bad/empty.catala_en index b57d713d..9463bd68 100644 --- a/tests/test_default/bad/empty.catala_en +++ b/tests/test_default/bad/empty.catala_en @@ -12,14 +12,13 @@ scope A: ```catala-test-inline $ catala Interpret -s A [WARNING] In scope "A", the variable "y" is declared but never defined; did you forget something? - ┌─⯈ tests/test_default/bad/empty.catala_en:6.10-6.11: └─┐ 6 │ output y content boolean │ ‾ └─ Article -[ERROR] This variable evaluated to an empty term (no rule that defined it applied in this situation) - +[ERROR] +This variable evaluated to an empty term (no rule that defined it applied in this situation) ┌─⯈ tests/test_default/bad/empty.catala_en:6.10-6.11: └─┐ 6 │ output y content boolean diff --git a/tests/test_default/bad/empty_with_rules.catala_en b/tests/test_default/bad/empty_with_rules.catala_en index d9dfbaa3..c00bc437 100644 --- a/tests/test_default/bad/empty_with_rules.catala_en +++ b/tests/test_default/bad/empty_with_rules.catala_en @@ -14,8 +14,8 @@ scope A: ```catala-test-inline $ catala Interpret -s A -[ERROR] This variable evaluated to an empty term (no rule that defined it applied in this situation) - +[ERROR] +This variable evaluated to an empty term (no rule that defined it applied in this situation) ┌─⯈ tests/test_default/bad/empty_with_rules.catala_en:5.10-5.11: └─┐ 5 │ output x content integer diff --git a/tests/test_default/good/mutliple_definitions.catala_en b/tests/test_default/good/mutliple_definitions.catala_en index d9b81562..d1874378 100644 --- a/tests/test_default/good/mutliple_definitions.catala_en +++ b/tests/test_default/good/mutliple_definitions.catala_en @@ -12,13 +12,11 @@ scope A: ```catala-test-inline $ catala Interpret -s A [WARNING] These definitions have identical justifications and consequences; is it a mistake? - ┌─⯈ tests/test_default/good/mutliple_definitions.catala_en:9.3-9.15: └─┐ 9 │ definition w equals 3 │ ‾‾‾‾‾‾‾‾‾‾‾‾ - ┌─⯈ tests/test_default/good/mutliple_definitions.catala_en:6.3-6.15: └─┐ 6 │ definition w equals 3 diff --git a/tests/test_enum/bad/ambiguous_cases.catala_en b/tests/test_enum/bad/ambiguous_cases.catala_en index 29fb87be..689e2e9a 100644 --- a/tests/test_enum/bad/ambiguous_cases.catala_en +++ b/tests/test_enum/bad/ambiguous_cases.catala_en @@ -16,8 +16,8 @@ scope A: ```catala-test-inline $ catala Interpret -s A -[ERROR] This constructor name is ambiguous, it can belong to E or F. Desambiguate it by prefixing it with the enum name. - +[ERROR] +This constructor name is ambiguous, it can belong to E or F. Desambiguate it by prefixing it with the enum name. ┌─⯈ tests/test_enum/bad/ambiguous_cases.catala_en:14.23-14.28: └──┐ 14 │ definition e equals Case1 diff --git a/tests/test_enum/bad/ambiguous_wildcard.catala_en b/tests/test_enum/bad/ambiguous_wildcard.catala_en index d66e5927..867ecbb6 100644 --- a/tests/test_enum/bad/ambiguous_wildcard.catala_en +++ b/tests/test_enum/bad/ambiguous_wildcard.catala_en @@ -17,8 +17,8 @@ scope A: ```catala-test-inline $ catala Interpret -s A -[ERROR] Couldn't infer the enumeration name from lonely wildcard (wildcard cannot be used as single match case) - +[ERROR] +Couldn't infer the enumeration name from lonely wildcard (wildcard cannot be used as single match case) ┌─⯈ tests/test_enum/bad/ambiguous_wildcard.catala_en:15.5-15.21: └──┐ 15 │ -- anything : 31 diff --git a/tests/test_enum/bad/duplicate_case.catala_en b/tests/test_enum/bad/duplicate_case.catala_en index eee4d5a5..b16750f3 100644 --- a/tests/test_enum/bad/duplicate_case.catala_en +++ b/tests/test_enum/bad/duplicate_case.catala_en @@ -21,13 +21,11 @@ scope A: ```catala-test-inline $ catala Interpret -s A [ERROR] The constructor Case3 has been matched twice: - ┌─⯈ tests/test_enum/bad/duplicate_case.catala_en:18.16-18.20: └──┐ 18 │ -- Case3 : true │ ‾‾‾‾ └─ Article - ┌─⯈ tests/test_enum/bad/duplicate_case.catala_en:17.16-17.21: └──┐ 17 │ -- Case3 : false diff --git a/tests/test_enum/bad/empty.catala_en b/tests/test_enum/bad/empty.catala_en index 72ae80b1..166a4508 100644 --- a/tests/test_enum/bad/empty.catala_en +++ b/tests/test_enum/bad/empty.catala_en @@ -9,8 +9,8 @@ declaration scope Bar: ```catala-test-inline $ catala Typecheck -[ERROR] The enum Foo does not have any cases; give it some for Catala to be able to accept it. - +[ERROR] +The enum Foo does not have any cases; give it some for Catala to be able to accept it. ┌─⯈ tests/test_enum/bad/empty.catala_en:4.25-4.28: └─┐ 4 │ declaration enumeration Foo: diff --git a/tests/test_enum/bad/missing_case.catala_en b/tests/test_enum/bad/missing_case.catala_en index e2e3dca6..7351897f 100644 --- a/tests/test_enum/bad/missing_case.catala_en +++ b/tests/test_enum/bad/missing_case.catala_en @@ -19,14 +19,12 @@ scope A: ```catala-test-inline $ catala Interpret -s A [WARNING] The constructor "Case3" of enumeration "E" is never used; maybe it's unnecessary? - ┌─⯈ tests/test_enum/bad/missing_case.catala_en:7.6-7.11: └─┐ 7 │ -- Case3 │ ‾‾‾‾‾ └─ Article [ERROR] The constructor Case3 of enum E is missing from this pattern matching - ┌─⯈ tests/test_enum/bad/missing_case.catala_en:14.25-16.22: └──┐ 14 │ definition out equals match e with pattern diff --git a/tests/test_enum/bad/not_ending_wildcard.catala_en b/tests/test_enum/bad/not_ending_wildcard.catala_en index 5add38bd..d18e19c5 100644 --- a/tests/test_enum/bad/not_ending_wildcard.catala_en +++ b/tests/test_enum/bad/not_ending_wildcard.catala_en @@ -39,7 +39,6 @@ scope Middle_case: ```catala-test-inline $ catala Interpret -s First_case [ERROR] Wildcard must be the last match case - Not ending wildcard: ┌─⯈ tests/test_enum/bad/not_ending_wildcard.catala_en:19.5-19.21: └──┐ @@ -47,7 +46,6 @@ Not ending wildcard: │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ └┬ Wildcard must be the last case └─ Wildcard can't be the first case - Next reachable case: ┌─⯈ tests/test_enum/bad/not_ending_wildcard.catala_en:20.5-20.18: └──┐ @@ -61,7 +59,6 @@ Next reachable case: ```catala-test-inline $ catala Interpret -s Middle_case [ERROR] Wildcard must be the last match case - Not ending wildcard: ┌─⯈ tests/test_enum/bad/not_ending_wildcard.catala_en:19.5-19.21: └──┐ @@ -69,7 +66,6 @@ Not ending wildcard: │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ └┬ Wildcard must be the last case └─ Wildcard can't be the first case - Next reachable case: ┌─⯈ tests/test_enum/bad/not_ending_wildcard.catala_en:20.5-20.18: └──┐ diff --git a/tests/test_enum/bad/quick_pattern_2.catala_en b/tests/test_enum/bad/quick_pattern_2.catala_en index 1c4a53ca..314443f9 100644 --- a/tests/test_enum/bad/quick_pattern_2.catala_en +++ b/tests/test_enum/bad/quick_pattern_2.catala_en @@ -33,21 +33,18 @@ $ catala Interpret -s A [ERROR] Error during typechecking, incompatible types: ┌─⯈ E └─⯈ F - Error coming from typechecking the following expression: ┌─⯈ tests/test_enum/bad/quick_pattern_2.catala_en:28.23-28.24: └──┐ 28 │ definition y equals x with pattern Case3 │ ‾ └─ Article - Type E coming from expression: ┌─⯈ tests/test_enum/bad/quick_pattern_2.catala_en:17.21-17.22: └──┐ 17 │ context x content E │ ‾ └─ Article - Type F coming from expression: ┌─⯈ tests/test_enum/bad/quick_pattern_2.catala_en:28.23-28.43: └──┐ diff --git a/tests/test_enum/bad/quick_pattern_3.catala_en b/tests/test_enum/bad/quick_pattern_3.catala_en index 99a9aef6..6c72d528 100644 --- a/tests/test_enum/bad/quick_pattern_3.catala_en +++ b/tests/test_enum/bad/quick_pattern_3.catala_en @@ -23,21 +23,18 @@ $ catala Interpret -s A [ERROR] Error during typechecking, incompatible types: ┌─⯈ E └─⯈ F - Error coming from typechecking the following expression: ┌─⯈ tests/test_enum/bad/quick_pattern_3.catala_en:18.21-18.22: └──┐ 18 │ definition y equals x with pattern Case3 │ ‾ └─ Article - Type E coming from expression: ┌─⯈ tests/test_enum/bad/quick_pattern_3.catala_en:13.19-13.20: └──┐ 13 │ context x content E │ ‾ └─ Article - Type F coming from expression: ┌─⯈ tests/test_enum/bad/quick_pattern_3.catala_en:18.21-18.41: └──┐ diff --git a/tests/test_enum/bad/quick_pattern_4.catala_en b/tests/test_enum/bad/quick_pattern_4.catala_en index b4d60ca2..d3a04c29 100644 --- a/tests/test_enum/bad/quick_pattern_4.catala_en +++ b/tests/test_enum/bad/quick_pattern_4.catala_en @@ -22,21 +22,18 @@ $ catala Interpret -s A [ERROR] Error during typechecking, incompatible types: ┌─⯈ E └─⯈ F - Error coming from typechecking the following expression: ┌─⯈ tests/test_enum/bad/quick_pattern_4.catala_en:17.21-17.22: └──┐ 17 │ definition y equals x with pattern Case3 │ ‾ └─ Test - Type E coming from expression: ┌─⯈ tests/test_enum/bad/quick_pattern_4.catala_en:12.19-12.20: └──┐ 12 │ context x content E │ ‾ └─ Test - Type F coming from expression: ┌─⯈ tests/test_enum/bad/quick_pattern_4.catala_en:17.21-17.41: └──┐ diff --git a/tests/test_enum/bad/quick_pattern_fail.catala_en b/tests/test_enum/bad/quick_pattern_fail.catala_en index db809395..9b261388 100644 --- a/tests/test_enum/bad/quick_pattern_fail.catala_en +++ b/tests/test_enum/bad/quick_pattern_fail.catala_en @@ -17,8 +17,8 @@ scope A: ```catala-test-inline $ catala Interpret -s A -[ERROR] The name of this constructor has not been defined before, maybe it is a typo? Maybe you wanted to say "Case1"? - +[ERROR] +The name of this constructor has not been defined before, maybe it is a typo? Maybe you wanted to say "Case1"? ┌─⯈ tests/test_enum/bad/quick_pattern_fail.catala_en:15.38-15.43: └──┐ 15 │ definition y equals x with pattern Case3 diff --git a/tests/test_enum/bad/too_many_cases.catala_en b/tests/test_enum/bad/too_many_cases.catala_en index 7e9e5fee..2467ecde 100644 --- a/tests/test_enum/bad/too_many_cases.catala_en +++ b/tests/test_enum/bad/too_many_cases.catala_en @@ -23,8 +23,8 @@ scope A: ```catala-test-inline $ catala Interpret -s A -[ERROR] This case matches a constructor of enumeration E but previous case were matching constructors of enumeration F - +[ERROR] +This case matches a constructor of enumeration E but previous case were matching constructors of enumeration F ┌─⯈ tests/test_enum/bad/too_many_cases.catala_en:21.8-21.13: └──┐ 21 │ -- Case4 : true diff --git a/tests/test_enum/bad/useless_wildcard.catala_en b/tests/test_enum/bad/useless_wildcard.catala_en index 97e5ec9f..9bab791a 100644 --- a/tests/test_enum/bad/useless_wildcard.catala_en +++ b/tests/test_enum/bad/useless_wildcard.catala_en @@ -20,7 +20,6 @@ scope A: ```catala-test-inline $ catala Interpret -s A [WARNING] Unreachable match case, all constructors of the enumeration E are already specified - ┌─⯈ tests/test_enum/bad/useless_wildcard.catala_en:17.5-17.21: └──┐ 17 │ -- anything : 31 diff --git a/tests/test_enum/bad/wrong_cons.catala_en b/tests/test_enum/bad/wrong_cons.catala_en index c95a9b83..f4405a99 100644 --- a/tests/test_enum/bad/wrong_cons.catala_en +++ b/tests/test_enum/bad/wrong_cons.catala_en @@ -14,12 +14,12 @@ scope A: ```catala-test-inline $ catala Typecheck -[ERROR] The name of this constructor has not been defined before, maybe it is a typo? Maybe you wanted to say "Case1"? - +[ERROR] +The name of this constructor has not been defined before, maybe it is a typo? Maybe you wanted to say "Case1"? ┌─⯈ tests/test_enum/bad/wrong_cons.catala_en:12.23-12.28: └──┐ 12 │ definition e equals Case2 │ ‾‾‾‾‾ └─ Article -#return code 255# +#return code 123# ``` diff --git a/tests/test_exception/bad/ambiguous_unlabeled_exception.catala_en b/tests/test_exception/bad/ambiguous_unlabeled_exception.catala_en index 20b58f2f..8a47c1ab 100644 --- a/tests/test_exception/bad/ambiguous_unlabeled_exception.catala_en +++ b/tests/test_exception/bad/ambiguous_unlabeled_exception.catala_en @@ -15,8 +15,8 @@ scope A: ```catala-test-inline $ catala Interpret -s A -[ERROR] This exception can refer to several definitions. Try using labels to disambiguate - +[ERROR] +This exception can refer to several definitions. Try using labels to disambiguate Ambiguous exception ┌─⯈ tests/test_exception/bad/ambiguous_unlabeled_exception.catala_en:12.3-13.15: └──┐ @@ -25,14 +25,12 @@ Ambiguous exception 13 │ definition x equals 2 │ ‾‾‾‾‾‾‾‾‾‾‾‾ └─ Test - Candidate definition ┌─⯈ tests/test_exception/bad/ambiguous_unlabeled_exception.catala_en:10.14-10.15: └──┐ 10 │ definition x equals 1 │ ‾ └─ Test - Candidate definition ┌─⯈ tests/test_exception/bad/ambiguous_unlabeled_exception.catala_en:8.14-8.15: └─┐ diff --git a/tests/test_exception/bad/dangling_exception.catala_en b/tests/test_exception/bad/dangling_exception.catala_en index d35db3b5..789caf69 100644 --- a/tests/test_exception/bad/dangling_exception.catala_en +++ b/tests/test_exception/bad/dangling_exception.catala_en @@ -16,7 +16,6 @@ scope A: ```catala-test-inline $ catala Interpret -s A [ERROR] Unknown label for the scope variable x: "base_y" - ┌─⯈ tests/test_exception/bad/dangling_exception.catala_en:12.13-12.19: └──┐ 12 │ exception base_y diff --git a/tests/test_exception/bad/exceptions_cycle.catala_en b/tests/test_exception/bad/exceptions_cycle.catala_en index 9d570caa..bdcd2bb0 100644 --- a/tests/test_exception/bad/exceptions_cycle.catala_en +++ b/tests/test_exception/bad/exceptions_cycle.catala_en @@ -20,8 +20,8 @@ scope A: ```catala-test-inline $ catala Interpret -s A -[ERROR] Exception cycle detected when defining x: each of these 3 exceptions applies over the previous one, and the first applies over the last - +[ERROR] +Exception cycle detected when defining x: each of these 3 exceptions applies over the previous one, and the first applies over the last ┌─⯈ tests/test_exception/bad/exceptions_cycle.catala_en:8.3-10.15: └──┐ 8 │ label base_x @@ -31,7 +31,6 @@ $ catala Interpret -s A 10 │ definition x equals 0 │ ‾‾‾‾‾‾‾‾‾‾‾‾ - ┌─⯈ tests/test_exception/bad/exceptions_cycle.catala_en:12.3-14.15: └──┐ 12 │ label exception_x @@ -41,7 +40,6 @@ $ catala Interpret -s A 14 │ definition x equals 1 │ ‾‾‾‾‾‾‾‾‾‾‾‾ - ┌─⯈ tests/test_exception/bad/exceptions_cycle.catala_en:16.3-18.15: └──┐ 16 │ label exception_exception_x diff --git a/tests/test_exception/bad/missing_unlabeled_definition.catala_en b/tests/test_exception/bad/missing_unlabeled_definition.catala_en index 3466c4eb..c3911bd0 100644 --- a/tests/test_exception/bad/missing_unlabeled_definition.catala_en +++ b/tests/test_exception/bad/missing_unlabeled_definition.catala_en @@ -12,7 +12,6 @@ scope A: ```catala-test-inline $ catala Interpret -s A [ERROR] This exception does not have a corresponding definition - ┌─⯈ tests/test_exception/bad/missing_unlabeled_definition.catala_en:8.3-9.15: └─┐ 8 │ exception diff --git a/tests/test_exception/bad/one_ambiguous_exception.catala_en b/tests/test_exception/bad/one_ambiguous_exception.catala_en index 9c8d7c32..bf04648c 100644 --- a/tests/test_exception/bad/one_ambiguous_exception.catala_en +++ b/tests/test_exception/bad/one_ambiguous_exception.catala_en @@ -21,8 +21,8 @@ scope A: ```catala-test-inline $ catala Interpret -s A -[ERROR] This exception can refer to several definitions. Try using labels to disambiguate - +[ERROR] +This exception can refer to several definitions. Try using labels to disambiguate Ambiguous exception ┌─⯈ tests/test_exception/bad/one_ambiguous_exception.catala_en:18.3-19.15: └──┐ @@ -31,14 +31,12 @@ Ambiguous exception 19 │ definition y equals 3 │ ‾‾‾‾‾‾‾‾‾‾‾‾ └─ Test - Candidate definition ┌─⯈ tests/test_exception/bad/one_ambiguous_exception.catala_en:16.14-16.15: └──┐ 16 │ definition y equals 4 │ ‾ └─ Test - Candidate definition ┌─⯈ tests/test_exception/bad/one_ambiguous_exception.catala_en:14.14-14.15: └──┐ diff --git a/tests/test_exception/bad/self_exception.catala_en b/tests/test_exception/bad/self_exception.catala_en index 8b928188..852196ff 100644 --- a/tests/test_exception/bad/self_exception.catala_en +++ b/tests/test_exception/bad/self_exception.catala_en @@ -13,7 +13,6 @@ scope A: ```catala-test-inline $ catala Interpret -s A [ERROR] Cannot define rule as an exception to itself - ┌─⯈ tests/test_exception/bad/self_exception.catala_en:9.13-9.19: └─┐ 9 │ exception base_y diff --git a/tests/test_exception/bad/two_exceptions.catala_en b/tests/test_exception/bad/two_exceptions.catala_en index 29d676c4..e3d123dc 100644 --- a/tests/test_exception/bad/two_exceptions.catala_en +++ b/tests/test_exception/bad/two_exceptions.catala_en @@ -17,15 +17,14 @@ scope A: ```catala-test-inline $ catala Interpret -s A -[ERROR] There is a conflict between multiple valid consequences for assigning the same variable. - +[ERROR] +There is a conflict between multiple valid consequences for assigning the same variable. This consequence has a valid justification: ┌─⯈ tests/test_exception/bad/two_exceptions.catala_en:12.23-12.24: └──┐ 12 │ definition x equals 1 │ ‾ └─ Test - This consequence has a valid justification: ┌─⯈ tests/test_exception/bad/two_exceptions.catala_en:15.23-15.24: └──┐ diff --git a/tests/test_exception/good/double_definition.catala_en b/tests/test_exception/good/double_definition.catala_en index e59c5016..3e706773 100644 --- a/tests/test_exception/good/double_definition.catala_en +++ b/tests/test_exception/good/double_definition.catala_en @@ -13,13 +13,11 @@ scope Foo: ```catala-test-inline $ catala Scopelang -s Foo [WARNING] These definitions have identical justifications and consequences; is it a mistake? - ┌─⯈ tests/test_exception/good/double_definition.catala_en:9.3-9.15: └─┐ 9 │ definition x equals 1 │ ‾‾‾‾‾‾‾‾‾‾‾‾ └─ Foo - ┌─⯈ tests/test_exception/good/double_definition.catala_en:8.3-8.15: └─┐ 8 │ definition x equals 1 @@ -38,13 +36,11 @@ Dcalc translation below. ```catala-test-inline $ catala Dcalc -s Foo [WARNING] These definitions have identical justifications and consequences; is it a mistake? - ┌─⯈ tests/test_exception/good/double_definition.catala_en:9.3-9.15: └─┐ 9 │ definition x equals 1 │ ‾‾‾‾‾‾‾‾‾‾‾‾ └─ Foo - ┌─⯈ tests/test_exception/good/double_definition.catala_en:8.3-8.15: └─┐ 8 │ definition x equals 1 diff --git a/tests/test_func/bad/bad_func.catala_en b/tests/test_func/bad/bad_func.catala_en index bc8db220..2ea21d58 100644 --- a/tests/test_func/bad/bad_func.catala_en +++ b/tests/test_func/bad/bad_func.catala_en @@ -29,15 +29,14 @@ $ catala Interpret -s R ```catala-test-inline $ catala Interpret -s S -[ERROR] There is a conflict between multiple valid consequences for assigning the same variable. - +[ERROR] +There is a conflict between multiple valid consequences for assigning the same variable. This consequence has a valid justification: ┌─⯈ tests/test_func/bad/bad_func.catala_en:14.65-14.70: └──┐ 14 │ definition f of x under condition (x >= x) consequence equals x + x │ ‾‾‾‾‾ └─ Article - This consequence has a valid justification: ┌─⯈ tests/test_func/bad/bad_func.catala_en:15.62-15.67: └──┐ diff --git a/tests/test_func/bad/param_inconsistency.catala_en b/tests/test_func/bad/param_inconsistency.catala_en index 92d332ab..b9737da7 100644 --- a/tests/test_func/bad/param_inconsistency.catala_en +++ b/tests/test_func/bad/param_inconsistency.catala_en @@ -14,15 +14,14 @@ scope S: ```catala-test-inline $ catala typecheck -[ERROR] Function argument name mismatch between declaration ('x') and definition ('y') - +[ERROR] +Function argument name mismatch between declaration ('x') and definition ('y') Argument declared here: ┌─⯈ tests/test_func/bad/param_inconsistency.catala_en:4.42-4.43: └─┐ 4 │ internal f1 content decimal depends on x content integer │ ‾ - Defined here: ┌─⯈ tests/test_func/bad/param_inconsistency.catala_en:10.20-10.21: └──┐ diff --git a/tests/test_func/bad/param_inconsistency2.catala_en b/tests/test_func/bad/param_inconsistency2.catala_en index f40f0af4..2060fb91 100644 --- a/tests/test_func/bad/param_inconsistency2.catala_en +++ b/tests/test_func/bad/param_inconsistency2.catala_en @@ -13,15 +13,14 @@ scope S: ```catala-test-inline $ catala typecheck -[ERROR] Function argument name mismatch between declaration ('x') and definition ('y') - +[ERROR] +Function argument name mismatch between declaration ('x') and definition ('y') Argument declared here: ┌─⯈ tests/test_func/bad/param_inconsistency2.catala_en:4.42-4.43: └─┐ 4 │ internal f1 content decimal depends on x content integer │ ‾ - Defined here: ┌─⯈ tests/test_func/bad/param_inconsistency2.catala_en:9.30-9.31: └─┐ diff --git a/tests/test_func/bad/param_inconsistency3.catala_en b/tests/test_func/bad/param_inconsistency3.catala_en index 7e324c06..be6dd5f6 100644 --- a/tests/test_func/bad/param_inconsistency3.catala_en +++ b/tests/test_func/bad/param_inconsistency3.catala_en @@ -13,15 +13,14 @@ scope S: ```catala-test-inline $ catala typecheck -[ERROR] Function argument name mismatch between declaration ('x') and definition ('y') - +[ERROR] +Function argument name mismatch between declaration ('x') and definition ('y') Argument declared here: ┌─⯈ tests/test_func/bad/param_inconsistency3.catala_en:4.42-4.43: └─┐ 4 │ internal f1 content decimal depends on x content integer │ ‾ - Defined here: ┌─⯈ tests/test_func/bad/param_inconsistency3.catala_en:9.30-9.31: └─┐ diff --git a/tests/test_func/bad/recursive.catala_en b/tests/test_func/bad/recursive.catala_en index 1f8711d1..123e6e75 100644 --- a/tests/test_func/bad/recursive.catala_en +++ b/tests/test_func/bad/recursive.catala_en @@ -10,8 +10,8 @@ scope RecursiveFunc: ```catala-test-inline $ catala Interpret -s RecursiveFunc -[ERROR] The variable f is used in one of its definitions, but recursion is forbidden in Catala - +[ERROR] +The variable f is used in one of its definitions, but recursion is forbidden in Catala ┌─⯈ tests/test_func/bad/recursive.catala_en:8.28-8.29: └─┐ 8 │ definition f of x equals f of x + 1 diff --git a/tests/test_func/good/context_func.catala_en b/tests/test_func/good/context_func.catala_en index b25fc45d..f04174bf 100644 --- a/tests/test_func/good/context_func.catala_en +++ b/tests/test_func/good/context_func.catala_en @@ -17,22 +17,20 @@ scope B: ```catala-test-inline $ catala Scopelang -s B -[ERROR] It is impossible to give a definition to a subscope variable not tagged as input or context. - +[ERROR] +It is impossible to give a definition to a subscope variable not tagged as input or context. Incriminated subscope: ┌─⯈ tests/test_func/good/context_func.catala_en:9.3-9.4: └─┐ 9 │ a scope A │ ‾ └─ Test - Incriminated variable: ┌─⯈ tests/test_func/good/context_func.catala_en:5.10-5.11: └─┐ 5 │ output f content integer depends on x content integer │ ‾ └─ Test - Incriminated subscope variable definition: ┌─⯈ tests/test_func/good/context_func.catala_en:15.3-15.17: └──┐ @@ -44,22 +42,20 @@ Incriminated subscope variable definition: ```catala-test-inline $ catala Dcalc -s A -[ERROR] It is impossible to give a definition to a subscope variable not tagged as input or context. - +[ERROR] +It is impossible to give a definition to a subscope variable not tagged as input or context. Incriminated subscope: ┌─⯈ tests/test_func/good/context_func.catala_en:9.3-9.4: └─┐ 9 │ a scope A │ ‾ └─ Test - Incriminated variable: ┌─⯈ tests/test_func/good/context_func.catala_en:5.10-5.11: └─┐ 5 │ output f content integer depends on x content integer │ ‾ └─ Test - Incriminated subscope variable definition: ┌─⯈ tests/test_func/good/context_func.catala_en:15.3-15.17: └──┐ @@ -71,22 +67,20 @@ Incriminated subscope variable definition: ```catala-test-inline $ catala Dcalc -s B -[ERROR] It is impossible to give a definition to a subscope variable not tagged as input or context. - +[ERROR] +It is impossible to give a definition to a subscope variable not tagged as input or context. Incriminated subscope: ┌─⯈ tests/test_func/good/context_func.catala_en:9.3-9.4: └─┐ 9 │ a scope A │ ‾ └─ Test - Incriminated variable: ┌─⯈ tests/test_func/good/context_func.catala_en:5.10-5.11: └─┐ 5 │ output f content integer depends on x content integer │ ‾ └─ Test - Incriminated subscope variable definition: ┌─⯈ tests/test_func/good/context_func.catala_en:15.3-15.17: └──┐ diff --git a/tests/test_io/bad/forgot_input.catala_en b/tests/test_io/bad/forgot_input.catala_en index 607fb945..be33678c 100644 --- a/tests/test_io/bad/forgot_input.catala_en +++ b/tests/test_io/bad/forgot_input.catala_en @@ -16,15 +16,14 @@ scope B: ``` ```catala-test-inline $ catala Typecheck -[ERROR] This subscope variable is a mandatory input but no definition was provided. - +[ERROR] +This subscope variable is a mandatory input but no definition was provided. Incriminated subscope: ┌─⯈ tests/test_io/bad/forgot_input.catala_en:9.3-9.4: └─┐ 9 │ a scope A │ ‾ └─ Test - Incriminated variable: ┌─⯈ tests/test_io/bad/forgot_input.catala_en:6.9-6.10: └─┐ diff --git a/tests/test_io/bad/inputing_to_not_input.catala_en b/tests/test_io/bad/inputing_to_not_input.catala_en index c28e607d..e898d4f4 100644 --- a/tests/test_io/bad/inputing_to_not_input.catala_en +++ b/tests/test_io/bad/inputing_to_not_input.catala_en @@ -16,22 +16,20 @@ scope B: ``` ```catala-test-inline $ catala Typecheck -[ERROR] It is impossible to give a definition to a subscope variable not tagged as input or context. - +[ERROR] +It is impossible to give a definition to a subscope variable not tagged as input or context. Incriminated subscope: ┌─⯈ tests/test_io/bad/inputing_to_not_input.catala_en:8.3-8.4: └─┐ 8 │ a scope A │ ‾ └─ Test - Incriminated variable: ┌─⯈ tests/test_io/bad/inputing_to_not_input.catala_en:5.10-5.11: └─┐ 5 │ output a content integer │ ‾ └─ Test - Incriminated subscope variable definition: ┌─⯈ tests/test_io/bad/inputing_to_not_input.catala_en:14.3-14.17: └──┐ diff --git a/tests/test_io/bad/redefining_input.catala_en b/tests/test_io/bad/redefining_input.catala_en index e97a525d..8ae5a753 100644 --- a/tests/test_io/bad/redefining_input.catala_en +++ b/tests/test_io/bad/redefining_input.catala_en @@ -9,15 +9,14 @@ scope A: ``` ```catala-test-inline $ catala Typecheck -[ERROR] It is impossible to give a definition to a scope variable tagged as input. - +[ERROR] +It is impossible to give a definition to a scope variable tagged as input. Incriminated variable: ┌─⯈ tests/test_io/bad/redefining_input.catala_en:5.16-5.17: └─┐ 5 │ input output a content integer │ ‾ └─ Test - Incriminated variable definition: ┌─⯈ tests/test_io/bad/redefining_input.catala_en:8.3-8.15: └─┐ diff --git a/tests/test_io/bad/using_non_output.catala_en b/tests/test_io/bad/using_non_output.catala_en index 7e264637..90a1cb44 100644 --- a/tests/test_io/bad/using_non_output.catala_en +++ b/tests/test_io/bad/using_non_output.catala_en @@ -16,28 +16,25 @@ scope B: ```catala-test-inline $ catala Typecheck [WARNING] This variable is dead code; it does not contribute to computing any of scope "A" outputs. Did you forget something? - ┌─⯈ tests/test_io/bad/using_non_output.catala_en:5.12-5.13: └─┐ 5 │ internal a content integer │ ‾ └─ Test -[ERROR] The variable a.a cannot be used here, as it is not part of subscope a's results. Maybe you forgot to qualify it as an output? - +[ERROR] +The variable a.a cannot be used here, as it is not part of subscope a's results. Maybe you forgot to qualify it as an output? Incriminated variable usage: ┌─⯈ tests/test_io/bad/using_non_output.catala_en:14.13-14.16: └──┐ 14 │ assertion a.a = 0 │ ‾‾‾ └─ Test - Incriminated subscope variable declaration: ┌─⯈ tests/test_io/bad/using_non_output.catala_en:5.12-5.13: └─┐ 5 │ internal a content integer │ ‾ └─ Test - Incriminated subscope declaration: ┌─⯈ tests/test_io/bad/using_non_output.catala_en:8.3-8.4: └─┐ diff --git a/tests/test_money/bad/no_mingle.catala_en b/tests/test_money/bad/no_mingle.catala_en index 2bfeb39e..f8ffd611 100644 --- a/tests/test_money/bad/no_mingle.catala_en +++ b/tests/test_money/bad/no_mingle.catala_en @@ -15,20 +15,17 @@ scope A: ```catala-test-inline $ catala Interpret -s A [ERROR] I don't know how to apply operator * on types money and money - ┌─⯈ tests/test_money/bad/no_mingle.catala_en:12.26-12.27: └──┐ 12 │ definition z equals (x * y) │ ‾ └─ Article - Type money coming from expression: ┌─⯈ tests/test_money/bad/no_mingle.catala_en:5.21-5.26: └─┐ 5 │ context x content money │ ‾‾‾‾‾ └─ Article - Type money coming from expression: ┌─⯈ tests/test_money/bad/no_mingle.catala_en:6.21-6.26: └─┐ diff --git a/tests/test_name_resolution/bad/toplevel_defs.catala_en b/tests/test_name_resolution/bad/toplevel_defs.catala_en index ebbd8ba3..2402f303 100644 --- a/tests/test_name_resolution/bad/toplevel_defs.catala_en +++ b/tests/test_name_resolution/bad/toplevel_defs.catala_en @@ -14,7 +14,6 @@ declaration glob5 content decimal ```catala-test-inline $ catala typecheck [ERROR] Scope calls are not allowed outside of a scope - ┌─⯈ tests/test_name_resolution/bad/toplevel_defs.catala_en:11.11-11.23: └──┐ 11 │ equals (output of S1).a diff --git a/tests/test_proof/bad/dates_get_year-empty.catala_en b/tests/test_proof/bad/dates_get_year-empty.catala_en index 4cd0c642..cb68bc18 100644 --- a/tests/test_proof/bad/dates_get_year-empty.catala_en +++ b/tests/test_proof/bad/dates_get_year-empty.catala_en @@ -15,15 +15,14 @@ scope A: ```catala-test-inline $ catala Proof --disable_counterexamples -[ERROR] It is impossible to give a definition to a scope variable tagged as input. - +[ERROR] +It is impossible to give a definition to a scope variable tagged as input. Incriminated variable: ┌─⯈ tests/test_proof/bad/dates_get_year-empty.catala_en:5.9-5.10: └─┐ 5 │ input x content date │ ‾ └─ Test - Incriminated variable definition: ┌─⯈ tests/test_proof/bad/dates_get_year-empty.catala_en:9.3-9.15: └─┐ diff --git a/tests/test_proof/bad/enums-empty.catala_en b/tests/test_proof/bad/enums-empty.catala_en index 81d1ca84..c19619af 100644 --- a/tests/test_proof/bad/enums-empty.catala_en +++ b/tests/test_proof/bad/enums-empty.catala_en @@ -24,7 +24,6 @@ scope A: ```catala-test-inline $ catala Proof --disable_counterexamples [WARNING] The constructor "C" of enumeration "T" is never used; maybe it's unnecessary? - ┌─⯈ tests/test_proof/bad/enums-empty.catala_en:7.7-7.8: └─┐ 7 │ -- C content boolean diff --git a/tests/test_proof/bad/enums-nonbool-empty.catala_en b/tests/test_proof/bad/enums-nonbool-empty.catala_en index 5e19edb3..508dafca 100644 --- a/tests/test_proof/bad/enums-nonbool-empty.catala_en +++ b/tests/test_proof/bad/enums-nonbool-empty.catala_en @@ -22,7 +22,6 @@ scope A: ```catala-test-inline $ catala Proof --disable_counterexamples [WARNING] The constructor "C" of enumeration "T" is never used; maybe it's unnecessary? - ┌─⯈ tests/test_proof/bad/enums-nonbool-empty.catala_en:5.7-5.8: └─┐ 5 │ -- C content boolean diff --git a/tests/test_proof/bad/enums-nonbool-overlap.catala_en b/tests/test_proof/bad/enums-nonbool-overlap.catala_en index abf9f561..fc86c969 100644 --- a/tests/test_proof/bad/enums-nonbool-overlap.catala_en +++ b/tests/test_proof/bad/enums-nonbool-overlap.catala_en @@ -22,7 +22,6 @@ scope A: ```catala-test-inline $ catala Proof --disable_counterexamples [WARNING] The constructor "C" of enumeration "T" is never used; maybe it's unnecessary? - ┌─⯈ tests/test_proof/bad/enums-nonbool-overlap.catala_en:5.7-5.8: └─┐ 5 │ -- C content boolean diff --git a/tests/test_proof/bad/enums-overlap.catala_en b/tests/test_proof/bad/enums-overlap.catala_en index 89e3ef2f..872454cd 100644 --- a/tests/test_proof/bad/enums-overlap.catala_en +++ b/tests/test_proof/bad/enums-overlap.catala_en @@ -24,7 +24,6 @@ scope A: ```catala-test-inline $ catala Proof --disable_counterexamples [WARNING] The constructor "C" of enumeration "T" is never used; maybe it's unnecessary? - ┌─⯈ tests/test_proof/bad/enums-overlap.catala_en:7.7-7.8: └─┐ 7 │ -- C content boolean diff --git a/tests/test_proof/bad/enums_inj-empty.catala_en b/tests/test_proof/bad/enums_inj-empty.catala_en index b6b2d602..72cf0f9d 100644 --- a/tests/test_proof/bad/enums_inj-empty.catala_en +++ b/tests/test_proof/bad/enums_inj-empty.catala_en @@ -17,7 +17,6 @@ scope A: ```catala-test-inline $ catala Proof --disable_counterexamples [WARNING] The constructor "C2" of enumeration "E" is never used; maybe it's unnecessary? - ┌─⯈ tests/test_proof/bad/enums_inj-empty.catala_en:6.6-6.8: └─┐ 6 │ -- C2 diff --git a/tests/test_proof/bad/prolala_motivating_example.catala_en b/tests/test_proof/bad/prolala_motivating_example.catala_en index 33747ac0..a57b4e3f 100644 --- a/tests/test_proof/bad/prolala_motivating_example.catala_en +++ b/tests/test_proof/bad/prolala_motivating_example.catala_en @@ -123,8 +123,8 @@ scope Amount: ```catala-test-inline $ catala Proof --disable_counterexamples -[ERROR] It is impossible to give a definition to a subscope variable not tagged as input or context. - +[ERROR] +It is impossible to give a definition to a subscope variable not tagged as input or context. Incriminated subscope: ┌─⯈ tests/test_proof/bad/prolala_motivating_example.catala_en:56.3-56.14: └──┐ @@ -132,7 +132,6 @@ Incriminated subscope: │ ‾‾‾‾‾‾‾‾‾‾‾ └┬ ProLaLa 2022 Super Cash Bonus └─ Amount - Incriminated variable: ┌─⯈ tests/test_proof/bad/prolala_motivating_example.catala_en:9.12-9.22: └─┐ @@ -140,7 +139,6 @@ Incriminated variable: │ ‾‾‾‾‾‾‾‾‾‾ └┬ ProLaLa 2022 Super Cash Bonus └─ Eligibility - Incriminated subscope variable definition: ┌─⯈ tests/test_proof/bad/prolala_motivating_example.catala_en:64.3-64.36: └──┐ diff --git a/tests/test_proof/good/enums-arith.catala_en b/tests/test_proof/good/enums-arith.catala_en index 4fe972ee..a88a76cc 100644 --- a/tests/test_proof/good/enums-arith.catala_en +++ b/tests/test_proof/good/enums-arith.catala_en @@ -22,7 +22,6 @@ scope A: ```catala-test-inline $ catala Proof --disable_counterexamples [WARNING] The constructor "C" of enumeration "T" is never used; maybe it's unnecessary? - ┌─⯈ tests/test_proof/good/enums-arith.catala_en:5.7-5.8: └─┐ 5 │ -- C content boolean diff --git a/tests/test_proof/good/enums-nonbool.catala_en b/tests/test_proof/good/enums-nonbool.catala_en index 227d7d4e..abe4a74b 100644 --- a/tests/test_proof/good/enums-nonbool.catala_en +++ b/tests/test_proof/good/enums-nonbool.catala_en @@ -22,7 +22,6 @@ scope A: ```catala-test-inline $ catala Proof --disable_counterexamples [WARNING] The constructor "C" of enumeration "T" is never used; maybe it's unnecessary? - ┌─⯈ tests/test_proof/good/enums-nonbool.catala_en:5.7-5.8: └─┐ 5 │ -- C content boolean diff --git a/tests/test_proof/good/enums.catala_en b/tests/test_proof/good/enums.catala_en index dbd08291..7ef2d5c0 100644 --- a/tests/test_proof/good/enums.catala_en +++ b/tests/test_proof/good/enums.catala_en @@ -21,7 +21,6 @@ scope A: ```catala-test-inline $ catala Proof --disable_counterexamples [WARNING] The constructor "C" of enumeration "T" is never used; maybe it's unnecessary? - ┌─⯈ tests/test_proof/good/enums.catala_en:5.7-5.8: └─┐ 5 │ -- C content boolean diff --git a/tests/test_scope/bad/cycle_in_scope.catala_en b/tests/test_scope/bad/cycle_in_scope.catala_en index 071d9f07..69d008df 100644 --- a/tests/test_scope/bad/cycle_in_scope.catala_en +++ b/tests/test_scope/bad/cycle_in_scope.catala_en @@ -16,23 +16,21 @@ scope A: ```catala-test-inline $ catala Interpret -s A -[ERROR] Cyclic dependency detected between the following variables of scope A: - z → x → y → z - +[ERROR] +Cyclic dependency detected between the following variables of scope A: + z → x → y → z z is used here in the definition of x: ┌─⯈ tests/test_scope/bad/cycle_in_scope.catala_en:14.23-14.24: └──┐ 14 │ definition x equals z │ ‾ └─ Article - x is used here in the definition of y: ┌─⯈ tests/test_scope/bad/cycle_in_scope.catala_en:11.32-11.33: └──┐ 11 │ definition y under condition x >= 0 consequence equals x │ ‾ └─ Article - y is used here in the definition of z: ┌─⯈ tests/test_scope/bad/cycle_in_scope.catala_en:13.32-13.33: └──┐ diff --git a/tests/test_scope/bad/cyclic_scope_calls.catala_en b/tests/test_scope/bad/cyclic_scope_calls.catala_en index f730a074..d705c7c8 100644 --- a/tests/test_scope/bad/cyclic_scope_calls.catala_en +++ b/tests/test_scope/bad/cyclic_scope_calls.catala_en @@ -28,23 +28,21 @@ scope S4: ```catala-test-inline $ catala typecheck -[ERROR] Cyclic dependency detected between the following scopes: - S4 → S3 → S2 → S4 - +[ERROR] +Cyclic dependency detected between the following scopes: + S4 → S3 → S2 → S4 S4 is used here in the definition of S3: ┌─⯈ tests/test_scope/bad/cyclic_scope_calls.catala_en:21.24-21.36: └──┐ 21 │ definition o equals (output of S4).o │ ‾‾‾‾‾‾‾‾‾‾‾‾ - S3 is used here in the definition of S2: ┌─⯈ tests/test_scope/bad/cyclic_scope_calls.catala_en:18.43-18.55: └──┐ 18 │ definition o equals (output of S1).o + (output of S3).o │ ‾‾‾‾‾‾‾‾‾‾‾‾ - S2 is used here in the definition of S4: ┌─⯈ tests/test_scope/bad/cyclic_scope_calls.catala_en:24.24-24.36: └──┐ diff --git a/tests/test_scope/bad/cyclic_scopes.catala_en b/tests/test_scope/bad/cyclic_scopes.catala_en index 2102d888..83a564f5 100644 --- a/tests/test_scope/bad/cyclic_scopes.catala_en +++ b/tests/test_scope/bad/cyclic_scopes.catala_en @@ -18,16 +18,14 @@ scope B: ```catala-test-inline $ catala Interpret -s A -[ERROR] Cyclic dependency detected between the following scopes: - B → A → B - +[ERROR] +Cyclic dependency detected between the following scopes: B → A → B B is used here in the definition of A: ┌─⯈ tests/test_scope/bad/cyclic_scopes.catala_en:5.3-5.4: └─┐ 5 │ b scope B │ ‾ └─ Article - A is used here in the definition of B: ┌─⯈ tests/test_scope/bad/cyclic_scopes.catala_en:9.3-9.4: └─┐ diff --git a/tests/test_scope/bad/scope.catala_en b/tests/test_scope/bad/scope.catala_en index 19ae233b..ce14c929 100644 --- a/tests/test_scope/bad/scope.catala_en +++ b/tests/test_scope/bad/scope.catala_en @@ -16,15 +16,14 @@ scope A: ```catala-test-inline $ catala Interpret -s A -[ERROR] There is a conflict between multiple valid consequences for assigning the same variable. - +[ERROR] +There is a conflict between multiple valid consequences for assigning the same variable. This consequence has a valid justification: ┌─⯈ tests/test_scope/bad/scope.catala_en:13.57-13.61: └──┐ 13 │ definition b under condition not c consequence equals 1337 │ ‾‾‾‾ └─ Article - This consequence has a valid justification: ┌─⯈ tests/test_scope/bad/scope.catala_en:14.57-14.58: └──┐ diff --git a/tests/test_scope/bad/scope_call_duplicate.catala_en b/tests/test_scope/bad/scope_call_duplicate.catala_en index 010852f5..e816a6b5 100644 --- a/tests/test_scope/bad/scope_call_duplicate.catala_en +++ b/tests/test_scope/bad/scope_call_duplicate.catala_en @@ -17,7 +17,6 @@ scope Titi: ```catala-test-inline $ catala dcalc -s Titi [ERROR] Duplicate definition of scope input variable 'bar' - ┌─⯈ tests/test_scope/bad/scope_call_duplicate.catala_en:14.70-14.73: └──┐ 14 │ definition fizz equals output of Toto with {--bar: 1 --baz: 2.1 -- bar: 3} diff --git a/tests/test_scope/bad/scope_call_extra.catala_en b/tests/test_scope/bad/scope_call_extra.catala_en index a90f5ba1..a428ce84 100644 --- a/tests/test_scope/bad/scope_call_extra.catala_en +++ b/tests/test_scope/bad/scope_call_extra.catala_en @@ -17,13 +17,11 @@ scope Titi: ```catala-test-inline $ catala dcalc -s Titi [ERROR] Scope Toto has no input variable biz - ┌─⯈ tests/test_scope/bad/scope_call_extra.catala_en:14.49-14.52: └──┐ 14 │ definition fizz equals output of Toto with {--biz: 1} │ ‾‾‾ - Scope Toto declared here ┌─⯈ tests/test_scope/bad/scope_call_extra.catala_en:2.19-2.23: └─┐ diff --git a/tests/test_scope/bad/scope_call_missing.catala_en b/tests/test_scope/bad/scope_call_missing.catala_en index 0f3c40ac..daa13b6f 100644 --- a/tests/test_scope/bad/scope_call_missing.catala_en +++ b/tests/test_scope/bad/scope_call_missing.catala_en @@ -17,13 +17,11 @@ scope Titi: ```catala-test-inline $ catala dcalc -s Titi [ERROR] Definition of input variable 'baz' missing in this scope call - ┌─⯈ tests/test_scope/bad/scope_call_missing.catala_en:14.26-14.56: └──┐ 14 │ definition fizz equals output of Toto with {--bar: 1} │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ - Declaration of the missing input variable ┌─⯈ tests/test_scope/bad/scope_call_missing.catala_en:4.16-4.19: └─┐ diff --git a/tests/test_scope/bad/sub_vars_in_sub_var.catala_en b/tests/test_scope/bad/sub_vars_in_sub_var.catala_en index c8429dc5..112deede 100644 --- a/tests/test_scope/bad/sub_vars_in_sub_var.catala_en +++ b/tests/test_scope/bad/sub_vars_in_sub_var.catala_en @@ -15,8 +15,8 @@ scope B: ```catala-test-inline $ catala Interpret -s A -[ERROR] The subscope a is used when defining one of its inputs, but recursion is forbidden in Catala - +[ERROR] +The subscope a is used when defining one of its inputs, but recursion is forbidden in Catala ┌─⯈ tests/test_scope/bad/sub_vars_in_sub_var.catala_en:13.28-13.31: └──┐ 13 │ definition a.y equals if a.x then 0 else 1 diff --git a/tests/test_scope/good/nothing.catala_en b/tests/test_scope/good/nothing.catala_en index 5ab14826..6bc4bcbb 100644 --- a/tests/test_scope/good/nothing.catala_en +++ b/tests/test_scope/good/nothing.catala_en @@ -8,7 +8,6 @@ declaration scope Foo2: ```catala-test-inline $ catala Scalc -s Foo2 -O -t [WARNING] In scope "Foo2", the variable "bar" is declared but never defined; did you forget something? - ┌─⯈ tests/test_scope/good/nothing.catala_en:5.10-5.13: └─┐ 5 │ output bar content integer diff --git a/tests/test_struct/bad/bug_107.catala_en b/tests/test_struct/bad/bug_107.catala_en index 6f6091f5..a254178a 100644 --- a/tests/test_struct/bad/bug_107.catala_en +++ b/tests/test_struct/bad/bug_107.catala_en @@ -19,14 +19,12 @@ scope A: ```catala-test-inline $ catala Interpret -s A [ERROR] struct name "S" already defined - First definition: ┌─⯈ tests/test_struct/bad/bug_107.catala_en:4.23-4.24: └─┐ 4 │ declaration structure S: │ ‾ └─ https://github.com/CatalaLang/catala/issues/107 - Second definition: ┌─⯈ tests/test_struct/bad/bug_107.catala_en:8.23-8.24: └─┐ diff --git a/tests/test_struct/bad/empty_struct.catala_en b/tests/test_struct/bad/empty_struct.catala_en index 0ee5b128..a197bdaa 100644 --- a/tests/test_struct/bad/empty_struct.catala_en +++ b/tests/test_struct/bad/empty_struct.catala_en @@ -9,8 +9,8 @@ declaration scope Bar: ```catala-test-inline $ catala Typecheck -[ERROR] The struct Foo does not have any fields; give it some for Catala to be able to accept it. - +[ERROR] +The struct Foo does not have any fields; give it some for Catala to be able to accept it. ┌─⯈ tests/test_struct/bad/empty_struct.catala_en:4.23-4.26: └─┐ 4 │ declaration structure Foo: diff --git a/tests/test_struct/bad/nested.catala_en b/tests/test_struct/bad/nested.catala_en index 78366ec7..902d5803 100644 --- a/tests/test_struct/bad/nested.catala_en +++ b/tests/test_struct/bad/nested.catala_en @@ -15,14 +15,13 @@ scope A: ```catala-test-inline $ catala Interpret -s A [WARNING] The constructor "Rec" of enumeration "E" is never used; maybe it's unnecessary? - ┌─⯈ tests/test_struct/bad/nested.catala_en:6.6-6.9: └─┐ 6 │ -- Rec content E │ ‾‾‾ └─ Article -[ERROR] The type E is defined using itself, which is forbidden since Catala does not provide recursive types - +[ERROR] +The type E is defined using itself, which is forbidden since Catala does not provide recursive types ┌─⯈ tests/test_struct/bad/nested.catala_en:6.18-6.19: └─┐ 6 │ -- Rec content E diff --git a/tests/test_struct/bad/nested2.catala_en b/tests/test_struct/bad/nested2.catala_en index d61f4b37..8b9c385f 100644 --- a/tests/test_struct/bad/nested2.catala_en +++ b/tests/test_struct/bad/nested2.catala_en @@ -16,49 +16,42 @@ declaration scope A: ```catala-test-inline $ catala Interpret -s A [WARNING] In scope "A", the variable "x" is declared but never defined; did you forget something? - ┌─⯈ tests/test_struct/bad/nested2.catala_en:13.10-13.11: └──┐ 13 │ output x content E │ ‾ └─ Article [WARNING] The structure "S" is never used; maybe it's unnecessary? - ┌─⯈ tests/test_struct/bad/nested2.catala_en:4.23-4.24: └─┐ 4 │ declaration structure S: │ ‾ └─ Article [WARNING] The enumeration "E" is never used; maybe it's unnecessary? - ┌─⯈ tests/test_struct/bad/nested2.catala_en:8.25-8.26: └─┐ 8 │ declaration enumeration E: │ ‾ └─ Article [ERROR] Cyclic dependency detected between types! - Cycle type S, declared: ┌─⯈ tests/test_struct/bad/nested2.catala_en:4.23-4.24: └─┐ 4 │ declaration structure S: │ ‾ └─ Article - Used here in the definition of another cycle type E: ┌─⯈ tests/test_struct/bad/nested2.catala_en:10.20-10.21: └──┐ 10 │ -- Case2 content S │ ‾ └─ Article - Cycle type E, declared: ┌─⯈ tests/test_struct/bad/nested2.catala_en:8.25-8.26: └─┐ 8 │ declaration enumeration E: │ ‾ └─ Article - Used here in the definition of another cycle type S: ┌─⯈ tests/test_struct/bad/nested2.catala_en:5.18-5.19: └─┐ diff --git a/tests/test_struct/bad/nonexisting_struct.catala_en b/tests/test_struct/bad/nonexisting_struct.catala_en index 75cba9d8..dc92b05e 100644 --- a/tests/test_struct/bad/nonexisting_struct.catala_en +++ b/tests/test_struct/bad/nonexisting_struct.catala_en @@ -16,7 +16,6 @@ scope A: ```catala-test-inline $ catala Interpret -s A [ERROR] No struct named Fo found - ┌─⯈ tests/test_struct/bad/nonexisting_struct.catala_en:13.25-13.27: └──┐ 13 │ definition y equals x.Fo.f diff --git a/tests/test_struct/bad/wrong_qualified_field.catala_en b/tests/test_struct/bad/wrong_qualified_field.catala_en index f0af14ff..96ab46b8 100644 --- a/tests/test_struct/bad/wrong_qualified_field.catala_en +++ b/tests/test_struct/bad/wrong_qualified_field.catala_en @@ -20,7 +20,6 @@ scope A: ```catala-test-inline $ catala Interpret -s A [ERROR] Field "g" does not belong to structure "Foo", but to "Bar" - ┌─⯈ tests/test_struct/bad/wrong_qualified_field.catala_en:17.23-17.30: └──┐ 17 │ definition y equals x.Foo.g diff --git a/tests/test_struct/good/ambiguous_fields.catala_en b/tests/test_struct/good/ambiguous_fields.catala_en index d73190c0..6683c93f 100644 --- a/tests/test_struct/good/ambiguous_fields.catala_en +++ b/tests/test_struct/good/ambiguous_fields.catala_en @@ -19,7 +19,6 @@ scope A: ```catala-test-inline $ catala Interpret -s A [WARNING] The structure "Bar" is never used; maybe it's unnecessary? - ┌─⯈ tests/test_struct/good/ambiguous_fields.catala_en:7.23-7.26: └─┐ 7 │ declaration structure Bar: @@ -31,7 +30,6 @@ $ catala Interpret -s A ```catala-test-inline $ catala Interpret_Lcalc -s A --avoid_exceptions --optimize [WARNING] The structure "Bar" is never used; maybe it's unnecessary? - ┌─⯈ tests/test_struct/good/ambiguous_fields.catala_en:7.23-7.26: └─┐ 7 │ declaration structure Bar: diff --git a/tests/test_struct/good/same_name_fields.catala_en b/tests/test_struct/good/same_name_fields.catala_en index e13a53bc..381bbe3f 100644 --- a/tests/test_struct/good/same_name_fields.catala_en +++ b/tests/test_struct/good/same_name_fields.catala_en @@ -19,7 +19,6 @@ scope A: ```catala-test-inline $ catala Interpret -s A [WARNING] The structure "Bar" is never used; maybe it's unnecessary? - ┌─⯈ tests/test_struct/good/same_name_fields.catala_en:7.23-7.26: └─┐ 7 │ declaration structure Bar: @@ -32,7 +31,6 @@ $ catala Interpret -s A ```catala-test-inline $ catala Interpret_Lcalc -s A --avoid_exceptions --optimize [WARNING] The structure "Bar" is never used; maybe it's unnecessary? - ┌─⯈ tests/test_struct/good/same_name_fields.catala_en:7.23-7.26: └─┐ 7 │ declaration structure Bar: diff --git a/tests/test_typing/bad/err1.catala_en b/tests/test_typing/bad/err1.catala_en index ce7c250d..f99e7efe 100644 --- a/tests/test_typing/bad/err1.catala_en +++ b/tests/test_typing/bad/err1.catala_en @@ -15,21 +15,18 @@ $ catala Typecheck [ERROR] Error during typechecking, incompatible types: ┌─⯈ decimal └─⯈ integer - Error coming from typechecking the following expression: ┌─⯈ tests/test_typing/bad/err1.catala_en:7.23-7.26: └─┐ 7 │ Structure { -- i: 4.1 -- e: y }; │ ‾‾‾ - Type decimal coming from expression: ┌─⯈ tests/test_typing/bad/err1.catala_en:7.23-7.26: └─┐ 7 │ Structure { -- i: 4.1 -- e: y }; │ ‾‾‾ - Type integer coming from expression: ┌─⯈ tests/test_typing/bad/common.catala_en:8.18-8.25: └─┐ diff --git a/tests/test_typing/bad/err2.catala_en b/tests/test_typing/bad/err2.catala_en index 98a39ebe..fdcef2e6 100644 --- a/tests/test_typing/bad/err2.catala_en +++ b/tests/test_typing/bad/err2.catala_en @@ -12,24 +12,22 @@ scope S: ```catala-test-inline $ catala Typecheck -[ERROR] Error during typechecking, incompatible types: - ┌─⯈ decimal - └─⯈ collection - +[ERROR] +Error during typechecking, incompatible types: +┌─⯈ decimal +└─⯈ collection Error coming from typechecking the following expression: ┌─⯈ tests/test_typing/bad/err2.catala_en:10.39-10.42: └──┐ 10 │ definition a equals number of (z ++ 1.1) / 2 │ ‾‾‾ - Type decimal coming from expression: ┌─⯈ tests/test_typing/bad/err2.catala_en:10.39-10.42: └──┐ 10 │ definition a equals number of (z ++ 1.1) / 2 │ ‾‾‾ - Type collection coming from expression: ┌─⯈ tests/test_typing/bad/err2.catala_en:10.36-10.38: └──┐ diff --git a/tests/test_typing/bad/err3.catala_en b/tests/test_typing/bad/err3.catala_en index 7047fe92..31b7da30 100644 --- a/tests/test_typing/bad/err3.catala_en +++ b/tests/test_typing/bad/err3.catala_en @@ -13,7 +13,6 @@ scope S: ```catala-test-inline $ catala Typecheck [WARNING] The constructor "Dec" of enumeration "Enum" is never used; maybe it's unnecessary? - ┌─⯈ tests/test_typing/bad/common.catala_en:4.6-4.9: └─┐ 4 │ -- Dec content decimal @@ -22,21 +21,18 @@ $ catala Typecheck [ERROR] Error during typechecking, incompatible types: ┌─⯈ integer └─⯈ decimal - Error coming from typechecking the following expression: ┌─⯈ tests/test_typing/bad/err3.catala_en:10.42-10.43: └──┐ 10 │ definition a equals number of (z ++ z) * 2 │ ‾ - Type integer coming from expression: ┌─⯈ tests/test_typing/bad/err3.catala_en:10.42-10.43: └──┐ 10 │ definition a equals number of (z ++ z) * 2 │ ‾ - Type decimal coming from expression: ┌─⯈ tests/test_typing/bad/common.catala_en:15.20-15.27: └──┐ @@ -51,7 +47,6 @@ Re-putting the same check again, to ensure that the `Typecheck` and `ocaml` subc ```catala-test-inline $ catala ocaml [WARNING] The constructor "Dec" of enumeration "Enum" is never used; maybe it's unnecessary? - ┌─⯈ tests/test_typing/bad/common.catala_en:4.6-4.9: └─┐ 4 │ -- Dec content decimal @@ -60,21 +55,18 @@ $ catala ocaml [ERROR] Error during typechecking, incompatible types: ┌─⯈ integer └─⯈ decimal - Error coming from typechecking the following expression: ┌─⯈ tests/test_typing/bad/err3.catala_en:10.42-10.43: └──┐ 10 │ definition a equals number of (z ++ z) * 2 │ ‾ - Type integer coming from expression: ┌─⯈ tests/test_typing/bad/err3.catala_en:10.42-10.43: └──┐ 10 │ definition a equals number of (z ++ z) * 2 │ ‾ - Type decimal coming from expression: ┌─⯈ tests/test_typing/bad/common.catala_en:15.20-15.27: └──┐ diff --git a/tests/test_typing/bad/err4.catala_en b/tests/test_typing/bad/err4.catala_en index 56eaf971..d4ceb2a5 100644 --- a/tests/test_typing/bad/err4.catala_en +++ b/tests/test_typing/bad/err4.catala_en @@ -11,21 +11,18 @@ Should be "catala Typecheck", see test err3 ```catala-test-inline $ catala ocaml [WARNING] The structure "Structure" is never used; maybe it's unnecessary? - ┌─⯈ tests/test_typing/bad/common.catala_en:7.23-7.32: └─┐ 7 │ declaration structure Structure: │ ‾‾‾‾‾‾‾‾‾ [WARNING] The constructor "Dec" of enumeration "Enum" is never used; maybe it's unnecessary? - ┌─⯈ tests/test_typing/bad/common.catala_en:4.6-4.9: └─┐ 4 │ -- Dec content decimal │ ‾‾‾ [WARNING] The constructor "Dat" of enumeration "Enum" is never used; maybe it's unnecessary? - ┌─⯈ tests/test_typing/bad/common.catala_en:5.6-5.9: └─┐ 5 │ -- Dat content date @@ -34,21 +31,18 @@ $ catala ocaml [ERROR] Error during typechecking, incompatible types: ┌─⯈ Enum └─⯈ Structure - Error coming from typechecking the following expression: ┌─⯈ tests/test_typing/bad/err4.catala_en:5.25-5.38: └─┐ 5 │ definition z equals [ Int content x ] │ ‾‾‾‾‾‾‾‾‾‾‾‾‾ - Type Enum coming from expression: ┌─⯈ tests/test_typing/bad/err4.catala_en:5.25-5.38: └─┐ 5 │ definition z equals [ Int content x ] │ ‾‾‾‾‾‾‾‾‾‾‾‾‾ - Type Structure coming from expression: ┌─⯈ tests/test_typing/bad/common.catala_en:14.31-14.40: └──┐ diff --git a/tests/test_typing/bad/err5.catala_en b/tests/test_typing/bad/err5.catala_en index 5b15bd81..7fa44c13 100644 --- a/tests/test_typing/bad/err5.catala_en +++ b/tests/test_typing/bad/err5.catala_en @@ -12,24 +12,22 @@ scope S: ```catala-test-inline $ catala Typecheck -[ERROR] Error during typechecking, incompatible types: - ┌─⯈ integer - └─⯈ Structure - +[ERROR] +Error during typechecking, incompatible types: +┌─⯈ integer +└─⯈ Structure Error coming from typechecking the following expression: ┌─⯈ tests/test_typing/bad/err5.catala_en:8.5-8.9: └─┐ 8 │ 1040 │ ‾‾‾‾ - Type integer coming from expression: ┌─⯈ tests/test_typing/bad/err5.catala_en:8.5-8.9: └─┐ 8 │ 1040 │ ‾‾‾‾ - Type Structure coming from expression: ┌─⯈ tests/test_typing/bad/err5.catala_en:6.5-6.46: └─┐ diff --git a/tests/test_typing/bad/err6.catala_en b/tests/test_typing/bad/err6.catala_en index dd8fbe9c..36338371 100644 --- a/tests/test_typing/bad/err6.catala_en +++ b/tests/test_typing/bad/err6.catala_en @@ -31,21 +31,18 @@ $ catala ocaml [ERROR] Error during typechecking, incompatible types: ┌─⯈ decimal └─⯈ integer - Error coming from typechecking the following expression: ┌─⯈ tests/test_typing/bad/err6.catala_en:20.27-20.30: └──┐ 20 │ definition sub.x equals 44. │ ‾‾‾ - Type decimal coming from expression: ┌─⯈ tests/test_typing/bad/err6.catala_en:20.27-20.30: └──┐ 20 │ definition sub.x equals 44. │ ‾‾‾ - Type integer coming from expression: ┌─⯈ tests/test_typing/bad/common.catala_en:12.19-12.26: └──┐ diff --git a/tests/test_variable_state/bad/def_no_state.catala_en b/tests/test_variable_state/bad/def_no_state.catala_en index 1d4f7404..01e8a734 100644 --- a/tests/test_variable_state/bad/def_no_state.catala_en +++ b/tests/test_variable_state/bad/def_no_state.catala_en @@ -12,14 +12,13 @@ scope A: ```catala-test-inline $ catala Typecheck -[ERROR] This definition does not indicate which state has to be considered for variable foo. - +[ERROR] +This definition does not indicate which state has to be considered for variable foo. ┌─⯈ tests/test_variable_state/bad/def_no_state.catala_en:10.14-10.17: └──┐ 10 │ definition foo equals 2 │ ‾‾‾ └─ Test - Variable declaration: ┌─⯈ tests/test_variable_state/bad/def_no_state.catala_en:5.10-5.13: └─┐ diff --git a/tests/test_variable_state/bad/double_same_state.catala_en b/tests/test_variable_state/bad/double_same_state.catala_en index e83db650..53287d20 100644 --- a/tests/test_variable_state/bad/double_same_state.catala_en +++ b/tests/test_variable_state/bad/double_same_state.catala_en @@ -12,15 +12,14 @@ scope A: ```catala-test-inline $ catala Typecheck -[ERROR] There are two states with the same name for the same variable: this is ambiguous. Please change the name of either states. - +[ERROR] +There are two states with the same name for the same variable: this is ambiguous. Please change the name of either states. First instance of state "bar": ┌─⯈ tests/test_variable_state/bad/double_same_state.catala_en:6.11-6.14: └─┐ 6 │ state bar │ ‾‾‾ └─ Test - Second instance of state "bar": ┌─⯈ tests/test_variable_state/bad/double_same_state.catala_en:7.11-7.14: └─┐ diff --git a/tests/test_variable_state/bad/no_cross_exceptions.catala_en b/tests/test_variable_state/bad/no_cross_exceptions.catala_en index 9e14a3b3..a8313fdd 100644 --- a/tests/test_variable_state/bad/no_cross_exceptions.catala_en +++ b/tests/test_variable_state/bad/no_cross_exceptions.catala_en @@ -17,7 +17,6 @@ scope A: ```catala-test-inline $ catala Typecheck [ERROR] Unknown label for the scope variable foo.baz: "thing" - ┌─⯈ tests/test_variable_state/bad/no_cross_exceptions.catala_en:14.13-14.18: └──┐ 14 │ exception thing definition foo state baz under condition true consequence equals 3 diff --git a/tests/test_variable_state/bad/self_reference_first_state.catala_en b/tests/test_variable_state/bad/self_reference_first_state.catala_en index db3f193b..8c22a4a8 100644 --- a/tests/test_variable_state/bad/self_reference_first_state.catala_en +++ b/tests/test_variable_state/bad/self_reference_first_state.catala_en @@ -14,8 +14,8 @@ scope A: ```catala-test-inline $ catala Typecheck -[ERROR] It is impossible to refer to the variable you are defining when defining its first state. - +[ERROR] +It is impossible to refer to the variable you are defining when defining its first state. ┌─⯈ tests/test_variable_state/bad/self_reference_first_state.catala_en:10.35-10.38: └──┐ 10 │ definition foo state bar equals foo + 1 diff --git a/tests/test_variable_state/bad/state_cycle.catala_en b/tests/test_variable_state/bad/state_cycle.catala_en index 2b5e1133..44d2e2cc 100644 --- a/tests/test_variable_state/bad/state_cycle.catala_en +++ b/tests/test_variable_state/bad/state_cycle.catala_en @@ -21,30 +21,27 @@ scope A: ```catala-test-inline $ catala Typecheck -[ERROR] Cyclic dependency detected between the following variables of scope A: - foofoo@bar → foofoo@baz → foo@bar → foo@baz → foofoo@bar - +[ERROR] +Cyclic dependency detected between the following variables of scope A: + foofoo@bar → foofoo@baz → foo@bar → foo@baz → foofoo@bar foofoo@bar is used here in the definition of foofoo@baz: ┌─⯈ tests/test_variable_state/bad/state_cycle.catala_en:19.38-19.44: └──┐ 19 │ definition foofoo state baz equals foofoo + 1 │ ‾‾‾‾‾‾ └─ Test - foofoo@baz is used here in the definition of foo@bar: ┌─⯈ tests/test_variable_state/bad/state_cycle.catala_en:13.35-13.41: └──┐ 13 │ definition foo state bar equals foofoo │ ‾‾‾‾‾‾ └─ Test - foo@bar is used here in the definition of foo@baz: ┌─⯈ tests/test_variable_state/bad/state_cycle.catala_en:15.35-15.38: └──┐ 15 │ definition foo state baz equals foo + 1 │ ‾‾‾ └─ Test - foo@baz is used here in the definition of foofoo@bar: ┌─⯈ tests/test_variable_state/bad/state_cycle.catala_en:17.38-17.41: └──┐ diff --git a/tests/test_variable_state/bad/unknown_state.catala_en b/tests/test_variable_state/bad/unknown_state.catala_en index 46eb4729..218a5940 100644 --- a/tests/test_variable_state/bad/unknown_state.catala_en +++ b/tests/test_variable_state/bad/unknown_state.catala_en @@ -15,13 +15,11 @@ scope A: ```catala-test-inline $ catala Typecheck [ERROR] This identifier is not a state declared for variable foo. - ┌─⯈ tests/test_variable_state/bad/unknown_state.catala_en:12.24-12.28: └──┐ 12 │ definition foo state basz equals foo + 1 │ ‾‾‾‾ └─ Test - Variable declaration: ┌─⯈ tests/test_variable_state/bad/unknown_state.catala_en:5.10-5.13: └─┐