From c864f658c8234844934fa84254a405285b09fb34 Mon Sep 17 00:00:00 2001 From: Louis Gesbert Date: Fri, 3 May 2024 12:20:09 +0200 Subject: [PATCH 1/5] Cleaner message printing Aerates the printing of messages, removes extraneous noise, and more clearly attaches the various information tied to a given message. --- compiler/catala_utils/message.ml | 144 +++++++++--- compiler/catala_utils/message.mli | 1 + compiler/catala_utils/pos.ml | 210 ++++++++++-------- compiler/catala_utils/pos.mli | 8 + compiler/catala_utils/suggestions.ml | 3 +- compiler/desugared/print.ml | 10 +- compiler/driver.ml | 19 +- compiler/shared_ast/typing.ml | 4 +- doc/syntax/syntax_en.catala_en | 16 +- doc/syntax/syntax_fr.catala_fr | 16 +- .../arithmetic/bad/division_by_zero.catala_en | 60 ++--- tests/arithmetic/bad/logical_prio.catala_en | 27 ++- tests/arithmetic/good/priorities.catala_en | 20 +- tests/arithmetic/good/rounding.catala_en | 6 +- tests/arithmetic/good/trivial.catala_en | 14 +- tests/array/bad/fold_error.catala_en | 44 ++-- tests/array/good/aggregation.catala_en | 26 ++- tests/array/good/aggregation_2.catala_en | 31 ++- tests/array/good/aggregation_3.catala_en | 14 +- tests/array/good/concatenation.catala_en | 16 +- tests/array/good/filter.catala_en | 20 +- tests/array/good/filter_map.catala_en | 22 +- tests/array/good/fold.catala_en | 31 ++- tests/array/good/map.catala_en | 16 +- tests/array/good/simple.catala_en | 26 ++- tests/array/good/simpler.catala_en | 16 +- tests/array/good/simplest.catala_en | 14 +- tests/bool/bad/bad_assert.catala_en | 50 +++-- tests/bool/bad/test_xor_with_int.catala_en | 36 +-- tests/bool/good/test_bool.catala_en | 16 +- tests/bool/good/test_precedence.catala_en | 14 +- tests/bool/good/test_xor.catala_en | 20 +- .../bad/rounding_option_conflict.catala_en | 25 ++- tests/date/bad/rounding_option_en.catala_en | 6 +- tests/date/bad/rounding_option_fr.catala_fr | 6 +- tests/date/bad/substraction.catala_en | 39 ++-- .../date/bad/uncomparable_duration.catala_en | 80 ++++--- tests/date/good/durations.catala_en | 26 ++- tests/date/good/rounding_option_en.catala_en | 14 +- tests/date/good/rounding_option_fr.catala_fr | 14 +- tests/date/good/simple.catala_en | 18 +- tests/dec/good/infinite_precision.catala_en | 23 +- tests/dec/good/rounding.catala_en | 20 +- tests/dec/good/simple.catala_en | 20 +- tests/dec/good/zero_after_comma.catala_en | 16 +- tests/default/bad/empty.catala_en | 36 +-- tests/default/bad/empty_with_rules.catala_en | 18 +- .../bad/typing_or_logical_error.catala_en | 29 +-- .../good/mutliple_definitions.catala_en | 68 +++--- tests/enum/bad/ambiguous_cases.catala_en | 18 +- tests/enum/bad/ambiguous_wildcard.catala_en | 18 +- tests/enum/bad/duplicate_case.catala_en | 28 +-- tests/enum/bad/empty.catala_en | 18 +- tests/enum/bad/missing_case.catala_en | 42 ++-- tests/enum/bad/not_ending_wildcard.catala_en | 72 +++--- tests/enum/bad/quick_pattern_2.catala_en | 50 +++-- tests/enum/bad/quick_pattern_3.catala_en | 50 +++-- tests/enum/bad/quick_pattern_4.catala_en | 50 +++-- tests/enum/bad/quick_pattern_fail.catala_en | 26 ++- tests/enum/bad/too_many_cases.catala_en | 18 +- tests/enum/bad/useless_wildcard.catala_en | 26 ++- tests/enum/bad/wrong_cons.catala_en | 25 ++- tests/enum/good/disambiguated_cases.catala_en | 18 +- tests/enum/good/quick_pattern_check.catala_en | 18 +- tests/enum/good/simple.catala_en | 16 +- tests/enum/good/wildcard.catala_en | 24 +- .../ambiguous_unlabeled_exception.catala_en | 52 ++--- .../bad/dangling_exception.catala_en | 16 +- .../exception/bad/exceptions_cycle.catala_en | 63 +++--- .../missing_unlabeled_definition.catala_en | 20 +- .../bad/one_ambiguous_exception.catala_en | 52 ++--- tests/exception/bad/self_exception.catala_en | 16 +- tests/exception/bad/two_exceptions.catala_en | 30 +-- .../good/context_with_default.catala_en | 12 +- .../good/double_definition.catala_en | 98 ++++---- .../exception/good/duplicate_labels.catala_en | 16 +- tests/exception/good/exception.catala_en | 14 +- .../good/exceptions_squared.catala_en | 14 +- .../good/grouped_exceptions.catala_en | 16 +- .../good/groups_of_exceptions.catala_en | 106 +++++---- .../good/same_label_two_variables.catala_en | 18 +- .../good/split_unlabeled_exception.catala_en | 14 +- .../two_exceptions_same_outcome.catala_en | 14 +- .../good/two_unlabeled_exceptions.catala_en | 16 +- .../good/unlabeled_exception.catala_en | 14 +- .../unsorted_unlabeled_exceptions.catala_en | 16 +- tests/func/bad/bad_func.catala_en | 36 +-- tests/func/bad/param_inconsistency.catala_en | 31 +-- tests/func/bad/param_inconsistency2.catala_en | 31 +-- tests/func/bad/param_inconsistency3.catala_en | 31 +-- tests/func/bad/recursive.catala_en | 18 +- tests/func/good/closure_conversion.catala_en | 8 +- .../good/closure_conversion_reduce.catala_en | 8 +- tests/func/good/closure_return.catala_en | 8 +- .../func/good/closure_through_scope.catala_en | 14 +- tests/func/good/context_func.catala_en | 80 ++++--- tests/func/good/func.catala_en | 14 +- tests/func/good/param_consistency.catala_en | 26 ++- .../scope_call_func_struct_closure.catala_en | 14 +- tests/io/bad/forgot_input.catala_en | 33 +-- tests/io/bad/inputing_to_not_input.catala_en | 47 ++-- tests/io/bad/redefining_input.catala_en | 31 +-- tests/io/bad/using_non_output.catala_en | 32 +-- tests/io/good/all_io.catala_en | 12 +- tests/io/good/condition_only_input.catala_en | 12 +- tests/io/good/subscope.catala_en | 12 +- .../good/test_grave_char_en.catala_en | 40 +++- .../good/test_grave_char_fr.catala_fr | 14 +- .../good/test_grave_char_pl.catala_pl | 6 +- .../good/test_markup_refactoring.catala_en | 20 +- tests/modules/bad/mod_bad_include.catala_en | 33 +-- tests/modules/bad/mod_badname.catala_en | 21 +- tests/modules/good/external_use.catala_en | 8 +- tests/modules/good/mod_def.catala_en | 12 +- tests/modules/good/mod_def_context.catala_en | 50 +++-- tests/modules/good/mod_middle.catala_en | 12 +- tests/modules/good/mod_use.catala_en | 20 +- tests/modules/good/mod_use2.catala_en | 30 ++- tests/modules/good/mod_use3.catala_en | 18 +- tests/modules/good/mod_use_context.catala_en | 74 +++--- tests/modules/good/prorata_syntax.catala_en | 49 ++-- tests/money/bad/no_mingle.catala_en | 44 ++-- tests/money/good/literal_parsing.catala_en | 16 +- tests/money/good/simple.catala_en | 18 +- .../bad/toplevel_defs.catala_en | 16 +- tests/name_resolution/good/let_in.catala_en | 40 ++-- tests/name_resolution/good/let_in2.catala_en | 14 +- .../good/out_of_order.catala_en | 16 +- .../good/toplevel_defs.catala_en | 70 +++--- .../good/toplevel_defs_simple.catala_en | 14 +- tests/proof/bad/array_length-empty.catala_en | 12 +- .../proof/bad/array_length-overlap.catala_en | 12 +- tests/proof/bad/assert-empty.catala_en | 10 +- .../proof/bad/dates_get_year-empty.catala_en | 31 +-- .../bad/dates_get_year-overlap.catala_en | 12 +- tests/proof/bad/dates_simple-empty.catala_en | 12 +- .../proof/bad/dates_simple-overlap.catala_en | 12 +- tests/proof/bad/duration-empty.catala_en | 12 +- tests/proof/bad/duration-overlap.catala_en | 12 +- tests/proof/bad/enums-empty.catala_en | 30 ++- tests/proof/bad/enums-nonbool-empty.catala_en | 30 ++- .../proof/bad/enums-nonbool-overlap.catala_en | 30 ++- tests/proof/bad/enums-overlap.catala_en | 30 ++- tests/proof/bad/enums_inj-empty.catala_en | 30 ++- tests/proof/bad/enums_inj-overlap.catala_en | 12 +- tests/proof/bad/enums_unit-empty.catala_en | 12 +- tests/proof/bad/enums_unit-overlap.catala_en | 12 +- .../bad/let_in_condition-empty.catala_en | 12 +- tests/proof/bad/money-empty.catala_en | 12 +- tests/proof/bad/money-overlap.catala_en | 12 +- tests/proof/bad/no_vars-conflict.catala_en | 12 +- tests/proof/bad/no_vars-empty.catala_en | 12 +- .../bad/prolala_motivating_example.catala_en | 51 +++-- tests/proof/bad/rationals-empty.catala_en | 12 +- tests/proof/bad/rationals-overlap.catala_en | 12 +- tests/proof/bad/sat_solving.catala_en | 12 +- tests/proof/bad/structs-empty.catala_en | 12 +- tests/proof/bad/structs-overlap.catala_en | 12 +- tests/proof/good/array_length.catala_en | 12 +- tests/proof/good/assert.catala_en | 12 +- tests/proof/good/dates_get_year.catala_en | 12 +- tests/proof/good/dates_simple.catala_en | 12 +- tests/proof/good/direct_scope_call.catala_en | 12 +- .../direct_scope_call_with_context.catala_en | 12 +- tests/proof/good/duration.catala_en | 12 +- tests/proof/good/enums-arith.catala_en | 48 ++-- tests/proof/good/enums-nonbool.catala_en | 48 ++-- tests/proof/good/enums.catala_en | 48 ++-- tests/proof/good/enums_inj.catala_en | 12 +- tests/proof/good/enums_unit.catala_en | 12 +- tests/proof/good/functions.catala_en | 12 +- tests/proof/good/let_in_condition.catala_en | 12 +- tests/proof/good/money.catala_en | 12 +- tests/proof/good/no_vars.catala_en | 12 +- tests/proof/good/rationals.catala_en | 12 +- tests/proof/good/simple_vars.catala_en | 12 +- tests/proof/good/structs.catala_en | 12 +- tests/scope/bad/cycle_in_scope.catala_en | 48 ++-- tests/scope/bad/cyclic_scope_calls.catala_en | 43 ++-- tests/scope/bad/cyclic_scopes.catala_en | 33 +-- tests/scope/bad/scope.catala_en | 30 +-- .../scope/bad/scope_call_duplicate.catala_en | 15 +- tests/scope/bad/scope_call_extra.catala_en | 33 +-- tests/scope/bad/scope_call_missing.catala_en | 27 ++- tests/scope/bad/sub_vars_in_sub_var.catala_en | 18 +- .../191_fix_record_name_confusion.catala_en | 8 +- .../scope/good/grand_parent_caller.catala_en | 30 ++- .../good/local-capture-subscope.catala_en | 23 +- tests/scope/good/nothing.catala_en | 44 ++-- tests/scope/good/out_sub_scope.catala_en | 8 +- tests/scope/good/scope_call.catala_en | 14 +- tests/scope/good/scope_call2.catala_en | 50 +++-- tests/scope/good/scope_call3.catala_en | 81 +++---- tests/scope/good/scope_call4.catala_en | 50 +++-- tests/scope/good/scope_struct.catala_en | 14 +- tests/scope/good/simple.catala_en | 8 +- tests/scope/good/sub_scope.catala_en | 26 ++- tests/scope/good/sub_sub_scope.catala_en | 172 ++++++++------ ...ubscope_function_arg_not_defined.catala_en | 14 +- ...bscope_function_arg_not_defined2.catala_en | 12 +- tests/struct/bad/bug_107.catala_en | 32 +-- tests/struct/bad/empty_struct.catala_en | 18 +- tests/struct/bad/nested.catala_en | 36 +-- tests/struct/bad/nested2.catala_en | 110 ++++----- tests/struct/bad/nonexisting_struct.catala_en | 16 +- tests/struct/bad/struct_update.catala_en | 27 ++- .../bad/wrong_qualified_field.catala_en | 16 +- tests/struct/good/ambiguous_fields.catala_en | 46 ++-- tests/struct/good/nested3.catala_en | 24 +- tests/struct/good/same_name_fields.catala_en | 48 ++-- tests/struct/good/simple.catala_en | 16 +- tests/struct/good/struct_update.catala_en | 29 ++- tests/tuples/good/tuples.catala_en | 14 +- tests/tuples/good/tuplists.catala_en | 86 ++++--- tests/typing/bad/err1.catala_en | 33 +-- tests/typing/bad/err2.catala_en | 33 +-- tests/typing/bad/err3.catala_en | 100 +++++---- tests/typing/bad/err4.catala_en | 82 ++++--- tests/typing/bad/err5.catala_en | 33 +-- tests/typing/bad/err6.catala_en | 33 +-- tests/typing/good/common.catala_en | 93 +++++--- tests/typing/good/overload.catala_en | 24 +- .../variable_state/bad/def_no_state.catala_en | 32 +-- .../bad/double_same_state.catala_en | 34 +-- .../bad/no_cross_exceptions.catala_en | 16 +- .../bad/self_reference_first_state.catala_en | 17 +- .../variable_state/bad/state_cycle.catala_en | 62 +++--- .../bad/unknown_state.catala_en | 30 +-- tests/variable_state/good/simple.catala_en | 14 +- .../good/state_access.catala_en | 8 +- tests/variable_state/good/subscope.catala_en | 16 +- 231 files changed, 3901 insertions(+), 2611 deletions(-) diff --git a/compiler/catala_utils/message.ml b/compiler/catala_utils/message.ml index 3d3ab5d92..cd93603c1 100644 --- a/compiler/catala_utils/message.ml +++ b/compiler/catala_utils/message.ml @@ -115,11 +115,11 @@ let pp_marker target ppf = let open Ocolor_types in let tags, str = match target with - | Debug -> [Bold; Fg (C4 magenta)], "[DEBUG]" - | Error -> [Bold; Fg (C4 red)], "[ERROR]" - | Warning -> [Bold; Fg (C4 yellow)], "[WARNING]" - | Result -> [Bold; Fg (C4 green)], "[RESULT]" - | Log -> [Bold; Fg (C4 black)], "[LOG]" + | Debug -> [Bold; Fg (C4 magenta)], "DEBUG" + | Error -> [Bold; Fg (C4 red)], "ERROR" + | Warning -> [Bold; Fg (C4 yellow)], "WARNING" + | Result -> [Bold; Fg (C4 green)], "RESULT" + | Log -> [Bold; Fg (C4 black)], "LOG" in if target = Debug then print_time_marker ppf (); Format.pp_open_stag ppf (Ocolor_format.Ocolor_styles_tag tags); @@ -164,28 +164,117 @@ module Content = struct let of_string (s : string) : t = [MainMessage (fun ppf -> Format.pp_print_text ppf s)] + let basic_msg ppf target content = + Format.pp_open_vbox ppf 0; + Format.pp_print_list + ~pp_sep:(fun ppf () -> Format.fprintf ppf "@,@,") + (fun ppf -> function + | Position pos -> + Option.iter + (fun msg -> Format.fprintf ppf "@[%t@]@," msg) + pos.pos_message; + Pos.format_loc_text ppf pos.pos + | MainMessage msg -> + Format.fprintf ppf "@[[%t] %t@]" (pp_marker target) msg + | Outcome msg -> + Format.fprintf ppf "@[[%t]@ %t@]" (pp_marker target) msg + | Suggestion suggestions_list -> Suggestions.format ppf suggestions_list) + ppf content; + Format.pp_close_box ppf (); + Format.pp_print_newline ppf () + + let fancy_msg ppf target content = + let ppf_out_fcts = Format.pp_get_formatter_out_functions ppf () in + let restore_ppf () = + Format.pp_print_flush ppf (); + Format.pp_set_formatter_out_functions ppf ppf_out_fcts + in + let getcolorstr pp = + let buf = Buffer.create 17 in + let ppfb = Format.formatter_of_buffer buf in + Format.pp_set_formatter_stag_functions ppfb + (Format.pp_get_formatter_stag_functions ppf ()); + Format.pp_set_mark_tags ppfb (Format.pp_get_mark_tags ppf ()); + pp ppfb; + Format.pp_print_flush ppfb (); + Buffer.contents buf + in + (* The following adds a blue line on the left *) + Format.pp_set_formatter_out_functions ppf + { + ppf_out_fcts with + out_indent = + (fun n -> + let lead = + getcolorstr (fun ppf -> Format.fprintf ppf "@{@<1>%s@}" "│") + in + if n >= 1 then ppf_out_fcts.out_string lead 0 (String.length lead); + if n >= 2 then ppf_out_fcts.out_indent (n - 1)); + }; + Format.pp_open_vbox ppf 1; + Format.fprintf ppf "@{@<2>%s[%t]@<2>%s@}" "┌─" (pp_marker target) "─"; + (* Returns true when a finaliser is needed *) + let print_elt ppf ?(islast = false) = function + | MainMessage msg -> + Format.fprintf ppf "@,@[@,@[%t@]@]" msg; + if islast then Format.pp_print_cut ppf (); + true + | Position pos -> ( + Format.pp_print_cut ppf (); + Option.iter + (fun msg -> Format.fprintf ppf "@[@,@[%t@]@]" msg) + pos.pos_message; + Format.pp_print_break ppf 0 (-1); + let pr_head, pr_context, pr_legal = Pos.format_loc_text_parts pos.pos in + Format.pp_open_vbox ppf 2; + Format.fprintf ppf "@{@<1>%s@}%t" "├" pr_head; + pr_context ppf; + Format.pp_close_box ppf (); + match pr_legal with + | None -> true + | Some pr_legal -> + Format.pp_print_break ppf 0 (-1); + if islast then ( + restore_ppf (); + Format.pp_open_vbox ppf 3; + Format.fprintf ppf "@{@<3>%s@}%t" "└─ " pr_legal) + else ( + Format.pp_open_vbox ppf 3; + Format.fprintf ppf "@{@<3>%s@}%t" "├─ " pr_legal); + Format.pp_close_box ppf (); + not islast) + | Outcome msg -> + Format.fprintf ppf "@,@[%t@]" msg; + true + | Suggestion suggestions_list -> + Format.fprintf ppf "@,@[@,@[%a@]@]" Suggestions.format + suggestions_list; + true + in + let rec print_lines ppf = function + | [elt] -> + let finalise = print_elt ppf ~islast:true elt in + Format.pp_close_box ppf (); + if finalise then Format.fprintf ppf "@,@{@<2>%s@}" "└─" + | elt :: r -> + let _ = print_elt ppf elt in + print_lines ppf r + | [] -> + Format.pp_close_box ppf (); + Format.pp_print_cut ppf () + in + print_lines ppf content; + Format.pp_close_box ppf (); + restore_ppf (); + Format.pp_print_newline ppf () + let emit (content : t) (target : level) : unit = match Global.options.message_format with - | Global.Human -> + | Global.Human -> ( let ppf = get_ppf target in - Format.pp_open_vbox ppf 0; - Format.pp_print_list - ~pp_sep:(fun ppf () -> Format.fprintf ppf "@,@,") - (fun ppf -> function - | Position pos -> - Option.iter - (fun msg -> Format.fprintf ppf "@[%t@]@," msg) - pos.pos_message; - Pos.format_loc_text ppf pos.pos - | MainMessage msg -> - Format.fprintf ppf "@[%t %t@]" (pp_marker target) msg - | Outcome msg -> - Format.fprintf ppf "@[%t@ %t@]" (pp_marker target) msg - | Suggestion suggestions_list -> - Suggestions.format ppf suggestions_list) - ppf content; - Format.pp_close_box ppf (); - Format.pp_print_newline ppf () + match target with + | Debug | Log -> basic_msg ppf target content + | Result | Warning | Error -> fancy_msg ppf target content) | Global.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 @@ -222,7 +311,7 @@ module Content = struct (fun pos -> Format.fprintf ppf "@{%s@}: " (Pos.to_string_short pos)) pos; - pp_marker target ppf; + Format.fprintf ppf "[%t]" (pp_marker target); match message with | Some message -> Format.pp_print_char ppf ' '; @@ -247,6 +336,7 @@ type ('a, 'b) emitter = ?pos_msg:Content.message -> ?extra_pos:(string * Pos.t) list -> ?fmt_pos:(Content.message * Pos.t) list -> + ?outcome:Content.message list -> ?suggestion:string list -> ('a, Format.formatter, unit, 'b) format4 -> 'a @@ -258,6 +348,7 @@ let make ?pos_msg ?extra_pos ?fmt_pos + ?(outcome = []) ?(suggestion = []) ~cont ~level = @@ -268,6 +359,9 @@ let make in let t = match header with Some h -> prepend_message t h | None -> t in let t = if internal then to_internal_error t else t in + let t = + match outcome with [] -> t | o -> t @ List.map (fun o -> Outcome o) o + in let t = match pos with Some p -> add_position t ?message:pos_msg p | None -> t in diff --git a/compiler/catala_utils/message.mli b/compiler/catala_utils/message.mli index 1ef32a729..60ec7061b 100644 --- a/compiler/catala_utils/message.mli +++ b/compiler/catala_utils/message.mli @@ -89,6 +89,7 @@ type ('a, 'b) emitter = ?pos_msg:Content.message -> ?extra_pos:(string * Pos.t) list -> ?fmt_pos:(Content.message * Pos.t) list -> + ?outcome:Content.message list -> ?suggestion:string list -> ('a, Format.formatter, unit, 'b) format4 -> 'a diff --git a/compiler/catala_utils/pos.ml b/compiler/catala_utils/pos.ml index c283f206f..8fa7d50d5 100644 --- a/compiler/catala_utils/pos.ml +++ b/compiler/catala_utils/pos.ml @@ -121,102 +121,132 @@ let utf8_byte_index s ui0 = in aux 0 0 -let format_loc_text ppf (pos : t) = - try - let filename = get_file pos in - if filename = "" then Format.pp_print_string ppf "No position information" - else - let sline = get_start_line pos in - let eline = get_end_line pos in - let ic, input_line_opt = - let from_contents = - match Global.options.input_src with - | Contents (str, _) when str = filename -> Some str - | _ -> None - in - match from_contents with - | Some str -> - let line_index = ref 0 in - let lines = String.split_on_char '\n' str in - let input_line_opt () : string option = - match List.nth_opt lines !line_index with - | Some l -> - line_index := !line_index + 1; - Some l - | None -> None +let format_loc_text_parts (pos : t) = + let filename = get_file pos in + if filename = "" then + ( (fun ppf -> Format.pp_print_string ppf "No position information"), + ignore, + None ) + else + let pr_head ppf = + Format.fprintf ppf "@{─➤ %s:@}@," (to_string_short pos) + in + let pr_context, pr_legal = + try + let sline = get_start_line pos in + let eline = get_end_line pos in + let ic, input_line_opt = + let from_contents = + match Global.options.input_src with + | Contents (str, _) when str = filename -> Some str + | _ -> None in - None, input_line_opt - | None -> ( - try - let ic = open_in filename in + match from_contents with + | Some str -> + let line_index = ref 0 in + let lines = String.split_on_char '\n' str in let input_line_opt () : string option = - try Some (input_line ic) with End_of_file -> None + match List.nth_opt lines !line_index with + | Some l -> + line_index := !line_index + 1; + Some l + | None -> None in - Some ic, input_line_opt - with Sys_error _ -> None, fun () -> None) - in - let include_extra_count = 0 in - let rec get_lines (n : int) : (int * string) list = - match input_line_opt () with - | Some line -> - if n < sline - include_extra_count then get_lines (n + 1) - else if - n >= sline - include_extra_count && n <= eline + include_extra_count - then (n, line) :: get_lines (n + 1) - else [] - | None -> [] - in - let pos_lines = get_lines 1 in - let nspaces = int_of_float (log10 (float_of_int eline)) + 1 in - let legal_pos_lines = - List.rev_map - (fun s -> - Re.Pcre.substitute ~rex:(Re.Pcre.regexp "\n\\s*") - ~subst:(fun _ -> " ") - s) - pos.law_pos - in - (match ic with None -> () | Some ic -> close_in ic); - let print_matched_line ppf ((line_no, line) : int * string) = - let line_indent = indent_number line in - let match_start_index = - utf8_byte_index line - (if line_no = sline then get_start_column pos - 1 else line_indent) + None, input_line_opt + | None -> ( + try + let ic = open_in filename in + let input_line_opt () : string option = + try Some (input_line ic) with End_of_file -> None + in + Some ic, input_line_opt + with Sys_error _ -> None, fun () -> None) in - let match_end_index = - if line_no = eline then utf8_byte_index line (get_end_column pos - 1) - else String.length line + let include_extra_count = 0 in + let rec get_lines (n : int) : (int * string) list = + match input_line_opt () with + | Some line -> + if n < sline - include_extra_count then get_lines (n + 1) + else if + n >= sline - include_extra_count + && n <= eline + include_extra_count + then (n, line) :: get_lines (n + 1) + else [] + | None -> [] in - let unmatched_prefix = String.sub line 0 match_start_index in - let matched_substring = - String.sub line match_start_index - (max 0 (match_end_index - match_start_index)) + let pos_lines = get_lines 1 in + let nspaces = int_of_float (log10 (float_of_int eline)) + 1 in + (match ic with None -> () | Some ic -> close_in ic); + let print_matched_line ppf ((line_no, line) : int * string) = + let line_indent = indent_number line in + let match_start_index = + utf8_byte_index line + (if line_no = sline then get_start_column pos - 1 else line_indent) + in + let match_end_index = + if line_no = eline then utf8_byte_index line (get_end_column pos - 1) + else String.length line + in + let unmatched_prefix = String.sub line 0 match_start_index in + let matched_substring = + String.sub line match_start_index + (max 0 (match_end_index - match_start_index)) + in + let match_start_col = String.width unmatched_prefix in + let match_num_cols = String.width matched_substring in + Format.fprintf ppf "@{%*d │@} %a" nspaces line_no + (fun ppf -> Format.pp_print_as ppf (String.width line)) + line; + Format.pp_print_cut ppf (); + if line_no >= sline && line_no <= eline then + Format.fprintf ppf "@{%s │@} %s@{%a@}" + (string_repeat nspaces " ") + (string_repeat match_start_col " ") + (fun ppf -> Format.pp_print_as ppf match_num_cols) + (string_repeat match_num_cols "‾") in - let match_start_col = String.width unmatched_prefix in - let match_num_cols = String.width matched_substring in - Format.fprintf ppf "@{%*d │@} %s@," nspaces line_no line; - if line_no >= sline && line_no <= eline then - Format.fprintf ppf "@{%s │@} %s@{%s@}" - (string_repeat nspaces " ") - (string_repeat match_start_col " ") - (string_repeat match_num_cols "‾") - in - Format.pp_open_vbox ppf 0; - Format.fprintf ppf "@{┌─⯈ %s:@}@," (to_string_short pos); - Format.fprintf ppf "@{└%s┐@}@," (string_repeat nspaces "─"); - Format.pp_print_list print_matched_line ppf pos_lines; - (* Format.pp_print_cut ppf (); *) - let rec pp_legal nspaces = function - | [last] -> - Format.fprintf ppf "@,@{%*s└─ %s@}" nspaces "" last - | l :: lines -> - Format.fprintf ppf "@,@{%*s└┬ %s@}" nspaces "" l; - pp_legal (nspaces + 1) lines - | [] -> () - in - pp_legal (nspaces + 1) legal_pos_lines; - Format.pp_close_box ppf () - with Sys_error _ -> Format.fprintf ppf "Location: %s" (to_string pos) + let pr_context ppf = + Format.fprintf ppf "@{ %s│@}@," (string_repeat nspaces " "); + Format.pp_print_list print_matched_line ppf pos_lines + in + let legal_pos_lines = + List.rev_map + (fun s -> + Re.Pcre.substitute ~rex:(Re.Pcre.regexp "\n\\s*") + ~subst:(fun _ -> " ") + s) + pos.law_pos + in + let rec pp_legal nspaces leg ppf = + match leg with + | [last] -> + Format.fprintf ppf "@,@{%*s@<2>%s %s@}" nspaces "" "└─" last + | l :: lines -> + Format.fprintf ppf "@,@{%*s@<2>%s %s@}" nspaces "" "└┬" l; + pp_legal (nspaces + 1) lines ppf + | [] -> () + in + let pr_law = + match legal_pos_lines with + | [] -> None + | fst :: rest -> + Some + (fun ppf -> + Format.fprintf ppf "@{%s@}" fst; + pp_legal 0 rest ppf) + in + pr_context, pr_law + with Sys_error _ -> ignore, None + in + pr_head, pr_context, pr_legal + +let format_loc_text ppf t = + let pr_head, pr_context, pr_legal = format_loc_text_parts t in + Format.pp_open_vbox ppf 0; + pr_head ppf; + pr_context ppf; + Option.iter (fun f -> Format.pp_print_cut ppf (); f ppf) pr_legal; + Format.pp_close_box ppf () let no_pos : t = let zero_pos = diff --git a/compiler/catala_utils/pos.mli b/compiler/catala_utils/pos.mli index ac8181d47..a6019e7b4 100644 --- a/compiler/catala_utils/pos.mli +++ b/compiler/catala_utils/pos.mli @@ -59,5 +59,13 @@ val format_loc_text : Format.formatter -> t -> unit (** Open the file corresponding to the position and retrieves the text concerned by the position *) +val format_loc_text_parts : + t -> + (Format.formatter -> unit) + * (Format.formatter -> unit) + * (Format.formatter -> unit) option +(** Like [format_loc_text], but returns the printing functions in 3 separate + parts: the file name header, the line context, and the law headers *) + val no_pos : t (** Placeholder position *) diff --git a/compiler/catala_utils/suggestions.ml b/compiler/catala_utils/suggestions.ml index 0428e7b1a..0b2551e03 100644 --- a/compiler/catala_utils/suggestions.ml +++ b/compiler/catala_utils/suggestions.ml @@ -102,4 +102,5 @@ let format (ppf : Format.formatter) (suggestions_list : string list) = Format.pp_print_list ~pp_sep:(fun ppf () -> Format.fprintf ppf ",@ or ") (fun ppf string -> Format.fprintf ppf "@{\"%s\"@}" string) - ppf suggestions_list + ppf suggestions_list; + Format.pp_print_string ppf " ?" diff --git a/compiler/desugared/print.ml b/compiler/desugared/print.ml index 50902d9f7..303d5811b 100644 --- a/compiler/desugared/print.ml +++ b/compiler/desugared/print.ml @@ -92,10 +92,12 @@ let print_exceptions_graph Ast.ScopeDef.format var ScopeName.format scope; Dependency.ExceptionsDependencies.iter_vertex (fun ex -> - Message.result "@[Definitions with label \"%a\":@,%a@]" - LabelName.format ex.Dependency.ExceptionVertex.label - (RuleName.Map.format_values Pos.format_loc_text) - ex.Dependency.ExceptionVertex.rules) + Message.result "@[Definitions with label \"%a\":@]" LabelName.format + ex.Dependency.ExceptionVertex.label + ~extra_pos: + (List.map + (fun p -> "", p) + (RuleName.Map.values ex.Dependency.ExceptionVertex.rules))) g; let tree = build_exception_tree g in Message.result "@[The exception tree structure is as follows:@,@,%a@]" diff --git a/compiler/driver.ml b/compiler/driver.ml index f045f8f66..d22df9d66 100644 --- a/compiler/driver.ml +++ b/compiler/driver.ml @@ -688,18 +688,19 @@ module Commands = struct let results = List.sort (fun ((v1, _), _) ((v2, _), _) -> String.compare v1 v2) results in - Message.result "Computation successful!%s" - (if List.length results > 0 then " Results:" else ""); let language = Cli.file_lang (Global.input_src_file options.Global.input_src) in - List.iter - (fun ((var, _), result) -> - Message.result "@[%s@ =@ %a@]" var - (if options.Global.debug then Print.expr ~debug:false () - else Print.UserFacing.value language) - result) - results + Message.result "Computation successful!%s" + (if List.length results > 0 then " Results:" else "") + ~outcome: + (List.map + (fun ((var, _), result) ppf -> + Format.fprintf ppf "@[%s@ =@ %a@]" var + (if options.Global.debug then Print.expr ~debug:false () + else Print.UserFacing.value language) + result) + results) let interpret_dcalc typed diff --git a/compiler/shared_ast/typing.ml b/compiler/shared_ast/typing.ml index e4d86da06..acaf4abb6 100644 --- a/compiler/shared_ast/typing.ml +++ b/compiler/shared_ast/typing.ml @@ -265,8 +265,8 @@ let handle_type_error ctx (A.AnyExpr e) t1 t2 = in Message.error ~fmt_pos "Error during typechecking, incompatible types:@\n\ - @[@{@<3>%s@} @[%a@]@,\ - @{@<3>%s@} @[%a@]@]" "┌─⯈" (format_typ ctx) t1 "└─⯈" + @[@{@<2>%s@} @[%a@]@,\ + @{@<2>%s@} @[%a@]@]" "─➤" (format_typ ctx) t1 "─➤" (format_typ ctx) t2 let lit_type (lit : A.lit) : naked_typ = diff --git a/doc/syntax/syntax_en.catala_en b/doc/syntax/syntax_en.catala_en index 37ad6db77..63c4c6b0a 100644 --- a/doc/syntax/syntax_en.catala_en +++ b/doc/syntax/syntax_en.catala_en @@ -252,12 +252,14 @@ to ensure that the *syntax* is correct. ```catala-test-inline $ catala typecheck -[ERROR] No scope named Scope0 found - -┌─⯈ doc/syntax/syntax_en.catala_en:94.14-94.20: -└──┐ -94 │ sub1 scope Scope0 - │ ‾‾‾‾‾‾ - └─ Metadata declaration +┌─[ERROR]─ +│ +│ No scope named Scope0 found +│ +├─➤ doc/syntax/syntax_en.catala_en:94.14-94.20: +│ │ +│ 94 │ sub1 scope Scope0 +│ │ ‾‾‾‾‾‾ +└─ Metadata declaration #return code 123# ``` diff --git a/doc/syntax/syntax_fr.catala_fr b/doc/syntax/syntax_fr.catala_fr index 15fafdf44..37c757b1c 100644 --- a/doc/syntax/syntax_fr.catala_fr +++ b/doc/syntax/syntax_fr.catala_fr @@ -250,12 +250,14 @@ to ensure that the *syntax* is correct. ```catala-test-inline $ catala typecheck -[ERROR] No scope named Scope0 found - -┌─⯈ doc/syntax/syntax_fr.catala_fr:92.28-92.34: -└──┐ -92 │ sub1 champ d'application Scope0 - │ ‾‾‾‾‾‾ - └─ Déclaration des métadonnées +┌─[ERROR]─ +│ +│ No scope named Scope0 found +│ +├─➤ doc/syntax/syntax_fr.catala_fr:92.28-92.34: +│ │ +│ 92 │ sub1 champ d'application Scope0 +│ │ ‾‾‾‾‾‾ +└─ Déclaration des métadonnées #return code 123# ``` diff --git a/tests/arithmetic/bad/division_by_zero.catala_en b/tests/arithmetic/bad/division_by_zero.catala_en index 2d69ea634..7e2dad620 100644 --- a/tests/arithmetic/bad/division_by_zero.catala_en +++ b/tests/arithmetic/bad/division_by_zero.catala_en @@ -33,42 +33,48 @@ scope Money: ```catala-test-inline $ catala test-scope Dec -[ERROR] During evaluation: a value is being used as denominator in a division - and it computed to zero. - -┌─⯈ tests/arithmetic/bad/division_by_zero.catala_en:20.28-20.30: -└──┐ -20 │ definition i equals 1. / 0. - │ ‾‾ - └┬ `Division_by_zero` exception management - └─ with decimals +┌─[ERROR]─ +│ +│ During evaluation: a value is being used as denominator in a division and +│ it computed to zero. +│ +├─➤ tests/arithmetic/bad/division_by_zero.catala_en:20.28-20.30: +│ │ +│ 20 │ definition i equals 1. / 0. +│ │ ‾‾ +└─ `Division_by_zero` exception management + └─ with decimals #return code 123# ``` ```catala-test-inline $ catala test-scope Int -[ERROR] During evaluation: a value is being used as denominator in a division - and it computed to zero. - -┌─⯈ tests/arithmetic/bad/division_by_zero.catala_en:10.27-10.28: -└──┐ -10 │ definition i equals 1 / 0 - │ ‾ - └┬ `Division_by_zero` exception management - └─ with integers +┌─[ERROR]─ +│ +│ During evaluation: a value is being used as denominator in a division and +│ it computed to zero. +│ +├─➤ tests/arithmetic/bad/division_by_zero.catala_en:10.27-10.28: +│ │ +│ 10 │ definition i equals 1 / 0 +│ │ ‾ +└─ `Division_by_zero` exception management + └─ with integers #return code 123# ``` ```catala-test-inline $ catala test-scope Money -[ERROR] During evaluation: a value is being used as denominator in a division - and it computed to zero. - -┌─⯈ tests/arithmetic/bad/division_by_zero.catala_en:30.31-30.35: -└──┐ -30 │ definition i equals $10.0 / $0.0 - │ ‾‾‾‾ - └┬ `Division_by_zero` exception management - └─ with money +┌─[ERROR]─ +│ +│ During evaluation: a value is being used as denominator in a division and +│ it computed to zero. +│ +├─➤ tests/arithmetic/bad/division_by_zero.catala_en:30.31-30.35: +│ │ +│ 30 │ definition i equals $10.0 / $0.0 +│ │ ‾‾‾‾ +└─ `Division_by_zero` exception management + └─ with money #return code 123# ``` diff --git a/tests/arithmetic/bad/logical_prio.catala_en b/tests/arithmetic/bad/logical_prio.catala_en index d1ec1a5aa..cc9c3da0f 100644 --- a/tests/arithmetic/bad/logical_prio.catala_en +++ b/tests/arithmetic/bad/logical_prio.catala_en @@ -8,17 +8,20 @@ scope S1: ```catala-test-inline $ catala typecheck -[ERROR] Please add parentheses to explicit which of these operators should be - applied first - -┌─⯈ tests/arithmetic/bad/logical_prio.catala_en:6.28-6.31: -└─┐ -6 │ definition o equals true and (false and true and true) or false - │ ‾‾‾ - -┌─⯈ tests/arithmetic/bad/logical_prio.catala_en:6.58-6.60: -└─┐ -6 │ definition o equals true and (false and true and true) or false - │ ‾‾ +┌─[ERROR]─ +│ +│ Please add parentheses to explicit which of these operators should be +│ applied first +│ +├─➤ tests/arithmetic/bad/logical_prio.catala_en:6.28-6.31: +│ │ +│ 6 │ definition o equals true and (false and true and true) or false +│ │ ‾‾‾ +│ +├─➤ tests/arithmetic/bad/logical_prio.catala_en:6.58-6.60: +│ │ +│ 6 │ definition o equals true and (false and true and true) or false +│ │ ‾‾ +└─ #return code 123# ``` diff --git a/tests/arithmetic/good/priorities.catala_en b/tests/arithmetic/good/priorities.catala_en index e24601dc6..9778e8a83 100644 --- a/tests/arithmetic/good/priorities.catala_en +++ b/tests/arithmetic/good/priorities.catala_en @@ -16,15 +16,21 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope A -[RESULT] Computation successful! Results: -[RESULT] w = 0 -[RESULT] x = 4 -[RESULT] y = 4 -[RESULT] z = 390.0 +┌─[RESULT]─ +│Computation successful! Results: +│w = 0 +│x = 4 +│y = 4 +│z = 390.0 +└─ ``` diff --git a/tests/arithmetic/good/rounding.catala_en b/tests/arithmetic/good/rounding.catala_en index 091a0711c..6471c4ea4 100644 --- a/tests/arithmetic/good/rounding.catala_en +++ b/tests/arithmetic/good/rounding.catala_en @@ -46,6 +46,8 @@ scope A: ```catala-test-inline $ catala test-scope A -[RESULT] Computation successful! Results: -[RESULT] o = false +┌─[RESULT]─ +│Computation successful! Results: +│o = false +└─ ``` diff --git a/tests/arithmetic/good/trivial.catala_en b/tests/arithmetic/good/trivial.catala_en index c4dccecda..b16e61382 100644 --- a/tests/arithmetic/good/trivial.catala_en +++ b/tests/arithmetic/good/trivial.catala_en @@ -10,12 +10,18 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope A -[RESULT] Computation successful! Results: -[RESULT] w = 6 +┌─[RESULT]─ +│Computation successful! Results: +│w = 6 +└─ ``` diff --git a/tests/array/bad/fold_error.catala_en b/tests/array/bad/fold_error.catala_en index 3f886c0cf..2044a9d0a 100644 --- a/tests/array/bad/fold_error.catala_en +++ b/tests/array/bad/fold_error.catala_en @@ -12,26 +12,28 @@ scope A: ```catala-test-inline $ catala test-scope A -[ERROR] I don't know how to apply operator >= on types integer and money - -┌─⯈ tests/array/bad/fold_error.catala_en:10.78-10.85: -└──┐ -10 │ definition list_high_count equals number of list of m among list such that m >= $7 - │ ‾‾‾‾‾‾‾ - └─ Article - -Type integer coming from expression: -┌─⯈ tests/array/bad/fold_error.catala_en:5.32-5.39: -└─┐ -5 │ context list content list of integer - │ ‾‾‾‾‾‾‾ - └─ Article - -Type money coming from expression: -┌─⯈ tests/array/bad/fold_error.catala_en:10.83-10.85: -└──┐ -10 │ definition list_high_count equals number of list of m among list such that m >= $7 - │ ‾‾ - └─ Article +┌─[ERROR]─ +│ +│ I don't know how to apply operator >= on types integer and money +│ +├─➤ tests/array/bad/fold_error.catala_en:10.78-10.85: +│ │ +│ 10 │ definition list_high_count equals number of list of m among list such that m >= $7 +│ │ ‾‾‾‾‾‾‾ +├─ Article +│ +│ Type integer coming from expression: +├─➤ tests/array/bad/fold_error.catala_en:5.32-5.39: +│ │ +│ 5 │ context list content list of integer +│ │ ‾‾‾‾‾‾‾ +├─ Article +│ +│ Type money coming from expression: +├─➤ tests/array/bad/fold_error.catala_en:10.83-10.85: +│ │ +│ 10 │ definition list_high_count equals number of list of m among list such that m >= $7 +│ │ ‾‾ +└─ Article #return code 123# ``` diff --git a/tests/array/good/aggregation.catala_en b/tests/array/good/aggregation.catala_en index 08f4097b8..5ccfd39f7 100644 --- a/tests/array/good/aggregation.catala_en +++ b/tests/array/good/aggregation.catala_en @@ -27,21 +27,29 @@ scope B: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope A -[RESULT] Computation successful! Results: -[RESULT] x = [$0.00; $9.00; $5.20] +┌─[RESULT]─ +│Computation successful! Results: +│x = [$0.00; $9.00; $5.20] +└─ ``` ```catala-test-inline $ catala test-scope B -[RESULT] Computation successful! Results: -[RESULT] max = $18.00 -[RESULT] min = $5.00 -[RESULT] y = $17.20 -[RESULT] z = 1 +┌─[RESULT]─ +│Computation successful! Results: +│max = $18.00 +│min = $5.00 +│y = $17.20 +│z = 1 +└─ ``` diff --git a/tests/array/good/aggregation_2.catala_en b/tests/array/good/aggregation_2.catala_en index 8b51bf80b..7d74f2701 100644 --- a/tests/array/good/aggregation_2.catala_en +++ b/tests/array/good/aggregation_2.catala_en @@ -33,24 +33,31 @@ scope B: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope A -[RESULT] Computation successful! Results: -[RESULT] -x = - [ - S { -- id: 0 -- income: $0.00 }; S { -- id: 1 -- income: $9.00 }; - S { -- id: 2 -- income: $5.20 } - ] +┌─[RESULT]─ +│Computation successful! Results: +│x = +│ [ +│ S { -- id: 0 -- income: $0.00 }; S { -- id: 1 -- income: $9.00 }; +│ S { -- id: 2 -- income: $5.20 } +│ ] +└─ ``` ```catala-test-inline $ catala test-scope B -[RESULT] Computation successful! Results: -[RESULT] argmax = S { -- id: 1 -- income: $9.00 } -[RESULT] argmin = S { -- id: 0 -- income: $0.00 } +┌─[RESULT]─ +│Computation successful! Results: +│argmax = S { -- id: 1 -- income: $9.00 } +│argmin = S { -- id: 0 -- income: $0.00 } +└─ ``` diff --git a/tests/array/good/aggregation_3.catala_en b/tests/array/good/aggregation_3.catala_en index b8bb41f15..819db8afa 100644 --- a/tests/array/good/aggregation_3.catala_en +++ b/tests/array/good/aggregation_3.catala_en @@ -35,8 +35,12 @@ scope S: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline @@ -90,6 +94,8 @@ let scope S (x: integer|internal|output) = ```catala-test-inline $ catala test-scope S -[RESULT] Computation successful! Results: -[RESULT] x = 0 +┌─[RESULT]─ +│Computation successful! Results: +│x = 0 +└─ ``` diff --git a/tests/array/good/concatenation.catala_en b/tests/array/good/concatenation.catala_en index 97ae13ef1..876e8cfd2 100644 --- a/tests/array/good/concatenation.catala_en +++ b/tests/array/good/concatenation.catala_en @@ -14,13 +14,19 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope A -[RESULT] Computation successful! Results: -[RESULT] x = [0; 1; 2; 3; 4; 5; 6] -[RESULT] y = [0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10] +┌─[RESULT]─ +│Computation successful! Results: +│x = [0; 1; 2; 3; 4; 5; 6] +│y = [0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10] +└─ ``` diff --git a/tests/array/good/filter.catala_en b/tests/array/good/filter.catala_en index 5fd105b98..1cb8dc08c 100644 --- a/tests/array/good/filter.catala_en +++ b/tests/array/good/filter.catala_en @@ -20,18 +20,26 @@ scope B: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope A -[RESULT] Computation successful! Results: -[RESULT] x = [$0.00; $9.00; $5.20] +┌─[RESULT]─ +│Computation successful! Results: +│x = [$0.00; $9.00; $5.20] +└─ ``` ```catala-test-inline $ catala test-scope B -[RESULT] Computation successful! Results: -[RESULT] y = [$9.00; $5.20] +┌─[RESULT]─ +│Computation successful! Results: +│y = [$9.00; $5.20] +└─ ``` diff --git a/tests/array/good/filter_map.catala_en b/tests/array/good/filter_map.catala_en index 7c182c1a5..bea5d1470 100644 --- a/tests/array/good/filter_map.catala_en +++ b/tests/array/good/filter_map.catala_en @@ -21,19 +21,27 @@ scope B: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope A -[RESULT] Computation successful! Results: -[RESULT] x = [$0.00; $9.00; $5.20] +┌─[RESULT]─ +│Computation successful! Results: +│x = [$0.00; $9.00; $5.20] +└─ ``` ```catala-test-inline $ catala test-scope B -[RESULT] Computation successful! Results: -[RESULT] y = [$9.00; $5.20] -[RESULT] z = [false; true; true] +┌─[RESULT]─ +│Computation successful! Results: +│y = [$9.00; $5.20] +│z = [false; true; true] +└─ ``` diff --git a/tests/array/good/fold.catala_en b/tests/array/good/fold.catala_en index 8b51bf80b..7d74f2701 100644 --- a/tests/array/good/fold.catala_en +++ b/tests/array/good/fold.catala_en @@ -33,24 +33,31 @@ scope B: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope A -[RESULT] Computation successful! Results: -[RESULT] -x = - [ - S { -- id: 0 -- income: $0.00 }; S { -- id: 1 -- income: $9.00 }; - S { -- id: 2 -- income: $5.20 } - ] +┌─[RESULT]─ +│Computation successful! Results: +│x = +│ [ +│ S { -- id: 0 -- income: $0.00 }; S { -- id: 1 -- income: $9.00 }; +│ S { -- id: 2 -- income: $5.20 } +│ ] +└─ ``` ```catala-test-inline $ catala test-scope B -[RESULT] Computation successful! Results: -[RESULT] argmax = S { -- id: 1 -- income: $9.00 } -[RESULT] argmin = S { -- id: 0 -- income: $0.00 } +┌─[RESULT]─ +│Computation successful! Results: +│argmax = S { -- id: 1 -- income: $9.00 } +│argmin = S { -- id: 0 -- income: $0.00 } +└─ ``` diff --git a/tests/array/good/map.catala_en b/tests/array/good/map.catala_en index 9b5fde222..62ec80a6b 100644 --- a/tests/array/good/map.catala_en +++ b/tests/array/good/map.catala_en @@ -14,13 +14,19 @@ scope B: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope B -[RESULT] Computation successful! Results: -[RESULT] x = [$4.00; $8.00] -[RESULT] z = [false; true] +┌─[RESULT]─ +│Computation successful! Results: +│x = [$4.00; $8.00] +│z = [false; true] +└─ ``` diff --git a/tests/array/good/simple.catala_en b/tests/array/good/simple.catala_en index 8adec733f..74cbf1f51 100644 --- a/tests/array/good/simple.catala_en +++ b/tests/array/good/simple.catala_en @@ -25,21 +25,29 @@ scope B: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope A -[RESULT] Computation successful! Results: -[RESULT] x = [0; 9; 64] +┌─[RESULT]─ +│Computation successful! Results: +│x = [0; 9; 64] +└─ ``` ```catala-test-inline $ catala test-scope B -[RESULT] Computation successful! Results: -[RESULT] v = 3 -[RESULT] w = true -[RESULT] y = true -[RESULT] z = false +┌─[RESULT]─ +│Computation successful! Results: +│v = 3 +│w = true +│y = true +│z = false +└─ ``` diff --git a/tests/array/good/simpler.catala_en b/tests/array/good/simpler.catala_en index fccb636f4..c621dd0a9 100644 --- a/tests/array/good/simpler.catala_en +++ b/tests/array/good/simpler.catala_en @@ -14,13 +14,19 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope A -[RESULT] Computation successful! Results: -[RESULT] w = false -[RESULT] x = [0; 9; 64] +┌─[RESULT]─ +│Computation successful! Results: +│w = false +│x = [0; 9; 64] +└─ ``` diff --git a/tests/array/good/simplest.catala_en b/tests/array/good/simplest.catala_en index 73773ef47..bbbb53498 100644 --- a/tests/array/good/simplest.catala_en +++ b/tests/array/good/simplest.catala_en @@ -12,12 +12,18 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope A -[RESULT] Computation successful! Results: -[RESULT] x = [0; 4; 8] +┌─[RESULT]─ +│Computation successful! Results: +│x = [0; 4; 8] +└─ ``` diff --git a/tests/bool/bad/bad_assert.catala_en b/tests/bool/bad/bad_assert.catala_en index 161467dfc..860f3631a 100644 --- a/tests/bool/bad/bad_assert.catala_en +++ b/tests/bool/bad/bad_assert.catala_en @@ -12,29 +12,31 @@ scope Foo: ```catala-test-inline $ catala test-scope Foo -[ERROR] Error during typechecking, incompatible types: - ┌─⯈ integer - └─⯈ bool - -While typechecking the following expression: -┌─⯈ tests/bool/bad/bad_assert.catala_en:9.13-9.14: -└─┐ -9 │ assertion x - │ ‾ - └─ Test - -Type integer is coming from: -┌─⯈ tests/bool/bad/bad_assert.catala_en:5.20-5.27: -└─┐ -5 │ output x content integer - │ ‾‾‾‾‾‾‾ - └─ Test - -Type bool is coming from: -┌─⯈ tests/bool/bad/bad_assert.catala_en:9.13-9.14: -└─┐ -9 │ assertion x - │ ‾ - └─ Test +┌─[ERROR]─ +│ +│ Error during typechecking, incompatible types: +│ ─➤ integer +│ ─➤ bool +│ +│ While typechecking the following expression: +├─➤ tests/bool/bad/bad_assert.catala_en:9.13-9.14: +│ │ +│ 9 │ assertion x +│ │ ‾ +├─ Test +│ +│ Type integer is coming from: +├─➤ tests/bool/bad/bad_assert.catala_en:5.20-5.27: +│ │ +│ 5 │ output x content integer +│ │ ‾‾‾‾‾‾‾ +├─ Test +│ +│ Type bool is coming from: +├─➤ tests/bool/bad/bad_assert.catala_en:9.13-9.14: +│ │ +│ 9 │ assertion x +│ │ ‾ +└─ Test #return code 123# ``` diff --git a/tests/bool/bad/test_xor_with_int.catala_en b/tests/bool/bad/test_xor_with_int.catala_en index b2947663b..376658e77 100644 --- a/tests/bool/bad/test_xor_with_int.catala_en +++ b/tests/bool/bad/test_xor_with_int.catala_en @@ -10,22 +10,24 @@ scope TestXorWithInt: ```catala-test-inline $ catala Typecheck -[ERROR] Error during typechecking, incompatible types: - ┌─⯈ integer - └─⯈ bool - -This expression has type integer: -┌─⯈ tests/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 - -Expected type bool coming from expression: -┌─⯈ tests/bool/bad/test_xor_with_int.catala_en:8.33-8.36: -└─┐ -8 │ definition test_var equals 10 xor 20 - │ ‾‾‾ - └─ 'xor' should be a boolean operator +┌─[ERROR]─ +│ +│ Error during typechecking, incompatible types: +│ ─➤ integer +│ ─➤ bool +│ +│ This expression has type integer: +├─➤ tests/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 +│ +│ Expected type bool coming from expression: +├─➤ tests/bool/bad/test_xor_with_int.catala_en:8.33-8.36: +│ │ +│ 8 │ definition test_var equals 10 xor 20 +│ │ ‾‾‾ +└─ 'xor' should be a boolean operator #return code 123# ``` diff --git a/tests/bool/good/test_bool.catala_en b/tests/bool/good/test_bool.catala_en index bc637b471..34acfef66 100644 --- a/tests/bool/good/test_bool.catala_en +++ b/tests/bool/good/test_bool.catala_en @@ -15,8 +15,12 @@ scope TestBool: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline @@ -43,9 +47,11 @@ TestBool ```catala-test-inline $ catala test-scope TestBool -[RESULT] Computation successful! Results: -[RESULT] bar = 1 -[RESULT] foo = true +┌─[RESULT]─ +│Computation successful! Results: +│bar = 1 +│foo = true +└─ ``` ```catala-test-inline diff --git a/tests/bool/good/test_precedence.catala_en b/tests/bool/good/test_precedence.catala_en index 049204914..4545ffc43 100644 --- a/tests/bool/good/test_precedence.catala_en +++ b/tests/bool/good/test_precedence.catala_en @@ -12,12 +12,18 @@ scope TestBool: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope TestBool -[RESULT] Computation successful! Results: -[RESULT] foo = true +┌─[RESULT]─ +│Computation successful! Results: +│foo = true +└─ ``` diff --git a/tests/bool/good/test_xor.catala_en b/tests/bool/good/test_xor.catala_en index 2ca9390ef..1387b7265 100644 --- a/tests/bool/good/test_xor.catala_en +++ b/tests/bool/good/test_xor.catala_en @@ -18,15 +18,21 @@ scope TestXor: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope TestXor -[RESULT] Computation successful! Results: -[RESULT] f_xor_f = false -[RESULT] f_xor_t = true -[RESULT] t_xor_f = true -[RESULT] t_xor_t = false +┌─[RESULT]─ +│Computation successful! Results: +│f_xor_f = false +│f_xor_t = true +│t_xor_f = true +│t_xor_t = false +└─ ``` diff --git a/tests/date/bad/rounding_option_conflict.catala_en b/tests/date/bad/rounding_option_conflict.catala_en index 139199cb0..7e4e5e34e 100644 --- a/tests/date/bad/rounding_option_conflict.catala_en +++ b/tests/date/bad/rounding_option_conflict.catala_en @@ -25,16 +25,19 @@ scope Test: ```catala-test-inline $ catala test-scope Test -[ERROR] You cannot set multiple date rounding modes - -┌─⯈ tests/date/bad/rounding_option_conflict.catala_en:10.14-10.24: -└──┐ -10 │ date round decreasing - │ ‾‾‾‾‾‾‾‾‾‾ - -┌─⯈ tests/date/bad/rounding_option_conflict.catala_en:12.14-12.24: -└──┐ -12 │ date round increasing - │ ‾‾‾‾‾‾‾‾‾‾ +┌─[ERROR]─ +│ +│ You cannot set multiple date rounding modes +│ +├─➤ tests/date/bad/rounding_option_conflict.catala_en:10.14-10.24: +│ │ +│ 10 │ date round decreasing +│ │ ‾‾‾‾‾‾‾‾‾‾ +│ +├─➤ tests/date/bad/rounding_option_conflict.catala_en:12.14-12.24: +│ │ +│ 12 │ date round increasing +│ │ ‾‾‾‾‾‾‾‾‾‾ +└─ #return code 123# ``` diff --git a/tests/date/bad/rounding_option_en.catala_en b/tests/date/bad/rounding_option_en.catala_en index 09d2a6bb0..c43fbbae0 100644 --- a/tests/date/bad/rounding_option_en.catala_en +++ b/tests/date/bad/rounding_option_en.catala_en @@ -12,6 +12,10 @@ scope Test: ```catala-test-inline $ catala test-scope Test -[ERROR] Unexpected error: Dates_calc.Dates.AmbiguousComputation +┌─[ERROR]─ +│ +│ Unexpected error: Dates_calc.Dates.AmbiguousComputation +│ +└─ #return code 125# ``` diff --git a/tests/date/bad/rounding_option_fr.catala_fr b/tests/date/bad/rounding_option_fr.catala_fr index ffcecfe7b..dd9208a72 100644 --- a/tests/date/bad/rounding_option_fr.catala_fr +++ b/tests/date/bad/rounding_option_fr.catala_fr @@ -12,6 +12,10 @@ champ d'application Test: ```catala-test-inline $ catala test-scope Test -[ERROR] Unexpected error: Dates_calc.Dates.AmbiguousComputation +┌─[ERROR]─ +│ +│ Unexpected error: Dates_calc.Dates.AmbiguousComputation +│ +└─ #return code 125# ``` diff --git a/tests/date/bad/substraction.catala_en b/tests/date/bad/substraction.catala_en index 8e6c32430..cc55e7a6d 100644 --- a/tests/date/bad/substraction.catala_en +++ b/tests/date/bad/substraction.catala_en @@ -8,23 +8,26 @@ scope A: ```catala-test-inline $ catala test-scope A -[ERROR] I don't know how to apply operator <= on types date and duration - -┌─⯈ tests/date/bad/substraction.catala_en:6.23-6.52: -└─┐ -6 │ definition o equals |2024-01-16| - 0 day <= 0 day - │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ - -Type date coming from expression: -┌─⯈ tests/date/bad/substraction.catala_en:6.23-6.43: -└─┐ -6 │ definition o equals |2024-01-16| - 0 day <= 0 day - │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ - -Type duration coming from expression: -┌─⯈ tests/date/bad/substraction.catala_en:6.47-6.52: -└─┐ -6 │ definition o equals |2024-01-16| - 0 day <= 0 day - │ ‾‾‾‾‾ +┌─[ERROR]─ +│ +│ I don't know how to apply operator <= on types date and duration +│ +├─➤ tests/date/bad/substraction.catala_en:6.23-6.52: +│ │ +│ 6 │ definition o equals |2024-01-16| - 0 day <= 0 day +│ │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ +│ +│ Type date coming from expression: +├─➤ tests/date/bad/substraction.catala_en:6.23-6.43: +│ │ +│ 6 │ definition o equals |2024-01-16| - 0 day <= 0 day +│ │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ +│ +│ Type duration coming from expression: +├─➤ tests/date/bad/substraction.catala_en:6.47-6.52: +│ │ +│ 6 │ definition o equals |2024-01-16| - 0 day <= 0 day +│ │ ‾‾‾‾‾ +└─ #return code 123# ``` diff --git a/tests/date/bad/uncomparable_duration.catala_en b/tests/date/bad/uncomparable_duration.catala_en index 90eda7836..6b7fb5d5d 100644 --- a/tests/date/bad/uncomparable_duration.catala_en +++ b/tests/date/bad/uncomparable_duration.catala_en @@ -42,56 +42,64 @@ scope Ge: ```catala-test-inline $ catala test-scope Ge -[ERROR] During evaluation: ambiguous comparison between durations in - different units (e.g. months vs. days). - -┌─⯈ tests/date/bad/uncomparable_duration.catala_en:40.31-40.33: -└──┐ -40 │ definition d equals 1 month >= 2 day - │ ‾‾ - └┬ `UncomparableDurations` exception management - └─ `>=` operator +┌─[ERROR]─ +│ +│ During evaluation: ambiguous comparison between durations in different +│ units (e.g. months vs. days). +│ +├─➤ tests/date/bad/uncomparable_duration.catala_en:40.31-40.33: +│ │ +│ 40 │ definition d equals 1 month >= 2 day +│ │ ‾‾ +└─ `UncomparableDurations` exception management + └─ `>=` operator #return code 123# ``` ```catala-test-inline $ catala test-scope Gt -[ERROR] During evaluation: ambiguous comparison between durations in - different units (e.g. months vs. days). - -┌─⯈ tests/date/bad/uncomparable_duration.catala_en:30.31-30.32: -└──┐ -30 │ definition d equals 1 month > 2 day - │ ‾ - └┬ `UncomparableDurations` exception management - └─ `<=` operator +┌─[ERROR]─ +│ +│ During evaluation: ambiguous comparison between durations in different +│ units (e.g. months vs. days). +│ +├─➤ tests/date/bad/uncomparable_duration.catala_en:30.31-30.32: +│ │ +│ 30 │ definition d equals 1 month > 2 day +│ │ ‾ +└─ `UncomparableDurations` exception management + └─ `<=` operator #return code 123# ``` ```catala-test-inline $ catala test-scope Le -[ERROR] During evaluation: ambiguous comparison between durations in - different units (e.g. months vs. days). - -┌─⯈ tests/date/bad/uncomparable_duration.catala_en:20.31-20.33: -└──┐ -20 │ definition d equals 1 month <= 2 day - │ ‾‾ - └┬ `UncomparableDurations` exception management - └─ `<=` operator +┌─[ERROR]─ +│ +│ During evaluation: ambiguous comparison between durations in different +│ units (e.g. months vs. days). +│ +├─➤ tests/date/bad/uncomparable_duration.catala_en:20.31-20.33: +│ │ +│ 20 │ definition d equals 1 month <= 2 day +│ │ ‾‾ +└─ `UncomparableDurations` exception management + └─ `<=` operator #return code 123# ``` ```catala-test-inline $ catala test-scope Lt -[ERROR] During evaluation: ambiguous comparison between durations in - different units (e.g. months vs. days). - -┌─⯈ tests/date/bad/uncomparable_duration.catala_en:10.31-10.32: -└──┐ -10 │ definition d equals 1 month < 2 day - │ ‾ - └┬ `UncomparableDurations` exception management - └─ `<` operator +┌─[ERROR]─ +│ +│ During evaluation: ambiguous comparison between durations in different +│ units (e.g. months vs. days). +│ +├─➤ tests/date/bad/uncomparable_duration.catala_en:10.31-10.32: +│ │ +│ 10 │ definition d equals 1 month < 2 day +│ │ ‾ +└─ `UncomparableDurations` exception management + └─ `<` operator #return code 123# ``` diff --git a/tests/date/good/durations.catala_en b/tests/date/good/durations.catala_en index 036b679d7..38f33ade7 100644 --- a/tests/date/good/durations.catala_en +++ b/tests/date/good/durations.catala_en @@ -27,18 +27,24 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope A -[RESULT] Computation successful! Results: -[RESULT] m = [11874 days] -[RESULT] m2 = [6 months] -[RESULT] x = 2019-01-01 -[RESULT] y = 2002-09-30 -[RESULT] z = true -[RESULT] z2 = true -[RESULT] z3 = [5937 days] +┌─[RESULT]─ +│Computation successful! Results: +│m = [11874 days] +│m2 = [6 months] +│x = 2019-01-01 +│y = 2002-09-30 +│z = true +│z2 = true +│z3 = [5937 days] +└─ ``` diff --git a/tests/date/good/rounding_option_en.catala_en b/tests/date/good/rounding_option_en.catala_en index 22317efb0..79553159a 100644 --- a/tests/date/good/rounding_option_en.catala_en +++ b/tests/date/good/rounding_option_en.catala_en @@ -26,12 +26,18 @@ scope Test: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope Test -[RESULT] Computation successful! Results: -[RESULT] r = true +┌─[RESULT]─ +│Computation successful! Results: +│r = true +└─ ``` diff --git a/tests/date/good/rounding_option_fr.catala_fr b/tests/date/good/rounding_option_fr.catala_fr index 30d772cf5..9e5b1ec4b 100644 --- a/tests/date/good/rounding_option_fr.catala_fr +++ b/tests/date/good/rounding_option_fr.catala_fr @@ -26,12 +26,18 @@ champ d'application Test: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope Test -[RESULT] Computation successful! Results: -[RESULT] r = vrai +┌─[RESULT]─ +│Computation successful! Results: +│r = vrai +└─ ``` diff --git a/tests/date/good/simple.catala_en b/tests/date/good/simple.catala_en index 6fb661a28..51448dce4 100644 --- a/tests/date/good/simple.catala_en +++ b/tests/date/good/simple.catala_en @@ -16,14 +16,20 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope A -[RESULT] Computation successful! Results: -[RESULT] x = 2019-01-01 -[RESULT] y = 2002-09-30 -[RESULT] z = [5937 days] +┌─[RESULT]─ +│Computation successful! Results: +│x = 2019-01-01 +│y = 2002-09-30 +│z = [5937 days] +└─ ``` diff --git a/tests/dec/good/infinite_precision.catala_en b/tests/dec/good/infinite_precision.catala_en index 11cf34a45..b7a27ecad 100644 --- a/tests/dec/good/infinite_precision.catala_en +++ b/tests/dec/good/infinite_precision.catala_en @@ -18,17 +18,22 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope A -[RESULT] Computation successful! Results: -[RESULT] -a = - -0.000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,078,695,580,959,228,473,468… -[RESULT] x = 84.648,665,652,656,896,23 -[RESULT] y = -4.368,297,787,053,206,549,8 -[RESULT] z = 654,265,429,805,103,220,650,980,650.5… +┌─[RESULT]─ +│Computation successful! Results: +│a = +│ -0.000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,078,695,580,959,228,473,468… +│x = 84.648,665,652,656,896,23 +│y = -4.368,297,787,053,206,549,8 +│z = 654,265,429,805,103,220,650,980,650.5… +└─ ``` diff --git a/tests/dec/good/rounding.catala_en b/tests/dec/good/rounding.catala_en index ab698580b..93becf286 100644 --- a/tests/dec/good/rounding.catala_en +++ b/tests/dec/good/rounding.catala_en @@ -18,15 +18,21 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope A -[RESULT] Computation successful! Results: -[RESULT] x = 84.648,665 -[RESULT] x1 = 85.0 -[RESULT] y = 4.368,297 -[RESULT] y1 = 4.0 +┌─[RESULT]─ +│Computation successful! Results: +│x = 84.648,665 +│x1 = 85.0 +│y = 4.368,297 +│y1 = 4.0 +└─ ``` diff --git a/tests/dec/good/simple.catala_en b/tests/dec/good/simple.catala_en index d3187b685..fb856420b 100644 --- a/tests/dec/good/simple.catala_en +++ b/tests/dec/good/simple.catala_en @@ -18,15 +18,21 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope A -[RESULT] Computation successful! Results: -[RESULT] k = 0.333,333,333,333,333,333,33… -[RESULT] x = 84.648,665 -[RESULT] y = 4.368,297 -[RESULT] z = 19.377,955,528,206,987,757… +┌─[RESULT]─ +│Computation successful! Results: +│k = 0.333,333,333,333,333,333,33… +│x = 84.648,665 +│y = 4.368,297 +│z = 19.377,955,528,206,987,757… +└─ ``` diff --git a/tests/dec/good/zero_after_comma.catala_en b/tests/dec/good/zero_after_comma.catala_en index 00a4d8321..25c8c88ef 100644 --- a/tests/dec/good/zero_after_comma.catala_en +++ b/tests/dec/good/zero_after_comma.catala_en @@ -15,13 +15,19 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope A -[RESULT] Computation successful! Results: -[RESULT] x = 4.0 -[RESULT] y = 1.04 +┌─[RESULT]─ +│Computation successful! Results: +│x = 4.0 +│y = 1.04 +└─ ``` diff --git a/tests/default/bad/empty.catala_en b/tests/default/bad/empty.catala_en index 5fc1fab1c..b75a89664 100644 --- a/tests/default/bad/empty.catala_en +++ b/tests/default/bad/empty.catala_en @@ -11,21 +11,25 @@ scope A: ```catala-test-inline $ catala test-scope A -[WARNING] In scope "A", the variable "y" is declared but never defined; - did you forget something? - -┌─⯈ tests/default/bad/empty.catala_en:6.10-6.11: -└─┐ -6 │ output y content boolean - │ ‾ - └─ Article -[ERROR] During evaluation: no applicable rule to define this variable in this - situation. - -┌─⯈ tests/default/bad/empty.catala_en:6.10-6.11: -└─┐ -6 │ output y content boolean - │ ‾ - └─ Article +┌─[WARNING]─ +│ +│ In scope "A", the variable "y" is declared but never defined; +│ did you forget something? +│ +├─➤ tests/default/bad/empty.catala_en:6.10-6.11: +│ │ +│ 6 │ output y content boolean +│ │ ‾ +└─ Article +┌─[ERROR]─ +│ +│ During evaluation: no applicable rule to define this variable in this +│ situation. +│ +├─➤ tests/default/bad/empty.catala_en:6.10-6.11: +│ │ +│ 6 │ output y content boolean +│ │ ‾ +└─ Article #return code 123# ``` diff --git a/tests/default/bad/empty_with_rules.catala_en b/tests/default/bad/empty_with_rules.catala_en index 45a3918c6..c41a0f7f7 100644 --- a/tests/default/bad/empty_with_rules.catala_en +++ b/tests/default/bad/empty_with_rules.catala_en @@ -14,13 +14,15 @@ scope A: ```catala-test-inline $ catala test-scope A -[ERROR] During evaluation: no applicable rule to define this variable in this - situation. - -┌─⯈ tests/default/bad/empty_with_rules.catala_en:5.10-5.11: -└─┐ -5 │ output x content integer - │ ‾ - └─ Article +┌─[ERROR]─ +│ +│ During evaluation: no applicable rule to define this variable in this +│ situation. +│ +├─➤ tests/default/bad/empty_with_rules.catala_en:5.10-5.11: +│ │ +│ 5 │ output x content integer +│ │ ‾ +└─ Article #return code 123# ``` diff --git a/tests/default/bad/typing_or_logical_error.catala_en b/tests/default/bad/typing_or_logical_error.catala_en index 6c55bb2c9..699f337d5 100644 --- a/tests/default/bad/typing_or_logical_error.catala_en +++ b/tests/default/bad/typing_or_logical_error.catala_en @@ -11,18 +11,21 @@ scope A: ```catala-test-inline $ catala test-scope A -[ERROR] Syntax error at "=" - » expected 'under condition' followed by a condition, 'equals' followed by - the definition body, or the rest of the variable qualified name - Those are valid at this point: "of", "state", "equals", "under condition", - "." - -Last good token -┌─⯈ tests/default/bad/typing_or_logical_error.catala_en:8.13-8.29: -└─┐ -8 │ definition wrong_definition = 1 - │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ - -Maybe you wanted to write : "." +┌─[ERROR]─ +│ +│ Syntax error at "=" +│ » expected 'under condition' followed by a condition, 'equals' followed by +│ the definition body, or the rest of the variable qualified name +│ Those are valid at this point: "of", "state", "equals", "under condition", +│ "." +│ +│ Last good token +├─➤ tests/default/bad/typing_or_logical_error.catala_en:8.13-8.29: +│ │ +│ 8 │ definition wrong_definition = 1 +│ │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ +│ +│ Maybe you wanted to write : "." ? +└─ #return code 123# ``` diff --git a/tests/default/good/mutliple_definitions.catala_en b/tests/default/good/mutliple_definitions.catala_en index ac569c065..dd73c86ec 100644 --- a/tests/default/good/mutliple_definitions.catala_en +++ b/tests/default/good/mutliple_definitions.catala_en @@ -13,36 +13,48 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants -[WARNING] These definitions have identical justifications and consequences; - is it a mistake? - -┌─⯈ tests/default/good/mutliple_definitions.catala_en:9.3-9.15: -└─┐ -9 │ definition w equals 3 - │ ‾‾‾‾‾‾‾‾‾‾‾‾ - -┌─⯈ tests/default/good/mutliple_definitions.catala_en:6.3-6.15: -└─┐ -6 │ definition w equals 3 - │ ‾‾‾‾‾‾‾‾‾‾‾‾ -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[WARNING]─ +│ +│ These definitions have identical justifications and consequences; +│ is it a mistake? +│ +├─➤ tests/default/good/mutliple_definitions.catala_en:9.3-9.15: +│ │ +│ 9 │ definition w equals 3 +│ │ ‾‾‾‾‾‾‾‾‾‾‾‾ +│ +├─➤ tests/default/good/mutliple_definitions.catala_en:6.3-6.15: +│ │ +│ 6 │ definition w equals 3 +│ │ ‾‾‾‾‾‾‾‾‾‾‾‾ +└─ +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope A -[WARNING] These definitions have identical justifications and consequences; - is it a mistake? - -┌─⯈ tests/default/good/mutliple_definitions.catala_en:9.3-9.15: -└─┐ -9 │ definition w equals 3 - │ ‾‾‾‾‾‾‾‾‾‾‾‾ - -┌─⯈ tests/default/good/mutliple_definitions.catala_en:6.3-6.15: -└─┐ -6 │ definition w equals 3 - │ ‾‾‾‾‾‾‾‾‾‾‾‾ -[RESULT] Computation successful! Results: -[RESULT] w = 3 +┌─[WARNING]─ +│ +│ These definitions have identical justifications and consequences; +│ is it a mistake? +│ +├─➤ tests/default/good/mutliple_definitions.catala_en:9.3-9.15: +│ │ +│ 9 │ definition w equals 3 +│ │ ‾‾‾‾‾‾‾‾‾‾‾‾ +│ +├─➤ tests/default/good/mutliple_definitions.catala_en:6.3-6.15: +│ │ +│ 6 │ definition w equals 3 +│ │ ‾‾‾‾‾‾‾‾‾‾‾‾ +└─ +┌─[RESULT]─ +│Computation successful! Results: +│w = 3 +└─ ``` diff --git a/tests/enum/bad/ambiguous_cases.catala_en b/tests/enum/bad/ambiguous_cases.catala_en index d8860ffa3..6b19f4109 100644 --- a/tests/enum/bad/ambiguous_cases.catala_en +++ b/tests/enum/bad/ambiguous_cases.catala_en @@ -16,13 +16,15 @@ scope A: ```catala-test-inline $ catala test-scope A -[ERROR] This constructor name is ambiguous, it can belong to E or F. - Disambiguate it by prefixing it with the enum name. - -┌─⯈ tests/enum/bad/ambiguous_cases.catala_en:14.23-14.28: -└──┐ -14 │ definition e equals Case1 - │ ‾‾‾‾‾ - └─ Article +┌─[ERROR]─ +│ +│ This constructor name is ambiguous, it can belong to E or F. +│ Disambiguate it by prefixing it with the enum name. +│ +├─➤ tests/enum/bad/ambiguous_cases.catala_en:14.23-14.28: +│ │ +│ 14 │ definition e equals Case1 +│ │ ‾‾‾‾‾ +└─ Article #return code 123# ``` diff --git a/tests/enum/bad/ambiguous_wildcard.catala_en b/tests/enum/bad/ambiguous_wildcard.catala_en index f90051039..a9a10718b 100644 --- a/tests/enum/bad/ambiguous_wildcard.catala_en +++ b/tests/enum/bad/ambiguous_wildcard.catala_en @@ -17,13 +17,15 @@ scope A: ```catala-test-inline $ catala test-scope A -[ERROR] Couldn't infer the enumeration name from lonely wildcard (wildcard - cannot be used as single match case) - -┌─⯈ tests/enum/bad/ambiguous_wildcard.catala_en:15.5-15.21: -└──┐ -15 │ -- anything : 31 - │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ - └─ 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/enum/bad/ambiguous_wildcard.catala_en:15.5-15.21: +│ │ +│ 15 │ -- anything : 31 +│ │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ +└─ Wildcard cannot be used as single match case #return code 123# ``` diff --git a/tests/enum/bad/duplicate_case.catala_en b/tests/enum/bad/duplicate_case.catala_en index 348f9722c..57e6a7d67 100644 --- a/tests/enum/bad/duplicate_case.catala_en +++ b/tests/enum/bad/duplicate_case.catala_en @@ -20,18 +20,20 @@ scope A: ```catala-test-inline $ catala test-scope A -[ERROR] The constructor Case3 has been matched twice: - -┌─⯈ tests/enum/bad/duplicate_case.catala_en:18.16-18.20: -└──┐ -18 │ -- Case3 : true - │ ‾‾‾‾ - └─ Article - -┌─⯈ tests/enum/bad/duplicate_case.catala_en:17.16-17.21: -└──┐ -17 │ -- Case3 : false - │ ‾‾‾‾‾ - └─ Article +┌─[ERROR]─ +│ +│ The constructor Case3 has been matched twice: +│ +├─➤ tests/enum/bad/duplicate_case.catala_en:18.16-18.20: +│ │ +│ 18 │ -- Case3 : true +│ │ ‾‾‾‾ +├─ Article +│ +├─➤ tests/enum/bad/duplicate_case.catala_en:17.16-17.21: +│ │ +│ 17 │ -- Case3 : false +│ │ ‾‾‾‾‾ +└─ Article #return code 123# ``` diff --git a/tests/enum/bad/empty.catala_en b/tests/enum/bad/empty.catala_en index b52c0dde1..2a8686851 100644 --- a/tests/enum/bad/empty.catala_en +++ b/tests/enum/bad/empty.catala_en @@ -9,13 +9,15 @@ 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. - -┌─⯈ tests/enum/bad/empty.catala_en:4.25-4.28: -└─┐ -4 │ declaration enumeration Foo: - │ ‾‾‾ - └─ Test +┌─[ERROR]─ +│ +│ The enum Foo does not have any cases; +│ give it some for Catala to be able to accept it. +│ +├─➤ tests/enum/bad/empty.catala_en:4.25-4.28: +│ │ +│ 4 │ declaration enumeration Foo: +│ │ ‾‾‾ +└─ Test #return code 123# ``` diff --git a/tests/enum/bad/missing_case.catala_en b/tests/enum/bad/missing_case.catala_en index 4e8330299..875bbe4f0 100644 --- a/tests/enum/bad/missing_case.catala_en +++ b/tests/enum/bad/missing_case.catala_en @@ -18,24 +18,28 @@ scope A: ```catala-test-inline $ catala test-scope A -[WARNING] The constructor "Case3" of enumeration "E" is never used; - maybe it's unnecessary? - -┌─⯈ tests/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/enum/bad/missing_case.catala_en:14.25-16.22: -└──┐ -14 │ definition out equals match e with pattern - │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ -15 │ -- Case1 of i : i = 0 - │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ -16 │ -- Case2 of b : b - │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ - └─ Article +┌─[WARNING]─ +│ +│ The constructor "Case3" of enumeration "E" is never used; +│ maybe it's unnecessary? +│ +├─➤ tests/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/enum/bad/missing_case.catala_en:14.25-16.22: +│ │ +│ 14 │ definition out equals match e with pattern +│ │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ +│ 15 │ -- Case1 of i : i = 0 +│ │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ +│ 16 │ -- Case2 of b : b +│ │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ +└─ Article #return code 123# ``` diff --git a/tests/enum/bad/not_ending_wildcard.catala_en b/tests/enum/bad/not_ending_wildcard.catala_en index 72b34e278..1db5f7ee4 100644 --- a/tests/enum/bad/not_ending_wildcard.catala_en +++ b/tests/enum/bad/not_ending_wildcard.catala_en @@ -38,44 +38,48 @@ scope Middle_case: ```catala-test-inline $ catala test-scope First_case -[ERROR] Wildcard must be the last match case - -Not ending wildcard: -┌─⯈ tests/enum/bad/not_ending_wildcard.catala_en:19.5-19.21: -└──┐ -19 │ -- anything : 31 - │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ - └┬ Wildcard must be the last case - └─ Wildcard can't be the first case - -Next reachable case: -┌─⯈ tests/enum/bad/not_ending_wildcard.catala_en:20.5-20.18: -└──┐ -20 │ -- Case2 : 42 - │ ‾‾‾‾‾‾‾‾‾‾‾‾‾ - └┬ Wildcard must be the last case - └─ Wildcard can't be the first case +┌─[ERROR]─ +│ +│ Wildcard must be the last match case +│ +│ Not ending wildcard: +├─➤ tests/enum/bad/not_ending_wildcard.catala_en:19.5-19.21: +│ │ +│ 19 │ -- anything : 31 +│ │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ +├─ Wildcard must be the last case +│ └─ Wildcard can't be the first case +│ +│ Next reachable case: +├─➤ tests/enum/bad/not_ending_wildcard.catala_en:20.5-20.18: +│ │ +│ 20 │ -- Case2 : 42 +│ │ ‾‾‾‾‾‾‾‾‾‾‾‾‾ +└─ Wildcard must be the last case + └─ Wildcard can't be the first case #return code 123# ``` ```catala-test-inline $ catala test-scope Middle_case -[ERROR] Wildcard must be the last match case - -Not ending wildcard: -┌─⯈ tests/enum/bad/not_ending_wildcard.catala_en:19.5-19.21: -└──┐ -19 │ -- anything : 31 - │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ - └┬ Wildcard must be the last case - └─ Wildcard can't be the first case - -Next reachable case: -┌─⯈ tests/enum/bad/not_ending_wildcard.catala_en:20.5-20.18: -└──┐ -20 │ -- Case2 : 42 - │ ‾‾‾‾‾‾‾‾‾‾‾‾‾ - └┬ Wildcard must be the last case - └─ Wildcard can't be the first case +┌─[ERROR]─ +│ +│ Wildcard must be the last match case +│ +│ Not ending wildcard: +├─➤ tests/enum/bad/not_ending_wildcard.catala_en:19.5-19.21: +│ │ +│ 19 │ -- anything : 31 +│ │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ +├─ Wildcard must be the last case +│ └─ Wildcard can't be the first case +│ +│ Next reachable case: +├─➤ tests/enum/bad/not_ending_wildcard.catala_en:20.5-20.18: +│ │ +│ 20 │ -- Case2 : 42 +│ │ ‾‾‾‾‾‾‾‾‾‾‾‾‾ +└─ Wildcard must be the last case + └─ Wildcard can't be the first case #return code 123# ``` diff --git a/tests/enum/bad/quick_pattern_2.catala_en b/tests/enum/bad/quick_pattern_2.catala_en index a449b9135..0c5688a8c 100644 --- a/tests/enum/bad/quick_pattern_2.catala_en +++ b/tests/enum/bad/quick_pattern_2.catala_en @@ -30,29 +30,31 @@ scope B: ```catala-test-inline $ catala test-scope A -[ERROR] Error during typechecking, incompatible types: - ┌─⯈ E - └─⯈ F - -While typechecking the following expression: -┌─⯈ tests/enum/bad/quick_pattern_2.catala_en:28.23-28.24: -└──┐ -28 │ definition y equals x with pattern Case3 - │ ‾ - └─ Article - -Type E is coming from: -┌─⯈ tests/enum/bad/quick_pattern_2.catala_en:17.21-17.22: -└──┐ -17 │ context x content E - │ ‾ - └─ Article - -Type F is coming from: -┌─⯈ tests/enum/bad/quick_pattern_2.catala_en:28.23-28.43: -└──┐ -28 │ definition y equals x with pattern Case3 - │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ - └─ Article +┌─[ERROR]─ +│ +│ Error during typechecking, incompatible types: +│ ─➤ E +│ ─➤ F +│ +│ While typechecking the following expression: +├─➤ tests/enum/bad/quick_pattern_2.catala_en:28.23-28.24: +│ │ +│ 28 │ definition y equals x with pattern Case3 +│ │ ‾ +├─ Article +│ +│ Type E is coming from: +├─➤ tests/enum/bad/quick_pattern_2.catala_en:17.21-17.22: +│ │ +│ 17 │ context x content E +│ │ ‾ +├─ Article +│ +│ Type F is coming from: +├─➤ tests/enum/bad/quick_pattern_2.catala_en:28.23-28.43: +│ │ +│ 28 │ definition y equals x with pattern Case3 +│ │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ +└─ Article #return code 123# ``` diff --git a/tests/enum/bad/quick_pattern_3.catala_en b/tests/enum/bad/quick_pattern_3.catala_en index 19fcbd3f9..d29211254 100644 --- a/tests/enum/bad/quick_pattern_3.catala_en +++ b/tests/enum/bad/quick_pattern_3.catala_en @@ -20,29 +20,31 @@ definition y equals x with pattern Case3 ```catala-test-inline $ catala test-scope A -[ERROR] Error during typechecking, incompatible types: - ┌─⯈ E - └─⯈ F - -While typechecking the following expression: -┌─⯈ tests/enum/bad/quick_pattern_3.catala_en:18.21-18.22: -└──┐ -18 │ definition y equals x with pattern Case3 - │ ‾ - └─ Article - -Type E is coming from: -┌─⯈ tests/enum/bad/quick_pattern_3.catala_en:13.19-13.20: -└──┐ -13 │ context x content E - │ ‾ - └─ Article - -Type F is coming from: -┌─⯈ tests/enum/bad/quick_pattern_3.catala_en:18.21-18.41: -└──┐ -18 │ definition y equals x with pattern Case3 - │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ - └─ Article +┌─[ERROR]─ +│ +│ Error during typechecking, incompatible types: +│ ─➤ E +│ ─➤ F +│ +│ While typechecking the following expression: +├─➤ tests/enum/bad/quick_pattern_3.catala_en:18.21-18.22: +│ │ +│ 18 │ definition y equals x with pattern Case3 +│ │ ‾ +├─ Article +│ +│ Type E is coming from: +├─➤ tests/enum/bad/quick_pattern_3.catala_en:13.19-13.20: +│ │ +│ 13 │ context x content E +│ │ ‾ +├─ Article +│ +│ Type F is coming from: +├─➤ tests/enum/bad/quick_pattern_3.catala_en:18.21-18.41: +│ │ +│ 18 │ definition y equals x with pattern Case3 +│ │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ +└─ Article #return code 123# ``` diff --git a/tests/enum/bad/quick_pattern_4.catala_en b/tests/enum/bad/quick_pattern_4.catala_en index cf03f4cdb..2a51d9dc4 100644 --- a/tests/enum/bad/quick_pattern_4.catala_en +++ b/tests/enum/bad/quick_pattern_4.catala_en @@ -19,29 +19,31 @@ definition y equals x with pattern Case3 ```catala-test-inline $ catala test-scope A -[ERROR] Error during typechecking, incompatible types: - ┌─⯈ E - └─⯈ F - -While typechecking the following expression: -┌─⯈ tests/enum/bad/quick_pattern_4.catala_en:17.21-17.22: -└──┐ -17 │ definition y equals x with pattern Case3 - │ ‾ - └─ Test - -Type E is coming from: -┌─⯈ tests/enum/bad/quick_pattern_4.catala_en:12.19-12.20: -└──┐ -12 │ context x content E - │ ‾ - └─ Test - -Type F is coming from: -┌─⯈ tests/enum/bad/quick_pattern_4.catala_en:17.21-17.41: -└──┐ -17 │ definition y equals x with pattern Case3 - │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ - └─ Test +┌─[ERROR]─ +│ +│ Error during typechecking, incompatible types: +│ ─➤ E +│ ─➤ F +│ +│ While typechecking the following expression: +├─➤ tests/enum/bad/quick_pattern_4.catala_en:17.21-17.22: +│ │ +│ 17 │ definition y equals x with pattern Case3 +│ │ ‾ +├─ Test +│ +│ Type E is coming from: +├─➤ tests/enum/bad/quick_pattern_4.catala_en:12.19-12.20: +│ │ +│ 12 │ context x content E +│ │ ‾ +├─ Test +│ +│ Type F is coming from: +├─➤ tests/enum/bad/quick_pattern_4.catala_en:17.21-17.41: +│ │ +│ 17 │ definition y equals x with pattern Case3 +│ │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ +└─ Test #return code 123# ``` diff --git a/tests/enum/bad/quick_pattern_fail.catala_en b/tests/enum/bad/quick_pattern_fail.catala_en index eb1e0df52..26259c605 100644 --- a/tests/enum/bad/quick_pattern_fail.catala_en +++ b/tests/enum/bad/quick_pattern_fail.catala_en @@ -17,17 +17,19 @@ scope A: ```catala-test-inline $ catala test-scope A -[ERROR] The name of this constructor has not been defined before - (it's probably a typographical error). - -Here is your code : -┌─⯈ tests/enum/bad/quick_pattern_fail.catala_en:15.38-15.43: -└──┐ -15 │ definition y equals x with pattern Case3 - │ ‾‾‾‾‾ - └─ Article - -Maybe you wanted to write : "Case1", -or "Case2" +┌─[ERROR]─ +│ +│ The name of this constructor has not been defined before +│ (it's probably a typographical error). +│ +│ Here is your code : +├─➤ tests/enum/bad/quick_pattern_fail.catala_en:15.38-15.43: +│ │ +│ 15 │ definition y equals x with pattern Case3 +│ │ ‾‾‾‾‾ +├─ Article +│ +│ Maybe you wanted to write : "Case1", or "Case2" ? +└─ #return code 123# ``` diff --git a/tests/enum/bad/too_many_cases.catala_en b/tests/enum/bad/too_many_cases.catala_en index b940d21c6..929f0fd6a 100644 --- a/tests/enum/bad/too_many_cases.catala_en +++ b/tests/enum/bad/too_many_cases.catala_en @@ -23,13 +23,15 @@ scope A: ```catala-test-inline $ catala test-scope A -[ERROR] This case matches a constructor of enumeration E but previous cases - were matching constructors of enumeration F - -┌─⯈ tests/enum/bad/too_many_cases.catala_en:21.8-21.13: -└──┐ -21 │ -- Case4 : true - │ ‾‾‾‾‾ - └─ Article +┌─[ERROR]─ +│ +│ This case matches a constructor of enumeration E but previous cases were +│ matching constructors of enumeration F +│ +├─➤ tests/enum/bad/too_many_cases.catala_en:21.8-21.13: +│ │ +│ 21 │ -- Case4 : true +│ │ ‾‾‾‾‾ +└─ Article #return code 123# ``` diff --git a/tests/enum/bad/useless_wildcard.catala_en b/tests/enum/bad/useless_wildcard.catala_en index 50a001ac2..73957b0fe 100644 --- a/tests/enum/bad/useless_wildcard.catala_en +++ b/tests/enum/bad/useless_wildcard.catala_en @@ -19,15 +19,19 @@ scope A: ```catala-test-inline $ catala test-scope A -[WARNING] Unreachable match case, all constructors of the enumeration E are - already specified - -┌─⯈ tests/enum/bad/useless_wildcard.catala_en:17.5-17.21: -└──┐ -17 │ -- anything : 31 - │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ - └─ Useless wildcard -[RESULT] Computation successful! Results: -[RESULT] x = Case1 () -[RESULT] y = 42 +┌─[WARNING]─ +│ +│ Unreachable match case, all constructors of the enumeration E are already +│ specified +│ +├─➤ tests/enum/bad/useless_wildcard.catala_en:17.5-17.21: +│ │ +│ 17 │ -- anything : 31 +│ │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ +└─ Useless wildcard +┌─[RESULT]─ +│Computation successful! Results: +│x = Case1 () +│y = 42 +└─ ``` diff --git a/tests/enum/bad/wrong_cons.catala_en b/tests/enum/bad/wrong_cons.catala_en index ee5d5abe2..7fde756ef 100644 --- a/tests/enum/bad/wrong_cons.catala_en +++ b/tests/enum/bad/wrong_cons.catala_en @@ -13,16 +13,19 @@ scope A: ```catala-test-inline $ catala Typecheck -[ERROR] The name of this constructor has not been defined before - (it's probably a typographical error). - -Here is your code : -┌─⯈ tests/enum/bad/wrong_cons.catala_en:11.23-11.28: -└──┐ -11 │ definition e equals Case2 - │ ‾‾‾‾‾ - └─ Article - -Maybe you wanted to write : "Case1" +┌─[ERROR]─ +│ +│ The name of this constructor has not been defined before +│ (it's probably a typographical error). +│ +│ Here is your code : +├─➤ tests/enum/bad/wrong_cons.catala_en:11.23-11.28: +│ │ +│ 11 │ definition e equals Case2 +│ │ ‾‾‾‾‾ +├─ Article +│ +│ Maybe you wanted to write : "Case1" ? +└─ #return code 123# ``` diff --git a/tests/enum/good/disambiguated_cases.catala_en b/tests/enum/good/disambiguated_cases.catala_en index 9ea9b469b..5ba84a562 100644 --- a/tests/enum/good/disambiguated_cases.catala_en +++ b/tests/enum/good/disambiguated_cases.catala_en @@ -25,14 +25,20 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope A -[RESULT] Computation successful! Results: -[RESULT] e = Case1 () -[RESULT] f = Case1 2 -[RESULT] x = 2 +┌─[RESULT]─ +│Computation successful! Results: +│e = Case1 () +│f = Case1 2 +│x = 2 +└─ ``` diff --git a/tests/enum/good/quick_pattern_check.catala_en b/tests/enum/good/quick_pattern_check.catala_en index 7bb9d1b92..bd41fe96d 100644 --- a/tests/enum/good/quick_pattern_check.catala_en +++ b/tests/enum/good/quick_pattern_check.catala_en @@ -20,14 +20,20 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope A -[RESULT] Computation successful! Results: -[RESULT] x = Case1 2 -[RESULT] y = true -[RESULT] z = false +┌─[RESULT]─ +│Computation successful! Results: +│x = Case1 2 +│y = true +│z = false +└─ ``` diff --git a/tests/enum/good/simple.catala_en b/tests/enum/good/simple.catala_en index 567f60758..fdaa21ca2 100644 --- a/tests/enum/good/simple.catala_en +++ b/tests/enum/good/simple.catala_en @@ -20,13 +20,19 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope A -[RESULT] Computation successful! Results: -[RESULT] x = Case1 2 -[RESULT] y = 42 +┌─[RESULT]─ +│Computation successful! Results: +│x = Case1 2 +│y = 42 +└─ ``` diff --git a/tests/enum/good/wildcard.catala_en b/tests/enum/good/wildcard.catala_en index e34f47f51..4f89f690f 100644 --- a/tests/enum/good/wildcard.catala_en +++ b/tests/enum/good/wildcard.catala_en @@ -40,20 +40,28 @@ scope Simple_case_2: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope Simple_case_2 -[RESULT] Computation successful! Results: -[RESULT] x = Case3 () -[RESULT] y = 31 +┌─[RESULT]─ +│Computation successful! Results: +│x = Case3 () +│y = 31 +└─ ``` ```catala-test-inline $ catala test-scope Simple_case -[RESULT] Computation successful! Results: -[RESULT] x = Case1 2 -[RESULT] y = 31 +┌─[RESULT]─ +│Computation successful! Results: +│x = Case1 2 +│y = 31 +└─ ``` diff --git a/tests/exception/bad/ambiguous_unlabeled_exception.catala_en b/tests/exception/bad/ambiguous_unlabeled_exception.catala_en index 3a8f423b0..84df5c679 100644 --- a/tests/exception/bad/ambiguous_unlabeled_exception.catala_en +++ b/tests/exception/bad/ambiguous_unlabeled_exception.catala_en @@ -15,30 +15,32 @@ scope A: ```catala-test-inline $ catala test-scope A -[ERROR] This exception can refer to several definitions. Try using labels to - disambiguate - -Ambiguous exception -┌─⯈ tests/exception/bad/ambiguous_unlabeled_exception.catala_en:12.3-13.15: -└──┐ -12 │ exception - │ ‾‾‾‾‾‾‾‾‾ -13 │ definition x equals 2 - │ ‾‾‾‾‾‾‾‾‾‾‾‾ - └─ Test - -Candidate definition -┌─⯈ tests/exception/bad/ambiguous_unlabeled_exception.catala_en:10.14-10.15: -└──┐ -10 │ definition x equals 1 - │ ‾ - └─ Test - -Candidate definition -┌─⯈ tests/exception/bad/ambiguous_unlabeled_exception.catala_en:8.14-8.15: -└─┐ -8 │ definition x equals 0 - │ ‾ - └─ Test +┌─[ERROR]─ +│ +│ This exception can refer to several definitions. Try using labels to +│ disambiguate +│ +│ Ambiguous exception +├─➤ tests/exception/bad/ambiguous_unlabeled_exception.catala_en:12.3-13.15: +│ │ +│ 12 │ exception +│ │ ‾‾‾‾‾‾‾‾‾ +│ 13 │ definition x equals 2 +│ │ ‾‾‾‾‾‾‾‾‾‾‾‾ +├─ Test +│ +│ Candidate definition +├─➤ tests/exception/bad/ambiguous_unlabeled_exception.catala_en:10.14-10.15: +│ │ +│ 10 │ definition x equals 1 +│ │ ‾ +├─ Test +│ +│ Candidate definition +├─➤ tests/exception/bad/ambiguous_unlabeled_exception.catala_en:8.14-8.15: +│ │ +│ 8 │ definition x equals 0 +│ │ ‾ +└─ Test #return code 123# ``` diff --git a/tests/exception/bad/dangling_exception.catala_en b/tests/exception/bad/dangling_exception.catala_en index 1ca7483bd..1a0b423f4 100644 --- a/tests/exception/bad/dangling_exception.catala_en +++ b/tests/exception/bad/dangling_exception.catala_en @@ -15,12 +15,14 @@ scope A: ```catala-test-inline $ catala test-scope A -[ERROR] Unknown label for the scope variable x: "base_y" - -┌─⯈ tests/exception/bad/dangling_exception.catala_en:12.13-12.19: -└──┐ -12 │ exception base_y - │ ‾‾‾‾‾‾ - └─ Test +┌─[ERROR]─ +│ +│ Unknown label for the scope variable x: "base_y" +│ +├─➤ tests/exception/bad/dangling_exception.catala_en:12.13-12.19: +│ │ +│ 12 │ exception base_y +│ │ ‾‾‾‾‾‾ +└─ Test #return code 123# ``` diff --git a/tests/exception/bad/exceptions_cycle.catala_en b/tests/exception/bad/exceptions_cycle.catala_en index 3cb3d7581..66404e024 100644 --- a/tests/exception/bad/exceptions_cycle.catala_en +++ b/tests/exception/bad/exceptions_cycle.catala_en @@ -20,35 +20,38 @@ scope A: ```catala-test-inline $ catala test-scope 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 - -┌─⯈ tests/exception/bad/exceptions_cycle.catala_en:8.3-10.15: -└──┐ - 8 │ label base_x - │ ‾‾‾‾‾‾‾‾‾‾‾‾ - 9 │ exception exception_exception_x - │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ -10 │ definition x equals 0 - │ ‾‾‾‾‾‾‾‾‾‾‾‾ - -┌─⯈ tests/exception/bad/exceptions_cycle.catala_en:12.3-14.15: -└──┐ -12 │ label exception_x - │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ -13 │ exception base_x - │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ -14 │ definition x equals 1 - │ ‾‾‾‾‾‾‾‾‾‾‾‾ - -┌─⯈ tests/exception/bad/exceptions_cycle.catala_en:16.3-18.15: -└──┐ -16 │ label exception_exception_x - │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ -17 │ exception exception_x - │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ -18 │ definition x equals 2 - │ ‾‾‾‾‾‾‾‾‾‾‾‾ +┌─[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/exception/bad/exceptions_cycle.catala_en:8.3-10.15: +│ │ +│ 8 │ label base_x +│ │ ‾‾‾‾‾‾‾‾‾‾‾‾ +│ 9 │ exception exception_exception_x +│ │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ +│ 10 │ definition x equals 0 +│ │ ‾‾‾‾‾‾‾‾‾‾‾‾ +│ +├─➤ tests/exception/bad/exceptions_cycle.catala_en:12.3-14.15: +│ │ +│ 12 │ label exception_x +│ │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ +│ 13 │ exception base_x +│ │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ +│ 14 │ definition x equals 1 +│ │ ‾‾‾‾‾‾‾‾‾‾‾‾ +│ +├─➤ tests/exception/bad/exceptions_cycle.catala_en:16.3-18.15: +│ │ +│ 16 │ label exception_exception_x +│ │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ +│ 17 │ exception exception_x +│ │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ +│ 18 │ definition x equals 2 +│ │ ‾‾‾‾‾‾‾‾‾‾‾‾ +└─ #return code 123# ``` diff --git a/tests/exception/bad/missing_unlabeled_definition.catala_en b/tests/exception/bad/missing_unlabeled_definition.catala_en index fd9159ea7..98ba6a050 100644 --- a/tests/exception/bad/missing_unlabeled_definition.catala_en +++ b/tests/exception/bad/missing_unlabeled_definition.catala_en @@ -11,14 +11,16 @@ scope A: ```catala-test-inline $ catala test-scope A -[ERROR] This exception does not have a corresponding definition - -┌─⯈ tests/exception/bad/missing_unlabeled_definition.catala_en:8.3-9.15: -└─┐ -8 │ exception - │ ‾‾‾‾‾‾‾‾‾ -9 │ definition x equals 1 - │ ‾‾‾‾‾‾‾‾‾‾‾‾ - └─ Test +┌─[ERROR]─ +│ +│ This exception does not have a corresponding definition +│ +├─➤ tests/exception/bad/missing_unlabeled_definition.catala_en:8.3-9.15: +│ │ +│ 8 │ exception +│ │ ‾‾‾‾‾‾‾‾‾ +│ 9 │ definition x equals 1 +│ │ ‾‾‾‾‾‾‾‾‾‾‾‾ +└─ Test #return code 123# ``` diff --git a/tests/exception/bad/one_ambiguous_exception.catala_en b/tests/exception/bad/one_ambiguous_exception.catala_en index 868db4697..15d344a43 100644 --- a/tests/exception/bad/one_ambiguous_exception.catala_en +++ b/tests/exception/bad/one_ambiguous_exception.catala_en @@ -21,30 +21,32 @@ scope A: ```catala-test-inline $ catala test-scope A -[ERROR] This exception can refer to several definitions. Try using labels to - disambiguate - -Ambiguous exception -┌─⯈ tests/exception/bad/one_ambiguous_exception.catala_en:18.3-19.15: -└──┐ -18 │ exception - │ ‾‾‾‾‾‾‾‾‾ -19 │ definition y equals 3 - │ ‾‾‾‾‾‾‾‾‾‾‾‾ - └─ Test - -Candidate definition -┌─⯈ tests/exception/bad/one_ambiguous_exception.catala_en:16.14-16.15: -└──┐ -16 │ definition y equals 4 - │ ‾ - └─ Test - -Candidate definition -┌─⯈ tests/exception/bad/one_ambiguous_exception.catala_en:14.14-14.15: -└──┐ -14 │ definition y equals 2 - │ ‾ - └─ Test +┌─[ERROR]─ +│ +│ This exception can refer to several definitions. Try using labels to +│ disambiguate +│ +│ Ambiguous exception +├─➤ tests/exception/bad/one_ambiguous_exception.catala_en:18.3-19.15: +│ │ +│ 18 │ exception +│ │ ‾‾‾‾‾‾‾‾‾ +│ 19 │ definition y equals 3 +│ │ ‾‾‾‾‾‾‾‾‾‾‾‾ +├─ Test +│ +│ Candidate definition +├─➤ tests/exception/bad/one_ambiguous_exception.catala_en:16.14-16.15: +│ │ +│ 16 │ definition y equals 4 +│ │ ‾ +├─ Test +│ +│ Candidate definition +├─➤ tests/exception/bad/one_ambiguous_exception.catala_en:14.14-14.15: +│ │ +│ 14 │ definition y equals 2 +│ │ ‾ +└─ Test #return code 123# ``` diff --git a/tests/exception/bad/self_exception.catala_en b/tests/exception/bad/self_exception.catala_en index b3eb556ec..219dc87d2 100644 --- a/tests/exception/bad/self_exception.catala_en +++ b/tests/exception/bad/self_exception.catala_en @@ -12,12 +12,14 @@ scope A: ```catala-test-inline $ catala test-scope A -[ERROR] Cannot define rule as an exception to itself - -┌─⯈ tests/exception/bad/self_exception.catala_en:9.13-9.19: -└─┐ -9 │ exception base_y - │ ‾‾‾‾‾‾ - └─ Test +┌─[ERROR]─ +│ +│ Cannot define rule as an exception to itself +│ +├─➤ tests/exception/bad/self_exception.catala_en:9.13-9.19: +│ │ +│ 9 │ exception base_y +│ │ ‾‾‾‾‾‾ +└─ Test #return code 123# ``` diff --git a/tests/exception/bad/two_exceptions.catala_en b/tests/exception/bad/two_exceptions.catala_en index 04231252a..610090e4c 100644 --- a/tests/exception/bad/two_exceptions.catala_en +++ b/tests/exception/bad/two_exceptions.catala_en @@ -17,19 +17,21 @@ scope A: ```catala-test-inline $ catala test-scope A -[ERROR] During evaluation: conflict between multiple valid consequences for - assigning the same variable. - -┌─⯈ tests/exception/bad/two_exceptions.catala_en:12.23-12.24: -└──┐ -12 │ definition x equals 1 - │ ‾ - └─ Test - -┌─⯈ tests/exception/bad/two_exceptions.catala_en:15.23-15.24: -└──┐ -15 │ definition x equals 2 - │ ‾ - └─ Test +┌─[ERROR]─ +│ +│ During evaluation: conflict between multiple valid consequences for +│ assigning the same variable. +│ +├─➤ tests/exception/bad/two_exceptions.catala_en:12.23-12.24: +│ │ +│ 12 │ definition x equals 1 +│ │ ‾ +├─ Test +│ +├─➤ tests/exception/bad/two_exceptions.catala_en:15.23-15.24: +│ │ +│ 15 │ definition x equals 2 +│ │ ‾ +└─ Test #return code 123# ``` diff --git a/tests/exception/good/context_with_default.catala_en b/tests/exception/good/context_with_default.catala_en index 9c7d4a0ea..de477b6d8 100644 --- a/tests/exception/good/context_with_default.catala_en +++ b/tests/exception/good/context_with_default.catala_en @@ -19,11 +19,17 @@ scope Bar: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope Bar -[RESULT] Computation successful! +┌─[RESULT]─ +│Computation successful! +└─ ``` diff --git a/tests/exception/good/double_definition.catala_en b/tests/exception/good/double_definition.catala_en index 94f5f5328..0e0099a6c 100644 --- a/tests/exception/good/double_definition.catala_en +++ b/tests/exception/good/double_definition.catala_en @@ -14,40 +14,48 @@ scope Foo: ```catala-test-inline $ catala Typecheck --check-invariants -[WARNING] These definitions have identical justifications and consequences; - is it a mistake? - -┌─⯈ tests/exception/good/double_definition.catala_en:9.3-9.15: -└─┐ -9 │ definition x equals 1 - │ ‾‾‾‾‾‾‾‾‾‾‾‾ - └─ Foo - -┌─⯈ tests/exception/good/double_definition.catala_en:8.3-8.15: -└─┐ -8 │ definition x equals 1 - │ ‾‾‾‾‾‾‾‾‾‾‾‾ - └─ Foo -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[WARNING]─ +│ +│ These definitions have identical justifications and consequences; +│ is it a mistake? +│ +├─➤ tests/exception/good/double_definition.catala_en:9.3-9.15: +│ │ +│ 9 │ definition x equals 1 +│ │ ‾‾‾‾‾‾‾‾‾‾‾‾ +├─ Foo +│ +├─➤ tests/exception/good/double_definition.catala_en:8.3-8.15: +│ │ +│ 8 │ definition x equals 1 +│ │ ‾‾‾‾‾‾‾‾‾‾‾‾ +└─ Foo +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala Scopelang -s Foo -[WARNING] These definitions have identical justifications and consequences; - is it a mistake? - -┌─⯈ tests/exception/good/double_definition.catala_en:9.3-9.15: -└─┐ -9 │ definition x equals 1 - │ ‾‾‾‾‾‾‾‾‾‾‾‾ - └─ Foo - -┌─⯈ tests/exception/good/double_definition.catala_en:8.3-8.15: -└─┐ -8 │ definition x equals 1 - │ ‾‾‾‾‾‾‾‾‾‾‾‾ - └─ Foo +┌─[WARNING]─ +│ +│ These definitions have identical justifications and consequences; +│ is it a mistake? +│ +├─➤ tests/exception/good/double_definition.catala_en:9.3-9.15: +│ │ +│ 9 │ definition x equals 1 +│ │ ‾‾‾‾‾‾‾‾‾‾‾‾ +├─ Foo +│ +├─➤ tests/exception/good/double_definition.catala_en:8.3-8.15: +│ │ +│ 8 │ definition x equals 1 +│ │ ‾‾‾‾‾‾‾‾‾‾‾‾ +└─ Foo let scope Foo (x: integer|internal|output) = let x : integer = error_empty ⟨ ⟨true ⊢ ⟨1⟩⟩, ⟨true ⊢ ⟨1⟩⟩ | false ⊢ ∅ ⟩ ``` @@ -60,20 +68,22 @@ Dcalc translation below. ```catala-test-inline $ catala Dcalc -s Foo -[WARNING] These definitions have identical justifications and consequences; - is it a mistake? - -┌─⯈ tests/exception/good/double_definition.catala_en:9.3-9.15: -└─┐ -9 │ definition x equals 1 - │ ‾‾‾‾‾‾‾‾‾‾‾‾ - └─ Foo - -┌─⯈ tests/exception/good/double_definition.catala_en:8.3-8.15: -└─┐ -8 │ definition x equals 1 - │ ‾‾‾‾‾‾‾‾‾‾‾‾ - └─ Foo +┌─[WARNING]─ +│ +│ These definitions have identical justifications and consequences; +│ is it a mistake? +│ +├─➤ tests/exception/good/double_definition.catala_en:9.3-9.15: +│ │ +│ 9 │ definition x equals 1 +│ │ ‾‾‾‾‾‾‾‾‾‾‾‾ +├─ Foo +│ +├─➤ tests/exception/good/double_definition.catala_en:8.3-8.15: +│ │ +│ 8 │ definition x equals 1 +│ │ ‾‾‾‾‾‾‾‾‾‾‾‾ +└─ Foo let scope Foo (Foo_in: Foo_in): Foo {x: integer} = let set x : integer = error_empty ⟨ ⟨ ⟨true ⊢ ⟨1⟩⟩ | true ⊢ ⟨1⟩ ⟩ | false ⊢ ∅ ⟩ diff --git a/tests/exception/good/duplicate_labels.catala_en b/tests/exception/good/duplicate_labels.catala_en index 86aacaa66..17fabddcc 100644 --- a/tests/exception/good/duplicate_labels.catala_en +++ b/tests/exception/good/duplicate_labels.catala_en @@ -22,13 +22,19 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope A -[RESULT] Computation successful! Results: -[RESULT] x = 0 -[RESULT] y = 0 +┌─[RESULT]─ +│Computation successful! Results: +│x = 0 +│y = 0 +└─ ``` diff --git a/tests/exception/good/exception.catala_en b/tests/exception/good/exception.catala_en index f048c4828..88cf816c0 100644 --- a/tests/exception/good/exception.catala_en +++ b/tests/exception/good/exception.catala_en @@ -16,12 +16,18 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope A -[RESULT] Computation successful! Results: -[RESULT] x = 1 +┌─[RESULT]─ +│Computation successful! Results: +│x = 1 +└─ ``` diff --git a/tests/exception/good/exceptions_squared.catala_en b/tests/exception/good/exceptions_squared.catala_en index de40a2798..78e5a94ed 100644 --- a/tests/exception/good/exceptions_squared.catala_en +++ b/tests/exception/good/exceptions_squared.catala_en @@ -20,12 +20,18 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope A -[RESULT] Computation successful! Results: -[RESULT] x = 2 +┌─[RESULT]─ +│Computation successful! Results: +│x = 2 +└─ ``` diff --git a/tests/exception/good/grouped_exceptions.catala_en b/tests/exception/good/grouped_exceptions.catala_en index daafce276..a56171338 100644 --- a/tests/exception/good/grouped_exceptions.catala_en +++ b/tests/exception/good/grouped_exceptions.catala_en @@ -50,13 +50,19 @@ scope Benefit: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope Benefit -[RESULT] Computation successful! Results: -[RESULT] benefit = $2,000.00 -[RESULT] person = Person { -- age: 26 -- disabled: true } +┌─[RESULT]─ +│Computation successful! Results: +│benefit = $2,000.00 +│person = Person { -- age: 26 -- disabled: true } +└─ ``` diff --git a/tests/exception/good/groups_of_exceptions.catala_en b/tests/exception/good/groups_of_exceptions.catala_en index 7617d4792..a2740b828 100644 --- a/tests/exception/good/groups_of_exceptions.catala_en +++ b/tests/exception/good/groups_of_exceptions.catala_en @@ -44,14 +44,20 @@ scope Test: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope Test -[RESULT] Computation successful! Results: -[RESULT] x = 2 +┌─[RESULT]─ +│Computation successful! Results: +│x = 2 +└─ ``` @@ -80,46 +86,54 @@ let scope Test (x: integer|internal|output) (f: Foo {x: integer}|internal) = ```catala-test-inline $ catala Exceptions -s Foo -v x -[RESULT] -Printing the tree of exceptions for the definitions of variable "x" of scope "Foo". -[RESULT] -Definitions with label "base": -┌─⯈ tests/exception/good/groups_of_exceptions.catala_en:9.3-9.26: -└─┐ -9 │ label base definition x under condition - │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ - └─ Test -┌─⯈ tests/exception/good/groups_of_exceptions.catala_en:13.3-13.26: -└──┐ -13 │ label base definition x under condition - │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ - └─ Test -[RESULT] -Definitions with label "intermediate": -┌─⯈ tests/exception/good/groups_of_exceptions.catala_en:17.3-17.49: -└──┐ -17 │ label intermediate exception base definition x under condition - │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ - └─ Test -┌─⯈ tests/exception/good/groups_of_exceptions.catala_en:21.3-21.49: -└──┐ -21 │ label intermediate exception base definition x under condition - │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ - └─ Test -[RESULT] -Definitions with label "exception_to_intermediate": -┌─⯈ tests/exception/good/groups_of_exceptions.catala_en:25.3-25.38: -└──┐ -25 │ exception intermediate definition x under condition - │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ - └─ Test -┌─⯈ tests/exception/good/groups_of_exceptions.catala_en:29.3-29.38: -└──┐ -29 │ exception intermediate definition x under condition - │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ - └─ Test -[RESULT] -The exception tree structure is as follows: - -"base"───"intermediate"───"exception_to_intermediate" +┌─[RESULT]─ +│Printing the tree of exceptions for the definitions of variable "x" of scope "Foo". +└─ +┌─[RESULT]─ +│Definitions with label "base": +│ +├─➤ tests/exception/good/groups_of_exceptions.catala_en:9.3-9.26: +│ │ +│ 9 │ label base definition x under condition +│ │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ +├─ Test +│ +├─➤ tests/exception/good/groups_of_exceptions.catala_en:13.3-13.26: +│ │ +│ 13 │ label base definition x under condition +│ │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ +└─ Test +┌─[RESULT]─ +│Definitions with label "intermediate": +│ +├─➤ tests/exception/good/groups_of_exceptions.catala_en:17.3-17.49: +│ │ +│ 17 │ label intermediate exception base definition x under condition +│ │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ +├─ Test +│ +├─➤ tests/exception/good/groups_of_exceptions.catala_en:21.3-21.49: +│ │ +│ 21 │ label intermediate exception base definition x under condition +│ │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ +└─ Test +┌─[RESULT]─ +│Definitions with label "exception_to_intermediate": +│ +├─➤ tests/exception/good/groups_of_exceptions.catala_en:25.3-25.38: +│ │ +│ 25 │ exception intermediate definition x under condition +│ │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ +├─ Test +│ +├─➤ tests/exception/good/groups_of_exceptions.catala_en:29.3-29.38: +│ │ +│ 29 │ exception intermediate definition x under condition +│ │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ +└─ Test +┌─[RESULT]─ +│The exception tree structure is as follows: +│ +│"base"───"intermediate"───"exception_to_intermediate" +└─ ``` diff --git a/tests/exception/good/same_label_two_variables.catala_en b/tests/exception/good/same_label_two_variables.catala_en index 39127e442..7a369d0aa 100644 --- a/tests/exception/good/same_label_two_variables.catala_en +++ b/tests/exception/good/same_label_two_variables.catala_en @@ -23,14 +23,20 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope A -[RESULT] Computation successful! Results: -[RESULT] x = 0 -[RESULT] y = 1 -[RESULT] z = 0 +┌─[RESULT]─ +│Computation successful! Results: +│x = 0 +│y = 1 +│z = 0 +└─ ``` diff --git a/tests/exception/good/split_unlabeled_exception.catala_en b/tests/exception/good/split_unlabeled_exception.catala_en index 0c8cb118b..af1dfc35b 100644 --- a/tests/exception/good/split_unlabeled_exception.catala_en +++ b/tests/exception/good/split_unlabeled_exception.catala_en @@ -18,12 +18,18 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope A -[RESULT] Computation successful! Results: -[RESULT] x = 1 +┌─[RESULT]─ +│Computation successful! Results: +│x = 1 +└─ ``` diff --git a/tests/exception/good/two_exceptions_same_outcome.catala_en b/tests/exception/good/two_exceptions_same_outcome.catala_en index a596bba2f..efa7bc261 100644 --- a/tests/exception/good/two_exceptions_same_outcome.catala_en +++ b/tests/exception/good/two_exceptions_same_outcome.catala_en @@ -24,12 +24,18 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope A -[RESULT] Computation successful! Results: -[RESULT] x = 0 +┌─[RESULT]─ +│Computation successful! Results: +│x = 0 +└─ ``` diff --git a/tests/exception/good/two_unlabeled_exceptions.catala_en b/tests/exception/good/two_unlabeled_exceptions.catala_en index 7a76bfc94..93bd4db86 100644 --- a/tests/exception/good/two_unlabeled_exceptions.catala_en +++ b/tests/exception/good/two_unlabeled_exceptions.catala_en @@ -21,13 +21,19 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope A -[RESULT] Computation successful! Results: -[RESULT] x = 1 -[RESULT] y = 3 +┌─[RESULT]─ +│Computation successful! Results: +│x = 1 +│y = 3 +└─ ``` diff --git a/tests/exception/good/unlabeled_exception.catala_en b/tests/exception/good/unlabeled_exception.catala_en index 9fa0e0bb3..017835291 100644 --- a/tests/exception/good/unlabeled_exception.catala_en +++ b/tests/exception/good/unlabeled_exception.catala_en @@ -15,12 +15,18 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope A -[RESULT] Computation successful! Results: -[RESULT] x = 1 +┌─[RESULT]─ +│Computation successful! Results: +│x = 1 +└─ ``` diff --git a/tests/exception/good/unsorted_unlabeled_exceptions.catala_en b/tests/exception/good/unsorted_unlabeled_exceptions.catala_en index 28a06846c..63743b797 100644 --- a/tests/exception/good/unsorted_unlabeled_exceptions.catala_en +++ b/tests/exception/good/unsorted_unlabeled_exceptions.catala_en @@ -21,13 +21,19 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope A -[RESULT] Computation successful! Results: -[RESULT] x = 1 -[RESULT] y = 2 +┌─[RESULT]─ +│Computation successful! Results: +│x = 1 +│y = 2 +└─ ``` diff --git a/tests/func/bad/bad_func.catala_en b/tests/func/bad/bad_func.catala_en index 51ab0729b..1c6099f57 100644 --- a/tests/func/bad/bad_func.catala_en +++ b/tests/func/bad/bad_func.catala_en @@ -23,25 +23,29 @@ scope R: ```catala-test-inline $ catala test-scope R -[RESULT] Computation successful! Results: -[RESULT] r = 30 +┌─[RESULT]─ +│Computation successful! Results: +│r = 30 +└─ ``` ```catala-test-inline $ catala test-scope S -[ERROR] During evaluation: conflict between multiple valid consequences for - assigning the same variable. - -┌─⯈ tests/func/bad/bad_func.catala_en:14.65-14.70: -└──┐ -14 │ definition f of x under condition (x >= x) consequence equals x + x - │ ‾‾‾‾‾ - └─ Article - -┌─⯈ tests/func/bad/bad_func.catala_en:15.62-15.67: -└──┐ -15 │ definition f of x under condition not b consequence equals x * x - │ ‾‾‾‾‾ - └─ Article +┌─[ERROR]─ +│ +│ During evaluation: conflict between multiple valid consequences for +│ assigning the same variable. +│ +├─➤ tests/func/bad/bad_func.catala_en:14.65-14.70: +│ │ +│ 14 │ definition f of x under condition (x >= x) consequence equals x + x +│ │ ‾‾‾‾‾ +├─ Article +│ +├─➤ tests/func/bad/bad_func.catala_en:15.62-15.67: +│ │ +│ 15 │ definition f of x under condition not b consequence equals x * x +│ │ ‾‾‾‾‾ +└─ Article #return code 123# ``` diff --git a/tests/func/bad/param_inconsistency.catala_en b/tests/func/bad/param_inconsistency.catala_en index 707ba3e63..d2706319e 100644 --- a/tests/func/bad/param_inconsistency.catala_en +++ b/tests/func/bad/param_inconsistency.catala_en @@ -14,19 +14,22 @@ scope S: ```catala-test-inline $ catala typecheck -[ERROR] Function argument name mismatch between declaration ('x') and - definition ('y') - -Argument declared here: -┌─⯈ tests/func/bad/param_inconsistency.catala_en:4.42-4.43: -└─┐ -4 │ internal f1 content decimal depends on x content integer - │ ‾ - -Defined here: -┌─⯈ tests/func/bad/param_inconsistency.catala_en:10.20-10.21: -└──┐ -10 │ definition f1 of y under condition not cond - │ ‾ +┌─[ERROR]─ +│ +│ Function argument name mismatch between declaration ('x') and definition +│ ('y') +│ +│ Argument declared here: +├─➤ tests/func/bad/param_inconsistency.catala_en:4.42-4.43: +│ │ +│ 4 │ internal f1 content decimal depends on x content integer +│ │ ‾ +│ +│ Defined here: +├─➤ tests/func/bad/param_inconsistency.catala_en:10.20-10.21: +│ │ +│ 10 │ definition f1 of y under condition not cond +│ │ ‾ +└─ #return code 123# ``` diff --git a/tests/func/bad/param_inconsistency2.catala_en b/tests/func/bad/param_inconsistency2.catala_en index 60875e2a2..cecb15027 100644 --- a/tests/func/bad/param_inconsistency2.catala_en +++ b/tests/func/bad/param_inconsistency2.catala_en @@ -13,19 +13,22 @@ scope S: ```catala-test-inline $ catala typecheck -[ERROR] Function argument name mismatch between declaration ('x') and - definition ('y') - -Argument declared here: -┌─⯈ tests/func/bad/param_inconsistency2.catala_en:4.42-4.43: -└─┐ -4 │ internal f1 content decimal depends on x content integer - │ ‾ - -Defined here: -┌─⯈ tests/func/bad/param_inconsistency2.catala_en:9.30-9.31: -└─┐ -9 │ exception definition f1 of y under condition not cond - │ ‾ +┌─[ERROR]─ +│ +│ Function argument name mismatch between declaration ('x') and definition +│ ('y') +│ +│ Argument declared here: +├─➤ tests/func/bad/param_inconsistency2.catala_en:4.42-4.43: +│ │ +│ 4 │ internal f1 content decimal depends on x content integer +│ │ ‾ +│ +│ Defined here: +├─➤ tests/func/bad/param_inconsistency2.catala_en:9.30-9.31: +│ │ +│ 9 │ exception definition f1 of y under condition not cond +│ │ ‾ +└─ #return code 123# ``` diff --git a/tests/func/bad/param_inconsistency3.catala_en b/tests/func/bad/param_inconsistency3.catala_en index 8d29d9750..06411cd5a 100644 --- a/tests/func/bad/param_inconsistency3.catala_en +++ b/tests/func/bad/param_inconsistency3.catala_en @@ -13,19 +13,22 @@ scope S: ```catala-test-inline $ catala typecheck -[ERROR] Function argument name mismatch between declaration ('x') and - definition ('y') - -Argument declared here: -┌─⯈ tests/func/bad/param_inconsistency3.catala_en:4.42-4.43: -└─┐ -4 │ internal f1 content decimal depends on x content integer - │ ‾ - -Defined here: -┌─⯈ tests/func/bad/param_inconsistency3.catala_en:9.30-9.31: -└─┐ -9 │ exception definition f1 of y under condition not cond - │ ‾ +┌─[ERROR]─ +│ +│ Function argument name mismatch between declaration ('x') and definition +│ ('y') +│ +│ Argument declared here: +├─➤ tests/func/bad/param_inconsistency3.catala_en:4.42-4.43: +│ │ +│ 4 │ internal f1 content decimal depends on x content integer +│ │ ‾ +│ +│ Defined here: +├─➤ tests/func/bad/param_inconsistency3.catala_en:9.30-9.31: +│ │ +│ 9 │ exception definition f1 of y under condition not cond +│ │ ‾ +└─ #return code 123# ``` diff --git a/tests/func/bad/recursive.catala_en b/tests/func/bad/recursive.catala_en index cd2f0444a..48b059de6 100644 --- a/tests/func/bad/recursive.catala_en +++ b/tests/func/bad/recursive.catala_en @@ -10,13 +10,15 @@ scope RecursiveFunc: ```catala-test-inline $ catala test-scope RecursiveFunc -[ERROR] The variable f is used in one of its definitions - (Catala doesn't support recursion) - -┌─⯈ tests/func/bad/recursive.catala_en:8.28-8.29: -└─┐ -8 │ definition f of x equals f of x + 1 - │ ‾ - └─ Article +┌─[ERROR]─ +│ +│ The variable f is used in one of its definitions +│ (Catala doesn't support recursion) +│ +├─➤ tests/func/bad/recursive.catala_en:8.28-8.29: +│ │ +│ 8 │ definition f of x equals f of x + 1 +│ │ ‾ +└─ Article #return code 123# ``` diff --git a/tests/func/good/closure_conversion.catala_en b/tests/func/good/closure_conversion.catala_en index b84ea9b81..7918fb8f1 100644 --- a/tests/func/good/closure_conversion.catala_en +++ b/tests/func/good/closure_conversion.catala_en @@ -15,8 +15,12 @@ scope S: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline diff --git a/tests/func/good/closure_conversion_reduce.catala_en b/tests/func/good/closure_conversion_reduce.catala_en index 74adfd012..6dce1568c 100644 --- a/tests/func/good/closure_conversion_reduce.catala_en +++ b/tests/func/good/closure_conversion_reduce.catala_en @@ -15,8 +15,12 @@ scope S: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline diff --git a/tests/func/good/closure_return.catala_en b/tests/func/good/closure_return.catala_en index c0e483bb1..7dd339cd2 100644 --- a/tests/func/good/closure_return.catala_en +++ b/tests/func/good/closure_return.catala_en @@ -13,8 +13,12 @@ scope S: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline diff --git a/tests/func/good/closure_through_scope.catala_en b/tests/func/good/closure_through_scope.catala_en index 170a6ffa3..1eae67412 100644 --- a/tests/func/good/closure_through_scope.catala_en +++ b/tests/func/good/closure_through_scope.catala_en @@ -21,8 +21,12 @@ scope T: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline @@ -42,6 +46,8 @@ let scope T (T_in: T_in): T {y: integer} = ```catala-test-inline $ catala Interpret --lcalc -s T --avoid-exceptions -O --closure-conversion -[RESULT] Computation successful! Results: -[RESULT] y = -2 +┌─[RESULT]─ +│Computation successful! Results: +│y = -2 +└─ ``` diff --git a/tests/func/good/context_func.catala_en b/tests/func/good/context_func.catala_en index a04517bc4..0b537fd5f 100644 --- a/tests/func/good/context_func.catala_en +++ b/tests/func/good/context_func.catala_en @@ -19,28 +19,36 @@ scope B: ```catala-test-inline $ catala Typecheck --check-invariants -[WARNING] Unused varible: a does not contribute to computing any of scope B - outputs. Did you forget something? - -┌─⯈ tests/func/good/context_func.catala_en:9.3-9.4: -└─┐ -9 │ a scope A - │ ‾ - └─ Test -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[WARNING]─ +│ +│ Unused varible: a does not contribute to computing any of scope B outputs. +│ Did you forget something? +│ +├─➤ tests/func/good/context_func.catala_en:9.3-9.4: +│ │ +│ 9 │ a scope A +│ │ ‾ +└─ Test +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala Scopelang -s B -[WARNING] Unused varible: a does not contribute to computing any of scope B - outputs. Did you forget something? - -┌─⯈ tests/func/good/context_func.catala_en:9.3-9.4: -└─┐ -9 │ a scope A - │ ‾ - └─ Test +┌─[WARNING]─ +│ +│ Unused varible: a does not contribute to computing any of scope B outputs. +│ Did you forget something? +│ +├─➤ tests/func/good/context_func.catala_en:9.3-9.4: +│ │ +│ 9 │ a scope A +│ │ ‾ +└─ Test let scope B (b: bool|input) (a: A {f: integer → integer}|internal) = let a : A {f: integer → integer} = A of {"f"= (λ (x: integer) → ⟨ ⟨b && x > 0 ⊢ ⟨x - 1⟩⟩ | false ⊢ ∅ ⟩)} @@ -48,14 +56,16 @@ let scope B (b: bool|input) (a: A {f: integer → integer}|internal) = ```catala-test-inline $ catala Dcalc -s A -[WARNING] Unused varible: a does not contribute to computing any of scope B - outputs. Did you forget something? - -┌─⯈ tests/func/good/context_func.catala_en:9.3-9.4: -└─┐ -9 │ a scope A - │ ‾ - └─ Test +┌─[WARNING]─ +│ +│ Unused varible: a does not contribute to computing any of scope B outputs. +│ Did you forget something? +│ +├─➤ tests/func/good/context_func.catala_en:9.3-9.4: +│ │ +│ 9 │ a scope A +│ │ ‾ +└─ Test let scope A (A_in: A_in {f_in: integer → ⟨integer⟩}) : A {f: integer → integer} @@ -71,14 +81,16 @@ let scope A ```catala-test-inline $ catala Dcalc -s B -[WARNING] Unused varible: a does not contribute to computing any of scope B - outputs. Did you forget something? - -┌─⯈ tests/func/good/context_func.catala_en:9.3-9.4: -└─┐ -9 │ a scope A - │ ‾ - └─ Test +┌─[WARNING]─ +│ +│ Unused varible: a does not contribute to computing any of scope B outputs. +│ Did you forget something? +│ +├─➤ tests/func/good/context_func.catala_en:9.3-9.4: +│ │ +│ 9 │ a scope A +│ │ ‾ +└─ Test let scope B (B_in: B_in {b_in: bool}): B = let get b : bool = B_in.b_in in let set a : A {f: integer → integer} = diff --git a/tests/func/good/func.catala_en b/tests/func/good/func.catala_en index 805754e8c..e78a905f0 100644 --- a/tests/func/good/func.catala_en +++ b/tests/func/good/func.catala_en @@ -25,12 +25,18 @@ scope R: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope R -[RESULT] Computation successful! Results: -[RESULT] r = 30 +┌─[RESULT]─ +│Computation successful! Results: +│r = 30 +└─ ``` diff --git a/tests/func/good/param_consistency.catala_en b/tests/func/good/param_consistency.catala_en index 51a39b2fe..de5f7aece 100644 --- a/tests/func/good/param_consistency.catala_en +++ b/tests/func/good/param_consistency.catala_en @@ -16,13 +16,19 @@ scope S: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala typecheck -[RESULT] Typechecking successful! +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala @@ -41,9 +47,11 @@ scope T1: ```catala-test-inline $ catala test-scope T1 -[RESULT] Computation successful! Results: -[RESULT] o1 = 20.0 -[RESULT] o2 = 5.0 +┌─[RESULT]─ +│Computation successful! Results: +│o1 = 20.0 +│o2 = 5.0 +└─ ``` ## Multi-argument function @@ -67,6 +75,8 @@ scope T2: ```catala-test-inline $ catala test-scope T2 -[RESULT] Computation successful! Results: -[RESULT] o = 40.0 +┌─[RESULT]─ +│Computation successful! Results: +│o = 40.0 +└─ ``` diff --git a/tests/func/good/scope_call_func_struct_closure.catala_en b/tests/func/good/scope_call_func_struct_closure.catala_en index 0236d836e..2dd8bf283 100644 --- a/tests/func/good/scope_call_func_struct_closure.catala_en +++ b/tests/func/good/scope_call_func_struct_closure.catala_en @@ -44,8 +44,12 @@ two closures in Foo.r are different even with optimizations enabled. ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline @@ -159,6 +163,8 @@ let scope Foo ```catala-test-inline $ catala Interpret --lcalc -s Foo --avoid-exceptions -O --closure-conversion -[RESULT] Computation successful! Results: -[RESULT] z = 11 +┌─[RESULT]─ +│Computation successful! Results: +│z = 11 +└─ ``` diff --git a/tests/io/bad/forgot_input.catala_en b/tests/io/bad/forgot_input.catala_en index 97b5d8aa0..58176d8b2 100644 --- a/tests/io/bad/forgot_input.catala_en +++ b/tests/io/bad/forgot_input.catala_en @@ -16,21 +16,22 @@ scope B: ``` ```catala-test-inline $ catala Typecheck -[ERROR] This subscope variable is a mandatory input but no definition was - provided. - -Incriminated subscope: -┌─⯈ tests/io/bad/forgot_input.catala_en:9.3-9.4: -└─┐ -9 │ a scope A - │ ‾ - └─ Test - -Incriminated variable: -┌─⯈ tests/io/bad/forgot_input.catala_en:6.9-6.10: -└─┐ -6 │ input x content integer - │ ‾ - └─ Test +┌─[ERROR]─ +│ +│ This subscope variable is a mandatory input but no definition was provided. +│ +│ Incriminated subscope: +├─➤ tests/io/bad/forgot_input.catala_en:9.3-9.4: +│ │ +│ 9 │ a scope A +│ │ ‾ +├─ Test +│ +│ Incriminated variable: +├─➤ tests/io/bad/forgot_input.catala_en:6.9-6.10: +│ │ +│ 6 │ input x content integer +│ │ ‾ +└─ Test #return code 123# ``` diff --git a/tests/io/bad/inputing_to_not_input.catala_en b/tests/io/bad/inputing_to_not_input.catala_en index 357d3a9a1..7b636acee 100644 --- a/tests/io/bad/inputing_to_not_input.catala_en +++ b/tests/io/bad/inputing_to_not_input.catala_en @@ -16,27 +16,30 @@ scope B: ``` ```catala-test-inline $ catala Typecheck -[ERROR] Invalid assignment to a subscope variable that is not tagged as input - or context. - -Incriminated subscope: -┌─⯈ tests/io/bad/inputing_to_not_input.catala_en:8.3-8.4: -└─┐ -8 │ a scope A - │ ‾ - └─ Test - -Incriminated variable: -┌─⯈ tests/io/bad/inputing_to_not_input.catala_en:5.10-5.11: -└─┐ -5 │ output a content integer - │ ‾ - └─ Test - -Incriminated subscope variable definition: -┌─⯈ tests/io/bad/inputing_to_not_input.catala_en:14.3-14.17: -└──┐ -14 │ definition a.a equals 0 - │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾ +┌─[ERROR]─ +│ +│ Invalid assignment to a subscope variable that is not tagged as input or +│ context. +│ +│ Incriminated subscope: +├─➤ tests/io/bad/inputing_to_not_input.catala_en:8.3-8.4: +│ │ +│ 8 │ a scope A +│ │ ‾ +├─ Test +│ +│ Incriminated variable: +├─➤ tests/io/bad/inputing_to_not_input.catala_en:5.10-5.11: +│ │ +│ 5 │ output a content integer +│ │ ‾ +├─ Test +│ +│ Incriminated subscope variable definition: +├─➤ tests/io/bad/inputing_to_not_input.catala_en:14.3-14.17: +│ │ +│ 14 │ definition a.a equals 0 +│ │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾ +└─ #return code 123# ``` diff --git a/tests/io/bad/redefining_input.catala_en b/tests/io/bad/redefining_input.catala_en index ff0234b24..dc851f695 100644 --- a/tests/io/bad/redefining_input.catala_en +++ b/tests/io/bad/redefining_input.catala_en @@ -9,19 +9,22 @@ scope A: ``` ```catala-test-inline $ catala Typecheck -[ERROR] There cannot be a definition for a scope variable tagged as input. - -Incriminated variable: -┌─⯈ tests/io/bad/redefining_input.catala_en:5.16-5.17: -└─┐ -5 │ input output a content integer - │ ‾ - └─ Test - -Incriminated variable definition: -┌─⯈ tests/io/bad/redefining_input.catala_en:8.3-8.15: -└─┐ -8 │ definition a equals 0 - │ ‾‾‾‾‾‾‾‾‾‾‾‾ +┌─[ERROR]─ +│ +│ There cannot be a definition for a scope variable tagged as input. +│ +│ Incriminated variable: +├─➤ tests/io/bad/redefining_input.catala_en:5.16-5.17: +│ │ +│ 5 │ input output a content integer +│ │ ‾ +├─ Test +│ +│ Incriminated variable definition: +├─➤ tests/io/bad/redefining_input.catala_en:8.3-8.15: +│ │ +│ 8 │ definition a equals 0 +│ │ ‾‾‾‾‾‾‾‾‾‾‾‾ +└─ #return code 123# ``` diff --git a/tests/io/bad/using_non_output.catala_en b/tests/io/bad/using_non_output.catala_en index d9bb5f506..03fbf9e52 100644 --- a/tests/io/bad/using_non_output.catala_en +++ b/tests/io/bad/using_non_output.catala_en @@ -15,20 +15,22 @@ scope B: ``` ```catala-test-inline $ catala Typecheck -[ERROR] Variable a is not a declared output of scope A. - -a is used here as an output -┌─⯈ tests/io/bad/using_non_output.catala_en:14.13-14.16: -└──┐ -14 │ assertion a.a = 0 - │ ‾‾‾ - └─ Test - -Scope A is declared here -┌─⯈ tests/io/bad/using_non_output.catala_en:4.19-4.20: -└─┐ -4 │ declaration scope A: - │ ‾ - └─ Test +┌─[ERROR]─ +│ +│ Variable a is not a declared output of scope A. +│ +│ a is used here as an output +├─➤ tests/io/bad/using_non_output.catala_en:14.13-14.16: +│ │ +│ 14 │ assertion a.a = 0 +│ │ ‾‾‾ +├─ Test +│ +│ Scope A is declared here +├─➤ tests/io/bad/using_non_output.catala_en:4.19-4.20: +│ │ +│ 4 │ declaration scope A: +│ │ ‾ +└─ Test #return code 123# ``` diff --git a/tests/io/good/all_io.catala_en b/tests/io/good/all_io.catala_en index 762c60b66..16bdc23cc 100644 --- a/tests/io/good/all_io.catala_en +++ b/tests/io/good/all_io.catala_en @@ -21,8 +21,12 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline @@ -57,5 +61,7 @@ let scope A ```catala-test-inline $ catala Typecheck -[RESULT] Typechecking successful! +┌─[RESULT]─ +│Typechecking successful! +└─ ``` diff --git a/tests/io/good/condition_only_input.catala_en b/tests/io/good/condition_only_input.catala_en index 14772db14..968ecc436 100644 --- a/tests/io/good/condition_only_input.catala_en +++ b/tests/io/good/condition_only_input.catala_en @@ -18,8 +18,12 @@ scope B: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline @@ -38,5 +42,7 @@ let scope B (B_in: B_in): B = ```catala-test-inline $ catala test-scope B -[RESULT] Computation successful! +┌─[RESULT]─ +│Computation successful! +└─ ``` diff --git a/tests/io/good/subscope.catala_en b/tests/io/good/subscope.catala_en index 5aca91a1e..6f7b60bc5 100644 --- a/tests/io/good/subscope.catala_en +++ b/tests/io/good/subscope.catala_en @@ -24,8 +24,12 @@ scope B: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline @@ -48,5 +52,7 @@ let scope B (B_in: B_in): B = ```catala-test-inline $ catala Typecheck -[RESULT] Typechecking successful! +┌─[RESULT]─ +│Typechecking successful! +└─ ``` diff --git a/tests/literate/good/test_grave_char_en.catala_en b/tests/literate/good/test_grave_char_en.catala_en index 79e2de0f8..fd311c3c6 100644 --- a/tests/literate/good/test_grave_char_en.catala_en +++ b/tests/literate/good/test_grave_char_en.catala_en @@ -33,20 +33,28 @@ int main(void) { return 0; } ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope A -[RESULT] Computation successful! Results: -[RESULT] literate_parsing_is_ok = true +┌─[RESULT]─ +│Computation successful! Results: +│literate_parsing_is_ok = true +└─ ``` ```catala-test-inline $ catala test-scope A -[RESULT] Computation successful! Results: -[RESULT] literate_parsing_is_ok = true +┌─[RESULT]─ +│Computation successful! Results: +│literate_parsing_is_ok = true +└─ ``` ```catala-test-inline @@ -91,19 +99,27 @@ int main(void) { return 0; } \begin{verbatim} $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ \end{verbatim} \begin{verbatim} $ catala test-scope A -[RESULT] Computation successful! Results: -[RESULT] literate_parsing_is_ok = true +┌─[RESULT]─ +│Computation successful! Results: +│literate_parsing_is_ok = true +└─ \end{verbatim} \begin{verbatim} $ catala test-scope A -[RESULT] Computation successful! Results: -[RESULT] literate_parsing_is_ok = true +┌─[RESULT]─ +│Computation successful! Results: +│literate_parsing_is_ok = true +└─ \end{verbatim} ``` diff --git a/tests/literate/good/test_grave_char_fr.catala_fr b/tests/literate/good/test_grave_char_fr.catala_fr index de474445a..4ab3629a8 100644 --- a/tests/literate/good/test_grave_char_fr.catala_fr +++ b/tests/literate/good/test_grave_char_fr.catala_fr @@ -31,12 +31,18 @@ int main(void) { return 0; } ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope A -[RESULT] Computation successful! Results: -[RESULT] literate_parsing_is_ok = vrai +┌─[RESULT]─ +│Computation successful! Results: +│literate_parsing_is_ok = vrai +└─ ``` diff --git a/tests/literate/good/test_grave_char_pl.catala_pl b/tests/literate/good/test_grave_char_pl.catala_pl index 13654f765..37bbef39b 100644 --- a/tests/literate/good/test_grave_char_pl.catala_pl +++ b/tests/literate/good/test_grave_char_pl.catala_pl @@ -29,6 +29,8 @@ int main(void) { return 0; } ```catala-test-inline $ catala test-scope A -[RESULT] Computation successful! Results: -[RESULT] literate_parsing_is_ok = prawda +┌─[RESULT]─ +│Computation successful! Results: +│literate_parsing_is_ok = prawda +└─ ``` diff --git a/tests/metadata/good/test_markup_refactoring.catala_en b/tests/metadata/good/test_markup_refactoring.catala_en index 54db6673f..0d32ea0c1 100644 --- a/tests/metadata/good/test_markup_refactoring.catala_en +++ b/tests/metadata/good/test_markup_refactoring.catala_en @@ -32,18 +32,26 @@ scope S2: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope S2 -[RESULT] Computation successful! Results: -[RESULT] b = B () +┌─[RESULT]─ +│Computation successful! Results: +│b = B () +└─ ``` ```catala-test-inline $ catala test-scope S -[RESULT] Computation successful! Results: -[RESULT] a = A () +┌─[RESULT]─ +│Computation successful! Results: +│a = A () +└─ ``` diff --git a/tests/modules/bad/mod_bad_include.catala_en b/tests/modules/bad/mod_bad_include.catala_en index 6d49b1d89..de0785037 100644 --- a/tests/modules/bad/mod_bad_include.catala_en +++ b/tests/modules/bad/mod_bad_include.catala_en @@ -3,20 +3,23 @@ ```catala-test-inline $ catala typecheck -[ERROR] A file that declares a module cannot be used through the raw '> Include' - directive. You should use it as a module with - '> Use This_is_not_the_file_name' instead. - -File include -┌─⯈ tests/modules/bad/mod_bad_include.catala_en:1.3-1.33: -└─┐ -1 │ > Include: mod_badname.catala_en - │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ - -Module declaration -┌─⯈ tests/modules/bad/mod_badname.catala_en:1.10-1.35: -└─┐ -1 │ > Module This_is_not_the_file_name - │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ +┌─[ERROR]─ +│ +│ A file that declares a module cannot be used through the raw '> Include' +│ directive. You should use it as a module with +│ '> Use This_is_not_the_file_name' instead. +│ +│ File include +├─➤ tests/modules/bad/mod_bad_include.catala_en:1.3-1.33: +│ │ +│ 1 │ > Include: mod_badname.catala_en +│ │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ +│ +│ Module declaration +├─➤ tests/modules/bad/mod_badname.catala_en:1.10-1.35: +│ │ +│ 1 │ > Module This_is_not_the_file_name +│ │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ +└─ #return code 123# ``` diff --git a/tests/modules/bad/mod_badname.catala_en b/tests/modules/bad/mod_badname.catala_en index f8c4aaff4..4c8435c39 100644 --- a/tests/modules/bad/mod_badname.catala_en +++ b/tests/modules/bad/mod_badname.catala_en @@ -3,14 +3,17 @@ ```catala-test-inline $ catala typecheck -[ERROR] Module declared as This_is_not_the_file_name, which does not match - the file name "tests/modules/bad/mod_badname.catala_en". - Rename the module to Mod_badname or the file to - "tests/modules/bad/This_is_not_the_file_name.catala_en". - -┌─⯈ tests/modules/bad/mod_badname.catala_en:1.10-1.35: -└─┐ -1 │ > Module This_is_not_the_file_name - │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ +┌─[ERROR]─ +│ +│ Module declared as This_is_not_the_file_name, which does not match the +│ file name "tests/modules/bad/mod_badname.catala_en". Rename the module to +│ Mod_badname or the file to +│ "tests/modules/bad/This_is_not_the_file_name.catala_en". +│ +├─➤ tests/modules/bad/mod_badname.catala_en:1.10-1.35: +│ │ +│ 1 │ > Module This_is_not_the_file_name +│ │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ +└─ #return code 123# ``` diff --git a/tests/modules/good/external_use.catala_en b/tests/modules/good/external_use.catala_en index 9f70c56e8..996757cda 100644 --- a/tests/modules/good/external_use.catala_en +++ b/tests/modules/good/external_use.catala_en @@ -18,7 +18,9 @@ scope S: ```catala-test-inline $ catala test-scope S -[RESULT] Computation successful! Results: -[RESULT] result1 = [$3.33; $0.83; $0.83; $3.33; $0.83; $0.85] -[RESULT] result2 = [$3.33; $0.83; $0.83; $3.34; $0.84; $0.83] +┌─[RESULT]─ +│Computation successful! Results: +│result1 = [$3.33; $0.83; $0.83; $3.33; $0.83; $0.85] +│result2 = [$3.33; $0.83; $0.83; $3.34; $0.84; $0.83] +└─ ``` diff --git a/tests/modules/good/mod_def.catala_en b/tests/modules/good/mod_def.catala_en index ef77bb9d3..d9661eac4 100644 --- a/tests/modules/good/mod_def.catala_en +++ b/tests/modules/good/mod_def.catala_en @@ -31,13 +31,19 @@ scope S: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala typecheck --disable-warnings -[RESULT] Typechecking successful! +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test { id="ml" } diff --git a/tests/modules/good/mod_def_context.catala_en b/tests/modules/good/mod_def_context.catala_en index 7d33ef2e1..c5a80e333 100644 --- a/tests/modules/good/mod_def_context.catala_en +++ b/tests/modules/good/mod_def_context.catala_en @@ -60,21 +60,25 @@ scope Stest: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope Stest -[RESULT] Computation successful! Results: -[RESULT] -o1 = S { -- ci: 0 -- cm: $0.00 -- cfun1: -- cfun2: } -[RESULT] -o2 = S { -- ci: 1 -- cm: $1.00 -- cfun1: -- cfun2: } -[RESULT] x11 = 12.0 -[RESULT] x12 = 6.0 -[RESULT] x21 = 8.0 -[RESULT] x22 = 6.0 +┌─[RESULT]─ +│Computation successful! Results: +│o1 = S { -- ci: 0 -- cm: $0.00 -- cfun1: -- cfun2: } +│o2 = S { -- ci: 1 -- cm: $1.00 -- cfun1: -- cfun2: } +│x11 = 12.0 +│x12 = 6.0 +│x21 = 8.0 +│x22 = 6.0 +└─ ``` ### Testing subscopes (with and without context override) @@ -97,11 +101,13 @@ scope TestSubDefault: ```catala-test-inline $ catala test-scope TestSubDefault -[RESULT] Computation successful! Results: -[RESULT] ci = 0 -[RESULT] cm = $0.00 -[RESULT] x11 = 12.0 -[RESULT] x12 = 6.0 +┌─[RESULT]─ +│Computation successful! Results: +│ci = 0 +│cm = $0.00 +│x11 = 12.0 +│x12 = 6.0 +└─ ``` ```catala @@ -125,9 +131,11 @@ scope TestSubOverride: ```catala-test-inline $ catala test-scope TestSubOverride -[RESULT] Computation successful! Results: -[RESULT] ci = 1 -[RESULT] cm = $1.00 -[RESULT] x21 = 8.0 -[RESULT] x22 = 6.0 +┌─[RESULT]─ +│Computation successful! Results: +│ci = 1 +│cm = $1.00 +│x21 = 8.0 +│x22 = 6.0 +└─ ``` diff --git a/tests/modules/good/mod_middle.catala_en b/tests/modules/good/mod_middle.catala_en index 2c183206f..9a70c1e29 100644 --- a/tests/modules/good/mod_middle.catala_en +++ b/tests/modules/good/mod_middle.catala_en @@ -21,11 +21,17 @@ scope S: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala typecheck -[RESULT] Typechecking successful! +┌─[RESULT]─ +│Typechecking successful! +└─ ``` diff --git a/tests/modules/good/mod_use.catala_en b/tests/modules/good/mod_use.catala_en index aa2905a7c..919da94fd 100644 --- a/tests/modules/good/mod_use.catala_en +++ b/tests/modules/good/mod_use.catala_en @@ -27,15 +27,21 @@ scope T2: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope T2 -[RESULT] Computation successful! Results: -[RESULT] o1 = No () -[RESULT] o2 = Maybe () -[RESULT] o3 = $1,000.00 -[RESULT] o4 = 5.0 +┌─[RESULT]─ +│Computation successful! Results: +│o1 = No () +│o2 = Maybe () +│o3 = $1,000.00 +│o4 = 5.0 +└─ ``` diff --git a/tests/modules/good/mod_use2.catala_en b/tests/modules/good/mod_use2.catala_en index f1bc58c5e..a7dc1d35c 100644 --- a/tests/modules/good/mod_use2.catala_en +++ b/tests/modules/good/mod_use2.catala_en @@ -19,16 +19,22 @@ scope T: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope T -[RESULT] Computation successful! Results: -[RESULT] o1 = Mod_def.S { -- sr: $1,000.00 -- e1: Maybe () } -[RESULT] o2 = $2,500.00 -[RESULT] o3 = $132.00 +┌─[RESULT]─ +│Computation successful! Results: +│o1 = Mod_def.S { -- sr: $1,000.00 -- e1: Maybe () } +│o2 = $2,500.00 +│o3 = $132.00 +└─ ``` The following tests multiple inclusion of the same module (Mod_def is used through Mod_middle here, and also directly by mod_use.catala_en included below) @@ -37,9 +43,11 @@ The following tests multiple inclusion of the same module (Mod_def is used throu ```catala-test-inline $ catala test-scope T2 -[RESULT] Computation successful! Results: -[RESULT] o1 = No () -[RESULT] o2 = Maybe () -[RESULT] o3 = $1,000.00 -[RESULT] o4 = 5.0 +┌─[RESULT]─ +│Computation successful! Results: +│o1 = No () +│o2 = Maybe () +│o3 = $1,000.00 +│o4 = 5.0 +└─ ``` diff --git a/tests/modules/good/mod_use3.catala_en b/tests/modules/good/mod_use3.catala_en index c5066c579..e013ecb94 100644 --- a/tests/modules/good/mod_use3.catala_en +++ b/tests/modules/good/mod_use3.catala_en @@ -23,14 +23,20 @@ scope T: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope T -[RESULT] Computation successful! Results: -[RESULT] o1 = Mod_def.S { -- sr: $1,000.00 -- e1: Maybe () } -[RESULT] o2 = $2,500.00 -[RESULT] o3 = $132.00 +┌─[RESULT]─ +│Computation successful! Results: +│o1 = Mod_def.S { -- sr: $1,000.00 -- e1: Maybe () } +│o2 = $2,500.00 +│o3 = $132.00 +└─ ``` diff --git a/tests/modules/good/mod_use_context.catala_en b/tests/modules/good/mod_use_context.catala_en index 973079eb4..932448b26 100644 --- a/tests/modules/good/mod_use_context.catala_en +++ b/tests/modules/good/mod_use_context.catala_en @@ -44,33 +44,37 @@ scope TestCall: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope TestCall -[RESULT] Computation successful! Results: -[RESULT] -o_default = - Mod_def_context.S { - -- ci: 0 - -- cm: $0.00 - -- cfun1: - -- cfun2: - } -[RESULT] -o_override = - Mod_def_context.S { - -- ci: 1 - -- cm: $1.00 - -- cfun1: - -- cfun2: - } -[RESULT] x11 = 12.0 -[RESULT] x12 = 6.0 -[RESULT] x21 = 8.0 -[RESULT] x22 = 6.0 +┌─[RESULT]─ +│Computation successful! Results: +│o_default = +│ Mod_def_context.S { +│ -- ci: 0 +│ -- cm: $0.00 +│ -- cfun1: +│ -- cfun2: +│ } +│o_override = +│ Mod_def_context.S { +│ -- ci: 1 +│ -- cm: $1.00 +│ -- cfun1: +│ -- cfun2: +│ } +│x11 = 12.0 +│x12 = 6.0 +│x21 = 8.0 +│x22 = 6.0 +└─ ``` @@ -94,11 +98,13 @@ scope TestSubDefault: ```catala-test-inline $ catala test-scope TestSubDefault -[RESULT] Computation successful! Results: -[RESULT] ci = 0 -[RESULT] cm = $0.00 -[RESULT] x11 = 12.0 -[RESULT] x12 = 6.0 +┌─[RESULT]─ +│Computation successful! Results: +│ci = 0 +│cm = $0.00 +│x11 = 12.0 +│x12 = 6.0 +└─ ``` ```catala @@ -122,9 +128,11 @@ scope TestSubOverride: ```catala-test-inline $ catala test-scope TestSubOverride -[RESULT] Computation successful! Results: -[RESULT] ci = 1 -[RESULT] cm = $1.00 -[RESULT] x21 = 8.0 -[RESULT] x22 = 6.0 +┌─[RESULT]─ +│Computation successful! Results: +│ci = 1 +│cm = $1.00 +│x21 = 8.0 +│x22 = 6.0 +└─ ``` diff --git a/tests/modules/good/prorata_syntax.catala_en b/tests/modules/good/prorata_syntax.catala_en index a5aa7524a..734e542de 100644 --- a/tests/modules/good/prorata_syntax.catala_en +++ b/tests/modules/good/prorata_syntax.catala_en @@ -36,30 +36,35 @@ scope S: ```catala-test-inline $ catala typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope S -[RESULT] Computation successful! Results: -[RESULT] -result = - [ - HouseholdMemberTaxed { - -- member: - HouseholdMember { -- birthdate: 2000-01-01 -- revenue: $10,000.00 } - -- tax: $270.27 - }; - HouseholdMemberTaxed { - -- member: - HouseholdMember { -- birthdate: 2000-01-02 -- revenue: $1,000.00 } - -- tax: $27.03 - }; - HouseholdMemberTaxed { - -- member: - HouseholdMember { -- birthdate: 2000-01-02 -- revenue: $100.00 } - -- tax: $2.70 - } - ] +┌─[RESULT]─ +│Computation successful! Results: +│result = +│ [ +│ HouseholdMemberTaxed { +│ -- member: +│ HouseholdMember { -- birthdate: 2000-01-01 -- revenue: $10,000.00 } +│ -- tax: $270.27 +│ }; +│ HouseholdMemberTaxed { +│ -- member: +│ HouseholdMember { -- birthdate: 2000-01-02 -- revenue: $1,000.00 } +│ -- tax: $27.03 +│ }; +│ HouseholdMemberTaxed { +│ -- member: +│ HouseholdMember { -- birthdate: 2000-01-02 -- revenue: $100.00 } +│ -- tax: $2.70 +│ } +│ ] +└─ ``` diff --git a/tests/money/bad/no_mingle.catala_en b/tests/money/bad/no_mingle.catala_en index 7ea1a5d35..3325c371c 100644 --- a/tests/money/bad/no_mingle.catala_en +++ b/tests/money/bad/no_mingle.catala_en @@ -14,26 +14,28 @@ scope A: ```catala-test-inline $ catala test-scope A -[ERROR] I don't know how to apply operator * on types money and money - -┌─⯈ tests/money/bad/no_mingle.catala_en:12.24-12.29: -└──┐ -12 │ definition z equals (x * y) - │ ‾‾‾‾‾ - └─ Article - -Type money coming from expression: -┌─⯈ tests/money/bad/no_mingle.catala_en:5.21-5.26: -└─┐ -5 │ context x content money - │ ‾‾‾‾‾ - └─ Article - -Type money coming from expression: -┌─⯈ tests/money/bad/no_mingle.catala_en:6.21-6.26: -└─┐ -6 │ context y content money - │ ‾‾‾‾‾ - └─ Article +┌─[ERROR]─ +│ +│ I don't know how to apply operator * on types money and money +│ +├─➤ tests/money/bad/no_mingle.catala_en:12.24-12.29: +│ │ +│ 12 │ definition z equals (x * y) +│ │ ‾‾‾‾‾ +├─ Article +│ +│ Type money coming from expression: +├─➤ tests/money/bad/no_mingle.catala_en:5.21-5.26: +│ │ +│ 5 │ context x content money +│ │ ‾‾‾‾‾ +├─ Article +│ +│ Type money coming from expression: +├─➤ tests/money/bad/no_mingle.catala_en:6.21-6.26: +│ │ +│ 6 │ context y content money +│ │ ‾‾‾‾‾ +└─ Article #return code 123# ``` diff --git a/tests/money/good/literal_parsing.catala_en b/tests/money/good/literal_parsing.catala_en index 7cc75a570..02180ac82 100644 --- a/tests/money/good/literal_parsing.catala_en +++ b/tests/money/good/literal_parsing.catala_en @@ -15,13 +15,19 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope A -[RESULT] Computation successful! Results: -[RESULT] x = $0.30 -[RESULT] y = -$0.30 +┌─[RESULT]─ +│Computation successful! Results: +│x = $0.30 +│y = -$0.30 +└─ ``` diff --git a/tests/money/good/simple.catala_en b/tests/money/good/simple.catala_en index cba0c8639..1f57deeee 100644 --- a/tests/money/good/simple.catala_en +++ b/tests/money/good/simple.catala_en @@ -16,14 +16,20 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope A -[RESULT] Computation successful! Results: -[RESULT] x = $123.54 -[RESULT] y = $8,548,650.96 -[RESULT] z = $7.23 +┌─[RESULT]─ +│Computation successful! Results: +│x = $123.54 +│y = $8,548,650.96 +│z = $7.23 +└─ ``` diff --git a/tests/name_resolution/bad/toplevel_defs.catala_en b/tests/name_resolution/bad/toplevel_defs.catala_en index cda78acfa..89e64326d 100644 --- a/tests/name_resolution/bad/toplevel_defs.catala_en +++ b/tests/name_resolution/bad/toplevel_defs.catala_en @@ -13,12 +13,14 @@ declaration glob5 content decimal ```catala-test-inline $ catala typecheck -[ERROR] Scope calls are not allowed outside of a scope - -┌─⯈ tests/name_resolution/bad/toplevel_defs.catala_en:11.11-11.23: -└──┐ -11 │ equals (output of S1).a - │ ‾‾‾‾‾‾‾‾‾‾‾‾ - └─ Scope calls are not allowed outside of scopes +┌─[ERROR]─ +│ +│ Scope calls are not allowed outside of a scope +│ +├─➤ tests/name_resolution/bad/toplevel_defs.catala_en:11.11-11.23: +│ │ +│ 11 │ equals (output of S1).a +│ │ ‾‾‾‾‾‾‾‾‾‾‾‾ +└─ Scope calls are not allowed outside of scopes #return code 123# ``` diff --git a/tests/name_resolution/good/let_in.catala_en b/tests/name_resolution/good/let_in.catala_en index fd560ebcf..cfb4890ce 100644 --- a/tests/name_resolution/good/let_in.catala_en +++ b/tests/name_resolution/good/let_in.catala_en @@ -29,15 +29,21 @@ scope S: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope S -[RESULT] Computation successful! Results: -[RESULT] a = A { -- x: -2.0 -- y: B { -- y: false -- z: -1.0 } } -[RESULT] b = B { -- y: true -- z: 42.0 } +┌─[RESULT]─ +│Computation successful! Results: +│a = A { -- x: -2.0 -- y: B { -- y: false -- z: -1.0 } } +│b = B { -- y: true -- z: 42.0 } +└─ ``` ## Check scope of let-in vs scope variable @@ -55,14 +61,18 @@ scope S2: ```catala-test-inline $ catala test-scope S2 -[WARNING] Unused varible: x does not contribute to computing any of scope S2 - outputs. Did you forget something? - -┌─⯈ tests/name_resolution/good/let_in.catala_en:47.4-47.5: -└──┐ -47 │ x scope S - │ ‾ - └─ Check scope of let-in vs scope variable -[RESULT] Computation successful! Results: -[RESULT] y = 1 +┌─[WARNING]─ +│ +│ Unused varible: x does not contribute to computing any of scope S2 +│ outputs. Did you forget something? +│ +├─➤ tests/name_resolution/good/let_in.catala_en:53.4-53.5: +│ │ +│ 53 │ x scope S +│ │ ‾ +└─ Check scope of let-in vs scope variable +┌─[RESULT]─ +│Computation successful! Results: +│y = 1 +└─ ``` diff --git a/tests/name_resolution/good/let_in2.catala_en b/tests/name_resolution/good/let_in2.catala_en index b02b3dc98..1c5eea2d8 100644 --- a/tests/name_resolution/good/let_in2.catala_en +++ b/tests/name_resolution/good/let_in2.catala_en @@ -17,14 +17,20 @@ scope S: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope S -[RESULT] Computation successful! Results: -[RESULT] a = true +┌─[RESULT]─ +│Computation successful! Results: +│a = true +└─ ``` ```catala-test-inline diff --git a/tests/name_resolution/good/out_of_order.catala_en b/tests/name_resolution/good/out_of_order.catala_en index a1b958439..d9efc484e 100644 --- a/tests/name_resolution/good/out_of_order.catala_en +++ b/tests/name_resolution/good/out_of_order.catala_en @@ -22,13 +22,19 @@ scope S: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope S -[RESULT] Computation successful! Results: -[RESULT] a = A { -- x: 0 -- y: B { -- y: true -- z: 0.0 } } -[RESULT] b = B { -- y: true -- z: 0.0 } +┌─[RESULT]─ +│Computation successful! Results: +│a = A { -- x: 0 -- y: B { -- y: true -- z: 0.0 } } +│b = B { -- y: true -- z: 0.0 } +└─ ``` diff --git a/tests/name_resolution/good/toplevel_defs.catala_en b/tests/name_resolution/good/toplevel_defs.catala_en index 97bfefb29..55f844e6c 100644 --- a/tests/name_resolution/good/toplevel_defs.catala_en +++ b/tests/name_resolution/good/toplevel_defs.catala_en @@ -23,15 +23,21 @@ scope S: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope S -[RESULT] Computation successful! Results: -[RESULT] a = 1,946.574,4 -[RESULT] b = A { -- y: true -- z: 2,091.0 } +┌─[RESULT]─ +│Computation successful! Results: +│a = 1,946.574,4 +│b = A { -- y: true -- z: 2,091.0 } +└─ ``` ## Test toplevel function defs @@ -50,8 +56,10 @@ scope S2: ```catala-test-inline $ catala test-scope S2 -[RESULT] Computation successful! Results: -[RESULT] a = 154.0 +┌─[RESULT]─ +│Computation successful! Results: +│a = 154.0 +└─ ``` ## Test function def with two args @@ -70,8 +78,10 @@ scope S3: ```catala-test-inline $ catala test-scope S3 -[RESULT] Computation successful! Results: -[RESULT] a = 2,480.0 +┌─[RESULT]─ +│Computation successful! Results: +│a = 2,480.0 +└─ ``` ## Test inline defs in toplevel defs @@ -93,8 +103,10 @@ scope S4: ```catala-test-inline $ catala test-scope S4 -[RESULT] Computation successful! Results: -[RESULT] a = 6,001.0 +┌─[RESULT]─ +│Computation successful! Results: +│a = 6,001.0 +└─ ``` ```catala-test-inline @@ -426,8 +438,8 @@ def s2(s2_in:S2In): return (glob3(money_of_cents_string("4400")) + decimal_of_string("100.")) return handle_default(SourcePosition(filename="tests/name_resolution/good/toplevel_defs.catala_en", - start_line=48, start_column=24, - end_line=48, end_column=43, + start_line=54, start_column=24, + end_line=54, end_column=43, law_headings=["Test toplevel function defs"]), [], temp_a_1, temp_a_2) def temp_a_3(_:Unit): @@ -435,15 +447,15 @@ def s2(s2_in:S2In): def temp_a_4(_:Unit): raise Empty temp_a_5 = handle_default(SourcePosition(filename="tests/name_resolution/good/toplevel_defs.catala_en", - start_line=45, start_column=10, - end_line=45, end_column=11, + start_line=51, start_column=10, + end_line=51, end_column=11, law_headings=["Test toplevel function defs"]), [temp_a], temp_a_3, temp_a_4) except Empty: raise NoValue(SourcePosition( filename="tests/name_resolution/good/toplevel_defs.catala_en", - start_line=45, start_column=10, - end_line=45, end_column=11, + start_line=51, start_column=10, + end_line=51, end_column=11, law_headings=["Test toplevel function defs"])) a = temp_a_5 return S2(a = a) @@ -458,8 +470,8 @@ def s3(s3_in:S3In): glob4(money_of_cents_string("4400"), decimal_of_string("55."))) return handle_default(SourcePosition(filename="tests/name_resolution/good/toplevel_defs.catala_en", - start_line=68, start_column=24, - end_line=68, end_column=47, + start_line=76, start_column=24, + end_line=76, end_column=47, law_headings=["Test function def with two args"]), [], temp_a_7, temp_a_8) def temp_a_9(_:Unit): @@ -467,15 +479,15 @@ def s3(s3_in:S3In): def temp_a_10(_:Unit): raise Empty temp_a_11 = handle_default(SourcePosition(filename="tests/name_resolution/good/toplevel_defs.catala_en", - start_line=65, start_column=10, - end_line=65, end_column=11, + start_line=73, start_column=10, + end_line=73, end_column=11, law_headings=["Test function def with two args"]), [temp_a_6], temp_a_9, temp_a_10) except Empty: raise NoValue(SourcePosition( filename="tests/name_resolution/good/toplevel_defs.catala_en", - start_line=65, start_column=10, - end_line=65, end_column=11, + start_line=73, start_column=10, + end_line=73, end_column=11, law_headings=["Test function def with two args"])) a_1 = temp_a_11 return S3(a = a_1) @@ -488,8 +500,8 @@ def s4(s4_in:S4In): def temp_a_14(_:Unit): return (glob5 + decimal_of_string("1.")) return handle_default(SourcePosition(filename="tests/name_resolution/good/toplevel_defs.catala_en", - start_line=91, start_column=24, - end_line=91, end_column=34, + start_line=101, start_column=24, + end_line=101, end_column=34, law_headings=["Test inline defs in toplevel defs"]), [], temp_a_13, temp_a_14) def temp_a_15(_:Unit): @@ -497,15 +509,15 @@ def s4(s4_in:S4In): def temp_a_16(_:Unit): raise Empty temp_a_17 = handle_default(SourcePosition(filename="tests/name_resolution/good/toplevel_defs.catala_en", - start_line=88, start_column=10, - end_line=88, end_column=11, + start_line=98, start_column=10, + end_line=98, end_column=11, law_headings=["Test inline defs in toplevel defs"]), [temp_a_12], temp_a_15, temp_a_16) except Empty: raise NoValue(SourcePosition( filename="tests/name_resolution/good/toplevel_defs.catala_en", - start_line=88, start_column=10, - end_line=88, end_column=11, + start_line=98, start_column=10, + end_line=98, end_column=11, law_headings=["Test inline defs in toplevel defs"])) a_2 = temp_a_17 return S4(a = a_2) diff --git a/tests/name_resolution/good/toplevel_defs_simple.catala_en b/tests/name_resolution/good/toplevel_defs_simple.catala_en index bf08c7aad..c79bccd13 100644 --- a/tests/name_resolution/good/toplevel_defs_simple.catala_en +++ b/tests/name_resolution/good/toplevel_defs_simple.catala_en @@ -14,12 +14,18 @@ scope S: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope S -[RESULT] Computation successful! Results: -[RESULT] a = true +┌─[RESULT]─ +│Computation successful! Results: +│a = true +└─ ``` diff --git a/tests/proof/bad/array_length-empty.catala_en b/tests/proof/bad/array_length-empty.catala_en index 4e6e38224..53f25490c 100644 --- a/tests/proof/bad/array_length-empty.catala_en +++ b/tests/proof/bad/array_length-empty.catala_en @@ -12,11 +12,15 @@ scope A: ```catala-test-inline $ catala Proof --disable-counterexamples -[WARNING] [A.y] This variable might return an empty error: -┌─⯈ tests/proof/bad/array_length-empty.catala_en:6.10-6.11: -└─┐ +┌─[WARNING]─ +│ +│ [A.y] This variable might return an empty error: +─➤ tests/proof/bad/array_length-empty.catala_en:6.10-6.11: + │ 6 │ output y content boolean │ ‾ - └─ Test +Test Counterexample generation is disabled so none was generated. +│ +└─ ``` diff --git a/tests/proof/bad/array_length-overlap.catala_en b/tests/proof/bad/array_length-overlap.catala_en index 7bc295c11..ef5aa7fb0 100644 --- a/tests/proof/bad/array_length-overlap.catala_en +++ b/tests/proof/bad/array_length-overlap.catala_en @@ -13,11 +13,15 @@ scope A: ```catala-test-inline $ catala Proof --disable-counterexamples -[WARNING] [A.y] At least two exceptions overlap for this variable: -┌─⯈ tests/proof/bad/array_length-overlap.catala_en:6.10-6.11: -└─┐ +┌─[WARNING]─ +│ +│ [A.y] At least two exceptions overlap for this variable: +─➤ tests/proof/bad/array_length-overlap.catala_en:6.10-6.11: + │ 6 │ output y content boolean │ ‾ - └─ Test +Test Counterexample generation is disabled so none was generated. +│ +└─ ``` diff --git a/tests/proof/bad/assert-empty.catala_en b/tests/proof/bad/assert-empty.catala_en index 2c7cd5e97..ca264978e 100644 --- a/tests/proof/bad/assert-empty.catala_en +++ b/tests/proof/bad/assert-empty.catala_en @@ -24,10 +24,14 @@ scope Foo: ```catala-test-inline $ catala Proof --disable-counterexamples -[WARNING] [Foo.x] This variable might return an empty error: -┌─⯈ tests/proof/bad/assert-empty.catala_en:4.11-4.12: -└─┐ +┌─[WARNING]─ +│ +│ [Foo.x] This variable might return an empty error: +─➤ tests/proof/bad/assert-empty.catala_en:4.11-4.12: + │ 4 │ output x content integer │ ‾ Counterexample generation is disabled so none was generated. +│ +└─ ``` diff --git a/tests/proof/bad/dates_get_year-empty.catala_en b/tests/proof/bad/dates_get_year-empty.catala_en index 963146796..b38b5f5fd 100644 --- a/tests/proof/bad/dates_get_year-empty.catala_en +++ b/tests/proof/bad/dates_get_year-empty.catala_en @@ -15,19 +15,22 @@ scope A: ```catala-test-inline $ catala Proof --disable-counterexamples -[ERROR] There cannot be a definition for a scope variable tagged as input. - -Incriminated variable: -┌─⯈ tests/proof/bad/dates_get_year-empty.catala_en:5.9-5.10: -└─┐ -5 │ input x content date - │ ‾ - └─ Test - -Incriminated variable definition: -┌─⯈ tests/proof/bad/dates_get_year-empty.catala_en:9.3-9.15: -└─┐ -9 │ definition x equals |2022-01-16| - │ ‾‾‾‾‾‾‾‾‾‾‾‾ +┌─[ERROR]─ +│ +│ There cannot be a definition for a scope variable tagged as input. +│ +│ Incriminated variable: +├─➤ tests/proof/bad/dates_get_year-empty.catala_en:5.9-5.10: +│ │ +│ 5 │ input x content date +│ │ ‾ +├─ Test +│ +│ Incriminated variable definition: +├─➤ tests/proof/bad/dates_get_year-empty.catala_en:9.3-9.15: +│ │ +│ 9 │ definition x equals |2022-01-16| +│ │ ‾‾‾‾‾‾‾‾‾‾‾‾ +└─ #return code 123# ``` diff --git a/tests/proof/bad/dates_get_year-overlap.catala_en b/tests/proof/bad/dates_get_year-overlap.catala_en index 95ca095c6..51c5319f9 100644 --- a/tests/proof/bad/dates_get_year-overlap.catala_en +++ b/tests/proof/bad/dates_get_year-overlap.catala_en @@ -15,11 +15,15 @@ scope A: ```catala-test-inline $ catala Proof --disable-counterexamples -[WARNING] [A.y] At least two exceptions overlap for this variable: -┌─⯈ tests/proof/bad/dates_get_year-overlap.catala_en:6.10-6.11: -└─┐ +┌─[WARNING]─ +│ +│ [A.y] At least two exceptions overlap for this variable: +─➤ tests/proof/bad/dates_get_year-overlap.catala_en:6.10-6.11: + │ 6 │ output y content boolean │ ‾ - └─ Test +Test Counterexample generation is disabled so none was generated. +│ +└─ ``` diff --git a/tests/proof/bad/dates_simple-empty.catala_en b/tests/proof/bad/dates_simple-empty.catala_en index 455c282e2..24a9ee3e1 100644 --- a/tests/proof/bad/dates_simple-empty.catala_en +++ b/tests/proof/bad/dates_simple-empty.catala_en @@ -14,11 +14,15 @@ scope A: ```catala-test-inline $ catala Proof --disable-counterexamples -[WARNING] [A.y] This variable might return an empty error: -┌─⯈ tests/proof/bad/dates_simple-empty.catala_en:6.10-6.11: -└─┐ +┌─[WARNING]─ +│ +│ [A.y] This variable might return an empty error: +─➤ tests/proof/bad/dates_simple-empty.catala_en:6.10-6.11: + │ 6 │ output y content boolean │ ‾ - └─ Test +Test Counterexample generation is disabled so none was generated. +│ +└─ ``` diff --git a/tests/proof/bad/dates_simple-overlap.catala_en b/tests/proof/bad/dates_simple-overlap.catala_en index afe4070fa..49a6ecf8d 100644 --- a/tests/proof/bad/dates_simple-overlap.catala_en +++ b/tests/proof/bad/dates_simple-overlap.catala_en @@ -15,11 +15,15 @@ scope A: ```catala-test-inline $ catala Proof --disable-counterexamples -[WARNING] [A.y] At least two exceptions overlap for this variable: -┌─⯈ tests/proof/bad/dates_simple-overlap.catala_en:6.10-6.11: -└─┐ +┌─[WARNING]─ +│ +│ [A.y] At least two exceptions overlap for this variable: +─➤ tests/proof/bad/dates_simple-overlap.catala_en:6.10-6.11: + │ 6 │ output y content boolean │ ‾ - └─ Test +Test Counterexample generation is disabled so none was generated. +│ +└─ ``` diff --git a/tests/proof/bad/duration-empty.catala_en b/tests/proof/bad/duration-empty.catala_en index e63604529..e76b23faf 100644 --- a/tests/proof/bad/duration-empty.catala_en +++ b/tests/proof/bad/duration-empty.catala_en @@ -12,11 +12,15 @@ scope A: ```catala-test-inline $ catala Proof --disable-counterexamples -[WARNING] [A.y] This variable might return an empty error: -┌─⯈ tests/proof/bad/duration-empty.catala_en:6.10-6.11: -└─┐ +┌─[WARNING]─ +│ +│ [A.y] This variable might return an empty error: +─➤ tests/proof/bad/duration-empty.catala_en:6.10-6.11: + │ 6 │ output y content boolean │ ‾ - └─ Test +Test Counterexample generation is disabled so none was generated. +│ +└─ ``` diff --git a/tests/proof/bad/duration-overlap.catala_en b/tests/proof/bad/duration-overlap.catala_en index 9cb57903d..d3fdeb7cd 100644 --- a/tests/proof/bad/duration-overlap.catala_en +++ b/tests/proof/bad/duration-overlap.catala_en @@ -13,11 +13,15 @@ scope A: ```catala-test-inline $ catala Proof --disable-counterexamples -[WARNING] [A.y] At least two exceptions overlap for this variable: -┌─⯈ tests/proof/bad/duration-overlap.catala_en:6.10-6.11: -└─┐ +┌─[WARNING]─ +│ +│ [A.y] At least two exceptions overlap for this variable: +─➤ tests/proof/bad/duration-overlap.catala_en:6.10-6.11: + │ 6 │ output y content boolean │ ‾ - └─ Test +Test Counterexample generation is disabled so none was generated. +│ +└─ ``` diff --git a/tests/proof/bad/enums-empty.catala_en b/tests/proof/bad/enums-empty.catala_en index 1e297a2d1..917b52419 100644 --- a/tests/proof/bad/enums-empty.catala_en +++ b/tests/proof/bad/enums-empty.catala_en @@ -23,19 +23,25 @@ scope A: ```catala-test-inline $ catala Proof --disable-counterexamples -[WARNING] The constructor "C" of enumeration "T" is never used; - maybe it's unnecessary? - -┌─⯈ tests/proof/bad/enums-empty.catala_en:7.7-7.8: -└─┐ -7 │ -- C content boolean - │ ‾ - └─ Test -[WARNING] [A.x] This variable might return an empty error: -┌─⯈ tests/proof/bad/enums-empty.catala_en:15.10-15.11: -└──┐ +┌─[WARNING]─ +│ +│ The constructor "C" of enumeration "T" is never used; +│ maybe it's unnecessary? +│ +├─➤ tests/proof/bad/enums-empty.catala_en:7.7-7.8: +│ │ +│ 7 │ -- C content boolean +│ │ ‾ +└─ Test +┌─[WARNING]─ +│ +│ [A.x] This variable might return an empty error: +─➤ tests/proof/bad/enums-empty.catala_en:15.10-15.11: + │ 15 │ output x content integer │ ‾ - └─ Test +Test Counterexample generation is disabled so none was generated. +│ +└─ ``` diff --git a/tests/proof/bad/enums-nonbool-empty.catala_en b/tests/proof/bad/enums-nonbool-empty.catala_en index 96870b751..02e0b49db 100644 --- a/tests/proof/bad/enums-nonbool-empty.catala_en +++ b/tests/proof/bad/enums-nonbool-empty.catala_en @@ -21,19 +21,25 @@ scope A: ```catala-test-inline $ catala Proof --disable-counterexamples -[WARNING] The constructor "C" of enumeration "T" is never used; - maybe it's unnecessary? - -┌─⯈ tests/proof/bad/enums-nonbool-empty.catala_en:5.7-5.8: -└─┐ -5 │ -- C content boolean - │ ‾ - └─ Test -[WARNING] [A.x] This variable might return an empty error: -┌─⯈ tests/proof/bad/enums-nonbool-empty.catala_en:13.10-13.11: -└──┐ +┌─[WARNING]─ +│ +│ The constructor "C" of enumeration "T" is never used; +│ maybe it's unnecessary? +│ +├─➤ tests/proof/bad/enums-nonbool-empty.catala_en:5.7-5.8: +│ │ +│ 5 │ -- C content boolean +│ │ ‾ +└─ Test +┌─[WARNING]─ +│ +│ [A.x] This variable might return an empty error: +─➤ tests/proof/bad/enums-nonbool-empty.catala_en:13.10-13.11: + │ 13 │ output x content integer │ ‾ - └─ Test +Test Counterexample generation is disabled so none was generated. +│ +└─ ``` diff --git a/tests/proof/bad/enums-nonbool-overlap.catala_en b/tests/proof/bad/enums-nonbool-overlap.catala_en index 25e9fdb87..4f0685773 100644 --- a/tests/proof/bad/enums-nonbool-overlap.catala_en +++ b/tests/proof/bad/enums-nonbool-overlap.catala_en @@ -21,19 +21,25 @@ scope A: ```catala-test-inline $ catala Proof --disable-counterexamples -[WARNING] The constructor "C" of enumeration "T" is never used; - maybe it's unnecessary? - -┌─⯈ tests/proof/bad/enums-nonbool-overlap.catala_en:5.7-5.8: -└─┐ -5 │ -- C content boolean - │ ‾ - └─ Test -[WARNING] [A.x] At least two exceptions overlap for this variable: -┌─⯈ tests/proof/bad/enums-nonbool-overlap.catala_en:13.10-13.11: -└──┐ +┌─[WARNING]─ +│ +│ The constructor "C" of enumeration "T" is never used; +│ maybe it's unnecessary? +│ +├─➤ tests/proof/bad/enums-nonbool-overlap.catala_en:5.7-5.8: +│ │ +│ 5 │ -- C content boolean +│ │ ‾ +└─ Test +┌─[WARNING]─ +│ +│ [A.x] At least two exceptions overlap for this variable: +─➤ tests/proof/bad/enums-nonbool-overlap.catala_en:13.10-13.11: + │ 13 │ output x content integer │ ‾ - └─ Test +Test Counterexample generation is disabled so none was generated. +│ +└─ ``` diff --git a/tests/proof/bad/enums-overlap.catala_en b/tests/proof/bad/enums-overlap.catala_en index ad4f78e18..602319d27 100644 --- a/tests/proof/bad/enums-overlap.catala_en +++ b/tests/proof/bad/enums-overlap.catala_en @@ -23,19 +23,25 @@ scope A: ```catala-test-inline $ catala Proof --disable-counterexamples -[WARNING] The constructor "C" of enumeration "T" is never used; - maybe it's unnecessary? - -┌─⯈ tests/proof/bad/enums-overlap.catala_en:7.7-7.8: -└─┐ -7 │ -- C content boolean - │ ‾ - └─ Test -[WARNING] [A.x] At least two exceptions overlap for this variable: -┌─⯈ tests/proof/bad/enums-overlap.catala_en:15.10-15.11: -└──┐ +┌─[WARNING]─ +│ +│ The constructor "C" of enumeration "T" is never used; +│ maybe it's unnecessary? +│ +├─➤ tests/proof/bad/enums-overlap.catala_en:7.7-7.8: +│ │ +│ 7 │ -- C content boolean +│ │ ‾ +└─ Test +┌─[WARNING]─ +│ +│ [A.x] At least two exceptions overlap for this variable: +─➤ tests/proof/bad/enums-overlap.catala_en:15.10-15.11: + │ 15 │ output x content integer │ ‾ - └─ Test +Test Counterexample generation is disabled so none was generated. +│ +└─ ``` diff --git a/tests/proof/bad/enums_inj-empty.catala_en b/tests/proof/bad/enums_inj-empty.catala_en index f922a1959..0ea7df853 100644 --- a/tests/proof/bad/enums_inj-empty.catala_en +++ b/tests/proof/bad/enums_inj-empty.catala_en @@ -16,19 +16,25 @@ scope A: ```catala-test-inline $ catala Proof --disable-counterexamples -[WARNING] The constructor "C2" of enumeration "E" is never used; - maybe it's unnecessary? - -┌─⯈ tests/proof/bad/enums_inj-empty.catala_en:6.6-6.8: -└─┐ -6 │ -- C2 - │ ‾‾ - └─ Article -[WARNING] [A.y] This variable might return an empty error: -┌─⯈ tests/proof/bad/enums_inj-empty.catala_en:10.10-10.11: -└──┐ +┌─[WARNING]─ +│ +│ The constructor "C2" of enumeration "E" is never used; +│ maybe it's unnecessary? +│ +├─➤ tests/proof/bad/enums_inj-empty.catala_en:6.6-6.8: +│ │ +│ 6 │ -- C2 +│ │ ‾‾ +└─ Article +┌─[WARNING]─ +│ +│ [A.y] This variable might return an empty error: +─➤ tests/proof/bad/enums_inj-empty.catala_en:10.10-10.11: + │ 10 │ output y content integer │ ‾ - └─ Article +Article Counterexample generation is disabled so none was generated. +│ +└─ ``` diff --git a/tests/proof/bad/enums_inj-overlap.catala_en b/tests/proof/bad/enums_inj-overlap.catala_en index cc538e2d2..daac94d80 100644 --- a/tests/proof/bad/enums_inj-overlap.catala_en +++ b/tests/proof/bad/enums_inj-overlap.catala_en @@ -18,11 +18,15 @@ scope A: ```catala-test-inline $ catala Proof --disable-counterexamples -[WARNING] [A.y] At least two exceptions overlap for this variable: -┌─⯈ tests/proof/bad/enums_inj-overlap.catala_en:10.10-10.11: -└──┐ +┌─[WARNING]─ +│ +│ [A.y] At least two exceptions overlap for this variable: +─➤ tests/proof/bad/enums_inj-overlap.catala_en:10.10-10.11: + │ 10 │ output y content integer │ ‾ - └─ Article +Article Counterexample generation is disabled so none was generated. +│ +└─ ``` diff --git a/tests/proof/bad/enums_unit-empty.catala_en b/tests/proof/bad/enums_unit-empty.catala_en index f5efbd49a..443b40359 100644 --- a/tests/proof/bad/enums_unit-empty.catala_en +++ b/tests/proof/bad/enums_unit-empty.catala_en @@ -21,11 +21,15 @@ scope A: ```catala-test-inline $ catala Proof --disable-counterexamples -[WARNING] [A.y] This variable might return an empty error: -┌─⯈ tests/proof/bad/enums_unit-empty.catala_en:10.10-10.11: -└──┐ +┌─[WARNING]─ +│ +│ [A.y] This variable might return an empty error: +─➤ tests/proof/bad/enums_unit-empty.catala_en:10.10-10.11: + │ 10 │ output y content integer │ ‾ - └─ Article +Article Counterexample generation is disabled so none was generated. +│ +└─ ``` diff --git a/tests/proof/bad/enums_unit-overlap.catala_en b/tests/proof/bad/enums_unit-overlap.catala_en index c07048f2f..be143aafa 100644 --- a/tests/proof/bad/enums_unit-overlap.catala_en +++ b/tests/proof/bad/enums_unit-overlap.catala_en @@ -21,11 +21,15 @@ scope A: ```catala-test-inline $ catala Proof --disable-counterexamples -[WARNING] [A.y] At least two exceptions overlap for this variable: -┌─⯈ tests/proof/bad/enums_unit-overlap.catala_en:10.10-10.11: -└──┐ +┌─[WARNING]─ +│ +│ [A.y] At least two exceptions overlap for this variable: +─➤ tests/proof/bad/enums_unit-overlap.catala_en:10.10-10.11: + │ 10 │ output y content integer │ ‾ - └─ Article +Article Counterexample generation is disabled so none was generated. +│ +└─ ``` diff --git a/tests/proof/bad/let_in_condition-empty.catala_en b/tests/proof/bad/let_in_condition-empty.catala_en index 1d1fd6dd0..044bdd21c 100644 --- a/tests/proof/bad/let_in_condition-empty.catala_en +++ b/tests/proof/bad/let_in_condition-empty.catala_en @@ -13,11 +13,15 @@ scope A: ```catala-test-inline $ catala Proof --disable-counterexamples -[WARNING] [A.x] This variable might return an empty error: -┌─⯈ tests/proof/bad/let_in_condition-empty.catala_en:5.10-5.11: -└─┐ +┌─[WARNING]─ +│ +│ [A.x] This variable might return an empty error: +─➤ tests/proof/bad/let_in_condition-empty.catala_en:5.10-5.11: + │ 5 │ output x content boolean │ ‾ - └─ Test +Test Counterexample generation is disabled so none was generated. +│ +└─ ``` diff --git a/tests/proof/bad/money-empty.catala_en b/tests/proof/bad/money-empty.catala_en index 06e1741e6..13ed675bb 100644 --- a/tests/proof/bad/money-empty.catala_en +++ b/tests/proof/bad/money-empty.catala_en @@ -16,11 +16,15 @@ scope A: ```catala-test-inline $ catala Proof --disable-counterexamples -[WARNING] [A.y] This variable might return an empty error: -┌─⯈ tests/proof/bad/money-empty.catala_en:8.10-8.11: -└─┐ +┌─[WARNING]─ +│ +│ [A.y] This variable might return an empty error: +─➤ tests/proof/bad/money-empty.catala_en:8.10-8.11: + │ 8 │ output y content boolean │ ‾ - └─ Test +Test Counterexample generation is disabled so none was generated. +│ +└─ ``` diff --git a/tests/proof/bad/money-overlap.catala_en b/tests/proof/bad/money-overlap.catala_en index 63e3968c8..51e50af46 100644 --- a/tests/proof/bad/money-overlap.catala_en +++ b/tests/proof/bad/money-overlap.catala_en @@ -17,11 +17,15 @@ scope A: ```catala-test-inline $ catala Proof --disable-counterexamples -[WARNING] [A.y] At least two exceptions overlap for this variable: -┌─⯈ tests/proof/bad/money-overlap.catala_en:8.10-8.11: -└─┐ +┌─[WARNING]─ +│ +│ [A.y] At least two exceptions overlap for this variable: +─➤ tests/proof/bad/money-overlap.catala_en:8.10-8.11: + │ 8 │ output y content boolean │ ‾ - └─ Test +Test Counterexample generation is disabled so none was generated. +│ +└─ ``` diff --git a/tests/proof/bad/no_vars-conflict.catala_en b/tests/proof/bad/no_vars-conflict.catala_en index e22dd926a..47ae5d872 100644 --- a/tests/proof/bad/no_vars-conflict.catala_en +++ b/tests/proof/bad/no_vars-conflict.catala_en @@ -17,11 +17,15 @@ scope A: ``` ```catala-test-inline $ catala Proof --disable-counterexamples -[WARNING] [A.y] At least two exceptions overlap for this variable: -┌─⯈ tests/proof/bad/no_vars-conflict.catala_en:8.10-8.11: -└─┐ +┌─[WARNING]─ +│ +│ [A.y] At least two exceptions overlap for this variable: +─➤ tests/proof/bad/no_vars-conflict.catala_en:8.10-8.11: + │ 8 │ output y content integer │ ‾ - └─ Test +Test Counterexample generation is disabled so none was generated. +│ +└─ ``` diff --git a/tests/proof/bad/no_vars-empty.catala_en b/tests/proof/bad/no_vars-empty.catala_en index 8b2aba98f..500d1168b 100644 --- a/tests/proof/bad/no_vars-empty.catala_en +++ b/tests/proof/bad/no_vars-empty.catala_en @@ -16,11 +16,15 @@ scope A: ``` ```catala-test-inline $ catala Proof --disable-counterexamples -[WARNING] [A.y] This variable might return an empty error: -┌─⯈ tests/proof/bad/no_vars-empty.catala_en:7.10-7.11: -└─┐ +┌─[WARNING]─ +│ +│ [A.y] This variable might return an empty error: +─➤ tests/proof/bad/no_vars-empty.catala_en:7.10-7.11: + │ 7 │ output y content integer │ ‾ - └─ Test +Test Counterexample generation is disabled so none was generated. +│ +└─ ``` diff --git a/tests/proof/bad/prolala_motivating_example.catala_en b/tests/proof/bad/prolala_motivating_example.catala_en index 19f4148f1..10fb4f117 100644 --- a/tests/proof/bad/prolala_motivating_example.catala_en +++ b/tests/proof/bad/prolala_motivating_example.catala_en @@ -123,29 +123,32 @@ scope Amount: ```catala-test-inline $ catala Proof --disable-counterexamples -[ERROR] Invalid assignment to a subscope variable that is not tagged as input - or context. - -Incriminated subscope: -┌─⯈ tests/proof/bad/prolala_motivating_example.catala_en:56.3-56.14: -└──┐ -56 │ eligibility scope Eligibility - │ ‾‾‾‾‾‾‾‾‾‾‾ - └┬ ProLaLa 2022 Super Cash Bonus - └─ Amount - -Incriminated variable: -┌─⯈ tests/proof/bad/prolala_motivating_example.catala_en:9.12-9.22: -└─┐ -9 │ internal is_student content boolean - │ ‾‾‾‾‾‾‾‾‾‾ - └┬ ProLaLa 2022 Super Cash Bonus - └─ Eligibility - -Incriminated subscope variable definition: -┌─⯈ tests/proof/bad/prolala_motivating_example.catala_en:64.3-64.36: -└──┐ -64 │ definition eligibility.is_student equals is_student - │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ +┌─[ERROR]─ +│ +│ Invalid assignment to a subscope variable that is not tagged as input or +│ context. +│ +│ Incriminated subscope: +├─➤ tests/proof/bad/prolala_motivating_example.catala_en:56.3-56.14: +│ │ +│ 56 │ eligibility scope Eligibility +│ │ ‾‾‾‾‾‾‾‾‾‾‾ +├─ ProLaLa 2022 Super Cash Bonus +│ └─ Amount +│ +│ Incriminated variable: +├─➤ tests/proof/bad/prolala_motivating_example.catala_en:9.12-9.22: +│ │ +│ 9 │ internal is_student content boolean +│ │ ‾‾‾‾‾‾‾‾‾‾ +├─ ProLaLa 2022 Super Cash Bonus +│ └─ Eligibility +│ +│ Incriminated subscope variable definition: +├─➤ tests/proof/bad/prolala_motivating_example.catala_en:64.3-64.36: +│ │ +│ 64 │ definition eligibility.is_student equals is_student +│ │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ +└─ #return code 123# ``` diff --git a/tests/proof/bad/rationals-empty.catala_en b/tests/proof/bad/rationals-empty.catala_en index 5e23356b4..56ebdb841 100644 --- a/tests/proof/bad/rationals-empty.catala_en +++ b/tests/proof/bad/rationals-empty.catala_en @@ -12,11 +12,15 @@ scope A: ```catala-test-inline $ catala Proof --disable-counterexamples -[WARNING] [A.y] This variable might return an empty error: -┌─⯈ tests/proof/bad/rationals-empty.catala_en:6.10-6.11: -└─┐ +┌─[WARNING]─ +│ +│ [A.y] This variable might return an empty error: +─➤ tests/proof/bad/rationals-empty.catala_en:6.10-6.11: + │ 6 │ output y content boolean │ ‾ - └─ Test +Test Counterexample generation is disabled so none was generated. +│ +└─ ``` diff --git a/tests/proof/bad/rationals-overlap.catala_en b/tests/proof/bad/rationals-overlap.catala_en index ee582f504..57a8e3452 100644 --- a/tests/proof/bad/rationals-overlap.catala_en +++ b/tests/proof/bad/rationals-overlap.catala_en @@ -13,11 +13,15 @@ scope A: ```catala-test-inline $ catala Proof --disable-counterexamples -[WARNING] [A.y] At least two exceptions overlap for this variable: -┌─⯈ tests/proof/bad/rationals-overlap.catala_en:6.10-6.11: -└─┐ +┌─[WARNING]─ +│ +│ [A.y] At least two exceptions overlap for this variable: +─➤ tests/proof/bad/rationals-overlap.catala_en:6.10-6.11: + │ 6 │ output y content boolean │ ‾ - └─ Test +Test Counterexample generation is disabled so none was generated. +│ +└─ ``` diff --git a/tests/proof/bad/sat_solving.catala_en b/tests/proof/bad/sat_solving.catala_en index 7e9565c37..beff7a048 100644 --- a/tests/proof/bad/sat_solving.catala_en +++ b/tests/proof/bad/sat_solving.catala_en @@ -40,11 +40,15 @@ scope A: ```catala-test-inline $ catala Proof --disable-counterexamples -[WARNING] [A.x10] This variable might return an empty error: -┌─⯈ tests/proof/bad/sat_solving.catala_en:15.10-15.13: -└──┐ +┌─[WARNING]─ +│ +│ [A.x10] This variable might return an empty error: +─➤ tests/proof/bad/sat_solving.catala_en:15.10-15.13: + │ 15 │ output x10 content boolean │ ‾‾‾ - └─ Test +Test Counterexample generation is disabled so none was generated. +│ +└─ ``` diff --git a/tests/proof/bad/structs-empty.catala_en b/tests/proof/bad/structs-empty.catala_en index dee5bf7de..d29e0d18b 100644 --- a/tests/proof/bad/structs-empty.catala_en +++ b/tests/proof/bad/structs-empty.catala_en @@ -21,11 +21,15 @@ scope A: ```catala-test-inline $ catala Proof --disable-counterexamples -[WARNING] [A.x] This variable might return an empty error: -┌─⯈ tests/proof/bad/structs-empty.catala_en:13.10-13.11: -└──┐ +┌─[WARNING]─ +│ +│ [A.x] This variable might return an empty error: +─➤ tests/proof/bad/structs-empty.catala_en:13.10-13.11: + │ 13 │ output x content integer │ ‾ - └─ Test +Test Counterexample generation is disabled so none was generated. +│ +└─ ``` diff --git a/tests/proof/bad/structs-overlap.catala_en b/tests/proof/bad/structs-overlap.catala_en index faa026d77..9693d6dc1 100644 --- a/tests/proof/bad/structs-overlap.catala_en +++ b/tests/proof/bad/structs-overlap.catala_en @@ -21,11 +21,15 @@ scope A: ```catala-test-inline $ catala Proof --disable-counterexamples -[WARNING] [A.x] At least two exceptions overlap for this variable: -┌─⯈ tests/proof/bad/structs-overlap.catala_en:13.10-13.11: -└──┐ +┌─[WARNING]─ +│ +│ [A.x] At least two exceptions overlap for this variable: +─➤ tests/proof/bad/structs-overlap.catala_en:13.10-13.11: + │ 13 │ output x content integer │ ‾ - └─ Test +Test Counterexample generation is disabled so none was generated. +│ +└─ ``` diff --git a/tests/proof/good/array_length.catala_en b/tests/proof/good/array_length.catala_en index 0d0a8311c..4e0eb0d7d 100644 --- a/tests/proof/good/array_length.catala_en +++ b/tests/proof/good/array_length.catala_en @@ -15,11 +15,17 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala Proof --disable-counterexamples -[RESULT] No errors found during the proof mode run. +┌─[RESULT]─ +│No errors found during the proof mode run. +└─ ``` diff --git a/tests/proof/good/assert.catala_en b/tests/proof/good/assert.catala_en index d9f6653c6..7aeb8a72d 100644 --- a/tests/proof/good/assert.catala_en +++ b/tests/proof/good/assert.catala_en @@ -26,11 +26,17 @@ scope Foo: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala Proof --disable-counterexamples -[RESULT] No errors found during the proof mode run. +┌─[RESULT]─ +│No errors found during the proof mode run. +└─ ``` diff --git a/tests/proof/good/dates_get_year.catala_en b/tests/proof/good/dates_get_year.catala_en index f8458a966..1b0310e7b 100644 --- a/tests/proof/good/dates_get_year.catala_en +++ b/tests/proof/good/dates_get_year.catala_en @@ -17,11 +17,17 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala Proof --disable-counterexamples -[RESULT] No errors found during the proof mode run. +┌─[RESULT]─ +│No errors found during the proof mode run. +└─ ``` diff --git a/tests/proof/good/dates_simple.catala_en b/tests/proof/good/dates_simple.catala_en index c06d999f7..33dcdcba5 100644 --- a/tests/proof/good/dates_simple.catala_en +++ b/tests/proof/good/dates_simple.catala_en @@ -17,11 +17,17 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala Proof --disable-counterexamples -[RESULT] No errors found during the proof mode run. +┌─[RESULT]─ +│No errors found during the proof mode run. +└─ ``` diff --git a/tests/proof/good/direct_scope_call.catala_en b/tests/proof/good/direct_scope_call.catala_en index 663e4bc13..c80f1d4ea 100644 --- a/tests/proof/good/direct_scope_call.catala_en +++ b/tests/proof/good/direct_scope_call.catala_en @@ -18,11 +18,17 @@ scope Foo: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala Proof -s Foo -[RESULT] No errors found during the proof mode run. +┌─[RESULT]─ +│No errors found during the proof mode run. +└─ ``` diff --git a/tests/proof/good/direct_scope_call_with_context.catala_en b/tests/proof/good/direct_scope_call_with_context.catala_en index 90d8d09e3..75f95616f 100644 --- a/tests/proof/good/direct_scope_call_with_context.catala_en +++ b/tests/proof/good/direct_scope_call_with_context.catala_en @@ -19,11 +19,17 @@ scope Foo: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala Proof -s Foo -[RESULT] No errors found during the proof mode run. +┌─[RESULT]─ +│No errors found during the proof mode run. +└─ ``` diff --git a/tests/proof/good/duration.catala_en b/tests/proof/good/duration.catala_en index d1ee3936a..a9a1a3542 100644 --- a/tests/proof/good/duration.catala_en +++ b/tests/proof/good/duration.catala_en @@ -15,11 +15,17 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala Proof --disable-counterexamples -[RESULT] No errors found during the proof mode run. +┌─[RESULT]─ +│No errors found during the proof mode run. +└─ ``` diff --git a/tests/proof/good/enums-arith.catala_en b/tests/proof/good/enums-arith.catala_en index 34e2d9fb1..5e0b3a06f 100644 --- a/tests/proof/good/enums-arith.catala_en +++ b/tests/proof/good/enums-arith.catala_en @@ -23,27 +23,37 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants -[WARNING] The constructor "C" of enumeration "T" is never used; - maybe it's unnecessary? - -┌─⯈ tests/proof/good/enums-arith.catala_en:5.7-5.8: -└─┐ -5 │ -- C content boolean - │ ‾ - └─ Test -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[WARNING]─ +│ +│ The constructor "C" of enumeration "T" is never used; +│ maybe it's unnecessary? +│ +├─➤ tests/proof/good/enums-arith.catala_en:5.7-5.8: +│ │ +│ 5 │ -- C content boolean +│ │ ‾ +└─ Test +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala Proof --disable-counterexamples -[WARNING] The constructor "C" of enumeration "T" is never used; - maybe it's unnecessary? - -┌─⯈ tests/proof/good/enums-arith.catala_en:5.7-5.8: -└─┐ -5 │ -- C content boolean - │ ‾ - └─ Test -[RESULT] No errors found during the proof mode run. +┌─[WARNING]─ +│ +│ The constructor "C" of enumeration "T" is never used; +│ maybe it's unnecessary? +│ +├─➤ tests/proof/good/enums-arith.catala_en:5.7-5.8: +│ │ +│ 5 │ -- C content boolean +│ │ ‾ +└─ Test +┌─[RESULT]─ +│No errors found during the proof mode run. +└─ ``` diff --git a/tests/proof/good/enums-nonbool.catala_en b/tests/proof/good/enums-nonbool.catala_en index a7c448950..f7ec358c6 100644 --- a/tests/proof/good/enums-nonbool.catala_en +++ b/tests/proof/good/enums-nonbool.catala_en @@ -23,27 +23,37 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants -[WARNING] The constructor "C" of enumeration "T" is never used; - maybe it's unnecessary? - -┌─⯈ tests/proof/good/enums-nonbool.catala_en:5.7-5.8: -└─┐ -5 │ -- C content boolean - │ ‾ - └─ Test -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[WARNING]─ +│ +│ The constructor "C" of enumeration "T" is never used; +│ maybe it's unnecessary? +│ +├─➤ tests/proof/good/enums-nonbool.catala_en:5.7-5.8: +│ │ +│ 5 │ -- C content boolean +│ │ ‾ +└─ Test +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala Proof --disable-counterexamples -[WARNING] The constructor "C" of enumeration "T" is never used; - maybe it's unnecessary? - -┌─⯈ tests/proof/good/enums-nonbool.catala_en:5.7-5.8: -└─┐ -5 │ -- C content boolean - │ ‾ - └─ Test -[RESULT] No errors found during the proof mode run. +┌─[WARNING]─ +│ +│ The constructor "C" of enumeration "T" is never used; +│ maybe it's unnecessary? +│ +├─➤ tests/proof/good/enums-nonbool.catala_en:5.7-5.8: +│ │ +│ 5 │ -- C content boolean +│ │ ‾ +└─ Test +┌─[RESULT]─ +│No errors found during the proof mode run. +└─ ``` diff --git a/tests/proof/good/enums.catala_en b/tests/proof/good/enums.catala_en index 3cda97a77..d1a9699a3 100644 --- a/tests/proof/good/enums.catala_en +++ b/tests/proof/good/enums.catala_en @@ -22,27 +22,37 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants -[WARNING] The constructor "C" of enumeration "T" is never used; - maybe it's unnecessary? - -┌─⯈ tests/proof/good/enums.catala_en:5.7-5.8: -└─┐ -5 │ -- C content boolean - │ ‾ - └─ Test -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[WARNING]─ +│ +│ The constructor "C" of enumeration "T" is never used; +│ maybe it's unnecessary? +│ +├─➤ tests/proof/good/enums.catala_en:5.7-5.8: +│ │ +│ 5 │ -- C content boolean +│ │ ‾ +└─ Test +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala Proof --disable-counterexamples -[WARNING] The constructor "C" of enumeration "T" is never used; - maybe it's unnecessary? - -┌─⯈ tests/proof/good/enums.catala_en:5.7-5.8: -└─┐ -5 │ -- C content boolean - │ ‾ - └─ Test -[RESULT] No errors found during the proof mode run. +┌─[WARNING]─ +│ +│ The constructor "C" of enumeration "T" is never used; +│ maybe it's unnecessary? +│ +├─➤ tests/proof/good/enums.catala_en:5.7-5.8: +│ │ +│ 5 │ -- C content boolean +│ │ ‾ +└─ Test +┌─[RESULT]─ +│No errors found during the proof mode run. +└─ ``` diff --git a/tests/proof/good/enums_inj.catala_en b/tests/proof/good/enums_inj.catala_en index fae82d29e..02b627cca 100644 --- a/tests/proof/good/enums_inj.catala_en +++ b/tests/proof/good/enums_inj.catala_en @@ -19,11 +19,17 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala Proof --disable-counterexamples -[RESULT] No errors found during the proof mode run. +┌─[RESULT]─ +│No errors found during the proof mode run. +└─ ``` diff --git a/tests/proof/good/enums_unit.catala_en b/tests/proof/good/enums_unit.catala_en index 6f8b90ead..fc794d4a2 100644 --- a/tests/proof/good/enums_unit.catala_en +++ b/tests/proof/good/enums_unit.catala_en @@ -23,11 +23,17 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala Proof --disable-counterexamples -[RESULT] No errors found during the proof mode run. +┌─[RESULT]─ +│No errors found during the proof mode run. +└─ ``` diff --git a/tests/proof/good/functions.catala_en b/tests/proof/good/functions.catala_en index 226b44cf2..e82a25305 100644 --- a/tests/proof/good/functions.catala_en +++ b/tests/proof/good/functions.catala_en @@ -16,11 +16,17 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala Proof --disable-counterexamples -[RESULT] No errors found during the proof mode run. +┌─[RESULT]─ +│No errors found during the proof mode run. +└─ ``` diff --git a/tests/proof/good/let_in_condition.catala_en b/tests/proof/good/let_in_condition.catala_en index 2732e22ad..018e9be62 100644 --- a/tests/proof/good/let_in_condition.catala_en +++ b/tests/proof/good/let_in_condition.catala_en @@ -15,11 +15,17 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala Proof --disable-counterexamples -[RESULT] No errors found during the proof mode run. +┌─[RESULT]─ +│No errors found during the proof mode run. +└─ ``` diff --git a/tests/proof/good/money.catala_en b/tests/proof/good/money.catala_en index c3b3a02c9..1df8e1961 100644 --- a/tests/proof/good/money.catala_en +++ b/tests/proof/good/money.catala_en @@ -17,11 +17,17 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala Proof --disable-counterexamples -[RESULT] No errors found during the proof mode run. +┌─[RESULT]─ +│No errors found during the proof mode run. +└─ ``` diff --git a/tests/proof/good/no_vars.catala_en b/tests/proof/good/no_vars.catala_en index 85b368dce..8b359dbf3 100644 --- a/tests/proof/good/no_vars.catala_en +++ b/tests/proof/good/no_vars.catala_en @@ -12,11 +12,17 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala Proof --disable-counterexamples -[RESULT] No errors found during the proof mode run. +┌─[RESULT]─ +│No errors found during the proof mode run. +└─ ``` diff --git a/tests/proof/good/rationals.catala_en b/tests/proof/good/rationals.catala_en index de97d0f06..6c9926856 100644 --- a/tests/proof/good/rationals.catala_en +++ b/tests/proof/good/rationals.catala_en @@ -15,11 +15,17 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala Proof --disable-counterexamples -[RESULT] No errors found during the proof mode run. +┌─[RESULT]─ +│No errors found during the proof mode run. +└─ ``` diff --git a/tests/proof/good/simple_vars.catala_en b/tests/proof/good/simple_vars.catala_en index 8d316799a..071cf652b 100644 --- a/tests/proof/good/simple_vars.catala_en +++ b/tests/proof/good/simple_vars.catala_en @@ -18,11 +18,17 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala Proof --disable-counterexamples -[RESULT] No errors found during the proof mode run. +┌─[RESULT]─ +│No errors found during the proof mode run. +└─ ``` diff --git a/tests/proof/good/structs.catala_en b/tests/proof/good/structs.catala_en index 0555c3130..75bcc3158 100644 --- a/tests/proof/good/structs.catala_en +++ b/tests/proof/good/structs.catala_en @@ -22,11 +22,17 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala Proof --disable-counterexamples -[RESULT] No errors found during the proof mode run. +┌─[RESULT]─ +│No errors found during the proof mode run. +└─ ``` diff --git a/tests/scope/bad/cycle_in_scope.catala_en b/tests/scope/bad/cycle_in_scope.catala_en index 471c38173..24eaf8d61 100644 --- a/tests/scope/bad/cycle_in_scope.catala_en +++ b/tests/scope/bad/cycle_in_scope.catala_en @@ -16,28 +16,30 @@ scope A: ```catala-test-inline $ catala test-scope A -[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/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/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/scope/bad/cycle_in_scope.catala_en:13.32-13.33: -└──┐ -13 │ definition z under condition y < 1 consequence equals y - │ ‾ - └─ Article +┌─[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/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/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/scope/bad/cycle_in_scope.catala_en:13.32-13.33: +│ │ +│ 13 │ definition z under condition y < 1 consequence equals y +│ │ ‾ +└─ Article #return code 123# ``` diff --git a/tests/scope/bad/cyclic_scope_calls.catala_en b/tests/scope/bad/cyclic_scope_calls.catala_en index 75c4a273b..06bec0a58 100644 --- a/tests/scope/bad/cyclic_scope_calls.catala_en +++ b/tests/scope/bad/cyclic_scope_calls.catala_en @@ -28,25 +28,28 @@ scope S4: ```catala-test-inline $ catala typecheck -[ERROR] Cyclic dependency detected between the following scopes: - S4 → S3 → S2 → S4 - -S4 is used here in the definition of S3: -┌─⯈ tests/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/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/scope/bad/cyclic_scope_calls.catala_en:24.24-24.36: -└──┐ -24 │ definition o equals (output of S2).o - │ ‾‾‾‾‾‾‾‾‾‾‾‾ +┌─[ERROR]─ +│ +│ Cyclic dependency detected between the following scopes: +│ S4 → S3 → S2 → S4 +│ +│ S4 is used here in the definition of S3: +├─➤ tests/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/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/scope/bad/cyclic_scope_calls.catala_en:24.24-24.36: +│ │ +│ 24 │ definition o equals (output of S2).o +│ │ ‾‾‾‾‾‾‾‾‾‾‾‾ +└─ #return code 123# ``` diff --git a/tests/scope/bad/cyclic_scopes.catala_en b/tests/scope/bad/cyclic_scopes.catala_en index efb316c6d..643cc4f2d 100644 --- a/tests/scope/bad/cyclic_scopes.catala_en +++ b/tests/scope/bad/cyclic_scopes.catala_en @@ -18,21 +18,22 @@ scope B: ```catala-test-inline $ catala test-scope A -[ERROR] Cyclic dependency detected between the following scopes: - B → A → B - -B is used here in the definition of A: -┌─⯈ tests/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/scope/bad/cyclic_scopes.catala_en:9.3-9.4: -└─┐ -9 │ a scope A - │ ‾ - └─ Article +┌─[ERROR]─ +│ +│ Cyclic dependency detected between the following scopes: B → A → B +│ +│ B is used here in the definition of A: +├─➤ tests/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/scope/bad/cyclic_scopes.catala_en:9.3-9.4: +│ │ +│ 9 │ a scope A +│ │ ‾ +└─ Article #return code 123# ``` diff --git a/tests/scope/bad/scope.catala_en b/tests/scope/bad/scope.catala_en index 207f187d7..c7035dae3 100644 --- a/tests/scope/bad/scope.catala_en +++ b/tests/scope/bad/scope.catala_en @@ -16,19 +16,21 @@ scope A: ```catala-test-inline $ catala test-scope A -[ERROR] During evaluation: conflict between multiple valid consequences for - assigning the same variable. - -┌─⯈ tests/scope/bad/scope.catala_en:13.57-13.61: -└──┐ -13 │ definition b under condition not c consequence equals 1337 - │ ‾‾‾‾ - └─ Article - -┌─⯈ tests/scope/bad/scope.catala_en:14.57-14.58: -└──┐ -14 │ definition b under condition not c consequence equals 0 - │ ‾ - └─ Article +┌─[ERROR]─ +│ +│ During evaluation: conflict between multiple valid consequences for +│ assigning the same variable. +│ +├─➤ tests/scope/bad/scope.catala_en:13.57-13.61: +│ │ +│ 13 │ definition b under condition not c consequence equals 1337 +│ │ ‾‾‾‾ +├─ Article +│ +├─➤ tests/scope/bad/scope.catala_en:14.57-14.58: +│ │ +│ 14 │ definition b under condition not c consequence equals 0 +│ │ ‾ +└─ Article #return code 123# ``` diff --git a/tests/scope/bad/scope_call_duplicate.catala_en b/tests/scope/bad/scope_call_duplicate.catala_en index 900ca3c43..3d91bf35f 100644 --- a/tests/scope/bad/scope_call_duplicate.catala_en +++ b/tests/scope/bad/scope_call_duplicate.catala_en @@ -16,11 +16,14 @@ scope Titi: ```catala-test-inline $ catala dcalc -s Titi -[ERROR] Duplicate definition of scope input variable 'bar' - -┌─⯈ tests/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} - │ ‾‾‾ +┌─[ERROR]─ +│ +│ Duplicate definition of scope input variable 'bar' +│ +├─➤ tests/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} +│ │ ‾‾‾ +└─ #return code 123# ``` diff --git a/tests/scope/bad/scope_call_extra.catala_en b/tests/scope/bad/scope_call_extra.catala_en index 8ecfdb933..910553545 100644 --- a/tests/scope/bad/scope_call_extra.catala_en +++ b/tests/scope/bad/scope_call_extra.catala_en @@ -16,21 +16,22 @@ scope Titi: ```catala-test-inline $ catala dcalc -s Titi -[ERROR] Scope Toto has no input variable biz - -┌─⯈ tests/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/scope/bad/scope_call_extra.catala_en:2.19-2.23: -└─┐ -2 │ declaration scope Toto: - │ ‾‾‾‾ - -Maybe you wanted to write : "bar", -or "baz", -or "foo" +┌─[ERROR]─ +│ +│ Scope Toto has no input variable biz +│ +├─➤ tests/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/scope/bad/scope_call_extra.catala_en:2.19-2.23: +│ │ +│ 2 │ declaration scope Toto: +│ │ ‾‾‾‾ +│ +│ Maybe you wanted to write : "bar", or "baz", or "foo" ? +└─ #return code 123# ``` diff --git a/tests/scope/bad/scope_call_missing.catala_en b/tests/scope/bad/scope_call_missing.catala_en index ae0d7156b..cf540a927 100644 --- a/tests/scope/bad/scope_call_missing.catala_en +++ b/tests/scope/bad/scope_call_missing.catala_en @@ -16,17 +16,20 @@ scope Titi: ```catala-test-inline $ catala dcalc -s Titi -[ERROR] Definition of input variable 'baz' missing in this scope call - -┌─⯈ tests/scope/bad/scope_call_missing.catala_en:14.26-14.57: -└──┐ -14 │ definition fizz equals output of Toto with {--bar: 1 } - │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ - -Declaration of the missing input variable -┌─⯈ tests/scope/bad/scope_call_missing.catala_en:4.16-4.19: -└─┐ -4 │ input output baz content decimal - │ ‾‾‾ +┌─[ERROR]─ +│ +│ Definition of input variable 'baz' missing in this scope call +│ +├─➤ tests/scope/bad/scope_call_missing.catala_en:14.26-14.57: +│ │ +│ 14 │ definition fizz equals output of Toto with {--bar: 1 } +│ │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ +│ +│ Declaration of the missing input variable +├─➤ tests/scope/bad/scope_call_missing.catala_en:4.16-4.19: +│ │ +│ 4 │ input output baz content decimal +│ │ ‾‾‾ +└─ #return code 123# ``` diff --git a/tests/scope/bad/sub_vars_in_sub_var.catala_en b/tests/scope/bad/sub_vars_in_sub_var.catala_en index a1e6f55de..39cf1320d 100644 --- a/tests/scope/bad/sub_vars_in_sub_var.catala_en +++ b/tests/scope/bad/sub_vars_in_sub_var.catala_en @@ -15,13 +15,15 @@ scope B: ```catala-test-inline $ catala test-scope A -[ERROR] The subscope a is used in the definition of its own input a.y - (Catala doesn't support recursion) - -┌─⯈ tests/scope/bad/sub_vars_in_sub_var.catala_en:13.28-13.29: -└──┐ -13 │ definition a.y equals if a.x then 0 else 1 - │ ‾ - └─ Article +┌─[ERROR]─ +│ +│ The subscope a is used in the definition of its own input a.y +│ (Catala doesn't support recursion) +│ +├─➤ tests/scope/bad/sub_vars_in_sub_var.catala_en:13.28-13.29: +│ │ +│ 13 │ definition a.y equals if a.x then 0 else 1 +│ │ ‾ +└─ Article #return code 123# ``` diff --git a/tests/scope/good/191_fix_record_name_confusion.catala_en b/tests/scope/good/191_fix_record_name_confusion.catala_en index ad7070ba6..144f82180 100644 --- a/tests/scope/good/191_fix_record_name_confusion.catala_en +++ b/tests/scope/good/191_fix_record_name_confusion.catala_en @@ -19,8 +19,12 @@ scope ScopeB: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline diff --git a/tests/scope/good/grand_parent_caller.catala_en b/tests/scope/good/grand_parent_caller.catala_en index b1d907e4b..985f834c7 100644 --- a/tests/scope/good/grand_parent_caller.catala_en +++ b/tests/scope/good/grand_parent_caller.catala_en @@ -33,26 +33,36 @@ scope C: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope A -[RESULT] Computation successful! Results: -[RESULT] x = 0 +┌─[RESULT]─ +│Computation successful! Results: +│x = 0 +└─ ``` ```catala-test-inline $ catala test-scope B -[RESULT] Computation successful! Results: -[RESULT] y1 = 1 -[RESULT] y2 = 1 +┌─[RESULT]─ +│Computation successful! Results: +│y1 = 1 +│y2 = 1 +└─ ``` ```catala-test-inline $ catala test-scope C -[RESULT] Computation successful! Results: -[RESULT] z1 = 2 -[RESULT] z2 = 2 +┌─[RESULT]─ +│Computation successful! Results: +│z1 = 2 +│z2 = 2 +└─ ``` diff --git a/tests/scope/good/local-capture-subscope.catala_en b/tests/scope/good/local-capture-subscope.catala_en index f74a2ea70..9b69abf33 100644 --- a/tests/scope/good/local-capture-subscope.catala_en +++ b/tests/scope/good/local-capture-subscope.catala_en @@ -20,15 +20,20 @@ scope S: ```catala-test-inline $ catala test-scope S -[WARNING] Unused varible: a does not contribute to computing any of scope S - outputs. Did you forget something? - -┌─⯈ tests/scope/good/local-capture-subscope.catala_en:7.3-7.4: -└─┐ -7 │ a scope A - │ ‾ -[RESULT] Computation successful! Results: -[RESULT] so = 42 +┌─[WARNING]─ +│ +│ Unused varible: a does not contribute to computing any of scope S outputs. +│ Did you forget something? +│ +├─➤ tests/scope/good/local-capture-subscope.catala_en:7.3-7.4: +│ │ +│ 7 │ a scope A +│ │ ‾ +└─ +┌─[RESULT]─ +│Computation successful! Results: +│so = 42 +└─ ``` diff --git a/tests/scope/good/nothing.catala_en b/tests/scope/good/nothing.catala_en index f4643a8a9..2984aad66 100644 --- a/tests/scope/good/nothing.catala_en +++ b/tests/scope/good/nothing.catala_en @@ -9,28 +9,36 @@ declaration scope Foo2: ```catala-test-inline $ catala Typecheck --check-invariants -[WARNING] In scope "Foo2", the variable "bar" is declared but never defined; - did you forget something? - -┌─⯈ tests/scope/good/nothing.catala_en:5.10-5.13: -└─┐ -5 │ output bar content integer - │ ‾‾‾ - └─ Test -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[WARNING]─ +│ +│ In scope "Foo2", the variable "bar" is declared but never defined; +│ did you forget something? +│ +├─➤ tests/scope/good/nothing.catala_en:5.10-5.13: +│ │ +│ 5 │ output bar content integer +│ │ ‾‾‾ +└─ Test +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```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/scope/good/nothing.catala_en:5.10-5.13: -└─┐ -5 │ output bar content integer - │ ‾‾‾ - └─ Test +┌─[WARNING]─ +│ +│ In scope "Foo2", the variable "bar" is declared but never defined; +│ did you forget something? +│ +├─➤ tests/scope/good/nothing.catala_en:5.10-5.13: +│ │ +│ 5 │ output bar content integer +│ │ ‾‾‾ +└─ Test let Foo2_3 (Foo2_in_2: Foo2_in) = decl temp_bar_4 : integer; fatal NoValue; diff --git a/tests/scope/good/out_sub_scope.catala_en b/tests/scope/good/out_sub_scope.catala_en index bfb534c7b..b250dd7ca 100644 --- a/tests/scope/good/out_sub_scope.catala_en +++ b/tests/scope/good/out_sub_scope.catala_en @@ -21,7 +21,9 @@ scope B: ```catala-test-inline $ catala test-scope B -[RESULT] Computation successful! Results: -[RESULT] a = A { -- o: 99 -- io: 100 } -[RESULT] b = 99 +┌─[RESULT]─ +│Computation successful! Results: +│a = A { -- o: 99 -- io: 100 } +│b = 99 +└─ ``` diff --git a/tests/scope/good/scope_call.catala_en b/tests/scope/good/scope_call.catala_en index 51a107f53..fd71ad4f3 100644 --- a/tests/scope/good/scope_call.catala_en +++ b/tests/scope/good/scope_call.catala_en @@ -24,12 +24,18 @@ scope Foo: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope Foo -[RESULT] Computation successful! Results: -[RESULT] example = -7 +┌─[RESULT]─ +│Computation successful! Results: +│example = -7 +└─ ``` diff --git a/tests/scope/good/scope_call2.catala_en b/tests/scope/good/scope_call2.catala_en index e92150b35..8c077ff96 100644 --- a/tests/scope/good/scope_call2.catala_en +++ b/tests/scope/good/scope_call2.catala_en @@ -22,27 +22,39 @@ scope Titi: ```catala-test-inline $ catala Typecheck --check-invariants -[WARNING] Unused varible: toto does not contribute to computing any of scope - Titi outputs. Did you forget something? - -┌─⯈ tests/scope/good/scope_call2.catala_en:13.3-13.7: -└──┐ -13 │ toto scope Toto - │ ‾‾‾‾ -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[WARNING]─ +│ +│ Unused varible: toto does not contribute to computing any of scope Titi +│ outputs. Did you forget something? +│ +├─➤ tests/scope/good/scope_call2.catala_en:13.3-13.7: +│ │ +│ 13 │ toto scope Toto +│ │ ‾‾‾‾ +└─ +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope Titi -[WARNING] Unused varible: toto does not contribute to computing any of scope - Titi outputs. Did you forget something? - -┌─⯈ tests/scope/good/scope_call2.catala_en:13.3-13.7: -└──┐ -13 │ toto scope Toto - │ ‾‾‾‾ -[RESULT] Computation successful! Results: -[RESULT] fizz = Toto { -- foo: 1,213 } -[RESULT] fuzz = Toto { -- foo: 1,323 } +┌─[WARNING]─ +│ +│ Unused varible: toto does not contribute to computing any of scope Titi +│ outputs. Did you forget something? +│ +├─➤ tests/scope/good/scope_call2.catala_en:13.3-13.7: +│ │ +│ 13 │ toto scope Toto +│ │ ‾‾‾‾ +└─ +┌─[RESULT]─ +│Computation successful! Results: +│fizz = Toto { -- foo: 1,213 } +│fuzz = Toto { -- foo: 1,323 } +└─ ``` diff --git a/tests/scope/good/scope_call3.catala_en b/tests/scope/good/scope_call3.catala_en index 3176d9ad1..770e71e4f 100644 --- a/tests/scope/good/scope_call3.catala_en +++ b/tests/scope/good/scope_call3.catala_en @@ -20,8 +20,12 @@ scope RentComputation: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline @@ -42,15 +46,15 @@ $ catala Interpret -t -s HousingComputation --debug [DEBUG] Starting interpretation... [LOG] ≔ HousingComputation.f: λ (x_67: integer) → error_empty ⟨ ⟨#{☛ } true ⊢ ⟨(let result_68 : RentComputation = (#{→ RentComputation.direct} (λ (RentComputation_in_69: RentComputation_in) → let g_70 : integer → integer = #{≔ RentComputation.g} (λ (x1_71: integer) → error_empty ⟨ ⟨#{☛ } true ⊢ ⟨x1_71 +! 1⟩⟩ | false ⊢ ∅ ⟩) in let f_72 : integer → integer = #{≔ RentComputation.f} (λ (x1_73: integer) → error_empty ⟨ ⟨#{☛ } true ⊢ ⟨#{← RentComputation.g} #{≔ RentComputation.g.output} (#{→ RentComputation.g} g_70) #{≔ RentComputation.g.input0} (x1_73 +! 1)⟩⟩ | false ⊢ ∅ ⟩) in { RentComputation f = f_72; })) #{≔ RentComputation.direct.input} {RentComputation_in} in let result1_74 : RentComputation = { RentComputation f = λ (param0_75: integer) → #{← RentComputation.f} #{≔ RentComputation.f.output} (#{→ RentComputation.f} result_68.f) #{≔ RentComputation.f.input0} param0_75; } in #{← RentComputation.direct} #{≔ RentComputation.direct.output} if #{☛ RentComputation.direct.output} true then result1_74 else result1_74).f x_67⟩⟩ | false ⊢ ∅ ⟩ [LOG] ☛ Definition applied: - ┌─⯈ tests/scope/good/scope_call3.catala_en:8.14-8.20: - └─┐ + ─➤ tests/scope/good/scope_call3.catala_en:8.14-8.20: + │ 8 │ definition result equals f of 1 │ ‾‾‾‾‾‾ [LOG] → HousingComputation.f [LOG] ≔ HousingComputation.f.input0: 1 [LOG] ☛ Definition applied: - ┌─⯈ tests/scope/good/scope_call3.catala_en:7.14-7.15: - └─┐ + ─➤ tests/scope/good/scope_call3.catala_en:7.14-7.15: + │ 7 │ definition f of x equals (output of RentComputation).f of x │ ‾ [LOG] → RentComputation.direct @@ -58,8 +62,8 @@ $ catala Interpret -t -s HousingComputation --debug [LOG] ≔ RentComputation.g: λ (x_76: integer) → error_empty ⟨ ⟨#{☛ } true ⊢ ⟨x_76 +! 1⟩⟩ | false ⊢ ∅ ⟩ [LOG] ≔ RentComputation.f: λ (x_77: integer) → error_empty ⟨ ⟨#{☛ } true ⊢ ⟨#{← RentComputation.g} #{≔ RentComputation.g.output} (#{→ RentComputation.g} (λ (x1_78: integer) → error_empty ⟨ ⟨#{☛ } true ⊢ ⟨x1_78 +! 1⟩⟩ | false ⊢ ∅ ⟩)) #{≔ RentComputation.g.input0} (x_77 +! 1)⟩⟩ | false ⊢ ∅ ⟩ [LOG] ☛ Definition applied: - ┌─⯈ tests/scope/good/scope_call3.catala_en:7.29-7.54: - └─┐ + ─➤ tests/scope/good/scope_call3.catala_en:7.29-7.54: + │ 7 │ definition f of x equals (output of RentComputation).f of x │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ [LOG] ≔ RentComputation.direct.output: { RentComputation f = λ (param0_79: integer) → #{← RentComputation.f} #{≔ RentComputation.f.output} (#{→ RentComputation.f} { RentComputation f = λ (x_80: integer) → error_empty ⟨ ⟨#{☛ } true ⊢ ⟨#{← RentComputation.g} #{≔ RentComputation.g.output} (#{→ RentComputation.g} (λ (x1_81: integer) → error_empty ⟨ ⟨#{☛ } true ⊢ ⟨x1_81 +! 1⟩⟩ | false ⊢ ∅ ⟩)) #{≔ RentComputation.g.input0} (x_80 +! 1)⟩⟩ | false ⊢ ∅ ⟩; }.f) #{≔ RentComputation.f.input0} param0_79; } @@ -67,15 +71,15 @@ $ catala Interpret -t -s HousingComputation --debug [LOG] → RentComputation.f [LOG] ≔ RentComputation.f.input0: 1 [LOG] ☛ Definition applied: - ┌─⯈ tests/scope/good/scope_call3.catala_en:16.14-16.15: - └──┐ + ─➤ tests/scope/good/scope_call3.catala_en:16.14-16.15: + │ 16 │ definition f of x equals g of (x + 1) │ ‾ [LOG] → RentComputation.g [LOG] ≔ RentComputation.g.input0: 2 [LOG] ☛ Definition applied: - ┌─⯈ tests/scope/good/scope_call3.catala_en:15.14-15.15: - └──┐ + ─➤ tests/scope/good/scope_call3.catala_en:15.14-15.15: + │ 15 │ definition g of x equals x + 1 │ ‾ [LOG] ≔ RentComputation.g.output: 3 @@ -86,30 +90,31 @@ $ catala Interpret -t -s HousingComputation --debug [LOG] ← HousingComputation.f [LOG] ≔ HousingComputation.result: 3 [DEBUG] End of interpretation -[RESULT] Computation successful! Results: -[RESULT] -f = λ (x: integer) → - error_empty - ⟨ ⟨true - ⊢ ⟨(let result : RentComputation = - (λ (RentComputation_in: RentComputation_in) → - let g : integer → integer = - λ (x1: integer) → - error_empty ⟨ ⟨true ⊢ ⟨x1 + 1⟩⟩ | false ⊢ ∅ ⟩ - in - let f : integer → integer = - λ (x1: integer) → - error_empty ⟨ ⟨true ⊢ ⟨g (x1 + 1)⟩⟩ | false ⊢ ∅ ⟩ - in - { RentComputation f = f; }) - {RentComputation_in} - in - let result1 : RentComputation = - { RentComputation f = λ (param0: integer) → result.f param0; } - in - if true then result1 else result1). - f - x⟩⟩ - | false ⊢ ∅ ⟩ -[RESULT] result = 3 +┌─[RESULT]─ +│Computation successful! Results: +│f = λ (x: integer) → +│ error_empty +│ ⟨ ⟨true +│ ⊢ ⟨(let result : RentComputation = +│ (λ (RentComputation_in: RentComputation_in) → +│ let g : integer → integer = +│ λ (x1: integer) → +│ error_empty ⟨ ⟨true ⊢ ⟨x1 + 1⟩⟩ | false ⊢ ∅ ⟩ +│ in +│ let f : integer → integer = +│ λ (x1: integer) → +│ error_empty ⟨ ⟨true ⊢ ⟨g (x1 + 1)⟩⟩ | false ⊢ ∅ ⟩ +│ in +│ { RentComputation f = f; }) +│ {RentComputation_in} +│ in +│ let result1 : RentComputation = +│ { RentComputation f = λ (param0: integer) → result.f param0; } +│ in +│ if true then result1 else result1). +│ f +│ x⟩⟩ +│ | false ⊢ ∅ ⟩ +│result = 3 +└─ ``` diff --git a/tests/scope/good/scope_call4.catala_en b/tests/scope/good/scope_call4.catala_en index 628585ed7..9d60e1508 100644 --- a/tests/scope/good/scope_call4.catala_en +++ b/tests/scope/good/scope_call4.catala_en @@ -26,8 +26,12 @@ scope RentComputation: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline @@ -47,21 +51,21 @@ $ catala interpret -s RentComputation --debug [DEBUG] Typechecking again... [DEBUG] Starting interpretation... [DEBUG] End of interpretation -[RESULT] Computation successful! Results: -[RESULT] -f1 = λ (x: integer) → - error_empty - ⟨ ⟨true - ⊢ ⟨let x1 : integer = x + 1 in - error_empty ⟨ ⟨true ⊢ ⟨x1 + 1⟩⟩ | false ⊢ ∅ ⟩⟩⟩ - | false ⊢ ∅ ⟩ -[RESULT] -f2 = λ (x: integer) → - error_empty - ⟨ ⟨true - ⊢ ⟨let x1 : integer = x + 1 in - error_empty ⟨ ⟨true ⊢ ⟨x1 + 1⟩⟩ | false ⊢ ∅ ⟩⟩⟩ - | false ⊢ ∅ ⟩ +┌─[RESULT]─ +│Computation successful! Results: +│f1 = λ (x: integer) → +│ error_empty +│ ⟨ ⟨true +│ ⊢ ⟨let x1 : integer = x + 1 in +│ error_empty ⟨ ⟨true ⊢ ⟨x1 + 1⟩⟩ | false ⊢ ∅ ⟩⟩⟩ +│ | false ⊢ ∅ ⟩ +│f2 = λ (x: integer) → +│ error_empty +│ ⟨ ⟨true +│ ⊢ ⟨let x1 : integer = x + 1 in +│ error_empty ⟨ ⟨true ⊢ ⟨x1 + 1⟩⟩ | false ⊢ ∅ ⟩⟩⟩ +│ | false ⊢ ∅ ⟩ +└─ ``` ```catala-test-inline @@ -85,9 +89,11 @@ $ catala Interpret --lcalc -s RentComputation --avoid-exceptions --optimize --de [DEBUG] Retyping lambda calculus... [DEBUG] Starting interpretation... [DEBUG] End of interpretation -[RESULT] Computation successful! Results: -[RESULT] f1 = λ (x: integer) → let x1 : integer = x + 1 in - ((x1 + 1)) -[RESULT] f2 = λ (x: integer) → let x1 : integer = x + 1 in - ((x1 + 1)) +┌─[RESULT]─ +│Computation successful! Results: +│f1 = λ (x: integer) → let x1 : integer = x + 1 in +│ ((x1 + 1)) +│f2 = λ (x: integer) → let x1 : integer = x + 1 in +│ ((x1 + 1)) +└─ ``` diff --git a/tests/scope/good/scope_struct.catala_en b/tests/scope/good/scope_struct.catala_en index 639b525b1..623051f2a 100644 --- a/tests/scope/good/scope_struct.catala_en +++ b/tests/scope/good/scope_struct.catala_en @@ -25,12 +25,18 @@ scope Foo: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope Foo -[RESULT] Computation successful! Results: -[RESULT] example = SubFoo { -- z1: 4 -- z2: 0 } +┌─[RESULT]─ +│Computation successful! Results: +│example = SubFoo { -- z1: 4 -- z2: 0 } +└─ ``` diff --git a/tests/scope/good/simple.catala_en b/tests/scope/good/simple.catala_en index 9907718b0..4d35fa9e4 100644 --- a/tests/scope/good/simple.catala_en +++ b/tests/scope/good/simple.catala_en @@ -12,8 +12,12 @@ scope Foo: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline diff --git a/tests/scope/good/sub_scope.catala_en b/tests/scope/good/sub_scope.catala_en index 186c8c04b..711286f09 100644 --- a/tests/scope/good/sub_scope.catala_en +++ b/tests/scope/good/sub_scope.catala_en @@ -27,21 +27,29 @@ scope B: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope A -[RESULT] Computation successful! Results: -[RESULT] a = -1 -[RESULT] a_base = 1 -[RESULT] b = false +┌─[RESULT]─ +│Computation successful! Results: +│a = -1 +│a_base = 1 +│b = false +└─ ``` ```catala-test-inline $ catala test-scope B -[RESULT] Computation successful! Results: -[RESULT] a = 42 -[RESULT] b = true +┌─[RESULT]─ +│Computation successful! Results: +│a = 42 +│b = true +└─ ``` diff --git a/tests/scope/good/sub_sub_scope.catala_en b/tests/scope/good/sub_sub_scope.catala_en index f9dacf518..f94a4bf9a 100644 --- a/tests/scope/good/sub_sub_scope.catala_en +++ b/tests/scope/good/sub_sub_scope.catala_en @@ -34,89 +34,115 @@ scope C: ```catala-test-inline $ catala Typecheck --check-invariants -[WARNING] Unused varible: a does not contribute to computing any of scope C - outputs. Did you forget something? - -┌─⯈ tests/scope/good/sub_sub_scope.catala_en:14.3-14.4: -└──┐ -14 │ a scope A - │ ‾ - └─ Article -[WARNING] Unused varible: b does not contribute to computing any of scope C - outputs. Did you forget something? - -┌─⯈ tests/scope/good/sub_sub_scope.catala_en:15.3-15.4: -└──┐ -15 │ b scope B - │ ‾ - └─ Article -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[WARNING]─ +│ +│ Unused varible: a does not contribute to computing any of scope C outputs. +│ Did you forget something? +│ +├─➤ tests/scope/good/sub_sub_scope.catala_en:14.3-14.4: +│ │ +│ 14 │ a scope A +│ │ ‾ +└─ Article +┌─[WARNING]─ +│ +│ Unused varible: b does not contribute to computing any of scope C outputs. +│ Did you forget something? +│ +├─➤ tests/scope/good/sub_sub_scope.catala_en:15.3-15.4: +│ │ +│ 15 │ b scope B +│ │ ‾ +└─ Article +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope A -[WARNING] Unused varible: a does not contribute to computing any of scope C - outputs. Did you forget something? - -┌─⯈ tests/scope/good/sub_sub_scope.catala_en:14.3-14.4: -└──┐ -14 │ a scope A - │ ‾ - └─ Article -[WARNING] Unused varible: b does not contribute to computing any of scope C - outputs. Did you forget something? - -┌─⯈ tests/scope/good/sub_sub_scope.catala_en:15.3-15.4: -└──┐ -15 │ b scope B - │ ‾ - └─ Article -[RESULT] Computation successful! Results: -[RESULT] u = true -[RESULT] x = 0 +┌─[WARNING]─ +│ +│ Unused varible: a does not contribute to computing any of scope C outputs. +│ Did you forget something? +│ +├─➤ tests/scope/good/sub_sub_scope.catala_en:14.3-14.4: +│ │ +│ 14 │ a scope A +│ │ ‾ +└─ Article +┌─[WARNING]─ +│ +│ Unused varible: b does not contribute to computing any of scope C outputs. +│ Did you forget something? +│ +├─➤ tests/scope/good/sub_sub_scope.catala_en:15.3-15.4: +│ │ +│ 15 │ b scope B +│ │ ‾ +└─ Article +┌─[RESULT]─ +│Computation successful! Results: +│u = true +│x = 0 +└─ ``` ```catala-test-inline $ catala test-scope B -[WARNING] Unused varible: a does not contribute to computing any of scope C - outputs. Did you forget something? - -┌─⯈ tests/scope/good/sub_sub_scope.catala_en:14.3-14.4: -└──┐ -14 │ a scope A - │ ‾ - └─ Article -[WARNING] Unused varible: b does not contribute to computing any of scope C - outputs. Did you forget something? - -┌─⯈ tests/scope/good/sub_sub_scope.catala_en:15.3-15.4: -└──┐ -15 │ b scope B - │ ‾ - └─ Article -[RESULT] Computation successful! Results: -[RESULT] y = 1 +┌─[WARNING]─ +│ +│ Unused varible: a does not contribute to computing any of scope C outputs. +│ Did you forget something? +│ +├─➤ tests/scope/good/sub_sub_scope.catala_en:14.3-14.4: +│ │ +│ 14 │ a scope A +│ │ ‾ +└─ Article +┌─[WARNING]─ +│ +│ Unused varible: b does not contribute to computing any of scope C outputs. +│ Did you forget something? +│ +├─➤ tests/scope/good/sub_sub_scope.catala_en:15.3-15.4: +│ │ +│ 15 │ b scope B +│ │ ‾ +└─ Article +┌─[RESULT]─ +│Computation successful! Results: +│y = 1 +└─ ``` ```catala-test-inline $ catala test-scope C -[WARNING] Unused varible: a does not contribute to computing any of scope C - outputs. Did you forget something? - -┌─⯈ tests/scope/good/sub_sub_scope.catala_en:14.3-14.4: -└──┐ -14 │ a scope A - │ ‾ - └─ Article -[WARNING] Unused varible: b does not contribute to computing any of scope C - outputs. Did you forget something? - -┌─⯈ tests/scope/good/sub_sub_scope.catala_en:15.3-15.4: -└──┐ -15 │ b scope B - │ ‾ - └─ Article -[RESULT] Computation successful! Results: -[RESULT] z = 2 +┌─[WARNING]─ +│ +│ Unused varible: a does not contribute to computing any of scope C outputs. +│ Did you forget something? +│ +├─➤ tests/scope/good/sub_sub_scope.catala_en:14.3-14.4: +│ │ +│ 14 │ a scope A +│ │ ‾ +└─ Article +┌─[WARNING]─ +│ +│ Unused varible: b does not contribute to computing any of scope C outputs. +│ Did you forget something? +│ +├─➤ tests/scope/good/sub_sub_scope.catala_en:15.3-15.4: +│ │ +│ 15 │ b scope B +│ │ ‾ +└─ Article +┌─[RESULT]─ +│Computation successful! Results: +│z = 2 +└─ ``` diff --git a/tests/scope/good/subscope_function_arg_not_defined.catala_en b/tests/scope/good/subscope_function_arg_not_defined.catala_en index d0ab0b165..ec76c7c25 100644 --- a/tests/scope/good/subscope_function_arg_not_defined.catala_en +++ b/tests/scope/good/subscope_function_arg_not_defined.catala_en @@ -21,12 +21,18 @@ scope Caller: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope Caller -[RESULT] Computation successful! Results: -[RESULT] y = 1 +┌─[RESULT]─ +│Computation successful! Results: +│y = 1 +└─ ``` diff --git a/tests/scope/good/subscope_function_arg_not_defined2.catala_en b/tests/scope/good/subscope_function_arg_not_defined2.catala_en index 30cb9d328..3338e4c95 100644 --- a/tests/scope/good/subscope_function_arg_not_defined2.catala_en +++ b/tests/scope/good/subscope_function_arg_not_defined2.catala_en @@ -23,11 +23,17 @@ scope Caller: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope Caller -[RESULT] Computation successful! +┌─[RESULT]─ +│Computation successful! +└─ ``` diff --git a/tests/struct/bad/bug_107.catala_en b/tests/struct/bad/bug_107.catala_en index 8b04b6af5..e97950997 100644 --- a/tests/struct/bad/bug_107.catala_en +++ b/tests/struct/bad/bug_107.catala_en @@ -18,20 +18,22 @@ scope A: ```catala-test-inline $ catala test-scope A -[ERROR] struct name "S" already defined - -First definition: -┌─⯈ tests/struct/bad/bug_107.catala_en:4.23-4.24: -└─┐ -4 │ declaration structure S: - │ ‾ - └─ https://github.com/CatalaLang/catala/issues/107 - -Second definition: -┌─⯈ tests/struct/bad/bug_107.catala_en:8.23-8.24: -└─┐ -8 │ declaration structure S: - │ ‾ - └─ https://github.com/CatalaLang/catala/issues/107 +┌─[ERROR]─ +│ +│ struct name "S" already defined +│ +│ First definition: +├─➤ tests/struct/bad/bug_107.catala_en:4.23-4.24: +│ │ +│ 4 │ declaration structure S: +│ │ ‾ +├─ https://github.com/CatalaLang/catala/issues/107 +│ +│ Second definition: +├─➤ tests/struct/bad/bug_107.catala_en:8.23-8.24: +│ │ +│ 8 │ declaration structure S: +│ │ ‾ +└─ https://github.com/CatalaLang/catala/issues/107 #return code 123# ``` diff --git a/tests/struct/bad/empty_struct.catala_en b/tests/struct/bad/empty_struct.catala_en index de21db3e5..c305d0e07 100644 --- a/tests/struct/bad/empty_struct.catala_en +++ b/tests/struct/bad/empty_struct.catala_en @@ -9,13 +9,15 @@ 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. - -┌─⯈ tests/struct/bad/empty_struct.catala_en:4.23-4.26: -└─┐ -4 │ declaration structure Foo: - │ ‾‾‾ - └─ Test +┌─[ERROR]─ +│ +│ The struct Foo does not have any fields; +│ give it some for Catala to be able to accept it. +│ +├─➤ tests/struct/bad/empty_struct.catala_en:4.23-4.26: +│ │ +│ 4 │ declaration structure Foo: +│ │ ‾‾‾ +└─ Test #return code 123# ``` diff --git a/tests/struct/bad/nested.catala_en b/tests/struct/bad/nested.catala_en index f0bebd380..21602280e 100644 --- a/tests/struct/bad/nested.catala_en +++ b/tests/struct/bad/nested.catala_en @@ -14,21 +14,25 @@ scope A: ```catala-test-inline $ catala test-scope A -[WARNING] The constructor "Rec" of enumeration "E" is never used; - maybe it's unnecessary? - -┌─⯈ tests/struct/bad/nested.catala_en:6.6-6.9: -└─┐ -6 │ -- Rec content E - │ ‾‾‾ - └─ Article -[ERROR] The type E is defined using itself, which is not supported - (Catala does not allow recursive types) - -┌─⯈ tests/struct/bad/nested.catala_en:6.18-6.19: -└─┐ -6 │ -- Rec content E - │ ‾ - └─ Article +┌─[WARNING]─ +│ +│ The constructor "Rec" of enumeration "E" is never used; +│ maybe it's unnecessary? +│ +├─➤ tests/struct/bad/nested.catala_en:6.6-6.9: +│ │ +│ 6 │ -- Rec content E +│ │ ‾‾‾ +└─ Article +┌─[ERROR]─ +│ +│ The type E is defined using itself, which is not supported +│ (Catala does not allow recursive types) +│ +├─➤ tests/struct/bad/nested.catala_en:6.18-6.19: +│ │ +│ 6 │ -- Rec content E +│ │ ‾ +└─ Article #return code 123# ``` diff --git a/tests/struct/bad/nested2.catala_en b/tests/struct/bad/nested2.catala_en index d765a7abc..06c890e63 100644 --- a/tests/struct/bad/nested2.catala_en +++ b/tests/struct/bad/nested2.catala_en @@ -15,56 +15,64 @@ declaration scope A: ```catala-test-inline $ catala test-scope A -[WARNING] In scope "A", the variable "x" is declared but never defined; - did you forget something? - -┌─⯈ tests/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/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/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/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/struct/bad/nested2.catala_en:10.20-10.21: -└──┐ -10 │ -- Case2 content S - │ ‾ - └─ Article - -Cycle type E, declared: -┌─⯈ tests/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/struct/bad/nested2.catala_en:5.18-5.19: -└─┐ -5 │ data x content E - │ ‾ - └─ Article +┌─[WARNING]─ +│ +│ In scope "A", the variable "x" is declared but never defined; +│ did you forget something? +│ +├─➤ tests/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/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/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/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/struct/bad/nested2.catala_en:10.20-10.21: +│ │ +│ 10 │ -- Case2 content S +│ │ ‾ +├─ Article +│ +│ Cycle type E, declared: +├─➤ tests/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/struct/bad/nested2.catala_en:5.18-5.19: +│ │ +│ 5 │ data x content E +│ │ ‾ +└─ Article #return code 123# ``` diff --git a/tests/struct/bad/nonexisting_struct.catala_en b/tests/struct/bad/nonexisting_struct.catala_en index 223e29694..6b37fc8fa 100644 --- a/tests/struct/bad/nonexisting_struct.catala_en +++ b/tests/struct/bad/nonexisting_struct.catala_en @@ -15,12 +15,14 @@ scope A: ```catala-test-inline $ catala test-scope A -[ERROR] No struct named Fo found - -┌─⯈ tests/struct/bad/nonexisting_struct.catala_en:13.25-13.27: -└──┐ -13 │ definition y equals x.Fo.f - │ ‾‾ - └─ Article +┌─[ERROR]─ +│ +│ No struct named Fo found +│ +├─➤ tests/struct/bad/nonexisting_struct.catala_en:13.25-13.27: +│ │ +│ 13 │ definition y equals x.Fo.f +│ │ ‾‾ +└─ Article #return code 123# ``` diff --git a/tests/struct/bad/struct_update.catala_en b/tests/struct/bad/struct_update.catala_en index 95e775a6e..32bf879a4 100644 --- a/tests/struct/bad/struct_update.catala_en +++ b/tests/struct/bad/struct_update.catala_en @@ -20,17 +20,20 @@ scope S: ```catala-test-inline $ catala test-scope S -[ERROR] Field flx1 does not belong to structure Str - -┌─⯈ tests/struct/bad/struct_update.catala_en:17.60-17.62: -└──┐ -17 │ definition s1 equals s0 but replace { --fld1: 0 -- flx1: 99 } - │ ‾‾ - -Declaration of structure Str -┌─⯈ tests/struct/bad/struct_update.catala_en:2.23-2.26: -└─┐ -2 │ declaration structure Str: - │ ‾‾‾ +┌─[ERROR]─ +│ +│ Field flx1 does not belong to structure Str +│ +├─➤ tests/struct/bad/struct_update.catala_en:17.60-17.62: +│ │ +│ 17 │ definition s1 equals s0 but replace { --fld1: 0 -- flx1: 99 } +│ │ ‾‾ +│ +│ Declaration of structure Str +├─➤ tests/struct/bad/struct_update.catala_en:2.23-2.26: +│ │ +│ 2 │ declaration structure Str: +│ │ ‾‾‾ +└─ #return code 123# ``` diff --git a/tests/struct/bad/wrong_qualified_field.catala_en b/tests/struct/bad/wrong_qualified_field.catala_en index c1dc455b1..ceff51b66 100644 --- a/tests/struct/bad/wrong_qualified_field.catala_en +++ b/tests/struct/bad/wrong_qualified_field.catala_en @@ -19,12 +19,14 @@ scope A: ```catala-test-inline $ catala test-scope A -[ERROR] Field "g" does not belong to structure "Foo" (however, structure - "Bar" defines it) -┌─⯈ tests/struct/bad/wrong_qualified_field.catala_en:17.23-17.30: -└──┐ -17 │ definition y equals x.Foo.g - │ ‾‾‾‾‾‾‾ - └─ Article +┌─[ERROR]─ +│ +│ Field "g" does not belong to structure "Foo" (however, structure "Bar" +│ defines it) +├─➤ tests/struct/bad/wrong_qualified_field.catala_en:17.23-17.30: +│ │ +│17 │ definition y equals x.Foo.g +│ │ ‾‾‾‾‾‾‾ +└─ Article #return code 123# ``` diff --git a/tests/struct/good/ambiguous_fields.catala_en b/tests/struct/good/ambiguous_fields.catala_en index e866c1230..854ea3cff 100644 --- a/tests/struct/good/ambiguous_fields.catala_en +++ b/tests/struct/good/ambiguous_fields.catala_en @@ -20,26 +20,36 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants -[WARNING] The structure "Bar" is never used; maybe it's unnecessary? - -┌─⯈ tests/struct/good/ambiguous_fields.catala_en:7.23-7.26: -└─┐ -7 │ declaration structure Bar: - │ ‾‾‾ - └─ Article -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[WARNING]─ +│ +│ The structure "Bar" is never used; maybe it's unnecessary? +│ +├─➤ tests/struct/good/ambiguous_fields.catala_en:7.23-7.26: +│ │ +│ 7 │ declaration structure Bar: +│ │ ‾‾‾ +└─ Article +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope A -[WARNING] The structure "Bar" is never used; maybe it's unnecessary? - -┌─⯈ tests/struct/good/ambiguous_fields.catala_en:7.23-7.26: -└─┐ -7 │ declaration structure Bar: - │ ‾‾‾ - └─ Article -[RESULT] Computation successful! Results: -[RESULT] y = 1 +┌─[WARNING]─ +│ +│ The structure "Bar" is never used; maybe it's unnecessary? +│ +├─➤ tests/struct/good/ambiguous_fields.catala_en:7.23-7.26: +│ │ +│ 7 │ declaration structure Bar: +│ │ ‾‾‾ +└─ Article +┌─[RESULT]─ +│Computation successful! Results: +│y = 1 +└─ ``` diff --git a/tests/struct/good/nested3.catala_en b/tests/struct/good/nested3.catala_en index 3a3dca5ea..03b577c20 100644 --- a/tests/struct/good/nested3.catala_en +++ b/tests/struct/good/nested3.catala_en @@ -38,21 +38,27 @@ scope B: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope A -[RESULT] Computation successful! Results: -[RESULT] -t = T { -- a: S { -- x: 0 -- y: false } -- b: S { -- x: 1 -- y: true } } +┌─[RESULT]─ +│Computation successful! Results: +│t = T { -- a: S { -- x: 0 -- y: false } -- b: S { -- x: 1 -- y: true } } +└─ ``` ```catala-test-inline $ catala test-scope B -[RESULT] Computation successful! Results: -[RESULT] out = 1 -[RESULT] -t = T { -- a: S { -- x: 0 -- y: false } -- b: S { -- x: 1 -- y: true } } +┌─[RESULT]─ +│Computation successful! Results: +│out = 1 +│t = T { -- a: S { -- x: 0 -- y: false } -- b: S { -- x: 1 -- y: true } } +└─ ``` diff --git a/tests/struct/good/same_name_fields.catala_en b/tests/struct/good/same_name_fields.catala_en index dbef5f4eb..ec66e742e 100644 --- a/tests/struct/good/same_name_fields.catala_en +++ b/tests/struct/good/same_name_fields.catala_en @@ -20,27 +20,37 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants -[WARNING] The structure "Bar" is never used; maybe it's unnecessary? - -┌─⯈ tests/struct/good/same_name_fields.catala_en:7.23-7.26: -└─┐ -7 │ declaration structure Bar: - │ ‾‾‾ - └─ Article -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[WARNING]─ +│ +│ The structure "Bar" is never used; maybe it's unnecessary? +│ +├─➤ tests/struct/good/same_name_fields.catala_en:7.23-7.26: +│ │ +│ 7 │ declaration structure Bar: +│ │ ‾‾‾ +└─ Article +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope A -[WARNING] The structure "Bar" is never used; maybe it's unnecessary? - -┌─⯈ tests/struct/good/same_name_fields.catala_en:7.23-7.26: -└─┐ -7 │ declaration structure Bar: - │ ‾‾‾ - └─ Article -[RESULT] Computation successful! Results: -[RESULT] x = Foo { -- f: 1 } -[RESULT] y = 1 +┌─[WARNING]─ +│ +│ The structure "Bar" is never used; maybe it's unnecessary? +│ +├─➤ tests/struct/good/same_name_fields.catala_en:7.23-7.26: +│ │ +│ 7 │ declaration structure Bar: +│ │ ‾‾‾ +└─ Article +┌─[RESULT]─ +│Computation successful! Results: +│x = Foo { -- f: 1 } +│y = 1 +└─ ``` diff --git a/tests/struct/good/simple.catala_en b/tests/struct/good/simple.catala_en index 7dab98f3f..7dfd48b4f 100644 --- a/tests/struct/good/simple.catala_en +++ b/tests/struct/good/simple.catala_en @@ -21,13 +21,19 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope A -[RESULT] Computation successful! Results: -[RESULT] s = S { -- x: 1 -- y: 2 } -[RESULT] z = 3 +┌─[RESULT]─ +│Computation successful! Results: +│s = S { -- x: 1 -- y: 2 } +│z = 3 +└─ ``` diff --git a/tests/struct/good/struct_update.catala_en b/tests/struct/good/struct_update.catala_en index c0df02a3c..ba0bd6e65 100644 --- a/tests/struct/good/struct_update.catala_en +++ b/tests/struct/good/struct_update.catala_en @@ -32,16 +32,21 @@ scope S: ```catala-test-inline $ catala test-scope S -[WARNING] All fields of Str are rewritten in this replacement. - -┌─⯈ tests/struct/good/struct_update.catala_en:25.24-25.91: -└──┐ -25 │ definition s4 equals s3 but replace { -- fld1: 100 -- fld2: $100 -- fld3: |2100-01-01| } - │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ -[RESULT] Computation successful! Results: -[RESULT] s1 = Str { -- fld1: 99 -- fld2: $1.00 -- fld3: 2003-01-01 } -[RESULT] s2 = Str { -- fld1: 0 -- fld2: $99.00 -- fld3: 2003-01-01 } -[RESULT] s3 = Str { -- fld1: 99 -- fld2: $99.00 -- fld3: 2099-01-01 } -[RESULT] s4 = Str { -- fld1: 100 -- fld2: $100.00 -- fld3: 2100-01-01 } -[RESULT] s5 = Str { -- fld1: 100 -- fld2: $99.00 -- fld3: 2100-01-01 } +┌─[WARNING]─ +│ +│ All fields of Str are rewritten in this replacement. +│ +├─➤ tests/struct/good/struct_update.catala_en:25.24-25.91: +│ │ +│ 25 │ definition s4 equals s3 but replace { -- fld1: 100 -- fld2: $100 -- fld3: |2100-01-01| } +│ │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ +└─ +┌─[RESULT]─ +│Computation successful! Results: +│s1 = Str { -- fld1: 99 -- fld2: $1.00 -- fld3: 2003-01-01 } +│s2 = Str { -- fld1: 0 -- fld2: $99.00 -- fld3: 2003-01-01 } +│s3 = Str { -- fld1: 99 -- fld2: $99.00 -- fld3: 2099-01-01 } +│s4 = Str { -- fld1: 100 -- fld2: $100.00 -- fld3: 2100-01-01 } +│s5 = Str { -- fld1: 100 -- fld2: $99.00 -- fld3: 2100-01-01 } +└─ ``` diff --git a/tests/tuples/good/tuples.catala_en b/tests/tuples/good/tuples.catala_en index 541770c88..13384fa86 100644 --- a/tests/tuples/good/tuples.catala_en +++ b/tests/tuples/good/tuples.catala_en @@ -33,12 +33,18 @@ scope Test: ```catala-test-inline $ catala typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope Test -[RESULT] Computation successful! Results: -[RESULT] o = (2001-01-03, 6.0) +┌─[RESULT]─ +│Computation successful! Results: +│o = (2001-01-03, 6.0) +└─ ``` diff --git a/tests/tuples/good/tuplists.catala_en b/tests/tuples/good/tuplists.catala_en index 97f6d18ee..54b9c1d76 100644 --- a/tests/tuples/good/tuplists.catala_en +++ b/tests/tuples/good/tuplists.catala_en @@ -43,54 +43,52 @@ scope S: ```catala-test-inline $ catala typecheck -[RESULT] Typechecking successful! +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope S -[RESULT] Computation successful! Results: -[RESULT] -r1 = - [ - ($120.00, 0.5); ($13.00, 0.005); ($1,400.00, 10.0); - ($630.00, 1.826,086,956,521,739,130,4…); ($272.00, 0.68); - ($170.00, 0.833,333,333,333,333,333,33…) - ] -[RESULT] -r2 = - [ - ($120.00, 0.5); ($13.00, 0.005); ($1,400.00, 10.0); - ($630.00, 1.826,086,956,521,739,130,4…); ($272.00, 0.68); - ($170.00, 0.833,333,333,333,333,333,33…) - ] -[RESULT] -r3 = - [ - ($120.00, 0.5); ($13.00, 0.005); ($1,400.00, 10.0); - ($630.00, 1.826,086,956,521,739,130,4…); ($272.00, 0.68); - ($170.00, 0.833,333,333,333,333,333,33…) - ] -[RESULT] -r4 = - [ - ($120.00, 0.5); ($13.00, 0.005); ($1,400.00, 10.0); - ($630.00, 1.826,086,956,521,739,130,4…); ($272.00, 0.68); - ($170.00, 0.833,333,333,333,333,333,33…) - ] -[RESULT] -r5 = - [ - ($120.00, 0.5); ($13.00, 0.005); ($1,400.00, 10.0); - ($630.00, 1.826,086,956,521,739,130,4…); ($272.00, 0.68); - ($170.00, 0.833,333,333,333,333,333,33…) - ] -[RESULT] -r6 = - [ - ($120.00, 0.5); ($13.00, 0.005); ($1,400.00, 10.0); - ($630.00, 1.826,086,956,521,739,130,4…); ($272.00, 0.68); - ($170.00, 0.833,333,333,333,333,333,33…) - ] +┌─[RESULT]─ +│Computation successful! Results: +│r1 = +│ [ +│ ($120.00, 0.5); ($13.00, 0.005); ($1,400.00, 10.0); +│ ($630.00, 1.826,086,956,521,739,130,4…); ($272.00, 0.68); +│ ($170.00, 0.833,333,333,333,333,333,33…) +│ ] +│r2 = +│ [ +│ ($120.00, 0.5); ($13.00, 0.005); ($1,400.00, 10.0); +│ ($630.00, 1.826,086,956,521,739,130,4…); ($272.00, 0.68); +│ ($170.00, 0.833,333,333,333,333,333,33…) +│ ] +│r3 = +│ [ +│ ($120.00, 0.5); ($13.00, 0.005); ($1,400.00, 10.0); +│ ($630.00, 1.826,086,956,521,739,130,4…); ($272.00, 0.68); +│ ($170.00, 0.833,333,333,333,333,333,33…) +│ ] +│r4 = +│ [ +│ ($120.00, 0.5); ($13.00, 0.005); ($1,400.00, 10.0); +│ ($630.00, 1.826,086,956,521,739,130,4…); ($272.00, 0.68); +│ ($170.00, 0.833,333,333,333,333,333,33…) +│ ] +│r5 = +│ [ +│ ($120.00, 0.5); ($13.00, 0.005); ($1,400.00, 10.0); +│ ($630.00, 1.826,086,956,521,739,130,4…); ($272.00, 0.68); +│ ($170.00, 0.833,333,333,333,333,333,33…) +│ ] +│r6 = +│ [ +│ ($120.00, 0.5); ($13.00, 0.005); ($1,400.00, 10.0); +│ ($630.00, 1.826,086,956,521,739,130,4…); ($272.00, 0.68); +│ ($170.00, 0.833,333,333,333,333,333,33…) +│ ] +└─ ``` ```catala-test-inline diff --git a/tests/typing/bad/err1.catala_en b/tests/typing/bad/err1.catala_en index 64fe1ffff..e9c1a32ac 100644 --- a/tests/typing/bad/err1.catala_en +++ b/tests/typing/bad/err1.catala_en @@ -12,20 +12,23 @@ scope S: ```catala-test-inline $ catala Typecheck -[ERROR] Error during typechecking, incompatible types: - ┌─⯈ decimal - └─⯈ integer - -This expression has type decimal: -┌─⯈ tests/typing/bad/err1.catala_en:7.23-7.26: -└─┐ -7 │ Structure { -- i: 4.1 -- e: y }; - │ ‾‾‾ - -Expected type integer coming from expression: -┌─⯈ tests/typing/bad/common.catala_en:8.18-8.25: -└─┐ -8 │ data i content integer - │ ‾‾‾‾‾‾‾ +┌─[ERROR]─ +│ +│ Error during typechecking, incompatible types: +│ ─➤ decimal +│ ─➤ integer +│ +│ This expression has type decimal: +├─➤ tests/typing/bad/err1.catala_en:7.23-7.26: +│ │ +│ 7 │ Structure { -- i: 4.1 -- e: y }; +│ │ ‾‾‾ +│ +│ Expected type integer coming from expression: +├─➤ tests/typing/bad/common.catala_en:8.18-8.25: +│ │ +│ 8 │ data i content integer +│ │ ‾‾‾‾‾‾‾ +└─ #return code 123# ``` diff --git a/tests/typing/bad/err2.catala_en b/tests/typing/bad/err2.catala_en index 3411a6865..f088f255b 100644 --- a/tests/typing/bad/err2.catala_en +++ b/tests/typing/bad/err2.catala_en @@ -12,20 +12,23 @@ scope S: ```catala-test-inline $ catala Typecheck -[ERROR] Error during typechecking, incompatible types: - ┌─⯈ decimal - └─⯈ list - -This expression has type decimal: -┌─⯈ tests/typing/bad/err2.catala_en:10.39-10.42: -└──┐ -10 │ definition a equals number of (z ++ 1.1) / 2 - │ ‾‾‾ - -Expected type list coming from expression: -┌─⯈ tests/typing/bad/err2.catala_en:10.36-10.38: -└──┐ -10 │ definition a equals number of (z ++ 1.1) / 2 - │ ‾‾ +┌─[ERROR]─ +│ +│ Error during typechecking, incompatible types: +│ ─➤ decimal +│ ─➤ list +│ +│ This expression has type decimal: +├─➤ tests/typing/bad/err2.catala_en:10.39-10.42: +│ │ +│ 10 │ definition a equals number of (z ++ 1.1) / 2 +│ │ ‾‾‾ +│ +│ Expected type list coming from expression: +├─➤ tests/typing/bad/err2.catala_en:10.36-10.38: +│ │ +│ 10 │ definition a equals number of (z ++ 1.1) / 2 +│ │ ‾‾ +└─ #return code 123# ``` diff --git a/tests/typing/bad/err3.catala_en b/tests/typing/bad/err3.catala_en index 00db4e141..849fc4f9b 100644 --- a/tests/typing/bad/err3.catala_en +++ b/tests/typing/bad/err3.catala_en @@ -12,28 +12,34 @@ scope S: ```catala-test-inline $ catala Typecheck -[WARNING] The constructor "Dec" of enumeration "Enum" is never used; - maybe it's unnecessary? - -┌─⯈ tests/typing/bad/common.catala_en:4.6-4.9: -└─┐ -4 │ -- Dec content decimal - │ ‾‾‾ -[ERROR] Error during typechecking, incompatible types: - ┌─⯈ integer - └─⯈ decimal - -This expression has type integer: -┌─⯈ tests/typing/bad/err3.catala_en:10.23-10.45: -└──┐ -10 │ definition a equals number of (z ++ z) * 2 - │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ - -Expected type decimal coming from expression: -┌─⯈ tests/typing/bad/common.catala_en:15.20-15.27: -└──┐ -15 │ output a content decimal - │ ‾‾‾‾‾‾‾ +┌─[WARNING]─ +│ +│ The constructor "Dec" of enumeration "Enum" is never used; +│ maybe it's unnecessary? +│ +├─➤ tests/typing/bad/common.catala_en:4.6-4.9: +│ │ +│ 4 │ -- Dec content decimal +│ │ ‾‾‾ +└─ +┌─[ERROR]─ +│ +│ Error during typechecking, incompatible types: +│ ─➤ integer +│ ─➤ decimal +│ +│ This expression has type integer: +├─➤ tests/typing/bad/err3.catala_en:10.23-10.45: +│ │ +│ 10 │ definition a equals number of (z ++ z) * 2 +│ │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ +│ +│ Expected type decimal coming from expression: +├─➤ tests/typing/bad/common.catala_en:15.20-15.27: +│ │ +│ 15 │ output a content decimal +│ │ ‾‾‾‾‾‾‾ +└─ #return code 123# ``` @@ -41,27 +47,33 @@ 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/typing/bad/common.catala_en:4.6-4.9: -└─┐ -4 │ -- Dec content decimal - │ ‾‾‾ -[ERROR] Error during typechecking, incompatible types: - ┌─⯈ integer - └─⯈ decimal - -This expression has type integer: -┌─⯈ tests/typing/bad/err3.catala_en:10.23-10.45: -└──┐ -10 │ definition a equals number of (z ++ z) * 2 - │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ - -Expected type decimal coming from expression: -┌─⯈ tests/typing/bad/common.catala_en:15.20-15.27: -└──┐ -15 │ output a content decimal - │ ‾‾‾‾‾‾‾ +┌─[WARNING]─ +│ +│ The constructor "Dec" of enumeration "Enum" is never used; +│ maybe it's unnecessary? +│ +├─➤ tests/typing/bad/common.catala_en:4.6-4.9: +│ │ +│ 4 │ -- Dec content decimal +│ │ ‾‾‾ +└─ +┌─[ERROR]─ +│ +│ Error during typechecking, incompatible types: +│ ─➤ integer +│ ─➤ decimal +│ +│ This expression has type integer: +├─➤ tests/typing/bad/err3.catala_en:10.23-10.45: +│ │ +│ 10 │ definition a equals number of (z ++ z) * 2 +│ │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ +│ +│ Expected type decimal coming from expression: +├─➤ tests/typing/bad/common.catala_en:15.20-15.27: +│ │ +│ 15 │ output a content decimal +│ │ ‾‾‾‾‾‾‾ +└─ #return code 123# ``` diff --git a/tests/typing/bad/err4.catala_en b/tests/typing/bad/err4.catala_en index b3f29ebdf..0dceb2bc4 100644 --- a/tests/typing/bad/err4.catala_en +++ b/tests/typing/bad/err4.catala_en @@ -10,40 +10,52 @@ Should be "catala Typecheck", see test err3 ```catala-test-inline $ catala ocaml -[WARNING] The structure "Structure" is never used; maybe it's unnecessary? - -┌─⯈ tests/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/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/typing/bad/common.catala_en:5.6-5.9: -└─┐ -5 │ -- Dat content date - │ ‾‾‾ -[ERROR] Error during typechecking, incompatible types: - ┌─⯈ Enum - └─⯈ Structure - -This expression has type Enum: -┌─⯈ tests/typing/bad/err4.catala_en:5.25-5.38: -└─┐ -5 │ definition z equals [ Int content x ] - │ ‾‾‾‾‾‾‾‾‾‾‾‾‾ - -Expected type Structure coming from expression: -┌─⯈ tests/typing/bad/common.catala_en:14.28-14.37: -└──┐ -14 │ output z content list of Structure - │ ‾‾‾‾‾‾‾‾‾ +┌─[WARNING]─ +│ +│ The structure "Structure" is never used; maybe it's unnecessary? +│ +├─➤ tests/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/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/typing/bad/common.catala_en:5.6-5.9: +│ │ +│ 5 │ -- Dat content date +│ │ ‾‾‾ +└─ +┌─[ERROR]─ +│ +│ Error during typechecking, incompatible types: +│ ─➤ Enum +│ ─➤ Structure +│ +│ This expression has type Enum: +├─➤ tests/typing/bad/err4.catala_en:5.25-5.38: +│ │ +│ 5 │ definition z equals [ Int content x ] +│ │ ‾‾‾‾‾‾‾‾‾‾‾‾‾ +│ +│ Expected type Structure coming from expression: +├─➤ tests/typing/bad/common.catala_en:14.28-14.37: +│ │ +│ 14 │ output z content list of Structure +│ │ ‾‾‾‾‾‾‾‾‾ +└─ #return code 123# ``` diff --git a/tests/typing/bad/err5.catala_en b/tests/typing/bad/err5.catala_en index add1e9fab..9c8a4d67d 100644 --- a/tests/typing/bad/err5.catala_en +++ b/tests/typing/bad/err5.catala_en @@ -12,20 +12,23 @@ scope S: ```catala-test-inline $ catala Typecheck -[ERROR] Error during typechecking, incompatible types: - ┌─⯈ integer - └─⯈ Structure - -This expression has type integer: -┌─⯈ tests/typing/bad/err5.catala_en:8.5-8.9: -└─┐ -8 │ 1040 - │ ‾‾‾‾ - -Expected type Structure coming from expression: -┌─⯈ tests/typing/bad/err5.catala_en:6.5-6.46: -└─┐ -6 │ Structure { -- i: 3 -- e: Int content x }; - │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ +┌─[ERROR]─ +│ +│ Error during typechecking, incompatible types: +│ ─➤ integer +│ ─➤ Structure +│ +│ This expression has type integer: +├─➤ tests/typing/bad/err5.catala_en:8.5-8.9: +│ │ +│ 8 │ 1040 +│ │ ‾‾‾‾ +│ +│ Expected type Structure coming from expression: +├─➤ tests/typing/bad/err5.catala_en:6.5-6.46: +│ │ +│ 6 │ Structure { -- i: 3 -- e: Int content x }; +│ │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ +└─ #return code 123# ``` diff --git a/tests/typing/bad/err6.catala_en b/tests/typing/bad/err6.catala_en index f68121fcf..54ad8d956 100644 --- a/tests/typing/bad/err6.catala_en +++ b/tests/typing/bad/err6.catala_en @@ -28,20 +28,23 @@ Should be "catala Typecheck", see test err3 ```catala-test-inline $ catala ocaml -[ERROR] Error during typechecking, incompatible types: - ┌─⯈ decimal - └─⯈ integer - -This expression has type decimal: -┌─⯈ tests/typing/bad/err6.catala_en:20.27-20.30: -└──┐ -20 │ definition sub.x equals 44. - │ ‾‾‾ - -Expected type integer coming from expression: -┌─⯈ tests/typing/bad/common.catala_en:12.19-12.26: -└──┐ -12 │ input x content integer - │ ‾‾‾‾‾‾‾ +┌─[ERROR]─ +│ +│ Error during typechecking, incompatible types: +│ ─➤ decimal +│ ─➤ integer +│ +│ This expression has type decimal: +├─➤ tests/typing/bad/err6.catala_en:20.27-20.30: +│ │ +│ 20 │ definition sub.x equals 44. +│ │ ‾‾‾ +│ +│ Expected type integer coming from expression: +├─➤ tests/typing/bad/common.catala_en:12.19-12.26: +│ │ +│ 12 │ input x content integer +│ │ ‾‾‾‾‾‾‾ +└─ #return code 123# ``` diff --git a/tests/typing/good/common.catala_en b/tests/typing/good/common.catala_en index defa1e3a6..cb0802e06 100644 --- a/tests/typing/good/common.catala_en +++ b/tests/typing/good/common.catala_en @@ -19,44 +19,65 @@ declaration scope S: ```catala-test-inline $ catala Typecheck --check-invariants -[WARNING] In scope "S", the variable "z" is declared but never defined; - did you forget something? - -┌─⯈ tests/typing/good/common.catala_en:14.10-14.11: -└──┐ -14 │ output z content list of Structure - │ ‾ -[WARNING] In scope "S", the variable "a" is declared but never defined; - did you forget something? - -┌─⯈ tests/typing/good/common.catala_en:15.10-15.11: -└──┐ -15 │ output a content decimal - │ ‾ -[WARNING] Unused varible: x does not contribute to computing any of scope S - outputs. Did you forget something? - -┌─⯈ tests/typing/good/common.catala_en:12.9-12.10: -└──┐ -12 │ input x content integer - │ ‾ -[WARNING] The structure "Structure" is never used; maybe it's unnecessary? - -┌─⯈ tests/typing/good/common.catala_en:7.23-7.32: -└─┐ -7 │ declaration structure Structure: - │ ‾‾‾‾‾‾‾‾‾ -[WARNING] The enumeration "Enum" is never used; maybe it's unnecessary? - -┌─⯈ tests/typing/good/common.catala_en:2.25-2.29: -└─┐ -2 │ declaration enumeration Enum: - │ ‾‾‾‾ -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[WARNING]─ +│ +│ In scope "S", the variable "z" is declared but never defined; +│ did you forget something? +│ +├─➤ tests/typing/good/common.catala_en:14.10-14.11: +│ │ +│ 14 │ output z content list of Structure +│ │ ‾ +└─ +┌─[WARNING]─ +│ +│ In scope "S", the variable "a" is declared but never defined; +│ did you forget something? +│ +├─➤ tests/typing/good/common.catala_en:15.10-15.11: +│ │ +│ 15 │ output a content decimal +│ │ ‾ +└─ +┌─[WARNING]─ +│ +│ Unused varible: x does not contribute to computing any of scope S outputs. +│ Did you forget something? +│ +├─➤ tests/typing/good/common.catala_en:12.9-12.10: +│ │ +│ 12 │ input x content integer +│ │ ‾ +└─ +┌─[WARNING]─ +│ +│ The structure "Structure" is never used; maybe it's unnecessary? +│ +├─➤ tests/typing/good/common.catala_en:7.23-7.32: +│ │ +│ 7 │ declaration structure Structure: +│ │ ‾‾‾‾‾‾‾‾‾ +└─ +┌─[WARNING]─ +│ +│ The enumeration "Enum" is never used; maybe it's unnecessary? +│ +├─➤ tests/typing/good/common.catala_en:2.25-2.29: +│ │ +│ 2 │ declaration enumeration Enum: +│ │ ‾‾‾‾ +└─ +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala Typecheck --disable-warning -[RESULT] Typechecking successful! +┌─[RESULT]─ +│Typechecking successful! +└─ ``` diff --git a/tests/typing/good/overload.catala_en b/tests/typing/good/overload.catala_en index 0dad59645..92ccb1300 100644 --- a/tests/typing/good/overload.catala_en +++ b/tests/typing/good/overload.catala_en @@ -61,17 +61,23 @@ scope S: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope S -[RESULT] Computation successful! Results: -[RESULT] o_b = true -[RESULT] o_d = [-13 days] -[RESULT] o_i = -5 -[RESULT] o_m = -$5.75 -[RESULT] o_t = 2022-01-24 -[RESULT] o_x = 0.142,857,142,857,142,857,14… +┌─[RESULT]─ +│Computation successful! Results: +│o_b = true +│o_d = [-13 days] +│o_i = -5 +│o_m = -$5.75 +│o_t = 2022-01-24 +│o_x = 0.142,857,142,857,142,857,14… +└─ ``` diff --git a/tests/variable_state/bad/def_no_state.catala_en b/tests/variable_state/bad/def_no_state.catala_en index 22c5fc332..f29a42860 100644 --- a/tests/variable_state/bad/def_no_state.catala_en +++ b/tests/variable_state/bad/def_no_state.catala_en @@ -12,20 +12,22 @@ scope A: ```catala-test-inline $ catala Typecheck -[ERROR] This definition does not indicate which state has to be considered - for variable foo. - -┌─⯈ tests/variable_state/bad/def_no_state.catala_en:10.14-10.17: -└──┐ -10 │ definition foo equals 2 - │ ‾‾‾ - └─ Test - -Variable declaration: -┌─⯈ tests/variable_state/bad/def_no_state.catala_en:5.10-5.13: -└─┐ -5 │ output foo content integer - │ ‾‾‾ - └─ Test +┌─[ERROR]─ +│ +│ This definition does not indicate which state has to be considered for +│ variable foo. +│ +├─➤ tests/variable_state/bad/def_no_state.catala_en:10.14-10.17: +│ │ +│ 10 │ definition foo equals 2 +│ │ ‾‾‾ +├─ Test +│ +│ Variable declaration: +├─➤ tests/variable_state/bad/def_no_state.catala_en:5.10-5.13: +│ │ +│ 5 │ output foo content integer +│ │ ‾‾‾ +└─ Test #return code 123# ``` diff --git a/tests/variable_state/bad/double_same_state.catala_en b/tests/variable_state/bad/double_same_state.catala_en index 8492354a3..47bedd8c2 100644 --- a/tests/variable_state/bad/double_same_state.catala_en +++ b/tests/variable_state/bad/double_same_state.catala_en @@ -12,21 +12,23 @@ 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. - -First instance of state "bar": -┌─⯈ tests/variable_state/bad/double_same_state.catala_en:6.11-6.14: -└─┐ -6 │ state bar - │ ‾‾‾ - └─ Test - -Second instance of state "bar": -┌─⯈ tests/variable_state/bad/double_same_state.catala_en:7.11-7.14: -└─┐ -7 │ state bar - │ ‾‾‾ - └─ Test +┌─[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/variable_state/bad/double_same_state.catala_en:6.11-6.14: +│ │ +│ 6 │ state bar +│ │ ‾‾‾ +├─ Test +│ +│ Second instance of state "bar": +├─➤ tests/variable_state/bad/double_same_state.catala_en:7.11-7.14: +│ │ +│ 7 │ state bar +│ │ ‾‾‾ +└─ Test #return code 123# ``` diff --git a/tests/variable_state/bad/no_cross_exceptions.catala_en b/tests/variable_state/bad/no_cross_exceptions.catala_en index 338285da1..38c326d60 100644 --- a/tests/variable_state/bad/no_cross_exceptions.catala_en +++ b/tests/variable_state/bad/no_cross_exceptions.catala_en @@ -16,12 +16,14 @@ scope A: ```catala-test-inline $ catala Typecheck -[ERROR] Unknown label for the scope variable foo@baz: "thing" - -┌─⯈ tests/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 - │ ‾‾‾‾‾ - └─ Test +┌─[ERROR]─ +│ +│ Unknown label for the scope variable foo@baz: "thing" +│ +├─➤ tests/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 +│ │ ‾‾‾‾‾ +└─ Test #return code 123# ``` diff --git a/tests/variable_state/bad/self_reference_first_state.catala_en b/tests/variable_state/bad/self_reference_first_state.catala_en index 9b0bde656..1fc8a92da 100644 --- a/tests/variable_state/bad/self_reference_first_state.catala_en +++ b/tests/variable_state/bad/self_reference_first_state.catala_en @@ -14,13 +14,14 @@ scope A: ```catala-test-inline $ catala Typecheck -[ERROR] The definition of the initial state of this variable refers to - itself. - -┌─⯈ tests/variable_state/bad/self_reference_first_state.catala_en:10.35-10.38: -└──┐ -10 │ definition foo state bar equals foo + 1 - │ ‾‾‾ - └─ Test +┌─[ERROR]─ +│ +│ The definition of the initial state of this variable refers to itself. +│ +├─➤ tests/variable_state/bad/self_reference_first_state.catala_en:10.35-10.38: +│ │ +│ 10 │ definition foo state bar equals foo + 1 +│ │ ‾‾‾ +└─ Test #return code 123# ``` diff --git a/tests/variable_state/bad/state_cycle.catala_en b/tests/variable_state/bad/state_cycle.catala_en index d41185896..2ecd73bb2 100644 --- a/tests/variable_state/bad/state_cycle.catala_en +++ b/tests/variable_state/bad/state_cycle.catala_en @@ -21,35 +21,37 @@ 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 - -foofoo@bar is used here in the definition of foofoo@baz: -┌─⯈ tests/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/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/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/variable_state/bad/state_cycle.catala_en:17.38-17.41: -└──┐ -17 │ definition foofoo state bar equals foo - │ ‾‾‾ - └─ Test +┌─[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/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/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/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/variable_state/bad/state_cycle.catala_en:17.38-17.41: +│ │ +│ 17 │ definition foofoo state bar equals foo +│ │ ‾‾‾ +└─ Test #return code 123# ``` diff --git a/tests/variable_state/bad/unknown_state.catala_en b/tests/variable_state/bad/unknown_state.catala_en index b9f9ec023..bbb08725a 100644 --- a/tests/variable_state/bad/unknown_state.catala_en +++ b/tests/variable_state/bad/unknown_state.catala_en @@ -14,19 +14,21 @@ scope A: ```catala-test-inline $ catala Typecheck -[ERROR] This identifier is not a state declared for variable foo. - -┌─⯈ tests/variable_state/bad/unknown_state.catala_en:12.24-12.28: -└──┐ -12 │ definition foo state basz equals foo + 1 - │ ‾‾‾‾ - └─ Test - -Variable declaration: -┌─⯈ tests/variable_state/bad/unknown_state.catala_en:5.10-5.13: -└─┐ -5 │ output foo content integer - │ ‾‾‾ - └─ Test +┌─[ERROR]─ +│ +│ This identifier is not a state declared for variable foo. +│ +├─➤ tests/variable_state/bad/unknown_state.catala_en:12.24-12.28: +│ │ +│ 12 │ definition foo state basz equals foo + 1 +│ │ ‾‾‾‾ +├─ Test +│ +│ Variable declaration: +├─➤ tests/variable_state/bad/unknown_state.catala_en:5.10-5.13: +│ │ +│ 5 │ output foo content integer +│ │ ‾‾‾ +└─ Test #return code 123# ``` diff --git a/tests/variable_state/good/simple.catala_en b/tests/variable_state/good/simple.catala_en index c65b1e866..e88db6939 100644 --- a/tests/variable_state/good/simple.catala_en +++ b/tests/variable_state/good/simple.catala_en @@ -19,12 +19,18 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline $ catala test-scope A -[RESULT] Computation successful! Results: -[RESULT] foo = 3 +┌─[RESULT]─ +│Computation successful! Results: +│foo = 3 +└─ ``` diff --git a/tests/variable_state/good/state_access.catala_en b/tests/variable_state/good/state_access.catala_en index 009c7ae79..4bc6faa78 100644 --- a/tests/variable_state/good/state_access.catala_en +++ b/tests/variable_state/good/state_access.catala_en @@ -25,7 +25,9 @@ scope A: ```catala-test-inline $ catala test-scope A -[RESULT] Computation successful! Results: -[RESULT] bar = 5 -[RESULT] foo = 6 +┌─[RESULT]─ +│Computation successful! Results: +│bar = 5 +│foo = 6 +└─ ``` diff --git a/tests/variable_state/good/subscope.catala_en b/tests/variable_state/good/subscope.catala_en index 785792328..0d65144af 100644 --- a/tests/variable_state/good/subscope.catala_en +++ b/tests/variable_state/good/subscope.catala_en @@ -34,8 +34,12 @@ scope B: ```catala-test-inline $ catala Typecheck --check-invariants -[RESULT] All invariant checks passed -[RESULT] Typechecking successful! +┌─[RESULT]─ +│All invariant checks passed +└─ +┌─[RESULT]─ +│Typechecking successful! +└─ ``` ```catala-test-inline @@ -52,7 +56,9 @@ let scope A (foo_bar: ⟨integer⟩|context) (foo_baz: integer|internal) ```catala-test-inline $ catala test-scope B -[RESULT] Computation successful! Results: -[RESULT] foofoo = 4 -[RESULT] foofoofoo = 6 +┌─[RESULT]─ +│Computation successful! Results: +│foofoo = 4 +│foofoofoo = 6 +└─ ``` From da89411189c167b9cdd9d88c43ef164092140e9d Mon Sep 17 00:00:00 2001 From: Denis Merigoux Date: Fri, 3 May 2024 13:55:19 +0200 Subject: [PATCH 2/5] Restore formatting --- compiler/catala_utils/pos.ml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/compiler/catala_utils/pos.ml b/compiler/catala_utils/pos.ml index 8fa7d50d5..9a115d408 100644 --- a/compiler/catala_utils/pos.ml +++ b/compiler/catala_utils/pos.ml @@ -245,7 +245,11 @@ let format_loc_text ppf t = Format.pp_open_vbox ppf 0; pr_head ppf; pr_context ppf; - Option.iter (fun f -> Format.pp_print_cut ppf (); f ppf) pr_legal; + Option.iter + (fun f -> + Format.pp_print_cut ppf (); + f ppf) + pr_legal; Format.pp_close_box ppf () let no_pos : t = From 56b456d137956b8598a4adc7ffdb3084ac59ff5f Mon Sep 17 00:00:00 2001 From: Louis Gesbert Date: Fri, 3 May 2024 15:04:56 +0200 Subject: [PATCH 3/5] Message formatting: final touches --- compiler/catala_utils/message.ml | 1 + compiler/catala_utils/message.mli | 1 + compiler/catala_utils/pos.ml | 2 +- compiler/desugared/print.ml | 2 +- compiler/driver.ml | 6 +-- tests/arithmetic/good/priorities.catala_en | 1 - tests/arithmetic/good/rounding.catala_en | 1 - tests/arithmetic/good/trivial.catala_en | 1 - tests/array/good/aggregation.catala_en | 2 - tests/array/good/aggregation_2.catala_en | 2 - tests/array/good/aggregation_3.catala_en | 1 - tests/array/good/concatenation.catala_en | 1 - tests/array/good/filter.catala_en | 2 - tests/array/good/filter_map.catala_en | 2 - tests/array/good/fold.catala_en | 2 - tests/array/good/map.catala_en | 1 - tests/array/good/simple.catala_en | 2 - tests/array/good/simpler.catala_en | 1 - tests/array/good/simplest.catala_en | 1 - tests/bool/good/test_bool.catala_en | 1 - tests/bool/good/test_precedence.catala_en | 1 - tests/bool/good/test_xor.catala_en | 1 - tests/date/good/durations.catala_en | 1 - tests/date/good/rounding_option_en.catala_en | 1 - tests/date/good/rounding_option_fr.catala_fr | 1 - tests/date/good/simple.catala_en | 1 - tests/dec/good/infinite_precision.catala_en | 1 - tests/dec/good/rounding.catala_en | 1 - tests/dec/good/simple.catala_en | 1 - tests/dec/good/zero_after_comma.catala_en | 1 - .../good/mutliple_definitions.catala_en | 1 - tests/enum/bad/useless_wildcard.catala_en | 1 - tests/enum/good/disambiguated_cases.catala_en | 1 - tests/enum/good/quick_pattern_check.catala_en | 1 - tests/enum/good/simple.catala_en | 1 - tests/enum/good/wildcard.catala_en | 2 - .../exception/good/duplicate_labels.catala_en | 1 - tests/exception/good/exception.catala_en | 1 - .../good/exceptions_squared.catala_en | 1 - .../good/grouped_exceptions.catala_en | 1 - .../good/groups_of_exceptions.catala_en | 1 - .../good/same_label_two_variables.catala_en | 1 - .../good/split_unlabeled_exception.catala_en | 1 - .../two_exceptions_same_outcome.catala_en | 1 - .../good/two_unlabeled_exceptions.catala_en | 1 - .../good/unlabeled_exception.catala_en | 1 - .../unsorted_unlabeled_exceptions.catala_en | 1 - tests/func/bad/bad_func.catala_en | 1 - .../func/good/closure_through_scope.catala_en | 1 - tests/func/good/func.catala_en | 1 - tests/func/good/param_consistency.catala_en | 2 - .../scope_call_func_struct_closure.catala_en | 1 - .../good/test_grave_char_en.catala_en | 4 -- .../good/test_grave_char_fr.catala_fr | 1 - .../good/test_grave_char_pl.catala_pl | 1 - .../good/test_markup_refactoring.catala_en | 2 - tests/modules/good/external_use.catala_en | 1 - tests/modules/good/mod_def_context.catala_en | 3 -- tests/modules/good/mod_use.catala_en | 1 - tests/modules/good/mod_use2.catala_en | 2 - tests/modules/good/mod_use3.catala_en | 1 - tests/modules/good/mod_use_context.catala_en | 3 -- tests/modules/good/prorata_syntax.catala_en | 1 - tests/money/good/literal_parsing.catala_en | 1 - tests/money/good/simple.catala_en | 1 - tests/name_resolution/good/let_in.catala_en | 6 +-- tests/name_resolution/good/let_in2.catala_en | 1 - .../good/out_of_order.catala_en | 1 - .../good/toplevel_defs.catala_en | 40 +++++++++---------- .../good/toplevel_defs_simple.catala_en | 1 - .../scope/good/grand_parent_caller.catala_en | 3 -- .../good/local-capture-subscope.catala_en | 1 - tests/scope/good/out_sub_scope.catala_en | 1 - tests/scope/good/scope_call.catala_en | 1 - tests/scope/good/scope_call2.catala_en | 1 - tests/scope/good/scope_call3.catala_en | 1 - tests/scope/good/scope_call4.catala_en | 2 - tests/scope/good/scope_struct.catala_en | 1 - tests/scope/good/sub_scope.catala_en | 2 - tests/scope/good/sub_sub_scope.catala_en | 3 -- ...ubscope_function_arg_not_defined.catala_en | 1 - tests/struct/good/ambiguous_fields.catala_en | 1 - tests/struct/good/nested3.catala_en | 2 - tests/struct/good/same_name_fields.catala_en | 1 - tests/struct/good/simple.catala_en | 1 - tests/struct/good/struct_update.catala_en | 1 - tests/tuples/good/tuples.catala_en | 1 - tests/tuples/good/tuplists.catala_en | 1 - tests/typing/good/overload.catala_en | 1 - tests/variable_state/good/simple.catala_en | 1 - .../good/state_access.catala_en | 1 - tests/variable_state/good/subscope.catala_en | 1 - 92 files changed, 27 insertions(+), 140 deletions(-) diff --git a/compiler/catala_utils/message.ml b/compiler/catala_utils/message.ml index cd93603c1..fa6d1b12b 100644 --- a/compiler/catala_utils/message.ml +++ b/compiler/catala_utils/message.ml @@ -394,5 +394,6 @@ let make let debug = make ~level:Debug ~cont:emit let log = make ~level:Log ~cont:emit let result = make ~level:Result ~cont:emit +let results r = emit (List.flatten (List.map of_result r)) Result let warning = make ~level:Warning ~cont:emit let error = make ~level:Error ~cont:(fun m _ -> raise (CompilerError m)) diff --git a/compiler/catala_utils/message.mli b/compiler/catala_utils/message.mli index 60ec7061b..3e97c9a8b 100644 --- a/compiler/catala_utils/message.mli +++ b/compiler/catala_utils/message.mli @@ -99,3 +99,4 @@ val debug : ('a, unit) emitter val result : ('a, unit) emitter val warning : ('a, unit) emitter val error : ('a, 'b) emitter +val results : Content.message list -> unit diff --git a/compiler/catala_utils/pos.ml b/compiler/catala_utils/pos.ml index 9a115d408..ea150e0bd 100644 --- a/compiler/catala_utils/pos.ml +++ b/compiler/catala_utils/pos.ml @@ -129,7 +129,7 @@ let format_loc_text_parts (pos : t) = None ) else let pr_head ppf = - Format.fprintf ppf "@{─➤ %s:@}@," (to_string_short pos) + Format.fprintf ppf "@{─➤ @{%s:@}@}@," (to_string_short pos) in let pr_context, pr_legal = try diff --git a/compiler/desugared/print.ml b/compiler/desugared/print.ml index 303d5811b..483e7e03b 100644 --- a/compiler/desugared/print.ml +++ b/compiler/desugared/print.ml @@ -92,7 +92,7 @@ let print_exceptions_graph Ast.ScopeDef.format var ScopeName.format scope; Dependency.ExceptionsDependencies.iter_vertex (fun ex -> - Message.result "@[Definitions with label \"%a\":@]" LabelName.format + Message.result "Definitions with label@ \"%a\":" LabelName.format ex.Dependency.ExceptionVertex.label ~extra_pos: (List.map diff --git a/compiler/driver.ml b/compiler/driver.ml index d22df9d66..adfc07eed 100644 --- a/compiler/driver.ml +++ b/compiler/driver.ml @@ -691,9 +691,9 @@ module Commands = struct let language = Cli.file_lang (Global.input_src_file options.Global.input_src) in - Message.result "Computation successful!%s" - (if List.length results > 0 then " Results:" else "") - ~outcome: + if results = [] then Message.result "Computation successful!" + else + Message.results (List.map (fun ((var, _), result) ppf -> Format.fprintf ppf "@[%s@ =@ %a@]" var diff --git a/tests/arithmetic/good/priorities.catala_en b/tests/arithmetic/good/priorities.catala_en index 9778e8a83..9e0014a9f 100644 --- a/tests/arithmetic/good/priorities.catala_en +++ b/tests/arithmetic/good/priorities.catala_en @@ -27,7 +27,6 @@ $ catala Typecheck --check-invariants ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│Computation successful! Results: │w = 0 │x = 4 │y = 4 diff --git a/tests/arithmetic/good/rounding.catala_en b/tests/arithmetic/good/rounding.catala_en index 6471c4ea4..a0ff83840 100644 --- a/tests/arithmetic/good/rounding.catala_en +++ b/tests/arithmetic/good/rounding.catala_en @@ -47,7 +47,6 @@ scope A: ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│Computation successful! Results: │o = false └─ ``` diff --git a/tests/arithmetic/good/trivial.catala_en b/tests/arithmetic/good/trivial.catala_en index b16e61382..291349965 100644 --- a/tests/arithmetic/good/trivial.catala_en +++ b/tests/arithmetic/good/trivial.catala_en @@ -21,7 +21,6 @@ $ catala Typecheck --check-invariants ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│Computation successful! Results: │w = 6 └─ ``` diff --git a/tests/array/good/aggregation.catala_en b/tests/array/good/aggregation.catala_en index 5ccfd39f7..ac27e18e7 100644 --- a/tests/array/good/aggregation.catala_en +++ b/tests/array/good/aggregation.catala_en @@ -38,7 +38,6 @@ $ catala Typecheck --check-invariants ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│Computation successful! Results: │x = [$0.00; $9.00; $5.20] └─ ``` @@ -46,7 +45,6 @@ $ catala test-scope A ```catala-test-inline $ catala test-scope B ┌─[RESULT]─ -│Computation successful! Results: │max = $18.00 │min = $5.00 │y = $17.20 diff --git a/tests/array/good/aggregation_2.catala_en b/tests/array/good/aggregation_2.catala_en index 7d74f2701..384a4d9e9 100644 --- a/tests/array/good/aggregation_2.catala_en +++ b/tests/array/good/aggregation_2.catala_en @@ -44,7 +44,6 @@ $ catala Typecheck --check-invariants ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│Computation successful! Results: │x = │ [ │ S { -- id: 0 -- income: $0.00 }; S { -- id: 1 -- income: $9.00 }; @@ -56,7 +55,6 @@ $ catala test-scope A ```catala-test-inline $ catala test-scope B ┌─[RESULT]─ -│Computation successful! Results: │argmax = S { -- id: 1 -- income: $9.00 } │argmin = S { -- id: 0 -- income: $0.00 } └─ diff --git a/tests/array/good/aggregation_3.catala_en b/tests/array/good/aggregation_3.catala_en index 819db8afa..34d4309fa 100644 --- a/tests/array/good/aggregation_3.catala_en +++ b/tests/array/good/aggregation_3.catala_en @@ -95,7 +95,6 @@ let scope S (x: integer|internal|output) = ```catala-test-inline $ catala test-scope S ┌─[RESULT]─ -│Computation successful! Results: │x = 0 └─ ``` diff --git a/tests/array/good/concatenation.catala_en b/tests/array/good/concatenation.catala_en index 876e8cfd2..d3c0c7c50 100644 --- a/tests/array/good/concatenation.catala_en +++ b/tests/array/good/concatenation.catala_en @@ -25,7 +25,6 @@ $ catala Typecheck --check-invariants ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│Computation successful! Results: │x = [0; 1; 2; 3; 4; 5; 6] │y = [0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10] └─ diff --git a/tests/array/good/filter.catala_en b/tests/array/good/filter.catala_en index 1cb8dc08c..363084c1e 100644 --- a/tests/array/good/filter.catala_en +++ b/tests/array/good/filter.catala_en @@ -31,7 +31,6 @@ $ catala Typecheck --check-invariants ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│Computation successful! Results: │x = [$0.00; $9.00; $5.20] └─ ``` @@ -39,7 +38,6 @@ $ catala test-scope A ```catala-test-inline $ catala test-scope B ┌─[RESULT]─ -│Computation successful! Results: │y = [$9.00; $5.20] └─ ``` diff --git a/tests/array/good/filter_map.catala_en b/tests/array/good/filter_map.catala_en index bea5d1470..3b4ef0dfd 100644 --- a/tests/array/good/filter_map.catala_en +++ b/tests/array/good/filter_map.catala_en @@ -32,7 +32,6 @@ $ catala Typecheck --check-invariants ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│Computation successful! Results: │x = [$0.00; $9.00; $5.20] └─ ``` @@ -40,7 +39,6 @@ $ catala test-scope A ```catala-test-inline $ catala test-scope B ┌─[RESULT]─ -│Computation successful! Results: │y = [$9.00; $5.20] │z = [false; true; true] └─ diff --git a/tests/array/good/fold.catala_en b/tests/array/good/fold.catala_en index 7d74f2701..384a4d9e9 100644 --- a/tests/array/good/fold.catala_en +++ b/tests/array/good/fold.catala_en @@ -44,7 +44,6 @@ $ catala Typecheck --check-invariants ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│Computation successful! Results: │x = │ [ │ S { -- id: 0 -- income: $0.00 }; S { -- id: 1 -- income: $9.00 }; @@ -56,7 +55,6 @@ $ catala test-scope A ```catala-test-inline $ catala test-scope B ┌─[RESULT]─ -│Computation successful! Results: │argmax = S { -- id: 1 -- income: $9.00 } │argmin = S { -- id: 0 -- income: $0.00 } └─ diff --git a/tests/array/good/map.catala_en b/tests/array/good/map.catala_en index 62ec80a6b..cc2b628ec 100644 --- a/tests/array/good/map.catala_en +++ b/tests/array/good/map.catala_en @@ -25,7 +25,6 @@ $ catala Typecheck --check-invariants ```catala-test-inline $ catala test-scope B ┌─[RESULT]─ -│Computation successful! Results: │x = [$4.00; $8.00] │z = [false; true] └─ diff --git a/tests/array/good/simple.catala_en b/tests/array/good/simple.catala_en index 74cbf1f51..d22714608 100644 --- a/tests/array/good/simple.catala_en +++ b/tests/array/good/simple.catala_en @@ -36,7 +36,6 @@ $ catala Typecheck --check-invariants ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│Computation successful! Results: │x = [0; 9; 64] └─ ``` @@ -44,7 +43,6 @@ $ catala test-scope A ```catala-test-inline $ catala test-scope B ┌─[RESULT]─ -│Computation successful! Results: │v = 3 │w = true │y = true diff --git a/tests/array/good/simpler.catala_en b/tests/array/good/simpler.catala_en index c621dd0a9..fcbbc138a 100644 --- a/tests/array/good/simpler.catala_en +++ b/tests/array/good/simpler.catala_en @@ -25,7 +25,6 @@ $ catala Typecheck --check-invariants ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│Computation successful! Results: │w = false │x = [0; 9; 64] └─ diff --git a/tests/array/good/simplest.catala_en b/tests/array/good/simplest.catala_en index bbbb53498..ae6b45985 100644 --- a/tests/array/good/simplest.catala_en +++ b/tests/array/good/simplest.catala_en @@ -23,7 +23,6 @@ $ catala Typecheck --check-invariants ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│Computation successful! Results: │x = [0; 4; 8] └─ ``` diff --git a/tests/bool/good/test_bool.catala_en b/tests/bool/good/test_bool.catala_en index 34acfef66..ce1d1fe57 100644 --- a/tests/bool/good/test_bool.catala_en +++ b/tests/bool/good/test_bool.catala_en @@ -48,7 +48,6 @@ TestBool ```catala-test-inline $ catala test-scope TestBool ┌─[RESULT]─ -│Computation successful! Results: │bar = 1 │foo = true └─ diff --git a/tests/bool/good/test_precedence.catala_en b/tests/bool/good/test_precedence.catala_en index 4545ffc43..d2f760374 100644 --- a/tests/bool/good/test_precedence.catala_en +++ b/tests/bool/good/test_precedence.catala_en @@ -23,7 +23,6 @@ $ catala Typecheck --check-invariants ```catala-test-inline $ catala test-scope TestBool ┌─[RESULT]─ -│Computation successful! Results: │foo = true └─ ``` diff --git a/tests/bool/good/test_xor.catala_en b/tests/bool/good/test_xor.catala_en index 1387b7265..291ca07d3 100644 --- a/tests/bool/good/test_xor.catala_en +++ b/tests/bool/good/test_xor.catala_en @@ -29,7 +29,6 @@ $ catala Typecheck --check-invariants ```catala-test-inline $ catala test-scope TestXor ┌─[RESULT]─ -│Computation successful! Results: │f_xor_f = false │f_xor_t = true │t_xor_f = true diff --git a/tests/date/good/durations.catala_en b/tests/date/good/durations.catala_en index 38f33ade7..00dae0f5c 100644 --- a/tests/date/good/durations.catala_en +++ b/tests/date/good/durations.catala_en @@ -38,7 +38,6 @@ $ catala Typecheck --check-invariants ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│Computation successful! Results: │m = [11874 days] │m2 = [6 months] │x = 2019-01-01 diff --git a/tests/date/good/rounding_option_en.catala_en b/tests/date/good/rounding_option_en.catala_en index 79553159a..26762202b 100644 --- a/tests/date/good/rounding_option_en.catala_en +++ b/tests/date/good/rounding_option_en.catala_en @@ -37,7 +37,6 @@ $ catala Typecheck --check-invariants ```catala-test-inline $ catala test-scope Test ┌─[RESULT]─ -│Computation successful! Results: │r = true └─ ``` diff --git a/tests/date/good/rounding_option_fr.catala_fr b/tests/date/good/rounding_option_fr.catala_fr index 9e5b1ec4b..ac0e9656d 100644 --- a/tests/date/good/rounding_option_fr.catala_fr +++ b/tests/date/good/rounding_option_fr.catala_fr @@ -37,7 +37,6 @@ $ catala Typecheck --check-invariants ```catala-test-inline $ catala test-scope Test ┌─[RESULT]─ -│Computation successful! Results: │r = vrai └─ ``` diff --git a/tests/date/good/simple.catala_en b/tests/date/good/simple.catala_en index 51448dce4..bbd4efd5e 100644 --- a/tests/date/good/simple.catala_en +++ b/tests/date/good/simple.catala_en @@ -27,7 +27,6 @@ $ catala Typecheck --check-invariants ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│Computation successful! Results: │x = 2019-01-01 │y = 2002-09-30 │z = [5937 days] diff --git a/tests/dec/good/infinite_precision.catala_en b/tests/dec/good/infinite_precision.catala_en index b7a27ecad..2f82c0566 100644 --- a/tests/dec/good/infinite_precision.catala_en +++ b/tests/dec/good/infinite_precision.catala_en @@ -29,7 +29,6 @@ $ catala Typecheck --check-invariants ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│Computation successful! Results: │a = │ -0.000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,078,695,580,959,228,473,468… │x = 84.648,665,652,656,896,23 diff --git a/tests/dec/good/rounding.catala_en b/tests/dec/good/rounding.catala_en index 93becf286..0f2fd4996 100644 --- a/tests/dec/good/rounding.catala_en +++ b/tests/dec/good/rounding.catala_en @@ -29,7 +29,6 @@ $ catala Typecheck --check-invariants ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│Computation successful! Results: │x = 84.648,665 │x1 = 85.0 │y = 4.368,297 diff --git a/tests/dec/good/simple.catala_en b/tests/dec/good/simple.catala_en index fb856420b..a1e1f271a 100644 --- a/tests/dec/good/simple.catala_en +++ b/tests/dec/good/simple.catala_en @@ -29,7 +29,6 @@ $ catala Typecheck --check-invariants ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│Computation successful! Results: │k = 0.333,333,333,333,333,333,33… │x = 84.648,665 │y = 4.368,297 diff --git a/tests/dec/good/zero_after_comma.catala_en b/tests/dec/good/zero_after_comma.catala_en index 25c8c88ef..5bc7fdb2a 100644 --- a/tests/dec/good/zero_after_comma.catala_en +++ b/tests/dec/good/zero_after_comma.catala_en @@ -26,7 +26,6 @@ $ catala Typecheck --check-invariants ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│Computation successful! Results: │x = 4.0 │y = 1.04 └─ diff --git a/tests/default/good/mutliple_definitions.catala_en b/tests/default/good/mutliple_definitions.catala_en index dd73c86ec..fd3c8fc9f 100644 --- a/tests/default/good/mutliple_definitions.catala_en +++ b/tests/default/good/mutliple_definitions.catala_en @@ -54,7 +54,6 @@ $ catala test-scope A │ │ ‾‾‾‾‾‾‾‾‾‾‾‾ └─ ┌─[RESULT]─ -│Computation successful! Results: │w = 3 └─ ``` diff --git a/tests/enum/bad/useless_wildcard.catala_en b/tests/enum/bad/useless_wildcard.catala_en index 73957b0fe..b2491d156 100644 --- a/tests/enum/bad/useless_wildcard.catala_en +++ b/tests/enum/bad/useless_wildcard.catala_en @@ -30,7 +30,6 @@ $ catala test-scope A │ │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ └─ Useless wildcard ┌─[RESULT]─ -│Computation successful! Results: │x = Case1 () │y = 42 └─ diff --git a/tests/enum/good/disambiguated_cases.catala_en b/tests/enum/good/disambiguated_cases.catala_en index 5ba84a562..3ec42e41d 100644 --- a/tests/enum/good/disambiguated_cases.catala_en +++ b/tests/enum/good/disambiguated_cases.catala_en @@ -36,7 +36,6 @@ $ catala Typecheck --check-invariants ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│Computation successful! Results: │e = Case1 () │f = Case1 2 │x = 2 diff --git a/tests/enum/good/quick_pattern_check.catala_en b/tests/enum/good/quick_pattern_check.catala_en index bd41fe96d..888d23ce7 100644 --- a/tests/enum/good/quick_pattern_check.catala_en +++ b/tests/enum/good/quick_pattern_check.catala_en @@ -31,7 +31,6 @@ $ catala Typecheck --check-invariants ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│Computation successful! Results: │x = Case1 2 │y = true │z = false diff --git a/tests/enum/good/simple.catala_en b/tests/enum/good/simple.catala_en index fdaa21ca2..85c06dcd6 100644 --- a/tests/enum/good/simple.catala_en +++ b/tests/enum/good/simple.catala_en @@ -31,7 +31,6 @@ $ catala Typecheck --check-invariants ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│Computation successful! Results: │x = Case1 2 │y = 42 └─ diff --git a/tests/enum/good/wildcard.catala_en b/tests/enum/good/wildcard.catala_en index 4f89f690f..b706ddc52 100644 --- a/tests/enum/good/wildcard.catala_en +++ b/tests/enum/good/wildcard.catala_en @@ -51,7 +51,6 @@ $ catala Typecheck --check-invariants ```catala-test-inline $ catala test-scope Simple_case_2 ┌─[RESULT]─ -│Computation successful! Results: │x = Case3 () │y = 31 └─ @@ -60,7 +59,6 @@ $ catala test-scope Simple_case_2 ```catala-test-inline $ catala test-scope Simple_case ┌─[RESULT]─ -│Computation successful! Results: │x = Case1 2 │y = 31 └─ diff --git a/tests/exception/good/duplicate_labels.catala_en b/tests/exception/good/duplicate_labels.catala_en index 17fabddcc..265166073 100644 --- a/tests/exception/good/duplicate_labels.catala_en +++ b/tests/exception/good/duplicate_labels.catala_en @@ -33,7 +33,6 @@ $ catala Typecheck --check-invariants ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│Computation successful! Results: │x = 0 │y = 0 └─ diff --git a/tests/exception/good/exception.catala_en b/tests/exception/good/exception.catala_en index 88cf816c0..06192e071 100644 --- a/tests/exception/good/exception.catala_en +++ b/tests/exception/good/exception.catala_en @@ -27,7 +27,6 @@ $ catala Typecheck --check-invariants ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│Computation successful! Results: │x = 1 └─ ``` diff --git a/tests/exception/good/exceptions_squared.catala_en b/tests/exception/good/exceptions_squared.catala_en index 78e5a94ed..a031bfe00 100644 --- a/tests/exception/good/exceptions_squared.catala_en +++ b/tests/exception/good/exceptions_squared.catala_en @@ -31,7 +31,6 @@ $ catala Typecheck --check-invariants ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│Computation successful! Results: │x = 2 └─ ``` diff --git a/tests/exception/good/grouped_exceptions.catala_en b/tests/exception/good/grouped_exceptions.catala_en index a56171338..55a1b8221 100644 --- a/tests/exception/good/grouped_exceptions.catala_en +++ b/tests/exception/good/grouped_exceptions.catala_en @@ -61,7 +61,6 @@ $ catala Typecheck --check-invariants ```catala-test-inline $ catala test-scope Benefit ┌─[RESULT]─ -│Computation successful! Results: │benefit = $2,000.00 │person = Person { -- age: 26 -- disabled: true } └─ diff --git a/tests/exception/good/groups_of_exceptions.catala_en b/tests/exception/good/groups_of_exceptions.catala_en index a2740b828..44ac667d2 100644 --- a/tests/exception/good/groups_of_exceptions.catala_en +++ b/tests/exception/good/groups_of_exceptions.catala_en @@ -55,7 +55,6 @@ $ catala Typecheck --check-invariants ```catala-test-inline $ catala test-scope Test ┌─[RESULT]─ -│Computation successful! Results: │x = 2 └─ ``` diff --git a/tests/exception/good/same_label_two_variables.catala_en b/tests/exception/good/same_label_two_variables.catala_en index 7a369d0aa..27e28761d 100644 --- a/tests/exception/good/same_label_two_variables.catala_en +++ b/tests/exception/good/same_label_two_variables.catala_en @@ -34,7 +34,6 @@ $ catala Typecheck --check-invariants ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│Computation successful! Results: │x = 0 │y = 1 │z = 0 diff --git a/tests/exception/good/split_unlabeled_exception.catala_en b/tests/exception/good/split_unlabeled_exception.catala_en index af1dfc35b..c2f054d75 100644 --- a/tests/exception/good/split_unlabeled_exception.catala_en +++ b/tests/exception/good/split_unlabeled_exception.catala_en @@ -29,7 +29,6 @@ $ catala Typecheck --check-invariants ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│Computation successful! Results: │x = 1 └─ ``` diff --git a/tests/exception/good/two_exceptions_same_outcome.catala_en b/tests/exception/good/two_exceptions_same_outcome.catala_en index efa7bc261..18c6c6e03 100644 --- a/tests/exception/good/two_exceptions_same_outcome.catala_en +++ b/tests/exception/good/two_exceptions_same_outcome.catala_en @@ -35,7 +35,6 @@ $ catala Typecheck --check-invariants ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│Computation successful! Results: │x = 0 └─ ``` diff --git a/tests/exception/good/two_unlabeled_exceptions.catala_en b/tests/exception/good/two_unlabeled_exceptions.catala_en index 93bd4db86..f9268e094 100644 --- a/tests/exception/good/two_unlabeled_exceptions.catala_en +++ b/tests/exception/good/two_unlabeled_exceptions.catala_en @@ -32,7 +32,6 @@ $ catala Typecheck --check-invariants ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│Computation successful! Results: │x = 1 │y = 3 └─ diff --git a/tests/exception/good/unlabeled_exception.catala_en b/tests/exception/good/unlabeled_exception.catala_en index 017835291..142d15deb 100644 --- a/tests/exception/good/unlabeled_exception.catala_en +++ b/tests/exception/good/unlabeled_exception.catala_en @@ -26,7 +26,6 @@ $ catala Typecheck --check-invariants ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│Computation successful! Results: │x = 1 └─ ``` diff --git a/tests/exception/good/unsorted_unlabeled_exceptions.catala_en b/tests/exception/good/unsorted_unlabeled_exceptions.catala_en index 63743b797..0bd0ca9fd 100644 --- a/tests/exception/good/unsorted_unlabeled_exceptions.catala_en +++ b/tests/exception/good/unsorted_unlabeled_exceptions.catala_en @@ -32,7 +32,6 @@ $ catala Typecheck --check-invariants ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│Computation successful! Results: │x = 1 │y = 2 └─ diff --git a/tests/func/bad/bad_func.catala_en b/tests/func/bad/bad_func.catala_en index 1c6099f57..1c59d85a1 100644 --- a/tests/func/bad/bad_func.catala_en +++ b/tests/func/bad/bad_func.catala_en @@ -24,7 +24,6 @@ scope R: ```catala-test-inline $ catala test-scope R ┌─[RESULT]─ -│Computation successful! Results: │r = 30 └─ ``` diff --git a/tests/func/good/closure_through_scope.catala_en b/tests/func/good/closure_through_scope.catala_en index 1eae67412..1cafb3de6 100644 --- a/tests/func/good/closure_through_scope.catala_en +++ b/tests/func/good/closure_through_scope.catala_en @@ -47,7 +47,6 @@ let scope T (T_in: T_in): T {y: integer} = ```catala-test-inline $ catala Interpret --lcalc -s T --avoid-exceptions -O --closure-conversion ┌─[RESULT]─ -│Computation successful! Results: │y = -2 └─ ``` diff --git a/tests/func/good/func.catala_en b/tests/func/good/func.catala_en index e78a905f0..7d78dae01 100644 --- a/tests/func/good/func.catala_en +++ b/tests/func/good/func.catala_en @@ -36,7 +36,6 @@ $ catala Typecheck --check-invariants ```catala-test-inline $ catala test-scope R ┌─[RESULT]─ -│Computation successful! Results: │r = 30 └─ ``` diff --git a/tests/func/good/param_consistency.catala_en b/tests/func/good/param_consistency.catala_en index de5f7aece..d2a9bc03a 100644 --- a/tests/func/good/param_consistency.catala_en +++ b/tests/func/good/param_consistency.catala_en @@ -48,7 +48,6 @@ scope T1: ```catala-test-inline $ catala test-scope T1 ┌─[RESULT]─ -│Computation successful! Results: │o1 = 20.0 │o2 = 5.0 └─ @@ -76,7 +75,6 @@ scope T2: ```catala-test-inline $ catala test-scope T2 ┌─[RESULT]─ -│Computation successful! Results: │o = 40.0 └─ ``` diff --git a/tests/func/good/scope_call_func_struct_closure.catala_en b/tests/func/good/scope_call_func_struct_closure.catala_en index 2dd8bf283..906c25537 100644 --- a/tests/func/good/scope_call_func_struct_closure.catala_en +++ b/tests/func/good/scope_call_func_struct_closure.catala_en @@ -164,7 +164,6 @@ let scope Foo ```catala-test-inline $ catala Interpret --lcalc -s Foo --avoid-exceptions -O --closure-conversion ┌─[RESULT]─ -│Computation successful! Results: │z = 11 └─ ``` diff --git a/tests/literate/good/test_grave_char_en.catala_en b/tests/literate/good/test_grave_char_en.catala_en index fd311c3c6..100b1c464 100644 --- a/tests/literate/good/test_grave_char_en.catala_en +++ b/tests/literate/good/test_grave_char_en.catala_en @@ -44,7 +44,6 @@ $ catala Typecheck --check-invariants ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│Computation successful! Results: │literate_parsing_is_ok = true └─ ``` @@ -52,7 +51,6 @@ $ catala test-scope A ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│Computation successful! Results: │literate_parsing_is_ok = true └─ ``` @@ -110,7 +108,6 @@ $ catala Typecheck --check-invariants \begin{verbatim} $ catala test-scope A ┌─[RESULT]─ -│Computation successful! Results: │literate_parsing_is_ok = true └─ \end{verbatim} @@ -118,7 +115,6 @@ $ catala test-scope A \begin{verbatim} $ catala test-scope A ┌─[RESULT]─ -│Computation successful! Results: │literate_parsing_is_ok = true └─ \end{verbatim} diff --git a/tests/literate/good/test_grave_char_fr.catala_fr b/tests/literate/good/test_grave_char_fr.catala_fr index 4ab3629a8..ad29196e9 100644 --- a/tests/literate/good/test_grave_char_fr.catala_fr +++ b/tests/literate/good/test_grave_char_fr.catala_fr @@ -42,7 +42,6 @@ $ catala Typecheck --check-invariants ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│Computation successful! Results: │literate_parsing_is_ok = vrai └─ ``` diff --git a/tests/literate/good/test_grave_char_pl.catala_pl b/tests/literate/good/test_grave_char_pl.catala_pl index 37bbef39b..e77729c00 100644 --- a/tests/literate/good/test_grave_char_pl.catala_pl +++ b/tests/literate/good/test_grave_char_pl.catala_pl @@ -30,7 +30,6 @@ int main(void) { return 0; } ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│Computation successful! Results: │literate_parsing_is_ok = prawda └─ ``` diff --git a/tests/metadata/good/test_markup_refactoring.catala_en b/tests/metadata/good/test_markup_refactoring.catala_en index 0d32ea0c1..a5ef91b22 100644 --- a/tests/metadata/good/test_markup_refactoring.catala_en +++ b/tests/metadata/good/test_markup_refactoring.catala_en @@ -43,7 +43,6 @@ $ catala Typecheck --check-invariants ```catala-test-inline $ catala test-scope S2 ┌─[RESULT]─ -│Computation successful! Results: │b = B () └─ ``` @@ -51,7 +50,6 @@ $ catala test-scope S2 ```catala-test-inline $ catala test-scope S ┌─[RESULT]─ -│Computation successful! Results: │a = A () └─ ``` diff --git a/tests/modules/good/external_use.catala_en b/tests/modules/good/external_use.catala_en index 996757cda..8efb8d07d 100644 --- a/tests/modules/good/external_use.catala_en +++ b/tests/modules/good/external_use.catala_en @@ -19,7 +19,6 @@ scope S: ```catala-test-inline $ catala test-scope S ┌─[RESULT]─ -│Computation successful! Results: │result1 = [$3.33; $0.83; $0.83; $3.33; $0.83; $0.85] │result2 = [$3.33; $0.83; $0.83; $3.34; $0.84; $0.83] └─ diff --git a/tests/modules/good/mod_def_context.catala_en b/tests/modules/good/mod_def_context.catala_en index c5a80e333..c060020d4 100644 --- a/tests/modules/good/mod_def_context.catala_en +++ b/tests/modules/good/mod_def_context.catala_en @@ -71,7 +71,6 @@ $ catala Typecheck --check-invariants ```catala-test-inline $ catala test-scope Stest ┌─[RESULT]─ -│Computation successful! Results: │o1 = S { -- ci: 0 -- cm: $0.00 -- cfun1: -- cfun2: } │o2 = S { -- ci: 1 -- cm: $1.00 -- cfun1: -- cfun2: } │x11 = 12.0 @@ -102,7 +101,6 @@ scope TestSubDefault: ```catala-test-inline $ catala test-scope TestSubDefault ┌─[RESULT]─ -│Computation successful! Results: │ci = 0 │cm = $0.00 │x11 = 12.0 @@ -132,7 +130,6 @@ scope TestSubOverride: ```catala-test-inline $ catala test-scope TestSubOverride ┌─[RESULT]─ -│Computation successful! Results: │ci = 1 │cm = $1.00 │x21 = 8.0 diff --git a/tests/modules/good/mod_use.catala_en b/tests/modules/good/mod_use.catala_en index 919da94fd..c273a374b 100644 --- a/tests/modules/good/mod_use.catala_en +++ b/tests/modules/good/mod_use.catala_en @@ -38,7 +38,6 @@ $ catala Typecheck --check-invariants ```catala-test-inline $ catala test-scope T2 ┌─[RESULT]─ -│Computation successful! Results: │o1 = No () │o2 = Maybe () │o3 = $1,000.00 diff --git a/tests/modules/good/mod_use2.catala_en b/tests/modules/good/mod_use2.catala_en index a7dc1d35c..fdc80716f 100644 --- a/tests/modules/good/mod_use2.catala_en +++ b/tests/modules/good/mod_use2.catala_en @@ -30,7 +30,6 @@ $ catala Typecheck --check-invariants ```catala-test-inline $ catala test-scope T ┌─[RESULT]─ -│Computation successful! Results: │o1 = Mod_def.S { -- sr: $1,000.00 -- e1: Maybe () } │o2 = $2,500.00 │o3 = $132.00 @@ -44,7 +43,6 @@ The following tests multiple inclusion of the same module (Mod_def is used throu ```catala-test-inline $ catala test-scope T2 ┌─[RESULT]─ -│Computation successful! Results: │o1 = No () │o2 = Maybe () │o3 = $1,000.00 diff --git a/tests/modules/good/mod_use3.catala_en b/tests/modules/good/mod_use3.catala_en index e013ecb94..0c521ea71 100644 --- a/tests/modules/good/mod_use3.catala_en +++ b/tests/modules/good/mod_use3.catala_en @@ -34,7 +34,6 @@ $ catala Typecheck --check-invariants ```catala-test-inline $ catala test-scope T ┌─[RESULT]─ -│Computation successful! Results: │o1 = Mod_def.S { -- sr: $1,000.00 -- e1: Maybe () } │o2 = $2,500.00 │o3 = $132.00 diff --git a/tests/modules/good/mod_use_context.catala_en b/tests/modules/good/mod_use_context.catala_en index 932448b26..abb5a230b 100644 --- a/tests/modules/good/mod_use_context.catala_en +++ b/tests/modules/good/mod_use_context.catala_en @@ -55,7 +55,6 @@ $ catala Typecheck --check-invariants ```catala-test-inline $ catala test-scope TestCall ┌─[RESULT]─ -│Computation successful! Results: │o_default = │ Mod_def_context.S { │ -- ci: 0 @@ -99,7 +98,6 @@ scope TestSubDefault: ```catala-test-inline $ catala test-scope TestSubDefault ┌─[RESULT]─ -│Computation successful! Results: │ci = 0 │cm = $0.00 │x11 = 12.0 @@ -129,7 +127,6 @@ scope TestSubOverride: ```catala-test-inline $ catala test-scope TestSubOverride ┌─[RESULT]─ -│Computation successful! Results: │ci = 1 │cm = $1.00 │x21 = 8.0 diff --git a/tests/modules/good/prorata_syntax.catala_en b/tests/modules/good/prorata_syntax.catala_en index 734e542de..074a71c71 100644 --- a/tests/modules/good/prorata_syntax.catala_en +++ b/tests/modules/good/prorata_syntax.catala_en @@ -47,7 +47,6 @@ $ catala typecheck --check-invariants ```catala-test-inline $ catala test-scope S ┌─[RESULT]─ -│Computation successful! Results: │result = │ [ │ HouseholdMemberTaxed { diff --git a/tests/money/good/literal_parsing.catala_en b/tests/money/good/literal_parsing.catala_en index 02180ac82..5d20f6431 100644 --- a/tests/money/good/literal_parsing.catala_en +++ b/tests/money/good/literal_parsing.catala_en @@ -26,7 +26,6 @@ $ catala Typecheck --check-invariants ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│Computation successful! Results: │x = $0.30 │y = -$0.30 └─ diff --git a/tests/money/good/simple.catala_en b/tests/money/good/simple.catala_en index 1f57deeee..f6b8d11ab 100644 --- a/tests/money/good/simple.catala_en +++ b/tests/money/good/simple.catala_en @@ -27,7 +27,6 @@ $ catala Typecheck --check-invariants ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│Computation successful! Results: │x = $123.54 │y = $8,548,650.96 │z = $7.23 diff --git a/tests/name_resolution/good/let_in.catala_en b/tests/name_resolution/good/let_in.catala_en index cfb4890ce..f4817d2a1 100644 --- a/tests/name_resolution/good/let_in.catala_en +++ b/tests/name_resolution/good/let_in.catala_en @@ -40,7 +40,6 @@ $ catala Typecheck --check-invariants ```catala-test-inline $ catala test-scope S ┌─[RESULT]─ -│Computation successful! Results: │a = A { -- x: -2.0 -- y: B { -- y: false -- z: -1.0 } } │b = B { -- y: true -- z: 42.0 } └─ @@ -66,13 +65,12 @@ $ catala test-scope S2 │ Unused varible: x does not contribute to computing any of scope S2 │ outputs. Did you forget something? │ -├─➤ tests/name_resolution/good/let_in.catala_en:53.4-53.5: +├─➤ tests/name_resolution/good/let_in.catala_en:52.4-52.5: │ │ -│ 53 │ x scope S +│ 52 │ x scope S │ │ ‾ └─ Check scope of let-in vs scope variable ┌─[RESULT]─ -│Computation successful! Results: │y = 1 └─ ``` diff --git a/tests/name_resolution/good/let_in2.catala_en b/tests/name_resolution/good/let_in2.catala_en index 1c5eea2d8..6b41d0630 100644 --- a/tests/name_resolution/good/let_in2.catala_en +++ b/tests/name_resolution/good/let_in2.catala_en @@ -28,7 +28,6 @@ $ catala Typecheck --check-invariants ```catala-test-inline $ catala test-scope S ┌─[RESULT]─ -│Computation successful! Results: │a = true └─ ``` diff --git a/tests/name_resolution/good/out_of_order.catala_en b/tests/name_resolution/good/out_of_order.catala_en index d9efc484e..791b1e1dd 100644 --- a/tests/name_resolution/good/out_of_order.catala_en +++ b/tests/name_resolution/good/out_of_order.catala_en @@ -33,7 +33,6 @@ $ catala Typecheck --check-invariants ```catala-test-inline $ catala test-scope S ┌─[RESULT]─ -│Computation successful! Results: │a = A { -- x: 0 -- y: B { -- y: true -- z: 0.0 } } │b = B { -- y: true -- z: 0.0 } └─ diff --git a/tests/name_resolution/good/toplevel_defs.catala_en b/tests/name_resolution/good/toplevel_defs.catala_en index 55f844e6c..41c49889d 100644 --- a/tests/name_resolution/good/toplevel_defs.catala_en +++ b/tests/name_resolution/good/toplevel_defs.catala_en @@ -34,7 +34,6 @@ $ catala Typecheck --check-invariants ```catala-test-inline $ catala test-scope S ┌─[RESULT]─ -│Computation successful! Results: │a = 1,946.574,4 │b = A { -- y: true -- z: 2,091.0 } └─ @@ -57,7 +56,6 @@ scope S2: ```catala-test-inline $ catala test-scope S2 ┌─[RESULT]─ -│Computation successful! Results: │a = 154.0 └─ ``` @@ -79,7 +77,6 @@ scope S3: ```catala-test-inline $ catala test-scope S3 ┌─[RESULT]─ -│Computation successful! Results: │a = 2,480.0 └─ ``` @@ -104,7 +101,6 @@ scope S4: ```catala-test-inline $ catala test-scope S4 ┌─[RESULT]─ -│Computation successful! Results: │a = 6,001.0 └─ ``` @@ -438,8 +434,8 @@ def s2(s2_in:S2In): return (glob3(money_of_cents_string("4400")) + decimal_of_string("100.")) return handle_default(SourcePosition(filename="tests/name_resolution/good/toplevel_defs.catala_en", - start_line=54, start_column=24, - end_line=54, end_column=43, + start_line=53, start_column=24, + end_line=53, end_column=43, law_headings=["Test toplevel function defs"]), [], temp_a_1, temp_a_2) def temp_a_3(_:Unit): @@ -447,15 +443,15 @@ def s2(s2_in:S2In): def temp_a_4(_:Unit): raise Empty temp_a_5 = handle_default(SourcePosition(filename="tests/name_resolution/good/toplevel_defs.catala_en", - start_line=51, start_column=10, - end_line=51, end_column=11, + start_line=50, start_column=10, + end_line=50, end_column=11, law_headings=["Test toplevel function defs"]), [temp_a], temp_a_3, temp_a_4) except Empty: raise NoValue(SourcePosition( filename="tests/name_resolution/good/toplevel_defs.catala_en", - start_line=51, start_column=10, - end_line=51, end_column=11, + start_line=50, start_column=10, + end_line=50, end_column=11, law_headings=["Test toplevel function defs"])) a = temp_a_5 return S2(a = a) @@ -470,8 +466,8 @@ def s3(s3_in:S3In): glob4(money_of_cents_string("4400"), decimal_of_string("55."))) return handle_default(SourcePosition(filename="tests/name_resolution/good/toplevel_defs.catala_en", - start_line=76, start_column=24, - end_line=76, end_column=47, + start_line=74, start_column=24, + end_line=74, end_column=47, law_headings=["Test function def with two args"]), [], temp_a_7, temp_a_8) def temp_a_9(_:Unit): @@ -479,15 +475,15 @@ def s3(s3_in:S3In): def temp_a_10(_:Unit): raise Empty temp_a_11 = handle_default(SourcePosition(filename="tests/name_resolution/good/toplevel_defs.catala_en", - start_line=73, start_column=10, - end_line=73, end_column=11, + start_line=71, start_column=10, + end_line=71, end_column=11, law_headings=["Test function def with two args"]), [temp_a_6], temp_a_9, temp_a_10) except Empty: raise NoValue(SourcePosition( filename="tests/name_resolution/good/toplevel_defs.catala_en", - start_line=73, start_column=10, - end_line=73, end_column=11, + start_line=71, start_column=10, + end_line=71, end_column=11, law_headings=["Test function def with two args"])) a_1 = temp_a_11 return S3(a = a_1) @@ -500,8 +496,8 @@ def s4(s4_in:S4In): def temp_a_14(_:Unit): return (glob5 + decimal_of_string("1.")) return handle_default(SourcePosition(filename="tests/name_resolution/good/toplevel_defs.catala_en", - start_line=101, start_column=24, - end_line=101, end_column=34, + start_line=98, start_column=24, + end_line=98, end_column=34, law_headings=["Test inline defs in toplevel defs"]), [], temp_a_13, temp_a_14) def temp_a_15(_:Unit): @@ -509,15 +505,15 @@ def s4(s4_in:S4In): def temp_a_16(_:Unit): raise Empty temp_a_17 = handle_default(SourcePosition(filename="tests/name_resolution/good/toplevel_defs.catala_en", - start_line=98, start_column=10, - end_line=98, end_column=11, + start_line=95, start_column=10, + end_line=95, end_column=11, law_headings=["Test inline defs in toplevel defs"]), [temp_a_12], temp_a_15, temp_a_16) except Empty: raise NoValue(SourcePosition( filename="tests/name_resolution/good/toplevel_defs.catala_en", - start_line=98, start_column=10, - end_line=98, end_column=11, + start_line=95, start_column=10, + end_line=95, end_column=11, law_headings=["Test inline defs in toplevel defs"])) a_2 = temp_a_17 return S4(a = a_2) diff --git a/tests/name_resolution/good/toplevel_defs_simple.catala_en b/tests/name_resolution/good/toplevel_defs_simple.catala_en index c79bccd13..36fb02785 100644 --- a/tests/name_resolution/good/toplevel_defs_simple.catala_en +++ b/tests/name_resolution/good/toplevel_defs_simple.catala_en @@ -25,7 +25,6 @@ $ catala Typecheck --check-invariants ```catala-test-inline $ catala test-scope S ┌─[RESULT]─ -│Computation successful! Results: │a = true └─ ``` diff --git a/tests/scope/good/grand_parent_caller.catala_en b/tests/scope/good/grand_parent_caller.catala_en index 985f834c7..794e1da3b 100644 --- a/tests/scope/good/grand_parent_caller.catala_en +++ b/tests/scope/good/grand_parent_caller.catala_en @@ -44,7 +44,6 @@ $ catala Typecheck --check-invariants ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│Computation successful! Results: │x = 0 └─ ``` @@ -52,7 +51,6 @@ $ catala test-scope A ```catala-test-inline $ catala test-scope B ┌─[RESULT]─ -│Computation successful! Results: │y1 = 1 │y2 = 1 └─ @@ -61,7 +59,6 @@ $ catala test-scope B ```catala-test-inline $ catala test-scope C ┌─[RESULT]─ -│Computation successful! Results: │z1 = 2 │z2 = 2 └─ diff --git a/tests/scope/good/local-capture-subscope.catala_en b/tests/scope/good/local-capture-subscope.catala_en index 9b69abf33..e6e6dd92d 100644 --- a/tests/scope/good/local-capture-subscope.catala_en +++ b/tests/scope/good/local-capture-subscope.catala_en @@ -31,7 +31,6 @@ $ catala test-scope S │ │ ‾ └─ ┌─[RESULT]─ -│Computation successful! Results: │so = 42 └─ ``` diff --git a/tests/scope/good/out_sub_scope.catala_en b/tests/scope/good/out_sub_scope.catala_en index b250dd7ca..f91f20673 100644 --- a/tests/scope/good/out_sub_scope.catala_en +++ b/tests/scope/good/out_sub_scope.catala_en @@ -22,7 +22,6 @@ scope B: ```catala-test-inline $ catala test-scope B ┌─[RESULT]─ -│Computation successful! Results: │a = A { -- o: 99 -- io: 100 } │b = 99 └─ diff --git a/tests/scope/good/scope_call.catala_en b/tests/scope/good/scope_call.catala_en index fd71ad4f3..da8ee52f8 100644 --- a/tests/scope/good/scope_call.catala_en +++ b/tests/scope/good/scope_call.catala_en @@ -35,7 +35,6 @@ $ catala Typecheck --check-invariants ```catala-test-inline $ catala test-scope Foo ┌─[RESULT]─ -│Computation successful! Results: │example = -7 └─ ``` diff --git a/tests/scope/good/scope_call2.catala_en b/tests/scope/good/scope_call2.catala_en index 8c077ff96..c5bb58265 100644 --- a/tests/scope/good/scope_call2.catala_en +++ b/tests/scope/good/scope_call2.catala_en @@ -53,7 +53,6 @@ $ catala test-scope Titi │ │ ‾‾‾‾ └─ ┌─[RESULT]─ -│Computation successful! Results: │fizz = Toto { -- foo: 1,213 } │fuzz = Toto { -- foo: 1,323 } └─ diff --git a/tests/scope/good/scope_call3.catala_en b/tests/scope/good/scope_call3.catala_en index 770e71e4f..4c5af2099 100644 --- a/tests/scope/good/scope_call3.catala_en +++ b/tests/scope/good/scope_call3.catala_en @@ -91,7 +91,6 @@ $ catala Interpret -t -s HousingComputation --debug [LOG] ≔ HousingComputation.result: 3 [DEBUG] End of interpretation ┌─[RESULT]─ -│Computation successful! Results: │f = λ (x: integer) → │ error_empty │ ⟨ ⟨true diff --git a/tests/scope/good/scope_call4.catala_en b/tests/scope/good/scope_call4.catala_en index 9d60e1508..f59a9081c 100644 --- a/tests/scope/good/scope_call4.catala_en +++ b/tests/scope/good/scope_call4.catala_en @@ -52,7 +52,6 @@ $ catala interpret -s RentComputation --debug [DEBUG] Starting interpretation... [DEBUG] End of interpretation ┌─[RESULT]─ -│Computation successful! Results: │f1 = λ (x: integer) → │ error_empty │ ⟨ ⟨true @@ -90,7 +89,6 @@ $ catala Interpret --lcalc -s RentComputation --avoid-exceptions --optimize --de [DEBUG] Starting interpretation... [DEBUG] End of interpretation ┌─[RESULT]─ -│Computation successful! Results: │f1 = λ (x: integer) → let x1 : integer = x + 1 in │ ((x1 + 1)) │f2 = λ (x: integer) → let x1 : integer = x + 1 in diff --git a/tests/scope/good/scope_struct.catala_en b/tests/scope/good/scope_struct.catala_en index 623051f2a..c55b62dc8 100644 --- a/tests/scope/good/scope_struct.catala_en +++ b/tests/scope/good/scope_struct.catala_en @@ -36,7 +36,6 @@ $ catala Typecheck --check-invariants ```catala-test-inline $ catala test-scope Foo ┌─[RESULT]─ -│Computation successful! Results: │example = SubFoo { -- z1: 4 -- z2: 0 } └─ ``` diff --git a/tests/scope/good/sub_scope.catala_en b/tests/scope/good/sub_scope.catala_en index 711286f09..4902f3a7a 100644 --- a/tests/scope/good/sub_scope.catala_en +++ b/tests/scope/good/sub_scope.catala_en @@ -38,7 +38,6 @@ $ catala Typecheck --check-invariants ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│Computation successful! Results: │a = -1 │a_base = 1 │b = false @@ -48,7 +47,6 @@ $ catala test-scope A ```catala-test-inline $ catala test-scope B ┌─[RESULT]─ -│Computation successful! Results: │a = 42 │b = true └─ diff --git a/tests/scope/good/sub_sub_scope.catala_en b/tests/scope/good/sub_sub_scope.catala_en index f94a4bf9a..8c678b5cf 100644 --- a/tests/scope/good/sub_sub_scope.catala_en +++ b/tests/scope/good/sub_sub_scope.catala_en @@ -85,7 +85,6 @@ $ catala test-scope A │ │ ‾ └─ Article ┌─[RESULT]─ -│Computation successful! Results: │u = true │x = 0 └─ @@ -114,7 +113,6 @@ $ catala test-scope B │ │ ‾ └─ Article ┌─[RESULT]─ -│Computation successful! Results: │y = 1 └─ ``` @@ -142,7 +140,6 @@ $ catala test-scope C │ │ ‾ └─ Article ┌─[RESULT]─ -│Computation successful! Results: │z = 2 └─ ``` diff --git a/tests/scope/good/subscope_function_arg_not_defined.catala_en b/tests/scope/good/subscope_function_arg_not_defined.catala_en index ec76c7c25..07227b53d 100644 --- a/tests/scope/good/subscope_function_arg_not_defined.catala_en +++ b/tests/scope/good/subscope_function_arg_not_defined.catala_en @@ -32,7 +32,6 @@ $ catala Typecheck --check-invariants ```catala-test-inline $ catala test-scope Caller ┌─[RESULT]─ -│Computation successful! Results: │y = 1 └─ ``` diff --git a/tests/struct/good/ambiguous_fields.catala_en b/tests/struct/good/ambiguous_fields.catala_en index 854ea3cff..1eb57affc 100644 --- a/tests/struct/good/ambiguous_fields.catala_en +++ b/tests/struct/good/ambiguous_fields.catala_en @@ -49,7 +49,6 @@ $ catala test-scope A │ │ ‾‾‾ └─ Article ┌─[RESULT]─ -│Computation successful! Results: │y = 1 └─ ``` diff --git a/tests/struct/good/nested3.catala_en b/tests/struct/good/nested3.catala_en index 03b577c20..17436c2db 100644 --- a/tests/struct/good/nested3.catala_en +++ b/tests/struct/good/nested3.catala_en @@ -49,7 +49,6 @@ $ catala Typecheck --check-invariants ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│Computation successful! Results: │t = T { -- a: S { -- x: 0 -- y: false } -- b: S { -- x: 1 -- y: true } } └─ ``` @@ -57,7 +56,6 @@ $ catala test-scope A ```catala-test-inline $ catala test-scope B ┌─[RESULT]─ -│Computation successful! Results: │out = 1 │t = T { -- a: S { -- x: 0 -- y: false } -- b: S { -- x: 1 -- y: true } } └─ diff --git a/tests/struct/good/same_name_fields.catala_en b/tests/struct/good/same_name_fields.catala_en index ec66e742e..36aa0195f 100644 --- a/tests/struct/good/same_name_fields.catala_en +++ b/tests/struct/good/same_name_fields.catala_en @@ -49,7 +49,6 @@ $ catala test-scope A │ │ ‾‾‾ └─ Article ┌─[RESULT]─ -│Computation successful! Results: │x = Foo { -- f: 1 } │y = 1 └─ diff --git a/tests/struct/good/simple.catala_en b/tests/struct/good/simple.catala_en index 7dfd48b4f..48fad35ef 100644 --- a/tests/struct/good/simple.catala_en +++ b/tests/struct/good/simple.catala_en @@ -32,7 +32,6 @@ $ catala Typecheck --check-invariants ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│Computation successful! Results: │s = S { -- x: 1 -- y: 2 } │z = 3 └─ diff --git a/tests/struct/good/struct_update.catala_en b/tests/struct/good/struct_update.catala_en index ba0bd6e65..c4d9a18db 100644 --- a/tests/struct/good/struct_update.catala_en +++ b/tests/struct/good/struct_update.catala_en @@ -42,7 +42,6 @@ $ catala test-scope S │ │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ └─ ┌─[RESULT]─ -│Computation successful! Results: │s1 = Str { -- fld1: 99 -- fld2: $1.00 -- fld3: 2003-01-01 } │s2 = Str { -- fld1: 0 -- fld2: $99.00 -- fld3: 2003-01-01 } │s3 = Str { -- fld1: 99 -- fld2: $99.00 -- fld3: 2099-01-01 } diff --git a/tests/tuples/good/tuples.catala_en b/tests/tuples/good/tuples.catala_en index 13384fa86..5576eeb49 100644 --- a/tests/tuples/good/tuples.catala_en +++ b/tests/tuples/good/tuples.catala_en @@ -44,7 +44,6 @@ $ catala typecheck --check-invariants ```catala-test-inline $ catala test-scope Test ┌─[RESULT]─ -│Computation successful! Results: │o = (2001-01-03, 6.0) └─ ``` diff --git a/tests/tuples/good/tuplists.catala_en b/tests/tuples/good/tuplists.catala_en index 54b9c1d76..470c8dbf6 100644 --- a/tests/tuples/good/tuplists.catala_en +++ b/tests/tuples/good/tuplists.catala_en @@ -51,7 +51,6 @@ $ catala typecheck ```catala-test-inline $ catala test-scope S ┌─[RESULT]─ -│Computation successful! Results: │r1 = │ [ │ ($120.00, 0.5); ($13.00, 0.005); ($1,400.00, 10.0); diff --git a/tests/typing/good/overload.catala_en b/tests/typing/good/overload.catala_en index 92ccb1300..82852d829 100644 --- a/tests/typing/good/overload.catala_en +++ b/tests/typing/good/overload.catala_en @@ -72,7 +72,6 @@ $ catala Typecheck --check-invariants ```catala-test-inline $ catala test-scope S ┌─[RESULT]─ -│Computation successful! Results: │o_b = true │o_d = [-13 days] │o_i = -5 diff --git a/tests/variable_state/good/simple.catala_en b/tests/variable_state/good/simple.catala_en index e88db6939..511f6557b 100644 --- a/tests/variable_state/good/simple.catala_en +++ b/tests/variable_state/good/simple.catala_en @@ -30,7 +30,6 @@ $ catala Typecheck --check-invariants ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│Computation successful! Results: │foo = 3 └─ ``` diff --git a/tests/variable_state/good/state_access.catala_en b/tests/variable_state/good/state_access.catala_en index 4bc6faa78..f519482bd 100644 --- a/tests/variable_state/good/state_access.catala_en +++ b/tests/variable_state/good/state_access.catala_en @@ -26,7 +26,6 @@ scope A: ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│Computation successful! Results: │bar = 5 │foo = 6 └─ diff --git a/tests/variable_state/good/subscope.catala_en b/tests/variable_state/good/subscope.catala_en index 0d65144af..e773ff965 100644 --- a/tests/variable_state/good/subscope.catala_en +++ b/tests/variable_state/good/subscope.catala_en @@ -57,7 +57,6 @@ let scope A (foo_bar: ⟨integer⟩|context) (foo_baz: integer|internal) ```catala-test-inline $ catala test-scope B ┌─[RESULT]─ -│Computation successful! Results: │foofoo = 4 │foofoofoo = 6 └─ From 396ea03ff9b47cfff23c199cb0caa3ff42ab371f Mon Sep 17 00:00:00 2001 From: Louis Gesbert Date: Fri, 3 May 2024 15:12:52 +0200 Subject: [PATCH 4/5] Message formatting: some more space for results --- compiler/catala_utils/message.ml | 2 +- tests/arithmetic/good/priorities.catala_en | 12 +-- tests/arithmetic/good/rounding.catala_en | 2 +- tests/arithmetic/good/trivial.catala_en | 6 +- tests/array/good/aggregation.catala_en | 14 ++-- tests/array/good/aggregation_2.catala_en | 18 ++--- tests/array/good/aggregation_3.catala_en | 6 +- tests/array/good/concatenation.catala_en | 8 +- tests/array/good/filter.catala_en | 8 +- tests/array/good/filter_map.catala_en | 10 +-- tests/array/good/fold.catala_en | 18 ++--- tests/array/good/map.catala_en | 8 +- tests/array/good/simple.catala_en | 14 ++-- tests/array/good/simpler.catala_en | 8 +- tests/array/good/simplest.catala_en | 6 +- tests/bool/good/test_bool.catala_en | 8 +- tests/bool/good/test_precedence.catala_en | 6 +- tests/bool/good/test_xor.catala_en | 12 +-- tests/date/good/durations.catala_en | 18 ++--- tests/date/good/rounding_option_en.catala_en | 6 +- tests/date/good/rounding_option_fr.catala_fr | 6 +- tests/date/good/simple.catala_en | 10 +-- tests/dec/good/infinite_precision.catala_en | 14 ++-- tests/dec/good/rounding.catala_en | 12 +-- tests/dec/good/simple.catala_en | 12 +-- tests/dec/good/zero_after_comma.catala_en | 8 +- .../good/mutliple_definitions.catala_en | 6 +- tests/enum/bad/useless_wildcard.catala_en | 4 +- tests/enum/good/disambiguated_cases.catala_en | 10 +-- tests/enum/good/quick_pattern_check.catala_en | 10 +-- tests/enum/good/simple.catala_en | 8 +- tests/enum/good/wildcard.catala_en | 12 +-- .../good/context_with_default.catala_en | 6 +- .../good/double_definition.catala_en | 4 +- .../exception/good/duplicate_labels.catala_en | 8 +- tests/exception/good/exception.catala_en | 6 +- .../good/exceptions_squared.catala_en | 6 +- .../good/grouped_exceptions.catala_en | 8 +- .../good/groups_of_exceptions.catala_en | 20 ++--- .../good/same_label_two_variables.catala_en | 10 +-- .../good/split_unlabeled_exception.catala_en | 6 +- .../two_exceptions_same_outcome.catala_en | 6 +- .../good/two_unlabeled_exceptions.catala_en | 8 +- .../good/unlabeled_exception.catala_en | 6 +- .../unsorted_unlabeled_exceptions.catala_en | 8 +- tests/func/bad/bad_func.catala_en | 2 +- tests/func/good/closure_conversion.catala_en | 4 +- .../good/closure_conversion_reduce.catala_en | 4 +- tests/func/good/closure_return.catala_en | 4 +- .../func/good/closure_through_scope.catala_en | 6 +- tests/func/good/context_func.catala_en | 4 +- tests/func/good/func.catala_en | 6 +- tests/func/good/param_consistency.catala_en | 12 +-- .../scope_call_func_struct_closure.catala_en | 6 +- tests/io/good/all_io.catala_en | 6 +- tests/io/good/condition_only_input.catala_en | 6 +- tests/io/good/subscope.catala_en | 6 +- .../good/test_grave_char_en.catala_en | 16 ++-- .../good/test_grave_char_fr.catala_fr | 6 +- .../good/test_grave_char_pl.catala_pl | 2 +- .../good/test_markup_refactoring.catala_en | 8 +- tests/modules/good/external_use.catala_en | 4 +- tests/modules/good/mod_def.catala_en | 6 +- tests/modules/good/mod_def_context.catala_en | 32 ++++---- tests/modules/good/mod_middle.catala_en | 6 +- tests/modules/good/mod_use.catala_en | 12 +-- tests/modules/good/mod_use2.catala_en | 18 ++--- tests/modules/good/mod_use3.catala_en | 10 +-- tests/modules/good/mod_use_context.catala_en | 56 +++++++------- tests/modules/good/prorata_syntax.catala_en | 40 +++++----- tests/money/good/literal_parsing.catala_en | 8 +- tests/money/good/simple.catala_en | 10 +-- tests/name_resolution/good/let_in.catala_en | 10 +-- tests/name_resolution/good/let_in2.catala_en | 6 +- .../good/out_of_order.catala_en | 8 +- .../good/toplevel_defs.catala_en | 14 ++-- .../good/toplevel_defs_simple.catala_en | 6 +- tests/proof/good/array_length.catala_en | 6 +- tests/proof/good/assert.catala_en | 6 +- tests/proof/good/dates_get_year.catala_en | 6 +- tests/proof/good/dates_simple.catala_en | 6 +- tests/proof/good/direct_scope_call.catala_en | 6 +- .../direct_scope_call_with_context.catala_en | 6 +- tests/proof/good/duration.catala_en | 6 +- tests/proof/good/enums-arith.catala_en | 6 +- tests/proof/good/enums-nonbool.catala_en | 6 +- tests/proof/good/enums.catala_en | 6 +- tests/proof/good/enums_inj.catala_en | 6 +- tests/proof/good/enums_unit.catala_en | 6 +- tests/proof/good/functions.catala_en | 6 +- tests/proof/good/let_in_condition.catala_en | 6 +- tests/proof/good/money.catala_en | 6 +- tests/proof/good/no_vars.catala_en | 6 +- tests/proof/good/rationals.catala_en | 6 +- tests/proof/good/simple_vars.catala_en | 6 +- tests/proof/good/structs.catala_en | 6 +- .../191_fix_record_name_confusion.catala_en | 4 +- .../scope/good/grand_parent_caller.catala_en | 14 ++-- .../good/local-capture-subscope.catala_en | 2 +- tests/scope/good/nothing.catala_en | 4 +- tests/scope/good/out_sub_scope.catala_en | 4 +- tests/scope/good/scope_call.catala_en | 6 +- tests/scope/good/scope_call2.catala_en | 8 +- tests/scope/good/scope_call3.catala_en | 52 ++++++------- tests/scope/good/scope_call4.catala_en | 36 ++++----- tests/scope/good/scope_struct.catala_en | 6 +- tests/scope/good/simple.catala_en | 4 +- tests/scope/good/sub_scope.catala_en | 14 ++-- tests/scope/good/sub_sub_scope.catala_en | 12 +-- ...ubscope_function_arg_not_defined.catala_en | 6 +- ...bscope_function_arg_not_defined2.catala_en | 6 +- tests/struct/good/ambiguous_fields.catala_en | 6 +- tests/struct/good/nested3.catala_en | 10 +-- tests/struct/good/same_name_fields.catala_en | 8 +- tests/struct/good/simple.catala_en | 8 +- tests/struct/good/struct_update.catala_en | 10 +-- tests/tuples/good/tuples.catala_en | 6 +- tests/tuples/good/tuplists.catala_en | 74 +++++++++---------- tests/typing/good/common.catala_en | 6 +- tests/typing/good/overload.catala_en | 16 ++-- tests/variable_state/good/simple.catala_en | 6 +- .../good/state_access.catala_en | 4 +- tests/variable_state/good/subscope.catala_en | 8 +- 123 files changed, 601 insertions(+), 601 deletions(-) diff --git a/compiler/catala_utils/message.ml b/compiler/catala_utils/message.ml index fa6d1b12b..3dfd400aa 100644 --- a/compiler/catala_utils/message.ml +++ b/compiler/catala_utils/message.ml @@ -244,7 +244,7 @@ module Content = struct Format.pp_close_box ppf (); not islast) | Outcome msg -> - Format.fprintf ppf "@,@[%t@]" msg; + Format.fprintf ppf "@;<0 1>@[@[%t@]@]" msg; true | Suggestion suggestions_list -> Format.fprintf ppf "@,@[@,@[%a@]@]" Suggestions.format diff --git a/tests/arithmetic/good/priorities.catala_en b/tests/arithmetic/good/priorities.catala_en index 9e0014a9f..3a1e352d7 100644 --- a/tests/arithmetic/good/priorities.catala_en +++ b/tests/arithmetic/good/priorities.catala_en @@ -17,19 +17,19 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│w = 0 -│x = 4 -│y = 4 -│z = 390.0 +│ w = 0 +│ x = 4 +│ y = 4 +│ z = 390.0 └─ ``` diff --git a/tests/arithmetic/good/rounding.catala_en b/tests/arithmetic/good/rounding.catala_en index a0ff83840..5f1c9c0a3 100644 --- a/tests/arithmetic/good/rounding.catala_en +++ b/tests/arithmetic/good/rounding.catala_en @@ -47,6 +47,6 @@ scope A: ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│o = false +│ o = false └─ ``` diff --git a/tests/arithmetic/good/trivial.catala_en b/tests/arithmetic/good/trivial.catala_en index 291349965..cf2d0948a 100644 --- a/tests/arithmetic/good/trivial.catala_en +++ b/tests/arithmetic/good/trivial.catala_en @@ -11,16 +11,16 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│w = 6 +│ w = 6 └─ ``` diff --git a/tests/array/good/aggregation.catala_en b/tests/array/good/aggregation.catala_en index ac27e18e7..62bbc2895 100644 --- a/tests/array/good/aggregation.catala_en +++ b/tests/array/good/aggregation.catala_en @@ -28,26 +28,26 @@ scope B: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│x = [$0.00; $9.00; $5.20] +│ x = [$0.00; $9.00; $5.20] └─ ``` ```catala-test-inline $ catala test-scope B ┌─[RESULT]─ -│max = $18.00 -│min = $5.00 -│y = $17.20 -│z = 1 +│ max = $18.00 +│ min = $5.00 +│ y = $17.20 +│ z = 1 └─ ``` diff --git a/tests/array/good/aggregation_2.catala_en b/tests/array/good/aggregation_2.catala_en index 384a4d9e9..54e7572af 100644 --- a/tests/array/good/aggregation_2.catala_en +++ b/tests/array/good/aggregation_2.catala_en @@ -34,28 +34,28 @@ scope B: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│x = -│ [ -│ S { -- id: 0 -- income: $0.00 }; S { -- id: 1 -- income: $9.00 }; -│ S { -- id: 2 -- income: $5.20 } -│ ] +│ x = +│ [ +│ S { -- id: 0 -- income: $0.00 }; S { -- id: 1 -- income: $9.00 }; +│ S { -- id: 2 -- income: $5.20 } +│ ] └─ ``` ```catala-test-inline $ catala test-scope B ┌─[RESULT]─ -│argmax = S { -- id: 1 -- income: $9.00 } -│argmin = S { -- id: 0 -- income: $0.00 } +│ argmax = S { -- id: 1 -- income: $9.00 } +│ argmin = S { -- id: 0 -- income: $0.00 } └─ ``` diff --git a/tests/array/good/aggregation_3.catala_en b/tests/array/good/aggregation_3.catala_en index 34d4309fa..2ab58e85e 100644 --- a/tests/array/good/aggregation_3.catala_en +++ b/tests/array/good/aggregation_3.catala_en @@ -36,10 +36,10 @@ scope S: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` @@ -95,6 +95,6 @@ let scope S (x: integer|internal|output) = ```catala-test-inline $ catala test-scope S ┌─[RESULT]─ -│x = 0 +│ x = 0 └─ ``` diff --git a/tests/array/good/concatenation.catala_en b/tests/array/good/concatenation.catala_en index d3c0c7c50..9c7e95ccd 100644 --- a/tests/array/good/concatenation.catala_en +++ b/tests/array/good/concatenation.catala_en @@ -15,17 +15,17 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│x = [0; 1; 2; 3; 4; 5; 6] -│y = [0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10] +│ x = [0; 1; 2; 3; 4; 5; 6] +│ y = [0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10] └─ ``` diff --git a/tests/array/good/filter.catala_en b/tests/array/good/filter.catala_en index 363084c1e..112abe9a5 100644 --- a/tests/array/good/filter.catala_en +++ b/tests/array/good/filter.catala_en @@ -21,23 +21,23 @@ scope B: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│x = [$0.00; $9.00; $5.20] +│ x = [$0.00; $9.00; $5.20] └─ ``` ```catala-test-inline $ catala test-scope B ┌─[RESULT]─ -│y = [$9.00; $5.20] +│ y = [$9.00; $5.20] └─ ``` diff --git a/tests/array/good/filter_map.catala_en b/tests/array/good/filter_map.catala_en index 3b4ef0dfd..29e3485fd 100644 --- a/tests/array/good/filter_map.catala_en +++ b/tests/array/good/filter_map.catala_en @@ -22,24 +22,24 @@ scope B: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│x = [$0.00; $9.00; $5.20] +│ x = [$0.00; $9.00; $5.20] └─ ``` ```catala-test-inline $ catala test-scope B ┌─[RESULT]─ -│y = [$9.00; $5.20] -│z = [false; true; true] +│ y = [$9.00; $5.20] +│ z = [false; true; true] └─ ``` diff --git a/tests/array/good/fold.catala_en b/tests/array/good/fold.catala_en index 384a4d9e9..54e7572af 100644 --- a/tests/array/good/fold.catala_en +++ b/tests/array/good/fold.catala_en @@ -34,28 +34,28 @@ scope B: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│x = -│ [ -│ S { -- id: 0 -- income: $0.00 }; S { -- id: 1 -- income: $9.00 }; -│ S { -- id: 2 -- income: $5.20 } -│ ] +│ x = +│ [ +│ S { -- id: 0 -- income: $0.00 }; S { -- id: 1 -- income: $9.00 }; +│ S { -- id: 2 -- income: $5.20 } +│ ] └─ ``` ```catala-test-inline $ catala test-scope B ┌─[RESULT]─ -│argmax = S { -- id: 1 -- income: $9.00 } -│argmin = S { -- id: 0 -- income: $0.00 } +│ argmax = S { -- id: 1 -- income: $9.00 } +│ argmin = S { -- id: 0 -- income: $0.00 } └─ ``` diff --git a/tests/array/good/map.catala_en b/tests/array/good/map.catala_en index cc2b628ec..24e936914 100644 --- a/tests/array/good/map.catala_en +++ b/tests/array/good/map.catala_en @@ -15,17 +15,17 @@ scope B: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala test-scope B ┌─[RESULT]─ -│x = [$4.00; $8.00] -│z = [false; true] +│ x = [$4.00; $8.00] +│ z = [false; true] └─ ``` diff --git a/tests/array/good/simple.catala_en b/tests/array/good/simple.catala_en index d22714608..a13bfbafb 100644 --- a/tests/array/good/simple.catala_en +++ b/tests/array/good/simple.catala_en @@ -26,26 +26,26 @@ scope B: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│x = [0; 9; 64] +│ x = [0; 9; 64] └─ ``` ```catala-test-inline $ catala test-scope B ┌─[RESULT]─ -│v = 3 -│w = true -│y = true -│z = false +│ v = 3 +│ w = true +│ y = true +│ z = false └─ ``` diff --git a/tests/array/good/simpler.catala_en b/tests/array/good/simpler.catala_en index fcbbc138a..7396fbb36 100644 --- a/tests/array/good/simpler.catala_en +++ b/tests/array/good/simpler.catala_en @@ -15,17 +15,17 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│w = false -│x = [0; 9; 64] +│ w = false +│ x = [0; 9; 64] └─ ``` diff --git a/tests/array/good/simplest.catala_en b/tests/array/good/simplest.catala_en index ae6b45985..b173b1f13 100644 --- a/tests/array/good/simplest.catala_en +++ b/tests/array/good/simplest.catala_en @@ -13,16 +13,16 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│x = [0; 4; 8] +│ x = [0; 4; 8] └─ ``` diff --git a/tests/bool/good/test_bool.catala_en b/tests/bool/good/test_bool.catala_en index ce1d1fe57..577f84464 100644 --- a/tests/bool/good/test_bool.catala_en +++ b/tests/bool/good/test_bool.catala_en @@ -16,10 +16,10 @@ scope TestBool: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` @@ -48,8 +48,8 @@ TestBool ```catala-test-inline $ catala test-scope TestBool ┌─[RESULT]─ -│bar = 1 -│foo = true +│ bar = 1 +│ foo = true └─ ``` diff --git a/tests/bool/good/test_precedence.catala_en b/tests/bool/good/test_precedence.catala_en index d2f760374..fc5dc6ca5 100644 --- a/tests/bool/good/test_precedence.catala_en +++ b/tests/bool/good/test_precedence.catala_en @@ -13,16 +13,16 @@ scope TestBool: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala test-scope TestBool ┌─[RESULT]─ -│foo = true +│ foo = true └─ ``` diff --git a/tests/bool/good/test_xor.catala_en b/tests/bool/good/test_xor.catala_en index 291ca07d3..03f9359d3 100644 --- a/tests/bool/good/test_xor.catala_en +++ b/tests/bool/good/test_xor.catala_en @@ -19,19 +19,19 @@ scope TestXor: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala test-scope TestXor ┌─[RESULT]─ -│f_xor_f = false -│f_xor_t = true -│t_xor_f = true -│t_xor_t = false +│ f_xor_f = false +│ f_xor_t = true +│ t_xor_f = true +│ t_xor_t = false └─ ``` diff --git a/tests/date/good/durations.catala_en b/tests/date/good/durations.catala_en index 00dae0f5c..8adc6db1e 100644 --- a/tests/date/good/durations.catala_en +++ b/tests/date/good/durations.catala_en @@ -28,22 +28,22 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│m = [11874 days] -│m2 = [6 months] -│x = 2019-01-01 -│y = 2002-09-30 -│z = true -│z2 = true -│z3 = [5937 days] +│ m = [11874 days] +│ m2 = [6 months] +│ x = 2019-01-01 +│ y = 2002-09-30 +│ z = true +│ z2 = true +│ z3 = [5937 days] └─ ``` diff --git a/tests/date/good/rounding_option_en.catala_en b/tests/date/good/rounding_option_en.catala_en index 26762202b..040be03ef 100644 --- a/tests/date/good/rounding_option_en.catala_en +++ b/tests/date/good/rounding_option_en.catala_en @@ -27,16 +27,16 @@ scope Test: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala test-scope Test ┌─[RESULT]─ -│r = true +│ r = true └─ ``` diff --git a/tests/date/good/rounding_option_fr.catala_fr b/tests/date/good/rounding_option_fr.catala_fr index ac0e9656d..9c129a43b 100644 --- a/tests/date/good/rounding_option_fr.catala_fr +++ b/tests/date/good/rounding_option_fr.catala_fr @@ -27,16 +27,16 @@ champ d'application Test: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala test-scope Test ┌─[RESULT]─ -│r = vrai +│ r = vrai └─ ``` diff --git a/tests/date/good/simple.catala_en b/tests/date/good/simple.catala_en index bbd4efd5e..388c23fee 100644 --- a/tests/date/good/simple.catala_en +++ b/tests/date/good/simple.catala_en @@ -17,18 +17,18 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│x = 2019-01-01 -│y = 2002-09-30 -│z = [5937 days] +│ x = 2019-01-01 +│ y = 2002-09-30 +│ z = [5937 days] └─ ``` diff --git a/tests/dec/good/infinite_precision.catala_en b/tests/dec/good/infinite_precision.catala_en index 2f82c0566..f7da19658 100644 --- a/tests/dec/good/infinite_precision.catala_en +++ b/tests/dec/good/infinite_precision.catala_en @@ -19,20 +19,20 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│a = -│ -0.000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,078,695,580,959,228,473,468… -│x = 84.648,665,652,656,896,23 -│y = -4.368,297,787,053,206,549,8 -│z = 654,265,429,805,103,220,650,980,650.5… +│ a = +│ -0.000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,078,695,580,959,228,473,468… +│ x = 84.648,665,652,656,896,23 +│ y = -4.368,297,787,053,206,549,8 +│ z = 654,265,429,805,103,220,650,980,650.5… └─ ``` diff --git a/tests/dec/good/rounding.catala_en b/tests/dec/good/rounding.catala_en index 0f2fd4996..da82f7d6b 100644 --- a/tests/dec/good/rounding.catala_en +++ b/tests/dec/good/rounding.catala_en @@ -19,19 +19,19 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│x = 84.648,665 -│x1 = 85.0 -│y = 4.368,297 -│y1 = 4.0 +│ x = 84.648,665 +│ x1 = 85.0 +│ y = 4.368,297 +│ y1 = 4.0 └─ ``` diff --git a/tests/dec/good/simple.catala_en b/tests/dec/good/simple.catala_en index a1e1f271a..c122f9477 100644 --- a/tests/dec/good/simple.catala_en +++ b/tests/dec/good/simple.catala_en @@ -19,19 +19,19 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│k = 0.333,333,333,333,333,333,33… -│x = 84.648,665 -│y = 4.368,297 -│z = 19.377,955,528,206,987,757… +│ k = 0.333,333,333,333,333,333,33… +│ x = 84.648,665 +│ y = 4.368,297 +│ z = 19.377,955,528,206,987,757… └─ ``` diff --git a/tests/dec/good/zero_after_comma.catala_en b/tests/dec/good/zero_after_comma.catala_en index 5bc7fdb2a..72f1b628f 100644 --- a/tests/dec/good/zero_after_comma.catala_en +++ b/tests/dec/good/zero_after_comma.catala_en @@ -16,17 +16,17 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│x = 4.0 -│y = 1.04 +│ x = 4.0 +│ y = 1.04 └─ ``` diff --git a/tests/default/good/mutliple_definitions.catala_en b/tests/default/good/mutliple_definitions.catala_en index fd3c8fc9f..9b10ad105 100644 --- a/tests/default/good/mutliple_definitions.catala_en +++ b/tests/default/good/mutliple_definitions.catala_en @@ -29,10 +29,10 @@ $ catala Typecheck --check-invariants │ │ ‾‾‾‾‾‾‾‾‾‾‾‾ └─ ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` @@ -54,6 +54,6 @@ $ catala test-scope A │ │ ‾‾‾‾‾‾‾‾‾‾‾‾ └─ ┌─[RESULT]─ -│w = 3 +│ w = 3 └─ ``` diff --git a/tests/enum/bad/useless_wildcard.catala_en b/tests/enum/bad/useless_wildcard.catala_en index b2491d156..2720fcf71 100644 --- a/tests/enum/bad/useless_wildcard.catala_en +++ b/tests/enum/bad/useless_wildcard.catala_en @@ -30,7 +30,7 @@ $ catala test-scope A │ │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ └─ Useless wildcard ┌─[RESULT]─ -│x = Case1 () -│y = 42 +│ x = Case1 () +│ y = 42 └─ ``` diff --git a/tests/enum/good/disambiguated_cases.catala_en b/tests/enum/good/disambiguated_cases.catala_en index 3ec42e41d..752ba1c4a 100644 --- a/tests/enum/good/disambiguated_cases.catala_en +++ b/tests/enum/good/disambiguated_cases.catala_en @@ -26,18 +26,18 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│e = Case1 () -│f = Case1 2 -│x = 2 +│ e = Case1 () +│ f = Case1 2 +│ x = 2 └─ ``` diff --git a/tests/enum/good/quick_pattern_check.catala_en b/tests/enum/good/quick_pattern_check.catala_en index 888d23ce7..572a070b8 100644 --- a/tests/enum/good/quick_pattern_check.catala_en +++ b/tests/enum/good/quick_pattern_check.catala_en @@ -21,18 +21,18 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│x = Case1 2 -│y = true -│z = false +│ x = Case1 2 +│ y = true +│ z = false └─ ``` diff --git a/tests/enum/good/simple.catala_en b/tests/enum/good/simple.catala_en index 85c06dcd6..a9ce5a065 100644 --- a/tests/enum/good/simple.catala_en +++ b/tests/enum/good/simple.catala_en @@ -21,17 +21,17 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│x = Case1 2 -│y = 42 +│ x = Case1 2 +│ y = 42 └─ ``` diff --git a/tests/enum/good/wildcard.catala_en b/tests/enum/good/wildcard.catala_en index b706ddc52..65b66c42d 100644 --- a/tests/enum/good/wildcard.catala_en +++ b/tests/enum/good/wildcard.catala_en @@ -41,25 +41,25 @@ scope Simple_case_2: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala test-scope Simple_case_2 ┌─[RESULT]─ -│x = Case3 () -│y = 31 +│ x = Case3 () +│ y = 31 └─ ``` ```catala-test-inline $ catala test-scope Simple_case ┌─[RESULT]─ -│x = Case1 2 -│y = 31 +│ x = Case1 2 +│ y = 31 └─ ``` diff --git a/tests/exception/good/context_with_default.catala_en b/tests/exception/good/context_with_default.catala_en index de477b6d8..65f5af60c 100644 --- a/tests/exception/good/context_with_default.catala_en +++ b/tests/exception/good/context_with_default.catala_en @@ -20,16 +20,16 @@ scope Bar: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala test-scope Bar ┌─[RESULT]─ -│Computation successful! +│ Computation successful! └─ ``` diff --git a/tests/exception/good/double_definition.catala_en b/tests/exception/good/double_definition.catala_en index 0e0099a6c..5f4a95ed6 100644 --- a/tests/exception/good/double_definition.catala_en +++ b/tests/exception/good/double_definition.catala_en @@ -31,10 +31,10 @@ $ catala Typecheck --check-invariants │ │ ‾‾‾‾‾‾‾‾‾‾‾‾ └─ Foo ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` diff --git a/tests/exception/good/duplicate_labels.catala_en b/tests/exception/good/duplicate_labels.catala_en index 265166073..44e6caf28 100644 --- a/tests/exception/good/duplicate_labels.catala_en +++ b/tests/exception/good/duplicate_labels.catala_en @@ -23,17 +23,17 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│x = 0 -│y = 0 +│ x = 0 +│ y = 0 └─ ``` diff --git a/tests/exception/good/exception.catala_en b/tests/exception/good/exception.catala_en index 06192e071..e834e455b 100644 --- a/tests/exception/good/exception.catala_en +++ b/tests/exception/good/exception.catala_en @@ -17,16 +17,16 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│x = 1 +│ x = 1 └─ ``` diff --git a/tests/exception/good/exceptions_squared.catala_en b/tests/exception/good/exceptions_squared.catala_en index a031bfe00..76ba6aa7e 100644 --- a/tests/exception/good/exceptions_squared.catala_en +++ b/tests/exception/good/exceptions_squared.catala_en @@ -21,16 +21,16 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│x = 2 +│ x = 2 └─ ``` diff --git a/tests/exception/good/grouped_exceptions.catala_en b/tests/exception/good/grouped_exceptions.catala_en index 55a1b8221..0b3152df9 100644 --- a/tests/exception/good/grouped_exceptions.catala_en +++ b/tests/exception/good/grouped_exceptions.catala_en @@ -51,17 +51,17 @@ scope Benefit: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala test-scope Benefit ┌─[RESULT]─ -│benefit = $2,000.00 -│person = Person { -- age: 26 -- disabled: true } +│ benefit = $2,000.00 +│ person = Person { -- age: 26 -- disabled: true } └─ ``` diff --git a/tests/exception/good/groups_of_exceptions.catala_en b/tests/exception/good/groups_of_exceptions.catala_en index 44ac667d2..bbfea442b 100644 --- a/tests/exception/good/groups_of_exceptions.catala_en +++ b/tests/exception/good/groups_of_exceptions.catala_en @@ -45,17 +45,17 @@ scope Test: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala test-scope Test ┌─[RESULT]─ -│x = 2 +│ x = 2 └─ ``` @@ -86,10 +86,10 @@ let scope Test (x: integer|internal|output) (f: Foo {x: integer}|internal) = ```catala-test-inline $ catala Exceptions -s Foo -v x ┌─[RESULT]─ -│Printing the tree of exceptions for the definitions of variable "x" of scope "Foo". +│ Printing the tree of exceptions for the definitions of variable "x" of scope "Foo". └─ ┌─[RESULT]─ -│Definitions with label "base": +│ Definitions with label "base": │ ├─➤ tests/exception/good/groups_of_exceptions.catala_en:9.3-9.26: │ │ @@ -103,7 +103,7 @@ $ catala Exceptions -s Foo -v x │ │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ └─ Test ┌─[RESULT]─ -│Definitions with label "intermediate": +│ Definitions with label "intermediate": │ ├─➤ tests/exception/good/groups_of_exceptions.catala_en:17.3-17.49: │ │ @@ -117,7 +117,7 @@ $ catala Exceptions -s Foo -v x │ │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ └─ Test ┌─[RESULT]─ -│Definitions with label "exception_to_intermediate": +│ Definitions with label "exception_to_intermediate": │ ├─➤ tests/exception/good/groups_of_exceptions.catala_en:25.3-25.38: │ │ @@ -131,8 +131,8 @@ $ catala Exceptions -s Foo -v x │ │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ └─ Test ┌─[RESULT]─ -│The exception tree structure is as follows: -│ -│"base"───"intermediate"───"exception_to_intermediate" +│ The exception tree structure is as follows: +│ +│ "base"───"intermediate"───"exception_to_intermediate" └─ ``` diff --git a/tests/exception/good/same_label_two_variables.catala_en b/tests/exception/good/same_label_two_variables.catala_en index 27e28761d..f032d4aa1 100644 --- a/tests/exception/good/same_label_two_variables.catala_en +++ b/tests/exception/good/same_label_two_variables.catala_en @@ -24,18 +24,18 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│x = 0 -│y = 1 -│z = 0 +│ x = 0 +│ y = 1 +│ z = 0 └─ ``` diff --git a/tests/exception/good/split_unlabeled_exception.catala_en b/tests/exception/good/split_unlabeled_exception.catala_en index c2f054d75..d02d206a1 100644 --- a/tests/exception/good/split_unlabeled_exception.catala_en +++ b/tests/exception/good/split_unlabeled_exception.catala_en @@ -19,16 +19,16 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│x = 1 +│ x = 1 └─ ``` diff --git a/tests/exception/good/two_exceptions_same_outcome.catala_en b/tests/exception/good/two_exceptions_same_outcome.catala_en index 18c6c6e03..cf024f5db 100644 --- a/tests/exception/good/two_exceptions_same_outcome.catala_en +++ b/tests/exception/good/two_exceptions_same_outcome.catala_en @@ -25,16 +25,16 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│x = 0 +│ x = 0 └─ ``` diff --git a/tests/exception/good/two_unlabeled_exceptions.catala_en b/tests/exception/good/two_unlabeled_exceptions.catala_en index f9268e094..ed97482f1 100644 --- a/tests/exception/good/two_unlabeled_exceptions.catala_en +++ b/tests/exception/good/two_unlabeled_exceptions.catala_en @@ -22,17 +22,17 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│x = 1 -│y = 3 +│ x = 1 +│ y = 3 └─ ``` diff --git a/tests/exception/good/unlabeled_exception.catala_en b/tests/exception/good/unlabeled_exception.catala_en index 142d15deb..8c9021cb0 100644 --- a/tests/exception/good/unlabeled_exception.catala_en +++ b/tests/exception/good/unlabeled_exception.catala_en @@ -16,16 +16,16 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│x = 1 +│ x = 1 └─ ``` diff --git a/tests/exception/good/unsorted_unlabeled_exceptions.catala_en b/tests/exception/good/unsorted_unlabeled_exceptions.catala_en index 0bd0ca9fd..dacafc9a5 100644 --- a/tests/exception/good/unsorted_unlabeled_exceptions.catala_en +++ b/tests/exception/good/unsorted_unlabeled_exceptions.catala_en @@ -22,17 +22,17 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│x = 1 -│y = 2 +│ x = 1 +│ y = 2 └─ ``` diff --git a/tests/func/bad/bad_func.catala_en b/tests/func/bad/bad_func.catala_en index 1c59d85a1..c7faf8f3e 100644 --- a/tests/func/bad/bad_func.catala_en +++ b/tests/func/bad/bad_func.catala_en @@ -24,7 +24,7 @@ scope R: ```catala-test-inline $ catala test-scope R ┌─[RESULT]─ -│r = 30 +│ r = 30 └─ ``` diff --git a/tests/func/good/closure_conversion.catala_en b/tests/func/good/closure_conversion.catala_en index 7918fb8f1..63c85e56b 100644 --- a/tests/func/good/closure_conversion.catala_en +++ b/tests/func/good/closure_conversion.catala_en @@ -16,10 +16,10 @@ scope S: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` diff --git a/tests/func/good/closure_conversion_reduce.catala_en b/tests/func/good/closure_conversion_reduce.catala_en index 6dce1568c..707457625 100644 --- a/tests/func/good/closure_conversion_reduce.catala_en +++ b/tests/func/good/closure_conversion_reduce.catala_en @@ -16,10 +16,10 @@ scope S: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` diff --git a/tests/func/good/closure_return.catala_en b/tests/func/good/closure_return.catala_en index 7dd339cd2..a43d86ffa 100644 --- a/tests/func/good/closure_return.catala_en +++ b/tests/func/good/closure_return.catala_en @@ -14,10 +14,10 @@ scope S: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` diff --git a/tests/func/good/closure_through_scope.catala_en b/tests/func/good/closure_through_scope.catala_en index 1cafb3de6..b38c69bd6 100644 --- a/tests/func/good/closure_through_scope.catala_en +++ b/tests/func/good/closure_through_scope.catala_en @@ -22,10 +22,10 @@ scope T: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` @@ -47,6 +47,6 @@ let scope T (T_in: T_in): T {y: integer} = ```catala-test-inline $ catala Interpret --lcalc -s T --avoid-exceptions -O --closure-conversion ┌─[RESULT]─ -│y = -2 +│ y = -2 └─ ``` diff --git a/tests/func/good/context_func.catala_en b/tests/func/good/context_func.catala_en index 0b537fd5f..22c5911b4 100644 --- a/tests/func/good/context_func.catala_en +++ b/tests/func/good/context_func.catala_en @@ -30,10 +30,10 @@ $ catala Typecheck --check-invariants │ │ ‾ └─ Test ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` diff --git a/tests/func/good/func.catala_en b/tests/func/good/func.catala_en index 7d78dae01..2e2721b28 100644 --- a/tests/func/good/func.catala_en +++ b/tests/func/good/func.catala_en @@ -26,16 +26,16 @@ scope R: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala test-scope R ┌─[RESULT]─ -│r = 30 +│ r = 30 └─ ``` diff --git a/tests/func/good/param_consistency.catala_en b/tests/func/good/param_consistency.catala_en index d2a9bc03a..81df0ab06 100644 --- a/tests/func/good/param_consistency.catala_en +++ b/tests/func/good/param_consistency.catala_en @@ -17,17 +17,17 @@ scope S: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala typecheck ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` @@ -48,8 +48,8 @@ scope T1: ```catala-test-inline $ catala test-scope T1 ┌─[RESULT]─ -│o1 = 20.0 -│o2 = 5.0 +│ o1 = 20.0 +│ o2 = 5.0 └─ ``` @@ -75,6 +75,6 @@ scope T2: ```catala-test-inline $ catala test-scope T2 ┌─[RESULT]─ -│o = 40.0 +│ o = 40.0 └─ ``` diff --git a/tests/func/good/scope_call_func_struct_closure.catala_en b/tests/func/good/scope_call_func_struct_closure.catala_en index 906c25537..83399305c 100644 --- a/tests/func/good/scope_call_func_struct_closure.catala_en +++ b/tests/func/good/scope_call_func_struct_closure.catala_en @@ -45,10 +45,10 @@ two closures in Foo.r are different even with optimizations enabled. ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` @@ -164,6 +164,6 @@ let scope Foo ```catala-test-inline $ catala Interpret --lcalc -s Foo --avoid-exceptions -O --closure-conversion ┌─[RESULT]─ -│z = 11 +│ z = 11 └─ ``` diff --git a/tests/io/good/all_io.catala_en b/tests/io/good/all_io.catala_en index 16bdc23cc..b519447dc 100644 --- a/tests/io/good/all_io.catala_en +++ b/tests/io/good/all_io.catala_en @@ -22,10 +22,10 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` @@ -62,6 +62,6 @@ let scope A ```catala-test-inline $ catala Typecheck ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` diff --git a/tests/io/good/condition_only_input.catala_en b/tests/io/good/condition_only_input.catala_en index 968ecc436..40c30631a 100644 --- a/tests/io/good/condition_only_input.catala_en +++ b/tests/io/good/condition_only_input.catala_en @@ -19,10 +19,10 @@ scope B: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` @@ -43,6 +43,6 @@ let scope B (B_in: B_in): B = ```catala-test-inline $ catala test-scope B ┌─[RESULT]─ -│Computation successful! +│ Computation successful! └─ ``` diff --git a/tests/io/good/subscope.catala_en b/tests/io/good/subscope.catala_en index 6f7b60bc5..4f50ca9b8 100644 --- a/tests/io/good/subscope.catala_en +++ b/tests/io/good/subscope.catala_en @@ -25,10 +25,10 @@ scope B: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` @@ -53,6 +53,6 @@ let scope B (B_in: B_in): B = ```catala-test-inline $ catala Typecheck ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` diff --git a/tests/literate/good/test_grave_char_en.catala_en b/tests/literate/good/test_grave_char_en.catala_en index 100b1c464..4da62f828 100644 --- a/tests/literate/good/test_grave_char_en.catala_en +++ b/tests/literate/good/test_grave_char_en.catala_en @@ -34,24 +34,24 @@ int main(void) { return 0; } ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│literate_parsing_is_ok = true +│ literate_parsing_is_ok = true └─ ``` ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│literate_parsing_is_ok = true +│ literate_parsing_is_ok = true └─ ``` @@ -98,24 +98,24 @@ int main(void) { return 0; } \begin{verbatim} $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ \end{verbatim} \begin{verbatim} $ catala test-scope A ┌─[RESULT]─ -│literate_parsing_is_ok = true +│ literate_parsing_is_ok = true └─ \end{verbatim} \begin{verbatim} $ catala test-scope A ┌─[RESULT]─ -│literate_parsing_is_ok = true +│ literate_parsing_is_ok = true └─ \end{verbatim} ``` diff --git a/tests/literate/good/test_grave_char_fr.catala_fr b/tests/literate/good/test_grave_char_fr.catala_fr index ad29196e9..df5930787 100644 --- a/tests/literate/good/test_grave_char_fr.catala_fr +++ b/tests/literate/good/test_grave_char_fr.catala_fr @@ -32,16 +32,16 @@ int main(void) { return 0; } ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│literate_parsing_is_ok = vrai +│ literate_parsing_is_ok = vrai └─ ``` diff --git a/tests/literate/good/test_grave_char_pl.catala_pl b/tests/literate/good/test_grave_char_pl.catala_pl index e77729c00..3f02c39e4 100644 --- a/tests/literate/good/test_grave_char_pl.catala_pl +++ b/tests/literate/good/test_grave_char_pl.catala_pl @@ -30,6 +30,6 @@ int main(void) { return 0; } ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│literate_parsing_is_ok = prawda +│ literate_parsing_is_ok = prawda └─ ``` diff --git a/tests/metadata/good/test_markup_refactoring.catala_en b/tests/metadata/good/test_markup_refactoring.catala_en index a5ef91b22..65421e930 100644 --- a/tests/metadata/good/test_markup_refactoring.catala_en +++ b/tests/metadata/good/test_markup_refactoring.catala_en @@ -33,23 +33,23 @@ scope S2: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala test-scope S2 ┌─[RESULT]─ -│b = B () +│ b = B () └─ ``` ```catala-test-inline $ catala test-scope S ┌─[RESULT]─ -│a = A () +│ a = A () └─ ``` diff --git a/tests/modules/good/external_use.catala_en b/tests/modules/good/external_use.catala_en index 8efb8d07d..71d6bb07d 100644 --- a/tests/modules/good/external_use.catala_en +++ b/tests/modules/good/external_use.catala_en @@ -19,7 +19,7 @@ scope S: ```catala-test-inline $ catala test-scope S ┌─[RESULT]─ -│result1 = [$3.33; $0.83; $0.83; $3.33; $0.83; $0.85] -│result2 = [$3.33; $0.83; $0.83; $3.34; $0.84; $0.83] +│ result1 = [$3.33; $0.83; $0.83; $3.33; $0.83; $0.85] +│ result2 = [$3.33; $0.83; $0.83; $3.34; $0.84; $0.83] └─ ``` diff --git a/tests/modules/good/mod_def.catala_en b/tests/modules/good/mod_def.catala_en index d9661eac4..4b0b1e84f 100644 --- a/tests/modules/good/mod_def.catala_en +++ b/tests/modules/good/mod_def.catala_en @@ -32,17 +32,17 @@ scope S: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala typecheck --disable-warnings ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` diff --git a/tests/modules/good/mod_def_context.catala_en b/tests/modules/good/mod_def_context.catala_en index c060020d4..d2ed55237 100644 --- a/tests/modules/good/mod_def_context.catala_en +++ b/tests/modules/good/mod_def_context.catala_en @@ -61,22 +61,22 @@ scope Stest: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala test-scope Stest ┌─[RESULT]─ -│o1 = S { -- ci: 0 -- cm: $0.00 -- cfun1: -- cfun2: } -│o2 = S { -- ci: 1 -- cm: $1.00 -- cfun1: -- cfun2: } -│x11 = 12.0 -│x12 = 6.0 -│x21 = 8.0 -│x22 = 6.0 +│ o1 = S { -- ci: 0 -- cm: $0.00 -- cfun1: -- cfun2: } +│ o2 = S { -- ci: 1 -- cm: $1.00 -- cfun1: -- cfun2: } +│ x11 = 12.0 +│ x12 = 6.0 +│ x21 = 8.0 +│ x22 = 6.0 └─ ``` @@ -101,10 +101,10 @@ scope TestSubDefault: ```catala-test-inline $ catala test-scope TestSubDefault ┌─[RESULT]─ -│ci = 0 -│cm = $0.00 -│x11 = 12.0 -│x12 = 6.0 +│ ci = 0 +│ cm = $0.00 +│ x11 = 12.0 +│ x12 = 6.0 └─ ``` @@ -130,9 +130,9 @@ scope TestSubOverride: ```catala-test-inline $ catala test-scope TestSubOverride ┌─[RESULT]─ -│ci = 1 -│cm = $1.00 -│x21 = 8.0 -│x22 = 6.0 +│ ci = 1 +│ cm = $1.00 +│ x21 = 8.0 +│ x22 = 6.0 └─ ``` diff --git a/tests/modules/good/mod_middle.catala_en b/tests/modules/good/mod_middle.catala_en index 9a70c1e29..ebf36ec5f 100644 --- a/tests/modules/good/mod_middle.catala_en +++ b/tests/modules/good/mod_middle.catala_en @@ -22,16 +22,16 @@ scope S: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala typecheck ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` diff --git a/tests/modules/good/mod_use.catala_en b/tests/modules/good/mod_use.catala_en index c273a374b..1c7796843 100644 --- a/tests/modules/good/mod_use.catala_en +++ b/tests/modules/good/mod_use.catala_en @@ -28,19 +28,19 @@ scope T2: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala test-scope T2 ┌─[RESULT]─ -│o1 = No () -│o2 = Maybe () -│o3 = $1,000.00 -│o4 = 5.0 +│ o1 = No () +│ o2 = Maybe () +│ o3 = $1,000.00 +│ o4 = 5.0 └─ ``` diff --git a/tests/modules/good/mod_use2.catala_en b/tests/modules/good/mod_use2.catala_en index fdc80716f..6dd799295 100644 --- a/tests/modules/good/mod_use2.catala_en +++ b/tests/modules/good/mod_use2.catala_en @@ -20,19 +20,19 @@ scope T: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala test-scope T ┌─[RESULT]─ -│o1 = Mod_def.S { -- sr: $1,000.00 -- e1: Maybe () } -│o2 = $2,500.00 -│o3 = $132.00 +│ o1 = Mod_def.S { -- sr: $1,000.00 -- e1: Maybe () } +│ o2 = $2,500.00 +│ o3 = $132.00 └─ ``` @@ -43,9 +43,9 @@ The following tests multiple inclusion of the same module (Mod_def is used throu ```catala-test-inline $ catala test-scope T2 ┌─[RESULT]─ -│o1 = No () -│o2 = Maybe () -│o3 = $1,000.00 -│o4 = 5.0 +│ o1 = No () +│ o2 = Maybe () +│ o3 = $1,000.00 +│ o4 = 5.0 └─ ``` diff --git a/tests/modules/good/mod_use3.catala_en b/tests/modules/good/mod_use3.catala_en index 0c521ea71..640b23a24 100644 --- a/tests/modules/good/mod_use3.catala_en +++ b/tests/modules/good/mod_use3.catala_en @@ -24,18 +24,18 @@ scope T: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala test-scope T ┌─[RESULT]─ -│o1 = Mod_def.S { -- sr: $1,000.00 -- e1: Maybe () } -│o2 = $2,500.00 -│o3 = $132.00 +│ o1 = Mod_def.S { -- sr: $1,000.00 -- e1: Maybe () } +│ o2 = $2,500.00 +│ o3 = $132.00 └─ ``` diff --git a/tests/modules/good/mod_use_context.catala_en b/tests/modules/good/mod_use_context.catala_en index abb5a230b..a7255ebcf 100644 --- a/tests/modules/good/mod_use_context.catala_en +++ b/tests/modules/good/mod_use_context.catala_en @@ -45,34 +45,34 @@ scope TestCall: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala test-scope TestCall ┌─[RESULT]─ -│o_default = -│ Mod_def_context.S { -│ -- ci: 0 -│ -- cm: $0.00 -│ -- cfun1: -│ -- cfun2: -│ } -│o_override = -│ Mod_def_context.S { -│ -- ci: 1 -│ -- cm: $1.00 -│ -- cfun1: -│ -- cfun2: -│ } -│x11 = 12.0 -│x12 = 6.0 -│x21 = 8.0 -│x22 = 6.0 +│ o_default = +│ Mod_def_context.S { +│ -- ci: 0 +│ -- cm: $0.00 +│ -- cfun1: +│ -- cfun2: +│ } +│ o_override = +│ Mod_def_context.S { +│ -- ci: 1 +│ -- cm: $1.00 +│ -- cfun1: +│ -- cfun2: +│ } +│ x11 = 12.0 +│ x12 = 6.0 +│ x21 = 8.0 +│ x22 = 6.0 └─ ``` @@ -98,10 +98,10 @@ scope TestSubDefault: ```catala-test-inline $ catala test-scope TestSubDefault ┌─[RESULT]─ -│ci = 0 -│cm = $0.00 -│x11 = 12.0 -│x12 = 6.0 +│ ci = 0 +│ cm = $0.00 +│ x11 = 12.0 +│ x12 = 6.0 └─ ``` @@ -127,9 +127,9 @@ scope TestSubOverride: ```catala-test-inline $ catala test-scope TestSubOverride ┌─[RESULT]─ -│ci = 1 -│cm = $1.00 -│x21 = 8.0 -│x22 = 6.0 +│ ci = 1 +│ cm = $1.00 +│ x21 = 8.0 +│ x22 = 6.0 └─ ``` diff --git a/tests/modules/good/prorata_syntax.catala_en b/tests/modules/good/prorata_syntax.catala_en index 074a71c71..528e6a863 100644 --- a/tests/modules/good/prorata_syntax.catala_en +++ b/tests/modules/good/prorata_syntax.catala_en @@ -37,33 +37,33 @@ scope S: ```catala-test-inline $ catala typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala test-scope S ┌─[RESULT]─ -│result = -│ [ -│ HouseholdMemberTaxed { -│ -- member: -│ HouseholdMember { -- birthdate: 2000-01-01 -- revenue: $10,000.00 } -│ -- tax: $270.27 -│ }; -│ HouseholdMemberTaxed { -│ -- member: -│ HouseholdMember { -- birthdate: 2000-01-02 -- revenue: $1,000.00 } -│ -- tax: $27.03 -│ }; -│ HouseholdMemberTaxed { -│ -- member: -│ HouseholdMember { -- birthdate: 2000-01-02 -- revenue: $100.00 } -│ -- tax: $2.70 -│ } -│ ] +│ result = +│ [ +│ HouseholdMemberTaxed { +│ -- member: +│ HouseholdMember { -- birthdate: 2000-01-01 -- revenue: $10,000.00 } +│ -- tax: $270.27 +│ }; +│ HouseholdMemberTaxed { +│ -- member: +│ HouseholdMember { -- birthdate: 2000-01-02 -- revenue: $1,000.00 } +│ -- tax: $27.03 +│ }; +│ HouseholdMemberTaxed { +│ -- member: +│ HouseholdMember { -- birthdate: 2000-01-02 -- revenue: $100.00 } +│ -- tax: $2.70 +│ } +│ ] └─ ``` diff --git a/tests/money/good/literal_parsing.catala_en b/tests/money/good/literal_parsing.catala_en index 5d20f6431..0d1be5e7f 100644 --- a/tests/money/good/literal_parsing.catala_en +++ b/tests/money/good/literal_parsing.catala_en @@ -16,17 +16,17 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│x = $0.30 -│y = -$0.30 +│ x = $0.30 +│ y = -$0.30 └─ ``` diff --git a/tests/money/good/simple.catala_en b/tests/money/good/simple.catala_en index f6b8d11ab..b45400b4f 100644 --- a/tests/money/good/simple.catala_en +++ b/tests/money/good/simple.catala_en @@ -17,18 +17,18 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│x = $123.54 -│y = $8,548,650.96 -│z = $7.23 +│ x = $123.54 +│ y = $8,548,650.96 +│ z = $7.23 └─ ``` diff --git a/tests/name_resolution/good/let_in.catala_en b/tests/name_resolution/good/let_in.catala_en index f4817d2a1..6628b96e1 100644 --- a/tests/name_resolution/good/let_in.catala_en +++ b/tests/name_resolution/good/let_in.catala_en @@ -30,18 +30,18 @@ scope S: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala test-scope S ┌─[RESULT]─ -│a = A { -- x: -2.0 -- y: B { -- y: false -- z: -1.0 } } -│b = B { -- y: true -- z: 42.0 } +│ a = A { -- x: -2.0 -- y: B { -- y: false -- z: -1.0 } } +│ b = B { -- y: true -- z: 42.0 } └─ ``` @@ -71,6 +71,6 @@ $ catala test-scope S2 │ │ ‾ └─ Check scope of let-in vs scope variable ┌─[RESULT]─ -│y = 1 +│ y = 1 └─ ``` diff --git a/tests/name_resolution/good/let_in2.catala_en b/tests/name_resolution/good/let_in2.catala_en index 6b41d0630..2253a9ff7 100644 --- a/tests/name_resolution/good/let_in2.catala_en +++ b/tests/name_resolution/good/let_in2.catala_en @@ -18,17 +18,17 @@ scope S: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala test-scope S ┌─[RESULT]─ -│a = true +│ a = true └─ ``` diff --git a/tests/name_resolution/good/out_of_order.catala_en b/tests/name_resolution/good/out_of_order.catala_en index 791b1e1dd..ef71bccde 100644 --- a/tests/name_resolution/good/out_of_order.catala_en +++ b/tests/name_resolution/good/out_of_order.catala_en @@ -23,17 +23,17 @@ scope S: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala test-scope S ┌─[RESULT]─ -│a = A { -- x: 0 -- y: B { -- y: true -- z: 0.0 } } -│b = B { -- y: true -- z: 0.0 } +│ a = A { -- x: 0 -- y: B { -- y: true -- z: 0.0 } } +│ b = B { -- y: true -- z: 0.0 } └─ ``` diff --git a/tests/name_resolution/good/toplevel_defs.catala_en b/tests/name_resolution/good/toplevel_defs.catala_en index 41c49889d..022b4421e 100644 --- a/tests/name_resolution/good/toplevel_defs.catala_en +++ b/tests/name_resolution/good/toplevel_defs.catala_en @@ -24,18 +24,18 @@ scope S: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala test-scope S ┌─[RESULT]─ -│a = 1,946.574,4 -│b = A { -- y: true -- z: 2,091.0 } +│ a = 1,946.574,4 +│ b = A { -- y: true -- z: 2,091.0 } └─ ``` @@ -56,7 +56,7 @@ scope S2: ```catala-test-inline $ catala test-scope S2 ┌─[RESULT]─ -│a = 154.0 +│ a = 154.0 └─ ``` @@ -77,7 +77,7 @@ scope S3: ```catala-test-inline $ catala test-scope S3 ┌─[RESULT]─ -│a = 2,480.0 +│ a = 2,480.0 └─ ``` @@ -101,7 +101,7 @@ scope S4: ```catala-test-inline $ catala test-scope S4 ┌─[RESULT]─ -│a = 6,001.0 +│ a = 6,001.0 └─ ``` diff --git a/tests/name_resolution/good/toplevel_defs_simple.catala_en b/tests/name_resolution/good/toplevel_defs_simple.catala_en index 36fb02785..2563b02e1 100644 --- a/tests/name_resolution/good/toplevel_defs_simple.catala_en +++ b/tests/name_resolution/good/toplevel_defs_simple.catala_en @@ -15,16 +15,16 @@ scope S: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala test-scope S ┌─[RESULT]─ -│a = true +│ a = true └─ ``` diff --git a/tests/proof/good/array_length.catala_en b/tests/proof/good/array_length.catala_en index 4e0eb0d7d..e4317f7ac 100644 --- a/tests/proof/good/array_length.catala_en +++ b/tests/proof/good/array_length.catala_en @@ -16,16 +16,16 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala Proof --disable-counterexamples ┌─[RESULT]─ -│No errors found during the proof mode run. +│ No errors found during the proof mode run. └─ ``` diff --git a/tests/proof/good/assert.catala_en b/tests/proof/good/assert.catala_en index 7aeb8a72d..2281dcd02 100644 --- a/tests/proof/good/assert.catala_en +++ b/tests/proof/good/assert.catala_en @@ -27,16 +27,16 @@ scope Foo: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala Proof --disable-counterexamples ┌─[RESULT]─ -│No errors found during the proof mode run. +│ No errors found during the proof mode run. └─ ``` diff --git a/tests/proof/good/dates_get_year.catala_en b/tests/proof/good/dates_get_year.catala_en index 1b0310e7b..164187c25 100644 --- a/tests/proof/good/dates_get_year.catala_en +++ b/tests/proof/good/dates_get_year.catala_en @@ -18,16 +18,16 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala Proof --disable-counterexamples ┌─[RESULT]─ -│No errors found during the proof mode run. +│ No errors found during the proof mode run. └─ ``` diff --git a/tests/proof/good/dates_simple.catala_en b/tests/proof/good/dates_simple.catala_en index 33dcdcba5..f875071f9 100644 --- a/tests/proof/good/dates_simple.catala_en +++ b/tests/proof/good/dates_simple.catala_en @@ -18,16 +18,16 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala Proof --disable-counterexamples ┌─[RESULT]─ -│No errors found during the proof mode run. +│ No errors found during the proof mode run. └─ ``` diff --git a/tests/proof/good/direct_scope_call.catala_en b/tests/proof/good/direct_scope_call.catala_en index c80f1d4ea..17599d20f 100644 --- a/tests/proof/good/direct_scope_call.catala_en +++ b/tests/proof/good/direct_scope_call.catala_en @@ -19,16 +19,16 @@ scope Foo: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala Proof -s Foo ┌─[RESULT]─ -│No errors found during the proof mode run. +│ No errors found during the proof mode run. └─ ``` diff --git a/tests/proof/good/direct_scope_call_with_context.catala_en b/tests/proof/good/direct_scope_call_with_context.catala_en index 75f95616f..bc06c295e 100644 --- a/tests/proof/good/direct_scope_call_with_context.catala_en +++ b/tests/proof/good/direct_scope_call_with_context.catala_en @@ -20,16 +20,16 @@ scope Foo: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala Proof -s Foo ┌─[RESULT]─ -│No errors found during the proof mode run. +│ No errors found during the proof mode run. └─ ``` diff --git a/tests/proof/good/duration.catala_en b/tests/proof/good/duration.catala_en index a9a1a3542..65b6cfe76 100644 --- a/tests/proof/good/duration.catala_en +++ b/tests/proof/good/duration.catala_en @@ -16,16 +16,16 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala Proof --disable-counterexamples ┌─[RESULT]─ -│No errors found during the proof mode run. +│ No errors found during the proof mode run. └─ ``` diff --git a/tests/proof/good/enums-arith.catala_en b/tests/proof/good/enums-arith.catala_en index 5e0b3a06f..bf7ea0acf 100644 --- a/tests/proof/good/enums-arith.catala_en +++ b/tests/proof/good/enums-arith.catala_en @@ -34,10 +34,10 @@ $ catala Typecheck --check-invariants │ │ ‾ └─ Test ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` @@ -54,6 +54,6 @@ $ catala Proof --disable-counterexamples │ │ ‾ └─ Test ┌─[RESULT]─ -│No errors found during the proof mode run. +│ No errors found during the proof mode run. └─ ``` diff --git a/tests/proof/good/enums-nonbool.catala_en b/tests/proof/good/enums-nonbool.catala_en index f7ec358c6..9b830e69c 100644 --- a/tests/proof/good/enums-nonbool.catala_en +++ b/tests/proof/good/enums-nonbool.catala_en @@ -34,10 +34,10 @@ $ catala Typecheck --check-invariants │ │ ‾ └─ Test ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` @@ -54,6 +54,6 @@ $ catala Proof --disable-counterexamples │ │ ‾ └─ Test ┌─[RESULT]─ -│No errors found during the proof mode run. +│ No errors found during the proof mode run. └─ ``` diff --git a/tests/proof/good/enums.catala_en b/tests/proof/good/enums.catala_en index d1a9699a3..05bca9c0c 100644 --- a/tests/proof/good/enums.catala_en +++ b/tests/proof/good/enums.catala_en @@ -33,10 +33,10 @@ $ catala Typecheck --check-invariants │ │ ‾ └─ Test ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` @@ -53,6 +53,6 @@ $ catala Proof --disable-counterexamples │ │ ‾ └─ Test ┌─[RESULT]─ -│No errors found during the proof mode run. +│ No errors found during the proof mode run. └─ ``` diff --git a/tests/proof/good/enums_inj.catala_en b/tests/proof/good/enums_inj.catala_en index 02b627cca..3166fb699 100644 --- a/tests/proof/good/enums_inj.catala_en +++ b/tests/proof/good/enums_inj.catala_en @@ -20,16 +20,16 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala Proof --disable-counterexamples ┌─[RESULT]─ -│No errors found during the proof mode run. +│ No errors found during the proof mode run. └─ ``` diff --git a/tests/proof/good/enums_unit.catala_en b/tests/proof/good/enums_unit.catala_en index fc794d4a2..7f4a2ffa0 100644 --- a/tests/proof/good/enums_unit.catala_en +++ b/tests/proof/good/enums_unit.catala_en @@ -24,16 +24,16 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala Proof --disable-counterexamples ┌─[RESULT]─ -│No errors found during the proof mode run. +│ No errors found during the proof mode run. └─ ``` diff --git a/tests/proof/good/functions.catala_en b/tests/proof/good/functions.catala_en index e82a25305..29f9444a9 100644 --- a/tests/proof/good/functions.catala_en +++ b/tests/proof/good/functions.catala_en @@ -17,16 +17,16 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala Proof --disable-counterexamples ┌─[RESULT]─ -│No errors found during the proof mode run. +│ No errors found during the proof mode run. └─ ``` diff --git a/tests/proof/good/let_in_condition.catala_en b/tests/proof/good/let_in_condition.catala_en index 018e9be62..54a3ee1c8 100644 --- a/tests/proof/good/let_in_condition.catala_en +++ b/tests/proof/good/let_in_condition.catala_en @@ -16,16 +16,16 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala Proof --disable-counterexamples ┌─[RESULT]─ -│No errors found during the proof mode run. +│ No errors found during the proof mode run. └─ ``` diff --git a/tests/proof/good/money.catala_en b/tests/proof/good/money.catala_en index 1df8e1961..b08992ff5 100644 --- a/tests/proof/good/money.catala_en +++ b/tests/proof/good/money.catala_en @@ -18,16 +18,16 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala Proof --disable-counterexamples ┌─[RESULT]─ -│No errors found during the proof mode run. +│ No errors found during the proof mode run. └─ ``` diff --git a/tests/proof/good/no_vars.catala_en b/tests/proof/good/no_vars.catala_en index 8b359dbf3..4e491be27 100644 --- a/tests/proof/good/no_vars.catala_en +++ b/tests/proof/good/no_vars.catala_en @@ -13,16 +13,16 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala Proof --disable-counterexamples ┌─[RESULT]─ -│No errors found during the proof mode run. +│ No errors found during the proof mode run. └─ ``` diff --git a/tests/proof/good/rationals.catala_en b/tests/proof/good/rationals.catala_en index 6c9926856..fad466211 100644 --- a/tests/proof/good/rationals.catala_en +++ b/tests/proof/good/rationals.catala_en @@ -16,16 +16,16 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala Proof --disable-counterexamples ┌─[RESULT]─ -│No errors found during the proof mode run. +│ No errors found during the proof mode run. └─ ``` diff --git a/tests/proof/good/simple_vars.catala_en b/tests/proof/good/simple_vars.catala_en index 071cf652b..b7e8eac1f 100644 --- a/tests/proof/good/simple_vars.catala_en +++ b/tests/proof/good/simple_vars.catala_en @@ -19,16 +19,16 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala Proof --disable-counterexamples ┌─[RESULT]─ -│No errors found during the proof mode run. +│ No errors found during the proof mode run. └─ ``` diff --git a/tests/proof/good/structs.catala_en b/tests/proof/good/structs.catala_en index 75bcc3158..3fc9915c1 100644 --- a/tests/proof/good/structs.catala_en +++ b/tests/proof/good/structs.catala_en @@ -23,16 +23,16 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala Proof --disable-counterexamples ┌─[RESULT]─ -│No errors found during the proof mode run. +│ No errors found during the proof mode run. └─ ``` diff --git a/tests/scope/good/191_fix_record_name_confusion.catala_en b/tests/scope/good/191_fix_record_name_confusion.catala_en index 144f82180..7a4a8450c 100644 --- a/tests/scope/good/191_fix_record_name_confusion.catala_en +++ b/tests/scope/good/191_fix_record_name_confusion.catala_en @@ -20,10 +20,10 @@ scope ScopeB: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` diff --git a/tests/scope/good/grand_parent_caller.catala_en b/tests/scope/good/grand_parent_caller.catala_en index 794e1da3b..42d1eb9bd 100644 --- a/tests/scope/good/grand_parent_caller.catala_en +++ b/tests/scope/good/grand_parent_caller.catala_en @@ -34,32 +34,32 @@ scope C: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│x = 0 +│ x = 0 └─ ``` ```catala-test-inline $ catala test-scope B ┌─[RESULT]─ -│y1 = 1 -│y2 = 1 +│ y1 = 1 +│ y2 = 1 └─ ``` ```catala-test-inline $ catala test-scope C ┌─[RESULT]─ -│z1 = 2 -│z2 = 2 +│ z1 = 2 +│ z2 = 2 └─ ``` diff --git a/tests/scope/good/local-capture-subscope.catala_en b/tests/scope/good/local-capture-subscope.catala_en index e6e6dd92d..fb18172ba 100644 --- a/tests/scope/good/local-capture-subscope.catala_en +++ b/tests/scope/good/local-capture-subscope.catala_en @@ -31,7 +31,7 @@ $ catala test-scope S │ │ ‾ └─ ┌─[RESULT]─ -│so = 42 +│ so = 42 └─ ``` diff --git a/tests/scope/good/nothing.catala_en b/tests/scope/good/nothing.catala_en index 2984aad66..21a0916d1 100644 --- a/tests/scope/good/nothing.catala_en +++ b/tests/scope/good/nothing.catala_en @@ -20,10 +20,10 @@ $ catala Typecheck --check-invariants │ │ ‾‾‾ └─ Test ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` diff --git a/tests/scope/good/out_sub_scope.catala_en b/tests/scope/good/out_sub_scope.catala_en index f91f20673..3c075d3d1 100644 --- a/tests/scope/good/out_sub_scope.catala_en +++ b/tests/scope/good/out_sub_scope.catala_en @@ -22,7 +22,7 @@ scope B: ```catala-test-inline $ catala test-scope B ┌─[RESULT]─ -│a = A { -- o: 99 -- io: 100 } -│b = 99 +│ a = A { -- o: 99 -- io: 100 } +│ b = 99 └─ ``` diff --git a/tests/scope/good/scope_call.catala_en b/tests/scope/good/scope_call.catala_en index da8ee52f8..5532ae527 100644 --- a/tests/scope/good/scope_call.catala_en +++ b/tests/scope/good/scope_call.catala_en @@ -25,16 +25,16 @@ scope Foo: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala test-scope Foo ┌─[RESULT]─ -│example = -7 +│ example = -7 └─ ``` diff --git a/tests/scope/good/scope_call2.catala_en b/tests/scope/good/scope_call2.catala_en index c5bb58265..30d4e1572 100644 --- a/tests/scope/good/scope_call2.catala_en +++ b/tests/scope/good/scope_call2.catala_en @@ -33,10 +33,10 @@ $ catala Typecheck --check-invariants │ │ ‾‾‾‾ └─ ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` @@ -53,7 +53,7 @@ $ catala test-scope Titi │ │ ‾‾‾‾ └─ ┌─[RESULT]─ -│fizz = Toto { -- foo: 1,213 } -│fuzz = Toto { -- foo: 1,323 } +│ fizz = Toto { -- foo: 1,213 } +│ fuzz = Toto { -- foo: 1,323 } └─ ``` diff --git a/tests/scope/good/scope_call3.catala_en b/tests/scope/good/scope_call3.catala_en index 4c5af2099..c43a290c2 100644 --- a/tests/scope/good/scope_call3.catala_en +++ b/tests/scope/good/scope_call3.catala_en @@ -21,10 +21,10 @@ scope RentComputation: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` @@ -91,29 +91,29 @@ $ catala Interpret -t -s HousingComputation --debug [LOG] ≔ HousingComputation.result: 3 [DEBUG] End of interpretation ┌─[RESULT]─ -│f = λ (x: integer) → -│ error_empty -│ ⟨ ⟨true -│ ⊢ ⟨(let result : RentComputation = -│ (λ (RentComputation_in: RentComputation_in) → -│ let g : integer → integer = -│ λ (x1: integer) → -│ error_empty ⟨ ⟨true ⊢ ⟨x1 + 1⟩⟩ | false ⊢ ∅ ⟩ -│ in -│ let f : integer → integer = -│ λ (x1: integer) → -│ error_empty ⟨ ⟨true ⊢ ⟨g (x1 + 1)⟩⟩ | false ⊢ ∅ ⟩ -│ in -│ { RentComputation f = f; }) -│ {RentComputation_in} -│ in -│ let result1 : RentComputation = -│ { RentComputation f = λ (param0: integer) → result.f param0; } -│ in -│ if true then result1 else result1). -│ f -│ x⟩⟩ -│ | false ⊢ ∅ ⟩ -│result = 3 +│ f = λ (x: integer) → +│ error_empty +│ ⟨ ⟨true +│ ⊢ ⟨(let result : RentComputation = +│ (λ (RentComputation_in: RentComputation_in) → +│ let g : integer → integer = +│ λ (x1: integer) → +│ error_empty ⟨ ⟨true ⊢ ⟨x1 + 1⟩⟩ | false ⊢ ∅ ⟩ +│ in +│ let f : integer → integer = +│ λ (x1: integer) → +│ error_empty ⟨ ⟨true ⊢ ⟨g (x1 + 1)⟩⟩ | false ⊢ ∅ ⟩ +│ in +│ { RentComputation f = f; }) +│ {RentComputation_in} +│ in +│ let result1 : RentComputation = +│ { RentComputation f = λ (param0: integer) → result.f param0; } +│ in +│ if true then result1 else result1). +│ f +│ x⟩⟩ +│ | false ⊢ ∅ ⟩ +│ result = 3 └─ ``` diff --git a/tests/scope/good/scope_call4.catala_en b/tests/scope/good/scope_call4.catala_en index f59a9081c..e9fb67f05 100644 --- a/tests/scope/good/scope_call4.catala_en +++ b/tests/scope/good/scope_call4.catala_en @@ -27,10 +27,10 @@ scope RentComputation: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` @@ -52,18 +52,18 @@ $ catala interpret -s RentComputation --debug [DEBUG] Starting interpretation... [DEBUG] End of interpretation ┌─[RESULT]─ -│f1 = λ (x: integer) → -│ error_empty -│ ⟨ ⟨true -│ ⊢ ⟨let x1 : integer = x + 1 in -│ error_empty ⟨ ⟨true ⊢ ⟨x1 + 1⟩⟩ | false ⊢ ∅ ⟩⟩⟩ -│ | false ⊢ ∅ ⟩ -│f2 = λ (x: integer) → -│ error_empty -│ ⟨ ⟨true -│ ⊢ ⟨let x1 : integer = x + 1 in -│ error_empty ⟨ ⟨true ⊢ ⟨x1 + 1⟩⟩ | false ⊢ ∅ ⟩⟩⟩ -│ | false ⊢ ∅ ⟩ +│ f1 = λ (x: integer) → +│ error_empty +│ ⟨ ⟨true +│ ⊢ ⟨let x1 : integer = x + 1 in +│ error_empty ⟨ ⟨true ⊢ ⟨x1 + 1⟩⟩ | false ⊢ ∅ ⟩⟩⟩ +│ | false ⊢ ∅ ⟩ +│ f2 = λ (x: integer) → +│ error_empty +│ ⟨ ⟨true +│ ⊢ ⟨let x1 : integer = x + 1 in +│ error_empty ⟨ ⟨true ⊢ ⟨x1 + 1⟩⟩ | false ⊢ ∅ ⟩⟩⟩ +│ | false ⊢ ∅ ⟩ └─ ``` @@ -89,9 +89,9 @@ $ catala Interpret --lcalc -s RentComputation --avoid-exceptions --optimize --de [DEBUG] Starting interpretation... [DEBUG] End of interpretation ┌─[RESULT]─ -│f1 = λ (x: integer) → let x1 : integer = x + 1 in -│ ((x1 + 1)) -│f2 = λ (x: integer) → let x1 : integer = x + 1 in -│ ((x1 + 1)) +│ f1 = λ (x: integer) → let x1 : integer = x + 1 in +│ ((x1 + 1)) +│ f2 = λ (x: integer) → let x1 : integer = x + 1 in +│ ((x1 + 1)) └─ ``` diff --git a/tests/scope/good/scope_struct.catala_en b/tests/scope/good/scope_struct.catala_en index c55b62dc8..5bb59630c 100644 --- a/tests/scope/good/scope_struct.catala_en +++ b/tests/scope/good/scope_struct.catala_en @@ -26,16 +26,16 @@ scope Foo: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala test-scope Foo ┌─[RESULT]─ -│example = SubFoo { -- z1: 4 -- z2: 0 } +│ example = SubFoo { -- z1: 4 -- z2: 0 } └─ ``` diff --git a/tests/scope/good/simple.catala_en b/tests/scope/good/simple.catala_en index 4d35fa9e4..4c841d216 100644 --- a/tests/scope/good/simple.catala_en +++ b/tests/scope/good/simple.catala_en @@ -13,10 +13,10 @@ scope Foo: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` diff --git a/tests/scope/good/sub_scope.catala_en b/tests/scope/good/sub_scope.catala_en index 4902f3a7a..e00ac57ad 100644 --- a/tests/scope/good/sub_scope.catala_en +++ b/tests/scope/good/sub_scope.catala_en @@ -28,26 +28,26 @@ scope B: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│a = -1 -│a_base = 1 -│b = false +│ a = -1 +│ a_base = 1 +│ b = false └─ ``` ```catala-test-inline $ catala test-scope B ┌─[RESULT]─ -│a = 42 -│b = true +│ a = 42 +│ b = true └─ ``` diff --git a/tests/scope/good/sub_sub_scope.catala_en b/tests/scope/good/sub_sub_scope.catala_en index 8c678b5cf..93836ce1e 100644 --- a/tests/scope/good/sub_sub_scope.catala_en +++ b/tests/scope/good/sub_sub_scope.catala_en @@ -55,10 +55,10 @@ $ catala Typecheck --check-invariants │ │ ‾ └─ Article ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` @@ -85,8 +85,8 @@ $ catala test-scope A │ │ ‾ └─ Article ┌─[RESULT]─ -│u = true -│x = 0 +│ u = true +│ x = 0 └─ ``` @@ -113,7 +113,7 @@ $ catala test-scope B │ │ ‾ └─ Article ┌─[RESULT]─ -│y = 1 +│ y = 1 └─ ``` @@ -140,6 +140,6 @@ $ catala test-scope C │ │ ‾ └─ Article ┌─[RESULT]─ -│z = 2 +│ z = 2 └─ ``` diff --git a/tests/scope/good/subscope_function_arg_not_defined.catala_en b/tests/scope/good/subscope_function_arg_not_defined.catala_en index 07227b53d..8add58236 100644 --- a/tests/scope/good/subscope_function_arg_not_defined.catala_en +++ b/tests/scope/good/subscope_function_arg_not_defined.catala_en @@ -22,16 +22,16 @@ scope Caller: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala test-scope Caller ┌─[RESULT]─ -│y = 1 +│ y = 1 └─ ``` diff --git a/tests/scope/good/subscope_function_arg_not_defined2.catala_en b/tests/scope/good/subscope_function_arg_not_defined2.catala_en index 3338e4c95..6324923fd 100644 --- a/tests/scope/good/subscope_function_arg_not_defined2.catala_en +++ b/tests/scope/good/subscope_function_arg_not_defined2.catala_en @@ -24,16 +24,16 @@ scope Caller: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala test-scope Caller ┌─[RESULT]─ -│Computation successful! +│ Computation successful! └─ ``` diff --git a/tests/struct/good/ambiguous_fields.catala_en b/tests/struct/good/ambiguous_fields.catala_en index 1eb57affc..80f513b7a 100644 --- a/tests/struct/good/ambiguous_fields.catala_en +++ b/tests/struct/good/ambiguous_fields.catala_en @@ -30,10 +30,10 @@ $ catala Typecheck --check-invariants │ │ ‾‾‾ └─ Article ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` @@ -49,6 +49,6 @@ $ catala test-scope A │ │ ‾‾‾ └─ Article ┌─[RESULT]─ -│y = 1 +│ y = 1 └─ ``` diff --git a/tests/struct/good/nested3.catala_en b/tests/struct/good/nested3.catala_en index 17436c2db..8f82bf2c4 100644 --- a/tests/struct/good/nested3.catala_en +++ b/tests/struct/good/nested3.catala_en @@ -39,24 +39,24 @@ scope B: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│t = T { -- a: S { -- x: 0 -- y: false } -- b: S { -- x: 1 -- y: true } } +│ t = T { -- a: S { -- x: 0 -- y: false } -- b: S { -- x: 1 -- y: true } } └─ ``` ```catala-test-inline $ catala test-scope B ┌─[RESULT]─ -│out = 1 -│t = T { -- a: S { -- x: 0 -- y: false } -- b: S { -- x: 1 -- y: true } } +│ out = 1 +│ t = T { -- a: S { -- x: 0 -- y: false } -- b: S { -- x: 1 -- y: true } } └─ ``` diff --git a/tests/struct/good/same_name_fields.catala_en b/tests/struct/good/same_name_fields.catala_en index 36aa0195f..9b6909d40 100644 --- a/tests/struct/good/same_name_fields.catala_en +++ b/tests/struct/good/same_name_fields.catala_en @@ -30,10 +30,10 @@ $ catala Typecheck --check-invariants │ │ ‾‾‾ └─ Article ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` @@ -49,7 +49,7 @@ $ catala test-scope A │ │ ‾‾‾ └─ Article ┌─[RESULT]─ -│x = Foo { -- f: 1 } -│y = 1 +│ x = Foo { -- f: 1 } +│ y = 1 └─ ``` diff --git a/tests/struct/good/simple.catala_en b/tests/struct/good/simple.catala_en index 48fad35ef..5695498da 100644 --- a/tests/struct/good/simple.catala_en +++ b/tests/struct/good/simple.catala_en @@ -22,17 +22,17 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│s = S { -- x: 1 -- y: 2 } -│z = 3 +│ s = S { -- x: 1 -- y: 2 } +│ z = 3 └─ ``` diff --git a/tests/struct/good/struct_update.catala_en b/tests/struct/good/struct_update.catala_en index c4d9a18db..98a79380a 100644 --- a/tests/struct/good/struct_update.catala_en +++ b/tests/struct/good/struct_update.catala_en @@ -42,10 +42,10 @@ $ catala test-scope S │ │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ └─ ┌─[RESULT]─ -│s1 = Str { -- fld1: 99 -- fld2: $1.00 -- fld3: 2003-01-01 } -│s2 = Str { -- fld1: 0 -- fld2: $99.00 -- fld3: 2003-01-01 } -│s3 = Str { -- fld1: 99 -- fld2: $99.00 -- fld3: 2099-01-01 } -│s4 = Str { -- fld1: 100 -- fld2: $100.00 -- fld3: 2100-01-01 } -│s5 = Str { -- fld1: 100 -- fld2: $99.00 -- fld3: 2100-01-01 } +│ s1 = Str { -- fld1: 99 -- fld2: $1.00 -- fld3: 2003-01-01 } +│ s2 = Str { -- fld1: 0 -- fld2: $99.00 -- fld3: 2003-01-01 } +│ s3 = Str { -- fld1: 99 -- fld2: $99.00 -- fld3: 2099-01-01 } +│ s4 = Str { -- fld1: 100 -- fld2: $100.00 -- fld3: 2100-01-01 } +│ s5 = Str { -- fld1: 100 -- fld2: $99.00 -- fld3: 2100-01-01 } └─ ``` diff --git a/tests/tuples/good/tuples.catala_en b/tests/tuples/good/tuples.catala_en index 5576eeb49..f7d094fb1 100644 --- a/tests/tuples/good/tuples.catala_en +++ b/tests/tuples/good/tuples.catala_en @@ -34,16 +34,16 @@ scope Test: ```catala-test-inline $ catala typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala test-scope Test ┌─[RESULT]─ -│o = (2001-01-03, 6.0) +│ o = (2001-01-03, 6.0) └─ ``` diff --git a/tests/tuples/good/tuplists.catala_en b/tests/tuples/good/tuplists.catala_en index 470c8dbf6..1d35971ea 100644 --- a/tests/tuples/good/tuplists.catala_en +++ b/tests/tuples/good/tuplists.catala_en @@ -44,49 +44,49 @@ scope S: ```catala-test-inline $ catala typecheck ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala test-scope S ┌─[RESULT]─ -│r1 = -│ [ -│ ($120.00, 0.5); ($13.00, 0.005); ($1,400.00, 10.0); -│ ($630.00, 1.826,086,956,521,739,130,4…); ($272.00, 0.68); -│ ($170.00, 0.833,333,333,333,333,333,33…) -│ ] -│r2 = -│ [ -│ ($120.00, 0.5); ($13.00, 0.005); ($1,400.00, 10.0); -│ ($630.00, 1.826,086,956,521,739,130,4…); ($272.00, 0.68); -│ ($170.00, 0.833,333,333,333,333,333,33…) -│ ] -│r3 = -│ [ -│ ($120.00, 0.5); ($13.00, 0.005); ($1,400.00, 10.0); -│ ($630.00, 1.826,086,956,521,739,130,4…); ($272.00, 0.68); -│ ($170.00, 0.833,333,333,333,333,333,33…) -│ ] -│r4 = -│ [ -│ ($120.00, 0.5); ($13.00, 0.005); ($1,400.00, 10.0); -│ ($630.00, 1.826,086,956,521,739,130,4…); ($272.00, 0.68); -│ ($170.00, 0.833,333,333,333,333,333,33…) -│ ] -│r5 = -│ [ -│ ($120.00, 0.5); ($13.00, 0.005); ($1,400.00, 10.0); -│ ($630.00, 1.826,086,956,521,739,130,4…); ($272.00, 0.68); -│ ($170.00, 0.833,333,333,333,333,333,33…) -│ ] -│r6 = -│ [ -│ ($120.00, 0.5); ($13.00, 0.005); ($1,400.00, 10.0); -│ ($630.00, 1.826,086,956,521,739,130,4…); ($272.00, 0.68); -│ ($170.00, 0.833,333,333,333,333,333,33…) -│ ] +│ r1 = +│ [ +│ ($120.00, 0.5); ($13.00, 0.005); ($1,400.00, 10.0); +│ ($630.00, 1.826,086,956,521,739,130,4…); ($272.00, 0.68); +│ ($170.00, 0.833,333,333,333,333,333,33…) +│ ] +│ r2 = +│ [ +│ ($120.00, 0.5); ($13.00, 0.005); ($1,400.00, 10.0); +│ ($630.00, 1.826,086,956,521,739,130,4…); ($272.00, 0.68); +│ ($170.00, 0.833,333,333,333,333,333,33…) +│ ] +│ r3 = +│ [ +│ ($120.00, 0.5); ($13.00, 0.005); ($1,400.00, 10.0); +│ ($630.00, 1.826,086,956,521,739,130,4…); ($272.00, 0.68); +│ ($170.00, 0.833,333,333,333,333,333,33…) +│ ] +│ r4 = +│ [ +│ ($120.00, 0.5); ($13.00, 0.005); ($1,400.00, 10.0); +│ ($630.00, 1.826,086,956,521,739,130,4…); ($272.00, 0.68); +│ ($170.00, 0.833,333,333,333,333,333,33…) +│ ] +│ r5 = +│ [ +│ ($120.00, 0.5); ($13.00, 0.005); ($1,400.00, 10.0); +│ ($630.00, 1.826,086,956,521,739,130,4…); ($272.00, 0.68); +│ ($170.00, 0.833,333,333,333,333,333,33…) +│ ] +│ r6 = +│ [ +│ ($120.00, 0.5); ($13.00, 0.005); ($1,400.00, 10.0); +│ ($630.00, 1.826,086,956,521,739,130,4…); ($272.00, 0.68); +│ ($170.00, 0.833,333,333,333,333,333,33…) +│ ] └─ ``` diff --git a/tests/typing/good/common.catala_en b/tests/typing/good/common.catala_en index cb0802e06..ccdf053df 100644 --- a/tests/typing/good/common.catala_en +++ b/tests/typing/good/common.catala_en @@ -68,16 +68,16 @@ $ catala Typecheck --check-invariants │ │ ‾‾‾‾ └─ ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala Typecheck --disable-warning ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` diff --git a/tests/typing/good/overload.catala_en b/tests/typing/good/overload.catala_en index 82852d829..d4910b3a9 100644 --- a/tests/typing/good/overload.catala_en +++ b/tests/typing/good/overload.catala_en @@ -62,21 +62,21 @@ scope S: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala test-scope S ┌─[RESULT]─ -│o_b = true -│o_d = [-13 days] -│o_i = -5 -│o_m = -$5.75 -│o_t = 2022-01-24 -│o_x = 0.142,857,142,857,142,857,14… +│ o_b = true +│ o_d = [-13 days] +│ o_i = -5 +│ o_m = -$5.75 +│ o_t = 2022-01-24 +│ o_x = 0.142,857,142,857,142,857,14… └─ ``` diff --git a/tests/variable_state/good/simple.catala_en b/tests/variable_state/good/simple.catala_en index 511f6557b..ec5d40a47 100644 --- a/tests/variable_state/good/simple.catala_en +++ b/tests/variable_state/good/simple.catala_en @@ -20,16 +20,16 @@ scope A: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│foo = 3 +│ foo = 3 └─ ``` diff --git a/tests/variable_state/good/state_access.catala_en b/tests/variable_state/good/state_access.catala_en index f519482bd..b242fd3a8 100644 --- a/tests/variable_state/good/state_access.catala_en +++ b/tests/variable_state/good/state_access.catala_en @@ -26,7 +26,7 @@ scope A: ```catala-test-inline $ catala test-scope A ┌─[RESULT]─ -│bar = 5 -│foo = 6 +│ bar = 5 +│ foo = 6 └─ ``` diff --git a/tests/variable_state/good/subscope.catala_en b/tests/variable_state/good/subscope.catala_en index e773ff965..cee51ef15 100644 --- a/tests/variable_state/good/subscope.catala_en +++ b/tests/variable_state/good/subscope.catala_en @@ -35,10 +35,10 @@ scope B: ```catala-test-inline $ catala Typecheck --check-invariants ┌─[RESULT]─ -│All invariant checks passed +│ All invariant checks passed └─ ┌─[RESULT]─ -│Typechecking successful! +│ Typechecking successful! └─ ``` @@ -57,7 +57,7 @@ let scope A (foo_bar: ⟨integer⟩|context) (foo_baz: integer|internal) ```catala-test-inline $ catala test-scope B ┌─[RESULT]─ -│foofoo = 4 -│foofoofoo = 6 +│ foofoo = 4 +│ foofoofoo = 6 └─ ``` From 19672d23052a5b597e2a58d2ad6fafe8669fb5ea Mon Sep 17 00:00:00 2001 From: Louis Gesbert Date: Fri, 3 May 2024 15:13:08 +0200 Subject: [PATCH 5/5] Messages: ensure disabled messages aren't computed --- compiler/catala_utils/message.ml | 82 +++++++++++++++++--------------- 1 file changed, 44 insertions(+), 38 deletions(-) diff --git a/compiler/catala_utils/message.ml b/compiler/catala_utils/message.ml index 3dfd400aa..154d1a22a 100644 --- a/compiler/catala_utils/message.ml +++ b/compiler/catala_utils/message.ml @@ -352,44 +352,50 @@ let make ?(suggestion = []) ~cont ~level = - Format.kdprintf - @@ fun message -> - let t = - match level with Result -> of_result message | _ -> of_message message - in - let t = match header with Some h -> prepend_message t h | None -> t in - let t = if internal then to_internal_error t else t in - let t = - match outcome with [] -> t | o -> t @ List.map (fun o -> Outcome o) o - in - let t = - match pos with Some p -> add_position t ?message:pos_msg p | None -> t - in - let t = - match extra_pos with - | Some pl -> - List.fold_left - (fun t (message, p) -> - let message = - if message = "" then None - else Some (fun ppf -> Format.pp_print_text ppf message) - in - add_position t ?message p) - t pl - | None -> t - in - let t = - match fmt_pos with - | Some pl -> - List.fold_left - (fun t (message, p) -> - let message = if message == ignore then None else Some message in - add_position t ?message p) - t pl - | None -> t - in - let t = match suggestion with [] -> t | s -> add_suggestion t s in - cont t level + match level with + | Debug when not Global.options.debug -> + Format.ikfprintf (fun _ -> cont [] level) (Lazy.force ignore_ppf) + | Warning when Global.options.disable_warnings -> + Format.ikfprintf (fun _ -> cont [] level) (Lazy.force ignore_ppf) + | _ -> + Format.kdprintf + @@ fun message -> + let t = + match level with Result -> of_result message | _ -> of_message message + in + let t = match header with Some h -> prepend_message t h | None -> t in + let t = if internal then to_internal_error t else t in + let t = + match outcome with [] -> t | o -> t @ List.map (fun o -> Outcome o) o + in + let t = + match pos with Some p -> add_position t ?message:pos_msg p | None -> t + in + let t = + match extra_pos with + | Some pl -> + List.fold_left + (fun t (message, p) -> + let message = + if message = "" then None + else Some (fun ppf -> Format.pp_print_text ppf message) + in + add_position t ?message p) + t pl + | None -> t + in + let t = + match fmt_pos with + | Some pl -> + List.fold_left + (fun t (message, p) -> + let message = if message == ignore then None else Some message in + add_position t ?message p) + t pl + | None -> t + in + let t = match suggestion with [] -> t | s -> add_suggestion t s in + cont t level let debug = make ~level:Debug ~cont:emit let log = make ~level:Log ~cont:emit