mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 04:08:19 +00:00
Implement lifting for abilities
This commit is contained in:
parent
4da6bb0be6
commit
7fd97dec72
5 changed files with 90 additions and 10 deletions
|
@ -0,0 +1,4 @@
|
|||
S implements i : a #
|
||||
#
|
||||
|
||||
0
|
|
@ -0,0 +1,58 @@
|
|||
@0-24 SpaceAfter(
|
||||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
EitherIndex(0),
|
||||
],
|
||||
regions: [
|
||||
@0-22,
|
||||
],
|
||||
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: [
|
||||
Ability {
|
||||
header: TypeHeader {
|
||||
name: @0-1 "S",
|
||||
vars: [],
|
||||
},
|
||||
loc_implements: @2-12 Implements,
|
||||
members: [
|
||||
AbilityMember {
|
||||
name: @13-14 "i",
|
||||
typ: @16-17 SpaceAfter(
|
||||
BoundVariable(
|
||||
"a",
|
||||
),
|
||||
[
|
||||
LineComment(
|
||||
"",
|
||||
),
|
||||
LineComment(
|
||||
"",
|
||||
),
|
||||
],
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
value_defs: [],
|
||||
},
|
||||
@23-24 SpaceBefore(
|
||||
Num(
|
||||
"0",
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
)
|
|
@ -0,0 +1,4 @@
|
|||
S implements i:(a#
|
||||
#
|
||||
)
|
||||
0
|
|
@ -458,6 +458,7 @@ mod test_snapshots {
|
|||
pass/if_in_record_field_opt_pat.expr,
|
||||
pass/if_newline_then_negate_else_recordupdater.expr,
|
||||
pass/if_then_weird_indent.expr,
|
||||
pass/implements_annotation_comment.expr,
|
||||
pass/implements_in_pat_after_comment.expr,
|
||||
pass/implements_newline_in_fn_ty.expr,
|
||||
pass/implements_newlines_comments.expr,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue