mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 12:18:19 +00:00
Fix a bunch of parser/formatter bugs found in fuzzing
Notably: * Unified how parens are formatted between (1) when we have a ParensAround, and (2) when we've decided an Apply needs to have parens * Made unary minus require the be indented to the same level as any other expression continuation. (it used to accidentally have rules meant for binary operators applied) * Don't apply extra indent to the backpassing continuation in the case that the call does itself require indentation * Make `try@foo` correctly parse as `try @foo`, so that formatting doesn't change the tree when it adds that space * Detect more cases where we need to outdent trailing e.g. {} blocks in applies * Approximately a bagillion other things, 90% of which I added tests for, and none of which affected the formatting of examples or builtins
This commit is contained in:
parent
335a8eb258
commit
ed62bcc15a
347 changed files with 8219 additions and 1162 deletions
|
@ -0,0 +1 @@
|
|||
Expr(Type(TInParens(Type(TInParens(Type(TInParens(Type(TInParens(Type(TInParens(Type(TInParens(Type(TInParens(Type(TInParens(Type(TInParens(Type(TInParens(Type(TInParens(Type(TInParens(Type(TInParens(Type(TInParens(Type(TInParens(Type(TInParens(Type(TInParens(Type(TInParens(Type(TInParens(Type(TInParens(Type(TInParens(End(@78), @74), @72), @71), @69), @68), @66), @65), @61), @60), @58), @57), @53), @52), @50), @49), @47), @46), @44), @43), @41), @40), @39), @38), @36), @35), @31), @30), @28), @27), @23), @22), @20), @19), @17), @16), @11), @10), @8), @7), @3), @2), @2), @0)
|
|
@ -0,0 +1 @@
|
|||
.:(i,i,(i,(i,ii,(i,(i,(i,i,(i,(i,i,(i,(J(i,(i,(i,(i,(i,i,(i,(i,i,(i,(i,(i,(J[]
|
|
@ -0,0 +1,2 @@
|
|||
M : r
|
||||
h
|
|
@ -0,0 +1,43 @@
|
|||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
EitherIndex(0),
|
||||
],
|
||||
regions: [
|
||||
@0-6,
|
||||
],
|
||||
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 "M",
|
||||
vars: [],
|
||||
},
|
||||
ann: @4-5 SpaceBefore(
|
||||
BoundVariable(
|
||||
"r",
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
},
|
||||
],
|
||||
value_defs: [],
|
||||
},
|
||||
@7-8 SpaceBefore(
|
||||
Var {
|
||||
module_name: "",
|
||||
ident: "h",
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
)
|
|
@ -0,0 +1,3 @@
|
|||
M:(
|
||||
r)
|
||||
h
|
|
@ -0,0 +1,3 @@
|
|||
A #
|
||||
p : e
|
||||
A
|
|
@ -0,0 +1,48 @@
|
|||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
EitherIndex(0),
|
||||
],
|
||||
regions: [
|
||||
@0-7,
|
||||
],
|
||||
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 "A",
|
||||
vars: [
|
||||
@4-5 SpaceBefore(
|
||||
Identifier {
|
||||
ident: "p",
|
||||
},
|
||||
[
|
||||
LineComment(
|
||||
"",
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
},
|
||||
ann: @6-7 BoundVariable(
|
||||
"e",
|
||||
),
|
||||
},
|
||||
],
|
||||
value_defs: [],
|
||||
},
|
||||
@8-9 SpaceBefore(
|
||||
Tag(
|
||||
"A",
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
)
|
|
@ -0,0 +1,3 @@
|
|||
A#
|
||||
p:e
|
||||
A
|
|
@ -0,0 +1,3 @@
|
|||
K : #
|
||||
s
|
||||
K
|
|
@ -0,0 +1,44 @@
|
|||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
EitherIndex(0),
|
||||
],
|
||||
regions: [
|
||||
@0-7,
|
||||
],
|
||||
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 "K",
|
||||
vars: [],
|
||||
},
|
||||
ann: @5-6 SpaceBefore(
|
||||
BoundVariable(
|
||||
"s",
|
||||
),
|
||||
[
|
||||
LineComment(
|
||||
"",
|
||||
),
|
||||
],
|
||||
),
|
||||
},
|
||||
],
|
||||
value_defs: [],
|
||||
},
|
||||
@8-9 SpaceBefore(
|
||||
Tag(
|
||||
"K",
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
)
|
|
@ -0,0 +1,3 @@
|
|||
K:(#
|
||||
s)
|
||||
K
|
|
@ -0,0 +1,4 @@
|
|||
O : O z
|
||||
#
|
||||
|
||||
b #
|
|
@ -0,0 +1,59 @@
|
|||
SpaceAfter(
|
||||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
EitherIndex(0),
|
||||
],
|
||||
regions: [
|
||||
@0-9,
|
||||
],
|
||||
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 "O",
|
||||
vars: [],
|
||||
},
|
||||
ann: @2-9 Apply(
|
||||
"",
|
||||
"O",
|
||||
[
|
||||
@4-5 SpaceAfter(
|
||||
BoundVariable(
|
||||
"z",
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
LineComment(
|
||||
"",
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
},
|
||||
],
|
||||
value_defs: [],
|
||||
},
|
||||
@10-11 SpaceBefore(
|
||||
Var {
|
||||
module_name: "",
|
||||
ident: "b",
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
),
|
||||
[
|
||||
LineComment(
|
||||
"",
|
||||
),
|
||||
],
|
||||
)
|
|
@ -0,0 +1,4 @@
|
|||
O:O(z
|
||||
#
|
||||
)
|
||||
b#
|
|
@ -0,0 +1,2 @@
|
|||
p
|
||||
! .p!!
|
|
@ -0,0 +1,47 @@
|
|||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
EitherIndex(2147483648),
|
||||
],
|
||||
regions: [
|
||||
@0-1,
|
||||
],
|
||||
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: [
|
||||
Stmt(
|
||||
@0-1 Var {
|
||||
module_name: "",
|
||||
ident: "p",
|
||||
},
|
||||
),
|
||||
],
|
||||
},
|
||||
@2-8 SpaceBefore(
|
||||
UnaryOp(
|
||||
@4-7 SpaceBefore(
|
||||
TrySuffix {
|
||||
target: Task,
|
||||
expr: AccessorFunction(
|
||||
RecordField(
|
||||
"p!",
|
||||
),
|
||||
),
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
@2-3 Not,
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
)
|
|
@ -0,0 +1,3 @@
|
|||
p
|
||||
!
|
||||
.p!!
|
|
@ -0,0 +1,6 @@
|
|||
r :
|
||||
r
|
||||
#
|
||||
#
|
||||
|
||||
h
|
|
@ -0,0 +1,58 @@
|
|||
SpaceAfter(
|
||||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
EitherIndex(2147483648),
|
||||
],
|
||||
regions: [
|
||||
@0-11,
|
||||
],
|
||||
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 Identifier {
|
||||
ident: "r",
|
||||
},
|
||||
@4-5 SpaceBefore(
|
||||
SpaceAfter(
|
||||
BoundVariable(
|
||||
"r",
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
LineComment(
|
||||
"",
|
||||
),
|
||||
LineComment(
|
||||
"",
|
||||
),
|
||||
],
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
},
|
||||
@12-13 SpaceBefore(
|
||||
Var {
|
||||
module_name: "",
|
||||
ident: "h",
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
)
|
|
@ -0,0 +1,6 @@
|
|||
r:(
|
||||
r
|
||||
#
|
||||
#
|
||||
)
|
||||
h
|
|
@ -0,0 +1,3 @@
|
|||
{ l: s #
|
||||
} : s
|
||||
o
|
|
@ -0,0 +1,51 @@
|
|||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
EitherIndex(2147483648),
|
||||
],
|
||||
regions: [
|
||||
@0-9,
|
||||
],
|
||||
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-7 RecordDestructure(
|
||||
[
|
||||
@1-6 SpaceAfter(
|
||||
RequiredField(
|
||||
"l",
|
||||
@5-6 Identifier {
|
||||
ident: "s",
|
||||
},
|
||||
),
|
||||
[
|
||||
LineComment(
|
||||
"",
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
@8-9 BoundVariable(
|
||||
"s",
|
||||
),
|
||||
),
|
||||
],
|
||||
},
|
||||
@10-11 SpaceBefore(
|
||||
Var {
|
||||
module_name: "",
|
||||
ident: "o",
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
)
|
|
@ -0,0 +1,3 @@
|
|||
{l#
|
||||
:s}:s
|
||||
o
|
|
@ -0,0 +1,4 @@
|
|||
k : [
|
||||
T,
|
||||
]m #
|
||||
D
|
|
@ -0,0 +1,58 @@
|
|||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
EitherIndex(2147483648),
|
||||
],
|
||||
regions: [
|
||||
@0-9,
|
||||
],
|
||||
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 Identifier {
|
||||
ident: "k",
|
||||
},
|
||||
@3-9 SpaceBefore(
|
||||
TagUnion {
|
||||
ext: Some(
|
||||
@8-9 BoundVariable(
|
||||
"m",
|
||||
),
|
||||
),
|
||||
tags: Collection {
|
||||
items: [
|
||||
@4-5 Apply {
|
||||
name: @4-5 "T",
|
||||
args: [],
|
||||
},
|
||||
],
|
||||
final_comments: [
|
||||
Newline,
|
||||
],
|
||||
},
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
},
|
||||
@11-12 SpaceBefore(
|
||||
Tag(
|
||||
"D",
|
||||
),
|
||||
[
|
||||
LineComment(
|
||||
"",
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
|
@ -0,0 +1,4 @@
|
|||
k:
|
||||
[T,
|
||||
]m#
|
||||
D
|
|
@ -0,0 +1,5 @@
|
|||
1 : (
|
||||
f,
|
||||
(ww -> p),
|
||||
)e
|
||||
Mh
|
|
@ -0,0 +1,61 @@
|
|||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
EitherIndex(2147483648),
|
||||
],
|
||||
regions: [
|
||||
@0-13,
|
||||
],
|
||||
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-13 Tuple {
|
||||
elems: [
|
||||
@3-4 SpaceAfter(
|
||||
BoundVariable(
|
||||
"f",
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
@6-11 Function(
|
||||
[
|
||||
@6-8 BoundVariable(
|
||||
"ww",
|
||||
),
|
||||
],
|
||||
Pure,
|
||||
@10-11 BoundVariable(
|
||||
"p",
|
||||
),
|
||||
),
|
||||
],
|
||||
ext: Some(
|
||||
@12-13 BoundVariable(
|
||||
"e",
|
||||
),
|
||||
),
|
||||
},
|
||||
),
|
||||
],
|
||||
},
|
||||
@14-16 SpaceBefore(
|
||||
Tag(
|
||||
"Mh",
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
)
|
|
@ -0,0 +1,3 @@
|
|||
1:(f
|
||||
,ww->p)e
|
||||
Mh
|
|
@ -0,0 +1,3 @@
|
|||
E : B
|
||||
{} = B
|
||||
B
|
|
@ -0,0 +1,50 @@
|
|||
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: [
|
||||
AnnotatedBody {
|
||||
ann_pattern: Apply(
|
||||
@0-1 Tag(
|
||||
"E",
|
||||
),
|
||||
[],
|
||||
),
|
||||
ann_type: @2-3 Apply(
|
||||
"",
|
||||
"B",
|
||||
[],
|
||||
),
|
||||
lines_between: [
|
||||
Newline,
|
||||
],
|
||||
body_pattern: @4-6 RecordDestructure(
|
||||
[],
|
||||
),
|
||||
body_expr: @7-8 Tag(
|
||||
"B",
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
@9-10 SpaceBefore(
|
||||
Tag(
|
||||
"B",
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
)
|
|
@ -0,0 +1,3 @@
|
|||
E:B
|
||||
{}=B
|
||||
B
|
|
@ -0,0 +1,2 @@
|
|||
A p : e
|
||||
A
|
|
@ -0,0 +1,51 @@
|
|||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
EitherIndex(0),
|
||||
],
|
||||
regions: [
|
||||
@0-7,
|
||||
],
|
||||
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 "A",
|
||||
vars: [
|
||||
@3-4 SpaceBefore(
|
||||
Identifier {
|
||||
ident: "p",
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
],
|
||||
},
|
||||
ann: @6-7 SpaceBefore(
|
||||
BoundVariable(
|
||||
"e",
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
},
|
||||
],
|
||||
value_defs: [],
|
||||
},
|
||||
@8-9 SpaceBefore(
|
||||
Tag(
|
||||
"A",
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
)
|
|
@ -0,0 +1,4 @@
|
|||
A
|
||||
p:
|
||||
e
|
||||
A
|
|
@ -0,0 +1,3 @@
|
|||
A e # g
|
||||
: A
|
||||
AA
|
|
@ -0,0 +1,55 @@
|
|||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
EitherIndex(0),
|
||||
],
|
||||
regions: [
|
||||
@0-9,
|
||||
],
|
||||
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 "A",
|
||||
vars: [
|
||||
@3-4 SpaceAfter(
|
||||
SpaceBefore(
|
||||
Identifier {
|
||||
ident: "e",
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
[
|
||||
LineComment(
|
||||
"g",
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
},
|
||||
ann: @8-9 Apply(
|
||||
"",
|
||||
"A",
|
||||
[],
|
||||
),
|
||||
},
|
||||
],
|
||||
value_defs: [],
|
||||
},
|
||||
@10-12 SpaceBefore(
|
||||
Tag(
|
||||
"AA",
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
)
|
|
@ -0,0 +1,4 @@
|
|||
A
|
||||
e#g
|
||||
:A
|
||||
AA
|
|
@ -0,0 +1,5 @@
|
|||
3 :
|
||||
( #
|
||||
)n
|
||||
-> n
|
||||
0
|
|
@ -0,0 +1,56 @@
|
|||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
EitherIndex(2147483648),
|
||||
],
|
||||
regions: [
|
||||
@0-10,
|
||||
],
|
||||
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(
|
||||
"3",
|
||||
),
|
||||
@2-10 Function(
|
||||
[
|
||||
@2-7 Tuple {
|
||||
elems: Collection {
|
||||
items: [],
|
||||
final_comments: [
|
||||
LineComment(
|
||||
"",
|
||||
),
|
||||
],
|
||||
},
|
||||
ext: Some(
|
||||
@6-7 BoundVariable(
|
||||
"n",
|
||||
),
|
||||
),
|
||||
},
|
||||
],
|
||||
Pure,
|
||||
@9-10 BoundVariable(
|
||||
"n",
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
},
|
||||
@12-13 SpaceBefore(
|
||||
Num(
|
||||
"0",
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
)
|
|
@ -0,0 +1,3 @@
|
|||
3:(#
|
||||
)n->n
|
||||
0
|
|
@ -0,0 +1,4 @@
|
|||
d : (
|
||||
J,
|
||||
)g
|
||||
2
|
|
@ -0,0 +1,52 @@
|
|||
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: [
|
||||
Annotation(
|
||||
@0-1 Identifier {
|
||||
ident: "d",
|
||||
},
|
||||
@2-8 Tuple {
|
||||
elems: Collection {
|
||||
items: [
|
||||
@3-4 Apply(
|
||||
"",
|
||||
"J",
|
||||
[],
|
||||
),
|
||||
],
|
||||
final_comments: [
|
||||
Newline,
|
||||
],
|
||||
},
|
||||
ext: Some(
|
||||
@7-8 BoundVariable(
|
||||
"g",
|
||||
),
|
||||
),
|
||||
},
|
||||
),
|
||||
],
|
||||
},
|
||||
@9-10 SpaceBefore(
|
||||
Num(
|
||||
"2",
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
)
|
|
@ -0,0 +1,3 @@
|
|||
d:(J,
|
||||
)g
|
||||
2
|
|
@ -0,0 +1,4 @@
|
|||
p : (
|
||||
)(
|
||||
i)
|
||||
{}
|
|
@ -0,0 +1,51 @@
|
|||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
EitherIndex(2147483648),
|
||||
],
|
||||
regions: [
|
||||
@0-9,
|
||||
],
|
||||
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 Identifier {
|
||||
ident: "p",
|
||||
},
|
||||
@2-9 Tuple {
|
||||
elems: Collection {
|
||||
items: [],
|
||||
final_comments: [
|
||||
Newline,
|
||||
],
|
||||
},
|
||||
ext: Some(
|
||||
@7-8 SpaceBefore(
|
||||
BoundVariable(
|
||||
"i",
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
),
|
||||
},
|
||||
),
|
||||
],
|
||||
},
|
||||
@10-12 SpaceBefore(
|
||||
Record(
|
||||
[],
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
)
|
|
@ -0,0 +1,4 @@
|
|||
p:(
|
||||
)(
|
||||
i)
|
||||
{}
|
|
@ -0,0 +1,3 @@
|
|||
Str.getUnsafe haystack haystackIndex
|
||||
==
|
||||
Str.getUnsafe needle needleIndex
|
|
@ -0,0 +1,56 @@
|
|||
SpaceAfter(
|
||||
BinOps(
|
||||
[
|
||||
(
|
||||
@0-36 SpaceAfter(
|
||||
Apply(
|
||||
@0-13 Var {
|
||||
module_name: "Str",
|
||||
ident: "getUnsafe",
|
||||
},
|
||||
[
|
||||
@14-22 Var {
|
||||
module_name: "",
|
||||
ident: "haystack",
|
||||
},
|
||||
@23-36 Var {
|
||||
module_name: "",
|
||||
ident: "haystackIndex",
|
||||
},
|
||||
],
|
||||
Space,
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
@37-39 Equals,
|
||||
),
|
||||
],
|
||||
@40-72 Apply(
|
||||
@40-53 SpaceBefore(
|
||||
Var {
|
||||
module_name: "Str",
|
||||
ident: "getUnsafe",
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
[
|
||||
@54-60 Var {
|
||||
module_name: "",
|
||||
ident: "needle",
|
||||
},
|
||||
@61-72 Var {
|
||||
module_name: "",
|
||||
ident: "needleIndex",
|
||||
},
|
||||
],
|
||||
Space,
|
||||
),
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
)
|
|
@ -0,0 +1,3 @@
|
|||
Str.getUnsafe haystack haystackIndex
|
||||
==
|
||||
Str.getUnsafe needle needleIndex
|
|
@ -0,0 +1,2 @@
|
|||
i < 2
|
||||
-6
|
|
@ -0,0 +1,51 @@
|
|||
SpaceAfter(
|
||||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
EitherIndex(2147483648),
|
||||
],
|
||||
regions: [
|
||||
@0-3,
|
||||
],
|
||||
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: [
|
||||
Stmt(
|
||||
@0-3 BinOps(
|
||||
[
|
||||
(
|
||||
@0-1 Var {
|
||||
module_name: "",
|
||||
ident: "i",
|
||||
},
|
||||
@1-2 LessThan,
|
||||
),
|
||||
],
|
||||
@2-3 Num(
|
||||
"2",
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
},
|
||||
@4-8 SpaceBefore(
|
||||
ParensAround(
|
||||
Num(
|
||||
"-6",
|
||||
),
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
)
|
|
@ -0,0 +1,2 @@
|
|||
i<2
|
||||
(-6)
|
|
@ -0,0 +1,2 @@
|
|||
foo
|
||||
|> Dict.keepIf \(k, _v) -> List.contains keysToDelete k |> Bool.not
|
|
@ -0,0 +1,72 @@
|
|||
SpaceAfter(
|
||||
BinOps(
|
||||
[
|
||||
(
|
||||
@0-3 SpaceAfter(
|
||||
Var {
|
||||
module_name: "",
|
||||
ident: "foo",
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
@4-6 Pizza,
|
||||
),
|
||||
],
|
||||
@7-71 Apply(
|
||||
@7-18 Var {
|
||||
module_name: "Dict",
|
||||
ident: "keepIf",
|
||||
},
|
||||
[
|
||||
@19-71 Closure(
|
||||
[
|
||||
@20-27 Tuple(
|
||||
[
|
||||
@21-22 Identifier {
|
||||
ident: "k",
|
||||
},
|
||||
@24-26 Underscore(
|
||||
"v",
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
@31-71 BinOps(
|
||||
[
|
||||
(
|
||||
@31-59 Apply(
|
||||
@31-44 Var {
|
||||
module_name: "List",
|
||||
ident: "contains",
|
||||
},
|
||||
[
|
||||
@45-57 Var {
|
||||
module_name: "",
|
||||
ident: "keysToDelete",
|
||||
},
|
||||
@58-59 Var {
|
||||
module_name: "",
|
||||
ident: "k",
|
||||
},
|
||||
],
|
||||
Space,
|
||||
),
|
||||
@60-62 Pizza,
|
||||
),
|
||||
],
|
||||
@63-71 Var {
|
||||
module_name: "Bool",
|
||||
ident: "not",
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
Space,
|
||||
),
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
)
|
|
@ -0,0 +1,2 @@
|
|||
foo
|
||||
|> Dict.keepIf \(k, _v) -> List.contains keysToDelete k |> Bool.not
|
|
@ -0,0 +1,5 @@
|
|||
a :
|
||||
N {
|
||||
h,
|
||||
}
|
||||
g
|
|
@ -0,0 +1,58 @@
|
|||
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: [
|
||||
Annotation(
|
||||
@0-1 Identifier {
|
||||
ident: "a",
|
||||
},
|
||||
@2-8 Apply(
|
||||
"",
|
||||
"N",
|
||||
[
|
||||
@3-8 Record {
|
||||
fields: Collection {
|
||||
items: [
|
||||
@4-5 LabelOnly(
|
||||
@4-5 "h",
|
||||
),
|
||||
],
|
||||
final_comments: [
|
||||
Newline,
|
||||
],
|
||||
},
|
||||
ext: None,
|
||||
},
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
},
|
||||
@9-10 SpaceBefore(
|
||||
Var {
|
||||
module_name: "",
|
||||
ident: "g",
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
)
|
|
@ -0,0 +1,3 @@
|
|||
a:N{h,
|
||||
}
|
||||
g
|
|
@ -0,0 +1,4 @@
|
|||
ex <- f #
|
||||
s # q
|
||||
<- f #
|
||||
s
|
|
@ -0,0 +1,52 @@
|
|||
SpaceBefore(
|
||||
Backpassing(
|
||||
[
|
||||
@1-3 Identifier {
|
||||
ident: "ex",
|
||||
},
|
||||
],
|
||||
@5-6 Var {
|
||||
module_name: "",
|
||||
ident: "f",
|
||||
},
|
||||
@8-18 SpaceBefore(
|
||||
Backpassing(
|
||||
[
|
||||
@8-9 SpaceAfter(
|
||||
Identifier {
|
||||
ident: "s",
|
||||
},
|
||||
[
|
||||
LineComment(
|
||||
"q",
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
@14-15 Var {
|
||||
module_name: "",
|
||||
ident: "f",
|
||||
},
|
||||
@17-18 SpaceBefore(
|
||||
Var {
|
||||
module_name: "",
|
||||
ident: "s",
|
||||
},
|
||||
[
|
||||
LineComment(
|
||||
"",
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
[
|
||||
LineComment(
|
||||
"",
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
)
|
|
@ -0,0 +1,5 @@
|
|||
|
||||
ex<-f#
|
||||
s#q
|
||||
<-f#
|
||||
s
|
|
@ -0,0 +1,3 @@
|
|||
0
|
||||
! .d
|
||||
.d
|
|
@ -0,0 +1,56 @@
|
|||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
EitherIndex(2147483648),
|
||||
EitherIndex(2147483649),
|
||||
],
|
||||
regions: [
|
||||
@0-1,
|
||||
@2-6,
|
||||
],
|
||||
space_before: [
|
||||
Slice<roc_parse::ast::CommentOrNewline> { start: 0, length: 0 },
|
||||
Slice<roc_parse::ast::CommentOrNewline> { start: 0, length: 1 },
|
||||
],
|
||||
space_after: [
|
||||
Slice<roc_parse::ast::CommentOrNewline> { start: 0, length: 0 },
|
||||
Slice<roc_parse::ast::CommentOrNewline> { start: 1, length: 0 },
|
||||
],
|
||||
spaces: [
|
||||
Newline,
|
||||
],
|
||||
type_defs: [],
|
||||
value_defs: [
|
||||
Stmt(
|
||||
@0-1 Num(
|
||||
"0",
|
||||
),
|
||||
),
|
||||
Stmt(
|
||||
@2-6 UnaryOp(
|
||||
@4-6 SpaceBefore(
|
||||
AccessorFunction(
|
||||
RecordField(
|
||||
"d",
|
||||
),
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
@2-3 Not,
|
||||
),
|
||||
),
|
||||
],
|
||||
},
|
||||
@7-9 SpaceBefore(
|
||||
AccessorFunction(
|
||||
RecordField(
|
||||
"d",
|
||||
),
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
)
|
|
@ -0,0 +1,4 @@
|
|||
0
|
||||
!
|
||||
.d
|
||||
.d
|
|
@ -0,0 +1 @@
|
|||
N < l (r * N)
|
|
@ -0,0 +1,40 @@
|
|||
SpaceAfter(
|
||||
BinOps(
|
||||
[
|
||||
(
|
||||
@0-1 Tag(
|
||||
"N",
|
||||
),
|
||||
@1-2 LessThan,
|
||||
),
|
||||
],
|
||||
@2-7 Apply(
|
||||
@2-3 Var {
|
||||
module_name: "",
|
||||
ident: "l",
|
||||
},
|
||||
[
|
||||
@4-7 ParensAround(
|
||||
BinOps(
|
||||
[
|
||||
(
|
||||
@4-5 Var {
|
||||
module_name: "",
|
||||
ident: "r",
|
||||
},
|
||||
@5-6 Star,
|
||||
),
|
||||
],
|
||||
@6-7 Tag(
|
||||
"N",
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
Space,
|
||||
),
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
)
|
|
@ -0,0 +1 @@
|
|||
N<l(r*N)
|
|
@ -0,0 +1,8 @@
|
|||
5
|
||||
- (
|
||||
(
|
||||
e =
|
||||
r
|
||||
1
|
||||
)
|
||||
)
|
|
@ -0,0 +1,60 @@
|
|||
BinOps(
|
||||
[
|
||||
(
|
||||
@0-1 Num(
|
||||
"5",
|
||||
),
|
||||
@1-2 Minus,
|
||||
),
|
||||
],
|
||||
@3-15 ParensAround(
|
||||
ParensAround(
|
||||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
EitherIndex(2147483648),
|
||||
],
|
||||
regions: [
|
||||
@4-12,
|
||||
],
|
||||
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(
|
||||
@4-5 Identifier {
|
||||
ident: "e",
|
||||
},
|
||||
@6-12 ParensAround(
|
||||
ParensAround(
|
||||
SpaceBefore(
|
||||
Var {
|
||||
module_name: "",
|
||||
ident: "r",
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
},
|
||||
@13-14 SpaceBefore(
|
||||
Num(
|
||||
"1",
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
|
@ -0,0 +1,3 @@
|
|||
5-((e=((
|
||||
r))
|
||||
1))
|
|
@ -0,0 +1,2 @@
|
|||
"$(g)" : q
|
||||
f
|
|
@ -0,0 +1,51 @@
|
|||
SpaceAfter(
|
||||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
EitherIndex(2147483648),
|
||||
],
|
||||
regions: [
|
||||
@0-12,
|
||||
],
|
||||
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-10 StrLiteral(
|
||||
Line(
|
||||
[
|
||||
Interpolated(
|
||||
@5-6 Var {
|
||||
module_name: "",
|
||||
ident: "g",
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
@11-12 BoundVariable(
|
||||
"q",
|
||||
),
|
||||
),
|
||||
],
|
||||
},
|
||||
@13-14 SpaceBefore(
|
||||
Var {
|
||||
module_name: "",
|
||||
ident: "f",
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
)
|
|
@ -0,0 +1,2 @@
|
|||
"""$(g)""":q
|
||||
f
|
|
@ -0,0 +1,6 @@
|
|||
t =
|
||||
"""
|
||||
"
|
||||
"""
|
||||
""
|
||||
S
|
|
@ -0,0 +1,48 @@
|
|||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
EitherIndex(2147483648),
|
||||
],
|
||||
regions: [
|
||||
@0-12,
|
||||
],
|
||||
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-1 Identifier {
|
||||
ident: "t",
|
||||
},
|
||||
@2-12 Apply(
|
||||
@2-10 Str(
|
||||
PlainLine(
|
||||
"\" ",
|
||||
),
|
||||
),
|
||||
[
|
||||
@10-12 Str(
|
||||
PlainLine(
|
||||
"",
|
||||
),
|
||||
),
|
||||
],
|
||||
Space,
|
||||
),
|
||||
),
|
||||
],
|
||||
},
|
||||
@13-14 SpaceBefore(
|
||||
Tag(
|
||||
"S",
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
)
|
|
@ -0,0 +1,2 @@
|
|||
t="""" """""
|
||||
S
|
|
@ -0,0 +1,3 @@
|
|||
a =
|
||||
6
|
||||
a
|
|
@ -0,0 +1,44 @@
|
|||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
EitherIndex(2147483648),
|
||||
],
|
||||
regions: [
|
||||
@0-6,
|
||||
],
|
||||
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-1 Identifier {
|
||||
ident: "a",
|
||||
},
|
||||
@2-6 ParensAround(
|
||||
SpaceBefore(
|
||||
Num(
|
||||
"6",
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
},
|
||||
@7-8 SpaceBefore(
|
||||
Var {
|
||||
module_name: "",
|
||||
ident: "a",
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
)
|
|
@ -0,0 +1,3 @@
|
|||
a=(
|
||||
6)
|
||||
a
|
|
@ -0,0 +1,2 @@
|
|||
m0 \w -> w? e
|
||||
/ s
|
|
@ -0,0 +1,48 @@
|
|||
BinOps(
|
||||
[
|
||||
(
|
||||
@0-9 SpaceAfter(
|
||||
Apply(
|
||||
@0-2 Var {
|
||||
module_name: "",
|
||||
ident: "m0",
|
||||
},
|
||||
[
|
||||
@2-9 Closure(
|
||||
[
|
||||
@3-4 Identifier {
|
||||
ident: "w",
|
||||
},
|
||||
],
|
||||
@6-9 Apply(
|
||||
@6-7 TrySuffix {
|
||||
target: Result,
|
||||
expr: Var {
|
||||
module_name: "",
|
||||
ident: "w",
|
||||
},
|
||||
},
|
||||
[
|
||||
@8-9 Var {
|
||||
module_name: "",
|
||||
ident: "e",
|
||||
},
|
||||
],
|
||||
Space,
|
||||
),
|
||||
),
|
||||
],
|
||||
Space,
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
@10-11 Slash,
|
||||
),
|
||||
],
|
||||
@11-12 Var {
|
||||
module_name: "",
|
||||
ident: "s",
|
||||
},
|
||||
)
|
|
@ -0,0 +1,2 @@
|
|||
m0\w->w?e
|
||||
/s
|
|
@ -1,4 +1,2 @@
|
|||
i
|
||||
> (\s -> s
|
||||
)
|
||||
-a
|
||||
i > \s -> s
|
||||
-a
|
|
@ -1,39 +1,56 @@
|
|||
BinOps(
|
||||
[
|
||||
(
|
||||
@0-1 Var {
|
||||
module_name: "",
|
||||
ident: "i",
|
||||
},
|
||||
@1-2 GreaterThan,
|
||||
),
|
||||
],
|
||||
@2-10 Apply(
|
||||
@2-7 SpaceAfter(
|
||||
Closure(
|
||||
[
|
||||
@3-4 Identifier {
|
||||
ident: "s",
|
||||
},
|
||||
],
|
||||
@6-7 Var {
|
||||
module_name: "",
|
||||
ident: "s",
|
||||
},
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
[
|
||||
@8-10 UnaryOp(
|
||||
@9-10 Var {
|
||||
module_name: "",
|
||||
ident: "a",
|
||||
},
|
||||
@8-9 Negate,
|
||||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
EitherIndex(2147483648),
|
||||
],
|
||||
regions: [
|
||||
@0-7,
|
||||
],
|
||||
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: [
|
||||
Stmt(
|
||||
@0-7 BinOps(
|
||||
[
|
||||
(
|
||||
@0-1 Var {
|
||||
module_name: "",
|
||||
ident: "i",
|
||||
},
|
||||
@1-2 GreaterThan,
|
||||
),
|
||||
],
|
||||
@2-7 Closure(
|
||||
[
|
||||
@3-4 Identifier {
|
||||
ident: "s",
|
||||
},
|
||||
],
|
||||
@6-7 Var {
|
||||
module_name: "",
|
||||
ident: "s",
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
Space,
|
||||
},
|
||||
@8-10 SpaceBefore(
|
||||
UnaryOp(
|
||||
@9-10 Var {
|
||||
module_name: "",
|
||||
ident: "a",
|
||||
},
|
||||
@8-9 Negate,
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
)
|
||||
|
|
|
@ -24,91 +24,96 @@ SpaceAfter(
|
|||
},
|
||||
],
|
||||
},
|
||||
ann: @21-164 Record {
|
||||
fields: [
|
||||
@23-47 SpaceAfter(
|
||||
RequiredValue(
|
||||
@23-32 "evaluated",
|
||||
[],
|
||||
@35-47 Apply(
|
||||
"",
|
||||
"Set",
|
||||
[
|
||||
@39-47 BoundVariable(
|
||||
"position",
|
||||
),
|
||||
],
|
||||
ann: @21-164 SpaceBefore(
|
||||
Record {
|
||||
fields: [
|
||||
@23-47 SpaceAfter(
|
||||
RequiredValue(
|
||||
@23-32 "evaluated",
|
||||
[],
|
||||
@35-47 Apply(
|
||||
"",
|
||||
"Set",
|
||||
[
|
||||
@39-47 BoundVariable(
|
||||
"position",
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
@54-76 SpaceAfter(
|
||||
RequiredValue(
|
||||
@54-61 "openSet",
|
||||
[],
|
||||
@64-76 Apply(
|
||||
"",
|
||||
"Set",
|
||||
[
|
||||
@68-76 BoundVariable(
|
||||
"position",
|
||||
),
|
||||
],
|
||||
@54-76 SpaceAfter(
|
||||
RequiredValue(
|
||||
@54-61 "openSet",
|
||||
[],
|
||||
@64-76 Apply(
|
||||
"",
|
||||
"Set",
|
||||
[
|
||||
@68-76 BoundVariable(
|
||||
"position",
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
@83-113 SpaceAfter(
|
||||
RequiredValue(
|
||||
@83-88 "costs",
|
||||
[],
|
||||
@91-113 Apply(
|
||||
"Dict",
|
||||
"Dict",
|
||||
[
|
||||
@101-109 BoundVariable(
|
||||
"position",
|
||||
),
|
||||
@110-113 Apply(
|
||||
"",
|
||||
"F64",
|
||||
[],
|
||||
),
|
||||
],
|
||||
@83-113 SpaceAfter(
|
||||
RequiredValue(
|
||||
@83-88 "costs",
|
||||
[],
|
||||
@91-113 Apply(
|
||||
"Dict",
|
||||
"Dict",
|
||||
[
|
||||
@101-109 BoundVariable(
|
||||
"position",
|
||||
),
|
||||
@110-113 Apply(
|
||||
"",
|
||||
"F64",
|
||||
[],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
@120-158 SpaceAfter(
|
||||
RequiredValue(
|
||||
@120-128 "cameFrom",
|
||||
[],
|
||||
@131-158 Apply(
|
||||
"Dict",
|
||||
"Dict",
|
||||
[
|
||||
@141-149 BoundVariable(
|
||||
"position",
|
||||
),
|
||||
@150-158 BoundVariable(
|
||||
"position",
|
||||
),
|
||||
],
|
||||
@120-158 SpaceAfter(
|
||||
RequiredValue(
|
||||
@120-128 "cameFrom",
|
||||
[],
|
||||
@131-158 Apply(
|
||||
"Dict",
|
||||
"Dict",
|
||||
[
|
||||
@141-149 BoundVariable(
|
||||
"position",
|
||||
),
|
||||
@150-158 BoundVariable(
|
||||
"position",
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
],
|
||||
ext: None,
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
ext: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
value_defs: [],
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
#
|
||||
6 : s
|
||||
h
|
|
@ -0,0 +1,50 @@
|
|||
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: [
|
||||
Annotation(
|
||||
@4-5 SpaceBefore(
|
||||
NumLiteral(
|
||||
"6",
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
LineComment(
|
||||
"",
|
||||
),
|
||||
],
|
||||
),
|
||||
@7-8 BoundVariable(
|
||||
"s",
|
||||
),
|
||||
),
|
||||
],
|
||||
},
|
||||
@9-10 SpaceBefore(
|
||||
Var {
|
||||
module_name: "",
|
||||
ident: "h",
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
)
|
|
@ -0,0 +1,4 @@
|
|||
(
|
||||
#
|
||||
6):s
|
||||
h
|
|
@ -0,0 +1,5 @@
|
|||
a,
|
||||
(M #
|
||||
c)
|
||||
<- t
|
||||
a
|
|
@ -0,0 +1,37 @@
|
|||
Backpassing(
|
||||
[
|
||||
@0-1 Identifier {
|
||||
ident: "a",
|
||||
},
|
||||
@2-6 Apply(
|
||||
@2-3 Tag(
|
||||
"M",
|
||||
),
|
||||
[
|
||||
@5-6 SpaceBefore(
|
||||
Identifier {
|
||||
ident: "c",
|
||||
},
|
||||
[
|
||||
LineComment(
|
||||
"",
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
@8-9 Var {
|
||||
module_name: "",
|
||||
ident: "t",
|
||||
},
|
||||
@10-11 SpaceBefore(
|
||||
Var {
|
||||
module_name: "",
|
||||
ident: "a",
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
)
|
|
@ -0,0 +1,3 @@
|
|||
a,M#
|
||||
c<-t
|
||||
a
|
|
@ -0,0 +1,3 @@
|
|||
\L #
|
||||
i
|
||||
-> -e
|
|
@ -0,0 +1,28 @@
|
|||
Closure(
|
||||
[
|
||||
@1-6 Apply(
|
||||
@1-2 Tag(
|
||||
"L",
|
||||
),
|
||||
[
|
||||
@5-6 SpaceBefore(
|
||||
Identifier {
|
||||
ident: "i",
|
||||
},
|
||||
[
|
||||
LineComment(
|
||||
"",
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
@8-10 UnaryOp(
|
||||
@9-10 Var {
|
||||
module_name: "",
|
||||
ident: "e",
|
||||
},
|
||||
@8-9 Negate,
|
||||
),
|
||||
)
|
|
@ -0,0 +1,2 @@
|
|||
\L#
|
||||
i->-e
|
|
@ -0,0 +1,4 @@
|
|||
\L,
|
||||
M #
|
||||
Q
|
||||
-> f8
|
|
@ -0,0 +1,28 @@
|
|||
Closure(
|
||||
[
|
||||
@1-2 Tag(
|
||||
"L",
|
||||
),
|
||||
@3-8 Apply(
|
||||
@3-4 Tag(
|
||||
"M",
|
||||
),
|
||||
[
|
||||
@7-8 SpaceBefore(
|
||||
Tag(
|
||||
"Q",
|
||||
),
|
||||
[
|
||||
LineComment(
|
||||
"",
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
@10-12 Var {
|
||||
module_name: "",
|
||||
ident: "f8",
|
||||
},
|
||||
)
|
|
@ -0,0 +1,2 @@
|
|||
\L,M#
|
||||
Q->f8
|
|
@ -0,0 +1,4 @@
|
|||
1 0 #
|
||||
#
|
||||
: gi
|
||||
M
|
|
@ -0,0 +1,53 @@
|
|||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
EitherIndex(2147483648),
|
||||
],
|
||||
regions: [
|
||||
@0-13,
|
||||
],
|
||||
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 Apply(
|
||||
@0-1 NumLiteral(
|
||||
"1",
|
||||
),
|
||||
[
|
||||
@2-7 SpaceAfter(
|
||||
NumLiteral(
|
||||
"0",
|
||||
),
|
||||
[
|
||||
LineComment(
|
||||
"",
|
||||
),
|
||||
LineComment(
|
||||
"",
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
@11-13 BoundVariable(
|
||||
"gi",
|
||||
),
|
||||
),
|
||||
],
|
||||
},
|
||||
@14-15 SpaceBefore(
|
||||
Tag(
|
||||
"M",
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
)
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue