Remove backpassing

This commit is contained in:
Sam Mohr 2025-01-01 17:12:24 -08:00
parent b8040bf6a2
commit cbcbfd3265
No known key found for this signature in database
GPG key ID: EA41D161A3C1BC99
94 changed files with 231 additions and 2246 deletions

View file

@ -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!(