mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 04:08:19 +00:00
Several fixes found in fuzzing
This commit is contained in:
parent
e9caada3f1
commit
b9862b47dc
49 changed files with 1060 additions and 523 deletions
|
@ -1 +1 @@
|
|||
Expr(When(IfGuard(Start(@28), @27), @0), @0)
|
||||
Expr(When(IfGuard(Start(@27), @27), @0), @0)
|
|
@ -0,0 +1 @@
|
|||
Expr(If(Condition(Start(@2), @2), @0), @0)
|
|
@ -0,0 +1 @@
|
|||
if!==9
|
|
@ -1,4 +1,4 @@
|
|||
UserId x : [UserId I64]
|
||||
(UserId x) = UserId 42
|
||||
UserId x = UserId 42
|
||||
|
||||
x
|
|
@ -0,0 +1,4 @@
|
|||
d
|
||||
+
|
||||
(\w -> x)
|
||||
x
|
|
@ -0,0 +1,41 @@
|
|||
BinOps(
|
||||
[
|
||||
(
|
||||
@0-1 Var {
|
||||
module_name: "",
|
||||
ident: "d",
|
||||
},
|
||||
@1-2 Plus,
|
||||
),
|
||||
],
|
||||
@4-12 Apply(
|
||||
@4-9 SpaceBefore(
|
||||
Closure(
|
||||
[
|
||||
@5-6 Identifier {
|
||||
ident: "w",
|
||||
},
|
||||
],
|
||||
@8-9 Var {
|
||||
module_name: "",
|
||||
ident: "x",
|
||||
},
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
[
|
||||
@11-12 SpaceBefore(
|
||||
Var {
|
||||
module_name: "",
|
||||
ident: "x",
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
],
|
||||
Space,
|
||||
),
|
||||
)
|
|
@ -0,0 +1,3 @@
|
|||
d+
|
||||
\w->x
|
||||
x
|
|
@ -0,0 +1,7 @@
|
|||
r
|
||||
^
|
||||
(
|
||||
-f
|
||||
#
|
||||
-P
|
||||
)
|
|
@ -0,0 +1,42 @@
|
|||
BinOps(
|
||||
[
|
||||
(
|
||||
@0-1 Var {
|
||||
module_name: "",
|
||||
ident: "r",
|
||||
},
|
||||
@1-2 Caret,
|
||||
),
|
||||
],
|
||||
@3-11 Apply(
|
||||
@3-5 SpaceAfter(
|
||||
SpaceBefore(
|
||||
UnaryOp(
|
||||
@4-5 Var {
|
||||
module_name: "",
|
||||
ident: "f",
|
||||
},
|
||||
@3-4 Negate,
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
LineComment(
|
||||
"",
|
||||
),
|
||||
],
|
||||
),
|
||||
[
|
||||
@9-11 UnaryOp(
|
||||
@10-11 Tag(
|
||||
"P",
|
||||
),
|
||||
@9-10 Negate,
|
||||
),
|
||||
],
|
||||
Space,
|
||||
),
|
||||
)
|
|
@ -0,0 +1,4 @@
|
|||
r^
|
||||
-f
|
||||
#
|
||||
-P
|
|
@ -0,0 +1,3 @@
|
|||
\{ i, #
|
||||
e }
|
||||
-> a
|
|
@ -0,0 +1,25 @@
|
|||
Closure(
|
||||
[
|
||||
@1-8 RecordDestructure(
|
||||
[
|
||||
@2-3 SpaceAfter(
|
||||
Identifier {
|
||||
ident: "i",
|
||||
},
|
||||
[
|
||||
LineComment(
|
||||
"",
|
||||
),
|
||||
],
|
||||
),
|
||||
@6-7 Identifier {
|
||||
ident: "e",
|
||||
},
|
||||
],
|
||||
),
|
||||
],
|
||||
@10-11 Var {
|
||||
module_name: "",
|
||||
ident: "a",
|
||||
},
|
||||
)
|
|
@ -0,0 +1,2 @@
|
|||
\{i#
|
||||
,e}->a
|
|
@ -0,0 +1,8 @@
|
|||
1 : (
|
||||
M,
|
||||
b # ,
|
||||
,
|
||||
h
|
||||
-> g,
|
||||
)e
|
||||
h
|
|
@ -0,0 +1,74 @@
|
|||
SpaceAfter(
|
||||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
EitherIndex(2147483648),
|
||||
],
|
||||
regions: [
|
||||
@0-16,
|
||||
],
|
||||
space_before: [
|
||||
Slice<roc_parse::ast::CommentOrNewline> { start: 0, length: 0 },
|
||||
],
|
||||
space_after: [
|
||||
Slice<roc_parse::ast::CommentOrNewline> { start: 0, length: 0 },
|
||||
],
|
||||
spaces: [],
|
||||
type_defs: [],
|
||||
value_defs: [
|
||||
Annotation(
|
||||
@0-1 NumLiteral(
|
||||
"1",
|
||||
),
|
||||
@2-16 Tuple {
|
||||
elems: [
|
||||
@3-14 Function(
|
||||
[
|
||||
@3-4 Apply(
|
||||
"",
|
||||
"M",
|
||||
[],
|
||||
),
|
||||
@5-6 SpaceAfter(
|
||||
BoundVariable(
|
||||
"b",
|
||||
),
|
||||
[
|
||||
LineComment(
|
||||
",",
|
||||
),
|
||||
],
|
||||
),
|
||||
@10-11 BoundVariable(
|
||||
"h",
|
||||
),
|
||||
],
|
||||
Pure,
|
||||
@13-14 BoundVariable(
|
||||
"g",
|
||||
),
|
||||
),
|
||||
],
|
||||
ext: Some(
|
||||
@15-16 BoundVariable(
|
||||
"e",
|
||||
),
|
||||
),
|
||||
},
|
||||
),
|
||||
],
|
||||
},
|
||||
@17-18 SpaceBefore(
|
||||
Var {
|
||||
module_name: "",
|
||||
ident: "h",
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
)
|
|
@ -0,0 +1,3 @@
|
|||
1:(M,b#,
|
||||
,h->g)e
|
||||
h
|
|
@ -0,0 +1,6 @@
|
|||
(
|
||||
dbg
|
||||
D
|
||||
q
|
||||
h
|
||||
)
|
|
@ -0,0 +1,27 @@
|
|||
ParensAround(
|
||||
DbgStmt {
|
||||
first: @5-6 Tag(
|
||||
"D",
|
||||
),
|
||||
extra_args: [
|
||||
@8-9 SpaceBefore(
|
||||
Var {
|
||||
module_name: "",
|
||||
ident: "q",
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
],
|
||||
continuation: @10-11 SpaceBefore(
|
||||
Var {
|
||||
module_name: "",
|
||||
ident: "h",
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
},
|
||||
)
|
|
@ -0,0 +1,3 @@
|
|||
(dbg D
|
||||
q
|
||||
h)
|
|
@ -1,2 +1,2 @@
|
|||
(Email str) = Email "blah@example.com"
|
||||
Email str = Email "blah@example.com"
|
||||
str
|
|
@ -1,28 +1,33 @@
|
|||
BinOps(
|
||||
[
|
||||
(
|
||||
@0-1 Var {
|
||||
module_name: "",
|
||||
ident: "i",
|
||||
},
|
||||
@1-2 Slash,
|
||||
),
|
||||
],
|
||||
@3-7 SpaceBefore(
|
||||
UnaryOp(
|
||||
@6-7 SpaceBefore(
|
||||
Var {
|
||||
module_name: "",
|
||||
ident: "g",
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
@3-4 Not,
|
||||
),
|
||||
SpaceAfter(
|
||||
BinOps(
|
||||
[
|
||||
Newline,
|
||||
(
|
||||
@0-1 Var {
|
||||
module_name: "",
|
||||
ident: "i",
|
||||
},
|
||||
@1-2 Slash,
|
||||
),
|
||||
],
|
||||
@4-8 SpaceBefore(
|
||||
UnaryOp(
|
||||
@7-8 SpaceBefore(
|
||||
Var {
|
||||
module_name: "",
|
||||
ident: "g",
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
@4-5 Not,
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
)
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
i/
|
||||
!
|
||||
g
|
||||
!
|
||||
g
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
if
|
||||
h
|
||||
then
|
||||
!f #
|
||||
else
|
||||
&m
|
|
@ -0,0 +1,43 @@
|
|||
SpaceAfter(
|
||||
If {
|
||||
if_thens: [
|
||||
(
|
||||
@3-4 SpaceBefore(
|
||||
SpaceAfter(
|
||||
Var {
|
||||
module_name: "",
|
||||
ident: "h",
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
@9-11 SpaceAfter(
|
||||
UnaryOp(
|
||||
@10-11 Var {
|
||||
module_name: "",
|
||||
ident: "f",
|
||||
},
|
||||
@9-10 Not,
|
||||
),
|
||||
[
|
||||
LineComment(
|
||||
"",
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
final_else: @17-19 RecordUpdater(
|
||||
"m",
|
||||
),
|
||||
indented_else: false,
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
)
|
|
@ -0,0 +1,4 @@
|
|||
if
|
||||
h
|
||||
then!f#
|
||||
else&m
|
|
@ -1,3 +1,3 @@
|
|||
(MT q) = g
|
||||
MT q = g
|
||||
q
|
||||
dbgT
|
|
@ -0,0 +1,5 @@
|
|||
"""
|
||||
"""
|
||||
"$(i
|
||||
"""
|
||||
""")"
|
|
@ -0,0 +1,32 @@
|
|||
Apply(
|
||||
@0-6 Str(
|
||||
Block(
|
||||
[],
|
||||
),
|
||||
),
|
||||
[
|
||||
@6-18 Str(
|
||||
Line(
|
||||
[
|
||||
Interpolated(
|
||||
@9-16 Apply(
|
||||
@9-10 Var {
|
||||
module_name: "",
|
||||
ident: "i",
|
||||
},
|
||||
[
|
||||
@10-16 Str(
|
||||
Block(
|
||||
[],
|
||||
),
|
||||
),
|
||||
],
|
||||
Space,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
Space,
|
||||
)
|
|
@ -0,0 +1 @@
|
|||
"""""""$(i"""""")"
|
|
@ -0,0 +1,2 @@
|
|||
N -0 T : A
|
||||
zT
|
|
@ -0,0 +1,52 @@
|
|||
SpaceAfter(
|
||||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
EitherIndex(0),
|
||||
],
|
||||
regions: [
|
||||
@0-8,
|
||||
],
|
||||
space_before: [
|
||||
Slice<roc_parse::ast::CommentOrNewline> { start: 0, length: 0 },
|
||||
],
|
||||
space_after: [
|
||||
Slice<roc_parse::ast::CommentOrNewline> { start: 0, length: 0 },
|
||||
],
|
||||
spaces: [],
|
||||
type_defs: [
|
||||
Alias {
|
||||
header: TypeHeader {
|
||||
name: @0-1 "N",
|
||||
vars: [
|
||||
@2-4 NumLiteral(
|
||||
"-0",
|
||||
),
|
||||
@5-6 Tag(
|
||||
"T",
|
||||
),
|
||||
],
|
||||
},
|
||||
ann: @7-8 Apply(
|
||||
"",
|
||||
"A",
|
||||
[],
|
||||
),
|
||||
},
|
||||
],
|
||||
value_defs: [],
|
||||
},
|
||||
@9-11 SpaceBefore(
|
||||
Var {
|
||||
module_name: "",
|
||||
ident: "zT",
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
)
|
|
@ -0,0 +1,2 @@
|
|||
N -0 T:A
|
||||
zT
|
|
@ -1,2 +1,2 @@
|
|||
(@Thunk it) = id (@A {})
|
||||
@Thunk it = id (@A {})
|
||||
it {}
|
|
@ -0,0 +1,2 @@
|
|||
{ i, p } = 5
|
||||
Q
|
|
@ -0,0 +1,53 @@
|
|||
SpaceAfter(
|
||||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
EitherIndex(2147483648),
|
||||
],
|
||||
regions: [
|
||||
@0-8,
|
||||
],
|
||||
space_before: [
|
||||
Slice<roc_parse::ast::CommentOrNewline> { start: 0, length: 0 },
|
||||
],
|
||||
space_after: [
|
||||
Slice<roc_parse::ast::CommentOrNewline> { start: 0, length: 0 },
|
||||
],
|
||||
spaces: [],
|
||||
type_defs: [],
|
||||
value_defs: [
|
||||
Body(
|
||||
@0-6 RecordDestructure(
|
||||
[
|
||||
@1-3 SpaceAfter(
|
||||
Identifier {
|
||||
ident: "i",
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
@4-5 Identifier {
|
||||
ident: "p",
|
||||
},
|
||||
],
|
||||
),
|
||||
@7-8 Num(
|
||||
"5",
|
||||
),
|
||||
),
|
||||
],
|
||||
},
|
||||
@9-10 SpaceBefore(
|
||||
Tag(
|
||||
"Q",
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
)
|
|
@ -0,0 +1,3 @@
|
|||
{i
|
||||
,p}=5
|
||||
Q
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
t, #
|
||||
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
SpaceAfter(
|
||||
Record(
|
||||
Collection {
|
||||
items: [
|
||||
@1-4 SpaceAfter(
|
||||
LabelOnly(
|
||||
@1-2 "t",
|
||||
),
|
||||
[
|
||||
LineComment(
|
||||
"",
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
final_comments: [
|
||||
Newline,
|
||||
Newline,
|
||||
],
|
||||
},
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
)
|
|
@ -0,0 +1,4 @@
|
|||
{t#
|
||||
,
|
||||
|
||||
}
|
|
@ -1,3 +1,3 @@
|
|||
(Config launchTheNukes! code) = cfg
|
||||
Config launchTheNukes! code = cfg
|
||||
|
||||
launchTheNukes! code
|
|
@ -1,3 +1,3 @@
|
|||
(Config launchTheNukes! code) = cfg
|
||||
Config launchTheNukes! code = cfg
|
||||
|
||||
launchTheNukes! code
|
|
@ -1,7 +1,7 @@
|
|||
(Pair x _) = Pair 0 1
|
||||
(Pair _ y) = Pair 0 1
|
||||
(Pair _ _) = Pair 0 1
|
||||
Pair x _ = Pair 0 1
|
||||
Pair _ y = Pair 0 1
|
||||
Pair _ _ = Pair 0 1
|
||||
_ = Pair 0 1
|
||||
(Pair (Pair x _) (Pair _ y)) = Pair (Pair 0 1) (Pair 2 3)
|
||||
Pair (Pair x _) (Pair _ y) = Pair (Pair 0 1) (Pair 2 3)
|
||||
|
||||
0
|
Loading…
Add table
Add a link
Reference in a new issue