Merge pull request #8203 from roc-lang/fix-token-regions

Fix token regions
This commit is contained in:
Richard Feldman 2025-08-16 14:09:14 -04:00 committed by GitHub
commit 32bd62ed48
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
117 changed files with 364 additions and 791 deletions

View file

@ -473,8 +473,8 @@ pub fn diagnosticToReport(self: *Self, diagnostic: CIR.Diagnostic, allocator: st
.expr_not_canonicalized => |data| blk: {
const region_info = self.calcRegionInfo(data.region);
var report = Report.init(allocator, "UNKNOWN OPERATOR", .runtime_error);
try report.document.addReflowingText("This looks like an operator, but it's not one I recognize!");
var report = Report.init(allocator, "UNRECOGNIZED SYNTAX", .runtime_error);
try report.document.addReflowingText("I don't recognize this syntax.");
try report.document.addLineBreak();
try report.document.addLineBreak();
@ -488,13 +488,7 @@ pub fn diagnosticToReport(self: *Self, diagnostic: CIR.Diagnostic, allocator: st
);
try report.document.addLineBreak();
try report.document.addReflowingText("Check the spelling and make sure you're using a valid Roc operator like ");
try report.document.addBinaryOperator("+");
try report.document.addReflowingText(", ");
try report.document.addBinaryOperator("-");
try report.document.addReflowingText(", ");
try report.document.addBinaryOperator("==");
try report.document.addReflowingText(".");
try report.document.addReflowingText("This might be a syntax error, an unsupported language feature, or a typo.");
break :blk report;
},

View file

@ -117,7 +117,6 @@ pub fn deinit(self: *AST, gpa: std.mem.Allocator) void {
/// Convert a tokenize diagnostic to a Report for rendering
pub fn tokenizeDiagnosticToReport(self: *AST, diagnostic: tokenize.Diagnostic, allocator: std.mem.Allocator) !reporting.Report {
_ = self; // TODO: Use self for source information
const title = switch (diagnostic.tag) {
.MisplacedCarriageReturn => "MISPLACED CARRIAGE RETURN",
.AsciiControl => "ASCII CONTROL CHARACTER",
@ -144,6 +143,37 @@ pub fn tokenizeDiagnosticToReport(self: *AST, diagnostic: tokenize.Diagnostic, a
var report = reporting.Report.init(allocator, title, .runtime_error);
try report.document.addText(body);
// Add the region information from the diagnostic if valid
if (diagnostic.region.start.offset < diagnostic.region.end.offset and
diagnostic.region.end.offset <= self.env.source.len)
{
var env = self.env.*;
if (env.line_starts.items.items.len == 0) {
try env.calcLineStarts(allocator);
}
// Convert region to RegionInfo
const region_info = base.RegionInfo.position(
self.env.source,
env.line_starts.items.items,
diagnostic.region.start.offset,
diagnostic.region.end.offset,
) catch {
// If we can't calculate region info, just return the report without source context
return report;
};
// Add source region to the report
try report.document.addSourceRegion(
region_info,
.error_highlight,
null, // No filename available for tokenize diagnostics
self.env.source,
env.line_starts.items.items,
);
}
return report;
}
@ -219,6 +249,7 @@ pub fn parseDiagnosticToReport(self: *AST, env: *const CommonEnv, diagnostic: Di
.where_expected_module => "WHERE CLAUSE ERROR",
.where_expected_colon => "WHERE CLAUSE ERROR",
.where_expected_constraints => "WHERE CLAUSE ERROR",
.no_else => "IF WITHOUT ELSE",
else => "PARSE ERROR",
};
@ -499,6 +530,22 @@ pub fn parseDiagnosticToReport(self: *AST, env: *const CommonEnv, diagnostic: Di
try report.document.addAnnotated("takes", .emphasized);
try report.document.addText(" another function)");
},
.no_else => {
try report.document.addText("This ");
try report.document.addKeyword("if");
try report.document.addText(" is being used as an expression, but it doesn't have an ");
try report.document.addKeyword("else");
try report.document.addText(".");
try report.document.addLineBreak();
try report.document.addLineBreak();
try report.document.addReflowingText("When ");
try report.document.addKeyword("if");
try report.document.addReflowingText(" is used as an expression (to evaluate to a value), it must have an ");
try report.document.addKeyword("else");
try report.document.addReflowingText(" branch to specify what value to use when the condition is ");
try report.document.addKeyword("False");
try report.document.addReflowingText(".");
},
else => {
const tag_name = @tagName(diagnostic.tag);
const owned_tag = try report.addOwnedString(tag_name);
@ -518,8 +565,6 @@ pub fn parseDiagnosticToReport(self: *AST, env: *const CommonEnv, diagnostic: Di
try report.document.addLineBreak();
try report.document.addLineBreak();
try report.document.addText("Here is the problematic code:");
try report.document.addLineBreak();
// Use the proper addSourceContext method with owned filename
const owned_filename = try report.addOwnedString(filename);

View file

@ -1168,13 +1168,14 @@ fn parseStmtByType(self: *Parser, statementType: StatementType) Error!?AST.State
// continue to parse final expression
}
},
// Expect to parse a Type Annotation, e.g. `Foo a : (a,a)`
// Type Annotation (e.g. `Foo a : (a,a)`)
.UpperIdent => {
const start = self.pos;
if (statementType == .top_level) {
const header = try self.parseTypeHeader();
if (self.peek() != .OpColon and self.peek() != .OpColonEqual) {
return try self.pushMalformed(AST.Statement.Idx, .expected_colon_after_type_annotation, start);
// Point to the unexpected token (e.g., "U8" in "List U8")
return try self.pushMalformed(AST.Statement.Idx, .expected_colon_after_type_annotation, self.pos);
}
const kind: AST.TypeDeclKind = if (self.peek() == .OpColonEqual) .nominal else .alias;
self.advance();
@ -2033,7 +2034,8 @@ pub fn parseExprWithBp(self: *Parser, min_bp: u8) Error!AST.Expr.Idx {
const condition = try self.parseExpr();
const then = try self.parseExpr();
if (self.peek() != .KwElse) {
return try self.pushMalformed(AST.Expr.Idx, .no_else, self.pos);
// Point to the if keyword for missing else error
return try self.pushMalformed(AST.Expr.Idx, .no_else, start);
}
self.advance();
const else_idx = try self.parseExpr();
@ -2336,11 +2338,9 @@ pub fn parseStringExpr(self: *Parser) Error!AST.Expr.Idx {
self.advance(); // Advance past the CloseString Interpolation
},
.MalformedStringPart => {
// Don't create a parser diagnostic - the tokenizer already created
// a more precise diagnostic with the exact error location
self.advance();
try self.pushDiagnostic(.string_unexpected_token, .{
.start = self.pos,
.end = self.pos,
});
},
else => {
// Something is broken in the tokenizer if we get here!

View file

@ -851,6 +851,13 @@ pub const Cursor = struct {
}
pub fn chompEscapeSequence(self: *Cursor) !void {
return self.chompEscapeSequenceWithQuote(null);
}
pub fn chompEscapeSequenceWithQuote(self: *Cursor, quote_char: ?u8) !void {
// Store the start position of the escape sequence (before the backslash)
const escape_start = if (self.pos > 0) self.pos - 1 else self.pos;
switch (self.peek() orelse 0) {
'\\', '"', '\'', 'n', 'r', 't', '$' => {
self.pos += 1;
@ -861,7 +868,7 @@ pub const Cursor = struct {
if (self.peek() == '(') {
self.pos += 1;
} else {
self.pushMessageHere(.InvalidUnicodeEscapeSequence);
self.pushMessage(.InvalidUnicodeEscapeSequence, escape_start, self.pos);
return error.InvalidUnicodeEscapeSequence;
}
@ -870,7 +877,7 @@ pub const Cursor = struct {
if (self.peek() == ')') {
if (self.pos == hex_start) {
// Empty unicode escape sequence
self.pushMessageHere(.InvalidUnicodeEscapeSequence);
self.pushMessage(.InvalidUnicodeEscapeSequence, escape_start, self.pos + 1);
self.pos += 1;
return error.InvalidUnicodeEscapeSequence;
}
@ -884,17 +891,37 @@ pub const Cursor = struct {
{
self.pos += 1;
} else {
self.pushMessageHere(.InvalidUnicodeEscapeSequence);
// Invalid hex character - advance to the closing paren if possible
// to include the full escape sequence in the error region, but stop
// if we encounter the closing quote or newline
while (self.pos < self.buf.len) {
const next_char = self.peek() orelse 0;
if (next_char == ')' or next_char == '\n') {
break;
}
if (quote_char) |qc| {
if (next_char == qc) {
break;
}
}
self.pos += 1;
}
if (self.pos < self.buf.len and self.peek() == ')') {
self.pos += 1;
}
self.pushMessage(.InvalidUnicodeEscapeSequence, escape_start, self.pos);
return error.InvalidUnicodeEscapeSequence;
}
} else {
self.pushMessageHere(.InvalidUnicodeEscapeSequence);
self.pushMessage(.InvalidUnicodeEscapeSequence, escape_start, self.pos);
return error.InvalidUnicodeEscapeSequence;
}
}
},
else => {
self.pushMessageHere(.InvalidEscapeSequence);
// Include the character after the backslash in the error region
const end_pos = if (self.peek() != null) self.pos + 1 else self.pos;
self.pushMessage(.InvalidEscapeSequence, escape_start, end_pos);
return error.InvalidEscapeSequence;
},
}
@ -929,7 +956,7 @@ pub const Cursor = struct {
},
'\\' => {
state = .Enough;
self.chompEscapeSequence() catch {
self.chompEscapeSequenceWithQuote('\'') catch {
state = .Invalid;
};
},
@ -1370,7 +1397,9 @@ pub const Tokenizer = struct {
self.cursor.pos += 1;
if (self.string_interpolation_stack.pop()) |last| {
try self.pushTokenNormalHere(gpa, .CloseStringInterpolation, start);
try self.tokenizeStringLikeLiteralBody(gpa, last);
// For string interpolations, we don't have the original opening quote position
// so we use the current position as a fallback
try self.tokenizeStringLikeLiteralBody(gpa, last, self.cursor.pos);
} else {
try self.pushTokenNormalHere(gpa, .CloseCurly, start);
}
@ -1502,14 +1531,14 @@ pub const Tokenizer = struct {
} else {
try self.pushTokenNormalHere(gpa, .StringStart, start);
}
try self.tokenizeStringLikeLiteralBody(gpa, kind);
try self.tokenizeStringLikeLiteralBody(gpa, kind, start);
}
// Moving curly chars to constants because some editors hate them inline.
const open_curly = '{';
const close_curly = '}';
pub fn tokenizeStringLikeLiteralBody(self: *Tokenizer, gpa: std.mem.Allocator, kind: StringKind) std.mem.Allocator.Error!void {
pub fn tokenizeStringLikeLiteralBody(self: *Tokenizer, gpa: std.mem.Allocator, kind: StringKind, opening_quote_pos: usize) std.mem.Allocator.Error!void {
const start = self.cursor.pos;
var string_part_tag: Token.Tag = .StringPart;
while (self.cursor.pos < self.cursor.buf.len) {
@ -1524,7 +1553,8 @@ pub const Tokenizer = struct {
} else if (c == '\n') {
try self.pushTokenNormalHere(gpa, string_part_tag, start);
if (kind == .single_line) {
self.cursor.pushMessage(.UnclosedString, @intCast(start), @intCast(self.cursor.pos));
// Include the opening quote in the error region
self.cursor.pushMessage(.UnclosedString, @intCast(opening_quote_pos), @intCast(self.cursor.pos));
try self.pushTokenNormalHere(gpa, .StringEnd, self.cursor.pos);
}
return;
@ -1546,14 +1576,15 @@ pub const Tokenizer = struct {
const escape = c == '\\';
if (escape) {
self.cursor.chompEscapeSequence() catch {
self.cursor.chompEscapeSequenceWithQuote('"') catch {
string_part_tag = .MalformedStringPart;
};
}
}
}
if (kind == .single_line) {
self.cursor.pushMessage(.UnclosedString, start, self.cursor.pos);
// Include the opening quote in the error region
self.cursor.pushMessage(.UnclosedString, @intCast(opening_quote_pos), @intCast(self.cursor.pos));
}
try self.pushTokenNormalHere(gpa, string_part_tag, start);
}

View file

@ -64,7 +64,6 @@ UNDEFINED VARIABLE - can_import_nested_modules.md:26:24:26:41
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**can_import_nested_modules.md:3:19:3:26:**
```roc
import json.Parser.Config
@ -76,7 +75,6 @@ import json.Parser.Config
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**can_import_nested_modules.md:4:19:4:24:**
```roc
import http.Client.Auth as HttpAuth
@ -88,7 +86,6 @@ import http.Client.Auth as HttpAuth
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**can_import_nested_modules.md:4:25:4:27:**
```roc
import http.Client.Auth as HttpAuth
@ -112,7 +109,6 @@ Other valid examples:
`Result(a, Str)`
`Maybe(List(U64))`
Here is the problematic code:
**can_import_nested_modules.md:5:1:5:7:**
```roc
import utils.String.Format exposing [padLeft]
@ -124,7 +120,6 @@ import utils.String.Format exposing [padLeft]
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**can_import_nested_modules.md:5:8:5:13:**
```roc
import utils.String.Format exposing [padLeft]
@ -136,7 +131,6 @@ import utils.String.Format exposing [padLeft]
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**can_import_nested_modules.md:5:13:5:20:**
```roc
import utils.String.Format exposing [padLeft]
@ -148,7 +142,6 @@ import utils.String.Format exposing [padLeft]
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**can_import_nested_modules.md:5:20:5:27:**
```roc
import utils.String.Format exposing [padLeft]
@ -160,7 +153,6 @@ import utils.String.Format exposing [padLeft]
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**can_import_nested_modules.md:5:28:5:36:**
```roc
import utils.String.Format exposing [padLeft]
@ -172,7 +164,6 @@ import utils.String.Format exposing [padLeft]
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**can_import_nested_modules.md:5:37:5:38:**
```roc
import utils.String.Format exposing [padLeft]
@ -184,7 +175,6 @@ import utils.String.Format exposing [padLeft]
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**can_import_nested_modules.md:5:38:5:45:**
```roc
import utils.String.Format exposing [padLeft]
@ -196,7 +186,6 @@ import utils.String.Format exposing [padLeft]
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**can_import_nested_modules.md:5:45:5:46:**
```roc
import utils.String.Format exposing [padLeft]
@ -428,7 +417,7 @@ LowerIdent(26:1-26:13),OpAssign(26:14-26:15),OpBar(26:16-26:17),LowerIdent(26:17
(s-import @4.1-4.19 (raw "http.Client"))
(s-malformed @4.19-4.24 (tag "statement_unexpected_token"))
(s-malformed @4.25-4.27 (tag "statement_unexpected_token"))
(s-malformed @4.28-5.7 (tag "expected_colon_after_type_annotation"))
(s-malformed @5.1-5.7 (tag "expected_colon_after_type_annotation"))
(s-malformed @5.8-5.13 (tag "statement_unexpected_token"))
(s-malformed @5.13-5.20 (tag "statement_unexpected_token"))
(s-malformed @5.20-5.27 (tag "statement_unexpected_token"))
@ -519,6 +508,7 @@ import json.Parser
import http.Client
# Test multi-level type qualification
parseConfig : Config.Settings -> Str
parseConfig = |settings| Config.toString(settings)

View file

@ -17,7 +17,6 @@ PARSE ERROR - can_var_scoping_invalid_top_level.md:4:1:4:4
A parsing error occurred: `var_only_allowed_in_a_body`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**can_var_scoping_invalid_top_level.md:4:1:4:4:**
```roc
var topLevelVar_ = 0

View file

@ -14,7 +14,6 @@ PARSE ERROR - float_invalid.md:1:5:1:8
A parsing error occurred: `expr_no_space_dot_int`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**float_invalid.md:1:5:1:8:**
```roc
3.14.15

View file

@ -14,7 +14,6 @@ UNEXPECTED TOKEN IN EXPRESSION - minus_not_h.md:1:1:1:2
The token **-** is not expected in an expression.
Expressions can be identifiers, literals, function calls, or operators.
Here is the problematic code:
**minus_not_h.md:1:1:1:2:**
```roc
-!h

View file

@ -14,7 +14,6 @@ PARSE ERROR - module_dot_tuple.md:1:2:1:4
A parsing error occurred: `expr_no_space_dot_int`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**module_dot_tuple.md:1:2:1:4:**
```roc
I.5

View file

@ -14,7 +14,6 @@ UNEXPECTED TOKEN IN EXPRESSION - negative_single_quote.md:1:1:1:2
The token **-** is not expected in an expression.
Expressions can be identifiers, literals, function calls, or operators.
Here is the problematic code:
**negative_single_quote.md:1:1:1:2:**
```roc
-'i'

View file

@ -24,7 +24,6 @@ MALFORMED TYPE - record_builder.md:3:8:3:9
The token **<-** is not expected in an expression.
Expressions can be identifiers, literals, function calls, or operators.
Here is the problematic code:
**record_builder.md:1:15:1:17:**
```roc
{ Foo.Bar.baz <-
@ -36,7 +35,6 @@ Here is the problematic code:
The token **5** is not expected in a type annotation.
Type annotations should contain types like _Str_, _Num a_, or _List U64_.
Here is the problematic code:
**record_builder.md:2:8:2:9:**
```roc
x: 5,
@ -48,7 +46,6 @@ Here is the problematic code:
The token **,** is not expected in an expression.
Expressions can be identifiers, literals, function calls, or operators.
Here is the problematic code:
**record_builder.md:2:9:2:10:**
```roc
x: 5,
@ -60,7 +57,6 @@ Here is the problematic code:
The token **0** is not expected in a type annotation.
Type annotations should contain types like _Str_, _Num a_, or _List U64_.
Here is the problematic code:
**record_builder.md:3:8:3:9:**
```roc
y: 0,
@ -72,7 +68,6 @@ Here is the problematic code:
The token **,** is not expected in an expression.
Expressions can be identifiers, literals, function calls, or operators.
Here is the problematic code:
**record_builder.md:3:9:3:10:**
```roc
y: 0,

View file

@ -17,7 +17,6 @@ MALFORMED TYPE - record_field_update_error.md:1:17:1:19
The token **&** is not expected in an expression.
Expressions can be identifiers, literals, function calls, or operators.
Here is the problematic code:
**record_field_update_error.md:1:10:1:11:**
```roc
{ person & age: 31 }
@ -29,7 +28,6 @@ Here is the problematic code:
The token **31** is not expected in a type annotation.
Type annotations should contain types like _Str_, _Num a_, or _List U64_.
Here is the problematic code:
**record_field_update_error.md:1:17:1:19:**
```roc
{ person & age: 31 }

View file

@ -15,7 +15,6 @@ UNDEFINED VARIABLE - suffixed_question.md:1:1:1:12
The token **?** is not expected in an expression.
Expressions can be identifiers, literals, function calls, or operators.
Here is the problematic code:
**suffixed_question.md:1:14:1:15:**
```roc
Stdout.line???

View file

@ -9,21 +9,12 @@ type=expr
~~~
# EXPECTED
INVALID UNICODE ESCAPE SEQUENCE - :0:0:0:0
UNEXPECTED TOKEN IN STRING - unicode_not_hex.md:1:16:1:16
# PROBLEMS
**INVALID UNICODE ESCAPE SEQUENCE**
This Unicode escape sequence is not valid.
**UNEXPECTED TOKEN IN STRING**
The token **<unknown>** is not expected in a string literal.
String literals should be enclosed in double quotes.
Here is the problematic code:
**unicode_not_hex.md:1:16:1:16:**
```roc
This Unicode escape sequence is not valid.```roc
"abc\u(zzzz)def"
```
^
^^^^^^^^
# TOKENS

View file

@ -14,7 +14,6 @@ UNEXPECTED TOKEN IN EXPRESSION - unknown_operator.md:1:4:1:5
The token **+** is not expected in an expression.
Expressions can be identifiers, literals, function calls, or operators.
Here is the problematic code:
**unknown_operator.md:1:4:1:5:**
```roc
1 ++ 2

View file

@ -9,21 +9,12 @@ type=expr
~~~
# EXPECTED
INVALID ESCAPE SEQUENCE - :0:0:0:0
UNEXPECTED TOKEN IN STRING - weird_escape.md:1:10:1:10
# PROBLEMS
**INVALID ESCAPE SEQUENCE**
This escape sequence is not recognized.
**UNEXPECTED TOKEN IN STRING**
The token **<unknown>** is not expected in a string literal.
String literals should be enclosed in double quotes.
Here is the problematic code:
**weird_escape.md:1:10:1:10:**
```roc
This escape sequence is not recognized.```roc
"abc\qdef"
```
^
^^
# TOKENS

View file

@ -10,31 +10,31 @@ module []
foo = if tru 0
~~~
# EXPECTED
PARSE ERROR - expr_if_missing_else.md:3:15:3:15
UNKNOWN OPERATOR - expr_if_missing_else.md:3:15:3:15
IF WITHOUT ELSE - expr_if_missing_else.md:3:7:3:9
UNRECOGNIZED SYNTAX - expr_if_missing_else.md:3:7:3:15
# PROBLEMS
**PARSE ERROR**
A parsing error occurred: `no_else`
This is an unexpected parsing error. Please check your syntax.
**IF WITHOUT ELSE**
This `if` is being used as an expression, but it doesn't have an `else`.
Here is the problematic code:
**expr_if_missing_else.md:3:15:3:15:**
When `if` is used as an expression (to evaluate to a value), it must have an `else` branch to specify what value to use when the condition is `False`.
**expr_if_missing_else.md:3:7:3:9:**
```roc
foo = if tru 0
```
^
^^
**UNKNOWN OPERATOR**
This looks like an operator, but it's not one I recognize!
**UNRECOGNIZED SYNTAX**
I don't recognize this syntax.
**expr_if_missing_else.md:3:15:3:15:**
**expr_if_missing_else.md:3:7:3:15:**
```roc
foo = if tru 0
```
^
^^^^^^^^
Check the spelling and make sure you're using a valid Roc operator like `+`, `-`, `==`.
This might be a syntax error, an unsupported language feature, or a typo.
# TOKENS
~~~zig
@ -49,7 +49,7 @@ LowerIdent(3:1-3:4),OpAssign(3:5-3:6),KwIf(3:7-3:9),LowerIdent(3:10-3:13),Int(3:
(statements
(s-decl @3.1-3.15
(p-ident @3.1-3.4 (raw "foo"))
(e-malformed @3.15-3.15 (reason "no_else")))))
(e-malformed @3.7-3.15 (reason "no_else")))))
~~~
# FORMATTED
~~~roc
@ -70,5 +70,5 @@ foo =
(defs
(patt @3.1-3.4 (type "Error")))
(expressions
(expr @3.15-3.15 (type "Error"))))
(expr @3.7-3.15 (type "Error"))))
~~~

View file

@ -11,13 +11,12 @@ foo = asd.0
~~~
# EXPECTED
PARSE ERROR - expr_no_space_dot_int.md:3:10:3:12
UNKNOWN OPERATOR - expr_no_space_dot_int.md:3:10:3:12
UNRECOGNIZED SYNTAX - expr_no_space_dot_int.md:3:10:3:12
# PROBLEMS
**PARSE ERROR**
A parsing error occurred: `expr_no_space_dot_int`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**expr_no_space_dot_int.md:3:10:3:12:**
```roc
foo = asd.0
@ -25,8 +24,8 @@ foo = asd.0
^^
**UNKNOWN OPERATOR**
This looks like an operator, but it's not one I recognize!
**UNRECOGNIZED SYNTAX**
I don't recognize this syntax.
**expr_no_space_dot_int.md:3:10:3:12:**
```roc
@ -34,7 +33,7 @@ foo = asd.0
```
^^
Check the spelling and make sure you're using a valid Roc operator like `+`, `-`, `==`.
This might be a syntax error, an unsupported language feature, or a typo.
# TOKENS
~~~zig

View file

@ -14,10 +14,10 @@ Pair2(_, y) = Pair(0, 1)
Pair3(_, _) = Pair(0, 1)
~~~
# EXPECTED
PARSE ERROR - underscore_type_decl.md:5:1:5:6
PARSE ERROR - underscore_type_decl.md:5:13:5:14
PARSE ERROR - underscore_type_decl.md:5:20:5:21
PARSE ERROR - underscore_type_decl.md:5:23:5:24
PARSE ERROR - underscore_type_decl.md:5:15:5:19
PARSE ERROR - underscore_type_decl.md:6:1:6:6
PARSE ERROR - underscore_type_decl.md:6:6:6:7
PARSE ERROR - underscore_type_decl.md:6:7:6:8
PARSE ERROR - underscore_type_decl.md:6:8:6:9
@ -26,7 +26,7 @@ PARSE ERROR - underscore_type_decl.md:6:11:6:12
PARSE ERROR - underscore_type_decl.md:6:13:6:14
PARSE ERROR - underscore_type_decl.md:6:20:6:21
PARSE ERROR - underscore_type_decl.md:6:23:6:24
PARSE ERROR - underscore_type_decl.md:6:15:6:19
PARSE ERROR - underscore_type_decl.md:7:1:7:6
PARSE ERROR - underscore_type_decl.md:7:6:7:7
PARSE ERROR - underscore_type_decl.md:7:7:7:8
PARSE ERROR - underscore_type_decl.md:7:8:7:9
@ -35,7 +35,7 @@ PARSE ERROR - underscore_type_decl.md:7:11:7:12
PARSE ERROR - underscore_type_decl.md:7:13:7:14
PARSE ERROR - underscore_type_decl.md:7:20:7:21
PARSE ERROR - underscore_type_decl.md:7:23:7:24
PARSE ERROR - underscore_type_decl.md:7:15:7:19
PARSE ERROR - underscore_type_decl.md:7:25:7:25
MODULE NOT FOUND - underscore_type_decl.md:3:1:3:30
# PROBLEMS
**PARSE ERROR**
@ -54,19 +54,17 @@ Other valid examples:
`Result(a, Str)`
`Maybe(List(U64))`
Here is the problematic code:
**underscore_type_decl.md:5:1:5:6:**
**underscore_type_decl.md:5:13:5:14:**
```roc
Pair1(x, _) = Pair(0, 1)
```
^^^^^
^
**PARSE ERROR**
A parsing error occurred: `invalid_type_arg`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**underscore_type_decl.md:5:20:5:21:**
```roc
Pair1(x, _) = Pair(0, 1)
@ -78,7 +76,6 @@ Pair1(x, _) = Pair(0, 1)
A parsing error occurred: `invalid_type_arg`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**underscore_type_decl.md:5:23:5:24:**
```roc
Pair1(x, _) = Pair(0, 1)
@ -102,19 +99,17 @@ Other valid examples:
`Result(a, Str)`
`Maybe(List(U64))`
Here is the problematic code:
**underscore_type_decl.md:5:15:5:19:**
**underscore_type_decl.md:6:1:6:6:**
```roc
Pair1(x, _) = Pair(0, 1)
Pair2(_, y) = Pair(0, 1)
```
^^^^
^^^^^
**PARSE ERROR**
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**underscore_type_decl.md:6:6:6:7:**
```roc
Pair2(_, y) = Pair(0, 1)
@ -126,7 +121,6 @@ Pair2(_, y) = Pair(0, 1)
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**underscore_type_decl.md:6:7:6:8:**
```roc
Pair2(_, y) = Pair(0, 1)
@ -138,7 +132,6 @@ Pair2(_, y) = Pair(0, 1)
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**underscore_type_decl.md:6:8:6:9:**
```roc
Pair2(_, y) = Pair(0, 1)
@ -150,7 +143,6 @@ Pair2(_, y) = Pair(0, 1)
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**underscore_type_decl.md:6:10:6:11:**
```roc
Pair2(_, y) = Pair(0, 1)
@ -162,7 +154,6 @@ Pair2(_, y) = Pair(0, 1)
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**underscore_type_decl.md:6:11:6:12:**
```roc
Pair2(_, y) = Pair(0, 1)
@ -174,7 +165,6 @@ Pair2(_, y) = Pair(0, 1)
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**underscore_type_decl.md:6:13:6:14:**
```roc
Pair2(_, y) = Pair(0, 1)
@ -186,7 +176,6 @@ Pair2(_, y) = Pair(0, 1)
A parsing error occurred: `invalid_type_arg`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**underscore_type_decl.md:6:20:6:21:**
```roc
Pair2(_, y) = Pair(0, 1)
@ -198,7 +187,6 @@ Pair2(_, y) = Pair(0, 1)
A parsing error occurred: `invalid_type_arg`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**underscore_type_decl.md:6:23:6:24:**
```roc
Pair2(_, y) = Pair(0, 1)
@ -222,19 +210,17 @@ Other valid examples:
`Result(a, Str)`
`Maybe(List(U64))`
Here is the problematic code:
**underscore_type_decl.md:6:15:6:19:**
**underscore_type_decl.md:7:1:7:6:**
```roc
Pair2(_, y) = Pair(0, 1)
Pair3(_, _) = Pair(0, 1)
```
^^^^
^^^^^
**PARSE ERROR**
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**underscore_type_decl.md:7:6:7:7:**
```roc
Pair3(_, _) = Pair(0, 1)
@ -246,7 +232,6 @@ Pair3(_, _) = Pair(0, 1)
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**underscore_type_decl.md:7:7:7:8:**
```roc
Pair3(_, _) = Pair(0, 1)
@ -258,7 +243,6 @@ Pair3(_, _) = Pair(0, 1)
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**underscore_type_decl.md:7:8:7:9:**
```roc
Pair3(_, _) = Pair(0, 1)
@ -270,7 +254,6 @@ Pair3(_, _) = Pair(0, 1)
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**underscore_type_decl.md:7:10:7:11:**
```roc
Pair3(_, _) = Pair(0, 1)
@ -282,7 +265,6 @@ Pair3(_, _) = Pair(0, 1)
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**underscore_type_decl.md:7:11:7:12:**
```roc
Pair3(_, _) = Pair(0, 1)
@ -294,7 +276,6 @@ Pair3(_, _) = Pair(0, 1)
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**underscore_type_decl.md:7:13:7:14:**
```roc
Pair3(_, _) = Pair(0, 1)
@ -306,7 +287,6 @@ Pair3(_, _) = Pair(0, 1)
A parsing error occurred: `invalid_type_arg`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**underscore_type_decl.md:7:20:7:21:**
```roc
Pair3(_, _) = Pair(0, 1)
@ -318,7 +298,6 @@ Pair3(_, _) = Pair(0, 1)
A parsing error occurred: `invalid_type_arg`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**underscore_type_decl.md:7:23:7:24:**
```roc
Pair3(_, _) = Pair(0, 1)
@ -342,12 +321,11 @@ Other valid examples:
`Result(a, Str)`
`Maybe(List(U64))`
Here is the problematic code:
**underscore_type_decl.md:7:15:7:19:**
**underscore_type_decl.md:7:25:7:25:**
```roc
Pair3(_, _) = Pair(0, 1)
```
^^^^
^
**MODULE NOT FOUND**
@ -378,22 +356,22 @@ UpperIdent(7:1-7:6),NoSpaceOpenRound(7:6-7:7),Underscore(7:7-7:8),Comma(7:8-7:9)
(s-import @3.1-3.30 (raw "Module")
(exposing
(exposed-upper-ident @3.25-3.29 (text "Pair"))))
(s-malformed @5.1-5.14 (tag "expected_colon_after_type_annotation"))
(s-malformed @5.15-6.6 (tag "expected_colon_after_type_annotation"))
(s-malformed @5.13-5.14 (tag "expected_colon_after_type_annotation"))
(s-malformed @6.1-6.6 (tag "expected_colon_after_type_annotation"))
(s-malformed @6.6-6.7 (tag "statement_unexpected_token"))
(s-malformed @6.7-6.8 (tag "statement_unexpected_token"))
(s-malformed @6.8-6.9 (tag "statement_unexpected_token"))
(s-malformed @6.10-6.11 (tag "statement_unexpected_token"))
(s-malformed @6.11-6.12 (tag "statement_unexpected_token"))
(s-malformed @6.13-6.14 (tag "statement_unexpected_token"))
(s-malformed @6.15-7.6 (tag "expected_colon_after_type_annotation"))
(s-malformed @7.1-7.6 (tag "expected_colon_after_type_annotation"))
(s-malformed @7.6-7.7 (tag "statement_unexpected_token"))
(s-malformed @7.7-7.8 (tag "statement_unexpected_token"))
(s-malformed @7.8-7.9 (tag "statement_unexpected_token"))
(s-malformed @7.10-7.11 (tag "statement_unexpected_token"))
(s-malformed @7.11-7.12 (tag "statement_unexpected_token"))
(s-malformed @7.13-7.14 (tag "statement_unexpected_token"))
(s-malformed @7.15-7.25 (tag "expected_colon_after_type_annotation"))))
(s-malformed @7.25-7.25 (tag "expected_colon_after_type_annotation"))))
~~~
# FORMATTED
~~~roc
@ -402,6 +380,7 @@ module []
import Module exposing [Pair]
~~~
# CANONICALIZE
~~~clojure

View file

@ -20,7 +20,6 @@ For example:
or for an app:
app [main!] { pf: platform "../basic-cli/platform.roc" }
Here is the problematic code:
**fuzz_crash_001.md:1:1:1:3:**
```roc
mo|%
@ -32,7 +31,6 @@ mo|%
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_001.md:1:3:1:4:**
```roc
mo|%
@ -44,7 +42,6 @@ mo|%
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_001.md:1:4:1:5:**
```roc
mo|%

View file

@ -37,7 +37,6 @@ For example:
or for an app:
app [main!] { pf: platform "../basic-cli/platform.roc" }
Here is the problematic code:
**fuzz_crash_002.md:1:1:1:5:**
```roc
modu:;::::::::::::::le[%
@ -49,7 +48,6 @@ modu:;::::::::::::::le[%
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_002.md:1:5:1:6:**
```roc
modu:;::::::::::::::le[%
@ -61,7 +59,6 @@ modu:;::::::::::::::le[%
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_002.md:1:6:1:7:**
```roc
modu:;::::::::::::::le[%
@ -73,7 +70,6 @@ modu:;::::::::::::::le[%
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_002.md:1:7:1:8:**
```roc
modu:;::::::::::::::le[%
@ -85,7 +81,6 @@ modu:;::::::::::::::le[%
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_002.md:1:8:1:9:**
```roc
modu:;::::::::::::::le[%
@ -97,7 +92,6 @@ modu:;::::::::::::::le[%
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_002.md:1:9:1:10:**
```roc
modu:;::::::::::::::le[%
@ -109,7 +103,6 @@ modu:;::::::::::::::le[%
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_002.md:1:10:1:11:**
```roc
modu:;::::::::::::::le[%
@ -121,7 +114,6 @@ modu:;::::::::::::::le[%
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_002.md:1:11:1:12:**
```roc
modu:;::::::::::::::le[%
@ -133,7 +125,6 @@ modu:;::::::::::::::le[%
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_002.md:1:12:1:13:**
```roc
modu:;::::::::::::::le[%
@ -145,7 +136,6 @@ modu:;::::::::::::::le[%
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_002.md:1:13:1:14:**
```roc
modu:;::::::::::::::le[%
@ -157,7 +147,6 @@ modu:;::::::::::::::le[%
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_002.md:1:14:1:15:**
```roc
modu:;::::::::::::::le[%
@ -169,7 +158,6 @@ modu:;::::::::::::::le[%
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_002.md:1:15:1:16:**
```roc
modu:;::::::::::::::le[%
@ -181,7 +169,6 @@ modu:;::::::::::::::le[%
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_002.md:1:16:1:17:**
```roc
modu:;::::::::::::::le[%
@ -193,7 +180,6 @@ modu:;::::::::::::::le[%
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_002.md:1:17:1:18:**
```roc
modu:;::::::::::::::le[%
@ -205,7 +191,6 @@ modu:;::::::::::::::le[%
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_002.md:1:18:1:19:**
```roc
modu:;::::::::::::::le[%
@ -217,7 +202,6 @@ modu:;::::::::::::::le[%
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_002.md:1:19:1:20:**
```roc
modu:;::::::::::::::le[%
@ -229,7 +213,6 @@ modu:;::::::::::::::le[%
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_002.md:1:20:1:21:**
```roc
modu:;::::::::::::::le[%
@ -241,7 +224,6 @@ modu:;::::::::::::::le[%
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_002.md:1:21:1:23:**
```roc
modu:;::::::::::::::le[%
@ -253,7 +235,6 @@ modu:;::::::::::::::le[%
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_002.md:1:23:1:24:**
```roc
modu:;::::::::::::::le[%
@ -265,7 +246,6 @@ modu:;::::::::::::::le[%
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_002.md:1:24:1:25:**
```roc
modu:;::::::::::::::le[%

View file

@ -14,7 +14,11 @@ PARSE ERROR - fuzz_crash_003.md:1:3:1:4
PARSE ERROR - fuzz_crash_003.md:1:4:1:6
# PROBLEMS
**UNCLOSED STRING**
This string is missing a closing quote.
This string is missing a closing quote.```roc
= "te
```
^^^
**MISSING HEADER**
Roc files must start with a module header.
@ -24,7 +28,6 @@ For example:
or for an app:
app [main!] { pf: platform "../basic-cli/platform.roc" }
Here is the problematic code:
**fuzz_crash_003.md:1:1:1:2:**
```roc
= "te
@ -36,7 +39,6 @@ Here is the problematic code:
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_003.md:1:3:1:4:**
```roc
= "te
@ -48,7 +50,6 @@ Here is the problematic code:
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_003.md:1:4:1:6:**
```roc
= "te

View file

@ -18,7 +18,6 @@ For example:
or for an app:
app [main!] { pf: platform "../basic-cli/platform.roc" }
Here is the problematic code:
**fuzz_crash_004.md:1:1:1:2:**
```roc
F

View file

@ -18,7 +18,6 @@ For example:
or for an app:
app [main!] { pf: platform "../basic-cli/platform.roc" }
Here is the problematic code:
**fuzz_crash_005.md:1:1:1:5:**
```roc
modu

View file

@ -20,7 +20,6 @@ For example:
or for an app:
app [main!] { pf: platform "../basic-cli/platform.roc" }
Here is the problematic code:
**fuzz_crash_007.md:1:1:1:4:**
```roc
ff8.8.d
@ -32,7 +31,6 @@ ff8.8.d
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_007.md:1:4:1:6:**
```roc
ff8.8.d
@ -44,7 +42,6 @@ ff8.8.d
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_007.md:1:6:1:8:**
```roc
ff8.8.d

View file

@ -24,7 +24,6 @@ For example:
or for an app:
app [main!] { pf: platform "../basic-cli/platform.roc" }
Here is the problematic code:
**fuzz_crash_008.md:1:1:1:2:**
```roc
||1
@ -36,7 +35,6 @@ Here is the problematic code:
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_008.md:1:3:1:4:**
```roc
||1
@ -48,7 +46,6 @@ Here is the problematic code:
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_008.md:1:4:1:5:**
```roc
||1

View file

@ -22,7 +22,11 @@ PARSE ERROR - fuzz_crash_009.md:2:6:2:7
PARSE ERROR - fuzz_crash_009.md:6:12:6:12
# PROBLEMS
**UNCLOSED STRING**
This string is missing a closing quote.
This string is missing a closing quote.```roc
"onmo %
```
^^^^^^^
**MISSING HEADER**
Roc files must start with a module header.
@ -32,7 +36,6 @@ For example:
or for an app:
app [main!] { pf: platform "../basic-cli/platform.roc" }
Here is the problematic code:
**fuzz_crash_009.md:1:2:1:3:**
```roc
f{o,
@ -44,7 +47,6 @@ Here is the problematic code:
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_009.md:1:3:1:4:**
```roc
f{o,
@ -56,7 +58,6 @@ Here is the problematic code:
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_009.md:1:4:1:5:**
```roc
f{o,
@ -68,7 +69,6 @@ Here is the problematic code:
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_009.md:1:5:1:6:**
```roc
f{o,
@ -80,7 +80,6 @@ Here is the problematic code:
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_009.md:2:6:2:7:**
```roc
]
@ -92,7 +91,6 @@ Here is the problematic code:
A parsing error occurred: `string_unclosed`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_009.md:6:12:6:12:**
```roc
"onmo %

View file

@ -25,7 +25,11 @@ PARSE ERROR - fuzz_crash_010.md:5:35:5:35
ASCII control characters are not allowed in Roc source code.
**UNCLOSED STRING**
This string is missing a closing quote.
This string is missing a closing quote.```roc
"on (string 'onmo %')))
```
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
**MISSING HEADER**
Roc files must start with a module header.
@ -35,7 +39,6 @@ For example:
or for an app:
app [main!] { pf: platform "../basic-cli/platform.roc" }
Here is the problematic code:
**fuzz_crash_010.md:1:1:1:2:**
```roc
H{o,
@ -47,7 +50,6 @@ H{o,
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_010.md:1:2:1:3:**
```roc
H{o,
@ -59,7 +61,6 @@ H{o,
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_010.md:1:3:1:4:**
```roc
H{o,
@ -71,7 +72,6 @@ H{o,
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_010.md:1:4:1:5:**
```roc
H{o,
@ -83,7 +83,6 @@ H{o,
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_010.md:2:6:2:7:**
```roc
 ]
@ -95,7 +94,6 @@ Here is the problematic code:
A parsing error occurred: `string_unclosed`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_010.md:5:35:5:35:**
```roc
"on (string 'onmo %')))

View file

@ -16,7 +16,6 @@ PARSE ERROR - fuzz_crash_011.md:1:11:1:11
A parsing error occurred: `header_expected_open_square`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_011.md:1:8:1:9:**
```roc
module P]F
@ -28,7 +27,6 @@ module P]F
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_011.md:1:9:1:10:**
```roc
module P]F
@ -52,7 +50,6 @@ Other valid examples:
`Result(a, Str)`
`Maybe(List(U64))`
Here is the problematic code:
**fuzz_crash_011.md:1:11:1:11:**
```roc
module P]F
@ -70,7 +67,7 @@ KwModule(1:1-1:7),UpperIdent(1:8-1:9),CloseSquare(1:9-1:10),UpperIdent(1:10-1:11
(malformed-header @1.8-1.9 (tag "header_expected_open_square"))
(statements
(s-malformed @1.9-1.10 (tag "statement_unexpected_token"))
(s-malformed @1.10-1.11 (tag "expected_colon_after_type_annotation"))))
(s-malformed @1.11-1.11 (tag "expected_colon_after_type_annotation"))))
~~~
# FORMATTED
~~~roc

View file

@ -24,7 +24,6 @@ For example:
or for an app:
app [main!] { pf: platform "../basic-cli/platform.roc" }
Here is the problematic code:
**fuzz_crash_012.md:1:1:1:2:**
```roc
||(|(l888888888|
@ -36,7 +35,6 @@ Here is the problematic code:
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_012.md:1:2:1:3:**
```roc
||(|(l888888888|
@ -48,7 +46,6 @@ Here is the problematic code:
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_012.md:1:3:1:4:**
```roc
||(|(l888888888|
@ -60,7 +57,6 @@ Here is the problematic code:
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_012.md:1:4:1:5:**
```roc
||(|(l888888888|
@ -72,7 +68,6 @@ Here is the problematic code:
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_012.md:1:5:1:6:**
```roc
||(|(l888888888|
@ -84,7 +79,6 @@ Here is the problematic code:
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_012.md:1:6:1:16:**
```roc
||(|(l888888888|
@ -96,7 +90,6 @@ Here is the problematic code:
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_012.md:1:16:1:17:**
```roc
||(|(l888888888|

View file

@ -19,7 +19,6 @@ For example:
or for an app:
app [main!] { pf: platform "../basic-cli/platform.roc" }
Here is the problematic code:
**fuzz_crash_013.md:1:1:1:2:**
```roc
0{
@ -31,7 +30,6 @@ Here is the problematic code:
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_013.md:1:2:1:3:**
```roc
0{

View file

@ -23,7 +23,6 @@ For example:
or for an app:
app [main!] { pf: platform "../basic-cli/platform.roc" }
Here is the problematic code:
**fuzz_crash_014.md:1:1:1:3:**
```roc
0b.0
@ -35,7 +34,6 @@ Here is the problematic code:
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_014.md:1:3:1:5:**
```roc
0b.0
@ -47,7 +45,6 @@ Here is the problematic code:
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_014.md:2:1:2:6:**
```roc
0bu22
@ -59,7 +56,6 @@ Here is the problematic code:
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_014.md:3:1:3:5:**
```roc
0u22

View file

@ -30,7 +30,6 @@ For example:
or for an app:
app [main!] { pf: platform "../basic-cli/platform.roc" }
Here is the problematic code:
**fuzz_crash_015.md:1:1:1:4:**
```roc
0o0.0
@ -42,7 +41,6 @@ Here is the problematic code:
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_015.md:1:4:1:6:**
```roc
0o0.0
@ -54,7 +52,6 @@ Here is the problematic code:
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_015.md:2:1:2:4:**
```roc
0_0
@ -66,7 +63,6 @@ Here is the problematic code:
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_015.md:3:1:3:4:**
```roc
0u8.0
@ -78,7 +74,6 @@ Here is the problematic code:
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_015.md:3:4:3:6:**
```roc
0u8.0
@ -90,7 +85,6 @@ Here is the problematic code:
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_015.md:4:1:4:3:**
```roc
0_

View file

@ -19,7 +19,6 @@ For example:
or for an app:
app [main!] { pf: platform "../basic-cli/platform.roc" }
Here is the problematic code:
**fuzz_crash_016.md:1:1:1:2:**
```roc
0|
@ -31,7 +30,6 @@ Here is the problematic code:
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_016.md:1:2:1:3:**
```roc
0|

View file

@ -15,7 +15,7 @@ PARSE ERROR - fuzz_crash_017.md:1:6:1:7
PARSE ERROR - fuzz_crash_017.md:1:7:1:10
PARSE ERROR - fuzz_crash_017.md:1:10:1:11
PARSE ERROR - fuzz_crash_017.md:2:7:2:8
UNKNOWN OPERATOR - fuzz_crash_017.md:2:7:2:20
UNRECOGNIZED SYNTAX - fuzz_crash_017.md:2:7:2:20
# PROBLEMS
**MISSING HEADER**
Roc files must start with a module header.
@ -25,7 +25,6 @@ For example:
or for an app:
app [main!] { pf: platform "../basic-cli/platform.roc" }
Here is the problematic code:
**fuzz_crash_017.md:1:1:1:3:**
```roc
me = "luc"
@ -37,7 +36,6 @@ me = "luc"
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_017.md:1:4:1:5:**
```roc
me = "luc"
@ -49,7 +47,6 @@ me = "luc"
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_017.md:1:6:1:7:**
```roc
me = "luc"
@ -61,7 +58,6 @@ me = "luc"
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_017.md:1:7:1:10:**
```roc
me = "luc"
@ -73,7 +69,6 @@ me = "luc"
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_017.md:1:10:1:11:**
```roc
me = "luc"
@ -85,7 +80,6 @@ me = "luc"
A parsing error occurred: `string_expected_close_interpolation`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_017.md:2:7:2:8:**
```roc
foo = "hello ${namF
@ -93,8 +87,8 @@ foo = "hello ${namF
^
**UNKNOWN OPERATOR**
This looks like an operator, but it's not one I recognize!
**UNRECOGNIZED SYNTAX**
I don't recognize this syntax.
**fuzz_crash_017.md:2:7:2:20:**
```roc
@ -102,7 +96,7 @@ foo = "hello ${namF
```
^^^^^^^^^^^^^
Check the spelling and make sure you're using a valid Roc operator like `+`, `-`, `==`.
This might be a syntax error, an unsupported language feature, or a typo.
# TOKENS
~~~zig

View file

@ -21,7 +21,6 @@ For example:
or for an app:
app [main!] { pf: platform "../basic-cli/platform.roc" }
Here is the problematic code:
**fuzz_crash_018.md:1:1:1:2:**
```roc
0 b:S
@ -33,7 +32,6 @@ Here is the problematic code:
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_018.md:2:1:2:3:**
```roc
.R

View file

@ -192,7 +192,6 @@ TYPE MISMATCH - fuzz_crash_019.md:84:2:86:3
A parsing error occurred: `match_branch_missing_arrow`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_019.md:52:16:52:16:**
```roc
match a {lue {
@ -204,7 +203,6 @@ Here is the problematic code:
A parsing error occurred: `match_branch_missing_arrow`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_019.md:58:4:58:4:**
```roc
1 "for" => 20[1, ] # t
@ -216,7 +214,6 @@ Here is the problematic code:
A parsing error occurred: `match_branch_missing_arrow`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_019.md:59:3:59:3:**
```roc
ment
@ -228,7 +225,6 @@ Here is the problematic code:
A parsing error occurred: `match_branch_missing_arrow`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_019.md:60:16:60:16:**
```roc
[1, 2, 3,est]123
@ -240,7 +236,6 @@ Here is the problematic code:
A parsing error occurred: `match_branch_missing_arrow`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_019.md:62:5:62:5:**
```roc
] 23
@ -252,7 +247,6 @@ Here is the problematic code:
A parsing error occurred: `match_branch_missing_arrow`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_019.md:63:7:63:7:**
```roc
3.1 314
@ -264,7 +258,6 @@ Here is the problematic code:
A parsing error occurred: `match_branch_missing_arrow`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_019.md:66:12:66:12:**
```roc
(1, 2, 3)123

View file

@ -192,7 +192,6 @@ INCOMPATIBLE MATCH PATTERNS - fuzz_crash_020.md:52:2:52:2
A parsing error occurred: `match_branch_missing_arrow`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_020.md:52:16:52:16:**
```roc
match a {lue {
@ -204,7 +203,6 @@ Here is the problematic code:
A parsing error occurred: `match_branch_missing_arrow`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_020.md:58:4:58:4:**
```roc
1 "for" => 20[1, ] # t
@ -216,7 +214,6 @@ Here is the problematic code:
A parsing error occurred: `match_branch_missing_arrow`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_020.md:59:3:59:3:**
```roc
ment
@ -228,7 +225,6 @@ Here is the problematic code:
A parsing error occurred: `match_branch_missing_arrow`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_020.md:60:16:60:16:**
```roc
[1, 2, 3,est]123
@ -240,7 +236,6 @@ Here is the problematic code:
A parsing error occurred: `match_branch_missing_arrow`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_020.md:62:5:62:5:**
```roc
] 23
@ -252,7 +247,6 @@ Here is the problematic code:
A parsing error occurred: `match_branch_missing_arrow`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_020.md:63:7:63:7:**
```roc
3.1 314
@ -264,7 +258,6 @@ Here is the problematic code:
A parsing error occurred: `match_branch_missing_arrow`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_020.md:66:12:66:12:**
```roc
(1, 2, 3)123

View file

@ -23,7 +23,11 @@ PARSE ERROR - fuzz_crash_021.md:3:15:3:15
MALFORMED TYPE - fuzz_crash_021.md:3:14:3:15
# PROBLEMS
**UNCLOSED STRING**
This string is missing a closing quote.
This string is missing a closing quote.```roc
Fli/main.roc" }
```
^^^
**MISSING HEADER**
Roc files must start with a module header.
@ -33,7 +37,6 @@ For example:
or for an app:
app [main!] { pf: platform "../basic-cli/platform.roc" }
Here is the problematic code:
**fuzz_crash_021.md:1:1:1:4:**
```roc
Fli/main.roc" }
@ -45,7 +48,6 @@ Fli/main.roc" }
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_021.md:1:4:1:5:**
```roc
Fli/main.roc" }
@ -57,7 +59,6 @@ Fli/main.roc" }
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_021.md:1:5:1:9:**
```roc
Fli/main.roc" }
@ -69,7 +70,6 @@ Fli/main.roc" }
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_021.md:1:9:1:13:**
```roc
Fli/main.roc" }
@ -81,7 +81,6 @@ Fli/main.roc" }
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_021.md:1:13:1:14:**
```roc
Fli/main.roc" }
@ -93,7 +92,6 @@ Fli/main.roc" }
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_021.md:1:14:1:16:**
```roc
Fli/main.roc" }
@ -105,7 +103,6 @@ Fli/main.roc" }
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_021.md:1:16:1:16:**
```roc
Fli/main.roc" }
@ -117,7 +114,6 @@ Fli/main.roc" }
A parsing error occurred: `expected_ty_anno_close_round_or_comma`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_021.md:3:1:3:5:**
```roc
Pair(a, b+ : (
@ -129,7 +125,6 @@ Pair(a, b+ : (
A parsing error occurred: `expected_ty_anno_close_round`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_021.md:3:15:3:15:**
```roc
Pair(a, b+ : (

View file

@ -31,7 +31,6 @@ UNUSED VARIABLE - fuzz_crash_022.md:6:12:6:14
A parsing error occurred: `expected_package_or_platform_name`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_022.md:1:1:1:4:**
```roc
app [main!] { |f: platform "c" }
@ -43,7 +42,6 @@ app [main!] { |f: platform "c" }
The token **platform** is not expected in a type annotation.
Type annotations should contain types like _Str_, _Num a_, or _List U64_.
Here is the problematic code:
**fuzz_crash_022.md:1:19:1:27:**
```roc
app [main!] { |f: platform "c" }
@ -55,7 +53,6 @@ app [main!] { |f: platform "c" }
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_022.md:1:28:1:29:**
```roc
app [main!] { |f: platform "c" }
@ -67,7 +64,6 @@ app [main!] { |f: platform "c" }
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_022.md:1:29:1:30:**
```roc
app [main!] { |f: platform "c" }
@ -79,7 +75,6 @@ app [main!] { |f: platform "c" }
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_022.md:1:30:1:31:**
```roc
app [main!] { |f: platform "c" }
@ -91,7 +86,6 @@ app [main!] { |f: platform "c" }
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_022.md:1:32:1:33:**
```roc
app [main!] { |f: platform "c" }
@ -103,7 +97,6 @@ app [main!] { |f: platform "c" }
A parsing error occurred: `expected_expr_close_round_or_comma`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_022.md:6:27:6:28:**
```roc
getUser = |id| if (id > 1!) "big" else "l"
@ -115,7 +108,6 @@ getUser = |id| if (id > 1!) "big" else "l"
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_022.md:8:1:8:2:**
```roc
-ain! = |_| getUser(900)

View file

@ -280,7 +280,6 @@ TYPE MISMATCH - fuzz_crash_023.md:155:2:157:3
A parsing error occurred: `expected_expr_record_field_name`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_023.md:178:37:178:38:**
```roc
record = { foo: 123, bar: "Hello", ;az: tag, qux: Ok(world), punned }
@ -292,7 +291,6 @@ Here is the problematic code:
A parsing error occurred: `expected_expr_close_curly_or_comma`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_023.md:178:38:178:40:**
```roc
record = { foo: 123, bar: "Hello", ;az: tag, qux: Ok(world), punned }
@ -304,7 +302,6 @@ Here is the problematic code:
The token **:** is not expected in an expression.
Expressions can be identifiers, literals, function calls, or operators.
Here is the problematic code:
**fuzz_crash_023.md:178:40:178:41:**
```roc
record = { foo: 123, bar: "Hello", ;az: tag, qux: Ok(world), punned }
@ -316,7 +313,6 @@ Here is the problematic code:
The token **,** is not expected in an expression.
Expressions can be identifiers, literals, function calls, or operators.
Here is the problematic code:
**fuzz_crash_023.md:178:45:178:46:**
```roc
record = { foo: 123, bar: "Hello", ;az: tag, qux: Ok(world), punned }
@ -328,7 +324,6 @@ Here is the problematic code:
A parsing error occurred: `expected_arrow`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_023.md:178:52:178:54:**
```roc
record = { foo: 123, bar: "Hello", ;az: tag, qux: Ok(world), punned }

View file

@ -25,17 +25,20 @@ PARSE ERROR - fuzz_crash_024.md:4:1:4:4
UNEXPECTED TOKEN IN EXPRESSION - fuzz_crash_024.md:4:8:4:9
PARSE ERROR - fuzz_crash_024.md:7:1:7:4
MALFORMED TYPE - fuzz_crash_024.md:1:24:1:32
UNKNOWN OPERATOR - fuzz_crash_024.md:4:8:4:9
UNRECOGNIZED SYNTAX - fuzz_crash_024.md:4:8:4:9
DUPLICATE DEFINITION - fuzz_crash_024.md:7:5:7:6
# PROBLEMS
**UNCLOSED STRING**
This string is missing a closing quote.
This string is missing a closing quote.```roc
module [module ] { pf: platform ".-/main._]where # A
```
^^^^^^^^^^^^^^^^^^^^
**PARSE ERROR**
A parsing error occurred: `exposed_item_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_024.md:1:9:1:15:**
```roc
module [module ] { pf: platform ".-/main._]where # A
@ -47,7 +50,6 @@ module [module ] { pf: platform ".-/main._]where # A
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_024.md:1:18:1:19:**
```roc
module [module ] { pf: platform ".-/main._]where # A
@ -59,7 +61,6 @@ module [module ] { pf: platform ".-/main._]where # A
The token **platform** is not expected in a type annotation.
Type annotations should contain types like _Str_, _Num a_, or _List U64_.
Here is the problematic code:
**fuzz_crash_024.md:1:24:1:32:**
```roc
module [module ] { pf: platform ".-/main._]where # A
@ -71,7 +72,6 @@ module [module ] { pf: platform ".-/main._]where # A
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_024.md:1:33:1:34:**
```roc
module [module ] { pf: platform ".-/main._]where # A
@ -83,7 +83,6 @@ module [module ] { pf: platform ".-/main._]where # A
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_024.md:1:34:1:53:**
```roc
module [module ] { pf: platform ".-/main._]where # A
@ -95,7 +94,6 @@ module [module ] { pf: platform ".-/main._]where # A
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_024.md:1:53:1:53:**
```roc
module [module ] { pf: platform ".-/main._]where # A
@ -107,7 +105,6 @@ module [module ] { pf: platform ".-/main._]where # A
A parsing error occurred: `var_only_allowed_in_a_body`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_024.md:4:1:4:4:**
```roc
var t= ]
@ -119,7 +116,6 @@ var t= ]
The token **]** is not expected in an expression.
Expressions can be identifiers, literals, function calls, or operators.
Here is the problematic code:
**fuzz_crash_024.md:4:8:4:9:**
```roc
var t= ]
@ -131,7 +127,6 @@ var t= ]
A parsing error occurred: `var_only_allowed_in_a_body`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_024.md:7:1:7:4:**
```roc
var t= 0
@ -149,8 +144,8 @@ module [module ] { pf: platform ".-/main._]where # A
^^^^^^^^
**UNKNOWN OPERATOR**
This looks like an operator, but it's not one I recognize!
**UNRECOGNIZED SYNTAX**
I don't recognize this syntax.
**fuzz_crash_024.md:4:8:4:9:**
```roc
@ -158,7 +153,7 @@ var t= ]
```
^
Check the spelling and make sure you're using a valid Roc operator like `+`, `-`, `==`.
This might be a syntax error, an unsupported language feature, or a typo.
**DUPLICATE DEFINITION**
The name `t` is being redeclared in this scope.

View file

@ -59,7 +59,6 @@ Other valid examples:
`Result(a, Str)`
`Maybe(List(U64))`
Here is the problematic code:
**fuzz_crash_025.md:11:1:11:2:**
```roc
d = 18446744073709551615
@ -71,7 +70,6 @@ d = 18446744073709551615
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_025.md:11:3:11:4:**
```roc
d = 18446744073709551615
@ -83,7 +81,6 @@ d = 18446744073709551615
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_025.md:11:5:11:25:**
```roc
d = 18446744073709551615
@ -95,7 +92,6 @@ d = 18446744073709551615
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_025.md:14:48:14:49:**
```roc
e = 3402823669209384634633746074317682114553.14: I8
@ -119,7 +115,6 @@ Other valid examples:
`Result(a, Str)`
`Maybe(List(U64))`
Here is the problematic code:
**fuzz_crash_025.md:15:1:15:2:**
```roc
f =8
@ -131,7 +126,6 @@ f =8
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_025.md:15:3:15:4:**
```roc
f =8
@ -143,7 +137,6 @@ f =8
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_025.md:15:4:15:5:**
```roc
f =8
@ -208,7 +201,7 @@ LowerIdent(27:1-27:2),OpAssign(27:3-27:4),Int(27:5-27:29),EndOfFile(27:29-27:29)
(s-decl @10.1-10.14
(p-ident @10.1-10.2 (raw "c"))
(e-int @10.5-10.14 (raw "429496729")))
(s-malformed @10.15-11.2 (tag "expected_colon_after_type_annotation"))
(s-malformed @11.1-11.2 (tag "expected_colon_after_type_annotation"))
(s-malformed @11.3-11.4 (tag "statement_unexpected_token"))
(s-malformed @11.5-11.25 (tag "statement_unexpected_token"))
(s-type-anno @13.1-13.9 (name "e")
@ -217,7 +210,7 @@ LowerIdent(27:1-27:2),OpAssign(27:3-27:4),Int(27:5-27:29),EndOfFile(27:29-27:29)
(p-ident @14.1-14.2 (raw "e"))
(e-frac @14.5-14.48 (raw "3402823669209384634633746074317682114553.14")))
(s-malformed @14.48-14.49 (tag "statement_unexpected_token"))
(s-malformed @14.50-15.2 (tag "expected_colon_after_type_annotation"))
(s-malformed @15.1-15.2 (tag "expected_colon_after_type_annotation"))
(s-malformed @15.3-15.4 (tag "statement_unexpected_token"))
(s-malformed @15.4-15.5 (tag "statement_unexpected_token"))
(s-type-anno @17.1-17.8 (name "g")
@ -259,6 +252,7 @@ e : U128
e = 3402823669209384634633746074317682114553.14
g : I16
g = -32768

View file

@ -233,7 +233,11 @@ TYPE MISMATCH - fuzz_crash_027.md:142:10:142:41
Numbers cannot have leading zeros.
**UNCLOSED STRING**
This string is missing a closing quote.
This string is missing a closing quote.```roc
crash "Unreachtement
```
^^^^^^^^^^^^^^
**PARSE ERROR**
Type applications require parentheses around their type arguments.
@ -251,7 +255,6 @@ Other valid examples:
`Result(a, Str)`
`Maybe(List(U64))`
Here is the problematic code:
**fuzz_crash_027.md:40:5:40:6:**
```roc
Maya) : [ #
@ -263,7 +266,6 @@ Maya) : [ #
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_027.md:40:7:40:8:**
```roc
Maya) : [ #
@ -275,7 +277,6 @@ Maya) : [ #
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_027.md:40:9:40:10:**
```roc
Maya) : [ #
@ -287,7 +288,6 @@ Maya) : [ #
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_027.md:41:1:41:2:**
```roc
] #se
@ -299,7 +299,6 @@ Here is the problematic code:
A parsing error occurred: `expected_expr_apply_close_round`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_027.md:122:3:122:10:**
```roc
add_one(
@ -311,7 +310,6 @@ Here is the problematic code:
The token **)** is not expected in an expression.
Expressions can be identifiers, literals, function calls, or operators.
Here is the problematic code:
**fuzz_crash_027.md:125:3:125:4:**
```roc
), 456, # ee
@ -1166,7 +1164,7 @@ CloseCurly(159:1-159:2),EndOfFile(159:2-159:2),
(ty-record @37.12-39.2
(anno-record-field @38.2-38.11 (name "bar")
(ty @38.8-38.11 (name "Som")))))
(s-malformed @40.1-40.6 (tag "expected_colon_after_type_annotation"))
(s-malformed @40.5-40.6 (tag "expected_colon_after_type_annotation"))
(s-malformed @40.7-40.8 (tag "statement_unexpected_token"))
(s-malformed @40.9-40.10 (tag "statement_unexpected_token"))
(s-malformed @41.1-41.2 (tag "statement_unexpected_token"))

View file

@ -26,7 +26,7 @@ ar,
# EXPECTED
PARSE ERROR - fuzz_crash_029.md:4:4:4:5
PARSE ERROR - fuzz_crash_029.md:5:14:5:17
PARSE ERROR - fuzz_crash_029.md:5:9:5:13
PARSE ERROR - fuzz_crash_029.md:5:19:5:21
PARSE ERROR - fuzz_crash_029.md:5:22:5:23
PARSE ERROR - fuzz_crash_029.md:5:23:5:24
PARSE ERROR - fuzz_crash_029.md:5:24:5:25
@ -45,7 +45,7 @@ PARSE ERROR - fuzz_crash_029.md:13:13:13:17
PARSE ERROR - fuzz_crash_029.md:13:19:13:20
PARSE ERROR - fuzz_crash_029.md:14:2:14:10
PARSE ERROR - fuzz_crash_029.md:15:3:15:4
PARSE ERROR - fuzz_crash_029.md:15:5:15:7
PARSE ERROR - fuzz_crash_029.md:15:14:15:15
PARSE ERROR - fuzz_crash_029.md:15:16:15:17
PARSE ERROR - fuzz_crash_029.md:15:17:15:18
PARSE ERROR - fuzz_crash_029.md:16:1:16:3
@ -57,7 +57,6 @@ MALFORMED TYPE - fuzz_crash_029.md:13:6:13:7
A parsing error occurred: `expected_requires_rigids_close_curly`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_029.md:4:4:4:5:**
```roc
{ # d
@ -69,7 +68,6 @@ Here is the problematic code:
A parsing error occurred: `invalid_type_arg`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_029.md:5:14:5:17:**
```roc
n! : List(Str) => {}, # ure
@ -93,19 +91,17 @@ Other valid examples:
`Result(a, Str)`
`Maybe(List(U64))`
Here is the problematic code:
**fuzz_crash_029.md:5:9:5:13:**
**fuzz_crash_029.md:5:19:5:21:**
```roc
n! : List(Str) => {}, # ure
```
^^^^
^^
**PARSE ERROR**
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_029.md:5:22:5:23:**
```roc
n! : List(Str) => {}, # ure
@ -117,7 +113,6 @@ Here is the problematic code:
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_029.md:5:23:5:24:**
```roc
n! : List(Str) => {}, # ure
@ -129,7 +124,6 @@ Here is the problematic code:
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_029.md:5:24:5:25:**
```roc
n! : List(Str) => {}, # ure
@ -141,7 +135,6 @@ Here is the problematic code:
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_029.md:6:4:6:5:**
```roc
} #Ce
@ -153,7 +146,6 @@ Here is the problematic code:
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_029.md:7:2:7:9:**
```roc
exposes #rd
@ -165,7 +157,6 @@ Here is the problematic code:
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_029.md:8:3:8:4:**
```roc
[ #
@ -177,7 +168,6 @@ Here is the problematic code:
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_029.md:9:3:9:4:**
```roc
] # Cse
@ -189,7 +179,6 @@ Here is the problematic code:
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_029.md:10:2:10:10:**
```roc
packages # Cd
@ -201,7 +190,6 @@ Here is the problematic code:
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_029.md:11:3:11:8:**
```roc
vides # Cd
@ -213,7 +201,6 @@ Here is the problematic code:
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_029.md:12:3:12:4:**
```roc
{ # pen
@ -225,7 +212,6 @@ Here is the problematic code:
The token **"** is not expected in a type annotation.
Type annotations should contain types like _Str_, _Num a_, or _List U64_.
Here is the problematic code:
**fuzz_crash_029.md:13:6:13:7:**
```roc
pkg: "..l", mmen } # Cose
@ -237,7 +223,6 @@ pkg: "..l", mmen } # Cose
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_029.md:13:7:13:10:**
```roc
pkg: "..l", mmen } # Cose
@ -249,7 +234,6 @@ pkg: "..l", mmen } # Cose
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_029.md:13:10:13:11:**
```roc
pkg: "..l", mmen } # Cose
@ -261,7 +245,6 @@ pkg: "..l", mmen } # Cose
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_029.md:13:11:13:12:**
```roc
pkg: "..l", mmen } # Cose
@ -273,7 +256,6 @@ pkg: "..l", mmen } # Cose
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_029.md:13:13:13:17:**
```roc
pkg: "..l", mmen } # Cose
@ -285,7 +267,6 @@ pkg: "..l", mmen } # Cose
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_029.md:13:19:13:20:**
```roc
pkg: "..l", mmen } # Cose
@ -297,7 +278,6 @@ pkg: "..l", mmen } # Cose
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_029.md:14:2:14:10:**
```roc
provides # Cd
@ -309,7 +289,6 @@ Here is the problematic code:
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_029.md:15:3:15:4:**
```roc
[ Ok(world), (n # pen
@ -333,19 +312,17 @@ Other valid examples:
`Result(a, Str)`
`Maybe(List(U64))`
Here is the problematic code:
**fuzz_crash_029.md:15:5:15:7:**
**fuzz_crash_029.md:15:14:15:15:**
```roc
[ Ok(world), (n # pen
```
^^
^
**PARSE ERROR**
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_029.md:15:16:15:17:**
```roc
[ Ok(world), (n # pen
@ -357,7 +334,6 @@ Here is the problematic code:
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_029.md:15:17:15:18:**
```roc
[ Ok(world), (n # pen
@ -369,7 +345,6 @@ Here is the problematic code:
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_029.md:16:1:16:3:**
```roc
ar,
@ -381,7 +356,6 @@ ar,
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_029.md:16:3:16:4:**
```roc
ar,
@ -393,7 +367,6 @@ ar,
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_029.md:17:3:17:4:**
```roc
]
@ -436,7 +409,7 @@ CloseSquare(17:3-17:4),EndOfFile(17:4-17:4),
(file @1.1-17.4
(malformed-header @4.4-5.8 (tag "expected_requires_rigids_close_curly"))
(statements
(s-malformed @5.9-5.21 (tag "expected_colon_after_type_annotation"))
(s-malformed @5.19-5.21 (tag "expected_colon_after_type_annotation"))
(s-malformed @5.22-5.23 (tag "statement_unexpected_token"))
(s-malformed @5.23-5.24 (tag "statement_unexpected_token"))
(s-malformed @5.24-5.25 (tag "statement_unexpected_token"))
@ -456,7 +429,7 @@ CloseSquare(17:3-17:4),EndOfFile(17:4-17:4),
(s-malformed @13.19-13.20 (tag "statement_unexpected_token"))
(s-malformed @14.2-14.10 (tag "statement_unexpected_token"))
(s-malformed @15.3-15.4 (tag "statement_unexpected_token"))
(s-malformed @15.5-15.15 (tag "expected_colon_after_type_annotation"))
(s-malformed @15.14-15.15 (tag "expected_colon_after_type_annotation"))
(s-malformed @15.16-15.17 (tag "statement_unexpected_token"))
(s-malformed @15.17-15.18 (tag "statement_unexpected_token"))
(s-malformed @16.1-16.3 (tag "statement_unexpected_token"))

View file

@ -40,7 +40,6 @@ PARSE ERROR - fuzz_crash_030.md:16:3:16:4
A parsing error occurred: `exposed_item_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_030.md:8:5:8:6:**
```roc
[ .
@ -52,7 +51,6 @@ Here is the problematic code:
A parsing error occurred: `expected_packages_close_curly`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_030.md:12:8:12:9:**
```roc
pkg: 77"..c", mm} #
@ -64,7 +62,6 @@ pkg: 77"..c", mm} #
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_030.md:12:9:12:12:**
```roc
pkg: 77"..c", mm} #
@ -76,7 +73,6 @@ pkg: 77"..c", mm} #
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_030.md:12:12:12:13:**
```roc
pkg: 77"..c", mm} #
@ -88,7 +84,6 @@ pkg: 77"..c", mm} #
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_030.md:12:13:12:14:**
```roc
pkg: 77"..c", mm} #
@ -100,7 +95,6 @@ pkg: 77"..c", mm} #
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_030.md:12:15:12:17:**
```roc
pkg: 77"..c", mm} #
@ -112,7 +106,6 @@ pkg: 77"..c", mm} #
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_030.md:12:17:12:18:**
```roc
pkg: 77"..c", mm} #
@ -124,7 +117,6 @@ pkg: 77"..c", mm} #
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_030.md:13:2:13:10:**
```roc
provides # Cd
@ -136,7 +128,6 @@ Here is the problematic code:
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_030.md:14:3:14:4:**
```roc
[ # pen
@ -148,7 +139,6 @@ Here is the problematic code:
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_030.md:15:1:15:3:**
```roc
ar,
@ -160,7 +150,6 @@ ar,
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_030.md:15:3:15:4:**
```roc
ar,
@ -172,7 +161,6 @@ ar,
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_030.md:16:3:16:4:**
```roc
]

View file

@ -16,7 +16,7 @@ PARSE ERROR - fuzz_crash_031.md:1:6:1:7
PARSE ERROR - fuzz_crash_031.md:1:7:1:8
PARSE ERROR - fuzz_crash_031.md:4:1:4:6
UNEXPECTED TOKEN IN EXPRESSION - fuzz_crash_031.md:4:10:4:11
UNKNOWN OPERATOR - fuzz_crash_031.md:4:10:4:11
UNRECOGNIZED SYNTAX - fuzz_crash_031.md:4:10:4:11
# PROBLEMS
**MISSING HEADER**
Roc files must start with a module header.
@ -26,7 +26,6 @@ For example:
or for an app:
app [main!] { pf: platform "../basic-cli/platform.roc" }
Here is the problematic code:
**fuzz_crash_031.md:1:1:1:5:**
```roc
mule []
@ -38,7 +37,6 @@ mule []
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_031.md:1:6:1:7:**
```roc
mule []
@ -50,7 +48,6 @@ mule []
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_031.md:1:7:1:8:**
```roc
mule []
@ -62,7 +59,6 @@ mule []
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_031.md:4:1:4:6:**
```roc
vavar t= '
@ -74,7 +70,6 @@ vavar t= '
The token **'** is not expected in an expression.
Expressions can be identifiers, literals, function calls, or operators.
Here is the problematic code:
**fuzz_crash_031.md:4:10:4:11:**
```roc
vavar t= '
@ -82,8 +77,8 @@ vavar t= '
^
**UNKNOWN OPERATOR**
This looks like an operator, but it's not one I recognize!
**UNRECOGNIZED SYNTAX**
I don't recognize this syntax.
**fuzz_crash_031.md:4:10:4:11:**
```roc
@ -91,7 +86,7 @@ vavar t= '
```
^
Check the spelling and make sure you're using a valid Roc operator like `+`, `-`, `==`.
This might be a syntax error, an unsupported language feature, or a typo.
# TOKENS
~~~zig

View file

@ -41,7 +41,6 @@ EXPOSED BUT NOT DEFINED - fuzz_crash_032.md:1:9:1:12
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_032.md:3:24:3:25:**
```roc
LocalStatus :lue => Loc= [Pending, Complete]
@ -53,7 +52,6 @@ LocalStatus :lue => Loc= [Pending, Complete]
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_032.md:3:26:3:27:**
```roc
LocalStatus :lue => Loc= [Pending, Complete]
@ -77,7 +75,6 @@ Other valid examples:
`Result(a, Str)`
`Maybe(List(U64))`
Here is the problematic code:
**fuzz_crash_032.md:3:34:3:35:**
```roc
LocalStatus :lue => Loc= [Pending, Complete]
@ -101,7 +98,6 @@ Other valid examples:
`Result(a, Str)`
`Maybe(List(U64))`
Here is the problematic code:
**fuzz_crash_032.md:3:44:3:45:**
```roc
LocalStatus :lue => Loc= [Pending, Complete]
@ -113,7 +109,6 @@ LocalStatus :lue => Loc= [Pending, Complete]
Import statements must appear at the top level of a module.
Move this import to the top of the file, after the module header but before any definitions.
Here is the problematic code:
**fuzz_crash_032.md:6:18:6:24:**
```roc
olor = |color| { import Color.RGB
@ -125,7 +120,6 @@ olor = |color| { import Color.RGB
The token **-** is not expected in a pattern.
Patterns can contain identifiers, literals, lists, records, or tags.
Here is the problematic code:
**fuzz_crash_032.md:9:21:9:22:**
```roc
Green => LocalStatus-Complete
@ -137,7 +131,6 @@ Green => LocalStatus-Complete
A parsing error occurred: `match_branch_missing_arrow`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_032.md:9:22:9:22:**
```roc
Green => LocalStatus-Complete
@ -275,8 +268,8 @@ CloseCurly(12:1-12:2),EndOfFile(12:2-12:2),
(ty @3.21-3.24 (name "Loc"))))
(s-malformed @3.24-3.25 (tag "statement_unexpected_token"))
(s-malformed @3.26-3.27 (tag "statement_unexpected_token"))
(s-malformed @3.27-3.35 (tag "expected_colon_after_type_annotation"))
(s-malformed @3.36-3.45 (tag "expected_colon_after_type_annotation"))
(s-malformed @3.34-3.35 (tag "expected_colon_after_type_annotation"))
(s-malformed @3.44-3.45 (tag "expected_colon_after_type_annotation"))
(s-type-anno @5.1-5.16 (name "olor")
(ty-fn @5.8-5.16
(_)

View file

@ -15,7 +15,6 @@ PARSE ERROR - fuzz_crash_033.md:1:14:1:15
A parsing error occurred: `expected_expr_record_field_name`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_033.md:1:6:1:14:**
```roc
{ i, Complete]
@ -27,7 +26,6 @@ Here is the problematic code:
A parsing error occurred: `expected_expr_close_curly_or_comma`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_033.md:1:14:1:15:**
```roc
{ i, Complete]

View file

@ -15,7 +15,6 @@ PARSE ERROR - fuzz_crash_034.md:1:11:1:12
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_034.md:1:9:1:10:**
```roc
module[]0 f
@ -27,7 +26,6 @@ module[]0 f
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_034.md:1:11:1:12:**
```roc
module[]0 f

View file

@ -15,7 +15,6 @@ PARSE ERROR - fuzz_crash_035.md:1:9:1:10
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_035.md:1:9:1:10:**
```roc
module[]{

View file

@ -15,7 +15,6 @@ PARSE ERROR - fuzz_crash_036.md:1:11:1:11
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_036.md:1:9:1:10:**
```roc
module[]{B
@ -39,7 +38,6 @@ Other valid examples:
`Result(a, Str)`
`Maybe(List(U64))`
Here is the problematic code:
**fuzz_crash_036.md:1:11:1:11:**
```roc
module[]{B
@ -58,7 +56,7 @@ KwModule(1:1-1:7),OpenSquare(1:7-1:8),CloseSquare(1:8-1:9),OpenCurly(1:9-1:10),U
(exposes @1.7-1.9))
(statements
(s-malformed @1.9-1.10 (tag "statement_unexpected_token"))
(s-malformed @1.10-1.11 (tag "expected_colon_after_type_annotation"))))
(s-malformed @1.11-1.11 (tag "expected_colon_after_type_annotation"))))
~~~
# FORMATTED
~~~roc

View file

@ -14,16 +14,23 @@ PARSE ERROR - fuzz_crash_037.md:1:9:1:10
PARSE ERROR - fuzz_crash_037.md:1:10:1:11
# PROBLEMS
**INVALID ESCAPE SEQUENCE**
This escape sequence is not recognized.
This escape sequence is not recognized.```roc
module[]"\
```
^
**UNCLOSED STRING**
This string is missing a closing quote.
This string is missing a closing quote.```roc
module[]"\
```
^^
**PARSE ERROR**
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_037.md:1:9:1:10:**
```roc
module[]"\
@ -35,7 +42,6 @@ module[]"\
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_037.md:1:10:1:11:**
```roc
module[]"\

View file

@ -19,7 +19,6 @@ For example:
or for an app:
app [main!] { pf: platform "../basic-cli/platform.roc" }
Here is the problematic code:
**fuzz_crash_038.md:1:1:1:2:**
```roc
*import B as
@ -31,7 +30,6 @@ Here is the problematic code:
A parsing error occurred: `expected_upper_name_after_import_as`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_038.md:1:2:1:8:**
```roc
*import B as

View file

@ -16,7 +16,6 @@ PARSE ERROR - fuzz_crash_039.md:2:2:2:2
A parsing error occurred: `exposed_item_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_039.md:1:8:1:9:**
```roc
module[}('
@ -28,7 +27,6 @@ module[}('
A parsing error occurred: `header_expected_close_square`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_039.md:2:2:2:2:**
```roc
)

View file

@ -18,7 +18,6 @@ MALFORMED TYPE - fuzz_crash_040.md:2:3:2:4
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_040.md:1:20:1:21:**
```roc
app[]{f:platform""}{
@ -30,7 +29,6 @@ app[]{f:platform""}{
The token **0** is not expected in a type annotation.
Type annotations should contain types like _Str_, _Num a_, or _List U64_.
Here is the problematic code:
**fuzz_crash_040.md:2:3:2:4:**
```roc
o:0)
@ -42,7 +40,6 @@ o:0)
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_040.md:2:4:2:5:**
```roc
o:0)

View file

@ -22,7 +22,6 @@ PARSE ERROR - fuzz_crash_041.md:1:28:1:29
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_041.md:1:20:1:21:**
```roc
app[]{f:platform""}|(0,)|||0
@ -34,7 +33,6 @@ app[]{f:platform""}|(0,)|||0
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_041.md:1:21:1:22:**
```roc
app[]{f:platform""}|(0,)|||0
@ -46,7 +44,6 @@ app[]{f:platform""}|(0,)|||0
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_041.md:1:22:1:23:**
```roc
app[]{f:platform""}|(0,)|||0
@ -58,7 +55,6 @@ app[]{f:platform""}|(0,)|||0
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_041.md:1:23:1:24:**
```roc
app[]{f:platform""}|(0,)|||0
@ -70,7 +66,6 @@ app[]{f:platform""}|(0,)|||0
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_041.md:1:24:1:25:**
```roc
app[]{f:platform""}|(0,)|||0
@ -82,7 +77,6 @@ app[]{f:platform""}|(0,)|||0
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_041.md:1:25:1:26:**
```roc
app[]{f:platform""}|(0,)|||0
@ -94,7 +88,6 @@ app[]{f:platform""}|(0,)|||0
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_041.md:1:26:1:27:**
```roc
app[]{f:platform""}|(0,)|||0
@ -106,7 +99,6 @@ app[]{f:platform""}|(0,)|||0
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_041.md:1:27:1:28:**
```roc
app[]{f:platform""}|(0,)|||0
@ -118,7 +110,6 @@ app[]{f:platform""}|(0,)|||0
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_041.md:1:28:1:29:**
```roc
app[]{f:platform""}|(0,)|||0

View file

@ -16,7 +16,6 @@ MODULE NOT IMPORTED - fuzz_crash_042.md:1:25:1:30
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_042.md:1:19:1:20:**
```roc
module[]import u.R}g:r->R.a.E

View file

@ -19,7 +19,6 @@ MALFORMED TYPE - fuzz_crash_043.md:2:3:2:4
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_043.md:1:20:1:21:**
```roc
app[]{f:platform""}{
@ -31,7 +30,6 @@ app[]{f:platform""}{
The token **0** is not expected in a type annotation.
Type annotations should contain types like _Str_, _Num a_, or _List U64_.
Here is the problematic code:
**fuzz_crash_043.md:2:3:2:4:**
```roc
o:0}0
@ -43,7 +41,6 @@ o:0}0
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_043.md:2:4:2:5:**
```roc
o:0}0
@ -55,7 +52,6 @@ o:0}0
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_043.md:2:5:2:6:**
```roc
o:0}0

View file

@ -24,7 +24,6 @@ PARSE ERROR - fuzz_crash_044.md:4:2:4:3
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_044.md:1:20:1:21:**
```roc
app[]{f:platform""}{{0
@ -36,7 +35,6 @@ app[]{f:platform""}{{0
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_044.md:1:21:1:22:**
```roc
app[]{f:platform""}{{0
@ -48,7 +46,6 @@ app[]{f:platform""}{{0
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_044.md:1:22:1:23:**
```roc
app[]{f:platform""}{{0
@ -60,7 +57,6 @@ app[]{f:platform""}{{0
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_044.md:2:1:2:2:**
```roc
}}
@ -72,7 +68,6 @@ Here is the problematic code:
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_044.md:2:2:2:3:**
```roc
}}
@ -84,7 +79,6 @@ Here is the problematic code:
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_044.md:4:1:4:2:**
```roc
""
@ -96,7 +90,6 @@ Here is the problematic code:
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_044.md:4:2:4:2:**
```roc
""
@ -108,7 +101,6 @@ Here is the problematic code:
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_044.md:4:2:4:3:**
```roc
""

View file

@ -14,7 +14,6 @@ PARSE ERROR - fuzz_crash_045.md:1:51:1:51
A parsing error occurred: `expected_provides_close_square`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_045.md:1:51:1:51:**
```roc
platform""requires{}{}exposes[]packages{}provides[

View file

@ -17,7 +17,6 @@ PARSE ERROR - fuzz_crash_050.md:3:2:3:2
The token **)** is not expected in an expression.
Expressions can be identifiers, literals, function calls, or operators.
Here is the problematic code:
**fuzz_crash_050.md:2:1:2:2:**
```roc
)
@ -29,7 +28,6 @@ Here is the problematic code:
A parsing error occurred: `expected_expr_close_curly`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_050.md:3:2:3:2:**
```roc

View file

@ -15,7 +15,6 @@ PARSE ERROR - fuzz_crash_051.md:1:22:1:22
A parsing error occurred: `exposed_item_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_051.md:1:8:1:9:**
```roc
module[}{0 0)(0}
@ -27,7 +26,6 @@ module[}{0 0)(0}
A parsing error occurred: `header_expected_close_square`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_051.md:1:22:1:22:**
```roc
module[}{0 0)(0}

View file

@ -17,7 +17,6 @@ MODULE NOT FOUND - fuzz_crash_052.md:1:9:2:2
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_052.md:3:1:3:2:**
```roc
0

View file

@ -15,7 +15,6 @@ PARSE ERROR - fuzz_crash_053.md:1:15:1:15
A parsing error occurred: `exposed_item_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_053.md:1:8:1:9:**
```roc
module[){..0,)
@ -27,7 +26,6 @@ module[){..0,)
A parsing error occurred: `header_expected_close_square`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_053.md:1:15:1:15:**
```roc
module[){..0,)

View file

@ -14,7 +14,6 @@ PARSE ERROR - fuzz_crash_057.md:1:39:1:42
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_057.md:1:39:1:42:**
```roc
module[]s:b->c where module(a).t:c,u:o...

View file

@ -12,7 +12,11 @@ app[]{f:platform"",r:"
UNCLOSED STRING - :0:0:0:0
# PROBLEMS
**UNCLOSED STRING**
This string is missing a closing quote.
This string is missing a closing quote.```roc
app[]{f:platform"",r:"
```
^
# TOKENS
~~~zig

View file

@ -23,7 +23,6 @@ MODULE NOT FOUND - fuzz_crash_059.md:1:20:2:2
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_059.md:2:3:2:5:**
```roc
G if 0{}else||0
@ -35,7 +34,6 @@ G if 0{}else||0
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_059.md:2:6:2:7:**
```roc
G if 0{}else||0
@ -47,7 +45,6 @@ G if 0{}else||0
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_059.md:2:7:2:8:**
```roc
G if 0{}else||0
@ -59,7 +56,6 @@ G if 0{}else||0
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_059.md:2:8:2:9:**
```roc
G if 0{}else||0
@ -71,7 +67,6 @@ G if 0{}else||0
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_059.md:2:9:2:13:**
```roc
G if 0{}else||0
@ -83,7 +78,6 @@ G if 0{}else||0
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_059.md:2:13:2:14:**
```roc
G if 0{}else||0
@ -95,7 +89,6 @@ G if 0{}else||0
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_059.md:2:14:2:15:**
```roc
G if 0{}else||0
@ -107,7 +100,6 @@ G if 0{}else||0
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_059.md:2:15:2:16:**
```roc
G if 0{}else||0

View file

@ -26,13 +26,16 @@ PARSE ERROR - fuzz_crash_060.md:3:1:3:2
UNDECLARED TYPE VARIABLE - fuzz_crash_060.md:1:11:1:12
# PROBLEMS
**UNCLOSED STRING**
This string is missing a closing quote.
This string is missing a closing quote.```roc
0"
```
^
**PARSE ERROR**
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_060.md:1:12:1:13:**
```roc
module[]C:k||match 0{0|#
@ -44,7 +47,6 @@ module[]C:k||match 0{0|#
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_060.md:1:13:1:14:**
```roc
module[]C:k||match 0{0|#
@ -56,7 +58,6 @@ module[]C:k||match 0{0|#
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_060.md:1:14:1:19:**
```roc
module[]C:k||match 0{0|#
@ -68,7 +69,6 @@ module[]C:k||match 0{0|#
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_060.md:1:20:1:21:**
```roc
module[]C:k||match 0{0|#
@ -80,7 +80,6 @@ module[]C:k||match 0{0|#
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_060.md:1:21:1:22:**
```roc
module[]C:k||match 0{0|#
@ -92,7 +91,6 @@ module[]C:k||match 0{0|#
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_060.md:1:22:1:23:**
```roc
module[]C:k||match 0{0|#
@ -104,7 +102,6 @@ module[]C:k||match 0{0|#
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_060.md:1:23:1:24:**
```roc
module[]C:k||match 0{0|#
@ -116,7 +113,6 @@ module[]C:k||match 0{0|#
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_060.md:2:1:2:2:**
```roc
0"
@ -128,7 +124,6 @@ Here is the problematic code:
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_060.md:2:2:2:3:**
```roc
0"
@ -140,7 +135,6 @@ Here is the problematic code:
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_060.md:2:3:2:3:**
```roc
0"
@ -152,7 +146,6 @@ Here is the problematic code:
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_060.md:2:3:2:3:**
```roc
0"
@ -164,7 +157,6 @@ Here is the problematic code:
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_060.md:3:1:3:2:**
```roc
}

View file

@ -15,13 +15,16 @@ PARSE ERROR - fuzz_crash_061.md:2:11:2:12
PARSE ERROR - fuzz_crash_061.md:2:16:2:22
# PROBLEMS
**UNCLOSED STRING**
This string is missing a closing quote.
This string is missing a closing quote.```roc
platform"
```
^
**UNEXPECTED TOKEN IN TYPE ANNOTATION**
The token **0** is not expected in a type annotation.
Type annotations should contain types like _Str_, _Num a_, or _List U64_.
Here is the problematic code:
**fuzz_crash_061.md:2:14:2:15:**
```roc
requires{}{n:0[import S exposing[
@ -33,7 +36,6 @@ requires{}{n:0[import S exposing[
A parsing error occurred: `expected_requires_signatures_close_curly`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_061.md:2:11:2:12:**
```roc
requires{}{n:0[import S exposing[
@ -45,7 +47,6 @@ requires{}{n:0[import S exposing[
A parsing error occurred: `import_exposing_no_close`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_061.md:2:16:2:22:**
```roc
requires{}{n:0[import S exposing[

View file

@ -16,7 +16,6 @@ PARSE ERROR - fuzz_crash_062.md:2:9:2:9
A parsing error occurred: `exposed_item_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_062.md:1:8:1:9:**
```roc
module[}|0
@ -28,7 +27,6 @@ module[}|0
A parsing error occurred: `header_expected_close_square`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_062.md:2:9:2:9:**
```roc
as s|||0

View file

@ -15,7 +15,6 @@ PARSE ERROR - fuzz_crash_063.md:1:13:1:13
A parsing error occurred: `exposed_item_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_063.md:1:8:1:9:**
```roc
module[}0}.a
@ -27,7 +26,6 @@ module[}0}.a
A parsing error occurred: `header_expected_close_square`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_063.md:1:13:1:13:**
```roc
module[}0}.a

View file

@ -15,7 +15,6 @@ PARSE ERROR - fuzz_crash_065.md:1:11:1:12
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_065.md:1:9:1:10:**
```roc
module[]{R}
@ -39,7 +38,6 @@ Other valid examples:
`Result(a, Str)`
`Maybe(List(U64))`
Here is the problematic code:
**fuzz_crash_065.md:1:11:1:12:**
```roc
module[]{R}
@ -58,7 +56,7 @@ KwModule(1:1-1:7),OpenSquare(1:7-1:8),CloseSquare(1:8-1:9),OpenCurly(1:9-1:10),U
(exposes @1.7-1.9))
(statements
(s-malformed @1.9-1.10 (tag "statement_unexpected_token"))
(s-malformed @1.10-1.12 (tag "expected_colon_after_type_annotation"))))
(s-malformed @1.11-1.12 (tag "expected_colon_after_type_annotation"))))
~~~
# FORMATTED
~~~roc

View file

@ -17,7 +17,6 @@ MALFORMED TYPE - fuzz_crash_066.md:3:4:3:5
The token **0** is not expected in a type annotation.
Type annotations should contain types like _Str_, _Num a_, or _List U64_.
Here is the problematic code:
**fuzz_crash_066.md:3:4:3:5:**
```roc
C:[0]

View file

@ -18,7 +18,6 @@ PARSE ERROR - fuzz_crash_068.md:1:13:1:14
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_068.md:1:9:1:10:**
```roc
module[]({0})
@ -30,7 +29,6 @@ module[]({0})
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_068.md:1:10:1:11:**
```roc
module[]({0})
@ -42,7 +40,6 @@ module[]({0})
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_068.md:1:11:1:12:**
```roc
module[]({0})
@ -54,7 +51,6 @@ module[]({0})
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_068.md:1:12:1:13:**
```roc
module[]({0})
@ -66,7 +62,6 @@ module[]({0})
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_068.md:1:13:1:14:**
```roc
module[]({0})

View file

@ -17,7 +17,6 @@ PARSE ERROR - fuzz_crash_070.md:1:17:1:19
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_070.md:1:9:1:10:**
```roc
module[]()0 .t
@ -29,7 +28,6 @@ module[]()0 .t
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_070.md:1:10:1:11:**
```roc
module[]()0 .t
@ -41,7 +39,6 @@ module[]()0 .t
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_070.md:1:11:1:12:**
```roc
module[]()0 .t
@ -53,7 +50,6 @@ module[]()0 .t
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_070.md:1:17:1:19:**
```roc
module[]()0 .t

View file

@ -23,7 +23,6 @@ PARSE ERROR - fuzz_crash_072.md:1:18:1:19
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_072.md:1:9:1:10:**
```roc
module[]({})(!{0})
@ -35,7 +34,6 @@ module[]({})(!{0})
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_072.md:1:10:1:11:**
```roc
module[]({})(!{0})
@ -47,7 +45,6 @@ module[]({})(!{0})
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_072.md:1:11:1:12:**
```roc
module[]({})(!{0})
@ -59,7 +56,6 @@ module[]({})(!{0})
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_072.md:1:12:1:13:**
```roc
module[]({})(!{0})
@ -71,7 +67,6 @@ module[]({})(!{0})
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_072.md:1:13:1:14:**
```roc
module[]({})(!{0})
@ -83,7 +78,6 @@ module[]({})(!{0})
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_072.md:1:14:1:15:**
```roc
module[]({})(!{0})
@ -95,7 +89,6 @@ module[]({})(!{0})
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_072.md:1:15:1:16:**
```roc
module[]({})(!{0})
@ -107,7 +100,6 @@ module[]({})(!{0})
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_072.md:1:16:1:17:**
```roc
module[]({})(!{0})
@ -119,7 +111,6 @@ module[]({})(!{0})
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_072.md:1:17:1:18:**
```roc
module[]({})(!{0})
@ -131,7 +122,6 @@ module[]({})(!{0})
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_072.md:1:18:1:19:**
```roc
module[]({})(!{0})

View file

@ -20,7 +20,6 @@ ASCII control characters are not allowed in Roc source code.
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_073.md:1:9:1:10:**
```roc
module[]!0.t
@ -32,7 +31,6 @@ module[]!0.t
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_073.md:1:10:1:11:**
```roc
module[]!0.t
@ -44,7 +42,6 @@ module[]!0.t
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_crash_073.md:1:12:1:14:**
```roc
module[]!0.t

View file

@ -19,7 +19,6 @@ For example:
or for an app:
app [main!] { pf: platform "../basic-cli/platform.roc" }
Here is the problematic code:
**fuzz_hang_001.md:1:1:1:2:**
```roc
0 (
@ -31,7 +30,6 @@ Here is the problematic code:
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**fuzz_hang_001.md:1:3:1:4:**
```roc
0 (

View file

@ -14,7 +14,6 @@ PARSE ERROR - header_expected_open_bracket.md:1:7:1:7
A parsing error occurred: `header_expected_open_square`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**header_expected_open_bracket.md:1:7:1:7:**
```roc
module

View file

@ -42,9 +42,9 @@ UNEXPECTED TOKEN IN EXPRESSION - let_polymorphism_lists.md:13:26:13:27
PARSE ERROR - let_polymorphism_lists.md:13:28:13:41
UNEXPECTED TOKEN IN EXPRESSION - let_polymorphism_lists.md:14:30:14:31
PARSE ERROR - let_polymorphism_lists.md:14:32:14:45
UNKNOWN OPERATOR - let_polymorphism_lists.md:12:16:12:27
UNKNOWN OPERATOR - let_polymorphism_lists.md:13:16:13:27
UNKNOWN OPERATOR - let_polymorphism_lists.md:14:18:14:31
UNRECOGNIZED SYNTAX - let_polymorphism_lists.md:12:16:12:27
UNRECOGNIZED SYNTAX - let_polymorphism_lists.md:13:16:13:27
UNRECOGNIZED SYNTAX - let_polymorphism_lists.md:14:18:14:31
UNDEFINED VARIABLE - let_polymorphism_lists.md:25:12:25:20
UNDEFINED VARIABLE - let_polymorphism_lists.md:26:12:26:20
UNDEFINED VARIABLE - let_polymorphism_lists.md:27:12:27:20
@ -53,7 +53,6 @@ UNDEFINED VARIABLE - let_polymorphism_lists.md:27:12:27:20
The token **+** is not expected in an expression.
Expressions can be identifiers, literals, function calls, or operators.
Here is the problematic code:
**let_polymorphism_lists.md:12:26:12:27:**
```roc
all_int_list = int_list ++ my_empty_list
@ -65,7 +64,6 @@ all_int_list = int_list ++ my_empty_list
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**let_polymorphism_lists.md:12:28:12:41:**
```roc
all_int_list = int_list ++ my_empty_list
@ -77,7 +75,6 @@ all_int_list = int_list ++ my_empty_list
The token **+** is not expected in an expression.
Expressions can be identifiers, literals, function calls, or operators.
Here is the problematic code:
**let_polymorphism_lists.md:13:26:13:27:**
```roc
all_str_list = str_list ++ my_empty_list
@ -89,7 +86,6 @@ all_str_list = str_list ++ my_empty_list
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**let_polymorphism_lists.md:13:28:13:41:**
```roc
all_str_list = str_list ++ my_empty_list
@ -101,7 +97,6 @@ all_str_list = str_list ++ my_empty_list
The token **+** is not expected in an expression.
Expressions can be identifiers, literals, function calls, or operators.
Here is the problematic code:
**let_polymorphism_lists.md:14:30:14:31:**
```roc
all_float_list = float_list ++ my_empty_list
@ -113,7 +108,6 @@ all_float_list = float_list ++ my_empty_list
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**let_polymorphism_lists.md:14:32:14:45:**
```roc
all_float_list = float_list ++ my_empty_list
@ -121,8 +115,8 @@ all_float_list = float_list ++ my_empty_list
^^^^^^^^^^^^^
**UNKNOWN OPERATOR**
This looks like an operator, but it's not one I recognize!
**UNRECOGNIZED SYNTAX**
I don't recognize this syntax.
**let_polymorphism_lists.md:12:16:12:27:**
```roc
@ -130,10 +124,10 @@ all_int_list = int_list ++ my_empty_list
```
^^^^^^^^^^^
Check the spelling and make sure you're using a valid Roc operator like `+`, `-`, `==`.
This might be a syntax error, an unsupported language feature, or a typo.
**UNKNOWN OPERATOR**
This looks like an operator, but it's not one I recognize!
**UNRECOGNIZED SYNTAX**
I don't recognize this syntax.
**let_polymorphism_lists.md:13:16:13:27:**
```roc
@ -141,10 +135,10 @@ all_str_list = str_list ++ my_empty_list
```
^^^^^^^^^^^
Check the spelling and make sure you're using a valid Roc operator like `+`, `-`, `==`.
This might be a syntax error, an unsupported language feature, or a typo.
**UNKNOWN OPERATOR**
This looks like an operator, but it's not one I recognize!
**UNRECOGNIZED SYNTAX**
I don't recognize this syntax.
**let_polymorphism_lists.md:14:18:14:31:**
```roc
@ -152,7 +146,7 @@ all_float_list = float_list ++ my_empty_list
```
^^^^^^^^^^^^^
Check the spelling and make sure you're using a valid Roc operator like `+`, `-`, `==`.
This might be a syntax error, an unsupported language feature, or a typo.
**UNDEFINED VARIABLE**
Nothing is named `len` in this scope.

View file

@ -50,7 +50,6 @@ UNUSED VARIABLE - let_polymorphism_records.md:19:27:19:36
The token **&** is not expected in an expression.
Expressions can be identifiers, literals, function calls, or operators.
Here is the problematic code:
**let_polymorphism_records.md:19:50:19:51:**
```roc
update_data = |container, new_value| { container & data: new_value }

View file

@ -14,7 +14,7 @@ match value {
# EXPECTED
PARSE ERROR - guards_1.md:2:7:2:7
UNEXPECTED TOKEN IN EXPRESSION - guards_1.md:2:16:2:18
PARSE ERROR - guards_1.md:2:19:2:20
IF WITHOUT ELSE - guards_1.md:2:7:2:9
UNEXPECTED TOKEN IN PATTERN - guards_1.md:2:20:2:30
PARSE ERROR - guards_1.md:2:30:2:30
UNEXPECTED TOKEN IN EXPRESSION - guards_1.md:2:30:2:32
@ -26,7 +26,7 @@ PARSE ERROR - guards_1.md:2:44:2:44
UNEXPECTED TOKEN IN EXPRESSION - guards_1.md:2:44:2:45
PARSE ERROR - guards_1.md:3:7:3:7
UNEXPECTED TOKEN IN EXPRESSION - guards_1.md:3:16:3:18
PARSE ERROR - guards_1.md:3:19:3:20
IF WITHOUT ELSE - guards_1.md:3:7:3:9
UNEXPECTED TOKEN IN PATTERN - guards_1.md:3:20:3:30
PARSE ERROR - guards_1.md:3:30:3:30
UNEXPECTED TOKEN IN EXPRESSION - guards_1.md:3:30:3:32
@ -37,14 +37,13 @@ UNEXPECTED TOKEN IN PATTERN - guards_1.md:3:44:3:44
PARSE ERROR - guards_1.md:3:44:3:44
UNEXPECTED TOKEN IN EXPRESSION - guards_1.md:3:44:3:45
UNDEFINED VARIABLE - guards_1.md:1:7:1:12
UNKNOWN OPERATOR - guards_1.md:2:19:2:20
UNRECOGNIZED SYNTAX - guards_1.md:2:7:2:20
UNUSED VARIABLE - guards_1.md:2:5:2:6
# PROBLEMS
**PARSE ERROR**
A parsing error occurred: `match_branch_missing_arrow`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**guards_1.md:2:7:2:7:**
```roc
x if x > 0 => "positive: ${Num.toStr x}"
@ -56,7 +55,6 @@ Here is the problematic code:
The token **=>** is not expected in an expression.
Expressions can be identifiers, literals, function calls, or operators.
Here is the problematic code:
**guards_1.md:2:16:2:18:**
```roc
x if x > 0 => "positive: ${Num.toStr x}"
@ -64,23 +62,22 @@ Here is the problematic code:
^^
**PARSE ERROR**
A parsing error occurred: `no_else`
This is an unexpected parsing error. Please check your syntax.
**IF WITHOUT ELSE**
This `if` is being used as an expression, but it doesn't have an `else`.
Here is the problematic code:
**guards_1.md:2:19:2:20:**
When `if` is used as an expression (to evaluate to a value), it must have an `else` branch to specify what value to use when the condition is `False`.
**guards_1.md:2:7:2:9:**
```roc
x if x > 0 => "positive: ${Num.toStr x}"
```
^
^^
**UNEXPECTED TOKEN IN PATTERN**
The token **positive: ** is not expected in a pattern.
Patterns can contain identifiers, literals, lists, records, or tags.
Here is the problematic code:
**guards_1.md:2:20:2:30:**
```roc
x if x > 0 => "positive: ${Num.toStr x}"
@ -92,7 +89,6 @@ Here is the problematic code:
A parsing error occurred: `match_branch_missing_arrow`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**guards_1.md:2:30:2:30:**
```roc
x if x > 0 => "positive: ${Num.toStr x}"
@ -104,7 +100,6 @@ Here is the problematic code:
The token **${** is not expected in an expression.
Expressions can be identifiers, literals, function calls, or operators.
Here is the problematic code:
**guards_1.md:2:30:2:32:**
```roc
x if x > 0 => "positive: ${Num.toStr x}"
@ -116,7 +111,6 @@ Here is the problematic code:
The token **Num** is not expected in a pattern.
Patterns can contain identifiers, literals, lists, records, or tags.
Here is the problematic code:
**guards_1.md:2:32:2:35:**
```roc
x if x > 0 => "positive: ${Num.toStr x}"
@ -128,7 +122,6 @@ Here is the problematic code:
A parsing error occurred: `match_branch_missing_arrow`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**guards_1.md:2:43:2:43:**
```roc
x if x > 0 => "positive: ${Num.toStr x}"
@ -140,7 +133,6 @@ Here is the problematic code:
The token **}** is not expected in an expression.
Expressions can be identifiers, literals, function calls, or operators.
Here is the problematic code:
**guards_1.md:2:43:2:44:**
```roc
x if x > 0 => "positive: ${Num.toStr x}"
@ -152,7 +144,6 @@ Here is the problematic code:
The token is not expected in a pattern.
Patterns can contain identifiers, literals, lists, records, or tags.
Here is the problematic code:
**guards_1.md:2:44:2:44:**
```roc
x if x > 0 => "positive: ${Num.toStr x}"
@ -164,7 +155,6 @@ Here is the problematic code:
A parsing error occurred: `match_branch_missing_arrow`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**guards_1.md:2:44:2:44:**
```roc
x if x > 0 => "positive: ${Num.toStr x}"
@ -176,7 +166,6 @@ Here is the problematic code:
The token **"** is not expected in an expression.
Expressions can be identifiers, literals, function calls, or operators.
Here is the problematic code:
**guards_1.md:2:44:2:45:**
```roc
x if x > 0 => "positive: ${Num.toStr x}"
@ -188,7 +177,6 @@ Here is the problematic code:
A parsing error occurred: `match_branch_missing_arrow`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**guards_1.md:3:7:3:7:**
```roc
x if x < 0 => "negative: ${Num.toStr x}"
@ -200,7 +188,6 @@ Here is the problematic code:
The token **=>** is not expected in an expression.
Expressions can be identifiers, literals, function calls, or operators.
Here is the problematic code:
**guards_1.md:3:16:3:18:**
```roc
x if x < 0 => "negative: ${Num.toStr x}"
@ -208,23 +195,22 @@ Here is the problematic code:
^^
**PARSE ERROR**
A parsing error occurred: `no_else`
This is an unexpected parsing error. Please check your syntax.
**IF WITHOUT ELSE**
This `if` is being used as an expression, but it doesn't have an `else`.
Here is the problematic code:
**guards_1.md:3:19:3:20:**
When `if` is used as an expression (to evaluate to a value), it must have an `else` branch to specify what value to use when the condition is `False`.
**guards_1.md:3:7:3:9:**
```roc
x if x < 0 => "negative: ${Num.toStr x}"
```
^
^^
**UNEXPECTED TOKEN IN PATTERN**
The token **negative: ** is not expected in a pattern.
Patterns can contain identifiers, literals, lists, records, or tags.
Here is the problematic code:
**guards_1.md:3:20:3:30:**
```roc
x if x < 0 => "negative: ${Num.toStr x}"
@ -236,7 +222,6 @@ Here is the problematic code:
A parsing error occurred: `match_branch_missing_arrow`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**guards_1.md:3:30:3:30:**
```roc
x if x < 0 => "negative: ${Num.toStr x}"
@ -248,7 +233,6 @@ Here is the problematic code:
The token **${** is not expected in an expression.
Expressions can be identifiers, literals, function calls, or operators.
Here is the problematic code:
**guards_1.md:3:30:3:32:**
```roc
x if x < 0 => "negative: ${Num.toStr x}"
@ -260,7 +244,6 @@ Here is the problematic code:
The token **Num** is not expected in a pattern.
Patterns can contain identifiers, literals, lists, records, or tags.
Here is the problematic code:
**guards_1.md:3:32:3:35:**
```roc
x if x < 0 => "negative: ${Num.toStr x}"
@ -272,7 +255,6 @@ Here is the problematic code:
A parsing error occurred: `match_branch_missing_arrow`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**guards_1.md:3:43:3:43:**
```roc
x if x < 0 => "negative: ${Num.toStr x}"
@ -284,7 +266,6 @@ Here is the problematic code:
The token **}** is not expected in an expression.
Expressions can be identifiers, literals, function calls, or operators.
Here is the problematic code:
**guards_1.md:3:43:3:44:**
```roc
x if x < 0 => "negative: ${Num.toStr x}"
@ -296,7 +277,6 @@ Here is the problematic code:
The token is not expected in a pattern.
Patterns can contain identifiers, literals, lists, records, or tags.
Here is the problematic code:
**guards_1.md:3:44:3:44:**
```roc
x if x < 0 => "negative: ${Num.toStr x}"
@ -308,7 +288,6 @@ Here is the problematic code:
A parsing error occurred: `match_branch_missing_arrow`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**guards_1.md:3:44:3:44:**
```roc
x if x < 0 => "negative: ${Num.toStr x}"
@ -320,7 +299,6 @@ Here is the problematic code:
The token **"** is not expected in an expression.
Expressions can be identifiers, literals, function calls, or operators.
Here is the problematic code:
**guards_1.md:3:44:3:45:**
```roc
x if x < 0 => "negative: ${Num.toStr x}"
@ -339,16 +317,16 @@ match value {
^^^^^
**UNKNOWN OPERATOR**
This looks like an operator, but it's not one I recognize!
**UNRECOGNIZED SYNTAX**
I don't recognize this syntax.
**guards_1.md:2:19:2:20:**
**guards_1.md:2:7:2:20:**
```roc
x if x > 0 => "positive: ${Num.toStr x}"
```
^
^^^^^^^^^^^^^
Check the spelling and make sure you're using a valid Roc operator like `+`, `-`, `==`.
This might be a syntax error, an unsupported language feature, or a typo.
**UNUSED VARIABLE**
Variable `x` is not used anywhere in your code.
@ -377,7 +355,7 @@ CloseCurly(5:1-5:2),EndOfFile(5:2-5:2),
(branches
(branch @2.5-2.20
(p-ident @2.5-2.6 (raw "x"))
(e-malformed @2.19-2.20 (reason "no_else")))
(e-malformed @2.7-2.20 (reason "no_else")))
(branch @2.20-2.32
(p-malformed @2.20-2.30 (tag "pattern_unexpected_token"))
(e-malformed @2.30-2.32 (reason "expr_unexpected_token")))
@ -389,7 +367,7 @@ CloseCurly(5:1-5:2),EndOfFile(5:2-5:2),
(e-malformed @2.44-2.45 (reason "expr_unexpected_token")))
(branch @3.5-3.20
(p-ident @3.5-3.6 (raw "x"))
(e-malformed @3.19-3.20 (reason "no_else")))
(e-malformed @3.7-3.20 (reason "no_else")))
(branch @3.20-3.32
(p-malformed @3.20-3.30 (tag "pattern_unexpected_token"))
(e-malformed @3.30-3.32 (reason "expr_unexpected_token")))
@ -424,5 +402,5 @@ match value {
~~~
# TYPES
~~~clojure
(expr @2.19-2.20 (type "Error"))
(expr @2.7-2.20 (type "Error"))
~~~

View file

@ -14,7 +14,7 @@ match value {
# EXPECTED
PARSE ERROR - guards_2.md:2:25:2:25
UNEXPECTED TOKEN IN EXPRESSION - guards_2.md:2:47:2:49
PARSE ERROR - guards_2.md:2:50:2:51
IF WITHOUT ELSE - guards_2.md:2:25:2:27
UNEXPECTED TOKEN IN PATTERN - guards_2.md:2:51:2:75
PARSE ERROR - guards_2.md:2:75:2:75
UNEXPECTED TOKEN IN EXPRESSION - guards_2.md:2:75:2:77
@ -26,7 +26,7 @@ PARSE ERROR - guards_2.md:2:93:2:93
UNEXPECTED TOKEN IN EXPRESSION - guards_2.md:2:93:2:94
PARSE ERROR - guards_2.md:3:12:3:12
UNEXPECTED TOKEN IN EXPRESSION - guards_2.md:3:22:3:24
PARSE ERROR - guards_2.md:3:25:3:26
IF WITHOUT ELSE - guards_2.md:3:12:3:14
UNEXPECTED TOKEN IN PATTERN - guards_2.md:3:26:3:48
PARSE ERROR - guards_2.md:3:48:3:48
UNEXPECTED TOKEN IN EXPRESSION - guards_2.md:3:48:3:50
@ -37,7 +37,7 @@ UNEXPECTED TOKEN IN PATTERN - guards_2.md:3:62:3:62
PARSE ERROR - guards_2.md:3:62:3:62
UNEXPECTED TOKEN IN EXPRESSION - guards_2.md:3:62:3:63
UNDEFINED VARIABLE - guards_2.md:1:7:1:12
UNKNOWN OPERATOR - guards_2.md:2:50:2:51
UNRECOGNIZED SYNTAX - guards_2.md:2:25:2:51
UNUSED VARIABLE - guards_2.md:2:6:2:11
UNUSED VARIABLE - guards_2.md:1:1:1:1
# PROBLEMS
@ -45,7 +45,6 @@ UNUSED VARIABLE - guards_2.md:1:1:1:1
A parsing error occurred: `match_branch_missing_arrow`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**guards_2.md:2:25:2:25:**
```roc
[first, .. as rest] if List.len(rest) > 5 => "long list starting with ${Num.toStr first}"
@ -57,7 +56,6 @@ Here is the problematic code:
The token **=>** is not expected in an expression.
Expressions can be identifiers, literals, function calls, or operators.
Here is the problematic code:
**guards_2.md:2:47:2:49:**
```roc
[first, .. as rest] if List.len(rest) > 5 => "long list starting with ${Num.toStr first}"
@ -65,23 +63,22 @@ Here is the problematic code:
^^
**PARSE ERROR**
A parsing error occurred: `no_else`
This is an unexpected parsing error. Please check your syntax.
**IF WITHOUT ELSE**
This `if` is being used as an expression, but it doesn't have an `else`.
Here is the problematic code:
**guards_2.md:2:50:2:51:**
When `if` is used as an expression (to evaluate to a value), it must have an `else` branch to specify what value to use when the condition is `False`.
**guards_2.md:2:25:2:27:**
```roc
[first, .. as rest] if List.len(rest) > 5 => "long list starting with ${Num.toStr first}"
```
^
^^
**UNEXPECTED TOKEN IN PATTERN**
The token **long list starting with ** is not expected in a pattern.
Patterns can contain identifiers, literals, lists, records, or tags.
Here is the problematic code:
**guards_2.md:2:51:2:75:**
```roc
[first, .. as rest] if List.len(rest) > 5 => "long list starting with ${Num.toStr first}"
@ -93,7 +90,6 @@ Here is the problematic code:
A parsing error occurred: `match_branch_missing_arrow`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**guards_2.md:2:75:2:75:**
```roc
[first, .. as rest] if List.len(rest) > 5 => "long list starting with ${Num.toStr first}"
@ -105,7 +101,6 @@ Here is the problematic code:
The token **${** is not expected in an expression.
Expressions can be identifiers, literals, function calls, or operators.
Here is the problematic code:
**guards_2.md:2:75:2:77:**
```roc
[first, .. as rest] if List.len(rest) > 5 => "long list starting with ${Num.toStr first}"
@ -117,7 +112,6 @@ Here is the problematic code:
The token **Num** is not expected in a pattern.
Patterns can contain identifiers, literals, lists, records, or tags.
Here is the problematic code:
**guards_2.md:2:77:2:80:**
```roc
[first, .. as rest] if List.len(rest) > 5 => "long list starting with ${Num.toStr first}"
@ -129,7 +123,6 @@ Here is the problematic code:
A parsing error occurred: `match_branch_missing_arrow`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**guards_2.md:2:92:2:92:**
```roc
[first, .. as rest] if List.len(rest) > 5 => "long list starting with ${Num.toStr first}"
@ -141,7 +134,6 @@ Here is the problematic code:
The token **}** is not expected in an expression.
Expressions can be identifiers, literals, function calls, or operators.
Here is the problematic code:
**guards_2.md:2:92:2:93:**
```roc
[first, .. as rest] if List.len(rest) > 5 => "long list starting with ${Num.toStr first}"
@ -153,7 +145,6 @@ Here is the problematic code:
The token is not expected in a pattern.
Patterns can contain identifiers, literals, lists, records, or tags.
Here is the problematic code:
**guards_2.md:2:93:2:93:**
```roc
[first, .. as rest] if List.len(rest) > 5 => "long list starting with ${Num.toStr first}"
@ -165,7 +156,6 @@ Here is the problematic code:
A parsing error occurred: `match_branch_missing_arrow`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**guards_2.md:2:93:2:93:**
```roc
[first, .. as rest] if List.len(rest) > 5 => "long list starting with ${Num.toStr first}"
@ -177,7 +167,6 @@ Here is the problematic code:
The token **"** is not expected in an expression.
Expressions can be identifiers, literals, function calls, or operators.
Here is the problematic code:
**guards_2.md:2:93:2:94:**
```roc
[first, .. as rest] if List.len(rest) > 5 => "long list starting with ${Num.toStr first}"
@ -189,7 +178,6 @@ Here is the problematic code:
A parsing error occurred: `match_branch_missing_arrow`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**guards_2.md:3:12:3:12:**
```roc
[x, y] if x == y => "pair of equal values: ${Num.toStr x}"
@ -201,7 +189,6 @@ Here is the problematic code:
The token **=>** is not expected in an expression.
Expressions can be identifiers, literals, function calls, or operators.
Here is the problematic code:
**guards_2.md:3:22:3:24:**
```roc
[x, y] if x == y => "pair of equal values: ${Num.toStr x}"
@ -209,23 +196,22 @@ Here is the problematic code:
^^
**PARSE ERROR**
A parsing error occurred: `no_else`
This is an unexpected parsing error. Please check your syntax.
**IF WITHOUT ELSE**
This `if` is being used as an expression, but it doesn't have an `else`.
Here is the problematic code:
**guards_2.md:3:25:3:26:**
When `if` is used as an expression (to evaluate to a value), it must have an `else` branch to specify what value to use when the condition is `False`.
**guards_2.md:3:12:3:14:**
```roc
[x, y] if x == y => "pair of equal values: ${Num.toStr x}"
```
^
^^
**UNEXPECTED TOKEN IN PATTERN**
The token **pair of equal values: ** is not expected in a pattern.
Patterns can contain identifiers, literals, lists, records, or tags.
Here is the problematic code:
**guards_2.md:3:26:3:48:**
```roc
[x, y] if x == y => "pair of equal values: ${Num.toStr x}"
@ -237,7 +223,6 @@ Here is the problematic code:
A parsing error occurred: `match_branch_missing_arrow`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**guards_2.md:3:48:3:48:**
```roc
[x, y] if x == y => "pair of equal values: ${Num.toStr x}"
@ -249,7 +234,6 @@ Here is the problematic code:
The token **${** is not expected in an expression.
Expressions can be identifiers, literals, function calls, or operators.
Here is the problematic code:
**guards_2.md:3:48:3:50:**
```roc
[x, y] if x == y => "pair of equal values: ${Num.toStr x}"
@ -261,7 +245,6 @@ Here is the problematic code:
The token **Num** is not expected in a pattern.
Patterns can contain identifiers, literals, lists, records, or tags.
Here is the problematic code:
**guards_2.md:3:50:3:53:**
```roc
[x, y] if x == y => "pair of equal values: ${Num.toStr x}"
@ -273,7 +256,6 @@ Here is the problematic code:
A parsing error occurred: `match_branch_missing_arrow`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**guards_2.md:3:61:3:61:**
```roc
[x, y] if x == y => "pair of equal values: ${Num.toStr x}"
@ -285,7 +267,6 @@ Here is the problematic code:
The token **}** is not expected in an expression.
Expressions can be identifiers, literals, function calls, or operators.
Here is the problematic code:
**guards_2.md:3:61:3:62:**
```roc
[x, y] if x == y => "pair of equal values: ${Num.toStr x}"
@ -297,7 +278,6 @@ Here is the problematic code:
The token is not expected in a pattern.
Patterns can contain identifiers, literals, lists, records, or tags.
Here is the problematic code:
**guards_2.md:3:62:3:62:**
```roc
[x, y] if x == y => "pair of equal values: ${Num.toStr x}"
@ -309,7 +289,6 @@ Here is the problematic code:
A parsing error occurred: `match_branch_missing_arrow`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**guards_2.md:3:62:3:62:**
```roc
[x, y] if x == y => "pair of equal values: ${Num.toStr x}"
@ -321,7 +300,6 @@ Here is the problematic code:
The token **"** is not expected in an expression.
Expressions can be identifiers, literals, function calls, or operators.
Here is the problematic code:
**guards_2.md:3:62:3:63:**
```roc
[x, y] if x == y => "pair of equal values: ${Num.toStr x}"
@ -340,16 +318,16 @@ match value {
^^^^^
**UNKNOWN OPERATOR**
This looks like an operator, but it's not one I recognize!
**UNRECOGNIZED SYNTAX**
I don't recognize this syntax.
**guards_2.md:2:50:2:51:**
**guards_2.md:2:25:2:51:**
```roc
[first, .. as rest] if List.len(rest) > 5 => "long list starting with ${Num.toStr first}"
```
^
^^^^^^^^^^^^^^^^^^^^^^^^^^
Check the spelling and make sure you're using a valid Roc operator like `+`, `-`, `==`.
This might be a syntax error, an unsupported language feature, or a typo.
**UNUSED VARIABLE**
Variable `first` is not used anywhere in your code.
@ -392,7 +370,7 @@ CloseCurly(5:1-5:2),EndOfFile(5:2-5:2),
(p-list @2.5-2.24
(p-ident @2.6-2.11 (raw "first"))
(p-list-rest @2.13-2.23 (name "rest")))
(e-malformed @2.50-2.51 (reason "no_else")))
(e-malformed @2.25-2.51 (reason "no_else")))
(branch @2.51-2.77
(p-malformed @2.51-2.75 (tag "pattern_unexpected_token"))
(e-malformed @2.75-2.77 (reason "expr_unexpected_token")))
@ -406,7 +384,7 @@ CloseCurly(5:1-5:2),EndOfFile(5:2-5:2),
(p-list @3.5-3.11
(p-ident @3.6-3.7 (raw "x"))
(p-ident @3.9-3.10 (raw "y")))
(e-malformed @3.25-3.26 (reason "no_else")))
(e-malformed @3.12-3.26 (reason "no_else")))
(branch @3.26-3.50
(p-malformed @3.26-3.48 (tag "pattern_unexpected_token"))
(e-malformed @3.48-3.50 (reason "expr_unexpected_token")))
@ -441,5 +419,5 @@ match value {
~~~
# TYPES
~~~clojure
(expr @2.50-2.51 (type "Error"))
(expr @2.25-2.51 (type "Error"))
~~~

View file

@ -21,7 +21,6 @@ UNUSED VARIABLE - list_patterns.md:3:15:3:15
List rest patterns should use the `.. as name` syntax, not `..name`.
For example, use `[first, .. as rest]` instead of `[first, ..rest]`.
Here is the problematic code:
**list_patterns.md:3:13:3:19:**
```roc
[first, ..rest] => 0 # invalid rest pattern should error

View file

@ -28,7 +28,6 @@ UNUSED VARIABLE - list_rest_invalid.md:4:17:4:18
List rest patterns should use the `.. as name` syntax, not `..name`.
For example, use `[first, .. as rest]` instead of `[first, ..rest]`.
Here is the problematic code:
**list_rest_invalid.md:2:13:2:19:**
```roc
[first, ..rest] => 0 # invalid rest pattern should error
@ -40,7 +39,6 @@ Here is the problematic code:
List rest patterns should use the `.. as name` syntax, not `..name`.
For example, use `[first, .. as rest]` instead of `[first, ..rest]`.
Here is the problematic code:
**list_rest_invalid.md:3:6:3:12:**
```roc
[..rest, last] => 1 # invalid rest pattern should error
@ -52,7 +50,6 @@ Here is the problematic code:
List rest patterns should use the `.. as name` syntax, not `..name`.
For example, use `[first, .. as rest]` instead of `[first, ..rest]`.
Here is the problematic code:
**list_rest_invalid.md:4:9:4:15:**
```roc
[x, ..rest, y] => 2 # invalid rest pattern should error

View file

@ -24,7 +24,6 @@ UNUSED VARIABLE - list_rest_scoping.md:4:11:4:11
List rest patterns should use the `.. as name` syntax, not `..name`.
For example, use `[first, .. as rest]` instead of `[first, ..rest]`.
Here is the problematic code:
**list_rest_scoping.md:2:13:2:19:**
```roc
[first, ..rest] => first + 1
@ -36,7 +35,6 @@ Here is the problematic code:
List rest patterns should use the `.. as name` syntax, not `..name`.
For example, use `[first, .. as rest]` instead of `[first, ..rest]`.
Here is the problematic code:
**list_rest_scoping.md:3:6:3:12:**
```roc
[..rest, last] => last + 2
@ -48,7 +46,6 @@ Here is the problematic code:
List rest patterns should use the `.. as name` syntax, not `..name`.
For example, use `[first, .. as rest]` instead of `[first, ..rest]`.
Here is the problematic code:
**list_rest_scoping.md:4:9:4:15:**
```roc
[x, ..rest, y] => x + y

View file

@ -27,7 +27,6 @@ UNUSED VARIABLE - list_rest_scoping_variables.md:5:15:5:15
List rest patterns should use the `.. as name` syntax, not `..name`.
For example, use `[first, .. as rest]` instead of `[first, ..rest]`.
Here is the problematic code:
**list_rest_scoping_variables.md:2:6:2:13:**
```roc
[..items] => 1
@ -39,7 +38,6 @@ Here is the problematic code:
List rest patterns should use the `.. as name` syntax, not `..name`.
For example, use `[first, .. as rest]` instead of `[first, ..rest]`.
Here is the problematic code:
**list_rest_scoping_variables.md:3:13:3:20:**
```roc
[first, ..items] => first
@ -51,7 +49,6 @@ Here is the problematic code:
List rest patterns should use the `.. as name` syntax, not `..name`.
For example, use `[first, .. as rest]` instead of `[first, ..rest]`.
Here is the problematic code:
**list_rest_scoping_variables.md:4:6:4:13:**
```roc
[..items, last] => last
@ -63,7 +60,6 @@ Here is the problematic code:
List rest patterns should use the `.. as name` syntax, not `..name`.
For example, use `[first, .. as rest]` instead of `[first, ..rest]`.
Here is the problematic code:
**list_rest_scoping_variables.md:5:13:5:20:**
```roc
[first, ..items, last] => first + last

View file

@ -18,7 +18,6 @@ UNDEFINED VARIABLE - wrong_arrow.md:1:7:1:8
**PARSE ERROR**
Match branches use `=>` instead of `->`.
Here is the problematic code:
**wrong_arrow.md:2:8:2:8:**
```roc
[] -> Err(EmptyList)
@ -29,7 +28,6 @@ Here is the problematic code:
**PARSE ERROR**
Match branches use `=>` instead of `->`.
Here is the problematic code:
**wrong_arrow.md:3:13:3:13:**
```roc
[.., e] -> Ok(e)

View file

@ -45,7 +45,6 @@ UNDEFINED VARIABLE - multi_qualified_import.md:14:8:14:12
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**multi_qualified_import.md:3:17:3:22:**
```roc
import json.Core.Utf8 exposing [Encoder]
@ -57,7 +56,6 @@ import json.Core.Utf8 exposing [Encoder]
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**multi_qualified_import.md:3:23:3:31:**
```roc
import json.Core.Utf8 exposing [Encoder]
@ -69,7 +67,6 @@ import json.Core.Utf8 exposing [Encoder]
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**multi_qualified_import.md:3:32:3:33:**
```roc
import json.Core.Utf8 exposing [Encoder]
@ -93,7 +90,6 @@ Other valid examples:
`Result(a, Str)`
`Maybe(List(U64))`
Here is the problematic code:
**multi_qualified_import.md:3:40:3:41:**
```roc
import json.Core.Utf8 exposing [Encoder]
@ -105,7 +101,6 @@ import json.Core.Utf8 exposing [Encoder]
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**multi_qualified_import.md:14:12:14:17:**
```roc
data = json.Core.Utf8.encode("hello")
@ -117,7 +112,6 @@ data = json.Core.Utf8.encode("hello")
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**multi_qualified_import.md:14:17:14:22:**
```roc
data = json.Core.Utf8.encode("hello")
@ -129,7 +123,6 @@ data = json.Core.Utf8.encode("hello")
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**multi_qualified_import.md:14:22:14:29:**
```roc
data = json.Core.Utf8.encode("hello")
@ -141,7 +134,6 @@ data = json.Core.Utf8.encode("hello")
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**multi_qualified_import.md:14:29:14:30:**
```roc
data = json.Core.Utf8.encode("hello")
@ -153,7 +145,6 @@ data = json.Core.Utf8.encode("hello")
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**multi_qualified_import.md:14:30:14:31:**
```roc
data = json.Core.Utf8.encode("hello")
@ -165,7 +156,6 @@ data = json.Core.Utf8.encode("hello")
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**multi_qualified_import.md:14:31:14:36:**
```roc
data = json.Core.Utf8.encode("hello")
@ -177,7 +167,6 @@ data = json.Core.Utf8.encode("hello")
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**multi_qualified_import.md:14:36:14:37:**
```roc
data = json.Core.Utf8.encode("hello")
@ -189,7 +178,6 @@ data = json.Core.Utf8.encode("hello")
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**multi_qualified_import.md:14:37:14:38:**
```roc
data = json.Core.Utf8.encode("hello")
@ -318,7 +306,7 @@ LowerIdent(14:1-14:5),OpAssign(14:6-14:7),LowerIdent(14:8-14:12),NoSpaceDotUpper
(s-malformed @3.17-3.22 (tag "statement_unexpected_token"))
(s-malformed @3.23-3.31 (tag "statement_unexpected_token"))
(s-malformed @3.32-3.33 (tag "statement_unexpected_token"))
(s-malformed @3.33-3.41 (tag "expected_colon_after_type_annotation"))
(s-malformed @3.40-3.41 (tag "expected_colon_after_type_annotation"))
(s-type-anno @5.1-5.23 (name "json_encoder")
(ty @5.16-5.23 (name "Encoder")))
(s-decl @6.1-6.45

View file

@ -25,7 +25,6 @@ UNDECLARED TYPE - nominal_import_long_package.md:5:7:5:9
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**nominal_import_long_package.md:3:21:3:27:**
```roc
import design.Styles.Color exposing [Encoder as CE]
@ -37,7 +36,6 @@ import design.Styles.Color exposing [Encoder as CE]
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**nominal_import_long_package.md:3:28:3:36:**
```roc
import design.Styles.Color exposing [Encoder as CE]
@ -49,7 +47,6 @@ import design.Styles.Color exposing [Encoder as CE]
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**nominal_import_long_package.md:3:37:3:38:**
```roc
import design.Styles.Color exposing [Encoder as CE]
@ -73,7 +70,6 @@ Other valid examples:
`Result(a, Str)`
`Maybe(List(U64))`
Here is the problematic code:
**nominal_import_long_package.md:3:46:3:48:**
```roc
import design.Styles.Color exposing [Encoder as CE]
@ -97,7 +93,6 @@ Other valid examples:
`Result(a, Str)`
`Maybe(List(U64))`
Here is the problematic code:
**nominal_import_long_package.md:3:51:3:52:**
```roc
import design.Styles.Color exposing [Encoder as CE]
@ -146,8 +141,8 @@ LowerIdent(6:1-6:4),OpAssign(6:5-6:6),TripleDot(6:7-6:10),EndOfFile(6:28-6:28),
(s-malformed @3.21-3.27 (tag "statement_unexpected_token"))
(s-malformed @3.28-3.36 (tag "statement_unexpected_token"))
(s-malformed @3.37-3.38 (tag "statement_unexpected_token"))
(s-malformed @3.38-3.48 (tag "expected_colon_after_type_annotation"))
(s-malformed @3.49-3.52 (tag "expected_colon_after_type_annotation"))
(s-malformed @3.46-3.48 (tag "expected_colon_after_type_annotation"))
(s-malformed @3.51-3.52 (tag "expected_colon_after_type_annotation"))
(s-type-anno @5.1-5.9 (name "red")
(ty @5.7-5.9 (name "CE")))
(s-decl @6.1-6.10

View file

@ -29,7 +29,6 @@ UNDECLARED TYPE - nominal_import_wildcard.md:11:9:11:14
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**nominal_import_wildcard.md:3:13:3:15:**
```roc
import Color.*

View file

@ -34,7 +34,6 @@ UNDECLARED TYPE - nominal_mixed_scope.md:14:9:14:12
Import statements must appear at the top level of a module.
Move this import to the top of the file, after the module header but before any definitions.
Here is the problematic code:
**nominal_mixed_scope.md:9:5:9:11:**
```roc
import Color.RGB

View file

@ -49,7 +49,6 @@ Instead of writing **a -> b -> c**, use parentheses to clarify which you mean:
a -> (b -> c) for a **curried** function (a function that **returns** another function)
(a -> b) -> c for a **higher-order** function (a function that **takes** another function)
Here is the problematic code:
**underscore_in_regular_annotations.md:30:22:30:24:**
```roc
transform : _a -> _b -> _b
@ -61,7 +60,6 @@ transform : _a -> _b -> _b
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**underscore_in_regular_annotations.md:30:25:30:27:**
```roc
transform : _a -> _b -> _b

View file

@ -20,7 +20,6 @@ MODULE NOT FOUND - stmt_import.md:3:1:3:17
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**stmt_import.md:3:18:3:19:**
```roc
import json.Json [foo, BAR]
@ -32,7 +31,6 @@ import json.Json [foo, BAR]
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**stmt_import.md:3:19:3:22:**
```roc
import json.Json [foo, BAR]
@ -44,7 +42,6 @@ import json.Json [foo, BAR]
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**stmt_import.md:3:22:3:23:**
```roc
import json.Json [foo, BAR]
@ -68,7 +65,6 @@ Other valid examples:
`Result(a, Str)`
`Maybe(List(U64))`
Here is the problematic code:
**stmt_import.md:3:27:3:28:**
```roc
import json.Json [foo, BAR]
@ -102,7 +98,7 @@ KwImport(3:1-3:7),LowerIdent(3:8-3:12),NoSpaceDotUpperIdent(3:12-3:17),OpenSquar
(s-malformed @3.18-3.19 (tag "statement_unexpected_token"))
(s-malformed @3.19-3.22 (tag "statement_unexpected_token"))
(s-malformed @3.22-3.23 (tag "statement_unexpected_token"))
(s-malformed @3.24-3.28 (tag "expected_colon_after_type_annotation"))))
(s-malformed @3.27-3.28 (tag "expected_colon_after_type_annotation"))))
~~~
# FORMATTED
~~~roc

View file

@ -76,7 +76,6 @@ UNUSED VARIABLE - qualified_type_canonicalization.md:43:20:43:23
A parsing error occurred: `import_exposing_no_close`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**qualified_type_canonicalization.md:8:1:8:7:**
```roc
import Basics.Result
@ -100,7 +99,6 @@ Other valid examples:
`Result(a, Str)`
`Maybe(List(U64))`
Here is the problematic code:
**qualified_type_canonicalization.md:8:14:8:21:**
```roc
import Basics.Result
@ -112,7 +110,6 @@ import Basics.Result
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**qualified_type_canonicalization.md:10:15:10:23:**
```roc
import ModuleA.ModuleB exposing [TypeC]
@ -124,7 +121,6 @@ import ModuleA.ModuleB exposing [TypeC]
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**qualified_type_canonicalization.md:10:24:10:32:**
```roc
import ModuleA.ModuleB exposing [TypeC]
@ -136,7 +132,6 @@ import ModuleA.ModuleB exposing [TypeC]
A parsing error occurred: `statement_unexpected_token`
This is an unexpected parsing error. Please check your syntax.
Here is the problematic code:
**qualified_type_canonicalization.md:10:33:10:34:**
```roc
import ModuleA.ModuleB exposing [TypeC]
@ -160,7 +155,6 @@ Other valid examples:
`Result(a, Str)`
`Maybe(List(U64))`
Here is the problematic code:
**qualified_type_canonicalization.md:10:39:10:40:**
```roc
import ModuleA.ModuleB exposing [TypeC]
@ -420,13 +414,13 @@ CloseCurly(44:5-44:6),EndOfFile(44:6-44:6),
(file @1.1-44.6
(malformed-header @8.1-8.7 (tag "import_exposing_no_close"))
(statements
(s-malformed @8.8-8.21 (tag "expected_colon_after_type_annotation"))
(s-malformed @8.14-8.21 (tag "expected_colon_after_type_annotation"))
(s-import @9.1-9.13 (raw "Color"))
(s-import @10.1-10.15 (raw "ModuleA"))
(s-malformed @10.15-10.23 (tag "statement_unexpected_token"))
(s-malformed @10.24-10.32 (tag "statement_unexpected_token"))
(s-malformed @10.33-10.34 (tag "statement_unexpected_token"))
(s-malformed @10.34-10.40 (tag "expected_colon_after_type_annotation"))
(s-malformed @10.39-10.40 (tag "expected_colon_after_type_annotation"))
(s-import @11.1-11.32 (raw "ExternalModule") (alias "ExtMod"))
(s-type-anno @14.1-14.28 (name "simpleQualified")
(ty @14.19-14.28 (name "Color.RGB")))

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