mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 20:28:02 +00:00
update to new interpolation syntax
This commit is contained in:
parent
fc6b519b59
commit
3c7a834da1
45 changed files with 402 additions and 402 deletions
|
@ -948,7 +948,7 @@ fn specialize_unique_newtype_records() {
|
|||
main =
|
||||
when Str.fromUtf8 (Encode.toBytes {a: Bool.true} TotallyNotJson.json) is
|
||||
Ok s -> when Str.fromUtf8 (Encode.toBytes {b: Bool.true} TotallyNotJson.json) is
|
||||
Ok t -> "\(s)\(t)"
|
||||
Ok t -> "$(s)$(t)"
|
||||
_ -> "<bad>"
|
||||
_ -> "<bad>"
|
||||
"#
|
||||
|
|
|
@ -330,7 +330,7 @@ fn list_map_try_ok() {
|
|||
List.mapTry [1, 2, 3] \num ->
|
||||
str = Num.toStr (num * 2)
|
||||
|
||||
Ok "\(str)!"
|
||||
Ok "$(str)!"
|
||||
"#,
|
||||
// Result Str [] is unwrapped to just Str
|
||||
RocList::<RocStr>::from_slice(&[
|
||||
|
@ -3738,10 +3738,10 @@ fn issue_3571_lowlevel_call_function_with_bool_lambda_set() {
|
|||
List.concat state mappedVals
|
||||
|
||||
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"]
|
||||
|
|
|
@ -3197,7 +3197,7 @@ fn recursively_build_effect() {
|
|||
hi = "Hello"
|
||||
name = "World"
|
||||
|
||||
"\(hi), \(name)!"
|
||||
"$(hi), $(name)!"
|
||||
|
||||
main =
|
||||
when nestHelp 4 is
|
||||
|
@ -3953,8 +3953,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
|
||||
|
@ -3976,8 +3976,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
|
||||
|
@ -3998,8 +3998,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"
|
||||
|
@ -4024,8 +4024,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
|
||||
|
@ -4552,7 +4552,7 @@ fn reset_recursive_type_wraps_in_named_type() {
|
|||
Cons x xs ->
|
||||
strX = f x
|
||||
strXs = printLinkedList xs f
|
||||
"Cons \(strX) (\(strXs))"
|
||||
"Cons $(strX) ($(strXs))"
|
||||
"#
|
||||
),
|
||||
RocStr::from("Cons 2 (Cons 3 (Cons 4 (Nil)))"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue