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.
51 lines
1.5 KiB
Text
51 lines
1.5 KiB
Text
Defs(
|
|
[
|
|
@0-37 Type(
|
|
Ability {
|
|
header: TypeHeader {
|
|
name: @0-4 "Hash",
|
|
vars: [],
|
|
},
|
|
loc_has: @5-8 Has,
|
|
members: [
|
|
AbilityMember {
|
|
name: @9-13 "hash",
|
|
typ: @21-37 Where(
|
|
@21-24 Function(
|
|
[
|
|
@16-17 BoundVariable(
|
|
"a",
|
|
),
|
|
],
|
|
@21-24 Apply(
|
|
"",
|
|
"U64",
|
|
[],
|
|
),
|
|
),
|
|
[
|
|
@27-37 HasClause {
|
|
var: @27-28 "a",
|
|
ability: @33-37 Apply(
|
|
"",
|
|
"Hash",
|
|
[],
|
|
),
|
|
},
|
|
],
|
|
),
|
|
},
|
|
],
|
|
},
|
|
),
|
|
],
|
|
@39-40 SpaceBefore(
|
|
Num(
|
|
"1",
|
|
),
|
|
[
|
|
Newline,
|
|
Newline,
|
|
],
|
|
),
|
|
)
|