roc/compiler/parse/tests/snapshots/pass/nested_def_annotation.module.result-ast
Ayaz Hafiz a3ac68a41f
Split up Defs into TypeDef and ValueDef
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.
2022-04-06 22:18:57 -04:00

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,
],
),
]