mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 12:18:19 +00:00
Remove backpassing
This commit is contained in:
parent
b8040bf6a2
commit
cbcbfd3265
94 changed files with 231 additions and 2246 deletions
|
@ -3002,23 +3002,6 @@ mod test_fmt {
|
|||
"
|
||||
),
|
||||
);
|
||||
|
||||
expr_formats_to(
|
||||
indoc!(
|
||||
r"
|
||||
{ } <- f a b
|
||||
|
||||
{}
|
||||
"
|
||||
),
|
||||
indoc!(
|
||||
r"
|
||||
{} <- f a b
|
||||
|
||||
{}
|
||||
"
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
@ -5284,113 +5267,6 @@ mod test_fmt {
|
|||
));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn backpassing_simple() {
|
||||
expr_formats_same(indoc!(
|
||||
r"
|
||||
get_char = \ctx ->
|
||||
x <- Task.await (get_char_scope scope)
|
||||
42
|
||||
|
||||
42
|
||||
"
|
||||
));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn backpassing_apply_tag() {
|
||||
expr_formats_same(indoc!(
|
||||
r"
|
||||
get_char = \ctx ->
|
||||
(T val new_scope) <- Task.await (get_char_scope scope)
|
||||
42
|
||||
|
||||
42
|
||||
"
|
||||
));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn backpassing_parens_body() {
|
||||
expr_formats_same(indoc!(
|
||||
r"
|
||||
Task.fromResult
|
||||
(
|
||||
b <- binaryOp ctx
|
||||
if a == b then
|
||||
-1
|
||||
else
|
||||
0
|
||||
)
|
||||
"
|
||||
));
|
||||
|
||||
expr_formats_to(
|
||||
indoc!(
|
||||
r"
|
||||
Task.fromResult
|
||||
(b <- binaryOp ctx
|
||||
if a == b then
|
||||
-1
|
||||
else
|
||||
0
|
||||
)
|
||||
"
|
||||
),
|
||||
indoc!(
|
||||
r"
|
||||
Task.fromResult
|
||||
(
|
||||
b <- binaryOp ctx
|
||||
if a == b then
|
||||
-1
|
||||
else
|
||||
0
|
||||
)
|
||||
"
|
||||
),
|
||||
);
|
||||
|
||||
expr_formats_to(
|
||||
indoc!(
|
||||
r"
|
||||
Task.fromResult
|
||||
(b <- binaryOp ctx
|
||||
if a == b then
|
||||
-1
|
||||
else
|
||||
0)
|
||||
"
|
||||
),
|
||||
indoc!(
|
||||
r"
|
||||
Task.fromResult
|
||||
(
|
||||
b <- binaryOp ctx
|
||||
if a == b then
|
||||
-1
|
||||
else
|
||||
0
|
||||
)
|
||||
"
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn backpassing_body_on_newline() {
|
||||
expr_formats_same(indoc!(
|
||||
r"
|
||||
get_char = \ctx ->
|
||||
x <-
|
||||
Task.await (get_char_scope scope)
|
||||
42
|
||||
|
||||
42
|
||||
"
|
||||
));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn multiline_higher_order_function() {
|
||||
expr_formats_same(indoc!(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue