mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 19:58:18 +00:00
Merge remote-tracking branch 'remote/main' into builtin-task
This commit is contained in:
commit
eca453d07f
367 changed files with 14084 additions and 12080 deletions
|
@ -0,0 +1 @@
|
|||
Expr(BackpassContinue(@8), @0)
|
|
@ -0,0 +1,2 @@
|
|||
u:i
|
||||
e<-x
|
|
@ -0,0 +1 @@
|
|||
Expr(BadExprEnd(@4), @0)
|
|
@ -1 +1 @@
|
|||
Expr(DefMissingFinalExpr2(Start(@11), @11), @0)
|
||||
Expr(IndentEnd(@11), @0)
|
|
@ -0,0 +1 @@
|
|||
Expr(BadExprEnd(@3), @0)
|
|
@ -1 +1 @@
|
|||
Expr(Start(@0), @0)
|
||||
Expr(IndentEnd(@12), @0)
|
|
@ -1 +1 @@
|
|||
Expr(If(Else(@16), @0), @0)
|
||||
Expr(If(Else(@17), @0), @0)
|
|
@ -1 +1 @@
|
|||
Expr(List(End(@6), @0), @0)
|
||||
Expr(List(End(@7), @0), @0)
|
|
@ -0,0 +1 @@
|
|||
Expr(InParens(Expr(BadExprEnd(@8), @5), @4), @0)
|
|
@ -0,0 +1,3 @@
|
|||
a : e
|
||||
Na := e
|
||||
e0
|
|
@ -0,0 +1 @@
|
|||
Expr(BadExprEnd(@11), @0)
|
|
@ -1 +1 @@
|
|||
Expr(Closure(Pattern(PInParens(End(@4), @1), @1), @0), @0)
|
||||
Expr(Closure(Pattern(PInParens(End(@5), @1), @1), @0), @0)
|
|
@ -1 +1 @@
|
|||
Expr(Closure(Pattern(PInParens(End(@5), @1), @1), @0), @0)
|
||||
Expr(Closure(Pattern(PInParens(End(@6), @1), @1), @0), @0)
|
|
@ -1 +1 @@
|
|||
Expr(Closure(Pattern(PInParens(End(@2), @1), @1), @0), @0)
|
||||
Expr(Closure(Pattern(PInParens(End(@3), @1), @1), @0), @0)
|
|
@ -1 +1 @@
|
|||
Expr(Closure(Pattern(PInParens(End(@4), @1), @1), @0), @0)
|
||||
Expr(Closure(Pattern(PInParens(End(@5), @1), @1), @0), @0)
|
|
@ -1 +1 @@
|
|||
Expr(Type(TRecord(End(@13), @4), @4), @0)
|
||||
Expr(Type(TRecord(End(@14), @4), @4), @0)
|
|
@ -1 +1 @@
|
|||
Expr(Type(TRecord(End(@5), @4), @4), @0)
|
||||
Expr(Type(TRecord(End(@6), @4), @4), @0)
|
|
@ -1 +1 @@
|
|||
Expr(Type(TRecord(End(@16), @4), @4), @0)
|
||||
Expr(Type(TRecord(End(@17), @4), @4), @0)
|
|
@ -1 +1 @@
|
|||
Expr(Type(TTagUnion(End(@9), @4), @4), @0)
|
||||
Expr(Type(TTagUnion(End(@10), @4), @4), @0)
|
|
@ -1 +1 @@
|
|||
Expr(Type(TTagUnion(End(@5), @4), @4), @0)
|
||||
Expr(Type(TTagUnion(End(@6), @4), @4), @0)
|
|
@ -1 +1 @@
|
|||
Expr(Type(TInParens(End(@9), @4), @4), @0)
|
||||
Expr(Type(TInParens(End(@10), @4), @4), @0)
|
|
@ -1 +1 @@
|
|||
Expr(Type(TInParens(End(@5), @4), @4), @0)
|
||||
Expr(Type(TInParens(End(@6), @4), @4), @0)
|
|
@ -1 +1 @@
|
|||
Expr(Closure(Arrow(@10), @4), @0)
|
||||
Expr(Closure(IndentArrow(@10), @4), @0)
|
|
@ -0,0 +1 @@
|
|||
Expr(Import(EndNewline(@15), @0), @0)
|
|
@ -0,0 +1 @@
|
|||
import svg.Path a
|
|
@ -1 +1 @@
|
|||
Expr(When(Arrow(@26), @0), @0)
|
||||
Expr(When(IndentPattern(@26), @0), @0)
|
|
@ -1 +1 @@
|
|||
Expr(BadExprEnd(@22), @0)
|
||||
Expr(BadOperator("->", @24), @0)
|
|
@ -1 +1 @@
|
|||
Expr(When(Branch(BadOperator("->", @34), @19), @0), @0)
|
||||
Expr(When(IndentPattern(@34), @0), @0)
|
|
@ -1 +1 @@
|
|||
Expr(When(Branch(BadOperator("->", @28), @19), @0), @0)
|
||||
Expr(When(IndentPattern(@28), @0), @0)
|
|
@ -1 +1 @@
|
|||
Expr(DefMissingFinalExpr2(ElmStyleFunction(@18-22, @23), @11), @0)
|
||||
Expr(BadExprEnd(@11), @0)
|
|
@ -1 +1 @@
|
|||
Expr(BadOperator("->", @9), @0)
|
||||
Expr(BadExprEnd(@8), @0)
|
|
@ -0,0 +1,3 @@
|
|||
when x is
|
||||
bar.and -> 1
|
||||
_ -> 4
|
|
@ -1,40 +1,45 @@
|
|||
When(
|
||||
@5-6 Var {
|
||||
module_name: "",
|
||||
ident: "x",
|
||||
},
|
||||
SpaceAfter(
|
||||
When(
|
||||
@5-6 Var {
|
||||
module_name: "",
|
||||
ident: "x",
|
||||
},
|
||||
[
|
||||
WhenBranch {
|
||||
patterns: [
|
||||
@14-21 SpaceBefore(
|
||||
Malformed(
|
||||
"bar.and",
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
],
|
||||
value: @25-26 Num(
|
||||
"1",
|
||||
),
|
||||
guard: None,
|
||||
},
|
||||
WhenBranch {
|
||||
patterns: [
|
||||
@31-32 SpaceBefore(
|
||||
Underscore(
|
||||
"",
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
],
|
||||
value: @36-37 Num(
|
||||
"4",
|
||||
),
|
||||
guard: None,
|
||||
},
|
||||
],
|
||||
),
|
||||
[
|
||||
WhenBranch {
|
||||
patterns: [
|
||||
@14-21 SpaceBefore(
|
||||
Malformed(
|
||||
"bar.and",
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
],
|
||||
value: @25-26 Num(
|
||||
"1",
|
||||
),
|
||||
guard: None,
|
||||
},
|
||||
WhenBranch {
|
||||
patterns: [
|
||||
@31-32 SpaceBefore(
|
||||
Underscore(
|
||||
"",
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
],
|
||||
value: @36-37 Num(
|
||||
"4",
|
||||
),
|
||||
guard: None,
|
||||
},
|
||||
Newline,
|
||||
],
|
||||
)
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
when x is
|
||||
Foo.and -> 1
|
||||
_ -> 4
|
|
@ -1,40 +1,45 @@
|
|||
When(
|
||||
@5-6 Var {
|
||||
module_name: "",
|
||||
ident: "x",
|
||||
},
|
||||
SpaceAfter(
|
||||
When(
|
||||
@5-6 Var {
|
||||
module_name: "",
|
||||
ident: "x",
|
||||
},
|
||||
[
|
||||
WhenBranch {
|
||||
patterns: [
|
||||
@14-21 SpaceBefore(
|
||||
Malformed(
|
||||
"Foo.and",
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
],
|
||||
value: @25-26 Num(
|
||||
"1",
|
||||
),
|
||||
guard: None,
|
||||
},
|
||||
WhenBranch {
|
||||
patterns: [
|
||||
@31-32 SpaceBefore(
|
||||
Underscore(
|
||||
"",
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
],
|
||||
value: @36-37 Num(
|
||||
"4",
|
||||
),
|
||||
guard: None,
|
||||
},
|
||||
],
|
||||
),
|
||||
[
|
||||
WhenBranch {
|
||||
patterns: [
|
||||
@14-21 SpaceBefore(
|
||||
Malformed(
|
||||
"Foo.and",
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
],
|
||||
value: @25-26 Num(
|
||||
"1",
|
||||
),
|
||||
guard: None,
|
||||
},
|
||||
WhenBranch {
|
||||
patterns: [
|
||||
@31-32 SpaceBefore(
|
||||
Underscore(
|
||||
"",
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
],
|
||||
value: @36-37 Num(
|
||||
"4",
|
||||
),
|
||||
guard: None,
|
||||
},
|
||||
Newline,
|
||||
],
|
||||
)
|
||||
|
|
|
@ -1,63 +1,68 @@
|
|||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
Index(0),
|
||||
],
|
||||
regions: [
|
||||
@0-43,
|
||||
],
|
||||
space_before: [
|
||||
Slice(start = 0, length = 0),
|
||||
],
|
||||
space_after: [
|
||||
Slice(start = 0, length = 0),
|
||||
],
|
||||
spaces: [],
|
||||
type_defs: [
|
||||
Ability {
|
||||
header: TypeHeader {
|
||||
name: @0-4 "Hash",
|
||||
vars: [],
|
||||
},
|
||||
loc_implements: @5-15 Implements,
|
||||
members: [
|
||||
AbilityMember {
|
||||
name: @18-22 SpaceBefore(
|
||||
"hash",
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
typ: @25-43 Function(
|
||||
[
|
||||
@25-26 SpaceAfter(
|
||||
BoundVariable(
|
||||
"a",
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
],
|
||||
@40-43 Apply(
|
||||
"",
|
||||
"U64",
|
||||
[],
|
||||
),
|
||||
),
|
||||
SpaceAfter(
|
||||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
Index(0),
|
||||
],
|
||||
regions: [
|
||||
@0-43,
|
||||
],
|
||||
space_before: [
|
||||
Slice(start = 0, length = 0),
|
||||
],
|
||||
space_after: [
|
||||
Slice(start = 0, length = 0),
|
||||
],
|
||||
spaces: [],
|
||||
type_defs: [
|
||||
Ability {
|
||||
header: TypeHeader {
|
||||
name: @0-4 "Hash",
|
||||
vars: [],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
value_defs: [],
|
||||
},
|
||||
@45-46 SpaceBefore(
|
||||
Num(
|
||||
"1",
|
||||
loc_implements: @5-15 Implements,
|
||||
members: [
|
||||
AbilityMember {
|
||||
name: @18-22 SpaceBefore(
|
||||
"hash",
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
typ: @25-43 Function(
|
||||
[
|
||||
@25-26 SpaceAfter(
|
||||
BoundVariable(
|
||||
"a",
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
],
|
||||
@40-43 Apply(
|
||||
"",
|
||||
"U64",
|
||||
[],
|
||||
),
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
value_defs: [],
|
||||
},
|
||||
@45-46 SpaceBefore(
|
||||
Num(
|
||||
"1",
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
)
|
||||
|
|
|
@ -1,78 +1,83 @@
|
|||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
Index(0),
|
||||
],
|
||||
regions: [
|
||||
@0-52,
|
||||
],
|
||||
space_before: [
|
||||
Slice(start = 0, length = 0),
|
||||
],
|
||||
space_after: [
|
||||
Slice(start = 0, length = 0),
|
||||
],
|
||||
spaces: [],
|
||||
type_defs: [
|
||||
Ability {
|
||||
header: TypeHeader {
|
||||
name: @0-4 "Hash",
|
||||
vars: [],
|
||||
SpaceAfter(
|
||||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
Index(0),
|
||||
],
|
||||
regions: [
|
||||
@0-52,
|
||||
],
|
||||
space_before: [
|
||||
Slice(start = 0, length = 0),
|
||||
],
|
||||
space_after: [
|
||||
Slice(start = 0, length = 0),
|
||||
],
|
||||
spaces: [],
|
||||
type_defs: [
|
||||
Ability {
|
||||
header: TypeHeader {
|
||||
name: @0-4 "Hash",
|
||||
vars: [],
|
||||
},
|
||||
loc_implements: @5-15 Implements,
|
||||
members: [
|
||||
AbilityMember {
|
||||
name: @18-22 SpaceBefore(
|
||||
"hash",
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
typ: @25-33 Function(
|
||||
[
|
||||
@25-26 BoundVariable(
|
||||
"a",
|
||||
),
|
||||
],
|
||||
@30-33 Apply(
|
||||
"",
|
||||
"U64",
|
||||
[],
|
||||
),
|
||||
),
|
||||
},
|
||||
AbilityMember {
|
||||
name: @36-41 SpaceBefore(
|
||||
"hash2",
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
typ: @44-52 Function(
|
||||
[
|
||||
@44-45 BoundVariable(
|
||||
"a",
|
||||
),
|
||||
],
|
||||
@49-52 Apply(
|
||||
"",
|
||||
"U64",
|
||||
[],
|
||||
),
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
loc_implements: @5-15 Implements,
|
||||
members: [
|
||||
AbilityMember {
|
||||
name: @18-22 SpaceBefore(
|
||||
"hash",
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
typ: @25-33 Function(
|
||||
[
|
||||
@25-26 BoundVariable(
|
||||
"a",
|
||||
),
|
||||
],
|
||||
@30-33 Apply(
|
||||
"",
|
||||
"U64",
|
||||
[],
|
||||
),
|
||||
),
|
||||
},
|
||||
AbilityMember {
|
||||
name: @36-41 SpaceBefore(
|
||||
"hash2",
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
typ: @44-52 Function(
|
||||
[
|
||||
@44-45 BoundVariable(
|
||||
"a",
|
||||
),
|
||||
],
|
||||
@49-52 Apply(
|
||||
"",
|
||||
"U64",
|
||||
[],
|
||||
),
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
value_defs: [],
|
||||
},
|
||||
@54-55 SpaceBefore(
|
||||
Num(
|
||||
"1",
|
||||
],
|
||||
value_defs: [],
|
||||
},
|
||||
@54-55 SpaceBefore(
|
||||
Num(
|
||||
"1",
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
)
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
Hash implements hash : a -> U64 where a implements Hash
|
||||
|
||||
1
|
|
@ -1,67 +1,72 @@
|
|||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
Index(0),
|
||||
],
|
||||
regions: [
|
||||
@0-55,
|
||||
],
|
||||
space_before: [
|
||||
Slice(start = 0, length = 0),
|
||||
],
|
||||
space_after: [
|
||||
Slice(start = 0, length = 0),
|
||||
],
|
||||
spaces: [],
|
||||
type_defs: [
|
||||
Ability {
|
||||
header: TypeHeader {
|
||||
name: @0-4 "Hash",
|
||||
vars: [],
|
||||
},
|
||||
loc_implements: @5-15 Implements,
|
||||
members: [
|
||||
AbilityMember {
|
||||
name: @16-20 "hash",
|
||||
typ: @23-55 Where(
|
||||
@23-31 Function(
|
||||
[
|
||||
@23-24 BoundVariable(
|
||||
"a",
|
||||
),
|
||||
],
|
||||
@28-31 Apply(
|
||||
"",
|
||||
"U64",
|
||||
[],
|
||||
),
|
||||
),
|
||||
[
|
||||
@38-55 ImplementsClause {
|
||||
var: @38-39 "a",
|
||||
abilities: [
|
||||
@51-55 Apply(
|
||||
"",
|
||||
"Hash",
|
||||
[],
|
||||
SpaceAfter(
|
||||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
Index(0),
|
||||
],
|
||||
regions: [
|
||||
@0-55,
|
||||
],
|
||||
space_before: [
|
||||
Slice(start = 0, length = 0),
|
||||
],
|
||||
space_after: [
|
||||
Slice(start = 0, length = 0),
|
||||
],
|
||||
spaces: [],
|
||||
type_defs: [
|
||||
Ability {
|
||||
header: TypeHeader {
|
||||
name: @0-4 "Hash",
|
||||
vars: [],
|
||||
},
|
||||
loc_implements: @5-15 Implements,
|
||||
members: [
|
||||
AbilityMember {
|
||||
name: @16-20 "hash",
|
||||
typ: @23-55 Where(
|
||||
@23-31 Function(
|
||||
[
|
||||
@23-24 BoundVariable(
|
||||
"a",
|
||||
),
|
||||
],
|
||||
},
|
||||
],
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
value_defs: [],
|
||||
},
|
||||
@57-58 SpaceBefore(
|
||||
Num(
|
||||
"1",
|
||||
@28-31 Apply(
|
||||
"",
|
||||
"U64",
|
||||
[],
|
||||
),
|
||||
),
|
||||
[
|
||||
@38-55 ImplementsClause {
|
||||
var: @38-39 "a",
|
||||
abilities: [
|
||||
@51-55 Apply(
|
||||
"",
|
||||
"Hash",
|
||||
[],
|
||||
),
|
||||
],
|
||||
},
|
||||
],
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
value_defs: [],
|
||||
},
|
||||
@57-58 SpaceBefore(
|
||||
Num(
|
||||
"1",
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
)
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
Ab1 implements ab1 : a -> {} where a implements Ab1
|
||||
|
||||
Ab2 implements ab2 : a -> {} where a implements Ab2
|
||||
|
||||
1
|
|
@ -1,110 +1,115 @@
|
|||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
Index(0),
|
||||
Index(1),
|
||||
],
|
||||
regions: [
|
||||
@0-51,
|
||||
@53-104,
|
||||
],
|
||||
space_before: [
|
||||
Slice(start = 0, length = 0),
|
||||
Slice(start = 0, length = 2),
|
||||
],
|
||||
space_after: [
|
||||
Slice(start = 0, length = 0),
|
||||
Slice(start = 2, length = 0),
|
||||
],
|
||||
spaces: [
|
||||
Newline,
|
||||
Newline,
|
||||
],
|
||||
type_defs: [
|
||||
Ability {
|
||||
header: TypeHeader {
|
||||
name: @0-3 "Ab1",
|
||||
vars: [],
|
||||
},
|
||||
loc_implements: @4-14 Implements,
|
||||
members: [
|
||||
AbilityMember {
|
||||
name: @15-18 "ab1",
|
||||
typ: @21-51 Where(
|
||||
@21-28 Function(
|
||||
[
|
||||
@21-22 BoundVariable(
|
||||
"a",
|
||||
),
|
||||
],
|
||||
@26-28 Record {
|
||||
fields: [],
|
||||
ext: None,
|
||||
},
|
||||
),
|
||||
[
|
||||
@35-51 ImplementsClause {
|
||||
var: @35-36 "a",
|
||||
abilities: [
|
||||
@48-51 Apply(
|
||||
"",
|
||||
"Ab1",
|
||||
[],
|
||||
SpaceAfter(
|
||||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
Index(0),
|
||||
Index(1),
|
||||
],
|
||||
regions: [
|
||||
@0-51,
|
||||
@53-104,
|
||||
],
|
||||
space_before: [
|
||||
Slice(start = 0, length = 0),
|
||||
Slice(start = 0, length = 2),
|
||||
],
|
||||
space_after: [
|
||||
Slice(start = 0, length = 0),
|
||||
Slice(start = 2, length = 0),
|
||||
],
|
||||
spaces: [
|
||||
Newline,
|
||||
Newline,
|
||||
],
|
||||
type_defs: [
|
||||
Ability {
|
||||
header: TypeHeader {
|
||||
name: @0-3 "Ab1",
|
||||
vars: [],
|
||||
},
|
||||
loc_implements: @4-14 Implements,
|
||||
members: [
|
||||
AbilityMember {
|
||||
name: @15-18 "ab1",
|
||||
typ: @21-51 Where(
|
||||
@21-28 Function(
|
||||
[
|
||||
@21-22 BoundVariable(
|
||||
"a",
|
||||
),
|
||||
],
|
||||
},
|
||||
],
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
Ability {
|
||||
header: TypeHeader {
|
||||
name: @53-56 "Ab2",
|
||||
vars: [],
|
||||
},
|
||||
loc_implements: @57-67 Implements,
|
||||
members: [
|
||||
AbilityMember {
|
||||
name: @68-71 "ab2",
|
||||
typ: @74-104 Where(
|
||||
@74-81 Function(
|
||||
@26-28 Record {
|
||||
fields: [],
|
||||
ext: None,
|
||||
},
|
||||
),
|
||||
[
|
||||
@74-75 BoundVariable(
|
||||
"a",
|
||||
),
|
||||
@35-51 ImplementsClause {
|
||||
var: @35-36 "a",
|
||||
abilities: [
|
||||
@48-51 Apply(
|
||||
"",
|
||||
"Ab1",
|
||||
[],
|
||||
),
|
||||
],
|
||||
},
|
||||
],
|
||||
@79-81 Record {
|
||||
fields: [],
|
||||
ext: None,
|
||||
},
|
||||
),
|
||||
[
|
||||
@88-104 ImplementsClause {
|
||||
var: @88-89 "a",
|
||||
abilities: [
|
||||
@101-104 Apply(
|
||||
"",
|
||||
"Ab2",
|
||||
[],
|
||||
},
|
||||
],
|
||||
},
|
||||
Ability {
|
||||
header: TypeHeader {
|
||||
name: @53-56 "Ab2",
|
||||
vars: [],
|
||||
},
|
||||
loc_implements: @57-67 Implements,
|
||||
members: [
|
||||
AbilityMember {
|
||||
name: @68-71 "ab2",
|
||||
typ: @74-104 Where(
|
||||
@74-81 Function(
|
||||
[
|
||||
@74-75 BoundVariable(
|
||||
"a",
|
||||
),
|
||||
],
|
||||
},
|
||||
],
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
value_defs: [],
|
||||
},
|
||||
@106-107 SpaceBefore(
|
||||
Num(
|
||||
"1",
|
||||
@79-81 Record {
|
||||
fields: [],
|
||||
ext: None,
|
||||
},
|
||||
),
|
||||
[
|
||||
@88-104 ImplementsClause {
|
||||
var: @88-89 "a",
|
||||
abilities: [
|
||||
@101-104 Apply(
|
||||
"",
|
||||
"Ab2",
|
||||
[],
|
||||
),
|
||||
],
|
||||
},
|
||||
],
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
value_defs: [],
|
||||
},
|
||||
@106-107 SpaceBefore(
|
||||
Num(
|
||||
"1",
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
)
|
||||
|
|
|
@ -1,78 +1,83 @@
|
|||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
Index(2147483648),
|
||||
],
|
||||
regions: [
|
||||
@0-49,
|
||||
],
|
||||
space_before: [
|
||||
Slice(start = 0, length = 0),
|
||||
],
|
||||
space_after: [
|
||||
Slice(start = 0, length = 0),
|
||||
],
|
||||
spaces: [],
|
||||
type_defs: [],
|
||||
value_defs: [
|
||||
AnnotatedBody {
|
||||
ann_pattern: @0-8 RecordDestructure(
|
||||
[
|
||||
@2-3 Identifier {
|
||||
ident: "x",
|
||||
},
|
||||
@5-7 Identifier {
|
||||
ident: "y",
|
||||
},
|
||||
],
|
||||
),
|
||||
ann_type: @11-14 Apply(
|
||||
"",
|
||||
"Foo",
|
||||
[],
|
||||
),
|
||||
comment: None,
|
||||
body_pattern: @15-23 RecordDestructure(
|
||||
[
|
||||
@17-18 Identifier {
|
||||
ident: "x",
|
||||
},
|
||||
@20-21 Identifier {
|
||||
ident: "y",
|
||||
},
|
||||
],
|
||||
),
|
||||
body_expr: @26-49 Record(
|
||||
[
|
||||
@28-37 RequiredValue(
|
||||
@28-29 "x",
|
||||
[],
|
||||
@32-37 Str(
|
||||
PlainLine(
|
||||
"foo",
|
||||
SpaceAfter(
|
||||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
Index(2147483648),
|
||||
],
|
||||
regions: [
|
||||
@0-49,
|
||||
],
|
||||
space_before: [
|
||||
Slice(start = 0, length = 0),
|
||||
],
|
||||
space_after: [
|
||||
Slice(start = 0, length = 0),
|
||||
],
|
||||
spaces: [],
|
||||
type_defs: [],
|
||||
value_defs: [
|
||||
AnnotatedBody {
|
||||
ann_pattern: @0-8 RecordDestructure(
|
||||
[
|
||||
@2-3 Identifier {
|
||||
ident: "x",
|
||||
},
|
||||
@5-7 Identifier {
|
||||
ident: "y",
|
||||
},
|
||||
],
|
||||
),
|
||||
ann_type: @11-14 Apply(
|
||||
"",
|
||||
"Foo",
|
||||
[],
|
||||
),
|
||||
comment: None,
|
||||
body_pattern: @15-23 RecordDestructure(
|
||||
[
|
||||
@17-18 Identifier {
|
||||
ident: "x",
|
||||
},
|
||||
@20-22 Identifier {
|
||||
ident: "y",
|
||||
},
|
||||
],
|
||||
),
|
||||
body_expr: @26-49 Record(
|
||||
[
|
||||
@28-37 RequiredValue(
|
||||
@28-29 "x",
|
||||
[],
|
||||
@32-37 Str(
|
||||
PlainLine(
|
||||
"foo",
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
@39-47 RequiredValue(
|
||||
@39-40 "y",
|
||||
[],
|
||||
@43-47 Float(
|
||||
"3.14",
|
||||
@39-47 RequiredValue(
|
||||
@39-40 "y",
|
||||
[],
|
||||
@43-47 Float(
|
||||
"3.14",
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
@51-52 SpaceBefore(
|
||||
Var {
|
||||
module_name: "",
|
||||
ident: "x",
|
||||
],
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
Newline,
|
||||
],
|
||||
@51-52 SpaceBefore(
|
||||
Var {
|
||||
module_name: "",
|
||||
ident: "x",
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
)
|
||||
|
|
|
@ -1,79 +1,84 @@
|
|||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
Index(2147483648),
|
||||
],
|
||||
regions: [
|
||||
@0-46,
|
||||
],
|
||||
space_before: [
|
||||
Slice(start = 0, length = 0),
|
||||
],
|
||||
space_after: [
|
||||
Slice(start = 0, length = 0),
|
||||
],
|
||||
spaces: [],
|
||||
type_defs: [],
|
||||
value_defs: [
|
||||
AnnotatedBody {
|
||||
ann_pattern: @0-8 Apply(
|
||||
@0-6 Tag(
|
||||
"UserId",
|
||||
),
|
||||
[
|
||||
@7-8 Identifier {
|
||||
ident: "x",
|
||||
},
|
||||
],
|
||||
),
|
||||
ann_type: @11-25 TagUnion {
|
||||
ext: None,
|
||||
tags: [
|
||||
@13-23 Apply {
|
||||
name: @13-19 "UserId",
|
||||
args: [
|
||||
@20-23 Apply(
|
||||
"",
|
||||
"I64",
|
||||
[],
|
||||
),
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
comment: None,
|
||||
body_pattern: @26-34 Apply(
|
||||
@26-32 Tag(
|
||||
"UserId",
|
||||
),
|
||||
[
|
||||
@33-34 Identifier {
|
||||
ident: "x",
|
||||
},
|
||||
],
|
||||
),
|
||||
body_expr: @37-46 Apply(
|
||||
@37-43 Tag(
|
||||
"UserId",
|
||||
),
|
||||
[
|
||||
@44-46 Num(
|
||||
"42",
|
||||
SpaceAfter(
|
||||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
Index(2147483648),
|
||||
],
|
||||
regions: [
|
||||
@0-46,
|
||||
],
|
||||
space_before: [
|
||||
Slice(start = 0, length = 0),
|
||||
],
|
||||
space_after: [
|
||||
Slice(start = 0, length = 0),
|
||||
],
|
||||
spaces: [],
|
||||
type_defs: [],
|
||||
value_defs: [
|
||||
AnnotatedBody {
|
||||
ann_pattern: @0-8 Apply(
|
||||
@0-6 Tag(
|
||||
"UserId",
|
||||
),
|
||||
],
|
||||
Space,
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
@48-49 SpaceBefore(
|
||||
Var {
|
||||
module_name: "",
|
||||
ident: "x",
|
||||
[
|
||||
@7-8 Identifier {
|
||||
ident: "x",
|
||||
},
|
||||
],
|
||||
),
|
||||
ann_type: @11-25 TagUnion {
|
||||
ext: None,
|
||||
tags: [
|
||||
@13-23 Apply {
|
||||
name: @13-19 "UserId",
|
||||
args: [
|
||||
@20-23 Apply(
|
||||
"",
|
||||
"I64",
|
||||
[],
|
||||
),
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
comment: None,
|
||||
body_pattern: @26-34 Apply(
|
||||
@26-32 Tag(
|
||||
"UserId",
|
||||
),
|
||||
[
|
||||
@33-34 Identifier {
|
||||
ident: "x",
|
||||
},
|
||||
],
|
||||
),
|
||||
body_expr: @37-46 Apply(
|
||||
@37-43 Tag(
|
||||
"UserId",
|
||||
),
|
||||
[
|
||||
@44-46 Num(
|
||||
"42",
|
||||
),
|
||||
],
|
||||
Space,
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
Newline,
|
||||
],
|
||||
@48-49 SpaceBefore(
|
||||
Var {
|
||||
module_name: "",
|
||||
ident: "x",
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
)
|
||||
|
|
|
@ -1,70 +1,75 @@
|
|||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
Index(2147483648),
|
||||
],
|
||||
regions: [
|
||||
@0-41,
|
||||
],
|
||||
space_before: [
|
||||
Slice(start = 0, length = 0),
|
||||
],
|
||||
space_after: [
|
||||
Slice(start = 0, length = 0),
|
||||
],
|
||||
spaces: [],
|
||||
type_defs: [],
|
||||
value_defs: [
|
||||
AnnotatedBody {
|
||||
ann_pattern: @0-8 Tuple(
|
||||
[
|
||||
@2-3 Identifier {
|
||||
ident: "x",
|
||||
},
|
||||
@5-6 Identifier {
|
||||
ident: "y",
|
||||
},
|
||||
],
|
||||
),
|
||||
ann_type: @11-14 Apply(
|
||||
"",
|
||||
"Foo",
|
||||
[],
|
||||
),
|
||||
comment: None,
|
||||
body_pattern: @15-23 Tuple(
|
||||
[
|
||||
@17-18 Identifier {
|
||||
ident: "x",
|
||||
},
|
||||
@20-21 Identifier {
|
||||
ident: "y",
|
||||
},
|
||||
],
|
||||
),
|
||||
body_expr: @26-41 Tuple(
|
||||
[
|
||||
@28-33 Str(
|
||||
PlainLine(
|
||||
"foo",
|
||||
SpaceAfter(
|
||||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
Index(2147483648),
|
||||
],
|
||||
regions: [
|
||||
@0-41,
|
||||
],
|
||||
space_before: [
|
||||
Slice(start = 0, length = 0),
|
||||
],
|
||||
space_after: [
|
||||
Slice(start = 0, length = 0),
|
||||
],
|
||||
spaces: [],
|
||||
type_defs: [],
|
||||
value_defs: [
|
||||
AnnotatedBody {
|
||||
ann_pattern: @0-8 Tuple(
|
||||
[
|
||||
@2-3 Identifier {
|
||||
ident: "x",
|
||||
},
|
||||
@5-6 Identifier {
|
||||
ident: "y",
|
||||
},
|
||||
],
|
||||
),
|
||||
ann_type: @11-14 Apply(
|
||||
"",
|
||||
"Foo",
|
||||
[],
|
||||
),
|
||||
comment: None,
|
||||
body_pattern: @15-23 Tuple(
|
||||
[
|
||||
@17-18 Identifier {
|
||||
ident: "x",
|
||||
},
|
||||
@20-21 Identifier {
|
||||
ident: "y",
|
||||
},
|
||||
],
|
||||
),
|
||||
body_expr: @26-41 Tuple(
|
||||
[
|
||||
@28-33 Str(
|
||||
PlainLine(
|
||||
"foo",
|
||||
),
|
||||
),
|
||||
),
|
||||
@35-39 Float(
|
||||
"3.14",
|
||||
),
|
||||
],
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
@43-44 SpaceBefore(
|
||||
Var {
|
||||
module_name: "",
|
||||
ident: "x",
|
||||
@35-39 Float(
|
||||
"3.14",
|
||||
),
|
||||
],
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
Newline,
|
||||
],
|
||||
@43-44 SpaceBefore(
|
||||
Var {
|
||||
module_name: "",
|
||||
ident: "x",
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
)
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
## first line of docs
|
||||
## second line
|
||||
## third line
|
||||
## fourth line
|
||||
##
|
||||
## sixth line after doc new line
|
||||
x = 5
|
||||
|
||||
42
|
|
@ -1,40 +1,45 @@
|
|||
SpaceBefore(
|
||||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
Index(2147483648),
|
||||
],
|
||||
regions: [
|
||||
@107-112,
|
||||
],
|
||||
space_before: [
|
||||
Slice(start = 0, length = 0),
|
||||
],
|
||||
space_after: [
|
||||
Slice(start = 0, length = 0),
|
||||
],
|
||||
spaces: [],
|
||||
type_defs: [],
|
||||
value_defs: [
|
||||
Body(
|
||||
@107-108 Identifier {
|
||||
ident: "x",
|
||||
},
|
||||
@111-112 Num(
|
||||
"5",
|
||||
SpaceAfter(
|
||||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
Index(2147483648),
|
||||
],
|
||||
regions: [
|
||||
@107-112,
|
||||
],
|
||||
space_before: [
|
||||
Slice(start = 0, length = 0),
|
||||
],
|
||||
space_after: [
|
||||
Slice(start = 0, length = 0),
|
||||
],
|
||||
spaces: [],
|
||||
type_defs: [],
|
||||
value_defs: [
|
||||
Body(
|
||||
@107-108 Identifier {
|
||||
ident: "x",
|
||||
},
|
||||
@111-112 Num(
|
||||
"5",
|
||||
),
|
||||
),
|
||||
],
|
||||
},
|
||||
@114-116 SpaceBefore(
|
||||
Num(
|
||||
"42",
|
||||
),
|
||||
],
|
||||
},
|
||||
@114-116 SpaceBefore(
|
||||
Num(
|
||||
"42",
|
||||
[
|
||||
Newline,
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
[
|
||||
DocComment(
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
Index(2147483648),
|
||||
],
|
||||
regions: [
|
||||
@0-4,
|
||||
],
|
||||
space_before: [
|
||||
Slice(start = 0, length = 0),
|
||||
],
|
||||
space_after: [
|
||||
Slice(start = 0, length = 0),
|
||||
],
|
||||
spaces: [],
|
||||
type_defs: [],
|
||||
value_defs: [
|
||||
Annotation(
|
||||
@0-1 Identifier {
|
||||
ident: "a",
|
||||
},
|
||||
@3-4 SpaceBefore(
|
||||
BoundVariable(
|
||||
"c",
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
},
|
||||
@5-6 Num(
|
||||
"0",
|
||||
),
|
||||
)
|
|
@ -1,3 +0,0 @@
|
|||
f
|
||||
-5
|
||||
2
|
|
@ -1,25 +0,0 @@
|
|||
Apply(
|
||||
@0-1 SpaceAfter(
|
||||
Var {
|
||||
module_name: "",
|
||||
ident: "f",
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
[
|
||||
@2-4 Num(
|
||||
"-5",
|
||||
),
|
||||
@5-6 SpaceBefore(
|
||||
Num(
|
||||
"2",
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
],
|
||||
Space,
|
||||
)
|
|
@ -1,3 +0,0 @@
|
|||
f
|
||||
-5
|
||||
2
|
|
@ -1,3 +0,0 @@
|
|||
a
|
||||
&& (\x -> x)
|
||||
8
|
|
@ -1,35 +0,0 @@
|
|||
BinOps(
|
||||
[
|
||||
(
|
||||
@0-1 Var {
|
||||
module_name: "",
|
||||
ident: "a",
|
||||
},
|
||||
@2-4 And,
|
||||
),
|
||||
],
|
||||
@5-12 Apply(
|
||||
@5-10 Closure(
|
||||
[
|
||||
@6-7 Identifier {
|
||||
ident: "x",
|
||||
},
|
||||
],
|
||||
@9-10 Var {
|
||||
module_name: "",
|
||||
ident: "x",
|
||||
},
|
||||
),
|
||||
[
|
||||
@11-12 SpaceBefore(
|
||||
Num(
|
||||
"8",
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
],
|
||||
Space,
|
||||
),
|
||||
)
|
|
@ -1,2 +0,0 @@
|
|||
a && \x->x
|
||||
8
|
|
@ -0,0 +1,8 @@
|
|||
Model position : {
|
||||
evaluated : Set position,
|
||||
openSet : Set position,
|
||||
costs : Dict.Dict position F64,
|
||||
cameFrom : Dict.Dict position position,
|
||||
}
|
||||
|
||||
a
|
|
@ -0,0 +1,130 @@
|
|||
SpaceAfter(
|
||||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
Index(0),
|
||||
],
|
||||
regions: [
|
||||
@0-164,
|
||||
],
|
||||
space_before: [
|
||||
Slice(start = 0, length = 0),
|
||||
],
|
||||
space_after: [
|
||||
Slice(start = 0, length = 0),
|
||||
],
|
||||
spaces: [],
|
||||
type_defs: [
|
||||
Alias {
|
||||
header: TypeHeader {
|
||||
name: @0-5 "Model",
|
||||
vars: [
|
||||
@6-14 Identifier {
|
||||
ident: "position",
|
||||
},
|
||||
],
|
||||
},
|
||||
ann: @21-164 Record {
|
||||
fields: [
|
||||
@23-47 SpaceAfter(
|
||||
RequiredValue(
|
||||
@23-32 "evaluated",
|
||||
[],
|
||||
@35-47 Apply(
|
||||
"",
|
||||
"Set",
|
||||
[
|
||||
@39-47 BoundVariable(
|
||||
"position",
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
@54-76 SpaceAfter(
|
||||
RequiredValue(
|
||||
@54-61 "openSet",
|
||||
[],
|
||||
@64-76 Apply(
|
||||
"",
|
||||
"Set",
|
||||
[
|
||||
@68-76 BoundVariable(
|
||||
"position",
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
@83-113 SpaceAfter(
|
||||
RequiredValue(
|
||||
@83-88 "costs",
|
||||
[],
|
||||
@91-113 Apply(
|
||||
"Dict",
|
||||
"Dict",
|
||||
[
|
||||
@101-109 BoundVariable(
|
||||
"position",
|
||||
),
|
||||
@110-113 Apply(
|
||||
"",
|
||||
"F64",
|
||||
[],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
@120-158 SpaceAfter(
|
||||
RequiredValue(
|
||||
@120-128 "cameFrom",
|
||||
[],
|
||||
@131-158 Apply(
|
||||
"Dict",
|
||||
"Dict",
|
||||
[
|
||||
@141-149 BoundVariable(
|
||||
"position",
|
||||
),
|
||||
@150-158 BoundVariable(
|
||||
"position",
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
],
|
||||
ext: None,
|
||||
},
|
||||
},
|
||||
],
|
||||
value_defs: [],
|
||||
},
|
||||
@166-167 SpaceBefore(
|
||||
Var {
|
||||
module_name: "",
|
||||
ident: "a",
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
)
|
|
@ -0,0 +1,8 @@
|
|||
Model position :
|
||||
{ evaluated : Set position
|
||||
, openSet : Set position
|
||||
, costs : Dict.Dict position F64
|
||||
, cameFrom : Dict.Dict position position
|
||||
}
|
||||
|
||||
a
|
|
@ -1 +0,0 @@
|
|||
foo = 1 # comment after
|
|
@ -1,4 +0,0 @@
|
|||
Z #
|
||||
h
|
||||
: a
|
||||
j
|
|
@ -1,54 +0,0 @@
|
|||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
Index(0),
|
||||
],
|
||||
regions: [
|
||||
@0-7,
|
||||
],
|
||||
space_before: [
|
||||
Slice(start = 0, length = 0),
|
||||
],
|
||||
space_after: [
|
||||
Slice(start = 0, length = 0),
|
||||
],
|
||||
spaces: [],
|
||||
type_defs: [
|
||||
Alias {
|
||||
header: TypeHeader {
|
||||
name: @0-1 "Z",
|
||||
vars: [
|
||||
@3-4 SpaceAfter(
|
||||
SpaceBefore(
|
||||
Identifier {
|
||||
ident: "h",
|
||||
},
|
||||
[
|
||||
LineComment(
|
||||
"",
|
||||
),
|
||||
],
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
],
|
||||
},
|
||||
ann: @6-7 BoundVariable(
|
||||
"a",
|
||||
),
|
||||
},
|
||||
],
|
||||
value_defs: [],
|
||||
},
|
||||
@8-9 SpaceBefore(
|
||||
Var {
|
||||
module_name: "",
|
||||
ident: "j",
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
)
|
|
@ -1,4 +0,0 @@
|
|||
Z#
|
||||
h
|
||||
:a
|
||||
j
|
|
@ -1,197 +1,50 @@
|
|||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
Index(2147483648),
|
||||
Index(2147483649),
|
||||
Index(2147483650),
|
||||
Index(2147483651),
|
||||
Index(2147483652),
|
||||
],
|
||||
regions: [
|
||||
@0-12,
|
||||
@13-28,
|
||||
@29-45,
|
||||
@46-74,
|
||||
@75-101,
|
||||
],
|
||||
space_before: [
|
||||
Slice(start = 0, length = 0),
|
||||
Slice(start = 0, length = 1),
|
||||
Slice(start = 1, length = 1),
|
||||
Slice(start = 2, length = 1),
|
||||
Slice(start = 3, length = 1),
|
||||
],
|
||||
space_after: [
|
||||
Slice(start = 0, length = 0),
|
||||
Slice(start = 1, length = 0),
|
||||
Slice(start = 2, length = 0),
|
||||
Slice(start = 3, length = 0),
|
||||
Slice(start = 4, length = 0),
|
||||
],
|
||||
spaces: [
|
||||
Newline,
|
||||
Newline,
|
||||
Newline,
|
||||
Newline,
|
||||
],
|
||||
type_defs: [],
|
||||
value_defs: [
|
||||
Body(
|
||||
@0-1 Underscore(
|
||||
"",
|
||||
),
|
||||
@4-12 Apply(
|
||||
@4-9 Crash,
|
||||
[
|
||||
@10-12 Str(
|
||||
PlainLine(
|
||||
"",
|
||||
),
|
||||
),
|
||||
],
|
||||
Space,
|
||||
),
|
||||
),
|
||||
Body(
|
||||
@13-14 Underscore(
|
||||
"",
|
||||
),
|
||||
@17-28 Apply(
|
||||
@17-22 Crash,
|
||||
[
|
||||
@23-25 Str(
|
||||
PlainLine(
|
||||
"",
|
||||
),
|
||||
),
|
||||
@26-28 Str(
|
||||
PlainLine(
|
||||
"",
|
||||
),
|
||||
),
|
||||
],
|
||||
Space,
|
||||
),
|
||||
),
|
||||
Body(
|
||||
@29-30 Underscore(
|
||||
"",
|
||||
),
|
||||
@33-45 Apply(
|
||||
@33-38 Crash,
|
||||
[
|
||||
@39-41 Num(
|
||||
"15",
|
||||
),
|
||||
@42-45 Num(
|
||||
"123",
|
||||
),
|
||||
],
|
||||
Space,
|
||||
),
|
||||
),
|
||||
Body(
|
||||
@46-47 Underscore(
|
||||
"",
|
||||
),
|
||||
@50-74 Apply(
|
||||
@50-53 Var {
|
||||
module_name: "",
|
||||
ident: "try",
|
||||
},
|
||||
[
|
||||
@54-57 Var {
|
||||
module_name: "",
|
||||
ident: "foo",
|
||||
},
|
||||
@59-73 ParensAround(
|
||||
Closure(
|
||||
[
|
||||
@60-61 Underscore(
|
||||
"",
|
||||
),
|
||||
],
|
||||
@65-73 Apply(
|
||||
@65-70 Crash,
|
||||
[
|
||||
@71-73 Str(
|
||||
PlainLine(
|
||||
"",
|
||||
),
|
||||
),
|
||||
],
|
||||
Space,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
Space,
|
||||
),
|
||||
),
|
||||
Body(
|
||||
@75-76 Underscore(
|
||||
"",
|
||||
),
|
||||
@81-101 SpaceBefore(
|
||||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
Index(2147483648),
|
||||
],
|
||||
regions: [
|
||||
@81-93,
|
||||
],
|
||||
space_before: [
|
||||
Slice(start = 0, length = 0),
|
||||
],
|
||||
space_after: [
|
||||
Slice(start = 0, length = 0),
|
||||
],
|
||||
spaces: [],
|
||||
type_defs: [],
|
||||
value_defs: [
|
||||
Body(
|
||||
@81-82 Underscore(
|
||||
"",
|
||||
),
|
||||
@85-93 Apply(
|
||||
@85-90 Crash,
|
||||
[
|
||||
@91-93 Str(
|
||||
PlainLine(
|
||||
"",
|
||||
),
|
||||
),
|
||||
],
|
||||
Space,
|
||||
),
|
||||
),
|
||||
],
|
||||
},
|
||||
@96-101 SpaceBefore(
|
||||
Crash,
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
SpaceAfter(
|
||||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
Index(2147483648),
|
||||
Index(2147483649),
|
||||
Index(2147483650),
|
||||
Index(2147483651),
|
||||
Index(2147483652),
|
||||
],
|
||||
regions: [
|
||||
@0-12,
|
||||
@13-28,
|
||||
@29-45,
|
||||
@46-74,
|
||||
@75-101,
|
||||
],
|
||||
space_before: [
|
||||
Slice(start = 0, length = 0),
|
||||
Slice(start = 0, length = 1),
|
||||
Slice(start = 1, length = 1),
|
||||
Slice(start = 2, length = 1),
|
||||
Slice(start = 3, length = 1),
|
||||
],
|
||||
space_after: [
|
||||
Slice(start = 0, length = 0),
|
||||
Slice(start = 1, length = 0),
|
||||
Slice(start = 2, length = 0),
|
||||
Slice(start = 3, length = 0),
|
||||
Slice(start = 4, length = 0),
|
||||
],
|
||||
spaces: [
|
||||
Newline,
|
||||
Newline,
|
||||
Newline,
|
||||
Newline,
|
||||
],
|
||||
type_defs: [],
|
||||
value_defs: [
|
||||
Body(
|
||||
@0-1 Underscore(
|
||||
"",
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
},
|
||||
@103-118 SpaceBefore(
|
||||
Record(
|
||||
[
|
||||
@105-116 RequiredValue(
|
||||
@105-106 "f",
|
||||
[],
|
||||
@108-116 Apply(
|
||||
@108-113 Crash,
|
||||
@4-12 Apply(
|
||||
@4-9 Crash,
|
||||
[
|
||||
@114-116 Str(
|
||||
@10-12 Str(
|
||||
PlainLine(
|
||||
"",
|
||||
),
|
||||
|
@ -200,11 +53,163 @@ Defs(
|
|||
Space,
|
||||
),
|
||||
),
|
||||
Body(
|
||||
@13-14 Underscore(
|
||||
"",
|
||||
),
|
||||
@17-28 Apply(
|
||||
@17-22 Crash,
|
||||
[
|
||||
@23-25 Str(
|
||||
PlainLine(
|
||||
"",
|
||||
),
|
||||
),
|
||||
@26-28 Str(
|
||||
PlainLine(
|
||||
"",
|
||||
),
|
||||
),
|
||||
],
|
||||
Space,
|
||||
),
|
||||
),
|
||||
Body(
|
||||
@29-30 Underscore(
|
||||
"",
|
||||
),
|
||||
@33-45 Apply(
|
||||
@33-38 Crash,
|
||||
[
|
||||
@39-41 Num(
|
||||
"15",
|
||||
),
|
||||
@42-45 Num(
|
||||
"123",
|
||||
),
|
||||
],
|
||||
Space,
|
||||
),
|
||||
),
|
||||
Body(
|
||||
@46-47 Underscore(
|
||||
"",
|
||||
),
|
||||
@50-74 Apply(
|
||||
@50-53 Var {
|
||||
module_name: "",
|
||||
ident: "try",
|
||||
},
|
||||
[
|
||||
@54-57 Var {
|
||||
module_name: "",
|
||||
ident: "foo",
|
||||
},
|
||||
@59-73 ParensAround(
|
||||
Closure(
|
||||
[
|
||||
@60-61 Underscore(
|
||||
"",
|
||||
),
|
||||
],
|
||||
@65-73 Apply(
|
||||
@65-70 Crash,
|
||||
[
|
||||
@71-73 Str(
|
||||
PlainLine(
|
||||
"",
|
||||
),
|
||||
),
|
||||
],
|
||||
Space,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
Space,
|
||||
),
|
||||
),
|
||||
Body(
|
||||
@75-76 Underscore(
|
||||
"",
|
||||
),
|
||||
@81-101 SpaceBefore(
|
||||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
Index(2147483648),
|
||||
],
|
||||
regions: [
|
||||
@81-93,
|
||||
],
|
||||
space_before: [
|
||||
Slice(start = 0, length = 0),
|
||||
],
|
||||
space_after: [
|
||||
Slice(start = 0, length = 0),
|
||||
],
|
||||
spaces: [],
|
||||
type_defs: [],
|
||||
value_defs: [
|
||||
Body(
|
||||
@81-82 Underscore(
|
||||
"",
|
||||
),
|
||||
@85-93 Apply(
|
||||
@85-90 Crash,
|
||||
[
|
||||
@91-93 Str(
|
||||
PlainLine(
|
||||
"",
|
||||
),
|
||||
),
|
||||
],
|
||||
Space,
|
||||
),
|
||||
),
|
||||
],
|
||||
},
|
||||
@96-101 SpaceBefore(
|
||||
Crash,
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
},
|
||||
@103-118 SpaceBefore(
|
||||
Record(
|
||||
[
|
||||
@105-116 RequiredValue(
|
||||
@105-106 "f",
|
||||
[],
|
||||
@108-116 Apply(
|
||||
@108-113 Crash,
|
||||
[
|
||||
@114-116 Str(
|
||||
PlainLine(
|
||||
"",
|
||||
),
|
||||
),
|
||||
],
|
||||
Space,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
)
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
dbg 1 == 1
|
||||
|
||||
4
|
|
@ -1,24 +1,34 @@
|
|||
Dbg(
|
||||
@4-10 BinOps(
|
||||
[
|
||||
(
|
||||
@4-5 Num(
|
||||
SpaceBefore(
|
||||
SpaceAfter(
|
||||
Dbg(
|
||||
@5-11 BinOps(
|
||||
[
|
||||
(
|
||||
@5-6 Num(
|
||||
"1",
|
||||
),
|
||||
@7-9 Equals,
|
||||
),
|
||||
],
|
||||
@10-11 Num(
|
||||
"1",
|
||||
),
|
||||
@6-8 Equals,
|
||||
),
|
||||
],
|
||||
@9-10 Num(
|
||||
"1",
|
||||
),
|
||||
),
|
||||
@12-13 SpaceBefore(
|
||||
Num(
|
||||
"4",
|
||||
@13-14 SpaceBefore(
|
||||
Num(
|
||||
"4",
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
)
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
|
||||
dbg 1 == 1
|
||||
|
||||
4
|
||||
|
|
|
@ -1,26 +1,31 @@
|
|||
Dbg(
|
||||
@4-16 Tuple(
|
||||
[
|
||||
@5-6 Num(
|
||||
"5",
|
||||
),
|
||||
@12-15 SpaceBefore(
|
||||
Num(
|
||||
"666",
|
||||
SpaceAfter(
|
||||
Dbg(
|
||||
@4-16 Tuple(
|
||||
[
|
||||
@5-6 Num(
|
||||
"5",
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
@18-19 SpaceBefore(
|
||||
Num(
|
||||
"4",
|
||||
@12-15 SpaceBefore(
|
||||
Num(
|
||||
"666",
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
@18-19 SpaceBefore(
|
||||
Num(
|
||||
"4",
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
)
|
||||
|
|
|
@ -1,32 +0,0 @@
|
|||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
Index(2147483648),
|
||||
],
|
||||
regions: [
|
||||
@0-3,
|
||||
],
|
||||
space_before: [
|
||||
Slice(start = 0, length = 0),
|
||||
],
|
||||
space_after: [
|
||||
Slice(start = 0, length = 0),
|
||||
],
|
||||
spaces: [],
|
||||
type_defs: [],
|
||||
value_defs: [
|
||||
Annotation(
|
||||
@0-1 Identifier {
|
||||
ident: "a",
|
||||
},
|
||||
@2-3 BoundVariable(
|
||||
"b",
|
||||
),
|
||||
),
|
||||
],
|
||||
},
|
||||
@4-5 Var {
|
||||
module_name: "",
|
||||
ident: "i",
|
||||
},
|
||||
)
|
|
@ -0,0 +1,9 @@
|
|||
main =
|
||||
a = "Foo"
|
||||
Stdout.line! a
|
||||
|
||||
printBar!
|
||||
|
||||
printBar =
|
||||
b = "Bar"
|
||||
Stdout.line b
|
|
@ -0,0 +1,159 @@
|
|||
Defs {
|
||||
tags: [
|
||||
Index(2147483648),
|
||||
Index(2147483649),
|
||||
],
|
||||
regions: [
|
||||
@24-150,
|
||||
@176-266,
|
||||
],
|
||||
space_before: [
|
||||
Slice(start = 0, length = 0),
|
||||
Slice(start = 0, length = 2),
|
||||
],
|
||||
space_after: [
|
||||
Slice(start = 0, length = 0),
|
||||
Slice(start = 2, length = 1),
|
||||
],
|
||||
spaces: [
|
||||
Newline,
|
||||
Newline,
|
||||
Newline,
|
||||
],
|
||||
type_defs: [],
|
||||
value_defs: [
|
||||
Body(
|
||||
@24-28 Identifier {
|
||||
ident: "main",
|
||||
},
|
||||
@59-150 SpaceBefore(
|
||||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
Index(2147483648),
|
||||
Index(2147483649),
|
||||
],
|
||||
regions: [
|
||||
@59-68,
|
||||
@97-111,
|
||||
],
|
||||
space_before: [
|
||||
Slice(start = 0, length = 0),
|
||||
Slice(start = 0, length = 1),
|
||||
],
|
||||
space_after: [
|
||||
Slice(start = 0, length = 0),
|
||||
Slice(start = 1, length = 0),
|
||||
],
|
||||
spaces: [
|
||||
Newline,
|
||||
],
|
||||
type_defs: [],
|
||||
value_defs: [
|
||||
Body(
|
||||
@59-60 Identifier {
|
||||
ident: "a",
|
||||
},
|
||||
@63-68 Str(
|
||||
PlainLine(
|
||||
"Foo",
|
||||
),
|
||||
),
|
||||
),
|
||||
Stmt(
|
||||
@97-111 Apply(
|
||||
@97-108 TaskAwaitBang(
|
||||
Var {
|
||||
module_name: "Stdout",
|
||||
ident: "line",
|
||||
},
|
||||
),
|
||||
[
|
||||
@110-111 Var {
|
||||
module_name: "",
|
||||
ident: "a",
|
||||
},
|
||||
],
|
||||
Space,
|
||||
),
|
||||
),
|
||||
],
|
||||
},
|
||||
@141-150 SpaceBefore(
|
||||
TaskAwaitBang(
|
||||
Var {
|
||||
module_name: "",
|
||||
ident: "printBar",
|
||||
},
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
),
|
||||
Body(
|
||||
@176-184 Identifier {
|
||||
ident: "printBar",
|
||||
},
|
||||
@215-266 SpaceBefore(
|
||||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
Index(2147483648),
|
||||
],
|
||||
regions: [
|
||||
@215-224,
|
||||
],
|
||||
space_before: [
|
||||
Slice(start = 0, length = 0),
|
||||
],
|
||||
space_after: [
|
||||
Slice(start = 0, length = 0),
|
||||
],
|
||||
spaces: [],
|
||||
type_defs: [],
|
||||
value_defs: [
|
||||
Body(
|
||||
@215-216 Identifier {
|
||||
ident: "b",
|
||||
},
|
||||
@219-224 Str(
|
||||
PlainLine(
|
||||
"Bar",
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
},
|
||||
@253-266 SpaceBefore(
|
||||
Apply(
|
||||
@253-264 Var {
|
||||
module_name: "Stdout",
|
||||
ident: "line",
|
||||
},
|
||||
[
|
||||
@265-266 Var {
|
||||
module_name: "",
|
||||
ident: "b",
|
||||
},
|
||||
],
|
||||
Space,
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
main =
|
||||
a = "Foo"
|
||||
Stdout.line! a
|
||||
|
||||
printBar!
|
||||
|
||||
printBar =
|
||||
b = "Bar"
|
||||
Stdout.line b
|
|
@ -1,54 +1,59 @@
|
|||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
Index(2147483648),
|
||||
],
|
||||
regions: [
|
||||
@0-36,
|
||||
],
|
||||
space_before: [
|
||||
Slice(start = 0, length = 0),
|
||||
],
|
||||
space_after: [
|
||||
Slice(start = 0, length = 0),
|
||||
],
|
||||
spaces: [],
|
||||
type_defs: [],
|
||||
value_defs: [
|
||||
Body(
|
||||
@0-5 Apply(
|
||||
@0-5 Tag(
|
||||
"Email",
|
||||
),
|
||||
[
|
||||
@6-9 Identifier {
|
||||
ident: "str",
|
||||
},
|
||||
],
|
||||
),
|
||||
@12-36 Apply(
|
||||
@12-17 Tag(
|
||||
"Email",
|
||||
),
|
||||
[
|
||||
@18-36 Str(
|
||||
PlainLine(
|
||||
"blah@example.com",
|
||||
),
|
||||
SpaceAfter(
|
||||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
Index(2147483648),
|
||||
],
|
||||
regions: [
|
||||
@0-36,
|
||||
],
|
||||
space_before: [
|
||||
Slice(start = 0, length = 0),
|
||||
],
|
||||
space_after: [
|
||||
Slice(start = 0, length = 0),
|
||||
],
|
||||
spaces: [],
|
||||
type_defs: [],
|
||||
value_defs: [
|
||||
Body(
|
||||
@0-9 Apply(
|
||||
@0-5 Tag(
|
||||
"Email",
|
||||
),
|
||||
],
|
||||
Space,
|
||||
[
|
||||
@6-9 Identifier {
|
||||
ident: "str",
|
||||
},
|
||||
],
|
||||
),
|
||||
@12-36 Apply(
|
||||
@12-17 Tag(
|
||||
"Email",
|
||||
),
|
||||
[
|
||||
@18-36 Str(
|
||||
PlainLine(
|
||||
"blah@example.com",
|
||||
),
|
||||
),
|
||||
],
|
||||
Space,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
},
|
||||
@37-40 SpaceBefore(
|
||||
Var {
|
||||
module_name: "",
|
||||
ident: "str",
|
||||
],
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
@37-40 SpaceBefore(
|
||||
Var {
|
||||
module_name: "",
|
||||
ident: "str",
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
)
|
||||
|
|
|
@ -1,40 +1,45 @@
|
|||
SpaceBefore(
|
||||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
Index(2147483648),
|
||||
],
|
||||
regions: [
|
||||
@48-53,
|
||||
],
|
||||
space_before: [
|
||||
Slice(start = 0, length = 0),
|
||||
],
|
||||
space_after: [
|
||||
Slice(start = 0, length = 0),
|
||||
],
|
||||
spaces: [],
|
||||
type_defs: [],
|
||||
value_defs: [
|
||||
Body(
|
||||
@48-49 Identifier {
|
||||
ident: "x",
|
||||
},
|
||||
@52-53 Num(
|
||||
"5",
|
||||
SpaceAfter(
|
||||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
Index(2147483648),
|
||||
],
|
||||
regions: [
|
||||
@48-53,
|
||||
],
|
||||
space_before: [
|
||||
Slice(start = 0, length = 0),
|
||||
],
|
||||
space_after: [
|
||||
Slice(start = 0, length = 0),
|
||||
],
|
||||
spaces: [],
|
||||
type_defs: [],
|
||||
value_defs: [
|
||||
Body(
|
||||
@48-49 Identifier {
|
||||
ident: "x",
|
||||
},
|
||||
@52-53 Num(
|
||||
"5",
|
||||
),
|
||||
),
|
||||
],
|
||||
},
|
||||
@55-57 SpaceBefore(
|
||||
Num(
|
||||
"42",
|
||||
),
|
||||
],
|
||||
},
|
||||
@55-57 SpaceBefore(
|
||||
Num(
|
||||
"42",
|
||||
[
|
||||
Newline,
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
[
|
||||
LineComment(
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
hosted Foo exposes [] imports []
|
|
@ -1 +0,0 @@
|
|||
module []
|
|
@ -1 +0,0 @@
|
|||
package [] {}
|
|
@ -1 +0,0 @@
|
|||
platform "rtfeldman/blah" requires {} { main : {} } exposes [] packages {} imports [] provides []
|
|
@ -0,0 +1 @@
|
|||
""
|
|
@ -1,5 +1,10 @@
|
|||
Str(
|
||||
PlainLine(
|
||||
"",
|
||||
SpaceAfter(
|
||||
Str(
|
||||
PlainLine(
|
||||
"",
|
||||
),
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
)
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
expect
|
||||
1 == 1
|
||||
expect 1 == 1
|
||||
|
||||
4
|
|
@ -1,24 +1,50 @@
|
|||
Expect(
|
||||
@7-13 BinOps(
|
||||
[
|
||||
(
|
||||
@7-8 Num(
|
||||
"1",
|
||||
),
|
||||
@9-11 Equals,
|
||||
SpaceAfter(
|
||||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
Index(2147483648),
|
||||
],
|
||||
regions: [
|
||||
@0-13,
|
||||
],
|
||||
space_before: [
|
||||
Slice(start = 0, length = 0),
|
||||
],
|
||||
space_after: [
|
||||
Slice(start = 0, length = 0),
|
||||
],
|
||||
spaces: [],
|
||||
type_defs: [],
|
||||
value_defs: [
|
||||
Expect {
|
||||
condition: @7-13 BinOps(
|
||||
[
|
||||
(
|
||||
@7-8 Num(
|
||||
"1",
|
||||
),
|
||||
@9-11 Equals,
|
||||
),
|
||||
],
|
||||
@12-13 Num(
|
||||
"1",
|
||||
),
|
||||
),
|
||||
preceding_comment: …,
|
||||
},
|
||||
],
|
||||
},
|
||||
@15-16 SpaceBefore(
|
||||
Num(
|
||||
"4",
|
||||
),
|
||||
],
|
||||
@12-13 Num(
|
||||
"1",
|
||||
[
|
||||
Newline,
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
),
|
||||
@15-16 SpaceBefore(
|
||||
Num(
|
||||
"4",
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
)
|
||||
|
|
|
@ -0,0 +1,453 @@
|
|||
Defs {
|
||||
tags: [
|
||||
Index(2147483648),
|
||||
],
|
||||
regions: [
|
||||
@0-644,
|
||||
],
|
||||
space_before: [
|
||||
Slice(start = 0, length = 0),
|
||||
],
|
||||
space_after: [
|
||||
Slice(start = 0, length = 1),
|
||||
],
|
||||
spaces: [
|
||||
Newline,
|
||||
],
|
||||
type_defs: [],
|
||||
value_defs: [
|
||||
Expect {
|
||||
condition: @11-644 SpaceBefore(
|
||||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
Index(2147483648),
|
||||
Index(2147483649),
|
||||
Index(2147483650),
|
||||
],
|
||||
regions: [
|
||||
@11-118,
|
||||
@124-252,
|
||||
@258-556,
|
||||
],
|
||||
space_before: [
|
||||
Slice(start = 0, length = 0),
|
||||
Slice(start = 0, length = 2),
|
||||
Slice(start = 2, length = 2),
|
||||
],
|
||||
space_after: [
|
||||
Slice(start = 0, length = 0),
|
||||
Slice(start = 2, length = 0),
|
||||
Slice(start = 4, length = 0),
|
||||
],
|
||||
spaces: [
|
||||
Newline,
|
||||
Newline,
|
||||
Newline,
|
||||
Newline,
|
||||
],
|
||||
type_defs: [],
|
||||
value_defs: [
|
||||
AnnotatedBody {
|
||||
ann_pattern: @11-15 Identifier {
|
||||
ident: "html",
|
||||
},
|
||||
ann_type: @18-25 Apply(
|
||||
"",
|
||||
"Html",
|
||||
[
|
||||
@23-25 Record {
|
||||
fields: [],
|
||||
ext: None,
|
||||
},
|
||||
],
|
||||
),
|
||||
comment: None,
|
||||
body_pattern: @30-34 Identifier {
|
||||
ident: "html",
|
||||
},
|
||||
body_expr: @45-118 SpaceBefore(
|
||||
Apply(
|
||||
@45-52 Tag(
|
||||
"Element",
|
||||
),
|
||||
[
|
||||
@53-56 Str(
|
||||
PlainLine(
|
||||
"a",
|
||||
),
|
||||
),
|
||||
@57-59 Num(
|
||||
"43",
|
||||
),
|
||||
@60-105 List(
|
||||
[
|
||||
@61-104 Apply(
|
||||
@61-69 Tag(
|
||||
"HtmlAttr",
|
||||
),
|
||||
[
|
||||
@70-76 Str(
|
||||
PlainLine(
|
||||
"href",
|
||||
),
|
||||
),
|
||||
@77-104 Str(
|
||||
PlainLine(
|
||||
"https://www.roc-lang.org/",
|
||||
),
|
||||
),
|
||||
],
|
||||
Space,
|
||||
),
|
||||
],
|
||||
),
|
||||
@106-118 List(
|
||||
[
|
||||
@107-117 Apply(
|
||||
@107-111 Tag(
|
||||
"Text",
|
||||
),
|
||||
[
|
||||
@112-117 Str(
|
||||
PlainLine(
|
||||
"Roc",
|
||||
),
|
||||
),
|
||||
],
|
||||
Space,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
Space,
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
},
|
||||
AnnotatedBody {
|
||||
ann_pattern: @124-130 Identifier {
|
||||
ident: "actual",
|
||||
},
|
||||
ann_type: @133-185 Record {
|
||||
fields: [
|
||||
@135-160 RequiredValue(
|
||||
@135-140 "nodes",
|
||||
[],
|
||||
@143-160 Apply(
|
||||
"",
|
||||
"List",
|
||||
[
|
||||
@148-160 Apply(
|
||||
"",
|
||||
"RenderedNode",
|
||||
[],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
@162-183 RequiredValue(
|
||||
@162-172 "siblingIds",
|
||||
[],
|
||||
@175-183 Apply(
|
||||
"",
|
||||
"List",
|
||||
[
|
||||
@180-183 Apply(
|
||||
"",
|
||||
"U64",
|
||||
[],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
ext: None,
|
||||
},
|
||||
comment: None,
|
||||
body_pattern: @190-196 Identifier {
|
||||
ident: "actual",
|
||||
},
|
||||
body_expr: @207-252 SpaceBefore(
|
||||
Apply(
|
||||
@207-217 Var {
|
||||
module_name: "",
|
||||
ident: "indexNodes",
|
||||
},
|
||||
[
|
||||
@218-247 Record(
|
||||
[
|
||||
@220-229 RequiredValue(
|
||||
@220-225 "nodes",
|
||||
[],
|
||||
@227-229 List(
|
||||
[],
|
||||
),
|
||||
),
|
||||
@231-245 RequiredValue(
|
||||
@231-241 "siblingIds",
|
||||
[],
|
||||
@243-245 List(
|
||||
[],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
@248-252 Var {
|
||||
module_name: "",
|
||||
ident: "html",
|
||||
},
|
||||
],
|
||||
Space,
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
},
|
||||
AnnotatedBody {
|
||||
ann_pattern: @258-266 Identifier {
|
||||
ident: "expected",
|
||||
},
|
||||
ann_type: @269-321 Record {
|
||||
fields: [
|
||||
@271-296 RequiredValue(
|
||||
@271-276 "nodes",
|
||||
[],
|
||||
@279-296 Apply(
|
||||
"",
|
||||
"List",
|
||||
[
|
||||
@284-296 Apply(
|
||||
"",
|
||||
"RenderedNode",
|
||||
[],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
@298-319 RequiredValue(
|
||||
@298-308 "siblingIds",
|
||||
[],
|
||||
@311-319 Apply(
|
||||
"",
|
||||
"List",
|
||||
[
|
||||
@316-319 Apply(
|
||||
"",
|
||||
"U64",
|
||||
[],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
ext: None,
|
||||
},
|
||||
comment: None,
|
||||
body_pattern: @326-334 Identifier {
|
||||
ident: "expected",
|
||||
},
|
||||
body_expr: @337-556 Record(
|
||||
Collection {
|
||||
items: [
|
||||
@347-524 SpaceBefore(
|
||||
RequiredValue(
|
||||
@347-352 "nodes",
|
||||
[],
|
||||
@354-524 List(
|
||||
Collection {
|
||||
items: [
|
||||
@368-386 SpaceBefore(
|
||||
Apply(
|
||||
@368-380 Tag(
|
||||
"RenderedText",
|
||||
),
|
||||
[
|
||||
@381-386 Str(
|
||||
PlainLine(
|
||||
"Roc",
|
||||
),
|
||||
),
|
||||
],
|
||||
Space,
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
@400-513 SpaceBefore(
|
||||
Apply(
|
||||
@400-415 Tag(
|
||||
"RenderedElement",
|
||||
),
|
||||
[
|
||||
@416-419 Str(
|
||||
PlainLine(
|
||||
"a",
|
||||
),
|
||||
),
|
||||
@420-509 RecordUpdate {
|
||||
update: @422-440 Var {
|
||||
module_name: "",
|
||||
ident: "emptyRenderedAttrs",
|
||||
},
|
||||
fields: [
|
||||
@443-507 RequiredValue(
|
||||
@443-452 "htmlAttrs",
|
||||
[],
|
||||
@454-507 Apply(
|
||||
@454-467 Var {
|
||||
module_name: "Dict",
|
||||
ident: "fromList",
|
||||
},
|
||||
[
|
||||
@468-507 List(
|
||||
[
|
||||
@469-506 Tuple(
|
||||
[
|
||||
@470-476 Str(
|
||||
PlainLine(
|
||||
"href",
|
||||
),
|
||||
),
|
||||
@478-505 Str(
|
||||
PlainLine(
|
||||
"https://www.roc-lang.org/",
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
Space,
|
||||
),
|
||||
),
|
||||
],
|
||||
},
|
||||
@510-513 List(
|
||||
[
|
||||
@511-512 Num(
|
||||
"0",
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
Space,
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
],
|
||||
final_comments: [
|
||||
Newline,
|
||||
],
|
||||
},
|
||||
),
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
@534-549 SpaceBefore(
|
||||
RequiredValue(
|
||||
@534-544 "siblingIds",
|
||||
[],
|
||||
@546-549 List(
|
||||
[
|
||||
@547-548 Num(
|
||||
"1",
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
],
|
||||
final_comments: [
|
||||
Newline,
|
||||
],
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
@562-644 SpaceBefore(
|
||||
BinOps(
|
||||
[
|
||||
(
|
||||
@563-593 SpaceAfter(
|
||||
ParensAround(
|
||||
BinOps(
|
||||
[
|
||||
(
|
||||
@563-575 RecordAccess(
|
||||
Var {
|
||||
module_name: "",
|
||||
ident: "actual",
|
||||
},
|
||||
"nodes",
|
||||
),
|
||||
@576-578 Equals,
|
||||
),
|
||||
],
|
||||
@579-593 RecordAccess(
|
||||
Var {
|
||||
module_name: "",
|
||||
ident: "expected",
|
||||
},
|
||||
"nodes",
|
||||
),
|
||||
),
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
@599-601 And,
|
||||
),
|
||||
],
|
||||
@603-643 ParensAround(
|
||||
BinOps(
|
||||
[
|
||||
(
|
||||
@603-620 RecordAccess(
|
||||
Var {
|
||||
module_name: "",
|
||||
ident: "actual",
|
||||
},
|
||||
"siblingIds",
|
||||
),
|
||||
@621-623 Equals,
|
||||
),
|
||||
],
|
||||
@624-643 RecordAccess(
|
||||
Var {
|
||||
module_name: "",
|
||||
ident: "expected",
|
||||
},
|
||||
"siblingIds",
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
preceding_comment: …,
|
||||
},
|
||||
],
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
expect
|
||||
html : Html {}
|
||||
html =
|
||||
Element "a" 43 [HtmlAttr "href" "https://www.roc-lang.org/"] [Text "Roc"]
|
||||
|
||||
actual : { nodes : List RenderedNode, siblingIds : List U64 }
|
||||
actual =
|
||||
indexNodes { nodes: [], siblingIds: [] } html
|
||||
|
||||
expected : { nodes : List RenderedNode, siblingIds : List U64 }
|
||||
expected = {
|
||||
nodes: [
|
||||
RenderedText "Roc",
|
||||
RenderedElement "a" { emptyRenderedAttrs & htmlAttrs: Dict.fromList [("href", "https://www.roc-lang.org/")] } [0],
|
||||
],
|
||||
siblingIds: [1],
|
||||
}
|
||||
|
||||
(actual.nodes == expected.nodes)
|
||||
&& (actual.siblingIds == expected.siblingIds)
|
|
@ -1,2 +0,0 @@
|
|||
# expecting some effects
|
||||
expect-fx 5 == 2
|
|
@ -9,12 +9,13 @@ Defs {
|
|||
Slice(start = 0, length = 1),
|
||||
],
|
||||
space_after: [
|
||||
Slice(start = 1, length = 0),
|
||||
Slice(start = 1, length = 1),
|
||||
],
|
||||
spaces: [
|
||||
LineComment(
|
||||
" expecting some effects",
|
||||
),
|
||||
Newline,
|
||||
],
|
||||
type_defs: [],
|
||||
value_defs: [
|
||||
|
@ -32,7 +33,7 @@ Defs {
|
|||
"2",
|
||||
),
|
||||
),
|
||||
preceding_comment: @25-25,
|
||||
preceding_comment: @0-24,
|
||||
},
|
||||
],
|
||||
}
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
x = 5
|
||||
|
||||
expect x == y
|
||||
|
||||
expect y == z
|
||||
|
||||
42
|
|
@ -0,0 +1,91 @@
|
|||
SpaceAfter(
|
||||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
Index(2147483648),
|
||||
Index(2147483649),
|
||||
Index(2147483650),
|
||||
],
|
||||
regions: [
|
||||
@0-5,
|
||||
@7-20,
|
||||
@22-35,
|
||||
],
|
||||
space_before: [
|
||||
Slice(start = 0, length = 0),
|
||||
Slice(start = 0, length = 2),
|
||||
Slice(start = 2, length = 2),
|
||||
],
|
||||
space_after: [
|
||||
Slice(start = 0, length = 0),
|
||||
Slice(start = 2, length = 0),
|
||||
Slice(start = 4, length = 0),
|
||||
],
|
||||
spaces: [
|
||||
Newline,
|
||||
Newline,
|
||||
Newline,
|
||||
Newline,
|
||||
],
|
||||
type_defs: [],
|
||||
value_defs: [
|
||||
Body(
|
||||
@0-1 Identifier {
|
||||
ident: "x",
|
||||
},
|
||||
@4-5 Num(
|
||||
"5",
|
||||
),
|
||||
),
|
||||
Expect {
|
||||
condition: @14-20 BinOps(
|
||||
[
|
||||
(
|
||||
@14-15 Var {
|
||||
module_name: "",
|
||||
ident: "x",
|
||||
},
|
||||
@16-18 Equals,
|
||||
),
|
||||
],
|
||||
@19-20 Var {
|
||||
module_name: "",
|
||||
ident: "y",
|
||||
},
|
||||
),
|
||||
preceding_comment: @7-7,
|
||||
},
|
||||
Expect {
|
||||
condition: @29-35 BinOps(
|
||||
[
|
||||
(
|
||||
@29-30 Var {
|
||||
module_name: "",
|
||||
ident: "y",
|
||||
},
|
||||
@31-33 Equals,
|
||||
),
|
||||
],
|
||||
@34-35 Var {
|
||||
module_name: "",
|
||||
ident: "z",
|
||||
},
|
||||
),
|
||||
preceding_comment: @22-22,
|
||||
},
|
||||
],
|
||||
},
|
||||
@37-39 SpaceBefore(
|
||||
Num(
|
||||
"42",
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
)
|
|
@ -0,0 +1,7 @@
|
|||
x = 5
|
||||
|
||||
expect x == y
|
||||
|
||||
expect y == z
|
||||
|
||||
42
|
|
@ -0,0 +1,6 @@
|
|||
if foo then
|
||||
x = a # 1
|
||||
x # 2
|
||||
else
|
||||
# 3
|
||||
c # 4
|
|
@ -0,0 +1,80 @@
|
|||
SpaceAfter(
|
||||
If(
|
||||
[
|
||||
(
|
||||
@3-6 Var {
|
||||
module_name: "",
|
||||
ident: "foo",
|
||||
},
|
||||
@16-31 SpaceBefore(
|
||||
SpaceAfter(
|
||||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
Index(2147483648),
|
||||
],
|
||||
regions: [
|
||||
@16-21,
|
||||
],
|
||||
space_before: [
|
||||
Slice(start = 0, length = 0),
|
||||
],
|
||||
space_after: [
|
||||
Slice(start = 0, length = 0),
|
||||
],
|
||||
spaces: [],
|
||||
type_defs: [],
|
||||
value_defs: [
|
||||
Body(
|
||||
@16-17 Identifier {
|
||||
ident: "x",
|
||||
},
|
||||
@20-21 Var {
|
||||
module_name: "",
|
||||
ident: "a",
|
||||
},
|
||||
),
|
||||
],
|
||||
},
|
||||
@30-31 SpaceBefore(
|
||||
Var {
|
||||
module_name: "",
|
||||
ident: "x",
|
||||
},
|
||||
[
|
||||
LineComment(
|
||||
" 1",
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
[
|
||||
LineComment(
|
||||
" 2",
|
||||
),
|
||||
],
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
@49-50 SpaceBefore(
|
||||
Var {
|
||||
module_name: "",
|
||||
ident: "c",
|
||||
},
|
||||
[
|
||||
LineComment(
|
||||
" 3",
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
[
|
||||
LineComment(
|
||||
" 4",
|
||||
),
|
||||
],
|
||||
)
|
|
@ -0,0 +1,5 @@
|
|||
if foo then
|
||||
x = a # 1
|
||||
x # 2
|
||||
else # 3
|
||||
c # 4
|
|
@ -0,0 +1,4 @@
|
|||
f : (Str)a -> (Str)a
|
||||
f = \x -> x
|
||||
|
||||
f ("Str", 42)
|
|
@ -1,99 +1,104 @@
|
|||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
Index(2147483648),
|
||||
],
|
||||
regions: [
|
||||
@0-32,
|
||||
],
|
||||
space_before: [
|
||||
Slice(start = 0, length = 0),
|
||||
],
|
||||
space_after: [
|
||||
Slice(start = 0, length = 0),
|
||||
],
|
||||
spaces: [],
|
||||
type_defs: [],
|
||||
value_defs: [
|
||||
AnnotatedBody {
|
||||
ann_pattern: @0-1 Identifier {
|
||||
ident: "f",
|
||||
},
|
||||
ann_type: @4-20 Function(
|
||||
[
|
||||
@4-10 Tuple {
|
||||
SpaceAfter(
|
||||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
Index(2147483648),
|
||||
],
|
||||
regions: [
|
||||
@0-32,
|
||||
],
|
||||
space_before: [
|
||||
Slice(start = 0, length = 0),
|
||||
],
|
||||
space_after: [
|
||||
Slice(start = 0, length = 0),
|
||||
],
|
||||
spaces: [],
|
||||
type_defs: [],
|
||||
value_defs: [
|
||||
AnnotatedBody {
|
||||
ann_pattern: @0-1 Identifier {
|
||||
ident: "f",
|
||||
},
|
||||
ann_type: @4-20 Function(
|
||||
[
|
||||
@4-10 Tuple {
|
||||
elems: [
|
||||
@5-8 Apply(
|
||||
"",
|
||||
"Str",
|
||||
[],
|
||||
),
|
||||
],
|
||||
ext: Some(
|
||||
@9-10 BoundVariable(
|
||||
"a",
|
||||
),
|
||||
),
|
||||
},
|
||||
],
|
||||
@14-20 Tuple {
|
||||
elems: [
|
||||
@5-8 Apply(
|
||||
@15-18 Apply(
|
||||
"",
|
||||
"Str",
|
||||
[],
|
||||
),
|
||||
],
|
||||
ext: Some(
|
||||
@9-10 BoundVariable(
|
||||
@19-20 BoundVariable(
|
||||
"a",
|
||||
),
|
||||
),
|
||||
},
|
||||
],
|
||||
@14-20 Tuple {
|
||||
elems: [
|
||||
@15-18 Apply(
|
||||
"",
|
||||
"Str",
|
||||
[],
|
||||
),
|
||||
],
|
||||
ext: Some(
|
||||
@19-20 BoundVariable(
|
||||
"a",
|
||||
),
|
||||
),
|
||||
),
|
||||
comment: None,
|
||||
body_pattern: @21-22 Identifier {
|
||||
ident: "f",
|
||||
},
|
||||
),
|
||||
comment: None,
|
||||
body_pattern: @21-22 Identifier {
|
||||
ident: "f",
|
||||
},
|
||||
body_expr: @25-32 Closure(
|
||||
[
|
||||
@26-27 Identifier {
|
||||
body_expr: @25-32 Closure(
|
||||
[
|
||||
@26-27 Identifier {
|
||||
ident: "x",
|
||||
},
|
||||
],
|
||||
@31-32 Var {
|
||||
module_name: "",
|
||||
ident: "x",
|
||||
},
|
||||
],
|
||||
@31-32 Var {
|
||||
module_name: "",
|
||||
ident: "x",
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
@34-47 SpaceBefore(
|
||||
Apply(
|
||||
@34-35 Var {
|
||||
module_name: "",
|
||||
ident: "f",
|
||||
},
|
||||
[
|
||||
@36-47 Tuple(
|
||||
[
|
||||
@37-42 Str(
|
||||
PlainLine(
|
||||
"Str",
|
||||
),
|
||||
),
|
||||
@44-46 Num(
|
||||
"42",
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
@34-47 SpaceBefore(
|
||||
Apply(
|
||||
@34-35 Var {
|
||||
module_name: "",
|
||||
ident: "f",
|
||||
},
|
||||
[
|
||||
@36-47 Tuple(
|
||||
[
|
||||
@37-42 Str(
|
||||
PlainLine(
|
||||
"Str",
|
||||
),
|
||||
),
|
||||
@44-46 Num(
|
||||
"42",
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
Space,
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
Newline,
|
||||
],
|
||||
Space,
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
)
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
f : I64 -> (I64, I64)
|
||||
f = \x -> (x, x + 1)
|
||||
|
||||
f 42
|
|
@ -1,100 +1,105 @@
|
|||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
Index(2147483648),
|
||||
],
|
||||
regions: [
|
||||
@0-42,
|
||||
],
|
||||
space_before: [
|
||||
Slice(start = 0, length = 0),
|
||||
],
|
||||
space_after: [
|
||||
Slice(start = 0, length = 0),
|
||||
],
|
||||
spaces: [],
|
||||
type_defs: [],
|
||||
value_defs: [
|
||||
AnnotatedBody {
|
||||
ann_pattern: @0-1 Identifier {
|
||||
ident: "f",
|
||||
},
|
||||
ann_type: @4-21 Function(
|
||||
[
|
||||
@4-7 Apply(
|
||||
"",
|
||||
"I64",
|
||||
[],
|
||||
),
|
||||
],
|
||||
@11-21 Tuple {
|
||||
elems: [
|
||||
@12-15 Apply(
|
||||
"",
|
||||
"I64",
|
||||
[],
|
||||
),
|
||||
@17-20 Apply(
|
||||
SpaceAfter(
|
||||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
Index(2147483648),
|
||||
],
|
||||
regions: [
|
||||
@0-42,
|
||||
],
|
||||
space_before: [
|
||||
Slice(start = 0, length = 0),
|
||||
],
|
||||
space_after: [
|
||||
Slice(start = 0, length = 0),
|
||||
],
|
||||
spaces: [],
|
||||
type_defs: [],
|
||||
value_defs: [
|
||||
AnnotatedBody {
|
||||
ann_pattern: @0-1 Identifier {
|
||||
ident: "f",
|
||||
},
|
||||
ann_type: @4-21 Function(
|
||||
[
|
||||
@4-7 Apply(
|
||||
"",
|
||||
"I64",
|
||||
[],
|
||||
),
|
||||
],
|
||||
ext: None,
|
||||
},
|
||||
),
|
||||
comment: None,
|
||||
body_pattern: @22-23 Identifier {
|
||||
ident: "f",
|
||||
},
|
||||
body_expr: @26-42 Closure(
|
||||
[
|
||||
@27-28 Identifier {
|
||||
ident: "x",
|
||||
@11-21 Tuple {
|
||||
elems: [
|
||||
@12-15 Apply(
|
||||
"",
|
||||
"I64",
|
||||
[],
|
||||
),
|
||||
@17-20 Apply(
|
||||
"",
|
||||
"I64",
|
||||
[],
|
||||
),
|
||||
],
|
||||
ext: None,
|
||||
},
|
||||
],
|
||||
@32-42 Tuple(
|
||||
),
|
||||
comment: None,
|
||||
body_pattern: @22-23 Identifier {
|
||||
ident: "f",
|
||||
},
|
||||
body_expr: @26-42 Closure(
|
||||
[
|
||||
@33-34 Var {
|
||||
module_name: "",
|
||||
@27-28 Identifier {
|
||||
ident: "x",
|
||||
},
|
||||
@36-41 BinOps(
|
||||
[
|
||||
(
|
||||
@36-37 Var {
|
||||
module_name: "",
|
||||
ident: "x",
|
||||
},
|
||||
@38-39 Plus,
|
||||
),
|
||||
],
|
||||
@40-41 Num(
|
||||
"1",
|
||||
),
|
||||
),
|
||||
],
|
||||
@32-42 Tuple(
|
||||
[
|
||||
@33-34 Var {
|
||||
module_name: "",
|
||||
ident: "x",
|
||||
},
|
||||
@36-41 BinOps(
|
||||
[
|
||||
(
|
||||
@36-37 Var {
|
||||
module_name: "",
|
||||
ident: "x",
|
||||
},
|
||||
@38-39 Plus,
|
||||
),
|
||||
],
|
||||
@40-41 Num(
|
||||
"1",
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
@44-48 SpaceBefore(
|
||||
Apply(
|
||||
@44-45 Var {
|
||||
module_name: "",
|
||||
ident: "f",
|
||||
},
|
||||
[
|
||||
@46-48 Num(
|
||||
"42",
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
@44-48 SpaceBefore(
|
||||
Apply(
|
||||
@44-45 Var {
|
||||
module_name: "",
|
||||
ident: "f",
|
||||
},
|
||||
[
|
||||
@46-48 Num(
|
||||
"42",
|
||||
),
|
||||
],
|
||||
Space,
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
Newline,
|
||||
],
|
||||
Space,
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
[
|
||||
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