From f9c0d54688b9819432c738600a10f185bcb7dda6 Mon Sep 17 00:00:00 2001 From: Brendan Hansknecht Date: Tue, 16 Jan 2024 22:36:10 -0800 Subject: [PATCH 1/9] Stop using "rlib" I don't know if this matters at all, but I don't think we should use "rlib". The [rust docs](https://doc.rust-lang.org/reference/linkage.html) suggest using "lib" by default. "lib" probably just aliases to "rlib", but it lets the compiler pick what it wants. I don't think this will fix anything, but I am half hopeful it will somehow fix #6121. --- crates/glue/tests/fixture-templates/rust/Cargo.toml | 2 +- examples/cli/false-interpreter/platform/Cargo.toml | 2 +- examples/glue/rust-platform/Cargo.toml | 2 +- examples/gui/breakout/platform/Cargo.toml | 2 +- examples/gui/platform/Cargo.toml | 2 +- examples/platform-switching/rust-platform/Cargo.toml | 2 +- examples/static-site-gen/platform/Cargo.toml | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/crates/glue/tests/fixture-templates/rust/Cargo.toml b/crates/glue/tests/fixture-templates/rust/Cargo.toml index 56f73f42ff..68ddebfcd8 100644 --- a/crates/glue/tests/fixture-templates/rust/Cargo.toml +++ b/crates/glue/tests/fixture-templates/rust/Cargo.toml @@ -20,7 +20,7 @@ links = "app" [lib] name = "host" path = "src/lib.rs" -crate-type = ["staticlib", "rlib"] +crate-type = ["staticlib", "lib"] [[bin]] name = "host" diff --git a/examples/cli/false-interpreter/platform/Cargo.toml b/examples/cli/false-interpreter/platform/Cargo.toml index 1cce894c1d..96421c2fcf 100644 --- a/examples/cli/false-interpreter/platform/Cargo.toml +++ b/examples/cli/false-interpreter/platform/Cargo.toml @@ -10,7 +10,7 @@ links = "app" [lib] name = "host" path = "src/lib.rs" -crate-type = ["staticlib", "rlib"] +crate-type = ["staticlib", "lib"] [[bin]] name = "host" diff --git a/examples/glue/rust-platform/Cargo.toml b/examples/glue/rust-platform/Cargo.toml index 3cfadfba58..de0c75b4ff 100644 --- a/examples/glue/rust-platform/Cargo.toml +++ b/examples/glue/rust-platform/Cargo.toml @@ -9,7 +9,7 @@ links = "app" [lib] name = "host" path = "src/lib.rs" -crate-type = ["staticlib", "rlib"] +crate-type = ["staticlib", "lib"] [[bin]] name = "host" diff --git a/examples/gui/breakout/platform/Cargo.toml b/examples/gui/breakout/platform/Cargo.toml index ec0b370ed8..c4b624b284 100644 --- a/examples/gui/breakout/platform/Cargo.toml +++ b/examples/gui/breakout/platform/Cargo.toml @@ -8,7 +8,7 @@ version = "0.0.1" [lib] name = "host" path = "src/lib.rs" -crate-type = ["staticlib", "rlib"] +crate-type = ["staticlib", "lib"] [[bin]] name = "host" diff --git a/examples/gui/platform/Cargo.toml b/examples/gui/platform/Cargo.toml index 3f312012bf..1110e5ddd0 100644 --- a/examples/gui/platform/Cargo.toml +++ b/examples/gui/platform/Cargo.toml @@ -9,7 +9,7 @@ version = "0.0.1" [lib] name = "host" path = "src/lib.rs" -crate-type = ["staticlib", "rlib"] +crate-type = ["staticlib", "lib"] [[bin]] name = "host" diff --git a/examples/platform-switching/rust-platform/Cargo.toml b/examples/platform-switching/rust-platform/Cargo.toml index b329e6472b..c5dca2b05a 100644 --- a/examples/platform-switching/rust-platform/Cargo.toml +++ b/examples/platform-switching/rust-platform/Cargo.toml @@ -9,7 +9,7 @@ version = "0.0.1" [lib] name = "host" path = "src/lib.rs" -crate-type = ["staticlib", "rlib"] +crate-type = ["staticlib", "lib"] [[bin]] name = "host" diff --git a/examples/static-site-gen/platform/Cargo.toml b/examples/static-site-gen/platform/Cargo.toml index b85f497424..3681eb908c 100644 --- a/examples/static-site-gen/platform/Cargo.toml +++ b/examples/static-site-gen/platform/Cargo.toml @@ -10,7 +10,7 @@ links = "app" [lib] name = "host" path = "src/lib.rs" -crate-type = ["staticlib", "rlib"] +crate-type = ["staticlib", "lib"] [[bin]] name = "host" From 11ecfe0bc6b225b5f40d8cee9790eec139eb720c Mon Sep 17 00:00:00 2001 From: Richard Feldman Date: Wed, 17 Jan 2024 21:08:12 -0500 Subject: [PATCH 2/9] Update interpolation syntax in roc-for-elm-programmers.md Signed-off-by: Richard Feldman --- roc-for-elm-programmers.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roc-for-elm-programmers.md b/roc-for-elm-programmers.md index 95b8f30963..8967a7f470 100644 --- a/roc-for-elm-programmers.md +++ b/roc-for-elm-programmers.md @@ -29,7 +29,7 @@ Roc strings work like Elm strings except that they support string interpolation. Here's a Roc string which uses interpolation: ```elm -"Hi, my name is \(name)!" +"Hi, my name is $(name)!" ``` The Elm equivalent would be: From ad3673bfe99f0ad70d110a3eb12533df8c379488 Mon Sep 17 00:00:00 2001 From: William Barbosa Date: Thu, 18 Jan 2024 07:28:21 +0100 Subject: [PATCH 3/9] Improve filename visibility in error messages --- crates/cli/tests/cli_run.rs | 8 ++++---- crates/reporting/src/report.rs | 13 ++++++++----- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/crates/cli/tests/cli_run.rs b/crates/cli/tests/cli_run.rs index 9a15249fa9..c859dbaf3a 100644 --- a/crates/cli/tests/cli_run.rs +++ b/crates/cli/tests/cli_run.rs @@ -1333,7 +1333,7 @@ mod cli_run { &[], indoc!( r#" - ── TYPE MISMATCH ─────────────────────────────── tests/known_bad/TypeError.roc ─ + ── TYPE MISMATCH in tests/known_bad/TypeError.roc ────────────────────────────── Something is off with the body of the main definition: @@ -1369,7 +1369,7 @@ mod cli_run { &[], indoc!( r#" - ── MISSING DEFINITION ────────────────── tests/known_bad/ExposedNotDefined.roc ─ + ── MISSING DEFINITION in tests/known_bad/ExposedNotDefined.roc ───────────────── bar is listed as exposed, but it isn't defined in this module. @@ -1390,7 +1390,7 @@ mod cli_run { &[], indoc!( r#" - ── UNUSED IMPORT ──────────────────────────── tests/known_bad/UnusedImport.roc ─ + ── UNUSED IMPORT in tests/known_bad/UnusedImport.roc ─────────────────────────── Nothing from Symbol is used in this module. @@ -1413,7 +1413,7 @@ mod cli_run { &[], indoc!( r#" - ── UNKNOWN GENERATES FUNCTION ─────── tests/known_bad/UnknownGeneratesWith.roc ─ + ── UNKNOWN GENERATES FUNCTION in tests/known_bad/UnknownGeneratesWith.roc ────── I don't know how to generate the foobar function. diff --git a/crates/reporting/src/report.rs b/crates/reporting/src/report.rs index 7c6a8051c5..14e1d068a3 100644 --- a/crates/reporting/src/report.rs +++ b/crates/reporting/src/report.rs @@ -82,9 +82,11 @@ pub fn pretty_header_with_path(title: &str, path: &Path) -> String { .to_str() .unwrap(); + let additional_path_display = "in"; + let additional_path_display_width = additional_path_display.len() + 1; let title_width = title.len() + 4; - let relative_path_width = relative_path.len() + 3; - let available_path_width = HEADER_WIDTH - title_width - 1; + let relative_path_width = relative_path.len() + 1; + let available_path_width = HEADER_WIDTH - title_width - additional_path_display_width - 1; // If path is too long to fit in 80 characters with everything else then truncate it let path_width = relative_path_width.min(available_path_width); @@ -96,10 +98,11 @@ pub fn pretty_header_with_path(title: &str, path: &Path) -> String { }; let header = format!( - "── {} {} {} ─", + "── {} {} {} {}", title, - "─".repeat(HEADER_WIDTH - (title_width + path_width)), - path + additional_path_display, + path, + "─".repeat(HEADER_WIDTH - (title_width + path_width + additional_path_display_width)) ); header From f7fac0daba5947042058ba5017c970ff37891eab Mon Sep 17 00:00:00 2001 From: William Barbosa Date: Thu, 18 Jan 2024 07:28:46 +0100 Subject: [PATCH 4/9] Add a test for trimmed paths --- crates/cli/tests/cli_run.rs | 23 +++++++++++++++++++ ...edImportButWithALongFileNameForTesting.roc | 7 ++++++ 2 files changed, 30 insertions(+) create mode 100644 crates/cli/tests/known_bad/UnusedImportButWithALongFileNameForTesting.roc diff --git a/crates/cli/tests/cli_run.rs b/crates/cli/tests/cli_run.rs index c859dbaf3a..cf197f0aad 100644 --- a/crates/cli/tests/cli_run.rs +++ b/crates/cli/tests/cli_run.rs @@ -1362,6 +1362,29 @@ mod cli_run { ); } + #[test] + fn known_type_error_with_long_path() { + check_compile_error( + &known_bad_file("UnusedImportButWithALongFileNameForTesting.roc"), + &[], + indoc!( + r#" + ── UNUSED IMPORT in ...nown_bad/UnusedImportButWithALongFileNameForTesting.roc ─ + + Nothing from Symbol is used in this module. + + 3│ imports [Symbol.{ Ident }] + ^^^^^^^^^^^^^^^^ + + Since Symbol isn't used, you don't need to import it. + + ──────────────────────────────────────────────────────────────────────────────── + + 0 errors and 1 warning found in ms."# + ), + ); + } + #[test] fn exposed_not_defined() { check_compile_error( diff --git a/crates/cli/tests/known_bad/UnusedImportButWithALongFileNameForTesting.roc b/crates/cli/tests/known_bad/UnusedImportButWithALongFileNameForTesting.roc new file mode 100644 index 0000000000..cfd09933ce --- /dev/null +++ b/crates/cli/tests/known_bad/UnusedImportButWithALongFileNameForTesting.roc @@ -0,0 +1,7 @@ +interface UnusedImportButWithALongFileNameForTesting + exposes [plainText, emText] + imports [Symbol.{ Ident }] + +plainText = \str -> PlainText str + +emText = \str -> EmText str From 3882262b7035dfa8a4d87a78da3a398486c2d53a Mon Sep 17 00:00:00 2001 From: William Barbosa Date: Thu, 18 Jan 2024 07:56:59 +0100 Subject: [PATCH 5/9] Fix remaining test cases --- crates/compiler/load/tests/test_reporting.rs | 1000 ++++++++--------- .../compiler/load_internal/tests/test_load.rs | 18 +- 2 files changed, 509 insertions(+), 509 deletions(-) diff --git a/crates/compiler/load/tests/test_reporting.rs b/crates/compiler/load/tests/test_reporting.rs index 2797cdb5bb..2eb2b52735 100644 --- a/crates/compiler/load/tests/test_reporting.rs +++ b/crates/compiler/load/tests/test_reporting.rs @@ -480,7 +480,7 @@ mod test_reporting { " ), @r" - ── NOT EXPOSED ─────────────────────────────────────────── /code/proj/Main.roc ─ + ── NOT EXPOSED in /code/proj/Main.roc ────────────────────────────────────────── The List module does not expose `isempty`: @@ -507,7 +507,7 @@ mod test_reporting { " ), @r" - ── UNUSED DEFINITION ───────────────────────────────────── /code/proj/Main.roc ─ + ── UNUSED DEFINITION in /code/proj/Main.roc ──────────────────────────────────── `y` is not used anywhere in your code. @@ -532,7 +532,7 @@ mod test_reporting { " ), @r" - ── DUPLICATE NAME ──────────────────────────────────────── /code/proj/Main.roc ─ + ── DUPLICATE NAME in /code/proj/Main.roc ─────────────────────────────────────── The `i` name is first defined here: @@ -564,7 +564,7 @@ mod test_reporting { " ), @r" - ── DUPLICATE NAME ──────────────────────────────────────── /code/proj/Main.roc ─ + ── DUPLICATE NAME in /code/proj/Main.roc ─────────────────────────────────────── The `Booly` name is first defined here: @@ -596,7 +596,7 @@ mod test_reporting { " ), @r" - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + ── SYNTAX PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── Using != and == together requires parentheses, to clarify how they should be grouped. @@ -625,7 +625,7 @@ mod test_reporting { "# ), @r#" - ── UNRECOGNIZED NAME ───────────────────────────────────── /code/proj/Main.roc ─ + ── UNRECOGNIZED NAME in /code/proj/Main.roc ──────────────────────────────────── Nothing is named `bar` in this scope. @@ -649,7 +649,7 @@ mod test_reporting { " ), @r" - ── UNRECOGNIZED NAME ───────────────────────────────────── /code/proj/Main.roc ─ + ── UNRECOGNIZED NAME in /code/proj/Main.roc ──────────────────────────────────── Nothing is named `true` in this scope. @@ -681,7 +681,7 @@ mod test_reporting { " ), @r" - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + ── SYNTAX PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── Using more than one == like this requires parentheses, to clarify how things should be grouped. @@ -707,7 +707,7 @@ mod test_reporting { "# ), @r#" - ── UNUSED ARGUMENT ─────────────────────────────────────── /code/proj/Main.roc ─ + ── UNUSED ARGUMENT in /code/proj/Main.roc ────────────────────────────────────── `box` doesn't use `htmlChildren`. @@ -720,7 +720,7 @@ mod test_reporting { at the start of a variable name is a way of saying that the variable is not used. - ── UNUSED DEFINITION ───────────────────────────────────── /code/proj/Main.roc ─ + ── UNUSED DEFINITION in /code/proj/Main.roc ──────────────────────────────────── `y` is not used anywhere in your code. @@ -804,7 +804,7 @@ mod test_reporting { ), indoc!( r" - ── UNRECOGNIZED NAME ───────────────────────────────────── /code/proj/Main.roc ─ + ── UNRECOGNIZED NAME in /code/proj/Main.roc ──────────────────────────────────── Nothing is named `theAdmin` in this scope. @@ -830,7 +830,7 @@ mod test_reporting { "# ), @r#" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This `if` condition needs to be a Bool: @@ -856,7 +856,7 @@ mod test_reporting { " ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This `if` guard condition needs to be a Bool: @@ -881,7 +881,7 @@ mod test_reporting { "# ), @r#" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This `if` has an `else` branch with a different type from its `then` branch: @@ -908,7 +908,7 @@ mod test_reporting { "# ), @r#" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── The 3rd branch of this `if` does not match all the previous branches: @@ -938,7 +938,7 @@ mod test_reporting { "# ), @r#" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── The 2nd branch of this `when` does not match all the previous branches: @@ -976,7 +976,7 @@ mod test_reporting { "# ), @r#" - ── UNSAFE PATTERN ──────────────────────────────────────── /code/proj/Main.roc ─ + ── UNSAFE PATTERN in /code/proj/Main.roc ─────────────────────────────────────── This `when` does not cover all the possibilities: @@ -1020,7 +1020,7 @@ mod test_reporting { "# ), @r#" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This list contains elements with different types: @@ -1047,7 +1047,7 @@ mod test_reporting { " ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This list contains elements with different types: @@ -1080,7 +1080,7 @@ mod test_reporting { "# ), @r#" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── I cannot update the `.foo` field like this: @@ -1110,7 +1110,7 @@ mod test_reporting { " ), @r" - ── CIRCULAR TYPE ───────────────────────────────────────── /code/proj/Main.roc ─ + ── CIRCULAR TYPE in /code/proj/Main.roc ──────────────────────────────────────── I'm inferring a weird self-referential type for `f`: @@ -1135,7 +1135,7 @@ mod test_reporting { " ), @r" - ── CIRCULAR TYPE ───────────────────────────────────────── /code/proj/Main.roc ─ + ── CIRCULAR TYPE in /code/proj/Main.roc ──────────────────────────────────────── I'm inferring a weird self-referential type for `f`: @@ -1161,7 +1161,7 @@ mod test_reporting { " ), @r" - ── CIRCULAR TYPE ───────────────────────────────────────── /code/proj/Main.roc ─ + ── CIRCULAR TYPE in /code/proj/Main.roc ──────────────────────────────────────── I'm inferring a weird self-referential type for `f`: @@ -1174,7 +1174,7 @@ mod test_reporting { List ∞ -> * - ── CIRCULAR TYPE ───────────────────────────────────────── /code/proj/Main.roc ─ + ── CIRCULAR TYPE in /code/proj/Main.roc ──────────────────────────────────────── I'm inferring a weird self-referential type for `g`: @@ -1201,7 +1201,7 @@ mod test_reporting { " ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This expression is used in an unexpected way: @@ -1237,7 +1237,7 @@ mod test_reporting { " ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This expression is used in an unexpected way: @@ -1271,7 +1271,7 @@ mod test_reporting { " ), @r" - ── CIRCULAR TYPE ───────────────────────────────────────── /code/proj/Main.roc ─ + ── CIRCULAR TYPE in /code/proj/Main.roc ──────────────────────────────────────── I'm inferring a weird self-referential type for `f`: @@ -1297,7 +1297,7 @@ mod test_reporting { " ), @r" - ── CIRCULAR TYPE ───────────────────────────────────────── /code/proj/Main.roc ─ + ── CIRCULAR TYPE in /code/proj/Main.roc ──────────────────────────────────────── I'm inferring a weird self-referential type for `f`: @@ -1335,7 +1335,7 @@ mod test_reporting { // against that extra variable, rather than possibly having to translate a `Type` // again. @r" - ── CIRCULAR TYPE ───────────────────────────────────────── /code/proj/Main.roc ─ + ── CIRCULAR TYPE in /code/proj/Main.roc ──────────────────────────────────────── I'm inferring a weird self-referential type for `f`: @@ -1348,7 +1348,7 @@ mod test_reporting { List ∞ -> List * - ── CIRCULAR TYPE ───────────────────────────────────────── /code/proj/Main.roc ─ + ── CIRCULAR TYPE in /code/proj/Main.roc ──────────────────────────────────────── I'm inferring a weird self-referential type for `g`: @@ -1375,7 +1375,7 @@ mod test_reporting { " ), @r" - ── CIRCULAR TYPE ───────────────────────────────────────── /code/proj/Main.roc ─ + ── CIRCULAR TYPE in /code/proj/Main.roc ──────────────────────────────────────── I'm inferring a weird self-referential type for `f`: @@ -1388,7 +1388,7 @@ mod test_reporting { List ∞ -> List * - ── CIRCULAR TYPE ───────────────────────────────────────── /code/proj/Main.roc ─ + ── CIRCULAR TYPE in /code/proj/Main.roc ──────────────────────────────────────── I'm inferring a weird self-referential type for `g`: @@ -1416,7 +1416,7 @@ mod test_reporting { " ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This 1st argument to `f` has an unexpected type: @@ -1450,7 +1450,7 @@ mod test_reporting { " ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This 1st argument to `f` has an unexpected type: @@ -1487,7 +1487,7 @@ mod test_reporting { "# ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This 1st argument to `f` has an unexpected type: @@ -1524,7 +1524,7 @@ mod test_reporting { " ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the `then` branch of this `if` expression: @@ -1558,7 +1558,7 @@ mod test_reporting { " ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the body of the `x` definition: @@ -1591,7 +1591,7 @@ mod test_reporting { " ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the body of the `x` definition: @@ -1623,7 +1623,7 @@ mod test_reporting { " ), @r" - ── TOO MANY ARGS ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TOO MANY ARGS in /code/proj/Main.roc ──────────────────────────────────────── The `x` value is not a function, but it was given 1 argument: @@ -1645,7 +1645,7 @@ mod test_reporting { " ), @r" - ── TOO MANY ARGS ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TOO MANY ARGS in /code/proj/Main.roc ──────────────────────────────────────── The `f` function expects 1 argument, but it got 2 instead: @@ -1667,7 +1667,7 @@ mod test_reporting { " ), @r" - ── TOO FEW ARGS ────────────────────────────────────────── /code/proj/Main.roc ─ + ── TOO FEW ARGS in /code/proj/Main.roc ───────────────────────────────────────── The `f` function expects 2 arguments, but it got only 1: @@ -1688,7 +1688,7 @@ mod test_reporting { " ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── The branches of this `when` expression don't match the condition: @@ -1717,7 +1717,7 @@ mod test_reporting { " ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── The 2nd pattern in this `when` does not match the previous ones: @@ -1743,7 +1743,7 @@ mod test_reporting { " ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── The branches of this `when` expression don't match the condition: @@ -1771,7 +1771,7 @@ mod test_reporting { "# ), @r#" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── The branches of this `when` expression don't match the condition: @@ -1800,7 +1800,7 @@ mod test_reporting { " ), @r" - ── UNRECOGNIZED NAME ───────────────────────────────────── /code/proj/Main.roc ─ + ── UNRECOGNIZED NAME in /code/proj/Main.roc ──────────────────────────────────── Nothing is named `foo` in this scope. @@ -1856,7 +1856,7 @@ mod test_reporting { ), // Just putting this here. We should probably handle or-patterns better @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── The 2nd pattern in this branch does not match the previous ones: @@ -1884,7 +1884,7 @@ mod test_reporting { ), // Maybe this should specifically say the pattern doesn't work? @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This expression is used in an unexpected way: @@ -1912,7 +1912,7 @@ mod test_reporting { " ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the body of this definition: @@ -1943,7 +1943,7 @@ mod test_reporting { " ), @r" - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + ── SYNTAX PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── This integer pattern is malformed: @@ -1964,7 +1964,7 @@ mod test_reporting { " ), @r" - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + ── SYNTAX PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── This float pattern is malformed: @@ -1985,7 +1985,7 @@ mod test_reporting { " ), @r" - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + ── SYNTAX PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── This hex integer pattern is malformed: @@ -2006,7 +2006,7 @@ mod test_reporting { " ), @r" - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + ── SYNTAX PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── This octal integer pattern is malformed: @@ -2027,7 +2027,7 @@ mod test_reporting { " ), @r" - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + ── SYNTAX PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── This binary integer pattern is malformed: @@ -2049,7 +2049,7 @@ mod test_reporting { " ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the body of the `x` definition: @@ -2099,7 +2099,7 @@ mod test_reporting { " ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the `else` branch of this `if` expression: @@ -2133,7 +2133,7 @@ mod test_reporting { " ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the body of the `f` definition: @@ -2168,7 +2168,7 @@ mod test_reporting { " ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the body of the `f` definition: @@ -2204,7 +2204,7 @@ mod test_reporting { " ), @r" - ── UNRECOGNIZED NAME ───────────────────────────────────── /code/proj/Main.roc ─ + ── UNRECOGNIZED NAME in /code/proj/Main.roc ──────────────────────────────────── Nothing is named `ok` in this scope. @@ -2235,7 +2235,7 @@ mod test_reporting { " ), @r" - ── UNUSED DEFINITION ───────────────────────────────────── /code/proj/Main.roc ─ + ── UNUSED DEFINITION in /code/proj/Main.roc ──────────────────────────────────── `ok` is not used anywhere in your code. @@ -2245,7 +2245,7 @@ mod test_reporting { If you didn't intend on using `ok` then remove it so future readers of your code don't wonder why it is there. - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the body of the `f` definition: @@ -2277,7 +2277,7 @@ mod test_reporting { " ), @r" - ── CIRCULAR DEFINITION ─────────────────────────────────── /code/proj/Main.roc ─ + ── CIRCULAR DEFINITION in /code/proj/Main.roc ────────────────────────────────── `f` is defined directly in terms of itself: @@ -2304,7 +2304,7 @@ mod test_reporting { " ), @r" - ── CIRCULAR DEFINITION ─────────────────────────────────── /code/proj/Main.roc ─ + ── CIRCULAR DEFINITION in /code/proj/Main.roc ────────────────────────────────── The `foo` definition is causing a very tricky infinite loop: @@ -2332,7 +2332,7 @@ mod test_reporting { " ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This `x` record doesn’t have a `foo` field: @@ -2354,7 +2354,7 @@ mod test_reporting { ), // TODO also suggest fields with the correct type @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This `x` record doesn’t have a `foo` field: @@ -2387,7 +2387,7 @@ mod test_reporting { ), // TODO also suggest fields with the correct type @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This `r` record doesn’t have a `foo` field: @@ -2415,7 +2415,7 @@ mod test_reporting { ), // TODO also suggest fields with the correct type @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This `x` record doesn’t have a `foo` field: @@ -2445,7 +2445,7 @@ mod test_reporting { ), // TODO also suggest fields with the correct type @r#" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This 2nd argument to + has an unexpected type: @@ -2470,7 +2470,7 @@ mod test_reporting { " ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This 2nd argument to + has an unexpected type: @@ -2498,7 +2498,7 @@ mod test_reporting { " ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This 2nd argument to + has an unexpected type: @@ -2526,7 +2526,7 @@ mod test_reporting { " ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the body of the `f` definition: @@ -2560,7 +2560,7 @@ mod test_reporting { " ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the body of the `f` definition: @@ -2603,7 +2603,7 @@ mod test_reporting { " ), @r" - ── UNSAFE PATTERN ──────────────────────────────────────── /code/proj/Main.roc ─ + ── UNSAFE PATTERN in /code/proj/Main.roc ─────────────────────────────────────── This pattern does not cover all the possibilities: @@ -2618,7 +2618,7 @@ mod test_reporting { matching in function arguments, put a `when` in the function body to account for all possibilities. - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the body of the `f` definition: @@ -2655,7 +2655,7 @@ mod test_reporting { " ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This expression is used in an unexpected way: @@ -2686,7 +2686,7 @@ mod test_reporting { " ), @r" - ── UNSAFE PATTERN ──────────────────────────────────────── /code/proj/Main.roc ─ + ── UNSAFE PATTERN in /code/proj/Main.roc ─────────────────────────────────────── This `when` does not cover all the possibilities: @@ -2713,7 +2713,7 @@ mod test_reporting { " ), @r" - ── UNSAFE PATTERN ──────────────────────────────────────── /code/proj/Main.roc ─ + ── UNSAFE PATTERN in /code/proj/Main.roc ─────────────────────────────────────── This `when` does not cover all the possibilities: @@ -2741,7 +2741,7 @@ mod test_reporting { " ), @r" - ── UNSAFE PATTERN ──────────────────────────────────────── /code/proj/Main.roc ─ + ── UNSAFE PATTERN in /code/proj/Main.roc ─────────────────────────────────────── This `when` does not cover all the possibilities: @@ -2770,7 +2770,7 @@ mod test_reporting { " ), @r" - ── UNSAFE PATTERN ──────────────────────────────────────── /code/proj/Main.roc ─ + ── UNSAFE PATTERN in /code/proj/Main.roc ─────────────────────────────────────── This `when` does not cover all the possibilities: @@ -2799,7 +2799,7 @@ mod test_reporting { ), // Tip: Looks like a record field guard is not exhaustive. Learn more about record pattern matches at TODO. @r" - ── UNSAFE PATTERN ──────────────────────────────────────── /code/proj/Main.roc ─ + ── UNSAFE PATTERN in /code/proj/Main.roc ─────────────────────────────────────── This `when` does not cover all the possibilities: @@ -2828,7 +2828,7 @@ mod test_reporting { " ), @r" - ── UNSAFE PATTERN ──────────────────────────────────────── /code/proj/Main.roc ─ + ── UNSAFE PATTERN in /code/proj/Main.roc ─────────────────────────────────────── This `when` does not cover all the possibilities: @@ -2854,7 +2854,7 @@ mod test_reporting { " ), @r" - ── UNSAFE PATTERN ──────────────────────────────────────── /code/proj/Main.roc ─ + ── UNSAFE PATTERN in /code/proj/Main.roc ─────────────────────────────────────── This `when` does not cover all the possibilities: @@ -2881,7 +2881,7 @@ mod test_reporting { " ), @r" - ── REDUNDANT PATTERN ───────────────────────────────────── /code/proj/Main.roc ─ + ── REDUNDANT PATTERN in /code/proj/Main.roc ──────────────────────────────────── The 2nd pattern is redundant: @@ -2909,7 +2909,7 @@ mod test_reporting { ), // de-aliases the alias to give a better error message @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This 1st argument to `f` has an unexpected type: @@ -2947,7 +2947,7 @@ mod test_reporting { ), // should not report Bar as unused! @r" - ── CYCLIC ALIAS ────────────────────────────────────────── /code/proj/Main.roc ─ + ── CYCLIC ALIAS in /code/proj/Main.roc ───────────────────────────────────────── The `Foo` alias is self-recursive in an invalid way: @@ -2973,7 +2973,7 @@ mod test_reporting { ), // should not report Bar as unused! @r" - ── CYCLIC ALIAS ────────────────────────────────────────── /code/proj/Main.roc ─ + ── CYCLIC ALIAS in /code/proj/Main.roc ───────────────────────────────────────── The `Foo` alias is self-recursive in an invalid way: @@ -2993,7 +2993,7 @@ mod test_reporting { " ), @r" - ── DUPLICATE FIELD NAME ────────────────────────────────── /code/proj/Main.roc ─ + ── DUPLICATE FIELD NAME in /code/proj/Main.roc ───────────────────────────────── This record defines the `.x` field twice! @@ -3017,7 +3017,7 @@ mod test_reporting { "# ), @r#" - ── DUPLICATE FIELD NAME ────────────────────────────────── /code/proj/Main.roc ─ + ── DUPLICATE FIELD NAME in /code/proj/Main.roc ───────────────────────────────── This record defines the `.x` field twice! @@ -3045,7 +3045,7 @@ mod test_reporting { "# ), @r#" - ── DUPLICATE FIELD NAME ────────────────────────────────── /code/proj/Main.roc ─ + ── DUPLICATE FIELD NAME in /code/proj/Main.roc ───────────────────────────────── This record defines the `.x` field twice! @@ -3080,7 +3080,7 @@ mod test_reporting { "# ), @r#" - ── DUPLICATE FIELD NAME ────────────────────────────────── /code/proj/Main.roc ─ + ── DUPLICATE FIELD NAME in /code/proj/Main.roc ───────────────────────────────── This record defines the `.x` field twice! @@ -3113,7 +3113,7 @@ mod test_reporting { "# ), @r" - ── DUPLICATE FIELD NAME ────────────────────────────────── /code/proj/Main.roc ─ + ── DUPLICATE FIELD NAME in /code/proj/Main.roc ───────────────────────────────── This record type defines the `.foo` field twice! @@ -3141,7 +3141,7 @@ mod test_reporting { "# ), @r" - ── DUPLICATE TAG NAME ──────────────────────────────────── /code/proj/Main.roc ─ + ── DUPLICATE TAG NAME in /code/proj/Main.roc ─────────────────────────────────── This tag union type defines the `Foo` tag twice! @@ -3170,7 +3170,7 @@ mod test_reporting { " ), @r" - ── NAMING PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + ── NAMING PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── This annotation does not match the definition immediately following it: @@ -3206,7 +3206,7 @@ mod test_reporting { " ), @r" - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + ── SYNTAX PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── This definition of `MyAlias` has an unexpected pattern: @@ -3215,7 +3215,7 @@ mod test_reporting { Only type variables like `a` or `value` can occur in this position. - ── UNUSED DEFINITION ───────────────────────────────────── /code/proj/Main.roc ─ + ── UNUSED DEFINITION in /code/proj/Main.roc ──────────────────────────────────── `MyAlias` is not used anywhere in your code. @@ -3238,7 +3238,7 @@ mod test_reporting { " ), @r" - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + ── SYNTAX PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── This definition of `Age` has an unexpected pattern: @@ -3260,7 +3260,7 @@ mod test_reporting { " ), @r" - ── TOO MANY TYPE ARGUMENTS ─────────────────────────────── /code/proj/Main.roc ─ + ── TOO MANY TYPE ARGUMENTS in /code/proj/Main.roc ────────────────────────────── The `Num` opaque expects 1 type argument, but it got 2 instead: @@ -3282,7 +3282,7 @@ mod test_reporting { " ), @r" - ── TOO MANY TYPE ARGUMENTS ─────────────────────────────── /code/proj/Main.roc ─ + ── TOO MANY TYPE ARGUMENTS in /code/proj/Main.roc ────────────────────────────── The `Num` opaque expects 1 type argument, but it got 2 instead: @@ -3306,7 +3306,7 @@ mod test_reporting { " ), @r" - ── TOO FEW TYPE ARGUMENTS ──────────────────────────────── /code/proj/Main.roc ─ + ── TOO FEW TYPE ARGUMENTS in /code/proj/Main.roc ─────────────────────────────── The `Pair` alias expects 2 type arguments, but it got 1 instead: @@ -3330,7 +3330,7 @@ mod test_reporting { " ), @r" - ── TOO MANY TYPE ARGUMENTS ─────────────────────────────── /code/proj/Main.roc ─ + ── TOO MANY TYPE ARGUMENTS in /code/proj/Main.roc ────────────────────────────── The `Pair` alias expects 2 type arguments, but it got 3 instead: @@ -3353,7 +3353,7 @@ mod test_reporting { " ), @r#" - ── UNUSED TYPE ALIAS PARAMETER ─────────────────────────── /code/proj/Main.roc ─ + ── UNUSED TYPE ALIAS PARAMETER in /code/proj/Main.roc ────────────────────────── The `a` type parameter is not used in the `Foo` alias definition: @@ -3375,7 +3375,7 @@ mod test_reporting { " ), @r#" - ── ARGUMENTS BEFORE EQUALS ────────────────── tmp/elm_function_syntax/Test.roc ─ + ── ARGUMENTS BEFORE EQUALS in tmp/elm_function_syntax/Test.roc ───────────────── I am partway through parsing a definition, but I got stuck here: @@ -3403,7 +3403,7 @@ mod test_reporting { "# ), @r#" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the body of the `x` definition: @@ -3452,7 +3452,7 @@ mod test_reporting { // TODO render tag unions across multiple lines // TODO do not show recursion var if the recursion var does not render on the surface of a type @r#" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the body of the `x` definition: @@ -3506,7 +3506,7 @@ mod test_reporting { " ), @r" - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + ── SYNTAX PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── This integer literal is too big: @@ -3518,7 +3518,7 @@ mod test_reporting { Tip: Learn more about number literals at TODO - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + ── SYNTAX PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── This integer literal is too small: @@ -3530,7 +3530,7 @@ mod test_reporting { Tip: Learn more about number literals at TODO - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + ── SYNTAX PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── This integer literal is too big: @@ -3542,7 +3542,7 @@ mod test_reporting { Tip: Learn more about number literals at TODO - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + ── SYNTAX PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── This integer literal is too small: @@ -3554,7 +3554,7 @@ mod test_reporting { Tip: Learn more about number literals at TODO - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This 2nd argument to + has an unexpected type: @@ -3583,7 +3583,7 @@ mod test_reporting { " ), @r" - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + ── SYNTAX PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── This float literal is too big: @@ -3595,7 +3595,7 @@ mod test_reporting { Tip: Learn more about number literals at TODO - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + ── SYNTAX PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── This float literal is too small: @@ -3628,7 +3628,7 @@ mod test_reporting { " ), @r" - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + ── SYNTAX PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── This integer literal contains an invalid digit: @@ -3640,7 +3640,7 @@ mod test_reporting { Tip: Learn more about number literals at TODO - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + ── SYNTAX PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── This hex integer literal contains an invalid digit: @@ -3652,7 +3652,7 @@ mod test_reporting { Tip: Learn more about number literals at TODO - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + ── SYNTAX PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── This octal integer literal contains an invalid digit: @@ -3664,7 +3664,7 @@ mod test_reporting { Tip: Learn more about number literals at TODO - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + ── SYNTAX PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── This binary integer literal contains an invalid digit: @@ -3694,7 +3694,7 @@ mod test_reporting { " ), @r" - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + ── SYNTAX PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── This hex integer literal contains no digits: @@ -3706,7 +3706,7 @@ mod test_reporting { Tip: Learn more about number literals at TODO - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + ── SYNTAX PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── This octal integer literal contains no digits: @@ -3718,7 +3718,7 @@ mod test_reporting { Tip: Learn more about number literals at TODO - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + ── SYNTAX PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── This binary integer literal contains no digits: @@ -3742,7 +3742,7 @@ mod test_reporting { " ), @r" - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + ── SYNTAX PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── This float literal contains an invalid digit: @@ -3773,7 +3773,7 @@ mod test_reporting { " ), @r" - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + ── SYNTAX PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── This expression cannot be updated: @@ -3782,7 +3782,7 @@ mod test_reporting { Only variables can be updated with record update syntax. - ── MODULE NOT IMPORTED ─────────────────────────────────── /code/proj/Main.roc ─ + ── MODULE NOT IMPORTED in /code/proj/Main.roc ────────────────────────────────── The `Test` module is not imported: @@ -3797,7 +3797,7 @@ mod test_reporting { Dict Hash - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + ── SYNTAX PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── This expression cannot be updated: @@ -3816,7 +3816,7 @@ mod test_reporting { " ), @r" - ── MODULE NOT IMPORTED ─────────────────────────────────── /code/proj/Main.roc ─ + ── MODULE NOT IMPORTED in /code/proj/Main.roc ────────────────────────────────── The `Foo` module is not imported: @@ -3841,7 +3841,7 @@ mod test_reporting { " ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This 2nd argument to + has an unexpected type: @@ -3869,7 +3869,7 @@ mod test_reporting { "# ), @r#" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── The 1st argument to `f` is weird: @@ -3898,7 +3898,7 @@ mod test_reporting { " ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the body of this definition: @@ -3929,7 +3929,7 @@ mod test_reporting { " ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── The 1st argument to `f` is weird: @@ -3962,7 +3962,7 @@ mod test_reporting { " ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── The branches of this `when` expression don't match the condition: @@ -3995,7 +3995,7 @@ mod test_reporting { " ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This expression is used in an unexpected way: @@ -4026,7 +4026,7 @@ mod test_reporting { " ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This 1st argument to this function has an unexpected type: @@ -4060,7 +4060,7 @@ mod test_reporting { "# ), @r#" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── The branches of this `when` expression don't match the condition: @@ -4094,7 +4094,7 @@ mod test_reporting { "# ), @r#" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── The branches of this `when` expression don't match the condition: @@ -4122,7 +4122,7 @@ mod test_reporting { " ), @r" - ── BAD OPTIONAL VALUE ──────────────────────────────────── /code/proj/Main.roc ─ + ── BAD OPTIONAL VALUE in /code/proj/Main.roc ─────────────────────────────────── This record uses an optional value for the `.y` field in an incorrect context! @@ -4159,7 +4159,7 @@ mod test_reporting { " ), @r" - ── REDUNDANT PATTERN ───────────────────────────────────── /code/proj/Main.roc ─ + ── REDUNDANT PATTERN in /code/proj/Main.roc ──────────────────────────────────── The 3rd pattern is redundant: @@ -4204,7 +4204,7 @@ mod test_reporting { " ), @r#" - ── UNUSED ARGUMENT ─────────────────────────────────────── /code/proj/Main.roc ─ + ── UNUSED ARGUMENT in /code/proj/Main.roc ────────────────────────────────────── `f` doesn't use `foo`. @@ -4226,7 +4226,7 @@ mod test_reporting { " ), @r" - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + ── SYNTAX PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── I am trying to parse a qualified name here: @@ -4247,7 +4247,7 @@ mod test_reporting { " ), @r" - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + ── SYNTAX PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── I am trying to parse a qualified name here: @@ -4267,7 +4267,7 @@ mod test_reporting { " ), @r" - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + ── SYNTAX PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── I am trying to parse a record field access here: @@ -4289,7 +4289,7 @@ mod test_reporting { " ), @r#" - ── UNKNOWN OPERATOR ──────────────── tmp/type_annotation_double_colon/Test.roc ─ + ── UNKNOWN OPERATOR in tmp/type_annotation_double_colon/Test.roc ─────────────── This looks like an operator, but it's not one I recognize! @@ -4321,7 +4321,7 @@ mod test_reporting { " ), @r" - ── TOO MANY ARGS ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TOO MANY ARGS in /code/proj/Main.roc ──────────────────────────────────────── This value is not a function, but it was given 3 arguments: @@ -4340,7 +4340,7 @@ mod test_reporting { " ), @r" - ── UNFINISHED TAG UNION TYPE ───────────────────── tmp/tag_union_open/Test.roc ─ + ── UNFINISHED TAG UNION TYPE in tmp/tag_union_open/Test.roc ──────────────────── I am partway through parsing a tag union type, but I got stuck here: @@ -4362,7 +4362,7 @@ mod test_reporting { " ), @r" - ── UNFINISHED TAG UNION TYPE ────────────────────── tmp/tag_union_end/Test.roc ─ + ── UNFINISHED TAG UNION TYPE in tmp/tag_union_end/Test.roc ───────────────────── I am partway through parsing a tag union type, but I got stuck here: @@ -4384,7 +4384,7 @@ mod test_reporting { " ), @r" - ── WEIRD TAG NAME ────────────────── tmp/tag_union_lowercase_tag_name/Test.roc ─ + ── WEIRD TAG NAME in tmp/tag_union_lowercase_tag_name/Test.roc ───────────────── I am partway through parsing a tag union type, but I got stuck here: @@ -4405,7 +4405,7 @@ mod test_reporting { " ), @r" - ── WEIRD TAG NAME ─────────── tmp/tag_union_second_lowercase_tag_name/Test.roc ─ + ── WEIRD TAG NAME in tmp/tag_union_second_lowercase_tag_name/Test.roc ────────── I am partway through parsing a tag union type, but I got stuck here: @@ -4426,7 +4426,7 @@ mod test_reporting { " ), @r" - ── UNFINISHED RECORD TYPE ────────────────────── tmp/record_type_open/Test.roc ─ + ── UNFINISHED RECORD TYPE in tmp/record_type_open/Test.roc ───────────────────── I am partway through parsing a record type, but I got stuck here: @@ -4449,7 +4449,7 @@ mod test_reporting { " ), @r" - ── UNFINISHED RECORD TYPE ─────────────── tmp/record_type_open_indent/Test.roc ─ + ── UNFINISHED RECORD TYPE in tmp/record_type_open_indent/Test.roc ────────────── I am partway through parsing a record type, but I got stuck here: @@ -4472,7 +4472,7 @@ mod test_reporting { " ), @r" - ── UNFINISHED RECORD TYPE ─────────────────────── tmp/record_type_end/Test.roc ─ + ── UNFINISHED RECORD TYPE in tmp/record_type_end/Test.roc ────────────────────── I am partway through parsing a record type, but I got stuck here: @@ -4494,7 +4494,7 @@ mod test_reporting { " ), @r" - ── UNFINISHED RECORD TYPE ──────── tmp/record_type_keyword_field_name/Test.roc ─ + ── UNFINISHED RECORD TYPE in tmp/record_type_keyword_field_name/Test.roc ─────── I just started parsing a record type, but I got stuck on this field name: @@ -4516,7 +4516,7 @@ mod test_reporting { " ), @r" - ── UNFINISHED RECORD TYPE ───────────── tmp/record_type_missing_comma/Test.roc ─ + ── UNFINISHED RECORD TYPE in tmp/record_type_missing_comma/Test.roc ──────────── I am partway through parsing a record type, but I got stuck here: @@ -4533,7 +4533,7 @@ mod test_reporting { record_type_tab, "f : { foo \t }", @r" - ── TAB CHARACTER ──────────────────────────────── tmp/record_type_tab/Test.roc ─ + ── TAB CHARACTER in tmp/record_type_tab/Test.roc ─────────────────────────────── I encountered a tab character: @@ -4548,7 +4548,7 @@ mod test_reporting { comment_with_tab, "# comment with a \t\n4", @r" - ── TAB CHARACTER ─────────────────────────────── tmp/comment_with_tab/Test.roc ─ + ── TAB CHARACTER in tmp/comment_with_tab/Test.roc ────────────────────────────── I encountered a tab character: @@ -4563,7 +4563,7 @@ mod test_reporting { comment_with_control_character, "# comment with a \x07\n", @r" - ── ASCII CONTROL CHARACTER ─────── tmp/comment_with_control_character/Test.roc ─ + ── ASCII CONTROL CHARACTER in tmp/comment_with_control_character/Test.roc ────── I encountered an ASCII control character: @@ -4578,7 +4578,7 @@ mod test_reporting { record_type_carriage_return, "f : { \r foo }", @r" - ── MISPLACED CARRIAGE RETURN ──────── tmp/record_type_carriage_return/Test.roc ─ + ── MISPLACED CARRIAGE RETURN in tmp/record_type_carriage_return/Test.roc ─────── I encountered a stray carriage return (\r): @@ -4598,7 +4598,7 @@ mod test_reporting { " ), @r" - ── UNFINISHED PARENTHESES ────────────────── tmp/type_in_parens_start/Test.roc ─ + ── UNFINISHED PARENTHESES in tmp/type_in_parens_start/Test.roc ───────────────── I am partway through parsing a type in parentheses, but I got stuck here: @@ -4621,7 +4621,7 @@ mod test_reporting { " ), @r" - ── UNFINISHED PARENTHESES ──────────────────── tmp/type_in_parens_end/Test.roc ─ + ── UNFINISHED PARENTHESES in tmp/type_in_parens_end/Test.roc ─────────────────── I am partway through parsing a type in parentheses, but I got stuck here: @@ -4646,7 +4646,7 @@ mod test_reporting { " ), @r" - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + ── SYNTAX PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── I am confused by this type name: @@ -4676,7 +4676,7 @@ mod test_reporting { " ), @r" - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + ── SYNTAX PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── I am confused by this type name: @@ -4705,7 +4705,7 @@ mod test_reporting { " ), @r" - ── UNFINISHED TYPE ───────────────────────── tmp/type_apply_stray_dot/Test.roc ─ + ── UNFINISHED TYPE in tmp/type_apply_stray_dot/Test.roc ──────────────────────── I just started parsing a type, but I got stuck here: @@ -4726,7 +4726,7 @@ mod test_reporting { " ), @r" - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + ── SYNTAX PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── I am confused by this type name: @@ -4757,7 +4757,7 @@ mod test_reporting { " ), @r" - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + ── SYNTAX PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── I am confused by this type name: @@ -4777,7 +4777,7 @@ mod test_reporting { " ), @r#" - ── MISSING FINAL EXPRESSION ──────── tmp/def_missing_final_expression/Test.roc ─ + ── MISSING FINAL EXPRESSION in tmp/def_missing_final_expression/Test.roc ─────── I am partway through parsing a definition, but I got stuck here: @@ -4805,7 +4805,7 @@ mod test_reporting { " ), @r#" - ── INDENT ENDS AFTER EXPRESSION ────── tmp/expression_indentation_end/Test.roc ─ + ── INDENT ENDS AFTER EXPRESSION in tmp/expression_indentation_end/Test.roc ───── I am partway through parsing an expression, but I got stuck here: @@ -4831,7 +4831,7 @@ mod test_reporting { " ), @r" - ── UNFINISHED INLINE ALIAS ──────────────────── tmp/type_inline_alias/Test.roc ─ + ── UNFINISHED INLINE ALIAS in tmp/type_inline_alias/Test.roc ─────────────────── I just started parsing an inline type alias, but I got stuck here: @@ -4853,7 +4853,7 @@ mod test_reporting { " ), @r" - ── DOUBLE COMMA ─────────────────────────────── tmp/type_double_comma/Test.roc ─ + ── DOUBLE COMMA in tmp/type_double_comma/Test.roc ────────────────────────────── I just started parsing a function argument type, but I encountered two commas in a row: @@ -4876,7 +4876,7 @@ mod test_reporting { " ), @r" - ── UNFINISHED TYPE ─────────────────────── tmp/type_argument_no_arrow/Test.roc ─ + ── UNFINISHED TYPE in tmp/type_argument_no_arrow/Test.roc ────────────────────── I am partway through parsing a type, but I got stuck here: @@ -4899,7 +4899,7 @@ mod test_reporting { " ), @r" - ── UNFINISHED TYPE ───────────── tmp/type_argument_arrow_then_nothing/Test.roc ─ + ── UNFINISHED TYPE in tmp/type_argument_arrow_then_nothing/Test.roc ──────────── I just started parsing a type, but I got stuck here: @@ -4924,7 +4924,7 @@ mod test_reporting { "# ), @r#" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the body of the `myDict` definition: @@ -4959,7 +4959,7 @@ mod test_reporting { "# ), @r#" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the body of the `myDict` definition: @@ -4991,7 +4991,7 @@ mod test_reporting { " ), @r" - ── IF GUARD NO CONDITION ───────────── tmp/if_guard_without_condition/Test.roc ─ + ── IF GUARD NO CONDITION in tmp/if_guard_without_condition/Test.roc ──────────── I just started parsing an if guard, but there is no guard condition: @@ -5016,7 +5016,7 @@ mod test_reporting { " ), @r" - ── UNFINISHED PATTERN ────────────────────────── tmp/empty_or_pattern/Test.roc ─ + ── UNFINISHED PATTERN in tmp/empty_or_pattern/Test.roc ───────────────────────── I just started parsing a pattern, but I got stuck here: @@ -5041,7 +5041,7 @@ mod test_reporting { " ), @r" - ── MISSING ARROW ────────────────────────── tmp/pattern_binds_keyword/Test.roc ─ + ── MISSING ARROW in tmp/pattern_binds_keyword/Test.roc ───────────────────────── I am partway through parsing a `when` expression, but got stuck here: @@ -5077,7 +5077,7 @@ mod test_reporting { " ), @r" - ── UNFINISHED WHEN ─────────────────────────── tmp/when_missing_arrow/Test.roc ─ + ── UNFINISHED WHEN in tmp/when_missing_arrow/Test.roc ────────────────────────── I was partway through parsing a `when` expression, but I got stuck here: @@ -5110,7 +5110,7 @@ mod test_reporting { " ), @r" - ── UNFINISHED ARGUMENT LIST ───────────────── tmp/lambda_double_comma/Test.roc ─ + ── UNFINISHED ARGUMENT LIST in tmp/lambda_double_comma/Test.roc ──────────────── I am partway through parsing a function argument list, but I got stuck at this comma: @@ -5131,7 +5131,7 @@ mod test_reporting { " ), @r" - ── UNFINISHED ARGUMENT LIST ──────────────── tmp/lambda_leading_comma/Test.roc ─ + ── UNFINISHED ARGUMENT LIST in tmp/lambda_leading_comma/Test.roc ─────────────── I am partway through parsing a function argument list, but I got stuck at this comma: @@ -5178,7 +5178,7 @@ mod test_reporting { " ), @r" - ── NOT END OF FILE ──────────────────────── tmp/when_outdented_branch/Test.roc ─ + ── NOT END OF FILE in tmp/when_outdented_branch/Test.roc ─────────────────────── I expected to reach the end of the file, but got stuck here: @@ -5197,7 +5197,7 @@ mod test_reporting { " ), @r" - ── UNEXPECTED ARROW ─────────────── tmp/when_over_indented_underscore/Test.roc ─ + ── UNEXPECTED ARROW in tmp/when_over_indented_underscore/Test.roc ────────────── I am parsing a `when` expression right now, but this arrow is confusing me: @@ -5234,7 +5234,7 @@ mod test_reporting { " ), @r" - ── UNEXPECTED ARROW ────────────────────── tmp/when_over_indented_int/Test.roc ─ + ── UNEXPECTED ARROW in tmp/when_over_indented_int/Test.roc ───────────────────── I am parsing a `when` expression right now, but this arrow is confusing me: @@ -5274,7 +5274,7 @@ mod test_reporting { " ), @r" - ── UNFINISHED IF ────────────────────────────── tmp/if_outdented_then/Test.roc ─ + ── UNFINISHED IF in tmp/if_outdented_then/Test.roc ───────────────────────────── I was partway through parsing an `if` expression, but I got stuck here: @@ -5294,7 +5294,7 @@ mod test_reporting { " ), @r" - ── UNFINISHED IF ──────────────────────────────── tmp/if_missing_else/Test.roc ─ + ── UNFINISHED IF in tmp/if_missing_else/Test.roc ─────────────────────────────── I was partway through parsing an `if` expression, but I got stuck here: @@ -5313,7 +5313,7 @@ mod test_reporting { " ), @r" - ── UNFINISHED LIST ──────────────────────────── tmp/list_double_comma/Test.roc ─ + ── UNFINISHED LIST in tmp/list_double_comma/Test.roc ─────────────────────────── I am partway through started parsing a list, but I got stuck here: @@ -5333,7 +5333,7 @@ mod test_reporting { " ), @r" - ── UNFINISHED LIST ───────────────────────────── tmp/list_without_end/Test.roc ─ + ── UNFINISHED LIST in tmp/list_without_end/Test.roc ──────────────────────────── I am partway through started parsing a list, but I got stuck here: @@ -5359,7 +5359,7 @@ mod test_reporting { " ), @r" - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + ── SYNTAX PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── This float literal contains an invalid digit: @@ -5377,7 +5377,7 @@ mod test_reporting { unicode_not_hex, r#""abc\u(zzzz)def""#, @r#" - ── WEIRD CODE POINT ───────────────────────────── tmp/unicode_not_hex/Test.roc ─ + ── WEIRD CODE POINT in tmp/unicode_not_hex/Test.roc ──────────────────────────── I am partway through parsing a unicode code point, but I got stuck here: @@ -5395,7 +5395,7 @@ mod test_reporting { unicode_too_large, r#""abc\u(110000)def""#, @r#" - ── INVALID UNICODE ─────────────────────────────────────── /code/proj/Main.roc ─ + ── INVALID UNICODE in /code/proj/Main.roc ────────────────────────────────────── This unicode code point is invalid: @@ -5410,7 +5410,7 @@ mod test_reporting { weird_escape, r#""abc\qdef""#, @r#" - ── WEIRD ESCAPE ──────────────────────────────────── tmp/weird_escape/Test.roc ─ + ── WEIRD ESCAPE in tmp/weird_escape/Test.roc ─────────────────────────────────── I was partway through parsing a string literal, but I got stuck here: @@ -5434,7 +5434,7 @@ mod test_reporting { single_quote_too_long, r"'abcdef'", @r#" - ── INVALID SCALAR ───────────────────────── tmp/single_quote_too_long/Test.roc ─ + ── INVALID SCALAR in tmp/single_quote_too_long/Test.roc ──────────────────────── I am part way through parsing this scalar literal (character literal), but it's too long to fit in a U32 so it's not a valid scalar. @@ -5451,7 +5451,7 @@ mod test_reporting { single_no_end, r#""there is no end"#, @r#" - ── ENDLESS STRING ───────────────────────────────── tmp/single_no_end/Test.roc ─ + ── ENDLESS STRING in tmp/single_no_end/Test.roc ──────────────────────────────── I cannot find the end of this string: @@ -5467,7 +5467,7 @@ mod test_reporting { multi_no_end, r#""""there is no end"#, @r#" - ── ENDLESS STRING ────────────────────────────────── tmp/multi_no_end/Test.roc ─ + ── ENDLESS STRING in tmp/multi_no_end/Test.roc ───────────────────────────────── I cannot find the end of this block string: @@ -5483,7 +5483,7 @@ mod test_reporting { multi_insufficient_indent, " \"\"\"\n testing\n \"\"\"", // 4 space indent on the start, 2 space on the `testing` line @r#" - ── INSUFFICIENT INDENT IN MULTI-LINE STRING ─ ..._insufficient_indent/Test.roc ─ + ── INSUFFICIENT INDENT IN MULTI-LINE STRING in ...insufficient_indent/Test.roc ─ This multiline string is not sufficiently indented: @@ -5505,7 +5505,7 @@ mod test_reporting { " ), @r#" - ── INDENT ENDS AFTER EXPRESSION ──── tmp/dbg_without_final_expression/Test.roc ─ + ── INDENT ENDS AFTER EXPRESSION in tmp/dbg_without_final_expression/Test.roc ─── I am partway through parsing a dbg statement, but I got stuck here: @@ -5527,7 +5527,7 @@ mod test_reporting { " ), @r#" - ── INDENT ENDS AFTER EXPRESSION ─ tmp/expect_without_final_expression/Test.roc ─ + ── INDENT ENDS AFTER EXPRESSION in ...expect_without_final_expression/Test.roc ─ I am partway through parsing an expect statement, but I got stuck here: @@ -5553,7 +5553,7 @@ mod test_reporting { "#, ), @r#" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This `if` has an `else` branch with a different type from its `then` branch: @@ -5579,7 +5579,7 @@ mod test_reporting { $name, &format!(r#"if Bool.true then "abc" else 1 {} 2"#, $op), |golden| assert_eq!(golden, format!( -r#"── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ +r#"── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This `if` has an `else` branch with a different type from its `then` branch: @@ -5622,7 +5622,7 @@ All branches in an `if` must have the same type! " ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This `foo` record doesn’t have a `if` field: @@ -5641,7 +5641,7 @@ All branches in an `if` must have the same type! " ), @r" - ── NOT EXPOSED ─────────────────────────────────────────── /code/proj/Main.roc ─ + ── NOT EXPOSED in /code/proj/Main.roc ────────────────────────────────────────── The Num module does not expose `if`: @@ -5665,7 +5665,7 @@ All branches in an `if` must have the same type! " ), @r" - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + ── SYNTAX PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── I am trying to parse a record field access here: @@ -5684,7 +5684,7 @@ All branches in an `if` must have the same type! " ), @r" - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + ── SYNTAX PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── I am very confused by this field access: @@ -5703,7 +5703,7 @@ All branches in an `if` must have the same type! " ), @r" - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + ── SYNTAX PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── I am very confused by this field access @@ -5724,7 +5724,7 @@ All branches in an `if` must have the same type! " ), @r" - ── NAMING PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + ── NAMING PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── I am trying to parse an identifier here: @@ -5758,7 +5758,7 @@ All branches in an `if` must have the same type! " ), @r#" - ── UNKNOWN OPERATOR ───────────────────────────────────── tmp/case_of/Test.roc ─ + ── UNKNOWN OPERATOR in tmp/case_of/Test.roc ──────────────────────────────────── This looks like an operator, but it's not one I recognize! @@ -5791,7 +5791,7 @@ All branches in an `if` must have the same type! "# ), @r#" - ── UNRECOGNIZED NAME ───────────────────────────────────── /code/proj/Main.roc ─ + ── UNRECOGNIZED NAME in /code/proj/Main.roc ──────────────────────────────────── Nothing is named `bar` in this scope. @@ -5816,7 +5816,7 @@ All branches in an `if` must have the same type! " ), @r#" - ── UNKNOWN OPERATOR ──────────────────────────── tmp/invalid_operator/Test.roc ─ + ── UNKNOWN OPERATOR in tmp/invalid_operator/Test.roc ─────────────────────────── This looks like an operator, but it's not one I recognize! @@ -5841,7 +5841,7 @@ All branches in an `if` must have the same type! " ), @r#" - ── UNKNOWN OPERATOR ───────────────────────────────── tmp/double_plus/Test.roc ─ + ── UNKNOWN OPERATOR in tmp/double_plus/Test.roc ──────────────────────────────── This looks like an operator, but it's not one I recognize! @@ -5868,7 +5868,7 @@ All branches in an `if` must have the same type! " ), @r#" - ── UNKNOWN OPERATOR ────────────────────────────── tmp/inline_hastype/Test.roc ─ + ── UNKNOWN OPERATOR in tmp/inline_hastype/Test.roc ───────────────────────────── This looks like an operator, but it's not one I recognize! @@ -5899,7 +5899,7 @@ All branches in an `if` must have the same type! |golden| pretty_assertions::assert_eq!( golden, &format!( - r#"── UNKNOWN OPERATOR ───────────────────────────── tmp/wild_case_arrow/Test.roc ─ + r#"── UNKNOWN OPERATOR in tmp/wild_case_arrow/Test.roc ──────────────────────────── This looks like an operator, but it's not one I recognize! @@ -5932,7 +5932,7 @@ In roc, functions are always written as a lambda, like{} ), indoc!( r" - ── WEIRD PROVIDES ──────────────────────────────────────── /code/proj/Main.roc ─ + ── WEIRD PROVIDES in /code/proj/Main.roc ─────────────────────────────────────── I am partway through parsing a provides list, but I got stuck here: @@ -5967,7 +5967,7 @@ In roc, functions are always written as a lambda, like{} ), indoc!( r" - ── WEIRD PROVIDES ──────────────────────────────────────── /code/proj/Main.roc ─ + ── WEIRD PROVIDES in /code/proj/Main.roc ─────────────────────────────────────── I am partway through parsing a header, but I got stuck here: @@ -5993,7 +5993,7 @@ In roc, functions are always written as a lambda, like{} ), indoc!( r#" - ── WEIRD PROVIDES ──────────────────────────────────────── /code/proj/Main.roc ─ + ── WEIRD PROVIDES in /code/proj/Main.roc ─────────────────────────────────────── I am partway through parsing a header, but I got stuck here: @@ -6020,7 +6020,7 @@ In roc, functions are always written as a lambda, like{} ), indoc!( r#" - ── WEIRD PROVIDES ──────────────────────────────────────── /code/proj/Main.roc ─ + ── WEIRD PROVIDES in /code/proj/Main.roc ─────────────────────────────────────── I am partway through parsing a header, but I got stuck here: @@ -6057,7 +6057,7 @@ In roc, functions are always written as a lambda, like{} ), indoc!( r#" - ── BAD REQUIRES ────────────────────────────────────────── /code/proj/Main.roc ─ + ── BAD REQUIRES in /code/proj/Main.roc ───────────────────────────────────────── I am partway through parsing a header, but I got stuck here: @@ -6085,7 +6085,7 @@ In roc, functions are always written as a lambda, like{} ), indoc!( r" - ── WEIRD IMPORTS ───────────────────────────────────────── /code/proj/Main.roc ─ + ── WEIRD IMPORTS in /code/proj/Main.roc ──────────────────────────────────────── I am partway through parsing a header, but I got stuck here: @@ -6112,7 +6112,7 @@ In roc, functions are always written as a lambda, like{} ), indoc!( r" - ── WEIRD EXPOSES ───────────────────────────────────────── /code/proj/Main.roc ─ + ── WEIRD EXPOSES in /code/proj/Main.roc ──────────────────────────────────────── I am partway through parsing an `exposes` list, but I got stuck here: @@ -6140,7 +6140,7 @@ In roc, functions are always written as a lambda, like{} ), indoc!( r" - ── WEIRD MODULE NAME ───────────────────────────────────── /code/proj/Main.roc ─ + ── WEIRD MODULE NAME in /code/proj/Main.roc ──────────────────────────────────── I am partway through parsing a header, but got stuck here: @@ -6166,7 +6166,7 @@ In roc, functions are always written as a lambda, like{} ), indoc!( r#" - ── WEIRD APP NAME ──────────────────────────────────────── /code/proj/Main.roc ─ + ── WEIRD APP NAME in /code/proj/Main.roc ─────────────────────────────────────── I am partway through parsing a header, but got stuck here: @@ -6190,7 +6190,7 @@ In roc, functions are always written as a lambda, like{} " ), @r" - ── TOO MANY ARGS ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TOO MANY ARGS in /code/proj/Main.roc ──────────────────────────────────────── This value is not a function, but it was given 2 arguments: @@ -6211,7 +6211,7 @@ In roc, functions are always written as a lambda, like{} " ), @r" - ── TOO MANY ARGS ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TOO MANY ARGS in /code/proj/Main.roc ──────────────────────────────────────── This value is not a function, but it was given 2 arguments: @@ -6233,7 +6233,7 @@ In roc, functions are always written as a lambda, like{} " ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the body of the `x` definition: @@ -6259,7 +6259,7 @@ In roc, functions are always written as a lambda, like{} " ), @r" - ── UNFINISHED PARENTHESES ──────────────── tmp/pattern_in_parens_open/Test.roc ─ + ── UNFINISHED PARENTHESES in tmp/pattern_in_parens_open/Test.roc ─────────────── I am partway through parsing a pattern in parentheses, but I got stuck here: @@ -6282,7 +6282,7 @@ In roc, functions are always written as a lambda, like{} " ), @r" - ── UNFINISHED PARENTHESES ─────────── tmp/pattern_in_parens_end_comma/Test.roc ─ + ── UNFINISHED PARENTHESES in tmp/pattern_in_parens_end_comma/Test.roc ────────── I am partway through parsing a pattern in parentheses, but I got stuck here: @@ -6305,7 +6305,7 @@ In roc, functions are always written as a lambda, like{} " ), @r" - ── UNFINISHED PARENTHESES ───────────────── tmp/pattern_in_parens_end/Test.roc ─ + ── UNFINISHED PARENTHESES in tmp/pattern_in_parens_end/Test.roc ──────────────── I am partway through parsing a pattern in parentheses, but I got stuck here: @@ -6329,7 +6329,7 @@ In roc, functions are always written as a lambda, like{} " ), @r" - ── UNFINISHED FUNCTION ───── tmp/unfinished_closure_pattern_in_parens/Test.roc ─ + ── UNFINISHED FUNCTION in tmp/unfinished_closure_pattern_in_parens/Test.roc ──── I was partway through parsing a function, but I got stuck here: @@ -6349,7 +6349,7 @@ In roc, functions are always written as a lambda, like{} " ), @r" - ── UNFINISHED PARENTHESES ───────── tmp/pattern_in_parens_indent_open/Test.roc ─ + ── UNFINISHED PARENTHESES in tmp/pattern_in_parens_indent_open/Test.roc ──────── I am partway through parsing a pattern in parentheses, but I got stuck here: @@ -6374,7 +6374,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r#" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This 2nd argument to `map` has an unexpected type: @@ -6402,7 +6402,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r#" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This `expect` condition needs to be a Bool: @@ -6429,7 +6429,7 @@ In roc, functions are always written as a lambda, like{} " ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This 2nd argument to * has an unexpected type: @@ -6444,7 +6444,7 @@ In roc, functions are always written as a lambda, like{} Num * - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the body of the `mult` definition: @@ -6473,7 +6473,7 @@ In roc, functions are always written as a lambda, like{} " ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This 2nd argument to * has an unexpected type: @@ -6488,7 +6488,7 @@ In roc, functions are always written as a lambda, like{} Num a - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the body of the `mult` definition: @@ -6523,7 +6523,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── DUPLICATE NAME ──────────────────────────────────────── /code/proj/Main.roc ─ + ── DUPLICATE NAME in /code/proj/Main.roc ─────────────────────────────────────── This alias has the same name as a builtin: @@ -6533,7 +6533,7 @@ In roc, functions are always written as a lambda, like{} All builtin aliases are in scope by default, so I need this alias to have a different name! - ── TOO FEW TYPE ARGUMENTS ──────────────────────────────── /code/proj/Main.roc ─ + ── TOO FEW TYPE ARGUMENTS in /code/proj/Main.roc ─────────────────────────────── The `Result` alias expects 2 type arguments, but it got 1 instead: @@ -6561,7 +6561,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── DUPLICATE NAME ──────────────────────────────────────── /code/proj/Main.roc ─ + ── DUPLICATE NAME in /code/proj/Main.roc ─────────────────────────────────────── This alias has the same name as a builtin: @@ -6571,7 +6571,7 @@ In roc, functions are always written as a lambda, like{} All builtin aliases are in scope by default, so I need this alias to have a different name! - ── TOO MANY TYPE ARGUMENTS ─────────────────────────────── /code/proj/Main.roc ─ + ── TOO MANY TYPE ARGUMENTS in /code/proj/Main.roc ────────────────────────────── The `Result` alias expects 2 type arguments, but it got 3 instead: @@ -6593,7 +6593,7 @@ In roc, functions are always written as a lambda, like{} ), // TODO: We should tell the user that we inferred `_` as `a` @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the body of the `f` definition: @@ -6627,7 +6627,7 @@ In roc, functions are always written as a lambda, like{} " ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the body of the `f` definition: @@ -6659,7 +6659,7 @@ In roc, functions are always written as a lambda, like{} " ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the body of the `f` definition: @@ -6699,7 +6699,7 @@ In roc, functions are always written as a lambda, like{} " ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the body of the `inner` definition: @@ -6728,7 +6728,7 @@ In roc, functions are always written as a lambda, like{} " ), @r" - ── NOT AN INLINE ALIAS ────────── tmp/error_inline_alias_not_an_alias/Test.roc ─ + ── NOT AN INLINE ALIAS in tmp/error_inline_alias_not_an_alias/Test.roc ───────── The inline type after this `as` is not a type alias: @@ -6748,7 +6748,7 @@ In roc, functions are always written as a lambda, like{} " ), @r" - ── QUALIFIED ALIAS NAME ──────────── tmp/error_inline_alias_qualified/Test.roc ─ + ── QUALIFIED ALIAS NAME in tmp/error_inline_alias_qualified/Test.roc ─────────── This type alias has a qualified name: @@ -6768,7 +6768,7 @@ In roc, functions are always written as a lambda, like{} " ), @r" - ── TYPE ARGUMENT NOT LOWERCASE ─ ...r_inline_alias_argument_uppercase/Test.roc ─ + ── TYPE ARGUMENT NOT LOWERCASE in ..._inline_alias_argument_uppercase/Test.roc ─ This alias type argument is not lowercase: @@ -6792,7 +6792,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r#" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This 1st argument to `isEmpty` has an unexpected type: @@ -6828,7 +6828,7 @@ In roc, functions are always written as a lambda, like{} " ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This 1st argument to `c` has an unexpected type: @@ -6861,7 +6861,7 @@ In roc, functions are always written as a lambda, like{} " ), @r" - ── CYCLIC ALIAS ────────────────────────────────────────── /code/proj/Main.roc ─ + ── CYCLIC ALIAS in /code/proj/Main.roc ───────────────────────────────────────── The `F` alias is self-recursive in an invalid way: @@ -6884,7 +6884,7 @@ In roc, functions are always written as a lambda, like{} " ), @r" - ── CYCLIC ALIAS ────────────────────────────────────────── /code/proj/Main.roc ─ + ── CYCLIC ALIAS in /code/proj/Main.roc ───────────────────────────────────────── The `F` alias is self-recursive in an invalid way: @@ -6906,7 +6906,7 @@ In roc, functions are always written as a lambda, like{} " ), @r" - ── CYCLIC ALIAS ────────────────────────────────────────── /code/proj/Main.roc ─ + ── CYCLIC ALIAS in /code/proj/Main.roc ───────────────────────────────────────── The `F` alias is self-recursive in an invalid way: @@ -6931,7 +6931,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── The 1st argument to `job` is weird: @@ -6966,7 +6966,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the body of the `job` definition: @@ -6997,7 +6997,7 @@ In roc, functions are always written as a lambda, like{} " ), @r" - ── NESTED DATATYPE ─────────────────────────────────────── /code/proj/Main.roc ─ + ── NESTED DATATYPE in /code/proj/Main.roc ────────────────────────────────────── `Nested` is a nested datatype. Here is one recursive usage of it: @@ -7025,7 +7025,7 @@ In roc, functions are always written as a lambda, like{} " ), @r" - ── NESTED DATATYPE ─────────────────────────────────────── /code/proj/Main.roc ─ + ── NESTED DATATYPE in /code/proj/Main.roc ────────────────────────────────────── `Nested` is a nested datatype. Here is one recursive usage of it: @@ -7073,7 +7073,7 @@ In roc, functions are always written as a lambda, like{} let real = format!(indoc!( r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This 1st argument to `use` has an unexpected type: @@ -7140,7 +7140,7 @@ In roc, functions are always written as a lambda, like{} let real = format!(indoc!( r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── The branches of this `when` expression don't match the condition: @@ -7192,7 +7192,7 @@ In roc, functions are always written as a lambda, like{} ), // TODO: link to number suffixes @r" - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + ── SYNTAX PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── This integer literal contains an invalid digit: @@ -7215,7 +7215,7 @@ In roc, functions are always written as a lambda, like{} ), // TODO: link to number suffixes @r" - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + ── SYNTAX PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── This integer literal contains an invalid digit: @@ -7237,7 +7237,7 @@ In roc, functions are always written as a lambda, like{} " ), @r" - ── CONFLICTING NUMBER SUFFIX ───────────────────────────── /code/proj/Main.roc ─ + ── CONFLICTING NUMBER SUFFIX in /code/proj/Main.roc ──────────────────────────── This number literal is an integer, but it has a float suffix: @@ -7254,7 +7254,7 @@ In roc, functions are always written as a lambda, like{} " ), @r" - ── CONFLICTING NUMBER SUFFIX ───────────────────────────── /code/proj/Main.roc ─ + ── CONFLICTING NUMBER SUFFIX in /code/proj/Main.roc ──────────────────────────── This number literal is a float, but it has an integer suffix: @@ -7267,7 +7267,7 @@ In roc, functions are always written as a lambda, like{} u8_overflow, "256u8", @r" - ── NUMBER OVERFLOWS SUFFIX ─────────────────────────────── /code/proj/Main.roc ─ + ── NUMBER OVERFLOWS SUFFIX in /code/proj/Main.roc ────────────────────────────── This integer literal overflows the type indicated by its suffix: @@ -7283,7 +7283,7 @@ In roc, functions are always written as a lambda, like{} negative_u8, "-1u8", @r" - ── NUMBER UNDERFLOWS SUFFIX ────────────────────────────── /code/proj/Main.roc ─ + ── NUMBER UNDERFLOWS SUFFIX in /code/proj/Main.roc ───────────────────────────── This integer literal underflows the type indicated by its suffix: @@ -7299,7 +7299,7 @@ In roc, functions are always written as a lambda, like{} u16_overflow, "65536u16", @r" - ── NUMBER OVERFLOWS SUFFIX ─────────────────────────────── /code/proj/Main.roc ─ + ── NUMBER OVERFLOWS SUFFIX in /code/proj/Main.roc ────────────────────────────── This integer literal overflows the type indicated by its suffix: @@ -7315,7 +7315,7 @@ In roc, functions are always written as a lambda, like{} negative_u16, "-1u16", @r" - ── NUMBER UNDERFLOWS SUFFIX ────────────────────────────── /code/proj/Main.roc ─ + ── NUMBER UNDERFLOWS SUFFIX in /code/proj/Main.roc ───────────────────────────── This integer literal underflows the type indicated by its suffix: @@ -7331,7 +7331,7 @@ In roc, functions are always written as a lambda, like{} u32_overflow, "4_294_967_296u32", @r" - ── NUMBER OVERFLOWS SUFFIX ─────────────────────────────── /code/proj/Main.roc ─ + ── NUMBER OVERFLOWS SUFFIX in /code/proj/Main.roc ────────────────────────────── This integer literal overflows the type indicated by its suffix: @@ -7347,7 +7347,7 @@ In roc, functions are always written as a lambda, like{} negative_u32, "-1u32", @r" - ── NUMBER UNDERFLOWS SUFFIX ────────────────────────────── /code/proj/Main.roc ─ + ── NUMBER UNDERFLOWS SUFFIX in /code/proj/Main.roc ───────────────────────────── This integer literal underflows the type indicated by its suffix: @@ -7363,7 +7363,7 @@ In roc, functions are always written as a lambda, like{} u64_overflow, "18_446_744_073_709_551_616u64", @r" - ── NUMBER OVERFLOWS SUFFIX ─────────────────────────────── /code/proj/Main.roc ─ + ── NUMBER OVERFLOWS SUFFIX in /code/proj/Main.roc ────────────────────────────── This integer literal overflows the type indicated by its suffix: @@ -7379,7 +7379,7 @@ In roc, functions are always written as a lambda, like{} negative_u64, "-1u64", @r" - ── NUMBER UNDERFLOWS SUFFIX ────────────────────────────── /code/proj/Main.roc ─ + ── NUMBER UNDERFLOWS SUFFIX in /code/proj/Main.roc ───────────────────────────── This integer literal underflows the type indicated by its suffix: @@ -7395,7 +7395,7 @@ In roc, functions are always written as a lambda, like{} negative_u128, "-1u128", @r" - ── NUMBER UNDERFLOWS SUFFIX ────────────────────────────── /code/proj/Main.roc ─ + ── NUMBER UNDERFLOWS SUFFIX in /code/proj/Main.roc ───────────────────────────── This integer literal underflows the type indicated by its suffix: @@ -7411,7 +7411,7 @@ In roc, functions are always written as a lambda, like{} i8_overflow, "128i8", @r" - ── NUMBER OVERFLOWS SUFFIX ─────────────────────────────── /code/proj/Main.roc ─ + ── NUMBER OVERFLOWS SUFFIX in /code/proj/Main.roc ────────────────────────────── This integer literal overflows the type indicated by its suffix: @@ -7427,7 +7427,7 @@ In roc, functions are always written as a lambda, like{} i8_underflow, "-129i8", @r" - ── NUMBER UNDERFLOWS SUFFIX ────────────────────────────── /code/proj/Main.roc ─ + ── NUMBER UNDERFLOWS SUFFIX in /code/proj/Main.roc ───────────────────────────── This integer literal underflows the type indicated by its suffix: @@ -7443,7 +7443,7 @@ In roc, functions are always written as a lambda, like{} i16_overflow, "32768i16", @r" - ── NUMBER OVERFLOWS SUFFIX ─────────────────────────────── /code/proj/Main.roc ─ + ── NUMBER OVERFLOWS SUFFIX in /code/proj/Main.roc ────────────────────────────── This integer literal overflows the type indicated by its suffix: @@ -7459,7 +7459,7 @@ In roc, functions are always written as a lambda, like{} i16_underflow, "-32769i16", @r" - ── NUMBER UNDERFLOWS SUFFIX ────────────────────────────── /code/proj/Main.roc ─ + ── NUMBER UNDERFLOWS SUFFIX in /code/proj/Main.roc ───────────────────────────── This integer literal underflows the type indicated by its suffix: @@ -7475,7 +7475,7 @@ In roc, functions are always written as a lambda, like{} i32_overflow, "2_147_483_648i32", @r" - ── NUMBER OVERFLOWS SUFFIX ─────────────────────────────── /code/proj/Main.roc ─ + ── NUMBER OVERFLOWS SUFFIX in /code/proj/Main.roc ────────────────────────────── This integer literal overflows the type indicated by its suffix: @@ -7491,7 +7491,7 @@ In roc, functions are always written as a lambda, like{} i32_underflow, "-2_147_483_649i32", @r" - ── NUMBER UNDERFLOWS SUFFIX ────────────────────────────── /code/proj/Main.roc ─ + ── NUMBER UNDERFLOWS SUFFIX in /code/proj/Main.roc ───────────────────────────── This integer literal underflows the type indicated by its suffix: @@ -7507,7 +7507,7 @@ In roc, functions are always written as a lambda, like{} i64_overflow, "9_223_372_036_854_775_808i64", @r" - ── NUMBER OVERFLOWS SUFFIX ─────────────────────────────── /code/proj/Main.roc ─ + ── NUMBER OVERFLOWS SUFFIX in /code/proj/Main.roc ────────────────────────────── This integer literal overflows the type indicated by its suffix: @@ -7523,7 +7523,7 @@ In roc, functions are always written as a lambda, like{} i64_underflow, "-9_223_372_036_854_775_809i64", @r" - ── NUMBER UNDERFLOWS SUFFIX ────────────────────────────── /code/proj/Main.roc ─ + ── NUMBER UNDERFLOWS SUFFIX in /code/proj/Main.roc ───────────────────────────── This integer literal underflows the type indicated by its suffix: @@ -7539,7 +7539,7 @@ In roc, functions are always written as a lambda, like{} i128_overflow, "170_141_183_460_469_231_731_687_303_715_884_105_728i128", @r" - ── NUMBER OVERFLOWS SUFFIX ─────────────────────────────── /code/proj/Main.roc ─ + ── NUMBER OVERFLOWS SUFFIX in /code/proj/Main.roc ────────────────────────────── This integer literal overflows the type indicated by its suffix: @@ -7561,7 +7561,7 @@ In roc, functions are always written as a lambda, like{} // TODO: this error message could be improved, e.g. something like "This argument can // be used as ... because of its literal value" @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This 2nd argument to `get` has an unexpected type: @@ -7587,7 +7587,7 @@ In roc, functions are always written as a lambda, like{} " ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This 2nd argument to `get` has an unexpected type: @@ -7614,7 +7614,7 @@ In roc, functions are always written as a lambda, like{} " ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This 2nd argument to `get` has an unexpected type: @@ -7641,7 +7641,7 @@ In roc, functions are always written as a lambda, like{} " ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── The branches of this `when` expression don't match the condition: @@ -7672,7 +7672,7 @@ In roc, functions are always written as a lambda, like{} " ), @r" - ── CYCLIC ALIAS ────────────────────────────────────────── /code/proj/Main.roc ─ + ── CYCLIC ALIAS in /code/proj/Main.roc ───────────────────────────────────────── The `R` alias is self-recursive in an invalid way: @@ -7695,7 +7695,7 @@ In roc, functions are always written as a lambda, like{} " ), @r" - ── CYCLIC ALIAS ────────────────────────────────────────── /code/proj/Main.roc ─ + ── CYCLIC ALIAS in /code/proj/Main.roc ───────────────────────────────────────── The `R` alias is self-recursive in an invalid way: @@ -7719,7 +7719,7 @@ In roc, functions are always written as a lambda, like{} " ), @r" - ── CYCLIC ALIAS ────────────────────────────────────────── /code/proj/Main.roc ─ + ── CYCLIC ALIAS in /code/proj/Main.roc ───────────────────────────────────────── The `Foo` alias is recursive in an invalid way: @@ -7754,7 +7754,7 @@ In roc, functions are always written as a lambda, like{} " ), @r" - ── DUPLICATE NAME ──────────────────────────────────────── /code/proj/Main.roc ─ + ── DUPLICATE NAME in /code/proj/Main.roc ─────────────────────────────────────── This alias has the same name as a builtin: @@ -7774,7 +7774,7 @@ In roc, functions are always written as a lambda, like{} " ), @r" - ── OPAQUE TYPE NOT DEFINED ─────────────────────────────── /code/proj/Main.roc ─ + ── OPAQUE TYPE NOT DEFINED in /code/proj/Main.roc ────────────────────────────── The opaque type Age referenced here is not defined: @@ -7795,7 +7795,7 @@ In roc, functions are always written as a lambda, like{} " ), @r" - ── OPAQUE TYPE NOT DEFINED ─────────────────────────────── /code/proj/Main.roc ─ + ── OPAQUE TYPE NOT DEFINED in /code/proj/Main.roc ────────────────────────────── The opaque type Age referenced here is not defined: @@ -7809,7 +7809,7 @@ In roc, functions are always written as a lambda, like{} Note: It looks like there are no opaque types declared in this scope yet! - ── UNUSED DEFINITION ───────────────────────────────────── /code/proj/Main.roc ─ + ── UNUSED DEFINITION in /code/proj/Main.roc ──────────────────────────────────── `Age` is not used anywhere in your code. @@ -7832,7 +7832,7 @@ In roc, functions are always written as a lambda, like{} // and checking it during can. The reason the error appears is because it is parsed as // Apply(Error(OtherModule), [@Age, 21]) @r" - ── OPAQUE TYPE NOT DEFINED ─────────────────────────────── /code/proj/Main.roc ─ + ── OPAQUE TYPE NOT DEFINED in /code/proj/Main.roc ────────────────────────────── The opaque type Age referenced here is not defined: @@ -7841,7 +7841,7 @@ In roc, functions are always written as a lambda, like{} Note: It looks like there are no opaque types declared in this scope yet! - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + ── SYNTAX PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── I am trying to parse a qualified name here: @@ -7868,7 +7868,7 @@ In roc, functions are always written as a lambda, like{} // `@Age` can be linked to the declaration of `Age` inside `age`, and a suggestion to // raise that declaration to the outer scope. @r" - ── UNUSED DEFINITION ───────────────────────────────────── /code/proj/Main.roc ─ + ── UNUSED DEFINITION in /code/proj/Main.roc ──────────────────────────────────── `Age` is not used anywhere in your code. @@ -7878,7 +7878,7 @@ In roc, functions are always written as a lambda, like{} If you didn't intend on using `Age` then remove it so future readers of your code don't wonder why it is there. - ── OPAQUE TYPE NOT DEFINED ─────────────────────────────── /code/proj/Main.roc ─ + ── OPAQUE TYPE NOT DEFINED in /code/proj/Main.roc ────────────────────────────── The opaque type Age referenced here is not defined: @@ -7899,7 +7899,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── MODULE NOT IMPORTED ─────────────────────────────────── /code/proj/Main.roc ─ + ── MODULE NOT IMPORTED in /code/proj/Main.roc ────────────────────────────────── The `Task` module is not imported: @@ -7931,7 +7931,7 @@ In roc, functions are always written as a lambda, like{} // TODO(opaques): error could be improved by saying that the opaque definition demands // that the argument be a U8, and linking to the definitin! @r#" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This expression is used in an unexpected way: @@ -7960,7 +7960,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This expression is used in an unexpected way: @@ -7990,7 +7990,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r#" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the body of the `v` definition: @@ -8028,7 +8028,7 @@ In roc, functions are always written as a lambda, like{} // TODO(opaques): error could be improved by saying that the user-provided pattern // probably wants to change "Age" to "@Age"! @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── The 1st argument to `f` is weird: @@ -8063,7 +8063,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r#" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── The 2nd pattern in this `when` does not match the previous ones: @@ -8094,7 +8094,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r#" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── The branches of this `when` expression don't match the condition: @@ -8132,7 +8132,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r#" - ── UNSAFE PATTERN ──────────────────────────────────────── /code/proj/Main.roc ─ + ── UNSAFE PATTERN in /code/proj/Main.roc ─────────────────────────────────────── This `when` does not cover all the possibilities: @@ -8165,7 +8165,7 @@ In roc, functions are always written as a lambda, like{} " ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This 1st argument to `y` has an unexpected type: @@ -8198,7 +8198,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r#" - ── UNSAFE PATTERN ──────────────────────────────────────── /code/proj/Main.roc ─ + ── UNSAFE PATTERN in /code/proj/Main.roc ─────────────────────────────────────── This `when` does not cover all the possibilities: @@ -8222,7 +8222,7 @@ In roc, functions are always written as a lambda, like{} " ), @r" - ── INVALID_EXTENSION_TYPE ──────────────────────────────── /code/proj/Main.roc ─ + ── INVALID_EXTENSION_TYPE in /code/proj/Main.roc ─────────────────────────────── This record extension type is invalid: @@ -8243,7 +8243,7 @@ In roc, functions are always written as a lambda, like{} " ), @r" - ── INVALID_EXTENSION_TYPE ──────────────────────────────── /code/proj/Main.roc ─ + ── INVALID_EXTENSION_TYPE in /code/proj/Main.roc ─────────────────────────────── This tag union extension type is invalid: @@ -8270,7 +8270,7 @@ In roc, functions are always written as a lambda, like{} " ), @r" - ── UNRECOGNIZED NAME ───────────────────────────────────── /code/proj/Main.roc ─ + ── UNRECOGNIZED NAME in /code/proj/Main.roc ──────────────────────────────────── Nothing is named `UnknownType` in this scope. @@ -8284,7 +8284,7 @@ In roc, functions are always written as a lambda, like{} Unsigned16 Unsigned64 - ── UNRECOGNIZED NAME ───────────────────────────────────── /code/proj/Main.roc ─ + ── UNRECOGNIZED NAME in /code/proj/Main.roc ──────────────────────────────────── Nothing is named `UnknownType` in this scope. @@ -8311,7 +8311,7 @@ In roc, functions are always written as a lambda, like{} " ), @r" - ── UNFINISHED ABILITY ── tmp/ability_first_demand_not_indented_enough/Test.roc ─ + ── UNFINISHED ABILITY in tmp/ability_first_demand_not_indented_enough/Test.roc ─ I was partway through parsing an ability definition, but I got stuck here: @@ -8336,7 +8336,7 @@ In roc, functions are always written as a lambda, like{} " ), @r" - ── UNFINISHED ABILITY ─── tmp/ability_demands_not_indented_with_first/Test.roc ─ + ── UNFINISHED ABILITY in tmp/ability_demands_not_indented_with_first/Test.roc ── I was partway through parsing an ability definition, but I got stuck here: @@ -8359,7 +8359,7 @@ In roc, functions are always written as a lambda, like{} " ), @r" - ── UNFINISHED ABILITY ───────────── tmp/ability_demand_value_has_args/Test.roc ─ + ── UNFINISHED ABILITY in tmp/ability_demand_value_has_args/Test.roc ──────────── I was partway through parsing an ability definition, but I got stuck here: @@ -8383,7 +8383,7 @@ In roc, functions are always written as a lambda, like{} " ), @r" - ── UNFINISHED ABILITY ────────── tmp/ability_non_signature_expression/Test.roc ─ + ── UNFINISHED ABILITY in tmp/ability_non_signature_expression/Test.roc ───────── I was partway through parsing an ability definition, but I got stuck here: @@ -8406,7 +8406,7 @@ In roc, functions are always written as a lambda, like{} " ), @r" - ── UNBOUND TYPE VARIABLE ───────────────────────────────── /code/proj/Main.roc ─ + ── UNBOUND TYPE VARIABLE in /code/proj/Main.roc ──────────────────────────────── The definition of `I` has an unbound type variable: @@ -8428,7 +8428,7 @@ In roc, functions are always written as a lambda, like{} " ), @r" - ── UNBOUND TYPE VARIABLE ───────────────────────────────── /code/proj/Main.roc ─ + ── UNBOUND TYPE VARIABLE in /code/proj/Main.roc ──────────────────────────────── The definition of `I` has an unbound type variable: @@ -8450,7 +8450,7 @@ In roc, functions are always written as a lambda, like{} " ), @r" - ── UNBOUND TYPE VARIABLE ───────────────────────────────── /code/proj/Main.roc ─ + ── UNBOUND TYPE VARIABLE in /code/proj/Main.roc ──────────────────────────────── The definition of `I` has 2 unbound type variables. @@ -8474,7 +8474,7 @@ In roc, functions are always written as a lambda, like{} " ), @r" - ── UNBOUND TYPE VARIABLE ───────────────────────────────── /code/proj/Main.roc ─ + ── UNBOUND TYPE VARIABLE in /code/proj/Main.roc ──────────────────────────────── The definition of `I` has an unbound type variable: @@ -8496,7 +8496,7 @@ In roc, functions are always written as a lambda, like{} " ), @r" - ── UNBOUND TYPE VARIABLE ───────────────────────────────── /code/proj/Main.roc ─ + ── UNBOUND TYPE VARIABLE in /code/proj/Main.roc ──────────────────────────────── The definition of `I` has an unbound type variable: @@ -8519,7 +8519,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── ABILITY HAS TYPE VARIABLES ──────────────────────────── /code/proj/Main.roc ─ + ── ABILITY HAS TYPE VARIABLES in /code/proj/Main.roc ─────────────────────────── The definition of the `MHash` ability includes type variables: @@ -8529,7 +8529,7 @@ In roc, functions are always written as a lambda, like{} Abilities cannot depend on type variables, but their member values can! - ── UNUSED DEFINITION ───────────────────────────────────── /code/proj/Main.roc ─ + ── UNUSED DEFINITION in /code/proj/Main.roc ──────────────────────────────────── `MHash` is not used anywhere in your code. @@ -8551,7 +8551,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r#" - ── IMPLEMENTS CLAUSE IS NOT AN ABILITY ─────────────────── /code/proj/Main.roc ─ + ── IMPLEMENTS CLAUSE IS NOT AN ABILITY in /code/proj/Main.roc ────────────────── The type referenced in this "implements" clause is not an ability: @@ -8570,7 +8570,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── DUPLICATE NAME ──────────────────────────────────────── /code/proj/Main.roc ─ + ── DUPLICATE NAME in /code/proj/Main.roc ─────────────────────────────────────── The `a` name is first defined here: @@ -8599,7 +8599,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── DUPLICATE NAME ──────────────────────────────────────── /code/proj/Main.roc ─ + ── DUPLICATE NAME in /code/proj/Main.roc ─────────────────────────────────────── The `Ability` name is first defined here: @@ -8626,7 +8626,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── ABILITY MEMBER MISSING IMPLEMENTS CLAUSE ────────────── /code/proj/Main.roc ─ + ── ABILITY MEMBER MISSING IMPLEMENTS CLAUSE in /code/proj/Main.roc ───────────── The definition of the ability member `ab` does not include an `implements` clause binding a type variable to the ability `Ability`: @@ -8641,7 +8641,7 @@ In roc, functions are always written as a lambda, like{} Otherwise, the function does not need to be part of the ability! - ── UNUSED DEFINITION ───────────────────────────────────── /code/proj/Main.roc ─ + ── UNUSED DEFINITION in /code/proj/Main.roc ──────────────────────────────────── `Ability` is not used anywhere in your code. @@ -8663,7 +8663,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── ABILITY MEMBER BINDS MULTIPLE VARIABLES ─────────────── /code/proj/Main.roc ─ + ── ABILITY MEMBER BINDS MULTIPLE VARIABLES in /code/proj/Main.roc ────────────── The definition of the ability member `eq` includes multiple variables bound to the `MEq`` ability:` @@ -8691,7 +8691,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── ILLEGAL IMPLEMENTS CLAUSE ───────────────────────────── /code/proj/Main.roc ─ + ── ILLEGAL IMPLEMENTS CLAUSE in /code/proj/Main.roc ──────────────────────────── An `implements` clause is not allowed here: @@ -8701,7 +8701,7 @@ In roc, functions are always written as a lambda, like{} `implements` clauses can only be specified on the top-level type annotations. - ── ABILITY MEMBER MISSING IMPLEMENTS CLAUSE ────────────── /code/proj/Main.roc ─ + ── ABILITY MEMBER MISSING IMPLEMENTS CLAUSE in /code/proj/Main.roc ───────────── The definition of the ability member `hash` does not include an `implements` clause binding a type variable to the ability `MHash`: @@ -8732,7 +8732,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with this specialization of `hash`: @@ -8765,7 +8765,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── INCOMPLETE ABILITY IMPLEMENTATION ───────────────────── /code/proj/Main.roc ─ + ── INCOMPLETE ABILITY IMPLEMENTATION in /code/proj/Main.roc ──────────────────── This type does not fully implement the `MEq` ability: @@ -8791,7 +8791,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── UNUSED DEFINITION ───────────────────────────────────── /code/proj/Main.roc ─ + ── UNUSED DEFINITION in /code/proj/Main.roc ──────────────────────────────────── `hash` is not used anywhere in your code. @@ -8820,7 +8820,7 @@ In roc, functions are always written as a lambda, like{} ), // TODO: the error message here could be seriously improved! @r" - ── OVERLOADED SPECIALIZATION ───────────────────────────── /code/proj/Main.roc ─ + ── OVERLOADED SPECIALIZATION in /code/proj/Main.roc ──────────────────────────── This ability member specialization is already claimed to specialize another opaque type: @@ -8833,7 +8833,7 @@ In roc, functions are always written as a lambda, like{} Ability specializations can only provide implementations for one opaque type, since all opaque types are different! - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This specialization of `hash` is overly general: @@ -8873,7 +8873,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── OVERLOADED SPECIALIZATION ───────────────────────────── /code/proj/Main.roc ─ + ── OVERLOADED SPECIALIZATION in /code/proj/Main.roc ──────────────────────────── This ability member specialization is already claimed to specialize another opaque type: @@ -8904,7 +8904,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with this specialization of `eq`: @@ -8939,7 +8939,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the body of the `hash` definition: @@ -8980,7 +8980,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This expression has a type that does not implement the abilities it's expected to: @@ -8993,7 +8993,7 @@ In roc, functions are always written as a lambda, like{} Only builtin abilities can have generated implementations! - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This expression has a type that does not implement the abilities it's expected to: @@ -9018,7 +9018,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── ABILITY NOT ON TOP-LEVEL ────────────────────────────── /code/proj/Main.roc ─ + ── ABILITY NOT ON TOP-LEVEL in /code/proj/Main.roc ───────────────────────────── This ability definition is not on the top-level of a module: @@ -9046,7 +9046,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the body of the `hashable` definition: @@ -9092,7 +9092,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── ABILITY USED AS TYPE ────────────────────────────────── /code/proj/Main.roc ─ + ── ABILITY USED AS TYPE in /code/proj/Main.roc ───────────────────────────────── You are attempting to use the ability `MHash` as a type directly: @@ -9106,7 +9106,7 @@ In roc, functions are always written as a lambda, like{} a implements MHash - ── ABILITY USED AS TYPE ────────────────────────────────── /code/proj/Main.roc ─ + ── ABILITY USED AS TYPE in /code/proj/Main.roc ───────────────────────────────── You are attempting to use the ability `MHash` as a type directly: @@ -9136,7 +9136,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r#" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── The branches of this `when` expression don't match the condition: @@ -9189,7 +9189,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r#" - ── WEIRD IMPORTS ────────────────────────── tmp/imports_missing_comma/Test.roc ─ + ── WEIRD IMPORTS in tmp/imports_missing_comma/Test.roc ───────────────────────── I am partway through parsing a imports list, but I got stuck here: @@ -9214,7 +9214,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r#" - ── UNSAFE PATTERN ──────────────────────────────────────── /code/proj/Main.roc ─ + ── UNSAFE PATTERN in /code/proj/Main.roc ─────────────────────────────────────── This `when` does not cover all the possibilities: @@ -9261,7 +9261,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── SPECIALIZATION NOT ON TOP-LEVEL ─────────────────────── /code/proj/Main.roc ─ + ── SPECIALIZATION NOT ON TOP-LEVEL in /code/proj/Main.roc ────────────────────── This specialization of the `default` ability member is in a nested scope: @@ -9286,7 +9286,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r#" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This 2nd argument to == has an unexpected type: @@ -9322,7 +9322,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This 1st argument to `remove` has an unexpected type: @@ -9343,7 +9343,7 @@ In roc, functions are always written as a lambda, like{} change the type annotation to be more specific? Maybe change the code to be more general? - ── CIRCULAR TYPE ───────────────────────────────────────── /code/proj/Main.roc ─ + ── CIRCULAR TYPE in /code/proj/Main.roc ──────────────────────────────────────── I'm inferring a weird self-referential type for `new`: @@ -9356,7 +9356,7 @@ In roc, functions are always written as a lambda, like{} { set : Set ∞ } - ── CIRCULAR TYPE ───────────────────────────────────────── /code/proj/Main.roc ─ + ── CIRCULAR TYPE in /code/proj/Main.roc ──────────────────────────────────────── I'm inferring a weird self-referential type for `goal`: @@ -9386,7 +9386,7 @@ In roc, functions are always written as a lambda, like{} " ), @r" - ── CIRCULAR DEFINITION ─────────────────────────────────── /code/proj/Main.roc ─ + ── CIRCULAR DEFINITION in /code/proj/Main.roc ────────────────────────────────── The `t1` definition is causing a very tricky infinite loop: @@ -9414,7 +9414,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This expression has a type that does not implement the abilities it's expected to: @@ -9442,7 +9442,7 @@ In roc, functions are always written as a lambda, like{} // TODO: this error message is quite unfortunate. We should remove the duplication, and // also support regions that point to things in other modules. See also https://github.com/roc-lang/roc/issues/3056. @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This expression has a type that does not implement the abilities it's expected to: @@ -9479,7 +9479,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── CIRCULAR DEFINITION ─────────────────────────────────── /code/proj/Main.roc ─ + ── CIRCULAR DEFINITION in /code/proj/Main.roc ────────────────────────────────── The `t1` definition is causing a very tricky infinite loop: @@ -9509,7 +9509,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── IMPLEMENTATION NOT FOUND ────────────────────────────── /code/proj/Main.roc ─ + ── IMPLEMENTATION NOT FOUND in /code/proj/Main.roc ───────────────────────────── An implementation of `eq` could not be found in this scope: @@ -9520,7 +9520,7 @@ In roc, functions are always written as a lambda, like{} another variable that implements this ability member, like { eq: myeq } - ── INCOMPLETE ABILITY IMPLEMENTATION ───────────────────── /code/proj/Main.roc ─ + ── INCOMPLETE ABILITY IMPLEMENTATION in /code/proj/Main.roc ──────────────────── This type does not fully implement the `MEq` ability: @@ -9547,7 +9547,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── UNRECOGNIZED NAME ───────────────────────────────────── /code/proj/Main.roc ─ + ── UNRECOGNIZED NAME in /code/proj/Main.roc ──────────────────────────────────── Nothing is named `aMEq` in this scope. @@ -9561,7 +9561,7 @@ In roc, functions are always written as a lambda, like{} myMEq eq - ── INCOMPLETE ABILITY IMPLEMENTATION ───────────────────── /code/proj/Main.roc ─ + ── INCOMPLETE ABILITY IMPLEMENTATION in /code/proj/Main.roc ──────────────────── This type does not fully implement the `MEq` ability: @@ -9588,7 +9588,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── OPTIONAL ABILITY IMPLEMENTATION ─────────────────────── /code/proj/Main.roc ─ + ── OPTIONAL ABILITY IMPLEMENTATION in /code/proj/Main.roc ────────────────────── Ability implementations cannot be optional: @@ -9599,7 +9599,7 @@ In roc, functions are always written as a lambda, like{} - ── INCOMPLETE ABILITY IMPLEMENTATION ───────────────────── /code/proj/Main.roc ─ + ── INCOMPLETE ABILITY IMPLEMENTATION in /code/proj/Main.roc ──────────────────── This type does not fully implement the `MEq` ability: @@ -9626,7 +9626,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── OPTIONAL ABILITY IMPLEMENTATION ─────────────────────── /code/proj/Main.roc ─ + ── OPTIONAL ABILITY IMPLEMENTATION in /code/proj/Main.roc ────────────────────── Ability implementations cannot be optional: @@ -9639,7 +9639,7 @@ In roc, functions are always written as a lambda, like{} record of implementations. For example, implements [Encoding] will attempt to derive `Encoding` - ── INCOMPLETE ABILITY IMPLEMENTATION ───────────────────── /code/proj/Main.roc ─ + ── INCOMPLETE ABILITY IMPLEMENTATION in /code/proj/Main.roc ──────────────────── This type does not fully implement the `Encoding` ability: @@ -9664,7 +9664,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── QUALIFIED ABILITY IMPLEMENTATION ────────────────────── /code/proj/Main.roc ─ + ── QUALIFIED ABILITY IMPLEMENTATION in /code/proj/Main.roc ───────────────────── This ability implementation is qualified: @@ -9674,7 +9674,7 @@ In roc, functions are always written as a lambda, like{} Custom implementations must be defined in the local scope, and unqualified. - ── INCOMPLETE ABILITY IMPLEMENTATION ───────────────────── /code/proj/Main.roc ─ + ── INCOMPLETE ABILITY IMPLEMENTATION in /code/proj/Main.roc ──────────────────── This type does not fully implement the `MEq` ability: @@ -9699,7 +9699,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── ABILITY IMPLEMENTATION NOT IDENTIFIER ───────────────── /code/proj/Main.roc ─ + ── ABILITY IMPLEMENTATION NOT IDENTIFIER in /code/proj/Main.roc ──────────────── This ability implementation is not an identifier: @@ -9711,7 +9711,7 @@ In roc, functions are always written as a lambda, like{} Tip: consider defining this expression as a variable. - ── INCOMPLETE ABILITY IMPLEMENTATION ───────────────────── /code/proj/Main.roc ─ + ── INCOMPLETE ABILITY IMPLEMENTATION in /code/proj/Main.roc ──────────────────── This type does not fully implement the `MEq` ability: @@ -9738,7 +9738,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── DUPLICATE IMPLEMENTATION ────────────────────────────── /code/proj/Main.roc ─ + ── DUPLICATE IMPLEMENTATION in /code/proj/Main.roc ───────────────────────────── This ability member implementation is duplicate: @@ -9766,7 +9766,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── NOT AN ABILITY ──────────────────────────────────────── /code/proj/Main.roc ─ + ── NOT AN ABILITY in /code/proj/Main.roc ─────────────────────────────────────── This identifier is not an ability in scope: @@ -9789,7 +9789,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── ILLEGAL DERIVE ──────────────────────────────────────── /code/proj/Main.roc ─ + ── ILLEGAL DERIVE in /code/proj/Main.roc ─────────────────────────────────────── This ability cannot be derived: @@ -9812,7 +9812,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── INCOMPLETE ABILITY IMPLEMENTATION ───────────────────── /code/proj/Main.roc ─ + ── INCOMPLETE ABILITY IMPLEMENTATION in /code/proj/Main.roc ──────────────────── I can't derive an implementation of the `Encoding` ability for `A`: @@ -9837,7 +9837,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── INCOMPLETE ABILITY IMPLEMENTATION ───────────────────── /code/proj/Main.roc ─ + ── INCOMPLETE ABILITY IMPLEMENTATION in /code/proj/Main.roc ──────────────────── I can't derive an implementation of the `Encoding` ability for `A`: @@ -9889,7 +9889,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── DUPLICATE NAME ──────────────────────────────────────── /code/proj/Main.roc ─ + ── DUPLICATE NAME in /code/proj/Main.roc ─────────────────────────────────────── The `main` name is first defined here: @@ -9904,7 +9904,7 @@ In roc, functions are always written as a lambda, like{} Since these variables have the same name, it's easy to use the wrong one by accident. Give one of them a new name. - ── UNNECESSARY DEFINITION ──────────────────────────────── /code/proj/Main.roc ─ + ── UNNECESSARY DEFINITION in /code/proj/Main.roc ─────────────────────────────── This destructure assignment doesn't introduce any new variables: @@ -9938,7 +9938,7 @@ In roc, functions are always written as a lambda, like{} " ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the body of the `withOpen` definition: @@ -9973,7 +9973,7 @@ In roc, functions are always written as a lambda, like{} " ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This expression is used in an unexpected way: @@ -10020,7 +10020,7 @@ In roc, functions are always written as a lambda, like{} " ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This 1st argument to `foo` has an unexpected type: @@ -10065,7 +10065,7 @@ In roc, functions are always written as a lambda, like{} " ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This 2nd argument to == has an unexpected type: @@ -10090,7 +10090,7 @@ In roc, functions are always written as a lambda, like{} " ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This 2nd argument to == has an unexpected type: @@ -10127,7 +10127,7 @@ In roc, functions are always written as a lambda, like{} " ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the 2nd branch of this `when` expression: @@ -10164,7 +10164,7 @@ In roc, functions are always written as a lambda, like{} " ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This 2nd argument to `map` has an unexpected type: @@ -10190,7 +10190,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r#" - ── NAME NOT BOUND IN ALL PATTERNS ──────────────────────── /code/proj/Main.roc ─ + ── NAME NOT BOUND IN ALL PATTERNS in /code/proj/Main.roc ─────────────────────── `x` is not bound in all patterns of this `when` branch @@ -10201,7 +10201,7 @@ In roc, functions are always written as a lambda, like{} of the branch. Otherwise, the program would crash when it tries to use an identifier that wasn't bound! - ── NAME NOT BOUND IN ALL PATTERNS ──────────────────────── /code/proj/Main.roc ─ + ── NAME NOT BOUND IN ALL PATTERNS in /code/proj/Main.roc ─────────────────────── `y` is not bound in all patterns of this `when` branch @@ -10212,7 +10212,7 @@ In roc, functions are always written as a lambda, like{} of the branch. Otherwise, the program would crash when it tries to use an identifier that wasn't bound! - ── UNUSED DEFINITION ───────────────────────────────────── /code/proj/Main.roc ─ + ── UNUSED DEFINITION in /code/proj/Main.roc ──────────────────────────────────── `y` is not used in this `when` branch. @@ -10234,7 +10234,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r#" - ── UNSAFE PATTERN ──────────────────────────────────────── /code/proj/Main.roc ─ + ── UNSAFE PATTERN in /code/proj/Main.roc ─────────────────────────────────────── This `when` does not cover all the possibilities: @@ -10260,7 +10260,7 @@ In roc, functions are always written as a lambda, like{} |golden| pretty_assertions::assert_eq!( golden, indoc!( - r"── UNRECOGNIZED NAME ───────────────────────────────────── /code/proj/Main.roc ─ + r"── UNRECOGNIZED NAME in /code/proj/Main.roc ──────────────────────────────────── Nothing is named `foo` in this scope. @@ -10297,7 +10297,7 @@ In roc, functions are always written as a lambda, like{} |golden| pretty_assertions::assert_eq!( golden, indoc!( - r"── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + r"── SYNTAX PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── An underscore is being used as a variable here: @@ -10323,7 +10323,7 @@ In roc, functions are always written as a lambda, like{} |golden| pretty_assertions::assert_eq!( golden, indoc!( - r"── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + r"── SYNTAX PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── This variable's name starts with an underscore: @@ -10356,7 +10356,7 @@ In roc, functions are always written as a lambda, like{} golden, indoc!( r" - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + ── SYNTAX PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── This variable's name starts with an underscore: @@ -10383,7 +10383,7 @@ In roc, functions are always written as a lambda, like{} golden, indoc!( r" - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + ── SYNTAX PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── Underscores are not allowed in identifier names: @@ -10410,7 +10410,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r#" - ── BAD RECORD BUILDER ────────── tmp/optional_field_in_record_builder/Test.roc ─ + ── BAD RECORD BUILDER in tmp/optional_field_in_record_builder/Test.roc ───────── I am partway through parsing a record builder, and I found an optional field: @@ -10439,7 +10439,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r#" - ── BAD RECORD UPDATE ────────────────────── tmp/record_update_builder/Test.roc ─ + ── BAD RECORD UPDATE in tmp/record_update_builder/Test.roc ───────────────────── I am partway through parsing a record update, and I found a record builder field: @@ -10465,7 +10465,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r#" - ── MULTIPLE RECORD BUILDERS ────────────────────────────── /code/proj/Main.roc ─ + ── MULTIPLE RECORD BUILDERS in /code/proj/Main.roc ───────────────────────────── This function is applied to multiple record builders: @@ -10488,7 +10488,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r#" - ── UNAPPLIED RECORD BUILDER ────────────────────────────── /code/proj/Main.roc ─ + ── UNAPPLIED RECORD BUILDER in /code/proj/Main.roc ───────────────────────────── This record builder was not applied to a function: @@ -10513,7 +10513,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r#" - ── TOO MANY ARGS ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TOO MANY ARGS in /code/proj/Main.roc ──────────────────────────────────────── This value is not a function, but it was given 1 argument: @@ -10545,7 +10545,7 @@ In roc, functions are always written as a lambda, like{} // "# // ), // @r#" - // ── TOO MANY ARGS ───────────────────────────────────────── /code/proj/Main.roc ─ + // ── TOO MANY ARGS in /code/proj/Main.roc ──────────────────────────────────────── // This value is an opaque type, so it cannot be called with an argument: @@ -10572,7 +10572,7 @@ In roc, functions are always written as a lambda, like{} " ), @r" - ── UNNECESSARY DEFINITION ──────────────────────────────── /code/proj/Main.roc ─ + ── UNNECESSARY DEFINITION in /code/proj/Main.roc ─────────────────────────────── This destructure assignment doesn't introduce any new variables: @@ -10584,7 +10584,7 @@ In roc, functions are always written as a lambda, like{} functional, assignments that don't introduce variables cannot affect a program's behavior! - ── UNNECESSARY DEFINITION ──────────────────────────────── /code/proj/Main.roc ─ + ── UNNECESSARY DEFINITION in /code/proj/Main.roc ─────────────────────────────── This destructure assignment doesn't introduce any new variables: @@ -10596,7 +10596,7 @@ In roc, functions are always written as a lambda, like{} functional, assignments that don't introduce variables cannot affect a program's behavior! - ── UNNECESSARY DEFINITION ──────────────────────────────── /code/proj/Main.roc ─ + ── UNNECESSARY DEFINITION in /code/proj/Main.roc ─────────────────────────────── This destructure assignment doesn't introduce any new variables: @@ -10608,7 +10608,7 @@ In roc, functions are always written as a lambda, like{} functional, assignments that don't introduce variables cannot affect a program's behavior! - ── UNNECESSARY DEFINITION ──────────────────────────────── /code/proj/Main.roc ─ + ── UNNECESSARY DEFINITION in /code/proj/Main.roc ─────────────────────────────── This destructure assignment doesn't introduce any new variables: @@ -10638,7 +10638,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── UNNECESSARY DEFINITION ──────────────────────────────── /code/proj/Main.roc ─ + ── UNNECESSARY DEFINITION in /code/proj/Main.roc ─────────────────────────────── This destructure assignment doesn't introduce any new variables: @@ -10650,7 +10650,7 @@ In roc, functions are always written as a lambda, like{} functional, assignments that don't introduce variables cannot affect a program's behavior! - ── UNNECESSARY DEFINITION ──────────────────────────────── /code/proj/Main.roc ─ + ── UNNECESSARY DEFINITION in /code/proj/Main.roc ─────────────────────────────── This destructure assignment doesn't introduce any new variables: @@ -10662,7 +10662,7 @@ In roc, functions are always written as a lambda, like{} functional, assignments that don't introduce variables cannot affect a program's behavior! - ── UNNECESSARY DEFINITION ──────────────────────────────── /code/proj/Main.roc ─ + ── UNNECESSARY DEFINITION in /code/proj/Main.roc ─────────────────────────────── This destructure assignment doesn't introduce any new variables: @@ -10674,7 +10674,7 @@ In roc, functions are always written as a lambda, like{} functional, assignments that don't introduce variables cannot affect a program's behavior! - ── UNNECESSARY DEFINITION ──────────────────────────────── /code/proj/Main.roc ─ + ── UNNECESSARY DEFINITION in /code/proj/Main.roc ─────────────────────────────── This destructure assignment doesn't introduce any new variables: @@ -10702,7 +10702,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── UNUSED DEFINITION ───────────────────────────────────── /code/proj/Main.roc ─ + ── UNUSED DEFINITION in /code/proj/Main.roc ──────────────────────────────────── `hash` is not used anywhere in your code. @@ -10729,7 +10729,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── WRONG SPECIALIZATION TYPE ───────────────────────────── /code/proj/Main.roc ─ + ── WRONG SPECIALIZATION TYPE in /code/proj/Main.roc ──────────────────────────── This specialization of `hash` is not for the expected type: @@ -10752,7 +10752,7 @@ In roc, functions are always written as a lambda, like{} " ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the body of the `x` definition: @@ -10782,7 +10782,7 @@ In roc, functions are always written as a lambda, like{} " ), @r" - ── CYCLIC ALIAS ────────────────────────────────────────── /code/proj/Main.roc ─ + ── CYCLIC ALIAS in /code/proj/Main.roc ───────────────────────────────────────── The `Recursive` opaque is self-recursive in an invalid way: @@ -10804,7 +10804,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── INCOMPLETE ABILITY IMPLEMENTATION ───────────────────── /code/proj/Main.roc ─ + ── INCOMPLETE ABILITY IMPLEMENTATION in /code/proj/Main.roc ──────────────────── I can't derive an implementation of the `Decoding` ability for `A`: @@ -10829,7 +10829,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── INCOMPLETE ABILITY IMPLEMENTATION ───────────────────── /code/proj/Main.roc ─ + ── INCOMPLETE ABILITY IMPLEMENTATION in /code/proj/Main.roc ──────────────────── I can't derive an implementation of the `Decoding` ability for `A`: @@ -10884,7 +10884,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This expression has a type that does not implement the abilities it's expected to: @@ -10915,7 +10915,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This expression has a type that does not implement the abilities it's expected to: @@ -10945,7 +10945,7 @@ In roc, functions are always written as a lambda, like{} " ), @r#" - ── UNUSED ARGUMENT ─────────────────────────────────────── /code/proj/Main.roc ─ + ── UNUSED ARGUMENT in /code/proj/Main.roc ────────────────────────────────────── This function doesn't use `x`. @@ -10977,7 +10977,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r#" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── The branches of this `when` expression don't match the condition: @@ -11010,7 +11010,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r#" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the body of the `f` definition: @@ -11047,7 +11047,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r#" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the `then` branch of this `if` expression: @@ -11079,7 +11079,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r#" - ── UNUSED DEFINITION ───────────────────────────────────── /code/proj/Main.roc ─ + ── UNUSED DEFINITION in /code/proj/Main.roc ──────────────────────────────────── `foo` is not used in this `when` branch. @@ -11105,7 +11105,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This expression has a type that does not implement the abilities it's expected to: @@ -11134,7 +11134,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This expression has a type that does not implement the abilities it's expected to: @@ -11200,7 +11200,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r#" - ── UNSAFE PATTERN ──────────────────────────────────────── /code/proj/Main.roc ─ + ── UNSAFE PATTERN in /code/proj/Main.roc ─────────────────────────────────────── This `when` does not cover all the possibilities: @@ -11228,7 +11228,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r#" - ── UNSAFE PATTERN ──────────────────────────────────────── /code/proj/Main.roc ─ + ── UNSAFE PATTERN in /code/proj/Main.roc ─────────────────────────────────────── This `when` does not cover all the possibilities: @@ -11255,7 +11255,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r#" - ── UNMATCHABLE PATTERN ─────────────────────────────────── /code/proj/Main.roc ─ + ── UNMATCHABLE PATTERN in /code/proj/Main.roc ────────────────────────────────── The 2nd pattern will never be matched: @@ -11282,7 +11282,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r#" - ── UNMATCHABLE PATTERN ─────────────────────────────────── /code/proj/Main.roc ─ + ── UNMATCHABLE PATTERN in /code/proj/Main.roc ────────────────────────────────── The 2nd pattern will never be matched: @@ -11294,7 +11294,7 @@ In roc, functions are always written as a lambda, like{} It's impossible to create a value of this shape, so this pattern can be safely removed! - ── UNMATCHABLE PATTERN ─────────────────────────────────── /code/proj/Main.roc ─ + ── UNMATCHABLE PATTERN in /code/proj/Main.roc ────────────────────────────────── The 3rd pattern will never be matched: @@ -11319,7 +11319,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── DUPLICATE NAME ──────────────────────────────────────── /code/proj/Main.roc ─ + ── DUPLICATE NAME in /code/proj/Main.roc ─────────────────────────────────────── This opaque type has the same name as a builtin: @@ -11341,7 +11341,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r#" - ── UNUSED IMPORT ───────────────────────────────────────── /code/proj/Main.roc ─ + ── UNUSED IMPORT in /code/proj/Main.roc ──────────────────────────────────────── `List.concat` is not used in this module. @@ -11393,7 +11393,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── CIRCULAR DEFINITION ─────────────────────────────────── /code/proj/Main.roc ─ + ── CIRCULAR DEFINITION in /code/proj/Main.roc ────────────────────────────────── `main` is defined directly in terms of itself: @@ -11415,7 +11415,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r#" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This `if` condition needs to be a Bool: @@ -11441,7 +11441,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r#" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This `if` condition needs to be a Bool: @@ -11469,7 +11469,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── INCOMPLETE ABILITY IMPLEMENTATION ───────────────────── /code/proj/Main.roc ─ + ── INCOMPLETE ABILITY IMPLEMENTATION in /code/proj/Main.roc ──────────────────── I can't derive an implementation of the `Hash` ability for `A`: @@ -11494,7 +11494,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── INCOMPLETE ABILITY IMPLEMENTATION ───────────────────── /code/proj/Main.roc ─ + ── INCOMPLETE ABILITY IMPLEMENTATION in /code/proj/Main.roc ──────────────────── I can't derive an implementation of the `Hash` ability for `A`: @@ -11577,7 +11577,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This expression has a type that does not implement the abilities it's expected to: @@ -11604,7 +11604,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This expression has a type that does not implement the abilities it's expected to: @@ -11650,7 +11650,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r#" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This expression has a type that does not implement the abilities it's expected to: @@ -11686,7 +11686,7 @@ In roc, functions are always written as a lambda, like{} " ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This 2nd argument to `shiftRightZfBy` has an unexpected type: @@ -11701,7 +11701,7 @@ In roc, functions are always written as a lambda, like{} U8 - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This 2nd argument to `shiftRightBy` has an unexpected type: @@ -11716,7 +11716,7 @@ In roc, functions are always written as a lambda, like{} U8 - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This 2nd argument to `shiftLeftBy` has an unexpected type: @@ -11744,7 +11744,7 @@ In roc, functions are always written as a lambda, like{} " ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This 2nd argument to `contains` has an unexpected type: @@ -11771,7 +11771,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── INCOMPLETE ABILITY IMPLEMENTATION ───────────────────── /code/proj/Main.roc ─ + ── INCOMPLETE ABILITY IMPLEMENTATION in /code/proj/Main.roc ──────────────────── I can't derive an implementation of the `Eq` ability for `A`: @@ -11796,7 +11796,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r#" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── The branches of this `when` expression don't match the condition: @@ -11826,7 +11826,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── INCOMPLETE ABILITY IMPLEMENTATION ───────────────────── /code/proj/Main.roc ─ + ── INCOMPLETE ABILITY IMPLEMENTATION in /code/proj/Main.roc ──────────────────── I can't derive an implementation of the `Eq` ability for `A`: @@ -11852,7 +11852,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── INCOMPLETE ABILITY IMPLEMENTATION ───────────────────── /code/proj/Main.roc ─ + ── INCOMPLETE ABILITY IMPLEMENTATION in /code/proj/Main.roc ──────────────────── I can't derive an implementation of the `Eq` ability for `A`: @@ -11880,7 +11880,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── INCOMPLETE ABILITY IMPLEMENTATION ───────────────────── /code/proj/Main.roc ─ + ── INCOMPLETE ABILITY IMPLEMENTATION in /code/proj/Main.roc ──────────────────── I can't derive an implementation of the `Eq` ability for `A`: @@ -11963,7 +11963,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This expression has a type that does not implement the abilities it's expected to: @@ -11990,7 +11990,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This expression has a type that does not implement the abilities it's expected to: @@ -12019,7 +12019,7 @@ In roc, functions are always written as a lambda, like{} " ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This expression has a type that does not implement the abilities it's expected to: @@ -12042,7 +12042,7 @@ In roc, functions are always written as a lambda, like{} " ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This expression has a type that does not implement the abilities it's expected to: @@ -12082,7 +12082,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r#" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This expression has a type that does not implement the abilities it's expected to: @@ -12120,7 +12120,7 @@ In roc, functions are always written as a lambda, like{} " ), @r" - ── NOT EXPOSED ─────────────────────────────────────────── /code/proj/Main.roc ─ + ── NOT EXPOSED in /code/proj/Main.roc ────────────────────────────────────────── The Bool module does not expose `structuralEq`: @@ -12134,7 +12134,7 @@ In roc, functions are always written as a lambda, like{} Bool.false Bool.isEq - ── NOT EXPOSED ─────────────────────────────────────────── /code/proj/Main.roc ─ + ── NOT EXPOSED in /code/proj/Main.roc ────────────────────────────────────────── The Bool module does not expose `structuralNotEq`: @@ -12162,7 +12162,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This expression has a type that does not implement the abilities it's expected to: @@ -12187,7 +12187,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r#" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── The 1st argument to `foo` is weird: @@ -12216,7 +12216,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── INCOMPLETE ABILITY IMPLEMENTATION ───────────────────── /code/proj/Main.roc ─ + ── INCOMPLETE ABILITY IMPLEMENTATION in /code/proj/Main.roc ──────────────────── I can't derive an implementation of the `Hash` ability for `F`: @@ -12227,7 +12227,7 @@ In roc, functions are always written as a lambda, like{} Tip: You can define a custom implementation of `Hash` for `F`. - ── INCOMPLETE ABILITY IMPLEMENTATION ───────────────────── /code/proj/Main.roc ─ + ── INCOMPLETE ABILITY IMPLEMENTATION in /code/proj/Main.roc ──────────────────── I can't derive an implementation of the `Eq` ability for `F`: @@ -12238,7 +12238,7 @@ In roc, functions are always written as a lambda, like{} Tip: You can define a custom implementation of `Eq` for `F`. - ── INCOMPLETE ABILITY IMPLEMENTATION ───────────────────── /code/proj/Main.roc ─ + ── INCOMPLETE ABILITY IMPLEMENTATION in /code/proj/Main.roc ──────────────────── I can't derive an implementation of the `Encoding` ability for `F`: @@ -12261,7 +12261,7 @@ In roc, functions are always written as a lambda, like{} " ), @r" - ── DUPLICATE BOUND ABILITY ─────────────────────────────── /code/proj/Main.roc ─ + ── DUPLICATE BOUND ABILITY in /code/proj/Main.roc ────────────────────────────── I already saw that this type variable is bound to the `Hash` ability once before: @@ -12287,7 +12287,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This 1st argument to `g` has an unexpected type: @@ -12324,7 +12324,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This 1st argument to `g` has an unexpected type: @@ -12362,7 +12362,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This 1st argument to `g` has an unexpected type: @@ -12395,7 +12395,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r#" - ── UNFINISHED LIST PATTERN ────────── tmp/list_pattern_not_terminated/Test.roc ─ + ── UNFINISHED LIST PATTERN in tmp/list_pattern_not_terminated/Test.roc ───────── I am partway through parsing a list pattern, but I got stuck here: @@ -12416,7 +12416,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r#" - ── INCORRECT REST PATTERN ─────── tmp/list_pattern_weird_rest_pattern/Test.roc ─ + ── INCORRECT REST PATTERN in tmp/list_pattern_weird_rest_pattern/Test.roc ────── It looks like you may trying to write a list rest pattern, but it's not the form I expect: @@ -12438,7 +12438,7 @@ In roc, functions are always written as a lambda, like{} " ), @r" - ── UNNECESSARY WILDCARD ────────────────────────────────── /code/proj/Main.roc ─ + ── UNNECESSARY WILDCARD in /code/proj/Main.roc ───────────────────────────────── This type annotation has a wildcard type variable (`*`) that isn't needed. @@ -12465,7 +12465,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r#" - ── MULTIPLE LIST REST PATTERNS ─────────────────────────── /code/proj/Main.roc ─ + ── MULTIPLE LIST REST PATTERNS in /code/proj/Main.roc ────────────────────────── This list pattern match has multiple rest patterns: @@ -12475,7 +12475,7 @@ In roc, functions are always written as a lambda, like{} I only support compiling list patterns with one .. pattern! Can you remove this additional one? - ── UNSAFE PATTERN ──────────────────────────────────────── /code/proj/Main.roc ─ + ── UNSAFE PATTERN in /code/proj/Main.roc ─────────────────────────────────────── This `when` does not cover all the possibilities: @@ -12499,7 +12499,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r#" - ── MULTIPLE LIST REST PATTERNS ─────────────────────────── /code/proj/Main.roc ─ + ── MULTIPLE LIST REST PATTERNS in /code/proj/Main.roc ────────────────────────── This list pattern match has multiple rest patterns: @@ -12509,7 +12509,7 @@ In roc, functions are always written as a lambda, like{} I only support compiling list patterns with one .. pattern! Can you remove this additional one? - ── UNSAFE PATTERN ──────────────────────────────────────── /code/proj/Main.roc ─ + ── UNSAFE PATTERN in /code/proj/Main.roc ─────────────────────────────────────── This `when` does not cover all the possibilities: @@ -12533,7 +12533,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r#" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This list element doesn't match the types of other elements in the pattern: @@ -12560,7 +12560,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r#" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── The branches of this `when` expression don't match the condition: @@ -12593,7 +12593,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r#" - ── UNSAFE PATTERN ──────────────────────────────────────── /code/proj/Main.roc ─ + ── UNSAFE PATTERN in /code/proj/Main.roc ─────────────────────────────────────── This `when` does not cover all the possibilities: @@ -12633,7 +12633,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r#" - ── UNSAFE PATTERN ──────────────────────────────────────── /code/proj/Main.roc ─ + ── UNSAFE PATTERN in /code/proj/Main.roc ─────────────────────────────────────── This `when` does not cover all the possibilities: @@ -12677,7 +12677,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r#" - ── REDUNDANT PATTERN ───────────────────────────────────── /code/proj/Main.roc ─ + ── REDUNDANT PATTERN in /code/proj/Main.roc ──────────────────────────────────── The 2nd pattern is redundant: @@ -12743,7 +12743,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r#" - ── UNSAFE PATTERN ──────────────────────────────────────── /code/proj/Main.roc ─ + ── UNSAFE PATTERN in /code/proj/Main.roc ─────────────────────────────────────── This `when` does not cover all the possibilities: @@ -12770,7 +12770,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r#" - ── UNSAFE PATTERN ──────────────────────────────────────── /code/proj/Main.roc ─ + ── UNSAFE PATTERN in /code/proj/Main.roc ─────────────────────────────────────── This `when` does not cover all the possibilities: @@ -12813,7 +12813,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r#" - ── UNSAFE PATTERN ──────────────────────────────────────── /code/proj/Main.roc ─ + ── UNSAFE PATTERN in /code/proj/Main.roc ─────────────────────────────────────── This `when` does not cover all the possibilities: @@ -12840,7 +12840,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r#" - ── UNSAFE PATTERN ──────────────────────────────────────── /code/proj/Main.roc ─ + ── UNSAFE PATTERN in /code/proj/Main.roc ─────────────────────────────────────── This `when` does not cover all the possibilities: @@ -12889,7 +12889,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r#" - ── UNSAFE PATTERN ──────────────────────────────────────── /code/proj/Main.roc ─ + ── UNSAFE PATTERN in /code/proj/Main.roc ─────────────────────────────────────── This `when` does not cover all the possibilities: @@ -12920,7 +12920,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r#" - ── UNSAFE PATTERN ──────────────────────────────────────── /code/proj/Main.roc ─ + ── UNSAFE PATTERN in /code/proj/Main.roc ─────────────────────────────────────── This `when` does not cover all the possibilities: @@ -12952,7 +12952,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r#" - ── UNSAFE PATTERN ──────────────────────────────────────── /code/proj/Main.roc ─ + ── UNSAFE PATTERN in /code/proj/Main.roc ─────────────────────────────────────── This `when` does not cover all the possibilities: @@ -13001,7 +13001,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r#" - ── UNSAFE PATTERN ──────────────────────────────────────── /code/proj/Main.roc ─ + ── UNSAFE PATTERN in /code/proj/Main.roc ─────────────────────────────────────── This `when` does not cover all the possibilities: @@ -13035,7 +13035,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r#" - ── REDUNDANT PATTERN ───────────────────────────────────── /code/proj/Main.roc ─ + ── REDUNDANT PATTERN in /code/proj/Main.roc ──────────────────────────────────── The 3rd pattern is redundant: @@ -13063,7 +13063,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r#" - ── REDUNDANT PATTERN ───────────────────────────────────── /code/proj/Main.roc ─ + ── REDUNDANT PATTERN in /code/proj/Main.roc ──────────────────────────────────── The 3rd pattern is redundant: @@ -13091,7 +13091,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r#" - ── REDUNDANT PATTERN ───────────────────────────────────── /code/proj/Main.roc ─ + ── REDUNDANT PATTERN in /code/proj/Main.roc ──────────────────────────────────── The 3rd pattern is redundant: @@ -13119,7 +13119,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r#" - ── REDUNDANT PATTERN ───────────────────────────────────── /code/proj/Main.roc ─ + ── REDUNDANT PATTERN in /code/proj/Main.roc ──────────────────────────────────── The 2nd pattern is redundant: @@ -13158,7 +13158,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This expression has a type that does not implement the abilities it's expected to: @@ -13189,7 +13189,7 @@ In roc, functions are always written as a lambda, like{} " ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This value passed to `crash` is not a string: @@ -13214,7 +13214,7 @@ In roc, functions are always written as a lambda, like{} " ), @r" - ── UNAPPLIED CRASH ─────────────────────────────────────── /code/proj/Main.roc ─ + ── UNAPPLIED CRASH in /code/proj/Main.roc ────────────────────────────────────── This `crash` doesn't have a message given to it: @@ -13235,7 +13235,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r#" - ── OVERAPPLIED CRASH ───────────────────────────────────── /code/proj/Main.roc ─ + ── OVERAPPLIED CRASH in /code/proj/Main.roc ──────────────────────────────────── This `crash` has too many values given to it: @@ -13271,7 +13271,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This expression has a type that does not implement the abilities it's expected to: @@ -13313,7 +13313,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r#" - ── DEFINITION ONLY USED IN RECURSION ───────────────────── /code/proj/Main.roc ─ + ── DEFINITION ONLY USED IN RECURSION in /code/proj/Main.roc ──────────────────── This definition is only used in recursion with itself: @@ -13346,7 +13346,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r#" - ── DEFINITIONs ONLY USED IN RECURSION ──────────────────── /code/proj/Main.roc ─ + ── DEFINITIONs ONLY USED IN RECURSION in /code/proj/Main.roc ─────────────────── These 2 definitions are only used in mutual recursion with themselves: @@ -13382,7 +13382,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r#" - ── DEFINITION ONLY USED IN RECURSION ───────────────────── /code/proj/Main.roc ─ + ── DEFINITION ONLY USED IN RECURSION in /code/proj/Main.roc ──────────────────── This definition is only used in recursion with itself: @@ -13418,7 +13418,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r#" - ── DEFINITIONs ONLY USED IN RECURSION ──────────────────── /code/proj/Main.roc ─ + ── DEFINITIONs ONLY USED IN RECURSION in /code/proj/Main.roc ─────────────────── These 2 definitions are only used in mutual recursion with themselves: @@ -13457,7 +13457,7 @@ In roc, functions are always written as a lambda, like{} {one, str} "#), @r#" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This 2nd argument to `concat` has an unexpected type: @@ -13488,7 +13488,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the `else` branch of this `if` expression: @@ -13525,7 +13525,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the `else` branch of this `if` expression: @@ -13561,7 +13561,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the body of the `main` definition: @@ -13599,7 +13599,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the body of the `main` definition: @@ -13650,7 +13650,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This expression has a type that does not implement the abilities it's expected to: @@ -13679,7 +13679,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This expression has a type that does not implement the abilities it's expected to: @@ -13729,7 +13729,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This expression has a type that does not implement the abilities it's expected to: @@ -13769,7 +13769,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This expression has a type that does not implement the abilities it's expected to: @@ -13809,7 +13809,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r#" - ── UNSAFE PATTERN ──────────────────────────────────────── /code/proj/Main.roc ─ + ── UNSAFE PATTERN in /code/proj/Main.roc ─────────────────────────────────────── This `when` does not cover all the possibilities: @@ -13857,7 +13857,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r#" - ── TOO MANY ARGS ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TOO MANY ARGS in /code/proj/Main.roc ──────────────────────────────────────── The `parser` value is an opaque type, so it cannot be called with an argument: @@ -13881,7 +13881,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the body of the `f` definition: @@ -13912,7 +13912,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the body of the `f` definition: @@ -13946,7 +13946,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the body of the `f` definition: @@ -13980,7 +13980,7 @@ In roc, functions are always written as a lambda, like{} "# ), @r" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the body of the `f` definition: @@ -14008,7 +14008,7 @@ In roc, functions are always written as a lambda, like{} " ), @r" - ── TOO FEW ARGS ────────────────────────────────────────── /code/proj/Main.roc ─ + ── TOO FEW ARGS in /code/proj/Main.roc ───────────────────────────────────────── The `sub` function expects 2 arguments, but it got only 1: @@ -14028,7 +14028,7 @@ In roc, functions are always written as a lambda, like{} " ), @r" - ── TOO FEW ARGS ────────────────────────────────────────── /code/proj/Main.roc ─ + ── TOO FEW ARGS in /code/proj/Main.roc ───────────────────────────────────────── The `sub` function expects 2 arguments, but it got only 1: diff --git a/crates/compiler/load_internal/tests/test_load.rs b/crates/compiler/load_internal/tests/test_load.rs index 17cb88e393..f0616356c3 100644 --- a/crates/compiler/load_internal/tests/test_load.rs +++ b/crates/compiler/load_internal/tests/test_load.rs @@ -641,7 +641,7 @@ fn parse_problem() { report, indoc!( " - ── UNFINISHED LIST ──────────────────────────────────── tmp/parse_problem/Main ─ + ── UNFINISHED LIST in tmp/parse_problem/Main ─────────────────────────────────── I am partway through started parsing a list, but I got stuck here: @@ -847,7 +847,7 @@ fn opaque_wrapped_unwrapped_outside_defining_module() { err, indoc!( r" - ── OPAQUE TYPE DECLARED OUTSIDE SCOPE ─ ...rapped_outside_defining_module/Main ─ + ── OPAQUE TYPE DECLARED OUTSIDE SCOPE in ...apped_outside_defining_module/Main ─ The unwrapped opaque type Age referenced here: @@ -861,7 +861,7 @@ fn opaque_wrapped_unwrapped_outside_defining_module() { Note: Opaque types can only be wrapped and unwrapped in the module they are defined in! - ── OPAQUE TYPE DECLARED OUTSIDE SCOPE ─ ...rapped_outside_defining_module/Main ─ + ── OPAQUE TYPE DECLARED OUTSIDE SCOPE in ...apped_outside_defining_module/Main ─ The unwrapped opaque type Age referenced here: @@ -875,7 +875,7 @@ fn opaque_wrapped_unwrapped_outside_defining_module() { Note: Opaque types can only be wrapped and unwrapped in the module they are defined in! - ── UNUSED IMPORT ─── tmp/opaque_wrapped_unwrapped_outside_defining_module/Main ─ + ── UNUSED IMPORT in tmp/opaque_wrapped_unwrapped_outside_defining_module/Main ── Nothing from Age is used in this module. @@ -930,7 +930,7 @@ fn issue_2863_module_type_does_not_exist() { report, indoc!( " - ── UNRECOGNIZED NAME ────────── tmp/issue_2863_module_type_does_not_exist/Main ─ + ── UNRECOGNIZED NAME in tmp/issue_2863_module_type_does_not_exist/Main ───────── Nothing is named `DoesNotExist` in this scope. @@ -1006,7 +1006,7 @@ fn module_doesnt_match_file_path() { err, indoc!( r" - ── WEIRD MODULE NAME ─────────────────── tmp/module_doesnt_match_file_path/Age ─ + ── WEIRD MODULE NAME in tmp/module_doesnt_match_file_path/Age ────────────────── This module name does not correspond with the file path it is defined in: @@ -1039,7 +1039,7 @@ fn module_cyclic_import_itself() { err, indoc!( r" - ── IMPORT CYCLE ────────────────────────── tmp/module_cyclic_import_itself/Age ─ + ── IMPORT CYCLE in tmp/module_cyclic_import_itself/Age ───────────────────────── I can't compile Age because it depends on itself through the following chain of module imports: @@ -1085,7 +1085,7 @@ fn module_cyclic_import_transitive() { err, indoc!( r" - ── IMPORT CYCLE ────────────────── tmp/module_cyclic_import_transitive/Age.roc ─ + ── IMPORT CYCLE in tmp/module_cyclic_import_transitive/Age.roc ───────────────── I can't compile Age because it depends on itself through the following chain of module imports: @@ -1133,7 +1133,7 @@ fn nested_module_has_incorrect_name() { err, indoc!( r" - ── INCORRECT MODULE NAME ──── tmp/nested_module_has_incorrect_name/Dep/Foo.roc ─ + ── INCORRECT MODULE NAME in tmp/nested_module_has_incorrect_name/Dep/Foo.roc ─── This module has a different name than I expected: From 351c9215fe67288d065385bb81aff7049f83e051 Mon Sep 17 00:00:00 2001 From: Folkert Date: Fri, 19 Jan 2024 15:16:32 +0100 Subject: [PATCH 6/9] dev backend: f32 abs --- .../compiler/gen_dev/src/generic64/aarch64.rs | 10 ++++ crates/compiler/gen_dev/src/generic64/mod.rs | 11 +++++ .../compiler/gen_dev/src/generic64/x86_64.rs | 47 +++++++++++++++++++ crates/compiler/test_gen/src/gen_num.rs | 17 +++++-- 4 files changed, 80 insertions(+), 5 deletions(-) diff --git a/crates/compiler/gen_dev/src/generic64/aarch64.rs b/crates/compiler/gen_dev/src/generic64/aarch64.rs index b61d823512..2d9446f2b8 100644 --- a/crates/compiler/gen_dev/src/generic64/aarch64.rs +++ b/crates/compiler/gen_dev/src/generic64/aarch64.rs @@ -1242,6 +1242,16 @@ impl Assembler for AArch64Assembler { fabs_freg_freg(buf, FloatWidth::F64, dst, src); } + #[inline(always)] + fn abs_freg32_freg32( + buf: &mut Vec<'_, u8>, + _relocs: &mut Vec<'_, Relocation>, + dst: AArch64FloatReg, + src: AArch64FloatReg, + ) { + fabs_freg_freg(buf, FloatWidth::F32, dst, src); + } + #[inline(always)] fn add_reg64_reg64_imm32( buf: &mut Vec<'_, u8>, diff --git a/crates/compiler/gen_dev/src/generic64/mod.rs b/crates/compiler/gen_dev/src/generic64/mod.rs index 88e427dd1b..41444af9b0 100644 --- a/crates/compiler/gen_dev/src/generic64/mod.rs +++ b/crates/compiler/gen_dev/src/generic64/mod.rs @@ -164,6 +164,12 @@ pub trait Assembler: Sized + Copy { dst: FloatReg, src: FloatReg, ); + fn abs_freg32_freg32( + buf: &mut Vec<'_, u8>, + relocs: &mut Vec<'_, Relocation>, + dst: FloatReg, + src: FloatReg, + ); fn add_reg64_reg64_imm32(buf: &mut Vec<'_, u8>, dst: GeneralReg, src1: GeneralReg, imm32: i32); fn add_reg64_reg64_reg64( @@ -1316,6 +1322,11 @@ impl< let src_reg = self.storage_manager.load_to_float_reg(&mut self.buf, src); ASM::abs_freg64_freg64(&mut self.buf, &mut self.relocs, dst_reg, src_reg); } + LayoutRepr::Builtin(Builtin::Float(FloatWidth::F32)) => { + let dst_reg = self.storage_manager.claim_float_reg(&mut self.buf, dst); + let src_reg = self.storage_manager.load_to_float_reg(&mut self.buf, src); + ASM::abs_freg32_freg32(&mut self.buf, &mut self.relocs, dst_reg, src_reg); + } x => todo!("NumAbs: layout, {:?}", x), } } diff --git a/crates/compiler/gen_dev/src/generic64/x86_64.rs b/crates/compiler/gen_dev/src/generic64/x86_64.rs index 22831bec1f..c19c31d7bd 100644 --- a/crates/compiler/gen_dev/src/generic64/x86_64.rs +++ b/crates/compiler/gen_dev/src/generic64/x86_64.rs @@ -1955,6 +1955,24 @@ impl Assembler for X86_64Assembler { andpd_freg64_freg64(buf, dst, src); } + #[inline(always)] + fn abs_freg32_freg32( + buf: &mut Vec<'_, u8>, + relocs: &mut Vec<'_, Relocation>, + dst: X86_64FloatReg, + src: X86_64FloatReg, + ) { + movss_freg32_rip_offset32(buf, dst, 0); + + // TODO: make sure this constant only loads once instead of every call to abs + relocs.push(Relocation::LocalData { + offset: buf.len() as u64 - 4, + data: 0x7fffffffu64.to_le_bytes().to_vec(), + }); + + andps_freg32_freg32(buf, dst, src); + } + #[inline(always)] fn add_reg64_reg64_imm32( buf: &mut Vec<'_, u8>, @@ -3179,6 +3197,25 @@ fn andpd_freg64_freg64(buf: &mut Vec<'_, u8>, dst: X86_64FloatReg, src: X86_64Fl } } +#[inline(always)] +fn andps_freg32_freg32(buf: &mut Vec<'_, u8>, dst: X86_64FloatReg, src: X86_64FloatReg) { + let dst_high = dst as u8 > 7; + let dst_mod = dst as u8 % 8; + let src_high = src as u8 > 7; + let src_mod = src as u8 % 8; + + if dst_high || src_high { + buf.extend([ + 0x40 | ((dst_high as u8) << 2) | (src_high as u8), + 0x0F, + 0x54, + 0xC0 | (dst_mod << 3) | (src_mod), + ]) + } else { + buf.extend([0x0F, 0x54, 0xC0 | (dst_mod << 3) | (src_mod)]) + } +} + /// r/m64 AND imm8 (sign-extended). #[inline(always)] fn and_reg64_imm8(buf: &mut Vec<'_, u8>, dst: X86_64GeneralReg, imm: i8) { @@ -4483,6 +4520,16 @@ mod tests { ); } + #[test] + fn test_andps_freg32_freg32() { + disassembler_test!( + andps_freg32_freg32, + |reg1, reg2| format!("andps {reg1}, {reg2}"), + ALL_FLOAT_REGS, + ALL_FLOAT_REGS + ); + } + #[test] fn test_and_reg64_reg64() { disassembler_test!( diff --git a/crates/compiler/test_gen/src/gen_num.rs b/crates/compiler/test_gen/src/gen_num.rs index 64279cd271..fee8bff3d9 100644 --- a/crates/compiler/test_gen/src/gen_num.rs +++ b/crates/compiler/test_gen/src/gen_num.rs @@ -531,11 +531,18 @@ fn f64_abs() { assert_evals_to!("Num.abs -4.7f64", 4.7, f64); assert_evals_to!("Num.abs 5.8f64", 5.8, f64); - #[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] - { - assert_evals_to!("Num.abs Num.maxF64", f64::MAX, f64); - assert_evals_to!("Num.abs Num.minF64", f64::MAX, f64); - } + assert_evals_to!("Num.abs Num.maxF64", f64::MAX, f64); + assert_evals_to!("Num.abs Num.minF64", f64::MAX, f64); +} + +#[test] +#[cfg(any(feature = "gen-llvm", feature = "gen-dev", feature = "gen-wasm"))] +fn f32_abs() { + assert_evals_to!("Num.abs -4.7f32", 4.7, f32); + assert_evals_to!("Num.abs 5.8f32", 5.8, f32); + + assert_evals_to!("Num.abs Num.maxF32", f32::MAX, f32); + assert_evals_to!("Num.abs Num.minF32", f32::MAX, f32); } #[test] From b6a5e5367c53751fdb134d33308809a24337bdca Mon Sep 17 00:00:00 2001 From: Brendan Hansknecht Date: Sat, 20 Jan 2024 09:44:46 -0800 Subject: [PATCH 7/9] build structs directly in the alloca --- crates/compiler/gen_llvm/src/llvm/struct_.rs | 71 ++++++++++++++------ 1 file changed, 50 insertions(+), 21 deletions(-) diff --git a/crates/compiler/gen_llvm/src/llvm/struct_.rs b/crates/compiler/gen_llvm/src/llvm/struct_.rs index 0b46ad6df6..caae11494f 100644 --- a/crates/compiler/gen_llvm/src/llvm/struct_.rs +++ b/crates/compiler/gen_llvm/src/llvm/struct_.rs @@ -11,7 +11,7 @@ use roc_mono::layout::{InLayout, LayoutInterner, LayoutRepr, STLayoutInterner}; use crate::llvm::build::{load_roc_value, use_roc_value}; use super::{ - build::{BuilderExt, Env}, + build::{store_roc_value, BuilderExt, Env}, convert::basic_type_from_layout, scope::Scope, }; @@ -50,19 +50,16 @@ impl<'ctx> RocStruct<'ctx> { scope: &Scope<'a, 'ctx>, sorted_fields: &[Symbol], ) -> Self { - let BuildStruct { - struct_type, - struct_val, - } = build_struct_helper(env, layout_interner, scope, sorted_fields); - let passed_by_ref = layout_repr.is_passed_by_reference(layout_interner); if passed_by_ref { - let alloca = env.builder.new_build_alloca(struct_type, "struct_alloca"); - env.builder.new_build_store(alloca, struct_val); - RocStruct::ByReference(alloca) + let struct_alloca = + build_struct_alloca_helper(env, layout_interner, scope, sorted_fields); + RocStruct::ByReference(struct_alloca) } else { - RocStruct::ByValue(struct_val) + let struct_value = + build_struct_value_helper(env, layout_interner, scope, sorted_fields); + RocStruct::ByValue(struct_value) } } @@ -178,17 +175,12 @@ fn get_field_from_value<'ctx>( .unwrap() } -struct BuildStruct<'ctx> { - struct_type: StructType<'ctx>, - struct_val: StructValue<'ctx>, -} - -fn build_struct_helper<'a, 'ctx>( +fn build_struct_value_helper<'a, 'ctx>( env: &Env<'a, 'ctx, '_>, layout_interner: &STLayoutInterner<'a>, scope: &Scope<'a, 'ctx>, sorted_fields: &[Symbol], -) -> BuildStruct<'ctx> { +) -> StructValue<'ctx> { let ctx = env.context; // Determine types @@ -227,12 +219,49 @@ fn build_struct_helper<'a, 'ctx>( // Create the struct_type let struct_type = ctx.struct_type(field_types.into_bump_slice(), false); - let struct_val = struct_from_fields(env, struct_type, field_vals.into_iter().enumerate()); + struct_from_fields(env, struct_type, field_vals.into_iter().enumerate()) +} - BuildStruct { - struct_type, - struct_val, +fn build_struct_alloca_helper<'a, 'ctx>( + env: &Env<'a, 'ctx, '_>, + layout_interner: &STLayoutInterner<'a>, + scope: &Scope<'a, 'ctx>, + sorted_fields: &[Symbol], +) -> PointerValue<'ctx> { + let ctx = env.context; + + // Determine types + let num_fields = sorted_fields.len(); + let mut field_types = AVec::with_capacity_in(num_fields, env.arena); + let mut field_expr_repr = AVec::with_capacity_in(num_fields, env.arena); + + for symbol in sorted_fields.iter() { + // Zero-sized fields have no runtime representation. + // The layout of the struct expects them to be dropped! + let (field_expr, field_layout) = scope.load_symbol_and_layout(symbol); + if !layout_interner + .get_repr(field_layout) + .is_dropped_because_empty() + { + let field_repr = layout_interner.get_repr(field_layout); + let field_type = basic_type_from_layout(env, layout_interner, field_repr); + field_types.push(field_type); + + field_expr_repr.push((field_expr, field_repr)); + } } + + // Create the struct_type + let struct_type = ctx.struct_type(field_types.into_bump_slice(), false); + let alloca = env.builder.new_build_alloca(struct_type, "struct_alloca"); + + for (i, (field_expr, field_repr)) in field_expr_repr.into_iter().enumerate() { + let dst = + env.builder + .new_build_struct_gep(struct_type, alloca, i as u32, "struct_field_gep"); + store_roc_value(env, layout_interner, field_repr, dst, field_expr); + } + alloca } pub fn struct_from_fields<'a, 'ctx, 'env, I>( From f1ffc36efe6dcb075b46885fc7229f768cff8cd0 Mon Sep 17 00:00:00 2001 From: Folkert Date: Sat, 20 Jan 2024 20:27:59 +0100 Subject: [PATCH 8/9] add List.clone --- crates/compiler/alias_analysis/src/lib.rs | 10 ++++ crates/compiler/builtins/bitcode/src/list.zig | 8 +++ crates/compiler/builtins/bitcode/src/main.zig | 1 + crates/compiler/builtins/roc/List.roc | 6 ++- crates/compiler/builtins/src/bitcode.rs | 1 + crates/compiler/can/src/builtins.rs | 1 + crates/compiler/gen_dev/src/generic64/mod.rs | 49 +++++++++++++++++++ crates/compiler/gen_dev/src/lib.rs | 17 +++++++ crates/compiler/gen_llvm/src/llvm/lowlevel.rs | 29 ++++++++++- crates/compiler/gen_wasm/src/low_level.rs | 22 +++++++++ crates/compiler/module/src/low_level.rs | 4 +- crates/compiler/module/src/symbol.rs | 1 + .../compiler/mono/src/drop_specialization.rs | 1 + crates/compiler/mono/src/inc_dec.rs | 1 + 14 files changed, 147 insertions(+), 4 deletions(-) diff --git a/crates/compiler/alias_analysis/src/lib.rs b/crates/compiler/alias_analysis/src/lib.rs index 452a90567a..0880d41c34 100644 --- a/crates/compiler/alias_analysis/src/lib.rs +++ b/crates/compiler/alias_analysis/src/lib.rs @@ -1173,6 +1173,16 @@ fn lowlevel_spec<'a>( _ => unreachable!(), } } + ListClone => { + let list = env.symbols[&arguments[0]]; + + let bag = builder.add_get_tuple_field(block, list, LIST_BAG_INDEX)?; + let cell = builder.add_get_tuple_field(block, list, LIST_CELL_INDEX)?; + + let _unit = builder.add_update(block, update_mode_var, cell)?; + + with_new_heap_cell(builder, block, bag) + } ListSwap => { let list = env.symbols[&arguments[0]]; diff --git a/crates/compiler/builtins/bitcode/src/list.zig b/crates/compiler/builtins/bitcode/src/list.zig index aea5b21113..b508a0eae5 100644 --- a/crates/compiler/builtins/bitcode/src/list.zig +++ b/crates/compiler/builtins/bitcode/src/list.zig @@ -962,6 +962,14 @@ pub fn listIsUnique( return list.isEmpty() or list.isUnique(); } +pub fn listClone( + list: RocList, + alignment: u32, + element_width: usize, +) callconv(.C) RocList { + return list.makeUnique(alignment, element_width); +} + pub fn listCapacity( list: RocList, ) callconv(.C) usize { diff --git a/crates/compiler/builtins/bitcode/src/main.zig b/crates/compiler/builtins/bitcode/src/main.zig index 6f8517e921..91cf94dee0 100644 --- a/crates/compiler/builtins/bitcode/src/main.zig +++ b/crates/compiler/builtins/bitcode/src/main.zig @@ -75,6 +75,7 @@ comptime { exportListFn(list.listReplaceInPlace, "replace_in_place"); exportListFn(list.listSwap, "swap"); exportListFn(list.listIsUnique, "is_unique"); + exportListFn(list.listClone, "clone"); exportListFn(list.listCapacity, "capacity"); exportListFn(list.listAllocationPtr, "allocation_ptr"); exportListFn(list.listReleaseExcessCapacity, "release_excess_capacity"); diff --git a/crates/compiler/builtins/roc/List.roc b/crates/compiler/builtins/roc/List.roc index 0565e0128b..c19b950706 100644 --- a/crates/compiler/builtins/roc/List.roc +++ b/crates/compiler/builtins/roc/List.roc @@ -435,7 +435,8 @@ repeatHelp = \value, count, accum -> ## ``` reverse : List a -> List a reverse = \list -> - reverseHelp list 0 (Num.subSaturated (List.len list) 1) + end = List.len list |> Num.subSaturated 1 + reverseHelp (List.clone list) 0 end reverseHelp = \list, left, right -> if left < right then @@ -443,6 +444,9 @@ reverseHelp = \list, left, right -> else list +# Ensures that the list in unique (will re-use if already unique) +clone : List a -> List a + ## Join the given lists together into one list. ## ``` ## expect List.join [[1], [2, 3], [], [4, 5]] == [1, 2, 3, 4, 5] diff --git a/crates/compiler/builtins/src/bitcode.rs b/crates/compiler/builtins/src/bitcode.rs index 90ec6f721f..e979e905ea 100644 --- a/crates/compiler/builtins/src/bitcode.rs +++ b/crates/compiler/builtins/src/bitcode.rs @@ -386,6 +386,7 @@ pub const LIST_CONCAT: &str = "roc_builtins.list.concat"; pub const LIST_REPLACE: &str = "roc_builtins.list.replace"; pub const LIST_REPLACE_IN_PLACE: &str = "roc_builtins.list.replace_in_place"; pub const LIST_IS_UNIQUE: &str = "roc_builtins.list.is_unique"; +pub const LIST_CLONE: &str = "roc_builtins.list.clone"; pub const LIST_PREPEND: &str = "roc_builtins.list.prepend"; pub const LIST_APPEND_UNSAFE: &str = "roc_builtins.list.append_unsafe"; pub const LIST_RESERVE: &str = "roc_builtins.list.reserve"; diff --git a/crates/compiler/can/src/builtins.rs b/crates/compiler/can/src/builtins.rs index 168faff98d..e397b29f1b 100644 --- a/crates/compiler/can/src/builtins.rs +++ b/crates/compiler/can/src/builtins.rs @@ -142,6 +142,7 @@ map_symbol_to_lowlevel_and_arity! { ListWithCapacity; LIST_WITH_CAPACITY; 1, ListReserve; LIST_RESERVE; 2, ListIsUnique; LIST_IS_UNIQUE; 1, + ListClone; LIST_CLONE; 1, ListAppendUnsafe; LIST_APPEND_UNSAFE; 2, ListPrepend; LIST_PREPEND; 2, ListGetUnsafe; LIST_GET_UNSAFE; 2, diff --git a/crates/compiler/gen_dev/src/generic64/mod.rs b/crates/compiler/gen_dev/src/generic64/mod.rs index 41444af9b0..4f33640b4b 100644 --- a/crates/compiler/gen_dev/src/generic64/mod.rs +++ b/crates/compiler/gen_dev/src/generic64/mod.rs @@ -2809,6 +2809,55 @@ impl< self.storage_manager.list_len(&mut self.buf, dst, list); } + fn build_list_clone( + &mut self, + dst: Symbol, + input_list: Symbol, + elem_layout: InLayout<'a>, + ret_layout: InLayout<'a>, + ) { + // List alignment argument (u32). + self.load_layout_alignment(ret_layout, Symbol::DEV_TMP); + + // Load element_width argument (usize). + self.load_layout_stack_size(elem_layout, Symbol::DEV_TMP2); + + // Setup the return location. + let base_offset = + self.storage_manager + .claim_stack_area_layout(self.layout_interner, dst, ret_layout); + + let lowlevel_args = [ + input_list, + // alignment + Symbol::DEV_TMP, + // element_width + Symbol::DEV_TMP2, + ]; + let lowlevel_arg_layouts = [ret_layout, Layout::U32, Layout::U64]; + + self.build_fn_call( + &Symbol::DEV_TMP3, + bitcode::LIST_CLONE.to_string(), + &lowlevel_args, + &lowlevel_arg_layouts, + &ret_layout, + ); + self.free_symbol(&Symbol::DEV_TMP); + self.free_symbol(&Symbol::DEV_TMP2); + + // Copy from list to the output record. + self.storage_manager.copy_symbol_to_stack_offset( + self.layout_interner, + &mut self.buf, + base_offset, + &Symbol::DEV_TMP3, + &ret_layout, + ); + + self.free_symbol(&Symbol::DEV_TMP3); + } + fn build_list_with_capacity( &mut self, dst: &Symbol, diff --git a/crates/compiler/gen_dev/src/lib.rs b/crates/compiler/gen_dev/src/lib.rs index 5dbe8deba0..c45e540ad1 100644 --- a/crates/compiler/gen_dev/src/lib.rs +++ b/crates/compiler/gen_dev/src/lib.rs @@ -1518,6 +1518,15 @@ trait Backend<'a> { let elem_layout = list_element_layout!(self.interner(), *ret_layout); self.build_list_with_capacity(sym, args[0], arg_layouts[0], elem_layout, ret_layout) } + LowLevel::ListClone => { + debug_assert_eq!( + 1, + args.len(), + "ListClone: expected to have exactly one argument" + ); + let elem_layout = list_element_layout!(self.interner(), *ret_layout); + self.build_list_clone(*sym, args[0], elem_layout, *ret_layout) + } LowLevel::ListReserve => { debug_assert_eq!( 2, @@ -2416,6 +2425,14 @@ trait Backend<'a> { fn build_indirect_inc(&mut self, layout: InLayout<'a>) -> Symbol; fn build_indirect_dec(&mut self, layout: InLayout<'a>) -> Symbol; + fn build_list_clone( + &mut self, + dst: Symbol, + input_list: Symbol, + elem_layout: InLayout<'a>, + ret_layout: InLayout<'a>, + ); + /// build_list_with_capacity creates and returns a list with the given capacity. fn build_list_with_capacity( &mut self, diff --git a/crates/compiler/gen_llvm/src/llvm/lowlevel.rs b/crates/compiler/gen_llvm/src/llvm/lowlevel.rs index 887419755b..a1723d9ed3 100644 --- a/crates/compiler/gen_llvm/src/llvm/lowlevel.rs +++ b/crates/compiler/gen_llvm/src/llvm/lowlevel.rs @@ -34,8 +34,8 @@ use crate::llvm::{ BuilderExt, FuncBorrowSpec, RocReturn, }, build_list::{ - list_append_unsafe, list_concat, list_drop_at, list_get_unsafe, list_len, list_map, - list_map2, list_map3, list_map4, list_prepend, list_release_excess_capacity, + layout_width, list_append_unsafe, list_concat, list_drop_at, list_get_unsafe, list_len, + list_map, list_map2, list_map3, list_map4, list_prepend, list_release_excess_capacity, list_replace_unsafe, list_reserve, list_sort_with, list_sublist, list_swap, list_symbol_to_c_abi, list_with_capacity, pass_update_mode, }, @@ -962,6 +962,31 @@ pub(crate) fn run_low_level<'a, 'ctx>( bitcode::LIST_IS_UNIQUE, ) } + ListClone => { + // List.clone : List a -> List a + arguments_with_layouts!((list, list_layout)); + let element_layout = list_element_layout!(layout_interner, list_layout); + + match update_mode { + UpdateMode::Immutable => { + // + call_list_bitcode_fn( + env, + &[list.into_struct_value()], + &[ + env.alignment_intvalue(layout_interner, element_layout), + layout_width(env, layout_interner, element_layout), + ], + BitcodeReturns::List, + bitcode::LIST_CLONE, + ) + } + UpdateMode::InPlace => { + // we statically know the list is unique + list + } + } + } NumToStr => { // Num.toStr : Num a -> Str arguments_with_layouts!((num, num_layout)); diff --git a/crates/compiler/gen_wasm/src/low_level.rs b/crates/compiler/gen_wasm/src/low_level.rs index dfbb8420af..7ebc9b050d 100644 --- a/crates/compiler/gen_wasm/src/low_level.rs +++ b/crates/compiler/gen_wasm/src/low_level.rs @@ -299,6 +299,28 @@ impl<'a> LowLevelCall<'a> { ListIsUnique => self.load_args_and_call_zig(backend, bitcode::LIST_IS_UNIQUE), + ListClone => { + let input_list: Symbol = self.arguments[0]; + let elem_layout = unwrap_list_elem_layout(self.ret_layout_raw); + let elem_layout = backend.layout_interner.get_repr(elem_layout); + let (elem_width, elem_align) = + elem_layout.stack_size_and_alignment(backend.layout_interner); + + // Zig arguments Wasm types + // (return pointer) i32 + // input_list: &RocList i32 + // alignment: u32 i32 + // element_width: usize i32 + + backend + .storage + .load_symbols(&mut backend.code_builder, &[self.ret_symbol, input_list]); + backend.code_builder.i32_const(elem_align as i32); + backend.code_builder.i32_const(elem_width as i32); + + backend.call_host_fn_after_loading_args(bitcode::LIST_CLONE); + } + ListMap | ListMap2 | ListMap3 | ListMap4 | ListSortWith => { internal_error!("HigherOrder lowlevels should not be handled here") } diff --git a/crates/compiler/module/src/low_level.rs b/crates/compiler/module/src/low_level.rs index c43307548a..0ed5c9c1a8 100644 --- a/crates/compiler/module/src/low_level.rs +++ b/crates/compiler/module/src/low_level.rs @@ -50,8 +50,9 @@ pub enum LowLevel { ListSublist, ListDropAt, ListSwap, - ListIsUnique, ListGetCapacity, + ListIsUnique, + ListClone, NumAdd, NumAddWrap, NumAddChecked, @@ -291,6 +292,7 @@ map_symbol_to_lowlevel! { ListReserve <= LIST_RESERVE; ListReleaseExcessCapacity <= LIST_RELEASE_EXCESS_CAPACITY; ListIsUnique <= LIST_IS_UNIQUE; + ListClone <= LIST_CLONE; ListAppendUnsafe <= LIST_APPEND_UNSAFE; ListPrepend <= LIST_PREPEND; ListGetUnsafe <= LIST_GET_UNSAFE, DICT_LIST_GET_UNSAFE; diff --git a/crates/compiler/module/src/symbol.rs b/crates/compiler/module/src/symbol.rs index 50b495df5d..833165ec94 100644 --- a/crates/compiler/module/src/symbol.rs +++ b/crates/compiler/module/src/symbol.rs @@ -1440,6 +1440,7 @@ define_builtins! { 84 LIST_APPEND_IF_OK: "appendIfOk" 85 LIST_PREPEND_IF_OK: "prependIfOk" 86 LIST_WALK_WITH_INDEX_UNTIL: "walkWithIndexUntil" + 87 LIST_CLONE: "clone" } 7 RESULT: "Result" => { 0 RESULT_RESULT: "Result" exposed_type=true // the Result.Result type alias diff --git a/crates/compiler/mono/src/drop_specialization.rs b/crates/compiler/mono/src/drop_specialization.rs index 7ccf6dbc85..552155383f 100644 --- a/crates/compiler/mono/src/drop_specialization.rs +++ b/crates/compiler/mono/src/drop_specialization.rs @@ -1611,6 +1611,7 @@ fn low_level_no_rc(lowlevel: &LowLevel) -> RC { Hash => RC::NoRc, ListIsUnique => RC::Rc, + ListClone => RC::Rc, BoxExpr | UnboxExpr => { unreachable!("These lowlevel operations are turned into mono Expr's") diff --git a/crates/compiler/mono/src/inc_dec.rs b/crates/compiler/mono/src/inc_dec.rs index 9c3e2b0140..6941e57f68 100644 --- a/crates/compiler/mono/src/inc_dec.rs +++ b/crates/compiler/mono/src/inc_dec.rs @@ -1366,6 +1366,7 @@ fn lowlevel_borrow_signature(arena: &Bump, op: LowLevel) -> &[Ownership] { Hash => arena.alloc_slice_copy(&[borrowed, irrelevant]), ListIsUnique => arena.alloc_slice_copy(&[borrowed]), + ListClone => arena.alloc_slice_copy(&[owned]), BoxExpr | UnboxExpr => { unreachable!("These lowlevel operations are turned into mono Expr's") From 8b5269a66c81a27e3d611f7766111b202baf48d2 Mon Sep 17 00:00:00 2001 From: Folkert Date: Sat, 20 Jan 2024 22:31:54 +0100 Subject: [PATCH 9/9] update mono tests --- ...e_in_polymorphic_expression_issue_4717.txt | 116 +++--- .../generated/call_function_in_empty_list.txt | 4 +- .../call_function_in_empty_list_unbound.txt | 4 +- .../generated/capture_void_layout_task.txt | 42 +- ...ose_correct_recursion_var_under_record.txt | 66 ++-- .../test_mono/generated/closure_in_list.txt | 4 +- ...lambda_set_productive_nullable_wrapped.txt | 42 +- crates/compiler/test_mono/generated/dict.txt | 4 +- .../generated/empty_list_of_function_type.txt | 32 +- .../compiler/test_mono/generated/encode.txt | 18 +- .../encode_derived_nested_record_string.txt | 362 +++++++++--------- ...encode_derived_record_one_field_string.txt | 316 +++++++-------- ...ncode_derived_record_two_field_strings.txt | 316 +++++++-------- .../generated/encode_derived_string.txt | 168 ++++---- .../encode_derived_tag_one_field_string.txt | 234 +++++------ ...encode_derived_tag_two_payloads_string.txt | 232 +++++------ .../generated/inspect_derived_dict.txt | 274 ++++++------- .../generated/inspect_derived_list.txt | 42 +- .../inspect_derived_nested_record_string.txt | 98 ++--- .../generated/inspect_derived_record.txt | 44 +-- ...nspect_derived_record_one_field_string.txt | 44 +-- ...spect_derived_record_two_field_strings.txt | 44 +-- .../inspect_derived_tag_one_field_string.txt | 56 +-- ...nspect_derived_tag_two_payloads_string.txt | 56 +-- .../test_mono/generated/ir_int_add.txt | 4 +- ...cialize_errors_behind_unified_branches.txt | 58 +-- .../test_mono/generated/issue_4749.txt | 174 ++++----- .../test_mono/generated/issue_4770.txt | 110 +++--- ..._4772_weakened_monomorphic_destructure.txt | 174 ++++----- ...ure_with_multiple_recursive_structures.txt | 44 +-- .../test_mono/generated/list_append.txt | 18 +- .../generated/list_append_closure.txt | 18 +- .../generated/list_cannot_update_inplace.txt | 32 +- .../compiler/test_mono/generated/list_get.txt | 32 +- .../compiler/test_mono/generated/list_len.txt | 8 +- .../generated/list_map_closure_borrows.txt | 38 +- .../generated/list_map_closure_owns.txt | 38 +- ...ist_map_take_capturing_or_noncapturing.txt | 20 +- .../generated/list_pass_to_function.txt | 32 +- .../test_mono/generated/list_sort_asc.txt | 12 +- .../test_mono/generated/quicksort_swap.txt | 60 +-- .../test_mono/generated/record_update.txt | 32 +- ...function_and_union_with_inference_hole.txt | 4 +- .../compiler/test_mono/generated/rigids.txt | 60 +-- ...not_duplicate_identical_concrete_types.txt | 234 +++++------ ...types_without_unification_of_unifiable.txt | 112 +++--- .../weakening_avoids_overspecialization.txt | 116 +++--- 47 files changed, 2024 insertions(+), 2024 deletions(-) diff --git a/crates/compiler/test_mono/generated/anonymous_closure_in_polymorphic_expression_issue_4717.txt b/crates/compiler/test_mono/generated/anonymous_closure_in_polymorphic_expression_issue_4717.txt index e173e68196..a76b01d2f4 100644 --- a/crates/compiler/test_mono/generated/anonymous_closure_in_polymorphic_expression_issue_4717.txt +++ b/crates/compiler/test_mono/generated/anonymous_closure_in_polymorphic_expression_issue_4717.txt @@ -2,80 +2,80 @@ procedure Bool.11 (#Attr.2, #Attr.3): let Bool.23 : Int1 = lowlevel Eq #Attr.2 #Attr.3; ret Bool.23; -procedure List.101 (List.484, List.485, List.486): - let List.587 : U64 = 0i64; - let List.588 : U64 = CallByName List.6 List.484; - let List.586 : [C U64, C U64] = CallByName List.80 List.484 List.485 List.486 List.587 List.588; - ret List.586; +procedure List.102 (List.486, List.487, List.488): + let List.589 : U64 = 0i64; + let List.590 : U64 = CallByName List.6 List.486; + let List.588 : [C U64, C U64] = CallByName List.80 List.486 List.487 List.488 List.589 List.590; + ret List.588; -procedure List.26 (List.197, List.198, List.199): - let List.580 : [C U64, C U64] = CallByName List.101 List.197 List.198 List.199; - let List.583 : U8 = 1i64; - let List.584 : U8 = GetTagId List.580; - let List.585 : Int1 = lowlevel Eq List.583 List.584; - if List.585 then - let List.200 : U64 = UnionAtIndex (Id 1) (Index 0) List.580; - ret List.200; +procedure List.26 (List.199, List.200, List.201): + let List.582 : [C U64, C U64] = CallByName List.102 List.199 List.200 List.201; + let List.585 : U8 = 1i64; + let List.586 : U8 = GetTagId List.582; + let List.587 : Int1 = lowlevel Eq List.585 List.586; + if List.587 then + let List.202 : U64 = UnionAtIndex (Id 1) (Index 0) List.582; + ret List.202; else - let List.201 : U64 = UnionAtIndex (Id 0) (Index 0) List.580; - ret List.201; + let List.203 : U64 = UnionAtIndex (Id 0) (Index 0) List.582; + ret List.203; -procedure List.38 (List.340, List.341): +procedure List.38 (List.342, List.343): + let List.581 : U64 = CallByName List.6 List.342; + let List.344 : U64 = CallByName Num.77 List.581 List.343; + let List.571 : List U8 = CallByName List.43 List.342 List.344; + ret List.571; + +procedure List.43 (List.340, List.341): let List.579 : U64 = CallByName List.6 List.340; - let List.342 : U64 = CallByName Num.77 List.579 List.341; - let List.569 : List U8 = CallByName List.43 List.340 List.342; - ret List.569; - -procedure List.43 (List.338, List.339): - let List.577 : U64 = CallByName List.6 List.338; - let List.576 : U64 = CallByName Num.77 List.577 List.339; - let List.571 : {U64, U64} = Struct {List.339, List.576}; - let List.570 : List U8 = CallByName List.49 List.338 List.571; - ret List.570; - -procedure List.49 (List.416, List.417): - let List.573 : U64 = StructAtIndex 1 List.417; - let List.574 : U64 = StructAtIndex 0 List.417; - let List.572 : List U8 = CallByName List.72 List.416 List.573 List.574; + let List.578 : U64 = CallByName Num.77 List.579 List.341; + let List.573 : {U64, U64} = Struct {List.341, List.578}; + let List.572 : List U8 = CallByName List.49 List.340 List.573; ret List.572; +procedure List.49 (List.418, List.419): + let List.575 : U64 = StructAtIndex 1 List.419; + let List.576 : U64 = StructAtIndex 0 List.419; + let List.574 : List U8 = CallByName List.72 List.418 List.575 List.576; + ret List.574; + procedure List.6 (#Attr.2): - let List.578 : U64 = lowlevel ListLen #Attr.2; - ret List.578; + let List.580 : U64 = lowlevel ListLen #Attr.2; + ret List.580; procedure List.66 (#Attr.2, #Attr.3): - let List.601 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.601; + let List.603 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.603; procedure List.72 (#Attr.2, #Attr.3, #Attr.4): - let List.575 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; - ret List.575; + let List.577 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; + ret List.577; procedure List.80 (#Derived_gen.0, #Derived_gen.1, #Derived_gen.2, #Derived_gen.3, #Derived_gen.4): - joinpoint List.589 List.487 List.488 List.489 List.490 List.491: - let List.591 : Int1 = CallByName Num.22 List.490 List.491; - if List.591 then - let List.600 : U8 = CallByName List.66 List.487 List.490; - let List.592 : [C U64, C U64] = CallByName Test.4 List.488 List.600; - let List.597 : U8 = 1i64; - let List.598 : U8 = GetTagId List.592; - let List.599 : Int1 = lowlevel Eq List.597 List.598; - if List.599 then - let List.492 : U64 = UnionAtIndex (Id 1) (Index 0) List.592; - let List.595 : U64 = 1i64; - let List.594 : U64 = CallByName Num.51 List.490 List.595; - jump List.589 List.487 List.492 List.489 List.594 List.491; + joinpoint List.591 List.489 List.490 List.491 List.492 List.493: + let List.593 : Int1 = CallByName Num.22 List.492 List.493; + if List.593 then + let List.602 : U8 = CallByName List.66 List.489 List.492; + let List.594 : [C U64, C U64] = CallByName Test.4 List.490 List.602; + let List.599 : U8 = 1i64; + let List.600 : U8 = GetTagId List.594; + let List.601 : Int1 = lowlevel Eq List.599 List.600; + if List.601 then + let List.494 : U64 = UnionAtIndex (Id 1) (Index 0) List.594; + let List.597 : U64 = 1i64; + let List.596 : U64 = CallByName Num.51 List.492 List.597; + jump List.591 List.489 List.494 List.491 List.596 List.493; else - dec List.487; - let List.493 : U64 = UnionAtIndex (Id 0) (Index 0) List.592; - let List.596 : [C U64, C U64] = TagId(0) List.493; - ret List.596; + dec List.489; + let List.495 : U64 = UnionAtIndex (Id 0) (Index 0) List.594; + let List.598 : [C U64, C U64] = TagId(0) List.495; + ret List.598; else - dec List.487; - let List.590 : [C U64, C U64] = TagId(1) List.488; - ret List.590; + dec List.489; + let List.592 : [C U64, C U64] = TagId(1) List.490; + ret List.592; in - jump List.589 #Derived_gen.0 #Derived_gen.1 #Derived_gen.2 #Derived_gen.3 #Derived_gen.4; + jump List.591 #Derived_gen.0 #Derived_gen.1 #Derived_gen.2 #Derived_gen.3 #Derived_gen.4; procedure Num.22 (#Attr.2, #Attr.3): let Num.294 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; diff --git a/crates/compiler/test_mono/generated/call_function_in_empty_list.txt b/crates/compiler/test_mono/generated/call_function_in_empty_list.txt index 8e5a61f0bb..ce9516fd56 100644 --- a/crates/compiler/test_mono/generated/call_function_in_empty_list.txt +++ b/crates/compiler/test_mono/generated/call_function_in_empty_list.txt @@ -1,7 +1,7 @@ procedure List.5 (#Attr.2, #Attr.3): - let List.569 : List {} = lowlevel ListMap { xs: `#Attr.#arg1` } #Attr.2 Test.2 #Attr.3; + let List.571 : List {} = lowlevel ListMap { xs: `#Attr.#arg1` } #Attr.2 Test.2 #Attr.3; decref #Attr.2; - ret List.569; + ret List.571; procedure Test.2 (Test.3): let Test.7 : {} = Struct {}; diff --git a/crates/compiler/test_mono/generated/call_function_in_empty_list_unbound.txt b/crates/compiler/test_mono/generated/call_function_in_empty_list_unbound.txt index 5ce6015e75..8f4dc67769 100644 --- a/crates/compiler/test_mono/generated/call_function_in_empty_list_unbound.txt +++ b/crates/compiler/test_mono/generated/call_function_in_empty_list_unbound.txt @@ -1,7 +1,7 @@ procedure List.5 (#Attr.2, #Attr.3): - let List.569 : List [] = lowlevel ListMap { xs: `#Attr.#arg1` } #Attr.2 Test.2 #Attr.3; + let List.571 : List [] = lowlevel ListMap { xs: `#Attr.#arg1` } #Attr.2 Test.2 #Attr.3; decref #Attr.2; - ret List.569; + ret List.571; procedure Test.2 (Test.3): let Test.7 : {} = Struct {}; diff --git a/crates/compiler/test_mono/generated/capture_void_layout_task.txt b/crates/compiler/test_mono/generated/capture_void_layout_task.txt index 4a7557932e..4b23d7a920 100644 --- a/crates/compiler/test_mono/generated/capture_void_layout_task.txt +++ b/crates/compiler/test_mono/generated/capture_void_layout_task.txt @@ -1,31 +1,31 @@ -procedure List.18 (List.156, List.157, List.158): - let List.570 : U64 = 0i64; - let List.571 : U64 = CallByName List.6 List.156; - let List.569 : [C {}, C *self {{}, []}] = CallByName List.89 List.156 List.157 List.158 List.570 List.571; - ret List.569; +procedure List.18 (List.158, List.159, List.160): + let List.572 : U64 = 0i64; + let List.573 : U64 = CallByName List.6 List.158; + let List.571 : [C {}, C *self {{}, []}] = CallByName List.90 List.158 List.159 List.160 List.572 List.573; + ret List.571; procedure List.6 (#Attr.2): - let List.580 : U64 = lowlevel ListLen #Attr.2; - ret List.580; + let List.582 : U64 = lowlevel ListLen #Attr.2; + ret List.582; procedure List.66 (#Attr.2, #Attr.3): - let List.579 : [] = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.579; + let List.581 : [] = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.581; -procedure List.89 (#Derived_gen.0, #Derived_gen.1, #Derived_gen.2, #Derived_gen.3, #Derived_gen.4): - joinpoint List.572 List.159 List.160 List.161 List.162 List.163: - let List.574 : Int1 = CallByName Num.22 List.162 List.163; - if List.574 then - let List.578 : [] = CallByName List.66 List.159 List.162; - let List.164 : [C {}, C *self {{}, []}] = CallByName Test.29 List.160 List.578 List.161; - let List.577 : U64 = 1i64; - let List.576 : U64 = CallByName Num.51 List.162 List.577; - jump List.572 List.159 List.164 List.161 List.576 List.163; +procedure List.90 (#Derived_gen.3, #Derived_gen.4, #Derived_gen.5, #Derived_gen.6, #Derived_gen.7): + joinpoint List.574 List.161 List.162 List.163 List.164 List.165: + let List.576 : Int1 = CallByName Num.22 List.164 List.165; + if List.576 then + let List.580 : [] = CallByName List.66 List.161 List.164; + let List.166 : [C {}, C *self {{}, []}] = CallByName Test.29 List.162 List.580 List.163; + let List.579 : U64 = 1i64; + let List.578 : U64 = CallByName Num.51 List.164 List.579; + jump List.574 List.161 List.166 List.163 List.578 List.165; else - dec List.159; - ret List.160; + dec List.161; + ret List.162; in - jump List.572 #Derived_gen.0 #Derived_gen.1 #Derived_gen.2 #Derived_gen.3 #Derived_gen.4; + jump List.574 #Derived_gen.3 #Derived_gen.4 #Derived_gen.5 #Derived_gen.6 #Derived_gen.7; procedure Num.22 (#Attr.2, #Attr.3): let Num.292 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; diff --git a/crates/compiler/test_mono/generated/choose_correct_recursion_var_under_record.txt b/crates/compiler/test_mono/generated/choose_correct_recursion_var_under_record.txt index 9cbe7071b1..8a27050795 100644 --- a/crates/compiler/test_mono/generated/choose_correct_recursion_var_under_record.txt +++ b/crates/compiler/test_mono/generated/choose_correct_recursion_var_under_record.txt @@ -2,49 +2,49 @@ procedure Bool.1 (): let Bool.24 : Int1 = false; ret Bool.24; -procedure List.2 (List.105, List.106): - let List.583 : U64 = CallByName List.6 List.105; - let List.579 : Int1 = CallByName Num.22 List.106 List.583; - if List.579 then - let List.581 : Str = CallByName List.66 List.105 List.106; - inc List.581; - dec List.105; - let List.580 : [C {}, C Str] = TagId(1) List.581; - ret List.580; +procedure List.2 (List.106, List.107): + let List.585 : U64 = CallByName List.6 List.106; + let List.581 : Int1 = CallByName Num.22 List.107 List.585; + if List.581 then + let List.583 : Str = CallByName List.66 List.106 List.107; + inc List.583; + dec List.106; + let List.582 : [C {}, C Str] = TagId(1) List.583; + ret List.582; else - dec List.105; - let List.578 : {} = Struct {}; - let List.577 : [C {}, C Str] = TagId(0) List.578; - ret List.577; + dec List.106; + let List.580 : {} = Struct {}; + let List.579 : [C {}, C Str] = TagId(0) List.580; + ret List.579; procedure List.5 (#Attr.2, #Attr.3): - let List.585 : List Str = lowlevel ListMap { xs: `#Attr.#arg1` } #Attr.2 Test.10 #Attr.3; + let List.587 : List Str = lowlevel ListMap { xs: `#Attr.#arg1` } #Attr.2 Test.10 #Attr.3; decref #Attr.2; - ret List.585; + ret List.587; procedure List.6 (#Attr.2): - let List.584 : U64 = lowlevel ListLen #Attr.2; - ret List.584; + let List.586 : U64 = lowlevel ListLen #Attr.2; + ret List.586; procedure List.66 (#Attr.2, #Attr.3): - let List.582 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.582; + let List.584 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.584; -procedure List.9 (List.331): - let List.576 : U64 = 0i64; - let List.569 : [C {}, C Str] = CallByName List.2 List.331 List.576; - let List.573 : U8 = 1i64; - let List.574 : U8 = GetTagId List.569; - let List.575 : Int1 = lowlevel Eq List.573 List.574; - if List.575 then - let List.332 : Str = UnionAtIndex (Id 1) (Index 0) List.569; - let List.570 : [C {}, C Str] = TagId(1) List.332; - ret List.570; +procedure List.9 (List.333): + let List.578 : U64 = 0i64; + let List.571 : [C {}, C Str] = CallByName List.2 List.333 List.578; + let List.575 : U8 = 1i64; + let List.576 : U8 = GetTagId List.571; + let List.577 : Int1 = lowlevel Eq List.575 List.576; + if List.577 then + let List.334 : Str = UnionAtIndex (Id 1) (Index 0) List.571; + let List.572 : [C {}, C Str] = TagId(1) List.334; + ret List.572; else - dec List.569; - let List.572 : {} = Struct {}; - let List.571 : [C {}, C Str] = TagId(0) List.572; - ret List.571; + dec List.571; + let List.574 : {} = Struct {}; + let List.573 : [C {}, C Str] = TagId(0) List.574; + ret List.573; procedure Num.22 (#Attr.2, #Attr.3): let Num.291 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; diff --git a/crates/compiler/test_mono/generated/closure_in_list.txt b/crates/compiler/test_mono/generated/closure_in_list.txt index dad30ed6da..ffb77b5f87 100644 --- a/crates/compiler/test_mono/generated/closure_in_list.txt +++ b/crates/compiler/test_mono/generated/closure_in_list.txt @@ -1,6 +1,6 @@ procedure List.6 (#Attr.2): - let List.569 : U64 = lowlevel ListLen #Attr.2; - ret List.569; + let List.571 : U64 = lowlevel ListLen #Attr.2; + ret List.571; procedure Test.1 (Test.5): let Test.2 : I64 = 41i64; diff --git a/crates/compiler/test_mono/generated/compose_recursive_lambda_set_productive_nullable_wrapped.txt b/crates/compiler/test_mono/generated/compose_recursive_lambda_set_productive_nullable_wrapped.txt index 9795011c89..65a9791dbe 100644 --- a/crates/compiler/test_mono/generated/compose_recursive_lambda_set_productive_nullable_wrapped.txt +++ b/crates/compiler/test_mono/generated/compose_recursive_lambda_set_productive_nullable_wrapped.txt @@ -2,34 +2,34 @@ procedure Bool.2 (): let Bool.23 : Int1 = true; ret Bool.23; -procedure List.18 (List.156, List.157, List.158): - let List.570 : U64 = 0i64; - let List.571 : U64 = CallByName List.6 List.156; - let List.569 : [, C *self Int1, C *self Int1] = CallByName List.89 List.156 List.157 List.158 List.570 List.571; - ret List.569; +procedure List.18 (List.158, List.159, List.160): + let List.572 : U64 = 0i64; + let List.573 : U64 = CallByName List.6 List.158; + let List.571 : [, C *self Int1, C *self Int1] = CallByName List.90 List.158 List.159 List.160 List.572 List.573; + ret List.571; procedure List.6 (#Attr.2): - let List.580 : U64 = lowlevel ListLen #Attr.2; - ret List.580; + let List.582 : U64 = lowlevel ListLen #Attr.2; + ret List.582; procedure List.66 (#Attr.2, #Attr.3): - let List.579 : Int1 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.579; + let List.581 : Int1 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.581; -procedure List.89 (#Derived_gen.3, #Derived_gen.4, #Derived_gen.5, #Derived_gen.6, #Derived_gen.7): - joinpoint List.572 List.159 List.160 List.161 List.162 List.163: - let List.574 : Int1 = CallByName Num.22 List.162 List.163; - if List.574 then - let List.578 : Int1 = CallByName List.66 List.159 List.162; - let List.164 : [, C *self Int1, C *self Int1] = CallByName Test.6 List.160 List.578 List.161; - let List.577 : U64 = 1i64; - let List.576 : U64 = CallByName Num.51 List.162 List.577; - jump List.572 List.159 List.164 List.161 List.576 List.163; +procedure List.90 (#Derived_gen.0, #Derived_gen.1, #Derived_gen.2, #Derived_gen.3, #Derived_gen.4): + joinpoint List.574 List.161 List.162 List.163 List.164 List.165: + let List.576 : Int1 = CallByName Num.22 List.164 List.165; + if List.576 then + let List.580 : Int1 = CallByName List.66 List.161 List.164; + let List.166 : [, C *self Int1, C *self Int1] = CallByName Test.6 List.162 List.580 List.163; + let List.579 : U64 = 1i64; + let List.578 : U64 = CallByName Num.51 List.164 List.579; + jump List.574 List.161 List.166 List.163 List.578 List.165; else - dec List.159; - ret List.160; + dec List.161; + ret List.162; in - jump List.572 #Derived_gen.3 #Derived_gen.4 #Derived_gen.5 #Derived_gen.6 #Derived_gen.7; + jump List.574 #Derived_gen.0 #Derived_gen.1 #Derived_gen.2 #Derived_gen.3 #Derived_gen.4; procedure Num.22 (#Attr.2, #Attr.3): let Num.292 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; diff --git a/crates/compiler/test_mono/generated/dict.txt b/crates/compiler/test_mono/generated/dict.txt index a9c9bf3f21..1c6a3be976 100644 --- a/crates/compiler/test_mono/generated/dict.txt +++ b/crates/compiler/test_mono/generated/dict.txt @@ -26,8 +26,8 @@ procedure Dict.45 (): ret Dict.738; procedure List.6 (#Attr.2): - let List.569 : U64 = lowlevel ListLen #Attr.2; - ret List.569; + let List.571 : U64 = lowlevel ListLen #Attr.2; + ret List.571; procedure Num.20 (#Attr.2, #Attr.3): let Num.291 : U8 = lowlevel NumSub #Attr.2 #Attr.3; diff --git a/crates/compiler/test_mono/generated/empty_list_of_function_type.txt b/crates/compiler/test_mono/generated/empty_list_of_function_type.txt index 4f8f4c2940..bd81fade4b 100644 --- a/crates/compiler/test_mono/generated/empty_list_of_function_type.txt +++ b/crates/compiler/test_mono/generated/empty_list_of_function_type.txt @@ -2,27 +2,27 @@ procedure Bool.1 (): let Bool.23 : Int1 = false; ret Bool.23; -procedure List.2 (List.105, List.106): - let List.575 : U64 = CallByName List.6 List.105; - let List.571 : Int1 = CallByName Num.22 List.106 List.575; - if List.571 then - let List.573 : {} = CallByName List.66 List.105 List.106; - dec List.105; - let List.572 : [C {}, C {}] = TagId(1) List.573; - ret List.572; +procedure List.2 (List.106, List.107): + let List.577 : U64 = CallByName List.6 List.106; + let List.573 : Int1 = CallByName Num.22 List.107 List.577; + if List.573 then + let List.575 : {} = CallByName List.66 List.106 List.107; + dec List.106; + let List.574 : [C {}, C {}] = TagId(1) List.575; + ret List.574; else - dec List.105; - let List.570 : {} = Struct {}; - let List.569 : [C {}, C {}] = TagId(0) List.570; - ret List.569; + dec List.106; + let List.572 : {} = Struct {}; + let List.571 : [C {}, C {}] = TagId(0) List.572; + ret List.571; procedure List.6 (#Attr.2): - let List.576 : U64 = lowlevel ListLen #Attr.2; - ret List.576; + let List.578 : U64 = lowlevel ListLen #Attr.2; + ret List.578; procedure List.66 (#Attr.2, #Attr.3): - let List.574 : {} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.574; + let List.576 : {} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.576; procedure Num.22 (#Attr.2, #Attr.3): let Num.291 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; diff --git a/crates/compiler/test_mono/generated/encode.txt b/crates/compiler/test_mono/generated/encode.txt index 121a386fe6..d301e40e15 100644 --- a/crates/compiler/test_mono/generated/encode.txt +++ b/crates/compiler/test_mono/generated/encode.txt @@ -1,16 +1,16 @@ -procedure List.4 (List.121, List.122): - let List.572 : U64 = 1i64; - let List.570 : List U8 = CallByName List.70 List.121 List.572; - let List.569 : List U8 = CallByName List.71 List.570 List.122; - ret List.569; +procedure List.4 (List.122, List.123): + let List.574 : U64 = 1i64; + let List.572 : List U8 = CallByName List.70 List.122 List.574; + let List.571 : List U8 = CallByName List.71 List.572 List.123; + ret List.571; procedure List.70 (#Attr.2, #Attr.3): - let List.573 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; - ret List.573; + let List.575 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; + ret List.575; procedure List.71 (#Attr.2, #Attr.3): - let List.571 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.571; + let List.573 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; + ret List.573; procedure Test.23 (Test.24, Test.35, Test.22): let Test.37 : List U8 = CallByName List.4 Test.24 Test.22; diff --git a/crates/compiler/test_mono/generated/encode_derived_nested_record_string.txt b/crates/compiler/test_mono/generated/encode_derived_nested_record_string.txt index 1d88fc081a..e2c003e0be 100644 --- a/crates/compiler/test_mono/generated/encode_derived_nested_record_string.txt +++ b/crates/compiler/test_mono/generated/encode_derived_nested_record_string.txt @@ -73,242 +73,242 @@ procedure Encode.26 (Encode.105, Encode.106): let Encode.108 : List U8 = CallByName Encode.24 Encode.109 Encode.110 Encode.106; ret Encode.108; -procedure List.101 (List.484, List.485, List.486): - let List.749 : U64 = 0i64; - let List.750 : U64 = CallByName List.6 List.484; - let List.748 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.80 List.484 List.485 List.486 List.749 List.750; - ret List.748; +procedure List.102 (List.486, List.487, List.488): + let List.751 : U64 = 0i64; + let List.752 : U64 = CallByName List.6 List.486; + let List.750 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.80 List.486 List.487 List.488 List.751 List.752; + ret List.750; procedure List.13 (#Attr.2, #Attr.3): - let List.729 : List Str = lowlevel ListPrepend #Attr.2 #Attr.3; - ret List.729; + let List.731 : List Str = lowlevel ListPrepend #Attr.2 #Attr.3; + ret List.731; -procedure List.18 (List.156, List.157, List.158): - let List.599 : U64 = 0i64; - let List.600 : U64 = CallByName List.6 List.156; - let List.598 : {List U8, U64} = CallByName List.89 List.156 List.157 List.158 List.599 List.600; - ret List.598; +procedure List.18 (List.158, List.159, List.160): + let List.601 : U64 = 0i64; + let List.602 : U64 = CallByName List.6 List.158; + let List.600 : {List U8, U64} = CallByName List.90 List.158 List.159 List.160 List.601 List.602; + ret List.600; -procedure List.18 (List.156, List.157, List.158): - let List.667 : U64 = 0i64; - let List.668 : U64 = CallByName List.6 List.156; - let List.666 : {List U8, U64} = CallByName List.89 List.156 List.157 List.158 List.667 List.668; - ret List.666; +procedure List.18 (List.158, List.159, List.160): + let List.669 : U64 = 0i64; + let List.670 : U64 = CallByName List.6 List.158; + let List.668 : {List U8, U64} = CallByName List.90 List.158 List.159 List.160 List.669 List.670; + ret List.668; -procedure List.18 (List.156, List.157, List.158): - let List.679 : U64 = 0i64; - let List.680 : U64 = CallByName List.6 List.156; - let List.678 : List U8 = CallByName List.89 List.156 List.157 List.158 List.679 List.680; - ret List.678; +procedure List.18 (List.158, List.159, List.160): + let List.681 : U64 = 0i64; + let List.682 : U64 = CallByName List.6 List.158; + let List.680 : List U8 = CallByName List.90 List.158 List.159 List.160 List.681 List.682; + ret List.680; -procedure List.26 (List.197, List.198, List.199): - let List.742 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.101 List.197 List.198 List.199; - let List.745 : U8 = 1i64; - let List.746 : U8 = GetTagId List.742; - let List.747 : Int1 = lowlevel Eq List.745 List.746; - if List.747 then - let List.200 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.742; - ret List.200; +procedure List.26 (List.199, List.200, List.201): + let List.744 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.102 List.199 List.200 List.201; + let List.747 : U8 = 1i64; + let List.748 : U8 = GetTagId List.744; + let List.749 : Int1 = lowlevel Eq List.747 List.748; + if List.749 then + let List.202 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.744; + ret List.202; else - let List.201 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.742; - ret List.201; + let List.203 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.744; + ret List.203; -procedure List.38 (List.340, List.341): - let List.719 : U64 = CallByName List.6 List.340; - let List.342 : U64 = CallByName Num.77 List.719 List.341; - let List.718 : List Str = CallByName List.43 List.340 List.342; - ret List.718; +procedure List.38 (List.342, List.343): + let List.721 : U64 = CallByName List.6 List.342; + let List.344 : U64 = CallByName Num.77 List.721 List.343; + let List.720 : List Str = CallByName List.43 List.342 List.344; + ret List.720; -procedure List.4 (List.121, List.122): - let List.662 : U64 = 1i64; - let List.661 : List Str = CallByName List.70 List.121 List.662; - let List.660 : List Str = CallByName List.71 List.661 List.122; - ret List.660; +procedure List.4 (List.122, List.123): + let List.664 : U64 = 1i64; + let List.663 : List Str = CallByName List.70 List.122 List.664; + let List.662 : List Str = CallByName List.71 List.663 List.123; + ret List.662; -procedure List.4 (List.121, List.122): - let List.665 : U64 = 1i64; - let List.664 : List U8 = CallByName List.70 List.121 List.665; - let List.663 : List U8 = CallByName List.71 List.664 List.122; - ret List.663; +procedure List.4 (List.122, List.123): + let List.667 : U64 = 1i64; + let List.666 : List U8 = CallByName List.70 List.122 List.667; + let List.665 : List U8 = CallByName List.71 List.666 List.123; + ret List.665; -procedure List.43 (List.338, List.339): - let List.709 : U64 = CallByName List.6 List.338; - let List.708 : U64 = CallByName Num.77 List.709 List.339; - let List.703 : {U64, U64} = Struct {List.339, List.708}; - let List.702 : List Str = CallByName List.49 List.338 List.703; - ret List.702; - -procedure List.49 (List.416, List.417): - let List.705 : U64 = StructAtIndex 1 List.417; - let List.706 : U64 = StructAtIndex 0 List.417; - let List.704 : List Str = CallByName List.72 List.416 List.705 List.706; +procedure List.43 (List.340, List.341): + let List.711 : U64 = CallByName List.6 List.340; + let List.710 : U64 = CallByName Num.77 List.711 List.341; + let List.705 : {U64, U64} = Struct {List.341, List.710}; + let List.704 : List Str = CallByName List.49 List.340 List.705; ret List.704; -procedure List.49 (List.416, List.417): - let List.733 : U64 = StructAtIndex 1 List.417; - let List.734 : U64 = StructAtIndex 0 List.417; - let List.732 : List U8 = CallByName List.72 List.416 List.733 List.734; - ret List.732; +procedure List.49 (List.418, List.419): + let List.707 : U64 = StructAtIndex 1 List.419; + let List.708 : U64 = StructAtIndex 0 List.419; + let List.706 : List Str = CallByName List.72 List.418 List.707 List.708; + ret List.706; -procedure List.52 (List.431, List.432): - let List.433 : U64 = CallByName List.6 List.431; - joinpoint List.740 List.434: - let List.738 : U64 = 0i64; - let List.737 : {U64, U64} = Struct {List.434, List.738}; - inc List.431; - let List.435 : List U8 = CallByName List.49 List.431 List.737; - let List.736 : U64 = CallByName Num.75 List.433 List.434; - let List.731 : {U64, U64} = Struct {List.736, List.434}; - let List.436 : List U8 = CallByName List.49 List.431 List.731; - let List.730 : {List U8, List U8} = Struct {List.435, List.436}; - ret List.730; +procedure List.49 (List.418, List.419): + let List.735 : U64 = StructAtIndex 1 List.419; + let List.736 : U64 = StructAtIndex 0 List.419; + let List.734 : List U8 = CallByName List.72 List.418 List.735 List.736; + ret List.734; + +procedure List.52 (List.433, List.434): + let List.435 : U64 = CallByName List.6 List.433; + joinpoint List.742 List.436: + let List.740 : U64 = 0i64; + let List.739 : {U64, U64} = Struct {List.436, List.740}; + inc List.433; + let List.437 : List U8 = CallByName List.49 List.433 List.739; + let List.738 : U64 = CallByName Num.75 List.435 List.436; + let List.733 : {U64, U64} = Struct {List.738, List.436}; + let List.438 : List U8 = CallByName List.49 List.433 List.733; + let List.732 : {List U8, List U8} = Struct {List.437, List.438}; + ret List.732; in - let List.741 : Int1 = CallByName Num.24 List.433 List.432; - if List.741 then - jump List.740 List.432; + let List.743 : Int1 = CallByName Num.24 List.435 List.434; + if List.743 then + jump List.742 List.434; else - jump List.740 List.433; + jump List.742 List.435; procedure List.6 (#Attr.2): - let List.636 : U64 = lowlevel ListLen #Attr.2; - ret List.636; + let List.638 : U64 = lowlevel ListLen #Attr.2; + ret List.638; procedure List.6 (#Attr.2): - let List.725 : U64 = lowlevel ListLen #Attr.2; - ret List.725; - -procedure List.6 (#Attr.2): - let List.726 : U64 = lowlevel ListLen #Attr.2; - ret List.726; + let List.727 : U64 = lowlevel ListLen #Attr.2; + ret List.727; procedure List.6 (#Attr.2): let List.728 : U64 = lowlevel ListLen #Attr.2; ret List.728; -procedure List.66 (#Attr.2, #Attr.3): - let List.608 : {Str, Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.608; +procedure List.6 (#Attr.2): + let List.730 : U64 = lowlevel ListLen #Attr.2; + ret List.730; procedure List.66 (#Attr.2, #Attr.3): - let List.676 : {Str, Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.676; + let List.610 : {Str, Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.610; procedure List.66 (#Attr.2, #Attr.3): - let List.688 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.688; + let List.678 : {Str, Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.678; + +procedure List.66 (#Attr.2, #Attr.3): + let List.690 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.690; procedure List.68 (#Attr.2): - let List.721 : List Str = lowlevel ListWithCapacity #Attr.2; - ret List.721; - -procedure List.68 (#Attr.2): - let List.723 : List U8 = lowlevel ListWithCapacity #Attr.2; + let List.723 : List Str = lowlevel ListWithCapacity #Attr.2; ret List.723; +procedure List.68 (#Attr.2): + let List.725 : List U8 = lowlevel ListWithCapacity #Attr.2; + ret List.725; + procedure List.70 (#Attr.2, #Attr.3): - let List.642 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; + let List.644 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; + ret List.644; + +procedure List.70 (#Attr.2, #Attr.3): + let List.661 : List Str = lowlevel ListReserve #Attr.2 #Attr.3; + ret List.661; + +procedure List.71 (#Attr.2, #Attr.3): + let List.642 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; ret List.642; -procedure List.70 (#Attr.2, #Attr.3): - let List.659 : List Str = lowlevel ListReserve #Attr.2 #Attr.3; +procedure List.71 (#Attr.2, #Attr.3): + let List.659 : List Str = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; ret List.659; -procedure List.71 (#Attr.2, #Attr.3): - let List.640 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.640; - -procedure List.71 (#Attr.2, #Attr.3): - let List.657 : List Str = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.657; +procedure List.72 (#Attr.2, #Attr.3, #Attr.4): + let List.709 : List Str = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; + ret List.709; procedure List.72 (#Attr.2, #Attr.3, #Attr.4): - let List.707 : List Str = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; - ret List.707; - -procedure List.72 (#Attr.2, #Attr.3, #Attr.4): - let List.735 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; - ret List.735; + let List.737 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; + ret List.737; procedure List.8 (#Attr.2, #Attr.3): - let List.692 : List Str = lowlevel ListConcat #Attr.2 #Attr.3; - ret List.692; + let List.694 : List Str = lowlevel ListConcat #Attr.2 #Attr.3; + ret List.694; procedure List.8 (#Attr.2, #Attr.3): - let List.700 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; - ret List.700; + let List.702 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; + ret List.702; -procedure List.80 (#Derived_gen.30, #Derived_gen.31, #Derived_gen.32, #Derived_gen.33, #Derived_gen.34): - joinpoint List.751 List.487 List.488 List.489 List.490 List.491: - let List.753 : Int1 = CallByName Num.22 List.490 List.491; - if List.753 then - let List.762 : U8 = CallByName List.66 List.487 List.490; - let List.754 : [C {U64, Int1}, C {U64, Int1}] = CallByName TotallyNotJson.189 List.488 List.762; - let List.759 : U8 = 1i64; - let List.760 : U8 = GetTagId List.754; - let List.761 : Int1 = lowlevel Eq List.759 List.760; - if List.761 then - let List.492 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.754; - let List.757 : U64 = 1i64; - let List.756 : U64 = CallByName Num.51 List.490 List.757; - jump List.751 List.487 List.492 List.489 List.756 List.491; +procedure List.80 (#Derived_gen.20, #Derived_gen.21, #Derived_gen.22, #Derived_gen.23, #Derived_gen.24): + joinpoint List.753 List.489 List.490 List.491 List.492 List.493: + let List.755 : Int1 = CallByName Num.22 List.492 List.493; + if List.755 then + let List.764 : U8 = CallByName List.66 List.489 List.492; + let List.756 : [C {U64, Int1}, C {U64, Int1}] = CallByName TotallyNotJson.189 List.490 List.764; + let List.761 : U8 = 1i64; + let List.762 : U8 = GetTagId List.756; + let List.763 : Int1 = lowlevel Eq List.761 List.762; + if List.763 then + let List.494 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.756; + let List.759 : U64 = 1i64; + let List.758 : U64 = CallByName Num.51 List.492 List.759; + jump List.753 List.489 List.494 List.491 List.758 List.493; else - dec List.487; - let List.493 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.754; - let List.758 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) List.493; - ret List.758; + dec List.489; + let List.495 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.756; + let List.760 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) List.495; + ret List.760; else - dec List.487; - let List.752 : [C {U64, Int1}, C {U64, Int1}] = TagId(1) List.488; - ret List.752; + dec List.489; + let List.754 : [C {U64, Int1}, C {U64, Int1}] = TagId(1) List.490; + ret List.754; in - jump List.751 #Derived_gen.30 #Derived_gen.31 #Derived_gen.32 #Derived_gen.33 #Derived_gen.34; + jump List.753 #Derived_gen.20 #Derived_gen.21 #Derived_gen.22 #Derived_gen.23 #Derived_gen.24; -procedure List.89 (#Derived_gen.20, #Derived_gen.21, #Derived_gen.22, #Derived_gen.23, #Derived_gen.24): - joinpoint List.601 List.159 List.160 List.161 List.162 List.163: - let List.603 : Int1 = CallByName Num.22 List.162 List.163; - if List.603 then - let List.607 : {Str, Str} = CallByName List.66 List.159 List.162; - inc List.607; - let List.164 : {List U8, U64} = CallByName TotallyNotJson.237 List.160 List.607 List.161; - let List.606 : U64 = 1i64; - let List.605 : U64 = CallByName Num.51 List.162 List.606; - jump List.601 List.159 List.164 List.161 List.605 List.163; +procedure List.90 (#Derived_gen.32, #Derived_gen.33, #Derived_gen.34, #Derived_gen.35, #Derived_gen.36): + joinpoint List.603 List.161 List.162 List.163 List.164 List.165: + let List.605 : Int1 = CallByName Num.22 List.164 List.165; + if List.605 then + let List.609 : {Str, Str} = CallByName List.66 List.161 List.164; + inc List.609; + let List.166 : {List U8, U64} = CallByName TotallyNotJson.237 List.162 List.609 List.163; + let List.608 : U64 = 1i64; + let List.607 : U64 = CallByName Num.51 List.164 List.608; + jump List.603 List.161 List.166 List.163 List.607 List.165; else - dec List.159; - ret List.160; + dec List.161; + ret List.162; in - jump List.601 #Derived_gen.20 #Derived_gen.21 #Derived_gen.22 #Derived_gen.23 #Derived_gen.24; + jump List.603 #Derived_gen.32 #Derived_gen.33 #Derived_gen.34 #Derived_gen.35 #Derived_gen.36; -procedure List.89 (#Derived_gen.25, #Derived_gen.26, #Derived_gen.27, #Derived_gen.28, #Derived_gen.29): - joinpoint List.681 List.159 List.160 List.161 List.162 List.163: - let List.683 : Int1 = CallByName Num.22 List.162 List.163; - if List.683 then - let List.687 : U8 = CallByName List.66 List.159 List.162; - let List.164 : List U8 = CallByName TotallyNotJson.215 List.160 List.687; - let List.686 : U64 = 1i64; - let List.685 : U64 = CallByName Num.51 List.162 List.686; - jump List.681 List.159 List.164 List.161 List.685 List.163; +procedure List.90 (#Derived_gen.37, #Derived_gen.38, #Derived_gen.39, #Derived_gen.40, #Derived_gen.41): + joinpoint List.683 List.161 List.162 List.163 List.164 List.165: + let List.685 : Int1 = CallByName Num.22 List.164 List.165; + if List.685 then + let List.689 : U8 = CallByName List.66 List.161 List.164; + let List.166 : List U8 = CallByName TotallyNotJson.215 List.162 List.689; + let List.688 : U64 = 1i64; + let List.687 : U64 = CallByName Num.51 List.164 List.688; + jump List.683 List.161 List.166 List.163 List.687 List.165; else - dec List.159; - ret List.160; + dec List.161; + ret List.162; in - jump List.681 #Derived_gen.25 #Derived_gen.26 #Derived_gen.27 #Derived_gen.28 #Derived_gen.29; + jump List.683 #Derived_gen.37 #Derived_gen.38 #Derived_gen.39 #Derived_gen.40 #Derived_gen.41; -procedure List.89 (#Derived_gen.42, #Derived_gen.43, #Derived_gen.44, #Derived_gen.45, #Derived_gen.46): - joinpoint List.669 List.159 List.160 List.161 List.162 List.163: - let List.671 : Int1 = CallByName Num.22 List.162 List.163; - if List.671 then - let List.675 : {Str, Str} = CallByName List.66 List.159 List.162; - inc List.675; - let List.164 : {List U8, U64} = CallByName TotallyNotJson.237 List.160 List.675 List.161; - let List.674 : U64 = 1i64; - let List.673 : U64 = CallByName Num.51 List.162 List.674; - jump List.669 List.159 List.164 List.161 List.673 List.163; +procedure List.90 (#Derived_gen.51, #Derived_gen.52, #Derived_gen.53, #Derived_gen.54, #Derived_gen.55): + joinpoint List.671 List.161 List.162 List.163 List.164 List.165: + let List.673 : Int1 = CallByName Num.22 List.164 List.165; + if List.673 then + let List.677 : {Str, Str} = CallByName List.66 List.161 List.164; + inc List.677; + let List.166 : {List U8, U64} = CallByName TotallyNotJson.237 List.162 List.677 List.163; + let List.676 : U64 = 1i64; + let List.675 : U64 = CallByName Num.51 List.164 List.676; + jump List.671 List.161 List.166 List.163 List.675 List.165; else - dec List.159; - ret List.160; + dec List.161; + ret List.162; in - jump List.669 #Derived_gen.42 #Derived_gen.43 #Derived_gen.44 #Derived_gen.45 #Derived_gen.46; + jump List.671 #Derived_gen.51 #Derived_gen.52 #Derived_gen.53 #Derived_gen.54 #Derived_gen.55; procedure Num.127 (#Attr.2): let Num.312 : U8 = lowlevel NumIntCast #Attr.2; @@ -1439,7 +1439,7 @@ procedure TotallyNotJson.97 (TotallyNotJson.837): dec TotallyNotJson.1567; ret TotallyNotJson.1565; -procedure TotallyNotJson.98 (#Derived_gen.41): +procedure TotallyNotJson.98 (#Derived_gen.31): joinpoint TotallyNotJson.1573 TotallyNotJson.1169: let TotallyNotJson.842 : List Str = StructAtIndex 0 TotallyNotJson.1169; let TotallyNotJson.841 : List Str = StructAtIndex 1 TotallyNotJson.1169; @@ -1477,7 +1477,7 @@ procedure TotallyNotJson.98 (#Derived_gen.41): let TotallyNotJson.1574 : {List Str, List Str} = Struct {TotallyNotJson.842, TotallyNotJson.841}; ret TotallyNotJson.1574; in - jump TotallyNotJson.1573 #Derived_gen.41; + jump TotallyNotJson.1573 #Derived_gen.31; procedure Test.0 (): let Test.12 : Str = "bar"; diff --git a/crates/compiler/test_mono/generated/encode_derived_record_one_field_string.txt b/crates/compiler/test_mono/generated/encode_derived_record_one_field_string.txt index 34ccd66d7d..353d58cb44 100644 --- a/crates/compiler/test_mono/generated/encode_derived_record_one_field_string.txt +++ b/crates/compiler/test_mono/generated/encode_derived_record_one_field_string.txt @@ -46,212 +46,212 @@ procedure Encode.26 (Encode.105, Encode.106): let Encode.108 : List U8 = CallByName Encode.24 Encode.109 Encode.110 Encode.106; ret Encode.108; -procedure List.101 (List.484, List.485, List.486): - let List.681 : U64 = 0i64; - let List.682 : U64 = CallByName List.6 List.484; - let List.680 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.80 List.484 List.485 List.486 List.681 List.682; - ret List.680; +procedure List.102 (List.486, List.487, List.488): + let List.683 : U64 = 0i64; + let List.684 : U64 = CallByName List.6 List.486; + let List.682 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.80 List.486 List.487 List.488 List.683 List.684; + ret List.682; procedure List.13 (#Attr.2, #Attr.3): - let List.661 : List Str = lowlevel ListPrepend #Attr.2 #Attr.3; - ret List.661; + let List.663 : List Str = lowlevel ListPrepend #Attr.2 #Attr.3; + ret List.663; -procedure List.18 (List.156, List.157, List.158): - let List.599 : U64 = 0i64; - let List.600 : U64 = CallByName List.6 List.156; - let List.598 : {List U8, U64} = CallByName List.89 List.156 List.157 List.158 List.599 List.600; - ret List.598; +procedure List.18 (List.158, List.159, List.160): + let List.601 : U64 = 0i64; + let List.602 : U64 = CallByName List.6 List.158; + let List.600 : {List U8, U64} = CallByName List.90 List.158 List.159 List.160 List.601 List.602; + ret List.600; -procedure List.18 (List.156, List.157, List.158): - let List.611 : U64 = 0i64; - let List.612 : U64 = CallByName List.6 List.156; - let List.610 : List U8 = CallByName List.89 List.156 List.157 List.158 List.611 List.612; - ret List.610; +procedure List.18 (List.158, List.159, List.160): + let List.613 : U64 = 0i64; + let List.614 : U64 = CallByName List.6 List.158; + let List.612 : List U8 = CallByName List.90 List.158 List.159 List.160 List.613 List.614; + ret List.612; -procedure List.26 (List.197, List.198, List.199): - let List.674 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.101 List.197 List.198 List.199; - let List.677 : U8 = 1i64; - let List.678 : U8 = GetTagId List.674; - let List.679 : Int1 = lowlevel Eq List.677 List.678; - if List.679 then - let List.200 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.674; - ret List.200; +procedure List.26 (List.199, List.200, List.201): + let List.676 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.102 List.199 List.200 List.201; + let List.679 : U8 = 1i64; + let List.680 : U8 = GetTagId List.676; + let List.681 : Int1 = lowlevel Eq List.679 List.680; + if List.681 then + let List.202 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.676; + ret List.202; else - let List.201 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.674; - ret List.201; + let List.203 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.676; + ret List.203; -procedure List.38 (List.340, List.341): - let List.651 : U64 = CallByName List.6 List.340; - let List.342 : U64 = CallByName Num.77 List.651 List.341; - let List.650 : List Str = CallByName List.43 List.340 List.342; - ret List.650; +procedure List.38 (List.342, List.343): + let List.653 : U64 = CallByName List.6 List.342; + let List.344 : U64 = CallByName Num.77 List.653 List.343; + let List.652 : List Str = CallByName List.43 List.342 List.344; + ret List.652; -procedure List.4 (List.121, List.122): - let List.594 : U64 = 1i64; - let List.593 : List Str = CallByName List.70 List.121 List.594; - let List.592 : List Str = CallByName List.71 List.593 List.122; - ret List.592; +procedure List.4 (List.122, List.123): + let List.596 : U64 = 1i64; + let List.595 : List Str = CallByName List.70 List.122 List.596; + let List.594 : List Str = CallByName List.71 List.595 List.123; + ret List.594; -procedure List.4 (List.121, List.122): - let List.597 : U64 = 1i64; - let List.596 : List U8 = CallByName List.70 List.121 List.597; - let List.595 : List U8 = CallByName List.71 List.596 List.122; - ret List.595; +procedure List.4 (List.122, List.123): + let List.599 : U64 = 1i64; + let List.598 : List U8 = CallByName List.70 List.122 List.599; + let List.597 : List U8 = CallByName List.71 List.598 List.123; + ret List.597; -procedure List.43 (List.338, List.339): - let List.641 : U64 = CallByName List.6 List.338; - let List.640 : U64 = CallByName Num.77 List.641 List.339; - let List.635 : {U64, U64} = Struct {List.339, List.640}; - let List.634 : List Str = CallByName List.49 List.338 List.635; - ret List.634; - -procedure List.49 (List.416, List.417): - let List.637 : U64 = StructAtIndex 1 List.417; - let List.638 : U64 = StructAtIndex 0 List.417; - let List.636 : List Str = CallByName List.72 List.416 List.637 List.638; +procedure List.43 (List.340, List.341): + let List.643 : U64 = CallByName List.6 List.340; + let List.642 : U64 = CallByName Num.77 List.643 List.341; + let List.637 : {U64, U64} = Struct {List.341, List.642}; + let List.636 : List Str = CallByName List.49 List.340 List.637; ret List.636; -procedure List.49 (List.416, List.417): - let List.665 : U64 = StructAtIndex 1 List.417; - let List.666 : U64 = StructAtIndex 0 List.417; - let List.664 : List U8 = CallByName List.72 List.416 List.665 List.666; - ret List.664; +procedure List.49 (List.418, List.419): + let List.639 : U64 = StructAtIndex 1 List.419; + let List.640 : U64 = StructAtIndex 0 List.419; + let List.638 : List Str = CallByName List.72 List.418 List.639 List.640; + ret List.638; -procedure List.52 (List.431, List.432): - let List.433 : U64 = CallByName List.6 List.431; - joinpoint List.672 List.434: - let List.670 : U64 = 0i64; - let List.669 : {U64, U64} = Struct {List.434, List.670}; - inc List.431; - let List.435 : List U8 = CallByName List.49 List.431 List.669; - let List.668 : U64 = CallByName Num.75 List.433 List.434; - let List.663 : {U64, U64} = Struct {List.668, List.434}; - let List.436 : List U8 = CallByName List.49 List.431 List.663; - let List.662 : {List U8, List U8} = Struct {List.435, List.436}; - ret List.662; +procedure List.49 (List.418, List.419): + let List.667 : U64 = StructAtIndex 1 List.419; + let List.668 : U64 = StructAtIndex 0 List.419; + let List.666 : List U8 = CallByName List.72 List.418 List.667 List.668; + ret List.666; + +procedure List.52 (List.433, List.434): + let List.435 : U64 = CallByName List.6 List.433; + joinpoint List.674 List.436: + let List.672 : U64 = 0i64; + let List.671 : {U64, U64} = Struct {List.436, List.672}; + inc List.433; + let List.437 : List U8 = CallByName List.49 List.433 List.671; + let List.670 : U64 = CallByName Num.75 List.435 List.436; + let List.665 : {U64, U64} = Struct {List.670, List.436}; + let List.438 : List U8 = CallByName List.49 List.433 List.665; + let List.664 : {List U8, List U8} = Struct {List.437, List.438}; + ret List.664; in - let List.673 : Int1 = CallByName Num.24 List.433 List.432; - if List.673 then - jump List.672 List.432; + let List.675 : Int1 = CallByName Num.24 List.435 List.434; + if List.675 then + jump List.674 List.434; else - jump List.672 List.433; + jump List.674 List.435; procedure List.6 (#Attr.2): - let List.657 : U64 = lowlevel ListLen #Attr.2; - ret List.657; - -procedure List.6 (#Attr.2): - let List.658 : U64 = lowlevel ListLen #Attr.2; - ret List.658; + let List.659 : U64 = lowlevel ListLen #Attr.2; + ret List.659; procedure List.6 (#Attr.2): let List.660 : U64 = lowlevel ListLen #Attr.2; ret List.660; -procedure List.66 (#Attr.2, #Attr.3): - let List.608 : {Str, Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.608; +procedure List.6 (#Attr.2): + let List.662 : U64 = lowlevel ListLen #Attr.2; + ret List.662; procedure List.66 (#Attr.2, #Attr.3): - let List.620 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.620; + let List.610 : {Str, Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.610; + +procedure List.66 (#Attr.2, #Attr.3): + let List.622 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.622; procedure List.68 (#Attr.2): - let List.653 : List Str = lowlevel ListWithCapacity #Attr.2; - ret List.653; - -procedure List.68 (#Attr.2): - let List.655 : List U8 = lowlevel ListWithCapacity #Attr.2; + let List.655 : List Str = lowlevel ListWithCapacity #Attr.2; ret List.655; +procedure List.68 (#Attr.2): + let List.657 : List U8 = lowlevel ListWithCapacity #Attr.2; + ret List.657; + procedure List.70 (#Attr.2, #Attr.3): - let List.574 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; + let List.576 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; + ret List.576; + +procedure List.70 (#Attr.2, #Attr.3): + let List.593 : List Str = lowlevel ListReserve #Attr.2 #Attr.3; + ret List.593; + +procedure List.71 (#Attr.2, #Attr.3): + let List.574 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; ret List.574; -procedure List.70 (#Attr.2, #Attr.3): - let List.591 : List Str = lowlevel ListReserve #Attr.2 #Attr.3; +procedure List.71 (#Attr.2, #Attr.3): + let List.591 : List Str = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; ret List.591; -procedure List.71 (#Attr.2, #Attr.3): - let List.572 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.572; - -procedure List.71 (#Attr.2, #Attr.3): - let List.589 : List Str = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.589; +procedure List.72 (#Attr.2, #Attr.3, #Attr.4): + let List.641 : List Str = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; + ret List.641; procedure List.72 (#Attr.2, #Attr.3, #Attr.4): - let List.639 : List Str = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; - ret List.639; - -procedure List.72 (#Attr.2, #Attr.3, #Attr.4): - let List.667 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; - ret List.667; + let List.669 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; + ret List.669; procedure List.8 (#Attr.2, #Attr.3): - let List.624 : List Str = lowlevel ListConcat #Attr.2 #Attr.3; - ret List.624; + let List.626 : List Str = lowlevel ListConcat #Attr.2 #Attr.3; + ret List.626; procedure List.8 (#Attr.2, #Attr.3): - let List.632 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; - ret List.632; + let List.634 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; + ret List.634; procedure List.80 (#Derived_gen.10, #Derived_gen.11, #Derived_gen.12, #Derived_gen.13, #Derived_gen.14): - joinpoint List.683 List.487 List.488 List.489 List.490 List.491: - let List.685 : Int1 = CallByName Num.22 List.490 List.491; - if List.685 then - let List.694 : U8 = CallByName List.66 List.487 List.490; - let List.686 : [C {U64, Int1}, C {U64, Int1}] = CallByName TotallyNotJson.189 List.488 List.694; - let List.691 : U8 = 1i64; - let List.692 : U8 = GetTagId List.686; - let List.693 : Int1 = lowlevel Eq List.691 List.692; - if List.693 then - let List.492 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.686; - let List.689 : U64 = 1i64; - let List.688 : U64 = CallByName Num.51 List.490 List.689; - jump List.683 List.487 List.492 List.489 List.688 List.491; + joinpoint List.685 List.489 List.490 List.491 List.492 List.493: + let List.687 : Int1 = CallByName Num.22 List.492 List.493; + if List.687 then + let List.696 : U8 = CallByName List.66 List.489 List.492; + let List.688 : [C {U64, Int1}, C {U64, Int1}] = CallByName TotallyNotJson.189 List.490 List.696; + let List.693 : U8 = 1i64; + let List.694 : U8 = GetTagId List.688; + let List.695 : Int1 = lowlevel Eq List.693 List.694; + if List.695 then + let List.494 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.688; + let List.691 : U64 = 1i64; + let List.690 : U64 = CallByName Num.51 List.492 List.691; + jump List.685 List.489 List.494 List.491 List.690 List.493; else - dec List.487; - let List.493 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.686; - let List.690 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) List.493; - ret List.690; + dec List.489; + let List.495 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.688; + let List.692 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) List.495; + ret List.692; else - dec List.487; - let List.684 : [C {U64, Int1}, C {U64, Int1}] = TagId(1) List.488; - ret List.684; + dec List.489; + let List.686 : [C {U64, Int1}, C {U64, Int1}] = TagId(1) List.490; + ret List.686; in - jump List.683 #Derived_gen.10 #Derived_gen.11 #Derived_gen.12 #Derived_gen.13 #Derived_gen.14; + jump List.685 #Derived_gen.10 #Derived_gen.11 #Derived_gen.12 #Derived_gen.13 #Derived_gen.14; -procedure List.89 (#Derived_gen.25, #Derived_gen.26, #Derived_gen.27, #Derived_gen.28, #Derived_gen.29): - joinpoint List.613 List.159 List.160 List.161 List.162 List.163: - let List.615 : Int1 = CallByName Num.22 List.162 List.163; - if List.615 then - let List.619 : U8 = CallByName List.66 List.159 List.162; - let List.164 : List U8 = CallByName TotallyNotJson.215 List.160 List.619; - let List.618 : U64 = 1i64; - let List.617 : U64 = CallByName Num.51 List.162 List.618; - jump List.613 List.159 List.164 List.161 List.617 List.163; +procedure List.90 (#Derived_gen.16, #Derived_gen.17, #Derived_gen.18, #Derived_gen.19, #Derived_gen.20): + joinpoint List.615 List.161 List.162 List.163 List.164 List.165: + let List.617 : Int1 = CallByName Num.22 List.164 List.165; + if List.617 then + let List.621 : U8 = CallByName List.66 List.161 List.164; + let List.166 : List U8 = CallByName TotallyNotJson.215 List.162 List.621; + let List.620 : U64 = 1i64; + let List.619 : U64 = CallByName Num.51 List.164 List.620; + jump List.615 List.161 List.166 List.163 List.619 List.165; else - dec List.159; - ret List.160; + dec List.161; + ret List.162; in - jump List.613 #Derived_gen.25 #Derived_gen.26 #Derived_gen.27 #Derived_gen.28 #Derived_gen.29; + jump List.615 #Derived_gen.16 #Derived_gen.17 #Derived_gen.18 #Derived_gen.19 #Derived_gen.20; -procedure List.89 (#Derived_gen.31, #Derived_gen.32, #Derived_gen.33, #Derived_gen.34, #Derived_gen.35): - joinpoint List.601 List.159 List.160 List.161 List.162 List.163: - let List.603 : Int1 = CallByName Num.22 List.162 List.163; - if List.603 then - let List.607 : {Str, Str} = CallByName List.66 List.159 List.162; - inc List.607; - let List.164 : {List U8, U64} = CallByName TotallyNotJson.237 List.160 List.607 List.161; - let List.606 : U64 = 1i64; - let List.605 : U64 = CallByName Num.51 List.162 List.606; - jump List.601 List.159 List.164 List.161 List.605 List.163; +procedure List.90 (#Derived_gen.21, #Derived_gen.22, #Derived_gen.23, #Derived_gen.24, #Derived_gen.25): + joinpoint List.603 List.161 List.162 List.163 List.164 List.165: + let List.605 : Int1 = CallByName Num.22 List.164 List.165; + if List.605 then + let List.609 : {Str, Str} = CallByName List.66 List.161 List.164; + inc List.609; + let List.166 : {List U8, U64} = CallByName TotallyNotJson.237 List.162 List.609 List.163; + let List.608 : U64 = 1i64; + let List.607 : U64 = CallByName Num.51 List.164 List.608; + jump List.603 List.161 List.166 List.163 List.607 List.165; else - dec List.159; - ret List.160; + dec List.161; + ret List.162; in - jump List.601 #Derived_gen.31 #Derived_gen.32 #Derived_gen.33 #Derived_gen.34 #Derived_gen.35; + jump List.603 #Derived_gen.21 #Derived_gen.22 #Derived_gen.23 #Derived_gen.24 #Derived_gen.25; procedure Num.127 (#Attr.2): let Num.296 : U8 = lowlevel NumIntCast #Attr.2; @@ -1276,7 +1276,7 @@ procedure TotallyNotJson.95 (TotallyNotJson.829): dec TotallyNotJson.1492; ret TotallyNotJson.1491; -procedure TotallyNotJson.96 (#Derived_gen.30): +procedure TotallyNotJson.96 (#Derived_gen.35): joinpoint TotallyNotJson.1499 TotallyNotJson.1168: let TotallyNotJson.834 : List Str = StructAtIndex 0 TotallyNotJson.1168; let TotallyNotJson.833 : List Str = StructAtIndex 1 TotallyNotJson.1168; @@ -1314,7 +1314,7 @@ procedure TotallyNotJson.96 (#Derived_gen.30): let TotallyNotJson.1500 : {List Str, List Str} = Struct {TotallyNotJson.834, TotallyNotJson.833}; ret TotallyNotJson.1500; in - jump TotallyNotJson.1499 #Derived_gen.30; + jump TotallyNotJson.1499 #Derived_gen.35; procedure TotallyNotJson.97 (TotallyNotJson.837): let TotallyNotJson.838 : List Str = CallByName Str.55 TotallyNotJson.837; diff --git a/crates/compiler/test_mono/generated/encode_derived_record_two_field_strings.txt b/crates/compiler/test_mono/generated/encode_derived_record_two_field_strings.txt index 12d0964dec..dd583a5743 100644 --- a/crates/compiler/test_mono/generated/encode_derived_record_two_field_strings.txt +++ b/crates/compiler/test_mono/generated/encode_derived_record_two_field_strings.txt @@ -53,212 +53,212 @@ procedure Encode.26 (Encode.105, Encode.106): let Encode.108 : List U8 = CallByName Encode.24 Encode.109 Encode.110 Encode.106; ret Encode.108; -procedure List.101 (List.484, List.485, List.486): - let List.681 : U64 = 0i64; - let List.682 : U64 = CallByName List.6 List.484; - let List.680 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.80 List.484 List.485 List.486 List.681 List.682; - ret List.680; +procedure List.102 (List.486, List.487, List.488): + let List.683 : U64 = 0i64; + let List.684 : U64 = CallByName List.6 List.486; + let List.682 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.80 List.486 List.487 List.488 List.683 List.684; + ret List.682; procedure List.13 (#Attr.2, #Attr.3): - let List.661 : List Str = lowlevel ListPrepend #Attr.2 #Attr.3; - ret List.661; + let List.663 : List Str = lowlevel ListPrepend #Attr.2 #Attr.3; + ret List.663; -procedure List.18 (List.156, List.157, List.158): - let List.599 : U64 = 0i64; - let List.600 : U64 = CallByName List.6 List.156; - let List.598 : {List U8, U64} = CallByName List.89 List.156 List.157 List.158 List.599 List.600; - ret List.598; +procedure List.18 (List.158, List.159, List.160): + let List.601 : U64 = 0i64; + let List.602 : U64 = CallByName List.6 List.158; + let List.600 : {List U8, U64} = CallByName List.90 List.158 List.159 List.160 List.601 List.602; + ret List.600; -procedure List.18 (List.156, List.157, List.158): - let List.611 : U64 = 0i64; - let List.612 : U64 = CallByName List.6 List.156; - let List.610 : List U8 = CallByName List.89 List.156 List.157 List.158 List.611 List.612; - ret List.610; +procedure List.18 (List.158, List.159, List.160): + let List.613 : U64 = 0i64; + let List.614 : U64 = CallByName List.6 List.158; + let List.612 : List U8 = CallByName List.90 List.158 List.159 List.160 List.613 List.614; + ret List.612; -procedure List.26 (List.197, List.198, List.199): - let List.674 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.101 List.197 List.198 List.199; - let List.677 : U8 = 1i64; - let List.678 : U8 = GetTagId List.674; - let List.679 : Int1 = lowlevel Eq List.677 List.678; - if List.679 then - let List.200 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.674; - ret List.200; +procedure List.26 (List.199, List.200, List.201): + let List.676 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.102 List.199 List.200 List.201; + let List.679 : U8 = 1i64; + let List.680 : U8 = GetTagId List.676; + let List.681 : Int1 = lowlevel Eq List.679 List.680; + if List.681 then + let List.202 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.676; + ret List.202; else - let List.201 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.674; - ret List.201; + let List.203 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.676; + ret List.203; -procedure List.38 (List.340, List.341): - let List.651 : U64 = CallByName List.6 List.340; - let List.342 : U64 = CallByName Num.77 List.651 List.341; - let List.650 : List Str = CallByName List.43 List.340 List.342; - ret List.650; +procedure List.38 (List.342, List.343): + let List.653 : U64 = CallByName List.6 List.342; + let List.344 : U64 = CallByName Num.77 List.653 List.343; + let List.652 : List Str = CallByName List.43 List.342 List.344; + ret List.652; -procedure List.4 (List.121, List.122): - let List.594 : U64 = 1i64; - let List.593 : List Str = CallByName List.70 List.121 List.594; - let List.592 : List Str = CallByName List.71 List.593 List.122; - ret List.592; +procedure List.4 (List.122, List.123): + let List.596 : U64 = 1i64; + let List.595 : List Str = CallByName List.70 List.122 List.596; + let List.594 : List Str = CallByName List.71 List.595 List.123; + ret List.594; -procedure List.4 (List.121, List.122): - let List.597 : U64 = 1i64; - let List.596 : List U8 = CallByName List.70 List.121 List.597; - let List.595 : List U8 = CallByName List.71 List.596 List.122; - ret List.595; +procedure List.4 (List.122, List.123): + let List.599 : U64 = 1i64; + let List.598 : List U8 = CallByName List.70 List.122 List.599; + let List.597 : List U8 = CallByName List.71 List.598 List.123; + ret List.597; -procedure List.43 (List.338, List.339): - let List.641 : U64 = CallByName List.6 List.338; - let List.640 : U64 = CallByName Num.77 List.641 List.339; - let List.635 : {U64, U64} = Struct {List.339, List.640}; - let List.634 : List Str = CallByName List.49 List.338 List.635; - ret List.634; - -procedure List.49 (List.416, List.417): - let List.637 : U64 = StructAtIndex 1 List.417; - let List.638 : U64 = StructAtIndex 0 List.417; - let List.636 : List Str = CallByName List.72 List.416 List.637 List.638; +procedure List.43 (List.340, List.341): + let List.643 : U64 = CallByName List.6 List.340; + let List.642 : U64 = CallByName Num.77 List.643 List.341; + let List.637 : {U64, U64} = Struct {List.341, List.642}; + let List.636 : List Str = CallByName List.49 List.340 List.637; ret List.636; -procedure List.49 (List.416, List.417): - let List.665 : U64 = StructAtIndex 1 List.417; - let List.666 : U64 = StructAtIndex 0 List.417; - let List.664 : List U8 = CallByName List.72 List.416 List.665 List.666; - ret List.664; +procedure List.49 (List.418, List.419): + let List.639 : U64 = StructAtIndex 1 List.419; + let List.640 : U64 = StructAtIndex 0 List.419; + let List.638 : List Str = CallByName List.72 List.418 List.639 List.640; + ret List.638; -procedure List.52 (List.431, List.432): - let List.433 : U64 = CallByName List.6 List.431; - joinpoint List.672 List.434: - let List.670 : U64 = 0i64; - let List.669 : {U64, U64} = Struct {List.434, List.670}; - inc List.431; - let List.435 : List U8 = CallByName List.49 List.431 List.669; - let List.668 : U64 = CallByName Num.75 List.433 List.434; - let List.663 : {U64, U64} = Struct {List.668, List.434}; - let List.436 : List U8 = CallByName List.49 List.431 List.663; - let List.662 : {List U8, List U8} = Struct {List.435, List.436}; - ret List.662; +procedure List.49 (List.418, List.419): + let List.667 : U64 = StructAtIndex 1 List.419; + let List.668 : U64 = StructAtIndex 0 List.419; + let List.666 : List U8 = CallByName List.72 List.418 List.667 List.668; + ret List.666; + +procedure List.52 (List.433, List.434): + let List.435 : U64 = CallByName List.6 List.433; + joinpoint List.674 List.436: + let List.672 : U64 = 0i64; + let List.671 : {U64, U64} = Struct {List.436, List.672}; + inc List.433; + let List.437 : List U8 = CallByName List.49 List.433 List.671; + let List.670 : U64 = CallByName Num.75 List.435 List.436; + let List.665 : {U64, U64} = Struct {List.670, List.436}; + let List.438 : List U8 = CallByName List.49 List.433 List.665; + let List.664 : {List U8, List U8} = Struct {List.437, List.438}; + ret List.664; in - let List.673 : Int1 = CallByName Num.24 List.433 List.432; - if List.673 then - jump List.672 List.432; + let List.675 : Int1 = CallByName Num.24 List.435 List.434; + if List.675 then + jump List.674 List.434; else - jump List.672 List.433; + jump List.674 List.435; procedure List.6 (#Attr.2): - let List.657 : U64 = lowlevel ListLen #Attr.2; - ret List.657; - -procedure List.6 (#Attr.2): - let List.658 : U64 = lowlevel ListLen #Attr.2; - ret List.658; + let List.659 : U64 = lowlevel ListLen #Attr.2; + ret List.659; procedure List.6 (#Attr.2): let List.660 : U64 = lowlevel ListLen #Attr.2; ret List.660; -procedure List.66 (#Attr.2, #Attr.3): - let List.608 : {Str, Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.608; +procedure List.6 (#Attr.2): + let List.662 : U64 = lowlevel ListLen #Attr.2; + ret List.662; procedure List.66 (#Attr.2, #Attr.3): - let List.620 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.620; + let List.610 : {Str, Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.610; + +procedure List.66 (#Attr.2, #Attr.3): + let List.622 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.622; procedure List.68 (#Attr.2): - let List.653 : List Str = lowlevel ListWithCapacity #Attr.2; - ret List.653; - -procedure List.68 (#Attr.2): - let List.655 : List U8 = lowlevel ListWithCapacity #Attr.2; + let List.655 : List Str = lowlevel ListWithCapacity #Attr.2; ret List.655; +procedure List.68 (#Attr.2): + let List.657 : List U8 = lowlevel ListWithCapacity #Attr.2; + ret List.657; + procedure List.70 (#Attr.2, #Attr.3): - let List.574 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; + let List.576 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; + ret List.576; + +procedure List.70 (#Attr.2, #Attr.3): + let List.593 : List Str = lowlevel ListReserve #Attr.2 #Attr.3; + ret List.593; + +procedure List.71 (#Attr.2, #Attr.3): + let List.574 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; ret List.574; -procedure List.70 (#Attr.2, #Attr.3): - let List.591 : List Str = lowlevel ListReserve #Attr.2 #Attr.3; +procedure List.71 (#Attr.2, #Attr.3): + let List.591 : List Str = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; ret List.591; -procedure List.71 (#Attr.2, #Attr.3): - let List.572 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.572; - -procedure List.71 (#Attr.2, #Attr.3): - let List.589 : List Str = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.589; +procedure List.72 (#Attr.2, #Attr.3, #Attr.4): + let List.641 : List Str = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; + ret List.641; procedure List.72 (#Attr.2, #Attr.3, #Attr.4): - let List.639 : List Str = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; - ret List.639; - -procedure List.72 (#Attr.2, #Attr.3, #Attr.4): - let List.667 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; - ret List.667; + let List.669 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; + ret List.669; procedure List.8 (#Attr.2, #Attr.3): - let List.624 : List Str = lowlevel ListConcat #Attr.2 #Attr.3; - ret List.624; + let List.626 : List Str = lowlevel ListConcat #Attr.2 #Attr.3; + ret List.626; procedure List.8 (#Attr.2, #Attr.3): - let List.632 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; - ret List.632; + let List.634 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; + ret List.634; procedure List.80 (#Derived_gen.14, #Derived_gen.15, #Derived_gen.16, #Derived_gen.17, #Derived_gen.18): - joinpoint List.683 List.487 List.488 List.489 List.490 List.491: - let List.685 : Int1 = CallByName Num.22 List.490 List.491; - if List.685 then - let List.694 : U8 = CallByName List.66 List.487 List.490; - let List.686 : [C {U64, Int1}, C {U64, Int1}] = CallByName TotallyNotJson.189 List.488 List.694; - let List.691 : U8 = 1i64; - let List.692 : U8 = GetTagId List.686; - let List.693 : Int1 = lowlevel Eq List.691 List.692; - if List.693 then - let List.492 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.686; - let List.689 : U64 = 1i64; - let List.688 : U64 = CallByName Num.51 List.490 List.689; - jump List.683 List.487 List.492 List.489 List.688 List.491; + joinpoint List.685 List.489 List.490 List.491 List.492 List.493: + let List.687 : Int1 = CallByName Num.22 List.492 List.493; + if List.687 then + let List.696 : U8 = CallByName List.66 List.489 List.492; + let List.688 : [C {U64, Int1}, C {U64, Int1}] = CallByName TotallyNotJson.189 List.490 List.696; + let List.693 : U8 = 1i64; + let List.694 : U8 = GetTagId List.688; + let List.695 : Int1 = lowlevel Eq List.693 List.694; + if List.695 then + let List.494 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.688; + let List.691 : U64 = 1i64; + let List.690 : U64 = CallByName Num.51 List.492 List.691; + jump List.685 List.489 List.494 List.491 List.690 List.493; else - dec List.487; - let List.493 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.686; - let List.690 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) List.493; - ret List.690; + dec List.489; + let List.495 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.688; + let List.692 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) List.495; + ret List.692; else - dec List.487; - let List.684 : [C {U64, Int1}, C {U64, Int1}] = TagId(1) List.488; - ret List.684; + dec List.489; + let List.686 : [C {U64, Int1}, C {U64, Int1}] = TagId(1) List.490; + ret List.686; in - jump List.683 #Derived_gen.14 #Derived_gen.15 #Derived_gen.16 #Derived_gen.17 #Derived_gen.18; + jump List.685 #Derived_gen.14 #Derived_gen.15 #Derived_gen.16 #Derived_gen.17 #Derived_gen.18; -procedure List.89 (#Derived_gen.29, #Derived_gen.30, #Derived_gen.31, #Derived_gen.32, #Derived_gen.33): - joinpoint List.613 List.159 List.160 List.161 List.162 List.163: - let List.615 : Int1 = CallByName Num.22 List.162 List.163; - if List.615 then - let List.619 : U8 = CallByName List.66 List.159 List.162; - let List.164 : List U8 = CallByName TotallyNotJson.215 List.160 List.619; - let List.618 : U64 = 1i64; - let List.617 : U64 = CallByName Num.51 List.162 List.618; - jump List.613 List.159 List.164 List.161 List.617 List.163; +procedure List.90 (#Derived_gen.20, #Derived_gen.21, #Derived_gen.22, #Derived_gen.23, #Derived_gen.24): + joinpoint List.615 List.161 List.162 List.163 List.164 List.165: + let List.617 : Int1 = CallByName Num.22 List.164 List.165; + if List.617 then + let List.621 : U8 = CallByName List.66 List.161 List.164; + let List.166 : List U8 = CallByName TotallyNotJson.215 List.162 List.621; + let List.620 : U64 = 1i64; + let List.619 : U64 = CallByName Num.51 List.164 List.620; + jump List.615 List.161 List.166 List.163 List.619 List.165; else - dec List.159; - ret List.160; + dec List.161; + ret List.162; in - jump List.613 #Derived_gen.29 #Derived_gen.30 #Derived_gen.31 #Derived_gen.32 #Derived_gen.33; + jump List.615 #Derived_gen.20 #Derived_gen.21 #Derived_gen.22 #Derived_gen.23 #Derived_gen.24; -procedure List.89 (#Derived_gen.35, #Derived_gen.36, #Derived_gen.37, #Derived_gen.38, #Derived_gen.39): - joinpoint List.601 List.159 List.160 List.161 List.162 List.163: - let List.603 : Int1 = CallByName Num.22 List.162 List.163; - if List.603 then - let List.607 : {Str, Str} = CallByName List.66 List.159 List.162; - inc List.607; - let List.164 : {List U8, U64} = CallByName TotallyNotJson.237 List.160 List.607 List.161; - let List.606 : U64 = 1i64; - let List.605 : U64 = CallByName Num.51 List.162 List.606; - jump List.601 List.159 List.164 List.161 List.605 List.163; +procedure List.90 (#Derived_gen.25, #Derived_gen.26, #Derived_gen.27, #Derived_gen.28, #Derived_gen.29): + joinpoint List.603 List.161 List.162 List.163 List.164 List.165: + let List.605 : Int1 = CallByName Num.22 List.164 List.165; + if List.605 then + let List.609 : {Str, Str} = CallByName List.66 List.161 List.164; + inc List.609; + let List.166 : {List U8, U64} = CallByName TotallyNotJson.237 List.162 List.609 List.163; + let List.608 : U64 = 1i64; + let List.607 : U64 = CallByName Num.51 List.164 List.608; + jump List.603 List.161 List.166 List.163 List.607 List.165; else - dec List.159; - ret List.160; + dec List.161; + ret List.162; in - jump List.601 #Derived_gen.35 #Derived_gen.36 #Derived_gen.37 #Derived_gen.38 #Derived_gen.39; + jump List.603 #Derived_gen.25 #Derived_gen.26 #Derived_gen.27 #Derived_gen.28 #Derived_gen.29; procedure Num.127 (#Attr.2): let Num.296 : U8 = lowlevel NumIntCast #Attr.2; @@ -1283,7 +1283,7 @@ procedure TotallyNotJson.95 (TotallyNotJson.829): dec TotallyNotJson.1492; ret TotallyNotJson.1491; -procedure TotallyNotJson.96 (#Derived_gen.34): +procedure TotallyNotJson.96 (#Derived_gen.39): joinpoint TotallyNotJson.1499 TotallyNotJson.1168: let TotallyNotJson.834 : List Str = StructAtIndex 0 TotallyNotJson.1168; let TotallyNotJson.833 : List Str = StructAtIndex 1 TotallyNotJson.1168; @@ -1321,7 +1321,7 @@ procedure TotallyNotJson.96 (#Derived_gen.34): let TotallyNotJson.1500 : {List Str, List Str} = Struct {TotallyNotJson.834, TotallyNotJson.833}; ret TotallyNotJson.1500; in - jump TotallyNotJson.1499 #Derived_gen.34; + jump TotallyNotJson.1499 #Derived_gen.39; procedure TotallyNotJson.97 (TotallyNotJson.837): let TotallyNotJson.838 : List Str = CallByName Str.55 TotallyNotJson.837; diff --git a/crates/compiler/test_mono/generated/encode_derived_string.txt b/crates/compiler/test_mono/generated/encode_derived_string.txt index 6ee8452eb5..1441d95059 100644 --- a/crates/compiler/test_mono/generated/encode_derived_string.txt +++ b/crates/compiler/test_mono/generated/encode_derived_string.txt @@ -11,115 +11,115 @@ procedure Encode.26 (Encode.105, Encode.106): let Encode.108 : List U8 = CallByName Encode.24 Encode.109 Encode.110 Encode.106; ret Encode.108; -procedure List.101 (List.484, List.485, List.486): - let List.612 : U64 = 0i64; - let List.613 : U64 = CallByName List.6 List.484; - let List.611 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.80 List.484 List.485 List.486 List.612 List.613; - ret List.611; +procedure List.102 (List.486, List.487, List.488): + let List.614 : U64 = 0i64; + let List.615 : U64 = CallByName List.6 List.486; + let List.613 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.80 List.486 List.487 List.488 List.614 List.615; + ret List.613; -procedure List.18 (List.156, List.157, List.158): - let List.583 : U64 = 0i64; - let List.584 : U64 = CallByName List.6 List.156; - let List.582 : List U8 = CallByName List.89 List.156 List.157 List.158 List.583 List.584; - ret List.582; +procedure List.18 (List.158, List.159, List.160): + let List.585 : U64 = 0i64; + let List.586 : U64 = CallByName List.6 List.158; + let List.584 : List U8 = CallByName List.90 List.158 List.159 List.160 List.585 List.586; + ret List.584; -procedure List.26 (List.197, List.198, List.199): - let List.605 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.101 List.197 List.198 List.199; - let List.608 : U8 = 1i64; - let List.609 : U8 = GetTagId List.605; - let List.610 : Int1 = lowlevel Eq List.608 List.609; - if List.610 then - let List.200 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.605; - ret List.200; +procedure List.26 (List.199, List.200, List.201): + let List.607 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.102 List.199 List.200 List.201; + let List.610 : U8 = 1i64; + let List.611 : U8 = GetTagId List.607; + let List.612 : Int1 = lowlevel Eq List.610 List.611; + if List.612 then + let List.202 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.607; + ret List.202; else - let List.201 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.605; - ret List.201; + let List.203 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.607; + ret List.203; -procedure List.49 (List.416, List.417): - let List.596 : U64 = StructAtIndex 1 List.417; - let List.597 : U64 = StructAtIndex 0 List.417; - let List.595 : List U8 = CallByName List.72 List.416 List.596 List.597; - ret List.595; +procedure List.49 (List.418, List.419): + let List.598 : U64 = StructAtIndex 1 List.419; + let List.599 : U64 = StructAtIndex 0 List.419; + let List.597 : List U8 = CallByName List.72 List.418 List.598 List.599; + ret List.597; -procedure List.52 (List.431, List.432): - let List.433 : U64 = CallByName List.6 List.431; - joinpoint List.603 List.434: - let List.601 : U64 = 0i64; - let List.600 : {U64, U64} = Struct {List.434, List.601}; - inc List.431; - let List.435 : List U8 = CallByName List.49 List.431 List.600; - let List.599 : U64 = CallByName Num.75 List.433 List.434; - let List.594 : {U64, U64} = Struct {List.599, List.434}; - let List.436 : List U8 = CallByName List.49 List.431 List.594; - let List.593 : {List U8, List U8} = Struct {List.435, List.436}; - ret List.593; +procedure List.52 (List.433, List.434): + let List.435 : U64 = CallByName List.6 List.433; + joinpoint List.605 List.436: + let List.603 : U64 = 0i64; + let List.602 : {U64, U64} = Struct {List.436, List.603}; + inc List.433; + let List.437 : List U8 = CallByName List.49 List.433 List.602; + let List.601 : U64 = CallByName Num.75 List.435 List.436; + let List.596 : {U64, U64} = Struct {List.601, List.436}; + let List.438 : List U8 = CallByName List.49 List.433 List.596; + let List.595 : {List U8, List U8} = Struct {List.437, List.438}; + ret List.595; in - let List.604 : Int1 = CallByName Num.24 List.433 List.432; - if List.604 then - jump List.603 List.432; + let List.606 : Int1 = CallByName Num.24 List.435 List.434; + if List.606 then + jump List.605 List.434; else - jump List.603 List.433; + jump List.605 List.435; procedure List.6 (#Attr.2): - let List.581 : U64 = lowlevel ListLen #Attr.2; - ret List.581; + let List.583 : U64 = lowlevel ListLen #Attr.2; + ret List.583; procedure List.66 (#Attr.2, #Attr.3): - let List.592 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.592; + let List.594 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.594; procedure List.68 (#Attr.2): - let List.579 : List U8 = lowlevel ListWithCapacity #Attr.2; - ret List.579; + let List.581 : List U8 = lowlevel ListWithCapacity #Attr.2; + ret List.581; procedure List.72 (#Attr.2, #Attr.3, #Attr.4): - let List.598 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; - ret List.598; + let List.600 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; + ret List.600; procedure List.8 (#Attr.2, #Attr.3): - let List.577 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; - ret List.577; + let List.579 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; + ret List.579; procedure List.80 (#Derived_gen.8, #Derived_gen.9, #Derived_gen.10, #Derived_gen.11, #Derived_gen.12): - joinpoint List.614 List.487 List.488 List.489 List.490 List.491: - let List.616 : Int1 = CallByName Num.22 List.490 List.491; - if List.616 then - let List.625 : U8 = CallByName List.66 List.487 List.490; - let List.617 : [C {U64, Int1}, C {U64, Int1}] = CallByName TotallyNotJson.189 List.488 List.625; - let List.622 : U8 = 1i64; - let List.623 : U8 = GetTagId List.617; - let List.624 : Int1 = lowlevel Eq List.622 List.623; - if List.624 then - let List.492 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.617; - let List.620 : U64 = 1i64; - let List.619 : U64 = CallByName Num.51 List.490 List.620; - jump List.614 List.487 List.492 List.489 List.619 List.491; + joinpoint List.616 List.489 List.490 List.491 List.492 List.493: + let List.618 : Int1 = CallByName Num.22 List.492 List.493; + if List.618 then + let List.627 : U8 = CallByName List.66 List.489 List.492; + let List.619 : [C {U64, Int1}, C {U64, Int1}] = CallByName TotallyNotJson.189 List.490 List.627; + let List.624 : U8 = 1i64; + let List.625 : U8 = GetTagId List.619; + let List.626 : Int1 = lowlevel Eq List.624 List.625; + if List.626 then + let List.494 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.619; + let List.622 : U64 = 1i64; + let List.621 : U64 = CallByName Num.51 List.492 List.622; + jump List.616 List.489 List.494 List.491 List.621 List.493; else - dec List.487; - let List.493 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.617; - let List.621 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) List.493; - ret List.621; + dec List.489; + let List.495 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.619; + let List.623 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) List.495; + ret List.623; else - dec List.487; - let List.615 : [C {U64, Int1}, C {U64, Int1}] = TagId(1) List.488; - ret List.615; + dec List.489; + let List.617 : [C {U64, Int1}, C {U64, Int1}] = TagId(1) List.490; + ret List.617; in - jump List.614 #Derived_gen.8 #Derived_gen.9 #Derived_gen.10 #Derived_gen.11 #Derived_gen.12; + jump List.616 #Derived_gen.8 #Derived_gen.9 #Derived_gen.10 #Derived_gen.11 #Derived_gen.12; -procedure List.89 (#Derived_gen.0, #Derived_gen.1, #Derived_gen.2, #Derived_gen.3, #Derived_gen.4): - joinpoint List.585 List.159 List.160 List.161 List.162 List.163: - let List.587 : Int1 = CallByName Num.22 List.162 List.163; - if List.587 then - let List.591 : U8 = CallByName List.66 List.159 List.162; - let List.164 : List U8 = CallByName TotallyNotJson.215 List.160 List.591; - let List.590 : U64 = 1i64; - let List.589 : U64 = CallByName Num.51 List.162 List.590; - jump List.585 List.159 List.164 List.161 List.589 List.163; +procedure List.90 (#Derived_gen.0, #Derived_gen.1, #Derived_gen.2, #Derived_gen.3, #Derived_gen.4): + joinpoint List.587 List.161 List.162 List.163 List.164 List.165: + let List.589 : Int1 = CallByName Num.22 List.164 List.165; + if List.589 then + let List.593 : U8 = CallByName List.66 List.161 List.164; + let List.166 : List U8 = CallByName TotallyNotJson.215 List.162 List.593; + let List.592 : U64 = 1i64; + let List.591 : U64 = CallByName Num.51 List.164 List.592; + jump List.587 List.161 List.166 List.163 List.591 List.165; else - dec List.159; - ret List.160; + dec List.161; + ret List.162; in - jump List.585 #Derived_gen.0 #Derived_gen.1 #Derived_gen.2 #Derived_gen.3 #Derived_gen.4; + jump List.587 #Derived_gen.0 #Derived_gen.1 #Derived_gen.2 #Derived_gen.3 #Derived_gen.4; procedure Num.19 (#Attr.2, #Attr.3): let Num.292 : U64 = lowlevel NumAdd #Attr.2 #Attr.3; diff --git a/crates/compiler/test_mono/generated/encode_derived_tag_one_field_string.txt b/crates/compiler/test_mono/generated/encode_derived_tag_one_field_string.txt index ef63b007eb..7c0ce985e2 100644 --- a/crates/compiler/test_mono/generated/encode_derived_tag_one_field_string.txt +++ b/crates/compiler/test_mono/generated/encode_derived_tag_one_field_string.txt @@ -40,159 +40,159 @@ procedure Encode.26 (Encode.105, Encode.106): let Encode.108 : List U8 = CallByName Encode.24 Encode.109 Encode.110 Encode.106; ret Encode.108; -procedure List.101 (List.484, List.485, List.486): - let List.653 : U64 = 0i64; - let List.654 : U64 = CallByName List.6 List.484; - let List.652 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.80 List.484 List.485 List.486 List.653 List.654; - ret List.652; +procedure List.102 (List.486, List.487, List.488): + let List.655 : U64 = 0i64; + let List.656 : U64 = CallByName List.6 List.486; + let List.654 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.80 List.486 List.487 List.488 List.655 List.656; + ret List.654; -procedure List.18 (List.156, List.157, List.158): - let List.597 : U64 = 0i64; - let List.598 : U64 = CallByName List.6 List.156; - let List.596 : {List U8, U64} = CallByName List.89 List.156 List.157 List.158 List.597 List.598; - ret List.596; +procedure List.18 (List.158, List.159, List.160): + let List.599 : U64 = 0i64; + let List.600 : U64 = CallByName List.6 List.158; + let List.598 : {List U8, U64} = CallByName List.90 List.158 List.159 List.160 List.599 List.600; + ret List.598; -procedure List.18 (List.156, List.157, List.158): - let List.609 : U64 = 0i64; - let List.610 : U64 = CallByName List.6 List.156; - let List.608 : List U8 = CallByName List.89 List.156 List.157 List.158 List.609 List.610; - ret List.608; +procedure List.18 (List.158, List.159, List.160): + let List.611 : U64 = 0i64; + let List.612 : U64 = CallByName List.6 List.158; + let List.610 : List U8 = CallByName List.90 List.158 List.159 List.160 List.611 List.612; + ret List.610; -procedure List.26 (List.197, List.198, List.199): - let List.646 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.101 List.197 List.198 List.199; - let List.649 : U8 = 1i64; - let List.650 : U8 = GetTagId List.646; - let List.651 : Int1 = lowlevel Eq List.649 List.650; - if List.651 then - let List.200 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.646; - ret List.200; +procedure List.26 (List.199, List.200, List.201): + let List.648 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.102 List.199 List.200 List.201; + let List.651 : U8 = 1i64; + let List.652 : U8 = GetTagId List.648; + let List.653 : Int1 = lowlevel Eq List.651 List.652; + if List.653 then + let List.202 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.648; + ret List.202; else - let List.201 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.646; - ret List.201; + let List.203 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.648; + ret List.203; -procedure List.4 (List.121, List.122): - let List.595 : U64 = 1i64; - let List.594 : List U8 = CallByName List.70 List.121 List.595; - let List.593 : List U8 = CallByName List.71 List.594 List.122; - ret List.593; +procedure List.4 (List.122, List.123): + let List.597 : U64 = 1i64; + let List.596 : List U8 = CallByName List.70 List.122 List.597; + let List.595 : List U8 = CallByName List.71 List.596 List.123; + ret List.595; -procedure List.49 (List.416, List.417): - let List.637 : U64 = StructAtIndex 1 List.417; - let List.638 : U64 = StructAtIndex 0 List.417; - let List.636 : List U8 = CallByName List.72 List.416 List.637 List.638; - ret List.636; +procedure List.49 (List.418, List.419): + let List.639 : U64 = StructAtIndex 1 List.419; + let List.640 : U64 = StructAtIndex 0 List.419; + let List.638 : List U8 = CallByName List.72 List.418 List.639 List.640; + ret List.638; -procedure List.52 (List.431, List.432): - let List.433 : U64 = CallByName List.6 List.431; - joinpoint List.644 List.434: - let List.642 : U64 = 0i64; - let List.641 : {U64, U64} = Struct {List.434, List.642}; - inc List.431; - let List.435 : List U8 = CallByName List.49 List.431 List.641; - let List.640 : U64 = CallByName Num.75 List.433 List.434; - let List.635 : {U64, U64} = Struct {List.640, List.434}; - let List.436 : List U8 = CallByName List.49 List.431 List.635; - let List.634 : {List U8, List U8} = Struct {List.435, List.436}; - ret List.634; +procedure List.52 (List.433, List.434): + let List.435 : U64 = CallByName List.6 List.433; + joinpoint List.646 List.436: + let List.644 : U64 = 0i64; + let List.643 : {U64, U64} = Struct {List.436, List.644}; + inc List.433; + let List.437 : List U8 = CallByName List.49 List.433 List.643; + let List.642 : U64 = CallByName Num.75 List.435 List.436; + let List.637 : {U64, U64} = Struct {List.642, List.436}; + let List.438 : List U8 = CallByName List.49 List.433 List.637; + let List.636 : {List U8, List U8} = Struct {List.437, List.438}; + ret List.636; in - let List.645 : Int1 = CallByName Num.24 List.433 List.432; - if List.645 then - jump List.644 List.432; + let List.647 : Int1 = CallByName Num.24 List.435 List.434; + if List.647 then + jump List.646 List.434; else - jump List.644 List.433; - -procedure List.6 (#Attr.2): - let List.620 : U64 = lowlevel ListLen #Attr.2; - ret List.620; + jump List.646 List.435; procedure List.6 (#Attr.2): let List.622 : U64 = lowlevel ListLen #Attr.2; ret List.622; -procedure List.66 (#Attr.2, #Attr.3): - let List.606 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.606; +procedure List.6 (#Attr.2): + let List.624 : U64 = lowlevel ListLen #Attr.2; + ret List.624; procedure List.66 (#Attr.2, #Attr.3): - let List.618 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.618; + let List.608 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.608; + +procedure List.66 (#Attr.2, #Attr.3): + let List.620 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.620; procedure List.68 (#Attr.2): - let List.633 : List U8 = lowlevel ListWithCapacity #Attr.2; - ret List.633; + let List.635 : List U8 = lowlevel ListWithCapacity #Attr.2; + ret List.635; procedure List.70 (#Attr.2, #Attr.3): - let List.574 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; - ret List.574; + let List.576 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; + ret List.576; procedure List.71 (#Attr.2, #Attr.3): - let List.572 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.572; + let List.574 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; + ret List.574; procedure List.72 (#Attr.2, #Attr.3, #Attr.4): - let List.639 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; - ret List.639; + let List.641 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; + ret List.641; procedure List.8 (#Attr.2, #Attr.3): - let List.631 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; - ret List.631; + let List.633 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; + ret List.633; -procedure List.80 (#Derived_gen.26, #Derived_gen.27, #Derived_gen.28, #Derived_gen.29, #Derived_gen.30): - joinpoint List.655 List.487 List.488 List.489 List.490 List.491: - let List.657 : Int1 = CallByName Num.22 List.490 List.491; - if List.657 then - let List.666 : U8 = CallByName List.66 List.487 List.490; - let List.658 : [C {U64, Int1}, C {U64, Int1}] = CallByName TotallyNotJson.189 List.488 List.666; - let List.663 : U8 = 1i64; - let List.664 : U8 = GetTagId List.658; - let List.665 : Int1 = lowlevel Eq List.663 List.664; - if List.665 then - let List.492 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.658; - let List.661 : U64 = 1i64; - let List.660 : U64 = CallByName Num.51 List.490 List.661; - jump List.655 List.487 List.492 List.489 List.660 List.491; +procedure List.80 (#Derived_gen.21, #Derived_gen.22, #Derived_gen.23, #Derived_gen.24, #Derived_gen.25): + joinpoint List.657 List.489 List.490 List.491 List.492 List.493: + let List.659 : Int1 = CallByName Num.22 List.492 List.493; + if List.659 then + let List.668 : U8 = CallByName List.66 List.489 List.492; + let List.660 : [C {U64, Int1}, C {U64, Int1}] = CallByName TotallyNotJson.189 List.490 List.668; + let List.665 : U8 = 1i64; + let List.666 : U8 = GetTagId List.660; + let List.667 : Int1 = lowlevel Eq List.665 List.666; + if List.667 then + let List.494 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.660; + let List.663 : U64 = 1i64; + let List.662 : U64 = CallByName Num.51 List.492 List.663; + jump List.657 List.489 List.494 List.491 List.662 List.493; else - dec List.487; - let List.493 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.658; - let List.662 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) List.493; - ret List.662; + dec List.489; + let List.495 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.660; + let List.664 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) List.495; + ret List.664; else - dec List.487; - let List.656 : [C {U64, Int1}, C {U64, Int1}] = TagId(1) List.488; - ret List.656; + dec List.489; + let List.658 : [C {U64, Int1}, C {U64, Int1}] = TagId(1) List.490; + ret List.658; in - jump List.655 #Derived_gen.26 #Derived_gen.27 #Derived_gen.28 #Derived_gen.29 #Derived_gen.30; + jump List.657 #Derived_gen.21 #Derived_gen.22 #Derived_gen.23 #Derived_gen.24 #Derived_gen.25; -procedure List.89 (#Derived_gen.10, #Derived_gen.11, #Derived_gen.12, #Derived_gen.13, #Derived_gen.14): - joinpoint List.611 List.159 List.160 List.161 List.162 List.163: - let List.613 : Int1 = CallByName Num.22 List.162 List.163; - if List.613 then - let List.617 : U8 = CallByName List.66 List.159 List.162; - let List.164 : List U8 = CallByName TotallyNotJson.215 List.160 List.617; - let List.616 : U64 = 1i64; - let List.615 : U64 = CallByName Num.51 List.162 List.616; - jump List.611 List.159 List.164 List.161 List.615 List.163; +procedure List.90 (#Derived_gen.10, #Derived_gen.11, #Derived_gen.12, #Derived_gen.13, #Derived_gen.14): + joinpoint List.613 List.161 List.162 List.163 List.164 List.165: + let List.615 : Int1 = CallByName Num.22 List.164 List.165; + if List.615 then + let List.619 : U8 = CallByName List.66 List.161 List.164; + let List.166 : List U8 = CallByName TotallyNotJson.215 List.162 List.619; + let List.618 : U64 = 1i64; + let List.617 : U64 = CallByName Num.51 List.164 List.618; + jump List.613 List.161 List.166 List.163 List.617 List.165; else - dec List.159; - ret List.160; + dec List.161; + ret List.162; in - jump List.611 #Derived_gen.10 #Derived_gen.11 #Derived_gen.12 #Derived_gen.13 #Derived_gen.14; + jump List.613 #Derived_gen.10 #Derived_gen.11 #Derived_gen.12 #Derived_gen.13 #Derived_gen.14; -procedure List.89 (#Derived_gen.18, #Derived_gen.19, #Derived_gen.20, #Derived_gen.21, #Derived_gen.22): - joinpoint List.599 List.159 List.160 List.161 List.162 List.163: - let List.601 : Int1 = CallByName Num.22 List.162 List.163; - if List.601 then - let List.605 : Str = CallByName List.66 List.159 List.162; - inc List.605; - let List.164 : {List U8, U64} = CallByName TotallyNotJson.267 List.160 List.605 List.161; - let List.604 : U64 = 1i64; - let List.603 : U64 = CallByName Num.51 List.162 List.604; - jump List.599 List.159 List.164 List.161 List.603 List.163; +procedure List.90 (#Derived_gen.26, #Derived_gen.27, #Derived_gen.28, #Derived_gen.29, #Derived_gen.30): + joinpoint List.601 List.161 List.162 List.163 List.164 List.165: + let List.603 : Int1 = CallByName Num.22 List.164 List.165; + if List.603 then + let List.607 : Str = CallByName List.66 List.161 List.164; + inc List.607; + let List.166 : {List U8, U64} = CallByName TotallyNotJson.267 List.162 List.607 List.163; + let List.606 : U64 = 1i64; + let List.605 : U64 = CallByName Num.51 List.164 List.606; + jump List.601 List.161 List.166 List.163 List.605 List.165; else - dec List.159; - ret List.160; + dec List.161; + ret List.162; in - jump List.599 #Derived_gen.18 #Derived_gen.19 #Derived_gen.20 #Derived_gen.21 #Derived_gen.22; + jump List.601 #Derived_gen.26 #Derived_gen.27 #Derived_gen.28 #Derived_gen.29 #Derived_gen.30; procedure Num.127 (#Attr.2): let Num.298 : U8 = lowlevel NumIntCast #Attr.2; diff --git a/crates/compiler/test_mono/generated/encode_derived_tag_two_payloads_string.txt b/crates/compiler/test_mono/generated/encode_derived_tag_two_payloads_string.txt index 78f685c25c..037d2d92ff 100644 --- a/crates/compiler/test_mono/generated/encode_derived_tag_two_payloads_string.txt +++ b/crates/compiler/test_mono/generated/encode_derived_tag_two_payloads_string.txt @@ -43,159 +43,159 @@ procedure Encode.26 (Encode.105, Encode.106): let Encode.108 : List U8 = CallByName Encode.24 Encode.109 Encode.110 Encode.106; ret Encode.108; -procedure List.101 (List.484, List.485, List.486): - let List.653 : U64 = 0i64; - let List.654 : U64 = CallByName List.6 List.484; - let List.652 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.80 List.484 List.485 List.486 List.653 List.654; - ret List.652; +procedure List.102 (List.486, List.487, List.488): + let List.655 : U64 = 0i64; + let List.656 : U64 = CallByName List.6 List.486; + let List.654 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.80 List.486 List.487 List.488 List.655 List.656; + ret List.654; -procedure List.18 (List.156, List.157, List.158): - let List.597 : U64 = 0i64; - let List.598 : U64 = CallByName List.6 List.156; - let List.596 : {List U8, U64} = CallByName List.89 List.156 List.157 List.158 List.597 List.598; - ret List.596; +procedure List.18 (List.158, List.159, List.160): + let List.599 : U64 = 0i64; + let List.600 : U64 = CallByName List.6 List.158; + let List.598 : {List U8, U64} = CallByName List.90 List.158 List.159 List.160 List.599 List.600; + ret List.598; -procedure List.18 (List.156, List.157, List.158): - let List.609 : U64 = 0i64; - let List.610 : U64 = CallByName List.6 List.156; - let List.608 : List U8 = CallByName List.89 List.156 List.157 List.158 List.609 List.610; - ret List.608; +procedure List.18 (List.158, List.159, List.160): + let List.611 : U64 = 0i64; + let List.612 : U64 = CallByName List.6 List.158; + let List.610 : List U8 = CallByName List.90 List.158 List.159 List.160 List.611 List.612; + ret List.610; -procedure List.26 (List.197, List.198, List.199): - let List.646 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.101 List.197 List.198 List.199; - let List.649 : U8 = 1i64; - let List.650 : U8 = GetTagId List.646; - let List.651 : Int1 = lowlevel Eq List.649 List.650; - if List.651 then - let List.200 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.646; - ret List.200; +procedure List.26 (List.199, List.200, List.201): + let List.648 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.102 List.199 List.200 List.201; + let List.651 : U8 = 1i64; + let List.652 : U8 = GetTagId List.648; + let List.653 : Int1 = lowlevel Eq List.651 List.652; + if List.653 then + let List.202 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.648; + ret List.202; else - let List.201 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.646; - ret List.201; + let List.203 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.648; + ret List.203; -procedure List.4 (List.121, List.122): - let List.595 : U64 = 1i64; - let List.594 : List U8 = CallByName List.70 List.121 List.595; - let List.593 : List U8 = CallByName List.71 List.594 List.122; - ret List.593; +procedure List.4 (List.122, List.123): + let List.597 : U64 = 1i64; + let List.596 : List U8 = CallByName List.70 List.122 List.597; + let List.595 : List U8 = CallByName List.71 List.596 List.123; + ret List.595; -procedure List.49 (List.416, List.417): - let List.637 : U64 = StructAtIndex 1 List.417; - let List.638 : U64 = StructAtIndex 0 List.417; - let List.636 : List U8 = CallByName List.72 List.416 List.637 List.638; - ret List.636; +procedure List.49 (List.418, List.419): + let List.639 : U64 = StructAtIndex 1 List.419; + let List.640 : U64 = StructAtIndex 0 List.419; + let List.638 : List U8 = CallByName List.72 List.418 List.639 List.640; + ret List.638; -procedure List.52 (List.431, List.432): - let List.433 : U64 = CallByName List.6 List.431; - joinpoint List.644 List.434: - let List.642 : U64 = 0i64; - let List.641 : {U64, U64} = Struct {List.434, List.642}; - inc List.431; - let List.435 : List U8 = CallByName List.49 List.431 List.641; - let List.640 : U64 = CallByName Num.75 List.433 List.434; - let List.635 : {U64, U64} = Struct {List.640, List.434}; - let List.436 : List U8 = CallByName List.49 List.431 List.635; - let List.634 : {List U8, List U8} = Struct {List.435, List.436}; - ret List.634; +procedure List.52 (List.433, List.434): + let List.435 : U64 = CallByName List.6 List.433; + joinpoint List.646 List.436: + let List.644 : U64 = 0i64; + let List.643 : {U64, U64} = Struct {List.436, List.644}; + inc List.433; + let List.437 : List U8 = CallByName List.49 List.433 List.643; + let List.642 : U64 = CallByName Num.75 List.435 List.436; + let List.637 : {U64, U64} = Struct {List.642, List.436}; + let List.438 : List U8 = CallByName List.49 List.433 List.637; + let List.636 : {List U8, List U8} = Struct {List.437, List.438}; + ret List.636; in - let List.645 : Int1 = CallByName Num.24 List.433 List.432; - if List.645 then - jump List.644 List.432; + let List.647 : Int1 = CallByName Num.24 List.435 List.434; + if List.647 then + jump List.646 List.434; else - jump List.644 List.433; - -procedure List.6 (#Attr.2): - let List.620 : U64 = lowlevel ListLen #Attr.2; - ret List.620; + jump List.646 List.435; procedure List.6 (#Attr.2): let List.622 : U64 = lowlevel ListLen #Attr.2; ret List.622; -procedure List.66 (#Attr.2, #Attr.3): - let List.606 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.606; +procedure List.6 (#Attr.2): + let List.624 : U64 = lowlevel ListLen #Attr.2; + ret List.624; procedure List.66 (#Attr.2, #Attr.3): - let List.618 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.618; + let List.608 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.608; + +procedure List.66 (#Attr.2, #Attr.3): + let List.620 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.620; procedure List.68 (#Attr.2): - let List.633 : List U8 = lowlevel ListWithCapacity #Attr.2; - ret List.633; + let List.635 : List U8 = lowlevel ListWithCapacity #Attr.2; + ret List.635; procedure List.70 (#Attr.2, #Attr.3): - let List.574 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; - ret List.574; + let List.576 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; + ret List.576; procedure List.71 (#Attr.2, #Attr.3): - let List.572 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.572; + let List.574 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; + ret List.574; procedure List.72 (#Attr.2, #Attr.3, #Attr.4): - let List.639 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; - ret List.639; + let List.641 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; + ret List.641; procedure List.8 (#Attr.2, #Attr.3): - let List.631 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; - ret List.631; + let List.633 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; + ret List.633; procedure List.80 (#Derived_gen.14, #Derived_gen.15, #Derived_gen.16, #Derived_gen.17, #Derived_gen.18): - joinpoint List.655 List.487 List.488 List.489 List.490 List.491: - let List.657 : Int1 = CallByName Num.22 List.490 List.491; - if List.657 then - let List.666 : U8 = CallByName List.66 List.487 List.490; - let List.658 : [C {U64, Int1}, C {U64, Int1}] = CallByName TotallyNotJson.189 List.488 List.666; - let List.663 : U8 = 1i64; - let List.664 : U8 = GetTagId List.658; - let List.665 : Int1 = lowlevel Eq List.663 List.664; - if List.665 then - let List.492 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.658; - let List.661 : U64 = 1i64; - let List.660 : U64 = CallByName Num.51 List.490 List.661; - jump List.655 List.487 List.492 List.489 List.660 List.491; + joinpoint List.657 List.489 List.490 List.491 List.492 List.493: + let List.659 : Int1 = CallByName Num.22 List.492 List.493; + if List.659 then + let List.668 : U8 = CallByName List.66 List.489 List.492; + let List.660 : [C {U64, Int1}, C {U64, Int1}] = CallByName TotallyNotJson.189 List.490 List.668; + let List.665 : U8 = 1i64; + let List.666 : U8 = GetTagId List.660; + let List.667 : Int1 = lowlevel Eq List.665 List.666; + if List.667 then + let List.494 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.660; + let List.663 : U64 = 1i64; + let List.662 : U64 = CallByName Num.51 List.492 List.663; + jump List.657 List.489 List.494 List.491 List.662 List.493; else - dec List.487; - let List.493 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.658; - let List.662 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) List.493; - ret List.662; + dec List.489; + let List.495 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.660; + let List.664 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) List.495; + ret List.664; else - dec List.487; - let List.656 : [C {U64, Int1}, C {U64, Int1}] = TagId(1) List.488; - ret List.656; + dec List.489; + let List.658 : [C {U64, Int1}, C {U64, Int1}] = TagId(1) List.490; + ret List.658; in - jump List.655 #Derived_gen.14 #Derived_gen.15 #Derived_gen.16 #Derived_gen.17 #Derived_gen.18; + jump List.657 #Derived_gen.14 #Derived_gen.15 #Derived_gen.16 #Derived_gen.17 #Derived_gen.18; -procedure List.89 (#Derived_gen.19, #Derived_gen.20, #Derived_gen.21, #Derived_gen.22, #Derived_gen.23): - joinpoint List.611 List.159 List.160 List.161 List.162 List.163: - let List.613 : Int1 = CallByName Num.22 List.162 List.163; - if List.613 then - let List.617 : U8 = CallByName List.66 List.159 List.162; - let List.164 : List U8 = CallByName TotallyNotJson.215 List.160 List.617; - let List.616 : U64 = 1i64; - let List.615 : U64 = CallByName Num.51 List.162 List.616; - jump List.611 List.159 List.164 List.161 List.615 List.163; +procedure List.90 (#Derived_gen.19, #Derived_gen.20, #Derived_gen.21, #Derived_gen.22, #Derived_gen.23): + joinpoint List.613 List.161 List.162 List.163 List.164 List.165: + let List.615 : Int1 = CallByName Num.22 List.164 List.165; + if List.615 then + let List.619 : U8 = CallByName List.66 List.161 List.164; + let List.166 : List U8 = CallByName TotallyNotJson.215 List.162 List.619; + let List.618 : U64 = 1i64; + let List.617 : U64 = CallByName Num.51 List.164 List.618; + jump List.613 List.161 List.166 List.163 List.617 List.165; else - dec List.159; - ret List.160; + dec List.161; + ret List.162; in - jump List.611 #Derived_gen.19 #Derived_gen.20 #Derived_gen.21 #Derived_gen.22 #Derived_gen.23; + jump List.613 #Derived_gen.19 #Derived_gen.20 #Derived_gen.21 #Derived_gen.22 #Derived_gen.23; -procedure List.89 (#Derived_gen.24, #Derived_gen.25, #Derived_gen.26, #Derived_gen.27, #Derived_gen.28): - joinpoint List.599 List.159 List.160 List.161 List.162 List.163: - let List.601 : Int1 = CallByName Num.22 List.162 List.163; - if List.601 then - let List.605 : Str = CallByName List.66 List.159 List.162; - inc List.605; - let List.164 : {List U8, U64} = CallByName TotallyNotJson.267 List.160 List.605 List.161; - let List.604 : U64 = 1i64; - let List.603 : U64 = CallByName Num.51 List.162 List.604; - jump List.599 List.159 List.164 List.161 List.603 List.163; +procedure List.90 (#Derived_gen.27, #Derived_gen.28, #Derived_gen.29, #Derived_gen.30, #Derived_gen.31): + joinpoint List.601 List.161 List.162 List.163 List.164 List.165: + let List.603 : Int1 = CallByName Num.22 List.164 List.165; + if List.603 then + let List.607 : Str = CallByName List.66 List.161 List.164; + inc List.607; + let List.166 : {List U8, U64} = CallByName TotallyNotJson.267 List.162 List.607 List.163; + let List.606 : U64 = 1i64; + let List.605 : U64 = CallByName Num.51 List.164 List.606; + jump List.601 List.161 List.166 List.163 List.605 List.165; else - dec List.159; - ret List.160; + dec List.161; + ret List.162; in - jump List.599 #Derived_gen.24 #Derived_gen.25 #Derived_gen.26 #Derived_gen.27 #Derived_gen.28; + jump List.601 #Derived_gen.27 #Derived_gen.28 #Derived_gen.29 #Derived_gen.30 #Derived_gen.31; procedure Num.127 (#Attr.2): let Num.298 : U8 = lowlevel NumIntCast #Attr.2; diff --git a/crates/compiler/test_mono/generated/inspect_derived_dict.txt b/crates/compiler/test_mono/generated/inspect_derived_dict.txt index f3f5a2b85e..403e592d1c 100644 --- a/crates/compiler/test_mono/generated/inspect_derived_dict.txt +++ b/crates/compiler/test_mono/generated/inspect_derived_dict.txt @@ -287,7 +287,7 @@ procedure Dict.65 (Dict.405, Dict.406, Dict.407): let Dict.854 : {U64, U32} = CallByName Dict.66 Dict.405 Dict.410 Dict.409; ret Dict.854; -procedure Dict.66 (#Derived_gen.32, #Derived_gen.33, #Derived_gen.34): +procedure Dict.66 (#Derived_gen.37, #Derived_gen.38, #Derived_gen.39): joinpoint Dict.855 Dict.411 Dict.412 Dict.413: let Dict.863 : U64 = CallByName Num.137 Dict.412; let Dict.414 : {U32, U32} = CallByName Dict.22 Dict.411 Dict.863; @@ -303,9 +303,9 @@ procedure Dict.66 (#Derived_gen.32, #Derived_gen.33, #Derived_gen.34): let Dict.856 : {U64, U32} = Struct {Dict.412, Dict.413}; ret Dict.856; in - jump Dict.855 #Derived_gen.32 #Derived_gen.33 #Derived_gen.34; + jump Dict.855 #Derived_gen.37 #Derived_gen.38 #Derived_gen.39; -procedure Dict.67 (#Derived_gen.43, #Derived_gen.44, #Derived_gen.45): +procedure Dict.67 (#Derived_gen.48, #Derived_gen.49, #Derived_gen.50): joinpoint Dict.756 Dict.415 Dict.416 Dict.417: let Dict.770 : U64 = CallByName Num.137 Dict.417; let Dict.418 : {U32, U32} = CallByName Dict.22 Dict.415 Dict.770; @@ -327,7 +327,7 @@ procedure Dict.67 (#Derived_gen.43, #Derived_gen.44, #Derived_gen.45): let Dict.757 : List {U32, U32} = CallByName List.3 Dict.415 Dict.758 Dict.416; ret Dict.757; in - jump Dict.756 #Derived_gen.43 #Derived_gen.44 #Derived_gen.45; + jump Dict.756 #Derived_gen.48 #Derived_gen.49 #Derived_gen.50; procedure Dict.68 (Dict.420, Dict.421): let Dict.752 : U64 = 1i64; @@ -510,7 +510,7 @@ procedure Dict.82 (Dict.705, Dict.481): let Dict.929 : {U64, U64, U64} = CallByName Dict.83 Dict.479 Dict.479 Dict.479 Dict.481 Dict.931 Dict.482; jump Dict.930 Dict.929; -procedure Dict.83 (#Derived_gen.26, #Derived_gen.27, #Derived_gen.28, #Derived_gen.29, #Derived_gen.30, #Derived_gen.31): +procedure Dict.83 (#Derived_gen.31, #Derived_gen.32, #Derived_gen.33, #Derived_gen.34, #Derived_gen.35, #Derived_gen.36): joinpoint Dict.932 Dict.487 Dict.488 Dict.489 Dict.490 Dict.491 Dict.492: inc 6 Dict.490; let Dict.1039 : U64 = CallByName Dict.91 Dict.490 Dict.491; @@ -572,9 +572,9 @@ procedure Dict.83 (#Derived_gen.26, #Derived_gen.27, #Derived_gen.28, #Derived_g let Dict.933 : {U64, U64, U64} = Struct {Dict.934, Dict.935, Dict.499}; ret Dict.933; in - jump Dict.932 #Derived_gen.26 #Derived_gen.27 #Derived_gen.28 #Derived_gen.29 #Derived_gen.30 #Derived_gen.31; + jump Dict.932 #Derived_gen.31 #Derived_gen.32 #Derived_gen.33 #Derived_gen.34 #Derived_gen.35 #Derived_gen.36; -procedure Dict.84 (#Derived_gen.59, #Derived_gen.60, #Derived_gen.61, #Derived_gen.62): +procedure Dict.84 (#Derived_gen.51, #Derived_gen.52, #Derived_gen.53, #Derived_gen.54): joinpoint Dict.985 Dict.500 Dict.501 Dict.502 Dict.503: inc 2 Dict.501; let Dict.1005 : U64 = CallByName Dict.91 Dict.501 Dict.502; @@ -606,7 +606,7 @@ procedure Dict.84 (#Derived_gen.59, #Derived_gen.60, #Derived_gen.61, #Derived_g else jump Dict.985 Dict.504 Dict.501 Dict.506 Dict.505; in - jump Dict.985 #Derived_gen.59 #Derived_gen.60 #Derived_gen.61 #Derived_gen.62; + jump Dict.985 #Derived_gen.51 #Derived_gen.52 #Derived_gen.53 #Derived_gen.54; procedure Dict.85 (): let Dict.921 : U64 = 11562461410679940143i64; @@ -890,168 +890,168 @@ procedure Inspect.61 (Inspect.304, Inspect.300): procedure Inspect.62 (Inspect.306): ret Inspect.306; -procedure List.11 (List.135, List.136): - let List.631 : List {U32, U32} = CallByName List.68 List.136; - let List.630 : List {U32, U32} = CallByName List.87 List.135 List.136 List.631; - ret List.630; - -procedure List.18 (List.156, List.157, List.158): - let List.570 : U64 = 0i64; - let List.571 : U64 = CallByName List.6 List.156; - let List.569 : {List {U32, U32}, List {Str, I64}, U64, Float32, U8} = CallByName List.89 List.156 List.157 List.158 List.570 List.571; - ret List.569; - -procedure List.18 (List.156, List.157, List.158): - let List.634 : U64 = 0i64; - let List.635 : U64 = CallByName List.6 List.156; - let List.633 : {Str, Int1} = CallByName List.89 List.156 List.157 List.158 List.634 List.635; - ret List.633; - -procedure List.3 (List.113, List.114, List.115): - let List.595 : {List {U32, U32}, {U32, U32}} = CallByName List.64 List.113 List.114 List.115; - let List.594 : List {U32, U32} = StructAtIndex 0 List.595; - ret List.594; - -procedure List.3 (List.113, List.114, List.115): - let List.597 : {List {Str, I64}, {Str, I64}} = CallByName List.64 List.113 List.114 List.115; - let List.596 : List {Str, I64} = StructAtIndex 0 List.597; - let #Derived_gen.71 : {Str, I64} = StructAtIndex 1 List.597; - dec #Derived_gen.71; - ret List.596; - -procedure List.4 (List.121, List.122): - let List.606 : U64 = 1i64; - let List.604 : List {Str, I64} = CallByName List.70 List.121 List.606; - let List.603 : List {Str, I64} = CallByName List.71 List.604 List.122; - ret List.603; - -procedure List.6 (#Attr.2): - let List.585 : U64 = lowlevel ListLen #Attr.2; - ret List.585; - -procedure List.6 (#Attr.2): - let List.632 : U64 = lowlevel ListLen #Attr.2; +procedure List.11 (List.136, List.137): + let List.633 : List {U32, U32} = CallByName List.68 List.137; + let List.632 : List {U32, U32} = CallByName List.88 List.136 List.137 List.633; ret List.632; +procedure List.18 (List.158, List.159, List.160): + let List.572 : U64 = 0i64; + let List.573 : U64 = CallByName List.6 List.158; + let List.571 : {List {U32, U32}, List {Str, I64}, U64, Float32, U8} = CallByName List.90 List.158 List.159 List.160 List.572 List.573; + ret List.571; + +procedure List.18 (List.158, List.159, List.160): + let List.636 : U64 = 0i64; + let List.637 : U64 = CallByName List.6 List.158; + let List.635 : {Str, Int1} = CallByName List.90 List.158 List.159 List.160 List.636 List.637; + ret List.635; + +procedure List.3 (List.114, List.115, List.116): + let List.597 : {List {U32, U32}, {U32, U32}} = CallByName List.64 List.114 List.115 List.116; + let List.596 : List {U32, U32} = StructAtIndex 0 List.597; + ret List.596; + +procedure List.3 (List.114, List.115, List.116): + let List.599 : {List {Str, I64}, {Str, I64}} = CallByName List.64 List.114 List.115 List.116; + let List.598 : List {Str, I64} = StructAtIndex 0 List.599; + let #Derived_gen.71 : {Str, I64} = StructAtIndex 1 List.599; + dec #Derived_gen.71; + ret List.598; + +procedure List.4 (List.122, List.123): + let List.608 : U64 = 1i64; + let List.606 : List {Str, I64} = CallByName List.70 List.122 List.608; + let List.605 : List {Str, I64} = CallByName List.71 List.606 List.123; + ret List.605; + procedure List.6 (#Attr.2): - let List.644 : U64 = lowlevel ListLen #Attr.2; - ret List.644; + let List.587 : U64 = lowlevel ListLen #Attr.2; + ret List.587; -procedure List.64 (List.110, List.111, List.112): - let List.593 : U64 = CallByName List.6 List.110; - let List.590 : Int1 = CallByName Num.22 List.111 List.593; - if List.590 then - let List.591 : {List {U32, U32}, {U32, U32}} = CallByName List.67 List.110 List.111 List.112; +procedure List.6 (#Attr.2): + let List.634 : U64 = lowlevel ListLen #Attr.2; + ret List.634; + +procedure List.6 (#Attr.2): + let List.646 : U64 = lowlevel ListLen #Attr.2; + ret List.646; + +procedure List.64 (List.111, List.112, List.113): + let List.595 : U64 = CallByName List.6 List.111; + let List.592 : Int1 = CallByName Num.22 List.112 List.595; + if List.592 then + let List.593 : {List {U32, U32}, {U32, U32}} = CallByName List.67 List.111 List.112 List.113; + ret List.593; + else + let List.591 : {List {U32, U32}, {U32, U32}} = Struct {List.111, List.113}; ret List.591; - else - let List.589 : {List {U32, U32}, {U32, U32}} = Struct {List.110, List.112}; - ret List.589; -procedure List.64 (List.110, List.111, List.112): - let List.602 : U64 = CallByName List.6 List.110; - let List.599 : Int1 = CallByName Num.22 List.111 List.602; - if List.599 then - let List.600 : {List {Str, I64}, {Str, I64}} = CallByName List.67 List.110 List.111 List.112; - ret List.600; +procedure List.64 (List.111, List.112, List.113): + let List.604 : U64 = CallByName List.6 List.111; + let List.601 : Int1 = CallByName Num.22 List.112 List.604; + if List.601 then + let List.602 : {List {Str, I64}, {Str, I64}} = CallByName List.67 List.111 List.112 List.113; + ret List.602; else - let List.598 : {List {Str, I64}, {Str, I64}} = Struct {List.110, List.112}; - ret List.598; + let List.600 : {List {Str, I64}, {Str, I64}} = Struct {List.111, List.113}; + ret List.600; procedure List.66 (#Attr.2, #Attr.3): - let List.643 : {Str, I64} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.643; + let List.645 : {Str, I64} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.645; procedure List.67 (#Attr.2, #Attr.3, #Attr.4): - let List.592 : {List {U32, U32}, {U32, U32}} = lowlevel ListReplaceUnsafe #Attr.2 #Attr.3 #Attr.4; - ret List.592; + let List.594 : {List {U32, U32}, {U32, U32}} = lowlevel ListReplaceUnsafe #Attr.2 #Attr.3 #Attr.4; + ret List.594; procedure List.67 (#Attr.2, #Attr.3, #Attr.4): - let List.601 : {List {Str, I64}, {Str, I64}} = lowlevel ListReplaceUnsafe #Attr.2 #Attr.3 #Attr.4; - ret List.601; + let List.603 : {List {Str, I64}, {Str, I64}} = lowlevel ListReplaceUnsafe #Attr.2 #Attr.3 #Attr.4; + ret List.603; procedure List.68 (#Attr.2): - let List.629 : List {U32, U32} = lowlevel ListWithCapacity #Attr.2; - ret List.629; + let List.631 : List {U32, U32} = lowlevel ListWithCapacity #Attr.2; + ret List.631; procedure List.70 (#Attr.2, #Attr.3): - let List.607 : List {Str, I64} = lowlevel ListReserve #Attr.2 #Attr.3; + let List.609 : List {Str, I64} = lowlevel ListReserve #Attr.2 #Attr.3; + ret List.609; + +procedure List.71 (#Attr.2, #Attr.3): + let List.607 : List {Str, I64} = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; ret List.607; procedure List.71 (#Attr.2, #Attr.3): - let List.605 : List {Str, I64} = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.605; + let List.628 : List {U32, U32} = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; + ret List.628; -procedure List.71 (#Attr.2, #Attr.3): - let List.626 : List {U32, U32} = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.626; +procedure List.83 (List.167, List.168, List.169): + let List.611 : U64 = 0i64; + let List.612 : U64 = CallByName List.6 List.167; + let List.610 : List {U32, U32} = CallByName List.91 List.167 List.168 List.169 List.611 List.612; + ret List.610; -procedure List.83 (List.165, List.166, List.167): - let List.609 : U64 = 0i64; - let List.610 : U64 = CallByName List.6 List.165; - let List.608 : List {U32, U32} = CallByName List.90 List.165 List.166 List.167 List.609 List.610; - ret List.608; - -procedure List.87 (#Derived_gen.46, #Derived_gen.47, #Derived_gen.48): - joinpoint List.620 List.137 List.138 List.139: - let List.628 : U64 = 0i64; - let List.622 : Int1 = CallByName Num.24 List.138 List.628; - if List.622 then - let List.627 : U64 = 1i64; - let List.624 : U64 = CallByName Num.75 List.138 List.627; - let List.625 : List {U32, U32} = CallByName List.71 List.139 List.137; - jump List.620 List.137 List.624 List.625; +procedure List.88 (#Derived_gen.58, #Derived_gen.59, #Derived_gen.60): + joinpoint List.622 List.138 List.139 List.140: + let List.630 : U64 = 0i64; + let List.624 : Int1 = CallByName Num.24 List.139 List.630; + if List.624 then + let List.629 : U64 = 1i64; + let List.626 : U64 = CallByName Num.75 List.139 List.629; + let List.627 : List {U32, U32} = CallByName List.71 List.140 List.138; + jump List.622 List.138 List.626 List.627; else - ret List.139; + ret List.140; in - jump List.620 #Derived_gen.46 #Derived_gen.47 #Derived_gen.48; + jump List.622 #Derived_gen.58 #Derived_gen.59 #Derived_gen.60; -procedure List.89 (#Derived_gen.17, #Derived_gen.18, #Derived_gen.19, #Derived_gen.20, #Derived_gen.21): - joinpoint List.572 List.159 List.160 List.161 List.162 List.163: - let List.574 : Int1 = CallByName Num.22 List.162 List.163; - if List.574 then - let List.578 : {Str, I64} = CallByName List.66 List.159 List.162; - inc List.578; - let List.164 : {List {U32, U32}, List {Str, I64}, U64, Float32, U8} = CallByName Dict.153 List.160 List.578; - let List.577 : U64 = 1i64; - let List.576 : U64 = CallByName Num.51 List.162 List.577; - jump List.572 List.159 List.164 List.161 List.576 List.163; +procedure List.90 (#Derived_gen.17, #Derived_gen.18, #Derived_gen.19, #Derived_gen.20, #Derived_gen.21): + joinpoint List.638 List.161 List.162 List.163 List.164 List.165: + let List.640 : Int1 = CallByName Num.22 List.164 List.165; + if List.640 then + let List.644 : {Str, I64} = CallByName List.66 List.161 List.164; + inc List.644; + let List.166 : {Str, Int1} = CallByName Dict.182 List.162 List.644 List.163; + let List.643 : U64 = 1i64; + let List.642 : U64 = CallByName Num.51 List.164 List.643; + jump List.638 List.161 List.166 List.163 List.642 List.165; else - dec List.159; - ret List.160; + dec List.161; + ret List.162; in - jump List.572 #Derived_gen.17 #Derived_gen.18 #Derived_gen.19 #Derived_gen.20 #Derived_gen.21; + jump List.638 #Derived_gen.17 #Derived_gen.18 #Derived_gen.19 #Derived_gen.20 #Derived_gen.21; -procedure List.89 (#Derived_gen.54, #Derived_gen.55, #Derived_gen.56, #Derived_gen.57, #Derived_gen.58): - joinpoint List.636 List.159 List.160 List.161 List.162 List.163: - let List.638 : Int1 = CallByName Num.22 List.162 List.163; - if List.638 then - let List.642 : {Str, I64} = CallByName List.66 List.159 List.162; - inc List.642; - let List.164 : {Str, Int1} = CallByName Dict.182 List.160 List.642 List.161; - let List.641 : U64 = 1i64; - let List.640 : U64 = CallByName Num.51 List.162 List.641; - jump List.636 List.159 List.164 List.161 List.640 List.163; +procedure List.90 (#Derived_gen.26, #Derived_gen.27, #Derived_gen.28, #Derived_gen.29, #Derived_gen.30): + joinpoint List.574 List.161 List.162 List.163 List.164 List.165: + let List.576 : Int1 = CallByName Num.22 List.164 List.165; + if List.576 then + let List.580 : {Str, I64} = CallByName List.66 List.161 List.164; + inc List.580; + let List.166 : {List {U32, U32}, List {Str, I64}, U64, Float32, U8} = CallByName Dict.153 List.162 List.580; + let List.579 : U64 = 1i64; + let List.578 : U64 = CallByName Num.51 List.164 List.579; + jump List.574 List.161 List.166 List.163 List.578 List.165; else - dec List.159; - ret List.160; + dec List.161; + ret List.162; in - jump List.636 #Derived_gen.54 #Derived_gen.55 #Derived_gen.56 #Derived_gen.57 #Derived_gen.58; + jump List.574 #Derived_gen.26 #Derived_gen.27 #Derived_gen.28 #Derived_gen.29 #Derived_gen.30; -procedure List.90 (#Derived_gen.49, #Derived_gen.50, #Derived_gen.51, #Derived_gen.52, #Derived_gen.53): - joinpoint List.611 List.168 List.169 List.170 List.171 List.172: - let List.613 : Int1 = CallByName Num.22 List.171 List.172; - if List.613 then - let List.617 : {Str, I64} = CallByName List.66 List.168 List.171; - inc List.617; - let List.173 : List {U32, U32} = CallByName Dict.399 List.169 List.617 List.171 List.170; - let List.616 : U64 = 1i64; - let List.615 : U64 = CallByName Num.51 List.171 List.616; - jump List.611 List.168 List.173 List.170 List.615 List.172; +procedure List.91 (#Derived_gen.61, #Derived_gen.62, #Derived_gen.63, #Derived_gen.64, #Derived_gen.65): + joinpoint List.613 List.170 List.171 List.172 List.173 List.174: + let List.615 : Int1 = CallByName Num.22 List.173 List.174; + if List.615 then + let List.619 : {Str, I64} = CallByName List.66 List.170 List.173; + inc List.619; + let List.175 : List {U32, U32} = CallByName Dict.399 List.171 List.619 List.173 List.172; + let List.618 : U64 = 1i64; + let List.617 : U64 = CallByName Num.51 List.173 List.618; + jump List.613 List.170 List.175 List.172 List.617 List.174; else - dec List.168; - ret List.169; + dec List.170; + ret List.171; in - jump List.611 #Derived_gen.49 #Derived_gen.50 #Derived_gen.51 #Derived_gen.52 #Derived_gen.53; + jump List.613 #Derived_gen.61 #Derived_gen.62 #Derived_gen.63 #Derived_gen.64 #Derived_gen.65; procedure Num.131 (#Attr.2): let Num.310 : U32 = lowlevel NumIntCast #Attr.2; diff --git a/crates/compiler/test_mono/generated/inspect_derived_list.txt b/crates/compiler/test_mono/generated/inspect_derived_list.txt index dbe4e11869..904fd2b013 100644 --- a/crates/compiler/test_mono/generated/inspect_derived_list.txt +++ b/crates/compiler/test_mono/generated/inspect_derived_list.txt @@ -125,34 +125,34 @@ procedure Inspect.61 (Inspect.304, Inspect.300): procedure Inspect.62 (Inspect.306): ret Inspect.306; -procedure List.18 (List.156, List.157, List.158): - let List.570 : U64 = 0i64; - let List.571 : U64 = CallByName List.6 List.156; - let List.569 : {Str, Int1} = CallByName List.89 List.156 List.157 List.158 List.570 List.571; - ret List.569; +procedure List.18 (List.158, List.159, List.160): + let List.572 : U64 = 0i64; + let List.573 : U64 = CallByName List.6 List.158; + let List.571 : {Str, Int1} = CallByName List.90 List.158 List.159 List.160 List.572 List.573; + ret List.571; procedure List.6 (#Attr.2): - let List.580 : U64 = lowlevel ListLen #Attr.2; - ret List.580; + let List.582 : U64 = lowlevel ListLen #Attr.2; + ret List.582; procedure List.66 (#Attr.2, #Attr.3): - let List.579 : I64 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.579; + let List.581 : I64 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.581; -procedure List.89 (#Derived_gen.19, #Derived_gen.20, #Derived_gen.21, #Derived_gen.22, #Derived_gen.23): - joinpoint List.572 List.159 List.160 List.161 List.162 List.163: - let List.574 : Int1 = CallByName Num.22 List.162 List.163; - if List.574 then - let List.578 : I64 = CallByName List.66 List.159 List.162; - let List.164 : {Str, Int1} = CallByName Inspect.161 List.160 List.578 List.161; - let List.577 : U64 = 1i64; - let List.576 : U64 = CallByName Num.51 List.162 List.577; - jump List.572 List.159 List.164 List.161 List.576 List.163; +procedure List.90 (#Derived_gen.10, #Derived_gen.11, #Derived_gen.12, #Derived_gen.13, #Derived_gen.14): + joinpoint List.574 List.161 List.162 List.163 List.164 List.165: + let List.576 : Int1 = CallByName Num.22 List.164 List.165; + if List.576 then + let List.580 : I64 = CallByName List.66 List.161 List.164; + let List.166 : {Str, Int1} = CallByName Inspect.161 List.162 List.580 List.163; + let List.579 : U64 = 1i64; + let List.578 : U64 = CallByName Num.51 List.164 List.579; + jump List.574 List.161 List.166 List.163 List.578 List.165; else - dec List.159; - ret List.160; + dec List.161; + ret List.162; in - jump List.572 #Derived_gen.19 #Derived_gen.20 #Derived_gen.21 #Derived_gen.22 #Derived_gen.23; + jump List.574 #Derived_gen.10 #Derived_gen.11 #Derived_gen.12 #Derived_gen.13 #Derived_gen.14; procedure Num.22 (#Attr.2, #Attr.3): let Num.293 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; diff --git a/crates/compiler/test_mono/generated/inspect_derived_nested_record_string.txt b/crates/compiler/test_mono/generated/inspect_derived_nested_record_string.txt index 376a483e4d..ddac7b65e7 100644 --- a/crates/compiler/test_mono/generated/inspect_derived_nested_record_string.txt +++ b/crates/compiler/test_mono/generated/inspect_derived_nested_record_string.txt @@ -200,65 +200,65 @@ procedure Inspect.61 (Inspect.304, Inspect.300): procedure Inspect.62 (Inspect.306): ret Inspect.306; -procedure List.18 (List.156, List.157, List.158): - let List.570 : U64 = 0i64; - let List.571 : U64 = CallByName List.6 List.156; - let List.569 : {Str, Int1} = CallByName List.89 List.156 List.157 List.158 List.570 List.571; - ret List.569; +procedure List.18 (List.158, List.159, List.160): + let List.572 : U64 = 0i64; + let List.573 : U64 = CallByName List.6 List.158; + let List.571 : {Str, Int1} = CallByName List.90 List.158 List.159 List.160 List.572 List.573; + ret List.571; -procedure List.18 (List.156, List.157, List.158): - let List.582 : U64 = 0i64; - let List.583 : U64 = CallByName List.6 List.156; - let List.581 : {Str, Int1} = CallByName List.89 List.156 List.157 List.158 List.582 List.583; +procedure List.18 (List.158, List.159, List.160): + let List.584 : U64 = 0i64; + let List.585 : U64 = CallByName List.6 List.158; + let List.583 : {Str, Int1} = CallByName List.90 List.158 List.159 List.160 List.584 List.585; + ret List.583; + +procedure List.6 (#Attr.2): + let List.582 : U64 = lowlevel ListLen #Attr.2; + ret List.582; + +procedure List.6 (#Attr.2): + let List.594 : U64 = lowlevel ListLen #Attr.2; + ret List.594; + +procedure List.66 (#Attr.2, #Attr.3): + let List.581 : {Str, Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; ret List.581; -procedure List.6 (#Attr.2): - let List.580 : U64 = lowlevel ListLen #Attr.2; - ret List.580; - -procedure List.6 (#Attr.2): - let List.592 : U64 = lowlevel ListLen #Attr.2; - ret List.592; - procedure List.66 (#Attr.2, #Attr.3): - let List.579 : {Str, Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.579; + let List.593 : {Str, Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.593; -procedure List.66 (#Attr.2, #Attr.3): - let List.591 : {Str, Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.591; - -procedure List.89 (#Derived_gen.22, #Derived_gen.23, #Derived_gen.24, #Derived_gen.25, #Derived_gen.26): - joinpoint List.572 List.159 List.160 List.161 List.162 List.163: - let List.574 : Int1 = CallByName Num.22 List.162 List.163; - if List.574 then - let List.578 : {Str, Str} = CallByName List.66 List.159 List.162; - inc List.578; - let List.164 : {Str, Int1} = CallByName Inspect.234 List.160 List.578; - let List.577 : U64 = 1i64; - let List.576 : U64 = CallByName Num.51 List.162 List.577; - jump List.572 List.159 List.164 List.161 List.576 List.163; +procedure List.90 (#Derived_gen.32, #Derived_gen.33, #Derived_gen.34, #Derived_gen.35, #Derived_gen.36): + joinpoint List.586 List.161 List.162 List.163 List.164 List.165: + let List.588 : Int1 = CallByName Num.22 List.164 List.165; + if List.588 then + let List.592 : {Str, Str} = CallByName List.66 List.161 List.164; + inc List.592; + let List.166 : {Str, Int1} = CallByName Inspect.234 List.162 List.592; + let List.591 : U64 = 1i64; + let List.590 : U64 = CallByName Num.51 List.164 List.591; + jump List.586 List.161 List.166 List.163 List.590 List.165; else - dec List.159; - ret List.160; + dec List.161; + ret List.162; in - jump List.572 #Derived_gen.22 #Derived_gen.23 #Derived_gen.24 #Derived_gen.25 #Derived_gen.26; + jump List.586 #Derived_gen.32 #Derived_gen.33 #Derived_gen.34 #Derived_gen.35 #Derived_gen.36; -procedure List.89 (#Derived_gen.43, #Derived_gen.44, #Derived_gen.45, #Derived_gen.46, #Derived_gen.47): - joinpoint List.584 List.159 List.160 List.161 List.162 List.163: - let List.586 : Int1 = CallByName Num.22 List.162 List.163; - if List.586 then - let List.590 : {Str, Str} = CallByName List.66 List.159 List.162; - inc List.590; - let List.164 : {Str, Int1} = CallByName Inspect.234 List.160 List.590; - let List.589 : U64 = 1i64; - let List.588 : U64 = CallByName Num.51 List.162 List.589; - jump List.584 List.159 List.164 List.161 List.588 List.163; +procedure List.90 (#Derived_gen.37, #Derived_gen.38, #Derived_gen.39, #Derived_gen.40, #Derived_gen.41): + joinpoint List.574 List.161 List.162 List.163 List.164 List.165: + let List.576 : Int1 = CallByName Num.22 List.164 List.165; + if List.576 then + let List.580 : {Str, Str} = CallByName List.66 List.161 List.164; + inc List.580; + let List.166 : {Str, Int1} = CallByName Inspect.234 List.162 List.580; + let List.579 : U64 = 1i64; + let List.578 : U64 = CallByName Num.51 List.164 List.579; + jump List.574 List.161 List.166 List.163 List.578 List.165; else - dec List.159; - ret List.160; + dec List.161; + ret List.162; in - jump List.584 #Derived_gen.43 #Derived_gen.44 #Derived_gen.45 #Derived_gen.46 #Derived_gen.47; + jump List.574 #Derived_gen.37 #Derived_gen.38 #Derived_gen.39 #Derived_gen.40 #Derived_gen.41; procedure Num.22 (#Attr.2, #Attr.3): let Num.294 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; diff --git a/crates/compiler/test_mono/generated/inspect_derived_record.txt b/crates/compiler/test_mono/generated/inspect_derived_record.txt index 4159f3f3da..9c636ea7e7 100644 --- a/crates/compiler/test_mono/generated/inspect_derived_record.txt +++ b/crates/compiler/test_mono/generated/inspect_derived_record.txt @@ -150,35 +150,35 @@ procedure Inspect.61 (Inspect.304, Inspect.300): procedure Inspect.62 (Inspect.306): ret Inspect.306; -procedure List.18 (List.156, List.157, List.158): - let List.570 : U64 = 0i64; - let List.571 : U64 = CallByName List.6 List.156; - let List.569 : {Str, Int1} = CallByName List.89 List.156 List.157 List.158 List.570 List.571; - ret List.569; +procedure List.18 (List.158, List.159, List.160): + let List.572 : U64 = 0i64; + let List.573 : U64 = CallByName List.6 List.158; + let List.571 : {Str, Int1} = CallByName List.90 List.158 List.159 List.160 List.572 List.573; + ret List.571; procedure List.6 (#Attr.2): - let List.580 : U64 = lowlevel ListLen #Attr.2; - ret List.580; + let List.582 : U64 = lowlevel ListLen #Attr.2; + ret List.582; procedure List.66 (#Attr.2, #Attr.3): - let List.579 : {[C I64, C Decimal], Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.579; + let List.581 : {[C I64, C Decimal], Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.581; -procedure List.89 (#Derived_gen.14, #Derived_gen.15, #Derived_gen.16, #Derived_gen.17, #Derived_gen.18): - joinpoint List.572 List.159 List.160 List.161 List.162 List.163: - let List.574 : Int1 = CallByName Num.22 List.162 List.163; - if List.574 then - let List.578 : {[C I64, C Decimal], Str} = CallByName List.66 List.159 List.162; - inc List.578; - let List.164 : {Str, Int1} = CallByName Inspect.234 List.160 List.578; - let List.577 : U64 = 1i64; - let List.576 : U64 = CallByName Num.51 List.162 List.577; - jump List.572 List.159 List.164 List.161 List.576 List.163; +procedure List.90 (#Derived_gen.16, #Derived_gen.17, #Derived_gen.18, #Derived_gen.19, #Derived_gen.20): + joinpoint List.574 List.161 List.162 List.163 List.164 List.165: + let List.576 : Int1 = CallByName Num.22 List.164 List.165; + if List.576 then + let List.580 : {[C I64, C Decimal], Str} = CallByName List.66 List.161 List.164; + inc List.580; + let List.166 : {Str, Int1} = CallByName Inspect.234 List.162 List.580; + let List.579 : U64 = 1i64; + let List.578 : U64 = CallByName Num.51 List.164 List.579; + jump List.574 List.161 List.166 List.163 List.578 List.165; else - dec List.159; - ret List.160; + dec List.161; + ret List.162; in - jump List.572 #Derived_gen.14 #Derived_gen.15 #Derived_gen.16 #Derived_gen.17 #Derived_gen.18; + jump List.574 #Derived_gen.16 #Derived_gen.17 #Derived_gen.18 #Derived_gen.19 #Derived_gen.20; procedure Num.22 (#Attr.2, #Attr.3): let Num.294 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; diff --git a/crates/compiler/test_mono/generated/inspect_derived_record_one_field_string.txt b/crates/compiler/test_mono/generated/inspect_derived_record_one_field_string.txt index 789513140d..8364a1a717 100644 --- a/crates/compiler/test_mono/generated/inspect_derived_record_one_field_string.txt +++ b/crates/compiler/test_mono/generated/inspect_derived_record_one_field_string.txt @@ -127,35 +127,35 @@ procedure Inspect.61 (Inspect.304, Inspect.300): procedure Inspect.62 (Inspect.306): ret Inspect.306; -procedure List.18 (List.156, List.157, List.158): - let List.570 : U64 = 0i64; - let List.571 : U64 = CallByName List.6 List.156; - let List.569 : {Str, Int1} = CallByName List.89 List.156 List.157 List.158 List.570 List.571; - ret List.569; +procedure List.18 (List.158, List.159, List.160): + let List.572 : U64 = 0i64; + let List.573 : U64 = CallByName List.6 List.158; + let List.571 : {Str, Int1} = CallByName List.90 List.158 List.159 List.160 List.572 List.573; + ret List.571; procedure List.6 (#Attr.2): - let List.580 : U64 = lowlevel ListLen #Attr.2; - ret List.580; + let List.582 : U64 = lowlevel ListLen #Attr.2; + ret List.582; procedure List.66 (#Attr.2, #Attr.3): - let List.579 : {Str, Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.579; + let List.581 : {Str, Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.581; -procedure List.89 (#Derived_gen.12, #Derived_gen.13, #Derived_gen.14, #Derived_gen.15, #Derived_gen.16): - joinpoint List.572 List.159 List.160 List.161 List.162 List.163: - let List.574 : Int1 = CallByName Num.22 List.162 List.163; - if List.574 then - let List.578 : {Str, Str} = CallByName List.66 List.159 List.162; - inc List.578; - let List.164 : {Str, Int1} = CallByName Inspect.234 List.160 List.578; - let List.577 : U64 = 1i64; - let List.576 : U64 = CallByName Num.51 List.162 List.577; - jump List.572 List.159 List.164 List.161 List.576 List.163; +procedure List.90 (#Derived_gen.20, #Derived_gen.21, #Derived_gen.22, #Derived_gen.23, #Derived_gen.24): + joinpoint List.574 List.161 List.162 List.163 List.164 List.165: + let List.576 : Int1 = CallByName Num.22 List.164 List.165; + if List.576 then + let List.580 : {Str, Str} = CallByName List.66 List.161 List.164; + inc List.580; + let List.166 : {Str, Int1} = CallByName Inspect.234 List.162 List.580; + let List.579 : U64 = 1i64; + let List.578 : U64 = CallByName Num.51 List.164 List.579; + jump List.574 List.161 List.166 List.163 List.578 List.165; else - dec List.159; - ret List.160; + dec List.161; + ret List.162; in - jump List.572 #Derived_gen.12 #Derived_gen.13 #Derived_gen.14 #Derived_gen.15 #Derived_gen.16; + jump List.574 #Derived_gen.20 #Derived_gen.21 #Derived_gen.22 #Derived_gen.23 #Derived_gen.24; procedure Num.22 (#Attr.2, #Attr.3): let Num.292 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; diff --git a/crates/compiler/test_mono/generated/inspect_derived_record_two_field_strings.txt b/crates/compiler/test_mono/generated/inspect_derived_record_two_field_strings.txt index f368c1ab16..dae276359f 100644 --- a/crates/compiler/test_mono/generated/inspect_derived_record_two_field_strings.txt +++ b/crates/compiler/test_mono/generated/inspect_derived_record_two_field_strings.txt @@ -134,35 +134,35 @@ procedure Inspect.61 (Inspect.304, Inspect.300): procedure Inspect.62 (Inspect.306): ret Inspect.306; -procedure List.18 (List.156, List.157, List.158): - let List.570 : U64 = 0i64; - let List.571 : U64 = CallByName List.6 List.156; - let List.569 : {Str, Int1} = CallByName List.89 List.156 List.157 List.158 List.570 List.571; - ret List.569; +procedure List.18 (List.158, List.159, List.160): + let List.572 : U64 = 0i64; + let List.573 : U64 = CallByName List.6 List.158; + let List.571 : {Str, Int1} = CallByName List.90 List.158 List.159 List.160 List.572 List.573; + ret List.571; procedure List.6 (#Attr.2): - let List.580 : U64 = lowlevel ListLen #Attr.2; - ret List.580; + let List.582 : U64 = lowlevel ListLen #Attr.2; + ret List.582; procedure List.66 (#Attr.2, #Attr.3): - let List.579 : {Str, Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.579; + let List.581 : {Str, Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.581; -procedure List.89 (#Derived_gen.16, #Derived_gen.17, #Derived_gen.18, #Derived_gen.19, #Derived_gen.20): - joinpoint List.572 List.159 List.160 List.161 List.162 List.163: - let List.574 : Int1 = CallByName Num.22 List.162 List.163; - if List.574 then - let List.578 : {Str, Str} = CallByName List.66 List.159 List.162; - inc List.578; - let List.164 : {Str, Int1} = CallByName Inspect.234 List.160 List.578; - let List.577 : U64 = 1i64; - let List.576 : U64 = CallByName Num.51 List.162 List.577; - jump List.572 List.159 List.164 List.161 List.576 List.163; +procedure List.90 (#Derived_gen.24, #Derived_gen.25, #Derived_gen.26, #Derived_gen.27, #Derived_gen.28): + joinpoint List.574 List.161 List.162 List.163 List.164 List.165: + let List.576 : Int1 = CallByName Num.22 List.164 List.165; + if List.576 then + let List.580 : {Str, Str} = CallByName List.66 List.161 List.164; + inc List.580; + let List.166 : {Str, Int1} = CallByName Inspect.234 List.162 List.580; + let List.579 : U64 = 1i64; + let List.578 : U64 = CallByName Num.51 List.164 List.579; + jump List.574 List.161 List.166 List.163 List.578 List.165; else - dec List.159; - ret List.160; + dec List.161; + ret List.162; in - jump List.572 #Derived_gen.16 #Derived_gen.17 #Derived_gen.18 #Derived_gen.19 #Derived_gen.20; + jump List.574 #Derived_gen.24 #Derived_gen.25 #Derived_gen.26 #Derived_gen.27 #Derived_gen.28; procedure Num.22 (#Attr.2, #Attr.3): let Num.292 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; diff --git a/crates/compiler/test_mono/generated/inspect_derived_tag_one_field_string.txt b/crates/compiler/test_mono/generated/inspect_derived_tag_one_field_string.txt index 71e668f88d..375d415262 100644 --- a/crates/compiler/test_mono/generated/inspect_derived_tag_one_field_string.txt +++ b/crates/compiler/test_mono/generated/inspect_derived_tag_one_field_string.txt @@ -122,42 +122,42 @@ procedure Inspect.61 (Inspect.304, Inspect.300): procedure Inspect.62 (Inspect.306): ret Inspect.306; -procedure List.1 (List.104): - let List.582 : U64 = CallByName List.6 List.104; - dec List.104; - let List.583 : U64 = 0i64; - let List.581 : Int1 = CallByName Bool.11 List.582 List.583; - ret List.581; +procedure List.1 (List.105): + let List.584 : U64 = CallByName List.6 List.105; + dec List.105; + let List.585 : U64 = 0i64; + let List.583 : Int1 = CallByName Bool.11 List.584 List.585; + ret List.583; -procedure List.18 (List.156, List.157, List.158): - let List.570 : U64 = 0i64; - let List.571 : U64 = CallByName List.6 List.156; - let List.569 : Str = CallByName List.89 List.156 List.157 List.158 List.570 List.571; - ret List.569; +procedure List.18 (List.158, List.159, List.160): + let List.572 : U64 = 0i64; + let List.573 : U64 = CallByName List.6 List.158; + let List.571 : Str = CallByName List.90 List.158 List.159 List.160 List.572 List.573; + ret List.571; procedure List.6 (#Attr.2): - let List.580 : U64 = lowlevel ListLen #Attr.2; - ret List.580; + let List.582 : U64 = lowlevel ListLen #Attr.2; + ret List.582; procedure List.66 (#Attr.2, #Attr.3): - let List.579 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.579; + let List.581 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.581; -procedure List.89 (#Derived_gen.20, #Derived_gen.21, #Derived_gen.22, #Derived_gen.23, #Derived_gen.24): - joinpoint List.572 List.159 List.160 List.161 List.162 List.163: - let List.574 : Int1 = CallByName Num.22 List.162 List.163; - if List.574 then - let List.578 : Str = CallByName List.66 List.159 List.162; - inc List.578; - let List.164 : Str = CallByName Inspect.211 List.160 List.578; - let List.577 : U64 = 1i64; - let List.576 : U64 = CallByName Num.51 List.162 List.577; - jump List.572 List.159 List.164 List.161 List.576 List.163; +procedure List.90 (#Derived_gen.18, #Derived_gen.19, #Derived_gen.20, #Derived_gen.21, #Derived_gen.22): + joinpoint List.574 List.161 List.162 List.163 List.164 List.165: + let List.576 : Int1 = CallByName Num.22 List.164 List.165; + if List.576 then + let List.580 : Str = CallByName List.66 List.161 List.164; + inc List.580; + let List.166 : Str = CallByName Inspect.211 List.162 List.580; + let List.579 : U64 = 1i64; + let List.578 : U64 = CallByName Num.51 List.164 List.579; + jump List.574 List.161 List.166 List.163 List.578 List.165; else - dec List.159; - ret List.160; + dec List.161; + ret List.162; in - jump List.572 #Derived_gen.20 #Derived_gen.21 #Derived_gen.22 #Derived_gen.23 #Derived_gen.24; + jump List.574 #Derived_gen.18 #Derived_gen.19 #Derived_gen.20 #Derived_gen.21 #Derived_gen.22; procedure Num.22 (#Attr.2, #Attr.3): let Num.292 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; diff --git a/crates/compiler/test_mono/generated/inspect_derived_tag_two_payloads_string.txt b/crates/compiler/test_mono/generated/inspect_derived_tag_two_payloads_string.txt index 6fe588ef1a..540248315b 100644 --- a/crates/compiler/test_mono/generated/inspect_derived_tag_two_payloads_string.txt +++ b/crates/compiler/test_mono/generated/inspect_derived_tag_two_payloads_string.txt @@ -125,42 +125,42 @@ procedure Inspect.61 (Inspect.304, Inspect.300): procedure Inspect.62 (Inspect.306): ret Inspect.306; -procedure List.1 (List.104): - let List.582 : U64 = CallByName List.6 List.104; - dec List.104; - let List.583 : U64 = 0i64; - let List.581 : Int1 = CallByName Bool.11 List.582 List.583; - ret List.581; +procedure List.1 (List.105): + let List.584 : U64 = CallByName List.6 List.105; + dec List.105; + let List.585 : U64 = 0i64; + let List.583 : Int1 = CallByName Bool.11 List.584 List.585; + ret List.583; -procedure List.18 (List.156, List.157, List.158): - let List.570 : U64 = 0i64; - let List.571 : U64 = CallByName List.6 List.156; - let List.569 : Str = CallByName List.89 List.156 List.157 List.158 List.570 List.571; - ret List.569; +procedure List.18 (List.158, List.159, List.160): + let List.572 : U64 = 0i64; + let List.573 : U64 = CallByName List.6 List.158; + let List.571 : Str = CallByName List.90 List.158 List.159 List.160 List.572 List.573; + ret List.571; procedure List.6 (#Attr.2): - let List.580 : U64 = lowlevel ListLen #Attr.2; - ret List.580; + let List.582 : U64 = lowlevel ListLen #Attr.2; + ret List.582; procedure List.66 (#Attr.2, #Attr.3): - let List.579 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.579; + let List.581 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.581; -procedure List.89 (#Derived_gen.13, #Derived_gen.14, #Derived_gen.15, #Derived_gen.16, #Derived_gen.17): - joinpoint List.572 List.159 List.160 List.161 List.162 List.163: - let List.574 : Int1 = CallByName Num.22 List.162 List.163; - if List.574 then - let List.578 : Str = CallByName List.66 List.159 List.162; - inc List.578; - let List.164 : Str = CallByName Inspect.211 List.160 List.578; - let List.577 : U64 = 1i64; - let List.576 : U64 = CallByName Num.51 List.162 List.577; - jump List.572 List.159 List.164 List.161 List.576 List.163; +procedure List.90 (#Derived_gen.17, #Derived_gen.18, #Derived_gen.19, #Derived_gen.20, #Derived_gen.21): + joinpoint List.574 List.161 List.162 List.163 List.164 List.165: + let List.576 : Int1 = CallByName Num.22 List.164 List.165; + if List.576 then + let List.580 : Str = CallByName List.66 List.161 List.164; + inc List.580; + let List.166 : Str = CallByName Inspect.211 List.162 List.580; + let List.579 : U64 = 1i64; + let List.578 : U64 = CallByName Num.51 List.164 List.579; + jump List.574 List.161 List.166 List.163 List.578 List.165; else - dec List.159; - ret List.160; + dec List.161; + ret List.162; in - jump List.572 #Derived_gen.13 #Derived_gen.14 #Derived_gen.15 #Derived_gen.16 #Derived_gen.17; + jump List.574 #Derived_gen.17 #Derived_gen.18 #Derived_gen.19 #Derived_gen.20 #Derived_gen.21; procedure Num.22 (#Attr.2, #Attr.3): let Num.292 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; diff --git a/crates/compiler/test_mono/generated/ir_int_add.txt b/crates/compiler/test_mono/generated/ir_int_add.txt index d60f7829b8..57a6bfe560 100644 --- a/crates/compiler/test_mono/generated/ir_int_add.txt +++ b/crates/compiler/test_mono/generated/ir_int_add.txt @@ -1,6 +1,6 @@ procedure List.6 (#Attr.2): - let List.569 : U64 = lowlevel ListLen #Attr.2; - ret List.569; + let List.571 : U64 = lowlevel ListLen #Attr.2; + ret List.571; procedure Num.19 (#Attr.2, #Attr.3): let Num.293 : U64 = lowlevel NumAdd #Attr.2 #Attr.3; diff --git a/crates/compiler/test_mono/generated/issue_2583_specialize_errors_behind_unified_branches.txt b/crates/compiler/test_mono/generated/issue_2583_specialize_errors_behind_unified_branches.txt index b332177e71..3bb067f49b 100644 --- a/crates/compiler/test_mono/generated/issue_2583_specialize_errors_behind_unified_branches.txt +++ b/crates/compiler/test_mono/generated/issue_2583_specialize_errors_behind_unified_branches.txt @@ -6,42 +6,42 @@ procedure Bool.2 (): let Bool.23 : Int1 = true; ret Bool.23; -procedure List.2 (List.105, List.106): - let List.583 : U64 = CallByName List.6 List.105; - let List.579 : Int1 = CallByName Num.22 List.106 List.583; - if List.579 then - let List.581 : I64 = CallByName List.66 List.105 List.106; - dec List.105; - let List.580 : [C {}, C I64] = TagId(1) List.581; - ret List.580; +procedure List.2 (List.106, List.107): + let List.585 : U64 = CallByName List.6 List.106; + let List.581 : Int1 = CallByName Num.22 List.107 List.585; + if List.581 then + let List.583 : I64 = CallByName List.66 List.106 List.107; + dec List.106; + let List.582 : [C {}, C I64] = TagId(1) List.583; + ret List.582; else - dec List.105; - let List.578 : {} = Struct {}; - let List.577 : [C {}, C I64] = TagId(0) List.578; - ret List.577; + dec List.106; + let List.580 : {} = Struct {}; + let List.579 : [C {}, C I64] = TagId(0) List.580; + ret List.579; procedure List.6 (#Attr.2): - let List.584 : U64 = lowlevel ListLen #Attr.2; - ret List.584; + let List.586 : U64 = lowlevel ListLen #Attr.2; + ret List.586; procedure List.66 (#Attr.2, #Attr.3): - let List.582 : I64 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.582; + let List.584 : I64 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.584; -procedure List.9 (List.331): - let List.576 : U64 = 0i64; - let List.569 : [C {}, C I64] = CallByName List.2 List.331 List.576; - let List.573 : U8 = 1i64; - let List.574 : U8 = GetTagId List.569; - let List.575 : Int1 = lowlevel Eq List.573 List.574; - if List.575 then - let List.332 : I64 = UnionAtIndex (Id 1) (Index 0) List.569; - let List.570 : [C Int1, C I64] = TagId(1) List.332; - ret List.570; +procedure List.9 (List.333): + let List.578 : U64 = 0i64; + let List.571 : [C {}, C I64] = CallByName List.2 List.333 List.578; + let List.575 : U8 = 1i64; + let List.576 : U8 = GetTagId List.571; + let List.577 : Int1 = lowlevel Eq List.575 List.576; + if List.577 then + let List.334 : I64 = UnionAtIndex (Id 1) (Index 0) List.571; + let List.572 : [C Int1, C I64] = TagId(1) List.334; + ret List.572; else - let List.572 : Int1 = true; - let List.571 : [C Int1, C I64] = TagId(0) List.572; - ret List.571; + let List.574 : Int1 = true; + let List.573 : [C Int1, C I64] = TagId(0) List.574; + ret List.573; procedure Num.22 (#Attr.2, #Attr.3): let Num.291 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; diff --git a/crates/compiler/test_mono/generated/issue_4749.txt b/crates/compiler/test_mono/generated/issue_4749.txt index 8735610956..1c13416452 100644 --- a/crates/compiler/test_mono/generated/issue_4749.txt +++ b/crates/compiler/test_mono/generated/issue_4749.txt @@ -64,119 +64,119 @@ procedure Decode.27 (Decode.107, Decode.108): let Decode.123 : [C [C List U8, C ], C Str] = TagId(0) Decode.124; ret Decode.123; -procedure List.1 (List.104): - let List.623 : U64 = CallByName List.6 List.104; - dec List.104; - let List.624 : U64 = 0i64; - let List.622 : Int1 = CallByName Bool.11 List.623 List.624; - ret List.622; +procedure List.1 (List.105): + let List.625 : U64 = CallByName List.6 List.105; + dec List.105; + let List.626 : U64 = 0i64; + let List.624 : Int1 = CallByName Bool.11 List.625 List.626; + ret List.624; -procedure List.101 (List.484, List.485, List.486): - let List.632 : U64 = 0i64; - let List.633 : U64 = CallByName List.6 List.484; - let List.631 : [C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64], C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64]] = CallByName List.80 List.484 List.485 List.486 List.632 List.633; - ret List.631; +procedure List.102 (List.486, List.487, List.488): + let List.634 : U64 = 0i64; + let List.635 : U64 = CallByName List.6 List.486; + let List.633 : [C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64], C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64]] = CallByName List.80 List.486 List.487 List.488 List.634 List.635; + ret List.633; -procedure List.2 (List.105, List.106): - let List.614 : U64 = CallByName List.6 List.105; - let List.611 : Int1 = CallByName Num.22 List.106 List.614; - if List.611 then - let List.613 : U8 = CallByName List.66 List.105 List.106; - dec List.105; - let List.612 : [C {}, C U8] = TagId(1) List.613; - ret List.612; +procedure List.2 (List.106, List.107): + let List.616 : U64 = CallByName List.6 List.106; + let List.613 : Int1 = CallByName Num.22 List.107 List.616; + if List.613 then + let List.615 : U8 = CallByName List.66 List.106 List.107; + dec List.106; + let List.614 : [C {}, C U8] = TagId(1) List.615; + ret List.614; else - dec List.105; - let List.610 : {} = Struct {}; - let List.609 : [C {}, C U8] = TagId(0) List.610; - ret List.609; + dec List.106; + let List.612 : {} = Struct {}; + let List.611 : [C {}, C U8] = TagId(0) List.612; + ret List.611; -procedure List.26 (List.197, List.198, List.199): - let List.625 : [C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64], C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64]] = CallByName List.101 List.197 List.198 List.199; - let List.628 : U8 = 1i64; - let List.629 : U8 = GetTagId List.625; - let List.630 : Int1 = lowlevel Eq List.628 List.629; - if List.630 then - let List.200 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = UnionAtIndex (Id 1) (Index 0) List.625; - ret List.200; +procedure List.26 (List.199, List.200, List.201): + let List.627 : [C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64], C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64]] = CallByName List.102 List.199 List.200 List.201; + let List.630 : U8 = 1i64; + let List.631 : U8 = GetTagId List.627; + let List.632 : Int1 = lowlevel Eq List.630 List.631; + if List.632 then + let List.202 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = UnionAtIndex (Id 1) (Index 0) List.627; + ret List.202; else - let List.201 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = UnionAtIndex (Id 0) (Index 0) List.625; - ret List.201; + let List.203 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = UnionAtIndex (Id 0) (Index 0) List.627; + ret List.203; -procedure List.38 (List.340, List.341): - let List.591 : U64 = CallByName List.6 List.340; - let List.342 : U64 = CallByName Num.77 List.591 List.341; - let List.590 : List U8 = CallByName List.43 List.340 List.342; - ret List.590; +procedure List.38 (List.342, List.343): + let List.593 : U64 = CallByName List.6 List.342; + let List.344 : U64 = CallByName Num.77 List.593 List.343; + let List.592 : List U8 = CallByName List.43 List.342 List.344; + ret List.592; -procedure List.4 (List.121, List.122): - let List.601 : U64 = 1i64; - let List.600 : List U8 = CallByName List.70 List.121 List.601; - let List.599 : List U8 = CallByName List.71 List.600 List.122; - ret List.599; +procedure List.4 (List.122, List.123): + let List.603 : U64 = 1i64; + let List.602 : List U8 = CallByName List.70 List.122 List.603; + let List.601 : List U8 = CallByName List.71 List.602 List.123; + ret List.601; -procedure List.43 (List.338, List.339): - let List.581 : U64 = CallByName List.6 List.338; - let List.580 : U64 = CallByName Num.77 List.581 List.339; - let List.575 : {U64, U64} = Struct {List.339, List.580}; - let List.574 : List U8 = CallByName List.49 List.338 List.575; - ret List.574; +procedure List.43 (List.340, List.341): + let List.583 : U64 = CallByName List.6 List.340; + let List.582 : U64 = CallByName Num.77 List.583 List.341; + let List.577 : {U64, U64} = Struct {List.341, List.582}; + let List.576 : List U8 = CallByName List.49 List.340 List.577; + ret List.576; -procedure List.49 (List.416, List.417): - let List.619 : U64 = StructAtIndex 1 List.417; - let List.620 : U64 = StructAtIndex 0 List.417; - let List.618 : List U8 = CallByName List.72 List.416 List.619 List.620; - ret List.618; +procedure List.49 (List.418, List.419): + let List.621 : U64 = StructAtIndex 1 List.419; + let List.622 : U64 = StructAtIndex 0 List.419; + let List.620 : List U8 = CallByName List.72 List.418 List.621 List.622; + ret List.620; procedure List.6 (#Attr.2): - let List.646 : U64 = lowlevel ListLen #Attr.2; - ret List.646; + let List.648 : U64 = lowlevel ListLen #Attr.2; + ret List.648; procedure List.66 (#Attr.2, #Attr.3): - let List.607 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.607; + let List.609 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.609; procedure List.70 (#Attr.2, #Attr.3): - let List.598 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; - ret List.598; + let List.600 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; + ret List.600; procedure List.71 (#Attr.2, #Attr.3): - let List.596 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.596; + let List.598 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; + ret List.598; procedure List.72 (#Attr.2, #Attr.3, #Attr.4): - let List.579 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; - ret List.579; + let List.581 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; + ret List.581; procedure List.8 (#Attr.2, #Attr.3): - let List.593 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; - ret List.593; + let List.595 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; + ret List.595; procedure List.80 (#Derived_gen.1, #Derived_gen.2, #Derived_gen.3, #Derived_gen.4, #Derived_gen.5): - joinpoint List.634 List.487 List.488 List.489 List.490 List.491: - let List.636 : Int1 = CallByName Num.22 List.490 List.491; - if List.636 then - let List.645 : U8 = CallByName List.66 List.487 List.490; - let List.637 : [C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64], C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64]] = CallByName TotallyNotJson.62 List.488 List.645; - let List.642 : U8 = 1i64; - let List.643 : U8 = GetTagId List.637; - let List.644 : Int1 = lowlevel Eq List.642 List.643; - if List.644 then - let List.492 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = UnionAtIndex (Id 1) (Index 0) List.637; - let List.640 : U64 = 1i64; - let List.639 : U64 = CallByName Num.51 List.490 List.640; - jump List.634 List.487 List.492 List.489 List.639 List.491; + joinpoint List.636 List.489 List.490 List.491 List.492 List.493: + let List.638 : Int1 = CallByName Num.22 List.492 List.493; + if List.638 then + let List.647 : U8 = CallByName List.66 List.489 List.492; + let List.639 : [C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64], C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64]] = CallByName TotallyNotJson.62 List.490 List.647; + let List.644 : U8 = 1i64; + let List.645 : U8 = GetTagId List.639; + let List.646 : Int1 = lowlevel Eq List.644 List.645; + if List.646 then + let List.494 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = UnionAtIndex (Id 1) (Index 0) List.639; + let List.642 : U64 = 1i64; + let List.641 : U64 = CallByName Num.51 List.492 List.642; + jump List.636 List.489 List.494 List.491 List.641 List.493; else - dec List.487; - let List.493 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = UnionAtIndex (Id 0) (Index 0) List.637; - let List.641 : [C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64], C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64]] = TagId(0) List.493; - ret List.641; + dec List.489; + let List.495 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = UnionAtIndex (Id 0) (Index 0) List.639; + let List.643 : [C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64], C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64]] = TagId(0) List.495; + ret List.643; else - dec List.487; - let List.635 : [C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64], C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64]] = TagId(1) List.488; - ret List.635; + dec List.489; + let List.637 : [C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64], C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64]] = TagId(1) List.490; + ret List.637; in - jump List.634 #Derived_gen.1 #Derived_gen.2 #Derived_gen.3 #Derived_gen.4 #Derived_gen.5; + jump List.636 #Derived_gen.1 #Derived_gen.2 #Derived_gen.3 #Derived_gen.4 #Derived_gen.5; procedure Num.19 (#Attr.2, #Attr.3): let Num.294 : U8 = lowlevel NumAdd #Attr.2 #Attr.3; diff --git a/crates/compiler/test_mono/generated/issue_4770.txt b/crates/compiler/test_mono/generated/issue_4770.txt index d1d59b8a8f..766ac5f80a 100644 --- a/crates/compiler/test_mono/generated/issue_4770.txt +++ b/crates/compiler/test_mono/generated/issue_4770.txt @@ -6,80 +6,80 @@ procedure Bool.2 (): let Bool.24 : Int1 = true; ret Bool.24; -procedure List.101 (List.484, List.485, List.486): - let List.583 : U64 = 0i64; - let List.584 : U64 = CallByName List.6 List.484; - let List.582 : [C {}, C {}] = CallByName List.80 List.484 List.485 List.486 List.583 List.584; - ret List.582; +procedure List.102 (List.486, List.487, List.488): + let List.585 : U64 = 0i64; + let List.586 : U64 = CallByName List.6 List.486; + let List.584 : [C {}, C {}] = CallByName List.80 List.486 List.487 List.488 List.585 List.586; + ret List.584; procedure List.23 (#Attr.2, #Attr.3, #Attr.4): - let List.604 : List {[C I64, C List *self], [C I64, C List *self]} = lowlevel ListMap2 { xs: `#Attr.#arg1`, ys: `#Attr.#arg2` } #Attr.2 #Attr.3 Test.15 #Attr.4; + let List.606 : List {[C I64, C List *self], [C I64, C List *self]} = lowlevel ListMap2 { xs: `#Attr.#arg1`, ys: `#Attr.#arg2` } #Attr.2 #Attr.3 Test.15 #Attr.4; decref #Attr.3; decref #Attr.2; - ret List.604; + ret List.606; -procedure List.232 (List.571, List.233, List.231): - let List.601 : Int1 = CallByName Test.1 List.233; - if List.601 then - let List.603 : {} = Struct {}; - let List.602 : [C {}, C {}] = TagId(1) List.603; - ret List.602; +procedure List.234 (List.573, List.235, List.233): + let List.603 : Int1 = CallByName Test.1 List.235; + if List.603 then + let List.605 : {} = Struct {}; + let List.604 : [C {}, C {}] = TagId(1) List.605; + ret List.604; else - let List.600 : {} = Struct {}; - let List.599 : [C {}, C {}] = TagId(0) List.600; - ret List.599; + let List.602 : {} = Struct {}; + let List.601 : [C {}, C {}] = TagId(0) List.602; + ret List.601; -procedure List.56 (List.230, List.231): - let List.580 : {} = Struct {}; - let List.572 : [C {}, C {}] = CallByName List.101 List.230 List.580 List.231; - let List.577 : U8 = 1i64; - let List.578 : U8 = GetTagId List.572; - let List.579 : Int1 = lowlevel Eq List.577 List.578; - if List.579 then - let List.573 : Int1 = CallByName Bool.2; - ret List.573; +procedure List.56 (List.232, List.233): + let List.582 : {} = Struct {}; + let List.574 : [C {}, C {}] = CallByName List.102 List.232 List.582 List.233; + let List.579 : U8 = 1i64; + let List.580 : U8 = GetTagId List.574; + let List.581 : Int1 = lowlevel Eq List.579 List.580; + if List.581 then + let List.575 : Int1 = CallByName Bool.2; + ret List.575; else - let List.574 : Int1 = CallByName Bool.1; - ret List.574; + let List.576 : Int1 = CallByName Bool.1; + ret List.576; procedure List.6 (#Attr.2): - let List.570 : U64 = lowlevel ListLen #Attr.2; - ret List.570; + let List.572 : U64 = lowlevel ListLen #Attr.2; + ret List.572; procedure List.6 (#Attr.2): - let List.598 : U64 = lowlevel ListLen #Attr.2; - ret List.598; + let List.600 : U64 = lowlevel ListLen #Attr.2; + ret List.600; procedure List.66 (#Attr.2, #Attr.3): - let List.597 : {[C I64, C List *self], [C I64, C List *self]} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.597; + let List.599 : {[C I64, C List *self], [C I64, C List *self]} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.599; procedure List.80 (#Derived_gen.1, #Derived_gen.2, #Derived_gen.3, #Derived_gen.4, #Derived_gen.5): - joinpoint List.585 List.487 List.488 List.489 List.490 List.491: - let List.587 : Int1 = CallByName Num.22 List.490 List.491; - if List.587 then - let List.596 : {[C I64, C List *self], [C I64, C List *self]} = CallByName List.66 List.487 List.490; - inc List.596; - let List.588 : [C {}, C {}] = CallByName List.232 List.488 List.596 List.489; - let List.593 : U8 = 1i64; - let List.594 : U8 = GetTagId List.588; - let List.595 : Int1 = lowlevel Eq List.593 List.594; - if List.595 then - let List.492 : {} = UnionAtIndex (Id 1) (Index 0) List.588; - let List.591 : U64 = 1i64; - let List.590 : U64 = CallByName Num.51 List.490 List.591; - jump List.585 List.487 List.492 List.489 List.590 List.491; + joinpoint List.587 List.489 List.490 List.491 List.492 List.493: + let List.589 : Int1 = CallByName Num.22 List.492 List.493; + if List.589 then + let List.598 : {[C I64, C List *self], [C I64, C List *self]} = CallByName List.66 List.489 List.492; + inc List.598; + let List.590 : [C {}, C {}] = CallByName List.234 List.490 List.598 List.491; + let List.595 : U8 = 1i64; + let List.596 : U8 = GetTagId List.590; + let List.597 : Int1 = lowlevel Eq List.595 List.596; + if List.597 then + let List.494 : {} = UnionAtIndex (Id 1) (Index 0) List.590; + let List.593 : U64 = 1i64; + let List.592 : U64 = CallByName Num.51 List.492 List.593; + jump List.587 List.489 List.494 List.491 List.592 List.493; else - dec List.487; - let List.493 : {} = UnionAtIndex (Id 0) (Index 0) List.588; - let List.592 : [C {}, C {}] = TagId(0) List.493; - ret List.592; + dec List.489; + let List.495 : {} = UnionAtIndex (Id 0) (Index 0) List.590; + let List.594 : [C {}, C {}] = TagId(0) List.495; + ret List.594; else - dec List.487; - let List.586 : [C {}, C {}] = TagId(1) List.488; - ret List.586; + dec List.489; + let List.588 : [C {}, C {}] = TagId(1) List.490; + ret List.588; in - jump List.585 #Derived_gen.1 #Derived_gen.2 #Derived_gen.3 #Derived_gen.4 #Derived_gen.5; + jump List.587 #Derived_gen.1 #Derived_gen.2 #Derived_gen.3 #Derived_gen.4 #Derived_gen.5; procedure Num.22 (#Attr.2, #Attr.3): let Num.291 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; diff --git a/crates/compiler/test_mono/generated/issue_4772_weakened_monomorphic_destructure.txt b/crates/compiler/test_mono/generated/issue_4772_weakened_monomorphic_destructure.txt index 449451bdf7..d46161fe7d 100644 --- a/crates/compiler/test_mono/generated/issue_4772_weakened_monomorphic_destructure.txt +++ b/crates/compiler/test_mono/generated/issue_4772_weakened_monomorphic_destructure.txt @@ -38,119 +38,119 @@ procedure Decode.26 (Decode.105, Decode.106): let Decode.122 : {List U8, [C {}, C Str]} = CallByName Decode.25 Decode.105 Decode.123 Decode.106; ret Decode.122; -procedure List.1 (List.104): - let List.619 : U64 = CallByName List.6 List.104; - dec List.104; - let List.620 : U64 = 0i64; - let List.618 : Int1 = CallByName Bool.11 List.619 List.620; - ret List.618; +procedure List.1 (List.105): + let List.621 : U64 = CallByName List.6 List.105; + dec List.105; + let List.622 : U64 = 0i64; + let List.620 : Int1 = CallByName Bool.11 List.621 List.622; + ret List.620; -procedure List.101 (List.484, List.485, List.486): - let List.628 : U64 = 0i64; - let List.629 : U64 = CallByName List.6 List.484; - let List.627 : [C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64], C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64]] = CallByName List.80 List.484 List.485 List.486 List.628 List.629; - ret List.627; +procedure List.102 (List.486, List.487, List.488): + let List.630 : U64 = 0i64; + let List.631 : U64 = CallByName List.6 List.486; + let List.629 : [C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64], C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64]] = CallByName List.80 List.486 List.487 List.488 List.630 List.631; + ret List.629; -procedure List.2 (List.105, List.106): - let List.610 : U64 = CallByName List.6 List.105; - let List.607 : Int1 = CallByName Num.22 List.106 List.610; - if List.607 then - let List.609 : U8 = CallByName List.66 List.105 List.106; - dec List.105; - let List.608 : [C {}, C U8] = TagId(1) List.609; - ret List.608; +procedure List.2 (List.106, List.107): + let List.612 : U64 = CallByName List.6 List.106; + let List.609 : Int1 = CallByName Num.22 List.107 List.612; + if List.609 then + let List.611 : U8 = CallByName List.66 List.106 List.107; + dec List.106; + let List.610 : [C {}, C U8] = TagId(1) List.611; + ret List.610; else - dec List.105; - let List.606 : {} = Struct {}; - let List.605 : [C {}, C U8] = TagId(0) List.606; - ret List.605; + dec List.106; + let List.608 : {} = Struct {}; + let List.607 : [C {}, C U8] = TagId(0) List.608; + ret List.607; -procedure List.26 (List.197, List.198, List.199): - let List.621 : [C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64], C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64]] = CallByName List.101 List.197 List.198 List.199; - let List.624 : U8 = 1i64; - let List.625 : U8 = GetTagId List.621; - let List.626 : Int1 = lowlevel Eq List.624 List.625; - if List.626 then - let List.200 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = UnionAtIndex (Id 1) (Index 0) List.621; - ret List.200; +procedure List.26 (List.199, List.200, List.201): + let List.623 : [C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64], C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64]] = CallByName List.102 List.199 List.200 List.201; + let List.626 : U8 = 1i64; + let List.627 : U8 = GetTagId List.623; + let List.628 : Int1 = lowlevel Eq List.626 List.627; + if List.628 then + let List.202 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = UnionAtIndex (Id 1) (Index 0) List.623; + ret List.202; else - let List.201 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = UnionAtIndex (Id 0) (Index 0) List.621; - ret List.201; + let List.203 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = UnionAtIndex (Id 0) (Index 0) List.623; + ret List.203; -procedure List.38 (List.340, List.341): - let List.587 : U64 = CallByName List.6 List.340; - let List.342 : U64 = CallByName Num.77 List.587 List.341; - let List.586 : List U8 = CallByName List.43 List.340 List.342; - ret List.586; +procedure List.38 (List.342, List.343): + let List.589 : U64 = CallByName List.6 List.342; + let List.344 : U64 = CallByName Num.77 List.589 List.343; + let List.588 : List U8 = CallByName List.43 List.342 List.344; + ret List.588; -procedure List.4 (List.121, List.122): - let List.597 : U64 = 1i64; - let List.596 : List U8 = CallByName List.70 List.121 List.597; - let List.595 : List U8 = CallByName List.71 List.596 List.122; - ret List.595; +procedure List.4 (List.122, List.123): + let List.599 : U64 = 1i64; + let List.598 : List U8 = CallByName List.70 List.122 List.599; + let List.597 : List U8 = CallByName List.71 List.598 List.123; + ret List.597; -procedure List.43 (List.338, List.339): - let List.577 : U64 = CallByName List.6 List.338; - let List.576 : U64 = CallByName Num.77 List.577 List.339; - let List.571 : {U64, U64} = Struct {List.339, List.576}; - let List.570 : List U8 = CallByName List.49 List.338 List.571; - ret List.570; +procedure List.43 (List.340, List.341): + let List.579 : U64 = CallByName List.6 List.340; + let List.578 : U64 = CallByName Num.77 List.579 List.341; + let List.573 : {U64, U64} = Struct {List.341, List.578}; + let List.572 : List U8 = CallByName List.49 List.340 List.573; + ret List.572; -procedure List.49 (List.416, List.417): - let List.615 : U64 = StructAtIndex 1 List.417; - let List.616 : U64 = StructAtIndex 0 List.417; - let List.614 : List U8 = CallByName List.72 List.416 List.615 List.616; - ret List.614; +procedure List.49 (List.418, List.419): + let List.617 : U64 = StructAtIndex 1 List.419; + let List.618 : U64 = StructAtIndex 0 List.419; + let List.616 : List U8 = CallByName List.72 List.418 List.617 List.618; + ret List.616; procedure List.6 (#Attr.2): - let List.642 : U64 = lowlevel ListLen #Attr.2; - ret List.642; + let List.644 : U64 = lowlevel ListLen #Attr.2; + ret List.644; procedure List.66 (#Attr.2, #Attr.3): - let List.603 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.603; + let List.605 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.605; procedure List.70 (#Attr.2, #Attr.3): - let List.594 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; - ret List.594; + let List.596 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; + ret List.596; procedure List.71 (#Attr.2, #Attr.3): - let List.592 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.592; + let List.594 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; + ret List.594; procedure List.72 (#Attr.2, #Attr.3, #Attr.4): - let List.575 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; - ret List.575; + let List.577 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; + ret List.577; procedure List.8 (#Attr.2, #Attr.3): - let List.589 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; - ret List.589; + let List.591 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; + ret List.591; procedure List.80 (#Derived_gen.0, #Derived_gen.1, #Derived_gen.2, #Derived_gen.3, #Derived_gen.4): - joinpoint List.630 List.487 List.488 List.489 List.490 List.491: - let List.632 : Int1 = CallByName Num.22 List.490 List.491; - if List.632 then - let List.641 : U8 = CallByName List.66 List.487 List.490; - let List.633 : [C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64], C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64]] = CallByName TotallyNotJson.62 List.488 List.641; - let List.638 : U8 = 1i64; - let List.639 : U8 = GetTagId List.633; - let List.640 : Int1 = lowlevel Eq List.638 List.639; - if List.640 then - let List.492 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = UnionAtIndex (Id 1) (Index 0) List.633; - let List.636 : U64 = 1i64; - let List.635 : U64 = CallByName Num.51 List.490 List.636; - jump List.630 List.487 List.492 List.489 List.635 List.491; + joinpoint List.632 List.489 List.490 List.491 List.492 List.493: + let List.634 : Int1 = CallByName Num.22 List.492 List.493; + if List.634 then + let List.643 : U8 = CallByName List.66 List.489 List.492; + let List.635 : [C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64], C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64]] = CallByName TotallyNotJson.62 List.490 List.643; + let List.640 : U8 = 1i64; + let List.641 : U8 = GetTagId List.635; + let List.642 : Int1 = lowlevel Eq List.640 List.641; + if List.642 then + let List.494 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = UnionAtIndex (Id 1) (Index 0) List.635; + let List.638 : U64 = 1i64; + let List.637 : U64 = CallByName Num.51 List.492 List.638; + jump List.632 List.489 List.494 List.491 List.637 List.493; else - dec List.487; - let List.493 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = UnionAtIndex (Id 0) (Index 0) List.633; - let List.637 : [C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64], C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64]] = TagId(0) List.493; - ret List.637; + dec List.489; + let List.495 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = UnionAtIndex (Id 0) (Index 0) List.635; + let List.639 : [C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64], C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64]] = TagId(0) List.495; + ret List.639; else - dec List.487; - let List.631 : [C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64], C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64]] = TagId(1) List.488; - ret List.631; + dec List.489; + let List.633 : [C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64], C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64]] = TagId(1) List.490; + ret List.633; in - jump List.630 #Derived_gen.0 #Derived_gen.1 #Derived_gen.2 #Derived_gen.3 #Derived_gen.4; + jump List.632 #Derived_gen.0 #Derived_gen.1 #Derived_gen.2 #Derived_gen.3 #Derived_gen.4; procedure Num.19 (#Attr.2, #Attr.3): let Num.294 : U8 = lowlevel NumAdd #Attr.2 #Attr.3; diff --git a/crates/compiler/test_mono/generated/layout_cache_structure_with_multiple_recursive_structures.txt b/crates/compiler/test_mono/generated/layout_cache_structure_with_multiple_recursive_structures.txt index 169634192e..f1ea8a9c64 100644 --- a/crates/compiler/test_mono/generated/layout_cache_structure_with_multiple_recursive_structures.txt +++ b/crates/compiler/test_mono/generated/layout_cache_structure_with_multiple_recursive_structures.txt @@ -1,32 +1,32 @@ -procedure List.18 (List.156, List.157, List.158): - let List.570 : U64 = 0i64; - let List.571 : U64 = CallByName List.6 List.156; - let List.569 : [, C {[C *self, ], *self}] = CallByName List.89 List.156 List.157 List.158 List.570 List.571; - ret List.569; +procedure List.18 (List.158, List.159, List.160): + let List.572 : U64 = 0i64; + let List.573 : U64 = CallByName List.6 List.158; + let List.571 : [, C {[C *self, ], *self}] = CallByName List.90 List.158 List.159 List.160 List.572 List.573; + ret List.571; procedure List.6 (#Attr.2): - let List.580 : U64 = lowlevel ListLen #Attr.2; - ret List.580; + let List.582 : U64 = lowlevel ListLen #Attr.2; + ret List.582; procedure List.66 (#Attr.2, #Attr.3): - let List.579 : [C *self, ] = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.579; + let List.581 : [C *self, ] = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.581; -procedure List.89 (#Derived_gen.0, #Derived_gen.1, #Derived_gen.2, #Derived_gen.3, #Derived_gen.4): - joinpoint List.572 List.159 List.160 List.161 List.162 List.163: - let List.574 : Int1 = CallByName Num.22 List.162 List.163; - if List.574 then - let List.578 : [C *self, ] = CallByName List.66 List.159 List.162; - inc List.578; - let List.164 : [, C {[C *self, ], *self}] = CallByName Test.7 List.160 List.578; - let List.577 : U64 = 1i64; - let List.576 : U64 = CallByName Num.51 List.162 List.577; - jump List.572 List.159 List.164 List.161 List.576 List.163; +procedure List.90 (#Derived_gen.0, #Derived_gen.1, #Derived_gen.2, #Derived_gen.3, #Derived_gen.4): + joinpoint List.574 List.161 List.162 List.163 List.164 List.165: + let List.576 : Int1 = CallByName Num.22 List.164 List.165; + if List.576 then + let List.580 : [C *self, ] = CallByName List.66 List.161 List.164; + inc List.580; + let List.166 : [, C {[C *self, ], *self}] = CallByName Test.7 List.162 List.580; + let List.579 : U64 = 1i64; + let List.578 : U64 = CallByName Num.51 List.164 List.579; + jump List.574 List.161 List.166 List.163 List.578 List.165; else - dec List.159; - ret List.160; + dec List.161; + ret List.162; in - jump List.572 #Derived_gen.0 #Derived_gen.1 #Derived_gen.2 #Derived_gen.3 #Derived_gen.4; + jump List.574 #Derived_gen.0 #Derived_gen.1 #Derived_gen.2 #Derived_gen.3 #Derived_gen.4; procedure Num.22 (#Attr.2, #Attr.3): let Num.292 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; diff --git a/crates/compiler/test_mono/generated/list_append.txt b/crates/compiler/test_mono/generated/list_append.txt index e8fcc57811..43dc4b2440 100644 --- a/crates/compiler/test_mono/generated/list_append.txt +++ b/crates/compiler/test_mono/generated/list_append.txt @@ -1,16 +1,16 @@ -procedure List.4 (List.121, List.122): - let List.572 : U64 = 1i64; - let List.570 : List I64 = CallByName List.70 List.121 List.572; - let List.569 : List I64 = CallByName List.71 List.570 List.122; - ret List.569; +procedure List.4 (List.122, List.123): + let List.574 : U64 = 1i64; + let List.572 : List I64 = CallByName List.70 List.122 List.574; + let List.571 : List I64 = CallByName List.71 List.572 List.123; + ret List.571; procedure List.70 (#Attr.2, #Attr.3): - let List.573 : List I64 = lowlevel ListReserve #Attr.2 #Attr.3; - ret List.573; + let List.575 : List I64 = lowlevel ListReserve #Attr.2 #Attr.3; + ret List.575; procedure List.71 (#Attr.2, #Attr.3): - let List.571 : List I64 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.571; + let List.573 : List I64 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; + ret List.573; procedure Test.0 (): let Test.2 : List I64 = Array [1i64]; diff --git a/crates/compiler/test_mono/generated/list_append_closure.txt b/crates/compiler/test_mono/generated/list_append_closure.txt index c635c46e0d..af9f28c7fa 100644 --- a/crates/compiler/test_mono/generated/list_append_closure.txt +++ b/crates/compiler/test_mono/generated/list_append_closure.txt @@ -1,16 +1,16 @@ -procedure List.4 (List.121, List.122): - let List.572 : U64 = 1i64; - let List.570 : List I64 = CallByName List.70 List.121 List.572; - let List.569 : List I64 = CallByName List.71 List.570 List.122; - ret List.569; +procedure List.4 (List.122, List.123): + let List.574 : U64 = 1i64; + let List.572 : List I64 = CallByName List.70 List.122 List.574; + let List.571 : List I64 = CallByName List.71 List.572 List.123; + ret List.571; procedure List.70 (#Attr.2, #Attr.3): - let List.573 : List I64 = lowlevel ListReserve #Attr.2 #Attr.3; - ret List.573; + let List.575 : List I64 = lowlevel ListReserve #Attr.2 #Attr.3; + ret List.575; procedure List.71 (#Attr.2, #Attr.3): - let List.571 : List I64 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.571; + let List.573 : List I64 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; + ret List.573; procedure Test.1 (Test.2): let Test.6 : I64 = 42i64; diff --git a/crates/compiler/test_mono/generated/list_cannot_update_inplace.txt b/crates/compiler/test_mono/generated/list_cannot_update_inplace.txt index ac188ff54a..dda1110463 100644 --- a/crates/compiler/test_mono/generated/list_cannot_update_inplace.txt +++ b/crates/compiler/test_mono/generated/list_cannot_update_inplace.txt @@ -1,25 +1,25 @@ -procedure List.3 (List.113, List.114, List.115): - let List.572 : {List I64, I64} = CallByName List.64 List.113 List.114 List.115; - let List.571 : List I64 = StructAtIndex 0 List.572; - ret List.571; +procedure List.3 (List.114, List.115, List.116): + let List.574 : {List I64, I64} = CallByName List.64 List.114 List.115 List.116; + let List.573 : List I64 = StructAtIndex 0 List.574; + ret List.573; procedure List.6 (#Attr.2): - let List.570 : U64 = lowlevel ListLen #Attr.2; - ret List.570; + let List.572 : U64 = lowlevel ListLen #Attr.2; + ret List.572; -procedure List.64 (List.110, List.111, List.112): - let List.577 : U64 = CallByName List.6 List.110; - let List.574 : Int1 = CallByName Num.22 List.111 List.577; - if List.574 then - let List.575 : {List I64, I64} = CallByName List.67 List.110 List.111 List.112; - ret List.575; +procedure List.64 (List.111, List.112, List.113): + let List.579 : U64 = CallByName List.6 List.111; + let List.576 : Int1 = CallByName Num.22 List.112 List.579; + if List.576 then + let List.577 : {List I64, I64} = CallByName List.67 List.111 List.112 List.113; + ret List.577; else - let List.573 : {List I64, I64} = Struct {List.110, List.112}; - ret List.573; + let List.575 : {List I64, I64} = Struct {List.111, List.113}; + ret List.575; procedure List.67 (#Attr.2, #Attr.3, #Attr.4): - let List.576 : {List I64, I64} = lowlevel ListReplaceUnsafe #Attr.2 #Attr.3 #Attr.4; - ret List.576; + let List.578 : {List I64, I64} = lowlevel ListReplaceUnsafe #Attr.2 #Attr.3 #Attr.4; + ret List.578; procedure Num.19 (#Attr.2, #Attr.3): let Num.291 : U64 = lowlevel NumAdd #Attr.2 #Attr.3; diff --git a/crates/compiler/test_mono/generated/list_get.txt b/crates/compiler/test_mono/generated/list_get.txt index bf50499e0a..80f4e43282 100644 --- a/crates/compiler/test_mono/generated/list_get.txt +++ b/crates/compiler/test_mono/generated/list_get.txt @@ -1,24 +1,24 @@ -procedure List.2 (List.105, List.106): - let List.575 : U64 = CallByName List.6 List.105; - let List.571 : Int1 = CallByName Num.22 List.106 List.575; - if List.571 then - let List.573 : I64 = CallByName List.66 List.105 List.106; - dec List.105; - let List.572 : [C {}, C I64] = TagId(1) List.573; - ret List.572; +procedure List.2 (List.106, List.107): + let List.577 : U64 = CallByName List.6 List.106; + let List.573 : Int1 = CallByName Num.22 List.107 List.577; + if List.573 then + let List.575 : I64 = CallByName List.66 List.106 List.107; + dec List.106; + let List.574 : [C {}, C I64] = TagId(1) List.575; + ret List.574; else - dec List.105; - let List.570 : {} = Struct {}; - let List.569 : [C {}, C I64] = TagId(0) List.570; - ret List.569; + dec List.106; + let List.572 : {} = Struct {}; + let List.571 : [C {}, C I64] = TagId(0) List.572; + ret List.571; procedure List.6 (#Attr.2): - let List.576 : U64 = lowlevel ListLen #Attr.2; - ret List.576; + let List.578 : U64 = lowlevel ListLen #Attr.2; + ret List.578; procedure List.66 (#Attr.2, #Attr.3): - let List.574 : I64 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.574; + let List.576 : I64 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.576; procedure Num.22 (#Attr.2, #Attr.3): let Num.291 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; diff --git a/crates/compiler/test_mono/generated/list_len.txt b/crates/compiler/test_mono/generated/list_len.txt index e51c03489a..8f79cd4c0d 100644 --- a/crates/compiler/test_mono/generated/list_len.txt +++ b/crates/compiler/test_mono/generated/list_len.txt @@ -1,10 +1,10 @@ procedure List.6 (#Attr.2): - let List.569 : U64 = lowlevel ListLen #Attr.2; - ret List.569; + let List.571 : U64 = lowlevel ListLen #Attr.2; + ret List.571; procedure List.6 (#Attr.2): - let List.570 : U64 = lowlevel ListLen #Attr.2; - ret List.570; + let List.572 : U64 = lowlevel ListLen #Attr.2; + ret List.572; procedure Num.19 (#Attr.2, #Attr.3): let Num.291 : U64 = lowlevel NumAdd #Attr.2 #Attr.3; diff --git a/crates/compiler/test_mono/generated/list_map_closure_borrows.txt b/crates/compiler/test_mono/generated/list_map_closure_borrows.txt index f3eee0fa87..40c5fadc60 100644 --- a/crates/compiler/test_mono/generated/list_map_closure_borrows.txt +++ b/crates/compiler/test_mono/generated/list_map_closure_borrows.txt @@ -1,30 +1,30 @@ -procedure List.2 (List.105, List.106): - let List.575 : U64 = CallByName List.6 List.105; - let List.571 : Int1 = CallByName Num.22 List.106 List.575; - if List.571 then - let List.573 : Str = CallByName List.66 List.105 List.106; - inc List.573; - dec List.105; - let List.572 : [C {}, C Str] = TagId(1) List.573; - ret List.572; +procedure List.2 (List.106, List.107): + let List.577 : U64 = CallByName List.6 List.106; + let List.573 : Int1 = CallByName Num.22 List.107 List.577; + if List.573 then + let List.575 : Str = CallByName List.66 List.106 List.107; + inc List.575; + dec List.106; + let List.574 : [C {}, C Str] = TagId(1) List.575; + ret List.574; else - dec List.105; - let List.570 : {} = Struct {}; - let List.569 : [C {}, C Str] = TagId(0) List.570; - ret List.569; + dec List.106; + let List.572 : {} = Struct {}; + let List.571 : [C {}, C Str] = TagId(0) List.572; + ret List.571; procedure List.5 (#Attr.2, #Attr.3): - let List.577 : List Str = lowlevel ListMap { xs: `#Attr.#arg1` } #Attr.2 Test.3 #Attr.3; + let List.579 : List Str = lowlevel ListMap { xs: `#Attr.#arg1` } #Attr.2 Test.3 #Attr.3; decref #Attr.2; - ret List.577; + ret List.579; procedure List.6 (#Attr.2): - let List.576 : U64 = lowlevel ListLen #Attr.2; - ret List.576; + let List.578 : U64 = lowlevel ListLen #Attr.2; + ret List.578; procedure List.66 (#Attr.2, #Attr.3): - let List.574 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.574; + let List.576 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.576; procedure Num.22 (#Attr.2, #Attr.3): let Num.291 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; diff --git a/crates/compiler/test_mono/generated/list_map_closure_owns.txt b/crates/compiler/test_mono/generated/list_map_closure_owns.txt index 876f2b41c2..71a0a5c4a8 100644 --- a/crates/compiler/test_mono/generated/list_map_closure_owns.txt +++ b/crates/compiler/test_mono/generated/list_map_closure_owns.txt @@ -1,30 +1,30 @@ -procedure List.2 (List.105, List.106): - let List.575 : U64 = CallByName List.6 List.105; - let List.571 : Int1 = CallByName Num.22 List.106 List.575; - if List.571 then - let List.573 : Str = CallByName List.66 List.105 List.106; - inc List.573; - dec List.105; - let List.572 : [C {}, C Str] = TagId(1) List.573; - ret List.572; +procedure List.2 (List.106, List.107): + let List.577 : U64 = CallByName List.6 List.106; + let List.573 : Int1 = CallByName Num.22 List.107 List.577; + if List.573 then + let List.575 : Str = CallByName List.66 List.106 List.107; + inc List.575; + dec List.106; + let List.574 : [C {}, C Str] = TagId(1) List.575; + ret List.574; else - dec List.105; - let List.570 : {} = Struct {}; - let List.569 : [C {}, C Str] = TagId(0) List.570; - ret List.569; + dec List.106; + let List.572 : {} = Struct {}; + let List.571 : [C {}, C Str] = TagId(0) List.572; + ret List.571; procedure List.5 (#Attr.2, #Attr.3): - let List.577 : List Str = lowlevel ListMap { xs: `#Attr.#arg1` } #Attr.2 Test.3 #Attr.3; + let List.579 : List Str = lowlevel ListMap { xs: `#Attr.#arg1` } #Attr.2 Test.3 #Attr.3; decref #Attr.2; - ret List.577; + ret List.579; procedure List.6 (#Attr.2): - let List.576 : U64 = lowlevel ListLen #Attr.2; - ret List.576; + let List.578 : U64 = lowlevel ListLen #Attr.2; + ret List.578; procedure List.66 (#Attr.2, #Attr.3): - let List.574 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.574; + let List.576 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.576; procedure Num.22 (#Attr.2, #Attr.3): let Num.291 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; diff --git a/crates/compiler/test_mono/generated/list_map_take_capturing_or_noncapturing.txt b/crates/compiler/test_mono/generated/list_map_take_capturing_or_noncapturing.txt index 7dc61e3768..6735460d70 100644 --- a/crates/compiler/test_mono/generated/list_map_take_capturing_or_noncapturing.txt +++ b/crates/compiler/test_mono/generated/list_map_take_capturing_or_noncapturing.txt @@ -1,23 +1,23 @@ procedure List.5 (#Attr.2, #Attr.3): - let List.570 : U8 = GetTagId #Attr.3; - joinpoint List.571 List.569: - ret List.569; + let List.572 : U8 = GetTagId #Attr.3; + joinpoint List.573 List.571: + ret List.571; in - switch List.570: + switch List.572: case 0: - let List.572 : List U8 = lowlevel ListMap { xs: `#Attr.#arg1` } #Attr.2 Test.4 #Attr.3; + let List.574 : List U8 = lowlevel ListMap { xs: `#Attr.#arg1` } #Attr.2 Test.4 #Attr.3; decref #Attr.2; - jump List.571 List.572; + jump List.573 List.574; case 1: - let List.573 : List U8 = lowlevel ListMap { xs: `#Attr.#arg1` } #Attr.2 Test.6 #Attr.3; + let List.575 : List U8 = lowlevel ListMap { xs: `#Attr.#arg1` } #Attr.2 Test.6 #Attr.3; decref #Attr.2; - jump List.571 List.573; + jump List.573 List.575; default: - let List.574 : List U8 = lowlevel ListMap { xs: `#Attr.#arg1` } #Attr.2 Test.8 #Attr.3; + let List.576 : List U8 = lowlevel ListMap { xs: `#Attr.#arg1` } #Attr.2 Test.8 #Attr.3; decref #Attr.2; - jump List.571 List.574; + jump List.573 List.576; procedure Num.19 (#Attr.2, #Attr.3): diff --git a/crates/compiler/test_mono/generated/list_pass_to_function.txt b/crates/compiler/test_mono/generated/list_pass_to_function.txt index 37faccea1f..9e2ae632c1 100644 --- a/crates/compiler/test_mono/generated/list_pass_to_function.txt +++ b/crates/compiler/test_mono/generated/list_pass_to_function.txt @@ -1,25 +1,25 @@ -procedure List.3 (List.113, List.114, List.115): - let List.570 : {List I64, I64} = CallByName List.64 List.113 List.114 List.115; - let List.569 : List I64 = StructAtIndex 0 List.570; - ret List.569; +procedure List.3 (List.114, List.115, List.116): + let List.572 : {List I64, I64} = CallByName List.64 List.114 List.115 List.116; + let List.571 : List I64 = StructAtIndex 0 List.572; + ret List.571; procedure List.6 (#Attr.2): - let List.576 : U64 = lowlevel ListLen #Attr.2; - ret List.576; + let List.578 : U64 = lowlevel ListLen #Attr.2; + ret List.578; -procedure List.64 (List.110, List.111, List.112): - let List.575 : U64 = CallByName List.6 List.110; - let List.572 : Int1 = CallByName Num.22 List.111 List.575; - if List.572 then - let List.573 : {List I64, I64} = CallByName List.67 List.110 List.111 List.112; - ret List.573; +procedure List.64 (List.111, List.112, List.113): + let List.577 : U64 = CallByName List.6 List.111; + let List.574 : Int1 = CallByName Num.22 List.112 List.577; + if List.574 then + let List.575 : {List I64, I64} = CallByName List.67 List.111 List.112 List.113; + ret List.575; else - let List.571 : {List I64, I64} = Struct {List.110, List.112}; - ret List.571; + let List.573 : {List I64, I64} = Struct {List.111, List.113}; + ret List.573; procedure List.67 (#Attr.2, #Attr.3, #Attr.4): - let List.574 : {List I64, I64} = lowlevel ListReplaceUnsafe #Attr.2 #Attr.3 #Attr.4; - ret List.574; + let List.576 : {List I64, I64} = lowlevel ListReplaceUnsafe #Attr.2 #Attr.3 #Attr.4; + ret List.576; procedure Num.22 (#Attr.2, #Attr.3): let Num.291 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; diff --git a/crates/compiler/test_mono/generated/list_sort_asc.txt b/crates/compiler/test_mono/generated/list_sort_asc.txt index 48800b0b1c..a5a16c40eb 100644 --- a/crates/compiler/test_mono/generated/list_sort_asc.txt +++ b/crates/compiler/test_mono/generated/list_sort_asc.txt @@ -1,11 +1,11 @@ procedure List.28 (#Attr.2, #Attr.3): - let List.571 : List I64 = lowlevel ListSortWith { xs: `#Attr.#arg1` } #Attr.2 Num.46 #Attr.3; - ret List.571; + let List.573 : List I64 = lowlevel ListSortWith { xs: `#Attr.#arg1` } #Attr.2 Num.46 #Attr.3; + ret List.573; -procedure List.59 (List.326): - let List.570 : {} = Struct {}; - let List.569 : List I64 = CallByName List.28 List.326 List.570; - ret List.569; +procedure List.59 (List.328): + let List.572 : {} = Struct {}; + let List.571 : List I64 = CallByName List.28 List.328 List.572; + ret List.571; procedure Num.46 (#Attr.2, #Attr.3): let Num.291 : U8 = lowlevel NumCompare #Attr.2 #Attr.3; diff --git a/crates/compiler/test_mono/generated/quicksort_swap.txt b/crates/compiler/test_mono/generated/quicksort_swap.txt index 176c1a7a5c..09ec4a2de4 100644 --- a/crates/compiler/test_mono/generated/quicksort_swap.txt +++ b/crates/compiler/test_mono/generated/quicksort_swap.txt @@ -1,43 +1,43 @@ -procedure List.2 (List.105, List.106): - let List.591 : U64 = CallByName List.6 List.105; - let List.588 : Int1 = CallByName Num.22 List.106 List.591; - if List.588 then - let List.590 : I64 = CallByName List.66 List.105 List.106; - dec List.105; - let List.589 : [C {}, C I64] = TagId(1) List.590; - ret List.589; +procedure List.2 (List.106, List.107): + let List.593 : U64 = CallByName List.6 List.106; + let List.590 : Int1 = CallByName Num.22 List.107 List.593; + if List.590 then + let List.592 : I64 = CallByName List.66 List.106 List.107; + dec List.106; + let List.591 : [C {}, C I64] = TagId(1) List.592; + ret List.591; else - dec List.105; - let List.587 : {} = Struct {}; - let List.586 : [C {}, C I64] = TagId(0) List.587; - ret List.586; + dec List.106; + let List.589 : {} = Struct {}; + let List.588 : [C {}, C I64] = TagId(0) List.589; + ret List.588; -procedure List.3 (List.113, List.114, List.115): - let List.578 : {List I64, I64} = CallByName List.64 List.113 List.114 List.115; - let List.577 : List I64 = StructAtIndex 0 List.578; - ret List.577; +procedure List.3 (List.114, List.115, List.116): + let List.580 : {List I64, I64} = CallByName List.64 List.114 List.115 List.116; + let List.579 : List I64 = StructAtIndex 0 List.580; + ret List.579; procedure List.6 (#Attr.2): - let List.576 : U64 = lowlevel ListLen #Attr.2; - ret List.576; + let List.578 : U64 = lowlevel ListLen #Attr.2; + ret List.578; -procedure List.64 (List.110, List.111, List.112): - let List.575 : U64 = CallByName List.6 List.110; - let List.572 : Int1 = CallByName Num.22 List.111 List.575; - if List.572 then - let List.573 : {List I64, I64} = CallByName List.67 List.110 List.111 List.112; - ret List.573; +procedure List.64 (List.111, List.112, List.113): + let List.577 : U64 = CallByName List.6 List.111; + let List.574 : Int1 = CallByName Num.22 List.112 List.577; + if List.574 then + let List.575 : {List I64, I64} = CallByName List.67 List.111 List.112 List.113; + ret List.575; else - let List.571 : {List I64, I64} = Struct {List.110, List.112}; - ret List.571; + let List.573 : {List I64, I64} = Struct {List.111, List.113}; + ret List.573; procedure List.66 (#Attr.2, #Attr.3): - let List.584 : I64 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.584; + let List.586 : I64 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.586; procedure List.67 (#Attr.2, #Attr.3, #Attr.4): - let List.574 : {List I64, I64} = lowlevel ListReplaceUnsafe #Attr.2 #Attr.3 #Attr.4; - ret List.574; + let List.576 : {List I64, I64} = lowlevel ListReplaceUnsafe #Attr.2 #Attr.3 #Attr.4; + ret List.576; procedure Num.22 (#Attr.2, #Attr.3): let Num.293 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; diff --git a/crates/compiler/test_mono/generated/record_update.txt b/crates/compiler/test_mono/generated/record_update.txt index 3b23383988..1a670102f3 100644 --- a/crates/compiler/test_mono/generated/record_update.txt +++ b/crates/compiler/test_mono/generated/record_update.txt @@ -1,25 +1,25 @@ -procedure List.3 (List.113, List.114, List.115): - let List.578 : {List U64, U64} = CallByName List.64 List.113 List.114 List.115; - let List.577 : List U64 = StructAtIndex 0 List.578; - ret List.577; +procedure List.3 (List.114, List.115, List.116): + let List.580 : {List U64, U64} = CallByName List.64 List.114 List.115 List.116; + let List.579 : List U64 = StructAtIndex 0 List.580; + ret List.579; procedure List.6 (#Attr.2): - let List.576 : U64 = lowlevel ListLen #Attr.2; - ret List.576; + let List.578 : U64 = lowlevel ListLen #Attr.2; + ret List.578; -procedure List.64 (List.110, List.111, List.112): - let List.575 : U64 = CallByName List.6 List.110; - let List.572 : Int1 = CallByName Num.22 List.111 List.575; - if List.572 then - let List.573 : {List U64, U64} = CallByName List.67 List.110 List.111 List.112; - ret List.573; +procedure List.64 (List.111, List.112, List.113): + let List.577 : U64 = CallByName List.6 List.111; + let List.574 : Int1 = CallByName Num.22 List.112 List.577; + if List.574 then + let List.575 : {List U64, U64} = CallByName List.67 List.111 List.112 List.113; + ret List.575; else - let List.571 : {List U64, U64} = Struct {List.110, List.112}; - ret List.571; + let List.573 : {List U64, U64} = Struct {List.111, List.113}; + ret List.573; procedure List.67 (#Attr.2, #Attr.3, #Attr.4): - let List.574 : {List U64, U64} = lowlevel ListReplaceUnsafe #Attr.2 #Attr.3 #Attr.4; - ret List.574; + let List.576 : {List U64, U64} = lowlevel ListReplaceUnsafe #Attr.2 #Attr.3 #Attr.4; + ret List.576; procedure Num.22 (#Attr.2, #Attr.3): let Num.291 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; diff --git a/crates/compiler/test_mono/generated/recursive_function_and_union_with_inference_hole.txt b/crates/compiler/test_mono/generated/recursive_function_and_union_with_inference_hole.txt index 1d8626f04d..5b01a4ab33 100644 --- a/crates/compiler/test_mono/generated/recursive_function_and_union_with_inference_hole.txt +++ b/crates/compiler/test_mono/generated/recursive_function_and_union_with_inference_hole.txt @@ -1,7 +1,7 @@ procedure List.5 (#Attr.2, #Attr.3): - let List.569 : List [C List *self] = lowlevel ListMap { xs: `#Attr.#arg1` } #Attr.2 Test.2 #Attr.3; + let List.571 : List [C List *self] = lowlevel ListMap { xs: `#Attr.#arg1` } #Attr.2 Test.2 #Attr.3; decref #Attr.2; - ret List.569; + ret List.571; procedure Test.2 (Test.5): let Test.6 : List [C List *self] = UnionAtIndex (Id 0) (Index 0) Test.5; diff --git a/crates/compiler/test_mono/generated/rigids.txt b/crates/compiler/test_mono/generated/rigids.txt index 12c3f4fcd0..0a97ac6d8c 100644 --- a/crates/compiler/test_mono/generated/rigids.txt +++ b/crates/compiler/test_mono/generated/rigids.txt @@ -1,43 +1,43 @@ -procedure List.2 (List.105, List.106): - let List.591 : U64 = CallByName List.6 List.105; - let List.588 : Int1 = CallByName Num.22 List.106 List.591; - if List.588 then - let List.590 : I64 = CallByName List.66 List.105 List.106; - dec List.105; - let List.589 : [C {}, C I64] = TagId(1) List.590; - ret List.589; +procedure List.2 (List.106, List.107): + let List.593 : U64 = CallByName List.6 List.106; + let List.590 : Int1 = CallByName Num.22 List.107 List.593; + if List.590 then + let List.592 : I64 = CallByName List.66 List.106 List.107; + dec List.106; + let List.591 : [C {}, C I64] = TagId(1) List.592; + ret List.591; else - dec List.105; - let List.587 : {} = Struct {}; - let List.586 : [C {}, C I64] = TagId(0) List.587; - ret List.586; + dec List.106; + let List.589 : {} = Struct {}; + let List.588 : [C {}, C I64] = TagId(0) List.589; + ret List.588; -procedure List.3 (List.113, List.114, List.115): - let List.578 : {List I64, I64} = CallByName List.64 List.113 List.114 List.115; - let List.577 : List I64 = StructAtIndex 0 List.578; - ret List.577; +procedure List.3 (List.114, List.115, List.116): + let List.580 : {List I64, I64} = CallByName List.64 List.114 List.115 List.116; + let List.579 : List I64 = StructAtIndex 0 List.580; + ret List.579; procedure List.6 (#Attr.2): - let List.576 : U64 = lowlevel ListLen #Attr.2; - ret List.576; + let List.578 : U64 = lowlevel ListLen #Attr.2; + ret List.578; -procedure List.64 (List.110, List.111, List.112): - let List.575 : U64 = CallByName List.6 List.110; - let List.572 : Int1 = CallByName Num.22 List.111 List.575; - if List.572 then - let List.573 : {List I64, I64} = CallByName List.67 List.110 List.111 List.112; - ret List.573; +procedure List.64 (List.111, List.112, List.113): + let List.577 : U64 = CallByName List.6 List.111; + let List.574 : Int1 = CallByName Num.22 List.112 List.577; + if List.574 then + let List.575 : {List I64, I64} = CallByName List.67 List.111 List.112 List.113; + ret List.575; else - let List.571 : {List I64, I64} = Struct {List.110, List.112}; - ret List.571; + let List.573 : {List I64, I64} = Struct {List.111, List.113}; + ret List.573; procedure List.66 (#Attr.2, #Attr.3): - let List.584 : I64 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.584; + let List.586 : I64 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.586; procedure List.67 (#Attr.2, #Attr.3, #Attr.4): - let List.574 : {List I64, I64} = lowlevel ListReplaceUnsafe #Attr.2 #Attr.3 #Attr.4; - ret List.574; + let List.576 : {List I64, I64} = lowlevel ListReplaceUnsafe #Attr.2 #Attr.3 #Attr.4; + ret List.576; procedure Num.22 (#Attr.2, #Attr.3): let Num.293 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; diff --git a/crates/compiler/test_mono/generated/unspecialized_lambda_set_unification_does_not_duplicate_identical_concrete_types.txt b/crates/compiler/test_mono/generated/unspecialized_lambda_set_unification_does_not_duplicate_identical_concrete_types.txt index f8b6a8eced..8d46509d55 100644 --- a/crates/compiler/test_mono/generated/unspecialized_lambda_set_unification_does_not_duplicate_identical_concrete_types.txt +++ b/crates/compiler/test_mono/generated/unspecialized_lambda_set_unification_does_not_duplicate_identical_concrete_types.txt @@ -29,159 +29,159 @@ procedure Encode.26 (Encode.105, Encode.106): let Encode.108 : List U8 = CallByName Encode.24 Encode.109 Encode.110 Encode.106; ret Encode.108; -procedure List.101 (List.484, List.485, List.486): - let List.652 : U64 = 0i64; - let List.653 : U64 = CallByName List.6 List.484; - let List.651 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.80 List.484 List.485 List.486 List.652 List.653; - ret List.651; +procedure List.102 (List.486, List.487, List.488): + let List.654 : U64 = 0i64; + let List.655 : U64 = CallByName List.6 List.486; + let List.653 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.80 List.486 List.487 List.488 List.654 List.655; + ret List.653; -procedure List.18 (List.156, List.157, List.158): - let List.596 : U64 = 0i64; - let List.597 : U64 = CallByName List.6 List.156; - let List.595 : {List U8, U64} = CallByName List.89 List.156 List.157 List.158 List.596 List.597; - ret List.595; +procedure List.18 (List.158, List.159, List.160): + let List.598 : U64 = 0i64; + let List.599 : U64 = CallByName List.6 List.158; + let List.597 : {List U8, U64} = CallByName List.90 List.158 List.159 List.160 List.598 List.599; + ret List.597; -procedure List.18 (List.156, List.157, List.158): - let List.608 : U64 = 0i64; - let List.609 : U64 = CallByName List.6 List.156; - let List.607 : List U8 = CallByName List.89 List.156 List.157 List.158 List.608 List.609; - ret List.607; +procedure List.18 (List.158, List.159, List.160): + let List.610 : U64 = 0i64; + let List.611 : U64 = CallByName List.6 List.158; + let List.609 : List U8 = CallByName List.90 List.158 List.159 List.160 List.610 List.611; + ret List.609; -procedure List.26 (List.197, List.198, List.199): - let List.645 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.101 List.197 List.198 List.199; - let List.648 : U8 = 1i64; - let List.649 : U8 = GetTagId List.645; - let List.650 : Int1 = lowlevel Eq List.648 List.649; - if List.650 then - let List.200 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.645; - ret List.200; +procedure List.26 (List.199, List.200, List.201): + let List.647 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.102 List.199 List.200 List.201; + let List.650 : U8 = 1i64; + let List.651 : U8 = GetTagId List.647; + let List.652 : Int1 = lowlevel Eq List.650 List.651; + if List.652 then + let List.202 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.647; + ret List.202; else - let List.201 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.645; - ret List.201; + let List.203 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.647; + ret List.203; -procedure List.4 (List.121, List.122): - let List.594 : U64 = 1i64; - let List.593 : List U8 = CallByName List.70 List.121 List.594; - let List.592 : List U8 = CallByName List.71 List.593 List.122; - ret List.592; +procedure List.4 (List.122, List.123): + let List.596 : U64 = 1i64; + let List.595 : List U8 = CallByName List.70 List.122 List.596; + let List.594 : List U8 = CallByName List.71 List.595 List.123; + ret List.594; -procedure List.49 (List.416, List.417): - let List.636 : U64 = StructAtIndex 1 List.417; - let List.637 : U64 = StructAtIndex 0 List.417; - let List.635 : List U8 = CallByName List.72 List.416 List.636 List.637; - ret List.635; +procedure List.49 (List.418, List.419): + let List.638 : U64 = StructAtIndex 1 List.419; + let List.639 : U64 = StructAtIndex 0 List.419; + let List.637 : List U8 = CallByName List.72 List.418 List.638 List.639; + ret List.637; -procedure List.52 (List.431, List.432): - let List.433 : U64 = CallByName List.6 List.431; - joinpoint List.643 List.434: - let List.641 : U64 = 0i64; - let List.640 : {U64, U64} = Struct {List.434, List.641}; - inc List.431; - let List.435 : List U8 = CallByName List.49 List.431 List.640; - let List.639 : U64 = CallByName Num.75 List.433 List.434; - let List.634 : {U64, U64} = Struct {List.639, List.434}; - let List.436 : List U8 = CallByName List.49 List.431 List.634; - let List.633 : {List U8, List U8} = Struct {List.435, List.436}; - ret List.633; +procedure List.52 (List.433, List.434): + let List.435 : U64 = CallByName List.6 List.433; + joinpoint List.645 List.436: + let List.643 : U64 = 0i64; + let List.642 : {U64, U64} = Struct {List.436, List.643}; + inc List.433; + let List.437 : List U8 = CallByName List.49 List.433 List.642; + let List.641 : U64 = CallByName Num.75 List.435 List.436; + let List.636 : {U64, U64} = Struct {List.641, List.436}; + let List.438 : List U8 = CallByName List.49 List.433 List.636; + let List.635 : {List U8, List U8} = Struct {List.437, List.438}; + ret List.635; in - let List.644 : Int1 = CallByName Num.24 List.433 List.432; - if List.644 then - jump List.643 List.432; + let List.646 : Int1 = CallByName Num.24 List.435 List.434; + if List.646 then + jump List.645 List.434; else - jump List.643 List.433; - -procedure List.6 (#Attr.2): - let List.619 : U64 = lowlevel ListLen #Attr.2; - ret List.619; + jump List.645 List.435; procedure List.6 (#Attr.2): let List.621 : U64 = lowlevel ListLen #Attr.2; ret List.621; -procedure List.66 (#Attr.2, #Attr.3): - let List.605 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.605; +procedure List.6 (#Attr.2): + let List.623 : U64 = lowlevel ListLen #Attr.2; + ret List.623; procedure List.66 (#Attr.2, #Attr.3): - let List.617 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.617; + let List.607 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.607; + +procedure List.66 (#Attr.2, #Attr.3): + let List.619 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.619; procedure List.68 (#Attr.2): - let List.632 : List U8 = lowlevel ListWithCapacity #Attr.2; - ret List.632; + let List.634 : List U8 = lowlevel ListWithCapacity #Attr.2; + ret List.634; procedure List.70 (#Attr.2, #Attr.3): - let List.573 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; - ret List.573; + let List.575 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; + ret List.575; procedure List.71 (#Attr.2, #Attr.3): - let List.571 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.571; + let List.573 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; + ret List.573; procedure List.72 (#Attr.2, #Attr.3, #Attr.4): - let List.638 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; - ret List.638; + let List.640 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; + ret List.640; procedure List.8 (#Attr.2, #Attr.3): - let List.630 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; - ret List.630; + let List.632 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; + ret List.632; -procedure List.80 (#Derived_gen.8, #Derived_gen.9, #Derived_gen.10, #Derived_gen.11, #Derived_gen.12): - joinpoint List.654 List.487 List.488 List.489 List.490 List.491: - let List.656 : Int1 = CallByName Num.22 List.490 List.491; - if List.656 then - let List.665 : U8 = CallByName List.66 List.487 List.490; - let List.657 : [C {U64, Int1}, C {U64, Int1}] = CallByName TotallyNotJson.189 List.488 List.665; - let List.662 : U8 = 1i64; - let List.663 : U8 = GetTagId List.657; - let List.664 : Int1 = lowlevel Eq List.662 List.663; - if List.664 then - let List.492 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.657; - let List.660 : U64 = 1i64; - let List.659 : U64 = CallByName Num.51 List.490 List.660; - jump List.654 List.487 List.492 List.489 List.659 List.491; +procedure List.80 (#Derived_gen.13, #Derived_gen.14, #Derived_gen.15, #Derived_gen.16, #Derived_gen.17): + joinpoint List.656 List.489 List.490 List.491 List.492 List.493: + let List.658 : Int1 = CallByName Num.22 List.492 List.493; + if List.658 then + let List.667 : U8 = CallByName List.66 List.489 List.492; + let List.659 : [C {U64, Int1}, C {U64, Int1}] = CallByName TotallyNotJson.189 List.490 List.667; + let List.664 : U8 = 1i64; + let List.665 : U8 = GetTagId List.659; + let List.666 : Int1 = lowlevel Eq List.664 List.665; + if List.666 then + let List.494 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.659; + let List.662 : U64 = 1i64; + let List.661 : U64 = CallByName Num.51 List.492 List.662; + jump List.656 List.489 List.494 List.491 List.661 List.493; else - dec List.487; - let List.493 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.657; - let List.661 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) List.493; - ret List.661; + dec List.489; + let List.495 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.659; + let List.663 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) List.495; + ret List.663; else - dec List.487; - let List.655 : [C {U64, Int1}, C {U64, Int1}] = TagId(1) List.488; - ret List.655; + dec List.489; + let List.657 : [C {U64, Int1}, C {U64, Int1}] = TagId(1) List.490; + ret List.657; in - jump List.654 #Derived_gen.8 #Derived_gen.9 #Derived_gen.10 #Derived_gen.11 #Derived_gen.12; + jump List.656 #Derived_gen.13 #Derived_gen.14 #Derived_gen.15 #Derived_gen.16 #Derived_gen.17; -procedure List.89 (#Derived_gen.0, #Derived_gen.1, #Derived_gen.2, #Derived_gen.3, #Derived_gen.4): - joinpoint List.598 List.159 List.160 List.161 List.162 List.163: - let List.600 : Int1 = CallByName Num.22 List.162 List.163; - if List.600 then - let List.604 : Str = CallByName List.66 List.159 List.162; - inc List.604; - let List.164 : {List U8, U64} = CallByName TotallyNotJson.267 List.160 List.604 List.161; - let List.603 : U64 = 1i64; - let List.602 : U64 = CallByName Num.51 List.162 List.603; - jump List.598 List.159 List.164 List.161 List.602 List.163; +procedure List.90 (#Derived_gen.3, #Derived_gen.4, #Derived_gen.5, #Derived_gen.6, #Derived_gen.7): + joinpoint List.600 List.161 List.162 List.163 List.164 List.165: + let List.602 : Int1 = CallByName Num.22 List.164 List.165; + if List.602 then + let List.606 : Str = CallByName List.66 List.161 List.164; + inc List.606; + let List.166 : {List U8, U64} = CallByName TotallyNotJson.267 List.162 List.606 List.163; + let List.605 : U64 = 1i64; + let List.604 : U64 = CallByName Num.51 List.164 List.605; + jump List.600 List.161 List.166 List.163 List.604 List.165; else - dec List.159; - ret List.160; + dec List.161; + ret List.162; in - jump List.598 #Derived_gen.0 #Derived_gen.1 #Derived_gen.2 #Derived_gen.3 #Derived_gen.4; + jump List.600 #Derived_gen.3 #Derived_gen.4 #Derived_gen.5 #Derived_gen.6 #Derived_gen.7; -procedure List.89 (#Derived_gen.13, #Derived_gen.14, #Derived_gen.15, #Derived_gen.16, #Derived_gen.17): - joinpoint List.610 List.159 List.160 List.161 List.162 List.163: - let List.612 : Int1 = CallByName Num.22 List.162 List.163; - if List.612 then - let List.616 : U8 = CallByName List.66 List.159 List.162; - let List.164 : List U8 = CallByName TotallyNotJson.215 List.160 List.616; - let List.615 : U64 = 1i64; - let List.614 : U64 = CallByName Num.51 List.162 List.615; - jump List.610 List.159 List.164 List.161 List.614 List.163; +procedure List.90 (#Derived_gen.8, #Derived_gen.9, #Derived_gen.10, #Derived_gen.11, #Derived_gen.12): + joinpoint List.612 List.161 List.162 List.163 List.164 List.165: + let List.614 : Int1 = CallByName Num.22 List.164 List.165; + if List.614 then + let List.618 : U8 = CallByName List.66 List.161 List.164; + let List.166 : List U8 = CallByName TotallyNotJson.215 List.162 List.618; + let List.617 : U64 = 1i64; + let List.616 : U64 = CallByName Num.51 List.164 List.617; + jump List.612 List.161 List.166 List.163 List.616 List.165; else - dec List.159; - ret List.160; + dec List.161; + ret List.162; in - jump List.610 #Derived_gen.13 #Derived_gen.14 #Derived_gen.15 #Derived_gen.16 #Derived_gen.17; + jump List.612 #Derived_gen.8 #Derived_gen.9 #Derived_gen.10 #Derived_gen.11 #Derived_gen.12; procedure Num.127 (#Attr.2): let Num.298 : U8 = lowlevel NumIntCast #Attr.2; diff --git a/crates/compiler/test_mono/generated/unspecialized_lambda_set_unification_keeps_all_concrete_types_without_unification_of_unifiable.txt b/crates/compiler/test_mono/generated/unspecialized_lambda_set_unification_keeps_all_concrete_types_without_unification_of_unifiable.txt index 9fc42a535d..a9162d5aef 100644 --- a/crates/compiler/test_mono/generated/unspecialized_lambda_set_unification_keeps_all_concrete_types_without_unification_of_unifiable.txt +++ b/crates/compiler/test_mono/generated/unspecialized_lambda_set_unification_keeps_all_concrete_types_without_unification_of_unifiable.txt @@ -81,81 +81,81 @@ procedure Encode.26 (Encode.105, Encode.106): let Encode.108 : List U8 = CallByName Encode.24 Encode.109 Encode.110 Encode.106; ret Encode.108; -procedure List.18 (List.156, List.157, List.158): - let List.596 : U64 = 0i64; - let List.597 : U64 = CallByName List.6 List.156; - let List.595 : {List U8, U64} = CallByName List.89 List.156 List.157 List.158 List.596 List.597; - ret List.595; +procedure List.18 (List.158, List.159, List.160): + let List.598 : U64 = 0i64; + let List.599 : U64 = CallByName List.6 List.158; + let List.597 : {List U8, U64} = CallByName List.90 List.158 List.159 List.160 List.598 List.599; + ret List.597; -procedure List.18 (List.156, List.157, List.158): - let List.636 : U64 = 0i64; - let List.637 : U64 = CallByName List.6 List.156; - let List.635 : {List U8, U64} = CallByName List.89 List.156 List.157 List.158 List.636 List.637; - ret List.635; +procedure List.18 (List.158, List.159, List.160): + let List.638 : U64 = 0i64; + let List.639 : U64 = CallByName List.6 List.158; + let List.637 : {List U8, U64} = CallByName List.90 List.158 List.159 List.160 List.638 List.639; + ret List.637; -procedure List.4 (List.121, List.122): - let List.634 : U64 = 1i64; - let List.633 : List U8 = CallByName List.70 List.121 List.634; - let List.632 : List U8 = CallByName List.71 List.633 List.122; - ret List.632; +procedure List.4 (List.122, List.123): + let List.636 : U64 = 1i64; + let List.635 : List U8 = CallByName List.70 List.122 List.636; + let List.634 : List U8 = CallByName List.71 List.635 List.123; + ret List.634; procedure List.6 (#Attr.2): - let List.607 : U64 = lowlevel ListLen #Attr.2; + let List.609 : U64 = lowlevel ListLen #Attr.2; + ret List.609; + +procedure List.6 (#Attr.2): + let List.649 : U64 = lowlevel ListLen #Attr.2; + ret List.649; + +procedure List.66 (#Attr.2, #Attr.3): + let List.607 : [C {}, C {}] = lowlevel ListGetUnsafe #Attr.2 #Attr.3; ret List.607; -procedure List.6 (#Attr.2): - let List.647 : U64 = lowlevel ListLen #Attr.2; +procedure List.66 (#Attr.2, #Attr.3): + let List.647 : [] = lowlevel ListGetUnsafe #Attr.2 #Attr.3; ret List.647; -procedure List.66 (#Attr.2, #Attr.3): - let List.605 : [C {}, C {}] = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.605; - -procedure List.66 (#Attr.2, #Attr.3): - let List.645 : [] = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.645; - procedure List.70 (#Attr.2, #Attr.3): - let List.613 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; - ret List.613; + let List.615 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; + ret List.615; procedure List.71 (#Attr.2, #Attr.3): - let List.611 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.611; + let List.613 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; + ret List.613; procedure List.8 (#Attr.2, #Attr.3): - let List.648 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; - ret List.648; + let List.650 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; + ret List.650; -procedure List.89 (#Derived_gen.20, #Derived_gen.21, #Derived_gen.22, #Derived_gen.23, #Derived_gen.24): - joinpoint List.598 List.159 List.160 List.161 List.162 List.163: - let List.600 : Int1 = CallByName Num.22 List.162 List.163; - if List.600 then - let List.604 : [C {}, C {}] = CallByName List.66 List.159 List.162; - let List.164 : {List U8, U64} = CallByName TotallyNotJson.267 List.160 List.604 List.161; - let List.603 : U64 = 1i64; - let List.602 : U64 = CallByName Num.51 List.162 List.603; - jump List.598 List.159 List.164 List.161 List.602 List.163; +procedure List.90 (#Derived_gen.26, #Derived_gen.27, #Derived_gen.28, #Derived_gen.29, #Derived_gen.30): + joinpoint List.600 List.161 List.162 List.163 List.164 List.165: + let List.602 : Int1 = CallByName Num.22 List.164 List.165; + if List.602 then + let List.606 : [C {}, C {}] = CallByName List.66 List.161 List.164; + let List.166 : {List U8, U64} = CallByName TotallyNotJson.267 List.162 List.606 List.163; + let List.605 : U64 = 1i64; + let List.604 : U64 = CallByName Num.51 List.164 List.605; + jump List.600 List.161 List.166 List.163 List.604 List.165; else - dec List.159; - ret List.160; + dec List.161; + ret List.162; in - jump List.598 #Derived_gen.20 #Derived_gen.21 #Derived_gen.22 #Derived_gen.23 #Derived_gen.24; + jump List.600 #Derived_gen.26 #Derived_gen.27 #Derived_gen.28 #Derived_gen.29 #Derived_gen.30; -procedure List.89 (#Derived_gen.31, #Derived_gen.32, #Derived_gen.33, #Derived_gen.34, #Derived_gen.35): - joinpoint List.638 List.159 List.160 List.161 List.162 List.163: - let List.640 : Int1 = CallByName Num.22 List.162 List.163; - if List.640 then - let List.644 : [] = CallByName List.66 List.159 List.162; - let List.164 : {List U8, U64} = CallByName TotallyNotJson.267 List.160 List.644 List.161; - let List.643 : U64 = 1i64; - let List.642 : U64 = CallByName Num.51 List.162 List.643; - jump List.638 List.159 List.164 List.161 List.642 List.163; +procedure List.90 (#Derived_gen.34, #Derived_gen.35, #Derived_gen.36, #Derived_gen.37, #Derived_gen.38): + joinpoint List.640 List.161 List.162 List.163 List.164 List.165: + let List.642 : Int1 = CallByName Num.22 List.164 List.165; + if List.642 then + let List.646 : [] = CallByName List.66 List.161 List.164; + let List.166 : {List U8, U64} = CallByName TotallyNotJson.267 List.162 List.646 List.163; + let List.645 : U64 = 1i64; + let List.644 : U64 = CallByName Num.51 List.164 List.645; + jump List.640 List.161 List.166 List.163 List.644 List.165; else - dec List.159; - ret List.160; + dec List.161; + ret List.162; in - jump List.638 #Derived_gen.31 #Derived_gen.32 #Derived_gen.33 #Derived_gen.34 #Derived_gen.35; + jump List.640 #Derived_gen.34 #Derived_gen.35 #Derived_gen.36 #Derived_gen.37 #Derived_gen.38; procedure Num.127 (#Attr.2): let Num.310 : U8 = lowlevel NumIntCast #Attr.2; diff --git a/crates/compiler/test_mono/generated/weakening_avoids_overspecialization.txt b/crates/compiler/test_mono/generated/weakening_avoids_overspecialization.txt index 7b93e58ad1..b379966c4f 100644 --- a/crates/compiler/test_mono/generated/weakening_avoids_overspecialization.txt +++ b/crates/compiler/test_mono/generated/weakening_avoids_overspecialization.txt @@ -2,80 +2,80 @@ procedure Bool.11 (#Attr.2, #Attr.3): let Bool.23 : Int1 = lowlevel Eq #Attr.2 #Attr.3; ret Bool.23; -procedure List.101 (List.484, List.485, List.486): - let List.587 : U64 = 0i64; - let List.588 : U64 = CallByName List.6 List.484; - let List.586 : [C U64, C U64] = CallByName List.80 List.484 List.485 List.486 List.587 List.588; - ret List.586; +procedure List.102 (List.486, List.487, List.488): + let List.589 : U64 = 0i64; + let List.590 : U64 = CallByName List.6 List.486; + let List.588 : [C U64, C U64] = CallByName List.80 List.486 List.487 List.488 List.589 List.590; + ret List.588; -procedure List.26 (List.197, List.198, List.199): - let List.580 : [C U64, C U64] = CallByName List.101 List.197 List.198 List.199; - let List.583 : U8 = 1i64; - let List.584 : U8 = GetTagId List.580; - let List.585 : Int1 = lowlevel Eq List.583 List.584; - if List.585 then - let List.200 : U64 = UnionAtIndex (Id 1) (Index 0) List.580; - ret List.200; +procedure List.26 (List.199, List.200, List.201): + let List.582 : [C U64, C U64] = CallByName List.102 List.199 List.200 List.201; + let List.585 : U8 = 1i64; + let List.586 : U8 = GetTagId List.582; + let List.587 : Int1 = lowlevel Eq List.585 List.586; + if List.587 then + let List.202 : U64 = UnionAtIndex (Id 1) (Index 0) List.582; + ret List.202; else - let List.201 : U64 = UnionAtIndex (Id 0) (Index 0) List.580; - ret List.201; + let List.203 : U64 = UnionAtIndex (Id 0) (Index 0) List.582; + ret List.203; -procedure List.38 (List.340, List.341): +procedure List.38 (List.342, List.343): + let List.581 : U64 = CallByName List.6 List.342; + let List.344 : U64 = CallByName Num.77 List.581 List.343; + let List.571 : List U8 = CallByName List.43 List.342 List.344; + ret List.571; + +procedure List.43 (List.340, List.341): let List.579 : U64 = CallByName List.6 List.340; - let List.342 : U64 = CallByName Num.77 List.579 List.341; - let List.569 : List U8 = CallByName List.43 List.340 List.342; - ret List.569; - -procedure List.43 (List.338, List.339): - let List.577 : U64 = CallByName List.6 List.338; - let List.576 : U64 = CallByName Num.77 List.577 List.339; - let List.571 : {U64, U64} = Struct {List.339, List.576}; - let List.570 : List U8 = CallByName List.49 List.338 List.571; - ret List.570; - -procedure List.49 (List.416, List.417): - let List.573 : U64 = StructAtIndex 1 List.417; - let List.574 : U64 = StructAtIndex 0 List.417; - let List.572 : List U8 = CallByName List.72 List.416 List.573 List.574; + let List.578 : U64 = CallByName Num.77 List.579 List.341; + let List.573 : {U64, U64} = Struct {List.341, List.578}; + let List.572 : List U8 = CallByName List.49 List.340 List.573; ret List.572; +procedure List.49 (List.418, List.419): + let List.575 : U64 = StructAtIndex 1 List.419; + let List.576 : U64 = StructAtIndex 0 List.419; + let List.574 : List U8 = CallByName List.72 List.418 List.575 List.576; + ret List.574; + procedure List.6 (#Attr.2): - let List.578 : U64 = lowlevel ListLen #Attr.2; - ret List.578; + let List.580 : U64 = lowlevel ListLen #Attr.2; + ret List.580; procedure List.66 (#Attr.2, #Attr.3): - let List.601 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.601; + let List.603 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.603; procedure List.72 (#Attr.2, #Attr.3, #Attr.4): - let List.575 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; - ret List.575; + let List.577 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; + ret List.577; procedure List.80 (#Derived_gen.0, #Derived_gen.1, #Derived_gen.2, #Derived_gen.3, #Derived_gen.4): - joinpoint List.589 List.487 List.488 List.489 List.490 List.491: - let List.591 : Int1 = CallByName Num.22 List.490 List.491; - if List.591 then - let List.600 : U8 = CallByName List.66 List.487 List.490; - let List.592 : [C U64, C U64] = CallByName Test.3 List.488 List.600; - let List.597 : U8 = 1i64; - let List.598 : U8 = GetTagId List.592; - let List.599 : Int1 = lowlevel Eq List.597 List.598; - if List.599 then - let List.492 : U64 = UnionAtIndex (Id 1) (Index 0) List.592; - let List.595 : U64 = 1i64; - let List.594 : U64 = CallByName Num.51 List.490 List.595; - jump List.589 List.487 List.492 List.489 List.594 List.491; + joinpoint List.591 List.489 List.490 List.491 List.492 List.493: + let List.593 : Int1 = CallByName Num.22 List.492 List.493; + if List.593 then + let List.602 : U8 = CallByName List.66 List.489 List.492; + let List.594 : [C U64, C U64] = CallByName Test.3 List.490 List.602; + let List.599 : U8 = 1i64; + let List.600 : U8 = GetTagId List.594; + let List.601 : Int1 = lowlevel Eq List.599 List.600; + if List.601 then + let List.494 : U64 = UnionAtIndex (Id 1) (Index 0) List.594; + let List.597 : U64 = 1i64; + let List.596 : U64 = CallByName Num.51 List.492 List.597; + jump List.591 List.489 List.494 List.491 List.596 List.493; else - dec List.487; - let List.493 : U64 = UnionAtIndex (Id 0) (Index 0) List.592; - let List.596 : [C U64, C U64] = TagId(0) List.493; - ret List.596; + dec List.489; + let List.495 : U64 = UnionAtIndex (Id 0) (Index 0) List.594; + let List.598 : [C U64, C U64] = TagId(0) List.495; + ret List.598; else - dec List.487; - let List.590 : [C U64, C U64] = TagId(1) List.488; - ret List.590; + dec List.489; + let List.592 : [C U64, C U64] = TagId(1) List.490; + ret List.592; in - jump List.589 #Derived_gen.0 #Derived_gen.1 #Derived_gen.2 #Derived_gen.3 #Derived_gen.4; + jump List.591 #Derived_gen.0 #Derived_gen.1 #Derived_gen.2 #Derived_gen.3 #Derived_gen.4; procedure Num.22 (#Attr.2, #Attr.3): let Num.294 : Int1 = lowlevel NumLt #Attr.2 #Attr.3;