mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 20:28:02 +00:00
Weaken zero-argument tags in let bindings
This commit is contained in:
parent
fb0668f13b
commit
52c2f3a054
7 changed files with 51 additions and 44 deletions
|
@ -1,5 +1,5 @@
|
|||
procedure Test.0 ():
|
||||
let Test.4 : [<rnu><null>, C List *self] = TagId(1) ;
|
||||
let Test.5 : [C List [<rnu><null>, C List *self], C U16, C ] = TagId(2) ;
|
||||
let Test.12 : {[<rnu><null>, C List *self], [C List [<rnu><null>, C List *self], C U16, C ]} = Struct {Test.4, Test.5};
|
||||
let Test.4 : [<rnw>C List *self, C U16, <null>] = TagId(2) ;
|
||||
inc Test.4;
|
||||
let Test.12 : {[<rnw>C List *self, C U16, <null>], [<rnw>C List *self, C U16, <null>]} = Struct {Test.4, Test.4};
|
||||
ret Test.12;
|
||||
|
|
|
@ -1,8 +1,15 @@
|
|||
procedure Test.2 (Test.4, Test.5):
|
||||
let Test.7 : U8 = 18i64;
|
||||
ret Test.7;
|
||||
procedure Test.1 (Test.4):
|
||||
let Test.12 : Int1 = false;
|
||||
ret Test.12;
|
||||
|
||||
procedure Test.2 (Test.5, Test.6):
|
||||
let Test.10 : U8 = 18i64;
|
||||
ret Test.10;
|
||||
|
||||
procedure Test.0 ():
|
||||
let Test.1 : Int1 = false;
|
||||
let Test.6 : U8 = CallByName Test.2 Test.1 Test.1;
|
||||
ret Test.6;
|
||||
let Test.13 : {} = Struct {};
|
||||
let Test.8 : Int1 = CallByName Test.1 Test.13;
|
||||
let Test.11 : {} = Struct {};
|
||||
let Test.9 : Int1 = CallByName Test.1 Test.11;
|
||||
let Test.7 : U8 = CallByName Test.2 Test.8 Test.9;
|
||||
ret Test.7;
|
||||
|
|
|
@ -1199,10 +1199,10 @@ fn monomorphized_tag() {
|
|||
app "test" provides [main] to "./platform"
|
||||
|
||||
main =
|
||||
b = Bar
|
||||
b = \{} -> Bar
|
||||
f : [Foo, Bar], [Bar, Baz] -> U8
|
||||
f = \_, _ -> 18
|
||||
f b b
|
||||
f (b {}) (b {})
|
||||
"#
|
||||
)
|
||||
}
|
||||
|
@ -1800,7 +1800,7 @@ fn instantiate_annotated_as_recursive_alias_toplevel() {
|
|||
|
||||
Value : [Nil, Array (List Value)]
|
||||
|
||||
foo : [Nil]*
|
||||
foo : [Nil]_
|
||||
foo = Nil
|
||||
|
||||
it : Value
|
||||
|
@ -1818,7 +1818,7 @@ fn instantiate_annotated_as_recursive_alias_polymorphic_expr() {
|
|||
main =
|
||||
Value : [Nil, Array (List Value)]
|
||||
|
||||
foo : [Nil]*
|
||||
foo : [Nil]_
|
||||
foo = Nil
|
||||
|
||||
it : Value
|
||||
|
@ -1838,7 +1838,7 @@ fn instantiate_annotated_as_recursive_alias_multiple_polymorphic_expr() {
|
|||
main =
|
||||
Value : [Nil, Array (List Value)]
|
||||
|
||||
foo : [Nil]*
|
||||
foo : [Nil]_
|
||||
foo = Nil
|
||||
|
||||
v1 : Value
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue