diff --git a/build.zig b/build.zig index fa4e8549d2..409a33521f 100644 --- a/build.zig +++ b/build.zig @@ -17,6 +17,7 @@ pub fn build(b: *std.Build) void { const fmt_step = b.step("fmt", "Format all zig code"); const check_fmt_step = b.step("check-fmt", "Check formatting of all zig code"); const snapshot_step = b.step("snapshot", "Run the snapshot tool to update snapshot files"); + const update_expected_step = b.step("update-expected", "Update EXPECTED sections based on PROBLEMS in snapshots"); // general configuration const target = b.standardTargetOptions(.{ .default_target = .{ @@ -75,6 +76,17 @@ pub fn build(b: *std.Build) void { add_tracy(b, build_options, snapshot_exe, target, false, tracy); install_and_run(b, no_bin, snapshot_exe, snapshot_step, snapshot_step); + // Add update-expected tool + const update_expected_exe = b.addExecutable(.{ + .name = "update-expected", + .root_source_file = b.path("src/update_expected.zig"), + .target = target, + .optimize = optimize, + .link_libc = true, + }); + add_tracy(b, build_options, update_expected_exe, target, false, tracy); + install_and_run(b, no_bin, update_expected_exe, update_expected_step, update_expected_step); + const all_tests = b.addTest(.{ .root_source_file = b.path("src/test.zig"), .target = target, diff --git a/src/snapshot.zig b/src/snapshot.zig index 143709a469..6dacb0e28d 100644 --- a/src/snapshot.zig +++ b/src/snapshot.zig @@ -781,7 +781,7 @@ fn generateSourceSection(output: *DualOutput, content: *const Content) !void { } /// Generate EXPECTED section for both markdown and HTML -fn generateExpectedSection(output: *DualOutput, parse_ast: *AST, can_ir: *CIR, _: *Solver, snapshot_path: []const u8, source: []const u8, module_env: *base.ModuleEnv) !void { +fn generateExpectedSection(output: *DualOutput, content: *const Content) !void { try output.begin_section("EXPECTED"); // HTML EXPECTED section @@ -789,205 +789,24 @@ fn generateExpectedSection(output: *DualOutput, parse_ast: *AST, can_ir: *CIR, _ \\
); - var has_problems = false; + if (content.expected) |expected| { + try output.md_writer.writeAll(expected); + try output.md_writer.writeByte('\n'); - // Extract basename from snapshot_path for location reporting - const basename = std.fs.path.basename(snapshot_path); - - // Check for tokenize diagnostics - for (parse_ast.tokenize_diagnostics.items) |diagnostic| { - has_problems = true; - const region = diagnostic.region; - const info = module_env.calcRegionInfo(source, region.start.offset, region.end.offset) catch |err| { - std.log.warn("Failed to calculate region info for tokenize diagnostic: {}", .{err}); - continue; - }; - try output.md_writer.print("{s} - {s}:{d}:{d}:{d}:{d}\n", .{ - @tagName(diagnostic.tag), - basename, - info.start_line_idx + 1, - info.start_col_idx + 1, - info.end_line_idx + 1, - info.end_col_idx + 1, - }); - } - - // Check for parser diagnostics - for (parse_ast.parse_diagnostics.items) |diagnostic| { - has_problems = true; - const region = parse_ast.tokenizedRegionToRegion(diagnostic.region); - const info = module_env.calcRegionInfo(source, region.start.offset, region.end.offset) catch |err| { - std.log.warn("Failed to calculate region info for parse diagnostic: {}", .{err}); - continue; - }; - const problem_name = switch (diagnostic.tag) { - .expr_unexpected_token => "UNEXPECTED TOKEN IN EXPRESSION", - .pattern_unexpected_token => "UNEXPECTED TOKEN IN PATTERN", - .ty_anno_unexpected_token => "UNEXPECTED TOKEN IN TYPE ANNOTATION", - else => @tagName(diagnostic.tag), - }; - try output.md_writer.print("{s} - {s}:{d}:{d}:{d}:{d}\n", .{ - problem_name, - basename, - info.start_line_idx + 1, - info.start_col_idx + 1, - info.end_line_idx + 1, - info.end_col_idx + 1, - }); - } - - // Check for canonicalization diagnostics - const diagnostics = can_ir.getDiagnostics(); - defer output.gpa.free(diagnostics); - for (diagnostics) |diagnostic| { - // Extract region from the union - const region = switch (diagnostic) { - .not_implemented => |d| d.region, - .invalid_num_literal => |d| d.region, - .invalid_single_quote => |d| d.region, - .too_long_single_quote => |d| d.region, - .empty_single_quote => |d| d.region, - .empty_tuple => |d| d.region, - .ident_already_in_scope => |d| d.region, - .ident_not_in_scope => |d| d.region, - .expr_not_canonicalized => |d| d.region, - .invalid_string_interpolation => |d| d.region, - .type_redeclared => |d| d.redeclared_region, - .undeclared_type => |d| d.region, - .undeclared_type_var => |d| d.region, - .unused_variable => |d| d.region, - .used_underscore_variable => |d| d.region, - .malformed_type_annotation => |d| d.region, - .invalid_top_level_statement => continue, // no region - else => continue, // skip unknown diagnostics - }; - - has_problems = true; - const info = module_env.calcRegionInfo(source, region.start.offset, region.end.offset) catch |err| { - std.log.warn("Failed to calculate region info for canonicalize diagnostic: {}", .{err}); - continue; - }; - const problem_name = switch (diagnostic) { - .ident_already_in_scope => "DUPLICATE DEFINITION", - .ident_not_in_scope => "UNDEFINED VARIABLE", - .undeclared_type => "UNDECLARED TYPE", - .type_redeclared => "TYPE REDECLARED", - .malformed_type_annotation => "MALFORMED TYPE", - .unused_variable => "UNUSED VARIABLE", - else => @tagName(diagnostic), - }; - try output.md_writer.print("{s} - {s}:{d}:{d}:{d}:{d}\n", .{ - problem_name, - basename, - info.start_line_idx + 1, - info.start_col_idx + 1, - info.end_line_idx + 1, - info.end_col_idx + 1, - }); - } - - // Note: Type checking problems don't have regions directly associated with them - // They are found during type checking, not parsing - - if (!has_problems) { + // For HTML, escape the expected content + for (expected) |char| { + switch (char) { + '<' => try output.html_writer.writeAll("<"), + '>' => try output.html_writer.writeAll(">"), + '&' => try output.html_writer.writeAll("&"), + '"' => try output.html_writer.writeAll("""), + '\'' => try output.html_writer.writeAll("'"), + else => try output.html_writer.writeByte(char), + } + } + } else { try output.md_writer.writeAll("NIL\n"); try output.html_writer.writeAll("

NIL

"); - } else { - // For HTML, show the expected problems - try output.html_writer.writeAll("
");
-
-        // Re-generate all diagnostics for HTML
-
-        // Tokenize diagnostics
-        for (parse_ast.tokenize_diagnostics.items) |diagnostic| {
-            const region = diagnostic.region;
-            const info = module_env.calcRegionInfo(source, region.start.offset, region.end.offset) catch |err| {
-                std.log.warn("Failed to calculate region info for parse diagnostic (HTML): {}", .{err});
-                continue;
-            };
-            try output.html_writer.print("{s} - {s}:{d}:{d}:{d}:{d}\n", .{
-                @tagName(diagnostic.tag),
-                basename,
-                info.start_line_idx + 1,
-                info.start_col_idx + 1,
-                info.end_line_idx + 1,
-                info.end_col_idx + 1,
-            });
-        }
-
-        // Parser diagnostics
-        for (parse_ast.parse_diagnostics.items) |diagnostic| {
-            const region = parse_ast.tokenizedRegionToRegion(diagnostic.region);
-            const info = module_env.calcRegionInfo(source, region.start.offset, region.end.offset) catch |err| {
-                std.log.warn("Failed to calculate region info for tokenize diagnostic (HTML): {}", .{err});
-                continue;
-            };
-            const problem_name = switch (diagnostic.tag) {
-                .expr_unexpected_token => "UNEXPECTED TOKEN IN EXPRESSION",
-                .pattern_unexpected_token => "UNEXPECTED TOKEN IN PATTERN",
-                .ty_anno_unexpected_token => "UNEXPECTED TOKEN IN TYPE ANNOTATION",
-                else => @tagName(diagnostic.tag),
-            };
-            try output.html_writer.print("{s} - {s}:{d}:{d}:{d}:{d}\n", .{
-                problem_name,
-                basename,
-                info.start_line_idx + 1,
-                info.start_col_idx + 1,
-                info.end_line_idx + 1,
-                info.end_col_idx + 1,
-            });
-        }
-
-        // Canonicalization diagnostics
-        for (diagnostics) |diagnostic| {
-            // Extract region from the union
-            const region = switch (diagnostic) {
-                .not_implemented => |d| d.region,
-                .invalid_num_literal => |d| d.region,
-                .invalid_single_quote => |d| d.region,
-                .too_long_single_quote => |d| d.region,
-                .empty_single_quote => |d| d.region,
-                .empty_tuple => |d| d.region,
-                .ident_already_in_scope => |d| d.region,
-                .ident_not_in_scope => |d| d.region,
-                .expr_not_canonicalized => |d| d.region,
-                .invalid_string_interpolation => |d| d.region,
-                .type_redeclared => |d| d.redeclared_region,
-                .undeclared_type => |d| d.region,
-                .undeclared_type_var => |d| d.region,
-                .unused_variable => |d| d.region,
-                .used_underscore_variable => |d| d.region,
-                .malformed_type_annotation => |d| d.region,
-                .invalid_top_level_statement => continue, // no region
-                else => continue, // skip unknown diagnostics
-            };
-
-            const problem_name = switch (diagnostic) {
-                .ident_already_in_scope => "DUPLICATE DEFINITION",
-                .ident_not_in_scope => "UNDEFINED VARIABLE",
-                .undeclared_type => "UNDECLARED TYPE",
-                .type_redeclared => "TYPE REDECLARED",
-                .malformed_type_annotation => "MALFORMED TYPE",
-                .unused_variable => "UNUSED VARIABLE",
-                else => @tagName(diagnostic),
-            };
-            const info = module_env.calcRegionInfo(source, region.start.offset, region.end.offset) catch |err| {
-                std.log.warn("Failed to calculate region info for canonicalize diagnostic (HTML): {}", .{err});
-                continue;
-            };
-            try output.html_writer.print("{s} - {s}:{d}:{d}:{d}:{d}\n", .{
-                problem_name,
-                basename,
-                info.start_line_idx + 1,
-                info.start_col_idx + 1,
-                info.end_line_idx + 1,
-                info.end_col_idx + 1,
-            });
-        }
-
-        // Note: Type checking problems don't have regions directly associated with them
-
-        try output.html_writer.writeAll("
"); } try output.html_writer.writeAll( @@ -1623,7 +1442,7 @@ fn processSnapshotFileUnified(gpa: Allocator, snapshot_path: []const u8, maybe_f // Generate all sections simultaneously try generateMetaSection(&output, &content); try generateSourceSection(&output, &content); - try generateExpectedSection(&output, &parse_ast, &can_ir, &solver, snapshot_path, content.source, &module_env); + try generateExpectedSection(&output, &content); try generateProblemsSection(&output, &parse_ast, &can_ir, &solver, &content, snapshot_path, &module_env); try generateTokensSection(&output, &parse_ast, &content, &module_env); diff --git a/src/snapshot_expected_test.zig b/src/snapshot_expected_test.zig index 010bde534e..a62db77019 100644 --- a/src/snapshot_expected_test.zig +++ b/src/snapshot_expected_test.zig @@ -247,8 +247,10 @@ fn validateSnapshotProblems(allocator: std.mem.Allocator, path: []const u8) !voi defer allocator.free(content); const expected_section = extractSection(content, "EXPECTED") orelse { - // No EXPECTED section is OK - some snapshots might not have it yet - return; + // EXPECTED section is required for all snapshots + std.debug.print("\n❌ {s}:\n", .{std.fs.path.basename(path)}); + std.debug.print(" Missing EXPECTED section\n", .{}); + return error.MissingExpectedSection; }; const problems_section = extractSection(content, "PROBLEMS") orelse { @@ -373,7 +375,7 @@ test "snapshot validation" { // Validate each snapshot for (snapshot_files.items) |snapshot_path| { validateSnapshotProblems(allocator, snapshot_path) catch |err| { - if (err == error.SnapshotValidationFailed) { + if (err == error.SnapshotValidationFailed or err == error.MissingExpectedSection) { total_failures += 1; try failed_files.append(snapshot_path); } else { diff --git a/src/snapshots/add_var_with_spaces.md b/src/snapshots/add_var_with_spaces.md index 59659b7d6b..7afa255f95 100644 --- a/src/snapshots/add_var_with_spaces.md +++ b/src/snapshots/add_var_with_spaces.md @@ -10,9 +10,12 @@ module [add2] add2 = x + 2 ~~~ # EXPECTED -UNDEFINED VARIABLE - add_var_with_spaces.md:3:8:3:9 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `x` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig KwModule(1:1-1:7),OpenSquare(1:8-1:9),LowerIdent(1:9-1:13),CloseSquare(1:13-1:14),Newline(1:1-1:1), diff --git a/src/snapshots/binop_omnibus__single__no_spaces.md b/src/snapshots/binop_omnibus__single__no_spaces.md index 29edb5a056..b7d94d70a8 100644 --- a/src/snapshots/binop_omnibus__single__no_spaces.md +++ b/src/snapshots/binop_omnibus__single__no_spaces.md @@ -8,9 +8,12 @@ type=expr Err(foo)??12>5*5 or 13+2<5 and 10-1>=16 or 12<=3/5 ~~~ # EXPECTED -UNDEFINED VARIABLE - binop_omnibus__single__no_spaces.md:1:5:1:8 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `foo` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig UpperIdent(1:1-1:4),NoSpaceOpenRound(1:4-1:5),LowerIdent(1:5-1:8),CloseRound(1:8-1:9),OpDoubleQuestion(1:9-1:11),Int(1:11-1:13),OpGreaterThan(1:13-1:14),Int(1:14-1:15),OpStar(1:15-1:16),Int(1:16-1:17),OpOr(1:18-1:20),Int(1:21-1:23),OpPlus(1:23-1:24),Int(1:24-1:25),OpLessThan(1:25-1:26),Int(1:26-1:27),OpAnd(1:28-1:31),Int(1:32-1:34),OpBinaryMinus(1:34-1:35),Int(1:35-1:36),OpGreaterThanOrEq(1:36-1:38),Int(1:38-1:40),OpOr(1:41-1:43),Int(1:44-1:46),OpLessThanOrEq(1:46-1:48),Int(1:48-1:49),OpSlash(1:49-1:50),Int(1:50-1:51),EndOfFile(1:51-1:51), diff --git a/src/snapshots/binop_omnibus__singleline.md b/src/snapshots/binop_omnibus__singleline.md index bd1e86f224..d91ac55825 100644 --- a/src/snapshots/binop_omnibus__singleline.md +++ b/src/snapshots/binop_omnibus__singleline.md @@ -8,9 +8,12 @@ type=expr Err(foo) ?? 12 > 5 * 5 or 13 + 2 < 5 and 10 - 1 >= 16 or 12 <= 3 / 5 ~~~ # EXPECTED -UNDEFINED VARIABLE - binop_omnibus__singleline.md:1:5:1:8 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `foo` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig UpperIdent(1:1-1:4),NoSpaceOpenRound(1:4-1:5),LowerIdent(1:5-1:8),CloseRound(1:8-1:9),OpDoubleQuestion(1:10-1:12),Int(1:13-1:15),OpGreaterThan(1:16-1:17),Int(1:18-1:19),OpStar(1:20-1:21),Int(1:22-1:23),OpOr(1:24-1:26),Int(1:27-1:29),OpPlus(1:30-1:31),Int(1:32-1:33),OpLessThan(1:34-1:35),Int(1:36-1:37),OpAnd(1:38-1:41),Int(1:42-1:44),OpBinaryMinus(1:45-1:46),Int(1:47-1:48),OpGreaterThanOrEq(1:49-1:51),Int(1:52-1:54),OpOr(1:55-1:57),Int(1:58-1:60),OpLessThanOrEq(1:61-1:63),Int(1:64-1:65),OpSlash(1:66-1:67),Int(1:68-1:69),EndOfFile(1:69-1:69), diff --git a/src/snapshots/can_basic_scoping.md b/src/snapshots/can_basic_scoping.md index 3220e9bf8e..50ede0c158 100644 --- a/src/snapshots/can_basic_scoping.md +++ b/src/snapshots/can_basic_scoping.md @@ -23,9 +23,26 @@ outerFunc = |_| { } ~~~ # EXPECTED -NIL +DUPLICATE DEFINITION - can_basic_scoping.md:9:5:9:6 # PROBLEMS -NIL +**DUPLICATE DEFINITION** +The name `x` is being redeclared in this scope. + +The redeclaration is here: +**can_basic_scoping.md:9:5:9:6:** +```roc + x = 20 # Should shadow top-level x +``` + ^ + +But `x` was already defined here: +**can_basic_scoping.md:4:1:4:2:** +```roc +x = 5 +``` +^ + + # TOKENS ~~~zig KwModule(1:1-1:7),OpenSquare(1:8-1:9),CloseSquare(1:9-1:10),Newline(1:1-1:1), diff --git a/src/snapshots/can_dot_access.md b/src/snapshots/can_dot_access.md index 1741bd9aae..9397538ced 100644 --- a/src/snapshots/can_dot_access.md +++ b/src/snapshots/can_dot_access.md @@ -8,10 +8,16 @@ type=expr list.map(fn) ~~~ # EXPECTED -UNDEFINED VARIABLE - can_dot_access.md:1:1:1:5 -UNDEFINED VARIABLE - can_dot_access.md:1:10:1:12 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `list` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `fn` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:5),NoSpaceDotLowerIdent(1:5-1:9),NoSpaceOpenRound(1:9-1:10),LowerIdent(1:10-1:12),CloseRound(1:12-1:13),EndOfFile(1:13-1:13), diff --git a/src/snapshots/can_import_exposing_types.md b/src/snapshots/can_import_exposing_types.md index 2cf3ab4bfb..51f7c65bc6 100644 --- a/src/snapshots/can_import_exposing_types.md +++ b/src/snapshots/can_import_exposing_types.md @@ -61,36 +61,10 @@ combineResults = |jsonResult, httpStatus| } ~~~ # EXPECTED -expected_expr_close_curly_or_comma - can_import_exposing_types.md:52:45:52:51 -expected_expr_apply_close_round - can_import_exposing_types.md:52:22:52:25 +PARSE ERROR - can_import_exposing_types.md:52:45:52:51 +PARSE ERROR - can_import_exposing_types.md:52:22:52:25 UNEXPECTED TOKEN IN EXPRESSION - can_import_exposing_types.md:52:71:52:73 -UNEXPECTED TOKEN IN EXPRESSION - can_import_exposing_types.md:1:1:53:12 -UNDECLARED TYPE - can_import_exposing_types.md:31:18:31:24 -UNDECLARED TYPE - can_import_exposing_types.md:32:18:32:24 -UNDECLARED TYPE - can_import_exposing_types.md:33:23:33:31 -UNDECLARED TYPE - can_import_exposing_types.md:8:27:8:32 -UNDECLARED TYPE - can_import_exposing_types.md:8:34:8:39 -UNDECLARED TYPE - can_import_exposing_types.md:12:17:12:24 -UNDECLARED TYPE - can_import_exposing_types.md:12:28:12:36 -UNDECLARED TYPE - can_import_exposing_types.md:22:15:22:21 -UNDECLARED TYPE - can_import_exposing_types.md:22:28:22:33 -UNDECLARED TYPE - can_import_exposing_types.md:22:50:22:55 -UNDECLARED TYPE - can_import_exposing_types.md:22:58:22:63 -UNDEFINED VARIABLE - can_import_exposing_types.md:24:5:24:16 -UNDECLARED TYPE - can_import_exposing_types.md:37:16:37:22 -UNDECLARED TYPE - can_import_exposing_types.md:41:18:41:26 -UNDEFINED VARIABLE - can_import_exposing_types.md:45:23:45:37 -UNDECLARED TYPE - can_import_exposing_types.md:49:25:49:30 -UNDECLARED TYPE - can_import_exposing_types.md:49:32:49:37 -UNDECLARED TYPE - can_import_exposing_types.md:49:40:49:46 -UNDECLARED TYPE - can_import_exposing_types.md:49:57:49:65 -UNDECLARED TYPE - can_import_exposing_types.md:49:67:49:72 -expr_not_canonicalized - can_import_exposing_types.md:52:22:52:70 -UNUSED VARIABLE - can_import_exposing_types.md:52:12:52:17 -expr_not_canonicalized - can_import_exposing_types.md:52:71:52:73 -UNUSED VARIABLE - can_import_exposing_types.md:52:60:52:70 -expr_not_canonicalized - can_import_exposing_types.md:1:1:53:12 -UNUSED VARIABLE - can_import_exposing_types.md:50:31:50:41 +UNEXPECTED TOKEN IN PATTERN - can_import_exposing_types.md:52:72:52:72 # PROBLEMS **PARSE ERROR** A parsing error occurred: `expected_expr_close_curly_or_comma` @@ -255,6 +229,281 @@ combineResults = |jsonResult, httpStatus| ``` +**UNDECLARED TYPE** +The type ``Config`` is not declared in this scope. + +This type is referenced here: +**can_import_exposing_types.md:31:18:31:24:** +```roc + jsonConfig : Config, +``` + ^^^^^^ + + +**UNDECLARED TYPE** +The type ``Status`` is not declared in this scope. + +This type is referenced here: +**can_import_exposing_types.md:32:18:32:24:** +```roc + httpStatus : Status, +``` + ^^^^^^ + + +**UNDECLARED TYPE** +The type ``Response`` is not declared in this scope. + +This type is referenced here: +**can_import_exposing_types.md:33:23:33:31:** +```roc + defaultResponse : Response, +``` + ^^^^^^^^ + + +**UNDECLARED TYPE** +The type ``Value`` is not declared in this scope. + +This type is referenced here: +**can_import_exposing_types.md:8:27:8:32:** +```roc +parseJson : Str -> Result(Value, Error) +``` + ^^^^^ + + +**UNDECLARED TYPE** +The type ``Error`` is not declared in this scope. + +This type is referenced here: +**can_import_exposing_types.md:8:34:8:39:** +```roc +parseJson : Str -> Result(Value, Error) +``` + ^^^^^ + + +**UNDECLARED TYPE** +The type ``Request`` is not declared in this scope. + +This type is referenced here: +**can_import_exposing_types.md:12:17:12:24:** +```roc +handleRequest : Request -> Response +``` + ^^^^^^^ + + +**UNDECLARED TYPE** +The type ``Response`` is not declared in this scope. + +This type is referenced here: +**can_import_exposing_types.md:12:28:12:36:** +```roc +handleRequest : Request -> Response +``` + ^^^^^^^^ + + +**UNDECLARED TYPE** +The type ``Config`` is not declared in this scope. + +This type is referenced here: +**can_import_exposing_types.md:22:15:22:21:** +```roc +processData : Config, List(Value) -> Result(List(Value), Error) +``` + ^^^^^^ + + +**UNDECLARED TYPE** +The type ``Value`` is not declared in this scope. + +This type is referenced here: +**can_import_exposing_types.md:22:28:22:33:** +```roc +processData : Config, List(Value) -> Result(List(Value), Error) +``` + ^^^^^ + + +**UNDECLARED TYPE** +The type ``Value`` is not declared in this scope. + +This type is referenced here: +**can_import_exposing_types.md:22:50:22:55:** +```roc +processData : Config, List(Value) -> Result(List(Value), Error) +``` + ^^^^^ + + +**UNDECLARED TYPE** +The type ``Error`` is not declared in this scope. + +This type is referenced here: +**can_import_exposing_types.md:22:58:22:63:** +```roc +processData : Config, List(Value) -> Result(List(Value), Error) +``` + ^^^^^ + + +**UNDEFINED VARIABLE** +Nothing is named `mapTry` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDECLARED TYPE** +The type ``Config`` is not declared in this scope. + +This type is referenced here: +**can_import_exposing_types.md:37:16:37:22:** +```roc +createClient : Config -> Http.Client +``` + ^^^^^^ + + +**UNDECLARED TYPE** +The type ``Response`` is not declared in this scope. + +This type is referenced here: +**can_import_exposing_types.md:41:18:41:26:** +```roc +handleResponse : Response -> Str +``` + ^^^^^^^^ + + +**UNDEFINED VARIABLE** +Nothing is named `toString` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDECLARED TYPE** +The type ``Value`` is not declared in this scope. + +This type is referenced here: +**can_import_exposing_types.md:49:25:49:30:** +```roc +combineResults : Result(Value, Error), Status -> Result(Response, Error) +``` + ^^^^^ + + +**UNDECLARED TYPE** +The type ``Error`` is not declared in this scope. + +This type is referenced here: +**can_import_exposing_types.md:49:32:49:37:** +```roc +combineResults : Result(Value, Error), Status -> Result(Response, Error) +``` + ^^^^^ + + +**UNDECLARED TYPE** +The type ``Status`` is not declared in this scope. + +This type is referenced here: +**can_import_exposing_types.md:49:40:49:46:** +```roc +combineResults : Result(Value, Error), Status -> Result(Response, Error) +``` + ^^^^^^ + + +**UNDECLARED TYPE** +The type ``Response`` is not declared in this scope. + +This type is referenced here: +**can_import_exposing_types.md:49:57:49:65:** +```roc +combineResults : Result(Value, Error), Status -> Result(Response, Error) +``` + ^^^^^^^^ + + +**UNDECLARED TYPE** +The type ``Error`` is not declared in this scope. + +This type is referenced here: +**can_import_exposing_types.md:49:67:49:72:** +```roc +combineResults : Result(Value, Error), Status -> Result(Response, Error) +``` + ^^^^^ + + +**UNKNOWN OPERATOR** +This looks like an operator, but it's not one I recognize! +Check the spelling and make sure you're using a valid Roc operator. + +**UNUSED VARIABLE** +Variable ``value`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_value` to suppress this warning. +The unused variable is declared here: +**can_import_exposing_types.md:52:12:52:17:** +```roc + Ok(value) => Ok({ body: Json.encode value, status: httpStatus }) +``` + ^^^^^ + + +**DUPLICATE DEFINITION** +The name `httpStatus` is being redeclared in this scope. + +The redeclaration is here: +**can_import_exposing_types.md:52:60:52:70:** +```roc + Ok(value) => Ok({ body: Json.encode value, status: httpStatus }) +``` + ^^^^^^^^^^ + +But `httpStatus` was already defined here: +**can_import_exposing_types.md:50:31:50:41:** +```roc +combineResults = |jsonResult, httpStatus| +``` + ^^^^^^^^^^ + + +**UNKNOWN OPERATOR** +This looks like an operator, but it's not one I recognize! +Check the spelling and make sure you're using a valid Roc operator. + +**UNUSED VARIABLE** +Variable ``httpStatus`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_httpStatus` to suppress this warning. +The unused variable is declared here: +**can_import_exposing_types.md:52:60:52:70:** +```roc + Ok(value) => Ok({ body: Json.encode value, status: httpStatus }) +``` + ^^^^^^^^^^ + + +**INVALID PATTERN** +This pattern contains invalid syntax or uses unsupported features. + +**UNKNOWN OPERATOR** +This looks like an operator, but it's not one I recognize! +Check the spelling and make sure you're using a valid Roc operator. + +**UNUSED VARIABLE** +Variable ``httpStatus`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_httpStatus` to suppress this warning. +The unused variable is declared here: +**can_import_exposing_types.md:50:31:50:41:** +```roc +combineResults = |jsonResult, httpStatus| +``` + ^^^^^^^^^^ + + # TOKENS ~~~zig KwModule(1:1-1:7),OpenSquare(1:8-1:9),CloseSquare(1:9-1:10),Newline(1:1-1:1), diff --git a/src/snapshots/can_import_nested_modules.md b/src/snapshots/can_import_nested_modules.md index 1aa4a8f83e..f55921ddcd 100644 --- a/src/snapshots/can_import_nested_modules.md +++ b/src/snapshots/can_import_nested_modules.md @@ -33,17 +33,13 @@ validateAuth : HttpAuth.Credentials -> Result(HttpAuth.Token, HttpAuth.Error) validateAuth = |creds| HttpAuth.validate(creds) ~~~ # EXPECTED +UNEXPECTED TOKEN IN EXPRESSION - can_import_nested_modules.md:3:19:3:19 UNEXPECTED TOKEN IN EXPRESSION - can_import_nested_modules.md:4:19:4:27 UNEXPECTED TOKEN IN EXPRESSION - can_import_nested_modules.md:4:25:4:36 +PARSE ERROR - can_import_nested_modules.md:4:28:4:28 UNEXPECTED TOKEN IN EXPRESSION - can_import_nested_modules.md:5:13:5:27 UNEXPECTED TOKEN IN EXPRESSION - can_import_nested_modules.md:5:20:5:36 UNEXPECTED TOKEN IN EXPRESSION - can_import_nested_modules.md:5:28:5:38 -UNDEFINED VARIABLE - can_import_nested_modules.md:9:26:9:41 -UNDEFINED VARIABLE - can_import_nested_modules.md:13:29:13:43 -UNDEFINED VARIABLE - can_import_nested_modules.md:18:5:18:37 -UNDEFINED VARIABLE - can_import_nested_modules.md:22:23:22:30 -UNDEFINED VARIABLE - can_import_nested_modules.md:22:37:22:58 -UNDEFINED VARIABLE - can_import_nested_modules.md:26:24:26:41 # PROBLEMS **UNEXPECTED TOKEN IN EXPRESSION** The token is not expected in an expression. @@ -141,6 +137,62 @@ import utils.String.Format exposing [padLeft] ^^^^^^^^^^ +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**UNDEFINED VARIABLE** +Nothing is named `toString` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `login` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `parseWith` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `padLeft` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `defaultPadding` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `validate` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig KwModule(1:1-1:7),OpenSquare(1:8-1:9),CloseSquare(1:9-1:10),Newline(1:1-1:1), diff --git a/src/snapshots/can_import_type_annotations.md b/src/snapshots/can_import_type_annotations.md index 9f2a16936e..4e0426f88d 100644 --- a/src/snapshots/can_import_type_annotations.md +++ b/src/snapshots/can_import_type_annotations.md @@ -46,14 +46,13 @@ combineResults = |result1, result2| } ~~~ # EXPECTED -expected_expr_apply_close_round - can_import_type_annotations.md:17:21:17:24 +PARSE ERROR - can_import_type_annotations.md:17:21:17:24 +UNEXPECTED TOKEN IN PATTERN - can_import_type_annotations.md:17:41:17:41 UNEXPECTED TOKEN IN EXPRESSION - can_import_type_annotations.md:1:1:18:12 UNDECLARED TYPE - can_import_type_annotations.md:7:18:7:25 UNDECLARED TYPE - can_import_type_annotations.md:7:29:7:37 UNUSED VARIABLE - can_import_type_annotations.md:8:19:8:22 -expr_not_canonicalized - can_import_type_annotations.md:17:21:17:42 -UNUSED VARIABLE - can_import_type_annotations.md:17:12:17:16 -expr_not_canonicalized - can_import_type_annotations.md:1:1:18:12 +UNKNOWN OPERATOR - can_import_type_annotations.md:17:12:17:16 # PROBLEMS **PARSE ERROR** A parsing error occurred: `expected_expr_apply_close_round` @@ -124,6 +123,63 @@ handleApi = |request| { ``` +**UNDECLARED TYPE** +The type ``Request`` is not declared in this scope. + +This type is referenced here: +**can_import_type_annotations.md:7:18:7:25:** +```roc +processRequest : Request -> Response +``` + ^^^^^^^ + + +**UNDECLARED TYPE** +The type ``Response`` is not declared in this scope. + +This type is referenced here: +**can_import_type_annotations.md:7:29:7:37:** +```roc +processRequest : Request -> Response +``` + ^^^^^^^^ + + +**UNUSED VARIABLE** +Variable ``req`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_req` to suppress this warning. +The unused variable is declared here: +**can_import_type_annotations.md:8:19:8:22:** +```roc +processRequest = |req| Http.defaultResponse +``` + ^^^ + + +**UNKNOWN OPERATOR** +This looks like an operator, but it's not one I recognize! +Check the spelling and make sure you're using a valid Roc operator. + +**UNUSED VARIABLE** +Variable ``data`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_data` to suppress this warning. +The unused variable is declared here: +**can_import_type_annotations.md:17:12:17:16:** +```roc + Ok(data) => Ok(Http.success data) +``` + ^^^^ + + +**INVALID PATTERN** +This pattern contains invalid syntax or uses unsupported features. + +**UNKNOWN OPERATOR** +This looks like an operator, but it's not one I recognize! +Check the spelling and make sure you're using a valid Roc operator. + # TOKENS ~~~zig KwModule(1:1-1:7),OpenSquare(1:8-1:9),CloseSquare(1:9-1:10),Newline(1:1-1:1), diff --git a/src/snapshots/can_import_unresolved_qualified.md b/src/snapshots/can_import_unresolved_qualified.md index 199bf9c70b..8adaf1c3c6 100644 --- a/src/snapshots/can_import_unresolved_qualified.md +++ b/src/snapshots/can_import_unresolved_qualified.md @@ -36,7 +36,18 @@ parser = Json.Parser.Advanced.NonExistent.create # EXPECTED UNUSED VARIABLE - can_import_unresolved_qualified.md:15:19:15:22 # PROBLEMS -NIL +**UNUSED VARIABLE** +Variable ``req`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_req` to suppress this warning. +The unused variable is declared here: +**can_import_unresolved_qualified.md:15:19:15:22:** +```roc +processRequest = |req| Http.Server.defaultResponse +``` + ^^^ + + # TOKENS ~~~zig KwModule(1:1-1:7),OpenSquare(1:8-1:9),CloseSquare(1:9-1:10),Newline(1:1-1:1), diff --git a/src/snapshots/can_list_number_doesnt_fit.md b/src/snapshots/can_list_number_doesnt_fit.md index 79b1dc01e5..82f54c3754 100644 --- a/src/snapshots/can_list_number_doesnt_fit.md +++ b/src/snapshots/can_list_number_doesnt_fit.md @@ -8,10 +8,14 @@ type=expr [1u8, 2u8, 300] ~~~ # EXPECTED -invalid_num_literal - can_list_number_doesnt_fit.md:1:2:1:5 -invalid_num_literal - can_list_number_doesnt_fit.md:1:7:1:10 -# PROBLEMS NIL +# PROBLEMS +**INVALID NUMBER** +This number literal is not valid: 1u8 + +**INVALID NUMBER** +This number literal is not valid: 2u8 + # TOKENS ~~~zig OpenSquare(1:1-1:2),Int(1:2-1:5),Comma(1:5-1:6),Int(1:7-1:10),Comma(1:10-1:11),Int(1:12-1:15),CloseSquare(1:15-1:16),EndOfFile(1:16-1:16), diff --git a/src/snapshots/can_list_rest_types.md b/src/snapshots/can_list_rest_types.md index 74793ad357..72cb9c234c 100644 --- a/src/snapshots/can_list_rest_types.md +++ b/src/snapshots/can_list_rest_types.md @@ -11,10 +11,24 @@ match numbers { } ~~~ # EXPECTED -UNDEFINED VARIABLE - can_list_rest_types.md:1:7:1:14 -UNUSED VARIABLE - can_list_rest_types.md:2:6:2:11 +UNDEFINED VARIABLE - can_list_rest_types.md:2:6:2:11 # PROBLEMS -NIL +**UNDEFINED VARIABLE** +Nothing is named `numbers` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNUSED VARIABLE** +Variable ``first`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_first` to suppress this warning. +The unused variable is declared here: +**can_list_rest_types.md:2:6:2:11:** +```roc + [first, .. as restNums] => restNums +``` + ^^^^^ + + # TOKENS ~~~zig KwMatch(1:1-1:6),LowerIdent(1:7-1:14),OpenCurly(1:15-1:16),Newline(1:1-1:1), diff --git a/src/snapshots/can_var_scoping_invalid_top_level.md b/src/snapshots/can_var_scoping_invalid_top_level.md index ac4a412144..cb8d0c44e8 100644 --- a/src/snapshots/can_var_scoping_invalid_top_level.md +++ b/src/snapshots/can_var_scoping_invalid_top_level.md @@ -11,7 +11,7 @@ module [] var topLevelVar_ = 0 ~~~ # EXPECTED -var_only_allowed_in_a_body - can_var_scoping_invalid_top_level.md:4:1:4:17 +PARSE ERROR - can_var_scoping_invalid_top_level.md:4:1:4:17 # PROBLEMS **PARSE ERROR** A parsing error occurred: `var_only_allowed_in_a_body` diff --git a/src/snapshots/can_var_scoping_regular_var.md b/src/snapshots/can_var_scoping_regular_var.md index 0221332c1e..7c745117a3 100644 --- a/src/snapshots/can_var_scoping_regular_var.md +++ b/src/snapshots/can_var_scoping_regular_var.md @@ -28,9 +28,28 @@ processItems = |items| { } ~~~ # EXPECTED -UNUSED VARIABLE - can_var_scoping_regular_var.md:4:17:4:22 +VAR REASSIGNMENT ERROR - can_var_scoping_regular_var.md:4:17:4:22 # PROBLEMS -NIL +**VAR REASSIGNMENT ERROR** +Cannot reassign a `var` from outside the function where it was declared. +Variables declared with `var` can only be reassigned within the same function scope. + +**VAR REASSIGNMENT ERROR** +Cannot reassign a `var` from outside the function where it was declared. +Variables declared with `var` can only be reassigned within the same function scope. + +**UNUSED VARIABLE** +Variable ``items`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_items` to suppress this warning. +The unused variable is declared here: +**can_var_scoping_regular_var.md:4:17:4:22:** +```roc +processItems = |items| { +``` + ^^^^^ + + # TOKENS ~~~zig KwModule(1:1-1:7),OpenSquare(1:8-1:9),CloseSquare(1:9-1:10),Newline(1:1-1:1), diff --git a/src/snapshots/can_var_scoping_var_redeclaration.md b/src/snapshots/can_var_scoping_var_redeclaration.md index cfecd91812..f487c8821e 100644 --- a/src/snapshots/can_var_scoping_var_redeclaration.md +++ b/src/snapshots/can_var_scoping_var_redeclaration.md @@ -18,9 +18,39 @@ redeclareTest = |_| { result = redeclareTest({}) ~~~ # EXPECTED -UNUSED VARIABLE - can_var_scoping_var_redeclaration.md:6:2:7:4 +DUPLICATE DEFINITION - can_var_scoping_var_redeclaration.md:6:2:7:4 +can_var_scoping_var_redeclaration.md:5:2:6:5: - can_var_scoping_var_redeclaration.md:6:2:7:4 # PROBLEMS -NIL +**DUPLICATE DEFINITION** +The name `x_` is being redeclared in this scope. + +The redeclaration is here: +**can_var_scoping_var_redeclaration.md:6:2:7:4:** +```roc + var x_ = 10 # Redeclare var - should warn but proceed + x_ = 15 # Reassign - should work without warning +``` + +But `x_` was already defined here: +**can_var_scoping_var_redeclaration.md:5:2:6:5:** +```roc + var x_ = 5 + var x_ = 10 # Redeclare var - should warn but proceed +``` + + +**UNUSED VARIABLE** +Variable ``x_`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_x_` to suppress this warning. +The unused variable is declared here: +**can_var_scoping_var_redeclaration.md:6:2:7:4:** +```roc + var x_ = 10 # Redeclare var - should warn but proceed + x_ = 15 # Reassign - should work without warning +``` + + # TOKENS ~~~zig KwModule(1:1-1:7),OpenSquare(1:8-1:9),CloseSquare(1:9-1:10),Newline(1:1-1:1), diff --git a/src/snapshots/crash_and_ellipsis_test.md b/src/snapshots/crash_and_ellipsis_test.md index 9512cd83e0..f9b2d8e002 100644 --- a/src/snapshots/crash_and_ellipsis_test.md +++ b/src/snapshots/crash_and_ellipsis_test.md @@ -29,8 +29,7 @@ main! = |_| { # EXPECTED UNEXPECTED TOKEN IN EXPRESSION - crash_and_ellipsis_test.md:9:17:9:24 UNEXPECTED TOKEN IN EXPRESSION - crash_and_ellipsis_test.md:13:23:13:30 -not_implemented - crash_and_ellipsis_test.md:5:20:5:23 -UNUSED VARIABLE - crash_and_ellipsis_test.md:16:5:16:12 +NOT IMPLEMENTED - crash_and_ellipsis_test.md:16:5:16:12 UNUSED VARIABLE - crash_and_ellipsis_test.md:17:5:17:12 UNUSED VARIABLE - crash_and_ellipsis_test.md:18:5:18:12 # PROBLEMS @@ -58,6 +57,60 @@ testCrashSimple = |_| crash "oops" ^^^^^^^ +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: ... +Let us know if you want to help! + +**INVALID LAMBDA** +The body of this lambda expression is not valid. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID LAMBDA** +The body of this lambda expression is not valid. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**UNUSED VARIABLE** +Variable ``result1`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_result1` to suppress this warning. +The unused variable is declared here: +**crash_and_ellipsis_test.md:16:5:16:12:** +```roc + result1 = testEllipsis(42) +``` + ^^^^^^^ + + +**UNUSED VARIABLE** +Variable ``result2`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_result2` to suppress this warning. +The unused variable is declared here: +**crash_and_ellipsis_test.md:17:5:17:12:** +```roc + result2 = testCrash(42) +``` + ^^^^^^^ + + +**UNUSED VARIABLE** +Variable ``result3`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_result3` to suppress this warning. +The unused variable is declared here: +**crash_and_ellipsis_test.md:18:5:18:12:** +```roc + result3 = testCrashSimple(42) +``` + ^^^^^^^ + + # TOKENS ~~~zig KwApp(1:1-1:4),OpenSquare(1:5-1:6),LowerIdent(1:6-1:11),CloseSquare(1:11-1:12),OpenCurly(1:13-1:14),LowerIdent(1:15-1:17),OpColon(1:17-1:18),KwPlatform(1:19-1:27),StringStart(1:28-1:29),StringPart(1:29-1:54),StringEnd(1:54-1:55),CloseCurly(1:56-1:57),Newline(1:1-1:1), diff --git a/src/snapshots/expr/apply_function.md b/src/snapshots/expr/apply_function.md index 5b6f0d813b..ea15dec549 100644 --- a/src/snapshots/expr/apply_function.md +++ b/src/snapshots/expr/apply_function.md @@ -8,9 +8,12 @@ type=expr foo(42, "hello") ~~~ # EXPECTED -UNDEFINED VARIABLE - apply_function.md:1:1:1:4 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `foo` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:4),NoSpaceOpenRound(1:4-1:5),Int(1:5-1:7),Comma(1:7-1:8),StringStart(1:9-1:10),StringPart(1:10-1:15),StringEnd(1:15-1:16),CloseRound(1:16-1:17),EndOfFile(1:17-1:17), diff --git a/src/snapshots/expr/block_pattern_unify.md b/src/snapshots/expr/block_pattern_unify.md index 6c76e6059b..1ec19e8f13 100644 --- a/src/snapshots/expr/block_pattern_unify.md +++ b/src/snapshots/expr/block_pattern_unify.md @@ -15,7 +15,18 @@ type=expr # EXPECTED UNUSED VARIABLE - block_pattern_unify.md:3:5:3:8 # PROBLEMS -NIL +**UNUSED VARIABLE** +Variable ``str`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_str` to suppress this warning. +The unused variable is declared here: +**block_pattern_unify.md:3:5:3:8:** +```roc + str = "hello" +``` + ^^^ + + # TOKENS ~~~zig OpenCurly(1:1-1:2),Newline(1:1-1:1), diff --git a/src/snapshots/expr/dbg_stmt.md b/src/snapshots/expr/dbg_stmt.md index 106de67243..5510fd57b2 100644 --- a/src/snapshots/expr/dbg_stmt.md +++ b/src/snapshots/expr/dbg_stmt.md @@ -8,9 +8,12 @@ type=expr dbg x ~~~ # EXPECTED -not_implemented - dbg_stmt.md:1:1:1:1 -# PROBLEMS NIL +# PROBLEMS +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: canonicalize dbg expression +Let us know if you want to help! + # TOKENS ~~~zig KwDbg(1:1-1:4),LowerIdent(1:5-1:6),EndOfFile(1:6-1:6), diff --git a/src/snapshots/expr/field_access.md b/src/snapshots/expr/field_access.md index f5ca7b98ea..56b9e29750 100644 --- a/src/snapshots/expr/field_access.md +++ b/src/snapshots/expr/field_access.md @@ -8,9 +8,12 @@ type=expr person.name ~~~ # EXPECTED -UNDEFINED VARIABLE - field_access.md:1:1:1:7 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `person` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:7),NoSpaceDotLowerIdent(1:7-1:12),EndOfFile(1:12-1:12), diff --git a/src/snapshots/expr/float_invalid.md b/src/snapshots/expr/float_invalid.md index ed38cd3930..cc19256b8e 100644 --- a/src/snapshots/expr/float_invalid.md +++ b/src/snapshots/expr/float_invalid.md @@ -8,7 +8,7 @@ type=expr 3.14.15 ~~~ # EXPECTED -expr_no_space_dot_int - float_invalid.md:1:5:1:8 +PARSE ERROR - float_invalid.md:1:5:1:8 # PROBLEMS **PARSE ERROR** A parsing error occurred: `expr_no_space_dot_int` diff --git a/src/snapshots/expr/function_call.md b/src/snapshots/expr/function_call.md index 39f17abadc..5e9f5ad00a 100644 --- a/src/snapshots/expr/function_call.md +++ b/src/snapshots/expr/function_call.md @@ -8,9 +8,12 @@ type=expr add(5, 3) ~~~ # EXPECTED -UNDEFINED VARIABLE - function_call.md:1:1:1:4 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `add` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:4),NoSpaceOpenRound(1:4-1:5),Int(1:5-1:6),Comma(1:6-1:7),Int(1:8-1:9),CloseRound(1:9-1:10),EndOfFile(1:10-1:10), diff --git a/src/snapshots/expr/if_expression.md b/src/snapshots/expr/if_expression.md index 12c58faeb9..fcf3f5c161 100644 --- a/src/snapshots/expr/if_expression.md +++ b/src/snapshots/expr/if_expression.md @@ -8,9 +8,12 @@ type=expr if x > 5 "big" else "small" ~~~ # EXPECTED -UNDEFINED VARIABLE - if_expression.md:1:4:1:5 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `x` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig KwIf(1:1-1:3),LowerIdent(1:4-1:5),OpGreaterThan(1:6-1:7),Int(1:8-1:9),StringStart(1:10-1:11),StringPart(1:11-1:14),StringEnd(1:14-1:15),KwElse(1:16-1:20),StringStart(1:21-1:22),StringPart(1:22-1:27),StringEnd(1:27-1:28),EndOfFile(1:28-1:28), diff --git a/src/snapshots/expr/record_field_update.md b/src/snapshots/expr/record_field_update.md index 52cecf7242..51f06d818a 100644 --- a/src/snapshots/expr/record_field_update.md +++ b/src/snapshots/expr/record_field_update.md @@ -8,9 +8,12 @@ type=expr { ..person, age: 31 } ~~~ # EXPECTED -UNDEFINED VARIABLE - record_field_update.md:1:5:1:11 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `person` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig OpenCurly(1:1-1:2),DoubleDot(1:3-1:5),LowerIdent(1:5-1:11),Comma(1:11-1:12),LowerIdent(1:13-1:16),OpColon(1:16-1:17),Int(1:18-1:20),CloseCurly(1:21-1:22),EndOfFile(1:22-1:22), diff --git a/src/snapshots/expr/record_field_update_error.md b/src/snapshots/expr/record_field_update_error.md index 9e8fe0e903..13108c36a2 100644 --- a/src/snapshots/expr/record_field_update_error.md +++ b/src/snapshots/expr/record_field_update_error.md @@ -10,8 +10,6 @@ type=expr # EXPECTED UNEXPECTED TOKEN IN EXPRESSION - record_field_update_error.md:1:10:1:15 UNEXPECTED TOKEN IN TYPE ANNOTATION - record_field_update_error.md:1:17:1:21 -UNDEFINED VARIABLE - record_field_update_error.md:1:3:1:9 -MALFORMED TYPE - record_field_update_error.md:1:17:1:21 # PROBLEMS **UNEXPECTED TOKEN IN EXPRESSION** The token **& age** is not expected in an expression. @@ -37,6 +35,13 @@ Here is the problematic code: ^^^^ +**UNDEFINED VARIABLE** +Nothing is named `person` in this scope. +Is there an `import` or `exposing` missing up-top? + +**MALFORMED TYPE** +This type annotation is malformed or contains invalid syntax. + # TOKENS ~~~zig OpenCurly(1:1-1:2),LowerIdent(1:3-1:9),OpAmpersand(1:10-1:11),LowerIdent(1:12-1:15),OpColon(1:15-1:16),Int(1:17-1:19),CloseCurly(1:20-1:21),EndOfFile(1:21-1:21), diff --git a/src/snapshots/expr/string_interpolation_simple.md b/src/snapshots/expr/string_interpolation_simple.md index 6fed96dc15..7a534443c7 100644 --- a/src/snapshots/expr/string_interpolation_simple.md +++ b/src/snapshots/expr/string_interpolation_simple.md @@ -8,9 +8,12 @@ type=expr "Hello ${name}!" ~~~ # EXPECTED -UNDEFINED VARIABLE - string_interpolation_simple.md:1:10:1:14 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `name` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig StringStart(1:1-1:2),StringPart(1:2-1:8),OpenStringInterpolation(1:8-1:10),LowerIdent(1:10-1:14),CloseStringInterpolation(1:14-1:15),StringPart(1:15-1:16),StringEnd(1:16-1:17),EndOfFile(1:17-1:17), diff --git a/src/snapshots/expr/tag_vs_function_calls.md b/src/snapshots/expr/tag_vs_function_calls.md index ed2d7ddc2b..3803f734a7 100644 --- a/src/snapshots/expr/tag_vs_function_calls.md +++ b/src/snapshots/expr/tag_vs_function_calls.md @@ -18,7 +18,7 @@ type=expr ~~~ # EXPECTED UNEXPECTED TOKEN IN EXPRESSION - tag_vs_function_calls.md:6:13:6:15 -expected_expr_close_curly_or_comma - tag_vs_function_calls.md:6:14:6:18 +PARSE ERROR - tag_vs_function_calls.md:6:14:6:18 # PROBLEMS **UNEXPECTED TOKEN IN EXPRESSION** The token **\x** is not expected in an expression. diff --git a/src/snapshots/expr/tuple_comprehensive.md b/src/snapshots/expr/tuple_comprehensive.md index b510e4cf5f..e324ba35a3 100644 --- a/src/snapshots/expr/tuple_comprehensive.md +++ b/src/snapshots/expr/tuple_comprehensive.md @@ -26,7 +26,7 @@ type=expr } ~~~ # EXPECTED -empty_tuple - tuple_comprehensive.md:9:10:9:12 +EMPTY TUPLE NOT ALLOWED - tuple_comprehensive.md:9:10:9:12 UNUSED VARIABLE - tuple_comprehensive.md:16:2:16:13 UNUSED VARIABLE - tuple_comprehensive.md:10:2:10:8 UNUSED VARIABLE - tuple_comprehensive.md:11:2:11:6 @@ -35,7 +35,100 @@ UNUSED VARIABLE - tuple_comprehensive.md:12:2:12:8 UNUSED VARIABLE - tuple_comprehensive.md:14:2:14:7 UNUSED VARIABLE - tuple_comprehensive.md:15:2:15:11 # PROBLEMS -NIL +**EMPTY TUPLE NOT ALLOWED** +I am part way through parsing this tuple, but it is empty: +**tuple_comprehensive.md:9:10:9:12:** +```roc + empty = () +``` + ^^ + +If you want to represent nothing, try using an empty record: `{}`. + +**UNUSED VARIABLE** +Variable ``with_lambda`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_with_lambda` to suppress this warning. +The unused variable is declared here: +**tuple_comprehensive.md:16:2:16:13:** +```roc + with_lambda = (|n| n + 1, 42) +``` + ^^^^^^^^^^^ + + +**UNUSED VARIABLE** +Variable ``single`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_single` to suppress this warning. +The unused variable is declared here: +**tuple_comprehensive.md:10:2:10:8:** +```roc + single = (42) +``` + ^^^^^^ + + +**UNUSED VARIABLE** +Variable ``pair`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_pair` to suppress this warning. +The unused variable is declared here: +**tuple_comprehensive.md:11:2:11:6:** +```roc + pair = (1, 2) +``` + ^^^^ + + +**UNUSED VARIABLE** +Variable ``nested`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_nested` to suppress this warning. +The unused variable is declared here: +**tuple_comprehensive.md:13:2:13:8:** +```roc + nested = ((1, 2), (3, 4)) +``` + ^^^^^^ + + +**UNUSED VARIABLE** +Variable ``triple`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_triple` to suppress this warning. +The unused variable is declared here: +**tuple_comprehensive.md:12:2:12:8:** +```roc + triple = (1, "hello", True) +``` + ^^^^^^ + + +**UNUSED VARIABLE** +Variable ``mixed`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_mixed` to suppress this warning. +The unused variable is declared here: +**tuple_comprehensive.md:14:2:14:7:** +```roc + mixed = (add_one(5), "world", [1, 2, 3]) +``` + ^^^^^ + + +**UNUSED VARIABLE** +Variable ``with_vars`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_with_vars` to suppress this warning. +The unused variable is declared here: +**tuple_comprehensive.md:15:2:15:11:** +```roc + with_vars = (x, y, z) +``` + ^^^^^^^^^ + + # TOKENS ~~~zig OpenCurly(1:1-1:2),Newline(1:1-1:1), diff --git a/src/snapshots/expr/tuple_empty_unbound.md b/src/snapshots/expr/tuple_empty_unbound.md index 8067d2389d..e8882fe6ba 100644 --- a/src/snapshots/expr/tuple_empty_unbound.md +++ b/src/snapshots/expr/tuple_empty_unbound.md @@ -8,9 +8,18 @@ type=expr () ~~~ # EXPECTED -empty_tuple - tuple_empty_unbound.md:1:1:1:3 +EMPTY TUPLE NOT ALLOWED - tuple_empty_unbound.md:1:1:1:3 # PROBLEMS -NIL +**EMPTY TUPLE NOT ALLOWED** +I am part way through parsing this tuple, but it is empty: +**tuple_empty_unbound.md:1:1:1:3:** +```roc +() +``` +^^ + +If you want to represent nothing, try using an empty record: `{}`. + # TOKENS ~~~zig OpenRound(1:1-1:2),CloseRound(1:2-1:3),EndOfFile(1:3-1:3), diff --git a/src/snapshots/expr/tuple_patterns.md b/src/snapshots/expr/tuple_patterns.md index 9589782286..276c0cc47e 100644 --- a/src/snapshots/expr/tuple_patterns.md +++ b/src/snapshots/expr/tuple_patterns.md @@ -31,20 +31,6 @@ UNEXPECTED TOKEN IN EXPRESSION - tuple_patterns.md:7:22:7:25 UNEXPECTED TOKEN IN EXPRESSION - tuple_patterns.md:10:28:10:31 UNEXPECTED TOKEN IN EXPRESSION - tuple_patterns.md:13:29:13:32 UNEXPECTED TOKEN IN EXPRESSION - tuple_patterns.md:16:19:16:22 -UNDEFINED VARIABLE - tuple_patterns.md:4:6:4:7 -UNDEFINED VARIABLE - tuple_patterns.md:4:9:4:10 -UNDEFINED VARIABLE - tuple_patterns.md:7:7:7:8 -UNDEFINED VARIABLE - tuple_patterns.md:7:10:7:11 -UNDEFINED VARIABLE - tuple_patterns.md:7:15:7:16 -UNDEFINED VARIABLE - tuple_patterns.md:7:18:7:19 -UNDEFINED VARIABLE - tuple_patterns.md:10:6:10:11 -UNDEFINED VARIABLE - tuple_patterns.md:10:13:10:19 -UNDEFINED VARIABLE - tuple_patterns.md:10:21:10:26 -UNDEFINED VARIABLE - tuple_patterns.md:13:6:13:10 -UNDEFINED VARIABLE - tuple_patterns.md:13:12:13:18 -UNDEFINED VARIABLE - tuple_patterns.md:13:20:13:27 -UNDEFINED VARIABLE - tuple_patterns.md:16:6:16:10 -UNDEFINED VARIABLE - tuple_patterns.md:16:12:16:17 # PROBLEMS **UNEXPECTED TOKEN IN EXPRESSION** The token **= (** is not expected in an expression. @@ -106,6 +92,62 @@ Here is the problematic code: ^^^ +**UNDEFINED VARIABLE** +Nothing is named `x` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `y` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `a` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `b` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `c` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `d` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `first` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `second` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `third` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `name` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `string` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `boolean` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `list` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `hello` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig OpenCurly(1:1-1:2),Newline(1:1-1:1), diff --git a/src/snapshots/expr/unknown_operator.md b/src/snapshots/expr/unknown_operator.md index e341ce50a1..808cf61230 100644 --- a/src/snapshots/expr/unknown_operator.md +++ b/src/snapshots/expr/unknown_operator.md @@ -9,7 +9,6 @@ type=expr ~~~ # EXPECTED UNEXPECTED TOKEN IN EXPRESSION - unknown_operator.md:1:4:1:7 -expr_not_canonicalized - unknown_operator.md:1:1:1:7 # PROBLEMS **UNEXPECTED TOKEN IN EXPRESSION** The token **+ 2** is not expected in an expression. @@ -23,6 +22,10 @@ Here is the problematic code: ^^^ +**UNKNOWN OPERATOR** +This looks like an operator, but it's not one I recognize! +Check the spelling and make sure you're using a valid Roc operator. + # TOKENS ~~~zig Int(1:1-1:2),OpPlus(1:3-1:4),OpPlus(1:4-1:5),Int(1:6-1:7),EndOfFile(1:7-1:7), diff --git a/src/snapshots/expr/when_simple.md b/src/snapshots/expr/when_simple.md index c4bc8c6af5..691bedfdab 100644 --- a/src/snapshots/expr/when_simple.md +++ b/src/snapshots/expr/when_simple.md @@ -10,9 +10,12 @@ when x is Err(msg) -> msg ~~~ # EXPECTED -UNDEFINED VARIABLE - when_simple.md:1:1:1:5 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `when` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:5),LowerIdent(1:6-1:7),LowerIdent(1:8-1:10),Newline(1:1-1:1), diff --git a/src/snapshots/expr_ident_simple.md b/src/snapshots/expr_ident_simple.md index 7d2e9806c2..60e52144d1 100644 --- a/src/snapshots/expr_ident_simple.md +++ b/src/snapshots/expr_ident_simple.md @@ -8,9 +8,12 @@ type=expr foo ~~~ # EXPECTED -UNDEFINED VARIABLE - expr_ident_simple.md:1:1:1:4 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `foo` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:4),EndOfFile(1:4-1:4), diff --git a/src/snapshots/expr_if_missing_else.md b/src/snapshots/expr_if_missing_else.md index 076e7bf32f..940a3255e3 100644 --- a/src/snapshots/expr_if_missing_else.md +++ b/src/snapshots/expr_if_missing_else.md @@ -10,8 +10,7 @@ module [] foo = if tru then 0 ~~~ # EXPECTED -no_else - expr_if_missing_else.md:3:19:3:20 -expr_not_canonicalized - expr_if_missing_else.md:3:19:3:20 +PARSE ERROR - expr_if_missing_else.md:3:19:3:20 # PROBLEMS **PARSE ERROR** A parsing error occurred: `no_else` @@ -25,6 +24,10 @@ foo = if tru then 0 ^ +**UNKNOWN OPERATOR** +This looks like an operator, but it's not one I recognize! +Check the spelling and make sure you're using a valid Roc operator. + # TOKENS ~~~zig KwModule(1:1-1:7),OpenSquare(1:8-1:9),CloseSquare(1:9-1:10),Newline(1:1-1:1), diff --git a/src/snapshots/expr_int_invalid.md b/src/snapshots/expr_int_invalid.md index eab601f862..3ea0369130 100644 --- a/src/snapshots/expr_int_invalid.md +++ b/src/snapshots/expr_int_invalid.md @@ -8,9 +8,11 @@ type=expr 99999999999999999999999999999999999999999 ~~~ # EXPECTED -invalid_num_literal - expr_int_invalid.md:1:1:1:42 -# PROBLEMS NIL +# PROBLEMS +**INVALID NUMBER** +This number literal is not valid: 99999999999999999999999999999999999999999 + # TOKENS ~~~zig Int(1:1-1:42),EndOfFile(1:42-1:42), diff --git a/src/snapshots/expr_no_space_dot_int.md b/src/snapshots/expr_no_space_dot_int.md index 3b3cf440b2..5f032c7999 100644 --- a/src/snapshots/expr_no_space_dot_int.md +++ b/src/snapshots/expr_no_space_dot_int.md @@ -10,8 +10,7 @@ module [] foo = asd.0 ~~~ # EXPECTED -expr_no_space_dot_int - expr_no_space_dot_int.md:3:10:3:12 -expr_not_canonicalized - expr_no_space_dot_int.md:3:10:3:12 +PARSE ERROR - expr_no_space_dot_int.md:3:10:3:12 # PROBLEMS **PARSE ERROR** A parsing error occurred: `expr_no_space_dot_int` @@ -25,6 +24,10 @@ foo = asd.0 ^^ +**UNKNOWN OPERATOR** +This looks like an operator, but it's not one I recognize! +Check the spelling and make sure you're using a valid Roc operator. + # TOKENS ~~~zig KwModule(1:1-1:7),OpenSquare(1:8-1:9),CloseSquare(1:9-1:10),Newline(1:1-1:1), diff --git a/src/snapshots/external_lookup_expr.md b/src/snapshots/external_lookup_expr.md index 952dcd24c6..7ae43203f7 100644 --- a/src/snapshots/external_lookup_expr.md +++ b/src/snapshots/external_lookup_expr.md @@ -8,9 +8,12 @@ type=expr Json.utf8 ~~~ # EXPECTED -UNDEFINED VARIABLE - external_lookup_expr.md:1:1:1:10 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `utf8` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig UpperIdent(1:1-1:5),NoSpaceDotLowerIdent(1:5-1:10),EndOfFile(1:10-1:10), diff --git a/src/snapshots/fuzz_crash/fuzz_crash_001.md b/src/snapshots/fuzz_crash/fuzz_crash_001.md index 20d5c625b0..4230950fae 100644 --- a/src/snapshots/fuzz_crash/fuzz_crash_001.md +++ b/src/snapshots/fuzz_crash/fuzz_crash_001.md @@ -8,9 +8,9 @@ type=file mo|% ~~~ # EXPECTED -missing_header - fuzz_crash_001.md:1:1:1:4 +MISSING HEADER - fuzz_crash_001.md:1:1:1:4 UNEXPECTED TOKEN IN PATTERN - fuzz_crash_001.md:1:4:1:5 -expected_expr_bar - fuzz_crash_001.md:1:5:1:5 +PARSE ERROR - fuzz_crash_001.md:1:5:1:5 # PROBLEMS **MISSING HEADER** Roc files must start with a module header. @@ -52,6 +52,10 @@ mo|% +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + # TOKENS ~~~zig LowerIdent(1:1-1:3),OpBar(1:3-1:4),OpPercent(1:4-1:5),EndOfFile(1:5-1:5), diff --git a/src/snapshots/fuzz_crash/fuzz_crash_002.md b/src/snapshots/fuzz_crash/fuzz_crash_002.md index 906fbfbabb..01b92fda7b 100644 --- a/src/snapshots/fuzz_crash/fuzz_crash_002.md +++ b/src/snapshots/fuzz_crash/fuzz_crash_002.md @@ -8,7 +8,7 @@ type=file modu:;::::::::::::::le[% ~~~ # EXPECTED -missing_header - fuzz_crash_002.md:1:1:1:6 +MISSING HEADER - fuzz_crash_002.md:1:1:1:6 UNEXPECTED TOKEN IN EXPRESSION - fuzz_crash_002.md:1:5:1:7 UNEXPECTED TOKEN IN EXPRESSION - fuzz_crash_002.md:1:6:1:8 UNEXPECTED TOKEN IN EXPRESSION - fuzz_crash_002.md:1:7:1:9 @@ -26,7 +26,7 @@ UNEXPECTED TOKEN IN EXPRESSION - fuzz_crash_002.md:1:18:1:20 UNEXPECTED TOKEN IN EXPRESSION - fuzz_crash_002.md:1:19:1:21 UNEXPECTED TOKEN IN EXPRESSION - fuzz_crash_002.md:1:20:1:23 UNEXPECTED TOKEN IN EXPRESSION - fuzz_crash_002.md:1:24:1:25 -expected_expr_close_square_or_comma - fuzz_crash_002.md:1:25:1:25 +LIST NOT CLOSED - fuzz_crash_002.md:1:25:1:25 # PROBLEMS **MISSING HEADER** Roc files must start with a module header. @@ -261,6 +261,78 @@ modu:;::::::::::::::le[% +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + # TOKENS ~~~zig LowerIdent(1:1-1:5),OpColon(1:5-1:6),MalformedUnknownToken(1:6-1:7),OpColon(1:7-1:8),OpColon(1:8-1:9),OpColon(1:9-1:10),OpColon(1:10-1:11),OpColon(1:11-1:12),OpColon(1:12-1:13),OpColon(1:13-1:14),OpColon(1:14-1:15),OpColon(1:15-1:16),OpColon(1:16-1:17),OpColon(1:17-1:18),OpColon(1:18-1:19),OpColon(1:19-1:20),OpColon(1:20-1:21),LowerIdent(1:21-1:23),OpenSquare(1:23-1:24),OpPercent(1:24-1:25),EndOfFile(1:25-1:25), diff --git a/src/snapshots/fuzz_crash/fuzz_crash_003.md b/src/snapshots/fuzz_crash/fuzz_crash_003.md index e69ef74155..c60ff76626 100644 --- a/src/snapshots/fuzz_crash/fuzz_crash_003.md +++ b/src/snapshots/fuzz_crash/fuzz_crash_003.md @@ -8,8 +8,7 @@ type=file = "te ~~~ # EXPECTED -UnclosedString - fuzz_crash_003.md:1:4:1:6 -missing_header - fuzz_crash_003.md:1:1:1:4 +UNCLOSED STRING - fuzz_crash_003.md:1:1:1:4 # PROBLEMS **UNCLOSED STRING** This string is missing a closing quote. @@ -30,6 +29,10 @@ Here is the problematic code: ^^^ +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + # TOKENS ~~~zig OpAssign(1:1-1:2),StringStart(1:3-1:4),StringPart(1:4-1:6),EndOfFile(1:6-1:6), diff --git a/src/snapshots/fuzz_crash/fuzz_crash_004.md b/src/snapshots/fuzz_crash/fuzz_crash_004.md index d332ca2393..a45d6f8cad 100644 --- a/src/snapshots/fuzz_crash/fuzz_crash_004.md +++ b/src/snapshots/fuzz_crash/fuzz_crash_004.md @@ -8,7 +8,7 @@ type=file F ~~~ # EXPECTED -missing_header - fuzz_crash_004.md:1:1:1:2 +MISSING HEADER - fuzz_crash_004.md:1:1:1:2 # PROBLEMS **MISSING HEADER** Roc files must start with a module header. diff --git a/src/snapshots/fuzz_crash/fuzz_crash_005.md b/src/snapshots/fuzz_crash/fuzz_crash_005.md index 975ddb8999..717ae24069 100644 --- a/src/snapshots/fuzz_crash/fuzz_crash_005.md +++ b/src/snapshots/fuzz_crash/fuzz_crash_005.md @@ -8,7 +8,7 @@ type=file modu ~~~ # EXPECTED -missing_header - fuzz_crash_005.md:1:1:1:5 +MISSING HEADER - fuzz_crash_005.md:1:1:1:5 # PROBLEMS **MISSING HEADER** Roc files must start with a module header. diff --git a/src/snapshots/fuzz_crash/fuzz_crash_006.md b/src/snapshots/fuzz_crash/fuzz_crash_006.md index 19435aa84e..01cf997de8 100644 Binary files a/src/snapshots/fuzz_crash/fuzz_crash_006.md and b/src/snapshots/fuzz_crash/fuzz_crash_006.md differ diff --git a/src/snapshots/fuzz_crash/fuzz_crash_007.md b/src/snapshots/fuzz_crash/fuzz_crash_007.md index cbe0c6b952..7c0f94c698 100644 --- a/src/snapshots/fuzz_crash/fuzz_crash_007.md +++ b/src/snapshots/fuzz_crash/fuzz_crash_007.md @@ -8,7 +8,7 @@ type=file ff8.8.d ~~~ # EXPECTED -missing_header - fuzz_crash_007.md:1:1:1:6 +MISSING HEADER - fuzz_crash_007.md:1:1:1:6 UNEXPECTED TOKEN IN EXPRESSION - fuzz_crash_007.md:1:4:1:8 UNEXPECTED TOKEN IN EXPRESSION - fuzz_crash_007.md:1:6:1:8 # PROBLEMS @@ -52,6 +52,14 @@ ff8.8.d ^^ +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + # TOKENS ~~~zig LowerIdent(1:1-1:4),NoSpaceDotInt(1:4-1:6),NoSpaceDotLowerIdent(1:6-1:8),EndOfFile(1:8-1:8), diff --git a/src/snapshots/fuzz_crash/fuzz_crash_008.md b/src/snapshots/fuzz_crash/fuzz_crash_008.md index d4d85f61c1..4ae970949e 100644 --- a/src/snapshots/fuzz_crash/fuzz_crash_008.md +++ b/src/snapshots/fuzz_crash/fuzz_crash_008.md @@ -8,9 +8,8 @@ type=file ||1 ~~~ # EXPECTED -AsciiControl - fuzz_crash_008.md:1:2:1:2 -missing_header - fuzz_crash_008.md:1:1:1:4 -expected_expr_bar - fuzz_crash_008.md:1:5:1:5 +ASCII CONTROL CHARACTER - fuzz_crash_008.md:1:1:1:4 +PARSE ERROR - fuzz_crash_008.md:1:5:1:5 # PROBLEMS **ASCII CONTROL CHARACTER** ASCII control characters are not allowed in Roc source code. @@ -43,6 +42,10 @@ Here is the problematic code: +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + # TOKENS ~~~zig OpBar(1:1-1:2),OpBar(1:3-1:4),Int(1:4-1:5),EndOfFile(1:5-1:5), diff --git a/src/snapshots/fuzz_crash/fuzz_crash_009.md b/src/snapshots/fuzz_crash/fuzz_crash_009.md index a84a497877..73e3663ddf 100644 --- a/src/snapshots/fuzz_crash/fuzz_crash_009.md +++ b/src/snapshots/fuzz_crash/fuzz_crash_009.md @@ -13,9 +13,7 @@ foo = "onmo % ~~~ # EXPECTED -MismatchedBrace - fuzz_crash_009.md:2:6:2:6 -UnclosedString - fuzz_crash_009.md:6:6:6:12 -missing_header - fuzz_crash_009.md:1:2:1:4 +MISMATCHED BRACE - fuzz_crash_009.md:1:2:1:4 # PROBLEMS **MISMATCHED BRACE** This brace does not match the corresponding opening brace. @@ -39,6 +37,10 @@ Here is the problematic code: ^^ +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + # TOKENS ~~~zig LowerIdent(1:2-1:3),OpenCurly(1:3-1:4),LowerIdent(1:4-1:5),Comma(1:5-1:6),Newline(1:1-1:1), diff --git a/src/snapshots/fuzz_crash/fuzz_crash_010.md b/src/snapshots/fuzz_crash/fuzz_crash_010.md index f6ed404021..2ebc3f29f4 100644 --- a/src/snapshots/fuzz_crash/fuzz_crash_010.md +++ b/src/snapshots/fuzz_crash/fuzz_crash_010.md @@ -12,10 +12,7 @@ foo = "on (string 'onmo %'))) ~~~ # EXPECTED -AsciiControl - fuzz_crash_010.md:2:3:2:3 -MismatchedBrace - fuzz_crash_010.md:2:6:2:6 -UnclosedString - fuzz_crash_010.md:5:6:5:35 -missing_header - fuzz_crash_010.md:1:1:1:3 +ASCII CONTROL CHARACTER - fuzz_crash_010.md:1:1:1:3 # PROBLEMS **ASCII CONTROL CHARACTER** ASCII control characters are not allowed in Roc source code. @@ -42,6 +39,10 @@ H{o, ^^ +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + # TOKENS ~~~zig UpperIdent(1:1-1:2),OpenCurly(1:2-1:3),LowerIdent(1:3-1:4),Comma(1:4-1:5),Newline(1:1-1:1), diff --git a/src/snapshots/fuzz_crash/fuzz_crash_011.md b/src/snapshots/fuzz_crash/fuzz_crash_011.md index e65e712485..d545137b39 100644 --- a/src/snapshots/fuzz_crash/fuzz_crash_011.md +++ b/src/snapshots/fuzz_crash/fuzz_crash_011.md @@ -8,9 +8,8 @@ type=file module P]F ~~~ # EXPECTED -OverClosedBrace - fuzz_crash_011.md:1:9:1:9 -header_expected_open_square - fuzz_crash_011.md:1:8:1:11 -expected_colon_after_type_annotation - fuzz_crash_011.md:1:11:1:11 +OVER CLOSED BRACE - fuzz_crash_011.md:1:8:1:11 +PARSE ERROR - fuzz_crash_011.md:1:11:1:11 # PROBLEMS **OVER CLOSED BRACE** There are too many closing braces here. diff --git a/src/snapshots/fuzz_crash/fuzz_crash_012.md b/src/snapshots/fuzz_crash/fuzz_crash_012.md index f4bacef16f..3bbdca11d7 100644 --- a/src/snapshots/fuzz_crash/fuzz_crash_012.md +++ b/src/snapshots/fuzz_crash/fuzz_crash_012.md @@ -8,10 +8,10 @@ type=file ||(|(l888888888| ~~~ # EXPECTED -missing_header - fuzz_crash_012.md:1:1:1:3 +MISSING HEADER - fuzz_crash_012.md:1:1:1:3 UNEXPECTED TOKEN IN PATTERN - fuzz_crash_012.md:1:4:1:6 UNEXPECTED TOKEN IN PATTERN - fuzz_crash_012.md:1:3:1:5 -expected_expr_bar - fuzz_crash_012.md:1:17:1:17 +PARSE ERROR - fuzz_crash_012.md:1:17:1:17 # PROBLEMS **MISSING HEADER** Roc files must start with a module header. @@ -65,6 +65,10 @@ Here is the problematic code: +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + # TOKENS ~~~zig OpBar(1:1-1:2),OpBar(1:2-1:3),NoSpaceOpenRound(1:3-1:4),OpBar(1:4-1:5),NoSpaceOpenRound(1:5-1:6),LowerIdent(1:6-1:16),OpBar(1:16-1:17),EndOfFile(1:17-1:17), diff --git a/src/snapshots/fuzz_crash/fuzz_crash_013.md b/src/snapshots/fuzz_crash/fuzz_crash_013.md index f89e3185a5..582ef42158 100644 --- a/src/snapshots/fuzz_crash/fuzz_crash_013.md +++ b/src/snapshots/fuzz_crash/fuzz_crash_013.md @@ -8,7 +8,7 @@ type=file 0{ ~~~ # EXPECTED -missing_header - fuzz_crash_013.md:1:1:1:3 +MISSING HEADER - fuzz_crash_013.md:1:1:1:3 # PROBLEMS **MISSING HEADER** Roc files must start with a module header. @@ -26,6 +26,10 @@ Here is the problematic code: ^^ +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + # TOKENS ~~~zig Int(1:1-1:2),OpenCurly(1:2-1:3),EndOfFile(1:3-1:3), diff --git a/src/snapshots/fuzz_crash/fuzz_crash_014.md b/src/snapshots/fuzz_crash/fuzz_crash_014.md index aa6d7dbe04..cf7047a8a7 100644 --- a/src/snapshots/fuzz_crash/fuzz_crash_014.md +++ b/src/snapshots/fuzz_crash/fuzz_crash_014.md @@ -10,7 +10,9 @@ type=file 0u22 ~~~ # EXPECTED -missing_header - fuzz_crash_014.md:1:1:1:5 +MISSING HEADER - fuzz_crash_014.md:1:1:1:5 +UNEXPECTED TOKEN IN EXPRESSION - fuzz_crash_014.md:1:3:1:3 +UNEXPECTED TOKEN IN EXPRESSION - fuzz_crash_014.md:2:1:2:1 UNEXPECTED TOKEN IN EXPRESSION - fuzz_crash_014.md:3:1:3:5 # PROBLEMS **MISSING HEADER** @@ -65,6 +67,18 @@ Here is the problematic code: ^^^^ +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + # TOKENS ~~~zig MalformedNumberNoDigits(1:1-1:3),NoSpaceDotInt(1:3-1:5),Newline(1:1-1:1), diff --git a/src/snapshots/fuzz_crash/fuzz_crash_015.md b/src/snapshots/fuzz_crash/fuzz_crash_015.md index 74eb9ebdab..90b38a6af2 100644 --- a/src/snapshots/fuzz_crash/fuzz_crash_015.md +++ b/src/snapshots/fuzz_crash/fuzz_crash_015.md @@ -11,8 +11,9 @@ type=file 0_ ~~~ # EXPECTED -LeadingZero - fuzz_crash_015.md:2:3:2:3 -missing_header - fuzz_crash_015.md:1:1:1:6 +LEADING ZERO - fuzz_crash_015.md:1:1:1:6 +UNEXPECTED TOKEN IN EXPRESSION - fuzz_crash_015.md:1:4:1:4 +PARSE ERROR - fuzz_crash_015.md:3:4:3:4 # PROBLEMS **LEADING ZERO** Numbers cannot have leading zeros. @@ -57,6 +58,22 @@ Here is the problematic code: +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + # TOKENS ~~~zig Int(1:1-1:4),NoSpaceDotInt(1:4-1:6),Newline(1:1-1:1), diff --git a/src/snapshots/fuzz_crash/fuzz_crash_016.md b/src/snapshots/fuzz_crash/fuzz_crash_016.md index d4741ad0ac..c359334fdd 100644 --- a/src/snapshots/fuzz_crash/fuzz_crash_016.md +++ b/src/snapshots/fuzz_crash/fuzz_crash_016.md @@ -8,8 +8,8 @@ type=file 0| ~~~ # EXPECTED -missing_header - fuzz_crash_016.md:1:1:1:3 -expected_expr_bar - fuzz_crash_016.md:1:3:1:3 +MISSING HEADER - fuzz_crash_016.md:1:1:1:3 +PARSE ERROR - fuzz_crash_016.md:1:3:1:3 # PROBLEMS **MISSING HEADER** Roc files must start with a module header. @@ -39,6 +39,10 @@ Here is the problematic code: +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + # TOKENS ~~~zig Int(1:1-1:2),OpBar(1:2-1:3),EndOfFile(1:3-1:3), diff --git a/src/snapshots/fuzz_crash/fuzz_crash_017.md b/src/snapshots/fuzz_crash/fuzz_crash_017.md index 3d50f45ae2..b422564678 100644 --- a/src/snapshots/fuzz_crash/fuzz_crash_017.md +++ b/src/snapshots/fuzz_crash/fuzz_crash_017.md @@ -9,10 +9,9 @@ me = "luc" foo = "hello ${namF ~~~ # EXPECTED -missing_header - fuzz_crash_017.md:1:1:1:5 +MISSING HEADER - fuzz_crash_017.md:1:1:1:5 UNEXPECTED TOKEN IN EXPRESSION - fuzz_crash_017.md:1:4:1:7 -string_expected_close_interpolation - fuzz_crash_017.md:2:7:2:14 -expr_not_canonicalized - fuzz_crash_017.md:2:7:2:20 +PARSE ERROR - fuzz_crash_017.md:2:7:2:14 # PROBLEMS **MISSING HEADER** Roc files must start with a module header. @@ -54,6 +53,18 @@ foo = "hello ${namF ^^^^^^^ +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**UNKNOWN OPERATOR** +This looks like an operator, but it's not one I recognize! +Check the spelling and make sure you're using a valid Roc operator. + # TOKENS ~~~zig LowerIdent(1:1-1:3),OpAssign(1:4-1:5),StringStart(1:6-1:7),StringPart(1:7-1:10),StringEnd(1:10-1:11),Newline(1:1-1:1), diff --git a/src/snapshots/fuzz_crash/fuzz_crash_018.md b/src/snapshots/fuzz_crash/fuzz_crash_018.md index 24f8db8135..d2a3aa5c78 100644 --- a/src/snapshots/fuzz_crash/fuzz_crash_018.md +++ b/src/snapshots/fuzz_crash/fuzz_crash_018.md @@ -9,7 +9,7 @@ type=file .R ~~~ # EXPECTED -missing_header - fuzz_crash_018.md:1:1:1:4 +MISSING HEADER - fuzz_crash_018.md:1:1:1:4 UNEXPECTED TOKEN IN EXPRESSION - fuzz_crash_018.md:2:1:2:3 UNDECLARED TYPE - fuzz_crash_018.md:1:5:1:6 # PROBLEMS @@ -41,6 +41,21 @@ Here is the problematic code: ^^ +**UNDECLARED TYPE** +The type ``S`` is not declared in this scope. + +This type is referenced here: +**fuzz_crash_018.md:1:5:1:6:** +```roc +0 b:S +``` + ^ + + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + # TOKENS ~~~zig Int(1:1-1:2),LowerIdent(1:3-1:4),OpColon(1:4-1:5),UpperIdent(1:5-1:6),Newline(1:1-1:1), diff --git a/src/snapshots/fuzz_crash/fuzz_crash_019.md b/src/snapshots/fuzz_crash/fuzz_crash_019.md index c4d4df677b..cd6635a86b 100644 --- a/src/snapshots/fuzz_crash/fuzz_crash_019.md +++ b/src/snapshots/fuzz_crash/fuzz_crash_019.md @@ -129,54 +129,361 @@ h == foo ~~~ # EXPECTED UNDECLARED TYPE - fuzz_crash_019.md:13:13:13:16 -undeclared_type_var - fuzz_crash_019.md:13:19:13:21 -undeclared_type_var - fuzz_crash_019.md:19:4:19:6 -undeclared_type_var - fuzz_crash_019.md:20:12:20:13 +UNDECLARED TYPE VARIABLE - fuzz_crash_019.md:13:19:13:21 +UNDECLARED TYPE VARIABLE - fuzz_crash_019.md:19:4:19:6 +UNDECLARED TYPE VARIABLE - fuzz_crash_019.md:20:12:20:13 UNDECLARED TYPE - fuzz_crash_019.md:24:15:24:16 -undeclared_type_var - fuzz_crash_019.md:24:24:24:25 +UNDECLARED TYPE VARIABLE - fuzz_crash_019.md:24:24:24:25 UNDECLARED TYPE - fuzz_crash_019.md:37:7:37:9 -not_implemented - fuzz_crash_019.md:1:1:1:1 -UNDEFINED VARIABLE - fuzz_crash_019.md:42:6:42:10 -not_implemented - fuzz_crash_019.md:1:1:1:1 -UNDEFINED VARIABLE - fuzz_crash_019.md:45:3:45:4 -UNDEFINED VARIABLE - fuzz_crash_019.md:53:2:53:3 -UNUSED VARIABLE - fuzz_crash_019.md:52:11:52:14 -UNDEFINED VARIABLE - fuzz_crash_019.md:55:11:55:12 -UNUSED VARIABLE - fuzz_crash_019.md:57:2:57:4 -UNDEFINED VARIABLE - fuzz_crash_019.md:59:3:59:7 -UNUSED VARIABLE - fuzz_crash_019.md:60:12:60:15 -not_implemented - fuzz_crash_019.md:1:1:1:1 -not_implemented - fuzz_crash_019.md:1:1:1:1 -UNDECLARED TYPE - fuzz_crash_019.md:74:9:74:15 -UNDEFINED VARIABLE - fuzz_crash_019.md:75:11:75:12 -not_implemented - fuzz_crash_019.md:1:1:1:1 -not_implemented - fuzz_crash_019.md:1:1:1:1 -not_implemented - fuzz_crash_019.md:83:2:83:5 -not_implemented - fuzz_crash_019.md:85:3:85:6 -not_implemented - fuzz_crash_019.md:86:3:86:12 -UNDEFINED VARIABLE - fuzz_crash_019.md:87:11:87:12 -UNDEFINED VARIABLE - fuzz_crash_019.md:89:3:89:6 -not_implemented - fuzz_crash_019.md:1:1:1:1 -UNDEFINED VARIABLE - fuzz_crash_019.md:96:34:96:37 -UNDEFINED VARIABLE - fuzz_crash_019.md:96:47:96:52 -UNDEFINED VARIABLE - fuzz_crash_019.md:96:54:96:59 -UNDEFINED VARIABLE - fuzz_crash_019.md:97:21:97:24 -UNDEFINED VARIABLE - fuzz_crash_019.md:97:30:97:32 -UNDEFINED VARIABLE - fuzz_crash_019.md:98:2:98:3 -UNDEFINED VARIABLE - fuzz_crash_019.md:100:11:100:14 -UNDEFINED VARIABLE - fuzz_crash_019.md:102:4:102:6 -UNDEFINED VARIABLE - fuzz_crash_019.md:102:8:102:13 -UNDEFINED VARIABLE - fuzz_crash_019.md:105:2:105:3 -not_implemented - fuzz_crash_019.md:1:1:1:1 -UNDEFINED VARIABLE - fuzz_crash_019.md:108:4:108:5 -UNDEFINED VARIABLE - fuzz_crash_019.md:108:6:108:8 -UNUSED VARIABLE - fuzz_crash_019.md:87:2:87:3 +NOT IMPLEMENTED - fuzz_crash_019.md:52:11:52:14 +UNDEFINED VARIABLE - fuzz_crash_019.md:57:2:57:4 +UNDEFINED VARIABLE - fuzz_crash_019.md:60:12:60:15 +NOT IMPLEMENTED - fuzz_crash_019.md:74:9:74:15 +UNDEFINED VARIABLE - fuzz_crash_019.md:97:2:97:3 +fuzz_crash_019.md:88:1:88:2: - fuzz_crash_019.md:87:2:87:3 UNUSED VARIABLE - fuzz_crash_019.md:76:2:76:3 UNUSED VARIABLE - fuzz_crash_019.md:88:1:88:2 UNUSED VARIABLE - fuzz_crash_019.md:96:2:96:4 UNDECLARED TYPE - fuzz_crash_019.md:116:5:116:6 -not_implemented - fuzz_crash_019.md:1:1:1:1 +NOT IMPLEMENTED - fuzz_crash_019.md:84:2:84:4 # PROBLEMS +**UNDECLARED TYPE** +The type ``Lis`` is not declared in this scope. + +This type is referenced here: +**fuzz_crash_019.md:13:13:13:16:** +```roc +Map(a, b) : Lis, (ab) -> List(b) +``` + ^^^ + + +**UNDECLARED TYPE VARIABLE** +The type variable ``ab`` is not declared in this scope. + +Type variables must be introduced in a type annotation before they can be used. + +This type variable is referenced here: +**fuzz_crash_019.md:13:19:13:21:** +```roc +Map(a, b) : Lis, (ab) -> List(b) +``` + ^^ + + +**UNDECLARED TYPE VARIABLE** +The type variable ``ab`` is not declared in this scope. + +Type variables must be introduced in a type annotation before they can be used. + +This type variable is referenced here: +**fuzz_crash_019.md:19:4:19:6:** +```roc + (ab) -> # row +``` + ^^ + + +**UNDECLARED TYPE VARIABLE** +The type variable ``b`` is not declared in this scope. + +Type variables must be introduced in a type annotation before they can be used. + +This type variable is referenced here: +**fuzz_crash_019.md:20:12:20:13:** +```roc + List( b ) #z) +``` + ^ + + +**UNDECLARED TYPE** +The type ``O`` is not declared in this scope. + +This type is referenced here: +**fuzz_crash_019.md:24:15:24:16:** +```roc +Som : { foo : O, bar : g } +``` + ^ + + +**UNDECLARED TYPE VARIABLE** +The type variable ``g`` is not declared in this scope. + +Type variables must be introduced in a type annotation before they can be used. + +This type variable is referenced here: +**fuzz_crash_019.md:24:24:24:25:** +```roc +Som : { foo : O, bar : g } +``` + ^ + + +**UNDECLARED TYPE** +The type ``U6`` is not declared in this scope. + +This type is referenced here: +**fuzz_crash_019.md:37:7:37:9:** +```roc +one : U6 +``` + ^^ + + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: canonicalize dbg expression +Let us know if you want to help! + +**UNDEFINED VARIABLE** +Nothing is named `exp0` in this scope. +Is there an `import` or `exposing` missing up-top? + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: canonicalize dbg expression +Let us know if you want to help! + +**UNDEFINED VARIABLE** +Nothing is named `r` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `x` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNUSED VARIABLE** +Variable ``lue`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_lue` to suppress this warning. +The unused variable is declared here: +**fuzz_crash_019.md:52:11:52:14:** +```roc + match a {lue { +``` + ^^^ + + +**UNDEFINED VARIABLE** +Nothing is named `x` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNUSED VARIABLE** +Variable ``er`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_er` to suppress this warning. +The unused variable is declared here: +**fuzz_crash_019.md:57:2:57:4:** +```roc + er #ent +``` + ^^ + + +**UNDEFINED VARIABLE** +Nothing is named `ment` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNUSED VARIABLE** +Variable ``est`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_est` to suppress this warning. +The unused variable is declared here: +**fuzz_crash_019.md:60:12:60:15:** +```roc + [1, 2, 3,est]123 +``` + ^^^ + + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: canonicalize alternatives pattern +Let us know if you want to help! + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: top-level expect +Let us know if you want to help! + +**UNDECLARED TYPE** +The type ``Listlt`` is not declared in this scope. + +This type is referenced here: +**fuzz_crash_019.md:74:9:74:15:** +```roc +main! : Listlt({}, _) +``` + ^^^^^^ + + +**UNDEFINED VARIABLE** +Nothing is named `e` in this scope. +Is there an `import` or `exposing` missing up-top? + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: statement type in block +Let us know if you want to help! + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: statement type in block +Let us know if you want to help! + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: ... +Let us know if you want to help! + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: ... +Let us know if you want to help! + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: crash statement +Let us know if you want to help! + +**UNDEFINED VARIABLE** +Nothing is named `d` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `one` in this scope. +Is there an `import` or `exposing` missing up-top? + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: statement type in block +Let us know if you want to help! + +**UNDEFINED VARIABLE** +Nothing is named `tag` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `world` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `ned` in this scope. +Is there an `import` or `exposing` missing up-top? + +**DUPLICATE DEFINITION** +The name `t` is being redeclared in this scope. + +The redeclaration is here: +**fuzz_crash_019.md:97:2:97:3:** +```roc + t = (123, "World", tag, O, (nd, t), [1, 2, 3]) +``` + ^ + +But `t` was already defined here: +**fuzz_crash_019.md:88:1:88:2:** +```roc +t = [ +``` +^ + + +**UNDEFINED VARIABLE** +Nothing is named `tag` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `nd` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `m` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `ag1` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `ne` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `tuple` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `b` in this scope. +Is there an `import` or `exposing` missing up-top? + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: canonicalize suffix_single_question expression +Let us know if you want to help! + +**UNDEFINED VARIABLE** +Nothing is named `r` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `nu` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNUSED VARIABLE** +Variable ``i`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_i` to suppress this warning. +The unused variable is declared here: +**fuzz_crash_019.md:87:2:87:3:** +```roc + i= "H, ${d}" +``` + ^ + + +**UNUSED VARIABLE** +Variable ``w`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_w` to suppress this warning. +The unused variable is declared here: +**fuzz_crash_019.md:76:2:76:3:** +```roc + w = "d" +``` + ^ + + +**UNUSED VARIABLE** +Variable ``t`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_t` to suppress this warning. +The unused variable is declared here: +**fuzz_crash_019.md:88:1:88:2:** +```roc +t = [ +``` +^ + + +**UNUSED VARIABLE** +Variable ``rd`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_rd` to suppress this warning. +The unused variable is declared here: +**fuzz_crash_019.md:96:2:96:4:** +```roc + rd = { foo: 123, bar: "H", baz: tag, qux: Ok(world),ned } +``` + ^^ + + +**UNDECLARED TYPE** +The type ``V`` is not declared in this scope. + +This type is referenced here: +**fuzz_crash_019.md:116:5:116:6:** +```roc +t : V((a,c)) +``` + ^ + + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: top-level expect +Let us know if you want to help! + **INCOMPATIBLE MATCH PATTERNS** The pattern in the fourth branch of this `match` differs from previous ones: **fuzz_crash_019.md:52:2:** diff --git a/src/snapshots/fuzz_crash/fuzz_crash_020.md b/src/snapshots/fuzz_crash/fuzz_crash_020.md index d165fe962e..d983336015 100644 --- a/src/snapshots/fuzz_crash/fuzz_crash_020.md +++ b/src/snapshots/fuzz_crash/fuzz_crash_020.md @@ -129,55 +129,364 @@ h == foo ~~~ # EXPECTED UNDECLARED TYPE - fuzz_crash_020.md:13:13:13:16 -undeclared_type_var - fuzz_crash_020.md:13:19:13:21 -undeclared_type_var - fuzz_crash_020.md:19:4:19:6 -undeclared_type_var - fuzz_crash_020.md:20:12:20:13 +UNDECLARED TYPE VARIABLE - fuzz_crash_020.md:13:19:13:21 +UNDECLARED TYPE VARIABLE - fuzz_crash_020.md:19:4:19:6 +UNDECLARED TYPE VARIABLE - fuzz_crash_020.md:20:12:20:13 UNDECLARED TYPE - fuzz_crash_020.md:24:15:24:16 -undeclared_type_var - fuzz_crash_020.md:24:24:24:25 +UNDECLARED TYPE VARIABLE - fuzz_crash_020.md:24:24:24:25 UNDECLARED TYPE - fuzz_crash_020.md:37:7:37:9 -UNDEFINED VARIABLE - fuzz_crash_020.md:40:5:40:8 -not_implemented - fuzz_crash_020.md:1:1:1:1 -UNDEFINED VARIABLE - fuzz_crash_020.md:42:6:42:10 -not_implemented - fuzz_crash_020.md:1:1:1:1 -UNDEFINED VARIABLE - fuzz_crash_020.md:45:3:45:4 -UNDEFINED VARIABLE - fuzz_crash_020.md:53:2:53:3 -UNUSED VARIABLE - fuzz_crash_020.md:52:11:52:14 -UNDEFINED VARIABLE - fuzz_crash_020.md:55:11:55:12 -UNUSED VARIABLE - fuzz_crash_020.md:57:2:57:4 -UNDEFINED VARIABLE - fuzz_crash_020.md:59:3:59:7 -UNUSED VARIABLE - fuzz_crash_020.md:60:12:60:15 -not_implemented - fuzz_crash_020.md:1:1:1:1 -not_implemented - fuzz_crash_020.md:1:1:1:1 -UNDECLARED TYPE - fuzz_crash_020.md:74:9:74:15 -UNDEFINED VARIABLE - fuzz_crash_020.md:75:11:75:12 -not_implemented - fuzz_crash_020.md:1:1:1:1 -not_implemented - fuzz_crash_020.md:1:1:1:1 -not_implemented - fuzz_crash_020.md:83:2:83:5 -not_implemented - fuzz_crash_020.md:85:3:85:6 -not_implemented - fuzz_crash_020.md:86:3:86:12 -UNDEFINED VARIABLE - fuzz_crash_020.md:87:11:87:12 -UNDEFINED VARIABLE - fuzz_crash_020.md:89:3:89:6 -not_implemented - fuzz_crash_020.md:1:1:1:1 -UNDEFINED VARIABLE - fuzz_crash_020.md:96:34:96:37 -UNDEFINED VARIABLE - fuzz_crash_020.md:96:47:96:52 -UNDEFINED VARIABLE - fuzz_crash_020.md:96:54:96:59 -UNDEFINED VARIABLE - fuzz_crash_020.md:97:21:97:24 -UNDEFINED VARIABLE - fuzz_crash_020.md:97:30:97:32 -UNDEFINED VARIABLE - fuzz_crash_020.md:98:2:98:3 -UNDEFINED VARIABLE - fuzz_crash_020.md:100:11:100:14 -UNDEFINED VARIABLE - fuzz_crash_020.md:102:4:102:6 -UNDEFINED VARIABLE - fuzz_crash_020.md:102:8:102:13 -UNDEFINED VARIABLE - fuzz_crash_020.md:105:2:105:3 -not_implemented - fuzz_crash_020.md:1:1:1:1 -UNDEFINED VARIABLE - fuzz_crash_020.md:108:4:108:5 -UNDEFINED VARIABLE - fuzz_crash_020.md:108:6:108:8 -UNUSED VARIABLE - fuzz_crash_020.md:88:1:88:2 +UNDEFINED VARIABLE - fuzz_crash_020.md:52:11:52:14 +UNDEFINED VARIABLE - fuzz_crash_020.md:57:2:57:4 +UNDEFINED VARIABLE - fuzz_crash_020.md:60:12:60:15 +NOT IMPLEMENTED - fuzz_crash_020.md:74:9:74:15 +UNDEFINED VARIABLE - fuzz_crash_020.md:97:2:97:3 +fuzz_crash_020.md:88:1:88:2: - fuzz_crash_020.md:88:1:88:2 UNUSED VARIABLE - fuzz_crash_020.md:96:2:96:4 UNUSED VARIABLE - fuzz_crash_020.md:76:2:76:3 UNUSED VARIABLE - fuzz_crash_020.md:87:2:87:3 UNDECLARED TYPE - fuzz_crash_020.md:116:5:116:6 -not_implemented - fuzz_crash_020.md:1:1:1:1 # PROBLEMS +**UNDECLARED TYPE** +The type ``Lis`` is not declared in this scope. + +This type is referenced here: +**fuzz_crash_020.md:13:13:13:16:** +```roc +Map(a, b) : Lis, (ab) -> List(b) +``` + ^^^ + + +**UNDECLARED TYPE VARIABLE** +The type variable ``ab`` is not declared in this scope. + +Type variables must be introduced in a type annotation before they can be used. + +This type variable is referenced here: +**fuzz_crash_020.md:13:19:13:21:** +```roc +Map(a, b) : Lis, (ab) -> List(b) +``` + ^^ + + +**UNDECLARED TYPE VARIABLE** +The type variable ``ab`` is not declared in this scope. + +Type variables must be introduced in a type annotation before they can be used. + +This type variable is referenced here: +**fuzz_crash_020.md:19:4:19:6:** +```roc + (ab) -> # row +``` + ^^ + + +**UNDECLARED TYPE VARIABLE** +The type variable ``b`` is not declared in this scope. + +Type variables must be introduced in a type annotation before they can be used. + +This type variable is referenced here: +**fuzz_crash_020.md:20:12:20:13:** +```roc + List( b ) #z) +``` + ^ + + +**UNDECLARED TYPE** +The type ``O`` is not declared in this scope. + +This type is referenced here: +**fuzz_crash_020.md:24:15:24:16:** +```roc +Som : { foo : O, bar : g } +``` + ^ + + +**UNDECLARED TYPE VARIABLE** +The type variable ``g`` is not declared in this scope. + +Type variables must be introduced in a type annotation before they can be used. + +This type variable is referenced here: +**fuzz_crash_020.md:24:24:24:25:** +```roc +Som : { foo : O, bar : g } +``` + ^ + + +**UNDECLARED TYPE** +The type ``U6`` is not declared in this scope. + +This type is referenced here: +**fuzz_crash_020.md:37:7:37:9:** +```roc +one : U6 +``` + ^^ + + +**UNDEFINED VARIABLE** +Nothing is named `num` in this scope. +Is there an `import` or `exposing` missing up-top? + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: canonicalize dbg expression +Let us know if you want to help! + +**UNDEFINED VARIABLE** +Nothing is named `exp0` in this scope. +Is there an `import` or `exposing` missing up-top? + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: canonicalize dbg expression +Let us know if you want to help! + +**UNDEFINED VARIABLE** +Nothing is named `r` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `x` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNUSED VARIABLE** +Variable ``lue`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_lue` to suppress this warning. +The unused variable is declared here: +**fuzz_crash_020.md:52:11:52:14:** +```roc + match a {lue { +``` + ^^^ + + +**UNDEFINED VARIABLE** +Nothing is named `x` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNUSED VARIABLE** +Variable ``er`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_er` to suppress this warning. +The unused variable is declared here: +**fuzz_crash_020.md:57:2:57:4:** +```roc + er #ent +``` + ^^ + + +**UNDEFINED VARIABLE** +Nothing is named `ment` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNUSED VARIABLE** +Variable ``est`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_est` to suppress this warning. +The unused variable is declared here: +**fuzz_crash_020.md:60:12:60:15:** +```roc + [1, 2, 3,est]123 +``` + ^^^ + + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: canonicalize alternatives pattern +Let us know if you want to help! + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: top-level expect +Let us know if you want to help! + +**UNDECLARED TYPE** +The type ``Listlt`` is not declared in this scope. + +This type is referenced here: +**fuzz_crash_020.md:74:9:74:15:** +```roc +main! : Listlt({}, _) +``` + ^^^^^^ + + +**UNDEFINED VARIABLE** +Nothing is named `e` in this scope. +Is there an `import` or `exposing` missing up-top? + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: statement type in block +Let us know if you want to help! + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: statement type in block +Let us know if you want to help! + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: ... +Let us know if you want to help! + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: ... +Let us know if you want to help! + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: crash statement +Let us know if you want to help! + +**UNDEFINED VARIABLE** +Nothing is named `d` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `one` in this scope. +Is there an `import` or `exposing` missing up-top? + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: statement type in block +Let us know if you want to help! + +**UNDEFINED VARIABLE** +Nothing is named `tag` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `world` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `ned` in this scope. +Is there an `import` or `exposing` missing up-top? + +**DUPLICATE DEFINITION** +The name `t` is being redeclared in this scope. + +The redeclaration is here: +**fuzz_crash_020.md:97:2:97:3:** +```roc + t = (123, "World", tag, O, (nd, t), [1, 2, 3]) +``` + ^ + +But `t` was already defined here: +**fuzz_crash_020.md:88:1:88:2:** +```roc +t = [ +``` +^ + + +**UNDEFINED VARIABLE** +Nothing is named `tag` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `nd` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `m` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `ag1` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `ne` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `tuple` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `b` in this scope. +Is there an `import` or `exposing` missing up-top? + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: canonicalize suffix_single_question expression +Let us know if you want to help! + +**UNDEFINED VARIABLE** +Nothing is named `r` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `nu` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNUSED VARIABLE** +Variable ``t`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_t` to suppress this warning. +The unused variable is declared here: +**fuzz_crash_020.md:88:1:88:2:** +```roc +t = [ +``` +^ + + +**UNUSED VARIABLE** +Variable ``rd`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_rd` to suppress this warning. +The unused variable is declared here: +**fuzz_crash_020.md:96:2:96:4:** +```roc + rd = { foo: 123, bar: "H", baz: tag, qux: Ok(world),ned } +``` + ^^ + + +**UNUSED VARIABLE** +Variable ``w`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_w` to suppress this warning. +The unused variable is declared here: +**fuzz_crash_020.md:76:2:76:3:** +```roc + w = "d" +``` + ^ + + +**UNUSED VARIABLE** +Variable ``i`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_i` to suppress this warning. +The unused variable is declared here: +**fuzz_crash_020.md:87:2:87:3:** +```roc + i= "H, ${d}" +``` + ^ + + +**UNDECLARED TYPE** +The type ``V`` is not declared in this scope. + +This type is referenced here: +**fuzz_crash_020.md:116:5:116:6:** +```roc +t : V((a,c)) +``` + ^ + + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: top-level expect +Let us know if you want to help! + **INCOMPATIBLE MATCH PATTERNS** The pattern in the fourth branch of this `match` differs from previous ones: **fuzz_crash_020.md:52:2:** diff --git a/src/snapshots/fuzz_crash/fuzz_crash_021.md b/src/snapshots/fuzz_crash/fuzz_crash_021.md index e9568012f4..c0d067d989 100644 --- a/src/snapshots/fuzz_crash/fuzz_crash_021.md +++ b/src/snapshots/fuzz_crash/fuzz_crash_021.md @@ -10,12 +10,10 @@ Fli/main.roc" } Pair(a, b+ : ( ~~~ # EXPECTED -UnclosedString - fuzz_crash_021.md:1:14:1:16 -missing_header - fuzz_crash_021.md:1:1:1:5 +UNCLOSED STRING - fuzz_crash_021.md:1:1:1:5 UNEXPECTED TOKEN IN EXPRESSION - fuzz_crash_021.md:1:4:1:9 -expected_ty_anno_end - fuzz_crash_021.md:3:1:3:6 -expected_ty_anno_end - fuzz_crash_021.md:3:15:3:15 -MALFORMED TYPE - fuzz_crash_021.md:3:14:3:15 +PARSE ERROR - fuzz_crash_021.md:3:1:3:6 +PARSE ERROR - fuzz_crash_021.md:3:15:3:15 # PROBLEMS **UNCLOSED STRING** This string is missing a closing quote. @@ -72,6 +70,21 @@ Pair(a, b+ : ( +**MALFORMED TYPE** +This type annotation is malformed or contains invalid syntax. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + # TOKENS ~~~zig UpperIdent(1:1-1:4),OpSlash(1:4-1:5),LowerIdent(1:5-1:9),NoSpaceDotLowerIdent(1:9-1:13),StringStart(1:13-1:14),StringPart(1:14-1:16),StringEnd(1:16-1:16),Newline(1:1-1:1), diff --git a/src/snapshots/fuzz_crash/fuzz_crash_022.md b/src/snapshots/fuzz_crash/fuzz_crash_022.md index 377b0ec4b6..0e5aa1290c 100644 --- a/src/snapshots/fuzz_crash/fuzz_crash_022.md +++ b/src/snapshots/fuzz_crash/fuzz_crash_022.md @@ -15,12 +15,12 @@ getUser = |id| if (id > 1!) "big" else "l" -ain! = |_| getUser(900) ~~~ # EXPECTED -expected_package_or_platform_name - fuzz_crash_022.md:1:1:1:6 +PARSE ERROR - fuzz_crash_022.md:1:1:1:6 UNEXPECTED TOKEN IN TYPE ANNOTATION - fuzz_crash_022.md:1:19:1:29 -expected_expr_close_round_or_comma - fuzz_crash_022.md:6:27:6:30 +UNEXPECTED TOKEN IN EXPRESSION - fuzz_crash_022.md:1:32:1:32 +PARSE ERROR - fuzz_crash_022.md:6:27:6:30 UNEXPECTED TOKEN IN EXPRESSION - fuzz_crash_022.md:8:1:8:6 -MALFORMED TYPE - fuzz_crash_022.md:1:19:1:29 -UNUSED VARIABLE - fuzz_crash_022.md:6:12:6:14 +MALFORMED TYPE - fuzz_crash_022.md:6:12:6:14 # PROBLEMS **PARSE ERROR** A parsing error occurred: `expected_package_or_platform_name` @@ -82,6 +82,38 @@ Here is the problematic code: ^^^^^ +**MALFORMED TYPE** +This type annotation is malformed or contains invalid syntax. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID IF CONDITION** +The condition in this `if` expression could not be processed. + +The condition must be a valid expression that evaluates to a `Bool` value (`Bool.true` or `Bool.false`). + +**UNUSED VARIABLE** +Variable ``id`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_id` to suppress this warning. +The unused variable is declared here: +**fuzz_crash_022.md:6:12:6:14:** +```roc +getUser = |id| if (id > 1!) "big" else "l" +``` + ^^ + + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + # TOKENS ~~~zig KwApp(1:1-1:4),OpenSquare(1:5-1:6),LowerIdent(1:6-1:11),CloseSquare(1:11-1:12),OpenCurly(1:13-1:14),OpBar(1:15-1:16),LowerIdent(1:16-1:17),OpColon(1:17-1:18),KwPlatform(1:19-1:27),StringStart(1:28-1:29),StringPart(1:29-1:30),StringEnd(1:30-1:31),CloseCurly(1:32-1:33),Newline(1:1-1:1), diff --git a/src/snapshots/fuzz_crash/fuzz_crash_023.md b/src/snapshots/fuzz_crash/fuzz_crash_023.md index e88e2cafb1..192d829b4d 100644 --- a/src/snapshots/fuzz_crash/fuzz_crash_023.md +++ b/src/snapshots/fuzz_crash/fuzz_crash_023.md @@ -218,75 +218,6 @@ UNEXPECTED TOKEN IN EXPRESSION - fuzz_crash_023.md:89:9:90:4 UNEXPECTED TOKEN IN PATTERN - fuzz_crash_023.md:90:3:90:28 UNEXPECTED TOKEN IN EXPRESSION - fuzz_crash_023.md:90:6:91:9 UNEXPECTED TOKEN IN EXPRESSION - fuzz_crash_023.md:1:1:92:4 -UNEXPECTED TOKEN IN PATTERN - fuzz_crash_023.md:92:3:92:8 -UNEXPECTED TOKEN IN PATTERN - fuzz_crash_023.md:93:4:93:8 -expected_expr_record_field_name - fuzz_crash_023.md:178:37:178:40 -expected_expr_close_curly_or_comma - fuzz_crash_023.md:178:38:178:41 -UNEXPECTED TOKEN IN EXPRESSION - fuzz_crash_023.md:178:40:178:45 -UNEXPECTED TOKEN IN EXPRESSION - fuzz_crash_023.md:178:45:178:50 -expected_arrow - fuzz_crash_023.md:178:52:178:55 -UNEXPECTED TOKEN IN EXPRESSION - fuzz_crash_023.md:1:1:179:7 -UNDECLARED TYPE - fuzz_crash_023.md:36:8:36:11 -UNDECLARED TYPE - fuzz_crash_023.md:36:13:36:16 -UNDECLARED TYPE - fuzz_crash_023.md:39:2:39:5 -UNDECLARED TYPE - fuzz_crash_023.md:40:2:40:5 -UNDECLARED TYPE - fuzz_crash_023.md:43:19:43:21 -UNDECLARED TYPE - fuzz_crash_023.md:43:32:43:41 -UNDECLARED TYPE - fuzz_crash_023.md:45:8:45:10 -UNDECLARED TYPE - fuzz_crash_023.md:46:8:46:17 -UNDECLARED TYPE - fuzz_crash_023.md:52:4:52:6 -UNDECLARED TYPE - fuzz_crash_023.md:53:8:53:17 -not_implemented - fuzz_crash_023.md:6:1:12:4 -not_implemented - fuzz_crash_023.md:1:1:1:1 -not_implemented - fuzz_crash_023.md:1:1:1:1 -not_implemented - fuzz_crash_023.md:1:1:1:1 -not_implemented - fuzz_crash_023.md:1:1:1:1 -not_implemented - fuzz_crash_023.md:1:1:1:1 -expr_not_canonicalized - fuzz_crash_023.md:89:9:90:4 -expr_not_canonicalized - fuzz_crash_023.md:90:6:91:9 -expr_not_canonicalized - fuzz_crash_023.md:1:1:92:4 -UNUSED VARIABLE - fuzz_crash_023.md:97:3:97:8 -not_implemented - fuzz_crash_023.md:1:1:1:1 -UNUSED VARIABLE - fuzz_crash_023.md:102:19:102:23 -not_implemented - fuzz_crash_023.md:1:1:1:1 -UNUSED VARIABLE - fuzz_crash_023.md:108:23:108:27 -not_implemented - fuzz_crash_023.md:1:1:1:1 -UNUSED VARIABLE - fuzz_crash_023.md:115:6:115:10 -not_implemented - fuzz_crash_023.md:1:1:1:1 -not_implemented - fuzz_crash_023.md:1:1:1:1 -not_implemented - fuzz_crash_023.md:121:5:121:12 -not_implemented - fuzz_crash_023.md:1:1:1:1 -not_implemented - fuzz_crash_023.md:123:4:125:8 -not_implemented - fuzz_crash_023.md:130:5:130:12 -not_implemented - fuzz_crash_023.md:132:4:132:11 -UNUSED VARIABLE - fuzz_crash_023.md:82:2:82:3 -not_implemented - fuzz_crash_023.md:1:1:1:1 -UNDECLARED TYPE - fuzz_crash_023.md:143:14:143:20 -not_implemented - fuzz_crash_023.md:1:1:1:1 -not_implemented - fuzz_crash_023.md:1:1:1:1 -not_implemented - fuzz_crash_023.md:154:2:154:5 -not_implemented - fuzz_crash_023.md:156:3:156:6 -UNDEFINED VARIABLE - fuzz_crash_023.md:158:2:158:11 -not_implemented - fuzz_crash_023.md:1:1:1:1 -not_implemented - fuzz_crash_023.md:162:2:163:49 -not_implemented - fuzz_crash_023.md:1:1:1:1 -not_implemented - fuzz_crash_023.md:1:1:1:1 -UNDEFINED VARIABLE - fuzz_crash_023.md:179:42:179:48 -UNDEFINED VARIABLE - fuzz_crash_023.md:183:3:183:7 -UNDEFINED VARIABLE - fuzz_crash_023.md:185:4:185:10 -UNDEFINED VARIABLE - fuzz_crash_023.md:188:22:188:25 -not_implemented - fuzz_crash_023.md:1:1:1:1 -not_implemented - fuzz_crash_023.md:1:1:1:1 -UNDEFINED VARIABLE - fuzz_crash_023.md:193:4:193:13 -UNUSED VARIABLE - fuzz_crash_023.md:180:2:180:17 -UNUSED VARIABLE - fuzz_crash_023.md:178:2:178:8 -UNUSED VARIABLE - fuzz_crash_023.md:164:2:164:18 -UNUSED VARIABLE - fuzz_crash_023.md:166:2:166:6 -UNUSED VARIABLE - fuzz_crash_023.md:188:2:188:15 -UNUSED VARIABLE - fuzz_crash_023.md:189:2:189:23 -UNUSED VARIABLE - fuzz_crash_023.md:165:2:165:14 -UNDECLARED TYPE - fuzz_crash_023.md:201:9:201:14 -not_implemented - fuzz_crash_023.md:1:1:1:1 # PROBLEMS **UNEXPECTED TOKEN IN EXPRESSION** The token ** After pattern in alt @@ -970,6 +901,442 @@ main! = |_| { # Yeah I can leave a comment here ``` +**UNDECLARED TYPE** +The type ``Bar`` is not declared in this scope. + +This type is referenced here: +**fuzz_crash_023.md:36:8:36:11:** +```roc +Foo : (Bar, Baz) +``` + ^^^ + + +**UNDECLARED TYPE** +The type ``Baz`` is not declared in this scope. + +This type is referenced here: +**fuzz_crash_023.md:36:13:36:16:** +```roc +Foo : (Bar, Baz) +``` + ^^^ + + +**UNDECLARED TYPE** +The type ``Bar`` is not declared in this scope. + +This type is referenced here: +**fuzz_crash_023.md:39:2:39:5:** +```roc + Bar, # Comment after pattern tuple item +``` + ^^^ + + +**UNDECLARED TYPE** +The type ``Baz`` is not declared in this scope. + +This type is referenced here: +**fuzz_crash_023.md:40:2:40:5:** +```roc + Baz, # Another after pattern tuple item +``` + ^^^ + + +**UNDECLARED TYPE** +The type ``Ok`` is not declared in this scope. + +This type is referenced here: +**fuzz_crash_023.md:43:19:43:21:** +```roc +Some(a) : { foo : Ok(a), bar : Something } +``` + ^^ + + +**UNDECLARED TYPE** +The type ``Something`` is not declared in this scope. + +This type is referenced here: +**fuzz_crash_023.md:43:32:43:41:** +```roc +Some(a) : { foo : Ok(a), bar : Something } +``` + ^^^^^^^^^ + + +**UNDECLARED TYPE** +The type ``Ok`` is not declared in this scope. + +This type is referenced here: +**fuzz_crash_023.md:45:8:45:10:** +```roc + foo : Ok(a), # After field +``` + ^^ + + +**UNDECLARED TYPE** +The type ``Something`` is not declared in this scope. + +This type is referenced here: +**fuzz_crash_023.md:46:8:46:17:** +```roc + bar : Something, # After last field +``` + ^^^^^^^^^ + + +**UNDECLARED TYPE** +The type ``Ok`` is not declared in this scope. + +This type is referenced here: +**fuzz_crash_023.md:52:4:52:6:** +```roc + Ok(a), # Comment after pattern record field +``` + ^^ + + +**UNDECLARED TYPE** +The type ``Something`` is not declared in this scope. + +This type is referenced here: +**fuzz_crash_023.md:53:8:53:17:** +```roc + bar : Something, # Another after pattern record field +``` + ^^^^^^^^^ + + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: malformed import module name contains invalid control characters +Let us know if you want to help! + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: Exposed item 'line!' already imported from module 'pf.Stdout', cannot import again from module 'MALFORMED_IMPORT' +Let us know if you want to help! + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: Exposed item 'write!' already imported from module 'pf.Stdout', cannot import again from module 'MALFORMED_IMPORT' +Let us know if you want to help! + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: canonicalize dbg expression +Let us know if you want to help! + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: canonicalize dbg expression +Let us know if you want to help! + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: canonicalize alternatives pattern +Let us know if you want to help! + +**UNKNOWN OPERATOR** +This looks like an operator, but it's not one I recognize! +Check the spelling and make sure you're using a valid Roc operator. + +**INVALID PATTERN** +This pattern contains invalid syntax or uses unsupported features. + +**UNKNOWN OPERATOR** +This looks like an operator, but it's not one I recognize! +Check the spelling and make sure you're using a valid Roc operator. + +**UNKNOWN OPERATOR** +This looks like an operator, but it's not one I recognize! +Check the spelling and make sure you're using a valid Roc operator. + +**INVALID PATTERN** +This pattern contains invalid syntax or uses unsupported features. + +**INVALID PATTERN** +This pattern contains invalid syntax or uses unsupported features. + +**UNUSED VARIABLE** +Variable ``lower`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_lower` to suppress this warning. +The unused variable is declared here: +**fuzz_crash_023.md:97:3:97:8:** +```roc + lower # After pattern comment +``` + ^^^^^ + + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: canonicalize alternatives pattern +Let us know if you want to help! + +**UNUSED VARIABLE** +Variable ``rest`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_rest` to suppress this warning. +The unused variable is declared here: +**fuzz_crash_023.md:102:19:102:23:** +```roc + [1, 2, 3, .. as rest] # After pattern comment +``` + ^^^^ + + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: canonicalize alternatives pattern +Let us know if you want to help! + +**UNUSED VARIABLE** +Variable ``rest`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_rest` to suppress this warning. +The unused variable is declared here: +**fuzz_crash_023.md:108:23:108:27:** +```roc + [1, 2 | 5, 3, .. as rest] => 123 +``` + ^^^^ + + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: canonicalize alternatives pattern +Let us know if you want to help! + +**UNUSED VARIABLE** +Variable ``rest`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_rest` to suppress this warning. +The unused variable is declared here: +**fuzz_crash_023.md:115:6:115:10:** +```roc + rest, # After last pattern in list +``` + ^^^^ + + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: canonicalize alternatives pattern +Let us know if you want to help! + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: canonicalize alternatives pattern +Let us know if you want to help! + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: record pattern with sub-patterns +Let us know if you want to help! + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: canonicalize local_dispatch expression +Let us know if you want to help! + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: record pattern with sub-patterns +Let us know if you want to help! + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: record pattern with sub-patterns +Let us know if you want to help! + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: record pattern with sub-patterns +Let us know if you want to help! + +**UNUSED VARIABLE** +Variable ``b`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_b` to suppress this warning. +The unused variable is declared here: +**fuzz_crash_023.md:82:2:82:3:** +```roc + b, +``` + ^ + + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: top-level expect +Let us know if you want to help! + +**UNDECLARED TYPE** +The type ``String`` is not declared in this scope. + +This type is referenced here: +**fuzz_crash_023.md:143:14:143:20:** +```roc +main! : List(String) -> Result({}, _) +``` + ^^^^^^ + + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: statement type in block +Let us know if you want to help! + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: statement type in block +Let us know if you want to help! + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: ... +Let us know if you want to help! + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: ... +Let us know if you want to help! + +**UNDEFINED VARIABLE** +Nothing is named `some_func` in this scope. +Is there an `import` or `exposing` missing up-top? + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: canonicalize dbg expression +Let us know if you want to help! + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: crash statement +Let us know if you want to help! + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: canonicalize dbg expression +Let us know if you want to help! + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: statement type in block +Let us know if you want to help! + +**MALFORMED TYPE** +This type annotation is malformed or contains invalid syntax. + +**UNDEFINED VARIABLE** +Nothing is named `nested` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `tag1` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `nested` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `foo` in this scope. +Is there an `import` or `exposing` missing up-top? + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: canonicalize suffix_single_question expression +Let us know if you want to help! + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: canonicalize suffix_single_question expression +Let us know if you want to help! + +**UNDEFINED VARIABLE** +Nothing is named `toStr` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNUSED VARIABLE** +Variable ``multiline_tuple`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_multiline_tuple` to suppress this warning. +The unused variable is declared here: +**fuzz_crash_023.md:180:2:180:17:** +```roc + multiline_tuple = ( +``` + ^^^^^^^^^^^^^^^ + + +**UNUSED VARIABLE** +Variable ``record`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_record` to suppress this warning. +The unused variable is declared here: +**fuzz_crash_023.md:178:2:178:8:** +```roc + record = { foo: 123, bar: "Hello", ;az: tag, qux: Ok(world), punned } +``` + ^^^^^^ + + +**UNUSED VARIABLE** +Variable ``tag_with_payload`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_tag_with_payload` to suppress this warning. +The unused variable is declared here: +**fuzz_crash_023.md:164:2:164:18:** +```roc + tag_with_payload = Ok(number) +``` + ^^^^^^^^^^^^^^^^ + + +**UNUSED VARIABLE** +Variable ``list`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_list` to suppress this warning. +The unused variable is declared here: +**fuzz_crash_023.md:166:2:166:6:** +```roc + list = [ +``` + ^^^^ + + +**UNUSED VARIABLE** +Variable ``bin_op_result`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_bin_op_result` to suppress this warning. +The unused variable is declared here: +**fuzz_crash_023.md:188:2:188:15:** +```roc + bin_op_result = Err(foo) ?? 12 > 5 * 5 or 13 + 2 < 5 and 10 - 1 >= 16 or 12 <= 3 / 5 +``` + ^^^^^^^^^^^^^ + + +**UNUSED VARIABLE** +Variable ``static_dispatch_style`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_static_dispatch_style` to suppress this warning. +The unused variable is declared here: +**fuzz_crash_023.md:189:2:189:23:** +```roc + static_dispatch_style = some_fn(arg1)?.static_dispatch_method()?.next_static_dispatch_method()?.record_field? +``` + ^^^^^^^^^^^^^^^^^^^^^ + + +**UNUSED VARIABLE** +Variable ``interpolated`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_interpolated` to suppress this warning. +The unused variable is declared here: +**fuzz_crash_023.md:165:2:165:14:** +```roc + interpolated = "Hello, ${world}" +``` + ^^^^^^^^^^^^ + + +**UNDECLARED TYPE** +The type ``Value`` is not declared in this scope. + +This type is referenced here: +**fuzz_crash_023.md:201:9:201:14:** +```roc +tuple : Value((a, b, c)) +``` + ^^^^^ + + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: top-level expect +Let us know if you want to help! + **TYPE MISMATCH** This expression is used in an unexpected way: **fuzz_crash_023.md:68:1:68:8:** diff --git a/src/snapshots/fuzz_crash/fuzz_crash_024.md b/src/snapshots/fuzz_crash/fuzz_crash_024.md index b173fd554c..075763e7a8 100644 --- a/src/snapshots/fuzz_crash/fuzz_crash_024.md +++ b/src/snapshots/fuzz_crash/fuzz_crash_024.md @@ -14,14 +14,15 @@ var t= ] var t= 0 ~~~ # EXPECTED -UnclosedString - fuzz_crash_024.md:1:34:1:53 -MismatchedBrace - fuzz_crash_024.md:4:8:4:8 -exposed_item_unexpected_token - fuzz_crash_024.md:1:9:1:17 +UNCLOSED STRING - fuzz_crash_024.md:1:9:1:17 UNEXPECTED TOKEN IN EXPRESSION - fuzz_crash_024.md:1:24:1:34 -expected_expr_close_curly_or_comma - fuzz_crash_024.md:1:33:1:53 +PARSE ERROR - fuzz_crash_024.md:1:33:1:53 UNEXPECTED TOKEN IN EXPRESSION - fuzz_crash_024.md:1:34:1:53 -var_only_allowed_in_a_body - fuzz_crash_024.md:4:1:4:6 -var_only_allowed_in_a_body - fuzz_crash_024.md:7:1:7:6 +UNEXPECTED TOKEN IN EXPRESSION - fuzz_crash_024.md:1:53:1:53 +PARSE ERROR - fuzz_crash_024.md:4:1:4:6 +UNEXPECTED TOKEN IN EXPRESSION - fuzz_crash_024.md:4:8:4:8 +PARSE ERROR - fuzz_crash_024.md:7:1:7:6 +INVALID STATEMENT - fuzz_crash_024.md:7:5:7:6 # PROBLEMS **UNCLOSED STRING** This string is missing a closing quote. @@ -125,6 +126,40 @@ var t= 0 ^^^^^ +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**UNKNOWN OPERATOR** +This looks like an operator, but it's not one I recognize! +Check the spelling and make sure you're using a valid Roc operator. + +**DUPLICATE DEFINITION** +The name `t` is being redeclared in this scope. + +The redeclaration is here: +**fuzz_crash_024.md:7:5:7:6:** +```roc +var t= 0 +``` + ^ + +But `t` was already defined here: +**fuzz_crash_024.md:4:5:4:6:** +```roc +var t= ] +``` + ^ + + # TOKENS ~~~zig KwModule(1:1-1:7),OpenSquare(1:8-1:9),KwModule(1:9-1:15),CloseSquare(1:16-1:17),OpenCurly(1:18-1:19),LowerIdent(1:20-1:22),OpColon(1:22-1:23),KwPlatform(1:24-1:32),StringStart(1:33-1:34),StringPart(1:34-1:53),StringEnd(1:53-1:53),Newline(1:1-1:1), diff --git a/src/snapshots/fuzz_crash/fuzz_crash_025.md b/src/snapshots/fuzz_crash/fuzz_crash_025.md index e31fb057b2..8754370e64 100644 --- a/src/snapshots/fuzz_crash/fuzz_crash_025.md +++ b/src/snapshots/fuzz_crash/fuzz_crash_025.md @@ -34,9 +34,12 @@ j : I128 j = -17011687303715884105728 ~~~ # EXPECTED +PARSE ERROR - fuzz_crash_025.md:10:15:10:15 UNEXPECTED TOKEN IN EXPRESSION - fuzz_crash_025.md:11:3:11:25 UNEXPECTED TOKEN IN EXPRESSION - fuzz_crash_025.md:14:48:14:52 +PARSE ERROR - fuzz_crash_025.md:14:50:14:50 UNEXPECTED TOKEN IN EXPRESSION - fuzz_crash_025.md:15:3:15:5 +INVALID STATEMENT - fuzz_crash_025.md:14:1:14:2 # PROBLEMS **PARSE ERROR** Type applications require parentheses around their type arguments. @@ -122,6 +125,26 @@ f =8 ^^ +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + **TYPE MISMATCH** This expression is used in an unexpected way: **fuzz_crash_025.md:14:1:14:2:** diff --git a/src/snapshots/fuzz_crash/fuzz_crash_026.md b/src/snapshots/fuzz_crash/fuzz_crash_026.md index 901c8358c1..19fdb8dbcb 100644 Binary files a/src/snapshots/fuzz_crash/fuzz_crash_026.md and b/src/snapshots/fuzz_crash/fuzz_crash_026.md differ diff --git a/src/snapshots/fuzz_crash/fuzz_crash_027.md b/src/snapshots/fuzz_crash/fuzz_crash_027.md index 5364b45700..a13983ec91 100644 --- a/src/snapshots/fuzz_crash/fuzz_crash_027.md +++ b/src/snapshots/fuzz_crash/fuzz_crash_027.md @@ -166,74 +166,9 @@ expect { } ~~~ # EXPECTED -OverClosedBrace - fuzz_crash_027.md:40:5:40:5 -LeadingZero - fuzz_crash_027.md:69:2:69:2 -UnclosedString - fuzz_crash_027.md:118:9:118:22 -MismatchedBrace - fuzz_crash_027.md:125:3:125:3 -MismatchedBrace - fuzz_crash_027.md:126:2:126:2 -MismatchedBrace - fuzz_crash_027.md:148:1:148:1 -expected_ty_close_curly_or_comma - fuzz_crash_027.md:34:12:35:2 -expected_ty_close_curly_or_comma - fuzz_crash_027.md:1:1:39:2 -UNEXPECTED TOKEN IN EXPRESSION - fuzz_crash_027.md:39:1:39:4 -expected_expr_apply_close_round - fuzz_crash_027.md:122:3:122:11 -UNEXPECTED TOKEN IN EXPRESSION - fuzz_crash_027.md:125:4:125:9 -UNEXPECTED TOKEN IN EXPRESSION - fuzz_crash_027.md:125:9:125:15 -UNEXPECTED TOKEN IN EXPRESSION - fuzz_crash_027.md:148:1:148:17 -UNDECLARED TYPE - fuzz_crash_027.md:26:8:26:11 -UNDECLARED TYPE - fuzz_crash_027.md:26:13:26:16 -UNDECLARED TYPE - fuzz_crash_027.md:32:19:32:21 -undeclared_type_var - fuzz_crash_027.md:32:32:32:33 -MALFORMED TYPE - fuzz_crash_027.md:34:12:35:2 -MALFORMED TYPE - fuzz_crash_027.md:1:1:39:2 -UNDECLARED TYPE - fuzz_crash_027.md:43:11:43:16 -UNDECLARED TYPE - fuzz_crash_027.md:43:26:43:31 -UNDECLARED TYPE - fuzz_crash_027.md:29:2:29:5 -UNDECLARED TYPE - fuzz_crash_027.md:30:2:30:5 -not_implemented - fuzz_crash_027.md:1:1:1:1 -not_implemented - fuzz_crash_027.md:1:1:1:1 -not_implemented - fuzz_crash_027.md:1:1:1:1 -UNDEFINED VARIABLE - fuzz_crash_027.md:65:4:65:5 -UNDEFINED VARIABLE - fuzz_crash_027.md:65:6:65:7 -not_implemented - fuzz_crash_027.md:1:1:1:1 -UNDEFINED VARIABLE - fuzz_crash_027.md:71:7:71:11 -UNUSED VARIABLE - fuzz_crash_027.md:70:38:70:42 -not_implemented - fuzz_crash_027.md:1:1:1:1 -UNUSED VARIABLE - fuzz_crash_027.md:74:23:74:27 -UNUSED VARIABLE - fuzz_crash_027.md:76:1:76:4 -not_implemented - fuzz_crash_027.md:1:1:1:1 -not_implemented - fuzz_crash_027.md:1:1:1:1 -not_implemented - fuzz_crash_027.md:82:5:82:12 -not_implemented - fuzz_crash_027.md:1:1:1:1 -not_implemented - fuzz_crash_027.md:84:4:86:8 -not_implemented - fuzz_crash_027.md:89:5:89:12 -not_implemented - fuzz_crash_027.md:91:4:91:11 -UNUSED VARIABLE - fuzz_crash_027.md:62:2:62:3 -not_implemented - fuzz_crash_027.md:1:1:1:1 -UNDECLARED TYPE - fuzz_crash_027.md:99:14:99:20 -not_implemented - fuzz_crash_027.md:1:1:1:1 -not_implemented - fuzz_crash_027.md:1:1:1:1 -not_implemented - fuzz_crash_027.md:110:2:110:5 -not_implemented - fuzz_crash_027.md:112:3:112:6 -UNDEFINED VARIABLE - fuzz_crash_027.md:114:2:114:11 -not_implemented - fuzz_crash_027.md:1:1:1:1 -not_implemented - fuzz_crash_027.md:1:1:1:1 -UNDEFINED VARIABLE - fuzz_crash_027.md:131:63:131:71 -UNDEFINED VARIABLE - fuzz_crash_027.md:132:42:132:48 -UNDEFINED VARIABLE - fuzz_crash_027.md:136:3:136:7 -UNDEFINED VARIABLE - fuzz_crash_027.md:138:4:138:10 -UNDEFINED VARIABLE - fuzz_crash_027.md:141:14:141:17 -not_implemented - fuzz_crash_027.md:1:1:1:1 -UNDEFINED VARIABLE - fuzz_crash_027.md:145:4:145:13 -UNDECLARED TYPE - fuzz_crash_027.md:153:9:153:14 -not_implemented - fuzz_crash_027.md:1:1:1:1 -UNUSED VARIABLE - fuzz_crash_027.md:131:2:131:8 -UNUSED VARIABLE - fuzz_crash_027.md:121:2:121:6 -UNUSED VARIABLE - fuzz_crash_027.md:133:2:133:9 -UNUSED VARIABLE - fuzz_crash_027.md:142:2:142:7 -UNUSED VARIABLE - fuzz_crash_027.md:151:1:151:6 -UNUSED VARIABLE - fuzz_crash_027.md:119:2:119:10 -UNUSED VARIABLE - fuzz_crash_027.md:141:2:141:7 -UNUSED VARIABLE - fuzz_crash_027.md:120:2:120:6 +OVER CLOSED BRACE - fuzz_crash_027.md:34:12:35:2 +UNEXPECTED TOKEN IN EXPRESSION - fuzz_crash_027.md:35:1:35:1 +PARSE ERROR - fuzz_crash_027.md:1:1:39:2 # PROBLEMS **OVER CLOSED BRACE** There are too many closing braces here. @@ -398,6 +333,404 @@ Here is the problematic code: ^^^^^^^^^^^^^^^^ +**UNDECLARED TYPE** +The type ``Bar`` is not declared in this scope. + +This type is referenced here: +**fuzz_crash_027.md:26:8:26:11:** +```roc +Foo : (Bar, Baz) +``` + ^^^ + + +**UNDECLARED TYPE** +The type ``Baz`` is not declared in this scope. + +This type is referenced here: +**fuzz_crash_027.md:26:13:26:16:** +```roc +Foo : (Bar, Baz) +``` + ^^^ + + +**UNDECLARED TYPE** +The type ``Ok`` is not declared in this scope. + +This type is referenced here: +**fuzz_crash_027.md:32:19:32:21:** +```roc +Some(a) : { foo : Ok(a), bar : g } +``` + ^^ + + +**UNDECLARED TYPE VARIABLE** +The type variable ``g`` is not declared in this scope. + +Type variables must be introduced in a type annotation before they can be used. + +This type variable is referenced here: +**fuzz_crash_027.md:32:32:32:33:** +```roc +Some(a) : { foo : Ok(a), bar : g } +``` + ^ + + +**MALFORMED TYPE** +This type annotation is malformed or contains invalid syntax. + +**MALFORMED TYPE** +This type annotation is malformed or contains invalid syntax. + +**UNDECLARED TYPE** +The type ``Maybe`` is not declared in this scope. + +This type is referenced here: +**fuzz_crash_027.md:43:11:43:16:** +```roc +Func(a) : Maybe(a), a -> Maybe(a) +``` + ^^^^^ + + +**UNDECLARED TYPE** +The type ``Maybe`` is not declared in this scope. + +This type is referenced here: +**fuzz_crash_027.md:43:26:43:31:** +```roc +Func(a) : Maybe(a), a -> Maybe(a) +``` + ^^^^^ + + +**UNDECLARED TYPE** +The type ``Bar`` is not declared in this scope. + +This type is referenced here: +**fuzz_crash_027.md:29:2:29:5:** +```roc + Bar, # +``` + ^^^ + + +**UNDECLARED TYPE** +The type ``Baz`` is not declared in this scope. + +This type is referenced here: +**fuzz_crash_027.md:30:2:30:5:** +```roc + Baz, #m +``` + ^^^ + + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: canonicalize dbg expression +Let us know if you want to help! + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: canonicalize dbg expression +Let us know if you want to help! + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: canonicalize alternatives pattern +Let us know if you want to help! + +**UNDEFINED VARIABLE** +Nothing is named `x` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `x` in this scope. +Is there an `import` or `exposing` missing up-top? + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: canonicalize alternatives pattern +Let us know if you want to help! + +**UNDEFINED VARIABLE** +Nothing is named `ment` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNUSED VARIABLE** +Variable ``rest`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_rest` to suppress this warning. +The unused variable is declared here: +**fuzz_crash_027.md:70:38:70:42:** +```roc + "foo" | "bar" => 20[1, 2, 3, .. as rest] # Aftet +``` + ^^^^ + + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: canonicalize alternatives pattern +Let us know if you want to help! + +**UNUSED VARIABLE** +Variable ``rest`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_rest` to suppress this warning. +The unused variable is declared here: +**fuzz_crash_027.md:74:23:74:27:** +```roc + [1, 2 | 5, 3, .. as rest] => 123 +``` + ^^^^ + + +**UNUSED VARIABLE** +Variable ``ist`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_ist` to suppress this warning. +The unused variable is declared here: +**fuzz_crash_027.md:76:1:76:4:** +```roc +ist +``` +^^^ + + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: canonicalize alternatives pattern +Let us know if you want to help! + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: canonicalize alternatives pattern +Let us know if you want to help! + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: record pattern with sub-patterns +Let us know if you want to help! + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: canonicalize local_dispatch expression +Let us know if you want to help! + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: record pattern with sub-patterns +Let us know if you want to help! + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: record pattern with sub-patterns +Let us know if you want to help! + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: record pattern with sub-patterns +Let us know if you want to help! + +**UNUSED VARIABLE** +Variable ``b`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_b` to suppress this warning. +The unused variable is declared here: +**fuzz_crash_027.md:62:2:62:3:** +```roc + b, +``` + ^ + + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: top-level expect +Let us know if you want to help! + +**UNDECLARED TYPE** +The type ``String`` is not declared in this scope. + +This type is referenced here: +**fuzz_crash_027.md:99:14:99:20:** +```roc +main! : List(String) -> Result({}, _) +``` + ^^^^^^ + + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: statement type in block +Let us know if you want to help! + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: statement type in block +Let us know if you want to help! + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: ... +Let us know if you want to help! + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: ... +Let us know if you want to help! + +**UNDEFINED VARIABLE** +Nothing is named `some_func` in this scope. +Is there an `import` or `exposing` missing up-top? + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: canonicalize dbg expression +Let us know if you want to help! + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: crash statement +Let us know if you want to help! + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: statement type in block +Let us know if you want to help! + +**UNDEFINED VARIABLE** +Nothing is named `punned` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `nested` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `tag1` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `nested` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `foo` in this scope. +Is there an `import` or `exposing` missing up-top? + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: canonicalize suffix_single_question expression +Let us know if you want to help! + +**UNDEFINED VARIABLE** +Nothing is named `toStr` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDECLARED TYPE** +The type ``Value`` is not declared in this scope. + +This type is referenced here: +**fuzz_crash_027.md:153:9:153:14:** +```roc +tuple : Value((a, b, c)) +``` + ^^^^^ + + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: statement type in block +Let us know if you want to help! + +**UNUSED VARIABLE** +Variable ``record`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_record` to suppress this warning. +The unused variable is declared here: +**fuzz_crash_027.md:131:2:131:8:** +```roc + record = { foo: 123, bar: "Hello", baz: tag, qux: Ok(world), punned } +``` + ^^^^^^ + + +**UNUSED VARIABLE** +Variable ``list`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_list` to suppress this warning. +The unused variable is declared here: +**fuzz_crash_027.md:121:2:121:6:** +```roc + list = [ +``` + ^^^^ + + +**UNUSED VARIABLE** +Variable ``m_tuple`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_m_tuple` to suppress this warning. +The unused variable is declared here: +**fuzz_crash_027.md:133:2:133:9:** +```roc + m_tuple = ( +``` + ^^^^^^^ + + +**UNUSED VARIABLE** +Variable ``stale`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_stale` to suppress this warning. +The unused variable is declared here: +**fuzz_crash_027.md:142:2:142:7:** +```roc + stale = some_fn(arg1)?.statod()?.ned()?.recd? +``` + ^^^^^ + + +**UNUSED VARIABLE** +Variable ``empty`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_empty` to suppress this warning. +The unused variable is declared here: +**fuzz_crash_027.md:151:1:151:6:** +```roc +empty = {} +``` +^^^^^ + + +**UNUSED VARIABLE** +Variable ``tag_with`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_tag_with` to suppress this warning. +The unused variable is declared here: +**fuzz_crash_027.md:119:2:119:10:** +```roc + tag_with = Ok(number) +``` + ^^^^^^^^ + + +**UNUSED VARIABLE** +Variable ``bsult`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_bsult` to suppress this warning. +The unused variable is declared here: +**fuzz_crash_027.md:141:2:141:7:** +```roc + bsult = Err(foo) ?? 12 > 5 * 5 or 13 + 2 < 5 and 10 - 1 >= 16 or 12 <= 3 / 5 +``` + ^^^^^ + + +**UNUSED VARIABLE** +Variable ``ited`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_ited` to suppress this warning. +The unused variable is declared here: +**fuzz_crash_027.md:120:2:120:6:** +```roc + ited = "Hello, ${world}" +``` + ^^^^ + + **TYPE MISMATCH** This expression is used in an unexpected way: **fuzz_crash_027.md:48:1:48:8:** diff --git a/src/snapshots/fuzz_crash/fuzz_crash_028.md b/src/snapshots/fuzz_crash/fuzz_crash_028.md index 230c685bd8..0d541738ef 100644 Binary files a/src/snapshots/fuzz_crash/fuzz_crash_028.md and b/src/snapshots/fuzz_crash/fuzz_crash_028.md differ diff --git a/src/snapshots/fuzz_crash/fuzz_crash_029.md b/src/snapshots/fuzz_crash/fuzz_crash_029.md index 36c670764b..1b717a821d 100644 --- a/src/snapshots/fuzz_crash/fuzz_crash_029.md +++ b/src/snapshots/fuzz_crash/fuzz_crash_029.md @@ -24,17 +24,16 @@ ar, ] ~~~ # EXPECTED -MismatchedBrace - fuzz_crash_029.md:17:3:17:3 -expected_requires_rigids_close_curly - fuzz_crash_029.md:4:4:4:9 -invalid_type_arg - fuzz_crash_029.md:5:14:5:18 -expected_colon_after_type_annotation - fuzz_crash_029.md:5:9:5:14 +MISMATCHED BRACE - fuzz_crash_029.md:4:4:4:9 +PARSE ERROR - fuzz_crash_029.md:5:14:5:18 +PARSE ERROR - fuzz_crash_029.md:5:9:5:14 UNEXPECTED TOKEN IN EXPRESSION - fuzz_crash_029.md:5:24:5:31 UNEXPECTED TOKEN IN EXPRESSION - fuzz_crash_029.md:6:4:6:10 UNEXPECTED TOKEN IN EXPRESSION - fuzz_crash_029.md:7:2:7:13 UNEXPECTED TOKEN IN EXPRESSION - fuzz_crash_029.md:10:2:10:15 UNEXPECTED TOKEN IN EXPRESSION - fuzz_crash_029.md:14:2:14:15 -expected_expr_close_round_or_comma - fuzz_crash_029.md:17:3:17:4 -expected_expr_close_square_or_comma - fuzz_crash_029.md:17:4:17:4 +PARSE ERROR - fuzz_crash_029.md:17:3:17:4 +LIST NOT CLOSED - fuzz_crash_029.md:17:4:17:4 # PROBLEMS **MISMATCHED BRACE** This brace does not match the corresponding opening brace. @@ -172,6 +171,46 @@ Here is the problematic code: +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + # TOKENS ~~~zig KwPlatform(1:1-1:9),Newline(1:11-1:14), diff --git a/src/snapshots/fuzz_crash/fuzz_crash_030.md b/src/snapshots/fuzz_crash/fuzz_crash_030.md index b2d5f992c6..b880f6a4b7 100644 --- a/src/snapshots/fuzz_crash/fuzz_crash_030.md +++ b/src/snapshots/fuzz_crash/fuzz_crash_030.md @@ -23,10 +23,11 @@ ar, ] ~~~ # EXPECTED -expected_exposes_close_square - fuzz_crash_030.md:8:3:8:6 +PARSE ERROR - fuzz_crash_030.md:8:5:8:5 +EXPECTED CLOSING BRACKET - fuzz_crash_030.md:8:3:8:6 UNEXPECTED TOKEN IN EXPRESSION - fuzz_crash_030.md:9:3:9:10 UNEXPECTED TOKEN IN EXPRESSION - fuzz_crash_030.md:10:2:10:15 -expected_expr_close_curly_or_comma - fuzz_crash_030.md:12:8:12:12 +PARSE ERROR - fuzz_crash_030.md:12:8:12:12 UNEXPECTED TOKEN IN EXPRESSION - fuzz_crash_030.md:12:9:12:13 UNEXPECTED TOKEN IN EXPRESSION - fuzz_crash_030.md:12:12:12:14 UNEXPECTED TOKEN IN EXPRESSION - fuzz_crash_030.md:12:13:12:17 @@ -153,6 +154,46 @@ Here is the problematic code: ^^^^^^^^^^^^^ +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + # TOKENS ~~~zig KwPlatform(1:1-1:9),Newline(1:11-1:14), diff --git a/src/snapshots/fuzz_crash/fuzz_hang_001.md b/src/snapshots/fuzz_crash/fuzz_hang_001.md index e9ed244e90..bd284db4a4 100644 --- a/src/snapshots/fuzz_crash/fuzz_hang_001.md +++ b/src/snapshots/fuzz_crash/fuzz_hang_001.md @@ -8,8 +8,8 @@ type=file 0 ( ~~~ # EXPECTED -missing_header - fuzz_hang_001.md:1:1:1:4 -expected_expr_close_round_or_comma - fuzz_hang_001.md:1:4:1:4 +MISSING HEADER - fuzz_hang_001.md:1:1:1:4 +PARSE ERROR - fuzz_hang_001.md:1:4:1:4 # PROBLEMS **MISSING HEADER** Roc files must start with a module header. @@ -39,6 +39,10 @@ Here is the problematic code: +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + # TOKENS ~~~zig Int(1:1-1:2),OpenRound(1:3-1:4),EndOfFile(1:4-1:4), diff --git a/src/snapshots/header_expected_open_bracket.md b/src/snapshots/header_expected_open_bracket.md index 12896d4255..d520144eb6 100644 --- a/src/snapshots/header_expected_open_bracket.md +++ b/src/snapshots/header_expected_open_bracket.md @@ -8,7 +8,7 @@ type=file module ~~~ # EXPECTED -header_expected_open_square - header_expected_open_bracket.md:1:7:1:7 +PARSE ERROR - header_expected_open_bracket.md:1:7:1:7 # PROBLEMS **PARSE ERROR** A parsing error occurred: `header_expected_open_square` diff --git a/src/snapshots/hello_world_with_block.md b/src/snapshots/hello_world_with_block.md index a228690cd1..4392bbbf02 100644 --- a/src/snapshots/hello_world_with_block.md +++ b/src/snapshots/hello_world_with_block.md @@ -21,7 +21,18 @@ main! = |_| { # EXPECTED UNUSED VARIABLE - hello_world_with_block.md:9:2:9:7 # PROBLEMS -NIL +**UNUSED VARIABLE** +Variable ``world`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_world` to suppress this warning. +The unused variable is declared here: +**hello_world_with_block.md:9:2:9:7:** +```roc + world = "World" +``` + ^^^^^ + + # TOKENS ~~~zig Newline(1:2-1:15), diff --git a/src/snapshots/if_then_else/if_then_else_7.md b/src/snapshots/if_then_else/if_then_else_7.md index 271b97a12d..2b73ba50dc 100644 --- a/src/snapshots/if_then_else/if_then_else_7.md +++ b/src/snapshots/if_then_else/if_then_else_7.md @@ -12,9 +12,12 @@ if bool { } ~~~ # EXPECTED -UNDEFINED VARIABLE - if_then_else_7.md:1:4:1:8 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `bool` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig KwIf(1:1-1:3),LowerIdent(1:4-1:8),OpenCurly(1:9-1:10),Newline(1:1-1:1), diff --git a/src/snapshots/if_then_else/if_then_else_9.md b/src/snapshots/if_then_else/if_then_else_9.md index d2614bff38..e2c17996ff 100644 --- a/src/snapshots/if_then_else/if_then_else_9.md +++ b/src/snapshots/if_then_else/if_then_else_9.md @@ -14,8 +14,12 @@ if bool { } ~~~ # EXPECTED -UNDEFINED VARIABLE - if_then_else_9.md:1:4:1:8 +NIL # PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `bool` in this scope. +Is there an `import` or `exposing` missing up-top? + **INVALID IF CONDITION** This `if` condition needs to be a _Bool_: **if_then_else_9.md:3:11:** diff --git a/src/snapshots/if_then_else/if_then_else_comments_block.md b/src/snapshots/if_then_else/if_then_else_comments_block.md index 598d522549..0099fb70b8 100644 --- a/src/snapshots/if_then_else/if_then_else_comments_block.md +++ b/src/snapshots/if_then_else/if_then_else_comments_block.md @@ -14,9 +14,12 @@ if # Comment after if } ~~~ # EXPECTED -UNDEFINED VARIABLE - if_then_else_comments_block.md:2:2:2:6 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `bool` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig KwIf(1:1-1:3),Newline(1:5-1:22), diff --git a/src/snapshots/if_then_else/if_then_else_comments_complex.md b/src/snapshots/if_then_else/if_then_else_comments_complex.md index b9b7128bdd..84dbcac1b9 100644 --- a/src/snapshots/if_then_else/if_then_else_comments_complex.md +++ b/src/snapshots/if_then_else/if_then_else_comments_complex.md @@ -16,9 +16,12 @@ if # Comment after if } ~~~ # EXPECTED -UNDEFINED VARIABLE - if_then_else_comments_complex.md:2:2:2:6 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `bool` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig KwIf(1:1-1:3),Newline(1:5-1:22), diff --git a/src/snapshots/if_then_else/if_then_else_multi_comments.md b/src/snapshots/if_then_else/if_then_else_multi_comments.md index 0874153000..3c04e0c13e 100644 --- a/src/snapshots/if_then_else/if_then_else_multi_comments.md +++ b/src/snapshots/if_then_else/if_then_else_multi_comments.md @@ -14,9 +14,12 @@ if # Comment after if } ~~~ # EXPECTED -UNDEFINED VARIABLE - if_then_else_multi_comments.md:2:2:2:6 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `bool` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig KwIf(1:1-1:3),Newline(1:5-1:22), diff --git a/src/snapshots/if_then_else/if_then_else_simple_block_formatting.md b/src/snapshots/if_then_else/if_then_else_simple_block_formatting.md index 384c05c5b0..a59a5dcc8d 100644 --- a/src/snapshots/if_then_else/if_then_else_simple_block_formatting.md +++ b/src/snapshots/if_then_else/if_then_else_simple_block_formatting.md @@ -10,8 +10,12 @@ if bool { } else 2 ~~~ # EXPECTED -UNDEFINED VARIABLE - if_then_else_simple_block_formatting.md:1:4:1:8 +NIL # PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `bool` in this scope. +Is there an `import` or `exposing` missing up-top? + **INCOMPATIBLE IF BRANCHES** This `if` has an `else` branch with a different type from it's `then` branch: **if_then_else_simple_block_formatting.md:1:1:** diff --git a/src/snapshots/if_then_else/if_then_else_simple_comments_formatting.md b/src/snapshots/if_then_else/if_then_else_simple_comments_formatting.md index 91225129bf..9125b66a3d 100644 --- a/src/snapshots/if_then_else/if_then_else_simple_comments_formatting.md +++ b/src/snapshots/if_then_else/if_then_else_simple_comments_formatting.md @@ -10,9 +10,12 @@ if bool { # Comment after then open } else B ~~~ # EXPECTED -UNDEFINED VARIABLE - if_then_else_simple_comments_formatting.md:1:4:1:8 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `bool` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig KwIf(1:1-1:3),LowerIdent(1:4-1:8),OpenCurly(1:9-1:10),Newline(1:12-1:36), diff --git a/src/snapshots/if_then_else/if_then_else_simple_file.md b/src/snapshots/if_then_else/if_then_else_simple_file.md index 4118ebee95..755e130838 100644 --- a/src/snapshots/if_then_else/if_then_else_simple_file.md +++ b/src/snapshots/if_then_else/if_then_else_simple_file.md @@ -14,9 +14,8 @@ foo = if 1 A } ~~~ # EXPECTED -no_else - if_then_else_simple_file.md:1:1:1:1 +PARSE ERROR - if_then_else_simple_file.md:1:1:1:1 UNEXPECTED TOKEN IN EXPRESSION - if_then_else_simple_file.md:5:5:5:11 -expr_not_canonicalized - if_then_else_simple_file.md:1:1:1:1 # PROBLEMS **PARSE ERROR** A parsing error occurred: `no_else` @@ -42,6 +41,18 @@ Here is the problematic code: ^^^^^^ +**UNKNOWN OPERATOR** +This looks like an operator, but it's not one I recognize! +Check the spelling and make sure you're using a valid Roc operator. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + # TOKENS ~~~zig KwModule(1:1-1:7),OpenSquare(1:8-1:9),LowerIdent(1:9-1:12),CloseSquare(1:12-1:13),Newline(1:1-1:1), diff --git a/src/snapshots/if_then_else/if_then_else_simple_minimal.md b/src/snapshots/if_then_else/if_then_else_simple_minimal.md index 040b7d1079..96de84eaeb 100644 --- a/src/snapshots/if_then_else/if_then_else_simple_minimal.md +++ b/src/snapshots/if_then_else/if_then_else_simple_minimal.md @@ -8,9 +8,12 @@ type=expr if bool 1 else 2 ~~~ # EXPECTED -UNDEFINED VARIABLE - if_then_else_simple_minimal.md:1:4:1:8 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `bool` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig KwIf(1:1-1:3),LowerIdent(1:4-1:8),Int(1:9-1:10),KwElse(1:11-1:15),Int(1:16-1:17),EndOfFile(1:17-1:17), diff --git a/src/snapshots/lambda_parameter_unused.md b/src/snapshots/lambda_parameter_unused.md index 294f25fbbc..7a2ed4c1fa 100644 --- a/src/snapshots/lambda_parameter_unused.md +++ b/src/snapshots/lambda_parameter_unused.md @@ -33,9 +33,32 @@ main! = |_| { ~~~ # EXPECTED UNUSED VARIABLE - lambda_parameter_unused.md:5:8:5:14 -used_underscore_variable - lambda_parameter_unused.md:9:22:9:29 +UNDERSCORE VARIABLE USED - lambda_parameter_unused.md:9:22:9:29 # PROBLEMS -NIL +**UNUSED VARIABLE** +Variable ``unused`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_unused` to suppress this warning. +The unused variable is declared here: +**lambda_parameter_unused.md:5:8:5:14:** +```roc +add = |unused| 42 +``` + ^^^^^^ + + +**UNDERSCORE VARIABLE USED** +Variable ``_factor`` is prefixed with an underscore but is actually used. + +Variables prefixed with `_` are intended to be unused. Remove the underscore prefix: `factor`. +The underscore variable is declared here: +**lambda_parameter_unused.md:9:22:9:29:** +```roc +multiply = |_factor| _factor * 2 +``` + ^^^^^^^ + + # TOKENS ~~~zig KwApp(1:1-1:4),OpenSquare(1:5-1:6),LowerIdent(1:6-1:11),CloseSquare(1:11-1:12),OpenCurly(1:13-1:14),LowerIdent(1:15-1:17),OpColon(1:17-1:18),KwPlatform(1:19-1:27),StringStart(1:28-1:29),StringPart(1:29-1:50),StringEnd(1:50-1:51),CloseCurly(1:52-1:53),Newline(1:1-1:1), diff --git a/src/snapshots/match_expr/basic_tag_union.md b/src/snapshots/match_expr/basic_tag_union.md index f63a783084..cb0a21ec04 100644 --- a/src/snapshots/match_expr/basic_tag_union.md +++ b/src/snapshots/match_expr/basic_tag_union.md @@ -12,8 +12,12 @@ match color { } ~~~ # EXPECTED -UNDEFINED VARIABLE - basic_tag_union.md:1:7:1:12 +NIL # PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `color` in this scope. +Is there an `import` or `exposing` missing up-top? + **INCOMPATIBLE MATCH BRANCHES** The third branch's type in this `match` is different from the previous ones: **basic_tag_union.md:1:1:** diff --git a/src/snapshots/match_expr/boolean_patterns.md b/src/snapshots/match_expr/boolean_patterns.md index 3e1fc2a46a..cd534f91dc 100644 --- a/src/snapshots/match_expr/boolean_patterns.md +++ b/src/snapshots/match_expr/boolean_patterns.md @@ -11,9 +11,12 @@ match isReady { } ~~~ # EXPECTED -UNDEFINED VARIABLE - boolean_patterns.md:1:7:1:14 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `isReady` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig KwMatch(1:1-1:6),LowerIdent(1:7-1:14),OpenCurly(1:15-1:16),Newline(1:1-1:1), diff --git a/src/snapshots/match_expr/branch_scoping.md b/src/snapshots/match_expr/branch_scoping.md index 4a3e6ad05a..4a1908369b 100644 --- a/src/snapshots/match_expr/branch_scoping.md +++ b/src/snapshots/match_expr/branch_scoping.md @@ -13,9 +13,12 @@ match result { } ~~~ # EXPECTED -UNDEFINED VARIABLE - branch_scoping.md:1:7:1:13 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `result` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig KwMatch(1:1-1:6),LowerIdent(1:7-1:13),OpenCurly(1:14-1:15),Newline(1:1-1:1), diff --git a/src/snapshots/match_expr/complex_list_tags.md b/src/snapshots/match_expr/complex_list_tags.md index 23b4ec0479..4880fdbbac 100644 --- a/src/snapshots/match_expr/complex_list_tags.md +++ b/src/snapshots/match_expr/complex_list_tags.md @@ -15,17 +15,19 @@ match events { } ~~~ # EXPECTED -string_expected_close_interpolation - complex_list_tags.md:3:22:3:40 +PARSE ERROR - complex_list_tags.md:3:22:3:40 UNEXPECTED TOKEN IN PATTERN - complex_list_tags.md:3:53:3:56 UNEXPECTED TOKEN IN EXPRESSION - complex_list_tags.md:3:54:3:58 UNEXPECTED TOKEN IN PATTERN - complex_list_tags.md:3:56:3:61 UNEXPECTED TOKEN IN EXPRESSION - complex_list_tags.md:3:69:3:71 UNEXPECTED TOKEN IN PATTERN - complex_list_tags.md:3:70:3:72 -string_expected_close_interpolation - complex_list_tags.md:4:36:4:41 +UNEXPECTED TOKEN IN EXPRESSION - complex_list_tags.md:3:71:3:71 +PARSE ERROR - complex_list_tags.md:4:36:4:41 UNEXPECTED TOKEN IN PATTERN - complex_list_tags.md:4:83:4:85 UNEXPECTED TOKEN IN EXPRESSION - complex_list_tags.md:4:84:4:97 UNEXPECTED TOKEN IN PATTERN - complex_list_tags.md:4:85:4:98 -string_expected_close_interpolation - complex_list_tags.md:5:53:5:60 +UNEXPECTED TOKEN IN EXPRESSION - complex_list_tags.md:4:97:4:97 +PARSE ERROR - complex_list_tags.md:5:53:5:60 UNEXPECTED TOKEN IN PATTERN - complex_list_tags.md:5:74:5:76 UNEXPECTED TOKEN IN EXPRESSION - complex_list_tags.md:5:75:5:78 UNEXPECTED TOKEN IN PATTERN - complex_list_tags.md:5:76:5:81 @@ -37,7 +39,8 @@ UNEXPECTED TOKEN IN EXPRESSION - complex_list_tags.md:5:113:5:116 UNEXPECTED TOKEN IN PATTERN - complex_list_tags.md:5:114:5:119 UNEXPECTED TOKEN IN EXPRESSION - complex_list_tags.md:5:129:5:130 UNEXPECTED TOKEN IN PATTERN - complex_list_tags.md:5:130:5:131 -string_expected_close_interpolation - complex_list_tags.md:6:55:6:63 +UNEXPECTED TOKEN IN EXPRESSION - complex_list_tags.md:5:130:5:130 +PARSE ERROR - complex_list_tags.md:6:55:6:63 UNEXPECTED TOKEN IN PATTERN - complex_list_tags.md:6:81:6:97 UNEXPECTED TOKEN IN EXPRESSION - complex_list_tags.md:6:82:6:99 UNEXPECTED TOKEN IN PATTERN - complex_list_tags.md:6:97:6:102 @@ -46,52 +49,28 @@ UNEXPECTED TOKEN IN PATTERN - complex_list_tags.md:6:111:6:114 UNEXPECTED TOKEN IN EXPRESSION - complex_list_tags.md:6:112:6:117 UNEXPECTED TOKEN IN PATTERN - complex_list_tags.md:6:125:6:126 UNEXPECTED TOKEN IN EXPRESSION - complex_list_tags.md:6:126:6:127 +UNEXPECTED TOKEN IN PATTERN - complex_list_tags.md:6:126:6:126 UNEXPECTED TOKEN IN EXPRESSION - complex_list_tags.md:1:1:7:6 -UNDEFINED VARIABLE - complex_list_tags.md:1:7:1:13 -expr_not_canonicalized - complex_list_tags.md:3:22:3:54 -UNUSED VARIABLE - complex_list_tags.md:3:15:3:16 +UNDEFINED VARIABLE - complex_list_tags.md:3:15:3:16 UNUSED VARIABLE - complex_list_tags.md:3:12:3:13 -expr_not_canonicalized - complex_list_tags.md:3:54:3:58 -UNDEFINED VARIABLE - complex_list_tags.md:3:58:3:67 -expr_not_canonicalized - complex_list_tags.md:3:69:3:71 -UNUSED VARIABLE - complex_list_tags.md:3:68:3:69 -expr_not_canonicalized - complex_list_tags.md:4:36:4:74 -UNUSED VARIABLE - complex_list_tags.md:4:15:4:18 +INVALID PATTERN - complex_list_tags.md:3:68:3:69 +INVALID PATTERN - complex_list_tags.md:4:15:4:18 UNUSED VARIABLE - complex_list_tags.md:4:27:4:31 -UNDEFINED VARIABLE - complex_list_tags.md:4:79:4:83 -UNUSED VARIABLE - complex_list_tags.md:4:70:4:78 -expr_not_canonicalized - complex_list_tags.md:4:84:4:97 -expr_not_canonicalized - complex_list_tags.md:5:53:5:75 -UNUSED VARIABLE - complex_list_tags.md:5:42:5:48 +UNDEFINED VARIABLE - complex_list_tags.md:4:70:4:78 +INVALID PATTERN - complex_list_tags.md:5:42:5:48 UNUSED VARIABLE - complex_list_tags.md:5:30:5:33 UNUSED VARIABLE - complex_list_tags.md:5:25:5:28 UNUSED VARIABLE - complex_list_tags.md:5:11:5:13 UNUSED VARIABLE - complex_list_tags.md:5:15:5:17 -expr_not_canonicalized - complex_list_tags.md:5:75:5:78 -UNDEFINED VARIABLE - complex_list_tags.md:5:78:5:87 -expr_not_canonicalized - complex_list_tags.md:5:90:5:97 -UNUSED VARIABLE - complex_list_tags.md:5:88:5:90 -expr_not_canonicalized - complex_list_tags.md:5:97:5:102 -UNDEFINED VARIABLE - complex_list_tags.md:5:109:5:112 -UNUSED VARIABLE - complex_list_tags.md:5:99:5:108 -expr_not_canonicalized - complex_list_tags.md:5:113:5:116 -UNDEFINED VARIABLE - complex_list_tags.md:5:116:5:125 -expr_not_canonicalized - complex_list_tags.md:5:129:5:130 -UNUSED VARIABLE - complex_list_tags.md:5:126:5:129 -expr_not_canonicalized - complex_list_tags.md:6:55:6:82 -UNUSED VARIABLE - complex_list_tags.md:6:41:6:50 +INVALID PATTERN - complex_list_tags.md:5:88:5:90 +INVALID PATTERN - complex_list_tags.md:5:99:5:108 +INVALID PATTERN - complex_list_tags.md:5:126:5:129 +INVALID PATTERN - complex_list_tags.md:6:41:6:50 UNUSED VARIABLE - complex_list_tags.md:6:13:6:19 UNUSED VARIABLE - complex_list_tags.md:6:31:6:32 UNUSED VARIABLE - complex_list_tags.md:6:28:6:29 -expr_not_canonicalized - complex_list_tags.md:6:82:6:99 -UNDEFINED VARIABLE - complex_list_tags.md:6:99:6:108 -expr_not_canonicalized - complex_list_tags.md:6:110:6:112 -UNUSED VARIABLE - complex_list_tags.md:6:109:6:110 -expr_not_canonicalized - complex_list_tags.md:6:112:6:117 -UNDEFINED VARIABLE - complex_list_tags.md:6:124:6:125 -UNUSED VARIABLE - complex_list_tags.md:6:114:6:123 -expr_not_canonicalized - complex_list_tags.md:6:126:6:127 -expr_not_canonicalized - complex_list_tags.md:1:1:7:6 +INVALID PATTERN - complex_list_tags.md:6:109:6:110 +INVALID PATTERN - complex_list_tags.md:6:114:6:123 # PROBLEMS **PARSE ERROR** A parsing error occurred: `string_expected_close_interpolation` @@ -536,6 +515,406 @@ match events { ``` +**UNDEFINED VARIABLE** +Nothing is named `events` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNKNOWN OPERATOR** +This looks like an operator, but it's not one I recognize! +Check the spelling and make sure you're using a valid Roc operator. + +**UNUSED VARIABLE** +Variable ``y`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_y` to suppress this warning. +The unused variable is declared here: +**complex_list_tags.md:3:15:3:16:** +```roc + [Click(x, y)] => "single click at (${Num.toStr x}, ${Num.toStr y})" +``` + ^ + + +**UNUSED VARIABLE** +Variable ``x`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_x` to suppress this warning. +The unused variable is declared here: +**complex_list_tags.md:3:12:3:13:** +```roc + [Click(x, y)] => "single click at (${Num.toStr x}, ${Num.toStr y})" +``` + ^ + + +**INVALID PATTERN** +This pattern contains invalid syntax or uses unsupported features. + +**UNKNOWN OPERATOR** +This looks like an operator, but it's not one I recognize! +Check the spelling and make sure you're using a valid Roc operator. + +**INVALID PATTERN** +This pattern contains invalid syntax or uses unsupported features. + +**UNDEFINED VARIABLE** +Nothing is named `toStr` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNKNOWN OPERATOR** +This looks like an operator, but it's not one I recognize! +Check the spelling and make sure you're using a valid Roc operator. + +**UNUSED VARIABLE** +Variable ``y`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_y` to suppress this warning. +The unused variable is declared here: +**complex_list_tags.md:3:68:3:69:** +```roc + [Click(x, y)] => "single click at (${Num.toStr x}, ${Num.toStr y})" +``` + ^ + + +**INVALID PATTERN** +This pattern contains invalid syntax or uses unsupported features. + +**UNKNOWN OPERATOR** +This looks like an operator, but it's not one I recognize! +Check the spelling and make sure you're using a valid Roc operator. + +**UNKNOWN OPERATOR** +This looks like an operator, but it's not one I recognize! +Check the spelling and make sure you're using a valid Roc operator. + +**UNUSED VARIABLE** +Variable ``key`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_key` to suppress this warning. +The unused variable is declared here: +**complex_list_tags.md:4:15:4:18:** +```roc + [KeyPress(key), .. as rest] => "key ${key} pressed, ${Num.toStr (List.len rest)} more events" +``` + ^^^ + + +**UNUSED VARIABLE** +Variable ``rest`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_rest` to suppress this warning. +The unused variable is declared here: +**complex_list_tags.md:4:27:4:31:** +```roc + [KeyPress(key), .. as rest] => "key ${key} pressed, ${Num.toStr (List.len rest)} more events" +``` + ^^^^ + + +**UNDEFINED VARIABLE** +Nothing is named `rest` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNUSED VARIABLE** +Variable ``len`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_len` to suppress this warning. +The unused variable is declared here: +**complex_list_tags.md:4:70:4:78:** +```roc + [KeyPress(key), .. as rest] => "key ${key} pressed, ${Num.toStr (List.len rest)} more events" +``` + ^^^^^^^^ + + +**INVALID PATTERN** +This pattern contains invalid syntax or uses unsupported features. + +**UNKNOWN OPERATOR** +This looks like an operator, but it's not one I recognize! +Check the spelling and make sure you're using a valid Roc operator. + +**INVALID PATTERN** +This pattern contains invalid syntax or uses unsupported features. + +**UNKNOWN OPERATOR** +This looks like an operator, but it's not one I recognize! +Check the spelling and make sure you're using a valid Roc operator. + +**UNKNOWN OPERATOR** +This looks like an operator, but it's not one I recognize! +Check the spelling and make sure you're using a valid Roc operator. + +**UNUSED VARIABLE** +Variable ``others`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_others` to suppress this warning. +The unused variable is declared here: +**complex_list_tags.md:5:42:5:48:** +```roc + [Move(dx, dy), Move(dx2, dy2), .. as others] => "moved ${Num.toStr dx},${Num.toStr dy} then ${Num.toStr dx2},${Num.toStr dy2}" +``` + ^^^^^^ + + +**UNUSED VARIABLE** +Variable ``dy2`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_dy2` to suppress this warning. +The unused variable is declared here: +**complex_list_tags.md:5:30:5:33:** +```roc + [Move(dx, dy), Move(dx2, dy2), .. as others] => "moved ${Num.toStr dx},${Num.toStr dy} then ${Num.toStr dx2},${Num.toStr dy2}" +``` + ^^^ + + +**UNUSED VARIABLE** +Variable ``dx2`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_dx2` to suppress this warning. +The unused variable is declared here: +**complex_list_tags.md:5:25:5:28:** +```roc + [Move(dx, dy), Move(dx2, dy2), .. as others] => "moved ${Num.toStr dx},${Num.toStr dy} then ${Num.toStr dx2},${Num.toStr dy2}" +``` + ^^^ + + +**UNUSED VARIABLE** +Variable ``dx`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_dx` to suppress this warning. +The unused variable is declared here: +**complex_list_tags.md:5:11:5:13:** +```roc + [Move(dx, dy), Move(dx2, dy2), .. as others] => "moved ${Num.toStr dx},${Num.toStr dy} then ${Num.toStr dx2},${Num.toStr dy2}" +``` + ^^ + + +**UNUSED VARIABLE** +Variable ``dy`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_dy` to suppress this warning. +The unused variable is declared here: +**complex_list_tags.md:5:15:5:17:** +```roc + [Move(dx, dy), Move(dx2, dy2), .. as others] => "moved ${Num.toStr dx},${Num.toStr dy} then ${Num.toStr dx2},${Num.toStr dy2}" +``` + ^^ + + +**INVALID PATTERN** +This pattern contains invalid syntax or uses unsupported features. + +**UNKNOWN OPERATOR** +This looks like an operator, but it's not one I recognize! +Check the spelling and make sure you're using a valid Roc operator. + +**INVALID PATTERN** +This pattern contains invalid syntax or uses unsupported features. + +**UNDEFINED VARIABLE** +Nothing is named `toStr` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNKNOWN OPERATOR** +This looks like an operator, but it's not one I recognize! +Check the spelling and make sure you're using a valid Roc operator. + +**UNUSED VARIABLE** +Variable ``dy`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_dy` to suppress this warning. +The unused variable is declared here: +**complex_list_tags.md:5:88:5:90:** +```roc + [Move(dx, dy), Move(dx2, dy2), .. as others] => "moved ${Num.toStr dx},${Num.toStr dy} then ${Num.toStr dx2},${Num.toStr dy2}" +``` + ^^ + + +**INVALID PATTERN** +This pattern contains invalid syntax or uses unsupported features. + +**UNKNOWN OPERATOR** +This looks like an operator, but it's not one I recognize! +Check the spelling and make sure you're using a valid Roc operator. + +**UNDEFINED VARIABLE** +Nothing is named `dx2` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNUSED VARIABLE** +Variable ``toStr`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_toStr` to suppress this warning. +The unused variable is declared here: +**complex_list_tags.md:5:99:5:108:** +```roc + [Move(dx, dy), Move(dx2, dy2), .. as others] => "moved ${Num.toStr dx},${Num.toStr dy} then ${Num.toStr dx2},${Num.toStr dy2}" +``` + ^^^^^^^^^ + + +**INVALID PATTERN** +This pattern contains invalid syntax or uses unsupported features. + +**UNKNOWN OPERATOR** +This looks like an operator, but it's not one I recognize! +Check the spelling and make sure you're using a valid Roc operator. + +**INVALID PATTERN** +This pattern contains invalid syntax or uses unsupported features. + +**UNDEFINED VARIABLE** +Nothing is named `toStr` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNKNOWN OPERATOR** +This looks like an operator, but it's not one I recognize! +Check the spelling and make sure you're using a valid Roc operator. + +**UNUSED VARIABLE** +Variable ``dy2`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_dy2` to suppress this warning. +The unused variable is declared here: +**complex_list_tags.md:5:126:5:129:** +```roc + [Move(dx, dy), Move(dx2, dy2), .. as others] => "moved ${Num.toStr dx},${Num.toStr dy} then ${Num.toStr dx2},${Num.toStr dy2}" +``` + ^^^ + + +**INVALID PATTERN** +This pattern contains invalid syntax or uses unsupported features. + +**UNKNOWN OPERATOR** +This looks like an operator, but it's not one I recognize! +Check the spelling and make sure you're using a valid Roc operator. + +**UNKNOWN OPERATOR** +This looks like an operator, but it's not one I recognize! +Check the spelling and make sure you're using a valid Roc operator. + +**UNUSED VARIABLE** +Variable ``remaining`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_remaining` to suppress this warning. +The unused variable is declared here: +**complex_list_tags.md:6:41:6:50:** +```roc + [Scroll(amount), Click(x, y), .. as remaining] => "scroll ${Num.toStr amount} then click at ${Num.toStr x},${Num.toStr y}" +``` + ^^^^^^^^^ + + +**UNUSED VARIABLE** +Variable ``amount`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_amount` to suppress this warning. +The unused variable is declared here: +**complex_list_tags.md:6:13:6:19:** +```roc + [Scroll(amount), Click(x, y), .. as remaining] => "scroll ${Num.toStr amount} then click at ${Num.toStr x},${Num.toStr y}" +``` + ^^^^^^ + + +**UNUSED VARIABLE** +Variable ``y`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_y` to suppress this warning. +The unused variable is declared here: +**complex_list_tags.md:6:31:6:32:** +```roc + [Scroll(amount), Click(x, y), .. as remaining] => "scroll ${Num.toStr amount} then click at ${Num.toStr x},${Num.toStr y}" +``` + ^ + + +**UNUSED VARIABLE** +Variable ``x`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_x` to suppress this warning. +The unused variable is declared here: +**complex_list_tags.md:6:28:6:29:** +```roc + [Scroll(amount), Click(x, y), .. as remaining] => "scroll ${Num.toStr amount} then click at ${Num.toStr x},${Num.toStr y}" +``` + ^ + + +**INVALID PATTERN** +This pattern contains invalid syntax or uses unsupported features. + +**UNKNOWN OPERATOR** +This looks like an operator, but it's not one I recognize! +Check the spelling and make sure you're using a valid Roc operator. + +**INVALID PATTERN** +This pattern contains invalid syntax or uses unsupported features. + +**UNDEFINED VARIABLE** +Nothing is named `toStr` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNKNOWN OPERATOR** +This looks like an operator, but it's not one I recognize! +Check the spelling and make sure you're using a valid Roc operator. + +**UNUSED VARIABLE** +Variable ``x`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_x` to suppress this warning. +The unused variable is declared here: +**complex_list_tags.md:6:109:6:110:** +```roc + [Scroll(amount), Click(x, y), .. as remaining] => "scroll ${Num.toStr amount} then click at ${Num.toStr x},${Num.toStr y}" +``` + ^ + + +**INVALID PATTERN** +This pattern contains invalid syntax or uses unsupported features. + +**UNKNOWN OPERATOR** +This looks like an operator, but it's not one I recognize! +Check the spelling and make sure you're using a valid Roc operator. + +**UNDEFINED VARIABLE** +Nothing is named `y` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNUSED VARIABLE** +Variable ``toStr`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_toStr` to suppress this warning. +The unused variable is declared here: +**complex_list_tags.md:6:114:6:123:** +```roc + [Scroll(amount), Click(x, y), .. as remaining] => "scroll ${Num.toStr amount} then click at ${Num.toStr x},${Num.toStr y}" +``` + ^^^^^^^^^ + + +**INVALID PATTERN** +This pattern contains invalid syntax or uses unsupported features. + +**UNKNOWN OPERATOR** +This looks like an operator, but it's not one I recognize! +Check the spelling and make sure you're using a valid Roc operator. + +**INVALID PATTERN** +This pattern contains invalid syntax or uses unsupported features. + +**UNKNOWN OPERATOR** +This looks like an operator, but it's not one I recognize! +Check the spelling and make sure you're using a valid Roc operator. + # TOKENS ~~~zig KwMatch(1:1-1:6),LowerIdent(1:7-1:13),OpenCurly(1:14-1:15),Newline(1:1-1:1), diff --git a/src/snapshots/match_expr/f64_pattern_literal_error.md b/src/snapshots/match_expr/f64_pattern_literal_error.md index 7b4ed3b7e4..b682f46006 100644 --- a/src/snapshots/match_expr/f64_pattern_literal_error.md +++ b/src/snapshots/match_expr/f64_pattern_literal_error.md @@ -14,8 +14,7 @@ match x { # EXPECTED UNEXPECTED TOKEN IN PATTERN - f64_pattern_literal_error.md:2:5:2:15 UNEXPECTED TOKEN IN PATTERN - f64_pattern_literal_error.md:3:5:3:14 -UNDEFINED VARIABLE - f64_pattern_literal_error.md:1:7:1:8 -UNUSED VARIABLE - f64_pattern_literal_error.md:4:5:4:10 +UNDEFINED VARIABLE - f64_pattern_literal_error.md:4:5:4:10 # PROBLEMS **UNEXPECTED TOKEN IN PATTERN** The token **3.14f64 =>** is not expected in a pattern. @@ -41,6 +40,28 @@ Here is the problematic code: ^^^^^^^^^ +**UNDEFINED VARIABLE** +Nothing is named `x` in this scope. +Is there an `import` or `exposing` missing up-top? + +**INVALID PATTERN** +This pattern contains invalid syntax or uses unsupported features. + +**INVALID PATTERN** +This pattern contains invalid syntax or uses unsupported features. + +**UNUSED VARIABLE** +Variable ``value`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_value` to suppress this warning. +The unused variable is declared here: +**f64_pattern_literal_error.md:4:5:4:10:** +```roc + value => "other" +``` + ^^^^^ + + # TOKENS ~~~zig KwMatch(1:1-1:6),LowerIdent(1:7-1:8),OpenCurly(1:9-1:10),Newline(1:1-1:1), diff --git a/src/snapshots/match_expr/guards_1.md b/src/snapshots/match_expr/guards_1.md index f7483d79ba..a27ea49144 100644 --- a/src/snapshots/match_expr/guards_1.md +++ b/src/snapshots/match_expr/guards_1.md @@ -13,34 +13,25 @@ match value { ~~~ # EXPECTED UNEXPECTED TOKEN IN EXPRESSION - guards_1.md:2:16:2:20 -no_else - guards_1.md:2:19:2:30 +PARSE ERROR - guards_1.md:2:19:2:30 UNEXPECTED TOKEN IN PATTERN - guards_1.md:2:20:2:32 UNEXPECTED TOKEN IN EXPRESSION - guards_1.md:2:30:2:35 UNEXPECTED TOKEN IN PATTERN - guards_1.md:2:43:2:44 UNEXPECTED TOKEN IN EXPRESSION - guards_1.md:2:44:2:45 +UNEXPECTED TOKEN IN PATTERN - guards_1.md:2:44:2:44 UNEXPECTED TOKEN IN EXPRESSION - guards_1.md:1:1:3:6 UNEXPECTED TOKEN IN EXPRESSION - guards_1.md:3:16:3:20 -no_else - guards_1.md:3:19:3:30 +PARSE ERROR - guards_1.md:3:19:3:30 UNEXPECTED TOKEN IN PATTERN - guards_1.md:3:20:3:32 UNEXPECTED TOKEN IN EXPRESSION - guards_1.md:3:30:3:35 UNEXPECTED TOKEN IN PATTERN - guards_1.md:3:43:3:44 UNEXPECTED TOKEN IN EXPRESSION - guards_1.md:3:44:3:45 +UNEXPECTED TOKEN IN PATTERN - guards_1.md:3:44:3:44 UNEXPECTED TOKEN IN EXPRESSION - guards_1.md:1:1:4:6 -UNDEFINED VARIABLE - guards_1.md:1:7:1:12 -expr_not_canonicalized - guards_1.md:2:19:2:30 -UNUSED VARIABLE - guards_1.md:2:5:2:6 -expr_not_canonicalized - guards_1.md:2:30:2:35 -UNDEFINED VARIABLE - guards_1.md:2:42:2:43 -UNUSED VARIABLE - guards_1.md:2:32:2:41 -expr_not_canonicalized - guards_1.md:2:44:2:45 -expr_not_canonicalized - guards_1.md:1:1:3:6 -expr_not_canonicalized - guards_1.md:3:19:3:30 -UNUSED VARIABLE - guards_1.md:3:5:3:6 -expr_not_canonicalized - guards_1.md:3:30:3:35 -UNDEFINED VARIABLE - guards_1.md:3:42:3:43 -UNUSED VARIABLE - guards_1.md:3:32:3:41 -expr_not_canonicalized - guards_1.md:3:44:3:45 -expr_not_canonicalized - guards_1.md:1:1:4:6 +UNDEFINED VARIABLE - guards_1.md:2:5:2:6 +INVALID PATTERN - guards_1.md:2:32:2:41 +INVALID PATTERN - guards_1.md:3:5:3:6 +INVALID PATTERN - guards_1.md:3:32:3:41 # PROBLEMS **UNEXPECTED TOKEN IN EXPRESSION** The token **=> "** is not expected in an expression. @@ -242,6 +233,116 @@ match value { ``` +**UNDEFINED VARIABLE** +Nothing is named `value` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNKNOWN OPERATOR** +This looks like an operator, but it's not one I recognize! +Check the spelling and make sure you're using a valid Roc operator. + +**UNUSED VARIABLE** +Variable ``x`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_x` to suppress this warning. +The unused variable is declared here: +**guards_1.md:2:5:2:6:** +```roc + x if x > 0 => "positive: ${Num.toStr x}" +``` + ^ + + +**INVALID PATTERN** +This pattern contains invalid syntax or uses unsupported features. + +**UNKNOWN OPERATOR** +This looks like an operator, but it's not one I recognize! +Check the spelling and make sure you're using a valid Roc operator. + +**UNDEFINED VARIABLE** +Nothing is named `x` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNUSED VARIABLE** +Variable ``toStr`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_toStr` to suppress this warning. +The unused variable is declared here: +**guards_1.md:2:32:2:41:** +```roc + x if x > 0 => "positive: ${Num.toStr x}" +``` + ^^^^^^^^^ + + +**INVALID PATTERN** +This pattern contains invalid syntax or uses unsupported features. + +**UNKNOWN OPERATOR** +This looks like an operator, but it's not one I recognize! +Check the spelling and make sure you're using a valid Roc operator. + +**INVALID PATTERN** +This pattern contains invalid syntax or uses unsupported features. + +**UNKNOWN OPERATOR** +This looks like an operator, but it's not one I recognize! +Check the spelling and make sure you're using a valid Roc operator. + +**UNKNOWN OPERATOR** +This looks like an operator, but it's not one I recognize! +Check the spelling and make sure you're using a valid Roc operator. + +**UNUSED VARIABLE** +Variable ``x`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_x` to suppress this warning. +The unused variable is declared here: +**guards_1.md:3:5:3:6:** +```roc + x if x < 0 => "negative: ${Num.toStr x}" +``` + ^ + + +**INVALID PATTERN** +This pattern contains invalid syntax or uses unsupported features. + +**UNKNOWN OPERATOR** +This looks like an operator, but it's not one I recognize! +Check the spelling and make sure you're using a valid Roc operator. + +**UNDEFINED VARIABLE** +Nothing is named `x` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNUSED VARIABLE** +Variable ``toStr`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_toStr` to suppress this warning. +The unused variable is declared here: +**guards_1.md:3:32:3:41:** +```roc + x if x < 0 => "negative: ${Num.toStr x}" +``` + ^^^^^^^^^ + + +**INVALID PATTERN** +This pattern contains invalid syntax or uses unsupported features. + +**UNKNOWN OPERATOR** +This looks like an operator, but it's not one I recognize! +Check the spelling and make sure you're using a valid Roc operator. + +**INVALID PATTERN** +This pattern contains invalid syntax or uses unsupported features. + +**UNKNOWN OPERATOR** +This looks like an operator, but it's not one I recognize! +Check the spelling and make sure you're using a valid Roc operator. + # TOKENS ~~~zig KwMatch(1:1-1:6),LowerIdent(1:7-1:12),OpenCurly(1:13-1:14),Newline(1:1-1:1), diff --git a/src/snapshots/match_expr/guards_2.md b/src/snapshots/match_expr/guards_2.md index e1d068796c..357e709ef7 100644 --- a/src/snapshots/match_expr/guards_2.md +++ b/src/snapshots/match_expr/guards_2.md @@ -13,36 +13,27 @@ match value { ~~~ # EXPECTED UNEXPECTED TOKEN IN EXPRESSION - guards_2.md:2:47:2:51 -no_else - guards_2.md:2:50:2:75 +PARSE ERROR - guards_2.md:2:50:2:75 UNEXPECTED TOKEN IN PATTERN - guards_2.md:2:51:2:77 UNEXPECTED TOKEN IN EXPRESSION - guards_2.md:2:75:2:80 UNEXPECTED TOKEN IN PATTERN - guards_2.md:2:92:2:93 UNEXPECTED TOKEN IN EXPRESSION - guards_2.md:2:93:2:94 +UNEXPECTED TOKEN IN PATTERN - guards_2.md:2:93:2:93 UNEXPECTED TOKEN IN EXPRESSION - guards_2.md:1:1:3:6 UNEXPECTED TOKEN IN EXPRESSION - guards_2.md:3:22:3:26 -no_else - guards_2.md:3:25:3:48 +PARSE ERROR - guards_2.md:3:25:3:48 UNEXPECTED TOKEN IN PATTERN - guards_2.md:3:26:3:50 UNEXPECTED TOKEN IN EXPRESSION - guards_2.md:3:48:3:53 UNEXPECTED TOKEN IN PATTERN - guards_2.md:3:61:3:62 UNEXPECTED TOKEN IN EXPRESSION - guards_2.md:3:62:3:63 +UNEXPECTED TOKEN IN PATTERN - guards_2.md:3:62:3:62 UNEXPECTED TOKEN IN EXPRESSION - guards_2.md:1:1:4:6 -UNDEFINED VARIABLE - guards_2.md:1:7:1:12 -expr_not_canonicalized - guards_2.md:2:50:2:75 -UNUSED VARIABLE - guards_2.md:2:6:2:11 +UNDEFINED VARIABLE - guards_2.md:2:6:2:11 UNUSED VARIABLE - guards_2.md:2:19:2:23 -expr_not_canonicalized - guards_2.md:2:75:2:80 -UNDEFINED VARIABLE - guards_2.md:2:87:2:92 -UNUSED VARIABLE - guards_2.md:2:77:2:86 -expr_not_canonicalized - guards_2.md:2:93:2:94 -expr_not_canonicalized - guards_2.md:1:1:3:6 -expr_not_canonicalized - guards_2.md:3:25:3:48 -UNUSED VARIABLE - guards_2.md:3:6:3:7 +INVALID PATTERN - guards_2.md:2:77:2:86 +INVALID PATTERN - guards_2.md:3:6:3:7 UNUSED VARIABLE - guards_2.md:3:9:3:10 -expr_not_canonicalized - guards_2.md:3:48:3:53 -UNDEFINED VARIABLE - guards_2.md:3:60:3:61 -UNUSED VARIABLE - guards_2.md:3:50:3:59 -expr_not_canonicalized - guards_2.md:3:62:3:63 -expr_not_canonicalized - guards_2.md:1:1:4:6 +INVALID PATTERN - guards_2.md:3:50:3:59 # PROBLEMS **UNEXPECTED TOKEN IN EXPRESSION** The token **=> "** is not expected in an expression. @@ -244,6 +235,140 @@ match value { ``` +**UNDEFINED VARIABLE** +Nothing is named `value` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNKNOWN OPERATOR** +This looks like an operator, but it's not one I recognize! +Check the spelling and make sure you're using a valid Roc operator. + +**UNUSED VARIABLE** +Variable ``first`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_first` to suppress this warning. +The unused variable is declared here: +**guards_2.md:2:6:2:11:** +```roc + [first, .. as rest] if List.len(rest) > 5 => "long list starting with ${Num.toStr first}" +``` + ^^^^^ + + +**UNUSED VARIABLE** +Variable ``rest`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_rest` to suppress this warning. +The unused variable is declared here: +**guards_2.md:2:19:2:23:** +```roc + [first, .. as rest] if List.len(rest) > 5 => "long list starting with ${Num.toStr first}" +``` + ^^^^ + + +**INVALID PATTERN** +This pattern contains invalid syntax or uses unsupported features. + +**UNKNOWN OPERATOR** +This looks like an operator, but it's not one I recognize! +Check the spelling and make sure you're using a valid Roc operator. + +**UNDEFINED VARIABLE** +Nothing is named `first` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNUSED VARIABLE** +Variable ``toStr`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_toStr` to suppress this warning. +The unused variable is declared here: +**guards_2.md:2:77:2:86:** +```roc + [first, .. as rest] if List.len(rest) > 5 => "long list starting with ${Num.toStr first}" +``` + ^^^^^^^^^ + + +**INVALID PATTERN** +This pattern contains invalid syntax or uses unsupported features. + +**UNKNOWN OPERATOR** +This looks like an operator, but it's not one I recognize! +Check the spelling and make sure you're using a valid Roc operator. + +**INVALID PATTERN** +This pattern contains invalid syntax or uses unsupported features. + +**UNKNOWN OPERATOR** +This looks like an operator, but it's not one I recognize! +Check the spelling and make sure you're using a valid Roc operator. + +**UNKNOWN OPERATOR** +This looks like an operator, but it's not one I recognize! +Check the spelling and make sure you're using a valid Roc operator. + +**UNUSED VARIABLE** +Variable ``x`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_x` to suppress this warning. +The unused variable is declared here: +**guards_2.md:3:6:3:7:** +```roc + [x, y] if x == y => "pair of equal values: ${Num.toStr x}" +``` + ^ + + +**UNUSED VARIABLE** +Variable ``y`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_y` to suppress this warning. +The unused variable is declared here: +**guards_2.md:3:9:3:10:** +```roc + [x, y] if x == y => "pair of equal values: ${Num.toStr x}" +``` + ^ + + +**INVALID PATTERN** +This pattern contains invalid syntax or uses unsupported features. + +**UNKNOWN OPERATOR** +This looks like an operator, but it's not one I recognize! +Check the spelling and make sure you're using a valid Roc operator. + +**UNDEFINED VARIABLE** +Nothing is named `x` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNUSED VARIABLE** +Variable ``toStr`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_toStr` to suppress this warning. +The unused variable is declared here: +**guards_2.md:3:50:3:59:** +```roc + [x, y] if x == y => "pair of equal values: ${Num.toStr x}" +``` + ^^^^^^^^^ + + +**INVALID PATTERN** +This pattern contains invalid syntax or uses unsupported features. + +**UNKNOWN OPERATOR** +This looks like an operator, but it's not one I recognize! +Check the spelling and make sure you're using a valid Roc operator. + +**INVALID PATTERN** +This pattern contains invalid syntax or uses unsupported features. + +**UNKNOWN OPERATOR** +This looks like an operator, but it's not one I recognize! +Check the spelling and make sure you're using a valid Roc operator. + # TOKENS ~~~zig KwMatch(1:1-1:6),LowerIdent(1:7-1:12),OpenCurly(1:13-1:14),Newline(1:1-1:1), diff --git a/src/snapshots/match_expr/list_destructure_scoping.md b/src/snapshots/match_expr/list_destructure_scoping.md index 20973fa380..61f1338dd4 100644 --- a/src/snapshots/match_expr/list_destructure_scoping.md +++ b/src/snapshots/match_expr/list_destructure_scoping.md @@ -11,9 +11,12 @@ match list { } ~~~ # EXPECTED -UNDEFINED VARIABLE - list_destructure_scoping.md:1:7:1:11 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `list` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig KwMatch(1:1-1:6),LowerIdent(1:7-1:11),OpenCurly(1:12-1:13),Newline(1:1-1:1), diff --git a/src/snapshots/match_expr/list_destructure_variations.md b/src/snapshots/match_expr/list_destructure_variations.md index abc3afa55a..7bec6bda11 100644 --- a/src/snapshots/match_expr/list_destructure_variations.md +++ b/src/snapshots/match_expr/list_destructure_variations.md @@ -15,12 +15,50 @@ match list { } ~~~ # EXPECTED -UNDEFINED VARIABLE - list_destructure_variations.md:1:7:1:11 -UNUSED VARIABLE - list_destructure_variations.md:5:18:5:22 +UNDEFINED VARIABLE - list_destructure_variations.md:5:18:5:22 UNUSED VARIABLE - list_destructure_variations.md:6:22:6:26 UNUSED VARIABLE - list_destructure_variations.md:7:21:7:25 # PROBLEMS -NIL +**UNDEFINED VARIABLE** +Nothing is named `list` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNUSED VARIABLE** +Variable ``tail`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_tail` to suppress this warning. +The unused variable is declared here: +**list_destructure_variations.md:5:18:5:22:** +```roc + [head, .. as tail] => head +``` + ^^^^ + + +**UNUSED VARIABLE** +Variable ``rest`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_rest` to suppress this warning. +The unused variable is declared here: +**list_destructure_variations.md:6:22:6:26:** +```roc + [One, Two, .. as rest] => 3 +``` + ^^^^ + + +**UNUSED VARIABLE** +Variable ``more`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_more` to suppress this warning. +The unused variable is declared here: +**list_destructure_variations.md:7:21:7:25:** +```roc + [x, y, z, .. as more] => x + y + z +``` + ^^^^ + + # TOKENS ~~~zig KwMatch(1:1-1:6),LowerIdent(1:7-1:11),OpenCurly(1:12-1:13),Newline(1:1-1:1), diff --git a/src/snapshots/match_expr/list_mixed_literals.md b/src/snapshots/match_expr/list_mixed_literals.md index 1611f384c6..7dc01ff82e 100644 --- a/src/snapshots/match_expr/list_mixed_literals.md +++ b/src/snapshots/match_expr/list_mixed_literals.md @@ -14,9 +14,12 @@ match sequence { } ~~~ # EXPECTED -UNDEFINED VARIABLE - list_mixed_literals.md:1:7:1:15 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `sequence` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig KwMatch(1:1-1:6),LowerIdent(1:7-1:15),OpenCurly(1:16-1:17),Newline(1:1-1:1), diff --git a/src/snapshots/match_expr/list_patterns.md b/src/snapshots/match_expr/list_patterns.md index a039c1ebff..5cff8636da 100644 --- a/src/snapshots/match_expr/list_patterns.md +++ b/src/snapshots/match_expr/list_patterns.md @@ -11,10 +11,8 @@ match numbers { } ~~~ # EXPECTED -pattern_list_rest_old_syntax - list_patterns.md:3:13:3:19 -UNDEFINED VARIABLE - list_patterns.md:1:7:1:14 -UNDEFINED VARIABLE - list_patterns.md:2:11:2:14 -UNUSED VARIABLE - list_patterns.md:3:15:3:19 +BAD LIST REST PATTERN SYNTAX - list_patterns.md:3:13:3:19 +UNDEFINED VARIABLE - list_patterns.md:3:15:3:19 UNUSED VARIABLE - list_patterns.md:3:6:3:11 # PROBLEMS **BAD LIST REST PATTERN SYNTAX** @@ -29,6 +27,38 @@ Here is the problematic code: ^^^^^^ +**UNDEFINED VARIABLE** +Nothing is named `numbers` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `acc` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNUSED VARIABLE** +Variable ``rest`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_rest` to suppress this warning. +The unused variable is declared here: +**list_patterns.md:3:15:3:19:** +```roc + [first, ..rest] => 0 # invalid rest pattern should error +``` + ^^^^ + + +**UNUSED VARIABLE** +Variable ``first`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_first` to suppress this warning. +The unused variable is declared here: +**list_patterns.md:3:6:3:11:** +```roc + [first, ..rest] => 0 # invalid rest pattern should error +``` + ^^^^^ + + # TOKENS ~~~zig KwMatch(1:1-1:6),LowerIdent(1:7-1:14),OpenCurly(1:15-1:16),Newline(1:1-1:1), diff --git a/src/snapshots/match_expr/list_patterns_err_multiple_rest.md b/src/snapshots/match_expr/list_patterns_err_multiple_rest.md index 6cc93f266d..1ea97d697e 100644 --- a/src/snapshots/match_expr/list_patterns_err_multiple_rest.md +++ b/src/snapshots/match_expr/list_patterns_err_multiple_rest.md @@ -10,11 +10,31 @@ match numbers { } ~~~ # EXPECTED -UNDEFINED VARIABLE - list_patterns_err_multiple_rest.md:1:7:1:14 -not_implemented - list_patterns_err_multiple_rest.md:2:25:2:28 -UNUSED VARIABLE - list_patterns_err_multiple_rest.md:2:10:2:16 +UNDEFINED VARIABLE - list_patterns_err_multiple_rest.md:2:10:2:16 # PROBLEMS -NIL +**UNDEFINED VARIABLE** +Nothing is named `numbers` in this scope. +Is there an `import` or `exposing` missing up-top? + +**INVALID PATTERN** +This pattern contains invalid syntax or uses unsupported features. + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: ... +Let us know if you want to help! + +**UNUSED VARIABLE** +Variable ``middle`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_middle` to suppress this warning. +The unused variable is declared here: +**list_patterns_err_multiple_rest.md:2:10:2:16:** +```roc + [.., middle, ..] => ... # error, multiple rest patterns not allowed +``` + ^^^^^^ + + # TOKENS ~~~zig KwMatch(1:1-1:6),LowerIdent(1:7-1:14),OpenCurly(1:15-1:16),Newline(1:1-1:1), diff --git a/src/snapshots/match_expr/list_rest_invalid.md b/src/snapshots/match_expr/list_rest_invalid.md index 8b395bd553..e5ad945858 100644 --- a/src/snapshots/match_expr/list_rest_invalid.md +++ b/src/snapshots/match_expr/list_rest_invalid.md @@ -12,11 +12,10 @@ match items { } ~~~ # EXPECTED -pattern_list_rest_old_syntax - list_rest_invalid.md:2:13:2:19 -pattern_list_rest_old_syntax - list_rest_invalid.md:3:6:3:12 -pattern_list_rest_old_syntax - list_rest_invalid.md:4:9:4:15 -UNDEFINED VARIABLE - list_rest_invalid.md:1:7:1:12 -UNUSED VARIABLE - list_rest_invalid.md:2:6:2:11 +BAD LIST REST PATTERN SYNTAX - list_rest_invalid.md:2:13:2:19 +BAD LIST REST PATTERN SYNTAX - list_rest_invalid.md:3:6:3:12 +BAD LIST REST PATTERN SYNTAX - list_rest_invalid.md:4:9:4:15 +UNDEFINED VARIABLE - list_rest_invalid.md:2:6:2:11 UNUSED VARIABLE - list_rest_invalid.md:2:15:2:19 UNUSED VARIABLE - list_rest_invalid.md:3:8:3:12 UNUSED VARIABLE - list_rest_invalid.md:3:14:3:18 @@ -60,6 +59,94 @@ Here is the problematic code: ^^^^^^ +**UNDEFINED VARIABLE** +Nothing is named `items` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNUSED VARIABLE** +Variable ``first`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_first` to suppress this warning. +The unused variable is declared here: +**list_rest_invalid.md:2:6:2:11:** +```roc + [first, ..rest] => 0 # invalid rest pattern should error +``` + ^^^^^ + + +**UNUSED VARIABLE** +Variable ``rest`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_rest` to suppress this warning. +The unused variable is declared here: +**list_rest_invalid.md:2:15:2:19:** +```roc + [first, ..rest] => 0 # invalid rest pattern should error +``` + ^^^^ + + +**UNUSED VARIABLE** +Variable ``rest`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_rest` to suppress this warning. +The unused variable is declared here: +**list_rest_invalid.md:3:8:3:12:** +```roc + [..rest, last] => 1 # invalid rest pattern should error +``` + ^^^^ + + +**UNUSED VARIABLE** +Variable ``last`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_last` to suppress this warning. +The unused variable is declared here: +**list_rest_invalid.md:3:14:3:18:** +```roc + [..rest, last] => 1 # invalid rest pattern should error +``` + ^^^^ + + +**UNUSED VARIABLE** +Variable ``rest`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_rest` to suppress this warning. +The unused variable is declared here: +**list_rest_invalid.md:4:11:4:15:** +```roc + [x, ..rest, y] => 2 # invalid rest pattern should error +``` + ^^^^ + + +**UNUSED VARIABLE** +Variable ``x`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_x` to suppress this warning. +The unused variable is declared here: +**list_rest_invalid.md:4:6:4:7:** +```roc + [x, ..rest, y] => 2 # invalid rest pattern should error +``` + ^ + + +**UNUSED VARIABLE** +Variable ``y`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_y` to suppress this warning. +The unused variable is declared here: +**list_rest_invalid.md:4:17:4:18:** +```roc + [x, ..rest, y] => 2 # invalid rest pattern should error +``` + ^ + + # TOKENS ~~~zig KwMatch(1:1-1:6),LowerIdent(1:7-1:12),OpenCurly(1:13-1:14),Newline(1:1-1:1), diff --git a/src/snapshots/match_expr/list_rest_scoping.md b/src/snapshots/match_expr/list_rest_scoping.md index 3bbbc6f2ee..0013f6c8de 100644 --- a/src/snapshots/match_expr/list_rest_scoping.md +++ b/src/snapshots/match_expr/list_rest_scoping.md @@ -12,11 +12,10 @@ match items { } ~~~ # EXPECTED -pattern_list_rest_old_syntax - list_rest_scoping.md:2:13:2:19 -pattern_list_rest_old_syntax - list_rest_scoping.md:3:6:3:12 -pattern_list_rest_old_syntax - list_rest_scoping.md:4:9:4:15 -UNDEFINED VARIABLE - list_rest_scoping.md:1:7:1:12 -UNUSED VARIABLE - list_rest_scoping.md:2:15:2:19 +BAD LIST REST PATTERN SYNTAX - list_rest_scoping.md:2:13:2:19 +BAD LIST REST PATTERN SYNTAX - list_rest_scoping.md:3:6:3:12 +BAD LIST REST PATTERN SYNTAX - list_rest_scoping.md:4:9:4:15 +UNDEFINED VARIABLE - list_rest_scoping.md:2:15:2:19 UNUSED VARIABLE - list_rest_scoping.md:3:8:3:12 UNUSED VARIABLE - list_rest_scoping.md:4:11:4:15 # PROBLEMS @@ -56,6 +55,46 @@ Here is the problematic code: ^^^^^^ +**UNDEFINED VARIABLE** +Nothing is named `items` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNUSED VARIABLE** +Variable ``rest`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_rest` to suppress this warning. +The unused variable is declared here: +**list_rest_scoping.md:2:15:2:19:** +```roc + [first, ..rest] => first + 1 +``` + ^^^^ + + +**UNUSED VARIABLE** +Variable ``rest`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_rest` to suppress this warning. +The unused variable is declared here: +**list_rest_scoping.md:3:8:3:12:** +```roc + [..rest, last] => last + 2 +``` + ^^^^ + + +**UNUSED VARIABLE** +Variable ``rest`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_rest` to suppress this warning. +The unused variable is declared here: +**list_rest_scoping.md:4:11:4:15:** +```roc + [x, ..rest, y] => x + y +``` + ^^^^ + + # TOKENS ~~~zig KwMatch(1:1-1:6),LowerIdent(1:7-1:12),OpenCurly(1:13-1:14),Newline(1:1-1:1), diff --git a/src/snapshots/match_expr/list_rest_scoping_variables.md b/src/snapshots/match_expr/list_rest_scoping_variables.md index bca2247237..e096fb5cd5 100644 --- a/src/snapshots/match_expr/list_rest_scoping_variables.md +++ b/src/snapshots/match_expr/list_rest_scoping_variables.md @@ -13,12 +13,11 @@ match data { } ~~~ # EXPECTED -pattern_list_rest_old_syntax - list_rest_scoping_variables.md:2:6:2:13 -pattern_list_rest_old_syntax - list_rest_scoping_variables.md:3:13:3:20 -pattern_list_rest_old_syntax - list_rest_scoping_variables.md:4:6:4:13 -pattern_list_rest_old_syntax - list_rest_scoping_variables.md:5:13:5:20 -UNDEFINED VARIABLE - list_rest_scoping_variables.md:1:7:1:11 -UNUSED VARIABLE - list_rest_scoping_variables.md:2:8:2:13 +BAD LIST REST PATTERN SYNTAX - list_rest_scoping_variables.md:2:6:2:13 +BAD LIST REST PATTERN SYNTAX - list_rest_scoping_variables.md:3:13:3:20 +BAD LIST REST PATTERN SYNTAX - list_rest_scoping_variables.md:4:6:4:13 +BAD LIST REST PATTERN SYNTAX - list_rest_scoping_variables.md:5:13:5:20 +UNDEFINED VARIABLE - list_rest_scoping_variables.md:2:8:2:13 UNUSED VARIABLE - list_rest_scoping_variables.md:3:15:3:20 UNUSED VARIABLE - list_rest_scoping_variables.md:4:8:4:13 UNUSED VARIABLE - list_rest_scoping_variables.md:5:15:5:20 @@ -71,6 +70,58 @@ Here is the problematic code: ^^^^^^^ +**UNDEFINED VARIABLE** +Nothing is named `data` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNUSED VARIABLE** +Variable ``items`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_items` to suppress this warning. +The unused variable is declared here: +**list_rest_scoping_variables.md:2:8:2:13:** +```roc + [..items] => 1 +``` + ^^^^^ + + +**UNUSED VARIABLE** +Variable ``items`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_items` to suppress this warning. +The unused variable is declared here: +**list_rest_scoping_variables.md:3:15:3:20:** +```roc + [first, ..items] => first +``` + ^^^^^ + + +**UNUSED VARIABLE** +Variable ``items`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_items` to suppress this warning. +The unused variable is declared here: +**list_rest_scoping_variables.md:4:8:4:13:** +```roc + [..items, last] => last +``` + ^^^^^ + + +**UNUSED VARIABLE** +Variable ``items`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_items` to suppress this warning. +The unused variable is declared here: +**list_rest_scoping_variables.md:5:15:5:20:** +```roc + [first, ..items, last] => first + last +``` + ^^^^^ + + # TOKENS ~~~zig KwMatch(1:1-1:6),LowerIdent(1:7-1:11),OpenCurly(1:12-1:13),Newline(1:1-1:1), diff --git a/src/snapshots/match_expr/list_underscore_patterns.md b/src/snapshots/match_expr/list_underscore_patterns.md index 86fa224561..c35ca09ee9 100644 --- a/src/snapshots/match_expr/list_underscore_patterns.md +++ b/src/snapshots/match_expr/list_underscore_patterns.md @@ -15,9 +15,12 @@ match items { } ~~~ # EXPECTED -UNDEFINED VARIABLE - list_underscore_patterns.md:1:7:1:12 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `items` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig KwMatch(1:1-1:6),LowerIdent(1:7-1:12),OpenCurly(1:13-1:14),Newline(1:1-1:1), diff --git a/src/snapshots/match_expr/middle_rest.md b/src/snapshots/match_expr/middle_rest.md index e491091937..1c058739e7 100644 --- a/src/snapshots/match_expr/middle_rest.md +++ b/src/snapshots/match_expr/middle_rest.md @@ -13,10 +13,24 @@ match items { } ~~~ # EXPECTED -UNDEFINED VARIABLE - middle_rest.md:1:7:1:12 -UNUSED VARIABLE - middle_rest.md:3:18:3:24 +UNDEFINED VARIABLE - middle_rest.md:3:18:3:24 # PROBLEMS -NIL +**UNDEFINED VARIABLE** +Nothing is named `items` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNUSED VARIABLE** +Variable ``middle`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_middle` to suppress this warning. +The unused variable is declared here: +**middle_rest.md:3:18:3:24:** +```roc + [a, b, .. as middle, x, y] => a + b + x + y +``` + ^^^^^^ + + # TOKENS ~~~zig KwMatch(1:1-1:6),LowerIdent(1:7-1:12),OpenCurly(1:13-1:14),Newline(1:1-1:1), diff --git a/src/snapshots/match_expr/mixed_pattern_scoping.md b/src/snapshots/match_expr/mixed_pattern_scoping.md index e8d72fb857..b5a57af980 100644 --- a/src/snapshots/match_expr/mixed_pattern_scoping.md +++ b/src/snapshots/match_expr/mixed_pattern_scoping.md @@ -13,9 +13,12 @@ match data { } ~~~ # EXPECTED -UNDEFINED VARIABLE - mixed_pattern_scoping.md:1:7:1:11 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `data` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig KwMatch(1:1-1:6),LowerIdent(1:7-1:11),OpenCurly(1:12-1:13),Newline(1:1-1:1), diff --git a/src/snapshots/match_expr/multi_pattern_branch.md b/src/snapshots/match_expr/multi_pattern_branch.md index ed264bd287..861e4ec202 100644 --- a/src/snapshots/match_expr/multi_pattern_branch.md +++ b/src/snapshots/match_expr/multi_pattern_branch.md @@ -12,10 +12,16 @@ match color { } ~~~ # EXPECTED -UNDEFINED VARIABLE - multi_pattern_branch.md:1:7:1:12 -not_implemented - multi_pattern_branch.md:1:1:1:1 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `color` in this scope. +Is there an `import` or `exposing` missing up-top? + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: canonicalize alternatives pattern +Let us know if you want to help! + # TOKENS ~~~zig KwMatch(1:1-1:6),LowerIdent(1:7-1:12),OpenCurly(1:13-1:14),Newline(1:1-1:1), diff --git a/src/snapshots/match_expr/nested_list_scoping.md b/src/snapshots/match_expr/nested_list_scoping.md index 4b7b426198..4ea8117c25 100644 --- a/src/snapshots/match_expr/nested_list_scoping.md +++ b/src/snapshots/match_expr/nested_list_scoping.md @@ -12,9 +12,12 @@ match nestedList { } ~~~ # EXPECTED -UNDEFINED VARIABLE - nested_list_scoping.md:1:7:1:17 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `nestedList` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig KwMatch(1:1-1:6),LowerIdent(1:7-1:17),OpenCurly(1:18-1:19),Newline(1:1-1:1), diff --git a/src/snapshots/match_expr/nested_patterns.md b/src/snapshots/match_expr/nested_patterns.md index f3c6fc27d1..db62a8a4ed 100644 --- a/src/snapshots/match_expr/nested_patterns.md +++ b/src/snapshots/match_expr/nested_patterns.md @@ -13,14 +13,32 @@ match data { } ~~~ # EXPECTED -UNDEFINED VARIABLE - nested_patterns.md:1:7:1:11 -not_implemented - nested_patterns.md:2:17:2:48 -UNDEFINED VARIABLE - nested_patterns.md:2:53:2:54 -UNDEFINED VARIABLE - nested_patterns.md:2:57:2:65 -UNDEFINED VARIABLE - nested_patterns.md:2:66:2:70 -not_implemented - nested_patterns.md:3:17:3:28 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `data` in this scope. +Is there an `import` or `exposing` missing up-top? + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: record pattern with sub-patterns +Let us know if you want to help! + +**UNDEFINED VARIABLE** +Nothing is named `x` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `len` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `rest` in this scope. +Is there an `import` or `exposing` missing up-top? + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: record pattern with sub-patterns +Let us know if you want to help! + # TOKENS ~~~zig KwMatch(1:1-1:6),LowerIdent(1:7-1:11),OpenCurly(1:12-1:13),Newline(1:1-1:1), diff --git a/src/snapshots/match_expr/record_destructure.md b/src/snapshots/match_expr/record_destructure.md index 49e55add45..8364efceed 100644 --- a/src/snapshots/match_expr/record_destructure.md +++ b/src/snapshots/match_expr/record_destructure.md @@ -12,13 +12,45 @@ match person { } ~~~ # EXPECTED -UNDEFINED VARIABLE - record_destructure.md:1:7:1:13 -UNUSED VARIABLE - record_destructure.md:2:13:2:18 -not_implemented - record_destructure.md:3:13:3:32 -UNDEFINED VARIABLE - record_destructure.md:3:36:3:40 -UNUSED VARIABLE - record_destructure.md:3:7:3:12 +UNDEFINED VARIABLE - record_destructure.md:2:13:2:18 +NOT IMPLEMENTED - record_destructure.md:3:7:3:12 # PROBLEMS -NIL +**UNDEFINED VARIABLE** +Nothing is named `person` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNUSED VARIABLE** +Variable ``age`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_age` to suppress this warning. +The unused variable is declared here: +**record_destructure.md:2:13:2:18:** +```roc + { name, age } => name +``` + ^^^^^ + + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: record pattern with sub-patterns +Let us know if you want to help! + +**UNDEFINED VARIABLE** +Nothing is named `city` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNUSED VARIABLE** +Variable ``name`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_name` to suppress this warning. +The unused variable is declared here: +**record_destructure.md:3:7:3:12:** +```roc + { name, address: { city } } => city +``` + ^^^^^ + + # TOKENS ~~~zig KwMatch(1:1-1:6),LowerIdent(1:7-1:13),OpenCurly(1:14-1:15),Newline(1:1-1:1), diff --git a/src/snapshots/match_expr/simple_record.md b/src/snapshots/match_expr/simple_record.md index cacf8a94b8..275d8d6372 100644 --- a/src/snapshots/match_expr/simple_record.md +++ b/src/snapshots/match_expr/simple_record.md @@ -11,9 +11,12 @@ match person { } ~~~ # EXPECTED -UNDEFINED VARIABLE - simple_record.md:1:7:1:13 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `person` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig KwMatch(1:1-1:6),LowerIdent(1:7-1:13),OpenCurly(1:14-1:15),Newline(1:1-1:1), diff --git a/src/snapshots/match_expr/single_branch.md b/src/snapshots/match_expr/single_branch.md index 51b9ae6631..e491cd3abf 100644 --- a/src/snapshots/match_expr/single_branch.md +++ b/src/snapshots/match_expr/single_branch.md @@ -10,9 +10,12 @@ match value { } ~~~ # EXPECTED -UNDEFINED VARIABLE - single_branch.md:1:7:1:12 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `value` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig KwMatch(1:1-1:6),LowerIdent(1:7-1:12),OpenCurly(1:13-1:14),Newline(1:1-1:1), diff --git a/src/snapshots/match_expr/tag_with_payload.md b/src/snapshots/match_expr/tag_with_payload.md index 7f7aae0f11..88e3db8225 100644 --- a/src/snapshots/match_expr/tag_with_payload.md +++ b/src/snapshots/match_expr/tag_with_payload.md @@ -12,9 +12,12 @@ match shape { } ~~~ # EXPECTED -UNDEFINED VARIABLE - tag_with_payload.md:1:7:1:12 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `shape` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig KwMatch(1:1-1:6),LowerIdent(1:7-1:12),OpenCurly(1:13-1:14),Newline(1:1-1:1), diff --git a/src/snapshots/match_expr/tuple_patterns.md b/src/snapshots/match_expr/tuple_patterns.md index 1c14f82920..f4d6576684 100644 --- a/src/snapshots/match_expr/tuple_patterns.md +++ b/src/snapshots/match_expr/tuple_patterns.md @@ -13,10 +13,24 @@ match coord { } ~~~ # EXPECTED -UNDEFINED VARIABLE - tuple_patterns.md:1:7:1:12 -UNUSED VARIABLE - tuple_patterns.md:5:9:5:10 +UNDEFINED VARIABLE - tuple_patterns.md:5:9:5:10 # PROBLEMS -NIL +**UNDEFINED VARIABLE** +Nothing is named `coord` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNUSED VARIABLE** +Variable ``y`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_y` to suppress this warning. +The unused variable is declared here: +**tuple_patterns.md:5:9:5:10:** +```roc + (x, y) => x +``` + ^ + + # TOKENS ~~~zig KwMatch(1:1-1:6),LowerIdent(1:7-1:12),OpenCurly(1:13-1:14),Newline(1:1-1:1), diff --git a/src/snapshots/match_expr/variable_shadowing.md b/src/snapshots/match_expr/variable_shadowing.md index 2aa936ebb6..06b260dc84 100644 --- a/src/snapshots/match_expr/variable_shadowing.md +++ b/src/snapshots/match_expr/variable_shadowing.md @@ -11,10 +11,16 @@ match (value, other) { } ~~~ # EXPECTED -UNDEFINED VARIABLE - variable_shadowing.md:1:8:1:13 -UNDEFINED VARIABLE - variable_shadowing.md:1:15:1:20 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `value` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `other` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig KwMatch(1:1-1:6),OpenRound(1:7-1:8),LowerIdent(1:8-1:13),Comma(1:13-1:14),LowerIdent(1:15-1:20),CloseRound(1:20-1:21),OpenCurly(1:22-1:23),Newline(1:1-1:1), diff --git a/src/snapshots/match_expr/wildcard_patterns.md b/src/snapshots/match_expr/wildcard_patterns.md index 049329270c..1676a946e9 100644 --- a/src/snapshots/match_expr/wildcard_patterns.md +++ b/src/snapshots/match_expr/wildcard_patterns.md @@ -12,10 +12,24 @@ match value { } ~~~ # EXPECTED -UNDEFINED VARIABLE - wildcard_patterns.md:1:7:1:12 -UNUSED VARIABLE - wildcard_patterns.md:4:5:4:10 +UNDEFINED VARIABLE - wildcard_patterns.md:4:5:4:10 # PROBLEMS -NIL +**UNDEFINED VARIABLE** +Nothing is named `value` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNUSED VARIABLE** +Variable ``other`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_other` to suppress this warning. +The unused variable is declared here: +**wildcard_patterns.md:4:5:4:10:** +```roc + other => "something else" +``` + ^^^^^ + + # TOKENS ~~~zig KwMatch(1:1-1:6),LowerIdent(1:7-1:12),OpenCurly(1:13-1:14),Newline(1:1-1:1), diff --git a/src/snapshots/multi_qualified_import.md b/src/snapshots/multi_qualified_import.md index 4e6b530304..6298897a73 100644 --- a/src/snapshots/multi_qualified_import.md +++ b/src/snapshots/multi_qualified_import.md @@ -27,18 +27,19 @@ UNEXPECTED TOKEN IN EXPRESSION - multi_qualified_import.md:9:15:9:25 UNEXPECTED TOKEN IN EXPRESSION - multi_qualified_import.md:9:20:9:33 UNEXPECTED TOKEN IN EXPRESSION - multi_qualified_import.md:9:25:9:36 UNEXPECTED TOKEN IN EXPRESSION - multi_qualified_import.md:9:34:9:40 +PARSE ERROR - multi_qualified_import.md:9:37:9:37 UNEXPECTED TOKEN IN EXPRESSION - multi_qualified_import.md:10:9:10:12 UNEXPECTED TOKEN IN EXPRESSION - multi_qualified_import.md:10:11:10:19 -expr_arrow_expects_ident - multi_qualified_import.md:10:23:10:34 +PARSE ERROR - multi_qualified_import.md:10:23:10:34 UNEXPECTED TOKEN IN EXPRESSION - multi_qualified_import.md:10:24:10:35 +UNEXPECTED TOKEN IN EXPRESSION - multi_qualified_import.md:10:34:10:34 UNEXPECTED TOKEN IN EXPRESSION - multi_qualified_import.md:13:12:13:22 UNEXPECTED TOKEN IN EXPRESSION - multi_qualified_import.md:13:17:13:34 +UNEXPECTED TOKEN IN EXPRESSION - multi_qualified_import.md:13:22:13:22 UNEXPECTED TOKEN IN EXPRESSION - multi_qualified_import.md:14:12:14:22 UNEXPECTED TOKEN IN EXPRESSION - multi_qualified_import.md:14:17:14:29 UNEXPECTED TOKEN IN EXPRESSION - multi_qualified_import.md:14:22:14:31 -UNDECLARED TYPE - multi_qualified_import.md:5:16:5:23 -UNDEFINED VARIABLE - multi_qualified_import.md:6:16:6:45 -UNDEFINED VARIABLE - multi_qualified_import.md:14:8:14:12 +INVALID STATEMENT - multi_qualified_import.md:5:16:5:23 # PROBLEMS **UNEXPECTED TOKEN IN EXPRESSION** The token **.Utf8 exposing** is not expected in an expression. @@ -268,6 +269,101 @@ data = json.Core.Utf8.encode "hello" ^^^^^^^^^ +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**UNDECLARED TYPE** +The type ``Encoder`` is not declared in this scope. + +This type is referenced here: +**multi_qualified_import.md:5:16:5:23:** +```roc +json_encoder : Encoder +``` + ^^^^^^^ + + +**UNDEFINED VARIABLE** +Nothing is named `defaultEncoder` in this scope. +Is there an `import` or `exposing` missing up-top? + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**UNDEFINED VARIABLE** +Nothing is named `json` in this scope. +Is there an `import` or `exposing` missing up-top? + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + # TOKENS ~~~zig KwModule(1:1-1:7),OpenSquare(1:8-1:9),LowerIdent(1:9-1:21),CloseSquare(1:21-1:22),Newline(1:1-1:1), diff --git a/src/snapshots/nominal/nominal_external_fully_qualified.md b/src/snapshots/nominal/nominal_external_fully_qualified.md index b6d79010b7..66e7f1cc1c 100644 --- a/src/snapshots/nominal/nominal_external_fully_qualified.md +++ b/src/snapshots/nominal/nominal_external_fully_qualified.md @@ -21,7 +21,29 @@ handleResult = |result| { UNDECLARED TYPE - nominal_external_fully_qualified.md:6:1:6:13 UNUSED VARIABLE - nominal_external_fully_qualified.md:9:41:9:45 # PROBLEMS -NIL +**UNDECLARED TYPE** +The type ``MyResultModule.MyResultType`` is not declared in this scope. + +This type is referenced here: +**nominal_external_fully_qualified.md:6:1:6:13:** +```roc +handleResult = |result| { +``` +^^^^^^^^^^^^ + + +**UNUSED VARIABLE** +Variable ``code`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_code` to suppress this warning. +The unused variable is declared here: +**nominal_external_fully_qualified.md:9:41:9:45:** +```roc + MyResultModule.MyResultType.Err(code) => "Error: $(code.toStr())" +``` + ^^^^ + + # TOKENS ~~~zig KwModule(1:1-1:7),OpenSquare(1:8-1:9),LowerIdent(1:9-1:21),CloseSquare(1:21-1:22),Newline(1:1-1:1), diff --git a/src/snapshots/nominal/nominal_import_long_package.md b/src/snapshots/nominal/nominal_import_long_package.md index 327b3457a3..c0fa7015f7 100644 --- a/src/snapshots/nominal/nominal_import_long_package.md +++ b/src/snapshots/nominal/nominal_import_long_package.md @@ -15,8 +15,8 @@ red = ... # not implemented # EXPECTED UNEXPECTED TOKEN IN EXPRESSION - nominal_import_long_package.md:3:21:3:36 UNEXPECTED TOKEN IN EXPRESSION - nominal_import_long_package.md:3:28:3:38 -UNDECLARED TYPE - nominal_import_long_package.md:5:7:5:9 -not_implemented - nominal_import_long_package.md:6:7:6:10 +LIST NOT CLOSED - nominal_import_long_package.md:3:51:3:51 +INVALID STATEMENT - nominal_import_long_package.md:5:7:5:9 # PROBLEMS **UNEXPECTED TOKEN IN EXPRESSION** The token **.Color exposing** is not expected in an expression. @@ -55,6 +55,33 @@ import design.Styles.Color exposing [Encoder as CE] +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**UNDECLARED TYPE** +The type ``CE`` is not declared in this scope. + +This type is referenced here: +**nominal_import_long_package.md:5:7:5:9:** +```roc +red : CE +``` + ^^ + + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: ... +Let us know if you want to help! + # TOKENS ~~~zig KwModule(1:1-1:7),OpenSquare(1:8-1:9),LowerIdent(1:9-1:12),CloseSquare(1:12-1:13),Newline(1:1-1:1), diff --git a/src/snapshots/nominal/nominal_import_wildcard.md b/src/snapshots/nominal/nominal_import_wildcard.md index 46bfc88e15..728bfb92f7 100644 --- a/src/snapshots/nominal/nominal_import_wildcard.md +++ b/src/snapshots/nominal/nominal_import_wildcard.md @@ -19,7 +19,8 @@ green : Color green = Green ~~~ # EXPECTED -UNDECLARED TYPE - nominal_import_wildcard.md:5:7:5:12 +UNEXPECTED TOKEN IN EXPRESSION - nominal_import_wildcard.md:3:13:3:13 +INVALID STATEMENT - nominal_import_wildcard.md:5:7:5:12 UNDECLARED TYPE - nominal_import_wildcard.md:8:8:8:13 UNDECLARED TYPE - nominal_import_wildcard.md:11:9:11:14 # PROBLEMS @@ -35,6 +36,43 @@ import Color.* +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**UNDECLARED TYPE** +The type ``Color`` is not declared in this scope. + +This type is referenced here: +**nominal_import_wildcard.md:5:7:5:12:** +```roc +red : Color +``` + ^^^^^ + + +**UNDECLARED TYPE** +The type ``Color`` is not declared in this scope. + +This type is referenced here: +**nominal_import_wildcard.md:8:8:8:13:** +```roc +blue : Color +``` + ^^^^^ + + +**UNDECLARED TYPE** +The type ``Color`` is not declared in this scope. + +This type is referenced here: +**nominal_import_wildcard.md:11:9:11:14:** +```roc +green : Color +``` + ^^^^^ + + # TOKENS ~~~zig KwModule(1:1-1:7),OpenSquare(1:8-1:9),LowerIdent(1:9-1:12),Comma(1:12-1:13),LowerIdent(1:14-1:19),Comma(1:19-1:20),LowerIdent(1:21-1:25),CloseSquare(1:25-1:26),Newline(1:1-1:1), diff --git a/src/snapshots/nominal/nominal_mixed_scope.md b/src/snapshots/nominal/nominal_mixed_scope.md index 5241ad3749..2b8269ec33 100644 --- a/src/snapshots/nominal/nominal_mixed_scope.md +++ b/src/snapshots/nominal/nominal_mixed_scope.md @@ -23,8 +23,7 @@ processColor = |color| { } ~~~ # EXPECTED -import_must_be_top_level - nominal_mixed_scope.md:9:5:9:17 -not_implemented - nominal_mixed_scope.md:1:1:1:1 +IMPORT MUST BE TOP LEVEL - nominal_mixed_scope.md:9:5:9:17 # PROBLEMS **IMPORT MUST BE TOP LEVEL** Import statements must appear at the top level of a module. @@ -38,6 +37,10 @@ Here is the problematic code: ^^^^^^^^^^^^ +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: statement type in block +Let us know if you want to help! + # TOKENS ~~~zig KwModule(1:1-1:7),OpenSquare(1:8-1:9),UpperIdent(1:9-1:20),Comma(1:20-1:21),LowerIdent(1:22-1:34),CloseSquare(1:34-1:35),Newline(1:1-1:1), diff --git a/src/snapshots/numbers.md b/src/snapshots/numbers.md index a3d7840462..6600bd2d44 100644 --- a/src/snapshots/numbers.md +++ b/src/snapshots/numbers.md @@ -20,9 +20,7 @@ type=expr ) ~~~ # EXPECTED -UppercaseBase - numbers.md:2:6:2:6 -UppercaseBase - numbers.md:4:6:4:6 -UppercaseBase - numbers.md:6:6:6:6 +NIL # PROBLEMS **UPPERCASE BASE** Number base prefixes must be lowercase (0x, 0o, 0b). diff --git a/src/snapshots/old_syntax/add_var_with_spaces.md b/src/snapshots/old_syntax/add_var_with_spaces.md index 403493e023..87054ecab5 100644 --- a/src/snapshots/old_syntax/add_var_with_spaces.md +++ b/src/snapshots/old_syntax/add_var_with_spaces.md @@ -8,9 +8,12 @@ type=expr x + 2 ~~~ # EXPECTED -UNDEFINED VARIABLE - add_var_with_spaces.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `x` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpPlus(1:3-1:4),Int(1:5-1:6),EndOfFile(1:6-1:6), diff --git a/src/snapshots/old_syntax/alias_or_opaque_fail.md b/src/snapshots/old_syntax/alias_or_opaque_fail.md index d880193619..bdff813501 100644 --- a/src/snapshots/old_syntax/alias_or_opaque_fail.md +++ b/src/snapshots/old_syntax/alias_or_opaque_fail.md @@ -10,7 +10,7 @@ type=expr ~~~ # EXPECTED UNEXPECTED TOKEN IN EXPRESSION - alias_or_opaque_fail.md:1:2:1:4 -expected_expr_close_round_or_comma - alias_or_opaque_fail.md:2:4:2:4 +PARSE ERROR - alias_or_opaque_fail.md:2:4:2:4 # PROBLEMS **UNEXPECTED TOKEN IN EXPRESSION** The token **@,** is not expected in an expression. diff --git a/src/snapshots/old_syntax/all_the_bangs.md b/src/snapshots/old_syntax/all_the_bangs.md index 5cd5158351..b8bf98f5a5 100644 --- a/src/snapshots/old_syntax/all_the_bangs.md +++ b/src/snapshots/old_syntax/all_the_bangs.md @@ -10,9 +10,12 @@ p .p!! ~~~ # EXPECTED -UNDEFINED VARIABLE - all_the_bangs.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `p` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/ann_closed_union.md b/src/snapshots/old_syntax/ann_closed_union.md index 6809aad378..1f1bc40b40 100644 --- a/src/snapshots/old_syntax/ann_closed_union.md +++ b/src/snapshots/old_syntax/ann_closed_union.md @@ -13,9 +13,9 @@ type=expr } ~~~ # EXPECTED -expected_ty_close_square_or_comma - ann_closed_union.md:2:26:2:32 -MALFORMED TYPE - ann_closed_union.md:2:26:2:32 -UNUSED VARIABLE - ann_closed_union.md:3:5:3:8 +PARSE ERROR - ann_closed_union.md:2:26:2:32 +UNEXPECTED TOKEN IN EXPRESSION - ann_closed_union.md:2:31:2:31 +MALFORMED TYPE - ann_closed_union.md:3:5:3:8 # PROBLEMS **PARSE ERROR** A parsing error occurred: `expected_ty_close_square_or_comma` @@ -41,6 +41,21 @@ Here is the problematic code: +**MALFORMED TYPE** +This type annotation is malformed or contains invalid syntax. + +**UNUSED VARIABLE** +Variable ``foo`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_foo` to suppress this warning. +The unused variable is declared here: +**ann_closed_union.md:3:5:3:8:** +```roc + foo = True +``` + ^^^ + + # TOKENS ~~~zig OpenCurly(1:1-1:2),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/ann_effectful_fn.md b/src/snapshots/old_syntax/ann_effectful_fn.md index 7efb0c8a84..c53a208d24 100644 --- a/src/snapshots/old_syntax/ann_effectful_fn.md +++ b/src/snapshots/old_syntax/ann_effectful_fn.md @@ -14,8 +14,12 @@ type=expr } ~~~ # EXPECTED -# PROBLEMS NIL +# PROBLEMS +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: crash statement +Let us know if you want to help! + # TOKENS ~~~zig OpenCurly(1:1-1:2),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/ann_parens_comments.md b/src/snapshots/old_syntax/ann_parens_comments.md index d40beac0e7..09c9c0e1fc 100644 --- a/src/snapshots/old_syntax/ann_parens_comments.md +++ b/src/snapshots/old_syntax/ann_parens_comments.md @@ -13,9 +13,12 @@ r h ~~~ # EXPECTED -UNDEFINED VARIABLE - ann_parens_comments.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `r` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpColon(1:2-1:3),NoSpaceOpenRound(1:3-1:4),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/ann_parens_where_implements_func.md b/src/snapshots/old_syntax/ann_parens_where_implements_func.md index fb93f85130..f5e59bf09d 100644 --- a/src/snapshots/old_syntax/ann_parens_where_implements_func.md +++ b/src/snapshots/old_syntax/ann_parens_where_implements_func.md @@ -12,9 +12,12 @@ implements K->Z) s ~~~ # EXPECTED -UNDEFINED VARIABLE - ann_parens_where_implements_func.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `x` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpColon(1:2-1:3),NoSpaceOpenRound(1:3-1:4),LowerIdent(1:4-1:5),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/ann_record_pat_with_comment.md b/src/snapshots/old_syntax/ann_record_pat_with_comment.md index 9d09acf039..67f11bba5b 100644 --- a/src/snapshots/old_syntax/ann_record_pat_with_comment.md +++ b/src/snapshots/old_syntax/ann_record_pat_with_comment.md @@ -10,9 +10,12 @@ type=expr o ~~~ # EXPECTED -UNDEFINED VARIABLE - ann_record_pat_with_comment.md:2:2:2:3 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `s` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig OpenCurly(1:1-1:2),LowerIdent(1:2-1:3),Newline(1:4-1:4), diff --git a/src/snapshots/old_syntax/ann_tag_union_newline_comment.md b/src/snapshots/old_syntax/ann_tag_union_newline_comment.md index cb47d203f3..802e324678 100644 --- a/src/snapshots/old_syntax/ann_tag_union_newline_comment.md +++ b/src/snapshots/old_syntax/ann_tag_union_newline_comment.md @@ -11,9 +11,12 @@ k: D ~~~ # EXPECTED -UNDEFINED VARIABLE - ann_tag_union_newline_comment.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `k` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpColon(1:2-1:3),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/annotated_record_destructure.md b/src/snapshots/old_syntax/annotated_record_destructure.md index a53bb60069..4b3c4be993 100644 --- a/src/snapshots/old_syntax/annotated_record_destructure.md +++ b/src/snapshots/old_syntax/annotated_record_destructure.md @@ -11,10 +11,16 @@ type=expr x ~~~ # EXPECTED -UNDEFINED VARIABLE - annotated_record_destructure.md:1:3:1:5 -UNDEFINED VARIABLE - annotated_record_destructure.md:1:6:1:9 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `x` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `y` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig OpenCurly(1:1-1:2),LowerIdent(1:3-1:4),Comma(1:4-1:5),LowerIdent(1:6-1:7),CloseCurly(1:8-1:9),OpColon(1:10-1:11),UpperIdent(1:12-1:15),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/annotated_tuple_destructure.md b/src/snapshots/old_syntax/annotated_tuple_destructure.md index a72cbb9e25..afeaac72fd 100644 --- a/src/snapshots/old_syntax/annotated_tuple_destructure.md +++ b/src/snapshots/old_syntax/annotated_tuple_destructure.md @@ -11,10 +11,16 @@ type=expr x ~~~ # EXPECTED -UNDEFINED VARIABLE - annotated_tuple_destructure.md:1:3:1:4 -UNDEFINED VARIABLE - annotated_tuple_destructure.md:1:6:1:7 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `x` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `y` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig OpenRound(1:1-1:2),LowerIdent(1:3-1:4),Comma(1:4-1:5),LowerIdent(1:6-1:7),CloseRound(1:8-1:9),OpColon(1:10-1:11),UpperIdent(1:12-1:15),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/annotation_comment_before_as.md b/src/snapshots/old_syntax/annotation_comment_before_as.md index 2abcd1f23f..702beaae3d 100644 --- a/src/snapshots/old_syntax/annotation_comment_before_as.md +++ b/src/snapshots/old_syntax/annotation_comment_before_as.md @@ -10,9 +10,12 @@ e:A# n ~~~ # EXPECTED -UNDEFINED VARIABLE - annotation_comment_before_as.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `e` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpColon(1:2-1:3),UpperIdent(1:3-1:4),Newline(1:5-1:5), diff --git a/src/snapshots/old_syntax/annotation_double_as.md b/src/snapshots/old_syntax/annotation_double_as.md index eb5497f6c3..beb07ea8a5 100644 --- a/src/snapshots/old_syntax/annotation_double_as.md +++ b/src/snapshots/old_syntax/annotation_double_as.md @@ -9,9 +9,12 @@ s:(e as A)as A s ~~~ # EXPECTED -UNDEFINED VARIABLE - annotation_double_as.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `s` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpColon(1:2-1:3),NoSpaceOpenRound(1:3-1:4),LowerIdent(1:4-1:5),KwAs(1:6-1:8),UpperIdent(1:9-1:10),CloseRound(1:10-1:11),KwAs(1:11-1:13),UpperIdent(1:14-1:15),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/annotation_tag_parens_comment.md b/src/snapshots/old_syntax/annotation_tag_parens_comment.md index 0df9e865d0..7409ff620d 100644 --- a/src/snapshots/old_syntax/annotation_tag_parens_comment.md +++ b/src/snapshots/old_syntax/annotation_tag_parens_comment.md @@ -10,9 +10,12 @@ g:[T(T# D ~~~ # EXPECTED -UNDEFINED VARIABLE - annotation_tag_parens_comment.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `g` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpColon(1:2-1:3),OpenSquare(1:3-1:4),UpperIdent(1:4-1:5),NoSpaceOpenRound(1:5-1:6),UpperIdent(1:6-1:7),Newline(1:8-1:8), diff --git a/src/snapshots/old_syntax/annotation_tuple_newline.md b/src/snapshots/old_syntax/annotation_tuple_newline.md index 23bb6c67d8..16817d0a3a 100644 --- a/src/snapshots/old_syntax/annotation_tuple_newline.md +++ b/src/snapshots/old_syntax/annotation_tuple_newline.md @@ -10,9 +10,12 @@ d:(J, 2 ~~~ # EXPECTED -UNDEFINED VARIABLE - annotation_tuple_newline.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `d` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpColon(1:2-1:3),NoSpaceOpenRound(1:3-1:4),UpperIdent(1:4-1:5),Comma(1:5-1:6),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/annotation_tuple_parens_newlines.md b/src/snapshots/old_syntax/annotation_tuple_parens_newlines.md index a0989b77b0..a5a91e4b54 100644 --- a/src/snapshots/old_syntax/annotation_tuple_parens_newlines.md +++ b/src/snapshots/old_syntax/annotation_tuple_parens_newlines.md @@ -11,9 +11,12 @@ i) {} ~~~ # EXPECTED -UNDEFINED VARIABLE - annotation_tuple_parens_newlines.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `p` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpColon(1:2-1:3),NoSpaceOpenRound(1:3-1:4),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/applies_in_binop.md b/src/snapshots/old_syntax/applies_in_binop.md index 49c4e80a02..73761fab38 100644 --- a/src/snapshots/old_syntax/applies_in_binop.md +++ b/src/snapshots/old_syntax/applies_in_binop.md @@ -10,9 +10,12 @@ Str.getUnsafe haystack haystackIndex Str.getUnsafe needle needleIndex ~~~ # EXPECTED -UNDEFINED VARIABLE - applies_in_binop.md:1:1:1:14 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `getUnsafe` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig UpperIdent(1:1-1:4),NoSpaceDotLowerIdent(1:4-1:14),LowerIdent(1:15-1:23),LowerIdent(1:24-1:37),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/apply_binop_switch.md b/src/snapshots/old_syntax/apply_binop_switch.md index 5cbc09fd1e..92b1d9f016 100644 --- a/src/snapshots/old_syntax/apply_binop_switch.md +++ b/src/snapshots/old_syntax/apply_binop_switch.md @@ -9,9 +9,12 @@ i<2 (-6) ~~~ # EXPECTED -UNDEFINED VARIABLE - apply_binop_switch.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `i` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpLessThan(1:2-1:3),Int(1:3-1:4),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/apply_closure_pizza.md b/src/snapshots/old_syntax/apply_closure_pizza.md index 9cbc3699c9..0709c4eb47 100644 --- a/src/snapshots/old_syntax/apply_closure_pizza.md +++ b/src/snapshots/old_syntax/apply_closure_pizza.md @@ -9,9 +9,12 @@ foo |> Dict.keepIf \(k, _v) -> List.contains keysToDelete k |> Bool.not ~~~ # EXPECTED -UNDEFINED VARIABLE - apply_closure_pizza.md:1:1:1:4 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `foo` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:4),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/apply_record_ann.md b/src/snapshots/old_syntax/apply_record_ann.md index 7f4998c2fa..479e0d4034 100644 --- a/src/snapshots/old_syntax/apply_record_ann.md +++ b/src/snapshots/old_syntax/apply_record_ann.md @@ -10,9 +10,12 @@ a:N{h, g ~~~ # EXPECTED -UNDEFINED VARIABLE - apply_record_ann.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `a` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpColon(1:2-1:3),UpperIdent(1:3-1:4),OpenCurly(1:4-1:5),LowerIdent(1:5-1:6),Comma(1:6-1:7),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/apply_three_args.md b/src/snapshots/old_syntax/apply_three_args.md index 213f92149d..531d96f692 100644 --- a/src/snapshots/old_syntax/apply_three_args.md +++ b/src/snapshots/old_syntax/apply_three_args.md @@ -8,9 +8,12 @@ type=expr a b c d ~~~ # EXPECTED -UNDEFINED VARIABLE - apply_three_args.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `a` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),LowerIdent(1:3-1:4),LowerIdent(1:5-1:6),LowerIdent(1:7-1:8),EndOfFile(1:8-1:8), diff --git a/src/snapshots/old_syntax/apply_tuple_ext_parens_ty.md b/src/snapshots/old_syntax/apply_tuple_ext_parens_ty.md index 3bc3475753..1a162a89dc 100644 --- a/src/snapshots/old_syntax/apply_tuple_ext_parens_ty.md +++ b/src/snapshots/old_syntax/apply_tuple_ext_parens_ty.md @@ -9,9 +9,12 @@ i:M()(Y) c t ~~~ # EXPECTED -UNDEFINED VARIABLE - apply_tuple_ext_parens_ty.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `i` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpColon(1:2-1:3),UpperIdent(1:3-1:4),NoSpaceOpenRound(1:4-1:5),CloseRound(1:5-1:6),NoSpaceOpenRound(1:6-1:7),UpperIdent(1:7-1:8),CloseRound(1:8-1:9),LowerIdent(1:10-1:11),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/apply_two_args.md b/src/snapshots/old_syntax/apply_two_args.md index 225b405631..c5c29d2778 100644 --- a/src/snapshots/old_syntax/apply_two_args.md +++ b/src/snapshots/old_syntax/apply_two_args.md @@ -8,9 +8,12 @@ type=expr whee 12 34 ~~~ # EXPECTED -UNDEFINED VARIABLE - apply_two_args.md:1:1:1:5 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `whee` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:5),Int(1:7-1:9),Int(1:11-1:13),EndOfFile(1:13-1:13), diff --git a/src/snapshots/old_syntax/apply_two_args_pnc.md b/src/snapshots/old_syntax/apply_two_args_pnc.md index 67e27f753a..05cd38c1b6 100644 --- a/src/snapshots/old_syntax/apply_two_args_pnc.md +++ b/src/snapshots/old_syntax/apply_two_args_pnc.md @@ -8,9 +8,12 @@ type=expr whee(12, 34) ~~~ # EXPECTED -UNDEFINED VARIABLE - apply_two_args_pnc.md:1:1:1:5 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `whee` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:5),NoSpaceOpenRound(1:5-1:6),Int(1:6-1:8),Comma(1:8-1:9),Int(1:11-1:13),CloseRound(1:13-1:14),EndOfFile(1:14-1:14), diff --git a/src/snapshots/old_syntax/as_in_func_type_args.md b/src/snapshots/old_syntax/as_in_func_type_args.md index 8d3311cedf..fc00fca85c 100644 --- a/src/snapshots/old_syntax/as_in_func_type_args.md +++ b/src/snapshots/old_syntax/as_in_func_type_args.md @@ -10,9 +10,12 @@ e:J r ~~~ # EXPECTED -UNDEFINED VARIABLE - as_in_func_type_args.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `e` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpColon(1:2-1:3),UpperIdent(1:3-1:4),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/assign_parens_item_newline_comment.md b/src/snapshots/old_syntax/assign_parens_item_newline_comment.md index 127c43e73a..3a191acdca 100644 --- a/src/snapshots/old_syntax/assign_parens_item_newline_comment.md +++ b/src/snapshots/old_syntax/assign_parens_item_newline_comment.md @@ -12,9 +12,12 @@ i r ~~~ # EXPECTED -UNDEFINED VARIABLE - assign_parens_item_newline_comment.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `a` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpAssign(1:2-1:3),NoSpaceOpenRound(1:3-1:4),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/backslash_closure_last_expr.md b/src/snapshots/old_syntax/backslash_closure_last_expr.md index ff7c9a7a98..2d72ea94bc 100644 --- a/src/snapshots/old_syntax/backslash_closure_last_expr.md +++ b/src/snapshots/old_syntax/backslash_closure_last_expr.md @@ -9,9 +9,12 @@ b \e->s ~~~ # EXPECTED -UNDEFINED VARIABLE - backslash_closure_last_expr.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `b` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/basic_apply.md b/src/snapshots/old_syntax/basic_apply.md index 11f694fffa..cbb23c350f 100644 --- a/src/snapshots/old_syntax/basic_apply.md +++ b/src/snapshots/old_syntax/basic_apply.md @@ -8,9 +8,12 @@ type=expr whee 1 ~~~ # EXPECTED -UNDEFINED VARIABLE - basic_apply.md:1:1:1:5 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `whee` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:5),Int(1:6-1:7),EndOfFile(1:7-1:7), diff --git a/src/snapshots/old_syntax/basic_field.md b/src/snapshots/old_syntax/basic_field.md index bafdc7092d..7273baf6b1 100644 --- a/src/snapshots/old_syntax/basic_field.md +++ b/src/snapshots/old_syntax/basic_field.md @@ -8,9 +8,12 @@ type=expr rec.field ~~~ # EXPECTED -UNDEFINED VARIABLE - basic_field.md:1:1:1:4 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `rec` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:4),NoSpaceDotLowerIdent(1:4-1:10),EndOfFile(1:10-1:10), diff --git a/src/snapshots/old_syntax/basic_var.md b/src/snapshots/old_syntax/basic_var.md index 94c72be14d..8896f4ca2b 100644 --- a/src/snapshots/old_syntax/basic_var.md +++ b/src/snapshots/old_syntax/basic_var.md @@ -8,9 +8,12 @@ type=expr whee ~~~ # EXPECTED -UNDEFINED VARIABLE - basic_var.md:1:1:1:5 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `whee` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:5),EndOfFile(1:5-1:5), diff --git a/src/snapshots/old_syntax/binop_apply_complex.md b/src/snapshots/old_syntax/binop_apply_complex.md index 34e53bf503..f58659f01a 100644 --- a/src/snapshots/old_syntax/binop_apply_complex.md +++ b/src/snapshots/old_syntax/binop_apply_complex.md @@ -8,9 +8,12 @@ type=expr Nw?e /s ~~~ # EXPECTED -UNDEFINED VARIABLE - closure_in_apply_in_binop.md:1:1:1:3 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `m0` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:3),OpBackslash(1:3-1:4),LowerIdent(1:4-1:5),OpArrow(1:5-1:7),LowerIdent(1:7-1:8),NoSpaceOpQuestion(1:8-1:9),LowerIdent(1:9-1:10),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/closure_in_binop_with_spaces.md b/src/snapshots/old_syntax/closure_in_binop_with_spaces.md index 6973f51840..16d7c6c7b1 100644 --- a/src/snapshots/old_syntax/closure_in_binop_with_spaces.md +++ b/src/snapshots/old_syntax/closure_in_binop_with_spaces.md @@ -10,8 +10,6 @@ i>\s->s ~~~ # EXPECTED UNEXPECTED TOKEN IN EXPRESSION - closure_in_binop_with_spaces.md:1:3:1:5 -UNDEFINED VARIABLE - closure_in_binop_with_spaces.md:1:1:1:2 -expr_not_canonicalized - closure_in_binop_with_spaces.md:1:1:1:5 # PROBLEMS **UNEXPECTED TOKEN IN EXPRESSION** The token **\s** is not expected in an expression. @@ -25,6 +23,14 @@ i>\s->s ^^ +**UNDEFINED VARIABLE** +Nothing is named `i` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNKNOWN OPERATOR** +This looks like an operator, but it's not one I recognize! +Check the spelling and make sure you're using a valid Roc operator. + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpGreaterThan(1:2-1:3),OpBackslash(1:3-1:4),LowerIdent(1:4-1:5),OpArrow(1:5-1:7),LowerIdent(1:7-1:8),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/closure_with_binops_and_unary.md b/src/snapshots/old_syntax/closure_with_binops_and_unary.md index aab7cec823..3987fbb49d 100644 --- a/src/snapshots/old_syntax/closure_with_binops_and_unary.md +++ b/src/snapshots/old_syntax/closure_with_binops_and_unary.md @@ -10,9 +10,12 @@ m w ~~~ # EXPECTED -UNDEFINED VARIABLE - closure_with_binops_and_unary.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `m` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/comment_after_expr_in_parens.md b/src/snapshots/old_syntax/comment_after_expr_in_parens.md index ca43f66067..85d4ea8227 100644 --- a/src/snapshots/old_syntax/comment_after_expr_in_parens.md +++ b/src/snapshots/old_syntax/comment_after_expr_in_parens.md @@ -9,9 +9,12 @@ type=expr ) ~~~ # EXPECTED -UNDEFINED VARIABLE - comment_after_expr_in_parens.md:1:2:1:3 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `i` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig OpenRound(1:1-1:2),LowerIdent(1:2-1:3),Newline(1:4-1:7), diff --git a/src/snapshots/old_syntax/comment_after_whitespace_apply_arg_inside_pnc_apply.md b/src/snapshots/old_syntax/comment_after_whitespace_apply_arg_inside_pnc_apply.md index 9b5387d259..f8556f32bc 100644 --- a/src/snapshots/old_syntax/comment_after_whitespace_apply_arg_inside_pnc_apply.md +++ b/src/snapshots/old_syntax/comment_after_whitespace_apply_arg_inside_pnc_apply.md @@ -16,7 +16,7 @@ PP(mport#<|"P ) ~~~ # EXPECTED -expected_expr_apply_close_round - comment_after_whitespace_apply_arg_inside_pnc_apply.md:1:1:1:4 +PARSE ERROR - comment_after_whitespace_apply_arg_inside_pnc_apply.md:1:1:1:4 # PROBLEMS **PARSE ERROR** A parsing error occurred: `expected_expr_apply_close_round` diff --git a/src/snapshots/old_syntax/comment_before_colon_def.md b/src/snapshots/old_syntax/comment_before_colon_def.md index 547e4a4bae..f321b29eef 100644 --- a/src/snapshots/old_syntax/comment_before_colon_def.md +++ b/src/snapshots/old_syntax/comment_before_colon_def.md @@ -10,9 +10,12 @@ w# Q ~~~ # EXPECTED -UNDEFINED VARIABLE - comment_before_colon_def.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `w` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),Newline(1:3-1:3), diff --git a/src/snapshots/old_syntax/comment_before_equals_def.md b/src/snapshots/old_syntax/comment_before_equals_def.md index 602ee87418..9475ecaa3e 100644 --- a/src/snapshots/old_syntax/comment_before_equals_def.md +++ b/src/snapshots/old_syntax/comment_before_equals_def.md @@ -10,9 +10,12 @@ t# e ~~~ # EXPECTED -UNDEFINED VARIABLE - comment_before_equals_def.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `t` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),Newline(1:3-1:3), diff --git a/src/snapshots/old_syntax/comment_in_tuple_ext.md b/src/snapshots/old_syntax/comment_in_tuple_ext.md index deb1b39406..c9be024b79 100644 --- a/src/snapshots/old_syntax/comment_in_tuple_ext.md +++ b/src/snapshots/old_syntax/comment_in_tuple_ext.md @@ -11,9 +11,12 @@ t:()(n# p# ~~~ # EXPECTED -UNDEFINED VARIABLE - comment_in_tuple_ext.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `t` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpColon(1:2-1:3),NoSpaceOpenRound(1:3-1:4),CloseRound(1:4-1:5),NoSpaceOpenRound(1:5-1:6),LowerIdent(1:6-1:7),Newline(1:8-1:8), diff --git a/src/snapshots/old_syntax/comment_indent_in_parens.md b/src/snapshots/old_syntax/comment_indent_in_parens.md index bc47bb12fd..00fb8bf1d6 100644 --- a/src/snapshots/old_syntax/comment_indent_in_parens.md +++ b/src/snapshots/old_syntax/comment_indent_in_parens.md @@ -11,7 +11,7 @@ type=expr M ~~~ # EXPECTED -NIL +TYPE MISMATCH - comment_indent_in_parens.md:1:1:1:2 # PROBLEMS **TYPE MISMATCH** This expression is used in an unexpected way: diff --git a/src/snapshots/old_syntax/comment_parens_in_typ_annotation_record_field.md b/src/snapshots/old_syntax/comment_parens_in_typ_annotation_record_field.md index 26de4d5269..0577be9240 100644 --- a/src/snapshots/old_syntax/comment_parens_in_typ_annotation_record_field.md +++ b/src/snapshots/old_syntax/comment_parens_in_typ_annotation_record_field.md @@ -10,9 +10,12 @@ i:{t:(J# A ~~~ # EXPECTED -UNDEFINED VARIABLE - comment_parens_in_typ_annotation_record_field.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `i` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpColon(1:2-1:3),OpenCurly(1:3-1:4),LowerIdent(1:4-1:5),OpColon(1:5-1:6),NoSpaceOpenRound(1:6-1:7),UpperIdent(1:7-1:8),Newline(1:9-1:9), diff --git a/src/snapshots/old_syntax/compare_apply_record.md b/src/snapshots/old_syntax/compare_apply_record.md index 806e4d6277..54c93dec89 100644 --- a/src/snapshots/old_syntax/compare_apply_record.md +++ b/src/snapshots/old_syntax/compare_apply_record.md @@ -11,10 +11,16 @@ x{ } launchTheNukes! {} ~~~ # EXPECTED -UNDEFINED VARIABLE - def_bang.md:1:1:1:16 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `launchTheNukes!` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:16),OpAssign(1:17-1:18),OpBackslash(1:19-1:20),OpenCurly(1:20-1:21),CloseCurly(1:21-1:22),OpArrow(1:23-1:25),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/def_missing_final_expression.md b/src/snapshots/old_syntax/def_missing_final_expression.md index 355d88dc40..2fcf80bf99 100644 --- a/src/snapshots/old_syntax/def_missing_final_expression.md +++ b/src/snapshots/old_syntax/def_missing_final_expression.md @@ -8,9 +8,12 @@ type=expr f : Foo.foo ~~~ # EXPECTED -UNDEFINED VARIABLE - def_missing_final_expression.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `f` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpColon(1:3-1:4),UpperIdent(1:5-1:8),NoSpaceDotLowerIdent(1:8-1:12),EndOfFile(1:12-1:12), diff --git a/src/snapshots/old_syntax/def_multistring_apply.md b/src/snapshots/old_syntax/def_multistring_apply.md index 568504102f..6e971c2d85 100644 --- a/src/snapshots/old_syntax/def_multistring_apply.md +++ b/src/snapshots/old_syntax/def_multistring_apply.md @@ -9,9 +9,12 @@ e=""""""a p ~~~ # EXPECTED -UNDEFINED VARIABLE - def_multistring_apply.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `e` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpAssign(1:2-1:3),MultilineStringStart(1:3-1:6),StringPart(1:6-1:6),MultilineStringEnd(1:6-1:9),LowerIdent(1:9-1:10),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/def_without_newline.md b/src/snapshots/old_syntax/def_without_newline.md index 8180cf3ce5..7010001090 100644 --- a/src/snapshots/old_syntax/def_without_newline.md +++ b/src/snapshots/old_syntax/def_without_newline.md @@ -8,9 +8,12 @@ type=expr a:b i ~~~ # EXPECTED -UNDEFINED VARIABLE - def_without_newline.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `a` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpColon(1:2-1:3),LowerIdent(1:3-1:4),LowerIdent(1:5-1:6),EndOfFile(1:6-1:6), diff --git a/src/snapshots/old_syntax/deprecated_interpolated_string.md b/src/snapshots/old_syntax/deprecated_interpolated_string.md index f31aa7c27e..9eff38b622 100644 --- a/src/snapshots/old_syntax/deprecated_interpolated_string.md +++ b/src/snapshots/old_syntax/deprecated_interpolated_string.md @@ -8,7 +8,7 @@ type=expr "\(e)" ~~~ # EXPECTED -InvalidEscapeSequence - deprecated_interpolated_string.md:1:3:1:3 +NIL # PROBLEMS **INVALID ESCAPE SEQUENCE** This escape sequence is not recognized. diff --git a/src/snapshots/old_syntax/double_parens_comment_tuple_pat.md b/src/snapshots/old_syntax/double_parens_comment_tuple_pat.md index 3e505a0b4b..5dacbceb9f 100644 --- a/src/snapshots/old_syntax/double_parens_comment_tuple_pat.md +++ b/src/snapshots/old_syntax/double_parens_comment_tuple_pat.md @@ -11,7 +11,7 @@ type=expr t# ~~~ # EXPECTED -expected_expr_close_round_or_comma - double_parens_comment_tuple_pat.md:3:1:3:3 +PARSE ERROR - double_parens_comment_tuple_pat.md:3:1:3:3 # PROBLEMS **PARSE ERROR** A parsing error occurred: `expected_expr_close_round_or_comma` diff --git a/src/snapshots/old_syntax/double_plus.md b/src/snapshots/old_syntax/double_plus.md index e1765d492a..3c65c306f8 100644 --- a/src/snapshots/old_syntax/double_plus.md +++ b/src/snapshots/old_syntax/double_plus.md @@ -9,9 +9,12 @@ main = [] ++ [] ~~~ # EXPECTED -UNDEFINED VARIABLE - double_plus.md:1:1:1:5 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `main` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:5),OpAssign(1:6-1:7),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/double_question_binop.md b/src/snapshots/old_syntax/double_question_binop.md index 8e70a0ab60..3c26e8a445 100644 --- a/src/snapshots/old_syntax/double_question_binop.md +++ b/src/snapshots/old_syntax/double_question_binop.md @@ -8,9 +8,12 @@ type=expr get_name! {} ?? "Bob" ~~~ # EXPECTED -UNDEFINED VARIABLE - double_question_binop.md:1:1:1:10 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `get_name!` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:10),OpenCurly(1:11-1:12),CloseCurly(1:12-1:13),OpDoubleQuestion(1:14-1:16),StringStart(1:17-1:18),StringPart(1:18-1:21),StringEnd(1:21-1:22),EndOfFile(1:22-1:22), diff --git a/src/snapshots/old_syntax/elm_function_syntax.md b/src/snapshots/old_syntax/elm_function_syntax.md index 13997ce0ce..622a3c55be 100644 --- a/src/snapshots/old_syntax/elm_function_syntax.md +++ b/src/snapshots/old_syntax/elm_function_syntax.md @@ -8,9 +8,12 @@ type=expr f x y = x ~~~ # EXPECTED -UNDEFINED VARIABLE - elm_function_syntax.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `f` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),LowerIdent(1:3-1:4),LowerIdent(1:5-1:6),OpAssign(1:7-1:8),LowerIdent(1:9-1:10),EndOfFile(1:10-1:10), diff --git a/src/snapshots/old_syntax/empty_or_pattern.md b/src/snapshots/old_syntax/empty_or_pattern.md index 5b21af3146..5d5d1a5f78 100644 --- a/src/snapshots/old_syntax/empty_or_pattern.md +++ b/src/snapshots/old_syntax/empty_or_pattern.md @@ -13,9 +13,12 @@ when Just 4 is 2 ~~~ # EXPECTED -UNDEFINED VARIABLE - empty_or_pattern.md:1:1:1:5 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `when` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:5),UpperIdent(1:6-1:10),Int(1:11-1:12),LowerIdent(1:13-1:15),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/empty_record_update.md b/src/snapshots/old_syntax/empty_record_update.md index a9f42150f3..5635b2e219 100644 --- a/src/snapshots/old_syntax/empty_record_update.md +++ b/src/snapshots/old_syntax/empty_record_update.md @@ -9,7 +9,6 @@ type=expr ~~~ # EXPECTED UNEXPECTED TOKEN IN EXPRESSION - empty_record_update.md:1:3:1:5 -UNDEFINED VARIABLE - empty_record_update.md:1:2:1:3 # PROBLEMS **UNEXPECTED TOKEN IN EXPRESSION** The token **&}** is not expected in an expression. @@ -23,6 +22,10 @@ Here is the problematic code: ^^ +**UNDEFINED VARIABLE** +Nothing is named `e` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig OpenCurly(1:1-1:2),LowerIdent(1:2-1:3),OpAmpersand(1:3-1:4),CloseCurly(1:4-1:5),EndOfFile(1:5-1:5), diff --git a/src/snapshots/old_syntax/empty_try_pnc.md b/src/snapshots/old_syntax/empty_try_pnc.md index 852219dffb..42b2ddef99 100644 --- a/src/snapshots/old_syntax/empty_try_pnc.md +++ b/src/snapshots/old_syntax/empty_try_pnc.md @@ -8,9 +8,12 @@ type=expr try()t ~~~ # EXPECTED -UNDEFINED VARIABLE - empty_try_pnc.md:1:1:1:4 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `try` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:4),NoSpaceOpenRound(1:4-1:5),CloseRound(1:5-1:6),LowerIdent(1:6-1:7),EndOfFile(1:7-1:7), diff --git a/src/snapshots/old_syntax/equals.md b/src/snapshots/old_syntax/equals.md index 4e7d0ecc8d..0d395fd0c5 100644 --- a/src/snapshots/old_syntax/equals.md +++ b/src/snapshots/old_syntax/equals.md @@ -8,10 +8,16 @@ type=expr x==y ~~~ # EXPECTED -UNDEFINED VARIABLE - equals.md:1:1:1:2 -UNDEFINED VARIABLE - equals.md:1:4:1:5 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `x` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `y` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpEquals(1:2-1:4),LowerIdent(1:4-1:5),EndOfFile(1:5-1:5), diff --git a/src/snapshots/old_syntax/equals_with_spaces.md b/src/snapshots/old_syntax/equals_with_spaces.md index 6f116b1757..88e52a03c0 100644 --- a/src/snapshots/old_syntax/equals_with_spaces.md +++ b/src/snapshots/old_syntax/equals_with_spaces.md @@ -8,10 +8,16 @@ type=expr x == y ~~~ # EXPECTED -UNDEFINED VARIABLE - equals_with_spaces.md:1:1:1:2 -UNDEFINED VARIABLE - equals_with_spaces.md:1:6:1:7 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `x` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `y` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpEquals(1:3-1:5),LowerIdent(1:6-1:7),EndOfFile(1:7-1:7), diff --git a/src/snapshots/old_syntax/error_inline_alias_argument_uppercase.md b/src/snapshots/old_syntax/error_inline_alias_argument_uppercase.md index 338de1f9f5..9b07191710 100644 --- a/src/snapshots/old_syntax/error_inline_alias_argument_uppercase.md +++ b/src/snapshots/old_syntax/error_inline_alias_argument_uppercase.md @@ -8,9 +8,12 @@ type=expr f : List elem -> [Nil, Cons elem a] as LinkedList U ~~~ # EXPECTED -UNDEFINED VARIABLE - error_inline_alias_argument_uppercase.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `f` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpColon(1:3-1:4),UpperIdent(1:5-1:9),LowerIdent(1:10-1:14),OpArrow(1:15-1:17),OpenSquare(1:18-1:19),UpperIdent(1:19-1:22),Comma(1:22-1:23),UpperIdent(1:24-1:28),LowerIdent(1:29-1:33),LowerIdent(1:34-1:35),CloseSquare(1:35-1:36),KwAs(1:37-1:39),UpperIdent(1:40-1:50),UpperIdent(1:51-1:52),EndOfFile(1:52-1:52), diff --git a/src/snapshots/old_syntax/error_inline_alias_not_an_alias.md b/src/snapshots/old_syntax/error_inline_alias_not_an_alias.md index 424b724a6c..20f49f0e1a 100644 --- a/src/snapshots/old_syntax/error_inline_alias_not_an_alias.md +++ b/src/snapshots/old_syntax/error_inline_alias_not_an_alias.md @@ -8,9 +8,12 @@ type=expr f : List elem -> [Nil, Cons elem a] as a ~~~ # EXPECTED -UNDEFINED VARIABLE - error_inline_alias_not_an_alias.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `f` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpColon(1:3-1:4),UpperIdent(1:5-1:9),LowerIdent(1:10-1:14),OpArrow(1:15-1:17),OpenSquare(1:18-1:19),UpperIdent(1:19-1:22),Comma(1:22-1:23),UpperIdent(1:24-1:28),LowerIdent(1:29-1:33),LowerIdent(1:34-1:35),CloseSquare(1:35-1:36),KwAs(1:37-1:39),LowerIdent(1:40-1:41),EndOfFile(1:41-1:41), diff --git a/src/snapshots/old_syntax/error_inline_alias_qualified.md b/src/snapshots/old_syntax/error_inline_alias_qualified.md index 7114c588d2..839baa8841 100644 --- a/src/snapshots/old_syntax/error_inline_alias_qualified.md +++ b/src/snapshots/old_syntax/error_inline_alias_qualified.md @@ -8,9 +8,12 @@ type=expr f : List elem -> [Nil, Cons elem a] as Module.LinkedList a ~~~ # EXPECTED -UNDEFINED VARIABLE - error_inline_alias_qualified.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `f` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpColon(1:3-1:4),UpperIdent(1:5-1:9),LowerIdent(1:10-1:14),OpArrow(1:15-1:17),OpenSquare(1:18-1:19),UpperIdent(1:19-1:22),Comma(1:22-1:23),UpperIdent(1:24-1:28),LowerIdent(1:29-1:33),LowerIdent(1:34-1:35),CloseSquare(1:35-1:36),KwAs(1:37-1:39),UpperIdent(1:40-1:46),NoSpaceDotUpperIdent(1:46-1:57),LowerIdent(1:58-1:59),EndOfFile(1:59-1:59), diff --git a/src/snapshots/old_syntax/expect_single_line.md b/src/snapshots/old_syntax/expect_single_line.md index 678b694280..48532e4e80 100644 --- a/src/snapshots/old_syntax/expect_single_line.md +++ b/src/snapshots/old_syntax/expect_single_line.md @@ -14,9 +14,12 @@ expect y == z 42 ~~~ # EXPECTED -UNDEFINED VARIABLE - expect_single_line.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `x` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpAssign(1:3-1:4),Int(1:5-1:6),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/exponential_else_branch_parsing_repro.md b/src/snapshots/old_syntax/exponential_else_branch_parsing_repro.md index 8538048aa2..3594840743 100644 --- a/src/snapshots/old_syntax/exponential_else_branch_parsing_repro.md +++ b/src/snapshots/old_syntax/exponential_else_branch_parsing_repro.md @@ -14,9 +14,12 @@ t__T+_____^_zese else ~~~ # EXPECTED -UNDEFINED VARIABLE - exponential_else_branch_parsing_repro.md:1:1:1:3 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `ee` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:3),OpAmpersand(1:3-1:4),OpAmpersand(1:4-1:5),LowerIdent(1:5-1:10),MalformedOpaqueNameWithoutName(1:10-1:11),OpAmpersand(1:11-1:12),LowerIdent(1:12-1:16),OpSlash(1:16-1:17),LowerIdent(1:17-1:21),Dot(1:21-1:22),OpBang(1:22-1:23),LowerIdent(1:23-1:26),OpAmpersand(1:26-1:27),LowerIdent(1:27-1:28),MalformedOpaqueNameWithoutName(1:28-1:29),OpAmpersand(1:29-1:30),LowerIdent(1:30-1:32),OpSlash(1:32-1:33),KwIf(1:33-1:35),Dot(1:35-1:36),OpBang(1:36-1:37),LowerIdent(1:37-1:40),OpAmpersand(1:40-1:41),OpAmpersand(1:41-1:42),LowerIdent(1:42-1:46),OpaqueName(1:46-1:51),Dot(1:51-1:52),OpBang(1:52-1:53),LowerIdent(1:53-1:56),OpAmpersand(1:56-1:57),LowerIdent(1:57-1:58),MalformedOpaqueNameWithoutName(1:58-1:59),OpAmpersand(1:59-1:60),LowerIdent(1:60-1:62),OpSlash(1:62-1:63),KwIf(1:63-1:65),Dot(1:65-1:66),OpBang(1:66-1:67),LowerIdent(1:67-1:70),OpAmpersand(1:70-1:71),OpAmpersand(1:71-1:72),LowerIdent(1:72-1:76),OpaqueName(1:76-1:78),OpSlash(1:78-1:79),KwIf(1:79-1:81),Dot(1:81-1:82),OpBang(1:82-1:83),KwIf(1:83-1:85),Dot(1:85-1:86),OpBang(1:86-1:87),OpAmpersand(1:87-1:88),LowerIdent(1:88-1:90),OpSlash(1:90-1:91),KwIf(1:91-1:93),Dot(1:93-1:94),OpBang(1:94-1:95),LowerIdent(1:95-1:98),OpAmpersand(1:98-1:99),OpAmpersand(1:99-1:100),LowerIdent(1:100-1:104),OpaqueName(1:104-1:106),OpSlash(1:106-1:107),KwIf(1:107-1:109),Dot(1:109-1:110),OpBang(1:110-1:111),LowerIdent(1:111-1:114),OpSlash(1:114-1:115),KwIf(1:115-1:117),NoSpaceDotLowerIdent(1:117-1:122),Dot(1:122-1:123),OpBang(1:123-1:124),LowerIdent(1:124-1:127),OpAmpersand(1:127-1:128),LowerIdent(1:128-1:129),MalformedOpaqueNameWithoutName(1:129-1:130),OpAmpersand(1:130-1:131),LowerIdent(1:131-1:133),OpSlash(1:133-1:134),KwIf(1:134-1:136),Dot(1:136-1:137),OpBang(1:137-1:138),LowerIdent(1:138-1:141),OpAmpersand(1:141-1:142),OpAmpersand(1:142-1:143),LowerIdent(1:143-1:147),OpaqueName(1:147-1:149),OpSlash(1:149-1:150),KwIf(1:150-1:152),Dot(1:152-1:153),OpBang(1:153-1:154),KwIf(1:154-1:156),Dot(1:156-1:157),OpBang(1:157-1:158),LowerIdent(1:158-1:163),OpSlash(1:163-1:164),KwIf(1:164-1:166),Dot(1:166-1:167),OpBang(1:167-1:168),LowerIdent(1:168-1:171),OpAmpersand(1:171-1:172),LowerIdent(1:172-1:173),MalformedOpaqueNameWithoutName(1:173-1:174),OpAmpersand(1:174-1:175),LowerIdent(1:175-1:176),OpAmpersand(1:176-1:177),OpAmpersand(1:177-1:178),LowerIdent(1:178-1:182),OpaqueName(1:182-1:184),OpSlash(1:184-1:185),KwIf(1:185-1:187),Dot(1:187-1:188),OpBang(1:188-1:189),LowerIdent(1:189-1:192),OpSlash(1:192-1:193),KwIf(1:193-1:195),NoSpaceDotLowerIdent(1:195-1:200),Dot(1:200-1:201),OpBang(1:201-1:202),LowerIdent(1:202-1:205),OpAmpersand(1:205-1:206),LowerIdent(1:206-1:207),MalformedOpaqueNameWithoutName(1:207-1:208),OpAmpersand(1:208-1:209),LowerIdent(1:209-1:211),OpSlash(1:211-1:212),KwIf(1:212-1:214),Dot(1:214-1:215),OpBang(1:215-1:216),LowerIdent(1:216-1:219),OpAmpersand(1:219-1:220),OpAmpersand(1:220-1:221),LowerIdent(1:221-1:225),OpaqueName(1:225-1:227),OpSlash(1:227-1:228),KwIf(1:228-1:230),Dot(1:230-1:231),OpBang(1:231-1:232),KwIf(1:232-1:234),Dot(1:234-1:235),OpBang(1:235-1:236),LowerIdent(1:236-1:241),OpSlash(1:241-1:242),KwIf(1:242-1:244),Dot(1:244-1:245),OpBang(1:245-1:246),LowerIdent(1:246-1:249),OpAmpersand(1:249-1:250),LowerIdent(1:250-1:251),MalformedOpaqueNameWithoutName(1:251-1:252),OpAmpersand(1:252-1:253),LowerIdent(1:253-1:259),OpSlash(1:259-1:260),KwIf(1:260-1:262),Dot(1:262-1:263),OpBang(1:263-1:264),KwIf(1:264-1:266),Dot(1:266-1:267),OpBang(1:267-1:268),LowerIdent(1:268-1:275),OpSlash(1:275-1:276),KwIf(1:276-1:278),Dot(1:278-1:279),OpBang(1:279-1:280),KwIf(1:280-1:282),Dot(1:282-1:283),OpBang(1:283-1:284),LowerIdent(1:284-1:288),OpSlash(1:288-1:289),KwIf(1:289-1:291),Dot(1:291-1:292),OpBang(1:292-1:293),LowerIdent(1:293-1:295),Newline(1:296-1:297), diff --git a/src/snapshots/old_syntax/ext_on_fn_ty.md b/src/snapshots/old_syntax/ext_on_fn_ty.md index b76aab9d9c..e782e7f64e 100644 --- a/src/snapshots/old_syntax/ext_on_fn_ty.md +++ b/src/snapshots/old_syntax/ext_on_fn_ty.md @@ -9,9 +9,12 @@ t:(w=>p)a t ~~~ # EXPECTED -UNDEFINED VARIABLE - ext_on_fn_ty.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `t` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpColon(1:2-1:3),NoSpaceOpenRound(1:3-1:4),LowerIdent(1:4-1:5),OpFatArrow(1:5-1:7),LowerIdent(1:7-1:8),CloseRound(1:8-1:9),LowerIdent(1:9-1:10),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/extra_newline.md b/src/snapshots/old_syntax/extra_newline.md index aaf21bd209..e43b061e68 100644 --- a/src/snapshots/old_syntax/extra_newline.md +++ b/src/snapshots/old_syntax/extra_newline.md @@ -12,7 +12,7 @@ else # 3 c # 4 ~~~ # EXPECTED -no_else - extra_newline.md:2:5:2:8 +PARSE ERROR - extra_newline.md:2:5:2:8 # PROBLEMS **PARSE ERROR** A parsing error occurred: `no_else` diff --git a/src/snapshots/old_syntax/f_not_not_f.md b/src/snapshots/old_syntax/f_not_not_f.md index 3c03c8457b..0f9352408b 100644 --- a/src/snapshots/old_syntax/f_not_not_f.md +++ b/src/snapshots/old_syntax/f_not_not_f.md @@ -10,9 +10,12 @@ f !f ~~~ # EXPECTED -UNDEFINED VARIABLE - f_not_not_f.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `f` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/fn_with_record_arg.md b/src/snapshots/old_syntax/fn_with_record_arg.md index 06cfbc36b3..0fa73bae03 100644 --- a/src/snapshots/old_syntax/fn_with_record_arg.md +++ b/src/snapshots/old_syntax/fn_with_record_arg.md @@ -12,9 +12,12 @@ table = \{height} -> crash "not implemented" table ~~~ # EXPECTED -UNDEFINED VARIABLE - fn_with_record_arg.md:1:1:1:6 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `table` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:6),OpColon(1:7-1:8),OpenCurly(1:9-1:10),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/function_with_tuple_ext_type.md b/src/snapshots/old_syntax/function_with_tuple_ext_type.md index 629fb4492b..c3e3d1bbfa 100644 --- a/src/snapshots/old_syntax/function_with_tuple_ext_type.md +++ b/src/snapshots/old_syntax/function_with_tuple_ext_type.md @@ -11,9 +11,12 @@ f = \x -> x f ("Str", 42) ~~~ # EXPECTED -UNDEFINED VARIABLE - function_with_tuple_ext_type.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `f` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpColon(1:3-1:4),OpenRound(1:5-1:6),UpperIdent(1:6-1:9),CloseRound(1:9-1:10),LowerIdent(1:10-1:11),OpArrow(1:12-1:14),OpenRound(1:15-1:16),UpperIdent(1:16-1:19),CloseRound(1:19-1:20),LowerIdent(1:20-1:21),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/function_with_tuple_type.md b/src/snapshots/old_syntax/function_with_tuple_type.md index 8e05f8c112..21b12e3344 100644 --- a/src/snapshots/old_syntax/function_with_tuple_type.md +++ b/src/snapshots/old_syntax/function_with_tuple_type.md @@ -11,9 +11,12 @@ f = \x -> (x, x + 1) f 42 ~~~ # EXPECTED -UNDEFINED VARIABLE - function_with_tuple_type.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `f` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpColon(1:3-1:4),UpperIdent(1:5-1:8),OpArrow(1:9-1:11),OpenRound(1:12-1:13),UpperIdent(1:13-1:16),Comma(1:16-1:17),UpperIdent(1:18-1:21),CloseRound(1:21-1:22),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/h_greater_comment_minus_div.md b/src/snapshots/old_syntax/h_greater_comment_minus_div.md index 94be3731dd..9e72ac02de 100644 --- a/src/snapshots/old_syntax/h_greater_comment_minus_div.md +++ b/src/snapshots/old_syntax/h_greater_comment_minus_div.md @@ -10,8 +10,6 @@ h># ~~~ # EXPECTED UNEXPECTED TOKEN IN EXPRESSION - h_greater_comment_minus_div.md:2:2:2:4 -UNDEFINED VARIABLE - h_greater_comment_minus_div.md:1:1:1:2 -expr_not_canonicalized - h_greater_comment_minus_div.md:1:1:2:4 # PROBLEMS **UNEXPECTED TOKEN IN EXPRESSION** The token **-h** is not expected in an expression. @@ -25,6 +23,14 @@ Here is the problematic code: ^^ +**UNDEFINED VARIABLE** +Nothing is named `h` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNKNOWN OPERATOR** +This looks like an operator, but it's not one I recognize! +Check the spelling and make sure you're using a valid Roc operator. + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpGreaterThan(1:2-1:3),Newline(1:4-1:4), diff --git a/src/snapshots/old_syntax/i_over_not_g.md b/src/snapshots/old_syntax/i_over_not_g.md index 531ce2e840..b51ba7c5c4 100644 --- a/src/snapshots/old_syntax/i_over_not_g.md +++ b/src/snapshots/old_syntax/i_over_not_g.md @@ -10,8 +10,7 @@ i/ g ~~~ # EXPECTED -UNDEFINED VARIABLE - i_over_not_g.md:1:1:1:2 -expr_not_canonicalized - i_over_not_g.md:1:1:1:1 +UNEXPECTED TOKEN IN EXPRESSION - i_over_not_g.md:2:2:2:2 # PROBLEMS **UNEXPECTED TOKEN IN EXPRESSION** The token is not expected in an expression. @@ -25,6 +24,14 @@ Here is the problematic code: +**UNDEFINED VARIABLE** +Nothing is named `i` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNKNOWN OPERATOR** +This looks like an operator, but it's not one I recognize! +Check the spelling and make sure you're using a valid Roc operator. + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpSlash(1:2-1:3),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/if_bang_then_bang_indented_else.md b/src/snapshots/old_syntax/if_bang_then_bang_indented_else.md index d3ddce029d..d6781a786c 100644 --- a/src/snapshots/old_syntax/if_bang_then_bang_indented_else.md +++ b/src/snapshots/old_syntax/if_bang_then_bang_indented_else.md @@ -12,9 +12,12 @@ t 5 ~~~ # EXPECTED -UNDEFINED VARIABLE - if_bang_then_bang_indented_else.md:1:2:1:11 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `if!a!then` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:2-1:11),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/if_bang_then_else_one_line.md b/src/snapshots/old_syntax/if_bang_then_else_one_line.md index 6a23136b45..635382b886 100644 --- a/src/snapshots/old_syntax/if_bang_then_else_one_line.md +++ b/src/snapshots/old_syntax/if_bang_then_else_one_line.md @@ -10,9 +10,12 @@ f=if!b!then""else "" ~~~ # EXPECTED -UNDEFINED VARIABLE - if_bang_then_else_one_line.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `f` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpAssign(1:2-1:3),LowerIdent(1:3-1:12),StringStart(1:12-1:13),StringPart(1:13-1:13),StringEnd(1:13-1:14),KwElse(1:14-1:18),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/if_def.md b/src/snapshots/old_syntax/if_def.md index e3385b3e58..647d76cd53 100644 --- a/src/snapshots/old_syntax/if_def.md +++ b/src/snapshots/old_syntax/if_def.md @@ -10,9 +10,12 @@ iffy=5 42 ~~~ # EXPECTED -UNDEFINED VARIABLE - if_def.md:1:1:1:5 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `iffy` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:5),OpAssign(1:5-1:6),Int(1:6-1:7),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/if_guard_without_condition.md b/src/snapshots/old_syntax/if_guard_without_condition.md index 78fa483851..ce3f9c3579 100644 --- a/src/snapshots/old_syntax/if_guard_without_condition.md +++ b/src/snapshots/old_syntax/if_guard_without_condition.md @@ -13,9 +13,12 @@ when Just 4 is 2 ~~~ # EXPECTED -UNDEFINED VARIABLE - if_guard_without_condition.md:1:1:1:5 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `when` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:5),UpperIdent(1:6-1:10),Int(1:11-1:12),LowerIdent(1:13-1:15),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/if_missing_else.md b/src/snapshots/old_syntax/if_missing_else.md index 59db89105a..1e9c8381c4 100644 --- a/src/snapshots/old_syntax/if_missing_else.md +++ b/src/snapshots/old_syntax/if_missing_else.md @@ -8,7 +8,7 @@ type=expr if 5 == 5 then 2 ~~~ # EXPECTED -no_else - if_missing_else.md:1:16:1:17 +PARSE ERROR - if_missing_else.md:1:16:1:17 # PROBLEMS **PARSE ERROR** A parsing error occurred: `no_else` diff --git a/src/snapshots/old_syntax/if_newline_then_negate_else_recordupdater.md b/src/snapshots/old_syntax/if_newline_then_negate_else_recordupdater.md index 8fe49d3266..dedd2124ec 100644 --- a/src/snapshots/old_syntax/if_newline_then_negate_else_recordupdater.md +++ b/src/snapshots/old_syntax/if_newline_then_negate_else_recordupdater.md @@ -12,8 +12,6 @@ else&m ~~~ # EXPECTED UNEXPECTED TOKEN IN EXPRESSION - if_newline_then_negate_else_recordupdater.md:4:5:4:7 -UNDEFINED VARIABLE - if_newline_then_negate_else_recordupdater.md:2:1:2:2 -UNDEFINED VARIABLE - if_newline_then_negate_else_recordupdater.md:3:1:3:7 # PROBLEMS **UNEXPECTED TOKEN IN EXPRESSION** The token **&m** is not expected in an expression. @@ -27,6 +25,21 @@ else&m ^^ +**UNDEFINED VARIABLE** +Nothing is named `h` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `then!f` in this scope. +Is there an `import` or `exposing` missing up-top? + +**INVALID IF BRANCH** +The `else` branch of this `if` expression could not be processed. + +The `else` branch must contain a valid expression. Check for syntax errors or missing values. + +Note: Every `if` expression in Roc must have an `else` branch, and both branches must have the same type. + # TOKENS ~~~zig KwIf(1:1-1:3),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/if_outdented_else_branch.md b/src/snapshots/old_syntax/if_outdented_else_branch.md index 967e4d5885..8bce6afd49 100644 --- a/src/snapshots/old_syntax/if_outdented_else_branch.md +++ b/src/snapshots/old_syntax/if_outdented_else_branch.md @@ -11,6 +11,7 @@ else something better ~~~ # EXPECTED +PARSE ERROR - if_outdented_else_branch.md:2:5:2:5 # PROBLEMS **PARSE ERROR** A parsing error occurred: `no_else` diff --git a/src/snapshots/old_syntax/if_outdented_then.md b/src/snapshots/old_syntax/if_outdented_then.md index 1daaa8018b..752285b1e3 100644 --- a/src/snapshots/old_syntax/if_outdented_then.md +++ b/src/snapshots/old_syntax/if_outdented_then.md @@ -12,9 +12,12 @@ then 2 else 3 x ~~~ # EXPECTED -UNDEFINED VARIABLE - if_outdented_then.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `x` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpAssign(1:3-1:4),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/if_then_weird_indent.md b/src/snapshots/old_syntax/if_then_weird_indent.md index 7a84ca9074..2423b245e3 100644 --- a/src/snapshots/old_syntax/if_then_weird_indent.md +++ b/src/snapshots/old_syntax/if_then_weird_indent.md @@ -14,6 +14,7 @@ A r ~~~ # EXPECTED +PARSE ERROR - if_then_weird_indent.md:4:1:4:1 # PROBLEMS **PARSE ERROR** A parsing error occurred: `no_else` diff --git a/src/snapshots/old_syntax/ifbang_eqeq.md b/src/snapshots/old_syntax/ifbang_eqeq.md index 9ec41d6ed2..d28abff7f3 100644 --- a/src/snapshots/old_syntax/ifbang_eqeq.md +++ b/src/snapshots/old_syntax/ifbang_eqeq.md @@ -8,9 +8,12 @@ type=expr if!==9 ~~~ # EXPECTED -UNDEFINED VARIABLE - ifbang_eqeq.md:1:1:1:4 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `if!` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:4),OpEquals(1:4-1:6),Int(1:6-1:7),EndOfFile(1:7-1:7), diff --git a/src/snapshots/old_syntax/implements_in_pat_after_comment.md b/src/snapshots/old_syntax/implements_in_pat_after_comment.md index c365cc7cda..4e389a5d67 100644 --- a/src/snapshots/old_syntax/implements_in_pat_after_comment.md +++ b/src/snapshots/old_syntax/implements_in_pat_after_comment.md @@ -10,9 +10,12 @@ s# s ~~~ # EXPECTED -UNDEFINED VARIABLE - implements_in_pat_after_comment.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `s` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),Newline(1:3-1:3), diff --git a/src/snapshots/old_syntax/implements_in_pnc_pattern.md b/src/snapshots/old_syntax/implements_in_pnc_pattern.md index 8efd42f868..fd51a062c8 100644 --- a/src/snapshots/old_syntax/implements_in_pnc_pattern.md +++ b/src/snapshots/old_syntax/implements_in_pnc_pattern.md @@ -10,8 +10,6 @@ c ~~~ # EXPECTED UNEXPECTED TOKEN IN EXPRESSION - implements_in_pnc_pattern.md:1:3:1:14 -UNDEFINED VARIABLE - implements_in_pnc_pattern.md:1:1:1:2 -UNDEFINED VARIABLE - implements_in_pnc_pattern.md:1:14:1:15 # PROBLEMS **UNEXPECTED TOKEN IN EXPRESSION** The token **implements,** is not expected in an expression. @@ -25,6 +23,14 @@ g(implements,x)=c ^^^^^^^^^^^ +**UNDEFINED VARIABLE** +Nothing is named `g` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `x` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),NoSpaceOpenRound(1:2-1:3),KwImplements(1:3-1:13),Comma(1:13-1:14),LowerIdent(1:14-1:15),CloseRound(1:15-1:16),OpAssign(1:16-1:17),LowerIdent(1:17-1:18),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/inline_hastype.md b/src/snapshots/old_syntax/inline_hastype.md index 883208a87a..a3eace4704 100644 --- a/src/snapshots/old_syntax/inline_hastype.md +++ b/src/snapshots/old_syntax/inline_hastype.md @@ -11,9 +11,12 @@ main = 3 ~~~ # EXPECTED -UNDEFINED VARIABLE - inline_hastype.md:1:1:1:5 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `main` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:5),OpAssign(1:6-1:7),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/invalid_operator.md b/src/snapshots/old_syntax/invalid_operator.md index dcce9ed6c9..891f68b687 100644 --- a/src/snapshots/old_syntax/invalid_operator.md +++ b/src/snapshots/old_syntax/invalid_operator.md @@ -9,9 +9,12 @@ main = 5 ** 3 ~~~ # EXPECTED -UNDEFINED VARIABLE - invalid_operator.md:1:1:1:5 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `main` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:5),OpAssign(1:6-1:7),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/list_closing_indent_not_enough.md b/src/snapshots/old_syntax/list_closing_indent_not_enough.md index 3c2a68f763..6478dce4c7 100644 --- a/src/snapshots/old_syntax/list_closing_indent_not_enough.md +++ b/src/snapshots/old_syntax/list_closing_indent_not_enough.md @@ -16,9 +16,12 @@ myList = [ 42 ~~~ # EXPECTED -UNDEFINED VARIABLE - list_closing_indent_not_enough.md:1:1:1:7 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `myList` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:7),OpAssign(1:8-1:9),OpenSquare(1:10-1:11),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/list_closing_same_indent_no_trailing_comma.md b/src/snapshots/old_syntax/list_closing_same_indent_no_trailing_comma.md index 05a75c174b..20c0f2989f 100644 --- a/src/snapshots/old_syntax/list_closing_same_indent_no_trailing_comma.md +++ b/src/snapshots/old_syntax/list_closing_same_indent_no_trailing_comma.md @@ -12,9 +12,12 @@ myList = [ 42 ~~~ # EXPECTED -UNDEFINED VARIABLE - list_closing_same_indent_no_trailing_comma.md:1:1:1:7 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `myList` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:7),OpAssign(1:8-1:9),OpenSquare(1:10-1:11),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/list_closing_same_indent_with_trailing_comma.md b/src/snapshots/old_syntax/list_closing_same_indent_with_trailing_comma.md index ecee1bf30c..35f443c198 100644 --- a/src/snapshots/old_syntax/list_closing_same_indent_with_trailing_comma.md +++ b/src/snapshots/old_syntax/list_closing_same_indent_with_trailing_comma.md @@ -12,9 +12,12 @@ myList = [ 42 ~~~ # EXPECTED -UNDEFINED VARIABLE - list_closing_same_indent_with_trailing_comma.md:1:1:1:7 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `myList` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:7),OpAssign(1:8-1:9),OpenSquare(1:10-1:11),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/list_comma_newlines.md b/src/snapshots/old_syntax/list_comma_newlines.md index 5bc6983789..7c01211361 100644 --- a/src/snapshots/old_syntax/list_comma_newlines.md +++ b/src/snapshots/old_syntax/list_comma_newlines.md @@ -10,9 +10,12 @@ type=expr ] ~~~ # EXPECTED -UNDEFINED VARIABLE - list_comma_newlines.md:1:2:1:3 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `s` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig OpenSquare(1:1-1:2),LowerIdent(1:2-1:3),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/list_comment_newline.md b/src/snapshots/old_syntax/list_comment_newline.md index f212731114..360d29496f 100644 --- a/src/snapshots/old_syntax/list_comment_newline.md +++ b/src/snapshots/old_syntax/list_comment_newline.md @@ -11,7 +11,7 @@ type=expr ] ~~~ # EXPECTED -expected_expr_close_square_or_comma - list_comment_newline.md:4:1:4:2 +LIST NOT CLOSED - list_comment_newline.md:4:1:4:2 # PROBLEMS **LIST NOT CLOSED** This list is missing a closing bracket or has a syntax error. diff --git a/src/snapshots/old_syntax/list_double_comma.md b/src/snapshots/old_syntax/list_double_comma.md index bc0a7bf56d..9082064879 100644 --- a/src/snapshots/old_syntax/list_double_comma.md +++ b/src/snapshots/old_syntax/list_double_comma.md @@ -9,7 +9,7 @@ type=expr ~~~ # EXPECTED UNEXPECTED TOKEN IN EXPRESSION - list_double_comma.md:1:8:1:11 -expected_expr_close_square_or_comma - list_double_comma.md:1:11:1:12 +LIST NOT CLOSED - list_double_comma.md:1:11:1:12 # PROBLEMS **UNEXPECTED TOKEN IN EXPRESSION** The token **, 3** is not expected in an expression. diff --git a/src/snapshots/old_syntax/list_lots_of_spaces.md b/src/snapshots/old_syntax/list_lots_of_spaces.md index fa26960dd6..0722c4dd8c 100644 --- a/src/snapshots/old_syntax/list_lots_of_spaces.md +++ b/src/snapshots/old_syntax/list_lots_of_spaces.md @@ -13,7 +13,7 @@ type=expr u] ~~~ # EXPECTED -expected_expr_close_square_or_comma - list_lots_of_spaces.md:6:2:6:3 +LIST NOT CLOSED - list_lots_of_spaces.md:6:2:6:3 # PROBLEMS **LIST NOT CLOSED** This list is missing a closing bracket or has a syntax error. diff --git a/src/snapshots/old_syntax/list_minus_newlines.md b/src/snapshots/old_syntax/list_minus_newlines.md index 11721a9e3f..5774ea9931 100644 --- a/src/snapshots/old_syntax/list_minus_newlines.md +++ b/src/snapshots/old_syntax/list_minus_newlines.md @@ -9,9 +9,12 @@ type=expr ]-i ~~~ # EXPECTED -UNDEFINED VARIABLE - list_minus_newlines.md:2:3:2:4 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `i` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig OpenSquare(1:1-1:2),UpperIdent(1:2-1:3),Comma(1:3-1:4),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/list_pattern_not_terminated.md b/src/snapshots/old_syntax/list_pattern_not_terminated.md index 6faebe06dd..8f4279f9ca 100644 --- a/src/snapshots/old_syntax/list_pattern_not_terminated.md +++ b/src/snapshots/old_syntax/list_pattern_not_terminated.md @@ -9,9 +9,12 @@ when [] is [1, 2, -> "" ~~~ # EXPECTED -UNDEFINED VARIABLE - list_pattern_not_terminated.md:1:1:1:5 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `when` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:5),OpenSquare(1:6-1:7),CloseSquare(1:7-1:8),LowerIdent(1:9-1:11),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/list_pattern_weird_indent.md b/src/snapshots/old_syntax/list_pattern_weird_indent.md index ba5351dcec..97753357e5 100644 --- a/src/snapshots/old_syntax/list_pattern_weird_indent.md +++ b/src/snapshots/old_syntax/list_pattern_weird_indent.md @@ -10,9 +10,12 @@ when [] is 3] -> "" ~~~ # EXPECTED -UNDEFINED VARIABLE - list_pattern_weird_indent.md:1:1:1:5 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `when` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:5),OpenSquare(1:6-1:7),CloseSquare(1:7-1:8),LowerIdent(1:9-1:11),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/list_pattern_weird_rest_pattern.md b/src/snapshots/old_syntax/list_pattern_weird_rest_pattern.md index cd51ca1bd2..8eb6849765 100644 --- a/src/snapshots/old_syntax/list_pattern_weird_rest_pattern.md +++ b/src/snapshots/old_syntax/list_pattern_weird_rest_pattern.md @@ -9,9 +9,12 @@ when [] is [...] -> "" ~~~ # EXPECTED -UNDEFINED VARIABLE - list_pattern_weird_rest_pattern.md:1:1:1:5 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `when` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:5),OpenSquare(1:6-1:7),CloseSquare(1:7-1:8),LowerIdent(1:9-1:11),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/list_patterns.md b/src/snapshots/old_syntax/list_patterns.md index f43b50ed2b..d5fafb4dec 100644 --- a/src/snapshots/old_syntax/list_patterns.md +++ b/src/snapshots/old_syntax/list_patterns.md @@ -16,9 +16,12 @@ when [] is [[[], []], [[], x]] -> {} ~~~ # EXPECTED -UNDEFINED VARIABLE - list_patterns.md:1:1:1:5 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `when` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:5),OpenSquare(1:6-1:7),CloseSquare(1:7-1:8),LowerIdent(1:9-1:11),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/list_without_end.md b/src/snapshots/old_syntax/list_without_end.md index 5dd04488a8..b993eec4fc 100644 --- a/src/snapshots/old_syntax/list_without_end.md +++ b/src/snapshots/old_syntax/list_without_end.md @@ -8,7 +8,7 @@ type=expr [1, 2, ~~~ # EXPECTED -expected_expr_close_square_or_comma - list_without_end.md:1:7:1:7 +LIST NOT CLOSED - list_without_end.md:1:7:1:7 # PROBLEMS **LIST NOT CLOSED** This list is missing a closing bracket or has a syntax error. diff --git a/src/snapshots/old_syntax/long_complex_application_with_pnc.md b/src/snapshots/old_syntax/long_complex_application_with_pnc.md index 0e39f71c27..c9df7a194d 100644 --- a/src/snapshots/old_syntax/long_complex_application_with_pnc.md +++ b/src/snapshots/old_syntax/long_complex_application_with_pnc.md @@ -12,14 +12,32 @@ combine(mix(vodka, gin), Juices({ })) ~~~ # EXPECTED -UNDEFINED VARIABLE - long_complex_application_with_pnc.md:1:1:1:8 -UNDEFINED VARIABLE - long_complex_application_with_pnc.md:1:9:1:12 -UNDEFINED VARIABLE - long_complex_application_with_pnc.md:1:13:1:18 -UNDEFINED VARIABLE - long_complex_application_with_pnc.md:1:20:1:23 -UNDEFINED VARIABLE - long_complex_application_with_pnc.md:2:12:2:25 -UNDEFINED VARIABLE - long_complex_application_with_pnc.md:3:13:3:27 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `combine` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `mix` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `vodka` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `gin` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `orange` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `orange` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:8),NoSpaceOpenRound(1:8-1:9),LowerIdent(1:9-1:12),NoSpaceOpenRound(1:12-1:13),LowerIdent(1:13-1:18),Comma(1:18-1:19),LowerIdent(1:20-1:23),CloseRound(1:23-1:24),Comma(1:24-1:25),UpperIdent(1:26-1:32),NoSpaceOpenRound(1:32-1:33),OpenCurly(1:33-1:34),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/malformed_pattern_field_access.md b/src/snapshots/old_syntax/malformed_pattern_field_access.md index 2ee674c28d..ee312f745a 100644 --- a/src/snapshots/old_syntax/malformed_pattern_field_access.md +++ b/src/snapshots/old_syntax/malformed_pattern_field_access.md @@ -10,9 +10,12 @@ when x is _ -> 4 ~~~ # EXPECTED -UNDEFINED VARIABLE - malformed_pattern_field_access.md:1:1:1:5 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `when` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:5),LowerIdent(1:6-1:7),LowerIdent(1:8-1:10),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/malformed_pattern_module_name.md b/src/snapshots/old_syntax/malformed_pattern_module_name.md index bfddd69efb..c6267806ec 100644 --- a/src/snapshots/old_syntax/malformed_pattern_module_name.md +++ b/src/snapshots/old_syntax/malformed_pattern_module_name.md @@ -10,9 +10,12 @@ when x is _ -> 4 ~~~ # EXPECTED -UNDEFINED VARIABLE - malformed_pattern_module_name.md:1:1:1:5 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `when` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:5),LowerIdent(1:6-1:7),LowerIdent(1:8-1:10),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/mega_parens_pat.md b/src/snapshots/old_syntax/mega_parens_pat.md index 4f5d6e27d9..daad11cfc6 100644 --- a/src/snapshots/old_syntax/mega_parens_pat.md +++ b/src/snapshots/old_syntax/mega_parens_pat.md @@ -11,7 +11,7 @@ type=expr e ~~~ # EXPECTED -expected_expr_apply_close_round - mega_parens_pat.md:1:1:1:3 +PARSE ERROR - mega_parens_pat.md:1:1:1:3 # PROBLEMS **PARSE ERROR** A parsing error occurred: `expected_expr_apply_close_round` diff --git a/src/snapshots/old_syntax/middle_when_branch_comment_after_parens.md b/src/snapshots/old_syntax/middle_when_branch_comment_after_parens.md index d9cf86209f..f81c0fd6ae 100644 --- a/src/snapshots/old_syntax/middle_when_branch_comment_after_parens.md +++ b/src/snapshots/old_syntax/middle_when_branch_comment_after_parens.md @@ -11,9 +11,12 @@ O->(s O->t ~~~ # EXPECTED -UNDEFINED VARIABLE - middle_when_branch_comment_after_parens.md:1:1:1:5 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `when` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:5),LowerIdent(1:6-1:7),LowerIdent(1:8-1:10),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/minus_minus_six.md b/src/snapshots/old_syntax/minus_minus_six.md index 276c1f19c4..eb2f6a88f1 100644 --- a/src/snapshots/old_syntax/minus_minus_six.md +++ b/src/snapshots/old_syntax/minus_minus_six.md @@ -9,7 +9,7 @@ type=expr ~~~ # EXPECTED UNEXPECTED TOKEN IN EXPRESSION - minus_minus_six.md:1:2:1:4 -expected_expr_close_round_or_comma - minus_minus_six.md:1:6:1:8 +PARSE ERROR - minus_minus_six.md:1:6:1:8 # PROBLEMS **UNEXPECTED TOKEN IN EXPRESSION** The token **-(** is not expected in an expression. diff --git a/src/snapshots/old_syntax/minus_newline_minus.md b/src/snapshots/old_syntax/minus_newline_minus.md index 507137e1b1..871a3c04fc 100644 --- a/src/snapshots/old_syntax/minus_newline_minus.md +++ b/src/snapshots/old_syntax/minus_newline_minus.md @@ -10,8 +10,6 @@ s- ~~~ # EXPECTED UNEXPECTED TOKEN IN EXPRESSION - minus_newline_minus.md:2:2:2:4 -UNDEFINED VARIABLE - minus_newline_minus.md:1:1:1:2 -expr_not_canonicalized - minus_newline_minus.md:1:1:2:4 # PROBLEMS **UNEXPECTED TOKEN IN EXPRESSION** The token **-{** is not expected in an expression. @@ -25,6 +23,14 @@ Here is the problematic code: ^^ +**UNDEFINED VARIABLE** +Nothing is named `s` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNKNOWN OPERATOR** +This looks like an operator, but it's not one I recognize! +Check the spelling and make sure you're using a valid Roc operator. + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpBinaryMinus(1:2-1:3),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/minus_newline_minus_minus.md b/src/snapshots/old_syntax/minus_newline_minus_minus.md index 6274df2a81..89466acd65 100644 --- a/src/snapshots/old_syntax/minus_newline_minus_minus.md +++ b/src/snapshots/old_syntax/minus_newline_minus_minus.md @@ -10,8 +10,6 @@ p- ~~~ # EXPECTED UNEXPECTED TOKEN IN EXPRESSION - minus_newline_minus_minus.md:2:2:2:4 -UNDEFINED VARIABLE - minus_newline_minus_minus.md:1:1:1:2 -expr_not_canonicalized - minus_newline_minus_minus.md:1:1:2:4 # PROBLEMS **UNEXPECTED TOKEN IN EXPRESSION** The token **-t** is not expected in an expression. @@ -25,6 +23,14 @@ Here is the problematic code: ^^ +**UNDEFINED VARIABLE** +Nothing is named `p` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNKNOWN OPERATOR** +This looks like an operator, but it's not one I recognize! +Check the spelling and make sure you're using a valid Roc operator. + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpBinaryMinus(1:2-1:3),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/module_dot_tuple.md b/src/snapshots/old_syntax/module_dot_tuple.md index 155d68d244..50f6f09808 100644 --- a/src/snapshots/old_syntax/module_dot_tuple.md +++ b/src/snapshots/old_syntax/module_dot_tuple.md @@ -8,7 +8,7 @@ type=expr I.5 ~~~ # EXPECTED -expr_no_space_dot_int - module_dot_tuple.md:1:2:1:4 +PARSE ERROR - module_dot_tuple.md:1:2:1:4 # PROBLEMS **PARSE ERROR** A parsing error occurred: `expr_no_space_dot_int` diff --git a/src/snapshots/old_syntax/mul_comment_neg.md b/src/snapshots/old_syntax/mul_comment_neg.md index ab7af63ec7..3e69760b1f 100644 --- a/src/snapshots/old_syntax/mul_comment_neg.md +++ b/src/snapshots/old_syntax/mul_comment_neg.md @@ -10,10 +10,16 @@ n*f -f ~~~ # EXPECTED -UNDEFINED VARIABLE - mul_comment_neg.md:1:1:1:2 -UNDEFINED VARIABLE - mul_comment_neg.md:1:3:1:4 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `n` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `f` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpStar(1:2-1:3),LowerIdent(1:3-1:4),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/multilin_str_body.md b/src/snapshots/old_syntax/multilin_str_body.md index 41894822b0..7e5fefb52a 100644 --- a/src/snapshots/old_syntax/multilin_str_body.md +++ b/src/snapshots/old_syntax/multilin_str_body.md @@ -9,9 +9,12 @@ a=""""f""" f ~~~ # EXPECTED -UNDEFINED VARIABLE - multilin_str_body.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `a` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpAssign(1:2-1:3),MultilineStringStart(1:3-1:6),StringPart(1:6-1:8),MultilineStringEnd(1:8-1:11),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/multiline_binop_when_with_comments.md b/src/snapshots/old_syntax/multiline_binop_when_with_comments.md index bd5bb6c349..522fe75520 100644 --- a/src/snapshots/old_syntax/multiline_binop_when_with_comments.md +++ b/src/snapshots/old_syntax/multiline_binop_when_with_comments.md @@ -32,9 +32,12 @@ is 42 ~~~ # EXPECTED -UNDEFINED VARIABLE - multiline_binop_when_with_comments.md:1:1:1:5 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `when` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:5),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/multiline_str_apply_in_parens_pat.md b/src/snapshots/old_syntax/multiline_str_apply_in_parens_pat.md index a1f698a108..d93f1a876c 100644 --- a/src/snapshots/old_syntax/multiline_str_apply_in_parens_pat.md +++ b/src/snapshots/old_syntax/multiline_str_apply_in_parens_pat.md @@ -9,9 +9,12 @@ u ("""""" (0)):f s ~~~ # EXPECTED -UNDEFINED VARIABLE - multiline_str_apply_in_parens_pat.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `u` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpenRound(1:3-1:4),MultilineStringStart(1:4-1:7),StringPart(1:7-1:7),MultilineStringEnd(1:7-1:10),OpenRound(1:11-1:12),Int(1:12-1:13),CloseRound(1:13-1:14),CloseRound(1:14-1:15),OpColon(1:15-1:16),LowerIdent(1:16-1:17),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/multiline_str_in_closure_in_when_guard_wtf.md b/src/snapshots/old_syntax/multiline_str_in_closure_in_when_guard_wtf.md index 69438da3f5..2c0f73d8d7 100644 --- a/src/snapshots/old_syntax/multiline_str_in_closure_in_when_guard_wtf.md +++ b/src/snapshots/old_syntax/multiline_str_in_closure_in_when_guard_wtf.md @@ -10,9 +10,12 @@ is s if\t->""""""->e ~~~ # EXPECTED -UNDEFINED VARIABLE - multiline_str_in_closure_in_when_guard_wtf.md:1:1:1:5 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `when` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:5),LowerIdent(1:6-1:7),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/multiline_str_opt_field.md b/src/snapshots/old_syntax/multiline_str_opt_field.md index 1420008580..695bd9c07e 100644 --- a/src/snapshots/old_syntax/multiline_str_opt_field.md +++ b/src/snapshots/old_syntax/multiline_str_opt_field.md @@ -11,7 +11,6 @@ type=expr UNEXPECTED TOKEN IN EXPRESSION - multiline_str_opt_field.md:1:4:1:7 UNEXPECTED TOKEN IN EXPRESSION - multiline_str_opt_field.md:1:7:1:10 UNEXPECTED TOKEN IN EXPRESSION - multiline_str_opt_field.md:1:7:1:11 -not_implemented - multiline_str_opt_field.md:1:1:1:1 # PROBLEMS **UNEXPECTED TOKEN IN EXPRESSION** The token **"""** is not expected in an expression. @@ -49,6 +48,10 @@ Here is the problematic code: ^^^^ +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: canonicalize suffix_single_question expression +Let us know if you want to help! + # TOKENS ~~~zig OpenCurly(1:1-1:2),LowerIdent(1:2-1:3),NoSpaceOpQuestion(1:3-1:4),MultilineStringStart(1:4-1:7),StringPart(1:7-1:7),MultilineStringEnd(1:7-1:10),CloseCurly(1:10-1:11),StringStart(1:11-1:12),StringPart(1:12-1:12),StringEnd(1:12-1:13),EndOfFile(1:13-1:13), diff --git a/src/snapshots/old_syntax/multiline_str_pnc_apply_in_assignment_newline.md b/src/snapshots/old_syntax/multiline_str_pnc_apply_in_assignment_newline.md index 1093faea9b..54cccfb646 100644 --- a/src/snapshots/old_syntax/multiline_str_pnc_apply_in_assignment_newline.md +++ b/src/snapshots/old_syntax/multiline_str_pnc_apply_in_assignment_newline.md @@ -9,7 +9,7 @@ type=expr e)m ~~~ # EXPECTED -expected_expr_close_round_or_comma - multiline_str_pnc_apply_in_assignment_newline.md:1:11:1:14 +PARSE ERROR - multiline_str_pnc_apply_in_assignment_newline.md:1:11:1:14 # PROBLEMS **PARSE ERROR** A parsing error occurred: `expected_expr_close_round_or_comma` diff --git a/src/snapshots/old_syntax/multiline_str_pnc_apply_in_assignment_record_access_newline.md b/src/snapshots/old_syntax/multiline_str_pnc_apply_in_assignment_record_access_newline.md index 18f81123d7..bc92c20ea7 100644 --- a/src/snapshots/old_syntax/multiline_str_pnc_apply_in_assignment_record_access_newline.md +++ b/src/snapshots/old_syntax/multiline_str_pnc_apply_in_assignment_record_access_newline.md @@ -9,9 +9,12 @@ i=""""""().1 p ~~~ # EXPECTED -UNDEFINED VARIABLE - multiline_str_pnc_apply_in_assignment_record_access_newline.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `i` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpAssign(1:2-1:3),MultilineStringStart(1:3-1:6),StringPart(1:6-1:6),MultilineStringEnd(1:6-1:9),NoSpaceOpenRound(1:9-1:10),CloseRound(1:10-1:11),NoSpaceDotInt(1:11-1:13),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/multiline_string.md b/src/snapshots/old_syntax/multiline_string.md index 59cedb87c3..026b6abdbe 100644 --- a/src/snapshots/old_syntax/multiline_string.md +++ b/src/snapshots/old_syntax/multiline_string.md @@ -16,9 +16,12 @@ c = 42 ~~~ # EXPECTED -UNDEFINED VARIABLE - multiline_string.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `a` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpAssign(1:3-1:4),StringStart(1:5-1:6),StringPart(1:6-1:22),StringEnd(1:22-1:23),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/multiline_string_in_apply.md b/src/snapshots/old_syntax/multiline_string_in_apply.md index ff293fcadd..dbdf5a0a28 100644 --- a/src/snapshots/old_syntax/multiline_string_in_apply.md +++ b/src/snapshots/old_syntax/multiline_string_in_apply.md @@ -8,9 +8,12 @@ type=expr e""""\"""" ~~~ # EXPECTED -UNDEFINED VARIABLE - multiline_string_in_apply.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `e` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),MultilineStringStart(1:2-1:5),StringPart(1:5-1:8),MultilineStringEnd(1:8-1:11),EndOfFile(1:11-1:11), diff --git a/src/snapshots/old_syntax/multiline_type_signature.md b/src/snapshots/old_syntax/multiline_type_signature.md index 33ccf66955..7601f7c75f 100644 --- a/src/snapshots/old_syntax/multiline_type_signature.md +++ b/src/snapshots/old_syntax/multiline_type_signature.md @@ -11,9 +11,12 @@ f : 42 ~~~ # EXPECTED -UNDEFINED VARIABLE - multiline_type_signature.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `f` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpColon(1:3-1:4),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/multiline_type_signature_with_comment.md b/src/snapshots/old_syntax/multiline_type_signature_with_comment.md index 73d33189eb..405299252a 100644 --- a/src/snapshots/old_syntax/multiline_type_signature_with_comment.md +++ b/src/snapshots/old_syntax/multiline_type_signature_with_comment.md @@ -11,9 +11,12 @@ f :# comment 42 ~~~ # EXPECTED -UNDEFINED VARIABLE - multiline_type_signature_with_comment.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `f` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpColon(1:3-1:4),Newline(1:5-1:13), diff --git a/src/snapshots/old_syntax/multiple_fields.md b/src/snapshots/old_syntax/multiple_fields.md index a4a931b96a..141037d6e8 100644 --- a/src/snapshots/old_syntax/multiple_fields.md +++ b/src/snapshots/old_syntax/multiple_fields.md @@ -8,9 +8,12 @@ type=expr rec.abc.def.ghi ~~~ # EXPECTED -UNDEFINED VARIABLE - multiple_fields.md:1:1:1:4 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `rec` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:4),NoSpaceDotLowerIdent(1:4-1:8),NoSpaceDotLowerIdent(1:8-1:12),NoSpaceDotLowerIdent(1:12-1:16),EndOfFile(1:16-1:16), diff --git a/src/snapshots/old_syntax/neg_float_literal_pnc_apply_pat.md b/src/snapshots/old_syntax/neg_float_literal_pnc_apply_pat.md index df883debc5..a7db444d7d 100644 --- a/src/snapshots/old_syntax/neg_float_literal_pnc_apply_pat.md +++ b/src/snapshots/old_syntax/neg_float_literal_pnc_apply_pat.md @@ -10,7 +10,7 @@ p ~~~ # EXPECTED UNEXPECTED TOKEN IN EXPRESSION - neg_float_literal_pnc_apply_pat.md:1:2:1:4 -expected_expr_close_round_or_comma - neg_float_literal_pnc_apply_pat.md:1:5:1:7 +PARSE ERROR - neg_float_literal_pnc_apply_pat.md:1:5:1:7 # PROBLEMS **UNEXPECTED TOKEN IN EXPRESSION** The token **-8** is not expected in an expression. diff --git a/src/snapshots/old_syntax/negative_in_apply_def.md b/src/snapshots/old_syntax/negative_in_apply_def.md index fe097c6679..f68a5de6e7 100644 --- a/src/snapshots/old_syntax/negative_in_apply_def.md +++ b/src/snapshots/old_syntax/negative_in_apply_def.md @@ -10,9 +10,12 @@ a=A a ~~~ # EXPECTED -UNDEFINED VARIABLE - negative_in_apply_def.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `a` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpAssign(1:2-1:3),UpperIdent(1:3-1:4),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/nested_if.md b/src/snapshots/old_syntax/nested_if.md index 8d8fc4616b..5a69a60609 100644 --- a/src/snapshots/old_syntax/nested_if.md +++ b/src/snapshots/old_syntax/nested_if.md @@ -13,6 +13,7 @@ else 3 ~~~ # EXPECTED +PARSE ERROR - nested_if.md:2:3:2:3 # PROBLEMS **PARSE ERROR** A parsing error occurred: `no_else` diff --git a/src/snapshots/old_syntax/nested_if_unindented.md b/src/snapshots/old_syntax/nested_if_unindented.md index e10f287087..86385b6786 100644 --- a/src/snapshots/old_syntax/nested_if_unindented.md +++ b/src/snapshots/old_syntax/nested_if_unindented.md @@ -10,10 +10,6 @@ if""then-p else.e ~~~ # EXPECTED UNEXPECTED TOKEN IN EXPRESSION - nested_if_unindented.md:2:16:2:18 -UNDEFINED VARIABLE - nested_if_unindented.md:1:5:1:9 -UNDEFINED VARIABLE - nested_if_unindented.md:1:10:1:11 -UNDEFINED VARIABLE - nested_if_unindented.md:2:5:2:9 -UNDEFINED VARIABLE - nested_if_unindented.md:2:10:2:11 # PROBLEMS **UNEXPECTED TOKEN IN EXPRESSION** The token **.e** is not expected in an expression. @@ -27,6 +23,29 @@ if""then-p else.e ^^ +**UNDEFINED VARIABLE** +Nothing is named `then` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `p` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `then` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `p` in this scope. +Is there an `import` or `exposing` missing up-top? + +**INVALID IF BRANCH** +The `else` branch of this `if` expression could not be processed. + +The `else` branch must contain a valid expression. Check for syntax errors or missing values. + +Note: Every `if` expression in Roc must have an `else` branch, and both branches must have the same type. + **INVALID IF CONDITION** This `if` condition needs to be a _Bool_: **nested_if_unindented.md:1:3:** diff --git a/src/snapshots/old_syntax/nested_parens_in_pattern.md b/src/snapshots/old_syntax/nested_parens_in_pattern.md index be5c56abf3..b7a4fe3ea8 100644 --- a/src/snapshots/old_syntax/nested_parens_in_pattern.md +++ b/src/snapshots/old_syntax/nested_parens_in_pattern.md @@ -9,7 +9,7 @@ type=expr i ~~~ # EXPECTED -expected_expr_close_round_or_comma - nested_parens_in_pattern.md:1:6:1:8 +PARSE ERROR - nested_parens_in_pattern.md:1:6:1:8 # PROBLEMS **PARSE ERROR** A parsing error occurred: `expected_expr_close_round_or_comma` diff --git a/src/snapshots/old_syntax/nested_when_comment_in_pat.md b/src/snapshots/old_syntax/nested_when_comment_in_pat.md index 4ccf03cf59..51f67eec88 100644 --- a/src/snapshots/old_syntax/nested_when_comment_in_pat.md +++ b/src/snapshots/old_syntax/nested_when_comment_in_pat.md @@ -11,9 +11,12 @@ O# 1->O ~~~ # EXPECTED -UNDEFINED VARIABLE - nested_when_comment_in_pat.md:1:1:1:5 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `when` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:5),Int(1:6-1:7),LowerIdent(1:8-1:10),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/nested_when_expect_binop_when.md b/src/snapshots/old_syntax/nested_when_expect_binop_when.md index a5fc5ced22..fdac6fb0eb 100644 --- a/src/snapshots/old_syntax/nested_when_expect_binop_when.md +++ b/src/snapshots/old_syntax/nested_when_expect_binop_when.md @@ -11,9 +11,12 @@ z->expect!%when s is z->q ~~~ # EXPECTED -UNDEFINED VARIABLE - nested_when_expect_binop_when.md:1:1:1:5 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `when` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:5),LowerIdent(1:6-1:7),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/newline_after_equals.md b/src/snapshots/old_syntax/newline_after_equals.md index 534344f177..5038ffa014 100644 --- a/src/snapshots/old_syntax/newline_after_equals.md +++ b/src/snapshots/old_syntax/newline_after_equals.md @@ -11,9 +11,12 @@ x = 42 ~~~ # EXPECTED -UNDEFINED VARIABLE - newline_after_equals.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `x` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpAssign(1:3-1:4),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/newline_after_opt_field.md b/src/snapshots/old_syntax/newline_after_opt_field.md index 3a4637ede4..eeba59ae4a 100644 --- a/src/snapshots/old_syntax/newline_after_opt_field.md +++ b/src/snapshots/old_syntax/newline_after_opt_field.md @@ -9,10 +9,16 @@ type=expr p} ~~~ # EXPECTED -not_implemented - newline_after_opt_field.md:1:1:1:1 -UNDEFINED VARIABLE - newline_after_opt_field.md:2:1:2:2 -# PROBLEMS NIL +# PROBLEMS +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: canonicalize suffix_single_question expression +Let us know if you want to help! + +**UNDEFINED VARIABLE** +Nothing is named `p` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig OpenCurly(1:1-1:2),LowerIdent(1:2-1:3),NoSpaceOpQuestion(1:3-1:4),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/newline_and_spaces_before_less_than.md b/src/snapshots/old_syntax/newline_and_spaces_before_less_than.md index 3d35cb78a1..2e4165882c 100644 --- a/src/snapshots/old_syntax/newline_and_spaces_before_less_than.md +++ b/src/snapshots/old_syntax/newline_and_spaces_before_less_than.md @@ -11,9 +11,12 @@ x = 1 42 ~~~ # EXPECTED -UNDEFINED VARIABLE - newline_and_spaces_before_less_than.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `x` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpAssign(1:3-1:4),Int(1:5-1:6),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/newline_before_operator_with_defs.md b/src/snapshots/old_syntax/newline_before_operator_with_defs.md index 2d394159c4..f2ee78fc0c 100644 --- a/src/snapshots/old_syntax/newline_before_operator_with_defs.md +++ b/src/snapshots/old_syntax/newline_before_operator_with_defs.md @@ -9,8 +9,7 @@ type=expr ==(Q:c 42) ~~~ # EXPECTED -expected_expr_close_round_or_comma - newline_before_operator_with_defs.md:2:10:2:11 -expr_not_canonicalized - newline_before_operator_with_defs.md:1:1:2:11 +PARSE ERROR - newline_before_operator_with_defs.md:2:10:2:11 # PROBLEMS **PARSE ERROR** A parsing error occurred: `expected_expr_close_round_or_comma` @@ -24,6 +23,10 @@ Here is the problematic code: ^ +**UNKNOWN OPERATOR** +This looks like an operator, but it's not one I recognize! +Check the spelling and make sure you're using a valid Roc operator. + # TOKENS ~~~zig Int(1:1-1:2),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/not_record_updater.md b/src/snapshots/old_syntax/not_record_updater.md index c26a28de08..a59b5ef06b 100644 --- a/src/snapshots/old_syntax/not_record_updater.md +++ b/src/snapshots/old_syntax/not_record_updater.md @@ -10,9 +10,12 @@ e &s ~~~ # EXPECTED -UNDEFINED VARIABLE - not_record_updater.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `e` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/number_literal_suffixes.md b/src/snapshots/old_syntax/number_literal_suffixes.md index 02e6252cc2..34bde6c241 100644 --- a/src/snapshots/old_syntax/number_literal_suffixes.md +++ b/src/snapshots/old_syntax/number_literal_suffixes.md @@ -41,40 +41,104 @@ type=expr } ~~~ # EXPECTED -invalid_num_literal - number_literal_suffixes.md:2:9:2:14 -invalid_num_literal - number_literal_suffixes.md:3:9:3:15 -invalid_num_literal - number_literal_suffixes.md:4:9:4:15 -invalid_num_literal - number_literal_suffixes.md:5:9:5:15 -invalid_num_literal - number_literal_suffixes.md:6:9:6:16 -invalid_num_literal - number_literal_suffixes.md:7:9:7:14 -invalid_num_literal - number_literal_suffixes.md:8:9:8:15 -invalid_num_literal - number_literal_suffixes.md:9:9:9:15 -invalid_num_literal - number_literal_suffixes.md:10:9:10:15 -invalid_num_literal - number_literal_suffixes.md:11:9:11:16 -invalid_num_literal - number_literal_suffixes.md:12:9:12:15 -invalid_num_literal - number_literal_suffixes.md:13:12:13:18 -invalid_num_literal - number_literal_suffixes.md:14:12:14:19 -invalid_num_literal - number_literal_suffixes.md:15:12:15:19 -invalid_num_literal - number_literal_suffixes.md:16:12:16:19 -invalid_num_literal - number_literal_suffixes.md:17:12:17:20 -invalid_num_literal - number_literal_suffixes.md:18:12:18:18 -invalid_num_literal - number_literal_suffixes.md:19:12:19:19 -invalid_num_literal - number_literal_suffixes.md:20:12:20:19 -invalid_num_literal - number_literal_suffixes.md:21:12:21:19 -invalid_num_literal - number_literal_suffixes.md:22:12:22:20 -invalid_num_literal - number_literal_suffixes.md:23:12:23:19 -invalid_num_literal - number_literal_suffixes.md:24:12:24:19 -invalid_num_literal - number_literal_suffixes.md:25:12:25:20 -invalid_num_literal - number_literal_suffixes.md:26:12:26:20 -invalid_num_literal - number_literal_suffixes.md:27:12:27:20 -invalid_num_literal - number_literal_suffixes.md:28:12:28:21 -invalid_num_literal - number_literal_suffixes.md:29:12:29:19 -invalid_num_literal - number_literal_suffixes.md:30:12:30:20 -invalid_num_literal - number_literal_suffixes.md:31:12:31:20 -invalid_num_literal - number_literal_suffixes.md:32:12:32:20 -invalid_num_literal - number_literal_suffixes.md:33:12:33:21 -# PROBLEMS NIL +# PROBLEMS +**INVALID NUMBER** +This number literal is not valid: 123u8 + +**INVALID NUMBER** +This number literal is not valid: 123u16 + +**INVALID NUMBER** +This number literal is not valid: 123u32 + +**INVALID NUMBER** +This number literal is not valid: 123u64 + +**INVALID NUMBER** +This number literal is not valid: 123u128 + +**INVALID NUMBER** +This number literal is not valid: 123i8 + +**INVALID NUMBER** +This number literal is not valid: 123i16 + +**INVALID NUMBER** +This number literal is not valid: 123i32 + +**INVALID NUMBER** +This number literal is not valid: 123i64 + +**INVALID NUMBER** +This number literal is not valid: 123i128 + +**INVALID NUMBER** +This number literal is not valid: 123dec + +**INVALID NUMBER** +This number literal is not valid: -123u8 + +**INVALID NUMBER** +This number literal is not valid: -123u16 + +**INVALID NUMBER** +This number literal is not valid: -123u32 + +**INVALID NUMBER** +This number literal is not valid: -123u64 + +**INVALID NUMBER** +This number literal is not valid: -123u128 + +**INVALID NUMBER** +This number literal is not valid: -123i8 + +**INVALID NUMBER** +This number literal is not valid: -123i16 + +**INVALID NUMBER** +This number literal is not valid: -123i32 + +**INVALID NUMBER** +This number literal is not valid: -123i64 + +**INVALID NUMBER** +This number literal is not valid: -123i128 + +**INVALID NUMBER** +This number literal is not valid: -123dec + +**INVALID NUMBER** +This number literal is not valid: 0b101u8 + +**INVALID NUMBER** +This number literal is not valid: 0b101u16 + +**INVALID NUMBER** +This number literal is not valid: 0b101u32 + +**INVALID NUMBER** +This number literal is not valid: 0b101u64 + +**INVALID NUMBER** +This number literal is not valid: 0b101u128 + +**INVALID NUMBER** +This number literal is not valid: 0b101i8 + +**INVALID NUMBER** +This number literal is not valid: 0b101i16 + +**INVALID NUMBER** +This number literal is not valid: 0b101i32 + +**INVALID NUMBER** +This number literal is not valid: 0b101i64 + +**INVALID NUMBER** +This number literal is not valid: 0b101i128 + # TOKENS ~~~zig OpenCurly(1:1-1:2),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/opaque_reference_pattern.md b/src/snapshots/old_syntax/opaque_reference_pattern.md index 871367997c..1b1143a1c7 100644 --- a/src/snapshots/old_syntax/opaque_reference_pattern.md +++ b/src/snapshots/old_syntax/opaque_reference_pattern.md @@ -9,9 +9,12 @@ when n is @Age -> 1 ~~~ # EXPECTED -UNDEFINED VARIABLE - opaque_reference_pattern.md:1:1:1:5 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `when` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:5),LowerIdent(1:6-1:7),LowerIdent(1:8-1:10),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/opaque_reference_pattern_with_arguments.md b/src/snapshots/old_syntax/opaque_reference_pattern_with_arguments.md index 81c2c698dd..cd44db325e 100644 --- a/src/snapshots/old_syntax/opaque_reference_pattern_with_arguments.md +++ b/src/snapshots/old_syntax/opaque_reference_pattern_with_arguments.md @@ -9,9 +9,12 @@ when n is @Add n m -> n + m ~~~ # EXPECTED -UNDEFINED VARIABLE - opaque_reference_pattern_with_arguments.md:1:1:1:5 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `when` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:5),LowerIdent(1:6-1:7),LowerIdent(1:8-1:10),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/opaque_type_def_with_newline.md b/src/snapshots/old_syntax/opaque_type_def_with_newline.md index ad7e5a455d..3bf2f132cd 100644 --- a/src/snapshots/old_syntax/opaque_type_def_with_newline.md +++ b/src/snapshots/old_syntax/opaque_type_def_with_newline.md @@ -10,9 +10,12 @@ Na:= e e0 ~~~ # EXPECTED -UNDEFINED VARIABLE - opaque_type_def_with_newline.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `a` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpColon(1:2-1:3),LowerIdent(1:3-1:4),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/opt_field_newline_in_pat.md b/src/snapshots/old_syntax/opt_field_newline_in_pat.md index 0c4c78376d..cbb8d40648 100644 --- a/src/snapshots/old_syntax/opt_field_newline_in_pat.md +++ b/src/snapshots/old_syntax/opt_field_newline_in_pat.md @@ -11,10 +11,16 @@ Y}=p Q ~~~ # EXPECTED -UNDEFINED VARIABLE - opt_field_newline_in_pat.md:1:2:1:3 -not_implemented - opt_field_newline_in_pat.md:1:2:3:3 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `i` in this scope. +Is there an `import` or `exposing` missing up-top? + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: binop +Let us know if you want to help! + # TOKENS ~~~zig OpenCurly(1:1-1:2),LowerIdent(1:2-1:3),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/opt_record_field_pat_assign.md b/src/snapshots/old_syntax/opt_record_field_pat_assign.md index d20d092820..addb62082b 100644 --- a/src/snapshots/old_syntax/opt_record_field_pat_assign.md +++ b/src/snapshots/old_syntax/opt_record_field_pat_assign.md @@ -11,10 +11,16 @@ type=expr r ~~~ # EXPECTED -not_implemented - opt_record_field_pat_assign.md:1:1:1:1 -UNDEFINED VARIABLE - opt_record_field_pat_assign.md:1:4:1:5 -# PROBLEMS NIL +# PROBLEMS +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: canonicalize suffix_single_question expression +Let us know if you want to help! + +**UNDEFINED VARIABLE** +Nothing is named `f` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig OpenCurly(1:1-1:2),LowerIdent(1:2-1:3),NoSpaceOpQuestion(1:3-1:4),LowerIdent(1:4-1:5),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/outdented_app_with_record.md b/src/snapshots/old_syntax/outdented_app_with_record.md index 7c9b2007da..f1309fc6c6 100644 --- a/src/snapshots/old_syntax/outdented_app_with_record.md +++ b/src/snapshots/old_syntax/outdented_app_with_record.md @@ -11,9 +11,12 @@ x = foo (baz { x ~~~ # EXPECTED -UNDEFINED VARIABLE - outdented_app_with_record.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `x` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpAssign(1:3-1:4),LowerIdent(1:5-1:8),OpenRound(1:9-1:10),LowerIdent(1:10-1:13),OpenCurly(1:14-1:15),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/outdented_colon_in_record.md b/src/snapshots/old_syntax/outdented_colon_in_record.md index 04a4c9fde9..2a65d04845 100644 --- a/src/snapshots/old_syntax/outdented_colon_in_record.md +++ b/src/snapshots/old_syntax/outdented_colon_in_record.md @@ -13,9 +13,12 @@ blah x ~~~ # EXPECTED -UNDEFINED VARIABLE - outdented_colon_in_record.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `x` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpAssign(1:3-1:4),LowerIdent(1:5-1:8),OpenCurly(1:9-1:10),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/outdented_list.md b/src/snapshots/old_syntax/outdented_list.md index 5cc93f4206..e76707dcc0 100644 --- a/src/snapshots/old_syntax/outdented_list.md +++ b/src/snapshots/old_syntax/outdented_list.md @@ -11,9 +11,12 @@ a = [ a ~~~ # EXPECTED -UNDEFINED VARIABLE - outdented_list.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `a` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpAssign(1:3-1:4),OpenSquare(1:5-1:6),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/outdented_record.md b/src/snapshots/old_syntax/outdented_record.md index 3c1ce8d2e5..d83123e417 100644 --- a/src/snapshots/old_syntax/outdented_record.md +++ b/src/snapshots/old_syntax/outdented_record.md @@ -11,9 +11,12 @@ x = foo { x ~~~ # EXPECTED -UNDEFINED VARIABLE - outdented_record.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `x` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpAssign(1:3-1:4),LowerIdent(1:5-1:8),OpenCurly(1:9-1:10),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/p_return_f_minus_f.md b/src/snapshots/old_syntax/p_return_f_minus_f.md index fbc6ed26dc..a4e1d32393 100644 --- a/src/snapshots/old_syntax/p_return_f_minus_f.md +++ b/src/snapshots/old_syntax/p_return_f_minus_f.md @@ -11,9 +11,12 @@ return# -f ~~~ # EXPECTED -UNDEFINED VARIABLE - p_return_f_minus_f.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `p` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/paren_newline_before_return.md b/src/snapshots/old_syntax/paren_newline_before_return.md index 6be3ca69f6..72e60ca738 100644 --- a/src/snapshots/old_syntax/paren_newline_before_return.md +++ b/src/snapshots/old_syntax/paren_newline_before_return.md @@ -11,9 +11,12 @@ type=expr return u ~~~ # EXPECTED -UNDEFINED VARIABLE - paren_newline_before_return.md:1:2:1:3 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `i` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig OpenRound(1:1-1:2),LowerIdent(1:2-1:3),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/parens_apply_newline.md b/src/snapshots/old_syntax/parens_apply_newline.md index 565d7a7d82..337ae5a506 100644 --- a/src/snapshots/old_syntax/parens_apply_newline.md +++ b/src/snapshots/old_syntax/parens_apply_newline.md @@ -10,6 +10,7 @@ N) N# ~~~ # EXPECTED +PARSE ERROR - parens_apply_newline.md:2:2:2:2 # PROBLEMS **PARSE ERROR** A parsing error occurred: `expected_expr_close_round_or_comma` diff --git a/src/snapshots/old_syntax/parens_apply_not_parens.md b/src/snapshots/old_syntax/parens_apply_not_parens.md index a5a052ab45..08ea523695 100644 --- a/src/snapshots/old_syntax/parens_apply_not_parens.md +++ b/src/snapshots/old_syntax/parens_apply_not_parens.md @@ -10,7 +10,7 @@ type=expr ~~~ # EXPECTED UNEXPECTED TOKEN IN EXPRESSION - parens_apply_not_parens.md:1:2:1:4 -expected_expr_close_round_or_comma - parens_apply_not_parens.md:2:1:2:3 +PARSE ERROR - parens_apply_not_parens.md:2:1:2:3 # PROBLEMS **UNEXPECTED TOKEN IN EXPRESSION** The token **!(** is not expected in an expression. diff --git a/src/snapshots/old_syntax/parens_comment_in_str_interpolation.md b/src/snapshots/old_syntax/parens_comment_in_str_interpolation.md index c84b31a554..e6476ac512 100644 --- a/src/snapshots/old_syntax/parens_comment_in_str_interpolation.md +++ b/src/snapshots/old_syntax/parens_comment_in_str_interpolation.md @@ -9,8 +9,7 @@ type=expr )}" ~~~ # EXPECTED -expected_expr_close_round_or_comma - parens_comment_in_str_interpolation.md:2:1:2:3 -invalid_string_interpolation - parens_comment_in_str_interpolation.md:2:1:2:3 +PARSE ERROR - parens_comment_in_str_interpolation.md:2:1:2:3 # PROBLEMS **PARSE ERROR** A parsing error occurred: `expected_expr_close_round_or_comma` @@ -24,6 +23,10 @@ Here is the problematic code: ^^ +**INVALID INTERPOLATION** +This string interpolation is not valid. +String interpolation should use the format: "text $(expression) more text" + # TOKENS ~~~zig StringStart(1:1-1:2),StringPart(1:2-1:2),OpenStringInterpolation(1:2-1:4),NoSpaceOpenRound(1:4-1:5),UpperIdent(1:5-1:6),Newline(1:7-1:7), diff --git a/src/snapshots/old_syntax/parens_func_apply_type.md b/src/snapshots/old_syntax/parens_func_apply_type.md index 8a7e08f1be..ea708c9bd6 100644 --- a/src/snapshots/old_syntax/parens_func_apply_type.md +++ b/src/snapshots/old_syntax/parens_func_apply_type.md @@ -9,9 +9,12 @@ si:(e)(e->A) A ~~~ # EXPECTED -UNDEFINED VARIABLE - parens_func_apply_type.md:1:1:1:3 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `si` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:3),OpColon(1:3-1:4),NoSpaceOpenRound(1:4-1:5),LowerIdent(1:5-1:6),CloseRound(1:6-1:7),NoSpaceOpenRound(1:7-1:8),LowerIdent(1:8-1:9),OpArrow(1:9-1:11),UpperIdent(1:11-1:12),CloseRound(1:12-1:13),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/parenthetical_apply.md b/src/snapshots/old_syntax/parenthetical_apply.md index e87f318f4d..6b49b5ef44 100644 --- a/src/snapshots/old_syntax/parenthetical_apply.md +++ b/src/snapshots/old_syntax/parenthetical_apply.md @@ -8,9 +8,12 @@ type=expr (whee) 1 ~~~ # EXPECTED -UNDEFINED VARIABLE - parenthetical_apply.md:1:2:1:6 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `whee` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig OpenRound(1:1-1:2),LowerIdent(1:2-1:6),CloseRound(1:6-1:7),Int(1:8-1:9),EndOfFile(1:9-1:9), diff --git a/src/snapshots/old_syntax/parenthetical_basic_field.md b/src/snapshots/old_syntax/parenthetical_basic_field.md index cf6aba9e3f..3fe5e8eae5 100644 --- a/src/snapshots/old_syntax/parenthetical_basic_field.md +++ b/src/snapshots/old_syntax/parenthetical_basic_field.md @@ -8,9 +8,12 @@ type=expr (rec).field ~~~ # EXPECTED -UNDEFINED VARIABLE - parenthetical_basic_field.md:1:2:1:5 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `rec` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig OpenRound(1:1-1:2),LowerIdent(1:2-1:5),CloseRound(1:5-1:6),NoSpaceDotLowerIdent(1:6-1:12),EndOfFile(1:12-1:12), diff --git a/src/snapshots/old_syntax/parenthetical_field_qualified_var.md b/src/snapshots/old_syntax/parenthetical_field_qualified_var.md index e722e4a81b..060d86ac42 100644 --- a/src/snapshots/old_syntax/parenthetical_field_qualified_var.md +++ b/src/snapshots/old_syntax/parenthetical_field_qualified_var.md @@ -8,9 +8,12 @@ type=expr (One.Two.rec).field ~~~ # EXPECTED -UNDEFINED VARIABLE - parenthetical_field_qualified_var.md:1:2:1:13 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `rec` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig OpenRound(1:1-1:2),UpperIdent(1:2-1:5),NoSpaceDotUpperIdent(1:5-1:9),NoSpaceDotLowerIdent(1:9-1:13),CloseRound(1:13-1:14),NoSpaceDotLowerIdent(1:14-1:20),EndOfFile(1:20-1:20), diff --git a/src/snapshots/old_syntax/parenthetical_var.md b/src/snapshots/old_syntax/parenthetical_var.md index f7322d4191..1b6ede577d 100644 --- a/src/snapshots/old_syntax/parenthetical_var.md +++ b/src/snapshots/old_syntax/parenthetical_var.md @@ -8,9 +8,12 @@ type=expr (whee) ~~~ # EXPECTED -UNDEFINED VARIABLE - parenthetical_var.md:1:2:1:6 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `whee` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig OpenRound(1:1-1:2),LowerIdent(1:2-1:6),CloseRound(1:6-1:7),EndOfFile(1:7-1:7), diff --git a/src/snapshots/old_syntax/parse_as_ann.md b/src/snapshots/old_syntax/parse_as_ann.md index 9d53153bde..3150094d13 100644 --- a/src/snapshots/old_syntax/parse_as_ann.md +++ b/src/snapshots/old_syntax/parse_as_ann.md @@ -10,9 +10,12 @@ foo : Foo.Bar.Baz x y as Blah a b 42 ~~~ # EXPECTED -UNDEFINED VARIABLE - parse_as_ann.md:1:1:1:4 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `foo` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:4),OpColon(1:5-1:6),UpperIdent(1:7-1:10),NoSpaceDotUpperIdent(1:10-1:14),NoSpaceDotUpperIdent(1:14-1:18),LowerIdent(1:19-1:20),LowerIdent(1:21-1:22),KwAs(1:23-1:25),UpperIdent(1:26-1:30),LowerIdent(1:31-1:32),LowerIdent(1:33-1:34),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/pat_parens_newline_before_pipe_when.md b/src/snapshots/old_syntax/pat_parens_newline_before_pipe_when.md index 09c2c728f1..7e6ef911c4 100644 --- a/src/snapshots/old_syntax/pat_parens_newline_before_pipe_when.md +++ b/src/snapshots/old_syntax/pat_parens_newline_before_pipe_when.md @@ -11,9 +11,12 @@ is S# )|B->e ~~~ # EXPECTED -UNDEFINED VARIABLE - pat_parens_newline_before_pipe_when.md:1:1:1:5 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `when` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:5),Int(1:6-1:7),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/pat_space_after_comma.md b/src/snapshots/old_syntax/pat_space_after_comma.md index 50a97114cf..776cc63e7f 100644 --- a/src/snapshots/old_syntax/pat_space_after_comma.md +++ b/src/snapshots/old_syntax/pat_space_after_comma.md @@ -10,10 +10,16 @@ type=expr Q ~~~ # EXPECTED -UNDEFINED VARIABLE - pat_space_after_comma.md:1:2:2:2 -UNDEFINED VARIABLE - pat_space_after_comma.md:2:2:2:4 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `i` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `p` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig OpenCurly(1:1-1:2),LowerIdent(1:2-1:3),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/pattern_as.md b/src/snapshots/old_syntax/pattern_as.md index a0ff0256d9..fa1a7b9c23 100644 --- a/src/snapshots/old_syntax/pattern_as.md +++ b/src/snapshots/old_syntax/pattern_as.md @@ -9,9 +9,12 @@ when 0 is _ as n -> n ~~~ # EXPECTED -UNDEFINED VARIABLE - pattern_as.md:1:1:1:5 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `when` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:5),Int(1:6-1:7),LowerIdent(1:8-1:10),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/pattern_as_list_rest.md b/src/snapshots/old_syntax/pattern_as_list_rest.md index 8b9867bd37..39d6bbfd85 100644 --- a/src/snapshots/old_syntax/pattern_as_list_rest.md +++ b/src/snapshots/old_syntax/pattern_as_list_rest.md @@ -9,9 +9,12 @@ when myList is [first, .. as rest] -> 0 ~~~ # EXPECTED -UNDEFINED VARIABLE - pattern_as_list_rest.md:1:1:1:5 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `when` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:5),LowerIdent(1:6-1:12),LowerIdent(1:13-1:15),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/pattern_as_spaces.md b/src/snapshots/old_syntax/pattern_as_spaces.md index 5070d184a1..ae051705e3 100644 --- a/src/snapshots/old_syntax/pattern_as_spaces.md +++ b/src/snapshots/old_syntax/pattern_as_spaces.md @@ -11,9 +11,12 @@ when 0 is n -> {} ~~~ # EXPECTED -UNDEFINED VARIABLE - pattern_as_spaces.md:1:1:1:5 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `when` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:5),Int(1:6-1:7),LowerIdent(1:8-1:10),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/pattern_binds_keyword.md b/src/snapshots/old_syntax/pattern_binds_keyword.md index 8361e5e32c..b55522d3c3 100644 --- a/src/snapshots/old_syntax/pattern_binds_keyword.md +++ b/src/snapshots/old_syntax/pattern_binds_keyword.md @@ -13,9 +13,12 @@ when Just 4 is 2 ~~~ # EXPECTED -UNDEFINED VARIABLE - pattern_binds_keyword.md:1:1:1:5 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `when` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:5),UpperIdent(1:6-1:10),Int(1:11-1:12),LowerIdent(1:13-1:15),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/pattern_comma_newlines.md b/src/snapshots/old_syntax/pattern_comma_newlines.md index 099d23c193..26775a8f90 100644 --- a/src/snapshots/old_syntax/pattern_comma_newlines.md +++ b/src/snapshots/old_syntax/pattern_comma_newlines.md @@ -10,9 +10,16 @@ type=expr n ~~~ # EXPECTED -UNDEFINED VARIABLE - pattern_comma_newlines.md:1:3:1:4 -UNDEFINED VARIABLE - pattern_comma_newlines.md:1:5:1:6 +UNDEFINED VARIABLE - pattern_comma_newlines.md:1:1:1:2 # PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `i` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `p` in this scope. +Is there an `import` or `exposing` missing up-top? + **TYPE MISMATCH** This expression is used in an unexpected way: **pattern_comma_newlines.md:1:1:1:2:** diff --git a/src/snapshots/old_syntax/pattern_record_apply_comment.md b/src/snapshots/old_syntax/pattern_record_apply_comment.md index 00700489ff..8927142f15 100644 --- a/src/snapshots/old_syntax/pattern_record_apply_comment.md +++ b/src/snapshots/old_syntax/pattern_record_apply_comment.md @@ -10,9 +10,12 @@ s{t# p# ~~~ # EXPECTED -UNDEFINED VARIABLE - pattern_record_apply_comment.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `s` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpenCurly(1:2-1:3),LowerIdent(1:3-1:4),Newline(1:5-1:5), diff --git a/src/snapshots/old_syntax/pattern_with_as_parens.md b/src/snapshots/old_syntax/pattern_with_as_parens.md index 6053f9a498..678b6fdb4b 100644 --- a/src/snapshots/old_syntax/pattern_with_as_parens.md +++ b/src/snapshots/old_syntax/pattern_with_as_parens.md @@ -9,9 +9,12 @@ when t is Ok ({} as d)->S ~~~ # EXPECTED -UNDEFINED VARIABLE - pattern_with_as_parens.md:1:1:1:5 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `when` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:5),LowerIdent(1:6-1:7),LowerIdent(1:8-1:10),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/pattern_with_space_in_parens.md b/src/snapshots/old_syntax/pattern_with_space_in_parens.md index 54ff292835..3ca7244e56 100644 --- a/src/snapshots/old_syntax/pattern_with_space_in_parens.md +++ b/src/snapshots/old_syntax/pattern_with_space_in_parens.md @@ -9,9 +9,12 @@ when Delmin (Del rx) 0 is Delmin (Del ry ) _ -> Node Black 0 Bool.false ry ~~~ # EXPECTED -UNDEFINED VARIABLE - pattern_with_space_in_parens.md:1:1:1:5 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `when` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:5),UpperIdent(1:6-1:12),OpenRound(1:13-1:14),UpperIdent(1:14-1:17),LowerIdent(1:18-1:20),CloseRound(1:20-1:21),Int(1:22-1:23),LowerIdent(1:24-1:26),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/plus_if.md b/src/snapshots/old_syntax/plus_if.md index 3c08d9b663..028f516fbe 100644 --- a/src/snapshots/old_syntax/plus_if.md +++ b/src/snapshots/old_syntax/plus_if.md @@ -8,8 +8,7 @@ type=expr 1 * if Bool.true then 1 else 1 ~~~ # EXPECTED -no_else - plus_if.md:1:23:1:29 -expr_not_canonicalized - plus_if.md:1:1:1:29 +PARSE ERROR - plus_if.md:1:23:1:29 # PROBLEMS **PARSE ERROR** A parsing error occurred: `no_else` @@ -23,6 +22,10 @@ Here is the problematic code: ^^^^^^ +**UNKNOWN OPERATOR** +This looks like an operator, but it's not one I recognize! +Check the spelling and make sure you're using a valid Roc operator. + # TOKENS ~~~zig Int(1:1-1:2),OpStar(1:3-1:4),KwIf(1:5-1:7),UpperIdent(1:8-1:12),NoSpaceDotLowerIdent(1:12-1:17),LowerIdent(1:18-1:22),Int(1:23-1:24),KwElse(1:25-1:29),Int(1:30-1:31),EndOfFile(1:31-1:31), diff --git a/src/snapshots/old_syntax/plus_when.md b/src/snapshots/old_syntax/plus_when.md index 8c86836036..d8c20ddcef 100644 --- a/src/snapshots/old_syntax/plus_when.md +++ b/src/snapshots/old_syntax/plus_when.md @@ -11,9 +11,12 @@ type=expr Bar -> 3 ~~~ # EXPECTED -UNDEFINED VARIABLE - plus_when.md:2:5:2:9 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `when` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig Int(1:1-1:2),OpPlus(1:3-1:4),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/pnc_apply_comment_after_newline.md b/src/snapshots/old_syntax/pnc_apply_comment_after_newline.md index 70be01b2fa..6cedbb34f5 100644 --- a/src/snapshots/old_syntax/pnc_apply_comment_after_newline.md +++ b/src/snapshots/old_syntax/pnc_apply_comment_after_newline.md @@ -9,10 +9,16 @@ i(i, )t ~~~ # EXPECTED -UNDEFINED VARIABLE - pnc_apply_comment_after_newline.md:1:1:1:2 -UNDEFINED VARIABLE - pnc_apply_comment_after_newline.md:1:3:1:4 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `i` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `i` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),NoSpaceOpenRound(1:2-1:3),LowerIdent(1:3-1:4),Comma(1:4-1:5),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/pnc_apply_neg_pattern.md b/src/snapshots/old_syntax/pnc_apply_neg_pattern.md index 7c5d63c881..028b47bf6c 100644 --- a/src/snapshots/old_syntax/pnc_apply_neg_pattern.md +++ b/src/snapshots/old_syntax/pnc_apply_neg_pattern.md @@ -10,7 +10,7 @@ type=expr ~~~ # EXPECTED UNEXPECTED TOKEN IN EXPRESSION - pnc_apply_neg_pattern.md:1:2:1:4 -expected_expr_close_round_or_comma - pnc_apply_neg_pattern.md:1:4:1:6 +PARSE ERROR - pnc_apply_neg_pattern.md:1:4:1:6 # PROBLEMS **UNEXPECTED TOKEN IN EXPRESSION** The token **-8** is not expected in an expression. diff --git a/src/snapshots/old_syntax/pnc_dbg_parens_comment.md b/src/snapshots/old_syntax/pnc_dbg_parens_comment.md index 504112ff7a..c6763297d9 100644 --- a/src/snapshots/old_syntax/pnc_dbg_parens_comment.md +++ b/src/snapshots/old_syntax/pnc_dbg_parens_comment.md @@ -10,9 +10,12 @@ type=expr e ~~~ # EXPECTED -not_implemented - pnc_dbg_parens_comment.md:1:1:1:1 -# PROBLEMS NIL +# PROBLEMS +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: canonicalize dbg expression +Let us know if you want to help! + # TOKENS ~~~zig OpenRound(1:1-1:2),KwDbg(1:2-1:5),NoSpaceOpenRound(1:5-1:6),Int(1:6-1:7),Newline(1:8-1:8), diff --git a/src/snapshots/old_syntax/pnc_parens_apply_etc.md b/src/snapshots/old_syntax/pnc_parens_apply_etc.md index 3451afe6b7..a2f89dc29a 100644 --- a/src/snapshots/old_syntax/pnc_parens_apply_etc.md +++ b/src/snapshots/old_syntax/pnc_parens_apply_etc.md @@ -10,7 +10,7 @@ type=expr (z) ~~~ # EXPECTED -NIL +TYPE MISMATCH - pnc_parens_apply_etc.md:2:1:2:2 # PROBLEMS **TYPE MISMATCH** This expression is used in an unexpected way: diff --git a/src/snapshots/old_syntax/pos_inf_float.md b/src/snapshots/old_syntax/pos_inf_float.md index f8cb245600..606a9fa54e 100644 --- a/src/snapshots/old_syntax/pos_inf_float.md +++ b/src/snapshots/old_syntax/pos_inf_float.md @@ -8,9 +8,12 @@ type=expr inf ~~~ # EXPECTED -UNDEFINED VARIABLE - pos_inf_float.md:1:1:1:4 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `inf` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:4),EndOfFile(1:4-1:4), diff --git a/src/snapshots/old_syntax/qualified_field.md b/src/snapshots/old_syntax/qualified_field.md index 5670a2629e..9a1d55adbf 100644 --- a/src/snapshots/old_syntax/qualified_field.md +++ b/src/snapshots/old_syntax/qualified_field.md @@ -8,9 +8,12 @@ type=expr One.Two.rec.abc.def.ghi ~~~ # EXPECTED -UNDEFINED VARIABLE - qualified_field.md:1:1:1:24 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `ghi` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig UpperIdent(1:1-1:4),NoSpaceDotUpperIdent(1:4-1:8),NoSpaceDotLowerIdent(1:8-1:12),NoSpaceDotLowerIdent(1:12-1:16),NoSpaceDotLowerIdent(1:16-1:20),NoSpaceDotLowerIdent(1:20-1:24),EndOfFile(1:24-1:24), diff --git a/src/snapshots/old_syntax/qualified_var.md b/src/snapshots/old_syntax/qualified_var.md index c49aaacb58..4342ba4e42 100644 --- a/src/snapshots/old_syntax/qualified_var.md +++ b/src/snapshots/old_syntax/qualified_var.md @@ -8,9 +8,12 @@ type=expr One.Two.whee ~~~ # EXPECTED -UNDEFINED VARIABLE - qualified_var.md:1:1:1:13 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `whee` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig UpperIdent(1:1-1:4),NoSpaceDotUpperIdent(1:4-1:8),NoSpaceDotLowerIdent(1:8-1:13),EndOfFile(1:13-1:13), diff --git a/src/snapshots/old_syntax/record_access_after_tuple.md b/src/snapshots/old_syntax/record_access_after_tuple.md index f739c1043f..c172823c27 100644 --- a/src/snapshots/old_syntax/record_access_after_tuple.md +++ b/src/snapshots/old_syntax/record_access_after_tuple.md @@ -8,7 +8,7 @@ type=expr ({a: 0}, {b: 1}).0.a ~~~ # EXPECTED -expr_no_space_dot_int - record_access_after_tuple.md:1:17:1:21 +PARSE ERROR - record_access_after_tuple.md:1:17:1:21 # PROBLEMS **PARSE ERROR** A parsing error occurred: `expr_no_space_dot_int` diff --git a/src/snapshots/old_syntax/record_builder.md b/src/snapshots/old_syntax/record_builder.md index f4980b2a8a..df97439cf5 100644 --- a/src/snapshots/old_syntax/record_builder.md +++ b/src/snapshots/old_syntax/record_builder.md @@ -12,9 +12,8 @@ type=expr UNEXPECTED TOKEN IN EXPRESSION - record_builder.md:1:15:1:19 UNEXPECTED TOKEN IN TYPE ANNOTATION - record_builder.md:1:21:1:23 UNEXPECTED TOKEN IN EXPRESSION - record_builder.md:1:22:1:25 +UNEXPECTED TOKEN IN TYPE ANNOTATION - record_builder.md:1:27:1:27 UNEXPECTED TOKEN IN EXPRESSION - record_builder.md:1:1:2:2 -UNDEFINED VARIABLE - record_builder.md:1:3:1:14 -MALFORMED TYPE - record_builder.md:1:21:1:23 # PROBLEMS **UNEXPECTED TOKEN IN EXPRESSION** The token **<- x** is not expected in an expression. @@ -77,6 +76,16 @@ Here is the problematic code: ``` +**UNDEFINED VARIABLE** +Nothing is named `baz` in this scope. +Is there an `import` or `exposing` missing up-top? + +**MALFORMED TYPE** +This type annotation is malformed or contains invalid syntax. + +**MALFORMED TYPE** +This type annotation is malformed or contains invalid syntax. + # TOKENS ~~~zig OpenCurly(1:1-1:2),UpperIdent(1:3-1:6),NoSpaceDotUpperIdent(1:6-1:10),NoSpaceDotLowerIdent(1:10-1:14),OpBackArrow(1:15-1:17),LowerIdent(1:18-1:19),OpColon(1:19-1:20),Int(1:21-1:22),Comma(1:22-1:23),LowerIdent(1:24-1:25),OpColon(1:25-1:26),Int(1:27-1:28),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/record_builder_ignored_fields.md b/src/snapshots/old_syntax/record_builder_ignored_fields.md index beffdac10f..9adf22aea8 100644 --- a/src/snapshots/old_syntax/record_builder_ignored_fields.md +++ b/src/snapshots/old_syntax/record_builder_ignored_fields.md @@ -18,10 +18,6 @@ UNEXPECTED TOKEN IN TYPE ANNOTATION - record_builder_ignored_fields.md:1:34:1:36 UNEXPECTED TOKEN IN EXPRESSION - record_builder_ignored_fields.md:1:35:1:38 UNEXPECTED TOKEN IN EXPRESSION - record_builder_ignored_fields.md:1:37:1:39 UNEXPECTED TOKEN IN EXPRESSION - record_builder_ignored_fields.md:1:38:1:41 -UNDEFINED VARIABLE - record_builder_ignored_fields.md:1:3:1:14 -MALFORMED TYPE - record_builder_ignored_fields.md:1:21:1:23 -MALFORMED TYPE - record_builder_ignored_fields.md:1:27:1:29 -MALFORMED TYPE - record_builder_ignored_fields.md:1:34:1:36 # PROBLEMS **UNEXPECTED TOKEN IN EXPRESSION** The token **<- x** is not expected in an expression. @@ -131,6 +127,19 @@ Here is the problematic code: ^^^ +**UNDEFINED VARIABLE** +Nothing is named `baz` in this scope. +Is there an `import` or `exposing` missing up-top? + +**MALFORMED TYPE** +This type annotation is malformed or contains invalid syntax. + +**MALFORMED TYPE** +This type annotation is malformed or contains invalid syntax. + +**MALFORMED TYPE** +This type annotation is malformed or contains invalid syntax. + # TOKENS ~~~zig OpenCurly(1:1-1:2),UpperIdent(1:3-1:6),NoSpaceDotUpperIdent(1:6-1:10),NoSpaceDotLowerIdent(1:10-1:14),OpBackArrow(1:15-1:17),LowerIdent(1:18-1:19),OpColon(1:19-1:20),Int(1:21-1:22),Comma(1:22-1:23),LowerIdent(1:24-1:25),OpColon(1:25-1:26),Int(1:27-1:28),Comma(1:28-1:29),NamedUnderscore(1:30-1:32),OpColon(1:32-1:33),Int(1:34-1:35),Comma(1:35-1:36),Underscore(1:37-1:38),OpColon(1:38-1:39),Int(1:40-1:41),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/record_comment_newline_field.md b/src/snapshots/old_syntax/record_comment_newline_field.md index 9b09fd18ce..352e438d08 100644 --- a/src/snapshots/old_syntax/record_comment_newline_field.md +++ b/src/snapshots/old_syntax/record_comment_newline_field.md @@ -9,9 +9,12 @@ type=expr a} ~~~ # EXPECTED -UNDEFINED VARIABLE - record_comment_newline_field.md:2:1:2:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `a` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig OpenCurly(1:1-1:2),Newline(1:3-1:3), diff --git a/src/snapshots/old_syntax/record_destructure_field_bang.md b/src/snapshots/old_syntax/record_destructure_field_bang.md index f8a1108560..04beb37b6e 100644 --- a/src/snapshots/old_syntax/record_destructure_field_bang.md +++ b/src/snapshots/old_syntax/record_destructure_field_bang.md @@ -10,10 +10,16 @@ type=expr launchTheNukes! code ~~~ # EXPECTED -UNDEFINED VARIABLE - record_destructure_field_bang.md:1:2:1:18 -UNDEFINED VARIABLE - record_destructure_field_bang.md:1:19:1:24 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `launchTheNukes!` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `code` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig OpenCurly(1:1-1:2),LowerIdent(1:2-1:17),Comma(1:17-1:18),LowerIdent(1:19-1:23),CloseCurly(1:23-1:24),OpAssign(1:25-1:26),LowerIdent(1:27-1:33),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/record_destructure_field_bang_no_space.md b/src/snapshots/old_syntax/record_destructure_field_bang_no_space.md index a5af3f4557..f4a20aa756 100644 --- a/src/snapshots/old_syntax/record_destructure_field_bang_no_space.md +++ b/src/snapshots/old_syntax/record_destructure_field_bang_no_space.md @@ -10,10 +10,16 @@ type=expr launchTheNukes! code ~~~ # EXPECTED -UNDEFINED VARIABLE - record_destructure_field_bang_no_space.md:1:2:1:23 -UNDEFINED VARIABLE - record_destructure_field_bang_no_space.md:1:24:1:29 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `launchTheNukes!wrong` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `code` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig OpenCurly(1:1-1:2),LowerIdent(1:2-1:22),Comma(1:22-1:23),LowerIdent(1:24-1:28),CloseCurly(1:28-1:29),OpAssign(1:30-1:31),LowerIdent(1:32-1:38),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/record_func_type_decl.md b/src/snapshots/old_syntax/record_func_type_decl.md index b7fd30d1f5..2714be086d 100644 --- a/src/snapshots/old_syntax/record_func_type_decl.md +++ b/src/snapshots/old_syntax/record_func_type_decl.md @@ -16,9 +16,12 @@ f : 42 ~~~ # EXPECTED -UNDEFINED VARIABLE - record_func_type_decl.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `f` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpColon(1:3-1:4),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/record_literal_field_bang.md b/src/snapshots/old_syntax/record_literal_field_bang.md index 04121afae3..b352bbfadc 100644 --- a/src/snapshots/old_syntax/record_literal_field_bang.md +++ b/src/snapshots/old_syntax/record_literal_field_bang.md @@ -12,7 +12,7 @@ type=expr ~~~ # EXPECTED UNEXPECTED TOKEN IN EXPRESSION - record_literal_field_bang.md:3:22:3:24 -expected_expr_close_curly_or_comma - record_literal_field_bang.md:3:23:3:25 +PARSE ERROR - record_literal_field_bang.md:3:23:3:25 # PROBLEMS **UNEXPECTED TOKEN IN EXPRESSION** The token **\{** is not expected in an expression. diff --git a/src/snapshots/old_syntax/record_type_end.md b/src/snapshots/old_syntax/record_type_end.md index 5143720b2f..98513d2cc4 100644 --- a/src/snapshots/old_syntax/record_type_end.md +++ b/src/snapshots/old_syntax/record_type_end.md @@ -8,9 +8,12 @@ type=expr f : { a: Int, ~~~ # EXPECTED -UNDEFINED VARIABLE - record_type_end.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `f` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpColon(1:3-1:4),OpenCurly(1:5-1:6),LowerIdent(1:7-1:8),OpColon(1:8-1:9),UpperIdent(1:10-1:13),Comma(1:13-1:14),EndOfFile(1:14-1:14), diff --git a/src/snapshots/old_syntax/record_type_keyword_field_name.md b/src/snapshots/old_syntax/record_type_keyword_field_name.md index 6debb858c1..acc1ff2c0b 100644 --- a/src/snapshots/old_syntax/record_type_keyword_field_name.md +++ b/src/snapshots/old_syntax/record_type_keyword_field_name.md @@ -8,9 +8,12 @@ type=expr f : { if : I64 } ~~~ # EXPECTED -UNDEFINED VARIABLE - record_type_keyword_field_name.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `f` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpColon(1:3-1:4),OpenCurly(1:5-1:6),KwIf(1:7-1:9),OpColon(1:10-1:11),UpperIdent(1:12-1:15),CloseCurly(1:16-1:17),EndOfFile(1:17-1:17), diff --git a/src/snapshots/old_syntax/record_type_missing_comma.md b/src/snapshots/old_syntax/record_type_missing_comma.md index d628e22514..c91c09c0c3 100644 --- a/src/snapshots/old_syntax/record_type_missing_comma.md +++ b/src/snapshots/old_syntax/record_type_missing_comma.md @@ -8,9 +8,12 @@ type=expr f : { foo bar } ~~~ # EXPECTED -UNDEFINED VARIABLE - record_type_missing_comma.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `f` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpColon(1:3-1:4),OpenCurly(1:5-1:6),LowerIdent(1:7-1:10),LowerIdent(1:12-1:15),CloseCurly(1:16-1:17),EndOfFile(1:17-1:17), diff --git a/src/snapshots/old_syntax/record_type_open.md b/src/snapshots/old_syntax/record_type_open.md index 429487a321..76e37ca851 100644 --- a/src/snapshots/old_syntax/record_type_open.md +++ b/src/snapshots/old_syntax/record_type_open.md @@ -8,9 +8,12 @@ type=expr f : { ~~~ # EXPECTED -UNDEFINED VARIABLE - record_type_open.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `f` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpColon(1:3-1:4),OpenCurly(1:5-1:6),EndOfFile(1:6-1:6), diff --git a/src/snapshots/old_syntax/record_type_open_indent.md b/src/snapshots/old_syntax/record_type_open_indent.md index d64fa69951..5852cff1d2 100644 --- a/src/snapshots/old_syntax/record_type_open_indent.md +++ b/src/snapshots/old_syntax/record_type_open_indent.md @@ -9,9 +9,12 @@ f : { foo : I64, ~~~ # EXPECTED -UNDEFINED VARIABLE - record_type_open_indent.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `f` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpColon(1:3-1:4),OpenCurly(1:5-1:6),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/record_type_tab.md b/src/snapshots/old_syntax/record_type_tab.md index a287290f00..97c1ee0342 100644 --- a/src/snapshots/old_syntax/record_type_tab.md +++ b/src/snapshots/old_syntax/record_type_tab.md @@ -8,9 +8,12 @@ type=expr f : { foo } ~~~ # EXPECTED -UNDEFINED VARIABLE - record_type_tab.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `f` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpColon(1:3-1:4),OpenCurly(1:5-1:6),LowerIdent(1:7-1:10),CloseCurly(1:13-1:14),EndOfFile(1:14-1:14), diff --git a/src/snapshots/old_syntax/record_type_with_function.md b/src/snapshots/old_syntax/record_type_with_function.md index 7bf5060053..ba05d89165 100644 --- a/src/snapshots/old_syntax/record_type_with_function.md +++ b/src/snapshots/old_syntax/record_type_with_function.md @@ -10,9 +10,12 @@ x : { init : {} -> Model, update : Model, Str -> Model, view : Model -> Str } 42 ~~~ # EXPECTED -UNDEFINED VARIABLE - record_type_with_function.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `x` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpColon(1:3-1:4),OpenCurly(1:5-1:6),LowerIdent(1:7-1:11),OpColon(1:12-1:13),OpenCurly(1:14-1:15),CloseCurly(1:15-1:16),OpArrow(1:17-1:19),UpperIdent(1:20-1:25),Comma(1:25-1:26),LowerIdent(1:27-1:33),OpColon(1:34-1:35),UpperIdent(1:36-1:41),Comma(1:41-1:42),UpperIdent(1:43-1:46),OpArrow(1:47-1:49),UpperIdent(1:50-1:55),Comma(1:55-1:56),LowerIdent(1:57-1:61),OpColon(1:62-1:63),UpperIdent(1:64-1:69),OpArrow(1:70-1:72),UpperIdent(1:73-1:76),CloseCurly(1:77-1:78),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/record_update.md b/src/snapshots/old_syntax/record_update.md index 0b6c1c4d06..9d88dd5601 100644 --- a/src/snapshots/old_syntax/record_update.md +++ b/src/snapshots/old_syntax/record_update.md @@ -12,9 +12,6 @@ UNEXPECTED TOKEN IN EXPRESSION - record_update.md:1:15:1:18 UNEXPECTED TOKEN IN TYPE ANNOTATION - record_update.md:1:20:1:22 UNEXPECTED TOKEN IN EXPRESSION - record_update.md:1:21:1:24 UNEXPECTED TOKEN IN TYPE ANNOTATION - record_update.md:1:26:1:29 -UNDEFINED VARIABLE - record_update.md:1:3:1:14 -MALFORMED TYPE - record_update.md:1:20:1:22 -MALFORMED TYPE - record_update.md:1:26:1:29 # PROBLEMS **UNEXPECTED TOKEN IN EXPRESSION** The token **& x** is not expected in an expression. @@ -64,6 +61,16 @@ Here is the problematic code: ^^^ +**UNDEFINED VARIABLE** +Nothing is named `baz` in this scope. +Is there an `import` or `exposing` missing up-top? + +**MALFORMED TYPE** +This type annotation is malformed or contains invalid syntax. + +**MALFORMED TYPE** +This type annotation is malformed or contains invalid syntax. + # TOKENS ~~~zig OpenCurly(1:1-1:2),UpperIdent(1:3-1:6),NoSpaceDotUpperIdent(1:6-1:10),NoSpaceDotLowerIdent(1:10-1:14),OpAmpersand(1:15-1:16),LowerIdent(1:17-1:18),OpColon(1:18-1:19),Int(1:20-1:21),Comma(1:21-1:22),LowerIdent(1:23-1:24),OpColon(1:24-1:25),Int(1:26-1:27),CloseCurly(1:28-1:29),EndOfFile(1:29-1:29), diff --git a/src/snapshots/old_syntax/record_update_apply_closure_comments.md b/src/snapshots/old_syntax/record_update_apply_closure_comments.md index 578f80beb1..c6bd5f935a 100644 --- a/src/snapshots/old_syntax/record_update_apply_closure_comments.md +++ b/src/snapshots/old_syntax/record_update_apply_closure_comments.md @@ -11,7 +11,6 @@ h&}\# ~~~ # EXPECTED UNEXPECTED TOKEN IN EXPRESSION - record_update_apply_closure_comments.md:2:2:2:4 -UNDEFINED VARIABLE - record_update_apply_closure_comments.md:2:1:2:2 # PROBLEMS **UNEXPECTED TOKEN IN EXPRESSION** The token **&}** is not expected in an expression. @@ -25,6 +24,10 @@ h&}\# ^^ +**UNDEFINED VARIABLE** +Nothing is named `h` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig OpenCurly(1:1-1:2),Newline(1:3-1:3), diff --git a/src/snapshots/old_syntax/record_update_comment_before_ampersand.md b/src/snapshots/old_syntax/record_update_comment_before_ampersand.md index a409f6511c..0f15492669 100644 --- a/src/snapshots/old_syntax/record_update_comment_before_ampersand.md +++ b/src/snapshots/old_syntax/record_update_comment_before_ampersand.md @@ -10,7 +10,6 @@ type=expr ~~~ # EXPECTED UNEXPECTED TOKEN IN EXPRESSION - record_update_comment_before_ampersand.md:2:1:2:3 -UNDEFINED VARIABLE - record_update_comment_before_ampersand.md:1:2:1:3 # PROBLEMS **UNEXPECTED TOKEN IN EXPRESSION** The token **&}** is not expected in an expression. @@ -24,6 +23,10 @@ Here is the problematic code: ^^ +**UNDEFINED VARIABLE** +Nothing is named `i` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig OpenCurly(1:1-1:2),LowerIdent(1:2-1:3),Newline(1:4-1:4), diff --git a/src/snapshots/old_syntax/record_updater_literal_apply.md b/src/snapshots/old_syntax/record_updater_literal_apply.md index 347d538059..d61ba808c4 100644 --- a/src/snapshots/old_syntax/record_updater_literal_apply.md +++ b/src/snapshots/old_syntax/record_updater_literal_apply.md @@ -12,9 +12,12 @@ data = data ~~~ # EXPECTED -UNDEFINED VARIABLE - record_updater_literal_apply.md:1:1:1:5 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `data` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:5),OpAssign(1:6-1:7),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/record_updater_var_apply.md b/src/snapshots/old_syntax/record_updater_var_apply.md index 2728eb61c6..6ca70c0b44 100644 --- a/src/snapshots/old_syntax/record_updater_var_apply.md +++ b/src/snapshots/old_syntax/record_updater_var_apply.md @@ -8,9 +8,12 @@ type=expr foo&bar 5 ~~~ # EXPECTED -UNDEFINED VARIABLE - record_updater_var_apply.md:1:1:1:4 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `foo` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:4),OpAmpersand(1:4-1:5),LowerIdent(1:5-1:8),Int(1:10-1:11),EndOfFile(1:11-1:11), diff --git a/src/snapshots/old_syntax/record_with_if.md b/src/snapshots/old_syntax/record_with_if.md index 95bad92b27..2898e63479 100644 --- a/src/snapshots/old_syntax/record_with_if.md +++ b/src/snapshots/old_syntax/record_with_if.md @@ -8,8 +8,8 @@ type=expr {x : if Bool.true then 1 else 2, y: 3 } ~~~ # EXPECTED -no_else - record_with_if.md:1:24:1:30 -expected_expr_close_curly_or_comma - record_with_if.md:1:26:1:32 +PARSE ERROR - record_with_if.md:1:24:1:30 +PARSE ERROR - record_with_if.md:1:26:1:32 # PROBLEMS **PARSE ERROR** A parsing error occurred: `no_else` diff --git a/src/snapshots/old_syntax/record_with_lots_of_newlines.md b/src/snapshots/old_syntax/record_with_lots_of_newlines.md index 767362e6ca..6a350b3d73 100644 --- a/src/snapshots/old_syntax/record_with_lots_of_newlines.md +++ b/src/snapshots/old_syntax/record_with_lots_of_newlines.md @@ -11,9 +11,12 @@ type=expr } ~~~ # EXPECTED -UNDEFINED VARIABLE - record_with_lots_of_newlines.md:1:2:2:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `t` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig OpenCurly(1:1-1:2),LowerIdent(1:2-1:3),Newline(1:4-1:4), diff --git a/src/snapshots/old_syntax/repr_7342.md b/src/snapshots/old_syntax/repr_7342.md index 36aaa06f99..1f9d4430ab 100644 --- a/src/snapshots/old_syntax/repr_7342.md +++ b/src/snapshots/old_syntax/repr_7342.md @@ -10,7 +10,7 @@ type=expr n) ~~~ # EXPECTED -expected_expr_close_round_or_comma - repr_7342.md:3:2:3:3 +PARSE ERROR - repr_7342.md:3:2:3:3 # PROBLEMS **PARSE ERROR** A parsing error occurred: `expected_expr_close_round_or_comma` diff --git a/src/snapshots/old_syntax/repr_7346.md b/src/snapshots/old_syntax/repr_7346.md index eeac74a546..3b6fc77452 100644 --- a/src/snapshots/old_syntax/repr_7346.md +++ b/src/snapshots/old_syntax/repr_7346.md @@ -11,9 +11,12 @@ t!K):i C ~~~ # EXPECTED -UNDEFINED VARIABLE - repr_7346.md:1:1:1:4 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `il3` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:4),OpBackslash(1:4-1:5),LowerIdent(1:5-1:6),OpArrow(1:6-1:8),Newline(1:9-1:12), diff --git a/src/snapshots/old_syntax/return_as_single_line_expr.md b/src/snapshots/old_syntax/return_as_single_line_expr.md index 26537c5998..3540c54db2 100644 --- a/src/snapshots/old_syntax/return_as_single_line_expr.md +++ b/src/snapshots/old_syntax/return_as_single_line_expr.md @@ -8,9 +8,12 @@ type=expr x = return 5 ~~~ # EXPECTED -UNDEFINED VARIABLE - return_as_single_line_expr.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `x` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpAssign(1:3-1:4),KwReturn(1:5-1:11),Int(1:12-1:13),EndOfFile(1:13-1:13), diff --git a/src/snapshots/old_syntax/return_field_access_in_parens.md b/src/snapshots/old_syntax/return_field_access_in_parens.md index d671f800f5..b3ff89d5f1 100644 --- a/src/snapshots/old_syntax/return_field_access_in_parens.md +++ b/src/snapshots/old_syntax/return_field_access_in_parens.md @@ -10,6 +10,7 @@ ss ~~~ # EXPECTED UNEXPECTED TOKEN IN EXPRESSION - return_field_access_in_parens.md:1:2:1:10 +PARSE ERROR - return_field_access_in_parens.md:1:10:1:10 # PROBLEMS **UNEXPECTED TOKEN IN EXPRESSION** The token **return.o** is not expected in an expression. diff --git a/src/snapshots/old_syntax/return_in_apply_func.md b/src/snapshots/old_syntax/return_in_apply_func.md index d2b90682f2..89b0b5a6a2 100644 --- a/src/snapshots/old_syntax/return_in_apply_func.md +++ b/src/snapshots/old_syntax/return_in_apply_func.md @@ -10,7 +10,7 @@ return-3e)g ~~~ # EXPECTED UNEXPECTED TOKEN IN EXPRESSION - return_in_apply_func.md:2:1:2:8 -expected_expr_close_round_or_comma - return_in_apply_func.md:2:10:2:12 +PARSE ERROR - return_in_apply_func.md:2:10:2:12 # PROBLEMS **UNEXPECTED TOKEN IN EXPRESSION** The token **return-** is not expected in an expression. diff --git a/src/snapshots/old_syntax/return_in_if.md b/src/snapshots/old_syntax/return_in_if.md index 24a4268fda..4e5025257a 100644 --- a/src/snapshots/old_syntax/return_in_if.md +++ b/src/snapshots/old_syntax/return_in_if.md @@ -17,9 +17,12 @@ maybeEarlyReturn = \x -> maybeEarlyReturn 10 ~~~ # EXPECTED -UNDEFINED VARIABLE - return_in_if.md:1:1:1:17 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `maybeEarlyReturn` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:17),OpAssign(1:18-1:19),OpBackslash(1:20-1:21),LowerIdent(1:21-1:22),OpArrow(1:23-1:25),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/return_in_pat.md b/src/snapshots/old_syntax/return_in_pat.md index 484c034961..d9e222fc89 100644 --- a/src/snapshots/old_syntax/return_in_pat.md +++ b/src/snapshots/old_syntax/return_in_pat.md @@ -11,7 +11,7 @@ t)=t ~~~ # EXPECTED UNEXPECTED TOKEN IN EXPRESSION - return_in_pat.md:2:1:2:9 -expected_expr_close_round_or_comma - return_in_pat.md:3:2:3:4 +PARSE ERROR - return_in_pat.md:3:2:3:4 # PROBLEMS **UNEXPECTED TOKEN IN EXPRESSION** The token **return e** is not expected in an expression. diff --git a/src/snapshots/old_syntax/return_in_static_def.md b/src/snapshots/old_syntax/return_in_static_def.md index ebbc51b160..ee1a40b9e3 100644 --- a/src/snapshots/old_syntax/return_in_static_def.md +++ b/src/snapshots/old_syntax/return_in_static_def.md @@ -19,9 +19,12 @@ staticValueDef = staticValueDef ~~~ # EXPECTED -UNDEFINED VARIABLE - return_in_static_def.md:1:1:1:15 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `staticValueDef` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:15),OpAssign(1:16-1:17),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/return_in_when.md b/src/snapshots/old_syntax/return_in_when.md index e280a0ea4a..57fb73bcd7 100644 --- a/src/snapshots/old_syntax/return_in_when.md +++ b/src/snapshots/old_syntax/return_in_when.md @@ -20,9 +20,12 @@ maybeEarlyReturn = \x -> maybeEarlyRetun 3 ~~~ # EXPECTED -UNDEFINED VARIABLE - return_in_when.md:1:1:1:17 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `maybeEarlyReturn` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:17),OpAssign(1:18-1:19),OpBackslash(1:20-1:21),LowerIdent(1:21-1:22),OpArrow(1:23-1:25),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/return_only_statement.md b/src/snapshots/old_syntax/return_only_statement.md index 310394fe31..269a613b01 100644 --- a/src/snapshots/old_syntax/return_only_statement.md +++ b/src/snapshots/old_syntax/return_only_statement.md @@ -12,9 +12,12 @@ identityFn = \x -> identityFn 45 ~~~ # EXPECTED -UNDEFINED VARIABLE - return_only_statement.md:1:1:1:11 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `identityFn` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:11),OpAssign(1:12-1:13),OpBackslash(1:14-1:15),LowerIdent(1:15-1:16),OpArrow(1:17-1:19),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/single_no_end.md b/src/snapshots/old_syntax/single_no_end.md index 6510047cc5..1f6fa8f7e6 100644 --- a/src/snapshots/old_syntax/single_no_end.md +++ b/src/snapshots/old_syntax/single_no_end.md @@ -8,7 +8,7 @@ type=expr "there is no end ~~~ # EXPECTED -UnclosedString - single_no_end.md:1:2:1:17 +NIL # PROBLEMS **UNCLOSED STRING** This string is missing a closing quote. diff --git a/src/snapshots/old_syntax/single_question_binop_closure.md b/src/snapshots/old_syntax/single_question_binop_closure.md index e78ca59b93..ed673e4c1e 100644 --- a/src/snapshots/old_syntax/single_question_binop_closure.md +++ b/src/snapshots/old_syntax/single_question_binop_closure.md @@ -9,11 +9,20 @@ fallible!(args) ? |my_err| my_err * 2 ~~~ # EXPECTED -UNDEFINED VARIABLE - single_question_binop_closure.md:1:1:1:10 -UNDEFINED VARIABLE - single_question_binop_closure.md:1:11:1:15 -not_implemented - single_question_binop_closure.md:1:1:2:15 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `fallible!` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `args` in this scope. +Is there an `import` or `exposing` missing up-top? + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: binop +Let us know if you want to help! + # TOKENS ~~~zig LowerIdent(1:1-1:10),NoSpaceOpenRound(1:10-1:11),LowerIdent(1:11-1:15),CloseRound(1:15-1:16),OpQuestion(1:19-1:20),OpBar(1:21-1:22),LowerIdent(1:22-1:28),OpBar(1:28-1:29),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/single_question_binop_tag.md b/src/snapshots/old_syntax/single_question_binop_tag.md index 717292524b..34e09c3967 100644 --- a/src/snapshots/old_syntax/single_question_binop_tag.md +++ b/src/snapshots/old_syntax/single_question_binop_tag.md @@ -8,11 +8,20 @@ type=expr fallible!(args) ? WrapOverErr ~~~ # EXPECTED -UNDEFINED VARIABLE - single_question_binop_tag.md:1:1:1:10 -UNDEFINED VARIABLE - single_question_binop_tag.md:1:11:1:15 -not_implemented - single_question_binop_tag.md:1:1:1:32 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `fallible!` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `args` in this scope. +Is there an `import` or `exposing` missing up-top? + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: binop +Let us know if you want to help! + # TOKENS ~~~zig LowerIdent(1:1-1:10),NoSpaceOpenRound(1:10-1:11),LowerIdent(1:11-1:15),CloseRound(1:15-1:16),OpQuestion(1:19-1:20),UpperIdent(1:21-1:32),EndOfFile(1:32-1:32), diff --git a/src/snapshots/old_syntax/sneaky_and_expr.md b/src/snapshots/old_syntax/sneaky_and_expr.md index ab5c1e5762..f81fac77da 100644 --- a/src/snapshots/old_syntax/sneaky_and_expr.md +++ b/src/snapshots/old_syntax/sneaky_and_expr.md @@ -10,9 +10,12 @@ a d ~~~ # EXPECTED -UNDEFINED VARIABLE - sneaky_and_expr.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `a` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/space_after_opt_field_pat.md b/src/snapshots/old_syntax/space_after_opt_field_pat.md index 6ce1828b9f..bc162290b4 100644 --- a/src/snapshots/old_syntax/space_after_opt_field_pat.md +++ b/src/snapshots/old_syntax/space_after_opt_field_pat.md @@ -10,10 +10,16 @@ m}:J O ~~~ # EXPECTED -not_implemented - space_after_opt_field_pat.md:1:1:1:1 -UNDEFINED VARIABLE - space_after_opt_field_pat.md:2:1:2:2 -# PROBLEMS NIL +# PROBLEMS +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: canonicalize suffix_single_question expression +Let us know if you want to help! + +**UNDEFINED VARIABLE** +Nothing is named `m` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig OpenCurly(1:1-1:2),LowerIdent(1:2-1:3),NoSpaceOpQuestion(1:3-1:4),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/space_before_parens_space_after.md b/src/snapshots/old_syntax/space_before_parens_space_after.md index 6b5292c194..6fb163ea44 100644 --- a/src/snapshots/old_syntax/space_before_parens_space_after.md +++ b/src/snapshots/old_syntax/space_before_parens_space_after.md @@ -10,9 +10,12 @@ i )#( ~~~ # EXPECTED -UNDEFINED VARIABLE - space_before_parens_space_after.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `i` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/space_only_after_minus.md b/src/snapshots/old_syntax/space_only_after_minus.md index a32faedd84..4685f64f9d 100644 --- a/src/snapshots/old_syntax/space_only_after_minus.md +++ b/src/snapshots/old_syntax/space_only_after_minus.md @@ -8,10 +8,16 @@ type=expr x- y ~~~ # EXPECTED -UNDEFINED VARIABLE - space_only_after_minus.md:1:1:1:2 -UNDEFINED VARIABLE - space_only_after_minus.md:1:4:1:5 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `x` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `y` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpBinaryMinus(1:2-1:3),LowerIdent(1:4-1:5),EndOfFile(1:5-1:5), diff --git a/src/snapshots/old_syntax/stmt_parens_minus.md b/src/snapshots/old_syntax/stmt_parens_minus.md index a9e6f8f457..dd06f608b1 100644 --- a/src/snapshots/old_syntax/stmt_parens_minus.md +++ b/src/snapshots/old_syntax/stmt_parens_minus.md @@ -9,9 +9,12 @@ i (-2) ~~~ # EXPECTED -UNDEFINED VARIABLE - stmt_parens_minus.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `i` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/str_over_large_unicode_escape.md b/src/snapshots/old_syntax/str_over_large_unicode_escape.md index 6cd8469cce..585cac210d 100644 --- a/src/snapshots/old_syntax/str_over_large_unicode_escape.md +++ b/src/snapshots/old_syntax/str_over_large_unicode_escape.md @@ -8,9 +8,12 @@ type=expr '\u(FFFFFFFFF)' ~~~ # EXPECTED -too_long_single_quote - str_over_large_unicode_escape.md:1:1:1:16 -# PROBLEMS NIL +# PROBLEMS +**INVALID SCALAR** +I am part way through parsing this scalar literal (character literal), but it contains more than one character. +A single-quoted literal must contain exactly one character, e.g. 'a'. + # TOKENS ~~~zig SingleQuote(1:1-1:16),EndOfFile(1:16-1:16), diff --git a/src/snapshots/old_syntax/sub_minus_o_apply_minus_crash_bang.md b/src/snapshots/old_syntax/sub_minus_o_apply_minus_crash_bang.md index 3b41dbb101..320a805fbc 100644 --- a/src/snapshots/old_syntax/sub_minus_o_apply_minus_crash_bang.md +++ b/src/snapshots/old_syntax/sub_minus_o_apply_minus_crash_bang.md @@ -10,8 +10,6 @@ h- ~~~ # EXPECTED UNEXPECTED TOKEN IN EXPRESSION - sub_minus_o_apply_minus_crash_bang.md:2:1:2:3 -UNDEFINED VARIABLE - sub_minus_o_apply_minus_crash_bang.md:1:1:1:2 -expr_not_canonicalized - sub_minus_o_apply_minus_crash_bang.md:1:1:2:3 # PROBLEMS **UNEXPECTED TOKEN IN EXPRESSION** The token **-o** is not expected in an expression. @@ -25,6 +23,14 @@ Here is the problematic code: ^^ +**UNDEFINED VARIABLE** +Nothing is named `h` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNKNOWN OPERATOR** +This looks like an operator, but it's not one I recognize! +Check the spelling and make sure you're using a valid Roc operator. + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpBinaryMinus(1:2-1:3),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/sub_var_with_spaces.md b/src/snapshots/old_syntax/sub_var_with_spaces.md index 38e8a1392d..efd414c230 100644 --- a/src/snapshots/old_syntax/sub_var_with_spaces.md +++ b/src/snapshots/old_syntax/sub_var_with_spaces.md @@ -8,9 +8,12 @@ type=expr x - 2 ~~~ # EXPECTED -UNDEFINED VARIABLE - sub_var_with_spaces.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `x` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpBinaryMinus(1:3-1:4),Int(1:5-1:6),EndOfFile(1:6-1:6), diff --git a/src/snapshots/old_syntax/suffixed_question.md b/src/snapshots/old_syntax/suffixed_question.md index dec98943fc..2eeb38f770 100644 --- a/src/snapshots/old_syntax/suffixed_question.md +++ b/src/snapshots/old_syntax/suffixed_question.md @@ -9,8 +9,6 @@ Stdout.line??? ~~~ # EXPECTED UNEXPECTED TOKEN IN EXPRESSION - suffixed_question.md:1:14:1:15 -UNDEFINED VARIABLE - suffixed_question.md:1:1:1:12 -expr_not_canonicalized - suffixed_question.md:1:1:1:15 # PROBLEMS **UNEXPECTED TOKEN IN EXPRESSION** The token **?** is not expected in an expression. @@ -24,6 +22,14 @@ Stdout.line??? ^ +**UNDEFINED VARIABLE** +Nothing is named `line` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNKNOWN OPERATOR** +This looks like an operator, but it's not one I recognize! +Check the spelling and make sure you're using a valid Roc operator. + # TOKENS ~~~zig UpperIdent(1:1-1:7),NoSpaceDotLowerIdent(1:7-1:12),OpDoubleQuestion(1:12-1:14),NoSpaceOpQuestion(1:14-1:15),EndOfFile(1:15-1:15), diff --git a/src/snapshots/old_syntax/suffixed_question_nested.md b/src/snapshots/old_syntax/suffixed_question_nested.md index 27c3fa0710..be771525a9 100644 --- a/src/snapshots/old_syntax/suffixed_question_nested.md +++ b/src/snapshots/old_syntax/suffixed_question_nested.md @@ -8,9 +8,12 @@ type=expr foo? ( bar? baz) ( blah stuff) ~~~ # EXPECTED -not_implemented - suffixed_question_nested.md:1:1:1:1 -# PROBLEMS NIL +# PROBLEMS +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: canonicalize suffix_single_question expression +Let us know if you want to help! + # TOKENS ~~~zig LowerIdent(1:1-1:4),NoSpaceOpQuestion(1:4-1:5),OpenRound(1:7-1:8),LowerIdent(1:10-1:13),NoSpaceOpQuestion(1:13-1:14),LowerIdent(1:15-1:18),CloseRound(1:18-1:19),OpenRound(1:21-1:22),LowerIdent(1:23-1:27),LowerIdent(1:28-1:33),CloseRound(1:33-1:34),EndOfFile(1:34-1:34), diff --git a/src/snapshots/old_syntax/tag_union_end.md b/src/snapshots/old_syntax/tag_union_end.md index 238f29a2f0..56bc589e15 100644 --- a/src/snapshots/old_syntax/tag_union_end.md +++ b/src/snapshots/old_syntax/tag_union_end.md @@ -8,9 +8,12 @@ type=expr f : [Yes, ~~~ # EXPECTED -UNDEFINED VARIABLE - tag_union_end.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `f` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpColon(1:3-1:4),OpenSquare(1:5-1:6),UpperIdent(1:6-1:9),Comma(1:9-1:10),EndOfFile(1:10-1:10), diff --git a/src/snapshots/old_syntax/tag_union_functions_as.md b/src/snapshots/old_syntax/tag_union_functions_as.md index e4056b2779..5ad0fa3395 100644 --- a/src/snapshots/old_syntax/tag_union_functions_as.md +++ b/src/snapshots/old_syntax/tag_union_functions_as.md @@ -10,9 +10,12 @@ main_for_host = main 42 ~~~ # EXPECTED -UNDEFINED VARIABLE - tag_union_functions_as.md:1:1:1:14 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `main_for_host` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:14),OpColon(1:15-1:16),OpenSquare(1:17-1:18),UpperIdent(1:18-1:29),UpperIdent(1:30-1:33),OpenRound(1:34-1:35),OpenCurly(1:35-1:36),CloseCurly(1:36-1:37),OpArrow(1:38-1:40),UpperIdent(1:41-1:43),CloseRound(1:43-1:44),Comma(1:44-1:45),UpperIdent(1:46-1:57),UpperIdent(1:58-1:61),OpenRound(1:62-1:63),OpenCurly(1:63-1:64),CloseCurly(1:64-1:65),OpArrow(1:66-1:68),UpperIdent(1:69-1:71),CloseRound(1:71-1:72),Comma(1:72-1:73),UpperIdent(1:74-1:78),CloseSquare(1:78-1:79),KwAs(1:80-1:82),UpperIdent(1:83-1:85),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/tag_union_lowercase_tag_name.md b/src/snapshots/old_syntax/tag_union_lowercase_tag_name.md index 82b4481ddf..c56369d808 100644 --- a/src/snapshots/old_syntax/tag_union_lowercase_tag_name.md +++ b/src/snapshots/old_syntax/tag_union_lowercase_tag_name.md @@ -8,9 +8,12 @@ type=expr f : [lowercase] ~~~ # EXPECTED -UNDEFINED VARIABLE - tag_union_lowercase_tag_name.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `f` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpColon(1:3-1:4),OpenSquare(1:5-1:6),LowerIdent(1:6-1:15),CloseSquare(1:15-1:16),EndOfFile(1:16-1:16), diff --git a/src/snapshots/old_syntax/tag_union_open.md b/src/snapshots/old_syntax/tag_union_open.md index bcc7f10eb2..29c2a89d3d 100644 --- a/src/snapshots/old_syntax/tag_union_open.md +++ b/src/snapshots/old_syntax/tag_union_open.md @@ -8,9 +8,12 @@ type=expr f : [ ~~~ # EXPECTED -UNDEFINED VARIABLE - tag_union_open.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `f` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpColon(1:3-1:4),OpenSquare(1:5-1:6),EndOfFile(1:6-1:6), diff --git a/src/snapshots/old_syntax/tag_union_second_lowercase_tag_name.md b/src/snapshots/old_syntax/tag_union_second_lowercase_tag_name.md index ab54e9a8ab..235ee6a956 100644 --- a/src/snapshots/old_syntax/tag_union_second_lowercase_tag_name.md +++ b/src/snapshots/old_syntax/tag_union_second_lowercase_tag_name.md @@ -8,9 +8,12 @@ type=expr f : [Good, bad] ~~~ # EXPECTED -UNDEFINED VARIABLE - tag_union_second_lowercase_tag_name.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `f` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpColon(1:3-1:4),OpenSquare(1:5-1:6),UpperIdent(1:6-1:10),Comma(1:10-1:11),LowerIdent(1:12-1:15),CloseSquare(1:15-1:16),EndOfFile(1:16-1:16), diff --git a/src/snapshots/old_syntax/trailing_operator.md b/src/snapshots/old_syntax/trailing_operator.md index 27a9c586da..3c85137e42 100644 --- a/src/snapshots/old_syntax/trailing_operator.md +++ b/src/snapshots/old_syntax/trailing_operator.md @@ -9,7 +9,6 @@ J- ~~~ # EXPECTED UNEXPECTED TOKEN IN EXPRESSION - trailing_operator.md:1:3:1:3 -expr_not_canonicalized - trailing_operator.md:1:1:1:3 # PROBLEMS **UNEXPECTED TOKEN IN EXPRESSION** The token is not expected in an expression. @@ -23,6 +22,10 @@ J- +**UNKNOWN OPERATOR** +This looks like an operator, but it's not one I recognize! +Check the spelling and make sure you're using a valid Roc operator. + # TOKENS ~~~zig UpperIdent(1:1-1:2),OpBinaryMinus(1:2-1:3),EndOfFile(1:3-1:3), diff --git a/src/snapshots/old_syntax/triple_paren_pat_ann.md b/src/snapshots/old_syntax/triple_paren_pat_ann.md index 8b6e810b6a..ee0bd75e2d 100644 --- a/src/snapshots/old_syntax/triple_paren_pat_ann.md +++ b/src/snapshots/old_syntax/triple_paren_pat_ann.md @@ -10,7 +10,8 @@ type=expr i ~~~ # EXPECTED -NIL +TYPE MISMATCH - triple_paren_pat_ann.md:1:4:1:5 +TYPE MISMATCH - triple_paren_pat_ann.md:1:1:1:2 # PROBLEMS **TYPE MISMATCH** This expression is used in an unexpected way: diff --git a/src/snapshots/old_syntax/try_pipe_suffix.md b/src/snapshots/old_syntax/try_pipe_suffix.md index e2f16a2290..5e1ad12b51 100644 --- a/src/snapshots/old_syntax/try_pipe_suffix.md +++ b/src/snapshots/old_syntax/try_pipe_suffix.md @@ -8,9 +8,12 @@ type=expr Str.toU64 "123"|> try ~~~ # EXPECTED -UNDEFINED VARIABLE - try_pipe_suffix.md:1:1:1:10 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `toU64` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig UpperIdent(1:1-1:4),NoSpaceDotLowerIdent(1:4-1:10),StringStart(1:11-1:12),StringPart(1:12-1:15),StringEnd(1:15-1:16),OpPizza(1:16-1:18),LowerIdent(1:19-1:22),EndOfFile(1:22-1:22), diff --git a/src/snapshots/old_syntax/try_plain_prefix.md b/src/snapshots/old_syntax/try_plain_prefix.md index b92cfc6917..8f08328405 100644 --- a/src/snapshots/old_syntax/try_plain_prefix.md +++ b/src/snapshots/old_syntax/try_plain_prefix.md @@ -8,9 +8,12 @@ type=expr try Str.toU64 "123" ~~~ # EXPECTED -UNDEFINED VARIABLE - try_plain_prefix.md:1:1:1:4 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `try` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:4),UpperIdent(1:6-1:9),NoSpaceDotLowerIdent(1:9-1:15),StringStart(1:17-1:18),StringPart(1:18-1:21),StringEnd(1:21-1:22),EndOfFile(1:22-1:22), diff --git a/src/snapshots/old_syntax/try_subtract.md b/src/snapshots/old_syntax/try_subtract.md index 80e4de34e0..e0f4ddec12 100644 --- a/src/snapshots/old_syntax/try_subtract.md +++ b/src/snapshots/old_syntax/try_subtract.md @@ -8,10 +8,16 @@ type=expr try-w ~~~ # EXPECTED -UNDEFINED VARIABLE - try_subtract.md:1:1:1:4 -UNDEFINED VARIABLE - try_subtract.md:1:5:1:6 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `try` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `w` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:4),OpBinaryMinus(1:4-1:5),LowerIdent(1:5-1:6),EndOfFile(1:6-1:6), diff --git a/src/snapshots/old_syntax/tuple_access_after_ident.md b/src/snapshots/old_syntax/tuple_access_after_ident.md index 366d86a8d5..56d3e7fc72 100644 --- a/src/snapshots/old_syntax/tuple_access_after_ident.md +++ b/src/snapshots/old_syntax/tuple_access_after_ident.md @@ -9,9 +9,12 @@ abc = (1, 2, 3) abc.0 ~~~ # EXPECTED -UNDEFINED VARIABLE - tuple_access_after_ident.md:1:1:1:4 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `abc` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:4),OpAssign(1:5-1:6),OpenRound(1:7-1:8),Int(1:8-1:9),Comma(1:9-1:10),Int(1:11-1:12),Comma(1:12-1:13),Int(1:14-1:15),CloseRound(1:15-1:16),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/tuple_access_after_record.md b/src/snapshots/old_syntax/tuple_access_after_record.md index 60da2015ce..b451d30fc0 100644 --- a/src/snapshots/old_syntax/tuple_access_after_record.md +++ b/src/snapshots/old_syntax/tuple_access_after_record.md @@ -8,7 +8,7 @@ type=expr { a: (1, 2) }.a.0 ~~~ # EXPECTED -expr_no_space_dot_int - tuple_access_after_record.md:1:16:1:18 +PARSE ERROR - tuple_access_after_record.md:1:16:1:18 # PROBLEMS **PARSE ERROR** A parsing error occurred: `expr_no_space_dot_int` diff --git a/src/snapshots/old_syntax/tuple_apply_parens_comment.md b/src/snapshots/old_syntax/tuple_apply_parens_comment.md index 8e4ec95c05..3ae036069d 100644 --- a/src/snapshots/old_syntax/tuple_apply_parens_comment.md +++ b/src/snapshots/old_syntax/tuple_apply_parens_comment.md @@ -9,8 +9,8 @@ type=expr L)L,L)#\ ~~~ # EXPECTED -expected_expr_close_round_or_comma - tuple_apply_parens_comment.md:2:2:2:4 -expected_expr_close_round_or_comma - tuple_apply_parens_comment.md:2:6:2:9 +PARSE ERROR - tuple_apply_parens_comment.md:2:2:2:4 +PARSE ERROR - tuple_apply_parens_comment.md:2:6:2:9 # PROBLEMS **PARSE ERROR** A parsing error occurred: `expected_expr_close_round_or_comma` diff --git a/src/snapshots/old_syntax/tuple_destructure_bang.md b/src/snapshots/old_syntax/tuple_destructure_bang.md index 8a5620d991..dae2567bce 100644 --- a/src/snapshots/old_syntax/tuple_destructure_bang.md +++ b/src/snapshots/old_syntax/tuple_destructure_bang.md @@ -10,10 +10,16 @@ type=expr launchTheNukes! code ~~~ # EXPECTED -UNDEFINED VARIABLE - tuple_destructure_bang.md:1:2:1:17 -UNDEFINED VARIABLE - tuple_destructure_bang.md:1:19:1:23 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `launchTheNukes!` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `code` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig OpenRound(1:1-1:2),LowerIdent(1:2-1:17),Comma(1:17-1:18),LowerIdent(1:19-1:23),CloseRound(1:23-1:24),OpAssign(1:25-1:26),LowerIdent(1:27-1:33),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/tuple_funcs_in_parens.md b/src/snapshots/old_syntax/tuple_funcs_in_parens.md index bcfd5d2c04..d1058079b6 100644 --- a/src/snapshots/old_syntax/tuple_funcs_in_parens.md +++ b/src/snapshots/old_syntax/tuple_funcs_in_parens.md @@ -9,9 +9,12 @@ f: (a, b -> c, d -> e, g) f ~~~ # EXPECTED -UNDEFINED VARIABLE - tuple_funcs_in_parens.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `f` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpColon(1:2-1:3),OpenRound(1:4-1:5),LowerIdent(1:5-1:6),Comma(1:6-1:7),LowerIdent(1:8-1:9),OpArrow(1:10-1:12),LowerIdent(1:13-1:14),Comma(1:14-1:15),LowerIdent(1:16-1:17),OpArrow(1:18-1:20),LowerIdent(1:21-1:22),Comma(1:22-1:23),LowerIdent(1:24-1:25),CloseRound(1:25-1:26),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/tuple_type.md b/src/snapshots/old_syntax/tuple_type.md index 768dd20639..3af9b95156 100644 --- a/src/snapshots/old_syntax/tuple_type.md +++ b/src/snapshots/old_syntax/tuple_type.md @@ -11,9 +11,12 @@ f = \x -> x f (1, 2) ~~~ # EXPECTED -UNDEFINED VARIABLE - tuple_type.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `f` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpColon(1:2-1:3),OpenRound(1:4-1:5),UpperIdent(1:5-1:8),Comma(1:8-1:9),UpperIdent(1:10-1:13),CloseRound(1:13-1:14),OpArrow(1:15-1:17),OpenRound(1:18-1:19),UpperIdent(1:19-1:22),Comma(1:22-1:23),UpperIdent(1:24-1:27),CloseRound(1:27-1:28),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/tuple_type_ext.md b/src/snapshots/old_syntax/tuple_type_ext.md index be4b93c519..c99b0fc33b 100644 --- a/src/snapshots/old_syntax/tuple_type_ext.md +++ b/src/snapshots/old_syntax/tuple_type_ext.md @@ -11,9 +11,12 @@ f = \x -> x f (1, 2) ~~~ # EXPECTED -UNDEFINED VARIABLE - tuple_type_ext.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `f` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpColon(1:2-1:3),OpenRound(1:4-1:5),UpperIdent(1:5-1:8),Comma(1:8-1:9),UpperIdent(1:10-1:13),CloseRound(1:13-1:14),LowerIdent(1:14-1:15),OpArrow(1:16-1:18),OpenRound(1:19-1:20),UpperIdent(1:20-1:23),Comma(1:23-1:24),UpperIdent(1:25-1:28),CloseRound(1:28-1:29),LowerIdent(1:29-1:30),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/tuples_parens_comments.md b/src/snapshots/old_syntax/tuples_parens_comments.md index 06c9a522d6..49217db13c 100644 --- a/src/snapshots/old_syntax/tuples_parens_comments.md +++ b/src/snapshots/old_syntax/tuples_parens_comments.md @@ -13,7 +13,7 @@ type=expr ui) ~~~ # EXPECTED -expected_expr_close_round_or_comma - tuples_parens_comments.md:6:3:6:4 +PARSE ERROR - tuples_parens_comments.md:6:3:6:4 # PROBLEMS **PARSE ERROR** A parsing error occurred: `expected_expr_close_round_or_comma` diff --git a/src/snapshots/old_syntax/two_branch_when.md b/src/snapshots/old_syntax/two_branch_when.md index 1353e8a63a..d9ebb5a064 100644 --- a/src/snapshots/old_syntax/two_branch_when.md +++ b/src/snapshots/old_syntax/two_branch_when.md @@ -10,9 +10,12 @@ when x is "mise" -> 2 ~~~ # EXPECTED -UNDEFINED VARIABLE - two_branch_when.md:1:1:1:5 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `when` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:5),LowerIdent(1:6-1:7),LowerIdent(1:8-1:10),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/type_annotation_double_colon.md b/src/snapshots/old_syntax/type_annotation_double_colon.md index 078e78e9bf..03582b3f42 100644 --- a/src/snapshots/old_syntax/type_annotation_double_colon.md +++ b/src/snapshots/old_syntax/type_annotation_double_colon.md @@ -11,9 +11,12 @@ f = 42 f ~~~ # EXPECTED -UNDEFINED VARIABLE - type_annotation_double_colon.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `f` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpColon(1:3-1:4),OpColon(1:4-1:5),UpperIdent(1:6-1:9),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/type_apply_stray_dot.md b/src/snapshots/old_syntax/type_apply_stray_dot.md index 72355fd451..0b208e8e9d 100644 --- a/src/snapshots/old_syntax/type_apply_stray_dot.md +++ b/src/snapshots/old_syntax/type_apply_stray_dot.md @@ -8,9 +8,12 @@ type=expr f : . ~~~ # EXPECTED -UNDEFINED VARIABLE - type_apply_stray_dot.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `f` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpColon(1:3-1:4),Dot(1:5-1:6),EndOfFile(1:6-1:6), diff --git a/src/snapshots/old_syntax/type_argument_arrow_then_nothing.md b/src/snapshots/old_syntax/type_argument_arrow_then_nothing.md index bf624f9ab4..a8966985b2 100644 --- a/src/snapshots/old_syntax/type_argument_arrow_then_nothing.md +++ b/src/snapshots/old_syntax/type_argument_arrow_then_nothing.md @@ -11,9 +11,12 @@ f = 0 f ~~~ # EXPECTED -UNDEFINED VARIABLE - type_argument_arrow_then_nothing.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `f` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpColon(1:3-1:4),UpperIdent(1:5-1:8),Comma(1:8-1:9),UpperIdent(1:10-1:13),OpArrow(1:14-1:16),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/type_argument_no_arrow.md b/src/snapshots/old_syntax/type_argument_no_arrow.md index afee82cc3f..29a82255a9 100644 --- a/src/snapshots/old_syntax/type_argument_no_arrow.md +++ b/src/snapshots/old_syntax/type_argument_no_arrow.md @@ -11,9 +11,12 @@ f = 0 f ~~~ # EXPECTED -UNDEFINED VARIABLE - type_argument_no_arrow.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `f` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpColon(1:3-1:4),UpperIdent(1:5-1:8),Comma(1:8-1:9),UpperIdent(1:10-1:13),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/type_decl_with_underscore.md b/src/snapshots/old_syntax/type_decl_with_underscore.md index 811614a056..8c339e7b03 100644 --- a/src/snapshots/old_syntax/type_decl_with_underscore.md +++ b/src/snapshots/old_syntax/type_decl_with_underscore.md @@ -9,9 +9,12 @@ doStuff : UserId -> Dict Str _ 42 ~~~ # EXPECTED -UNDEFINED VARIABLE - type_decl_with_underscore.md:1:1:1:8 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `doStuff` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:8),OpColon(1:9-1:10),UpperIdent(1:11-1:17),OpArrow(1:18-1:20),UpperIdent(1:21-1:25),UpperIdent(1:26-1:29),Underscore(1:30-1:31),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/type_double_comma.md b/src/snapshots/old_syntax/type_double_comma.md index 03158733d3..50ea7928a6 100644 --- a/src/snapshots/old_syntax/type_double_comma.md +++ b/src/snapshots/old_syntax/type_double_comma.md @@ -11,9 +11,12 @@ f = 0 f ~~~ # EXPECTED -UNDEFINED VARIABLE - type_double_comma.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `f` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpColon(1:3-1:4),UpperIdent(1:5-1:8),Comma(1:8-1:9),Comma(1:9-1:10),UpperIdent(1:10-1:13),OpArrow(1:14-1:16),UpperIdent(1:17-1:20),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/type_in_parens_end.md b/src/snapshots/old_syntax/type_in_parens_end.md index 4373b0c5c8..e4eac807ad 100644 --- a/src/snapshots/old_syntax/type_in_parens_end.md +++ b/src/snapshots/old_syntax/type_in_parens_end.md @@ -8,9 +8,12 @@ type=expr f : ( I64 ~~~ # EXPECTED -UNDEFINED VARIABLE - type_in_parens_end.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `f` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpColon(1:3-1:4),OpenRound(1:5-1:6),UpperIdent(1:7-1:10),EndOfFile(1:10-1:10), diff --git a/src/snapshots/old_syntax/type_in_parens_start.md b/src/snapshots/old_syntax/type_in_parens_start.md index 2a950db1ae..216416dfc8 100644 --- a/src/snapshots/old_syntax/type_in_parens_start.md +++ b/src/snapshots/old_syntax/type_in_parens_start.md @@ -8,9 +8,12 @@ type=expr f : ( ~~~ # EXPECTED -UNDEFINED VARIABLE - type_in_parens_start.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `f` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpColon(1:3-1:4),OpenRound(1:5-1:6),EndOfFile(1:6-1:6), diff --git a/src/snapshots/old_syntax/type_inline_alias.md b/src/snapshots/old_syntax/type_inline_alias.md index a1ff71fdf1..65c1b23006 100644 --- a/src/snapshots/old_syntax/type_inline_alias.md +++ b/src/snapshots/old_syntax/type_inline_alias.md @@ -11,9 +11,12 @@ f = 0 f ~~~ # EXPECTED -UNDEFINED VARIABLE - type_inline_alias.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `f` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpColon(1:3-1:4),UpperIdent(1:5-1:8),KwAs(1:9-1:11),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/type_signature_def.md b/src/snapshots/old_syntax/type_signature_def.md index 75841d0f54..7b09cc9f4e 100644 --- a/src/snapshots/old_syntax/type_signature_def.md +++ b/src/snapshots/old_syntax/type_signature_def.md @@ -11,9 +11,12 @@ foo = 4 42 ~~~ # EXPECTED -UNDEFINED VARIABLE - type_signature_def.md:1:1:1:4 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `foo` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:4),OpColon(1:5-1:6),UpperIdent(1:7-1:10),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/type_signature_function_def.md b/src/snapshots/old_syntax/type_signature_function_def.md index db84443b52..02d4e85e04 100644 --- a/src/snapshots/old_syntax/type_signature_function_def.md +++ b/src/snapshots/old_syntax/type_signature_function_def.md @@ -11,9 +11,12 @@ foo = \x, _ -> 42 42 ~~~ # EXPECTED -UNDEFINED VARIABLE - type_signature_function_def.md:1:1:1:4 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `foo` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:4),OpColon(1:5-1:6),UpperIdent(1:7-1:10),Comma(1:10-1:11),UpperIdent(1:12-1:17),OpArrow(1:18-1:20),UpperIdent(1:21-1:25),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/type_tuple_where_annotation.md b/src/snapshots/old_syntax/type_tuple_where_annotation.md index 2748ad5b14..50c3314dec 100644 --- a/src/snapshots/old_syntax/type_tuple_where_annotation.md +++ b/src/snapshots/old_syntax/type_tuple_where_annotation.md @@ -10,9 +10,12 @@ nextWhileLess = \buckets, key, shifts -> foo nextWhileLess ~~~ # EXPECTED -UNDEFINED VARIABLE - type_tuple_where_annotation.md:1:1:1:14 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `nextWhileLess` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:14),OpColon(1:15-1:16),UpperIdent(1:17-1:21),UpperIdent(1:22-1:28),Comma(1:28-1:29),LowerIdent(1:30-1:31),Comma(1:31-1:32),UpperIdent(1:33-1:35),OpArrow(1:36-1:38),OpenRound(1:39-1:40),UpperIdent(1:40-1:43),Comma(1:43-1:44),UpperIdent(1:45-1:48),CloseRound(1:48-1:49),KwWhere(1:50-1:55),LowerIdent(1:56-1:57),KwImplements(1:58-1:68),UpperIdent(1:69-1:73),OpAmpersand(1:74-1:75),UpperIdent(1:76-1:78),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/unary_negation_arg.md b/src/snapshots/old_syntax/unary_negation_arg.md index 3d44e1b6b8..4c929ad551 100644 --- a/src/snapshots/old_syntax/unary_negation_arg.md +++ b/src/snapshots/old_syntax/unary_negation_arg.md @@ -8,9 +8,12 @@ type=expr whee 12 -foo ~~~ # EXPECTED -UNDEFINED VARIABLE - unary_negation_arg.md:1:1:1:5 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `whee` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:5),Int(1:7-1:9),OpUnaryMinus(1:10-1:11),LowerIdent(1:11-1:14),EndOfFile(1:14-1:14), diff --git a/src/snapshots/old_syntax/unfinished_closure_pattern_in_parens.md b/src/snapshots/old_syntax/unfinished_closure_pattern_in_parens.md index e1bb424c0d..cbaf0f7e0a 100644 --- a/src/snapshots/old_syntax/unfinished_closure_pattern_in_parens.md +++ b/src/snapshots/old_syntax/unfinished_closure_pattern_in_parens.md @@ -9,9 +9,12 @@ x = \( a ) ~~~ # EXPECTED -UNDEFINED VARIABLE - unfinished_closure_pattern_in_parens.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `x` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpAssign(1:3-1:4),OpBackslash(1:5-1:6),NoSpaceOpenRound(1:6-1:7),LowerIdent(1:8-1:9),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/unicode_not_hex.md b/src/snapshots/old_syntax/unicode_not_hex.md index b23841649d..18be3fae18 100644 --- a/src/snapshots/old_syntax/unicode_not_hex.md +++ b/src/snapshots/old_syntax/unicode_not_hex.md @@ -8,7 +8,7 @@ type=expr "abc\u(zzzz)def" ~~~ # EXPECTED -InvalidUnicodeEscapeSequence - unicode_not_hex.md:1:8:1:8 +NIL # PROBLEMS **INVALID UNICODE ESCAPE SEQUENCE** This Unicode escape sequence is not valid. diff --git a/src/snapshots/old_syntax/unicode_overflow_str.md b/src/snapshots/old_syntax/unicode_overflow_str.md index 45cb261e11..d3131664ca 100644 --- a/src/snapshots/old_syntax/unicode_overflow_str.md +++ b/src/snapshots/old_syntax/unicode_overflow_str.md @@ -8,9 +8,12 @@ type=expr m"\u(FFFFFF)"s ~~~ # EXPECTED -UNDEFINED VARIABLE - unicode_overflow_str.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `m` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),StringStart(1:2-1:3),StringPart(1:3-1:13),StringEnd(1:13-1:14),LowerIdent(1:14-1:15),EndOfFile(1:15-1:15), diff --git a/src/snapshots/old_syntax/value_def_confusion.md b/src/snapshots/old_syntax/value_def_confusion.md index 21c66d2583..7561979de9 100644 --- a/src/snapshots/old_syntax/value_def_confusion.md +++ b/src/snapshots/old_syntax/value_def_confusion.md @@ -11,9 +11,12 @@ F abc ~~~ # EXPECTED -UNDEFINED VARIABLE - value_def_confusion.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `a` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpColon(1:2-1:3),UpperIdent(1:3-1:4),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/var_else.md b/src/snapshots/old_syntax/var_else.md index 1181bfbd04..5ca77903bc 100644 --- a/src/snapshots/old_syntax/var_else.md +++ b/src/snapshots/old_syntax/var_else.md @@ -8,9 +8,12 @@ type=expr elsewhere ~~~ # EXPECTED -UNDEFINED VARIABLE - var_else.md:1:1:1:10 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `elsewhere` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:10),EndOfFile(1:10-1:10), diff --git a/src/snapshots/old_syntax/var_if.md b/src/snapshots/old_syntax/var_if.md index dc398cb9c2..28241357dc 100644 --- a/src/snapshots/old_syntax/var_if.md +++ b/src/snapshots/old_syntax/var_if.md @@ -8,9 +8,12 @@ type=expr iffy ~~~ # EXPECTED -UNDEFINED VARIABLE - var_if.md:1:1:1:5 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `iffy` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:5),EndOfFile(1:5-1:5), diff --git a/src/snapshots/old_syntax/var_is.md b/src/snapshots/old_syntax/var_is.md index 11c34b751d..5d35eec595 100644 --- a/src/snapshots/old_syntax/var_is.md +++ b/src/snapshots/old_syntax/var_is.md @@ -8,9 +8,12 @@ type=expr isnt ~~~ # EXPECTED -UNDEFINED VARIABLE - var_is.md:1:1:1:5 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `isnt` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:5),EndOfFile(1:5-1:5), diff --git a/src/snapshots/old_syntax/var_minus_two.md b/src/snapshots/old_syntax/var_minus_two.md index fa8680617c..799b55c975 100644 --- a/src/snapshots/old_syntax/var_minus_two.md +++ b/src/snapshots/old_syntax/var_minus_two.md @@ -8,9 +8,12 @@ type=expr x-2 ~~~ # EXPECTED -UNDEFINED VARIABLE - var_minus_two.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `x` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpBinaryMinus(1:2-1:3),Int(1:3-1:4),EndOfFile(1:4-1:4), diff --git a/src/snapshots/old_syntax/var_then.md b/src/snapshots/old_syntax/var_then.md index 5774500dc4..de8c709a7d 100644 --- a/src/snapshots/old_syntax/var_then.md +++ b/src/snapshots/old_syntax/var_then.md @@ -8,9 +8,12 @@ type=expr thenever ~~~ # EXPECTED -UNDEFINED VARIABLE - var_then.md:1:1:1:9 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `thenever` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:9),EndOfFile(1:9-1:9), diff --git a/src/snapshots/old_syntax/var_when.md b/src/snapshots/old_syntax/var_when.md index 8e94d620d0..88b02c32aa 100644 --- a/src/snapshots/old_syntax/var_when.md +++ b/src/snapshots/old_syntax/var_when.md @@ -8,9 +8,12 @@ type=expr whenever ~~~ # EXPECTED -UNDEFINED VARIABLE - var_when.md:1:1:1:9 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `whenever` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:9),EndOfFile(1:9-1:9), diff --git a/src/snapshots/old_syntax/weird_escape.md b/src/snapshots/old_syntax/weird_escape.md index c0ce1e120c..453857e84d 100644 --- a/src/snapshots/old_syntax/weird_escape.md +++ b/src/snapshots/old_syntax/weird_escape.md @@ -8,7 +8,7 @@ type=expr "abc\qdef" ~~~ # EXPECTED -InvalidEscapeSequence - weird_escape.md:1:6:1:6 +NIL # PROBLEMS **INVALID ESCAPE SEQUENCE** This escape sequence is not recognized. diff --git a/src/snapshots/old_syntax/when_branch_comment_after_parens.md b/src/snapshots/old_syntax/when_branch_comment_after_parens.md index b726f1bdc3..3da810d20b 100644 --- a/src/snapshots/old_syntax/when_branch_comment_after_parens.md +++ b/src/snapshots/old_syntax/when_branch_comment_after_parens.md @@ -10,9 +10,12 @@ O->(s )# ~~~ # EXPECTED -UNDEFINED VARIABLE - when_branch_comment_after_parens.md:1:1:1:5 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `when` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:5),LowerIdent(1:6-1:7),LowerIdent(1:8-1:10),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/when_comment_after_pattern.md b/src/snapshots/old_syntax/when_comment_after_pattern.md index c786f1f813..f1ab7b8137 100644 --- a/src/snapshots/old_syntax/when_comment_after_pattern.md +++ b/src/snapshots/old_syntax/when_comment_after_pattern.md @@ -10,9 +10,12 @@ O# ->r ~~~ # EXPECTED -UNDEFINED VARIABLE - when_comment_after_pattern.md:1:1:1:5 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `when` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:5),LowerIdent(1:6-1:9),LowerIdent(1:10-1:12),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/when_comment_bbefore_if.md b/src/snapshots/old_syntax/when_comment_bbefore_if.md index 50d3f55679..5fb437867e 100644 --- a/src/snapshots/old_syntax/when_comment_bbefore_if.md +++ b/src/snapshots/old_syntax/when_comment_bbefore_if.md @@ -10,9 +10,12 @@ is S# if S->e ~~~ # EXPECTED -UNDEFINED VARIABLE - when_comment_bbefore_if.md:1:1:1:5 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `when` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:5),Int(1:6-1:7),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/when_if_guard.md b/src/snapshots/old_syntax/when_if_guard.md index fd6c613215..8e01a00715 100644 --- a/src/snapshots/old_syntax/when_if_guard.md +++ b/src/snapshots/old_syntax/when_if_guard.md @@ -16,9 +16,12 @@ when x is 3 ~~~ # EXPECTED -UNDEFINED VARIABLE - when_if_guard.md:1:1:1:5 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `when` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:5),LowerIdent(1:6-1:7),LowerIdent(1:8-1:10),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/when_in_assignment.md b/src/snapshots/old_syntax/when_in_assignment.md index 541d92cc09..1360c74df9 100644 --- a/src/snapshots/old_syntax/when_in_assignment.md +++ b/src/snapshots/old_syntax/when_in_assignment.md @@ -10,9 +10,12 @@ x = when n is 42 ~~~ # EXPECTED -UNDEFINED VARIABLE - when_in_assignment.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `x` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpAssign(1:3-1:4),LowerIdent(1:5-1:9),LowerIdent(1:10-1:11),LowerIdent(1:12-1:14),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/when_in_binop_in_assign_with_sneaky_newline.md b/src/snapshots/old_syntax/when_in_binop_in_assign_with_sneaky_newline.md index b8939f2b1e..8e012f7e27 100644 --- a/src/snapshots/old_syntax/when_in_binop_in_assign_with_sneaky_newline.md +++ b/src/snapshots/old_syntax/when_in_binop_in_assign_with_sneaky_newline.md @@ -11,9 +11,12 @@ is e->(i h ~~~ # EXPECTED -UNDEFINED VARIABLE - when_in_binop_in_assign_with_sneaky_newline.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `j` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpAssign(1:2-1:3),LowerIdent(1:3-1:4),OpPercent(1:4-1:5),LowerIdent(1:5-1:9),LowerIdent(1:10-1:11),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/when_in_binop_in_closure_in_when_guard_wow_fuzzer.md b/src/snapshots/old_syntax/when_in_binop_in_closure_in_when_guard_wow_fuzzer.md index caf47a4943..aa1f59d620 100644 --- a/src/snapshots/old_syntax/when_in_binop_in_closure_in_when_guard_wow_fuzzer.md +++ b/src/snapshots/old_syntax/when_in_binop_in_closure_in_when_guard_wow_fuzzer.md @@ -12,9 +12,12 @@ is z->e z->m ~~~ # EXPECTED -UNDEFINED VARIABLE - when_in_binop_in_closure_in_when_guard_wow_fuzzer.md:1:1:1:5 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `when` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:5),LowerIdent(1:6-1:7),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/when_in_binops.md b/src/snapshots/old_syntax/when_in_binops.md index 1294b53337..a9f398c0c4 100644 --- a/src/snapshots/old_syntax/when_in_binops.md +++ b/src/snapshots/old_syntax/when_in_binops.md @@ -10,11 +10,20 @@ dif z->m ~~~ # EXPECTED -UNDEFINED VARIABLE - when_in_closure_in_when_guard_wtf.md:1:1:1:5 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `when` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:5),LowerIdent(1:6-1:7),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/when_in_function.md b/src/snapshots/old_syntax/when_in_function.md index 36bc92a47a..44b4217db0 100644 --- a/src/snapshots/old_syntax/when_in_function.md +++ b/src/snapshots/old_syntax/when_in_function.md @@ -10,9 +10,12 @@ func = \x -> when n is 42 ~~~ # EXPECTED -UNDEFINED VARIABLE - when_in_function.md:1:1:1:5 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `func` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:5),OpAssign(1:6-1:7),OpBackslash(1:8-1:9),LowerIdent(1:9-1:10),OpArrow(1:11-1:13),LowerIdent(1:14-1:18),LowerIdent(1:19-1:20),LowerIdent(1:21-1:23),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/when_in_function_python_style_indent.md b/src/snapshots/old_syntax/when_in_function_python_style_indent.md index 847c4f10c1..3eba9df444 100644 --- a/src/snapshots/old_syntax/when_in_function_python_style_indent.md +++ b/src/snapshots/old_syntax/when_in_function_python_style_indent.md @@ -10,9 +10,12 @@ func = \x -> when n is 42 ~~~ # EXPECTED -UNDEFINED VARIABLE - when_in_function_python_style_indent.md:1:1:1:5 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `func` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:5),OpAssign(1:6-1:7),OpBackslash(1:8-1:9),LowerIdent(1:9-1:10),OpArrow(1:11-1:13),LowerIdent(1:14-1:18),LowerIdent(1:19-1:20),LowerIdent(1:21-1:23),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/when_in_list.md b/src/snapshots/old_syntax/when_in_list.md index 6d4243dc79..25b66b727f 100644 --- a/src/snapshots/old_syntax/when_in_list.md +++ b/src/snapshots/old_syntax/when_in_list.md @@ -9,7 +9,7 @@ type=expr ]] ~~~ # EXPECTED -expected_expr_close_square_or_comma - when_in_list.md:2:1:2:3 +LIST NOT CLOSED - when_in_list.md:2:1:2:3 # PROBLEMS **LIST NOT CLOSED** This list is missing a closing bracket or has a syntax error. diff --git a/src/snapshots/old_syntax/when_in_parens.md b/src/snapshots/old_syntax/when_in_parens.md index f6dda00403..ed7507f456 100644 --- a/src/snapshots/old_syntax/when_in_parens.md +++ b/src/snapshots/old_syntax/when_in_parens.md @@ -10,7 +10,7 @@ type=expr 3) ~~~ # EXPECTED -expected_expr_close_round_or_comma - when_in_parens.md:3:10:3:11 +PARSE ERROR - when_in_parens.md:3:10:3:11 # PROBLEMS **PARSE ERROR** A parsing error occurred: `expected_expr_close_round_or_comma` diff --git a/src/snapshots/old_syntax/when_in_parens_indented.md b/src/snapshots/old_syntax/when_in_parens_indented.md index 89ec969cd3..1915135fcd 100644 --- a/src/snapshots/old_syntax/when_in_parens_indented.md +++ b/src/snapshots/old_syntax/when_in_parens_indented.md @@ -10,7 +10,7 @@ type=expr ) ~~~ # EXPECTED -expected_expr_close_round_or_comma - when_in_parens_indented.md:3:6:3:7 +PARSE ERROR - when_in_parens_indented.md:3:6:3:7 # PROBLEMS **PARSE ERROR** A parsing error occurred: `expected_expr_close_round_or_comma` diff --git a/src/snapshots/old_syntax/when_in_when_guard_wtf.md b/src/snapshots/old_syntax/when_in_when_guard_wtf.md index 04995680f9..768011842a 100644 --- a/src/snapshots/old_syntax/when_in_when_guard_wtf.md +++ b/src/snapshots/old_syntax/when_in_when_guard_wtf.md @@ -12,9 +12,12 @@ is z->f z->m ~~~ # EXPECTED -UNDEFINED VARIABLE - when_in_when_guard_wtf.md:1:1:1:5 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `when` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:5),LowerIdent(1:6-1:7),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/when_missing_arrow.md b/src/snapshots/old_syntax/when_missing_arrow.md index 6762426ab3..d9b555ffe5 100644 --- a/src/snapshots/old_syntax/when_missing_arrow.md +++ b/src/snapshots/old_syntax/when_missing_arrow.md @@ -10,9 +10,12 @@ when 5 is _ ~~~ # EXPECTED -UNDEFINED VARIABLE - when_missing_arrow.md:1:1:1:5 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `when` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:5),Int(1:6-1:7),LowerIdent(1:8-1:10),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/when_newline_after_condition.md b/src/snapshots/old_syntax/when_newline_after_condition.md index cea3acc75c..cb93498221 100644 --- a/src/snapshots/old_syntax/when_newline_after_condition.md +++ b/src/snapshots/old_syntax/when_newline_after_condition.md @@ -10,9 +10,12 @@ when n is O->1 ~~~ # EXPECTED -UNDEFINED VARIABLE - when_newline_after_condition.md:1:1:1:5 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `when` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:5),LowerIdent(1:6-1:7),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/when_newline_before_is_and_in_branch_parens.md b/src/snapshots/old_syntax/when_newline_before_is_and_in_branch_parens.md index b18f2aef2e..895877e74f 100644 --- a/src/snapshots/old_syntax/when_newline_before_is_and_in_branch_parens.md +++ b/src/snapshots/old_syntax/when_newline_before_is_and_in_branch_parens.md @@ -10,9 +10,12 @@ is B->( t) ~~~ # EXPECTED -UNDEFINED VARIABLE - when_newline_before_is_and_in_branch_parens.md:1:1:1:5 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `when` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:5),Int(1:6-1:7),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/when_outdented_branch.md b/src/snapshots/old_syntax/when_outdented_branch.md index 8cc0cf09cf..f9b42f37ac 100644 --- a/src/snapshots/old_syntax/when_outdented_branch.md +++ b/src/snapshots/old_syntax/when_outdented_branch.md @@ -10,9 +10,12 @@ when 4 is 2 -> 2 ~~~ # EXPECTED -UNDEFINED VARIABLE - when_outdented_branch.md:1:1:1:5 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `when` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:5),Int(1:6-1:7),LowerIdent(1:8-1:10),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/when_over_indented_int.md b/src/snapshots/old_syntax/when_over_indented_int.md index e9140d8e73..5ce29492d2 100644 --- a/src/snapshots/old_syntax/when_over_indented_int.md +++ b/src/snapshots/old_syntax/when_over_indented_int.md @@ -10,9 +10,12 @@ when 4 is 2 -> 2 ~~~ # EXPECTED -UNDEFINED VARIABLE - when_over_indented_int.md:1:1:1:5 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `when` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:5),Int(1:6-1:7),LowerIdent(1:8-1:10),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/when_over_indented_underscore.md b/src/snapshots/old_syntax/when_over_indented_underscore.md index e72a9eb6ce..770565f5da 100644 --- a/src/snapshots/old_syntax/when_over_indented_underscore.md +++ b/src/snapshots/old_syntax/when_over_indented_underscore.md @@ -10,9 +10,12 @@ when 4 is _ -> 2 ~~~ # EXPECTED -UNDEFINED VARIABLE - when_over_indented_underscore.md:1:1:1:5 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `when` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:5),Int(1:6-1:7),LowerIdent(1:8-1:10),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/when_result_list.md b/src/snapshots/old_syntax/when_result_list.md index 5c77cd2af6..3f4e98cb59 100644 --- a/src/snapshots/old_syntax/when_result_list.md +++ b/src/snapshots/old_syntax/when_result_list.md @@ -10,9 +10,12 @@ when Ok [] is _ -> {} ~~~ # EXPECTED -UNDEFINED VARIABLE - when_result_list.md:1:1:1:5 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `when` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:5),UpperIdent(1:6-1:8),OpenSquare(1:9-1:10),CloseSquare(1:10-1:11),LowerIdent(1:12-1:14),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/when_with_alternative_patterns.md b/src/snapshots/old_syntax/when_with_alternative_patterns.md index a5e8d67896..8420d84f82 100644 --- a/src/snapshots/old_syntax/when_with_alternative_patterns.md +++ b/src/snapshots/old_syntax/when_with_alternative_patterns.md @@ -13,9 +13,12 @@ when x is "stuff" -> 4 ~~~ # EXPECTED -UNDEFINED VARIABLE - when_with_alternative_patterns.md:1:1:1:5 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `when` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:5),LowerIdent(1:6-1:7),LowerIdent(1:8-1:10),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/when_with_function_application.md b/src/snapshots/old_syntax/when_with_function_application.md index 10ae590553..c1cb7974dd 100644 --- a/src/snapshots/old_syntax/when_with_function_application.md +++ b/src/snapshots/old_syntax/when_with_function_application.md @@ -11,9 +11,12 @@ when x is _ -> 4 ~~~ # EXPECTED -UNDEFINED VARIABLE - when_with_function_application.md:1:1:1:5 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `when` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:5),LowerIdent(1:6-1:7),LowerIdent(1:8-1:10),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/when_with_negative_numbers.md b/src/snapshots/old_syntax/when_with_negative_numbers.md index 771065bd59..f37a436dca 100644 --- a/src/snapshots/old_syntax/when_with_negative_numbers.md +++ b/src/snapshots/old_syntax/when_with_negative_numbers.md @@ -10,9 +10,12 @@ when x is -3 -> 4 ~~~ # EXPECTED -UNDEFINED VARIABLE - when_with_negative_numbers.md:1:1:1:5 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `when` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:5),LowerIdent(1:6-1:7),LowerIdent(1:8-1:10),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/when_with_numbers.md b/src/snapshots/old_syntax/when_with_numbers.md index b4d90bb6ca..9f2c47d663 100644 --- a/src/snapshots/old_syntax/when_with_numbers.md +++ b/src/snapshots/old_syntax/when_with_numbers.md @@ -10,9 +10,12 @@ when x is 3 -> 4 ~~~ # EXPECTED -UNDEFINED VARIABLE - when_with_numbers.md:1:1:1:5 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `when` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:5),LowerIdent(1:6-1:7),LowerIdent(1:8-1:10),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/when_with_records.md b/src/snapshots/old_syntax/when_with_records.md index 4c49f2a643..9dd729a688 100644 --- a/src/snapshots/old_syntax/when_with_records.md +++ b/src/snapshots/old_syntax/when_with_records.md @@ -10,9 +10,12 @@ when x is { z, w } -> 4 ~~~ # EXPECTED -UNDEFINED VARIABLE - when_with_records.md:1:1:1:5 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `when` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:5),LowerIdent(1:6-1:7),LowerIdent(1:8-1:10),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/when_with_tuple_in_record.md b/src/snapshots/old_syntax/when_with_tuple_in_record.md index c0538a4323..b1551d7204 100644 --- a/src/snapshots/old_syntax/when_with_tuple_in_record.md +++ b/src/snapshots/old_syntax/when_with_tuple_in_record.md @@ -10,9 +10,12 @@ when {foo: (1, 2)} is {foo: (_, b)} -> 3 + b ~~~ # EXPECTED -UNDEFINED VARIABLE - when_with_tuple_in_record.md:1:1:1:5 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `when` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:5),OpenCurly(1:6-1:7),LowerIdent(1:7-1:10),OpColon(1:10-1:11),OpenRound(1:12-1:13),Int(1:13-1:14),Comma(1:14-1:15),Int(1:16-1:17),CloseRound(1:17-1:18),CloseCurly(1:18-1:19),LowerIdent(1:20-1:22),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/when_with_tuples.md b/src/snapshots/old_syntax/when_with_tuples.md index 2c73b79551..1b2c9aa83b 100644 --- a/src/snapshots/old_syntax/when_with_tuples.md +++ b/src/snapshots/old_syntax/when_with_tuples.md @@ -10,9 +10,12 @@ when (1, 2) is (_, b) -> 3 + b ~~~ # EXPECTED -UNDEFINED VARIABLE - when_with_tuples.md:1:1:1:5 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `when` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:5),OpenRound(1:6-1:7),Int(1:7-1:8),Comma(1:8-1:9),Int(1:10-1:11),CloseRound(1:11-1:12),LowerIdent(1:13-1:15),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/where_and_implements_lookalikes.md b/src/snapshots/old_syntax/where_and_implements_lookalikes.md index 49b1d17f85..621b1e3128 100644 --- a/src/snapshots/old_syntax/where_and_implements_lookalikes.md +++ b/src/snapshots/old_syntax/where_and_implements_lookalikes.md @@ -10,7 +10,7 @@ type=expr e) ~~~ # EXPECTED -expected_expr_close_round_or_comma - where_and_implements_lookalikes.md:3:2:3:3 +PARSE ERROR - where_and_implements_lookalikes.md:3:2:3:3 # PROBLEMS **PARSE ERROR** A parsing error occurred: `expected_expr_close_round_or_comma` diff --git a/src/snapshots/old_syntax/where_clause_function.md b/src/snapshots/old_syntax/where_clause_function.md index 4fd48b02e1..5f63cfc100 100644 --- a/src/snapshots/old_syntax/where_clause_function.md +++ b/src/snapshots/old_syntax/where_clause_function.md @@ -10,9 +10,12 @@ f : a -> (b -> c) where a implements A f ~~~ # EXPECTED -UNDEFINED VARIABLE - where_clause_function.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `f` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpColon(1:3-1:4),LowerIdent(1:5-1:6),OpArrow(1:7-1:9),OpenRound(1:10-1:11),LowerIdent(1:11-1:12),OpArrow(1:13-1:15),LowerIdent(1:16-1:17),CloseRound(1:17-1:18),KwWhere(1:19-1:24),LowerIdent(1:25-1:26),KwImplements(1:27-1:37),UpperIdent(1:38-1:39),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/where_clause_multiple_bound_abilities.md b/src/snapshots/old_syntax/where_clause_multiple_bound_abilities.md index a19d4c128e..8a9060871e 100644 --- a/src/snapshots/old_syntax/where_clause_multiple_bound_abilities.md +++ b/src/snapshots/old_syntax/where_clause_multiple_bound_abilities.md @@ -14,9 +14,12 @@ f : a -> b f ~~~ # EXPECTED -UNDEFINED VARIABLE - where_clause_multiple_bound_abilities.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `f` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpColon(1:3-1:4),LowerIdent(1:5-1:6),OpArrow(1:7-1:9),LowerIdent(1:10-1:11),KwWhere(1:12-1:17),LowerIdent(1:18-1:19),KwImplements(1:20-1:30),UpperIdent(1:31-1:35),OpAmpersand(1:36-1:37),UpperIdent(1:38-1:40),Comma(1:40-1:41),LowerIdent(1:42-1:43),KwImplements(1:44-1:54),UpperIdent(1:55-1:57),OpAmpersand(1:58-1:59),UpperIdent(1:60-1:64),OpAmpersand(1:65-1:66),UpperIdent(1:67-1:74),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/where_clause_multiple_has.md b/src/snapshots/old_syntax/where_clause_multiple_has.md index 6341c9060a..60bf103155 100644 --- a/src/snapshots/old_syntax/where_clause_multiple_has.md +++ b/src/snapshots/old_syntax/where_clause_multiple_has.md @@ -10,9 +10,12 @@ f : a -> (b -> c) where a implements A, b implements Eq, c implements Ord f ~~~ # EXPECTED -UNDEFINED VARIABLE - where_clause_multiple_has.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `f` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpColon(1:3-1:4),LowerIdent(1:5-1:6),OpArrow(1:7-1:9),OpenRound(1:10-1:11),LowerIdent(1:11-1:12),OpArrow(1:13-1:15),LowerIdent(1:16-1:17),CloseRound(1:17-1:18),KwWhere(1:19-1:24),LowerIdent(1:25-1:26),KwImplements(1:27-1:37),UpperIdent(1:38-1:39),Comma(1:39-1:40),LowerIdent(1:41-1:42),KwImplements(1:43-1:53),UpperIdent(1:54-1:56),Comma(1:56-1:57),LowerIdent(1:58-1:59),KwImplements(1:60-1:70),UpperIdent(1:71-1:74),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/where_clause_multiple_has_across_newlines.md b/src/snapshots/old_syntax/where_clause_multiple_has_across_newlines.md index 10c4d75c17..dbf804e7ab 100644 --- a/src/snapshots/old_syntax/where_clause_multiple_has_across_newlines.md +++ b/src/snapshots/old_syntax/where_clause_multiple_has_across_newlines.md @@ -13,9 +13,12 @@ f : a -> (b -> c) f ~~~ # EXPECTED -UNDEFINED VARIABLE - where_clause_multiple_has_across_newlines.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `f` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpColon(1:3-1:4),LowerIdent(1:5-1:6),OpArrow(1:7-1:9),OpenRound(1:10-1:11),LowerIdent(1:11-1:12),OpArrow(1:13-1:15),LowerIdent(1:16-1:17),CloseRound(1:17-1:18),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/where_clause_non_function.md b/src/snapshots/old_syntax/where_clause_non_function.md index 4c793313ae..5dab0f9854 100644 --- a/src/snapshots/old_syntax/where_clause_non_function.md +++ b/src/snapshots/old_syntax/where_clause_non_function.md @@ -10,9 +10,12 @@ f : a where a implements A f ~~~ # EXPECTED -UNDEFINED VARIABLE - where_clause_non_function.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `f` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpColon(1:3-1:4),LowerIdent(1:5-1:6),KwWhere(1:7-1:12),LowerIdent(1:13-1:14),KwImplements(1:15-1:25),UpperIdent(1:26-1:27),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/where_clause_on_newline.md b/src/snapshots/old_syntax/where_clause_on_newline.md index ebbb64e4c9..23d0c419a7 100644 --- a/src/snapshots/old_syntax/where_clause_on_newline.md +++ b/src/snapshots/old_syntax/where_clause_on_newline.md @@ -11,9 +11,12 @@ f : a -> U64 f ~~~ # EXPECTED -UNDEFINED VARIABLE - where_clause_on_newline.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `f` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpColon(1:3-1:4),LowerIdent(1:5-1:6),OpArrow(1:7-1:9),UpperIdent(1:10-1:13),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/where_type_variable.md b/src/snapshots/old_syntax/where_type_variable.md index 5abf311fa4..da74d69ef8 100644 --- a/src/snapshots/old_syntax/where_type_variable.md +++ b/src/snapshots/old_syntax/where_type_variable.md @@ -11,9 +11,12 @@ role = Admin role ~~~ # EXPECTED -UNDEFINED VARIABLE - where_type_variable.md:1:1:1:5 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `role` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:5),OpColon(1:6-1:7),UpperIdent(1:8-1:12),KwWhere(1:13-1:18),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/wherem_implementsf.md b/src/snapshots/old_syntax/wherem_implementsf.md index 43fc07de39..27f382ee4d 100644 --- a/src/snapshots/old_syntax/wherem_implementsf.md +++ b/src/snapshots/old_syntax/wherem_implementsf.md @@ -11,9 +11,12 @@ implementsF)A _ ~~~ # EXPECTED -UNDEFINED VARIABLE - wherem_implementsf.md:1:1:1:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `s` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:2),OpColon(1:2-1:3),NoSpaceOpenRound(1:3-1:4),LowerIdent(1:4-1:5),Newline(1:1-1:1), diff --git a/src/snapshots/old_syntax/wild_case_arrow.md b/src/snapshots/old_syntax/wild_case_arrow.md index 617c1e4f5f..bf1d1f5f71 100644 --- a/src/snapshots/old_syntax/wild_case_arrow.md +++ b/src/snapshots/old_syntax/wild_case_arrow.md @@ -8,9 +8,12 @@ type=expr main = 5 -> 3 ~~~ # EXPECTED -UNDEFINED VARIABLE - wild_case_arrow.md:1:1:1:5 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `main` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:5),OpAssign(1:6-1:7),Int(1:8-1:9),OpArrow(1:10-1:12),Int(1:13-1:14),EndOfFile(1:14-1:14), diff --git a/src/snapshots/pattern_f64_overflow.md b/src/snapshots/pattern_f64_overflow.md index 89dcb979d8..5509cc7f4f 100644 --- a/src/snapshots/pattern_f64_overflow.md +++ b/src/snapshots/pattern_f64_overflow.md @@ -14,10 +14,69 @@ match x { } ~~~ # EXPECTED -UNDEFINED VARIABLE - pattern_f64_overflow.md:1:7:1:8 -UNUSED VARIABLE - pattern_f64_overflow.md:6:5:6:10 +UNDEFINED VARIABLE - pattern_f64_overflow.md:6:5:6:10 # PROBLEMS -NIL +**UNDEFINED VARIABLE** +Nothing is named `x` in this scope. +Is there an `import` or `exposing` missing up-top? + +**F64 NOT ALLOWED IN PATTERN** +This floating-point literal cannot be used in a pattern match: `1e100` + +This number exceeds the precision range of Roc's `Dec` type and would require F64 representation. Floating-point numbers (F64) cannot be used in patterns because they don't have reliable equality comparison. + +Consider one of these alternatives: +• Use a guard condition with a range check +• Use a smaller number that fits in Dec's precision +• Restructure your code to avoid pattern matching on this value + +For example, instead of: +`1e100 => ...` +Use a guard: +`n if n > 1e99 => ...` + +**F64 NOT ALLOWED IN PATTERN** +This floating-point literal cannot be used in a pattern match: `1e-40` + +This number exceeds the precision range of Roc's `Dec` type and would require F64 representation. Floating-point numbers (F64) cannot be used in patterns because they don't have reliable equality comparison. + +Consider one of these alternatives: +• Use a guard condition with a range check +• Use a smaller number that fits in Dec's precision +• Restructure your code to avoid pattern matching on this value + +For example, instead of: +`1e100 => ...` +Use a guard: +`n if n > 1e99 => ...` + +**F64 NOT ALLOWED IN PATTERN** +This floating-point literal cannot be used in a pattern match: `1.7976931348623157e308` + +This number exceeds the precision range of Roc's `Dec` type and would require F64 representation. Floating-point numbers (F64) cannot be used in patterns because they don't have reliable equality comparison. + +Consider one of these alternatives: +• Use a guard condition with a range check +• Use a smaller number that fits in Dec's precision +• Restructure your code to avoid pattern matching on this value + +For example, instead of: +`1e100 => ...` +Use a guard: +`n if n > 1e99 => ...` + +**UNUSED VARIABLE** +Variable ``value`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_value` to suppress this warning. +The unused variable is declared here: +**pattern_f64_overflow.md:6:5:6:10:** +```roc + value => "other" +``` + ^^^^^ + + # TOKENS ~~~zig KwMatch(1:1-1:6),LowerIdent(1:7-1:8),OpenCurly(1:9-1:10),Newline(1:1-1:1), diff --git a/src/snapshots/plume_package/Color.md b/src/snapshots/plume_package/Color.md index eb6b66ec46..124a037342 100644 --- a/src/snapshots/plume_package/Color.md +++ b/src/snapshots/plume_package/Color.md @@ -5,6 +5,24 @@ type=package ~~~ # SOURCE ~~~roc +# EXPECTED +UNEXPECTED TOKEN IN PATTERN - Color.md:33:10:33:14 +PARSE ERROR - Color.md:63:9:63:12 +UNEXPECTED TOKEN IN EXPRESSION - Color.md:64:5:64:5 +PARSE ERROR - Color.md:65:13:65:26 +PARSE ERROR - Color.md:65:9:65:13 +PARSE ERROR - Color.md:65:9:65:13 +UNEXPECTED TOKEN IN EXPRESSION - Color.md:65:27:65:43 +UNEXPECTED TOKEN IN EXPRESSION - Color.md:65:41:65:46 +UNEXPECTED TOKEN IN EXPRESSION - Color.md:65:46:65:47 +UNEXPECTED TOKEN IN EXPRESSION - Color.md:65:47:65:48 +UNEXPECTED TOKEN IN EXPRESSION - Color.md:65:47:65:49 +UNEXPECTED TOKEN IN EXPRESSION - Color.md:65:48:65:50 +UNEXPECTED TOKEN IN EXPRESSION - Color.md:65:49:65:49 +INVALID PATTERN - Color.md:30:5:30:25 +NOT IMPLEMENTED - Color.md:61:10:61:13 +UNDEFINED VARIABLE - Color.md:21:1:21:5 +TYPE MISMATCH - Color.md:27:1:27:4 module [ Color, to_str, diff --git a/src/snapshots/plume_package/main.md b/src/snapshots/plume_package/main.md index 0279344421..c04d1b17cf 100644 --- a/src/snapshots/plume_package/main.md +++ b/src/snapshots/plume_package/main.md @@ -5,6 +5,8 @@ type=package ~~~ # SOURCE ~~~roc +# EXPECTED +NIL package [ Color, ] {} diff --git a/src/snapshots/primitive/stmt_import.md b/src/snapshots/primitive/stmt_import.md index d54d397d97..8b2f049458 100644 --- a/src/snapshots/primitive/stmt_import.md +++ b/src/snapshots/primitive/stmt_import.md @@ -12,7 +12,10 @@ import json.Json [foo, BAR] # EXPECTED NIL # PROBLEMS -NIL +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + # TOKENS ~~~zig KwModule(1:1-1:7),OpenSquare(1:8-1:9),CloseSquare(1:9-1:10),Newline(1:1-1:1), diff --git a/src/snapshots/qualified_type_canonicalization.md b/src/snapshots/qualified_type_canonicalization.md index 8ad90775d8..bcd8175300 100644 --- a/src/snapshots/qualified_type_canonicalization.md +++ b/src/snapshots/qualified_type_canonicalization.md @@ -50,25 +50,25 @@ transform = \result -> Result.Err err -> TypeC.default ~~~ # EXPECTED -import_exposing_no_close - qualified_type_canonicalization.md:8:1:8:14 +PARSE ERROR - qualified_type_canonicalization.md:8:1:8:14 +PARSE ERROR - qualified_type_canonicalization.md:8:14:8:14 UNEXPECTED TOKEN IN EXPRESSION - qualified_type_canonicalization.md:10:15:10:32 UNEXPECTED TOKEN IN EXPRESSION - qualified_type_canonicalization.md:10:24:10:34 +PARSE ERROR - qualified_type_canonicalization.md:26:32:26:32 UNEXPECTED TOKEN IN EXPRESSION - qualified_type_canonicalization.md:31:12:31:14 UNEXPECTED TOKEN IN EXPRESSION - qualified_type_canonicalization.md:31:24:31:30 UNEXPECTED TOKEN IN EXPRESSION - qualified_type_canonicalization.md:35:16:35:22 -expr_arrow_expects_ident - qualified_type_canonicalization.md:36:5:36:21 +PARSE ERROR - qualified_type_canonicalization.md:36:5:36:21 UNEXPECTED TOKEN IN EXPRESSION - qualified_type_canonicalization.md:36:6:36:22 -expected_colon_after_type_annotation - qualified_type_canonicalization.md:39:32:39:43 -expected_colon_after_type_annotation - qualified_type_canonicalization.md:39:43:39:52 +UNEXPECTED TOKEN IN EXPRESSION - qualified_type_canonicalization.md:36:21:36:21 +PARSE ERROR - qualified_type_canonicalization.md:39:32:39:43 +PARSE ERROR - qualified_type_canonicalization.md:39:43:39:52 UNEXPECTED TOKEN IN EXPRESSION - qualified_type_canonicalization.md:39:50:39:60 -expected_colon_after_type_annotation - qualified_type_canonicalization.md:39:60:39:74 +PARSE ERROR - qualified_type_canonicalization.md:39:60:39:74 +UNEXPECTED TOKEN IN EXPRESSION - qualified_type_canonicalization.md:39:68:39:68 UNEXPECTED TOKEN IN EXPRESSION - qualified_type_canonicalization.md:40:13:40:20 -expected_colon_after_type_annotation - qualified_type_canonicalization.md:42:15:42:22 -expected_colon_after_type_annotation - qualified_type_canonicalization.md:43:15:43:23 -UNDEFINED VARIABLE - qualified_type_canonicalization.md:23:23:23:32 -expr_not_canonicalized - qualified_type_canonicalization.md:31:12:31:14 -expr_not_canonicalized - qualified_type_canonicalization.md:35:16:35:22 -expr_not_canonicalized - qualified_type_canonicalization.md:40:13:40:20 +PARSE ERROR - qualified_type_canonicalization.md:42:15:42:22 +PARSE ERROR - qualified_type_canonicalization.md:43:15:43:23 # PROBLEMS **PARSE ERROR** A parsing error occurred: `import_exposing_no_close` @@ -382,6 +382,98 @@ Here is the problematic code: ^^^^^^^^ +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**UNDEFINED VARIABLE** +Nothing is named `new` in this scope. +Is there an `import` or `exposing` missing up-top? + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**UNKNOWN OPERATOR** +This looks like an operator, but it's not one I recognize! +Check the spelling and make sure you're using a valid Roc operator. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**UNKNOWN OPERATOR** +This looks like an operator, but it's not one I recognize! +Check the spelling and make sure you're using a valid Roc operator. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**UNKNOWN OPERATOR** +This looks like an operator, but it's not one I recognize! +Check the spelling and make sure you're using a valid Roc operator. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + # TOKENS ~~~zig KwModule(1:1-1:7),OpenSquare(1:8-1:9),Newline(1:1-1:1), diff --git a/src/snapshots/record_access_multiline_formatting_1.md b/src/snapshots/record_access_multiline_formatting_1.md index 17ed2e4c90..ed217b891d 100644 --- a/src/snapshots/record_access_multiline_formatting_1.md +++ b/src/snapshots/record_access_multiline_formatting_1.md @@ -11,9 +11,12 @@ some_fn(arg1)? .record_field? ~~~ # EXPECTED -not_implemented - record_access_multiline_formatting_1.md:1:1:1:1 -# PROBLEMS NIL +# PROBLEMS +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: canonicalize suffix_single_question expression +Let us know if you want to help! + # TOKENS ~~~zig LowerIdent(1:1-1:8),NoSpaceOpenRound(1:8-1:9),LowerIdent(1:9-1:13),CloseRound(1:13-1:14),NoSpaceOpQuestion(1:14-1:15),Newline(1:1-1:1), diff --git a/src/snapshots/record_access_multiline_formatting_4.md b/src/snapshots/record_access_multiline_formatting_4.md index 48c6c5d366..a25aa9e21b 100644 --- a/src/snapshots/record_access_multiline_formatting_4.md +++ b/src/snapshots/record_access_multiline_formatting_4.md @@ -11,9 +11,12 @@ some_fn(arg1)? # Comment 1 .record_field? ~~~ # EXPECTED -not_implemented - record_access_multiline_formatting_4.md:1:1:1:1 -# PROBLEMS NIL +# PROBLEMS +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: canonicalize suffix_single_question expression +Let us know if you want to help! + # TOKENS ~~~zig LowerIdent(1:1-1:8),NoSpaceOpenRound(1:8-1:9),LowerIdent(1:9-1:13),CloseRound(1:13-1:14),NoSpaceOpQuestion(1:14-1:15),Newline(1:17-1:27), diff --git a/src/snapshots/records/error_duplicate_fields.md b/src/snapshots/records/error_duplicate_fields.md index 6e5d5cd9e9..49c8675383 100644 --- a/src/snapshots/records/error_duplicate_fields.md +++ b/src/snapshots/records/error_duplicate_fields.md @@ -8,9 +8,47 @@ type=expr { name: "Alice", age: 30, name: "Bob", email: "alice@example.com", age: 25 } ~~~ # EXPECTED -NIL +DUPLICATE RECORD FIELD - error_duplicate_fields.md:1:27:1:31 +error_duplicate_fields.md:1:3:1:7: - error_duplicate_fields.md:1:68:1:71 # PROBLEMS -NIL +**DUPLICATE RECORD FIELD** +The record field ``name`` appears more than once in this record. + +This field is duplicated here: +**error_duplicate_fields.md:1:27:1:31:** +```roc +{ name: "Alice", age: 30, name: "Bob", email: "alice@example.com", age: 25 } +``` + ^^^^ + +The field ``name`` was first defined here: +**error_duplicate_fields.md:1:3:1:7:** +```roc +{ name: "Alice", age: 30, name: "Bob", email: "alice@example.com", age: 25 } +``` + ^^^^ + +Record fields must have unique names. Consider renaming one of these fields or removing the duplicate. + +**DUPLICATE RECORD FIELD** +The record field ``age`` appears more than once in this record. + +This field is duplicated here: +**error_duplicate_fields.md:1:68:1:71:** +```roc +{ name: "Alice", age: 30, name: "Bob", email: "alice@example.com", age: 25 } +``` + ^^^ + +The field ``age`` was first defined here: +**error_duplicate_fields.md:1:18:1:21:** +```roc +{ name: "Alice", age: 30, name: "Bob", email: "alice@example.com", age: 25 } +``` + ^^^ + +Record fields must have unique names. Consider renaming one of these fields or removing the duplicate. + # TOKENS ~~~zig OpenCurly(1:1-1:2),LowerIdent(1:3-1:7),OpColon(1:7-1:8),StringStart(1:9-1:10),StringPart(1:10-1:15),StringEnd(1:15-1:16),Comma(1:16-1:17),LowerIdent(1:18-1:21),OpColon(1:21-1:22),Int(1:23-1:25),Comma(1:25-1:26),LowerIdent(1:27-1:31),OpColon(1:31-1:32),StringStart(1:33-1:34),StringPart(1:34-1:37),StringEnd(1:37-1:38),Comma(1:38-1:39),LowerIdent(1:40-1:45),OpColon(1:45-1:46),StringStart(1:47-1:48),StringPart(1:48-1:65),StringEnd(1:65-1:66),Comma(1:66-1:67),LowerIdent(1:68-1:71),OpColon(1:71-1:72),Int(1:73-1:75),CloseCurly(1:76-1:77),EndOfFile(1:77-1:77), diff --git a/src/snapshots/records/error_malformed_syntax.md b/src/snapshots/records/error_malformed_syntax.md index 6aa25d7a5d..d61b92553b 100644 --- a/src/snapshots/records/error_malformed_syntax.md +++ b/src/snapshots/records/error_malformed_syntax.md @@ -8,8 +8,8 @@ type=expr { name: "Alice", : 30, , email: , active Bool.true, "invalid": value, 42: "number key", : } ~~~ # EXPECTED -expected_expr_record_field_name - error_malformed_syntax.md:1:18:1:22 -expected_expr_close_curly_or_comma - error_malformed_syntax.md:1:20:1:23 +PARSE ERROR - error_malformed_syntax.md:1:18:1:22 +PARSE ERROR - error_malformed_syntax.md:1:20:1:23 # PROBLEMS **PARSE ERROR** A parsing error occurred: `expected_expr_record_field_name` diff --git a/src/snapshots/records/error_malformed_syntax_2.md b/src/snapshots/records/error_malformed_syntax_2.md index b4b96b4563..9a741b9232 100644 --- a/src/snapshots/records/error_malformed_syntax_2.md +++ b/src/snapshots/records/error_malformed_syntax_2.md @@ -8,7 +8,7 @@ type=expr { age: 42, name = "Alice" } ~~~ # EXPECTED -expected_expr_close_curly_or_comma - error_malformed_syntax_2.md:1:17:1:20 +PARSE ERROR - error_malformed_syntax_2.md:1:17:1:20 # PROBLEMS **PARSE ERROR** A parsing error occurred: `expected_expr_close_curly_or_comma` diff --git a/src/snapshots/records/function_record_parameter_capture.md b/src/snapshots/records/function_record_parameter_capture.md index 2564d125bf..33700a35bd 100644 --- a/src/snapshots/records/function_record_parameter_capture.md +++ b/src/snapshots/records/function_record_parameter_capture.md @@ -8,12 +8,24 @@ type=expr |{ name, age, ..a } as person| { greeting: "Hello ${name}", full_record: person, is_adult: age >= 18 } ~~~ # EXPECTED -not_implemented - function_record_parameter_capture.md:1:1:1:1 -UNDEFINED VARIABLE - function_record_parameter_capture.md:1:53:1:57 -UNDEFINED VARIABLE - function_record_parameter_capture.md:1:74:1:80 -UNDEFINED VARIABLE - function_record_parameter_capture.md:1:92:1:95 -# PROBLEMS NIL +# PROBLEMS +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: canonicalize alternatives pattern +Let us know if you want to help! + +**UNDEFINED VARIABLE** +Nothing is named `name` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `person` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `age` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig OpBar(1:1-1:2),OpenCurly(1:2-1:3),LowerIdent(1:4-1:8),Comma(1:8-1:9),LowerIdent(1:10-1:13),Comma(1:13-1:14),DoubleDot(1:15-1:17),LowerIdent(1:17-1:18),CloseCurly(1:19-1:20),KwAs(1:21-1:23),LowerIdent(1:24-1:30),OpBar(1:30-1:31),OpenCurly(1:32-1:33),LowerIdent(1:34-1:42),OpColon(1:42-1:43),StringStart(1:44-1:45),StringPart(1:45-1:51),OpenStringInterpolation(1:51-1:53),LowerIdent(1:53-1:57),CloseStringInterpolation(1:57-1:58),StringPart(1:58-1:58),StringEnd(1:58-1:59),Comma(1:59-1:60),LowerIdent(1:61-1:72),OpColon(1:72-1:73),LowerIdent(1:74-1:80),Comma(1:80-1:81),LowerIdent(1:82-1:90),OpColon(1:90-1:91),LowerIdent(1:92-1:95),OpGreaterThanOrEq(1:96-1:98),Int(1:99-1:101),CloseCurly(1:102-1:103),EndOfFile(1:103-1:103), diff --git a/src/snapshots/records/module_record_destructure.md b/src/snapshots/records/module_record_destructure.md index 884b0f411f..6fe701c142 100644 --- a/src/snapshots/records/module_record_destructure.md +++ b/src/snapshots/records/module_record_destructure.md @@ -15,8 +15,6 @@ extract_age = |person| { ~~~ # EXPECTED UNEXPECTED TOKEN IN EXPRESSION - module_record_destructure.md:5:13:5:21 -UNDEFINED VARIABLE - module_record_destructure.md:5:7:5:10 -UNDEFINED VARIABLE - module_record_destructure.md:6:5:6:8 # PROBLEMS **UNEXPECTED TOKEN IN EXPRESSION** The token **= person** is not expected in an expression. @@ -30,6 +28,14 @@ Here is the problematic code: ^^^^^^^^ +**UNDEFINED VARIABLE** +Nothing is named `age` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `age` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig KwModule(1:1-1:7),OpenSquare(1:8-1:9),LowerIdent(1:9-1:20),CloseSquare(1:20-1:21),Newline(1:1-1:1), diff --git a/src/snapshots/records/pattern_destructure_nested.md b/src/snapshots/records/pattern_destructure_nested.md index 2f2c834fe6..4cec1251e5 100644 --- a/src/snapshots/records/pattern_destructure_nested.md +++ b/src/snapshots/records/pattern_destructure_nested.md @@ -10,12 +10,24 @@ match person { } ~~~ # EXPECTED -UNDEFINED VARIABLE - pattern_destructure_nested.md:1:7:1:13 -not_implemented - pattern_destructure_nested.md:2:13:2:49 -UNDEFINED VARIABLE - pattern_destructure_nested.md:2:73:2:79 -UNDEFINED VARIABLE - pattern_destructure_nested.md:2:86:2:90 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `person` in this scope. +Is there an `import` or `exposing` missing up-top? + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: record pattern with sub-patterns +Let us know if you want to help! + +**UNDEFINED VARIABLE** +Nothing is named `street` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `city` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig KwMatch(1:1-1:6),LowerIdent(1:7-1:13),OpenCurly(1:14-1:15),Newline(1:1-1:1), diff --git a/src/snapshots/records/pattern_destructure_rename.md b/src/snapshots/records/pattern_destructure_rename.md index 754525bb65..27112774e7 100644 --- a/src/snapshots/records/pattern_destructure_rename.md +++ b/src/snapshots/records/pattern_destructure_rename.md @@ -10,12 +10,24 @@ match person { } ~~~ # EXPECTED -UNDEFINED VARIABLE - pattern_destructure_rename.md:1:7:1:13 -not_implemented - pattern_destructure_rename.md:2:7:2:22 -UNDEFINED VARIABLE - pattern_destructure_rename.md:2:49:2:57 -UNDEFINED VARIABLE - pattern_destructure_rename.md:2:64:2:71 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `person` in this scope. +Is there an `import` or `exposing` missing up-top? + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: record pattern with sub-patterns +Let us know if you want to help! + +**UNDEFINED VARIABLE** +Nothing is named `userName` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `userAge` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig KwMatch(1:1-1:6),LowerIdent(1:7-1:13),OpenCurly(1:14-1:15),Newline(1:1-1:1), diff --git a/src/snapshots/records/pattern_destructure_simple.md b/src/snapshots/records/pattern_destructure_simple.md index 5d1304f2a7..3ee7cb982a 100644 --- a/src/snapshots/records/pattern_destructure_simple.md +++ b/src/snapshots/records/pattern_destructure_simple.md @@ -10,10 +10,24 @@ match person { } ~~~ # EXPECTED -UNDEFINED VARIABLE - pattern_destructure_simple.md:1:7:1:13 -UNUSED VARIABLE - pattern_destructure_simple.md:2:13:2:18 +UNDEFINED VARIABLE - pattern_destructure_simple.md:2:13:2:18 # PROBLEMS -NIL +**UNDEFINED VARIABLE** +Nothing is named `person` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNUSED VARIABLE** +Variable ``age`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_age` to suppress this warning. +The unused variable is declared here: +**pattern_destructure_simple.md:2:13:2:18:** +```roc + { name, age } => name +``` + ^^^^^ + + # TOKENS ~~~zig KwMatch(1:1-1:6),LowerIdent(1:7-1:13),OpenCurly(1:14-1:15),Newline(1:1-1:1), diff --git a/src/snapshots/records/pattern_destructure_with_rest.md b/src/snapshots/records/pattern_destructure_with_rest.md index a1c65542e1..e3654ed4ba 100644 --- a/src/snapshots/records/pattern_destructure_with_rest.md +++ b/src/snapshots/records/pattern_destructure_with_rest.md @@ -10,11 +10,20 @@ match person { } ~~~ # EXPECTED -UNDEFINED VARIABLE - pattern_destructure_with_rest.md:1:7:1:13 -UNDEFINED VARIABLE - pattern_destructure_with_rest.md:2:33:2:40 -UNDEFINED VARIABLE - pattern_destructure_with_rest.md:2:55:2:62 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `person` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `len` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `len` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig KwMatch(1:1-1:6),LowerIdent(1:7-1:13),OpenCurly(1:14-1:15),Newline(1:1-1:1), diff --git a/src/snapshots/records/record_access_function_call.md b/src/snapshots/records/record_access_function_call.md index 0d5d9203ff..77109f8cbb 100644 --- a/src/snapshots/records/record_access_function_call.md +++ b/src/snapshots/records/record_access_function_call.md @@ -8,9 +8,12 @@ type=expr (person.transform)(42) ~~~ # EXPECTED -UNDEFINED VARIABLE - record_access_function_call.md:1:2:1:8 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `person` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig OpenRound(1:1-1:2),LowerIdent(1:2-1:8),NoSpaceDotLowerIdent(1:8-1:18),CloseRound(1:18-1:19),NoSpaceOpenRound(1:19-1:20),Int(1:20-1:22),CloseRound(1:22-1:23),EndOfFile(1:23-1:23), diff --git a/src/snapshots/records/record_access_in_expression.md b/src/snapshots/records/record_access_in_expression.md index d873ac0967..fc376ecfb2 100644 --- a/src/snapshots/records/record_access_in_expression.md +++ b/src/snapshots/records/record_access_in_expression.md @@ -8,9 +8,12 @@ type=expr person.age + 5 ~~~ # EXPECTED -UNDEFINED VARIABLE - record_access_in_expression.md:1:1:1:7 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `person` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:7),NoSpaceDotLowerIdent(1:7-1:11),OpPlus(1:12-1:13),Int(1:14-1:15),EndOfFile(1:15-1:15), diff --git a/src/snapshots/records/record_chained_access.md b/src/snapshots/records/record_chained_access.md index 640baaea39..a3884126e7 100644 --- a/src/snapshots/records/record_chained_access.md +++ b/src/snapshots/records/record_chained_access.md @@ -8,9 +8,12 @@ type=expr person.address.street ~~~ # EXPECTED -UNDEFINED VARIABLE - record_chained_access.md:1:1:1:7 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `person` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig LowerIdent(1:1-1:7),NoSpaceDotLowerIdent(1:7-1:15),NoSpaceDotLowerIdent(1:15-1:22),EndOfFile(1:22-1:22), diff --git a/src/snapshots/records/record_different_fields_error.md b/src/snapshots/records/record_different_fields_error.md index 57cc06b8e9..77713407d6 100644 --- a/src/snapshots/records/record_different_fields_error.md +++ b/src/snapshots/records/record_different_fields_error.md @@ -18,24 +18,23 @@ type=expr UNEXPECTED TOKEN IN TYPE ANNOTATION - record_different_fields_error.md:2:20:2:39 UNEXPECTED TOKEN IN EXPRESSION - record_different_fields_error.md:2:21:2:40 UNEXPECTED TOKEN IN EXPRESSION - record_different_fields_error.md:2:39:2:41 +UNEXPECTED TOKEN IN EXPRESSION - record_different_fields_error.md:2:40:2:40 UNEXPECTED TOKEN IN TYPE ANNOTATION - record_different_fields_error.md:3:13:3:33 UNEXPECTED TOKEN IN EXPRESSION - record_different_fields_error.md:3:14:3:34 UNEXPECTED TOKEN IN EXPRESSION - record_different_fields_error.md:3:33:3:35 +UNEXPECTED TOKEN IN EXPRESSION - record_different_fields_error.md:3:34:3:34 UNEXPECTED TOKEN IN EXPRESSION - record_different_fields_error.md:4:15:4:18 +UNEXPECTED TOKEN IN EXPRESSION - record_different_fields_error.md:4:25:4:25 UNEXPECTED TOKEN IN EXPRESSION - record_different_fields_error.md:5:15:5:18 +UNEXPECTED TOKEN IN EXPRESSION - record_different_fields_error.md:5:24:5:24 UNEXPECTED TOKEN IN EXPRESSION - record_different_fields_error.md:6:10:6:18 UNEXPECTED TOKEN IN TYPE ANNOTATION - record_different_fields_error.md:6:20:6:27 UNEXPECTED TOKEN IN EXPRESSION - record_different_fields_error.md:6:21:6:28 UNEXPECTED TOKEN IN EXPRESSION - record_different_fields_error.md:6:27:6:29 +UNEXPECTED TOKEN IN EXPRESSION - record_different_fields_error.md:6:28:6:28 UNEXPECTED TOKEN IN EXPRESSION - record_different_fields_error.md:7:10:7:18 UNEXPECTED TOKEN IN EXPRESSION - record_different_fields_error.md:7:17:7:20 -MALFORMED TYPE - record_different_fields_error.md:2:20:2:39 -MALFORMED TYPE - record_different_fields_error.md:3:13:3:33 -UNDEFINED VARIABLE - record_different_fields_error.md:5:5:5:10 -UNDEFINED VARIABLE - record_different_fields_error.md:5:11:5:15 -UNDEFINED VARIABLE - record_different_fields_error.md:6:5:6:10 -MALFORMED TYPE - record_different_fields_error.md:6:20:6:27 -UNDEFINED VARIABLE - record_different_fields_error.md:7:5:7:10 +UNEXPECTED TOKEN IN EXPRESSION - record_different_fields_error.md:7:30:7:30 # PROBLEMS **UNEXPECTED TOKEN IN TYPE ANNOTATION** The token **"leading underscore** is not expected in a type annotation. @@ -277,6 +276,31 @@ Here is the problematic code: +**MALFORMED TYPE** +This type annotation is malformed or contains invalid syntax. + +**MALFORMED TYPE** +This type annotation is malformed or contains invalid syntax. + +**UNDEFINED VARIABLE** +Nothing is named `kebab` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `case` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `field` in this scope. +Is there an `import` or `exposing` missing up-top? + +**MALFORMED TYPE** +This type annotation is malformed or contains invalid syntax. + +**UNDEFINED VARIABLE** +Nothing is named `field` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig OpenCurly(1:1-1:2),Newline(1:1-1:1), diff --git a/src/snapshots/records/record_different_fields_reserved_error.md b/src/snapshots/records/record_different_fields_reserved_error.md index 095fac3781..b20da4d483 100644 --- a/src/snapshots/records/record_different_fields_reserved_error.md +++ b/src/snapshots/records/record_different_fields_reserved_error.md @@ -16,21 +16,22 @@ type=expr ~~~ # EXPECTED UNEXPECTED TOKEN IN EXPRESSION - record_different_fields_reserved_error.md:2:7:2:10 +PARSE ERROR - record_different_fields_reserved_error.md:2:22:2:22 UNEXPECTED TOKEN IN TYPE ANNOTATION - record_different_fields_reserved_error.md:3:11:3:25 UNEXPECTED TOKEN IN EXPRESSION - record_different_fields_reserved_error.md:3:12:3:26 UNEXPECTED TOKEN IN EXPRESSION - record_different_fields_reserved_error.md:3:25:3:27 +UNEXPECTED TOKEN IN EXPRESSION - record_different_fields_reserved_error.md:3:26:3:26 UNEXPECTED TOKEN IN EXPRESSION - record_different_fields_reserved_error.md:4:11:4:14 -import_must_be_top_level - record_different_fields_reserved_error.md:5:5:5:12 +UNEXPECTED TOKEN IN EXPRESSION - record_different_fields_reserved_error.md:4:29:4:29 +IMPORT MUST BE TOP LEVEL - record_different_fields_reserved_error.md:5:5:5:12 UNEXPECTED TOKEN IN EXPRESSION - record_different_fields_reserved_error.md:5:11:5:14 +UNEXPECTED TOKEN IN EXPRESSION - record_different_fields_reserved_error.md:5:26:5:26 UNEXPECTED TOKEN IN EXPRESSION - record_different_fields_reserved_error.md:6:5:6:9 UNEXPECTED TOKEN IN EXPRESSION - record_different_fields_reserved_error.md:6:8:6:14 +UNEXPECTED TOKEN IN EXPRESSION - record_different_fields_reserved_error.md:6:19:6:19 UNEXPECTED TOKEN IN EXPRESSION - record_different_fields_reserved_error.md:7:5:7:8 UNEXPECTED TOKEN IN EXPRESSION - record_different_fields_reserved_error.md:7:7:7:13 -MALFORMED TYPE - record_different_fields_reserved_error.md:3:11:3:25 -not_implemented - record_different_fields_reserved_error.md:1:1:1:1 -not_implemented - record_different_fields_reserved_error.md:1:1:1:1 -UNDEFINED VARIABLE - record_different_fields_reserved_error.md:6:10:6:19 -UNDEFINED VARIABLE - record_different_fields_reserved_error.md:7:9:7:19 +UNEXPECTED TOKEN IN EXPRESSION - record_different_fields_reserved_error.md:7:19:7:19 # PROBLEMS **UNEXPECTED TOKEN IN EXPRESSION** The token **: "** is not expected in an expression. @@ -236,6 +237,25 @@ Here is the problematic code: +**MALFORMED TYPE** +This type annotation is malformed or contains invalid syntax. + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: statement type in block +Let us know if you want to help! + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: statement type in block +Let us know if you want to help! + +**UNDEFINED VARIABLE** +Nothing is named `true` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `false` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig OpenCurly(1:1-1:2),Newline(1:1-1:1), diff --git a/src/snapshots/records/record_extension_update.md b/src/snapshots/records/record_extension_update.md index 2ee09c75fe..43624afa6a 100644 --- a/src/snapshots/records/record_extension_update.md +++ b/src/snapshots/records/record_extension_update.md @@ -8,9 +8,12 @@ type=expr { ..person, age: 31, active: True } ~~~ # EXPECTED -UNDEFINED VARIABLE - record_extension_update.md:1:5:1:11 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `person` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig OpenCurly(1:1-1:2),DoubleDot(1:3-1:5),LowerIdent(1:5-1:11),Comma(1:11-1:12),LowerIdent(1:13-1:16),OpColon(1:16-1:17),Int(1:18-1:20),Comma(1:20-1:21),LowerIdent(1:22-1:28),OpColon(1:28-1:29),UpperIdent(1:30-1:34),CloseCurly(1:35-1:36),EndOfFile(1:36-1:36), diff --git a/src/snapshots/records/record_mixed_field_syntax.md b/src/snapshots/records/record_mixed_field_syntax.md index c42d939b88..6083d44c11 100644 --- a/src/snapshots/records/record_mixed_field_syntax.md +++ b/src/snapshots/records/record_mixed_field_syntax.md @@ -8,11 +8,20 @@ type=expr { name, age: 30, email, status: "active", balance } ~~~ # EXPECTED -UNDEFINED VARIABLE - record_mixed_field_syntax.md:1:3:1:8 -UNDEFINED VARIABLE - record_mixed_field_syntax.md:1:18:1:24 -UNDEFINED VARIABLE - record_mixed_field_syntax.md:1:43:1:52 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `name` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `email` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `balance` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig OpenCurly(1:1-1:2),LowerIdent(1:3-1:7),Comma(1:7-1:8),LowerIdent(1:9-1:12),OpColon(1:12-1:13),Int(1:14-1:16),Comma(1:16-1:17),LowerIdent(1:18-1:23),Comma(1:23-1:24),LowerIdent(1:25-1:31),OpColon(1:31-1:32),StringStart(1:33-1:34),StringPart(1:34-1:40),StringEnd(1:40-1:41),Comma(1:41-1:42),LowerIdent(1:43-1:50),CloseCurly(1:51-1:52),EndOfFile(1:52-1:52), diff --git a/src/snapshots/records/record_mixed_types.md b/src/snapshots/records/record_mixed_types.md index 19e8665796..b72ab01fb9 100644 --- a/src/snapshots/records/record_mixed_types.md +++ b/src/snapshots/records/record_mixed_types.md @@ -8,9 +8,12 @@ type=expr { name: "Alice", age: 30, active: Bool.true, scores: [95, 87, 92], balance: 1250.75 } ~~~ # EXPECTED -UNDEFINED VARIABLE - record_mixed_types.md:1:35:1:44 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `true` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig OpenCurly(1:1-1:2),LowerIdent(1:3-1:7),OpColon(1:7-1:8),StringStart(1:9-1:10),StringPart(1:10-1:15),StringEnd(1:15-1:16),Comma(1:16-1:17),LowerIdent(1:18-1:21),OpColon(1:21-1:22),Int(1:23-1:25),Comma(1:25-1:26),LowerIdent(1:27-1:33),OpColon(1:33-1:34),UpperIdent(1:35-1:39),NoSpaceDotLowerIdent(1:39-1:44),Comma(1:44-1:45),LowerIdent(1:46-1:52),OpColon(1:52-1:53),OpenSquare(1:54-1:55),Int(1:55-1:57),Comma(1:57-1:58),Int(1:59-1:61),Comma(1:61-1:62),Int(1:63-1:65),CloseSquare(1:65-1:66),Comma(1:66-1:67),LowerIdent(1:68-1:75),OpColon(1:75-1:76),Float(1:77-1:84),CloseCurly(1:85-1:86),EndOfFile(1:86-1:86), diff --git a/src/snapshots/records/record_shorthand_fields.md b/src/snapshots/records/record_shorthand_fields.md index b480d4e923..61a926bb9c 100644 --- a/src/snapshots/records/record_shorthand_fields.md +++ b/src/snapshots/records/record_shorthand_fields.md @@ -8,12 +8,24 @@ type=expr { name, age, email, active } ~~~ # EXPECTED -UNDEFINED VARIABLE - record_shorthand_fields.md:1:3:1:8 -UNDEFINED VARIABLE - record_shorthand_fields.md:1:9:1:13 -UNDEFINED VARIABLE - record_shorthand_fields.md:1:14:1:20 -UNDEFINED VARIABLE - record_shorthand_fields.md:1:21:1:29 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `name` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `age` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `email` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `active` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig OpenCurly(1:1-1:2),LowerIdent(1:3-1:7),Comma(1:7-1:8),LowerIdent(1:9-1:12),Comma(1:12-1:13),LowerIdent(1:14-1:19),Comma(1:19-1:20),LowerIdent(1:21-1:27),CloseCurly(1:28-1:29),EndOfFile(1:29-1:29), diff --git a/src/snapshots/records/statement_record_destructure.md b/src/snapshots/records/statement_record_destructure.md index f1f36ab282..57d2f1e27f 100644 --- a/src/snapshots/records/statement_record_destructure.md +++ b/src/snapshots/records/statement_record_destructure.md @@ -8,7 +8,7 @@ type=file { name, age, email } = person ~~~ # EXPECTED -missing_header - statement_record_destructure.md:1:1:1:7 +MISSING HEADER - statement_record_destructure.md:1:1:1:7 UNEXPECTED TOKEN IN EXPRESSION - statement_record_destructure.md:1:7:1:12 UNEXPECTED TOKEN IN EXPRESSION - statement_record_destructure.md:1:12:1:19 UNEXPECTED TOKEN IN EXPRESSION - statement_record_destructure.md:1:20:1:23 @@ -78,6 +78,38 @@ Here is the problematic code: ^^^^^^^^ +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + # TOKENS ~~~zig OpenCurly(1:1-1:2),LowerIdent(1:3-1:7),Comma(1:7-1:8),LowerIdent(1:9-1:12),Comma(1:12-1:13),LowerIdent(1:14-1:19),CloseCurly(1:20-1:21),OpAssign(1:22-1:23),LowerIdent(1:24-1:30),EndOfFile(1:30-1:30), diff --git a/src/snapshots/records/type_constrained_record.md b/src/snapshots/records/type_constrained_record.md index ac134fcf77..4343f120d1 100644 --- a/src/snapshots/records/type_constrained_record.md +++ b/src/snapshots/records/type_constrained_record.md @@ -9,8 +9,7 @@ process_user! : { name : Str, age : U32, ..a } => Str ~~~ # EXPECTED UNEXPECTED TOKEN IN TYPE ANNOTATION - type_constrained_record.md:1:42:1:45 -expected_arrow - type_constrained_record.md:1:37:1:41 -MALFORMED TYPE - type_constrained_record.md:1:37:1:47 +PARSE ERROR - type_constrained_record.md:1:37:1:41 # PROBLEMS **UNEXPECTED TOKEN IN TYPE ANNOTATION** The token **..a** is not expected in a type annotation. @@ -36,6 +35,9 @@ process_user! : { name : Str, age : U32, ..a } => Str ^^^^ +**MALFORMED TYPE** +This type annotation is malformed or contains invalid syntax. + # TOKENS ~~~zig LowerIdent(1:1-1:14),OpColon(1:15-1:16),OpenCurly(1:17-1:18),LowerIdent(1:19-1:23),OpColon(1:24-1:25),UpperIdent(1:26-1:29),Comma(1:29-1:30),LowerIdent(1:31-1:34),OpColon(1:35-1:36),UpperIdent(1:37-1:40),Comma(1:40-1:41),DoubleDot(1:42-1:44),LowerIdent(1:44-1:45),CloseCurly(1:46-1:47),OpFatArrow(1:48-1:50),UpperIdent(1:51-1:54),EndOfFile(1:54-1:54), diff --git a/src/snapshots/records/type_open_record.md b/src/snapshots/records/type_open_record.md index 106b20432c..b819d41586 100644 --- a/src/snapshots/records/type_open_record.md +++ b/src/snapshots/records/type_open_record.md @@ -9,9 +9,8 @@ process_user! : { name : Str, age : U32, .. } => Str ~~~ # EXPECTED UNEXPECTED TOKEN IN TYPE ANNOTATION - type_open_record.md:1:42:1:46 -expected_arrow - type_open_record.md:1:37:1:41 -expected_ty_close_curly_or_comma - type_open_record.md:1:47:1:53 -MALFORMED TYPE - type_open_record.md:1:47:1:53 +PARSE ERROR - type_open_record.md:1:37:1:41 +PARSE ERROR - type_open_record.md:1:47:1:53 # PROBLEMS **UNEXPECTED TOKEN IN TYPE ANNOTATION** The token **.. }** is not expected in a type annotation. @@ -49,6 +48,9 @@ process_user! : { name : Str, age : U32, .. } => Str ^^^^^^ +**MALFORMED TYPE** +This type annotation is malformed or contains invalid syntax. + # TOKENS ~~~zig LowerIdent(1:1-1:14),OpColon(1:15-1:16),OpenCurly(1:17-1:18),LowerIdent(1:19-1:23),OpColon(1:24-1:25),UpperIdent(1:26-1:29),Comma(1:29-1:30),LowerIdent(1:31-1:34),OpColon(1:35-1:36),UpperIdent(1:37-1:40),Comma(1:40-1:41),DoubleDot(1:42-1:44),CloseCurly(1:45-1:46),OpFatArrow(1:47-1:49),UpperIdent(1:50-1:53),EndOfFile(1:53-1:53), diff --git a/src/snapshots/rigid_var_instantiation.md b/src/snapshots/rigid_var_instantiation.md index 327ca2cf24..c6c6973289 100644 --- a/src/snapshots/rigid_var_instantiation.md +++ b/src/snapshots/rigid_var_instantiation.md @@ -30,7 +30,42 @@ UNUSED VARIABLE - rigid_var_instantiation.md:13:5:13:8 UNUSED VARIABLE - rigid_var_instantiation.md:10:5:10:8 UNUSED VARIABLE - rigid_var_instantiation.md:16:5:16:8 # PROBLEMS -NIL +**UNUSED VARIABLE** +Variable ``str`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_str` to suppress this warning. +The unused variable is declared here: +**rigid_var_instantiation.md:13:5:13:8:** +```roc + str = identity("hello") +``` + ^^^ + + +**UNUSED VARIABLE** +Variable ``num`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_num` to suppress this warning. +The unused variable is declared here: +**rigid_var_instantiation.md:10:5:10:8:** +```roc + num = identity(42) +``` + ^^^ + + +**UNUSED VARIABLE** +Variable ``lst`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_lst` to suppress this warning. +The unused variable is declared here: +**rigid_var_instantiation.md:16:5:16:8:** +```roc + lst = identity([1, 2, 3]) +``` + ^^^ + + # TOKENS ~~~zig KwApp(1:1-1:4),OpenSquare(1:5-1:6),LowerIdent(1:6-1:11),CloseSquare(1:11-1:12),OpenCurly(1:13-1:14),LowerIdent(1:15-1:17),OpColon(1:17-1:18),KwPlatform(1:19-1:27),StringStart(1:28-1:29),StringPart(1:29-1:54),StringEnd(1:54-1:55),CloseCurly(1:56-1:57),Newline(1:1-1:1), diff --git a/src/snapshots/rigid_var_no_instantiation_error.md b/src/snapshots/rigid_var_no_instantiation_error.md index 66b0d2d971..ce8045ee52 100644 --- a/src/snapshots/rigid_var_no_instantiation_error.md +++ b/src/snapshots/rigid_var_no_instantiation_error.md @@ -32,12 +32,7 @@ main! = |_| { ~~~ # EXPECTED UNEXPECTED TOKEN IN EXPRESSION - rigid_var_no_instantiation_error.md:6:12:6:18 -UNDEFINED VARIABLE - rigid_var_no_instantiation_error.md:6:6:6:7 -UNDEFINED VARIABLE - rigid_var_no_instantiation_error.md:6:9:6:10 -UNDEFINED VARIABLE - rigid_var_no_instantiation_error.md:7:6:7:7 -UNDEFINED VARIABLE - rigid_var_no_instantiation_error.md:7:9:7:10 -UNDEFINED VARIABLE - rigid_var_no_instantiation_error.md:17:21:17:30 -UNUSED VARIABLE - rigid_var_no_instantiation_error.md:13:5:13:12 +UNDEFINED VARIABLE - rigid_var_no_instantiation_error.md:13:5:13:12 UNUSED VARIABLE - rigid_var_no_instantiation_error.md:17:5:17:12 UNUSED VARIABLE - rigid_var_no_instantiation_error.md:21:5:21:12 # PROBLEMS @@ -53,6 +48,62 @@ Here is the problematic code: ^^^^^^ +**UNDEFINED VARIABLE** +Nothing is named `x` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `y` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `y` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `x` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `true` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNUSED VARIABLE** +Variable ``result1`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_result1` to suppress this warning. +The unused variable is declared here: +**rigid_var_no_instantiation_error.md:13:5:13:12:** +```roc + result1 = swap((42, "hello")) +``` + ^^^^^^^ + + +**UNUSED VARIABLE** +Variable ``result2`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_result2` to suppress this warning. +The unused variable is declared here: +**rigid_var_no_instantiation_error.md:17:5:17:12:** +```roc + result2 = swap((Bool.true, [1, 2, 3])) +``` + ^^^^^^^ + + +**UNUSED VARIABLE** +Variable ``result3`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_result3` to suppress this warning. +The unused variable is declared here: +**rigid_var_no_instantiation_error.md:21:5:21:12:** +```roc + result3 = swap(("foo", "bar")) +``` + ^^^^^^^ + + # TOKENS ~~~zig KwApp(1:1-1:4),OpenSquare(1:5-1:6),LowerIdent(1:6-1:11),CloseSquare(1:11-1:12),OpenCurly(1:13-1:14),LowerIdent(1:15-1:17),OpColon(1:17-1:18),KwPlatform(1:19-1:27),StringStart(1:28-1:29),StringPart(1:29-1:54),StringEnd(1:54-1:55),CloseCurly(1:56-1:57),Newline(1:1-1:1), diff --git a/src/snapshots/simple_external_lookup.md b/src/snapshots/simple_external_lookup.md index dc1cd5d327..c23412e288 100644 --- a/src/snapshots/simple_external_lookup.md +++ b/src/snapshots/simple_external_lookup.md @@ -8,9 +8,12 @@ type=expr List.map ~~~ # EXPECTED -UNDEFINED VARIABLE - simple_external_lookup.md:1:1:1:9 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `map` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig UpperIdent(1:1-1:5),NoSpaceDotLowerIdent(1:5-1:9),EndOfFile(1:9-1:9), diff --git a/src/snapshots/static_dispatch_super_test.md b/src/snapshots/static_dispatch_super_test.md index 9dc66a6848..3c9acf7ae6 100644 --- a/src/snapshots/static_dispatch_super_test.md +++ b/src/snapshots/static_dispatch_super_test.md @@ -8,9 +8,12 @@ type=expr some_fn(arg1)?.static_dispatch_method()?.next_static_dispatch_method()?.record_field? ~~~ # EXPECTED -not_implemented - static_dispatch_super_test.md:1:1:1:1 -# PROBLEMS NIL +# PROBLEMS +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: canonicalize suffix_single_question expression +Let us know if you want to help! + # TOKENS ~~~zig LowerIdent(1:1-1:8),NoSpaceOpenRound(1:8-1:9),LowerIdent(1:9-1:13),CloseRound(1:13-1:14),NoSpaceOpQuestion(1:14-1:15),NoSpaceDotLowerIdent(1:15-1:38),NoSpaceOpenRound(1:38-1:39),CloseRound(1:39-1:40),NoSpaceOpQuestion(1:40-1:41),NoSpaceDotLowerIdent(1:41-1:69),NoSpaceOpenRound(1:69-1:70),CloseRound(1:70-1:71),NoSpaceOpQuestion(1:71-1:72),NoSpaceDotLowerIdent(1:72-1:85),NoSpaceOpQuestion(1:85-1:86),EndOfFile(1:86-1:86), diff --git a/src/snapshots/string.md b/src/snapshots/string.md index 9164e2b9f5..0b9a57ac52 100644 --- a/src/snapshots/string.md +++ b/src/snapshots/string.md @@ -14,7 +14,14 @@ module [] # EXPECTED NIL # PROBLEMS -NIL +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + # TOKENS ~~~zig KwModule(1:1-1:7),OpenSquare(1:8-1:9),CloseSquare(1:9-1:10),Newline(1:1-1:1), diff --git a/src/snapshots/string_multiline_formatting_(due_to_templating_not_multiline_string_literal)_1.md b/src/snapshots/string_multiline_formatting_(due_to_templating_not_multiline_string_literal)_1.md index a978f4ae6a..d78e504d46 100644 --- a/src/snapshots/string_multiline_formatting_(due_to_templating_not_multiline_string_literal)_1.md +++ b/src/snapshots/string_multiline_formatting_(due_to_templating_not_multiline_string_literal)_1.md @@ -9,11 +9,20 @@ type=expr b)} lines of text due to the template parts" ~~~ # EXPECTED -UNDEFINED VARIABLE - string_multiline_formatting_(due_to_templating_not_multiline_string_literal)_1.md:1:26:1:35 -UNDEFINED VARIABLE - string_multiline_formatting_(due_to_templating_not_multiline_string_literal)_1.md:1:36:1:37 -UNDEFINED VARIABLE - string_multiline_formatting_(due_to_templating_not_multiline_string_literal)_1.md:2:1:2:2 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `some_func` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `a` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `b` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig StringStart(1:1-1:2),StringPart(1:2-1:24),OpenStringInterpolation(1:24-1:26),LowerIdent(1:26-1:35),NoSpaceOpenRound(1:35-1:36),LowerIdent(1:36-1:37),Comma(1:37-1:38),Newline(1:40-1:57), diff --git a/src/snapshots/string_multiline_formatting_(due_to_templating_not_multiline_string_literal)_3.md b/src/snapshots/string_multiline_formatting_(due_to_templating_not_multiline_string_literal)_3.md index 9eb05a1ad8..a22589e6e4 100644 --- a/src/snapshots/string_multiline_formatting_(due_to_templating_not_multiline_string_literal)_3.md +++ b/src/snapshots/string_multiline_formatting_(due_to_templating_not_multiline_string_literal)_3.md @@ -13,11 +13,20 @@ type=expr } lines of text due to the template parts" ~~~ # EXPECTED -UNDEFINED VARIABLE - string_multiline_formatting_(due_to_templating_not_multiline_string_literal)_3.md:2:2:2:11 -UNDEFINED VARIABLE - string_multiline_formatting_(due_to_templating_not_multiline_string_literal)_3.md:3:3:3:4 -UNDEFINED VARIABLE - string_multiline_formatting_(due_to_templating_not_multiline_string_literal)_3.md:4:3:4:4 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `some_func` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `a` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `b` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig StringStart(1:1-1:2),StringPart(1:2-1:24),OpenStringInterpolation(1:24-1:26),Newline(1:1-1:1), diff --git a/src/snapshots/syntax_grab_bag.md b/src/snapshots/syntax_grab_bag.md index 833b3fe864..1ed23cd764 100644 --- a/src/snapshots/syntax_grab_bag.md +++ b/src/snapshots/syntax_grab_bag.md @@ -218,70 +218,6 @@ UNEXPECTED TOKEN IN EXPRESSION - syntax_grab_bag.md:89:9:90:4 UNEXPECTED TOKEN IN PATTERN - syntax_grab_bag.md:90:3:90:28 UNEXPECTED TOKEN IN EXPRESSION - syntax_grab_bag.md:90:6:91:9 UNEXPECTED TOKEN IN EXPRESSION - syntax_grab_bag.md:1:1:92:4 -UNEXPECTED TOKEN IN PATTERN - syntax_grab_bag.md:92:3:92:8 -UNEXPECTED TOKEN IN PATTERN - syntax_grab_bag.md:93:4:93:8 -UNDECLARED TYPE - syntax_grab_bag.md:36:8:36:11 -UNDECLARED TYPE - syntax_grab_bag.md:36:13:36:16 -UNDECLARED TYPE - syntax_grab_bag.md:39:2:39:5 -UNDECLARED TYPE - syntax_grab_bag.md:40:2:40:5 -UNDECLARED TYPE - syntax_grab_bag.md:43:19:43:21 -UNDECLARED TYPE - syntax_grab_bag.md:43:32:43:41 -UNDECLARED TYPE - syntax_grab_bag.md:45:8:45:10 -UNDECLARED TYPE - syntax_grab_bag.md:46:8:46:17 -UNDECLARED TYPE - syntax_grab_bag.md:52:4:52:6 -UNDECLARED TYPE - syntax_grab_bag.md:53:8:53:17 -not_implemented - syntax_grab_bag.md:6:1:12:4 -not_implemented - syntax_grab_bag.md:1:1:1:1 -not_implemented - syntax_grab_bag.md:1:1:1:1 -not_implemented - syntax_grab_bag.md:1:1:1:1 -not_implemented - syntax_grab_bag.md:1:1:1:1 -not_implemented - syntax_grab_bag.md:1:1:1:1 -expr_not_canonicalized - syntax_grab_bag.md:89:9:90:4 -expr_not_canonicalized - syntax_grab_bag.md:90:6:91:9 -expr_not_canonicalized - syntax_grab_bag.md:1:1:92:4 -UNUSED VARIABLE - syntax_grab_bag.md:97:3:97:8 -not_implemented - syntax_grab_bag.md:1:1:1:1 -UNUSED VARIABLE - syntax_grab_bag.md:102:19:102:23 -not_implemented - syntax_grab_bag.md:1:1:1:1 -UNUSED VARIABLE - syntax_grab_bag.md:108:23:108:27 -not_implemented - syntax_grab_bag.md:1:1:1:1 -UNUSED VARIABLE - syntax_grab_bag.md:115:6:115:10 -not_implemented - syntax_grab_bag.md:1:1:1:1 -not_implemented - syntax_grab_bag.md:1:1:1:1 -not_implemented - syntax_grab_bag.md:121:5:121:12 -not_implemented - syntax_grab_bag.md:1:1:1:1 -not_implemented - syntax_grab_bag.md:123:4:125:8 -not_implemented - syntax_grab_bag.md:130:5:130:12 -not_implemented - syntax_grab_bag.md:132:4:132:11 -UNUSED VARIABLE - syntax_grab_bag.md:82:2:82:3 -not_implemented - syntax_grab_bag.md:1:1:1:1 -UNDECLARED TYPE - syntax_grab_bag.md:143:14:143:20 -not_implemented - syntax_grab_bag.md:1:1:1:1 -not_implemented - syntax_grab_bag.md:1:1:1:1 -not_implemented - syntax_grab_bag.md:154:2:154:5 -not_implemented - syntax_grab_bag.md:156:3:156:6 -UNDEFINED VARIABLE - syntax_grab_bag.md:158:2:158:11 -not_implemented - syntax_grab_bag.md:1:1:1:1 -not_implemented - syntax_grab_bag.md:162:2:163:49 -not_implemented - syntax_grab_bag.md:1:1:1:1 -not_implemented - syntax_grab_bag.md:1:1:1:1 -UNDEFINED VARIABLE - syntax_grab_bag.md:178:63:178:71 -UNDEFINED VARIABLE - syntax_grab_bag.md:179:42:179:48 -UNDEFINED VARIABLE - syntax_grab_bag.md:183:3:183:7 -UNDEFINED VARIABLE - syntax_grab_bag.md:185:4:185:10 -UNDEFINED VARIABLE - syntax_grab_bag.md:188:22:188:25 -not_implemented - syntax_grab_bag.md:1:1:1:1 -not_implemented - syntax_grab_bag.md:1:1:1:1 -UNDEFINED VARIABLE - syntax_grab_bag.md:193:4:193:13 -UNUSED VARIABLE - syntax_grab_bag.md:180:2:180:17 -UNUSED VARIABLE - syntax_grab_bag.md:178:2:178:8 -UNUSED VARIABLE - syntax_grab_bag.md:164:2:164:18 -UNUSED VARIABLE - syntax_grab_bag.md:166:2:166:6 -UNUSED VARIABLE - syntax_grab_bag.md:188:2:188:15 -UNUSED VARIABLE - syntax_grab_bag.md:189:2:189:23 -UNUSED VARIABLE - syntax_grab_bag.md:165:2:165:14 -UNDECLARED TYPE - syntax_grab_bag.md:201:9:201:14 -not_implemented - syntax_grab_bag.md:1:1:1:1 # PROBLEMS **UNEXPECTED TOKEN IN EXPRESSION** The token ** After pattern in alt @@ -538,6 +474,443 @@ Here is the problematic code: ^^^^ +**UNDECLARED TYPE** +The type ``Bar`` is not declared in this scope. + +This type is referenced here: +**syntax_grab_bag.md:36:8:36:11:** +```roc +Foo : (Bar, Baz) +``` + ^^^ + + +**UNDECLARED TYPE** +The type ``Baz`` is not declared in this scope. + +This type is referenced here: +**syntax_grab_bag.md:36:13:36:16:** +```roc +Foo : (Bar, Baz) +``` + ^^^ + + +**UNDECLARED TYPE** +The type ``Bar`` is not declared in this scope. + +This type is referenced here: +**syntax_grab_bag.md:39:2:39:5:** +```roc + Bar, # Comment after pattern tuple item +``` + ^^^ + + +**UNDECLARED TYPE** +The type ``Baz`` is not declared in this scope. + +This type is referenced here: +**syntax_grab_bag.md:40:2:40:5:** +```roc + Baz, # Another after pattern tuple item +``` + ^^^ + + +**UNDECLARED TYPE** +The type ``Ok`` is not declared in this scope. + +This type is referenced here: +**syntax_grab_bag.md:43:19:43:21:** +```roc +Some(a) : { foo : Ok(a), bar : Something } +``` + ^^ + + +**UNDECLARED TYPE** +The type ``Something`` is not declared in this scope. + +This type is referenced here: +**syntax_grab_bag.md:43:32:43:41:** +```roc +Some(a) : { foo : Ok(a), bar : Something } +``` + ^^^^^^^^^ + + +**UNDECLARED TYPE** +The type ``Ok`` is not declared in this scope. + +This type is referenced here: +**syntax_grab_bag.md:45:8:45:10:** +```roc + foo : Ok(a), # After field +``` + ^^ + + +**UNDECLARED TYPE** +The type ``Something`` is not declared in this scope. + +This type is referenced here: +**syntax_grab_bag.md:46:8:46:17:** +```roc + bar : Something, # After last field +``` + ^^^^^^^^^ + + +**UNDECLARED TYPE** +The type ``Ok`` is not declared in this scope. + +This type is referenced here: +**syntax_grab_bag.md:52:4:52:6:** +```roc + Ok(a), # Comment after pattern record field +``` + ^^ + + +**UNDECLARED TYPE** +The type ``Something`` is not declared in this scope. + +This type is referenced here: +**syntax_grab_bag.md:53:8:53:17:** +```roc + bar : Something, # Another after pattern record field +``` + ^^^^^^^^^ + + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: malformed import module name contains invalid control characters +Let us know if you want to help! + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: Exposed item 'line!' already imported from module 'pf.Stdout', cannot import again from module 'MALFORMED_IMPORT' +Let us know if you want to help! + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: Exposed item 'write!' already imported from module 'pf.Stdout', cannot import again from module 'MALFORMED_IMPORT' +Let us know if you want to help! + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: canonicalize dbg expression +Let us know if you want to help! + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: canonicalize dbg expression +Let us know if you want to help! + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: canonicalize alternatives pattern +Let us know if you want to help! + +**UNKNOWN OPERATOR** +This looks like an operator, but it's not one I recognize! +Check the spelling and make sure you're using a valid Roc operator. + +**INVALID PATTERN** +This pattern contains invalid syntax or uses unsupported features. + +**UNKNOWN OPERATOR** +This looks like an operator, but it's not one I recognize! +Check the spelling and make sure you're using a valid Roc operator. + +**UNKNOWN OPERATOR** +This looks like an operator, but it's not one I recognize! +Check the spelling and make sure you're using a valid Roc operator. + +**INVALID PATTERN** +This pattern contains invalid syntax or uses unsupported features. + +**INVALID PATTERN** +This pattern contains invalid syntax or uses unsupported features. + +**UNUSED VARIABLE** +Variable ``lower`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_lower` to suppress this warning. +The unused variable is declared here: +**syntax_grab_bag.md:97:3:97:8:** +```roc + lower # After pattern comment +``` + ^^^^^ + + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: canonicalize alternatives pattern +Let us know if you want to help! + +**UNUSED VARIABLE** +Variable ``rest`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_rest` to suppress this warning. +The unused variable is declared here: +**syntax_grab_bag.md:102:19:102:23:** +```roc + [1, 2, 3, .. as rest] # After pattern comment +``` + ^^^^ + + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: canonicalize alternatives pattern +Let us know if you want to help! + +**UNUSED VARIABLE** +Variable ``rest`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_rest` to suppress this warning. +The unused variable is declared here: +**syntax_grab_bag.md:108:23:108:27:** +```roc + [1, 2 | 5, 3, .. as rest] => 123 +``` + ^^^^ + + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: canonicalize alternatives pattern +Let us know if you want to help! + +**UNUSED VARIABLE** +Variable ``rest`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_rest` to suppress this warning. +The unused variable is declared here: +**syntax_grab_bag.md:115:6:115:10:** +```roc + rest, # After last pattern in list +``` + ^^^^ + + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: canonicalize alternatives pattern +Let us know if you want to help! + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: canonicalize alternatives pattern +Let us know if you want to help! + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: record pattern with sub-patterns +Let us know if you want to help! + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: canonicalize local_dispatch expression +Let us know if you want to help! + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: record pattern with sub-patterns +Let us know if you want to help! + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: record pattern with sub-patterns +Let us know if you want to help! + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: record pattern with sub-patterns +Let us know if you want to help! + +**UNUSED VARIABLE** +Variable ``b`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_b` to suppress this warning. +The unused variable is declared here: +**syntax_grab_bag.md:82:2:82:3:** +```roc + b, +``` + ^ + + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: top-level expect +Let us know if you want to help! + +**UNDECLARED TYPE** +The type ``String`` is not declared in this scope. + +This type is referenced here: +**syntax_grab_bag.md:143:14:143:20:** +```roc +main! : List(String) -> Result({}, _) +``` + ^^^^^^ + + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: statement type in block +Let us know if you want to help! + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: statement type in block +Let us know if you want to help! + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: ... +Let us know if you want to help! + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: ... +Let us know if you want to help! + +**UNDEFINED VARIABLE** +Nothing is named `some_func` in this scope. +Is there an `import` or `exposing` missing up-top? + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: canonicalize dbg expression +Let us know if you want to help! + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: crash statement +Let us know if you want to help! + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: canonicalize dbg expression +Let us know if you want to help! + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: statement type in block +Let us know if you want to help! + +**UNDEFINED VARIABLE** +Nothing is named `punned` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `nested` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `tag1` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `nested` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `foo` in this scope. +Is there an `import` or `exposing` missing up-top? + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: canonicalize suffix_single_question expression +Let us know if you want to help! + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: canonicalize suffix_single_question expression +Let us know if you want to help! + +**UNDEFINED VARIABLE** +Nothing is named `toStr` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNUSED VARIABLE** +Variable ``multiline_tuple`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_multiline_tuple` to suppress this warning. +The unused variable is declared here: +**syntax_grab_bag.md:180:2:180:17:** +```roc + multiline_tuple = ( +``` + ^^^^^^^^^^^^^^^ + + +**UNUSED VARIABLE** +Variable ``record`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_record` to suppress this warning. +The unused variable is declared here: +**syntax_grab_bag.md:178:2:178:8:** +```roc + record = { foo: 123, bar: "Hello", baz: tag, qux: Ok(world), punned } +``` + ^^^^^^ + + +**UNUSED VARIABLE** +Variable ``tag_with_payload`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_tag_with_payload` to suppress this warning. +The unused variable is declared here: +**syntax_grab_bag.md:164:2:164:18:** +```roc + tag_with_payload = Ok(number) +``` + ^^^^^^^^^^^^^^^^ + + +**UNUSED VARIABLE** +Variable ``list`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_list` to suppress this warning. +The unused variable is declared here: +**syntax_grab_bag.md:166:2:166:6:** +```roc + list = [ +``` + ^^^^ + + +**UNUSED VARIABLE** +Variable ``bin_op_result`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_bin_op_result` to suppress this warning. +The unused variable is declared here: +**syntax_grab_bag.md:188:2:188:15:** +```roc + bin_op_result = Err(foo) ?? 12 > 5 * 5 or 13 + 2 < 5 and 10 - 1 >= 16 or 12 <= 3 / 5 +``` + ^^^^^^^^^^^^^ + + +**UNUSED VARIABLE** +Variable ``static_dispatch_style`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_static_dispatch_style` to suppress this warning. +The unused variable is declared here: +**syntax_grab_bag.md:189:2:189:23:** +```roc + static_dispatch_style = some_fn(arg1)?.static_dispatch_method()?.next_static_dispatch_method()?.record_field? +``` + ^^^^^^^^^^^^^^^^^^^^^ + + +**UNUSED VARIABLE** +Variable ``interpolated`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_interpolated` to suppress this warning. +The unused variable is declared here: +**syntax_grab_bag.md:165:2:165:14:** +```roc + interpolated = "Hello, ${world}" +``` + ^^^^^^^^^^^^ + + +**UNDECLARED TYPE** +The type ``Value`` is not declared in this scope. + +This type is referenced here: +**syntax_grab_bag.md:201:9:201:14:** +```roc +tuple : Value((a, b, c)) +``` + ^^^^^ + + +**NOT IMPLEMENTED** +This feature is not yet implemented or doesn't have a proper error report yet: top-level expect +Let us know if you want to help! + **TYPE MISMATCH** This expression is used in an unexpected way: **syntax_grab_bag.md:68:1:68:8:** diff --git a/src/snapshots/type_alias_decl.md b/src/snapshots/type_alias_decl.md index 7367394e5f..5baec0c49e 100644 --- a/src/snapshots/type_alias_decl.md +++ b/src/snapshots/type_alias_decl.md @@ -46,12 +46,7 @@ main! = |_| { } ~~~ # EXPECTED -UNEXPECTED TOKEN IN EXPRESSION - type_alias_decl.md:1:1:30:11 -UNEXPECTED TOKEN IN EXPRESSION - type_alias_decl.md:1:1:33:11 -UNEXPECTED TOKEN IN EXPRESSION - type_alias_decl.md:1:1:36:10 -TYPE REDECLARED - type_alias_decl.md:7:1:7:37 -UNUSED VARIABLE - type_alias_decl.md:36:5:36:10 -UNUSED VARIABLE - type_alias_decl.md:33:5:33:11 +NIL # PROBLEMS **UNEXPECTED TOKEN IN EXPRESSION** The token **app [main!] { pf: platform "../basic-cli/main.roc" } @@ -278,6 +273,48 @@ main! = |_| { ``` +**TYPE REDECLARED** +The type ``Result`` is being redeclared. + +The redeclaration is here: +**type_alias_decl.md:7:1:7:37:** +```roc +Result(ok, err) : [Ok(ok), Err(err)] +``` +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +But ``Result`` was already declared here: +**type_alias_decl.md:1:1:1:1:** +```roc +app [main!] { pf: platform "../basic-cli/main.roc" } +``` + + + +**UNUSED VARIABLE** +Variable ``color`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_color` to suppress this warning. +The unused variable is declared here: +**type_alias_decl.md:36:5:36:10:** +```roc + color = Red +``` + ^^^^^ + + +**UNUSED VARIABLE** +Variable ``person`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_person` to suppress this warning. +The unused variable is declared here: +**type_alias_decl.md:33:5:33:11:** +```roc + person = { name: "Alice", age: 30 } +``` + ^^^^^^ + + # TOKENS ~~~zig KwApp(1:1-1:4),OpenSquare(1:5-1:6),LowerIdent(1:6-1:11),CloseSquare(1:11-1:12),OpenCurly(1:13-1:14),LowerIdent(1:15-1:17),OpColon(1:17-1:18),KwPlatform(1:19-1:27),StringStart(1:28-1:29),StringPart(1:29-1:50),StringEnd(1:50-1:51),CloseCurly(1:52-1:53),Newline(1:1-1:1), diff --git a/src/snapshots/type_alias_parameterized.md b/src/snapshots/type_alias_parameterized.md index 4ea7667363..ff77da05a3 100644 --- a/src/snapshots/type_alias_parameterized.md +++ b/src/snapshots/type_alias_parameterized.md @@ -15,7 +15,7 @@ swapPair = |(x, y)| (y, x) main! = |_| swapPair(1, 2) ~~~ # EXPECTED -NIL +TYPE MISMATCH - type_alias_parameterized.md:8:13:8:21 # PROBLEMS **TYPE MISMATCH** This expression is used in an unexpected way: diff --git a/src/snapshots/type_annotation_basic.md b/src/snapshots/type_annotation_basic.md index 8f913a850c..83a896446f 100644 --- a/src/snapshots/type_annotation_basic.md +++ b/src/snapshots/type_annotation_basic.md @@ -36,7 +36,18 @@ main! = |_| { # EXPECTED UNUSED VARIABLE - type_annotation_basic.md:21:5:21:9 # PROBLEMS -NIL +**UNUSED VARIABLE** +Variable ``pair`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_pair` to suppress this warning. +The unused variable is declared here: +**type_annotation_basic.md:21:5:21:9:** +```roc + pair = combine(num, text) +``` + ^^^^ + + # TOKENS ~~~zig KwApp(1:1-1:4),OpenSquare(1:5-1:6),LowerIdent(1:6-1:11),CloseSquare(1:11-1:12),OpenCurly(1:13-1:14),LowerIdent(1:15-1:17),OpColon(1:17-1:18),KwPlatform(1:19-1:27),StringStart(1:28-1:29),StringPart(1:29-1:50),StringEnd(1:50-1:51),CloseCurly(1:52-1:53),Newline(1:1-1:1), diff --git a/src/snapshots/type_annotation_missing_parens.md b/src/snapshots/type_annotation_missing_parens.md index 7e1997606f..c56b1bb5c8 100644 --- a/src/snapshots/type_annotation_missing_parens.md +++ b/src/snapshots/type_annotation_missing_parens.md @@ -10,7 +10,7 @@ module [nums] nums : List U8 ~~~ # EXPECTED -expected_colon_after_type_annotation - type_annotation_missing_parens.md:3:15:3:15 +PARSE ERROR - type_annotation_missing_parens.md:3:15:3:15 # PROBLEMS **PARSE ERROR** Type applications require parentheses around their type arguments. diff --git a/src/snapshots/type_annotations.md b/src/snapshots/type_annotations.md index feb8aa3732..f42e1108c3 100644 --- a/src/snapshots/type_annotations.md +++ b/src/snapshots/type_annotations.md @@ -19,7 +19,39 @@ UNDECLARED TYPE - type_annotations.md:4:7:4:12 UNDECLARED TYPE - type_annotations.md:7:14:7:20 UNDECLARED TYPE - type_annotations.md:8:13:8:18 # PROBLEMS -NIL +**UNDECLARED TYPE** +The type ``Thing`` is not declared in this scope. + +This type is referenced here: +**type_annotations.md:4:7:4:12:** +```roc +bar : Thing(a, b, _) +``` + ^^^^^ + + +**UNDECLARED TYPE** +The type ``String`` is not declared in this scope. + +This type is referenced here: +**type_annotations.md:7:14:7:20:** +```roc +main! : List(String) -> Result({}, _) +``` + ^^^^^^ + + +**UNDECLARED TYPE** +The type ``Value`` is not declared in this scope. + +This type is referenced here: +**type_annotations.md:8:13:8:18:** +```roc +tag_tuple : Value((a, b, c)) +``` + ^^^^^ + + # TOKENS ~~~zig KwModule(1:1-1:7),OpenSquare(1:8-1:9),CloseSquare(1:9-1:10),Newline(1:1-1:1), diff --git a/src/snapshots/type_app_complex_nested.md b/src/snapshots/type_app_complex_nested.md index 28f6b5b945..e2f24a715b 100644 --- a/src/snapshots/type_app_complex_nested.md +++ b/src/snapshots/type_app_complex_nested.md @@ -46,6 +46,91 @@ deepNested = |_| crash "not implemented" ^^^^^^^ +**UNDECLARED TYPE** +The type ``Maybe`` is not declared in this scope. + +This type is referenced here: +**type_app_complex_nested.md:16:33:16:38:** +```roc +ComplexType(a, b) : Result(List(Maybe(a)), Dict(Str, Error(b))) +``` + ^^^^^ + + +**UNDECLARED TYPE** +The type ``Error`` is not declared in this scope. + +This type is referenced here: +**type_app_complex_nested.md:16:54:16:59:** +```roc +ComplexType(a, b) : Result(List(Maybe(a)), Dict(Str, Error(b))) +``` + ^^^^^ + + +**UNDECLARED TYPE** +The type ``Maybe`` is not declared in this scope. + +This type is referenced here: +**type_app_complex_nested.md:4:30:4:35:** +```roc +processComplex : Result(List(Maybe(a)), Dict(Str, Error(b))) -> List(a) +``` + ^^^^^ + + +**UNDECLARED TYPE** +The type ``Error`` is not declared in this scope. + +This type is referenced here: +**type_app_complex_nested.md:4:51:4:56:** +```roc +processComplex : Result(List(Maybe(a)), Dict(Str, Error(b))) -> List(a) +``` + ^^^^^ + + +**UNUSED VARIABLE** +Variable ``maybeList`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_maybeList` to suppress this warning. +The unused variable is declared here: +**type_app_complex_nested.md:7:12:7:21:** +```roc + Ok(maybeList) => [] +``` + ^^^^^^^^^ + + +**UNDECLARED TYPE** +The type ``Maybe`` is not declared in this scope. + +This type is referenced here: +**type_app_complex_nested.md:12:14:12:19:** +```roc +deepNested : Maybe(Result(List(Dict(Str, a)), b)) -> a +``` + ^^^^^ + + +**UNDECLARED TYPE** +The type ``Maybe`` is not declared in this scope. + +This type is referenced here: +**type_app_complex_nested.md:13:1:13:11:** +```roc +deepNested = |_| crash "not implemented" +``` +^^^^^^^^^^ + + +**INVALID LAMBDA** +The body of this lambda expression is not valid. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + # TOKENS ~~~zig KwApp(1:1-1:4),OpenSquare(1:5-1:6),LowerIdent(1:6-1:11),CloseSquare(1:11-1:12),OpenCurly(1:13-1:14),LowerIdent(1:15-1:17),OpColon(1:17-1:18),KwPlatform(1:19-1:27),StringStart(1:28-1:29),StringPart(1:29-1:50),StringEnd(1:50-1:51),CloseCurly(1:52-1:53),Newline(1:1-1:1), diff --git a/src/snapshots/type_app_multiple_args.md b/src/snapshots/type_app_multiple_args.md index e88c87d3a1..277213e574 100644 --- a/src/snapshots/type_app_multiple_args.md +++ b/src/snapshots/type_app_multiple_args.md @@ -13,9 +13,12 @@ processDict = |_dict| [] main! = |_| processDict(Dict.empty().insert("one", 1)) ~~~ # EXPECTED -UNDEFINED VARIABLE - type_app_multiple_args.md:6:25:6:35 -# PROBLEMS NIL +# PROBLEMS +**UNDEFINED VARIABLE** +Nothing is named `empty` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig KwApp(1:1-1:4),OpenSquare(1:5-1:6),LowerIdent(1:6-1:11),CloseSquare(1:11-1:12),OpenCurly(1:13-1:14),LowerIdent(1:15-1:17),OpColon(1:17-1:18),KwPlatform(1:19-1:27),StringStart(1:28-1:29),StringPart(1:29-1:50),StringEnd(1:50-1:51),CloseCurly(1:52-1:53),Newline(1:1-1:1), diff --git a/src/snapshots/type_app_nested.md b/src/snapshots/type_app_nested.md index 712e5ea3aa..616c75f1f6 100644 --- a/src/snapshots/type_app_nested.md +++ b/src/snapshots/type_app_nested.md @@ -15,7 +15,17 @@ main! = |_| processNested([]) # EXPECTED UNDECLARED TYPE - type_app_nested.md:3:34:3:37 # PROBLEMS -NIL +**UNDECLARED TYPE** +The type ``Err`` is not declared in this scope. + +This type is referenced here: +**type_app_nested.md:3:34:3:37:** +```roc +processNested : List(Result(Str, Err)) -> List(Str) +``` + ^^^ + + # TOKENS ~~~zig KwApp(1:1-1:4),OpenSquare(1:5-1:6),LowerIdent(1:6-1:11),CloseSquare(1:11-1:12),OpenCurly(1:13-1:14),LowerIdent(1:15-1:17),OpColon(1:17-1:18),KwPlatform(1:19-1:27),StringStart(1:28-1:29),StringPart(1:29-1:50),StringEnd(1:50-1:51),CloseCurly(1:52-1:53),Newline(1:1-1:1), diff --git a/src/snapshots/type_app_with_vars.md b/src/snapshots/type_app_with_vars.md index 9ad1b0c3c9..68708cac64 100644 --- a/src/snapshots/type_app_with_vars.md +++ b/src/snapshots/type_app_with_vars.md @@ -13,7 +13,7 @@ mapList = |list, fn| list.map(fn) main! = |_| mapList([1,2,3,4,5]) ~~~ # EXPECTED -NIL +TYPE MISMATCH - type_app_with_vars.md:6:13:6:20 # PROBLEMS **TYPE MISMATCH** This expression is used in an unexpected way: diff --git a/src/snapshots/type_checking/u8_annotation_large_value.md b/src/snapshots/type_checking/u8_annotation_large_value.md index ee3ecef6f0..fb1c5931c4 100644 --- a/src/snapshots/type_checking/u8_annotation_large_value.md +++ b/src/snapshots/type_checking/u8_annotation_large_value.md @@ -11,7 +11,7 @@ x : U8 x = 500 ~~~ # EXPECTED -NIL +NUMBER DOES NOT FIT IN TYPE - u8_annotation_large_value.md:4:5:4:8 # PROBLEMS **NUMBER DOES NOT FIT IN TYPE** The number **500** does not fit in its inferred type: diff --git a/src/snapshots/type_checking/u8_negative_value.md b/src/snapshots/type_checking/u8_negative_value.md index c8297d8caa..95c57d350b 100644 --- a/src/snapshots/type_checking/u8_negative_value.md +++ b/src/snapshots/type_checking/u8_negative_value.md @@ -11,7 +11,7 @@ x : U8 x = -1 ~~~ # EXPECTED -NIL +NEGATIVE UNSIGNED INTEGER - u8_negative_value.md:4:5:4:7 # PROBLEMS **NEGATIVE UNSIGNED INTEGER** The number **-1** is **signed** because it is negative: diff --git a/src/snapshots/type_comprehensive_scope.md b/src/snapshots/type_comprehensive_scope.md index 7f859f1a61..761a5139b9 100644 --- a/src/snapshots/type_comprehensive_scope.md +++ b/src/snapshots/type_comprehensive_scope.md @@ -46,11 +46,68 @@ Complex : { ~~~ # EXPECTED TYPE REDECLARED - type_comprehensive_scope.md:12:1:12:37 -UNDECLARED TYPE - type_comprehensive_scope.md:15:19:15:23 +type_comprehensive_scope.md:1:1:1:1: - type_comprehensive_scope.md:15:19:15:23 TYPE REDECLARED - type_comprehensive_scope.md:24:1:24:13 -UNDECLARED TYPE - type_comprehensive_scope.md:27:11:27:29 +type_comprehensive_scope.md:9:1:9:33: - type_comprehensive_scope.md:27:11:27:29 # PROBLEMS -NIL +**TYPE REDECLARED** +The type ``Result`` is being redeclared. + +The redeclaration is here: +**type_comprehensive_scope.md:12:1:12:37:** +```roc +Result(ok, err) : [Ok(ok), Err(err)] +``` +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +But ``Result`` was already declared here: +**type_comprehensive_scope.md:1:1:1:1:** +```roc +module [MyU64, Person, Result, Tree, Node] +``` + + + +**UNDECLARED TYPE** +The type ``Node`` is not declared in this scope. + +This type is referenced here: +**type_comprehensive_scope.md:15:19:15:23:** +```roc +Tree(a) : [Branch(Node(a)), Leaf(a)] +``` + ^^^^ + + +**TYPE REDECLARED** +The type ``Person`` is being redeclared. + +The redeclaration is here: +**type_comprehensive_scope.md:24:1:24:13:** +```roc +Person : U64 +``` +^^^^^^^^^^^^ + +But ``Person`` was already declared here: +**type_comprehensive_scope.md:9:1:9:33:** +```roc +Person : { name: Str, age: U64 } +``` +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + +**UNDECLARED TYPE** +The type ``SomeUndeclaredType`` is not declared in this scope. + +This type is referenced here: +**type_comprehensive_scope.md:27:11:27:29:** +```roc +BadType : SomeUndeclaredType +``` + ^^^^^^^^^^^^^^^^^^ + + # TOKENS ~~~zig KwModule(1:1-1:7),OpenSquare(1:8-1:9),UpperIdent(1:9-1:14),Comma(1:14-1:15),UpperIdent(1:16-1:22),Comma(1:22-1:23),UpperIdent(1:24-1:30),Comma(1:30-1:31),UpperIdent(1:32-1:36),Comma(1:36-1:37),UpperIdent(1:38-1:42),CloseSquare(1:42-1:43),Newline(1:1-1:1), diff --git a/src/snapshots/type_declarations.md b/src/snapshots/type_declarations.md index 93d8046403..f95f7241e6 100644 --- a/src/snapshots/type_declarations.md +++ b/src/snapshots/type_declarations.md @@ -27,7 +27,50 @@ UNDECLARED TYPE - type_declarations.md:5:13:5:16 UNDECLARED TYPE - type_declarations.md:7:19:7:21 UNDECLARED TYPE - type_declarations.md:7:32:7:41 # PROBLEMS -NIL +**UNDECLARED TYPE** +The type ``Bar`` is not declared in this scope. + +This type is referenced here: +**type_declarations.md:5:8:5:11:** +```roc +Foo : (Bar, Baz) +``` + ^^^ + + +**UNDECLARED TYPE** +The type ``Baz`` is not declared in this scope. + +This type is referenced here: +**type_declarations.md:5:13:5:16:** +```roc +Foo : (Bar, Baz) +``` + ^^^ + + +**UNDECLARED TYPE** +The type ``Ok`` is not declared in this scope. + +This type is referenced here: +**type_declarations.md:7:19:7:21:** +```roc +Some(a) : { foo : Ok(a), bar : Something } +``` + ^^ + + +**UNDECLARED TYPE** +The type ``Something`` is not declared in this scope. + +This type is referenced here: +**type_declarations.md:7:32:7:41:** +```roc +Some(a) : { foo : Ok(a), bar : Something } +``` + ^^^^^^^^^ + + # TOKENS ~~~zig KwModule(1:1-1:7),OpenSquare(1:8-1:9),UpperIdent(1:9-1:12),Comma(1:12-1:13),UpperIdent(1:14-1:17),Comma(1:17-1:18),UpperIdent(1:19-1:23),Comma(1:23-1:24),UpperIdent(1:25-1:30),Comma(1:30-1:31),UpperIdent(1:32-1:40),Comma(1:40-1:41),LowerIdent(1:42-1:49),Comma(1:49-1:50),LowerIdent(1:51-1:56),CloseSquare(1:56-1:57),Newline(1:1-1:1), diff --git a/src/snapshots/type_function_basic.md b/src/snapshots/type_function_basic.md index b1e6d9e794..10a515bdf6 100644 --- a/src/snapshots/type_function_basic.md +++ b/src/snapshots/type_function_basic.md @@ -27,6 +27,14 @@ apply : (a -> b), a -> b ^^^ +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + # TOKENS ~~~zig KwApp(1:1-1:4),OpenSquare(1:5-1:6),LowerIdent(1:6-1:11),CloseSquare(1:11-1:12),OpenCurly(1:13-1:14),LowerIdent(1:15-1:17),OpColon(1:17-1:18),KwPlatform(1:19-1:27),StringStart(1:28-1:29),StringPart(1:29-1:50),StringEnd(1:50-1:51),CloseCurly(1:52-1:53),Newline(1:1-1:1), diff --git a/src/snapshots/type_function_effectful.md b/src/snapshots/type_function_effectful.md index 3e96142977..0ba795bfb7 100644 --- a/src/snapshots/type_function_effectful.md +++ b/src/snapshots/type_function_effectful.md @@ -40,6 +40,22 @@ runEffect! : (a => b), a => b ^^^^ +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + # TOKENS ~~~zig KwApp(1:1-1:4),OpenSquare(1:5-1:6),LowerIdent(1:6-1:11),CloseSquare(1:11-1:12),OpenCurly(1:13-1:14),LowerIdent(1:15-1:17),OpColon(1:17-1:18),KwPlatform(1:19-1:27),StringStart(1:28-1:29),StringPart(1:29-1:50),StringEnd(1:50-1:51),CloseCurly(1:52-1:53),Newline(1:1-1:1), diff --git a/src/snapshots/type_function_multi_arg.md b/src/snapshots/type_function_multi_arg.md index e99a8ed7b9..7467c85ab3 100644 --- a/src/snapshots/type_function_multi_arg.md +++ b/src/snapshots/type_function_multi_arg.md @@ -27,6 +27,14 @@ curry : (a, b -> c) -> (a -> b -> c) ^^^^ +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + # TOKENS ~~~zig KwApp(1:1-1:4),OpenSquare(1:5-1:6),LowerIdent(1:6-1:11),CloseSquare(1:11-1:12),OpenCurly(1:13-1:14),LowerIdent(1:15-1:17),OpColon(1:17-1:18),KwPlatform(1:19-1:27),StringStart(1:28-1:29),StringPart(1:29-1:50),StringEnd(1:50-1:51),CloseCurly(1:52-1:53),Newline(1:1-1:1), diff --git a/src/snapshots/type_function_simple.md b/src/snapshots/type_function_simple.md index 9e083e5519..75b8cbf29d 100644 --- a/src/snapshots/type_function_simple.md +++ b/src/snapshots/type_function_simple.md @@ -27,6 +27,14 @@ apply : (a -> b), a -> b ^^^ +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + # TOKENS ~~~zig KwApp(1:1-1:4),OpenSquare(1:5-1:6),LowerIdent(1:6-1:11),CloseSquare(1:11-1:12),OpenCurly(1:13-1:14),LowerIdent(1:15-1:17),OpColon(1:17-1:18),KwPlatform(1:19-1:27),StringStart(1:28-1:29),StringPart(1:29-1:50),StringEnd(1:50-1:51),CloseCurly(1:52-1:53),Newline(1:1-1:1), diff --git a/src/snapshots/type_higher_order_multiple_vars.md b/src/snapshots/type_higher_order_multiple_vars.md index b70e402d4c..dc34e4bbb8 100644 --- a/src/snapshots/type_higher_order_multiple_vars.md +++ b/src/snapshots/type_higher_order_multiple_vars.md @@ -14,7 +14,8 @@ main! = |_| {} ~~~ # EXPECTED UNEXPECTED TOKEN IN EXPRESSION - type_higher_order_multiple_vars.md:3:19:3:22 -expr_arrow_expects_ident - type_higher_order_multiple_vars.md:3:33:3:35 +PARSE ERROR - type_higher_order_multiple_vars.md:3:33:3:35 +UNEXPECTED TOKEN IN EXPRESSION - type_higher_order_multiple_vars.md:3:40:3:40 # PROBLEMS **UNEXPECTED TOKEN IN EXPRESSION** The token **, (** is not expected in an expression. @@ -52,6 +53,22 @@ compose : (b -> c), (a -> b) -> (a -> c) +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + # TOKENS ~~~zig KwApp(1:1-1:4),OpenSquare(1:5-1:6),LowerIdent(1:6-1:11),CloseSquare(1:11-1:12),OpenCurly(1:13-1:14),LowerIdent(1:15-1:17),OpColon(1:17-1:18),KwPlatform(1:19-1:27),StringStart(1:28-1:29),StringPart(1:29-1:50),StringEnd(1:50-1:51),CloseCurly(1:52-1:53),Newline(1:1-1:1), diff --git a/src/snapshots/type_multiple_aliases.md b/src/snapshots/type_multiple_aliases.md index 312c209210..ae3aba2ee0 100644 --- a/src/snapshots/type_multiple_aliases.md +++ b/src/snapshots/type_multiple_aliases.md @@ -24,7 +24,7 @@ main! = |_| { } ~~~ # EXPECTED -NIL +TYPE MISMATCH - type_multiple_aliases.md:16:16:16:20 # PROBLEMS **TYPE MISMATCH** This expression is used in an unexpected way: diff --git a/src/snapshots/type_redeclaration_same_scope.md b/src/snapshots/type_redeclaration_same_scope.md index 576d42b6fe..98610ed7dc 100644 --- a/src/snapshots/type_redeclaration_same_scope.md +++ b/src/snapshots/type_redeclaration_same_scope.md @@ -13,7 +13,24 @@ Maybe(a) : [Ok(a), Err] # EXPECTED TYPE REDECLARED - type_redeclaration_same_scope.md:4:1:4:24 # PROBLEMS -NIL +**TYPE REDECLARED** +The type ``Maybe`` is being redeclared. + +The redeclaration is here: +**type_redeclaration_same_scope.md:4:1:4:24:** +```roc +Maybe(a) : [Ok(a), Err] +``` +^^^^^^^^^^^^^^^^^^^^^^^ + +But ``Maybe`` was already declared here: +**type_redeclaration_same_scope.md:3:1:3:27:** +```roc +Maybe(a) : [Some(a), None] +``` +^^^^^^^^^^^^^^^^^^^^^^^^^^ + + # TOKENS ~~~zig KwModule(1:1-1:7),OpenSquare(1:8-1:9),UpperIdent(1:9-1:14),CloseSquare(1:14-1:15),Newline(1:1-1:1), diff --git a/src/snapshots/type_scope_integration.md b/src/snapshots/type_scope_integration.md index bd3f961716..ce7bf951d0 100644 --- a/src/snapshots/type_scope_integration.md +++ b/src/snapshots/type_scope_integration.md @@ -21,9 +21,37 @@ Baz : Foo ~~~ # EXPECTED TYPE REDECLARED - type_scope_integration.md:7:1:7:10 -UNDECLARED TYPE - type_scope_integration.md:10:7:10:25 +type_scope_integration.md:4:1:4:10: - type_scope_integration.md:10:7:10:25 # PROBLEMS -NIL +**TYPE REDECLARED** +The type ``Foo`` is being redeclared. + +The redeclaration is here: +**type_scope_integration.md:7:1:7:10:** +```roc +Foo : Str +``` +^^^^^^^^^ + +But ``Foo`` was already declared here: +**type_scope_integration.md:4:1:4:10:** +```roc +Foo : U64 +``` +^^^^^^^^^ + + +**UNDECLARED TYPE** +The type ``SomeUndeclaredType`` is not declared in this scope. + +This type is referenced here: +**type_scope_integration.md:10:7:10:25:** +```roc +Bar : SomeUndeclaredType +``` + ^^^^^^^^^^^^^^^^^^ + + # TOKENS ~~~zig KwModule(1:1-1:7),OpenSquare(1:8-1:9),UpperIdent(1:9-1:12),Comma(1:12-1:13),UpperIdent(1:14-1:17),CloseSquare(1:17-1:18),Newline(1:1-1:1), diff --git a/src/snapshots/type_shadowing_across_scopes.md b/src/snapshots/type_shadowing_across_scopes.md index 78ed8ddc64..8baa399a58 100644 --- a/src/snapshots/type_shadowing_across_scopes.md +++ b/src/snapshots/type_shadowing_across_scopes.md @@ -19,12 +19,12 @@ InnerModule : { } ~~~ # EXPECTED -expected_type_field_name - type_shadowing_across_scopes.md:11:5:11:13 -expected_ty_close_curly_or_comma - type_shadowing_across_scopes.md:11:24:11:32 +PARSE ERROR - type_shadowing_across_scopes.md:11:5:11:13 +PARSE ERROR - type_shadowing_across_scopes.md:11:24:11:32 +UNEXPECTED TOKEN IN EXPRESSION - type_shadowing_across_scopes.md:11:31:11:31 UNEXPECTED TOKEN IN EXPRESSION - type_shadowing_across_scopes.md:12:1:12:2 TYPE REDECLARED - type_shadowing_across_scopes.md:3:1:3:31 -MALFORMED TYPE - type_shadowing_across_scopes.md:11:24:11:32 -UNUSED VARIABLE - type_shadowing_across_scopes.md:6:16:6:20 +type_shadowing_across_scopes.md:1:1:1:1: - type_shadowing_across_scopes.md:6:16:6:20 # PROBLEMS **PARSE ERROR** A parsing error occurred: `expected_type_field_name` @@ -74,6 +74,47 @@ Here is the problematic code: ^ +**TYPE REDECLARED** +The type ``Result`` is being redeclared. + +The redeclaration is here: +**type_shadowing_across_scopes.md:3:1:3:31:** +```roc +Result(a, b) : [Ok(a), Err(b)] +``` +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +But ``Result`` was already declared here: +**type_shadowing_across_scopes.md:1:1:1:1:** +```roc +module [Result, processData] +``` + + + +**MALFORMED TYPE** +This type annotation is malformed or contains invalid syntax. + +**UNUSED VARIABLE** +Variable ``data`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_data` to suppress this warning. +The unused variable is declared here: +**type_shadowing_across_scopes.md:6:16:6:20:** +```roc +processData = |data| +``` + ^^^^ + + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + +**INVALID STATEMENT** +The statement **expression** is not allowed at the top level. +Only definitions, type annotations, and imports are allowed at the top level. + # TOKENS ~~~zig KwModule(1:1-1:7),OpenSquare(1:8-1:9),UpperIdent(1:9-1:15),Comma(1:15-1:16),LowerIdent(1:17-1:28),CloseSquare(1:28-1:29),Newline(1:1-1:1), diff --git a/src/snapshots/type_tag_union_basic.md b/src/snapshots/type_tag_union_basic.md index ad6753583e..bf5fe5d7f2 100644 --- a/src/snapshots/type_tag_union_basic.md +++ b/src/snapshots/type_tag_union_basic.md @@ -15,7 +15,18 @@ main! = |_| {} # EXPECTED UNUSED VARIABLE - type_tag_union_basic.md:4:12:4:17 # PROBLEMS -NIL +**UNUSED VARIABLE** +Variable ``maybe`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_maybe` to suppress this warning. +The unused variable is declared here: +**type_tag_union_basic.md:4:12:4:17:** +```roc +process = |maybe| "result" +``` + ^^^^^ + + # TOKENS ~~~zig KwApp(1:1-1:4),OpenSquare(1:5-1:6),LowerIdent(1:6-1:11),CloseSquare(1:11-1:12),OpenCurly(1:13-1:14),LowerIdent(1:15-1:17),OpColon(1:17-1:18),KwPlatform(1:19-1:27),StringStart(1:28-1:29),StringPart(1:29-1:50),StringEnd(1:50-1:51),CloseCurly(1:52-1:53),Newline(1:1-1:1), diff --git a/src/snapshots/type_tag_union_complex.md b/src/snapshots/type_tag_union_complex.md index a38fd90e00..1c78d63712 100644 --- a/src/snapshots/type_tag_union_complex.md +++ b/src/snapshots/type_tag_union_complex.md @@ -33,7 +33,24 @@ main! = |_| {} # EXPECTED TYPE REDECLARED - type_tag_union_complex.md:7:1:7:55 # PROBLEMS -NIL +**TYPE REDECLARED** +The type ``Result`` is being redeclared. + +The redeclaration is here: +**type_tag_union_complex.md:7:1:7:55:** +```roc +Result : [Success(Str), Error(Str), Warning(Str, I32)] +``` +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +But ``Result`` was already declared here: +**type_tag_union_complex.md:1:1:1:1:** +```roc +app [main!] { pf: platform "../basic-cli/main.roc" } +``` + + + # TOKENS ~~~zig KwApp(1:1-1:4),OpenSquare(1:5-1:6),LowerIdent(1:6-1:11),CloseSquare(1:11-1:12),OpenCurly(1:13-1:14),LowerIdent(1:15-1:17),OpColon(1:17-1:18),KwPlatform(1:19-1:27),StringStart(1:28-1:29),StringPart(1:29-1:50),StringEnd(1:50-1:51),CloseCurly(1:52-1:53),Newline(1:1-1:1), diff --git a/src/snapshots/type_undeclared_usage.md b/src/snapshots/type_undeclared_usage.md index c5cbe30741..ea99948e92 100644 --- a/src/snapshots/type_undeclared_usage.md +++ b/src/snapshots/type_undeclared_usage.md @@ -21,7 +21,40 @@ UNDECLARED TYPE - type_undeclared_usage.md:3:10:3:21 UNDECLARED TYPE - type_undeclared_usage.md:5:16:5:32 UNUSED VARIABLE - type_undeclared_usage.md:6:17:6:22 # PROBLEMS -NIL +**UNDECLARED TYPE** +The type ``UnknownType`` is not declared in this scope. + +This type is referenced here: +**type_undeclared_usage.md:3:10:3:21:** +```roc +MyType : UnknownType +``` + ^^^^^^^^^^^ + + +**UNDECLARED TYPE** +The type ``UndeclaredResult`` is not declared in this scope. + +This type is referenced here: +**type_undeclared_usage.md:5:16:5:32:** +```roc +processValue : UndeclaredResult -> Str +``` + ^^^^^^^^^^^^^^^^ + + +**UNUSED VARIABLE** +Variable ``value`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_value` to suppress this warning. +The unused variable is declared here: +**type_undeclared_usage.md:6:17:6:22:** +```roc +processValue = |value| { +``` + ^^^^^ + + # TOKENS ~~~zig KwModule(1:1-1:7),OpenSquare(1:8-1:9),UpperIdent(1:9-1:15),Comma(1:15-1:16),LowerIdent(1:17-1:29),CloseSquare(1:29-1:30),Newline(1:1-1:1), diff --git a/src/snapshots/type_var_multiple.md b/src/snapshots/type_var_multiple.md index 9412bef7d3..af6bcddf9e 100644 --- a/src/snapshots/type_var_multiple.md +++ b/src/snapshots/type_var_multiple.md @@ -18,10 +18,6 @@ main! = |_| {} ~~~ # EXPECTED UNEXPECTED TOKEN IN EXPRESSION - type_var_multiple.md:6:21:6:27 -UNDEFINED VARIABLE - type_var_multiple.md:6:6:6:11 -UNDEFINED VARIABLE - type_var_multiple.md:6:13:6:19 -UNDEFINED VARIABLE - type_var_multiple.md:7:6:7:12 -UNDEFINED VARIABLE - type_var_multiple.md:7:14:7:19 # PROBLEMS **UNEXPECTED TOKEN IN EXPRESSION** The token **= pair** is not expected in an expression. @@ -35,6 +31,22 @@ Here is the problematic code: ^^^^^^ +**UNDEFINED VARIABLE** +Nothing is named `first` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `second` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `second` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `first` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig KwApp(1:1-1:4),OpenSquare(1:5-1:6),LowerIdent(1:6-1:11),CloseSquare(1:11-1:12),OpenCurly(1:13-1:14),LowerIdent(1:15-1:17),OpColon(1:17-1:18),KwPlatform(1:19-1:27),StringStart(1:28-1:29),StringPart(1:29-1:54),StringEnd(1:54-1:55),CloseCurly(1:56-1:57),Newline(1:1-1:1), diff --git a/src/snapshots/type_var_namespace.md b/src/snapshots/type_var_namespace.md index df6f63e5d4..8c23a72a0d 100644 --- a/src/snapshots/type_var_namespace.md +++ b/src/snapshots/type_var_namespace.md @@ -24,8 +24,6 @@ main! = |_| {} ~~~ # EXPECTED UNEXPECTED TOKEN IN EXPRESSION - type_var_namespace.md:11:31:11:40 -UNDEFINED VARIABLE - type_var_namespace.md:11:14:11:24 -UNDEFINED VARIABLE - type_var_namespace.md:11:34:11:52 # PROBLEMS **UNEXPECTED TOKEN IN EXPRESSION** The token **|> Result** is not expected in an expression. @@ -39,6 +37,14 @@ Here is the problematic code: ^^^^^^^^^ +**UNDEFINED VARIABLE** +Nothing is named `first` in this scope. +Is there an `import` or `exposing` missing up-top? + +**UNDEFINED VARIABLE** +Nothing is named `withDefault` in this scope. +Is there an `import` or `exposing` missing up-top? + # TOKENS ~~~zig KwApp(1:1-1:4),OpenSquare(1:5-1:6),LowerIdent(1:6-1:11),CloseSquare(1:11-1:12),OpenCurly(1:13-1:14),LowerIdent(1:15-1:17),OpColon(1:17-1:18),KwPlatform(1:19-1:27),StringStart(1:28-1:29),StringPart(1:29-1:54),StringEnd(1:54-1:55),CloseCurly(1:56-1:57),Newline(1:1-1:1), diff --git a/src/snapshots/unicode_single_quotes.md b/src/snapshots/unicode_single_quotes.md index c35b143822..94d65161e4 100644 --- a/src/snapshots/unicode_single_quotes.md +++ b/src/snapshots/unicode_single_quotes.md @@ -18,13 +18,28 @@ type=expr ) ~~~ # EXPECTED -too_long_single_quote - unicode_single_quotes.md:6:5:6:16 -too_long_single_quote - unicode_single_quotes.md:7:5:7:15 -empty_single_quote - unicode_single_quotes.md:8:5:8:7 -too_long_single_quote - unicode_single_quotes.md:9:5:9:14 -too_long_single_quote - unicode_single_quotes.md:10:5:10:12 -# PROBLEMS NIL +# PROBLEMS +**INVALID SCALAR** +I am part way through parsing this scalar literal (character literal), but it contains more than one character. +A single-quoted literal must contain exactly one character, e.g. 'a'. + +**INVALID SCALAR** +I am part way through parsing this scalar literal (character literal), but it contains more than one character. +A single-quoted literal must contain exactly one character, e.g. 'a'. + +**INVALID SCALAR** +I am part way through parsing this scalar literal (character literal), but it is empty. +A single-quoted literal must contain exactly one character, e.g. 'a'. + +**INVALID SCALAR** +I am part way through parsing this scalar literal (character literal), but it contains more than one character. +A single-quoted literal must contain exactly one character, e.g. 'a'. + +**INVALID SCALAR** +I am part way through parsing this scalar literal (character literal), but it contains more than one character. +A single-quoted literal must contain exactly one character, e.g. 'a'. + # TOKENS ~~~zig OpenRound(1:1-1:2),Newline(1:1-1:1), diff --git a/src/snapshots/unused_vars_block.md b/src/snapshots/unused_vars_block.md index 5c6706d343..218c48c06f 100644 --- a/src/snapshots/unused_vars_block.md +++ b/src/snapshots/unused_vars_block.md @@ -29,7 +29,30 @@ main! = |_| { UNUSED VARIABLE - unused_vars_block.md:5:5:5:15 UNUSED VARIABLE - unused_vars_block.md:11:5:11:19 # PROBLEMS -NIL +**UNUSED VARIABLE** +Variable ``unused_var`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_unused_var` to suppress this warning. +The unused variable is declared here: +**unused_vars_block.md:5:5:5:15:** +```roc + unused_var = 42 +``` + ^^^^^^^^^^ + + +**UNUSED VARIABLE** +Variable ``another_unused`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_another_unused` to suppress this warning. +The unused variable is declared here: +**unused_vars_block.md:11:5:11:19:** +```roc + another_unused = "hello" +``` + ^^^^^^^^^^^^^^ + + # TOKENS ~~~zig KwApp(1:1-1:4),OpenSquare(1:5-1:6),LowerIdent(1:6-1:11),CloseSquare(1:11-1:12),OpenCurly(1:13-1:14),LowerIdent(1:15-1:17),OpColon(1:17-1:18),KwPlatform(1:19-1:27),StringStart(1:28-1:29),StringPart(1:29-1:50),StringEnd(1:50-1:51),CloseCurly(1:52-1:53),Newline(1:1-1:1), diff --git a/src/snapshots/unused_vars_simple.md b/src/snapshots/unused_vars_simple.md index 96fb5667a4..6e674f97fc 100644 --- a/src/snapshots/unused_vars_simple.md +++ b/src/snapshots/unused_vars_simple.md @@ -29,9 +29,32 @@ main! = |_| { ~~~ # EXPECTED UNUSED VARIABLE - unused_vars_simple.md:4:19:4:20 -used_underscore_variable - unused_vars_simple.md:7:28:7:34 +UNDERSCORE VARIABLE USED - unused_vars_simple.md:7:28:7:34 # PROBLEMS -NIL +**UNUSED VARIABLE** +Variable ``x`` is not used anywhere in your code. + +If you don't need this variable, prefix it with an underscore like `_x` to suppress this warning. +The unused variable is declared here: +**unused_vars_simple.md:4:19:4:20:** +```roc +unused_regular = |x| 42 +``` + ^ + + +**UNDERSCORE VARIABLE USED** +Variable ``_value`` is prefixed with an underscore but is actually used. + +Variables prefixed with `_` are intended to be unused. Remove the underscore prefix: `value`. +The underscore variable is declared here: +**unused_vars_simple.md:7:28:7:34:** +```roc +used_underscore = |_value| _value +``` + ^^^^^^ + + # TOKENS ~~~zig KwApp(1:1-1:4),OpenSquare(1:5-1:6),LowerIdent(1:6-1:11),CloseSquare(1:11-1:12),OpenCurly(1:13-1:14),LowerIdent(1:15-1:17),OpColon(1:17-1:18),KwPlatform(1:19-1:27),StringStart(1:28-1:29),StringPart(1:29-1:50),StringEnd(1:50-1:51),CloseCurly(1:52-1:53),Newline(1:1-1:1), diff --git a/src/update_expected.zig b/src/update_expected.zig new file mode 100644 index 0000000000..62859dcc78 --- /dev/null +++ b/src/update_expected.zig @@ -0,0 +1,331 @@ +const std = @import("std"); +const base = @import("base.zig"); + +const verbose_log = false; + +fn log(comptime fmt: []const u8, args: anytype) void { + if (verbose_log) { + std.debug.print("[update_expected] " ++ fmt ++ "\n", args); + } +} + +/// Represents a problem entry from PROBLEMS section +const ProblemEntry = struct { + problem_type: []const u8, + file: []const u8, + start_line: u32, + start_col: u32, + end_line: u32, + end_col: u32, + + fn format(self: ProblemEntry, writer: anytype) !void { + try writer.print("{s} - {s}:{d}:{d}:{d}:{d}", .{ + self.problem_type, + self.file, + self.start_line, + self.start_col, + self.end_line, + self.end_col, + }); + } +}; + +/// Extract section content between headers +fn extractSection(content: []const u8, section_name: []const u8) ?struct { content: []const u8, start: usize, end: usize } { + var header_buf: [256]u8 = undefined; + const header = std.fmt.bufPrint(&header_buf, "# {s}\n", .{section_name}) catch return null; + const start_idx = std.mem.indexOf(u8, content, header) orelse return null; + const content_start = start_idx + header.len; + + // Find the next section header + var next_section_idx = content.len; + var search_idx = content_start; + while (search_idx < content.len - 2) { + if (content[search_idx] == '\n' and + content[search_idx + 1] == '#' and + content[search_idx + 2] == ' ') + { + next_section_idx = search_idx + 1; + break; + } + search_idx += 1; + } + + return .{ + .content = std.mem.trim(u8, content[content_start..next_section_idx], " \t\r\n"), + .start = start_idx, + .end = next_section_idx, + }; +} + +/// Parse a PROBLEMS entry to extract problem type and location +fn parseProblemEntry(allocator: std.mem.Allocator, content: []const u8, start_idx: usize) !?struct { entry: ?ProblemEntry, next_idx: usize } { + var idx = start_idx; + + // Skip to next problem header + while (idx < content.len) { + if (idx + 2 <= content.len and std.mem.eql(u8, content[idx .. idx + 2], "**")) { + break; + } + idx += 1; + } + + if (idx >= content.len) return null; + + // Find the end of the problem type + const type_start = idx + 2; + const type_end_search = std.mem.indexOfPos(u8, content, type_start, "**"); + if (type_end_search == null) return null; + const type_end = type_end_search.?; + const problem_type = std.mem.trim(u8, content[type_start..type_end], " \t\r\n"); + + // Look for the location pattern **file:line:col:line:col:** + var search_idx = type_end + 2; + while (search_idx < content.len) { + if (search_idx + 2 <= content.len and std.mem.eql(u8, content[search_idx .. search_idx + 2], "**")) { + const loc_start = search_idx + 2; + const loc_end_search = std.mem.indexOfPos(u8, content, loc_start, ":**"); + if (loc_end_search) |loc_end| { + const location = content[loc_start..loc_end]; + + // Check if this looks like a location (has 4 colons) + var colon_count: usize = 0; + for (location) |c| { + if (c == ':') colon_count += 1; + } + + if (colon_count == 4) { + // This is a location, parse it + var parts = std.mem.tokenizeScalar(u8, location, ':'); + + const file = parts.next() orelse { + search_idx = loc_end + 3; + continue; + }; + const start_line_str = parts.next() orelse { + search_idx = loc_end + 3; + continue; + }; + const start_col_str = parts.next() orelse { + search_idx = loc_end + 3; + continue; + }; + const end_line_str = parts.next() orelse { + search_idx = loc_end + 3; + continue; + }; + const end_col_str = parts.next() orelse { + search_idx = loc_end + 3; + continue; + }; + + // Try to parse numbers + const start_line = std.fmt.parseInt(u32, start_line_str, 10) catch { + search_idx = loc_end + 3; + continue; + }; + const start_col = std.fmt.parseInt(u32, start_col_str, 10) catch { + search_idx = loc_end + 3; + continue; + }; + const end_line = std.fmt.parseInt(u32, end_line_str, 10) catch { + search_idx = loc_end + 3; + continue; + }; + const end_col = std.fmt.parseInt(u32, end_col_str, 10) catch { + search_idx = loc_end + 3; + continue; + }; + + const entry = ProblemEntry{ + .problem_type = try allocator.dupe(u8, problem_type), + .file = try allocator.dupe(u8, file), + .start_line = start_line, + .start_col = start_col, + .end_line = end_line, + .end_col = end_col, + }; + + return .{ .entry = entry, .next_idx = loc_end + 3 }; + } + } + } + search_idx += 1; + } + + // No location found for this problem type, move to end of content + return .{ .entry = null, .next_idx = content.len }; +} + +/// Parse all problems from PROBLEMS section +fn parseProblemsSection(allocator: std.mem.Allocator, content: []const u8) !std.ArrayList(ProblemEntry) { + var problems = std.ArrayList(ProblemEntry).init(allocator); + errdefer { + for (problems.items) |p| { + allocator.free(p.problem_type); + allocator.free(p.file); + } + problems.deinit(); + } + + if (std.mem.eql(u8, std.mem.trim(u8, content, " \t\r\n"), "NIL")) { + return problems; + } + + var idx: usize = 0; + while (idx < content.len) { + const result = try parseProblemEntry(allocator, content, idx); + if (result) |r| { + if (r.entry) |entry| { + try problems.append(entry); + } + idx = r.next_idx; + } else { + break; + } + } + + return problems; +} + +/// Generate EXPECTED content from problems +fn generateExpectedContent(allocator: std.mem.Allocator, problems: []const ProblemEntry) ![]const u8 { + if (problems.len == 0) { + return try allocator.dupe(u8, "NIL"); + } + + var buffer = std.ArrayList(u8).init(allocator); + errdefer buffer.deinit(); + + for (problems, 0..) |problem, i| { + if (i > 0) { + try buffer.append('\n'); + } + try problem.format(buffer.writer()); + } + + return buffer.toOwnedSlice(); +} + +/// Update a single snapshot file +fn updateSnapshotFile(allocator: std.mem.Allocator, path: []const u8) !bool { + const content = try std.fs.cwd().readFileAlloc(allocator, path, 1024 * 1024); + defer allocator.free(content); + + // Extract PROBLEMS section + const problems_info = extractSection(content, "PROBLEMS"); + if (problems_info == null) { + log("No PROBLEMS section found in {s}", .{path}); + return false; + } + + // Parse problems + var problems = try parseProblemsSection(allocator, problems_info.?.content); + defer { + for (problems.items) |p| { + allocator.free(p.problem_type); + allocator.free(p.file); + } + problems.deinit(); + } + + // Generate new EXPECTED content + const expected_content = try generateExpectedContent(allocator, problems.items); + defer allocator.free(expected_content); + + // Find or create EXPECTED section + const expected_info = extractSection(content, "EXPECTED"); + + var new_content = std.ArrayList(u8).init(allocator); + defer new_content.deinit(); + + if (expected_info) |info| { + // Replace existing EXPECTED section + try new_content.appendSlice(content[0..info.start]); + try new_content.appendSlice("# EXPECTED\n"); + try new_content.appendSlice(expected_content); + try new_content.append('\n'); + try new_content.appendSlice(content[info.end..]); + } else { + // Insert EXPECTED section after SOURCE section + const source_info = extractSection(content, "SOURCE"); + if (source_info == null) { + log("No SOURCE section found in {s}", .{path}); + return false; + } + + // Find the end of the SOURCE section (including closing ~~~) + var source_end = source_info.?.end; + // Back up to find the ~~~ line + var idx = source_info.?.start + "# SOURCE\n".len; + while (idx < content.len) { + if (idx + 3 < content.len and std.mem.eql(u8, content[idx .. idx + 3], "~~~")) { + // Find the end of this line + var line_end = idx + 3; + while (line_end < content.len and content[line_end] != '\n') { + line_end += 1; + } + if (line_end < content.len) { + line_end += 1; // Include the newline + } + source_end = line_end; + break; + } + idx += 1; + } + + try new_content.appendSlice(content[0..source_end]); + try new_content.appendSlice("# EXPECTED\n"); + try new_content.appendSlice(expected_content); + try new_content.append('\n'); + try new_content.appendSlice(content[source_end..]); + } + + // Write the updated content back + const file = try std.fs.cwd().createFile(path, .{}); + defer file.close(); + try file.writeAll(new_content.items); + + return true; +} + +fn processPath(allocator: std.mem.Allocator, path: []const u8) !u32 { + var count: u32 = 0; + + var dir = try std.fs.cwd().openDir(path, .{ .iterate = true }); + defer dir.close(); + + var walker = try dir.walk(allocator); + defer walker.deinit(); + + while (try walker.next()) |entry| { + if (entry.kind == .file and std.mem.endsWith(u8, entry.path, ".md")) { + const full_path = try std.fs.path.join(allocator, &.{ path, entry.path }); + defer allocator.free(full_path); + + if (try updateSnapshotFile(allocator, full_path)) { + count += 1; + std.debug.print("Updated: {s}\n", .{full_path}); + } + } + } + + return count; +} + +pub fn main() !void { + var gpa = std.heap.GeneralPurposeAllocator(.{}){}; + defer _ = gpa.deinit(); + const allocator = gpa.allocator(); + + const args = try std.process.argsAlloc(allocator); + defer std.process.argsFree(allocator, args); + + const path = if (args.len > 1) args[1] else "src/snapshots"; + + std.debug.print("Updating EXPECTED sections based on PROBLEMS in: {s}\n", .{path}); + + const count = try processPath(allocator, path); + + std.debug.print("\nUpdated {} snapshot files\n", .{count}); +}