mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 12:18:19 +00:00
Merge branch 'main' into simplify-refcount
Signed-off-by: Brendan Hansknecht <Brendan.Hansknecht@gmail.com>
This commit is contained in:
commit
7643f89781
131 changed files with 2464 additions and 2148 deletions
|
@ -330,7 +330,7 @@ fn list_map_try_ok() {
|
|||
List.map_try [1, 2, 3] \num ->
|
||||
str = Num.to_str (num * 2)
|
||||
|
||||
Ok "$(str)!"
|
||||
Ok "${str}!"
|
||||
"#,
|
||||
// Result Str [] is unwrapped to just Str
|
||||
RocList::<RocStr>::from_slice(&[
|
||||
|
@ -3870,10 +3870,10 @@ fn issue_3571_lowlevel_call_function_with_bool_lambda_set() {
|
|||
List.concat state mapped_vals
|
||||
|
||||
add2 : Str -> Str
|
||||
add2 = \x -> "added $(x)"
|
||||
add2 = \x -> "added ${x}"
|
||||
|
||||
mul2 : Str -> Str
|
||||
mul2 = \x -> "multiplied $(x)"
|
||||
mul2 = \x -> "multiplied ${x}"
|
||||
|
||||
foo = [add2, mul2]
|
||||
bar = ["1", "2", "3", "4"]
|
||||
|
|
|
@ -3120,7 +3120,7 @@ fn recursively_build_effect() {
|
|||
hi = "Hello"
|
||||
name = "World"
|
||||
|
||||
"$(hi), $(name)!"
|
||||
"${hi}, ${name}!"
|
||||
|
||||
main =
|
||||
when nest_help 4 is
|
||||
|
@ -3876,8 +3876,8 @@ fn compose_recursive_lambda_set_productive_toplevel() {
|
|||
compose = \f, g -> \x -> g (f x)
|
||||
|
||||
identity = \x -> x
|
||||
exclaim = \s -> "$(s)!"
|
||||
whisper = \s -> "($(s))"
|
||||
exclaim = \s -> "${s}!"
|
||||
whisper = \s -> "(${s})"
|
||||
|
||||
main =
|
||||
res: Str -> Str
|
||||
|
@ -3899,8 +3899,8 @@ fn compose_recursive_lambda_set_productive_nested() {
|
|||
compose = \f, g -> \x -> g (f x)
|
||||
|
||||
identity = \x -> x
|
||||
exclaim = \s -> "$(s)!"
|
||||
whisper = \s -> "($(s))"
|
||||
exclaim = \s -> "${s}!"
|
||||
whisper = \s -> "(${s})"
|
||||
|
||||
res: Str -> Str
|
||||
res = List.walk [ exclaim, whisper ] identity compose
|
||||
|
@ -3921,8 +3921,8 @@ fn compose_recursive_lambda_set_productive_inferred() {
|
|||
compose = \f, g -> \x -> g (f x)
|
||||
|
||||
identity = \x -> x
|
||||
exclaim = \s -> "$(s)!"
|
||||
whisper = \s -> "($(s))"
|
||||
exclaim = \s -> "${s}!"
|
||||
whisper = \s -> "(${s})"
|
||||
|
||||
res = List.walk [ exclaim, whisper ] identity compose
|
||||
res "hello"
|
||||
|
@ -3947,8 +3947,8 @@ fn compose_recursive_lambda_set_productive_nullable_wrapped() {
|
|||
else \x -> f (g x)
|
||||
|
||||
identity = \x -> x
|
||||
exclame = \s -> "$(s)!"
|
||||
whisper = \s -> "($(s))"
|
||||
exclame = \s -> "${s}!"
|
||||
whisper = \s -> "(${s})"
|
||||
|
||||
main =
|
||||
res: Str -> Str
|
||||
|
@ -4475,7 +4475,7 @@ fn reset_recursive_type_wraps_in_named_type() {
|
|||
Cons x xs ->
|
||||
str_x = f x
|
||||
str_xs = print_linked_list xs f
|
||||
"Cons $(str_x) ($(str_xs))"
|
||||
"Cons ${str_x} (${str_xs})"
|
||||
"#
|
||||
),
|
||||
RocStr::from("Cons 2 (Cons 3 (Cons 4 (Nil)))"),
|
||||
|
|
|
@ -37,7 +37,7 @@ fn early_return_nested_ifs() {
|
|||
else
|
||||
third
|
||||
|
||||
"$(first), $(second)"
|
||||
"${first}, ${second}"
|
||||
|
||||
main : List Str
|
||||
main = List.map [1, 2, 3] display_n
|
||||
|
@ -76,7 +76,7 @@ fn early_return_nested_whens() {
|
|||
_ ->
|
||||
third
|
||||
|
||||
"$(first), $(second)"
|
||||
"${first}, ${second}"
|
||||
|
||||
main : List Str
|
||||
main = List.map [1, 2, 3] display_n
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue