Verify EXPECTED sections during zig build test

This commit is contained in:
Richard Feldman 2025-07-05 13:47:39 -04:00
parent 4a04c71011
commit 0aabd77d9b
No known key found for this signature in database
503 changed files with 7993 additions and 1644 deletions

View file

@ -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,

View file

@ -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, _
\\ <div class="expected">
);
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("&lt;"),
'>' => try output.html_writer.writeAll("&gt;"),
'&' => try output.html_writer.writeAll("&amp;"),
'"' => try output.html_writer.writeAll("&quot;"),
'\'' => try output.html_writer.writeAll("&#39;"),
else => try output.html_writer.writeByte(char),
}
}
} else {
try output.md_writer.writeAll("NIL\n");
try output.html_writer.writeAll(" <p>NIL</p>");
} else {
// For HTML, show the expected problems
try output.html_writer.writeAll(" <pre>");
// 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("</pre>");
}
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);

View file

@ -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 {

View file

@ -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),

View file

@ -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),

View file

@ -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),

View file

@ -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),

View file

@ -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),

View file

@ -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),

View file

@ -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),

View file

@ -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),

View file

@ -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),

View file

@ -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),

View file

@ -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),

View file

@ -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`

View file

@ -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),

View file

@ -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),

View file

@ -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),

View file

@ -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),

View file

@ -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),

View file

@ -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),

View file

@ -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),

View file

@ -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`

View file

@ -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),

View file

@ -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),

View file

@ -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),

View file

@ -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),

View file

@ -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),

View file

@ -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.

View file

@ -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),

View file

@ -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),

View file

@ -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),

View file

@ -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),

View file

@ -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),

View file

@ -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),

View file

@ -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),

View file

@ -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),

View file

@ -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),

View file

@ -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),

View file

@ -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),

View file

@ -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),

View file

@ -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),

View file

@ -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.

View file

@ -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.

View file

@ -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),

View file

@ -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),

View file

@ -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),

View file

@ -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),

View file

@ -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.

View file

@ -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),

View file

@ -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),

View file

@ -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),

View file

@ -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),

View file

@ -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),

View file

@ -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),

View file

@ -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),

View file

@ -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:**

View file

@ -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:**

View file

@ -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),

View file

@ -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),

View file

@ -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:**

View file

@ -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),

View file

@ -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:**

View file

@ -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:**

View file

@ -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),

View file

@ -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),

View file

@ -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),

View file

@ -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`

View file

@ -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),

View file

@ -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),

View file

@ -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:**

View file

@ -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),

View file

@ -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),

View file

@ -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),

View file

@ -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:**

View file

@ -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),

View file

@ -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),

View file

@ -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),

View file

@ -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),

View file

@ -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:**

View file

@ -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),

View file

@ -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),

View file

@ -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),

View file

@ -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),

View file

@ -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),

View file

@ -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),

View file

@ -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),

View file

@ -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),

View file

@ -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),

View file

@ -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),

View file

@ -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),

View file

@ -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),

View file

@ -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),

View file

@ -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),

View file

@ -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),

View file

@ -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),

View file

@ -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),

Some files were not shown because too many files have changed in this diff Show more