mirror of
https://github.com/CatalaLang/catala.git
synced 2024-11-08 07:51:43 +03:00
Add parseable line-column info to error messages
a quick fix for now, ideally we want an option for editor-friendly output. But for now this is a very cheap way to at least have clickable error messages which are a big time-saver.
This commit is contained in:
parent
9e69273141
commit
429911024c
@ -72,16 +72,21 @@ let to_string (pos : t) : string =
|
||||
let s, e = pos.code_pos in
|
||||
Printf.sprintf "in file %s, from %d:%d to %d:%d" s.Lexing.pos_fname
|
||||
s.Lexing.pos_lnum
|
||||
(s.Lexing.pos_cnum - s.Lexing.pos_bol + 1)
|
||||
(s.Lexing.pos_cnum - s.Lexing.pos_bol)
|
||||
e.Lexing.pos_lnum
|
||||
(e.Lexing.pos_cnum - e.Lexing.pos_bol + 1)
|
||||
(e.Lexing.pos_cnum - e.Lexing.pos_bol)
|
||||
|
||||
let to_string_short (pos : t) : string =
|
||||
let s, e = pos.code_pos in
|
||||
Printf.sprintf "%s;%d:%d--%d:%d" s.Lexing.pos_fname s.Lexing.pos_lnum
|
||||
(s.Lexing.pos_cnum - s.Lexing.pos_bol + 1)
|
||||
if e.Lexing.pos_lnum = s.Lexing.pos_lnum then
|
||||
Printf.sprintf "%s:%d.%d-%d" s.Lexing.pos_fname s.Lexing.pos_lnum
|
||||
(s.Lexing.pos_cnum - s.Lexing.pos_bol)
|
||||
(e.Lexing.pos_cnum - e.Lexing.pos_bol)
|
||||
else
|
||||
Printf.sprintf "%s:%d.%d-%d.%d" s.Lexing.pos_fname s.Lexing.pos_lnum
|
||||
(s.Lexing.pos_cnum - s.Lexing.pos_bol)
|
||||
e.Lexing.pos_lnum
|
||||
(e.Lexing.pos_cnum - e.Lexing.pos_bol + 1)
|
||||
(e.Lexing.pos_cnum - e.Lexing.pos_bol)
|
||||
|
||||
let indent_number (s : string) : int =
|
||||
try
|
||||
@ -169,7 +174,8 @@ let retrieve_loc_text (pos : t) : string =
|
||||
pos.law_pos)
|
||||
in
|
||||
(match oc with None -> () | Some oc -> close_in oc);
|
||||
Cli.with_style blue_style "%*s--> %s\n%s\n%s" spaces "" filename
|
||||
Cli.with_style blue_style "%*s--> %s\n%s\n%s" spaces ""
|
||||
(to_string_short pos)
|
||||
(Cli.add_prefix_to_each_line
|
||||
(Printf.sprintf "\n%s" (String.concat "\n" pos_lines))
|
||||
(fun i ->
|
||||
|
@ -33,14 +33,14 @@ Message: unexpected token
|
||||
Autosuggestion: did you mean "content", or maybe "condition"?
|
||||
|
||||
Error token:
|
||||
--> examples/NSW_community_gaming/tests/test_nsw_social_housie.catala_en
|
||||
--> examples/NSW_community_gaming/tests/test_nsw_social_housie.catala_en:11.20-25
|
||||
|
|
||||
11 | context my_gaming scope GamingAuthorized
|
||||
| ^^^^^
|
||||
+
|
||||
|
||||
Last good token:
|
||||
--> examples/NSW_community_gaming/tests/test_nsw_social_housie.catala_en
|
||||
--> examples/NSW_community_gaming/tests/test_nsw_social_housie.catala_en:11.10-19
|
||||
|
|
||||
11 | context my_gaming scope GamingAuthorized
|
||||
| ^^^^^^^^^
|
||||
@ -77,14 +77,14 @@ Message: unexpected token
|
||||
Autosuggestion: did you mean "content", or maybe "condition"?
|
||||
|
||||
Error token:
|
||||
--> examples/NSW_community_gaming/tests/test_nsw_social_housie.catala_en
|
||||
--> examples/NSW_community_gaming/tests/test_nsw_social_housie.catala_en:11.20-25
|
||||
|
|
||||
11 | context my_gaming scope GamingAuthorized
|
||||
| ^^^^^
|
||||
+
|
||||
|
||||
Last good token:
|
||||
--> examples/NSW_community_gaming/tests/test_nsw_social_housie.catala_en
|
||||
--> examples/NSW_community_gaming/tests/test_nsw_social_housie.catala_en:11.10-19
|
||||
|
|
||||
11 | context my_gaming scope GamingAuthorized
|
||||
| ^^^^^^^^^
|
||||
@ -121,14 +121,14 @@ Message: unexpected token
|
||||
Autosuggestion: did you mean "content", or maybe "condition"?
|
||||
|
||||
Error token:
|
||||
--> examples/NSW_community_gaming/tests/test_nsw_social_housie.catala_en
|
||||
--> examples/NSW_community_gaming/tests/test_nsw_social_housie.catala_en:11.20-25
|
||||
|
|
||||
11 | context my_gaming scope GamingAuthorized
|
||||
| ^^^^^
|
||||
+
|
||||
|
||||
Last good token:
|
||||
--> examples/NSW_community_gaming/tests/test_nsw_social_housie.catala_en
|
||||
--> examples/NSW_community_gaming/tests/test_nsw_social_housie.catala_en:11.10-19
|
||||
|
|
||||
11 | context my_gaming scope GamingAuthorized
|
||||
| ^^^^^^^^^
|
||||
@ -167,14 +167,14 @@ Message: unexpected token
|
||||
Autosuggestion: did you mean "content", or maybe "condition"?
|
||||
|
||||
Error token:
|
||||
--> examples/NSW_community_gaming/tests/test_nsw_social_housie.catala_en
|
||||
--> examples/NSW_community_gaming/tests/test_nsw_social_housie.catala_en:11.20-25
|
||||
|
|
||||
11 | context my_gaming scope GamingAuthorized
|
||||
| ^^^^^
|
||||
+
|
||||
|
||||
Last good token:
|
||||
--> examples/NSW_community_gaming/tests/test_nsw_social_housie.catala_en
|
||||
--> examples/NSW_community_gaming/tests/test_nsw_social_housie.catala_en:11.10-19
|
||||
|
|
||||
11 | context my_gaming scope GamingAuthorized
|
||||
| ^^^^^^^^^
|
||||
|
@ -36,7 +36,7 @@ $ catala Interpret -s Dec
|
||||
[ERROR] division by zero at runtime
|
||||
|
||||
The division operator:
|
||||
--> tests/test_arithmetic/bad/division_by_zero.catala_en
|
||||
--> tests/test_arithmetic/bad/division_by_zero.catala_en:20.22-30
|
||||
|
|
||||
20 | definition i equals 1. /. 0.
|
||||
| ^^^^^^^^
|
||||
@ -44,7 +44,7 @@ The division operator:
|
||||
+-+ with decimals
|
||||
|
||||
The null denominator:
|
||||
--> tests/test_arithmetic/bad/division_by_zero.catala_en
|
||||
--> tests/test_arithmetic/bad/division_by_zero.catala_en:20.28-30
|
||||
|
|
||||
20 | definition i equals 1. /. 0.
|
||||
| ^^
|
||||
@ -58,7 +58,7 @@ $ catala Interpret -s Int
|
||||
[ERROR] division by zero at runtime
|
||||
|
||||
The division operator:
|
||||
--> tests/test_arithmetic/bad/division_by_zero.catala_en
|
||||
--> tests/test_arithmetic/bad/division_by_zero.catala_en:10.22-27
|
||||
|
|
||||
10 | definition i equals 1 / 0
|
||||
| ^^^^^
|
||||
@ -66,7 +66,7 @@ The division operator:
|
||||
+-+ with integers
|
||||
|
||||
The null denominator:
|
||||
--> tests/test_arithmetic/bad/division_by_zero.catala_en
|
||||
--> tests/test_arithmetic/bad/division_by_zero.catala_en:10.26-27
|
||||
|
|
||||
10 | definition i equals 1 / 0
|
||||
| ^
|
||||
@ -80,7 +80,7 @@ $ catala Interpret -s Money
|
||||
[ERROR] division by zero at runtime
|
||||
|
||||
The division operator:
|
||||
--> tests/test_arithmetic/bad/division_by_zero.catala_en
|
||||
--> tests/test_arithmetic/bad/division_by_zero.catala_en:30.22-35
|
||||
|
|
||||
30 | definition i equals $10.0 /$ $0.0
|
||||
| ^^^^^^^^^^^^^
|
||||
@ -88,7 +88,7 @@ The division operator:
|
||||
+-+ with money
|
||||
|
||||
The null denominator:
|
||||
--> tests/test_arithmetic/bad/division_by_zero.catala_en
|
||||
--> tests/test_arithmetic/bad/division_by_zero.catala_en:30.31-35
|
||||
|
|
||||
30 | definition i equals $10.0 /$ $0.0
|
||||
| ^^^^
|
||||
|
@ -17,21 +17,21 @@ $ catala Interpret -s A
|
||||
--> money
|
||||
|
||||
Error coming from typechecking the following expression:
|
||||
--> tests/test_array/bad/fold_error.catala_en
|
||||
--> tests/test_array/bad/fold_error.catala_en:10.52-56
|
||||
|
|
||||
10 | definition list_high_count equals number for m in list of (m >=$ $7)
|
||||
| ^^^^
|
||||
+ Article
|
||||
|
||||
Type integer coming from expression:
|
||||
--> tests/test_array/bad/fold_error.catala_en
|
||||
--> tests/test_array/bad/fold_error.catala_en:5.34-41
|
||||
|
|
||||
5 | context list content collection integer
|
||||
| ^^^^^^^
|
||||
+ Article
|
||||
|
||||
Type money coming from expression:
|
||||
--> tests/test_array/bad/fold_error.catala_en
|
||||
--> tests/test_array/bad/fold_error.catala_en:10.63-66
|
||||
|
|
||||
10 | definition list_high_count equals number for m in list of (m >=$ $7)
|
||||
| ^^^
|
||||
|
@ -17,21 +17,21 @@ $ catala Interpret -s Foo
|
||||
--> bool
|
||||
|
||||
Error coming from typechecking the following expression:
|
||||
--> tests/test_bool/bad/bad_assert.catala_en
|
||||
--> tests/test_bool/bad/bad_assert.catala_en:9.12-13
|
||||
|
|
||||
9 | assertion x
|
||||
| ^
|
||||
+ Test
|
||||
|
||||
Type integer coming from expression:
|
||||
--> tests/test_bool/bad/bad_assert.catala_en
|
||||
--> tests/test_bool/bad/bad_assert.catala_en:5.21-28
|
||||
|
|
||||
5 | internal x content integer
|
||||
| ^^^^^^^
|
||||
+ Test
|
||||
|
||||
Type bool coming from expression:
|
||||
--> tests/test_bool/bad/bad_assert.catala_en
|
||||
--> tests/test_bool/bad/bad_assert.catala_en:9.12-13
|
||||
|
|
||||
9 | assertion x
|
||||
| ^
|
||||
|
@ -15,21 +15,21 @@ $ catala Typecheck
|
||||
--> integer
|
||||
|
||||
Error coming from typechecking the following expression:
|
||||
--> tests/test_bool/bad/test_xor_with_int.catala_en
|
||||
--> tests/test_bool/bad/test_xor_with_int.catala_en:8.32-35
|
||||
|
|
||||
8 | definition test_var equals 10 xor 20
|
||||
| ^^^
|
||||
+ 'xor' should be a boolean operator
|
||||
|
||||
Type bool coming from expression:
|
||||
--> tests/test_bool/bad/test_xor_with_int.catala_en
|
||||
--> tests/test_bool/bad/test_xor_with_int.catala_en:8.32-35
|
||||
|
|
||||
8 | definition test_var equals 10 xor 20
|
||||
| ^^^
|
||||
+ 'xor' should be a boolean operator
|
||||
|
||||
Type integer coming from expression:
|
||||
--> tests/test_bool/bad/test_xor_with_int.catala_en
|
||||
--> tests/test_bool/bad/test_xor_with_int.catala_en:5.27-34
|
||||
|
|
||||
5 | context test_var content integer
|
||||
| ^^^^^^^
|
||||
|
@ -44,14 +44,14 @@ scope Ge:
|
||||
$ catala Interpret -s Ge
|
||||
[ERROR] Cannot compare together durations that cannot be converted to a precise number of days
|
||||
|
||||
--> tests/test_date/bad/uncomparable_duration.catala_en
|
||||
--> tests/test_date/bad/uncomparable_duration.catala_en:40.22-29
|
||||
|
|
||||
40 | definition d equals 1 month >=^ 2 day
|
||||
| ^^^^^^^
|
||||
+ `UncomparableDurations` exception management
|
||||
+-+ `>=^` operator
|
||||
|
||||
--> tests/test_date/bad/uncomparable_duration.catala_en
|
||||
--> tests/test_date/bad/uncomparable_duration.catala_en:40.34-39
|
||||
|
|
||||
40 | definition d equals 1 month >=^ 2 day
|
||||
| ^^^^^
|
||||
@ -64,14 +64,14 @@ $ catala Interpret -s Ge
|
||||
$ catala Interpret -s Gt
|
||||
[ERROR] Cannot compare together durations that cannot be converted to a precise number of days
|
||||
|
||||
--> tests/test_date/bad/uncomparable_duration.catala_en
|
||||
--> tests/test_date/bad/uncomparable_duration.catala_en:30.22-29
|
||||
|
|
||||
30 | definition d equals 1 month >^ 2 day
|
||||
| ^^^^^^^
|
||||
+ `UncomparableDurations` exception management
|
||||
+-+ `<=^` operator
|
||||
|
||||
--> tests/test_date/bad/uncomparable_duration.catala_en
|
||||
--> tests/test_date/bad/uncomparable_duration.catala_en:30.33-38
|
||||
|
|
||||
30 | definition d equals 1 month >^ 2 day
|
||||
| ^^^^^
|
||||
@ -84,14 +84,14 @@ $ catala Interpret -s Gt
|
||||
$ catala Interpret -s Le
|
||||
[ERROR] Cannot compare together durations that cannot be converted to a precise number of days
|
||||
|
||||
--> tests/test_date/bad/uncomparable_duration.catala_en
|
||||
--> tests/test_date/bad/uncomparable_duration.catala_en:20.22-29
|
||||
|
|
||||
20 | definition d equals 1 month <=^ 2 day
|
||||
| ^^^^^^^
|
||||
+ `UncomparableDurations` exception management
|
||||
+-+ `<=^` operator
|
||||
|
||||
--> tests/test_date/bad/uncomparable_duration.catala_en
|
||||
--> tests/test_date/bad/uncomparable_duration.catala_en:20.34-39
|
||||
|
|
||||
20 | definition d equals 1 month <=^ 2 day
|
||||
| ^^^^^
|
||||
@ -104,14 +104,14 @@ $ catala Interpret -s Le
|
||||
$ catala Interpret -s Lt
|
||||
[ERROR] Cannot compare together durations that cannot be converted to a precise number of days
|
||||
|
||||
--> tests/test_date/bad/uncomparable_duration.catala_en
|
||||
--> tests/test_date/bad/uncomparable_duration.catala_en:10.22-29
|
||||
|
|
||||
10 | definition d equals 1 month <^ 2 day
|
||||
| ^^^^^^^
|
||||
+ `UncomparableDurations` exception management
|
||||
+-+ `<^` operator
|
||||
|
||||
--> tests/test_date/bad/uncomparable_duration.catala_en
|
||||
--> tests/test_date/bad/uncomparable_duration.catala_en:10.33-38
|
||||
|
|
||||
10 | definition d equals 1 month <^ 2 day
|
||||
| ^^^^^
|
||||
|
@ -14,14 +14,14 @@ $ catala Interpret -s A
|
||||
[ERROR] There is a conflict between multiple valid consequences for assigning the same variable.
|
||||
|
||||
This consequence has a valid justification:
|
||||
--> tests/test_default/bad/conflict.catala_en
|
||||
--> tests/test_default/bad/conflict.catala_en:8.55-56
|
||||
|
|
||||
8 | definition x under condition true consequence equals 1
|
||||
| ^
|
||||
+ Article
|
||||
|
||||
This consequence has a valid justification:
|
||||
--> tests/test_default/bad/conflict.catala_en
|
||||
--> tests/test_default/bad/conflict.catala_en:9.55-56
|
||||
|
|
||||
9 | definition x under condition true consequence equals 0
|
||||
| ^
|
||||
|
@ -13,7 +13,7 @@ scope A:
|
||||
$ catala Interpret -s A
|
||||
[ERROR] This variable evaluated to an empty term (no rule that defined it applied in this situation)
|
||||
|
||||
--> tests/test_default/bad/empty.catala_en
|
||||
--> tests/test_default/bad/empty.catala_en:6.10-11
|
||||
|
|
||||
6 | context y content boolean
|
||||
| ^
|
||||
|
@ -16,7 +16,7 @@ scope A:
|
||||
$ catala Interpret -s A
|
||||
[ERROR] This variable evaluated to an empty term (no rule that defined it applied in this situation)
|
||||
|
||||
--> tests/test_default/bad/empty_with_rules.catala_en
|
||||
--> tests/test_default/bad/empty_with_rules.catala_en:5.10-11
|
||||
|
|
||||
5 | context x content integer
|
||||
| ^
|
||||
|
@ -18,7 +18,7 @@ scope A:
|
||||
$ catala Interpret -s A
|
||||
[ERROR] This constructor name is ambiguous, it can belong to E or F. Desambiguate it by prefixing it with the enum name.
|
||||
|
||||
--> tests/test_enum/bad/ambiguous_cases.catala_en
|
||||
--> tests/test_enum/bad/ambiguous_cases.catala_en:14.22-27
|
||||
|
|
||||
14 | definition e equals Case1
|
||||
| ^^^^^
|
||||
|
@ -19,7 +19,7 @@ scope A:
|
||||
$ catala Interpret -s A
|
||||
[ERROR] Couldn't infer the enumeration name from lonely wildcard (wildcard cannot be used as single match case)
|
||||
|
||||
--> tests/test_enum/bad/ambiguous_wildcard.catala_en
|
||||
--> tests/test_enum/bad/ambiguous_wildcard.catala_en:15.7-20
|
||||
|
|
||||
15 | -- anything : 31
|
||||
| ^^^^^^^^^^^^^
|
||||
|
@ -22,13 +22,13 @@ scope A:
|
||||
$ catala Interpret -s A
|
||||
[ERROR] The constructor Case3 has been matched twice:
|
||||
|
||||
--> tests/test_enum/bad/duplicate_case.catala_en
|
||||
--> tests/test_enum/bad/duplicate_case.catala_en:18.15-19
|
||||
|
|
||||
18 | -- Case3 : true
|
||||
| ^^^^
|
||||
+ Article
|
||||
|
||||
--> tests/test_enum/bad/duplicate_case.catala_en
|
||||
--> tests/test_enum/bad/duplicate_case.catala_en:17.15-20
|
||||
|
|
||||
17 | -- Case3 : false
|
||||
| ^^^^^
|
||||
|
@ -11,7 +11,7 @@ declaration scope Bar:
|
||||
$ catala Typecheck
|
||||
[ERROR] The enum Foo does not have any cases; give it some for Catala to be able to accept it.
|
||||
|
||||
--> tests/test_enum/bad/empty.catala_en
|
||||
--> tests/test_enum/bad/empty.catala_en:4.24-27
|
||||
|
|
||||
4 | declaration enumeration Foo:
|
||||
| ^^^
|
||||
|
@ -20,7 +20,7 @@ scope A:
|
||||
$ catala Interpret -s A
|
||||
[ERROR] The constructor Case3 of enum E is missing from this pattern matching
|
||||
|
||||
--> tests/test_enum/bad/missing_case.catala_en
|
||||
--> tests/test_enum/bad/missing_case.catala_en:14.24-16.21
|
||||
|
|
||||
14 | definition out equals match e with pattern
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -41,7 +41,7 @@ $ catala Interpret -s First_case
|
||||
[ERROR] Wildcard must be the last match case
|
||||
|
||||
Not ending wildcard:
|
||||
--> tests/test_enum/bad/not_ending_wildcard.catala_en
|
||||
--> tests/test_enum/bad/not_ending_wildcard.catala_en:19.7-20
|
||||
|
|
||||
19 | -- anything : 31
|
||||
| ^^^^^^^^^^^^^
|
||||
@ -49,7 +49,7 @@ Not ending wildcard:
|
||||
+-+ Wildcard can't be the first case
|
||||
|
||||
Next reachable case:
|
||||
--> tests/test_enum/bad/not_ending_wildcard.catala_en
|
||||
--> tests/test_enum/bad/not_ending_wildcard.catala_en:20.7-17
|
||||
|
|
||||
20 | -- Case2 : 42
|
||||
| ^^^^^^^^^^
|
||||
@ -63,7 +63,7 @@ $ catala Interpret -s Middle_case
|
||||
[ERROR] Wildcard must be the last match case
|
||||
|
||||
Not ending wildcard:
|
||||
--> tests/test_enum/bad/not_ending_wildcard.catala_en
|
||||
--> tests/test_enum/bad/not_ending_wildcard.catala_en:19.7-20
|
||||
|
|
||||
19 | -- anything : 31
|
||||
| ^^^^^^^^^^^^^
|
||||
@ -71,7 +71,7 @@ Not ending wildcard:
|
||||
+-+ Wildcard can't be the first case
|
||||
|
||||
Next reachable case:
|
||||
--> tests/test_enum/bad/not_ending_wildcard.catala_en
|
||||
--> tests/test_enum/bad/not_ending_wildcard.catala_en:20.7-17
|
||||
|
|
||||
20 | -- Case2 : 42
|
||||
| ^^^^^^^^^^
|
||||
|
@ -35,21 +35,21 @@ $ catala Interpret -s A
|
||||
--> F
|
||||
|
||||
Error coming from typechecking the following expression:
|
||||
--> tests/test_enum/bad/quick_pattern_2.catala_en
|
||||
--> tests/test_enum/bad/quick_pattern_2.catala_en:28.22-23
|
||||
|
|
||||
28 | definition y equals x with pattern Case3
|
||||
| ^
|
||||
+ Article
|
||||
|
||||
Type E coming from expression:
|
||||
--> tests/test_enum/bad/quick_pattern_2.catala_en
|
||||
--> tests/test_enum/bad/quick_pattern_2.catala_en:17.20-21
|
||||
|
|
||||
17 | context x content E
|
||||
| ^
|
||||
+ Article
|
||||
|
||||
Type F coming from expression:
|
||||
--> tests/test_enum/bad/quick_pattern_2.catala_en
|
||||
--> tests/test_enum/bad/quick_pattern_2.catala_en:28.22-42
|
||||
|
|
||||
28 | definition y equals x with pattern Case3
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -25,21 +25,21 @@ $ catala Interpret -s A
|
||||
--> F
|
||||
|
||||
Error coming from typechecking the following expression:
|
||||
--> tests/test_enum/bad/quick_pattern_3.catala_en
|
||||
--> tests/test_enum/bad/quick_pattern_3.catala_en:18.20-21
|
||||
|
|
||||
18 | definition y equals x with pattern Case3
|
||||
| ^
|
||||
+ Article
|
||||
|
||||
Type E coming from expression:
|
||||
--> tests/test_enum/bad/quick_pattern_3.catala_en
|
||||
--> tests/test_enum/bad/quick_pattern_3.catala_en:13.18-19
|
||||
|
|
||||
13 | context x content E
|
||||
| ^
|
||||
+ Article
|
||||
|
||||
Type F coming from expression:
|
||||
--> tests/test_enum/bad/quick_pattern_3.catala_en
|
||||
--> tests/test_enum/bad/quick_pattern_3.catala_en:18.20-40
|
||||
|
|
||||
18 | definition y equals x with pattern Case3
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -24,21 +24,21 @@ $ catala Interpret -s A
|
||||
--> F
|
||||
|
||||
Error coming from typechecking the following expression:
|
||||
--> tests/test_enum/bad/quick_pattern_4.catala_en
|
||||
--> tests/test_enum/bad/quick_pattern_4.catala_en:17.20-21
|
||||
|
|
||||
17 | definition y equals x with pattern Case3
|
||||
| ^
|
||||
+ Test
|
||||
|
||||
Type E coming from expression:
|
||||
--> tests/test_enum/bad/quick_pattern_4.catala_en
|
||||
--> tests/test_enum/bad/quick_pattern_4.catala_en:12.18-19
|
||||
|
|
||||
12 | context x content E
|
||||
| ^
|
||||
+ Test
|
||||
|
||||
Type F coming from expression:
|
||||
--> tests/test_enum/bad/quick_pattern_4.catala_en
|
||||
--> tests/test_enum/bad/quick_pattern_4.catala_en:17.20-40
|
||||
|
|
||||
17 | definition y equals x with pattern Case3
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -19,7 +19,7 @@ scope A:
|
||||
$ catala Interpret -s A
|
||||
[ERROR] The name of this constructor has not been defined before, maybe it is a typo?
|
||||
|
||||
--> tests/test_enum/bad/quick_pattern_fail.catala_en
|
||||
--> tests/test_enum/bad/quick_pattern_fail.catala_en:15.37-42
|
||||
|
|
||||
15 | definition y equals x with pattern Case3
|
||||
| ^^^^^
|
||||
|
@ -25,7 +25,7 @@ scope A:
|
||||
$ catala Interpret -s A
|
||||
[ERROR] This case matches a constructor of enumeration E but previous case were matching constructors of enumeration F
|
||||
|
||||
--> tests/test_enum/bad/too_many_cases.catala_en
|
||||
--> tests/test_enum/bad/too_many_cases.catala_en:21.7-19
|
||||
|
|
||||
21 | -- Case4 : true
|
||||
| ^^^^^^^^^^^^
|
||||
|
@ -21,7 +21,7 @@ scope A:
|
||||
$ catala Interpret -s A
|
||||
[WARNING] Unreachable match case, all constructors of the enumeration E are already specified
|
||||
|
||||
--> tests/test_enum/bad/useless_wildcard.catala_en
|
||||
--> tests/test_enum/bad/useless_wildcard.catala_en:17.7-20
|
||||
|
|
||||
17 | -- anything : 31
|
||||
| ^^^^^^^^^^^^^
|
||||
|
@ -18,7 +18,7 @@ $ catala Interpret -s A
|
||||
[ERROR] This exception can refer to several definitions. Try using labels to disambiguate
|
||||
|
||||
Ambiguous exception
|
||||
--> tests/test_exception/bad/ambiguous_unlabeled_exception.catala_en
|
||||
--> tests/test_exception/bad/ambiguous_unlabeled_exception.catala_en:10.23-13.23
|
||||
|
|
||||
10 | definition x equals 1
|
||||
|
|
||||
@ -31,14 +31,14 @@ Ambiguous exception
|
||||
+ Test
|
||||
|
||||
Candidate definition
|
||||
--> tests/test_exception/bad/ambiguous_unlabeled_exception.catala_en
|
||||
--> tests/test_exception/bad/ambiguous_unlabeled_exception.catala_en:10.13-14
|
||||
|
|
||||
10 | definition x equals 1
|
||||
| ^
|
||||
+ Test
|
||||
|
||||
Candidate definition
|
||||
--> tests/test_exception/bad/ambiguous_unlabeled_exception.catala_en
|
||||
--> tests/test_exception/bad/ambiguous_unlabeled_exception.catala_en:8.13-14
|
||||
|
|
||||
8 | definition x equals 0
|
||||
| ^
|
||||
|
@ -17,7 +17,7 @@ scope A:
|
||||
$ catala Interpret -s A
|
||||
[ERROR] Unknown label for the scope variable x: "base_y"
|
||||
|
||||
--> tests/test_exception/bad/dangling_exception.catala_en
|
||||
--> tests/test_exception/bad/dangling_exception.catala_en:12.12-18
|
||||
|
|
||||
12 | exception base_y
|
||||
| ^^^^^^
|
||||
|
@ -23,7 +23,7 @@ $ catala Interpret -s A
|
||||
[ERROR] Cyclic dependency detected between exceptions!
|
||||
|
||||
Cyclic exception for definition of variable "x", declared here:
|
||||
--> tests/test_exception/bad/exceptions_cycle.catala_en
|
||||
--> tests/test_exception/bad/exceptions_cycle.catala_en:16.2-18.23
|
||||
|
|
||||
16 | label exception_exception_x
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -34,14 +34,14 @@ Cyclic exception for definition of variable "x", declared here:
|
||||
+
|
||||
|
||||
Used here in the definition of another cyclic exception for defining "x":
|
||||
--> tests/test_exception/bad/exceptions_cycle.catala_en
|
||||
--> tests/test_exception/bad/exceptions_cycle.catala_en:17.12-23
|
||||
|
|
||||
17 | exception exception_x
|
||||
| ^^^^^^^^^^^
|
||||
+ Test
|
||||
|
||||
Cyclic exception for definition of variable "x", declared here:
|
||||
--> tests/test_exception/bad/exceptions_cycle.catala_en
|
||||
--> tests/test_exception/bad/exceptions_cycle.catala_en:12.2-14.23
|
||||
|
|
||||
12 | label exception_x
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
@ -52,14 +52,14 @@ Cyclic exception for definition of variable "x", declared here:
|
||||
+
|
||||
|
||||
Used here in the definition of another cyclic exception for defining "x":
|
||||
--> tests/test_exception/bad/exceptions_cycle.catala_en
|
||||
--> tests/test_exception/bad/exceptions_cycle.catala_en:13.12-18
|
||||
|
|
||||
13 | exception base_x
|
||||
| ^^^^^^
|
||||
+ Test
|
||||
|
||||
Cyclic exception for definition of variable "x", declared here:
|
||||
--> tests/test_exception/bad/exceptions_cycle.catala_en
|
||||
--> tests/test_exception/bad/exceptions_cycle.catala_en:8.2-10.23
|
||||
|
|
||||
8 | label base_x
|
||||
| ^^^^^^^^^^^
|
||||
@ -70,7 +70,7 @@ Cyclic exception for definition of variable "x", declared here:
|
||||
+
|
||||
|
||||
Used here in the definition of another cyclic exception for defining "x":
|
||||
--> tests/test_exception/bad/exceptions_cycle.catala_en
|
||||
--> tests/test_exception/bad/exceptions_cycle.catala_en:9.12-33
|
||||
|
|
||||
9 | exception exception_exception_x
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -13,7 +13,7 @@ scope A:
|
||||
$ catala Interpret -s A
|
||||
[ERROR] This exception does not have a corresponding definition
|
||||
|
||||
--> tests/test_exception/bad/missing_unlabeled_definition.catala_en
|
||||
--> tests/test_exception/bad/missing_unlabeled_definition.catala_en:7.8-9.23
|
||||
|
|
||||
7 | scope A:
|
||||
|
|
||||
|
@ -24,7 +24,7 @@ $ catala Interpret -s A
|
||||
[ERROR] This exception can refer to several definitions. Try using labels to disambiguate
|
||||
|
||||
Ambiguous exception
|
||||
--> tests/test_exception/bad/one_ambiguous_exception.catala_en
|
||||
--> tests/test_exception/bad/one_ambiguous_exception.catala_en:16.23-19.23
|
||||
|
|
||||
16 | definition y equals 4
|
||||
|
|
||||
@ -37,14 +37,14 @@ Ambiguous exception
|
||||
+ Test
|
||||
|
||||
Candidate definition
|
||||
--> tests/test_exception/bad/one_ambiguous_exception.catala_en
|
||||
--> tests/test_exception/bad/one_ambiguous_exception.catala_en:16.13-14
|
||||
|
|
||||
16 | definition y equals 4
|
||||
| ^
|
||||
+ Test
|
||||
|
||||
Candidate definition
|
||||
--> tests/test_exception/bad/one_ambiguous_exception.catala_en
|
||||
--> tests/test_exception/bad/one_ambiguous_exception.catala_en:14.13-14
|
||||
|
|
||||
14 | definition y equals 2
|
||||
| ^
|
||||
|
@ -14,7 +14,7 @@ scope A:
|
||||
$ catala Interpret -s A
|
||||
[ERROR] Cannot define rule as an exception to itself
|
||||
|
||||
--> tests/test_exception/bad/self_exception.catala_en
|
||||
--> tests/test_exception/bad/self_exception.catala_en:9.12-18
|
||||
|
|
||||
9 | exception base_y
|
||||
| ^^^^^^
|
||||
|
@ -20,14 +20,14 @@ $ catala Interpret -s A
|
||||
[ERROR] There is a conflict between multiple valid consequences for assigning the same variable.
|
||||
|
||||
This consequence has a valid justification:
|
||||
--> tests/test_exception/bad/two_exceptions.catala_en
|
||||
--> tests/test_exception/bad/two_exceptions.catala_en:12.22-23
|
||||
|
|
||||
12 | definition x equals 1
|
||||
| ^
|
||||
+ Test
|
||||
|
||||
This consequence has a valid justification:
|
||||
--> tests/test_exception/bad/two_exceptions.catala_en
|
||||
--> tests/test_exception/bad/two_exceptions.catala_en:15.22-23
|
||||
|
|
||||
15 | definition x equals 2
|
||||
| ^
|
||||
|
@ -32,14 +32,14 @@ $ catala Interpret -s S
|
||||
[ERROR] There is a conflict between multiple valid consequences for assigning the same variable.
|
||||
|
||||
This consequence has a valid justification:
|
||||
--> tests/test_func/bad/bad_func.catala_en
|
||||
--> tests/test_func/bad/bad_func.catala_en:14.64-69
|
||||
|
|
||||
14 | definition f of x under condition (x >= x) consequence equals x + x
|
||||
| ^^^^^
|
||||
+ Article
|
||||
|
||||
This consequence has a valid justification:
|
||||
--> tests/test_func/bad/bad_func.catala_en
|
||||
--> tests/test_func/bad/bad_func.catala_en:15.61-66
|
||||
|
|
||||
15 | definition f of x under condition not b consequence equals x * x
|
||||
| ^^^^^
|
||||
|
@ -12,7 +12,7 @@ scope RecursiveFunc:
|
||||
$ catala Interpret -s RecursiveFunc
|
||||
[ERROR] The variable f is used in one of its definitions, but recursion is forbidden in Catala
|
||||
|
||||
--> tests/test_func/bad/recursive.catala_en
|
||||
--> tests/test_func/bad/recursive.catala_en:8.27-28
|
||||
|
|
||||
8 | definition f of x equals f of x + 1
|
||||
| ^
|
||||
|
@ -19,14 +19,14 @@ $ catala Typecheck
|
||||
[ERROR] This subscope variable is a mandatory input but no definition was provided.
|
||||
|
||||
Incriminated subscope:
|
||||
--> tests/test_io/bad/forgot_input.catala_en
|
||||
--> tests/test_io/bad/forgot_input.catala_en:9.2-3
|
||||
|
|
||||
9 | a scope A
|
||||
| ^
|
||||
+ Test
|
||||
|
||||
Incriminated variable:
|
||||
--> tests/test_io/bad/forgot_input.catala_en
|
||||
--> tests/test_io/bad/forgot_input.catala_en:6.8-9
|
||||
|
|
||||
6 | input x content integer
|
||||
| ^
|
||||
|
@ -19,21 +19,21 @@ $ catala Typecheck
|
||||
[ERROR] It is impossible to give a definition to a subscope variable not tagged as input or context.
|
||||
|
||||
Incriminated subscope:
|
||||
--> tests/test_io/bad/inputing_to_not_input.catala_en
|
||||
--> tests/test_io/bad/inputing_to_not_input.catala_en:8.2-3
|
||||
|
|
||||
8 | a scope A
|
||||
| ^
|
||||
+ Test
|
||||
|
||||
Incriminated variable:
|
||||
--> tests/test_io/bad/inputing_to_not_input.catala_en
|
||||
--> tests/test_io/bad/inputing_to_not_input.catala_en:5.9-10
|
||||
|
|
||||
5 | output a content integer
|
||||
| ^
|
||||
+ Test
|
||||
|
||||
Incriminated subscope variable definition:
|
||||
--> tests/test_io/bad/inputing_to_not_input.catala_en
|
||||
--> tests/test_io/bad/inputing_to_not_input.catala_en:14.2-25
|
||||
|
|
||||
14 | definition a.a equals 0
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -12,14 +12,14 @@ $ catala Typecheck
|
||||
[ERROR] It is impossible to give a definition to a scope variable tagged as input.
|
||||
|
||||
Incriminated variable:
|
||||
--> tests/test_io/bad/redefining_input.catala_en
|
||||
--> tests/test_io/bad/redefining_input.catala_en:5.8-9
|
||||
|
|
||||
5 | input a content integer
|
||||
| ^
|
||||
+ Test
|
||||
|
||||
Incriminated variable definition:
|
||||
--> tests/test_io/bad/redefining_input.catala_en
|
||||
--> tests/test_io/bad/redefining_input.catala_en:8.2-23
|
||||
|
|
||||
8 | definition a equals 0
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -18,21 +18,21 @@ $ catala Typecheck
|
||||
[ERROR] The variable a.a cannot be used here, as it is not part of subscope a's results. Maybe you forgot to qualify it as an output?
|
||||
|
||||
Incriminated variable usage:
|
||||
--> tests/test_io/bad/using_non_output.catala_en
|
||||
--> tests/test_io/bad/using_non_output.catala_en:14.12-15
|
||||
|
|
||||
14 | assertion a.a = 0
|
||||
| ^^^
|
||||
+ Test
|
||||
|
||||
Incriminated subscope variable declaration:
|
||||
--> tests/test_io/bad/using_non_output.catala_en
|
||||
--> tests/test_io/bad/using_non_output.catala_en:5.11-12
|
||||
|
|
||||
5 | internal a content integer
|
||||
| ^
|
||||
+ Test
|
||||
|
||||
Incriminated subscope declaration:
|
||||
--> tests/test_io/bad/using_non_output.catala_en
|
||||
--> tests/test_io/bad/using_non_output.catala_en:8.2-3
|
||||
|
|
||||
8 | a scope A
|
||||
| ^
|
||||
|
@ -19,21 +19,21 @@ $ catala Interpret -s A
|
||||
--> decimal
|
||||
|
||||
Error coming from typechecking the following expression:
|
||||
--> tests/test_money/bad/no_mingle.catala_en
|
||||
--> tests/test_money/bad/no_mingle.catala_en:12.28-29
|
||||
|
|
||||
12 | definition z equals (x *$ y)
|
||||
| ^
|
||||
+ Article
|
||||
|
||||
Type money coming from expression:
|
||||
--> tests/test_money/bad/no_mingle.catala_en
|
||||
--> tests/test_money/bad/no_mingle.catala_en:6.20-25
|
||||
|
|
||||
6 | context y content money
|
||||
| ^^^^^
|
||||
+ Article
|
||||
|
||||
Type decimal coming from expression:
|
||||
--> tests/test_money/bad/no_mingle.catala_en
|
||||
--> tests/test_money/bad/no_mingle.catala_en:12.25-27
|
||||
|
|
||||
12 | definition z equals (x *$ y)
|
||||
| ^^
|
||||
|
@ -13,7 +13,7 @@ scope A:
|
||||
```catala-test-inline
|
||||
$ catala Proof --disable_counterexamples
|
||||
[ERROR] [A.y] This variable might return an empty error:
|
||||
--> tests/test_proof/bad/array_length-empty.catala_en
|
||||
--> tests/test_proof/bad/array_length-empty.catala_en:6.10-11
|
||||
|
|
||||
6 | context y content boolean
|
||||
| ^
|
||||
|
@ -14,7 +14,7 @@ scope A:
|
||||
```catala-test-inline
|
||||
$ catala Proof --disable_counterexamples
|
||||
[ERROR] [A.y] At least two exceptions overlap for this variable:
|
||||
--> tests/test_proof/bad/array_length-overlap.catala_en
|
||||
--> tests/test_proof/bad/array_length-overlap.catala_en:6.10-11
|
||||
|
|
||||
6 | context y content boolean
|
||||
| ^
|
||||
|
@ -16,7 +16,7 @@ scope A:
|
||||
```catala-test-inline
|
||||
$ catala Proof --disable_counterexamples
|
||||
[ERROR] [A.y] This variable might return an empty error:
|
||||
--> tests/test_proof/bad/dates_get_year-empty.catala_en
|
||||
--> tests/test_proof/bad/dates_get_year-empty.catala_en:6.10-11
|
||||
|
|
||||
6 | context y content boolean
|
||||
| ^
|
||||
|
@ -16,7 +16,7 @@ scope A:
|
||||
```catala-test-inline
|
||||
$ catala Proof --disable_counterexamples
|
||||
[ERROR] [A.y] At least two exceptions overlap for this variable:
|
||||
--> tests/test_proof/bad/dates_get_year-overlap.catala_en
|
||||
--> tests/test_proof/bad/dates_get_year-overlap.catala_en:6.10-11
|
||||
|
|
||||
6 | context y content boolean
|
||||
| ^
|
||||
|
@ -15,7 +15,7 @@ scope A:
|
||||
```catala-test-inline
|
||||
$ catala Proof --disable_counterexamples
|
||||
[ERROR] [A.y] This variable might return an empty error:
|
||||
--> tests/test_proof/bad/dates_simple-empty.catala_en
|
||||
--> tests/test_proof/bad/dates_simple-empty.catala_en:6.10-11
|
||||
|
|
||||
6 | context y content boolean
|
||||
| ^
|
||||
|
@ -16,7 +16,7 @@ scope A:
|
||||
```catala-test-inline
|
||||
$ catala Proof --disable_counterexamples
|
||||
[ERROR] [A.y] At least two exceptions overlap for this variable:
|
||||
--> tests/test_proof/bad/dates_simple-overlap.catala_en
|
||||
--> tests/test_proof/bad/dates_simple-overlap.catala_en:6.10-11
|
||||
|
|
||||
6 | context y content boolean
|
||||
| ^
|
||||
|
@ -13,7 +13,7 @@ scope A:
|
||||
```catala-test-inline
|
||||
$ catala Proof --disable_counterexamples
|
||||
[ERROR] [A.y] This variable might return an empty error:
|
||||
--> tests/test_proof/bad/duration-empty.catala_en
|
||||
--> tests/test_proof/bad/duration-empty.catala_en:6.10-11
|
||||
|
|
||||
6 | context y content boolean
|
||||
| ^
|
||||
|
@ -14,7 +14,7 @@ scope A:
|
||||
```catala-test-inline
|
||||
$ catala Proof --disable_counterexamples
|
||||
[ERROR] [A.y] At least two exceptions overlap for this variable:
|
||||
--> tests/test_proof/bad/duration-overlap.catala_en
|
||||
--> tests/test_proof/bad/duration-overlap.catala_en:6.10-11
|
||||
|
|
||||
6 | context y content boolean
|
||||
| ^
|
||||
|
@ -24,7 +24,7 @@ scope A:
|
||||
```catala-test-inline
|
||||
$ catala Proof --disable_counterexamples
|
||||
[ERROR] [A.x] This variable might return an empty error:
|
||||
--> tests/test_proof/bad/enums-empty.catala_en
|
||||
--> tests/test_proof/bad/enums-empty.catala_en:15.10-11
|
||||
|
|
||||
15 | context x content integer
|
||||
| ^
|
||||
|
@ -22,7 +22,7 @@ scope A:
|
||||
```catala-test-inline
|
||||
$ catala Proof --disable_counterexamples
|
||||
[ERROR] [A.x] This variable might return an empty error:
|
||||
--> tests/test_proof/bad/enums-nonbool-empty.catala_en
|
||||
--> tests/test_proof/bad/enums-nonbool-empty.catala_en:13.10-11
|
||||
|
|
||||
13 | context x content integer
|
||||
| ^
|
||||
|
@ -22,7 +22,7 @@ scope A:
|
||||
```catala-test-inline
|
||||
$ catala Proof --disable_counterexamples
|
||||
[ERROR] [A.x] At least two exceptions overlap for this variable:
|
||||
--> tests/test_proof/bad/enums-nonbool-overlap.catala_en
|
||||
--> tests/test_proof/bad/enums-nonbool-overlap.catala_en:13.10-11
|
||||
|
|
||||
13 | context x content integer
|
||||
| ^
|
||||
|
@ -24,7 +24,7 @@ scope A:
|
||||
```catala-test-inline
|
||||
$ catala Proof --disable_counterexamples
|
||||
[ERROR] [A.x] At least two exceptions overlap for this variable:
|
||||
--> tests/test_proof/bad/enums-overlap.catala_en
|
||||
--> tests/test_proof/bad/enums-overlap.catala_en:15.10-11
|
||||
|
|
||||
15 | context x content integer
|
||||
| ^
|
||||
|
@ -17,7 +17,7 @@ scope A:
|
||||
```catala-test-inline
|
||||
$ catala Proof --disable_counterexamples
|
||||
[ERROR] [A.y] This variable might return an empty error:
|
||||
--> tests/test_proof/bad/enums_inj-empty.catala_en
|
||||
--> tests/test_proof/bad/enums_inj-empty.catala_en:10.10-11
|
||||
|
|
||||
10 | context y content integer
|
||||
| ^
|
||||
|
@ -19,7 +19,7 @@ scope A:
|
||||
```catala-test-inline
|
||||
$ catala Proof --disable_counterexamples
|
||||
[ERROR] [A.y] At least two exceptions overlap for this variable:
|
||||
--> tests/test_proof/bad/enums_inj-overlap.catala_en
|
||||
--> tests/test_proof/bad/enums_inj-overlap.catala_en:10.10-11
|
||||
|
|
||||
10 | context y content integer
|
||||
| ^
|
||||
|
@ -22,7 +22,7 @@ scope A:
|
||||
```catala-test-inline
|
||||
$ catala Proof --disable_counterexamples
|
||||
[ERROR] [A.y] This variable might return an empty error:
|
||||
--> tests/test_proof/bad/enums_unit-empty.catala_en
|
||||
--> tests/test_proof/bad/enums_unit-empty.catala_en:10.10-11
|
||||
|
|
||||
10 | context y content integer
|
||||
| ^
|
||||
|
@ -22,7 +22,7 @@ scope A:
|
||||
```catala-test-inline
|
||||
$ catala Proof --disable_counterexamples
|
||||
[ERROR] [A.y] At least two exceptions overlap for this variable:
|
||||
--> tests/test_proof/bad/enums_unit-overlap.catala_en
|
||||
--> tests/test_proof/bad/enums_unit-overlap.catala_en:10.10-11
|
||||
|
|
||||
10 | context y content integer
|
||||
| ^
|
||||
|
@ -17,7 +17,7 @@ scope A:
|
||||
```catala-test-inline
|
||||
$ catala Proof --disable_counterexamples
|
||||
[ERROR] [A.y] This variable might return an empty error:
|
||||
--> tests/test_proof/bad/money-empty.catala_en
|
||||
--> tests/test_proof/bad/money-empty.catala_en:8.10-11
|
||||
|
|
||||
8 | context y content boolean
|
||||
| ^
|
||||
|
@ -18,7 +18,7 @@ scope A:
|
||||
```catala-test-inline
|
||||
$ catala Proof --disable_counterexamples
|
||||
[ERROR] [A.y] At least two exceptions overlap for this variable:
|
||||
--> tests/test_proof/bad/money-overlap.catala_en
|
||||
--> tests/test_proof/bad/money-overlap.catala_en:8.10-11
|
||||
|
|
||||
8 | context y content boolean
|
||||
| ^
|
||||
|
@ -18,7 +18,7 @@ scope A:
|
||||
```catala-test-inline
|
||||
$ catala Proof --disable_counterexamples
|
||||
[ERROR] [A.y] At least two exceptions overlap for this variable:
|
||||
--> tests/test_proof/bad/no_vars-conflict.catala_en
|
||||
--> tests/test_proof/bad/no_vars-conflict.catala_en:8.10-11
|
||||
|
|
||||
8 | context y content integer
|
||||
| ^
|
||||
|
@ -17,7 +17,7 @@ scope A:
|
||||
```catala-test-inline
|
||||
$ catala Proof --disable_counterexamples
|
||||
[ERROR] [A.y] This variable might return an empty error:
|
||||
--> tests/test_proof/bad/no_vars-empty.catala_en
|
||||
--> tests/test_proof/bad/no_vars-empty.catala_en:7.10-11
|
||||
|
|
||||
7 | context y content integer
|
||||
| ^
|
||||
|
@ -124,7 +124,7 @@ scope Amount:
|
||||
```catala-test-inline
|
||||
$ catala Proof --disable_counterexamples
|
||||
[ERROR] [Amount.amount] This variable might return an empty error:
|
||||
--> tests/test_proof/bad/prolala_motivating_example.catala_en
|
||||
--> tests/test_proof/bad/prolala_motivating_example.catala_en:60.10-16
|
||||
|
|
||||
60 | context amount content integer
|
||||
| ^^^^^^
|
||||
@ -132,7 +132,7 @@ $ catala Proof --disable_counterexamples
|
||||
+-+ Amount
|
||||
Counterexample generation is disabled so none was generated.
|
||||
[ERROR] [Eligibility.is_eligible] This variable might return an empty error:
|
||||
--> tests/test_proof/bad/prolala_motivating_example.catala_en
|
||||
--> tests/test_proof/bad/prolala_motivating_example.catala_en:11.9-20
|
||||
|
|
||||
11 | output is_eligible content boolean
|
||||
| ^^^^^^^^^^^
|
||||
@ -140,7 +140,7 @@ Counterexample generation is disabled so none was generated.
|
||||
+-+ Eligibility
|
||||
Counterexample generation is disabled so none was generated.
|
||||
[ERROR] [Eligibility.is_eligible] At least two exceptions overlap for this variable:
|
||||
--> tests/test_proof/bad/prolala_motivating_example.catala_en
|
||||
--> tests/test_proof/bad/prolala_motivating_example.catala_en:11.9-20
|
||||
|
|
||||
11 | output is_eligible content boolean
|
||||
| ^^^^^^^^^^^
|
||||
|
@ -13,7 +13,7 @@ scope A:
|
||||
```catala-test-inline
|
||||
$ catala Proof --disable_counterexamples
|
||||
[ERROR] [A.y] This variable might return an empty error:
|
||||
--> tests/test_proof/bad/rationals-empty.catala_en
|
||||
--> tests/test_proof/bad/rationals-empty.catala_en:6.10-11
|
||||
|
|
||||
6 | context y content boolean
|
||||
| ^
|
||||
|
@ -14,7 +14,7 @@ scope A:
|
||||
```catala-test-inline
|
||||
$ catala Proof --disable_counterexamples
|
||||
[ERROR] [A.y] At least two exceptions overlap for this variable:
|
||||
--> tests/test_proof/bad/rationals-overlap.catala_en
|
||||
--> tests/test_proof/bad/rationals-overlap.catala_en:6.10-11
|
||||
|
|
||||
6 | context y content boolean
|
||||
| ^
|
||||
|
@ -41,7 +41,7 @@ scope A:
|
||||
```catala-test-inline
|
||||
$ catala Proof --disable_counterexamples
|
||||
[ERROR] [A.x10] This variable might return an empty error:
|
||||
--> tests/test_proof/bad/sat_solving.catala_en
|
||||
--> tests/test_proof/bad/sat_solving.catala_en:15.10-13
|
||||
|
|
||||
15 | context x10 content boolean
|
||||
| ^^^
|
||||
|
@ -22,7 +22,7 @@ scope A:
|
||||
```catala-test-inline
|
||||
$ catala Proof --disable_counterexamples
|
||||
[ERROR] [A.x] This variable might return an empty error:
|
||||
--> tests/test_proof/bad/structs-empty.catala_en
|
||||
--> tests/test_proof/bad/structs-empty.catala_en:13.10-11
|
||||
|
|
||||
13 | context x content integer
|
||||
| ^
|
||||
|
@ -22,7 +22,7 @@ scope A:
|
||||
```catala-test-inline
|
||||
$ catala Proof --disable_counterexamples
|
||||
[ERROR] [A.x] At least two exceptions overlap for this variable:
|
||||
--> tests/test_proof/bad/structs-overlap.catala_en
|
||||
--> tests/test_proof/bad/structs-overlap.catala_en:13.10-11
|
||||
|
|
||||
13 | context x content integer
|
||||
| ^
|
||||
|
@ -19,42 +19,42 @@ $ catala Interpret -s A
|
||||
[ERROR] Cyclic dependency detected between variables of scope A!
|
||||
|
||||
Cycle variable z, declared:
|
||||
--> tests/test_scope/bad/cycle_in_scope.catala_en
|
||||
--> tests/test_scope/bad/cycle_in_scope.catala_en:7.10-11
|
||||
|
|
||||
7 | context z content integer
|
||||
| ^
|
||||
+ Article
|
||||
|
||||
Used here in the definition of another cycle variable x:
|
||||
--> tests/test_scope/bad/cycle_in_scope.catala_en
|
||||
--> tests/test_scope/bad/cycle_in_scope.catala_en:14.22-23
|
||||
|
|
||||
14 | definition x equals z
|
||||
| ^
|
||||
+ Article
|
||||
|
||||
Cycle variable y, declared:
|
||||
--> tests/test_scope/bad/cycle_in_scope.catala_en
|
||||
--> tests/test_scope/bad/cycle_in_scope.catala_en:6.10-11
|
||||
|
|
||||
6 | context y content integer
|
||||
| ^
|
||||
+ Article
|
||||
|
||||
Used here in the definition of another cycle variable z:
|
||||
--> tests/test_scope/bad/cycle_in_scope.catala_en
|
||||
--> tests/test_scope/bad/cycle_in_scope.catala_en:13.31-32
|
||||
|
|
||||
13 | definition z under condition y < 1 consequence equals y
|
||||
| ^
|
||||
+ Article
|
||||
|
||||
Cycle variable x, declared:
|
||||
--> tests/test_scope/bad/cycle_in_scope.catala_en
|
||||
--> tests/test_scope/bad/cycle_in_scope.catala_en:5.10-11
|
||||
|
|
||||
5 | context x content integer
|
||||
| ^
|
||||
+ Article
|
||||
|
||||
Used here in the definition of another cycle variable y:
|
||||
--> tests/test_scope/bad/cycle_in_scope.catala_en
|
||||
--> tests/test_scope/bad/cycle_in_scope.catala_en:11.31-32
|
||||
|
|
||||
11 | definition y under condition x >= 0 consequence equals x
|
||||
| ^
|
||||
|
@ -21,28 +21,28 @@ $ catala Interpret -s A
|
||||
[ERROR] Cyclic dependency detected between scopes!
|
||||
|
||||
Cycle variable B, declared:
|
||||
--> tests/test_scope/bad/cyclic_scopes.catala_en
|
||||
--> tests/test_scope/bad/cyclic_scopes.catala_en:8.18-19
|
||||
|
|
||||
8 | declaration scope B:
|
||||
| ^
|
||||
+ Article
|
||||
|
||||
Used here in the definition of another cycle variable A:
|
||||
--> tests/test_scope/bad/cyclic_scopes.catala_en
|
||||
--> tests/test_scope/bad/cyclic_scopes.catala_en:5.2-3
|
||||
|
|
||||
5 | b scope B
|
||||
| ^
|
||||
+ Article
|
||||
|
||||
Cycle variable A, declared:
|
||||
--> tests/test_scope/bad/cyclic_scopes.catala_en
|
||||
--> tests/test_scope/bad/cyclic_scopes.catala_en:4.18-19
|
||||
|
|
||||
4 | declaration scope A:
|
||||
| ^
|
||||
+ Article
|
||||
|
||||
Used here in the definition of another cycle variable B:
|
||||
--> tests/test_scope/bad/cyclic_scopes.catala_en
|
||||
--> tests/test_scope/bad/cyclic_scopes.catala_en:9.2-3
|
||||
|
|
||||
9 | a scope A
|
||||
| ^
|
||||
|
@ -19,14 +19,14 @@ $ catala Interpret -s A
|
||||
[ERROR] There is a conflict between multiple valid consequences for assigning the same variable.
|
||||
|
||||
This consequence has a valid justification:
|
||||
--> tests/test_scope/bad/scope.catala_en
|
||||
--> tests/test_scope/bad/scope.catala_en:13.56-60
|
||||
|
|
||||
13 | definition b under condition not c consequence equals 1337
|
||||
| ^^^^
|
||||
+ Article
|
||||
|
||||
This consequence has a valid justification:
|
||||
--> tests/test_scope/bad/scope.catala_en
|
||||
--> tests/test_scope/bad/scope.catala_en:14.56-57
|
||||
|
|
||||
14 | definition b under condition not c consequence equals 0
|
||||
| ^
|
||||
|
@ -18,7 +18,7 @@ scope Titi:
|
||||
$ catala dcalc -s Titi
|
||||
[ERROR] Duplicate definition of scope input variable 'bar'
|
||||
|
||||
--> tests/test_scope/bad/scope_call_duplicate.catala_en
|
||||
--> tests/test_scope/bad/scope_call_duplicate.catala_en:14.57-60
|
||||
|
|
||||
14 | definition fizz equals Toto of {--bar: 1 --baz: 2.1 -- bar: 3}
|
||||
| ^^^
|
||||
|
@ -18,14 +18,14 @@ scope Titi:
|
||||
$ catala dcalc -s Titi
|
||||
[ERROR] Scope Toto has no input variable biz
|
||||
|
||||
--> tests/test_scope/bad/scope_call_extra.catala_en
|
||||
--> tests/test_scope/bad/scope_call_extra.catala_en:14.36-39
|
||||
|
|
||||
14 | definition fizz equals Toto of {--biz: 1}
|
||||
| ^^^
|
||||
+
|
||||
|
||||
Scope Toto declared here
|
||||
--> tests/test_scope/bad/scope_call_extra.catala_en
|
||||
--> tests/test_scope/bad/scope_call_extra.catala_en:2.18-22
|
||||
|
|
||||
2 | declaration scope Toto:
|
||||
| ^^^^
|
||||
|
@ -18,14 +18,14 @@ scope Titi:
|
||||
$ catala dcalc -s Titi
|
||||
[ERROR] Definition of input variable 'baz' missing in this scope call
|
||||
|
||||
--> tests/test_scope/bad/scope_call_missing.catala_en
|
||||
--> tests/test_scope/bad/scope_call_missing.catala_en:14.25-43
|
||||
|
|
||||
14 | definition fizz equals Toto of {--bar: 1}
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
+
|
||||
|
||||
Declaration of the missing input variable
|
||||
--> tests/test_scope/bad/scope_call_missing.catala_en
|
||||
--> tests/test_scope/bad/scope_call_missing.catala_en:4.8-11
|
||||
|
|
||||
4 | input baz content decimal
|
||||
| ^^^
|
||||
|
@ -17,7 +17,7 @@ scope B:
|
||||
$ catala Interpret -s A
|
||||
[ERROR] The subscope a is used when defining one of its inputs, but recursion is forbidden in Catala
|
||||
|
||||
--> tests/test_scope/bad/sub_vars_in_sub_var.catala_en
|
||||
--> tests/test_scope/bad/sub_vars_in_sub_var.catala_en:13.27-30
|
||||
|
|
||||
13 | definition a.y equals if a.x then 0 else 1
|
||||
| ^^^
|
||||
|
@ -20,7 +20,7 @@ scope A:
|
||||
$ catala Interpret -s A
|
||||
[ERROR] This struct field name is ambiguous, it can belong to Foo or Bar. Disambiguate it by prefixing it with the struct name.
|
||||
|
||||
--> tests/test_struct/bad/ambiguous_fields.catala_en
|
||||
--> tests/test_struct/bad/ambiguous_fields.catala_en:16.24-25
|
||||
|
|
||||
16 | definition y equals x.f
|
||||
| ^
|
||||
|
@ -21,14 +21,14 @@ $ catala Interpret -s A
|
||||
[ERROR] struct name "S" already defined
|
||||
|
||||
First definition:
|
||||
--> tests/test_struct/bad/bug_107.catala_en
|
||||
--> tests/test_struct/bad/bug_107.catala_en:4.22-23
|
||||
|
|
||||
4 | declaration structure S:
|
||||
| ^
|
||||
+ https://github.com/CatalaLang/catala/issues/107
|
||||
|
||||
Second definition:
|
||||
--> tests/test_struct/bad/bug_107.catala_en
|
||||
--> tests/test_struct/bad/bug_107.catala_en:8.22-23
|
||||
|
|
||||
8 | declaration structure S:
|
||||
| ^
|
||||
|
@ -11,7 +11,7 @@ declaration scope Bar:
|
||||
$ catala Typecheck
|
||||
[ERROR] The struct Foo does not have any fields; give it some for Catala to be able to accept it.
|
||||
|
||||
--> tests/test_struct/bad/empty_struct.catala_en
|
||||
--> tests/test_struct/bad/empty_struct.catala_en:4.22-25
|
||||
|
|
||||
4 | declaration structure Foo:
|
||||
| ^^^
|
||||
|
@ -16,7 +16,7 @@ scope A:
|
||||
$ catala Interpret -s A
|
||||
[ERROR] The type E is defined using itself, which is forbidden since Catala does not provide recursive types
|
||||
|
||||
--> tests/test_struct/bad/nested.catala_en
|
||||
--> tests/test_struct/bad/nested.catala_en:6.17-18
|
||||
|
|
||||
6 | -- Rec content E
|
||||
| ^
|
||||
|
@ -18,28 +18,28 @@ $ catala Interpret -s A
|
||||
[ERROR] Cyclic dependency detected between types!
|
||||
|
||||
Cycle type S, declared:
|
||||
--> tests/test_struct/bad/nested2.catala_en
|
||||
--> tests/test_struct/bad/nested2.catala_en:4.22-23
|
||||
|
|
||||
4 | declaration structure S:
|
||||
| ^
|
||||
+ Article
|
||||
|
||||
Used here in the definition of another cycle type E:
|
||||
--> tests/test_struct/bad/nested2.catala_en
|
||||
--> tests/test_struct/bad/nested2.catala_en:10.19-20
|
||||
|
|
||||
10 | -- Case2 content S
|
||||
| ^
|
||||
+ Article
|
||||
|
||||
Cycle type E, declared:
|
||||
--> tests/test_struct/bad/nested2.catala_en
|
||||
--> tests/test_struct/bad/nested2.catala_en:8.24-25
|
||||
|
|
||||
8 | declaration enumeration E:
|
||||
| ^
|
||||
+ Article
|
||||
|
||||
Used here in the definition of another cycle type S:
|
||||
--> tests/test_struct/bad/nested2.catala_en
|
||||
--> tests/test_struct/bad/nested2.catala_en:5.17-18
|
||||
|
|
||||
5 | data x content E
|
||||
| ^
|
||||
|
@ -17,7 +17,7 @@ scope A:
|
||||
$ catala Interpret -s A
|
||||
[ERROR] No struct named Fo found
|
||||
|
||||
--> tests/test_struct/bad/nonexisting_struct.catala_en
|
||||
--> tests/test_struct/bad/nonexisting_struct.catala_en:13.24-26
|
||||
|
|
||||
13 | definition y equals x.Fo.f
|
||||
| ^^
|
||||
|
@ -21,7 +21,7 @@ scope A:
|
||||
$ catala Interpret -s A
|
||||
[ERROR] Struct Foo does not contain field g
|
||||
|
||||
--> tests/test_struct/bad/wrong_qualified_field.catala_en
|
||||
--> tests/test_struct/bad/wrong_qualified_field.catala_en:17.22-29
|
||||
|
|
||||
17 | definition y equals x.Foo.g
|
||||
| ^^^^^^^
|
||||
|
@ -17,21 +17,21 @@ $ catala Typecheck
|
||||
--> integer
|
||||
|
||||
Error coming from typechecking the following expression:
|
||||
--> tests/test_typing/bad/err1.catala_en
|
||||
--> tests/test_typing/bad/err1.catala_en:7.22-25
|
||||
|
|
||||
7 | Structure { -- i: 4.1 -- e: y };
|
||||
| ^^^
|
||||
+
|
||||
|
||||
Type decimal coming from expression:
|
||||
--> tests/test_typing/bad/err1.catala_en
|
||||
--> tests/test_typing/bad/err1.catala_en:7.22-25
|
||||
|
|
||||
7 | Structure { -- i: 4.1 -- e: y };
|
||||
| ^^^
|
||||
+
|
||||
|
||||
Type integer coming from expression:
|
||||
--> tests/test_typing/bad/common.catala_en
|
||||
--> tests/test_typing/bad/common.catala_en:8.17-24
|
||||
|
|
||||
8 | data i content integer
|
||||
| ^^^^^^^
|
||||
|
@ -17,21 +17,21 @@ $ catala Typecheck
|
||||
--> decimal
|
||||
|
||||
Error coming from typechecking the following expression:
|
||||
--> tests/test_typing/bad/err2.catala_en
|
||||
--> tests/test_typing/bad/err2.catala_en:10.43-44
|
||||
|
|
||||
10 | definition a equals number of (z ++ 1.1) / 2
|
||||
| ^
|
||||
+
|
||||
|
||||
Type integer coming from expression:
|
||||
--> tests/test_typing/bad/err2.catala_en
|
||||
--> tests/test_typing/bad/err2.catala_en:10.43-44
|
||||
|
|
||||
10 | definition a equals number of (z ++ 1.1) / 2
|
||||
| ^
|
||||
+
|
||||
|
||||
Type decimal coming from expression:
|
||||
--> tests/test_typing/bad/common.catala_en
|
||||
--> tests/test_typing/bad/common.catala_en:15.19-26
|
||||
|
|
||||
15 | output a content decimal
|
||||
| ^^^^^^^
|
||||
|
@ -17,21 +17,21 @@ $ catala Typecheck
|
||||
--> decimal
|
||||
|
||||
Error coming from typechecking the following expression:
|
||||
--> tests/test_typing/bad/err3.catala_en
|
||||
--> tests/test_typing/bad/err3.catala_en:10.41-42
|
||||
|
|
||||
10 | definition a equals number of (z ++ z) / 2
|
||||
| ^
|
||||
+
|
||||
|
||||
Type integer coming from expression:
|
||||
--> tests/test_typing/bad/err3.catala_en
|
||||
--> tests/test_typing/bad/err3.catala_en:10.41-42
|
||||
|
|
||||
10 | definition a equals number of (z ++ z) / 2
|
||||
| ^
|
||||
+
|
||||
|
||||
Type decimal coming from expression:
|
||||
--> tests/test_typing/bad/common.catala_en
|
||||
--> tests/test_typing/bad/common.catala_en:15.19-26
|
||||
|
|
||||
15 | output a content decimal
|
||||
| ^^^^^^^
|
||||
@ -48,21 +48,21 @@ $ catala ocaml
|
||||
--> decimal
|
||||
|
||||
Error coming from typechecking the following expression:
|
||||
--> tests/test_typing/bad/err3.catala_en
|
||||
--> tests/test_typing/bad/err3.catala_en:10.41-42
|
||||
|
|
||||
10 | definition a equals number of (z ++ z) / 2
|
||||
| ^
|
||||
+
|
||||
|
||||
Type integer coming from expression:
|
||||
--> tests/test_typing/bad/err3.catala_en
|
||||
--> tests/test_typing/bad/err3.catala_en:10.41-42
|
||||
|
|
||||
10 | definition a equals number of (z ++ z) / 2
|
||||
| ^
|
||||
+
|
||||
|
||||
Type decimal coming from expression:
|
||||
--> tests/test_typing/bad/common.catala_en
|
||||
--> tests/test_typing/bad/common.catala_en:15.19-26
|
||||
|
|
||||
15 | output a content decimal
|
||||
| ^^^^^^^
|
||||
|
@ -15,21 +15,21 @@ $ catala ocaml
|
||||
--> Structure
|
||||
|
||||
Error coming from typechecking the following expression:
|
||||
--> tests/test_typing/bad/err4.catala_en
|
||||
--> tests/test_typing/bad/err4.catala_en:5.24-37
|
||||
|
|
||||
5 | definition z equals [ Int content x ]
|
||||
| ^^^^^^^^^^^^^
|
||||
+
|
||||
|
||||
Type Enum coming from expression:
|
||||
--> tests/test_typing/bad/err4.catala_en
|
||||
--> tests/test_typing/bad/err4.catala_en:5.24-37
|
||||
|
|
||||
5 | definition z equals [ Int content x ]
|
||||
| ^^^^^^^^^^^^^
|
||||
+
|
||||
|
||||
Type Structure coming from expression:
|
||||
--> tests/test_typing/bad/common.catala_en
|
||||
--> tests/test_typing/bad/common.catala_en:14.30-39
|
||||
|
|
||||
14 | output z content collection Structure
|
||||
| ^^^^^^^^^
|
||||
|
@ -17,21 +17,21 @@ $ catala Typecheck
|
||||
--> Structure
|
||||
|
||||
Error coming from typechecking the following expression:
|
||||
--> tests/test_typing/bad/err5.catala_en
|
||||
--> tests/test_typing/bad/err5.catala_en:8.4-8
|
||||
|
|
||||
8 | 1040
|
||||
| ^^^^
|
||||
+
|
||||
|
||||
Type integer coming from expression:
|
||||
--> tests/test_typing/bad/err5.catala_en
|
||||
--> tests/test_typing/bad/err5.catala_en:8.4-8
|
||||
|
|
||||
8 | 1040
|
||||
| ^^^^
|
||||
+
|
||||
|
||||
Type Structure coming from expression:
|
||||
--> tests/test_typing/bad/common.catala_en
|
||||
--> tests/test_typing/bad/common.catala_en:14.30-39
|
||||
|
|
||||
14 | output z content collection Structure
|
||||
| ^^^^^^^^^
|
||||
|
@ -33,21 +33,21 @@ $ catala ocaml
|
||||
--> integer
|
||||
|
||||
Error coming from typechecking the following expression:
|
||||
--> tests/test_typing/bad/err6.catala_en
|
||||
--> tests/test_typing/bad/err6.catala_en:20.26-29
|
||||
|
|
||||
20 | definition sub.x equals 44.
|
||||
| ^^^
|
||||
+
|
||||
|
||||
Type decimal coming from expression:
|
||||
--> tests/test_typing/bad/err6.catala_en
|
||||
--> tests/test_typing/bad/err6.catala_en:20.26-29
|
||||
|
|
||||
20 | definition sub.x equals 44.
|
||||
| ^^^
|
||||
+
|
||||
|
||||
Type integer coming from expression:
|
||||
--> tests/test_typing/bad/common.catala_en
|
||||
--> tests/test_typing/bad/common.catala_en:12.18-25
|
||||
|
|
||||
12 | input x content integer
|
||||
| ^^^^^^^
|
||||
|
@ -14,14 +14,14 @@ scope A:
|
||||
$ catala Typecheck
|
||||
[ERROR] This definition does not indicate which state has to be considered for variable foo.
|
||||
|
||||
--> tests/test_variable_state/bad/def_no_state.catala_en
|
||||
--> tests/test_variable_state/bad/def_no_state.catala_en:10.13-16
|
||||
|
|
||||
10 | definition foo equals 2
|
||||
| ^^^
|
||||
+ Test
|
||||
|
||||
Variable declaration:
|
||||
--> tests/test_variable_state/bad/def_no_state.catala_en
|
||||
--> tests/test_variable_state/bad/def_no_state.catala_en:5.9-12
|
||||
|
|
||||
5 | output foo content integer
|
||||
| ^^^
|
||||
|
@ -18,7 +18,7 @@ scope A:
|
||||
$ catala Typecheck
|
||||
[ERROR] Unknown label for the scope variable foo.baz: "thing"
|
||||
|
||||
--> tests/test_variable_state/bad/no_cross_exceptions.catala_en
|
||||
--> tests/test_variable_state/bad/no_cross_exceptions.catala_en:14.12-17
|
||||
|
|
||||
14 | exception thing definition foo state baz under condition true consequence equals 3
|
||||
| ^^^^^
|
||||
|
@ -16,7 +16,7 @@ scope A:
|
||||
$ catala Typecheck
|
||||
[ERROR] It is impossible to refer to the variable you are defining when defining its first state.
|
||||
|
||||
--> tests/test_variable_state/bad/self_reference_first_state.catala_en
|
||||
--> tests/test_variable_state/bad/self_reference_first_state.catala_en:10.34-37
|
||||
|
|
||||
10 | definition foo state bar equals foo + 1
|
||||
| ^^^
|
||||
|
@ -24,56 +24,56 @@ $ catala Typecheck
|
||||
[ERROR] Cyclic dependency detected between variables of scope A!
|
||||
|
||||
Cycle variable foofoo.bar, declared:
|
||||
--> tests/test_variable_state/bad/state_cycle.catala_en
|
||||
--> tests/test_variable_state/bad/state_cycle.catala_en:9.10-13
|
||||
|
|
||||
9 | state bar
|
||||
| ^^^
|
||||
+ Test
|
||||
|
||||
Used here in the definition of another cycle variable foofoo.baz:
|
||||
--> tests/test_variable_state/bad/state_cycle.catala_en
|
||||
--> tests/test_variable_state/bad/state_cycle.catala_en:19.37-43
|
||||
|
|
||||
19 | definition foofoo state baz equals foofoo + 1
|
||||
| ^^^^^^
|
||||
+ Test
|
||||
|
||||
Cycle variable foofoo.baz, declared:
|
||||
--> tests/test_variable_state/bad/state_cycle.catala_en
|
||||
--> tests/test_variable_state/bad/state_cycle.catala_en:10.10-13
|
||||
|
|
||||
10 | state baz
|
||||
| ^^^
|
||||
+ Test
|
||||
|
||||
Used here in the definition of another cycle variable foo.bar:
|
||||
--> tests/test_variable_state/bad/state_cycle.catala_en
|
||||
--> tests/test_variable_state/bad/state_cycle.catala_en:13.34-40
|
||||
|
|
||||
13 | definition foo state bar equals foofoo
|
||||
| ^^^^^^
|
||||
+ Test
|
||||
|
||||
Cycle variable foo.bar, declared:
|
||||
--> tests/test_variable_state/bad/state_cycle.catala_en
|
||||
--> tests/test_variable_state/bad/state_cycle.catala_en:6.10-13
|
||||
|
|
||||
6 | state bar
|
||||
| ^^^
|
||||
+ Test
|
||||
|
||||
Used here in the definition of another cycle variable foo.baz:
|
||||
--> tests/test_variable_state/bad/state_cycle.catala_en
|
||||
--> tests/test_variable_state/bad/state_cycle.catala_en:15.34-37
|
||||
|
|
||||
15 | definition foo state baz equals foo + 1
|
||||
| ^^^
|
||||
+ Test
|
||||
|
||||
Cycle variable foo.baz, declared:
|
||||
--> tests/test_variable_state/bad/state_cycle.catala_en
|
||||
--> tests/test_variable_state/bad/state_cycle.catala_en:7.10-13
|
||||
|
|
||||
7 | state baz
|
||||
| ^^^
|
||||
+ Test
|
||||
|
||||
Used here in the definition of another cycle variable foofoo.bar:
|
||||
--> tests/test_variable_state/bad/state_cycle.catala_en
|
||||
--> tests/test_variable_state/bad/state_cycle.catala_en:17.37-40
|
||||
|
|
||||
17 | definition foofoo state bar equals foo
|
||||
| ^^^
|
||||
|
@ -16,14 +16,14 @@ scope A:
|
||||
$ catala Typecheck
|
||||
[ERROR] This identifier is not a state declared for variable foo.
|
||||
|
||||
--> tests/test_variable_state/bad/unknown_state.catala_en
|
||||
--> tests/test_variable_state/bad/unknown_state.catala_en:12.23-27
|
||||
|
|
||||
12 | definition foo state basz equals foo + 1
|
||||
| ^^^^
|
||||
+ Test
|
||||
|
||||
Variable declaration:
|
||||
--> tests/test_variable_state/bad/unknown_state.catala_en
|
||||
--> tests/test_variable_state/bad/unknown_state.catala_en:5.9-12
|
||||
|
|
||||
5 | output foo content integer
|
||||
| ^^^
|
||||
|
Loading…
Reference in New Issue
Block a user