mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 07:41:12 +00:00

Just a refactoring PR. This is useful because during canonicalization we always process type defs first, then value defs. With abilities this distinction continues to grow; in that case, we have patterns associated with types that we want to process before patterns from values.
103 lines
4.6 KiB
Text
103 lines
4.6 KiB
Text
[
|
|
@0-115 SpaceAfter(
|
|
SpaceBefore(
|
|
Value(
|
|
Body(
|
|
@0-4 Identifier(
|
|
"main",
|
|
),
|
|
@11-115 SpaceBefore(
|
|
Defs(
|
|
[
|
|
@43-93 Value(
|
|
AnnotatedBody {
|
|
ann_pattern: @11-23 Identifier(
|
|
"wrappedNotEq",
|
|
),
|
|
ann_type: @34-38 Function(
|
|
[
|
|
@26-27 BoundVariable(
|
|
"a",
|
|
),
|
|
@29-30 BoundVariable(
|
|
"a",
|
|
),
|
|
],
|
|
@34-38 Apply(
|
|
"",
|
|
"Bool",
|
|
[],
|
|
),
|
|
),
|
|
comment: None,
|
|
body_pattern: @43-55 Identifier(
|
|
"wrappedNotEq",
|
|
),
|
|
body_expr: @58-93 Closure(
|
|
[
|
|
@59-63 Identifier(
|
|
"num1",
|
|
),
|
|
@65-69 Identifier(
|
|
"num2",
|
|
),
|
|
],
|
|
@81-93 SpaceBefore(
|
|
BinOps(
|
|
[
|
|
(
|
|
@81-85 Var {
|
|
module_name: "",
|
|
ident: "num1",
|
|
},
|
|
@86-88 NotEquals,
|
|
),
|
|
],
|
|
@89-93 Var {
|
|
module_name: "",
|
|
ident: "num2",
|
|
},
|
|
),
|
|
[
|
|
Newline,
|
|
],
|
|
),
|
|
),
|
|
},
|
|
),
|
|
],
|
|
@99-115 SpaceBefore(
|
|
Apply(
|
|
@99-111 Var {
|
|
module_name: "",
|
|
ident: "wrappedNotEq",
|
|
},
|
|
[
|
|
@112-113 Num(
|
|
"2",
|
|
),
|
|
@114-115 Num(
|
|
"3",
|
|
),
|
|
],
|
|
Space,
|
|
),
|
|
[
|
|
Newline,
|
|
Newline,
|
|
],
|
|
),
|
|
),
|
|
[
|
|
Newline,
|
|
],
|
|
),
|
|
),
|
|
),
|
|
[],
|
|
),
|
|
[
|
|
Newline,
|
|
],
|
|
),
|
|
]
|