Put the capture niche in the lambda name instead of generating new names

This commit is contained in:
Ayaz Hafiz 2022-07-01 15:52:36 -04:00 committed by ayazhafiz
parent 1ed2e1a8e9
commit 019ebd93f7
No known key found for this signature in database
GPG key ID: B443F7A3030C9AED
20 changed files with 592 additions and 486 deletions

View file

@ -1530,19 +1530,18 @@ fn tail_call_with_different_layout() {
fn multimorphic_lambda_set_capture() {
indoc!(
r#"
capture : a -> ({} -> Str)
capture : _ -> ({} -> Str)
capture = \val ->
\{} ->
when val is
_ -> ""
Num.toStr val
x : [True, False]
x = True
fun =
when x is
True -> capture {}
False -> capture ""
True -> capture 123u64
False -> capture 18u8
fun {}
"#