diff --git a/.github/workflows/basic_cli_build_release.yml b/.github/workflows/basic_cli_build_release.yml index 75c885c9663..6102c99699f 100644 --- a/.github/workflows/basic_cli_build_release.yml +++ b/.github/workflows/basic_cli_build_release.yml @@ -6,7 +6,7 @@ on: concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true - + env: # use .tar.gz for quick testing ARCHIVE_FORMAT: .tar.br @@ -17,7 +17,7 @@ jobs: prepare: runs-on: [ubuntu-20.04] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: repository: roc-lang/basic-cli @@ -40,7 +40,7 @@ jobs: - run: curl -fOL https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-macos_apple_silicon-latest.tar.gz - name: Save roc_nightly archives - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: path: roc_nightly-* @@ -48,18 +48,18 @@ jobs: runs-on: [ubuntu-20.04] needs: [prepare] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Download the previously uploaded roc_nightly archives - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 - name: build basic-cli with surgical linker and also with legacy linker env: CARGO_BUILD_TARGET: x86_64-unknown-linux-musl run: ./ci/build_basic_cli.sh linux_x86_64 "--linker legacy" - - name: Save .rh, .rm and .o file - uses: actions/upload-artifact@v3 + - name: Save .rh, .rm and .o file + uses: actions/upload-artifact@v4 with: name: linux-x86_64-files path: | @@ -72,10 +72,10 @@ jobs: runs-on: [self-hosted, Linux, ARM64] needs: [prepare] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Download the previously uploaded roc_nightly archives - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 - name: build basic-cli env: @@ -85,8 +85,8 @@ jobs: CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_RUSTFLAGS: "-Clink-self-contained=yes -Clinker=rust-lld" run: ./ci/build_basic_cli.sh linux_arm64 - - name: Save .o file - uses: actions/upload-artifact@v3 + - name: Save .o file + uses: actions/upload-artifact@v4 with: name: linux-arm64-files path: | @@ -96,15 +96,15 @@ jobs: runs-on: [macos-11] # I expect the generated files to work on macOS 12 and up needs: [prepare] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Download the previously uploaded roc_nightly archives - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 - run: ./ci/build_basic_cli.sh macos_x86_64 - name: Save .o files - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: macos-x86_64-files path: | @@ -115,15 +115,15 @@ jobs: runs-on: [self-hosted, macOS, ARM64] needs: [prepare] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Download the previously uploaded roc_nightly archives - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 - run: ./ci/build_basic_cli.sh macos_apple_silicon - name: Save macos-arm64.o file - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: macos-apple-silicon-files path: | @@ -134,13 +134,13 @@ jobs: name: create release archive runs-on: [ubuntu-20.04] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: remove all folders except the ci folder run: ls | grep -v ci | xargs rm -rf - name: Download the previously uploaded files - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 - name: mv roc nightly and simplify name run: mv $(ls -d artifact/* | grep "roc_nightly.*tar\.gz" | grep "linux_x86_64") ./roc_nightly.tar.gz @@ -157,7 +157,7 @@ jobs: - run: git clone https://github.com/roc-lang/basic-cli.git - run: cp macos-apple-silicon-files/* ./basic-cli/platform - + - run: cp linux-x86_64-files/* ./basic-cli/platform - run: cp linux-arm64-files/* ./basic-cli/platform @@ -177,14 +177,14 @@ jobs: - run: echo "TAR_FILENAME=$(ls -d basic-cli/platform/* | grep ${{ env.ARCHIVE_FORMAT }})" >> $GITHUB_ENV - name: Upload platform archive - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: basic-cli-platform path: | ${{ env.TAR_FILENAME }} - name: Upload docs archive - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: release-assets-docs path: | @@ -196,7 +196,7 @@ jobs: steps: - name: Download the previously uploaded files - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 - name: mv roc nightly and simplify name run: mv $(ls -d artifact/* | grep "roc_nightly.*tar\.gz" | grep "linux_x86_64") ./roc_nightly.tar.gz @@ -232,7 +232,7 @@ jobs: mkdir platform # move all files to platform dir find . -maxdepth 1 -type f -exec mv {} platform/ \; - + mkdir temp-basic-cli cd temp-basic-cli git clone https://github.com/roc-lang/basic-cli.git @@ -242,9 +242,8 @@ jobs: cp -r ci ../.. cp -r LICENSE ../.. # LICENSE is necessary for command test - + - name: run tests run: | cd basic-cli-platform ROC=./roc_nightly/roc EXAMPLES_DIR=./examples/ ROC_BUILD_FLAGS=--prebuilt-platform ./ci/all_tests.sh - diff --git a/.github/workflows/basic_cli_test_arm64.yml b/.github/workflows/basic_cli_test_arm64.yml index 4ea02715c39..dd581a21d9e 100644 --- a/.github/workflows/basic_cli_test_arm64.yml +++ b/.github/workflows/basic_cli_test_arm64.yml @@ -11,7 +11,7 @@ jobs: runs-on: [self-hosted, Linux, ARM64] steps: - name: clone basic-cli repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: roc-lang/basic-cli ref: main @@ -19,7 +19,7 @@ jobs: - name: get latest roc nightly run: | curl -fOL https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-linux_arm64-latest.tar.gz - + - name: rename nightly tar run: mv $(ls | grep "roc_nightly.*tar\.gz") roc_nightly.tar.gz @@ -35,7 +35,7 @@ jobs: - run: expect -v - # Run all tests + # Run all tests - run: ROC=./roc_nightly/roc EXAMPLES_DIR=./examples/ ./ci/all_tests.sh ###### @@ -44,7 +44,7 @@ jobs: - name: Remove roc_nightly folder to keep things simple (we'll download it again later) run: rm -rf roc_nightly - + - name: Get the repo of the latest basic-cli release run: | git clone --depth 1 https://github.com/roc-lang/basic-cli diff --git a/.github/workflows/basic_webserver_build_release.yml b/.github/workflows/basic_webserver_build_release.yml index aac03696b02..7d17985165d 100644 --- a/.github/workflows/basic_webserver_build_release.yml +++ b/.github/workflows/basic_webserver_build_release.yml @@ -6,7 +6,7 @@ on: concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true - + env: # use .tar.gz for quick testing ARCHIVE_FORMAT: .tar.br @@ -16,7 +16,7 @@ jobs: fetch-releases: runs-on: [ubuntu-20.04] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - run: curl -fOL https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-linux_x86_64-latest.tar.gz - run: curl -fOL https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-linux_arm64-latest.tar.gz @@ -24,7 +24,7 @@ jobs: - run: curl -fOL https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-macos_apple_silicon-latest.tar.gz - name: Save roc_nightly archives - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: path: roc_nightly-* @@ -32,18 +32,18 @@ jobs: runs-on: [ubuntu-20.04] needs: [fetch-releases] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Download the previously uploaded roc_nightly archives - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 - name: build basic-webserver with legacy linker env: CARGO_BUILD_TARGET: x86_64-unknown-linux-musl run: ./ci/build_basic_webserver.sh linux_x86_64 "--linker legacy" - - name: Save .rh, .rm and .o file - uses: actions/upload-artifact@v3 + - name: Save .rh, .rm and .o file + uses: actions/upload-artifact@v4 with: name: linux-x86_64-files path: | @@ -56,10 +56,10 @@ jobs: runs-on: [self-hosted, Linux, ARM64] needs: [fetch-releases] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Download the previously uploaded roc_nightly archives - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 - name: build basic-webserver env: @@ -69,8 +69,8 @@ jobs: CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_RUSTFLAGS: "-Clink-self-contained=yes -Clinker=rust-lld" run: ./ci/build_basic_webserver.sh linux_arm64 - - name: Save .o file - uses: actions/upload-artifact@v3 + - name: Save .o file + uses: actions/upload-artifact@v4 with: name: linux-arm64-files path: | @@ -80,15 +80,15 @@ jobs: runs-on: [macos-11] # I expect the generated files to work on macOS 12 and 13 needs: [fetch-releases] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Download the previously uploaded roc_nightly archives - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 - run: ./ci/build_basic_webserver.sh macos_x86_64 - name: Save .o files - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: macos-x86_64-files path: | @@ -99,15 +99,15 @@ jobs: runs-on: [self-hosted, macOS, ARM64] needs: [fetch-releases] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Download the previously uploaded roc_nightly archives - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 - run: ./ci/build_basic_webserver.sh macos_apple_silicon - name: Save macos-arm64.o file - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: macos-apple-silicon-files path: | @@ -118,13 +118,13 @@ jobs: name: create release archive runs-on: [ubuntu-20.04] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: remove all folders except the ci folder run: ls | grep -v ci | xargs rm -rf - name: Download the previously uploaded files - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 - name: mv roc nightly and simplify name run: mv $(ls -d artifact/* | grep "roc_nightly.*tar\.gz" | grep "linux_x86_64") ./roc_nightly.tar.gz @@ -145,7 +145,7 @@ jobs: cd .. - run: cp macos-apple-silicon-files/* ./basic-webserver/platform - + - run: cp linux-x86_64-files/* ./basic-webserver/platform - run: cp linux-arm64-files/* ./basic-webserver/platform @@ -157,7 +157,7 @@ jobs: - run: echo "TAR_FILENAME=$(ls -d basic-webserver/platform/* | grep ${{ env.ARCHIVE_FORMAT }})" >> $GITHUB_ENV - name: Upload platform archive - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: basic-webserver-platform path: | diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index 381477e9253..080c4f2c83a 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -15,7 +15,7 @@ jobs: env: FORCE_COLOR: 1 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: ref: "main" clean: "true" @@ -23,7 +23,7 @@ jobs: - name: on main; prepare a self-contained benchmark folder run: nix develop -c ./ci/benchmarks/prep_folder.sh main - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: clean: "false" # we want to keep the benchmark folder diff --git a/.github/workflows/ci_manager.yml b/.github/workflows/ci_manager.yml index b152825e3e3..8f25abfd426 100644 --- a/.github/workflows/ci_manager.yml +++ b/.github/workflows/ci_manager.yml @@ -15,7 +15,7 @@ jobs: run_tests: ${{ steps.filecheck.outputs.run_tests }} steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Check if only css, html or md files changed id: filecheck @@ -112,7 +112,3 @@ jobs: fi - run: echo "Workflow succeeded :)" - - - - diff --git a/.github/workflows/devtools_test_linux_x86_64.yml b/.github/workflows/devtools_test_linux_x86_64.yml index 7aa613b8e85..e6de0d87eec 100644 --- a/.github/workflows/devtools_test_linux_x86_64.yml +++ b/.github/workflows/devtools_test_linux_x86_64.yml @@ -1,6 +1,6 @@ on: pull_request: - + name: devtools nix files test - linux concurrency: @@ -13,7 +13,7 @@ jobs: runs-on: [ubuntu-20.04] timeout-minutes: 120 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Only run all steps if a nix file changed run: | @@ -25,7 +25,7 @@ jobs: echo "A nix file was changed. No need to run tests." echo "nix_changed=false" >> $GITHUB_ENV fi - + - uses: cachix/install-nix-action@v23 if: env.nix_changed == 'true' @@ -53,6 +53,3 @@ jobs: echo "locally deleting devtools/flake.lock and following the" echo "instructions in devtools/README.md. This will create a" echo "new flake.lock you should use to replace the old devtools/flake.lock" - - - diff --git a/.github/workflows/devtools_test_macos_apple_silicon.yml b/.github/workflows/devtools_test_macos_apple_silicon.yml index 2abed8eac48..d9dd9a644d7 100644 --- a/.github/workflows/devtools_test_macos_apple_silicon.yml +++ b/.github/workflows/devtools_test_macos_apple_silicon.yml @@ -13,7 +13,7 @@ jobs: runs-on: [self-hosted, macOS, ARM64] timeout-minutes: 120 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Only run all steps if a nix file changed run: | @@ -47,6 +47,3 @@ jobs: echo "locally deleting devtools/flake.lock and following the" echo "instructions in devtools/README.md. This will create a" echo "new flake.lock you should use to replace the old devtools/flake.lock" - - - diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index d543aaf9057..833c7bb353a 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -9,7 +9,7 @@ jobs: runs-on: [ubuntu-22.04] timeout-minutes: 120 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Copy example docker file run: cp docker/nightly-ubuntu-latest/docker-compose.example.yml docker/nightly-ubuntu-latest/docker-compose.yml @@ -26,7 +26,7 @@ jobs: runs-on: [ubuntu-22.04] timeout-minutes: 120 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Copy example docker file run: cp docker/nightly-ubuntu-2204/docker-compose.example.yml docker/nightly-ubuntu-2204/docker-compose.yml @@ -42,7 +42,7 @@ jobs: runs-on: [ubuntu-22.04] timeout-minutes: 120 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Copy example docker file run: cp docker/nightly-ubuntu-2004/docker-compose.example.yml docker/nightly-ubuntu-2004/docker-compose.yml @@ -58,7 +58,7 @@ jobs: runs-on: [ubuntu-22.04] timeout-minutes: 120 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Copy example docker file run: cp docker/nightly-debian-latest/docker-compose.example.yml docker/nightly-debian-latest/docker-compose.yml @@ -74,7 +74,7 @@ jobs: runs-on: [ubuntu-22.04] timeout-minutes: 120 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Copy example docker file run: cp docker/nightly-debian-bookworm/docker-compose.example.yml docker/nightly-debian-bookworm/docker-compose.yml @@ -90,7 +90,7 @@ jobs: runs-on: [ubuntu-22.04] timeout-minutes: 120 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Copy example docker file run: cp docker/nightly-debian-buster/docker-compose.example.yml docker/nightly-debian-buster/docker-compose.yml @@ -100,4 +100,3 @@ jobs: - name: Run hello world test run: docker-compose -f docker/nightly-debian-buster/docker-compose.yml run roc examples/helloWorld.roc - diff --git a/.github/workflows/macos_x86_64.yml b/.github/workflows/macos_x86_64.yml index a8b88390b42..634db9c3993 100644 --- a/.github/workflows/macos_x86_64.yml +++ b/.github/workflows/macos_x86_64.yml @@ -1,33 +1,33 @@ on: - workflow_call: + workflow_call: name: Macos x86-64 rust tests env: - RUST_BACKTRACE: 1 + RUST_BACKTRACE: 1 jobs: - test-rust-macos-x86-64: - runs-on: [self-hosted, macOS, X64] - timeout-minutes: 90 - env: - RUSTC_WRAPPER: /Users/username1/.cargo/bin/sccache - steps: - - uses: actions/checkout@v3 - - - name: set LLVM_SYS_160_PREFIX - run: echo "LLVM_SYS_160_PREFIX=$(brew --prefix llvm@16)" >> $GITHUB_ENV - - - name: Update PATH to use zig 11 - run: | - echo "PATH=/Users/username1/Downloads/zig-macos-x86_64-0.11.0:$PATH" >> $GITHUB_ENV - - - run: zig version - - - name: test_gen llvm tests - run: cargo nextest-gen-llvm --release --no-fail-fast --locked -E "package(test_gen) - test(gen_str::str_append_scalar)" - - - name: regular rust tests - run: cargo test --locked --release -- --skip opaque_wrap_function --skip gen_list::bool_list_literal --skip platform_switching_swift --skip swift_ui --skip gen_str::str_append_scalar --skip gen_tags::phantom_polymorphic_record && sccache --show-stats - # swift tests are skipped because of "Could not find or use auto-linked library 'swiftCompatibilityConcurrency'" on macos-11 x86_64 CI machine - # this issue may be caused by using older versions of XCode + test-rust-macos-x86-64: + runs-on: [self-hosted, macOS, X64] + timeout-minutes: 90 + env: + RUSTC_WRAPPER: /Users/username1/.cargo/bin/sccache + steps: + - uses: actions/checkout@v4 + + - name: set LLVM_SYS_160_PREFIX + run: echo "LLVM_SYS_160_PREFIX=$(brew --prefix llvm@16)" >> $GITHUB_ENV + + - name: Update PATH to use zig 11 + run: | + echo "PATH=/Users/username1/Downloads/zig-macos-x86_64-0.11.0:$PATH" >> $GITHUB_ENV + + - run: zig version + + - name: test_gen llvm tests + run: cargo nextest-gen-llvm --release --no-fail-fast --locked -E "package(test_gen) - test(gen_str::str_append_scalar)" + + - name: regular rust tests + run: cargo test --locked --release -- --skip opaque_wrap_function --skip gen_list::bool_list_literal --skip platform_switching_swift --skip swift_ui --skip gen_tags::phantom_polymorphic_record && sccache --show-stats + # swift tests are skipped because of "Could not find or use auto-linked library 'swiftCompatibilityConcurrency'" on macos-11 x86_64 CI machine + # this issue may be caused by using older versions of XCode diff --git a/.github/workflows/markdown_link_check.yml b/.github/workflows/markdown_link_check.yml index 1b60da4f8c7..2dceabbfbf2 100644 --- a/.github/workflows/markdown_link_check.yml +++ b/.github/workflows/markdown_link_check.yml @@ -13,7 +13,7 @@ jobs: markdown-link-check: runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: gaurav-nelson/github-action-markdown-link-check@v1 with: use-quiet-mode: 'yes' diff --git a/.github/workflows/nightly_linux_arm64.yml b/.github/workflows/nightly_linux_arm64.yml index 26d8890e816..981d1c469af 100644 --- a/.github/workflows/nightly_linux_arm64.yml +++ b/.github/workflows/nightly_linux_arm64.yml @@ -5,7 +5,7 @@ on: - cron: '0 9 * * *' name: Nightly Release Linux arm64/aarch64 - + jobs: build: name: build and package nightly release @@ -13,12 +13,12 @@ jobs: timeout-minutes: 90 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Update PATH to use zig 11 run: | echo "PATH=/home/username/Downloads/zig-linux-aarch64-0.11.0:$PATH" >> $GITHUB_ENV - + - run: zig version - name: create version.txt @@ -29,10 +29,10 @@ jobs: - name: get commit SHA run: echo "SHA=$(git rev-parse --short "$GITHUB_SHA")" >> $GITHUB_ENV - + - name: get date run: echo "DATE=$(date "+%Y-%m-%d")" >> $GITHUB_ENV - + - name: build file name env: DATE: ${{ env.DATE }} @@ -42,12 +42,12 @@ jobs: # this makes the roc binary a lot smaller - name: strip debug info run: strip ./target/release-with-lto/roc - + - name: Make nightly release tar archive run: ./ci/package_release.sh ${{ env.RELEASE_FOLDER_NAME }} - name: Upload roc nightly tar. Actually uploading to github releases has to be done manually. - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ env.RELEASE_FOLDER_NAME }}.tar.gz path: ${{ env.RELEASE_FOLDER_NAME }}.tar.gz diff --git a/.github/workflows/nightly_linux_x86_64.yml b/.github/workflows/nightly_linux_x86_64.yml index 4e9703b2bd2..a8905c93442 100644 --- a/.github/workflows/nightly_linux_x86_64.yml +++ b/.github/workflows/nightly_linux_x86_64.yml @@ -5,20 +5,20 @@ on: - cron: '0 9 * * *' name: Nightly Release Linux x86_64 - + jobs: build: name: build and package nightly release runs-on: [self-hosted, i7-6700K] timeout-minutes: 90 - + steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Update PATH to use zig 11 run: | echo "PATH=/home/big-ci-user/Downloads/zig-linux-x86_64-0.11.0:$PATH" >> $GITHUB_ENV - + - run: zig version - name: create version.txt @@ -30,7 +30,7 @@ jobs: - name: get commit SHA run: echo "SHA=$(git rev-parse --short "$GITHUB_SHA")" >> $GITHUB_ENV - + - name: get date run: echo "DATE=$(date "+%Y-%m-%d")" >> $GITHUB_ENV @@ -38,12 +38,12 @@ jobs: run: ./ci/www-repl.sh - name: Upload wasm repl tar. Actually uploading to github releases has to be done manually. - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: roc_repl_wasm.tar.gz path: roc_repl_wasm.tar.gz retention-days: 4 - + - name: build file name env: DATE: ${{ env.DATE }} @@ -53,12 +53,12 @@ jobs: # this makes the roc binary a lot smaller - name: strip debug info run: strip ./target/release-with-lto/roc - + - name: Make nightly release tar archive run: ./ci/package_release.sh ${{ env.RELEASE_FOLDER_NAME }} - name: Upload roc nightly tar. Actually uploading to github releases has to be done manually. - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ env.RELEASE_FOLDER_NAME }}.tar.gz path: ${{ env.RELEASE_FOLDER_NAME }}.tar.gz diff --git a/.github/workflows/nightly_macos_apple_silicon.yml b/.github/workflows/nightly_macos_apple_silicon.yml index 3f460bc5003..8fed1b70af9 100644 --- a/.github/workflows/nightly_macos_apple_silicon.yml +++ b/.github/workflows/nightly_macos_apple_silicon.yml @@ -16,8 +16,8 @@ jobs: runs-on: [self-hosted, macOS, ARM64] timeout-minutes: 90 steps: - - uses: actions/checkout@v3 - + - uses: actions/checkout@v4 + - run: zig version - name: llvm version @@ -25,18 +25,18 @@ jobs: - name: run tests run: cargo test --locked --release - + - name: get commit SHA run: echo "SHA=$(git rev-parse --short "$GITHUB_SHA")" >> $GITHUB_ENV - + - name: get date run: echo "DATE=$(date "+%Y-%m-%d")" >> $GITHUB_ENV - + - name: build file name env: DATE: ${{ env.DATE }} SHA: ${{ env.SHA }} - run: echo "RELEASE_FOLDER_NAME=roc_nightly-macos_apple_silicon-$DATE-$SHA" >> $GITHUB_ENV + run: echo "RELEASE_FOLDER_NAME=roc_nightly-macos_apple_silicon-$DATE-$SHA" >> $GITHUB_ENV - name: write version to file run: ./ci/write_version.sh @@ -61,7 +61,7 @@ jobs: - name: print date run: date - name: Upload artifact Actually uploading to github releases has to be done manually - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ env.RELEASE_FOLDER_NAME }}.tar.gz path: ${{ env.RELEASE_FOLDER_NAME }}.tar.gz diff --git a/.github/workflows/nightly_macos_x86_64.yml b/.github/workflows/nightly_macos_x86_64.yml index 1557b9e8755..fd5db9b53db 100644 --- a/.github/workflows/nightly_macos_x86_64.yml +++ b/.github/workflows/nightly_macos_x86_64.yml @@ -1,63 +1,62 @@ on: -# pull_request: - workflow_dispatch: - schedule: - - cron: '0 9 * * *' # 9=9am utc+0 + # pull_request: + workflow_dispatch: + schedule: + - cron: "0 9 * * *" # 9=9am utc+0 name: Nightly Release macOS x86_64 env: - LLVM_SYS_160_PREFIX: /usr/local/opt/llvm@16 + LLVM_SYS_160_PREFIX: /usr/local/opt/llvm@16 jobs: - test-build-upload: - name: build, test, package and upload nightly release - runs-on: [self-hosted, macOS, X64] - timeout-minutes: 120 - steps: - - uses: actions/checkout@v3 - - - name: Update PATH to use zig 11 - run: | - echo "PATH=/Users/username1/Downloads/zig-macos-x86_64-0.11.0:$PATH" >> $GITHUB_ENV - - - run: zig version - - - name: write version to file - run: ./ci/write_version.sh - - - name: execute rust tests - run: cargo test --release --locked -- --skip opaque_wrap_function --skip gen_list::bool_list_literal --skip platform_switching_swift --skip swift_ui --skip gen_str::str_append_scalar --skip gen_tags::phantom_polymorphic_record - # swift tests are skipped because of "Could not find or use auto-linked library 'swiftCompatibilityConcurrency'" on macos-11 x86_64 CI machine - # this issue may be caused by using older versions of XCode - - - name: build release - run: RUSTFLAGS="-C target-cpu=x86-64" cargo build --profile=release-with-lto --locked --bin roc --bin roc_language_server - # target-cpu=x86-64 -> For maximal compatibility for all CPU's. - - - name: get commit SHA - run: echo "SHA=$(git rev-parse --short "$GITHUB_SHA")" >> $GITHUB_ENV - - - name: get date - run: echo "DATE=$(date "+%Y-%m-%d")" >> $GITHUB_ENV - - - name: build file name - env: - DATE: ${{ env.DATE }} - SHA: ${{ env.SHA }} - run: echo "RELEASE_FOLDER_NAME=roc_nightly-macos_x86_64-$DATE-$SHA" >> $GITHUB_ENV - - # this makes the roc binary a lot smaller - - name: strip debug info - run: strip ./target/release-with-lto/roc - - - name: package release - run: ./ci/package_release.sh ${{ env.RELEASE_FOLDER_NAME }} - - - name: Upload artifact. Actually uploading to github releases has to be done manually. - uses: actions/upload-artifact@v3 - with: - name: ${{ env.RELEASE_FOLDER_NAME }}.tar.gz - path: ${{ env.RELEASE_FOLDER_NAME }}.tar.gz - retention-days: 4 + test-build-upload: + name: build, test, package and upload nightly release + runs-on: [self-hosted, macOS, X64] + timeout-minutes: 120 + steps: + - uses: actions/checkout@v4 + - name: Update PATH to use zig 11 + run: | + echo "PATH=/Users/username1/Downloads/zig-macos-x86_64-0.11.0:$PATH" >> $GITHUB_ENV + + - run: zig version + + - name: write version to file + run: ./ci/write_version.sh + + - name: execute rust tests + run: cargo test --release --locked -- --skip opaque_wrap_function --skip gen_list::bool_list_literal --skip platform_switching_swift --skip swift_ui --skip gen_tags::phantom_polymorphic_record + # swift tests are skipped because of "Could not find or use auto-linked library 'swiftCompatibilityConcurrency'" on macos-11 x86_64 CI machine + # this issue may be caused by using older versions of XCode + + - name: build release + run: RUSTFLAGS="-C target-cpu=x86-64" cargo build --profile=release-with-lto --locked --bin roc --bin roc_language_server + # target-cpu=x86-64 -> For maximal compatibility for all CPU's. + + - name: get commit SHA + run: echo "SHA=$(git rev-parse --short "$GITHUB_SHA")" >> $GITHUB_ENV + + - name: get date + run: echo "DATE=$(date "+%Y-%m-%d")" >> $GITHUB_ENV + + - name: build file name + env: + DATE: ${{ env.DATE }} + SHA: ${{ env.SHA }} + run: echo "RELEASE_FOLDER_NAME=roc_nightly-macos_x86_64-$DATE-$SHA" >> $GITHUB_ENV + + # this makes the roc binary a lot smaller + - name: strip debug info + run: strip ./target/release-with-lto/roc + + - name: package release + run: ./ci/package_release.sh ${{ env.RELEASE_FOLDER_NAME }} + + - name: Upload artifact. Actually uploading to github releases has to be done manually. + uses: actions/upload-artifact@v4 + with: + name: ${{ env.RELEASE_FOLDER_NAME }}.tar.gz + path: ${{ env.RELEASE_FOLDER_NAME }}.tar.gz + retention-days: 4 diff --git a/.github/workflows/nightly_old_linux_arm64.yml b/.github/workflows/nightly_old_linux_arm64.yml index 19ad0c695c8..38265b5c630 100644 --- a/.github/workflows/nightly_old_linux_arm64.yml +++ b/.github/workflows/nightly_old_linux_arm64.yml @@ -5,21 +5,21 @@ on: - cron: '0 9 * * *' name: Nightly Release Old Linux arm64 using Earthly - + jobs: build: name: build and package nightly release runs-on: [self-hosted, Linux, ARM64] timeout-minutes: 180 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: get commit SHA run: echo "SHA=$(git rev-parse --short "$GITHUB_SHA")" >> $GITHUB_ENV - + - name: get date run: echo "DATE=$(date "+%Y-%m-%d")" >> $GITHUB_ENV - + - name: build file name env: DATE: ${{ env.DATE }} @@ -32,7 +32,7 @@ jobs: run: earthly +build-nightly-release --RELEASE_FOLDER_NAME=${{ env.RELEASE_FOLDER_NAME }} --ZIG_ARCH=aarch64 - name: Upload roc nightly tar. Actually uploading to github releases has to be done manually. - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ env.RELEASE_FOLDER_NAME }}.tar.gz path: ${{ env.RELEASE_FOLDER_NAME }}.tar.gz diff --git a/.github/workflows/nightly_old_linux_x86_64.yml b/.github/workflows/nightly_old_linux_x86_64.yml index a5418796584..3ceed925c5c 100644 --- a/.github/workflows/nightly_old_linux_x86_64.yml +++ b/.github/workflows/nightly_old_linux_x86_64.yml @@ -5,37 +5,37 @@ on: - cron: '0 9 * * *' name: Nightly Release Old Linux x86_64 using Earthly - + jobs: build: name: build and package nightly release runs-on: [ubuntu-20.04] timeout-minutes: 90 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: get commit SHA run: echo "SHA=$(git rev-parse --short "$GITHUB_SHA")" >> $GITHUB_ENV - + - name: get date run: echo "DATE=$(date "+%Y-%m-%d")" >> $GITHUB_ENV - + - name: build file name env: DATE: ${{ env.DATE }} SHA: ${{ env.SHA }} run: echo "RELEASE_FOLDER_NAME=roc_nightly-old_linux_x86_64-$DATE-$SHA" >> $GITHUB_ENV - + - name: install earthly run: sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/latest/download/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly && /usr/local/bin/earthly bootstrap --with-autocomplete' - + - run: earthly --version - name: build release with earthly run: earthly +build-nightly-release --RELEASE_FOLDER_NAME=${{ env.RELEASE_FOLDER_NAME }} --RUSTFLAGS="-C target-cpu=x86-64" - name: Upload roc nightly tar. Actually uploading to github releases has to be done manually. - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ env.RELEASE_FOLDER_NAME }}.tar.gz path: ${{ env.RELEASE_FOLDER_NAME }}.tar.gz diff --git a/.github/workflows/nix_linux_arm64_cargo.yml b/.github/workflows/nix_linux_arm64_cargo.yml index 488d6af721d..45f7558cf47 100644 --- a/.github/workflows/nix_linux_arm64_cargo.yml +++ b/.github/workflows/nix_linux_arm64_cargo.yml @@ -1,6 +1,6 @@ on: workflow_call: - + name: test cargo build on linux arm64 inside nix env: @@ -12,11 +12,11 @@ jobs: runs-on: [self-hosted, Linux, ARM64] timeout-minutes: 150 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: test release build run: nix develop -c cargo build --release --locked - # TODO + # TODO #- name: build tests without running # run: cargo test --no-run --release diff --git a/.github/workflows/nix_linux_arm64_default.yml b/.github/workflows/nix_linux_arm64_default.yml index 0352fc3fd86..817d3ec5edc 100644 --- a/.github/workflows/nix_linux_arm64_default.yml +++ b/.github/workflows/nix_linux_arm64_default.yml @@ -1,7 +1,7 @@ on: workflow_call: - -name: test default.nix on linux arm64 + +name: test default.nix on linux arm64 env: RUST_BACKTRACE: 1 @@ -12,7 +12,7 @@ jobs: runs-on: [self-hosted, Linux, ARM64] timeout-minutes: 150 steps: - - uses: actions/checkout@v3 - + - uses: actions/checkout@v4 + - name: test building default.nix run: nix-build diff --git a/.github/workflows/nix_linux_x86_64.yml b/.github/workflows/nix_linux_x86_64.yml index 3637a056eb9..f14c667b859 100644 --- a/.github/workflows/nix_linux_x86_64.yml +++ b/.github/workflows/nix_linux_x86_64.yml @@ -12,10 +12,10 @@ jobs: runs-on: [self-hosted, i5-4690K] timeout-minutes: 90 steps: - - uses: actions/checkout@v3 - + - uses: actions/checkout@v4 + - name: test building default.nix - run: nix-build + run: nix-build - name: execute tests with --release run: nix develop -c cargo test --locked --release diff --git a/.github/workflows/nix_macos_apple_silicon.yml b/.github/workflows/nix_macos_apple_silicon.yml index 2b1ab0dcbaa..16020906412 100644 --- a/.github/workflows/nix_macos_apple_silicon.yml +++ b/.github/workflows/nix_macos_apple_silicon.yml @@ -12,7 +12,7 @@ jobs: runs-on: [self-hosted, macOS, ARM64] timeout-minutes: 90 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 # These started to accumulate quickly since #5990, not sure why - name: Clean up old nix shells diff --git a/.github/workflows/nix_macos_x86_64.yml b/.github/workflows/nix_macos_x86_64.yml index 58a80b58369..e03c2088230 100644 --- a/.github/workflows/nix_macos_x86_64.yml +++ b/.github/workflows/nix_macos_x86_64.yml @@ -12,7 +12,7 @@ jobs: runs-on: [macos-12] timeout-minutes: 90 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: cachix/install-nix-action@v22 diff --git a/.github/workflows/spellcheck.yml b/.github/workflows/spellcheck.yml index 36531f1a11f..5b85f82c463 100644 --- a/.github/workflows/spellcheck.yml +++ b/.github/workflows/spellcheck.yml @@ -18,7 +18,7 @@ jobs: env: FORCE_COLOR: 1 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - run: cargo install typos-cli --version 1.0.11 diff --git a/.github/workflows/test_nightly_macos_apple_silicon.yml b/.github/workflows/test_nightly_macos_apple_silicon.yml index c18d1838bb6..69bb520c67c 100644 --- a/.github/workflows/test_nightly_macos_apple_silicon.yml +++ b/.github/workflows/test_nightly_macos_apple_silicon.yml @@ -9,7 +9,7 @@ jobs: runs-on: [self-hosted, macOS, ARM64] timeout-minutes: 90 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: get the latest release archive run: curl -fOL https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-macos_apple_silicon-latest.tar.gz @@ -45,6 +45,3 @@ jobs: cp target/release/repl_basic_test ../../roc_nightly cd ../../roc_nightly ./repl_basic_test - - - diff --git a/.github/workflows/test_nightly_many_os.yml b/.github/workflows/test_nightly_many_os.yml index 53c2e254e5f..1e679041c24 100644 --- a/.github/workflows/test_nightly_many_os.yml +++ b/.github/workflows/test_nightly_many_os.yml @@ -13,14 +13,14 @@ jobs: runs-on: ${{ matrix.os }} timeout-minutes: 90 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: goto-bus-stop/setup-zig@v2 with: version: 0.11.0 - name: get the latest release archive for linux (x86_64) if: startsWith(matrix.os, 'ubuntu') - run: | + run: | curl -fOL https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-linux_x86_64-latest.tar.gz @@ -40,7 +40,3 @@ jobs: rm -rf roc_nightly curl -fOL https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-old_linux_x86_64-latest.tar.gz ./ci/basic_nightly_test.sh - - - - diff --git a/.github/workflows/ubuntu_x86_64.yml b/.github/workflows/ubuntu_x86_64.yml index 9eff9aeb874..8e74c1e396d 100644 --- a/.github/workflows/ubuntu_x86_64.yml +++ b/.github/workflows/ubuntu_x86_64.yml @@ -14,7 +14,7 @@ jobs: env: RUSTC_WRAPPER: /home/big-ci-user/.cargo/bin/sccache steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Check for duplicate AUTHORS run: diff <(sort AUTHORS) <(sort AUTHORS | uniq) # The < operator treats a string as a file. diff 'succeeds' if no difference. @@ -22,7 +22,7 @@ jobs: - name: Update PATH to use zig 11 run: | echo "PATH=/home/big-ci-user/Downloads/zig-linux-x86_64-0.11.0:$PATH" >> $GITHUB_ENV - + - run: zig version - name: zig fmt check, zig tests @@ -40,7 +40,7 @@ jobs: - name: check that the platform`s produced dylib is loadable run: cd examples/platform-switching/rust-platform && LD_LIBRARY_PATH=. cargo test --release --locked - + - name: test the dev backend # these tests require an explicit feature flag run: cargo test --locked --release --package test_gen --no-default-features --features gen-dev && sccache --show-stats diff --git a/.github/workflows/windows_release_build.yml b/.github/workflows/windows_release_build.yml index ef67101b4fa..b8e18293910 100644 --- a/.github/workflows/windows_release_build.yml +++ b/.github/workflows/windows_release_build.yml @@ -15,7 +15,7 @@ jobs: timeout-minutes: 150 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - run: Add-Content -Path "$env:GITHUB_ENV" -Value "GITHUB_RUNNER_CPU=$((Get-CimInstance Win32_Processor).Name)" @@ -29,8 +29,8 @@ jobs: - name: zig version run: zig version - - name: install rust nightly 1.71.0 - run: rustup install nightly-2023-05-28 + - name: install rust nightly 1.72.0 + run: rustup install nightly-2023-07-09 - name: set up llvm 16 run: | diff --git a/.github/workflows/windows_tests.yml b/.github/workflows/windows_tests.yml index 8271303b622..96f67931167 100644 --- a/.github/workflows/windows_tests.yml +++ b/.github/workflows/windows_tests.yml @@ -15,7 +15,7 @@ jobs: timeout-minutes: 150 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - run: Add-Content -Path "$env:GITHUB_ENV" -Value "GITHUB_RUNNER_CPU=$((Get-CimInstance Win32_Processor).Name)" @@ -37,29 +37,26 @@ jobs: cd crates\compiler\builtins\bitcode\ zig build test - - name: install rust nightly 1.71.0 - run: rustup install nightly-2023-05-28 + - name: install rust nightly 1.72.0 + run: rustup install nightly-2023-07-09 - name: set up llvm 16 run: | curl.exe -f -L -O -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" https://github.com/roc-lang/llvm-package-windows/releases/download/v16.0.6/LLVM-16.0.6-win64.7z 7z x LLVM-16.0.6-win64.7z -oC:\LLVM-16.0.6-win64 - - name: Build tests --release without running. + - name: Build tests --release without running. run: cargo test --locked --release --no-run # Why are these tests not build with previous command? => fingerprint error. Use `CARGO_LOG=cargo::core::compiler::fingerprint=info` to investigate - - name: Build specific tests without running. - run: cargo test --locked --release --no-run -p roc_ident -p roc_region -p roc_collections -p roc_can -p roc_types -p roc_solve -p roc_mono -p roc_gen_dev -p roc_gen_wasm -p roc_serialize -p roc_linker -p roc_cli -p test_gen + - name: Build specific tests without running. + run: cargo test --locked --release --no-run -p roc_ident -p roc_region -p roc_collections -p roc_can -p roc_types -p roc_solve -p roc_mono -p roc_gen_dev -p roc_gen_wasm -p roc_serialize -p roc_linker -p roc_cli -p test_gen - name: Test setjmp/longjmp logic run: cargo test-gen-dev --locked --release nat_alias && cargo test-gen-dev --locked --release a_crash - name: Run gen tests - run: cargo test-gen-llvm --locked --release gen_str - + run: cargo test-gen-llvm --locked --release gen_str + - name: Actually run the tests. run: cargo test --locked --release -p roc_ident -p roc_region -p roc_collections -p roc_can -p roc_types -p roc_solve -p roc_mono -p roc_gen_dev -p roc_gen_wasm -p roc_serialize -p roc_linker -p roc_cli - - - diff --git a/.gitignore b/.gitignore index 40950ca89cf..519018e9096 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,27 @@ +### Do not modify these first three ignore rules. Needed to ignore files with no extension ### +# Ignore all files including binary files that have no extension +* +# Unignore all files with extensions +!*.* +# Unignore all directories +!*/ + +# Specifically keep these files with no extension +!Earthfile +!AUTHORS +!LICENSE* +!LEGAL* +!Dockerfile +# .reuse/dep5 see https://reuse.software/ +!dep5 +# NotARocFile is used for formatter test +!NotARocFile +# also includes keeping one exe benchmark file +!dynhost_benchmarks* + +### Add specific file extensions and directories below ### + +# Ignore the following directories and file extensions target generated-docs zig-cache @@ -63,7 +87,7 @@ result # Only keep Cargo.lock dependencies for the main compiler. # Examples and test only crates should be fine to be unlocked. -# This remove unneccessary lock file versioning. +# This remove unnecessary lock file versioning. # It also ensures the compiler can always pull in 1 version of things and doesn't get restricted by sub lockfiles. /**/Cargo.lock !/Cargo.lock @@ -83,4 +107,13 @@ www/dist # ignore the examples folder in the WIP website, this is copied from roc-lang/examples in when building the site www/content/examples www/examples-main.zip -www/examples-main \ No newline at end of file +www/examples-main + +examples/static-site-gen/**/*.html + +# glue auto-generated fixture code +crates/glue/tests/fixtures/*/Cargo.toml +crates/glue/tests/fixtures/*/build.rs +crates/glue/tests/fixtures/*/host.c +crates/glue/tests/fixtures/*/src/main.rs +crates/glue/tests/fixtures/*/test_glue/ diff --git a/BUILDING_FROM_SOURCE.md b/BUILDING_FROM_SOURCE.md index eb5e905811c..353006893e0 100644 --- a/BUILDING_FROM_SOURCE.md +++ b/BUILDING_FROM_SOURCE.md @@ -10,7 +10,7 @@ On MacOS and Linux, we highly recommend Using [nix](https://nixos.org/download.h ### On Linux x86_64 or MacOS aarch64/arm64/x86_64 -#### Install +#### Installing Nix If you are running ArchLinux or a derivative like Manjaro, you'll need to run `sudo sysctl -w kernel.unprivileged_userns_clone=1` before installing nix. diff --git a/Cargo.lock b/Cargo.lock index d87306562ec..a0f8b416430 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -771,6 +771,12 @@ dependencies = [ "winapi", ] +[[package]] +name = "dissimilar" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86e3bdc80eee6e16b2b6b0f87fbc98c04bee3455e35174c0de1a125d0688c632" + [[package]] name = "distance" version = "0.4.0" @@ -838,6 +844,19 @@ dependencies = [ "regex", ] +[[package]] +name = "env_logger" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd405aab171cb85d6735e5c8d9db038c17d3ca007a4d2c25f337935c3d90580" +dependencies = [ + "humantime", + "is-terminal", + "log", + "regex", + "termcolor", +] + [[package]] name = "equivalent" version = "1.0.1" @@ -864,6 +883,16 @@ dependencies = [ "str-buf", ] +[[package]] +name = "expect-test" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30d9eafeadd538e68fb28016364c9732d78e420b9ff8853fa5e4058861e9f8d3" +dependencies = [ + "dissimilar", + "once_cell", +] + [[package]] name = "fd-lock" version = "3.0.13" @@ -1151,6 +1180,12 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" +[[package]] +name = "humantime" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" + [[package]] name = "hyper" version = "0.14.27" @@ -1327,6 +1362,17 @@ version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" +[[package]] +name = "is-terminal" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bad00257d07be169d870ab665980b06cdb366d792ad690bf2e76876dc503455" +dependencies = [ + "hermit-abi 0.3.3", + "rustix", + "windows-sys 0.52.0", +] + [[package]] name = "itertools" version = "0.9.0" @@ -1922,7 +1968,7 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "588f6378e4dd99458b60ec275b4477add41ce4fa9f64dcba6f15adccb19b50d6" dependencies = [ - "env_logger", + "env_logger 0.8.4", "log", "rand", ] @@ -2273,6 +2319,7 @@ dependencies = [ "roc_collections", "roc_command_utils", "roc_constrain", + "roc_debug_flags", "roc_error_macros", "roc_gen_dev", "roc_gen_llvm", @@ -2649,6 +2696,10 @@ name = "roc_lang_srv" version = "0.0.1" dependencies = [ "bumpalo", + "env_logger 0.10.2", + "expect-test", + "indoc", + "log", "parking_lot", "roc_can", "roc_collections", @@ -4546,6 +4597,15 @@ dependencies = [ "windows-targets 0.48.5", ] +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.0", +] + [[package]] name = "windows-targets" version = "0.42.2" @@ -4576,6 +4636,21 @@ dependencies = [ "windows_x86_64_msvc 0.48.5", ] +[[package]] +name = "windows-targets" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +dependencies = [ + "windows_aarch64_gnullvm 0.52.0", + "windows_aarch64_msvc 0.52.0", + "windows_i686_gnu 0.52.0", + "windows_i686_msvc 0.52.0", + "windows_x86_64_gnu 0.52.0", + "windows_x86_64_gnullvm 0.52.0", + "windows_x86_64_msvc 0.52.0", +] + [[package]] name = "windows_aarch64_gnullvm" version = "0.42.2" @@ -4588,6 +4663,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" + [[package]] name = "windows_aarch64_msvc" version = "0.42.2" @@ -4600,6 +4681,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" + [[package]] name = "windows_i686_gnu" version = "0.42.2" @@ -4612,6 +4699,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" +[[package]] +name = "windows_i686_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" + [[package]] name = "windows_i686_msvc" version = "0.42.2" @@ -4624,6 +4717,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" +[[package]] +name = "windows_i686_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" + [[package]] name = "windows_x86_64_gnu" version = "0.42.2" @@ -4636,6 +4735,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" + [[package]] name = "windows_x86_64_gnullvm" version = "0.42.2" @@ -4648,6 +4753,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" + [[package]] name = "windows_x86_64_msvc" version = "0.42.2" @@ -4660,6 +4771,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" + [[package]] name = "winreg" version = "0.50.0" diff --git a/Earthfile b/Earthfile index 25017d06d17..0829c090fe6 100644 --- a/Earthfile +++ b/Earthfile @@ -1,6 +1,6 @@ VERSION 0.6 -FROM rust:1.71.1-slim-buster # make sure to update rust-toolchain.toml too so that everything uses the same rust version +FROM rust:1.72.1-slim-buster # make sure to update rust-toolchain.toml too so that everything uses the same rust version WORKDIR /earthbuild prep-debian: @@ -32,7 +32,7 @@ install-zig-llvm: RUN apt -y install libpolly-16-dev # required by llvm-sys crate ENV RUSTFLAGS="-C link-arg=-fuse-ld=lld -C target-cpu=native" RUN apt -y install libssl-dev - RUN OPENSSL_NO_VENDOR=1 cargo install wasm-pack + RUN wget https://rustwasm.github.io/wasm-pack/installer/init.sh -O init.sh && sh init.sh # sccache RUN cargo install sccache --locked RUN sccache -V diff --git a/README.md b/README.md index d1ce2001055..c6cfb282e8b 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,7 @@ If you would like your company to become a corporate sponsor of Roc's developmen We'd also like to express our gratitude to our generous [individual sponsors](https://github.com/sponsors/roc-lang/)! A special thanks to those sponsoring $25/month or more: +* [Steven Chen](https://github.com/megakilo) * [Drew Lazzeri](https://github.com/asteroidb612) * [Alex Binaei](https://github.com/mrmizz) * [Jono Mallanyk](https://github.com/jonomallanyk) diff --git a/ci/benchmarks/bench-runner/src/main.rs b/ci/benchmarks/bench-runner/src/main.rs index adc94376964..9c425339cab 100644 --- a/ci/benchmarks/bench-runner/src/main.rs +++ b/ci/benchmarks/bench-runner/src/main.rs @@ -3,7 +3,6 @@ use data_encoding::HEXUPPER; use is_executable::IsExecutable; use regex::Regex; use ring::digest::{Context, Digest, SHA256}; -use std::fs::File; use std::io::Read; use std::{ collections::{HashMap, HashSet, VecDeque}, @@ -22,7 +21,7 @@ fn main() { delete_old_bench_results(); if optional_args.check_executables_changed { - println!("Doing a test run to verify benchmarks are working correctly and generate executables."); + println!("\nDoing a test run to verify benchmarks are working correctly and generate executables.\n"); std::env::set_var("BENCH_DRY_RUN", "1"); @@ -79,6 +78,7 @@ fn finish(all_regressed_benches: HashSet, nr_repeat_benchmarks: usize) { // returns all benchmarks that have regressed fn do_all_benches(nr_repeat_benchmarks: usize) -> HashSet { delete_old_bench_results(); + do_benchmark("main"); let mut all_regressed_benches = do_benchmark("branch"); @@ -91,6 +91,7 @@ fn do_all_benches(nr_repeat_benchmarks: usize) -> HashSet { for _ in 1..nr_repeat_benchmarks { delete_old_bench_results(); + do_benchmark("main"); let regressed_benches = do_benchmark("branch"); @@ -110,17 +111,25 @@ fn do_all_benches(nr_repeat_benchmarks: usize) -> HashSet { // returns Vec with names of regressed benchmarks fn do_benchmark(branch_name: &'static str) -> HashSet { - let mut cmd_child = Command::new(format!( - "./bench-folder-{}/target/release/deps/time_bench", - branch_name - )) - .args(&["--bench", "--noplot"]) - .stdout(Stdio::piped()) - .stderr(Stdio::inherit()) - .spawn() - .unwrap_or_else(|_| panic!("Failed to benchmark {}.", branch_name)); - - let stdout = cmd_child.stdout.as_mut().unwrap(); + let mut bench_cmd = + Command::new(format!( + "./bench-folder-{}/target/release/deps/time_bench", + branch_name + )); + + let bench_cmd_w_args = + bench_cmd.args(&["--bench", "--noplot"]); + + let bench_cmd_as_str = format!("{bench_cmd_w_args:?}"); + + let mut bench_cmd_child = + bench_cmd_w_args + .stdout(Stdio::piped()) + .stderr(Stdio::inherit()) + .spawn() + .unwrap_or_else(|_| panic!("Failed to benchmark {}.", branch_name)); + + let stdout = bench_cmd_child.stdout.as_mut().unwrap(); let stdout_reader = BufReader::new(stdout); let stdout_lines = stdout_reader.lines(); @@ -147,6 +156,18 @@ fn do_benchmark(branch_name: &'static str) -> HashSet { println!(">>bench {:?}: {:?}", branch_name, line_str); } + let exit_status = bench_cmd_child.wait().expect("Failed to wait on cmd_child"); + + if !exit_status.success() { + panic!( + "Error: time-bench execution failed with exit code {}.\n\ + See output above for error info.\n\ + Command was:\n\t{}", + exit_status, + bench_cmd_as_str + ); + } + regressed_benches } @@ -190,20 +211,21 @@ fn sha256_digest(mut reader: R) -> Result { } fn sha_file(file_path: &Path) -> Result { - // Debug info is dependent on the dir in which executable was created, - // so we need to strip that to be able to compare binaries. - let no_debug_info_file_path = file_path.to_str().unwrap().to_string() + ("_no_debug_info"); - std::fs::copy(file_path, &no_debug_info_file_path)?; + // only checking disassembly because of #6386 + let disassembly_output = Command::new("objdump") + .args(["-d", file_path.to_str().unwrap()]) + .output() + .expect("failed to execute objdump"); - let strip_output = Command::new("strip") - .args(["--strip-debug", &no_debug_info_file_path]) - .output() - .expect("failed to execute process"); + assert!(disassembly_output.status.success()); - assert!(strip_output.status.success()); + let mut reader = BufReader::new(disassembly_output.stdout.as_slice()); + + // the first line contains the path, we want to skip it + let mut _discard_lines = String::new(); + reader.read_line(&mut _discard_lines)?; + reader.read_line(&mut _discard_lines)?; - let no_debug_info_file = File::open(no_debug_info_file_path)?; - let reader = BufReader::new(no_debug_info_file); let digest = sha256_digest(reader)?; Ok(HEXUPPER.encode(digest.as_ref())) @@ -250,6 +272,7 @@ fn check_if_bench_executables_changed() -> bool { let main_bench_hashes = calc_hashes_for_folder(&main_benches_path_str); let branch_benches_path_str = [BENCH_FOLDER_BRANCH, bench_folder_str].join(""); + let branch_bench_hashes = calc_hashes_for_folder(&branch_benches_path_str); if main_bench_hashes.keys().len() == branch_bench_hashes.keys().len() { diff --git a/crates/cli/benches/README.md b/crates/cli/benches/README.md index cea3d2f1036..560204417dc 100644 --- a/crates/cli/benches/README.md +++ b/crates/cli/benches/README.md @@ -1,19 +1,12 @@ # Running the benchmarks -Install cargo criterion: - +If you're not using nix, install cargo criterion: ```sh cargo install cargo-criterion ``` -To prevent stack overflow on the `CFold` benchmark: - -```sh -ulimit -s unlimited -``` - -In the `cli` folder execute: +In the `crates/cli` folder execute: ```sh cargo criterion diff --git a/crates/cli/src/lib.rs b/crates/cli/src/lib.rs index c59c4c8ed7c..cd1a05dcb9e 100644 --- a/crates/cli/src/lib.rs +++ b/crates/cli/src/lib.rs @@ -68,6 +68,7 @@ pub const FLAG_STDIN: &str = "stdin"; pub const FLAG_STDOUT: &str = "stdout"; pub const FLAG_WASM_STACK_SIZE_KB: &str = "wasm-stack-size-kb"; pub const FLAG_OUTPUT: &str = "output"; +pub const FLAG_FUZZ: &str = "fuzz"; pub const ROC_FILE: &str = "ROC_FILE"; pub const ROC_DIR: &str = "ROC_DIR"; pub const GLUE_DIR: &str = "GLUE_DIR"; @@ -139,6 +140,12 @@ pub fn build_app() -> Command { .value_parser(value_parser!(u32)) .required(false); + let flag_fuzz = Arg::new(FLAG_FUZZ) + .long(FLAG_FUZZ) + .help("Instrument the roc binary for fuzzing with roc-fuzz") + .action(ArgAction::SetTrue) + .required(false); + let roc_file_to_run = Arg::new(ROC_FILE) .help("The .roc file of an app to run") .value_parser(value_parser!(PathBuf)) @@ -175,6 +182,7 @@ pub fn build_app() -> Command { .arg(flag_time.clone()) .arg(flag_linker.clone()) .arg(flag_prebuilt.clone()) + .arg(flag_fuzz.clone()) .arg(flag_wasm_stack_size_kb) .arg( Arg::new(FLAG_TARGET) @@ -225,6 +233,7 @@ pub fn build_app() -> Command { .arg(flag_time.clone()) .arg(flag_linker.clone()) .arg(flag_prebuilt.clone()) + .arg(flag_fuzz.clone()) .arg( Arg::new(ROC_FILE) .help("The .roc file for the main module") @@ -248,6 +257,7 @@ pub fn build_app() -> Command { .arg(flag_time.clone()) .arg(flag_linker.clone()) .arg(flag_prebuilt.clone()) + .arg(flag_fuzz.clone()) .arg(roc_file_to_run.clone()) .arg(args_for_app.clone().last(true)) ) @@ -262,11 +272,12 @@ pub fn build_app() -> Command { .arg(flag_time.clone()) .arg(flag_linker.clone()) .arg(flag_prebuilt.clone()) + .arg(flag_fuzz.clone()) .arg(roc_file_to_run.clone()) .arg(args_for_app.clone().last(true)) ) .subcommand(Command::new(CMD_FORMAT) - .about("Format a .roc file using standard Roc formatting") + .about("Format a .roc file or the .roc files contained in a directory using standard\nRoc formatting") .arg( Arg::new(DIRECTORY_OR_FILES) .index(1) @@ -294,6 +305,7 @@ pub fn build_app() -> Command { .action(ArgAction::SetTrue) .required(false), ) + .after_help("If DIRECTORY_OR_FILES is omitted, the .roc files in the current working\ndirectory are formatted.") ) .subcommand(Command::new(CMD_VERSION) .about(concatcp!("Print the Roc compiler’s version, which is currently ", VERSION))) @@ -392,6 +404,7 @@ pub fn build_app() -> Command { .arg(flag_time) .arg(flag_linker) .arg(flag_prebuilt) + .arg(flag_fuzz) .arg(roc_file_to_run) .arg(args_for_app.trailing_var_arg(true)) } @@ -747,6 +760,11 @@ pub fn build( (cross_compile && !targeting_wasm) }; + let fuzz = matches.get_flag(FLAG_FUZZ); + if fuzz && !matches!(code_gen_backend, CodeGenBackend::Llvm(_)) { + user_error!("Cannot instrument binary for fuzzing while using a dev backend."); + } + let wasm_dev_stack_bytes: Option = matches .try_get_one::(FLAG_WASM_STACK_SIZE_KB) .ok() @@ -763,6 +781,7 @@ pub fn build( opt_level, emit_debug_info, emit_llvm_ir, + fuzz, }; let load_config = standard_load_config(&triple, build_ordering, threading); diff --git a/crates/cli/src/main.rs b/crates/cli/src/main.rs index 2d9bc7a83c8..ef7dbd8e899 100644 --- a/crates/cli/src/main.rs +++ b/crates/cli/src/main.rs @@ -287,6 +287,7 @@ fn main() -> io::Result<()> { values.push(os_string.to_owned()); } } + None if from_stdin || to_stdout => {} None => { let mut os_string_values: Vec = Vec::new(); diff --git a/crates/cli/tests/cli_run.rs b/crates/cli/tests/cli_run.rs index ce9e640cba4..a38c2b2f0c0 100644 --- a/crates/cli/tests/cli_run.rs +++ b/crates/cli/tests/cli_run.rs @@ -323,11 +323,12 @@ mod cli_run { } // when you want to run `roc test` to execute `expect`s, perhaps on a library rather than an application. - fn test_roc_expect(dir_name: &str, roc_filename: &str) { - let path = file_path_from_root(dir_name, roc_filename); - let out = run_roc([CMD_TEST, path.to_str().unwrap()], &[], &[]); - assert!(out.status.success()); - } + // not currently used + // fn test_roc_expect(dir_name: &str, roc_filename: &str) { + // let path = file_path_from_root(dir_name, roc_filename); + // let out = run_roc([CMD_TEST, path.to_str().unwrap()], &[], &[]); + // assert!(out.status.success()); + // } // when you don't need args, stdin or extra_env fn test_roc_app_slim( @@ -552,9 +553,11 @@ mod cli_run { &[], indoc!( r#" + ── EXPECT FAILED in ...roc/roc/crates/cli_testing_examples/expects/expects.roc ─ + This expectation failed: - 19│ expect words == [] + 28│ expect words == [] ^^^^^^^^^^^ When it failed, these variables had these values: @@ -562,12 +565,12 @@ mod cli_run { words : List Str words = ["this", "will", "for", "sure", "be", "a", "large", "string", "so", "when", "we", "split", "it", "it", "will", "use", "seamless", "slices", "which", "affect", "printing"] - [:22] x = 42 - [:23] "Fjoer en ferdjer frieten oan dyn geve lea" = "Fjoer en ferdjer frieten oan dyn geve lea" - [:24] "this is line 24" = "this is line 24" - [:13] x = "abc" - [:13] x = 10 - [:13] x = (A (B C)) + [:31] x = 42 + [:33] "Fjoer en ferdjer frieten oan dyn geve lea" = "Fjoer en ferdjer frieten oan dyn geve lea" + [:35] "this is line 24" = "this is line 24" + [:21] x = "abc" + [:21] x = 10 + [:21] x = (A (B C)) Program finished! "# ), @@ -583,20 +586,46 @@ mod cli_run { &[], indoc!( r#" + ── EXPECT FAILED in ...roc/roc/crates/cli_testing_examples/expects/expects.roc ─ + + This expectation failed: + + 9│ expect a == 2 + ^^^^^^ + + When it failed, these variables had these values: + + a : Num * + a = 1 + + ── EXPECT FAILED in ...roc/roc/crates/cli_testing_examples/expects/expects.roc ─ + This expectation failed: - 6│> expect - 7│> a = 1 - 8│> b = 2 - 9│> - 10│> a == b + 10│ expect a == 3 + ^^^^^^ When it failed, these variables had these values: a : Num * a = 1 - b : Num * + ── EXPECT FAILED in ...roc/roc/crates/cli_testing_examples/expects/expects.roc ─ + + This expectation failed: + + 14│> expect + 15│> a = makeA + 16│> b = 2i64 + 17│> + 18│> a == b + + When it failed, these variables had these values: + + a : Int Signed64 + a = 1 + + b : I64 b = 2 @@ -874,7 +903,7 @@ mod cli_run { This roc file can print it's own source code. The source is: app "ingested-file" - packages { pf: "https://github.com/roc-lang/basic-cli/releases/download/0.7.1/Icc3xJoIixF3hCcfXrDwLCu4wQHtNdPyoJkEbkgIElA.tar.br" } + packages { pf: "https://github.com/roc-lang/basic-cli/releases/download/0.8.1/x8URkvfyi9I0QhmVG98roKBUs_AZRkLFwFJVJ3942YA.tar.br" } imports [ pf.Stdout, "ingested-file.roc" as ownCode : Str, @@ -882,7 +911,7 @@ mod cli_run { provides [main] to pf main = - Stdout.line "\nThis roc file can print it's own source code. The source is:\n\n\(ownCode)" + Stdout.line "\nThis roc file can print it's own source code. The source is:\n\n$(ownCode)" "# ), @@ -912,9 +941,9 @@ mod cli_run { #[cfg_attr(windows, ignore)] fn parse_movies_csv() { test_roc_app_slim( - "examples/parser/examples", + "examples/parser", "parse-movies-csv.roc", - "Parse success!\n", + "2 movies were found:\n\nThe movie 'Airplane!' was released in 1980 and stars Robert Hays and Julie Hagerty\nThe movie 'Caddyshack' was released in 1980 and stars Chevy Chase, Rodney Dangerfield, Ted Knight, Michael O'Keefe and Bill Murray\n\nParse success!\n\n", UseValgrind::No, ) } @@ -924,19 +953,13 @@ mod cli_run { #[cfg_attr(windows, ignore)] fn parse_letter_counts() { test_roc_app_slim( - "examples/parser/examples", + "examples/parser", "letter-counts.roc", "I counted 7 letter A's!\n", UseValgrind::No, ) } - #[test] - #[cfg_attr(windows, ignore)] - fn parse_http() { - test_roc_expect("examples/parser/package", "ParserHttp.roc") - } - #[test] #[cfg_attr(windows, ignore)] fn inspect_logging() { @@ -976,13 +999,13 @@ mod cli_run { // TODO fix QuicksortApp and then remove this! match roc_filename { - "QuicksortApp.roc" => { + "quicksortApp.roc" => { eprintln!( "WARNING: skipping testing benchmark {roc_filename} because the test is broken right now!" ); return; } - "TestAStar.roc" => { + "testAStar.roc" => { if cfg!(feature = "wasm32-cli-run") { eprintln!( "WARNING: skipping testing benchmark {roc_filename} because it currently does not work on wasm32 due to dictionaries." @@ -1137,20 +1160,20 @@ mod cli_run { #[test] #[cfg_attr(windows, ignore)] fn nqueens() { - test_benchmark("NQueens.roc", &["6"], "4\n", UseValgrind::Yes) + test_benchmark("nQueens.roc", &["6"], "4\n", UseValgrind::Yes) } #[test] #[cfg_attr(windows, ignore)] fn cfold() { - test_benchmark("CFold.roc", &["3"], "11 & 11\n", UseValgrind::Yes) + test_benchmark("cFold.roc", &["3"], "11 & 11\n", UseValgrind::Yes) } #[test] #[cfg_attr(windows, ignore)] fn deriv() { test_benchmark( - "Deriv.roc", + "deriv.roc", &["2"], "1 count: 6\n2 count: 22\n", UseValgrind::Yes, @@ -1160,14 +1183,14 @@ mod cli_run { #[test] #[cfg_attr(windows, ignore)] fn rbtree_ck() { - test_benchmark("RBTreeCk.roc", &["100"], "10\n", UseValgrind::Yes) + test_benchmark("rBTreeCk.roc", &["100"], "10\n", UseValgrind::Yes) } #[test] #[cfg_attr(windows, ignore)] fn rbtree_insert() { test_benchmark( - "RBTreeInsert.roc", + "rBTreeInsert.roc", &[], "Node Black 0 {} Empty Empty\n", UseValgrind::Yes, @@ -1179,25 +1202,25 @@ mod cli_run { #[test] fn rbtree_del() { test_benchmark( - "RBTreeDel.roc", + "rBTreeDel.roc", &["420"], - &[], "30\n", - true + UseValgrind::Yes, ) - }*/ + } + */ #[test] #[cfg_attr(windows, ignore)] fn astar() { - test_benchmark("TestAStar.roc", &[], "True\n", UseValgrind::No) + test_benchmark("testAStar.roc", &[], "True\n", UseValgrind::No) } #[test] #[cfg_attr(windows, ignore)] fn base64() { test_benchmark( - "TestBase64.roc", + "testBase64.roc", &[], "encoded: SGVsbG8gV29ybGQ=\ndecoded: Hello World\n", UseValgrind::Yes, @@ -1207,19 +1230,19 @@ mod cli_run { #[test] #[cfg_attr(windows, ignore)] fn closure() { - test_benchmark("Closure.roc", &[], "", UseValgrind::No) + test_benchmark("closure.roc", &[], "", UseValgrind::No) } #[test] #[cfg_attr(windows, ignore)] fn issue2279() { - test_benchmark("Issue2279.roc", &[], "Hello, world!\n", UseValgrind::Yes) + test_benchmark("issue2279.roc", &[], "Hello, world!\n", UseValgrind::Yes) } #[test] fn quicksort_app() { test_benchmark( - "QuicksortApp.roc", + "quicksortApp.roc", &[], "todo put the correct quicksort answer here", UseValgrind::Yes, @@ -1333,7 +1356,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: @@ -1362,6 +1385,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( @@ -1369,7 +1415,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 +1436,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 +1459,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/cli/tests/fixtures/.gitignore b/crates/cli/tests/fixtures/.gitignore deleted file mode 100644 index 7c3b9c35b8f..00000000000 --- a/crates/cli/tests/fixtures/.gitignore +++ /dev/null @@ -1,11 +0,0 @@ -app -*.o -*.dSYM -dynhost -libapp.so -metadata -preprocessedhost -packages-test - -multi-dep-str/multi-dep-str -multi-dep-thunk/multi-dep-thunk \ No newline at end of file diff --git a/crates/cli/tests/fixtures/multi-dep-str/.gitignore b/crates/cli/tests/fixtures/multi-dep-str/.gitignore deleted file mode 100644 index c098216e78e..00000000000 --- a/crates/cli/tests/fixtures/multi-dep-str/.gitignore +++ /dev/null @@ -1 +0,0 @@ -Main diff --git a/crates/cli/tests/fixtures/multi-dep-thunk/.gitignore b/crates/cli/tests/fixtures/multi-dep-thunk/.gitignore deleted file mode 100644 index c098216e78e..00000000000 --- a/crates/cli/tests/fixtures/multi-dep-thunk/.gitignore +++ /dev/null @@ -1 +0,0 @@ -Main diff --git a/crates/cli/tests/fixtures/packages/app.roc b/crates/cli/tests/fixtures/packages/app.roc index a37bee685b1..22918325c9a 100644 --- a/crates/cli/tests/fixtures/packages/app.roc +++ b/crates/cli/tests/fixtures/packages/app.roc @@ -3,4 +3,4 @@ app "packages-test" imports [json.JsonParser, csv.Csv] provides [main] to pf -main = "Hello, World! \(JsonParser.example) \(Csv.example)" +main = "Hello, World! $(JsonParser.example) $(Csv.example)" diff --git a/crates/cli/tests/known_bad/UnusedImportButWithALongFileNameForTesting.roc b/crates/cli/tests/known_bad/UnusedImportButWithALongFileNameForTesting.roc new file mode 100644 index 00000000000..cfd09933ce4 --- /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 diff --git a/crates/cli_testing_examples/.gitignore b/crates/cli_testing_examples/.gitignore deleted file mode 100644 index f394d04f8b8..00000000000 --- a/crates/cli_testing_examples/.gitignore +++ /dev/null @@ -1,12 +0,0 @@ -*.dSYM -libhost.a -libapp.so -dynhost -preprocessedhost -metadata - -expects/expects -benchmarks/rbtree-ck -benchmarks/rbtree-insert -benchmarks/test-astar -benchmarks/test-base64 diff --git a/crates/cli_testing_examples/algorithms/.gitignore b/crates/cli_testing_examples/algorithms/.gitignore deleted file mode 100644 index f3f3289d949..00000000000 --- a/crates/cli_testing_examples/algorithms/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -fibonacci -quicksort diff --git a/crates/cli_testing_examples/benchmarks/.gitignore b/crates/cli_testing_examples/benchmarks/.gitignore deleted file mode 100644 index 0cf228bc337..00000000000 --- a/crates/cli_testing_examples/benchmarks/.gitignore +++ /dev/null @@ -1,13 +0,0 @@ -CFold -Closure -Deriv -Issue2279 -NQueens -Quicksort -QuicksortApp -RBTreeCk -RBTreeDel -RBTreeInsert -TestAStar -TestBase64 -*.wasm diff --git a/crates/cli_testing_examples/benchmarks/Quicksort.roc b/crates/cli_testing_examples/benchmarks/Quicksort.roc index 0e934709c48..76bcc1a612b 100644 --- a/crates/cli_testing_examples/benchmarks/Quicksort.roc +++ b/crates/cli_testing_examples/benchmarks/Quicksort.roc @@ -10,7 +10,7 @@ show = \list -> |> List.map Num.toStr |> Str.joinWith ", " - "[\(content)]" + "[$(content)]" sortBy : List a, (a -> Num *) -> List a sortBy = \list, toComparable -> diff --git a/crates/cli_testing_examples/benchmarks/CFold.roc b/crates/cli_testing_examples/benchmarks/cFold.roc similarity index 100% rename from crates/cli_testing_examples/benchmarks/CFold.roc rename to crates/cli_testing_examples/benchmarks/cFold.roc diff --git a/crates/cli_testing_examples/benchmarks/Closure.roc b/crates/cli_testing_examples/benchmarks/closure.roc similarity index 96% rename from crates/cli_testing_examples/benchmarks/Closure.roc rename to crates/cli_testing_examples/benchmarks/closure.roc index 920a62aa1d8..088a61aa1bb 100644 --- a/crates/cli_testing_examples/benchmarks/Closure.roc +++ b/crates/cli_testing_examples/benchmarks/closure.roc @@ -15,7 +15,7 @@ closure1 = \_ -> Task.succeed (foo toUnitBorrowed "a long string such that it's malloced") |> Task.map \_ -> {} -toUnitBorrowed = \x -> Str.countGraphemes x +toUnitBorrowed = \x -> Str.countUtf8Bytes x foo = \f, x -> f x diff --git a/crates/cli_testing_examples/benchmarks/Deriv.roc b/crates/cli_testing_examples/benchmarks/deriv.roc similarity index 100% rename from crates/cli_testing_examples/benchmarks/Deriv.roc rename to crates/cli_testing_examples/benchmarks/deriv.roc diff --git a/crates/cli_testing_examples/benchmarks/Issue2279.roc b/crates/cli_testing_examples/benchmarks/issue2279.roc similarity index 100% rename from crates/cli_testing_examples/benchmarks/Issue2279.roc rename to crates/cli_testing_examples/benchmarks/issue2279.roc diff --git a/crates/cli_testing_examples/benchmarks/NQueens.roc b/crates/cli_testing_examples/benchmarks/nQueens.roc similarity index 100% rename from crates/cli_testing_examples/benchmarks/NQueens.roc rename to crates/cli_testing_examples/benchmarks/nQueens.roc diff --git a/crates/cli_testing_examples/benchmarks/QuicksortApp.roc b/crates/cli_testing_examples/benchmarks/quicksortApp.roc similarity index 100% rename from crates/cli_testing_examples/benchmarks/QuicksortApp.roc rename to crates/cli_testing_examples/benchmarks/quicksortApp.roc diff --git a/crates/cli_testing_examples/benchmarks/RBTreeCk.roc b/crates/cli_testing_examples/benchmarks/rBTreeCk.roc similarity index 100% rename from crates/cli_testing_examples/benchmarks/RBTreeCk.roc rename to crates/cli_testing_examples/benchmarks/rBTreeCk.roc diff --git a/crates/cli_testing_examples/benchmarks/RBTreeDel.roc b/crates/cli_testing_examples/benchmarks/rBTreeDel.roc similarity index 99% rename from crates/cli_testing_examples/benchmarks/RBTreeDel.roc rename to crates/cli_testing_examples/benchmarks/rBTreeDel.roc index 7f5e940b73d..5617d6eb3f6 100644 --- a/crates/cli_testing_examples/benchmarks/RBTreeDel.roc +++ b/crates/cli_testing_examples/benchmarks/rBTreeDel.roc @@ -248,4 +248,4 @@ del = \t, k -> rebalanceLeft cx lx ky vy ry Delmin (Del ry Bool.false) ky vy -> - Del (Node cx lx ky vy ry) Bool.false + Del (Node cx lx ky vy ry) Bool.false \ No newline at end of file diff --git a/crates/cli_testing_examples/benchmarks/RBTreeInsert.roc b/crates/cli_testing_examples/benchmarks/rBTreeInsert.roc similarity index 97% rename from crates/cli_testing_examples/benchmarks/RBTreeInsert.roc rename to crates/cli_testing_examples/benchmarks/rBTreeInsert.roc index 73e7b18209f..1a506b5c494 100644 --- a/crates/cli_testing_examples/benchmarks/RBTreeInsert.roc +++ b/crates/cli_testing_examples/benchmarks/rBTreeInsert.roc @@ -26,7 +26,7 @@ showRBTree = \tree, showKey, showValue -> sL = nodeInParens left showKey showValue sR = nodeInParens right showKey showValue - "Node \(sColor) \(sKey) \(sValue) \(sL) \(sR)" + "Node $(sColor) $(sKey) $(sValue) $(sL) $(sR)" nodeInParens : RedBlackTree k v, (k -> Str), (v -> Str) -> Str nodeInParens = \tree, showKey, showValue -> @@ -37,7 +37,7 @@ nodeInParens = \tree, showKey, showValue -> Node _ _ _ _ _ -> inner = showRBTree tree showKey showValue - "(\(inner))" + "($(inner))" showColor : NodeColor -> Str showColor = \color -> diff --git a/crates/cli_testing_examples/benchmarks/TestAStar.roc b/crates/cli_testing_examples/benchmarks/testAStar.roc similarity index 94% rename from crates/cli_testing_examples/benchmarks/TestAStar.roc rename to crates/cli_testing_examples/benchmarks/testAStar.roc index cd4eaf846d5..98ab543c5ca 100644 --- a/crates/cli_testing_examples/benchmarks/TestAStar.roc +++ b/crates/cli_testing_examples/benchmarks/testAStar.roc @@ -14,7 +14,7 @@ main = # # _ -> # ns = Num.toStr n -# Task.putLine "No test \(ns)" +# Task.putLine "No test $(ns)" showBool : Bool -> Str showBool = \b -> if diff --git a/crates/cli_testing_examples/benchmarks/TestBase64.roc b/crates/cli_testing_examples/benchmarks/testBase64.roc similarity index 100% rename from crates/cli_testing_examples/benchmarks/TestBase64.roc rename to crates/cli_testing_examples/benchmarks/testBase64.roc diff --git a/crates/cli_testing_examples/expects/expects.roc b/crates/cli_testing_examples/expects/expects.roc index 68f1a433ddb..e2125c0d99e 100644 --- a/crates/cli_testing_examples/expects/expects.roc +++ b/crates/cli_testing_examples/expects/expects.roc @@ -3,14 +3,23 @@ app "expects-test" imports [] provides [main] to pf -expect +makeA = a = 1 - b = 2 + + expect a == 2 + expect a == 3 + + a + +expect + a = makeA + b = 2i64 a == b polyDbg = \x -> dbg x + x main = @@ -20,10 +29,12 @@ main = x = 42 dbg x + dbg "Fjoer en ferdjer frieten oan dyn geve lea" + dbg "this is line 24" - r = {x : polyDbg "abc", y: polyDbg 10u8, z : polyDbg (A (B C))} + r = { x: polyDbg "abc", y: polyDbg 10u8, z: polyDbg (A (B C)) } when r is _ -> "Program finished!\n" diff --git a/crates/cli_utils/src/bench_utils.rs b/crates/cli_utils/src/bench_utils.rs index ddac5232bff..3c79a3a5593 100644 --- a/crates/cli_utils/src/bench_utils.rs +++ b/crates/cli_utils/src/bench_utils.rs @@ -20,7 +20,7 @@ fn exec_bench_w_input( ); if !compile_out.stderr.is_empty() && compile_out.stderr != "🔨 Rebuilding platform...\n" { - panic!("{}", compile_out.stderr); + panic!("stderr was not empty:\n\t{}", compile_out.stderr); } assert!( @@ -74,7 +74,7 @@ fn bench_cmd( .unwrap() .to_string(); - if cmd_str.contains("cfold") { + if cmd_str.contains("cFold") { #[cfg(unix)] use rlimit::{setrlimit, Resource}; #[cfg(unix)] @@ -107,9 +107,9 @@ fn bench_cmd( pub fn bench_nqueens(bench_group_opt: Option<&mut BenchmarkGroup>) { exec_bench_w_input( - &file_path_from_root("crates/cli_testing_examples/benchmarks", "NQueens.roc"), + &file_path_from_root("crates/cli_testing_examples/benchmarks", "nQueens.roc"), "11", - "nqueens", + "nQueens", "2680\n", //2680-14200 bench_group_opt, ); @@ -117,9 +117,9 @@ pub fn bench_nqueens(bench_group_opt: Option<&mut BenchmarkGroup pub fn bench_cfold(bench_group_opt: Option<&mut BenchmarkGroup>) { exec_bench_w_input( - &file_path_from_root("crates/cli_testing_examples/benchmarks", "CFold.roc"), + &file_path_from_root("crates/cli_testing_examples/benchmarks", "cFold.roc"), "17", - "cfold", + "cFold", "396354 & 396354\n", bench_group_opt, ); @@ -127,7 +127,7 @@ pub fn bench_cfold(bench_group_opt: Option<&mut BenchmarkGroup(bench_group_opt: Option<&mut BenchmarkGroup>) { exec_bench_w_input( - &file_path_from_root("crates/cli_testing_examples/benchmarks", "Deriv.roc"), + &file_path_from_root("crates/cli_testing_examples/benchmarks", "deriv.roc"), "8", "deriv", "1 count: 6\n2 count: 22\n3 count: 90\n4 count: 420\n5 count: 2202\n6 count: 12886\n7 count: 83648\n8 count: 598592\n", @@ -137,9 +137,9 @@ pub fn bench_deriv(bench_group_opt: Option<&mut BenchmarkGroup(bench_group_opt: Option<&mut BenchmarkGroup>) { exec_bench_w_input( - &file_path_from_root("crates/cli_testing_examples/benchmarks", "RBTreeCk.roc"), + &file_path_from_root("crates/cli_testing_examples/benchmarks", "rBTreeCk.roc"), "80000", - "rbtree-ck", + "rBTreeCk", "8000\n", bench_group_opt, ); @@ -148,9 +148,9 @@ pub fn bench_rbtree_ck(bench_group_opt: Option<&mut BenchmarkGro #[allow(dead_code)] pub fn bench_rbtree_delete(bench_group_opt: Option<&mut BenchmarkGroup>) { exec_bench_w_input( - &file_path_from_root("crates/cli_testing_examples/benchmarks", "RBTreeDel.roc"), + &file_path_from_root("crates/cli_testing_examples/benchmarks", "rBTreeDel.roc"), "100000", - "rbtree-del", + "rBTreeDel", "7000\n", bench_group_opt, ); @@ -158,9 +158,9 @@ pub fn bench_rbtree_delete(bench_group_opt: Option<&mut Benchmar pub fn bench_quicksort(bench_group_opt: Option<&mut BenchmarkGroup>) { exec_bench_w_input( - &file_path_from_root("crates/cli_testing_examples/benchmarks", "QuicksortApp.roc"), + &file_path_from_root("crates/cli_testing_examples/benchmarks", "quicksortApp.roc"), "1", // 1 for sorting large list, 0 for a small list - "quicksortapp", + "quicksortApp", "[0, 0, 1, 1, 2, 2, 2, 3, 3, 4, 6, 6, 7, 7, 8, 8, 8, 8, 8, 8, 9, 10, 10, 11, 11, 12, 13, 13, 14, 14, 14, 15, 15, 15, 16, 16, 18, 18, 19, 19, 19, 20, 21, 21, 21, 21, 22, 23, 23, 23, 25, 26, 27, 27, 28, 28, 28, 29, 29, 29, 29, 30, 31, 32, 33, 34, 35, 35, 35, 36, 36, 36, 37, 38, 38, 39, 39, 39, 39, 39, 39, 40, 40, 41, 42, 42, 42, 42, 42, 43, 43, 44, 46, 47, 47, 47, 48, 50, 51, 51, 52, 52, 52, 53, 54, 54, 55, 55, 55, 56, 57, 57, 58, 58, 58, 58, 58, 59, 59, 60, 60, 61, 62, 63, 63, 63, 63, 64, 65, 65, 65, 66, 66, 66, 66, 67, 67, 68, 69, 69, 70, 70, 71, 71, 71, 72, 72, 73, 73, 73, 74, 75, 75, 75, 76, 78, 79, 79, 80, 81, 81, 82, 82, 83, 83, 84, 84, 86, 86, 87, 87, 88, 88, 88, 89, 89, 90, 90, 90, 91, 92, 92, 92, 93, 93, 93, 94, 95, 95, 96, 97, 98, 99, 100, 100, 101, 102, 102, 102, 104, 104, 105, 106, 106, 106, 106, 106, 106, 107, 107, 108, 108, 108, 109, 109, 109, 109, 110, 112, 112, 112, 113, 113, 113, 113, 113, 114, 115, 117, 117, 117, 118, 119, 119, 119, 120, 120, 121, 123, 124, 125, 125, 126, 126, 126, 126, 127, 129, 131, 131, 131, 131, 131, 131, 131, 132, 133, 133, 134, 134, 134, 135, 135, 135, 135, 135, 137, 138, 138, 138, 139, 139, 140, 141, 142, 142, 142, 144, 144, 145, 145, 145, 147, 147, 147, 147, 148, 149, 149, 149, 150, 150, 151, 151, 151, 151, 153, 155, 156, 159, 160, 160, 160, 161, 161, 162, 162, 162, 162, 162, 162, 163, 163, 163, 163, 163, 163, 164, 164, 164, 164, 164, 165, 165, 165, 165, 165, 166, 166, 166, 166, 166, 167, 167, 167, 167, 168, 169, 170, 170, 170, 170, 172, 172, 172, 173, 173, 173, 174, 175, 176, 177, 177, 178, 178, 178, 178, 179, 179, 180, 180, 181, 181, 182, 183, 183, 185, 186, 186, 186, 186, 186, 186, 186, 187, 187, 187, 188, 188, 188, 190, 190, 190, 190, 190, 192, 193, 194, 194, 194, 195, 195, 196, 197, 198, 198, 198, 199, 199, 199, 200, 200, 201, 201, 201, 204, 205, 205, 205, 207, 207, 207, 208, 208, 208, 208, 210, 210, 210, 210, 211, 211, 213, 214, 214, 214, 218, 218, 218, 218, 218, 218, 219, 221, 222, 223, 223, 223, 224, 224, 224, 224, 224, 224, 224, 225, 226, 226, 226, 226, 226, 227, 227, 228, 228, 229, 229, 229, 229, 230, 230, 230, 230, 232, 233, 233, 234, 235, 236, 236, 237, 237, 238, 240, 240, 242, 242, 243, 244, 246, 247, 247, 247, 247, 248, 248, 248, 249, 249, 249, 249, 249, 250, 250, 250, 251, 251, 252, 252, 253, 255, 255, 256, 256, 256, 257, 257, 257, 258, 258, 258, 258, 258, 259, 259, 260, 260, 260, 261, 261, 261, 262, 263, 265, 265, 266, 267, 267, 267, 268, 268, 268, 270, 270, 270, 271, 271, 273, 274, 274, 274, 275, 277, 277, 279, 279, 280, 281, 281, 282, 283, 283, 285, 286, 288, 288, 289, 289, 290, 290, 290, 290, 290, 291, 291, 291, 291, 292, 292, 292, 293, 294, 294, 295, 295, 295, 295, 295, 298, 298, 301, 301, 301, 302, 302, 303, 304, 305, 305, 306, 307, 307, 308, 308, 309, 309, 309, 309, 310, 310, 311, 311, 311, 312, 313, 313, 313, 314, 315, 316, 316, 316, 316, 317, 318, 318, 319, 319, 319, 320, 321, 321, 322, 322, 322, 322, 323, 323, 323, 324, 324, 324, 325, 326, 326, 328, 329, 329, 330, 330, 330, 331, 331, 331, 331, 332, 332, 333, 333, 333, 333, 334, 334, 334, 335, 336, 336, 337, 337, 337, 337, 339, 339, 340, 341, 341, 343, 344, 344, 345, 345, 345, 346, 346, 347, 348, 348, 348, 349, 350, 351, 351, 351, 352, 353, 354, 354, 354, 355, 356, 356, 357, 358, 358, 358, 359, 359, 360, 361, 361, 362, 362, 363, 364, 364, 365, 365, 365, 366, 366, 367, 367, 368, 368, 369, 369, 369, 370, 370, 370, 370, 370, 371, 372, 373, 373, 374, 374, 375, 375, 376, 377, 377, 378, 379, 381, 381, 383, 384, 385, 385, 385, 385, 386, 386, 387, 388, 388, 388, 389, 389, 390, 391, 391, 391, 392, 392, 393, 393, 394, 394, 394, 395, 395, 396, 396, 397, 397, 398, 399, 400, 400, 401, 401, 402, 402, 403, 404, 404, 405, 406, 406, 407, 407, 407, 408, 408, 408, 408, 408, 409, 409, 409, 411, 411, 412, 412, 413, 413, 413, 413, 413, 414, 414, 414, 415, 416, 416, 416, 416, 417, 417, 418, 418, 418, 418, 419, 420, 420, 420, 421, 421, 422, 422, 423, 423, 423, 424, 424, 424, 424, 425, 425, 425, 426, 426, 427, 427, 427, 428, 428, 429, 429, 429, 430, 430, 431, 432, 433, 433, 433, 434, 434, 434, 434, 437, 438, 438, 438, 438, 438, 439, 440, 441, 441, 442, 442, 443, 444, 444, 444, 445, 445, 445, 447, 447, 447, 448, 448, 449, 449, 450, 450, 450, 451, 452, 453, 453, 453, 453, 455, 455, 456, 456, 457, 458, 459, 459, 460, 460, 461, 461, 464, 465, 465, 465, 466, 466, 467, 467, 467, 467, 468, 469, 469, 470, 470, 471, 471, 471, 472, 473, 473, 473, 473, 474, 475, 475, 475, 476, 476, 476, 477, 477, 477, 478, 478, 479, 481, 481, 481, 482, 482, 482, 483, 483, 483, 484, 484, 485, 488, 488, 488, 488, 489, 490, 491, 491, 491, 492, 492, 493, 493, 493, 493, 493, 495, 495, 496, 496, 496, 496, 496, 496, 497, 497, 498, 498, 498, 498, 498, 499, 500, 500, 501, 501, 501, 502, 502, 502, 502, 503, 503, 503, 505, 505, 506, 507, 507, 507, 507, 508, 508, 510, 510, 510, 511, 511, 512, 512, 513, 513, 513, 513, 514, 514, 515, 516, 517, 518, 519, 519, 519, 520, 521, 521, 522, 522, 523, 523, 523, 525, 525, 526, 527, 527, 527, 528, 528, 528, 530, 531, 532, 532, 532, 532, 532, 535, 535, 537, 538, 538, 538, 540, 540, 540, 541, 541, 541, 541, 541, 542, 543, 543, 543, 543, 544, 544, 545, 545, 545, 546, 547, 547, 547, 548, 549, 549, 551, 552, 552, 553, 553, 553, 554, 554, 554, 555, 556, 557, 557, 557, 558, 558, 558, 559, 559, 559, 560, 560, 560, 561, 561, 561, 561, 562, 562, 562, 563, 563, 565, 566, 566, 567, 568, 569, 570, 570, 571, 571, 571, 571, 572, 572, 572, 574, 575, 576, 576, 577, 580, 581, 581, 582, 582, 582, 583, 583, 584, 585, 585, 585, 586, 587, 587, 588, 588, 588, 589, 591, 591, 591, 592, 592, 592, 593, 593, 593, 594, 594, 594, 594, 595, 595, 595, 596, 596, 596, 596, 596, 597, 597, 599, 599, 600, 600, 601, 601, 601, 602, 602, 603, 603, 604, 605, 605, 605, 606, 607, 608, 610, 612, 612, 613, 613, 614, 614, 615, 615, 615, 616, 616, 616, 617, 617, 619, 619, 619, 619, 620, 621, 621, 622, 624, 624, 624, 624, 625, 625, 628, 628, 628, 629, 629, 630, 630, 630, 630, 632, 633, 633, 634, 635, 638, 638, 639, 640, 641, 641, 643, 643, 644, 644, 644, 645, 645, 645, 646, 646, 646, 647, 647, 647, 647, 648, 648, 649, 650, 650, 650, 650, 650, 650, 651, 652, 652, 652, 653, 653, 653, 653, 654, 655, 655, 655, 655, 656, 657, 657, 657, 658, 658, 659, 659, 659, 659, 659, 660, 660, 661, 662, 663, 664, 665, 666, 666, 666, 667, 667, 667, 667, 667, 668, 668, 669, 670, 670, 670, 671, 672, 672, 672, 672, 672, 673, 673, 674, 674, 674, 675, 676, 676, 677, 678, 678, 679, 679, 680, 681, 681, 682, 683, 683, 684, 684, 685, 686, 686, 686, 686, 687, 687, 688, 690, 690, 691, 691, 693, 693, 694, 694, 697, 697, 698, 700, 701, 702, 702, 703, 703, 703, 704, 705, 706, 706, 707, 708, 708, 709, 709, 710, 710, 711, 712, 712, 712, 712, 712, 712, 713, 713, 714, 714, 716, 716, 716, 717, 717, 717, 718, 718, 718, 718, 719, 719, 719, 720, 720, 721, 721, 722, 723, 724, 725, 726, 726, 727, 729, 729, 729, 730, 730, 731, 731, 732, 732, 734, 734, 734, 735, 735, 736, 736, 736, 737, 737, 738, 739, 740, 740, 740, 741, 741, 742, 742, 742, 742, 744, 744, 744, 744, 745, 745, 745, 745, 746, 748, 749, 749, 749, 750, 750, 751, 751, 751, 752, 752, 753, 753, 754, 755, 756, 756, 756, 757, 757, 757, 757, 757, 761, 761, 762, 762, 762, 763, 763, 763, 763, 763, 764, 764, 764, 764, 765, 765, 766, 766, 766, 766, 767, 767, 767, 770, 770, 770, 770, 770, 771, 772, 772, 772, 773, 774, 775, 775, 775, 775, 776, 778, 778, 779, 779, 780, 780, 780, 781, 784, 784, 784, 786, 786, 786, 786, 787, 788, 789, 789, 789, 790, 791, 791, 792, 793, 793, 793, 794, 794, 795, 796, 797, 797, 798, 799, 799, 799, 800, 800, 800, 800, 801, 802, 802, 802, 802, 804, 806, 806, 806, 807, 807, 807, 807, 808, 809, 810, 810, 811, 812, 812, 812, 812, 812, 813, 813, 813, 814, 814, 814, 815, 816, 816, 817, 817, 817, 818, 818, 818, 819, 820, 820, 820, 820, 820, 821, 821, 823, 824, 824, 824, 825, 826, 826, 826, 826, 828, 828, 829, 829, 829, 829, 829, 830, 831, 831, 831, 831, 831, 832, 832, 833, 833, 833, 834, 834, 835, 835, 835, 835, 835, 836, 836, 836, 837, 839, 839, 839, 839, 839, 840, 840, 840, 841, 841, 842, 843, 844, 844, 844, 845, 845, 845, 845, 845, 846, 846, 846, 847, 847, 848, 848, 848, 849, 849, 850, 850, 851, 852, 852, 852, 852, 853, 855, 856, 857, 857, 858, 858, 858, 859, 860, 861, 861, 861, 861, 862, 863, 863, 863, 865, 865, 865, 866, 867, 867, 867, 868, 868, 870, 871, 872, 872, 873, 873, 873, 874, 874, 874, 875, 875, 875, 876, 877, 878, 878, 878, 878, 878, 879, 879, 879, 879, 880, 881, 881, 881, 882, 883, 885, 886, 886, 887, 887, 888, 888, 889, 889, 890, 890, 890, 892, 892, 892, 892, 893, 893, 894, 894, 894, 895, 896, 896, 896, 897, 899, 899, 900, 901, 901, 901, 901, 905, 905, 905, 905, 906, 907, 907, 907, 908, 908, 908, 908, 908, 908, 909, 909, 910, 910, 910, 912, 913, 913, 914, 914, 914, 915, 916, 916, 916, 916, 917, 917, 918, 919, 919, 919, 920, 920, 920, 920, 921, 921, 922, 923, 923, 923, 923, 923, 924, 925, 927, 927, 927, 928, 928, 929, 929, 929, 929, 930, 930, 931, 932, 932, 932, 933, 933, 934, 934, 935, 935, 936, 937, 937, 937, 939, 940, 940, 941, 941, 941, 941, 942, 942, 943, 943, 945, 946, 946, 946, 948, 949, 949, 951, 953, 953, 954, 954, 954, 954, 954, 955, 956, 956, 956, 957, 957, 957, 957, 959, 960, 960, 961, 961, 963, 963, 963, 964, 964, 964, 964, 965, 966, 967, 968, 969, 969, 970, 972, 972, 973, 973, 974, 975, 975, 975, 976, 977, 978, 978, 979, 979, 980, 980, 980, 980, 981, 982, 982, 984, 986, 986, 986, 986, 986, 987, 988, 988, 990, 990, 990, 990, 990, 991, 991, 991, 991, 991, 991, 992, 992, 992, 992, 992, 993, 993, 993, 993, 995, 996, 996, 996, 997, 997, 997, 997, 997, 998, 998, 998, 999, 999, 1000, 1001, 1001, 1002, 1003, 1003, 1004, 1004, 1004, 1006, 1007, 1007, 1007, 1008, 1008, 1008, 1009, 1010, 1010, 1011, 1011, 1012, 1012, 1012, 1013, 1013, 1013, 1014, 1014, 1014, 1016, 1016, 1016, 1017, 1017, 1017, 1018, 1018, 1018, 1019, 1019, 1020, 1020, 1021, 1021, 1021, 1022, 1023, 1023, 1023, 1024, 1024, 1024, 1025, 1026, 1026, 1027, 1028, 1028, 1028, 1028, 1029, 1029, 1029, 1030, 1031, 1031, 1032, 1033, 1034, 1034, 1035, 1035, 1036, 1038, 1039, 1039, 1040, 1040, 1040, 1040, 1040, 1040, 1042, 1042, 1043, 1043, 1043, 1043, 1044, 1045, 1045, 1045, 1045, 1047, 1047, 1048, 1048, 1049, 1049, 1050, 1050, 1051, 1051, 1053, 1053, 1053, 1054, 1054, 1055, 1055, 1056, 1056, 1057, 1057, 1058, 1058, 1058, 1058, 1059, 1059, 1059, 1061, 1061, 1061, 1061, 1062, 1062, 1062, 1063, 1063, 1063, 1063, 1064, 1064, 1064, 1064, 1064, 1065, 1065, 1066, 1066, 1067, 1067, 1069, 1069, 1069, 1070, 1071, 1071, 1072, 1072, 1072, 1073, 1073, 1074, 1074, 1074, 1075, 1076, 1077, 1077, 1078, 1078, 1078, 1079, 1079, 1079, 1081, 1082, 1082, 1083, 1084, 1084, 1084, 1084, 1085, 1085, 1086, 1086, 1087, 1087, 1088, 1088, 1089, 1089, 1090, 1090, 1090, 1091, 1093, 1093, 1093, 1094, 1094, 1094, 1094, 1095, 1095, 1095, 1095, 1095, 1095, 1096, 1097, 1098, 1098, 1098, 1098, 1100, 1102, 1102, 1103, 1103, 1103, 1104, 1104, 1105, 1105, 1105, 1105, 1106, 1106, 1106, 1106, 1107, 1107, 1107, 1108, 1110, 1111, 1111, 1112, 1113, 1113, 1113, 1113, 1115, 1115, 1115, 1115, 1115, 1116, 1116, 1117, 1117, 1119, 1119, 1119, 1121, 1122, 1122, 1122, 1122, 1123, 1124, 1124, 1125, 1125, 1127, 1127, 1127, 1128, 1129, 1129, 1129, 1130, 1130, 1131, 1131, 1132, 1132, 1132, 1132, 1134, 1135, 1137, 1137, 1138, 1138, 1138, 1138, 1139, 1140, 1140, 1140, 1140, 1142, 1142, 1142, 1142, 1142, 1142, 1143, 1143, 1145, 1145, 1148, 1148, 1150, 1150, 1151, 1151, 1151, 1152, 1152, 1152, 1153, 1153, 1154, 1155, 1156, 1156, 1156, 1156, 1157, 1158, 1158, 1158, 1159, 1159, 1159, 1160, 1160, 1161, 1161, 1161, 1162, 1162, 1163, 1163, 1163, 1164, 1164, 1165, 1165, 1167, 1167, 1167, 1168, 1168, 1168, 1169, 1170, 1170, 1171, 1171, 1171, 1172, 1172, 1172, 1173, 1173, 1173, 1174, 1174, 1174, 1174, 1176, 1176, 1176, 1176, 1176, 1177, 1178, 1178, 1178, 1179, 1179, 1179, 1180, 1180, 1181, 1181, 1182, 1182, 1182, 1183, 1183, 1184, 1184, 1184, 1184, 1184, 1185, 1186, 1186, 1188, 1188, 1189, 1189, 1190, 1190, 1191, 1191, 1191, 1192, 1192, 1193, 1193, 1195, 1197, 1197, 1198, 1198, 1198, 1199, 1199, 1199, 1200, 1201, 1201, 1201, 1202, 1202, 1202, 1202, 1204, 1204, 1205, 1205, 1205, 1205, 1205, 1206, 1206, 1206, 1207, 1207, 1207, 1207, 1207, 1207, 1209, 1210, 1210, 1211, 1212, 1213, 1213, 1214, 1214, 1215, 1215, 1216, 1216, 1217, 1217, 1217, 1219, 1219, 1219, 1219, 1220, 1220, 1222, 1222, 1223, 1224, 1224, 1225, 1225, 1226, 1226, 1226, 1227, 1227, 1227, 1227, 1227, 1227, 1228, 1228, 1228, 1229, 1230, 1230, 1232, 1232, 1232, 1232, 1232, 1232, 1233, 1234, 1235, 1235, 1235, 1236, 1237, 1238, 1239, 1240, 1240, 1240, 1240, 1240, 1240, 1241, 1241, 1242, 1243, 1243, 1243, 1243, 1244, 1244, 1246, 1246, 1247, 1247, 1249, 1250, 1251, 1251, 1252, 1252, 1252, 1252, 1252, 1252, 1253, 1253, 1253, 1253, 1254, 1254, 1255, 1256, 1257, 1257, 1257, 1259, 1259, 1261, 1261, 1262, 1263, 1263, 1264, 1265, 1265, 1265, 1266, 1266, 1268, 1268, 1269, 1270, 1270, 1270, 1270, 1271, 1271, 1271, 1271, 1272, 1272, 1273, 1273, 1274, 1274, 1274, 1274, 1275, 1275, 1275, 1275, 1276, 1276, 1276, 1276, 1276, 1277, 1278, 1279, 1279, 1280, 1280, 1281, 1282, 1282, 1283, 1283, 1284, 1284, 1284, 1286, 1286, 1289, 1290, 1290, 1290, 1291, 1292, 1292, 1293, 1293, 1294, 1296, 1296, 1296, 1296, 1297, 1297, 1297, 1298, 1299, 1300, 1300, 1301, 1302, 1303, 1304, 1304, 1305, 1305, 1306, 1306, 1307, 1307, 1307, 1307, 1307, 1308, 1308, 1308, 1308, 1309, 1309, 1310, 1311, 1312, 1312, 1313, 1313, 1313, 1314, 1315, 1316, 1316, 1316, 1317, 1319, 1320, 1320, 1320, 1320, 1321, 1322, 1322, 1323, 1323, 1323, 1324, 1324, 1325, 1327, 1328, 1329, 1329, 1330, 1330, 1330, 1330, 1332, 1332, 1332, 1333, 1333, 1334, 1335, 1335, 1336, 1336, 1336, 1338, 1338, 1338, 1339, 1339, 1340, 1340, 1340, 1341, 1341, 1341, 1342, 1343, 1343, 1345, 1345, 1345, 1346, 1346, 1346, 1346, 1346, 1346, 1347, 1348, 1349, 1349, 1349, 1349, 1351, 1352, 1353, 1353, 1353, 1354, 1354, 1355, 1355, 1356, 1356, 1356, 1356, 1358, 1358, 1359, 1359, 1359, 1359, 1359, 1360, 1360, 1360, 1361, 1361, 1361, 1362, 1362, 1363, 1363, 1363, 1365, 1365, 1366, 1367, 1367, 1370, 1371, 1371, 1372, 1372, 1373, 1373, 1373, 1374, 1375, 1375, 1375, 1377, 1377, 1378, 1378, 1378, 1380, 1380, 1381, 1381, 1381, 1382, 1382, 1382, 1382, 1382, 1382, 1383, 1383, 1383, 1384, 1384, 1384, 1385, 1385, 1385, 1385, 1386, 1386, 1387, 1387, 1388, 1388, 1388, 1389, 1389, 1389, 1392, 1393, 1393, 1394, 1394, 1395, 1395, 1395, 1396, 1397, 1398, 1398, 1398, 1399, 1399, 1399, 1400, 1401, 1402, 1402, 1402, 1403, 1404, 1405, 1406, 1406, 1406, 1406, 1407, 1407, 1407, 1407, 1409, 1409, 1409, 1410, 1410, 1410, 1410, 1410, 1411, 1411, 1412, 1413, 1413, 1413, 1414, 1414, 1415, 1415, 1415, 1416, 1416, 1416, 1417, 1417, 1417, 1417, 1417, 1419, 1420, 1420, 1420, 1421, 1422, 1422, 1422, 1422, 1425, 1426, 1427, 1427, 1428, 1428, 1430, 1431, 1431, 1432, 1432, 1432, 1433, 1433, 1434, 1434, 1434, 1434, 1434, 1435, 1436, 1436, 1436, 1436, 1436, 1437, 1438, 1438, 1438, 1438, 1439, 1439, 1440, 1440, 1440, 1440, 1441, 1441, 1442, 1443, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1445, 1446, 1446, 1446, 1447, 1448, 1449, 1449, 1450, 1450, 1450, 1451, 1451, 1452, 1452, 1452, 1453, 1454, 1455, 1456, 1458, 1459, 1459, 1459, 1459, 1460, 1460, 1461, 1461, 1461, 1462, 1462, 1462, 1462, 1462, 1462, 1463, 1463, 1465, 1465, 1465, 1466, 1467, 1468, 1469, 1470, 1472, 1472, 1473, 1474, 1474, 1474, 1474, 1475, 1476, 1477, 1477, 1477, 1477, 1478, 1478, 1480, 1481, 1481, 1481, 1481, 1481, 1481, 1482, 1482, 1482, 1483, 1484, 1485, 1485, 1486, 1486, 1486, 1488, 1488, 1489, 1489, 1489, 1491, 1491, 1492, 1492, 1493, 1495, 1495, 1495, 1496, 1496, 1497, 1497, 1497, 1497, 1497, 1498, 1498, 1499, 1500, 1500, 1501, 1501, 1501, 1501, 1502, 1503, 1503, 1503, 1503, 1503, 1503, 1504, 1505, 1505, 1505, 1506, 1506, 1506, 1506, 1509, 1509, 1509, 1510, 1510, 1511, 1511, 1511, 1511, 1512, 1513, 1513, 1513, 1514, 1514, 1515, 1516, 1516, 1517, 1517, 1518, 1518, 1519, 1519, 1520, 1521, 1522, 1522, 1524, 1525, 1525, 1525, 1525, 1526, 1526, 1526, 1526, 1526, 1526, 1528, 1528, 1528, 1529, 1532, 1532, 1532, 1534, 1534, 1535, 1536, 1536, 1536, 1537, 1537, 1538, 1538, 1538, 1539, 1539, 1539, 1539, 1540, 1541, 1542, 1542, 1543, 1544, 1544, 1544, 1545, 1545, 1545, 1546, 1547, 1547, 1547, 1547, 1547, 1548, 1550, 1551, 1551, 1551, 1551, 1552, 1552, 1552, 1552, 1553, 1554, 1554, 1554, 1555, 1555, 1555, 1555, 1556, 1556, 1557, 1558, 1559, 1559, 1559, 1560, 1560, 1560, 1560, 1561, 1561, 1562, 1562, 1563, 1564, 1564, 1565, 1565, 1565, 1566, 1567, 1567, 1568, 1568, 1569, 1569, 1570, 1570, 1570, 1571, 1571, 1571, 1571, 1572, 1572, 1572, 1573, 1573, 1573, 1573, 1574, 1574, 1575, 1575, 1575, 1575, 1575, 1576, 1576, 1576, 1576, 1576, 1578, 1578, 1578, 1579, 1579, 1579, 1580, 1581, 1581, 1581, 1581, 1581, 1582, 1582, 1582, 1582, 1583, 1583, 1586, 1586, 1586, 1586, 1586, 1587, 1588, 1589, 1590, 1591, 1591, 1591, 1594, 1595, 1595, 1595, 1596, 1598, 1598, 1599, 1600, 1600, 1601, 1601, 1601, 1602, 1602, 1602, 1603, 1603, 1605, 1605, 1606, 1607, 1608, 1608, 1608, 1609, 1609, 1609, 1609, 1611, 1611, 1612, 1612, 1612, 1612, 1612, 1612, 1614, 1615, 1615, 1615, 1615, 1616, 1618, 1618, 1619, 1620, 1621, 1621, 1621, 1622, 1623, 1623, 1624, 1624, 1624, 1624, 1625, 1625, 1625, 1626, 1626, 1627, 1627, 1627, 1629, 1629, 1630, 1630, 1631, 1631, 1634, 1634, 1634, 1634, 1634, 1634, 1635, 1636, 1639, 1639, 1640, 1641, 1641, 1641, 1642, 1642, 1643, 1645, 1645, 1645, 1646, 1647, 1647, 1647, 1648, 1649, 1649, 1649, 1649, 1649, 1651, 1652, 1653, 1653, 1655, 1655, 1655, 1655, 1655, 1655, 1657, 1657, 1657, 1658, 1658, 1659, 1659, 1659, 1659, 1660, 1660, 1660, 1660, 1662, 1663, 1663, 1664, 1664, 1666, 1666, 1666, 1666, 1668, 1669, 1669, 1669, 1671, 1671, 1672, 1672, 1673, 1673, 1673, 1673, 1674, 1674, 1675, 1675, 1675, 1677, 1677, 1677, 1677, 1678, 1678, 1678, 1679, 1679, 1679, 1679, 1680, 1680, 1680, 1681, 1681, 1681, 1682, 1682, 1682, 1683, 1683, 1683, 1684, 1684, 1684, 1685, 1685, 1686, 1687, 1688, 1688, 1688, 1689, 1689, 1691, 1691, 1691, 1692, 1693, 1693, 1693, 1696, 1697, 1697, 1698, 1699, 1700, 1700, 1701, 1702, 1703, 1703, 1705, 1705, 1705, 1707, 1708, 1708, 1708, 1709, 1711, 1712, 1712, 1712, 1714, 1714, 1714, 1714, 1715, 1716, 1716, 1717, 1718, 1718, 1719, 1719, 1719, 1720, 1720, 1720, 1721, 1721, 1722, 1722, 1722, 1722, 1722, 1723, 1723, 1724, 1724, 1725, 1726, 1726, 1727, 1727, 1728, 1728, 1730, 1731, 1731, 1734, 1735, 1735, 1735, 1736, 1737, 1737, 1738, 1738, 1738, 1739, 1739, 1739, 1739, 1739, 1740, 1740, 1740, 1740, 1740, 1741, 1741, 1741, 1741, 1741, 1742, 1743, 1744, 1744, 1744, 1745, 1746, 1746, 1747, 1748, 1749, 1749, 1749, 1749, 1751, 1751, 1751, 1752, 1752, 1752, 1752, 1753, 1754, 1755, 1755, 1755, 1756, 1756, 1757, 1757, 1757, 1757, 1758, 1759, 1759, 1759, 1760, 1760, 1762, 1764, 1766, 1766, 1767, 1767, 1768, 1769, 1769, 1770, 1770, 1770, 1771, 1772, 1773, 1774, 1775, 1775, 1775, 1776, 1776, 1776, 1777, 1777, 1778, 1778, 1779, 1779, 1780, 1780, 1781, 1782, 1784, 1784, 1784, 1785, 1785, 1785, 1785, 1787, 1788, 1789, 1789, 1789, 1790, 1790, 1790, 1791, 1791, 1791, 1791, 1791, 1792, 1792, 1793, 1793, 1793, 1793, 1794, 1794, 1795, 1795, 1796, 1796, 1797, 1797, 1798, 1798, 1798, 1799, 1799, 1800, 1800, 1800, 1801, 1801, 1802, 1802, 1804, 1804, 1804, 1806, 1806, 1808, 1809, 1810, 1810, 1811, 1811, 1814, 1814, 1814, 1815, 1815, 1816, 1816, 1816, 1816, 1817, 1817, 1818, 1819, 1819, 1819, 1820, 1820, 1820, 1821, 1821, 1822, 1823, 1823, 1824, 1824, 1824, 1825, 1825, 1825, 1826, 1826, 1826, 1827, 1827, 1827, 1828, 1828, 1830, 1831, 1832, 1832, 1832, 1832, 1833, 1833, 1833, 1833, 1835, 1837, 1838, 1839, 1840, 1840, 1840, 1840, 1840, 1840, 1841, 1842, 1842, 1843, 1843, 1844, 1844, 1844, 1844, 1844, 1845, 1846, 1847, 1847, 1847, 1848, 1849, 1849, 1849, 1850, 1850, 1850, 1851, 1851, 1851, 1852, 1852, 1853, 1853, 1853, 1854, 1854, 1855, 1855, 1855, 1855, 1855, 1855, 1856, 1856, 1856, 1856, 1857, 1857, 1857, 1857, 1858, 1859, 1859, 1860, 1860, 1860, 1860, 1861, 1861, 1863, 1863, 1865, 1865, 1866, 1866, 1866, 1866, 1866, 1867, 1867, 1867, 1867, 1867, 1868, 1869, 1869, 1869, 1869, 1869, 1869, 1870, 1870, 1870, 1870, 1871, 1872, 1873, 1874, 1875, 1875, 1876, 1876, 1876, 1876, 1877, 1877, 1878, 1878, 1878, 1879, 1879, 1880, 1880, 1880, 1881, 1881, 1883, 1883, 1885, 1885, 1885, 1885, 1885, 1885, 1886, 1886, 1886, 1887, 1887, 1887, 1887, 1888, 1888, 1890, 1891, 1891, 1891, 1892, 1894, 1894, 1894, 1894, 1896, 1896, 1896, 1896, 1897, 1899, 1899, 1900, 1900, 1901, 1901, 1902, 1903, 1904, 1905, 1905, 1905, 1906, 1906, 1906, 1907, 1907, 1908, 1908, 1909, 1910, 1910, 1911, 1912, 1912, 1912, 1913, 1914, 1914, 1914, 1915, 1915, 1915, 1916, 1916, 1916, 1917, 1918, 1918, 1919, 1919, 1920, 1920, 1920, 1920, 1921, 1921, 1922, 1923, 1925, 1925, 1925, 1925, 1926, 1928, 1929, 1929, 1930, 1930, 1931, 1931, 1931, 1931, 1932, 1932, 1932, 1932, 1932, 1933, 1933, 1933, 1933, 1934, 1934, 1934, 1934, 1934, 1935, 1935, 1935, 1936, 1937, 1938, 1938, 1938, 1938, 1940, 1941, 1941, 1941, 1942, 1942, 1943, 1943, 1944, 1944, 1944, 1944, 1945, 1946, 1946, 1947, 1948, 1948, 1948, 1949, 1949, 1949, 1949, 1949, 1950, 1950, 1950, 1951, 1951, 1951, 1951, 1951, 1952, 1953, 1955, 1955, 1956, 1956, 1956, 1957, 1957, 1957, 1958, 1958, 1960, 1960, 1960, 1960, 1961, 1963, 1965, 1965, 1965, 1967, 1967, 1968, 1968, 1969, 1969, 1969, 1969, 1970, 1970, 1971, 1971, 1971, 1972, 1972, 1973, 1973, 1973, 1973, 1973, 1974, 1974, 1975, 1975, 1976, 1976, 1976, 1976, 1977, 1978, 1978, 1979, 1979, 1979, 1980, 1980, 1981, 1981, 1982, 1982, 1982, 1983, 1983, 1983, 1984, 1984, 1986, 1986, 1987, 1989, 1989, 1989, 1989, 1989, 1990, 1990, 1990, 1991, 1991, 1991, 1991, 1992, 1992, 1994, 1994, 1994, 1995, 1995, 1995, 1995, 1995, 1996, 1996, 1996, 1997, 1997, 1998, 1998, 1998, 1998, 1999, 1999, 2000, 2000, 2002, 2003, 2003, 2005, 2009, 2010, 2010, 2011, 2012, 2013, 2014, 2014, 2015, 2016, 2016, 2016, 2016, 2016, 2017, 2018, 2019, 2020, 2020, 2021, 2021, 2021, 2021, 2024, 2026, 2027, 2027, 2028, 2028, 2029, 2029, 2030, 2031, 2032, 2032, 2033, 2034, 2035, 2035, 2036, 2036, 2036, 2036, 2036, 2037, 2037, 2037, 2037, 2038, 2038, 2039, 2039, 2039, 2040, 2041, 2041, 2042, 2042, 2042, 2042, 2042, 2042, 2042, 2043, 2044, 2044, 2045, 2045, 2045, 2046, 2047, 2047, 2048, 2048, 2049, 2051, 2051, 2052, 2052, 2054, 2054, 2054, 2054, 2055, 2056, 2056, 2057, 2058, 2058, 2059, 2059, 2062, 2063, 2063, 2063, 2063, 2063, 2063, 2064, 2064, 2065, 2065, 2065, 2065, 2066, 2066, 2067, 2067, 2068, 2068, 2068, 2068, 2068, 2069, 2070, 2070, 2071, 2071, 2071, 2072, 2073, 2073, 2073, 2075, 2075, 2075, 2076, 2077, 2077, 2078, 2078, 2079, 2079, 2079, 2079, 2080, 2080, 2080, 2081, 2082, 2082, 2082, 2082, 2083, 2083, 2083, 2084, 2084, 2084, 2085, 2085, 2086, 2086, 2086, 2087, 2087, 2087, 2088, 2088, 2088, 2088, 2088, 2089, 2089, 2089, 2089, 2089, 2089, 2089, 2090, 2091, 2091, 2091, 2091, 2092, 2093, 2093, 2094, 2094, 2095, 2096, 2096, 2097, 2097, 2097, 2097, 2098, 2098, 2098, 2098, 2099, 2100, 2102, 2102, 2102, 2102, 2102, 2104, 2104, 2104, 2105, 2105, 2106, 2106, 2107, 2108, 2109, 2109, 2110, 2110, 2111, 2111, 2112, 2114, 2115, 2115, 2116, 2117, 2117, 2118, 2119, 2119, 2119, 2120, 2121, 2121, 2121, 2122, 2122, 2122, 2123, 2124, 2124, 2125, 2125, 2125, 2125, 2127, 2127, 2127, 2127, 2128, 2128, 2128, 2128, 2128, 2129, 2129, 2130, 2131, 2131, 2131, 2132, 2132, 2132, 2133, 2133, 2133, 2133, 2133, 2133, 2133, 2133, 2134, 2135, 2136, 2137, 2137, 2137, 2138, 2138, 2139, 2140, 2140, 2140, 2140, 2142, 2143, 2144, 2144, 2145, 2145, 2145, 2145, 2146, 2146, 2146, 2147, 2147, 2147, 2147, 2147, 2148, 2148, 2148, 2148, 2149, 2149, 2149, 2150, 2151, 2151, 2153, 2153, 2153, 2153, 2154, 2154, 2154, 2155, 2155, 2156, 2157, 2157, 2157, 2157, 2158, 2158, 2158, 2158, 2158, 2159, 2159, 2160, 2160, 2160, 2160, 2161, 2162, 2162, 2162, 2162, 2162, 2163, 2164, 2164, 2167, 2168, 2169, 2169, 2169, 2170, 2172, 2172, 2172, 2172, 2172, 2173, 2173, 2174, 2174, 2175, 2175, 2176, 2176, 2176, 2176, 2177, 2177, 2179, 2179, 2180, 2180, 2180, 2183, 2183, 2183, 2183, 2184, 2185, 2185, 2185, 2185, 2186, 2186, 2186, 2187, 2187, 2188, 2189, 2189, 2189, 2190, 2190, 2191, 2191, 2191, 2191, 2191, 2192, 2193, 2194, 2194, 2195, 2195, 2195, 2195, 2196, 2196, 2197, 2197, 2197, 2198, 2198, 2198, 2199, 2199, 2199, 2200, 2200, 2201, 2201, 2202, 2202, 2202, 2203, 2203, 2204, 2205, 2205, 2205, 2205, 2205, 2206, 2206, 2206, 2207, 2207, 2207, 2210, 2210, 2212, 2213, 2214, 2214, 2215, 2216, 2216, 2216, 2217, 2217, 2219, 2219, 2219, 2219, 2220, 2220, 2221, 2221, 2222, 2222, 2223, 2223, 2224, 2224, 2225, 2225, 2226, 2226, 2226, 2226, 2227, 2228, 2228, 2228, 2229, 2229, 2229, 2230, 2230, 2231, 2231, 2232, 2232, 2232, 2234, 2234, 2234, 2235, 2235, 2236, 2237, 2237, 2238, 2238, 2239, 2239, 2239, 2240, 2240, 2241, 2241, 2241, 2242, 2244, 2244, 2245, 2245, 2245, 2245, 2246, 2248, 2249, 2250, 2251, 2251, 2251, 2251, 2252, 2252, 2253, 2254, 2254, 2255, 2256, 2256, 2256, 2258, 2258, 2258, 2259, 2259, 2259, 2259, 2260, 2260, 2261, 2261, 2262, 2262, 2262, 2263, 2265, 2265, 2265, 2265, 2266, 2266, 2267, 2268, 2269, 2269, 2270, 2270, 2271, 2271, 2272, 2273, 2273, 2273, 2275, 2275, 2276, 2276, 2277, 2277, 2278, 2278, 2280, 2280, 2281, 2282, 2282, 2282, 2282, 2284, 2284, 2284, 2284, 2285, 2285, 2286, 2287, 2287, 2288, 2288, 2289, 2291, 2292, 2292, 2293, 2294, 2295, 2296, 2296, 2297, 2298, 2298, 2299, 2299, 2299, 2300, 2300, 2301, 2301, 2301, 2302, 2302, 2302, 2302, 2303, 2303, 2303, 2304, 2304, 2306, 2306, 2307, 2307, 2307, 2307, 2309, 2309, 2309, 2310, 2310, 2310, 2310, 2311, 2311, 2311, 2312, 2312, 2312, 2313, 2313, 2316, 2317, 2317, 2317, 2317, 2317, 2317, 2317, 2318, 2318, 2319, 2319, 2319, 2320, 2322, 2323, 2323, 2324, 2324, 2324, 2325, 2326, 2327, 2327, 2328, 2329, 2330, 2331, 2332, 2333, 2333, 2334, 2334, 2336, 2336, 2337, 2337, 2338, 2338, 2339, 2339, 2339, 2340, 2340, 2340, 2341, 2342, 2343, 2344, 2345, 2345, 2345, 2345, 2346, 2346, 2347, 2347, 2347, 2347, 2349, 2349, 2349, 2350, 2350, 2351, 2351, 2351, 2351, 2352, 2352, 2353, 2354, 2355, 2356, 2356, 2358, 2359, 2360, 2361, 2362, 2362, 2362, 2363, 2363, 2363, 2364, 2365, 2365, 2365, 2365, 2366, 2367, 2367, 2367, 2367, 2368, 2370, 2370, 2370, 2372, 2372, 2372, 2372, 2372, 2373, 2373, 2373, 2374, 2374, 2375, 2375, 2375, 2376, 2376, 2377, 2377, 2377, 2377, 2378, 2379, 2379, 2380, 2380, 2380, 2381, 2382, 2382, 2382, 2382, 2384, 2384, 2384, 2385, 2387, 2387, 2387, 2388, 2389, 2389, 2389, 2389, 2389, 2390, 2391, 2391, 2392, 2392, 2392, 2394, 2394, 2395, 2395, 2395, 2396, 2396, 2397, 2397, 2397, 2397, 2398, 2398, 2398, 2399, 2400, 2401, 2402, 2404, 2404, 2405, 2405, 2405, 2407, 2408, 2409, 2409, 2409, 2409, 2410, 2410, 2410, 2410, 2410, 2410, 2410, 2411, 2411, 2412, 2412, 2414, 2414, 2415, 2415, 2416, 2416, 2417, 2417, 2418, 2418, 2420, 2421, 2422, 2424, 2424, 2424, 2425, 2425, 2426, 2426, 2426, 2426, 2427, 2427, 2427, 2427, 2427, 2428, 2430, 2432, 2432, 2432, 2432, 2433, 2433, 2433, 2433, 2433, 2434, 2435, 2435, 2435, 2435, 2436, 2437, 2437, 2437, 2437, 2438, 2438, 2439, 2439, 2439, 2440, 2440, 2441, 2441, 2441, 2442, 2443, 2443, 2444, 2444, 2444, 2444, 2447, 2447, 2448, 2448, 2448, 2449, 2449, 2449, 2450, 2451, 2451, 2451, 2453, 2453, 2454, 2454, 2454, 2454, 2455, 2456, 2456, 2457, 2457, 2457, 2458, 2458, 2458, 2459, 2459, 2459, 2459, 2460, 2460, 2461, 2461, 2462, 2463, 2463, 2463, 2463, 2464, 2464, 2464, 2464, 2464, 2465, 2465, 2465, 2466, 2467, 2467, 2467, 2467, 2469, 2470, 2471, 2471, 2472, 2472, 2473, 2473, 2473, 2474, 2474, 2474, 2474, 2475, 2475, 2476, 2476, 2477, 2478, 2479, 2482, 2482, 2483, 2483, 2485, 2485, 2485, 2485, 2486, 2487, 2488, 2489, 2489, 2490, 2490, 2491, 2491, 2491, 2493, 2494, 2494, 2495, 2495, 2495, 2495, 2495, 2495, 2496, 2496, 2496, 2496, 2497, 2497, 2497, 2498, 2498, 2499, 2501, 2502, 2503, 2504, 2504, 2505, 2506, 2506, 2507, 2508, 2508, 2508, 2509, 2509, 2513, 2513, 2513, 2513, 2514, 2514, 2515, 2515, 2516, 2516, 2516, 2518, 2518, 2519, 2519, 2519, 2519, 2520, 2520, 2520, 2520, 2521, 2521, 2521, 2522, 2523, 2523, 2523, 2524, 2524, 2524, 2524, 2525, 2525, 2527, 2527, 2527, 2527, 2527, 2528, 2528, 2529, 2531, 2531, 2532, 2532, 2532, 2533, 2534, 2534, 2535, 2535, 2535, 2536, 2537, 2537, 2537, 2538, 2538, 2539, 2539, 2539, 2539, 2539, 2541, 2541, 2541, 2542, 2542, 2543, 2544, 2544, 2544, 2544, 2545, 2545, 2545, 2546, 2546, 2546, 2546, 2547, 2547, 2547, 2548, 2548, 2548, 2550, 2550, 2550, 2550, 2550, 2551, 2552, 2552, 2553, 2554, 2554, 2554, 2555, 2555, 2556, 2556, 2557, 2557, 2557, 2558, 2560, 2561, 2561, 2561, 2561, 2562, 2563, 2563, 2564, 2564, 2564, 2566, 2566, 2566, 2566, 2566, 2566, 2567, 2567, 2567, 2568, 2569, 2569, 2569, 2571, 2572, 2573, 2573, 2574, 2574, 2576, 2576, 2577, 2577, 2578, 2580, 2580, 2581, 2581, 2581, 2581, 2584, 2584, 2585, 2586, 2587, 2587, 2588, 2588, 2588, 2589, 2589, 2590, 2590, 2591, 2591, 2591, 2592, 2592, 2592, 2593, 2593, 2593, 2594, 2594, 2594, 2596, 2596, 2597, 2598, 2599, 2599, 2599, 2600, 2601, 2601, 2602, 2603, 2603, 2604, 2604, 2604, 2605, 2607, 2608, 2608, 2609, 2609, 2609, 2609, 2611, 2611, 2612, 2612, 2613, 2613, 2613, 2613, 2613, 2614, 2614, 2615, 2615, 2615, 2615, 2615, 2616, 2616, 2617, 2617, 2617, 2618, 2619, 2619, 2620, 2621, 2622, 2622, 2622, 2623, 2624, 2625, 2627, 2628, 2628, 2628, 2628, 2629, 2630, 2630, 2630, 2630, 2631, 2632, 2632, 2632, 2632, 2633, 2633, 2633, 2633, 2633, 2634, 2634, 2635, 2636, 2636, 2636, 2636, 2637, 2637, 2637, 2637, 2637, 2638, 2638, 2638, 2638, 2640, 2640, 2644, 2646, 2646, 2647, 2648, 2649, 2650, 2650, 2650, 2651, 2651, 2651, 2651, 2652, 2652, 2653, 2654, 2654, 2654, 2654, 2655, 2655, 2656, 2656, 2657, 2657, 2657, 2659, 2659, 2660, 2660, 2660, 2660, 2661, 2661, 2662, 2662, 2663, 2663, 2663, 2664, 2665, 2665, 2665, 2666, 2667, 2668, 2670, 2670, 2670, 2670, 2672, 2672, 2673, 2673, 2674, 2674, 2675, 2676, 2676, 2676, 2676, 2677, 2677, 2677, 2677, 2677, 2677, 2679, 2680, 2681, 2683, 2683, 2684, 2684, 2684, 2684, 2685, 2686, 2687, 2688, 2688, 2688, 2689, 2689, 2689, 2689, 2690, 2690, 2690, 2690, 2691, 2691, 2692, 2692, 2692, 2692, 2693, 2693, 2694, 2694, 2694, 2694, 2694, 2695, 2695, 2695, 2696, 2697, 2698, 2699, 2700, 2700, 2701, 2702, 2702, 2704, 2704, 2704, 2705, 2705, 2705, 2705, 2706, 2707, 2707, 2708, 2708, 2710, 2710, 2710, 2711, 2711, 2711, 2711, 2711, 2711, 2712, 2713, 2713, 2714, 2715, 2716, 2717, 2717, 2718, 2718, 2718, 2718, 2719, 2719, 2720, 2722, 2723, 2723, 2724, 2724, 2725, 2726, 2726, 2727, 2728, 2729, 2729, 2729, 2729, 2730, 2731, 2732, 2733, 2734, 2734, 2734, 2735, 2735, 2736, 2736, 2736, 2737, 2738, 2739, 2739, 2740, 2740, 2741, 2741, 2742, 2742, 2743, 2743, 2743, 2744, 2744, 2746, 2747, 2748, 2748, 2748, 2748, 2749, 2749, 2749, 2750, 2750, 2750, 2752, 2752, 2754, 2754, 2754, 2755, 2755, 2756, 2756, 2757, 2757, 2758, 2758, 2759, 2759, 2759, 2759, 2761, 2762, 2762, 2762, 2762, 2762, 2763, 2763, 2763, 2764, 2764, 2764, 2765, 2766, 2766, 2766, 2766, 2767, 2767, 2768, 2769, 2770, 2770, 2770, 2770, 2771, 2771, 2771, 2772, 2772, 2772, 2772, 2774, 2776, 2776, 2776, 2776, 2776, 2777, 2778, 2779, 2779, 2779, 2780, 2780, 2780, 2781, 2781, 2782, 2783, 2783, 2784, 2784, 2784, 2785, 2785, 2786, 2786, 2786, 2787, 2787, 2787, 2787, 2788, 2788, 2789, 2789, 2789, 2789, 2790, 2790, 2790, 2790, 2791, 2791, 2791, 2791, 2792, 2792, 2792, 2792, 2792, 2793, 2793, 2794, 2795, 2795, 2796, 2796, 2797, 2797, 2798, 2800, 2800, 2801, 2801, 2801, 2802, 2802, 2803, 2803, 2804, 2804, 2805, 2805, 2805, 2805, 2805, 2805, 2806, 2806, 2806, 2807, 2808, 2809, 2809, 2809, 2809, 2809, 2809, 2810, 2810, 2811, 2811, 2811, 2812, 2812, 2812, 2813, 2816, 2816, 2816, 2817, 2817, 2818, 2818, 2818, 2818, 2818, 2819, 2819, 2819, 2820, 2820, 2820, 2821, 2821, 2821, 2822, 2823, 2823, 2823, 2824, 2824, 2824, 2825, 2826, 2826, 2826, 2827, 2827, 2827, 2827, 2827, 2827, 2828, 2828, 2830, 2830, 2830, 2831, 2831, 2833, 2833, 2833, 2833, 2835, 2836, 2838, 2838, 2838, 2839, 2839, 2840, 2840, 2841, 2842, 2842, 2843, 2844, 2845, 2845, 2846, 2846, 2848, 2848, 2848, 2849, 2850, 2851, 2852, 2852, 2852, 2853, 2853, 2853, 2854, 2854, 2855, 2855, 2856, 2856, 2857, 2857, 2857, 2857, 2858, 2858, 2859, 2859, 2859, 2860, 2861, 2861, 2861, 2862, 2862, 2863, 2863, 2863, 2864, 2865, 2868, 2868, 2868, 2868, 2868, 2869, 2869, 2870, 2870, 2870, 2871, 2871, 2871, 2872, 2873, 2874, 2875, 2875, 2876, 2876, 2877, 2877, 2878, 2879, 2880, 2880, 2881, 2882, 2884, 2884, 2884, 2885, 2885, 2886, 2887, 2887, 2887, 2887, 2887, 2888, 2888, 2888, 2888, 2889, 2889, 2889, 2890, 2890, 2890, 2891, 2893, 2894, 2895, 2896, 2896, 2897, 2897, 2898, 2898, 2898, 2900, 2900, 2901, 2901, 2902, 2902, 2902, 2902, 2903, 2904, 2904, 2904, 2904, 2905, 2905, 2905, 2906, 2907, 2907, 2908, 2908, 2908, 2908, 2909, 2909, 2910, 2911, 2911, 2911, 2912, 2913, 2914, 2915, 2916, 2916, 2918, 2918, 2919, 2919, 2919, 2920, 2921, 2921, 2922, 2922, 2922, 2923, 2923, 2923, 2924, 2925, 2926, 2926, 2926, 2927, 2927, 2927, 2928, 2929, 2930, 2931, 2931, 2932, 2932, 2932, 2934, 2934, 2934, 2935, 2935, 2935, 2936, 2937, 2938, 2939, 2940, 2940, 2941, 2942, 2942, 2943, 2943, 2943, 2944, 2944, 2944, 2944, 2944, 2945, 2946, 2946, 2947, 2947, 2948, 2949, 2950, 2950, 2951, 2952, 2954, 2954, 2954, 2955, 2955, 2956, 2957, 2958, 2958, 2959, 2959, 2960, 2960, 2960, 2962, 2962, 2964, 2964, 2965, 2965, 2965, 2966, 2966, 2967, 2967, 2968, 2969, 2969, 2969, 2970, 2970, 2971, 2972, 2972, 2972, 2972, 2972, 2974, 2974, 2974, 2976, 2976, 2977, 2978, 2979, 2980, 2980, 2980, 2980, 2981, 2981, 2982, 2982, 2983, 2984, 2984, 2986, 2987, 2987, 2988, 2988, 2988, 2989, 2989, 2989, 2990, 2990, 2991, 2991, 2991, 2992, 2993, 2994, 2995, 2995, 2995, 2995, 2996, 2996, 2997, 2997, 2997, 2998, 2999, 2999, 2999, 2999, 2999, 2999, 3000, 3000, 3000, 3000, 3001, 3001, 3002, 3003, 3003, 3004, 3005, 3005, 3005, 3007, 3007, 3008, 3008, 3009, 3009, 3009, 3010, 3010, 3010, 3010, 3011, 3011, 3013, 3013, 3014, 3015, 3015, 3016, 3016, 3016, 3016, 3017, 3018, 3018, 3018, 3018, 3019, 3020, 3020, 3021, 3021, 3021, 3022, 3024, 3026, 3026, 3026, 3026, 3027, 3028, 3028, 3028, 3028, 3030, 3030, 3031, 3035, 3036, 3036, 3036, 3037, 3037, 3038, 3038, 3039, 3039, 3041, 3041, 3041, 3042, 3043, 3043, 3044, 3044, 3045, 3045, 3045, 3045, 3045, 3046, 3047, 3048, 3048, 3048, 3049, 3049, 3049, 3050, 3050, 3051, 3051, 3051, 3051, 3052, 3052, 3052, 3053, 3054, 3054, 3054, 3054, 3055, 3055, 3055, 3055, 3057, 3057, 3057, 3058, 3059, 3060, 3060, 3060, 3060, 3061, 3062, 3063, 3063, 3063, 3064, 3065, 3065, 3066, 3068, 3068, 3068, 3068, 3068, 3068, 3069, 3071, 3072, 3072, 3072, 3073, 3074, 3074, 3074, 3075, 3077, 3077, 3078, 3078, 3079, 3079, 3079, 3079, 3081, 3081, 3081, 3082, 3082, 3082, 3082, 3083, 3083, 3084, 3084, 3084, 3086, 3086, 3087, 3087, 3087, 3087, 3088, 3089, 3089, 3090, 3091, 3092, 3092, 3093, 3093, 3094, 3094, 3094, 3095, 3095, 3096, 3097, 3097, 3098, 3099, 3100, 3101, 3101, 3102, 3102, 3104, 3104, 3105, 3107, 3108, 3108, 3109, 3109, 3109, 3110, 3110, 3111, 3111, 3111, 3112, 3112, 3112, 3112, 3112, 3113, 3113, 3113, 3113, 3113, 3114, 3115, 3116, 3116, 3116, 3117, 3117, 3117, 3118, 3118, 3119, 3119, 3119, 3120, 3120, 3120, 3121, 3121, 3121, 3122, 3122, 3122, 3122, 3123, 3123, 3124, 3126, 3127, 3127, 3127, 3127, 3128, 3128, 3128, 3128, 3129, 3130, 3130, 3131, 3131, 3131, 3131, 3131, 3132, 3132, 3132, 3133, 3133, 3134, 3135, 3136, 3136, 3136, 3137, 3138, 3140, 3140, 3141, 3142, 3142, 3143, 3143, 3143, 3143, 3143, 3144, 3145, 3146, 3146, 3146, 3147, 3148, 3149, 3149, 3150, 3150, 3150, 3150, 3150, 3150, 3151, 3151, 3152, 3152, 3154, 3154, 3155, 3155, 3155, 3156, 3156, 3157, 3158, 3158, 3159, 3160, 3160, 3161, 3161, 3161, 3162, 3162, 3163, 3164, 3164, 3165, 3165, 3166, 3166, 3166, 3167, 3167, 3168, 3168, 3168, 3169, 3169, 3170, 3170, 3170, 3170, 3171, 3172, 3172, 3173, 3175, 3175, 3177, 3177, 3178, 3178, 3179, 3180, 3180, 3180, 3181, 3182, 3182, 3182, 3183, 3184, 3184, 3184, 3185, 3186, 3187, 3187, 3188, 3189, 3189, 3189, 3190, 3190, 3191, 3192, 3192, 3193, 3193, 3193, 3194, 3194, 3194, 3194, 3195, 3195, 3196, 3196, 3196, 3196, 3198, 3198, 3198, 3198, 3198, 3199, 3199, 3199, 3200, 3200, 3202, 3202, 3203, 3203, 3203, 3205, 3206, 3207, 3207, 3207, 3208, 3208, 3208, 3208, 3209, 3209, 3210, 3210, 3211, 3211, 3211, 3212, 3212, 3213, 3213, 3213, 3214, 3214, 3215, 3216, 3216, 3217, 3218, 3218, 3219, 3219, 3220, 3222, 3223, 3223, 3223, 3224, 3224, 3224, 3224, 3225, 3225, 3225, 3225, 3226, 3227, 3228, 3228, 3228, 3228, 3228, 3228, 3229, 3230, 3230, 3231, 3233, 3234, 3234, 3234, 3235, 3235, 3236, 3236, 3237, 3237, 3239, 3239, 3239, 3240, 3240, 3241, 3241, 3241, 3241, 3243, 3243, 3243, 3243, 3243, 3243, 3243, 3243, 3245, 3245, 3246, 3246, 3246, 3247, 3247, 3247, 3247, 3248, 3248, 3249, 3250, 3250, 3251, 3251, 3252, 3252, 3253, 3253, 3254, 3254, 3255, 3256, 3257, 3257, 3257, 3259, 3259, 3260, 3260, 3261, 3262, 3263, 3263, 3263, 3264, 3266, 3266, 3266, 3267, 3267, 3267, 3267, 3267, 3268, 3268, 3268, 3269, 3269, 3269, 3270, 3270, 3270, 3270, 3271, 3272, 3272, 3272, 3272, 3273, 3273, 3273, 3274, 3274, 3275, 3275, 3276, 3276, 3276, 3278, 3278, 3279, 3280, 3280, 3280, 3280, 3281, 3282, 3284, 3284, 3284, 3285, 3285, 3285, 3285, 3286, 3286, 3287, 3288, 3288, 3289, 3289, 3289, 3289, 3290, 3292, 3292, 3292, 3293, 3293, 3293, 3293, 3294, 3294, 3297, 3297, 3298, 3299, 3301, 3301, 3302, 3302, 3302, 3302, 3303, 3304, 3305, 3305, 3305, 3305, 3306, 3306, 3306, 3306, 3306, 3306, 3308, 3308, 3308, 3308, 3309, 3309, 3310, 3310, 3311, 3311, 3311, 3311, 3312, 3313, 3313, 3313, 3314, 3314, 3315, 3315, 3316, 3318, 3320, 3320, 3321, 3321, 3321, 3322, 3322, 3323, 3323, 3323, 3324, 3324, 3327, 3329, 3329, 3330, 3330, 3330, 3331, 3331, 3331, 3331, 3331, 3333, 3334, 3335, 3336, 3336, 3336, 3337, 3337, 3337, 3338, 3338, 3339, 3339, 3339, 3339, 3340, 3340, 3340, 3340, 3341, 3341, 3341, 3344, 3345, 3345, 3346, 3347, 3347, 3347, 3347, 3347, 3348, 3348, 3348, 3348, 3349, 3349, 3349, 3350, 3350, 3351, 3351, 3352, 3352, 3352, 3352, 3353, 3354, 3357, 3358, 3358, 3358, 3358, 3359, 3359, 3359, 3360, 3360, 3361, 3361, 3361, 3362, 3363, 3363, 3363, 3365, 3365, 3367, 3367, 3367, 3368, 3369, 3369, 3369, 3370, 3370, 3371, 3372, 3372, 3373, 3374, 3374, 3377, 3377, 3377, 3377, 3378, 3379, 3379, 3380, 3380, 3381, 3381, 3382, 3383, 3383, 3383, 3384, 3384, 3385, 3385, 3385, 3386, 3386, 3387, 3387, 3388, 3388, 3388, 3389, 3389, 3389, 3390, 3392, 3393, 3394, 3394, 3394, 3395, 3396, 3397, 3397, 3397, 3398, 3398, 3398, 3398, 3399, 3399, 3400, 3400, 3400, 3401, 3401, 3402, 3402, 3402, 3402, 3403, 3403, 3405, 3405, 3405, 3405, 3405, 3406, 3407, 3407, 3408, 3410, 3410, 3411, 3411, 3411, 3412, 3412, 3412, 3413, 3414, 3414, 3414, 3414, 3415, 3415, 3417, 3419, 3419, 3420, 3420, 3420, 3421, 3421, 3421, 3422, 3422, 3423, 3423, 3423, 3423, 3424, 3425, 3425, 3425, 3426, 3427, 3427, 3428, 3428, 3429, 3429, 3430, 3431, 3431, 3431, 3432, 3432, 3432, 3434, 3435, 3435, 3435, 3436, 3437, 3438, 3438, 3438, 3439, 3439, 3439, 3440, 3440, 3441, 3441, 3442, 3443, 3443, 3443, 3444, 3444, 3444, 3445, 3445, 3445, 3446, 3446, 3447, 3447, 3447, 3448, 3448, 3449, 3449, 3449, 3450, 3450, 3450, 3451, 3452, 3452, 3453, 3453, 3454, 3454, 3454, 3454, 3455, 3456, 3456, 3456, 3457, 3457, 3460, 3461, 3461, 3461, 3462, 3462, 3462, 3463, 3463, 3463, 3463, 3463, 3464, 3464, 3464, 3466, 3467, 3467, 3467, 3468, 3468, 3469, 3470, 3471, 3472, 3473, 3473, 3473, 3474, 3475, 3475, 3475, 3476, 3476, 3476, 3478, 3479, 3479, 3480, 3481, 3481, 3481, 3482, 3483, 3484, 3484, 3485, 3485, 3486, 3486, 3486, 3486, 3487, 3487, 3487, 3487, 3489, 3489, 3490, 3490, 3490, 3491, 3491, 3491, 3492, 3492, 3493, 3493, 3494, 3494, 3494, 3495, 3495, 3495, 3495, 3495, 3495, 3495, 3496, 3497, 3497, 3498, 3498, 3499, 3499, 3499, 3499, 3500, 3501, 3501, 3503, 3503, 3503, 3504, 3504, 3504, 3504, 3504, 3505, 3505, 3505, 3506, 3507, 3508, 3508, 3508, 3511, 3511, 3511, 3511, 3511, 3511, 3511, 3512, 3512, 3512, 3512, 3513, 3514, 3514, 3514, 3515, 3515, 3516, 3517, 3517, 3518, 3518, 3518, 3518, 3519, 3520, 3520, 3520, 3520, 3521, 3521, 3521, 3521, 3521, 3524, 3525, 3527, 3528, 3528, 3530, 3530, 3531, 3532, 3532, 3533, 3534, 3534, 3534, 3535, 3535, 3535, 3535, 3536, 3537, 3537, 3538, 3539, 3539, 3539, 3539, 3540, 3540, 3540, 3541, 3541, 3541, 3543, 3544, 3544, 3547, 3548, 3548, 3549, 3549, 3550, 3551, 3551, 3551, 3551, 3552, 3553, 3553, 3553, 3553, 3554, 3554, 3554, 3554, 3555, 3555, 3556, 3556, 3557, 3558, 3558, 3558, 3558, 3559, 3559, 3560, 3560, 3560, 3561, 3561, 3562, 3562, 3563, 3565, 3566, 3566, 3566, 3566, 3567, 3567, 3567, 3567, 3568, 3569, 3569, 3570, 3570, 3571, 3572, 3572, 3573, 3573, 3573, 3574, 3574, 3575, 3575, 3576, 3577, 3578, 3579, 3581, 3581, 3582, 3582, 3582, 3583, 3583, 3583, 3583, 3583, 3584, 3584, 3585, 3586, 3586, 3587, 3587, 3588, 3588, 3588, 3589, 3591, 3591, 3593, 3594, 3594, 3595, 3596, 3596, 3597, 3599, 3599, 3599, 3600, 3600, 3600, 3601, 3601, 3602, 3602, 3602, 3603, 3604, 3605, 3607, 3608, 3609, 3609, 3609, 3609, 3610, 3610, 3611, 3612, 3612, 3613, 3614, 3614, 3615, 3615, 3615, 3615, 3615, 3616, 3617, 3617, 3617, 3617, 3619, 3619, 3619, 3621, 3621, 3621, 3622, 3623, 3624, 3624, 3625, 3627, 3628, 3628, 3628, 3628, 3629, 3630, 3630, 3630, 3631, 3631, 3631, 3631, 3632, 3633, 3633, 3633, 3634, 3634, 3634, 3636, 3637, 3638, 3638, 3638, 3639, 3639, 3639, 3639, 3641, 3642, 3642, 3642, 3643, 3643, 3643, 3643, 3644, 3644, 3645, 3646, 3646, 3647, 3647, 3647, 3647, 3648, 3648, 3649, 3649, 3650, 3650, 3651, 3652, 3652, 3653, 3653, 3654, 3655, 3656, 3656, 3657, 3658, 3659, 3660, 3661, 3662, 3663, 3664, 3664, 3664, 3665, 3666, 3667, 3667, 3668, 3669, 3669, 3669, 3670, 3670, 3671, 3671, 3672, 3672, 3673, 3677, 3678, 3678, 3678, 3678, 3679, 3679, 3679, 3681, 3681, 3681, 3682, 3682, 3683, 3683, 3684, 3684, 3685, 3685, 3685, 3687, 3687, 3687, 3688, 3688, 3688, 3688, 3688, 3689, 3690, 3690, 3690, 3693, 3693, 3694, 3694, 3695, 3695, 3696, 3698, 3698, 3699, 3699, 3700, 3702, 3703, 3704, 3705, 3705, 3705, 3705, 3706, 3706, 3706, 3706, 3706, 3707, 3707, 3707, 3708, 3708, 3710, 3710, 3710, 3711, 3712, 3713, 3713, 3713, 3713, 3714, 3714, 3714, 3715, 3715, 3716, 3716, 3717, 3717, 3717, 3717, 3718, 3718, 3718, 3718, 3719, 3719, 3719, 3720, 3720, 3721, 3721, 3722, 3722, 3722, 3722, 3722, 3723, 3724, 3725, 3726, 3727, 3727, 3728, 3728, 3729, 3729, 3731, 3731, 3731, 3731, 3731, 3732, 3734, 3734, 3734, 3734, 3735, 3735, 3736, 3736, 3736, 3736, 3737, 3738, 3739, 3739, 3739, 3740, 3740, 3740, 3741, 3741, 3741, 3742, 3742, 3743, 3744, 3744, 3744, 3745, 3745, 3745, 3746, 3746, 3747, 3747, 3747, 3748, 3748, 3749, 3751, 3751, 3751, 3751, 3751, 3752, 3753, 3753, 3753, 3753, 3754, 3755, 3756, 3757, 3757, 3758, 3758, 3758, 3759, 3759, 3759, 3762, 3763, 3763, 3763, 3763, 3764, 3765, 3765, 3766, 3766, 3766, 3766, 3767, 3767, 3768, 3768, 3769, 3769, 3770, 3770, 3770, 3770, 3771, 3771, 3772, 3772, 3773, 3773, 3774, 3775, 3775, 3776, 3776, 3776, 3776, 3776, 3777, 3777, 3779, 3779, 3779, 3779, 3780, 3780, 3781, 3781, 3782, 3783, 3783, 3784, 3785, 3785, 3787, 3787, 3787, 3788, 3788, 3788, 3788, 3789, 3789, 3790, 3790, 3791, 3792, 3792, 3792, 3793, 3793, 3794, 3794, 3795, 3795, 3796, 3797, 3797, 3797, 3797, 3798, 3798, 3799, 3800, 3800, 3800, 3800, 3801, 3801, 3801, 3802, 3802, 3802, 3802, 3803, 3804, 3805, 3806, 3806, 3807, 3808, 3808, 3809, 3809, 3811, 3813, 3814, 3814, 3816, 3816, 3816, 3817, 3818, 3819, 3820, 3820, 3821, 3821, 3821, 3822, 3822, 3822, 3825, 3825, 3825, 3825, 3826, 3828, 3828, 3828, 3829, 3830, 3830, 3830, 3830, 3831, 3831, 3831, 3832, 3832, 3833, 3833, 3833, 3833, 3834, 3835, 3835, 3836, 3837, 3837, 3837, 3837, 3838, 3838, 3838, 3839, 3841, 3841, 3842, 3842, 3842, 3842, 3843, 3843, 3843, 3843, 3843, 3844, 3844, 3844, 3845, 3846, 3847, 3847, 3848, 3849, 3850, 3850, 3851, 3851, 3851, 3854, 3854, 3854, 3855, 3855, 3856, 3857, 3858, 3858, 3858, 3859, 3859, 3859, 3859, 3860, 3860, 3861, 3861, 3861, 3861, 3862, 3862, 3862, 3862, 3863, 3863, 3865, 3865, 3865, 3865, 3866, 3866, 3867, 3867, 3867, 3867, 3868, 3868, 3869, 3869, 3870, 3871, 3871, 3871, 3872, 3873, 3873, 3873, 3874, 3874, 3874, 3875, 3875, 3876, 3877, 3878, 3878, 3878, 3879, 3879, 3879, 3880, 3880, 3881, 3881, 3881, 3881, 3883, 3883, 3884, 3884, 3884, 3884, 3884, 3886, 3887, 3887, 3887, 3887, 3888, 3888, 3889, 3890, 3890, 3891, 3891, 3891, 3891, 3892, 3892, 3892, 3892, 3893, 3893, 3893, 3893, 3894, 3894, 3894, 3895, 3895, 3895, 3895, 3897, 3897, 3897, 3899, 3899, 3900, 3901, 3902, 3904, 3904, 3905, 3905, 3906, 3906, 3906, 3907, 3907, 3907, 3908, 3909, 3910, 3911, 3911, 3912, 3913, 3914, 3915, 3915, 3915, 3915, 3916, 3917, 3917, 3917, 3919, 3919, 3919, 3920, 3921, 3921, 3922, 3922, 3923, 3923, 3923, 3924, 3924, 3925, 3925, 3926, 3926, 3926, 3928, 3928, 3928, 3929, 3929, 3930, 3930, 3930, 3931, 3931, 3931, 3932, 3932, 3932, 3932, 3932, 3933, 3933, 3933, 3934, 3934, 3934, 3935, 3935, 3935, 3935, 3936, 3937, 3937, 3937, 3938, 3938, 3939, 3942, 3942, 3943, 3943, 3943, 3945, 3945, 3945, 3946, 3947, 3947, 3948, 3948, 3948, 3948, 3948, 3951, 3952, 3952, 3952, 3952, 3953, 3954, 3954, 3956, 3957, 3957, 3957, 3957, 3958, 3958, 3958, 3959, 3960, 3961, 3961, 3961, 3962, 3963, 3964, 3964, 3964, 3965, 3965, 3965, 3965, 3967, 3968, 3969, 3969, 3970, 3970, 3971, 3972, 3972, 3973, 3973, 3974, 3974, 3975, 3975, 3976, 3976, 3977, 3977, 3977, 3977, 3978, 3978, 3979, 3979, 3979, 3979, 3979, 3980, 3980, 3981, 3981, 3981, 3981, 3982, 3982, 3982, 3982, 3983, 3984, 3984, 3984, 3984, 3984, 3984, 3986, 3986, 3986, 3987, 3988, 3988, 3988, 3988, 3989, 3989, 3989, 3990, 3990, 3991, 3992, 3993, 3994, 3995, 3996, 3996, 3998, 3998, 3998, 3999, 4000, 4000, 4000, 4001, 4001, 4001, 4001, 4002, 4002, 4002, 4002, 4003, 4004, 4004, 4004, 4005, 4006, 4006, 4007, 4007, 4008, 4008, 4008, 4009, 4010, 4010, 4010, 4010, 4011, 4011, 4013, 4014, 4015, 4016, 4017, 4018, 4018, 4019, 4020, 4020, 4020, 4021, 4021, 4022, 4022, 4022, 4023, 4023, 4023, 4024, 4024, 4025, 4025, 4025, 4026, 4026, 4027, 4027, 4028, 4028, 4028, 4029, 4030, 4031, 4031, 4031, 4031, 4032, 4032, 4032, 4032, 4033, 4033, 4033, 4033, 4035, 4035, 4035, 4035, 4035, 4037, 4038, 4038, 4038, 4038, 4038, 4039, 4039, 4039, 4040, 4040, 4040, 4041, 4041, 4041, 4041, 4041, 4041, 4041, 4042, 4042, 4043, 4043, 4043, 4043, 4044, 4044, 4045, 4045, 4045, 4047, 4047, 4048, 4048, 4049, 4050, 4050, 4050, 4051, 4052, 4052, 4053, 4053, 4054, 4055, 4055, 4056, 4056, 4057, 4058, 4058, 4059, 4059, 4060, 4060, 4060, 4061, 4061, 4061, 4062, 4063, 4063, 4064, 4065, 4065, 4065, 4066, 4067, 4068, 4068, 4068, 4069, 4069, 4069, 4070, 4070, 4070, 4071, 4071, 4072, 4072, 4072, 4072, 4072, 4073, 4073, 4074, 4074, 4075, 4076, 4076, 4076, 4076, 4077, 4077, 4078, 4078, 4078, 4080, 4081, 4081, 4082, 4082, 4082, 4083, 4083, 4085, 4085, 4085, 4085, 4085, 4086, 4086, 4086, 4087, 4087, 4087, 4088, 4088, 4089, 4089, 4090, 4090, 4091, 4091, 4092, 4093, 4093, 4093, 4094, 4095, 4096, 4096, 4096, 4097, 4097, 4098, 4099, 4099, 4099, 4099, 4100, 4100, 4101, 4101, 4102, 4102, 4103, 4104, 4104, 4104, 4104, 4104, 4105, 4106, 4106, 4106, 4106, 4107, 4108, 4108, 4109, 4109, 4109, 4109, 4110, 4111, 4112, 4112, 4112, 4112, 4112, 4113, 4113, 4114, 4114, 4114, 4115, 4115, 4116, 4116, 4117, 4117, 4117, 4118, 4118, 4118, 4119, 4119, 4121, 4121, 4122, 4122, 4122, 4123, 4124, 4125, 4125, 4126, 4127, 4129, 4129, 4130, 4131, 4131, 4132, 4132, 4132, 4134, 4134, 4134, 4135, 4135, 4135, 4135, 4135, 4135, 4135, 4135, 4136, 4136, 4136, 4136, 4136, 4136, 4137, 4137, 4137, 4139, 4140, 4140, 4140, 4141, 4141, 4142, 4142, 4142, 4143, 4144, 4144, 4144, 4144, 4145, 4145, 4145, 4145, 4146, 4147, 4147, 4147, 4148, 4148, 4148, 4149, 4149, 4149, 4149, 4149, 4150, 4150, 4151, 4153, 4153, 4154, 4155, 4155, 4156, 4156, 4156, 4157, 4158, 4158, 4159, 4159, 4160, 4160, 4161, 4161, 4161, 4161, 4163, 4163, 4163, 4164, 4164, 4164, 4164, 4165, 4165, 4165, 4166, 4166, 4166, 4167, 4168, 4169, 4170, 4170, 4170, 4171, 4171, 4172, 4173, 4173, 4173, 4173, 4174, 4175, 4175, 4176, 4176, 4176, 4177, 4177, 4177, 4177, 4178, 4178, 4179, 4179, 4179, 4179, 4179, 4179, 4179, 4180, 4180, 4180, 4181, 4181, 4181, 4181, 4182, 4182, 4183, 4184, 4185, 4186, 4187, 4187, 4187, 4188, 4188, 4188, 4189, 4189, 4189, 4189, 4190, 4190, 4190, 4190, 4190, 4191, 4192, 4192, 4192, 4192, 4194, 4195, 4196, 4196, 4196, 4196, 4197, 4197, 4198, 4198, 4198, 4198, 4200, 4200, 4201, 4202, 4202, 4203, 4203, 4204, 4205, 4205, 4207, 4210, 4210, 4210, 4210, 4211, 4211, 4213, 4214, 4214, 4215, 4215, 4215, 4216, 4216, 4216, 4217, 4217, 4218, 4218, 4218, 4218, 4218, 4219, 4220, 4220, 4220, 4221, 4222, 4223, 4223, 4223, 4225, 4225, 4226, 4226, 4227, 4227, 4228, 4228, 4228, 4228, 4229, 4230, 4230, 4232, 4233, 4233, 4233, 4233, 4234, 4235, 4235, 4235, 4235, 4236, 4236, 4236, 4237, 4238, 4238, 4238, 4238, 4238, 4239, 4239, 4239, 4239, 4239, 4240, 4240, 4241, 4243, 4243, 4243, 4243, 4243, 4243, 4244, 4244, 4244, 4244, 4244, 4245, 4245, 4245, 4247, 4247, 4247, 4248, 4248, 4249, 4249, 4249, 4250, 4250, 4250, 4251, 4251, 4252, 4252, 4253, 4253, 4253, 4253, 4253, 4254, 4255, 4255, 4255, 4256, 4256, 4257, 4257, 4257, 4258, 4258, 4258, 4258, 4259, 4259, 4260, 4260, 4261, 4261, 4261, 4261, 4261, 4261, 4262, 4262, 4262, 4263, 4264, 4265, 4265, 4265, 4266, 4267, 4268, 4269, 4269, 4269, 4270, 4270, 4271, 4271, 4271, 4272, 4272, 4273, 4273, 4273, 4273, 4274, 4274, 4274, 4275, 4275, 4277, 4279, 4279, 4280, 4280, 4280, 4281, 4281, 4282, 4282, 4282, 4282, 4282, 4283, 4283, 4283, 4283, 4284, 4285, 4285, 4285, 4285, 4285, 4286, 4286, 4287, 4287, 4287, 4287, 4288, 4289, 4290, 4290, 4291, 4291, 4291, 4292, 4293, 4293, 4293, 4293, 4294, 4294, 4295, 4296, 4297, 4297, 4297, 4297, 4297, 4297, 4298, 4299, 4299, 4299, 4299, 4300, 4300, 4301, 4301, 4302, 4302, 4302, 4302, 4303, 4304, 4305, 4306, 4306, 4306, 4307, 4307, 4308, 4308, 4309, 4309, 4309, 4309, 4310, 4311, 4311, 4312, 4312, 4312, 4312, 4312, 4313, 4314, 4315, 4315, 4316, 4316, 4317, 4317, 4317, 4318, 4318, 4319, 4319, 4320, 4320, 4321, 4322, 4322, 4323, 4325, 4327, 4327, 4327, 4327, 4327, 4328, 4328, 4330, 4330, 4330, 4331, 4331, 4332, 4332, 4334, 4335, 4335, 4336, 4336, 4337, 4337, 4338, 4338, 4338, 4338, 4339, 4339, 4339, 4340, 4340, 4340, 4340, 4340, 4340, 4341, 4341, 4341, 4343, 4343, 4344, 4344, 4344, 4345, 4346, 4347, 4347, 4348, 4348, 4348, 4352, 4353, 4355, 4356, 4356, 4357, 4357, 4358, 4358, 4358, 4358, 4359, 4360, 4360, 4360, 4361, 4361, 4361, 4361, 4362, 4362, 4363, 4363, 4364, 4365, 4365, 4365, 4368, 4370, 4370, 4370, 4371, 4371, 4371, 4372, 4372, 4372, 4372, 4374, 4374, 4374, 4375, 4375, 4376, 4376, 4377, 4377, 4380, 4380, 4381, 4381, 4381, 4382, 4382, 4384, 4386, 4386, 4387, 4387, 4389, 4389, 4389, 4389, 4389, 4389, 4390, 4391, 4391, 4392, 4393, 4393, 4394, 4394, 4394, 4394, 4395, 4395, 4396, 4398, 4398, 4398, 4399, 4400, 4400, 4400, 4401, 4401, 4402, 4403, 4403, 4403, 4404, 4405, 4405, 4405, 4407, 4408, 4408, 4408, 4409, 4410, 4410, 4410, 4410, 4411, 4411, 4412, 4412, 4413, 4413, 4414, 4414, 4414, 4414, 4414, 4415, 4415, 4419, 4419, 4419, 4419, 4420, 4420, 4420, 4421, 4421, 4421, 4421, 4423, 4424, 4425, 4426, 4427, 4427, 4428, 4429, 4429, 4430, 4430, 4430, 4431, 4431, 4431, 4431, 4432, 4432, 4432, 4432, 4432, 4432, 4433, 4433, 4434, 4434, 4435, 4435, 4435, 4435, 4436, 4436, 4436, 4436, 4437, 4437, 4438, 4438, 4438, 4438, 4438, 4439, 4439, 4440, 4440, 4441, 4441, 4442, 4443, 4444, 4444, 4446, 4446, 4447, 4447, 4447, 4448, 4448, 4448, 4449, 4450, 4451, 4452, 4453, 4453, 4454, 4454, 4455, 4455, 4455, 4456, 4456, 4456, 4457, 4457, 4457, 4457, 4457, 4457, 4457, 4457, 4459, 4460, 4460, 4461, 4462, 4462, 4462, 4462, 4465, 4465, 4466, 4467, 4468, 4468, 4469, 4470, 4470, 4471, 4471, 4471, 4471, 4471, 4471, 4471, 4471, 4472, 4472, 4472, 4473, 4473, 4474, 4474, 4474, 4475, 4475, 4476, 4477, 4479, 4479, 4479, 4479, 4481, 4481, 4481, 4481, 4482, 4482, 4482, 4483, 4483, 4484, 4484, 4486, 4487, 4487, 4487, 4487, 4487, 4488, 4488, 4488, 4489, 4491, 4491, 4492, 4492, 4493, 4493, 4494, 4494, 4494, 4494, 4494, 4495, 4495, 4495, 4496, 4496, 4496, 4497, 4498, 4499, 4500, 4500, 4501, 4501, 4503, 4503, 4503, 4504, 4504, 4506, 4509, 4509, 4509, 4509, 4510, 4510, 4511, 4511, 4511, 4512, 4513, 4513, 4514, 4514, 4514, 4515, 4517, 4518, 4521, 4521, 4521, 4521, 4522, 4523, 4523, 4524, 4524, 4525, 4525, 4525, 4525, 4525, 4526, 4526, 4527, 4527, 4528, 4528, 4528, 4529, 4529, 4529, 4529, 4530, 4531, 4532, 4533, 4533, 4534, 4535, 4536, 4536, 4536, 4536, 4537, 4537, 4538, 4539, 4539, 4542, 4542, 4542, 4543, 4543, 4543, 4544, 4544, 4546, 4547, 4547, 4548, 4548, 4549, 4549, 4550, 4550, 4551, 4552, 4552, 4552, 4553, 4553, 4554, 4554, 4554, 4554, 4554, 4555, 4555, 4556, 4556, 4557, 4557, 4558, 4558, 4559, 4559, 4559, 4560, 4560, 4562, 4563, 4563, 4564, 4565, 4566, 4566, 4566, 4567, 4567, 4567, 4567, 4567, 4568, 4568, 4568, 4569, 4569, 4570, 4571, 4572, 4572, 4572, 4572, 4573, 4574, 4574, 4574, 4575, 4575, 4575, 4575, 4575, 4575, 4576, 4576, 4577, 4577, 4578, 4578, 4578, 4579, 4579, 4579, 4579, 4580, 4580, 4580, 4580, 4580, 4581, 4581, 4582, 4583, 4584, 4584, 4586, 4586, 4587, 4588, 4589, 4590, 4590, 4592, 4592, 4592, 4593, 4594, 4594, 4594, 4595, 4595, 4595, 4596, 4597, 4597, 4597, 4598, 4598, 4600, 4600, 4600, 4600, 4601, 4601, 4602, 4602, 4602, 4603, 4604, 4604, 4605, 4605, 4605, 4606, 4607, 4608, 4608, 4608, 4609, 4609, 4609, 4610, 4611, 4611, 4612, 4612, 4614, 4614, 4614, 4614, 4615, 4615, 4616, 4616, 4616, 4616, 4617, 4617, 4617, 4617, 4618, 4618, 4618, 4618, 4620, 4621, 4621, 4621, 4622, 4623, 4623, 4623, 4624, 4624, 4625, 4625, 4626, 4626, 4627, 4627, 4627, 4629, 4629, 4630, 4630, 4631, 4631, 4631, 4631, 4631, 4631, 4632, 4633, 4634, 4634, 4634, 4635, 4635, 4635, 4635, 4636, 4636, 4636, 4636, 4637, 4637, 4638, 4639, 4639, 4640, 4640, 4640, 4641, 4641, 4642, 4643, 4643, 4643, 4644, 4644, 4645, 4646, 4646, 4647, 4648, 4649, 4649, 4649, 4649, 4651, 4651, 4653, 4654, 4655, 4655, 4656, 4656, 4657, 4658, 4658, 4658, 4659, 4659, 4659, 4659, 4659, 4660, 4661, 4662, 4662, 4663, 4663, 4664, 4664, 4665, 4665, 4666, 4666, 4666, 4667, 4667, 4668, 4669, 4669, 4669, 4669, 4670, 4670, 4670, 4671, 4673, 4673, 4674, 4674, 4674, 4674, 4675, 4675, 4675, 4676, 4677, 4678, 4678, 4679, 4679, 4679, 4679, 4680, 4680, 4681, 4681, 4683, 4683, 4683, 4683, 4684, 4684, 4685, 4685, 4686, 4686, 4687, 4687, 4688, 4690, 4690, 4690, 4690, 4691, 4691, 4693, 4693, 4693, 4693, 4693, 4695, 4695, 4697, 4697, 4698, 4699, 4699, 4700, 4700, 4700, 4701, 4701, 4701, 4702, 4703, 4703, 4704, 4704, 4704, 4705, 4705, 4705, 4706, 4707, 4707, 4707, 4708, 4708, 4709, 4709, 4710, 4710, 4710, 4711, 4711, 4712, 4712, 4714, 4715, 4716, 4716, 4717, 4718, 4718, 4718, 4718, 4719, 4719, 4720, 4720, 4720, 4720, 4721, 4721, 4721, 4722, 4722, 4725, 4725, 4726, 4726, 4727, 4728, 4728, 4728, 4728, 4728, 4729, 4729, 4730, 4730, 4731, 4731, 4732, 4732, 4733, 4733, 4733, 4733, 4733, 4734, 4734, 4734, 4734, 4735, 4735, 4735, 4736, 4737, 4738, 4738, 4738, 4738, 4738, 4739, 4739, 4740, 4740, 4741, 4741, 4743, 4743, 4743, 4744, 4744, 4744, 4744, 4744, 4746, 4746, 4746, 4746, 4747, 4747, 4747, 4748, 4748, 4748, 4749, 4749, 4749, 4750, 4751, 4751, 4751, 4752, 4753, 4753, 4753, 4755, 4755, 4756, 4756, 4757, 4757, 4757, 4758, 4758, 4760, 4760, 4760, 4761, 4761, 4762, 4762, 4762, 4763, 4764, 4764, 4765, 4766, 4767, 4767, 4768, 4768, 4769, 4770, 4771, 4771, 4771, 4773, 4774, 4774, 4774, 4774, 4775, 4778, 4779, 4780, 4780, 4780, 4781, 4781, 4782, 4782, 4782, 4783, 4785, 4785, 4786, 4787, 4787, 4787, 4787, 4788, 4788, 4788, 4788, 4788, 4789, 4790, 4790, 4790, 4791, 4791, 4791, 4792, 4792, 4792, 4792, 4792, 4792, 4793, 4794, 4794, 4796, 4796, 4796, 4796, 4797, 4798, 4798, 4799, 4799, 4799, 4799, 4801, 4801, 4802, 4802, 4802, 4803, 4805, 4805, 4808, 4808, 4808, 4810, 4810, 4810, 4811, 4811, 4811, 4811, 4812, 4812, 4813, 4814, 4815, 4815, 4816, 4816, 4816, 4816, 4816, 4817, 4817, 4817, 4818, 4818, 4818, 4819, 4819, 4820, 4822, 4822, 4822, 4822, 4822, 4822, 4823, 4823, 4823, 4824, 4824, 4825, 4826, 4826, 4827, 4827, 4828, 4828, 4828, 4829, 4829, 4830, 4830, 4830, 4831, 4831, 4831, 4832, 4832, 4833, 4834, 4834, 4834, 4834, 4835, 4835, 4835, 4836, 4837, 4838, 4838, 4838, 4838, 4838, 4838, 4839, 4839, 4839, 4839, 4840, 4840, 4841, 4842, 4842, 4842, 4843, 4843, 4843, 4843, 4843, 4844, 4844, 4845, 4846, 4846, 4847, 4847, 4847, 4847, 4847, 4848, 4848, 4849, 4849, 4849, 4849, 4849, 4850, 4850, 4851, 4853, 4853, 4853, 4854, 4854, 4856, 4856, 4857, 4857, 4857, 4858, 4858, 4859, 4859, 4859, 4859, 4860, 4860, 4861, 4862, 4862, 4863, 4863, 4863, 4863, 4864, 4864, 4864, 4864, 4865, 4865, 4866, 4866, 4867, 4867, 4869, 4870, 4870, 4870, 4870, 4870, 4870, 4871, 4871, 4871, 4872, 4873, 4873, 4874, 4874, 4875, 4875, 4876, 4876, 4876, 4876, 4877, 4879, 4879, 4879, 4881, 4882, 4882, 4883, 4883, 4883, 4884, 4884, 4886, 4888, 4888, 4888, 4889, 4890, 4890, 4890, 4891, 4891, 4892, 4892, 4892, 4892, 4893, 4893, 4893, 4894, 4894, 4894, 4894, 4894, 4894, 4895, 4898, 4899, 4899, 4900, 4901, 4901, 4901, 4901, 4902, 4902, 4903, 4904, 4904, 4904, 4904, 4904, 4905, 4906, 4908, 4908, 4909, 4910, 4910, 4911, 4911, 4912, 4912, 4913, 4913, 4914, 4914, 4914, 4915, 4915, 4916, 4917, 4917, 4918, 4918, 4920, 4921, 4921, 4921, 4921, 4922, 4922, 4922, 4922, 4923, 4923, 4924, 4924, 4924, 4925, 4926, 4926, 4926, 4927, 4928, 4928, 4928, 4928, 4928, 4928, 4929, 4930, 4930, 4931, 4932, 4934, 4934, 4935, 4935, 4936, 4936, 4937, 4937, 4937, 4937, 4937, 4938, 4939, 4939, 4939, 4939, 4939, 4939, 4942, 4943, 4943, 4944, 4944, 4944, 4944, 4944, 4945, 4946, 4946, 4946, 4947, 4948, 4948, 4948, 4949, 4949, 4950, 4950, 4950, 4950, 4951, 4951, 4952, 4956, 4956, 4957, 4957, 4957, 4957, 4958, 4960, 4960, 4960, 4961, 4961, 4961, 4962, 4962, 4962, 4963, 4963, 4964, 4964, 4964, 4965, 4966, 4967, 4967, 4968, 4968, 4968, 4971, 4971, 4972, 4972, 4974, 4975, 4975, 4975, 4976, 4976, 4977, 4978, 4978, 4979, 4979, 4979, 4980, 4980, 4980, 4981, 4981, 4981, 4981, 4982, 4982, 4982, 4982, 4982, 4983, 4983, 4983, 4983, 4984, 4985, 4985, 4986, 4986, 4986, 4986, 4987, 4987, 4988, 4989, 4989, 4989, 4990, 4991, 4992, 4992, 4993, 4993, 4994, 4995, 4995, 4996, 4997, 4997, 4997, 4997, 4997, 4998, 4998, 4999, 4999]\n", bench_group_opt, ); diff --git a/crates/cli_utils/src/helpers.rs b/crates/cli_utils/src/helpers.rs index 1239e0bcbd4..81cfb47daca 100644 --- a/crates/cli_utils/src/helpers.rs +++ b/crates/cli_utils/src/helpers.rs @@ -255,7 +255,12 @@ pub fn run_cmd<'a, I: IntoIterator, E: IntoIterator, E: IntoIterator( _ => 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/build/Cargo.toml b/crates/compiler/build/Cargo.toml index 2dae039b575..51483aad68e 100644 --- a/crates/compiler/build/Cargo.toml +++ b/crates/compiler/build/Cargo.toml @@ -12,6 +12,7 @@ roc_bitcode = { path = "../builtins/bitcode" } roc_can = { path = "../can" } roc_collections = { path = "../collections" } roc_constrain = { path = "../constrain" } +roc_debug_flags = { path = "../debug_flags" } roc_error_macros = { path = "../../error_macros" } roc_gen_dev = { path = "../gen_dev", default-features = false } roc_gen_llvm = { path = "../gen_llvm" } diff --git a/crates/compiler/build/src/link.rs b/crates/compiler/build/src/link.rs index 8e3b016f102..9571770f5e2 100644 --- a/crates/compiler/build/src/link.rs +++ b/crates/compiler/build/src/link.rs @@ -1,6 +1,7 @@ use crate::target::{arch_str, target_zig_str}; use libloading::{Error, Library}; use roc_command_utils::{cargo, clang, rustup, zig}; +use roc_debug_flags; use roc_error_macros::internal_error; use roc_mono::ir::OptLevel; use std::collections::HashMap; @@ -537,7 +538,7 @@ pub fn rebuild_host( // on windows, we need the nightly toolchain so we can use `-Z export-executable-symbols` // using `+nightly` only works when running cargo through rustup let mut cmd = rustup(); - cmd.args(["run", "nightly-2023-05-28", "cargo"]); + cmd.args(["run", "nightly-2023-07-09", "cargo"]); cmd } else { @@ -613,7 +614,8 @@ pub fn rebuild_host( // Clean up c_host.o if c_host_dest.exists() { - std::fs::remove_file(c_host_dest).unwrap(); + // there can be a race condition on this file cleanup + let _ = std::fs::remove_file(c_host_dest); } } } else if rust_host_src.exists() { @@ -848,6 +850,17 @@ fn strs_to_path(strs: &[&str]) -> PathBuf { strs.iter().collect() } +fn extra_link_flags() -> Vec { + match env::var("ROC_LINK_FLAGS") { + Ok(flags) => { + println!("⚠️ CAUTION: The ROC_LINK_FLAGS environment variable is a temporary workaround, and will no longer do anything once surgical linking lands! If you're concerned about what this means for your use case, please ask about it on Zulip."); + + flags + } + Err(_) => "".to_string(), + }.split_whitespace().map(|x| x.to_owned()).collect() +} + fn link_linux( target: &Triple, output_path: PathBuf, @@ -1037,6 +1050,7 @@ fn link_linux( .args(&base_args) .args(["-dynamic-linker", ld_linux]) .args(input_paths) + .args(extra_link_flags()) // ld.lld requires this argument, and does not accept --arch // .args(&["-L/usr/lib/x86_64-linux-gnu"]) .args([ @@ -1054,6 +1068,7 @@ fn link_linux( "-o", output_path.as_path().to_str().unwrap(), // app (or app.so or app.dylib etc.) ]); + debug_print_command(&command); let output = command.spawn()?; @@ -1108,7 +1123,8 @@ fn link_macos( "-macos_version_min", &get_macos_version(), ]) - .args(input_paths); + .args(input_paths) + .args(extra_link_flags()); let sdk_path = "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib"; if Path::new(sdk_path).exists() { @@ -1116,18 +1132,6 @@ fn link_macos( ld_command.arg(format!("-L{sdk_path}/swift")); }; - let roc_link_flags = match env::var("ROC_LINK_FLAGS") { - Ok(flags) => { - println!("⚠️ CAUTION: The ROC_LINK_FLAGS environment variable is a temporary workaround, and will no longer do anything once surgical linking lands! If you're concerned about what this means for your use case, please ask about it on Zulip."); - - flags - } - Err(_) => "".to_string(), - }; - for roc_link_flag in roc_link_flags.split_whitespace() { - ld_command.arg(roc_link_flag); - } - ld_command.args([ // Libraries - see https://github.com/roc-lang/roc/pull/554#discussion_r496392274 // for discussion and further references @@ -1162,14 +1166,18 @@ fn link_macos( output_path.to_str().unwrap(), // app ]); + debug_print_command(&ld_command); + let mut ld_child = ld_command.spawn()?; match target.architecture { Architecture::Aarch64(_) => { ld_child.wait()?; - let codesign_child = Command::new("codesign") - .args(["-s", "-", output_path.to_str().unwrap()]) - .spawn()?; + + let mut codesign_cmd = Command::new("codesign"); + codesign_cmd.args(["-s", "-", output_path.to_str().unwrap()]); + debug_print_command(&codesign_cmd); + let codesign_child = codesign_cmd.spawn()?; Ok((codesign_child, output_path)) } @@ -1178,8 +1186,11 @@ fn link_macos( } fn get_macos_version() -> String { - let cmd_stdout = Command::new("sw_vers") - .arg("-productVersion") + let mut cmd = Command::new("sw_vers"); + cmd.arg("-productVersion"); + debug_print_command(&cmd); + + let cmd_stdout = cmd .output() .expect("Failed to execute command 'sw_vers -productVersion'") .stdout; @@ -1382,15 +1393,11 @@ pub fn preprocess_host_wasm32(host_input_path: &Path, preprocessed_host_path: &P } fn run_build_command(mut command: Command, file_to_build: &str, flaky_fail_counter: usize) { - let mut command_string = std::ffi::OsString::new(); - command_string.push(command.get_program()); - - for arg in command.get_args() { - command_string.push(" "); - command_string.push(arg); - } - - let cmd_str = command_string.to_str().unwrap(); + let command_string = stringify_command(&command); + let cmd_str = &command_string; + roc_debug_flags::dbg_do!(roc_debug_flags::ROC_PRINT_BUILD_COMMANDS, { + print_command_str(cmd_str); + }); let cmd_output = command.output().unwrap(); let max_flaky_fail_count = 10; @@ -1428,3 +1435,41 @@ fn run_build_command(mut command: Command, file_to_build: &str, flaky_fail_count } } } + +/// Stringify a command for printing +/// e.g. `HOME=~ zig build-exe foo.zig -o foo` +fn stringify_command(cmd: &Command) -> String { + let mut command_string = std::ffi::OsString::new(); + + for (name, opt_val) in cmd.get_envs() { + command_string.push(name); + command_string.push("="); + if let Some(val) = opt_val { + command_string.push(val); + } else { + command_string.push("''"); + } + command_string.push(" "); + } + + command_string.push(cmd.get_program()); + + for arg in cmd.get_args() { + command_string.push(" "); + command_string.push(arg); + } + + String::from(command_string.to_str().unwrap()) +} + +#[cfg(debug_assertions)] +fn print_command_str(s: &str) { + println!("\nRoc build command:\n{}\n", s); +} + +fn debug_print_command(_cmd: &Command) { + // This debug macro is compiled out in release mode, so the argument is unused + roc_debug_flags::dbg_do!(roc_debug_flags::ROC_PRINT_BUILD_COMMANDS, { + print_command_str(&stringify_command(_cmd)); + }); +} diff --git a/crates/compiler/build/src/program.rs b/crates/compiler/build/src/program.rs index c749a0c5f09..47bf2d4c3ca 100644 --- a/crates/compiler/build/src/program.rs +++ b/crates/compiler/build/src/program.rs @@ -86,6 +86,7 @@ pub struct CodeGenOptions { pub opt_level: OptLevel, pub emit_debug_info: bool, pub emit_llvm_ir: bool, + pub fuzz: bool, } type GenFromMono<'a> = (CodeObject, CodeGenTiming, ExpectMetadata<'a>); @@ -103,6 +104,7 @@ pub fn gen_from_mono_module<'a>( let path = roc_file_path; let debug = code_gen_options.emit_debug_info; let emit_llvm_ir = code_gen_options.emit_llvm_ir; + let fuzz = code_gen_options.fuzz; let opt = code_gen_options.opt_level; match code_gen_options.backend { @@ -131,6 +133,7 @@ pub fn gen_from_mono_module<'a>( backend_mode, debug, emit_llvm_ir, + fuzz, ), } } @@ -148,6 +151,7 @@ fn gen_from_mono_module_llvm<'a>( backend_mode: LlvmBackendMode, emit_debug_info: bool, emit_llvm_ir: bool, + fuzz: bool, ) -> GenFromMono<'a> { use crate::target::{self, convert_opt_level}; use inkwell::attributes::{Attribute, AttributeLoc}; @@ -284,7 +288,8 @@ fn gen_from_mono_module_llvm<'a>( // annotate the LLVM IR output with debug info // so errors are reported with the line number of the LLVM source - let memory_buffer = if cfg!(feature = "sanitizers") && std::env::var("ROC_SANITIZERS").is_ok() { + let gen_sanitizers = cfg!(feature = "sanitizers") && std::env::var("ROC_SANITIZERS").is_ok(); + let memory_buffer = if fuzz || gen_sanitizers { let dir = tempfile::tempdir().unwrap(); let dir = dir.into_path(); @@ -301,33 +306,27 @@ fn gen_from_mono_module_llvm<'a>( let mut passes = vec![]; let mut extra_args = vec![]; let mut unrecognized = vec![]; - for sanitizer in std::env::var("ROC_SANITIZERS") - .unwrap() - .split(',') - .map(|x| x.trim()) - { - match sanitizer { - "address" => passes.push("asan-module"), - "memory" => passes.push("msan-module"), - "thread" => passes.push("tsan-module"), - "cargo-fuzz" => { - passes.push("sancov-module"); - extra_args.extend_from_slice(&[ - "-sanitizer-coverage-level=3", - "-sanitizer-coverage-prune-blocks=0", - "-sanitizer-coverage-inline-8bit-counters", - "-sanitizer-coverage-pc-table", - ]); - } - "afl.rs" => { - passes.push("sancov-module"); - extra_args.extend_from_slice(&[ - "-sanitizer-coverage-level=3", - "-sanitizer-coverage-prune-blocks=0", - "-sanitizer-coverage-trace-pc-guard", - ]); + if fuzz { + passes.push("sancov-module"); + extra_args.extend_from_slice(&[ + "-sanitizer-coverage-level=4", + "-sanitizer-coverage-inline-8bit-counters", + "-sanitizer-coverage-pc-table", + "-sanitizer-coverage-trace-compares", + ]); + } + if gen_sanitizers { + for sanitizer in std::env::var("ROC_SANITIZERS") + .unwrap() + .split(',') + .map(|x| x.trim()) + { + match sanitizer { + "address" => passes.push("asan-module"), + "memory" => passes.push("msan-module"), + "thread" => passes.push("tsan-module"), + x => unrecognized.push(x.to_owned()), } - x => unrecognized.push(x.to_owned()), } } if !unrecognized.is_empty() { @@ -802,7 +801,7 @@ fn build_loaded_file<'a>( platform_main_roc.with_file_name(roc_linker::preprocessed_host_filename(target).unwrap()) }; - let mut output_exe_path = match out_path { + let output_exe_path = match out_path { Some(path) => { // true iff the path ends with a directory separator, // e.g. '/' on UNIX, '/' or '\\' on Windows @@ -830,12 +829,22 @@ fn build_loaded_file<'a>( if ends_with_sep { let filename = app_module_path.file_name().unwrap_or_default(); - with_executable_extension(&path.join(filename), operating_system) + with_output_extension( + &path.join(filename), + operating_system, + linking_strategy, + link_type, + ) } else { path.to_path_buf() } } - None => with_executable_extension(&app_module_path, operating_system), + None => with_output_extension( + &app_module_path, + operating_system, + linking_strategy, + link_type, + ), }; // We don't need to spawn a rebuild thread when using a prebuilt host. @@ -994,7 +1003,6 @@ fn build_loaded_file<'a>( } (LinkingStrategy::Additive, _) | (LinkingStrategy::Legacy, LinkType::None) => { // Just copy the object file to the output folder. - output_exe_path.set_extension(operating_system.object_file_ext()); std::fs::write(&output_exe_path, &*roc_app_bytes).unwrap(); } (LinkingStrategy::Legacy, _) => { @@ -1282,6 +1290,7 @@ pub fn build_str_test<'a>( opt_level: OptLevel::Normal, emit_debug_info: false, emit_llvm_ir: false, + fuzz: false, }; let emit_timings = false; @@ -1324,6 +1333,17 @@ pub fn build_str_test<'a>( ) } -fn with_executable_extension(path: &Path, os: OperatingSystem) -> PathBuf { - path.with_extension(os.executable_file_ext().unwrap_or_default()) +fn with_output_extension( + path: &Path, + os: OperatingSystem, + linking_strategy: LinkingStrategy, + link_type: LinkType, +) -> PathBuf { + match (linking_strategy, link_type) { + (LinkingStrategy::Additive, _) | (LinkingStrategy::Legacy, LinkType::None) => { + // Additive linking and no linking both output the object file type. + path.with_extension(os.object_file_ext()) + } + _ => path.with_extension(os.executable_file_ext().unwrap_or_default()), + } } diff --git a/crates/compiler/builtins/.gitignore b/crates/compiler/builtins/.gitignore deleted file mode 100644 index 732e9710e4e..00000000000 --- a/crates/compiler/builtins/.gitignore +++ /dev/null @@ -1 +0,0 @@ -builtins.ll diff --git a/crates/compiler/builtins/bitcode/.gitignore b/crates/compiler/builtins/bitcode/.gitignore deleted file mode 100644 index 7a3a8456f8f..00000000000 --- a/crates/compiler/builtins/bitcode/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -zig-out -zig-cache -src/zig-cache -benchmark/zig-cache -dec diff --git a/crates/compiler/builtins/bitcode/src/dec.zig b/crates/compiler/builtins/bitcode/src/dec.zig index cd9a8515022..6ac774f78eb 100644 --- a/crates/compiler/builtins/bitcode/src/dec.zig +++ b/crates/compiler/builtins/bitcode/src/dec.zig @@ -24,6 +24,9 @@ pub const RocDec = extern struct { pub const one_point_zero_i128: i128 = math.pow(i128, 10, RocDec.decimal_places); pub const one_point_zero: RocDec = .{ .num = one_point_zero_i128 }; + pub const two_point_zero: RocDec = RocDec.add(RocDec.one_point_zero, RocDec.one_point_zero); + pub const zero_point_five: RocDec = RocDec.div(RocDec.one_point_zero, RocDec.two_point_zero); + pub fn fromU64(num: u64) RocDec { return .{ .num = num * one_point_zero_i128 }; } @@ -340,6 +343,77 @@ pub const RocDec = extern struct { } } + fn trunc(self: RocDec) RocDec { + return RocDec.sub(self, self.fract()); + } + + fn fract(self: RocDec) RocDec { + const sign = std.math.sign(self.num); + const digits = @mod(sign * self.num, RocDec.one_point_zero.num); + + return RocDec{ .num = sign * digits }; + } + + // Returns the nearest integer to self. If a value is half-way between two integers, round away from 0.0. + fn round(arg1: RocDec) RocDec { + // this rounds towards zero + const tmp = arg1.trunc(); + + const sign = std.math.sign(arg1.num); + const abs_fract = sign * arg1.fract().num; + + if (abs_fract >= RocDec.zero_point_five.num) { + return RocDec.add(tmp, RocDec{ .num = sign * RocDec.one_point_zero.num }); + } else { + return tmp; + } + } + + // Returns the largest integer less than or equal to itself + fn floor(arg1: RocDec) RocDec { + const tmp = arg1.trunc(); + + if (arg1.num < 0 and arg1.fract().num != 0) { + return RocDec.sub(tmp, RocDec.one_point_zero); + } else { + return tmp; + } + } + + // Returns the smallest integer greater than or equal to itself + fn ceiling(arg1: RocDec) RocDec { + const tmp = arg1.trunc(); + + if (arg1.num > 0 and arg1.fract().num != 0) { + return RocDec.add(tmp, RocDec.one_point_zero); + } else { + return tmp; + } + } + + fn powInt(base: RocDec, exponent: i128) RocDec { + if (exponent == 0) { + return RocDec.one_point_zero; + } else if (exponent > 0) { + if (@mod(exponent, 2) == 0) { + const half_power = RocDec.powInt(base, exponent >> 1); // `>> 1` == `/ 2` + return RocDec.mul(half_power, half_power); + } else { + return RocDec.mul(base, RocDec.powInt(base, exponent - 1)); + } + } else { + return RocDec.div(RocDec.one_point_zero, RocDec.powInt(base, -exponent)); + } + } + + fn pow(base: RocDec, exponent: RocDec) RocDec { + if (exponent.trunc().num == exponent.num) { + return base.powInt(@divTrunc(exponent.num, RocDec.one_point_zero_i128)); + } else { + return fromF64(std.math.pow(f64, base.toF64(), exponent.toF64())).?; + } + } + pub fn mul(self: RocDec, other: RocDec) RocDec { const answer = RocDec.mulWithOverflow(self, other); @@ -1195,6 +1269,153 @@ test "log: 1" { try expectEqual(RocDec.fromU64(0), RocDec.log(RocDec.fromU64(1))); } +test "fract: 0" { + var roc_str = RocStr.init("0", 1); + var dec = RocDec.fromStr(roc_str).?; + + try expectEqual(RocDec{ .num = 0 }, dec.fract()); +} + +test "fract: 1" { + var roc_str = RocStr.init("1", 1); + var dec = RocDec.fromStr(roc_str).?; + + try expectEqual(RocDec{ .num = 0 }, dec.fract()); +} + +test "fract: 123.45" { + var roc_str = RocStr.init("123.45", 6); + var dec = RocDec.fromStr(roc_str).?; + + try expectEqual(RocDec{ .num = 450000000000000000 }, dec.fract()); +} + +test "fract: -123.45" { + var roc_str = RocStr.init("-123.45", 7); + var dec = RocDec.fromStr(roc_str).?; + + try expectEqual(RocDec{ .num = -450000000000000000 }, dec.fract()); +} + +test "fract: .45" { + var roc_str = RocStr.init(".45", 3); + var dec = RocDec.fromStr(roc_str).?; + + try expectEqual(RocDec{ .num = 450000000000000000 }, dec.fract()); +} + +test "fract: -0.00045" { + const dec: RocDec = .{ .num = -450000000000000 }; + const res = dec.fract(); + + try expectEqual(dec.num, res.num); +} + +test "trunc: 0" { + var roc_str = RocStr.init("0", 1); + var dec = RocDec.fromStr(roc_str).?; + + try expectEqual(RocDec{ .num = 0 }, dec.trunc()); +} + +test "trunc: 1" { + var roc_str = RocStr.init("1", 1); + var dec = RocDec.fromStr(roc_str).?; + + try expectEqual(RocDec.one_point_zero, dec.trunc()); +} + +test "trunc: 123.45" { + var roc_str = RocStr.init("123.45", 6); + var dec = RocDec.fromStr(roc_str).?; + + try expectEqual(RocDec{ .num = 123000000000000000000 }, dec.trunc()); +} + +test "trunc: -123.45" { + var roc_str = RocStr.init("-123.45", 7); + var dec = RocDec.fromStr(roc_str).?; + + try expectEqual(RocDec{ .num = -123000000000000000000 }, dec.trunc()); +} + +test "trunc: .45" { + var roc_str = RocStr.init(".45", 3); + var dec = RocDec.fromStr(roc_str).?; + + try expectEqual(RocDec{ .num = 0 }, dec.trunc()); +} + +test "trunc: -0.00045" { + const dec: RocDec = .{ .num = -450000000000000 }; + const res = dec.trunc(); + + try expectEqual(RocDec{ .num = 0 }, res); +} + +test "round: 123.45" { + var roc_str = RocStr.init("123.45", 6); + var dec = RocDec.fromStr(roc_str).?; + + try expectEqual(RocDec{ .num = 123000000000000000000 }, dec.round()); +} + +test "round: -123.45" { + var roc_str = RocStr.init("-123.45", 7); + var dec = RocDec.fromStr(roc_str).?; + + try expectEqual(RocDec{ .num = -123000000000000000000 }, dec.round()); +} + +test "round: 0.5" { + var roc_str = RocStr.init("0.5", 3); + var dec = RocDec.fromStr(roc_str).?; + + try expectEqual(RocDec.one_point_zero, dec.round()); +} + +test "round: -0.5" { + var roc_str = RocStr.init("-0.5", 4); + var dec = RocDec.fromStr(roc_str).?; + + try expectEqual(RocDec{ .num = -1000000000000000000 }, dec.round()); +} + +test "powInt: 3.1 ^ 0" { + var roc_str = RocStr.init("3.1", 3); + var dec = RocDec.fromStr(roc_str).?; + + try expectEqual(RocDec.one_point_zero, dec.powInt(0)); +} + +test "powInt: 3.1 ^ 1" { + var roc_str = RocStr.init("3.1", 3); + var dec = RocDec.fromStr(roc_str).?; + + try expectEqual(dec, dec.powInt(1)); +} + +test "powInt: 2 ^ 2" { + var roc_str = RocStr.init("4", 1); + var dec = RocDec.fromStr(roc_str).?; + + try expectEqual(dec, RocDec.two_point_zero.powInt(2)); +} + +test "powInt: 0.5 ^ 2" { + var roc_str = RocStr.init("0.25", 4); + var dec = RocDec.fromStr(roc_str).?; + + try expectEqual(dec, RocDec.zero_point_five.powInt(2)); +} + +test "pow: 0.5 ^ 2.0" { + var roc_str = RocStr.init("0.25", 4); + var dec = RocDec.fromStr(roc_str).?; + + try expectEqual(dec, RocDec.zero_point_five.pow(RocDec.two_point_zero)); +} + // exports pub fn fromStr(arg: RocStr) callconv(.C) num_.NumParseResult(i128) { @@ -1295,6 +1516,10 @@ pub fn logC(arg: RocDec) callconv(.C) i128 { return @call(.always_inline, RocDec.log, .{arg}).num; } +pub fn powC(arg1: RocDec, arg2: RocDec) callconv(.C) i128 { + return @call(.always_inline, RocDec.pow, .{ arg1, arg2 }).num; +} + pub fn sinC(arg: RocDec) callconv(.C) i128 { return @call(.always_inline, RocDec.sin, .{arg}).num; } @@ -1342,3 +1567,30 @@ pub fn mulOrPanicC(arg1: RocDec, arg2: RocDec) callconv(.C) RocDec { pub fn mulSaturatedC(arg1: RocDec, arg2: RocDec) callconv(.C) RocDec { return @call(.always_inline, RocDec.mulSaturated, .{ arg1, arg2 }); } + +pub fn exportRound(comptime T: type, comptime name: []const u8) void { + comptime var f = struct { + fn func(input: RocDec) callconv(.C) T { + return @as(T, @intCast(@divFloor(input.round().num, RocDec.one_point_zero_i128))); + } + }.func; + @export(f, .{ .name = name ++ @typeName(T), .linkage = .Strong }); +} + +pub fn exportFloor(comptime T: type, comptime name: []const u8) void { + comptime var f = struct { + fn func(input: RocDec) callconv(.C) T { + return @as(T, @intCast(@divFloor(input.floor().num, RocDec.one_point_zero_i128))); + } + }.func; + @export(f, .{ .name = name ++ @typeName(T), .linkage = .Strong }); +} + +pub fn exportCeiling(comptime T: type, comptime name: []const u8) void { + comptime var f = struct { + fn func(input: RocDec) callconv(.C) T { + return @as(T, @intCast(@divFloor(input.ceiling().num, RocDec.one_point_zero_i128))); + } + }.func; + @export(f, .{ .name = name ++ @typeName(T), .linkage = .Strong }); +} diff --git a/crates/compiler/builtins/bitcode/src/helpers/grapheme.zig b/crates/compiler/builtins/bitcode/src/helpers/grapheme.zig deleted file mode 100644 index eceaf52f1ee..00000000000 --- a/crates/compiler/builtins/bitcode/src/helpers/grapheme.zig +++ /dev/null @@ -1,10980 +0,0 @@ -const std = @import("std"); -const assert = std.debug.assert; -const expectEqual = std.testing.expectEqual; - -// This whole module is a translation of grapheme breaks from -// the https://github.com/JuliaStrings/utf8proc library. -// Thanks so much to those developers! -// -// The only function this file exposes is `isGraphemeBreak` -// -// LICENSE -> https://github.com/JuliaStrings/utf8proc/blob/master/LICENSE.md - -// https://github.com/JuliaStrings/utf8proc/blob/master/utf8proc.h#L361 -pub const BoundClass = enum(u8) { - START = 0, // Start - OTHER = 1, // Other - CR = 2, // Cr - LF = 3, // Lf - CONTROL = 4, // Control - EXTEND = 5, // Extend - L = 6, // L - V = 7, // V - T = 8, // T - LV = 9, // Lv - LVT = 10, // Lvt - REGIONAL_INDICATOR = 11, // Regional indicator - SPACINGMARK = 12, // Spacingmark - PREPEND = 13, // Prepend - ZWJ = 14, // Zero Width Joiner - - // the following are no longer used in Unicode 11, but we keep - // the constants here for backward compatibility - E_BASE = 15, // Emoji Base - E_MODIFIER = 16, // Emoji Modifier - GLUE_AFTER_ZWJ = 17, // Glue_After_ZWJ - E_BASE_GAZ = 18, // E_BASE + GLUE_AFTER_ZJW - - // the Extended_Pictographic property is used in the Unicode 11 - // grapheme-boundary rules, so we store it in the boundclass field - EXTENDED_PICTOGRAPHIC = 19, - E_ZWG = 20, // BoundClass.EXTENDED_PICTOGRAPHIC + ZWJ -}; - -test "Bound Class" { - try expectEqual(0, @intFromEnum(BoundClass.START)); -} - -// https://github.com/JuliaStrings/utf8proc/blob/master/utf8proc.c#L261 -fn graphemeBreakSimple(lbc: BoundClass, tbc: BoundClass) bool { - const lbc_u8 = @intFromEnum(lbc); - const tbc_u8 = @intFromEnum(tbc); - return (if (lbc_u8 == @intFromEnum(BoundClass.START)) // GB1 - true - else if (lbc_u8 == @intFromEnum(BoundClass.CR) and tbc_u8 == @intFromEnum(BoundClass.LF)) // GB3 - false - else if (lbc_u8 >= @intFromEnum(BoundClass.CR) and lbc_u8 <= @intFromEnum(BoundClass.CONTROL)) // GB4 - true - else if (tbc_u8 >= @intFromEnum(BoundClass.CR) and tbc_u8 <= @intFromEnum(BoundClass.CONTROL)) // GB5 - true - else if (lbc_u8 == @intFromEnum(BoundClass.L) and (tbc_u8 == @intFromEnum(BoundClass.L) or tbc_u8 == @intFromEnum(BoundClass.V) or tbc_u8 == @intFromEnum(BoundClass.LV) or tbc_u8 == @intFromEnum(BoundClass.LVT))) // GB6 - false - else if ((lbc_u8 == @intFromEnum(BoundClass.LV) or lbc_u8 == @intFromEnum(BoundClass.V)) and (tbc_u8 == @intFromEnum(BoundClass.V) or tbc_u8 == @intFromEnum(BoundClass.T))) // GB7 - false - else if ((lbc_u8 == @intFromEnum(BoundClass.LVT) or lbc_u8 == @intFromEnum(BoundClass.T)) and tbc_u8 == @intFromEnum(BoundClass.T)) // GB8 - false - else if (tbc_u8 == @intFromEnum(BoundClass.EXTEND) or tbc_u8 == @intFromEnum(BoundClass.ZWJ) or tbc_u8 == @intFromEnum(BoundClass.SPACINGMARK) or lbc_u8 == @intFromEnum(BoundClass.PREPEND)) // GB9a - false - else if (lbc_u8 == @intFromEnum(BoundClass.E_ZWG) and tbc_u8 == @intFromEnum(BoundClass.EXTENDED_PICTOGRAPHIC)) // GB11 (requires additional handling below) - false - else if (lbc_u8 == @intFromEnum(BoundClass.REGIONAL_INDICATOR) and tbc_u8 == @intFromEnum(BoundClass.REGIONAL_INDICATOR)) // GB12/13 (requires additional handling below) - false - else // GB999 - true); -} - -// https://github.com/JuliaStrings/utf8proc/blob/master/utf8proc.c#L291 -fn graphemeBreakExtended(lbc: BoundClass, tbc: BoundClass, opt_state_ptr: *?BoundClass) bool { - var libc_override = lbc; - if (opt_state_ptr.*) |state| { - if (state != BoundClass.START) { - libc_override = state; - } - } - - const break_permitted = graphemeBreakSimple(libc_override, tbc); - - if (opt_state_ptr.*) |state| { - if (state == tbc and tbc == BoundClass.REGIONAL_INDICATOR) { - opt_state_ptr.* = BoundClass.OTHER; - } else if (state == BoundClass.EXTENDED_PICTOGRAPHIC) { - if (tbc == BoundClass.EXTEND) { - opt_state_ptr.* = BoundClass.EXTENDED_PICTOGRAPHIC; - } else if (tbc == BoundClass.ZWJ) { - opt_state_ptr.* = BoundClass.E_ZWG; - } else { - opt_state_ptr.* = tbc; - } - } else { - opt_state_ptr.* = tbc; - } - } - - return break_permitted; -} - -const codepoint_max: u21 = 1114112; - -// https://github.com/JuliaStrings/utf8proc/blob/master/utf8proc.c#L233 -fn unsafeCodepointToBoundClass(codepoint: u21) *const BoundClass { - assert(codepoint >= 0 and codepoint < codepoint_max); - return &boundclasses[stage2_table[stage1_table[codepoint >> 8] + (codepoint & 255)]]; -} - -test "unsafeCodepointToBoundClass: valid" { - try expectEqual(BoundClass.CONTROL, unsafeCodepointToBoundClass(8).*); -} - -// https://github.com/JuliaStrings/utf8proc/blob/master/utf8proc.c#L242 -fn codepointToBoundClass(codepoint: u21) *const BoundClass { - if (codepoint < 0 or codepoint >= codepoint_max) { - return &boundclasses[0]; - } else { - return unsafeCodepointToBoundClass(codepoint); - } -} - -test "codepointToBoundClass: valid" { - try expectEqual(BoundClass.CONTROL, codepointToBoundClass(8).*); -} - -test "codepointToBoundClass: invalid" { - try expectEqual(BoundClass.OTHER, codepointToBoundClass(codepoint_max + 5).*); -} - -// https://github.com/JuliaStrings/utf8proc/blob/master/utf8proc.c#L319 -// Docs: -// -// Given a pair of consecutive codepoints, return whether a grapheme break is permitted -// between them (as defined by the extended grapheme clusters in UAX#29). -// -// Params: -// codepoint1 -> The first codepoint. -// -// codepoint2 -> The second codepoint, occurring consecutively after codepoint1. -// -// state_ptr -> This algorithm requires state to break graphemes. This state can be passed -// in as a pointer in the state argument and should initially be set to 0. If -// the state is not passed in (i.e. a null pointer is passed), UAX#29 rules GB10/12/13 -// which require this state will not be applied, essentially matching the rules in -// Unicode 8.0.0. -pub fn isGraphemeBreak(codePoint1: u21, codePoint2: u21, opt_state_ptr: *?BoundClass) bool { - return graphemeBreakExtended(codepointToBoundClass(codePoint1).*, codepointToBoundClass(codePoint2).*, opt_state_ptr); -} - -// https://github.com/JuliaStrings/utf8proc/blob/master/utf8proc_data.c - -const stage1_table: [4352]u16 = [_]u16{ - 0, 256, 512, 768, 1024, 1280, 1536, 1792, 2048, 2304, 2560, - 2816, 3072, 3328, 3584, 3840, 4096, 4352, 4608, 4864, 5120, 5376, - 5632, 5888, 6144, 6400, 6656, 6912, 7168, 7424, 7680, 7936, 8192, - 8448, 8704, 8960, 9216, 9472, 9728, 9984, 10240, 10496, 10752, 11008, - 11264, 11520, 11776, 12032, 12288, 12544, 12800, 13056, 13312, 13312, 13312, - 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, - 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, - 13568, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, - 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, - 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, - 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, - 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, - 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, - 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, - 13312, 13312, 13312, 13312, 13312, 13824, 14080, 13312, 13312, 13312, 14336, - 5376, 14592, 14848, 15104, 15360, 15616, 15872, 16128, 16384, 16640, 16896, - 17152, 17408, 17664, 16128, 16384, 16640, 16896, 17152, 17408, 17664, 16128, - 16384, 16640, 16896, 17152, 17408, 17664, 16128, 16384, 16640, 16896, 17152, - 17408, 17664, 16128, 16384, 16640, 16896, 17152, 17408, 17664, 16128, 16384, - 16640, 16896, 17152, 17408, 17664, 16128, 17920, 18176, 18176, 18176, 18176, - 18176, 18176, 18176, 18176, 18432, 18432, 18432, 18432, 18432, 18432, 18432, - 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, - 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18688, 18944, 19200, 19456, - 19712, 19968, 20224, 20480, 20736, 20992, 21248, 21504, 21760, 5376, 22016, - 22272, 22528, 22784, 23040, 23296, 23552, 23808, 24064, 24320, 24576, 24832, - 25088, 25344, 25600, 25856, 26112, 26368, 26624, 26880, 27136, 27392, 27648, - 27904, 28160, 5376, 5376, 5376, 28416, 28672, 28928, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 5376, 5376, 5376, 5376, - 29184, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 5376, 5376, 29440, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 5376, 5376, 29696, - 29952, 27136, 27136, 30208, 30464, 13312, 13312, 13312, 13312, 13312, 13312, - 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, - 13312, 13312, 13312, 13312, 13312, 13312, 30720, 13312, 13312, 13312, 13312, - 30976, 31232, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 13312, 31488, 31744, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 32000, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 32256, 32512, 32768, 33024, 33280, 33536, 33792, 34048, 10240, - 10240, 34304, 27136, 27136, 27136, 27136, 27136, 34560, 34816, 35072, 27136, - 27136, 27136, 27136, 27136, 35328, 35584, 27136, 27136, 35840, 36096, 36352, - 27136, 36608, 36864, 37120, 37376, 37632, 37888, 38144, 38400, 38656, 38912, - 39168, 39424, 27136, 27136, 27136, 27136, 13312, 13312, 13312, 13312, 13312, - 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, - 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, - 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, - 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, - 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, - 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, - 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, - 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, - 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, - 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, - 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, - 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, - 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, - 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, - 13312, 13312, 13312, 13312, 13312, 13312, 13312, 39680, 13312, 13312, 13312, - 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, - 13312, 13312, 39936, 40192, 13312, 13312, 13312, 13312, 13312, 13312, 13312, - 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, - 13312, 13312, 13312, 40448, 13312, 13312, 13312, 13312, 13312, 13312, 13312, - 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, - 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 40704, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 40960, 41216, 41472, 27136, 27136, 27136, 27136, 27136, 13312, 13312, - 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, 13312, - 13312, 13312, 13312, 13312, 13312, 13312, 41728, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 41984, 42240, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, 27136, - 27136, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, - 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, - 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, - 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, - 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, - 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, - 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, - 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, - 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, - 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, - 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, - 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, - 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, - 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, - 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, - 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, - 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, - 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, - 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, - 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, - 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, - 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, - 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, - 18432, 18432, 18432, 42496, 18432, 18432, 18432, 18432, 18432, 18432, 18432, - 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, - 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, - 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, - 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, - 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, - 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, - 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, - 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, - 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, - 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, - 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, - 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, - 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, - 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, - 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, - 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, - 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, - 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, - 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, - 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, - 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, - 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, - 18432, 18432, 18432, 18432, 18432, 18432, 42496, -}; - -const stage2_table: [42752]u16 = [_]u16{ - 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 4, 3, - 5, 6, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 7, 7, 7, 3, 8, 9, 9, 10, - 11, 10, 9, 9, 12, 13, 9, 14, 15, 16, 15, 15, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 15, 9, - 18, 19, 20, 9, 9, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 43, 44, 45, 46, 12, 9, 13, 47, 48, - 47, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, - 72, 73, 74, 12, 75, 13, 75, 2, 2, 2, 2, 2, - 2, 7, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 76, 9, 11, 11, 11, 11, 77, 9, - 78, 79, 80, 81, 75, 82, 79, 83, 84, 85, 86, 87, - 88, 89, 9, 9, 90, 91, 92, 93, 94, 95, 96, 9, - 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, - 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 75, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, - 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, - 144, 145, 146, 147, 148, 149, 150, 75, 151, 152, 153, 154, - 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, - 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, - 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, - 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, - 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, - 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, - 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, - 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, - 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, - 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, - 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, - 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, - 299, 215, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, - 310, 311, 312, 215, 313, 314, 315, 316, 317, 318, 319, 320, - 321, 322, 323, 324, 325, 326, 215, 215, 327, 328, 329, 330, - 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 215, 341, - 342, 343, 215, 344, 341, 341, 341, 341, 345, 346, 347, 348, - 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, - 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, - 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, - 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, - 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, - 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, - 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, - 433, 434, 435, 436, 437, 215, 438, 439, 440, 441, 442, 443, - 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, - 215, 215, 215, 215, 215, 215, 456, 457, 458, 459, 460, 461, - 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, - 474, 475, 476, 477, 478, 479, 480, 481, 482, 215, 483, 484, - 215, 485, 215, 486, 487, 215, 215, 215, 488, 489, 215, 490, - 215, 491, 492, 215, 493, 494, 495, 496, 497, 215, 215, 498, - 215, 499, 500, 215, 215, 501, 215, 215, 215, 215, 215, 215, - 215, 502, 215, 215, 503, 215, 504, 505, 215, 215, 215, 506, - 507, 508, 509, 510, 511, 215, 215, 215, 215, 215, 512, 215, - 341, 215, 215, 215, 215, 215, 215, 215, 215, 513, 514, 215, - 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, - 215, 215, 215, 215, 515, 516, 517, 518, 519, 520, 521, 522, - 523, 524, 524, 525, 525, 525, 525, 525, 525, 525, 47, 47, - 47, 47, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, - 525, 525, 47, 47, 47, 47, 47, 47, 526, 527, 528, 529, - 530, 531, 47, 47, 532, 533, 534, 535, 536, 47, 47, 47, - 47, 47, 47, 47, 524, 47, 525, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, - 549, 542, 542, 550, 542, 551, 542, 552, 553, 554, 555, 555, - 555, 555, 554, 556, 555, 555, 555, 555, 555, 557, 557, 558, - 559, 560, 561, 562, 563, 555, 555, 555, 555, 564, 565, 555, - 566, 567, 555, 555, 568, 568, 568, 568, 569, 555, 555, 555, - 555, 542, 542, 542, 570, 571, 572, 573, 574, 575, 542, 555, - 555, 555, 542, 542, 542, 555, 555, 576, 542, 542, 542, 555, - 555, 555, 555, 542, 554, 555, 555, 542, 577, 578, 578, 577, - 578, 578, 577, 542, 542, 542, 542, 542, 542, 542, 542, 542, - 542, 542, 542, 542, 579, 580, 581, 582, 583, 47, 584, 585, - 0, 0, 586, 587, 588, 589, 590, 591, 0, 0, 0, 0, - 88, 592, 593, 594, 595, 596, 597, 0, 598, 0, 599, 600, - 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, - 613, 614, 615, 616, 617, 618, 0, 619, 620, 621, 622, 623, - 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, - 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, - 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, - 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, - 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, - 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, - 696, 697, 698, 699, 700, 701, 75, 702, 703, 704, 705, 706, - 215, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, - 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, - 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, - 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, - 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, - 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, - 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, - 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, - 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, - 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, - 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, - 838, 839, 840, 542, 542, 542, 542, 542, 841, 841, 842, 843, - 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, 854, 855, - 856, 857, 858, 859, 860, 861, 862, 863, 864, 865, 866, 867, - 868, 869, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, - 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 890, 891, - 892, 893, 894, 895, 896, 897, 898, 899, 900, 901, 902, 903, - 904, 905, 906, 907, 908, 909, 910, 911, 912, 913, 914, 915, - 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, - 928, 929, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, - 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, - 952, 953, 954, 955, 956, 957, 958, 959, 960, 961, 962, 963, - 964, 965, 966, 967, 968, 969, 970, 971, 972, 973, 974, 975, - 976, 977, 978, 979, 980, 981, 982, 983, 984, 985, 986, 987, - 988, 989, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999, - 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 0, 1008, 1009, 1010, - 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022, - 1023, 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, - 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044, 1045, 0, - 0, 525, 1046, 1046, 1046, 1046, 1046, 1046, 215, 1047, 1048, 1049, - 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, - 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, - 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, - 215, 1046, 1086, 0, 0, 77, 77, 11, 0, 555, 542, 542, - 542, 542, 555, 542, 542, 542, 1087, 555, 542, 542, 542, 542, - 542, 542, 555, 555, 555, 555, 555, 555, 542, 542, 555, 542, - 542, 1087, 1088, 542, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, - 1097, 1098, 1098, 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1104, - 542, 555, 1104, 1097, 0, 0, 0, 0, 0, 0, 0, 0, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1107, 1107, 1107, 0, 0, 0, 0, 1107, 1107, 1107, 1107, 1104, - 1104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1108, 1108, 1108, 1108, 1108, 1108, 75, 75, 1109, 10, 10, 1110, - 15, 1111, 77, 77, 542, 542, 542, 542, 542, 542, 542, 542, - 1112, 1113, 1114, 1111, 1115, 0, 1111, 1111, 1116, 1116, 1117, 1118, - 1119, 1120, 1121, 1122, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, - 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, - 1116, 1116, 1116, 1116, 1123, 1116, 1116, 1116, 1116, 1116, 1116, 1116, - 1124, 1116, 1125, 1126, 1127, 1128, 1112, 1113, 1114, 1129, 1130, 1131, - 1132, 1133, 555, 542, 542, 542, 542, 542, 555, 542, 542, 555, - 1134, 1134, 1134, 1134, 1134, 1134, 1134, 1134, 1134, 1134, 10, 1135, - 1135, 1111, 1116, 1116, 1136, 1116, 1116, 1116, 1116, 1137, 1138, 1139, - 1140, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, - 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, - 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, - 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, - 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, - 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, - 1141, 1142, 1143, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, - 1116, 1116, 1116, 1116, 1116, 1116, 1144, 1145, 1111, 1146, 542, 542, - 542, 542, 542, 542, 542, 1108, 77, 542, 542, 542, 542, 555, - 542, 1123, 1123, 542, 542, 77, 555, 542, 542, 555, 1116, 1116, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 1116, 1116, - 1116, 1147, 1147, 1116, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, - 1111, 1111, 1111, 1111, 1111, 1111, 0, 1148, 1116, 1149, 1116, 1116, - 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, - 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, - 1116, 1116, 1116, 1116, 542, 555, 542, 542, 555, 542, 542, 555, - 555, 555, 542, 555, 555, 542, 555, 542, 542, 542, 555, 542, - 555, 542, 555, 542, 555, 542, 542, 0, 0, 1116, 1116, 1116, - 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, - 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, - 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, - 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, - 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, - 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, - 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, - 1116, 1116, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, - 1150, 1116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, - 1151, 1151, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 542, - 542, 542, 542, 542, 542, 542, 555, 542, 1152, 1152, 77, 9, - 9, 9, 1152, 0, 0, 555, 1153, 1153, 1107, 1107, 1107, 1107, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1107, 1107, 1107, 1107, 1107, 1107, 542, 542, 542, 542, 1152, 542, - 542, 542, 542, 542, 542, 542, 542, 542, 1152, 542, 542, 542, - 1152, 542, 542, 542, 542, 542, 0, 0, 1104, 1104, 1104, 1104, - 1104, 1104, 1104, 1104, 1104, 1104, 1104, 1104, 1104, 1104, 1104, 0, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1107, 555, 555, 555, 0, 0, 1104, 0, 1116, 1116, 1116, 1116, - 1116, 1116, 1116, 1116, 1116, 1116, 1116, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, - 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 0, 1116, 1116, - 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, - 1116, 1116, 1116, 1116, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 555, 542, 542, 542, 542, 542, 542, 542, 542, - 542, 542, 542, 542, 542, 542, 1108, 555, 542, 542, 555, 542, - 542, 555, 542, 542, 542, 555, 555, 555, 1126, 1127, 1128, 542, - 542, 542, 555, 542, 542, 555, 555, 542, 542, 542, 542, 542, - 1150, 1150, 1150, 1154, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 1155, 1156, 341, 341, 341, 341, 341, 341, - 1157, 1158, 341, 1159, 1160, 341, 341, 341, 341, 341, 1150, 1154, - 1161, 341, 1154, 1154, 1154, 1150, 1150, 1150, 1150, 1150, 1150, 1150, - 1150, 1154, 1154, 1154, 1154, 1162, 1154, 1154, 341, 542, 555, 542, - 542, 1150, 1150, 1150, 1163, 1164, 1165, 1166, 1167, 1168, 1169, 1170, - 341, 341, 1150, 1150, 1046, 1046, 1171, 1171, 1171, 1171, 1171, 1171, - 1171, 1171, 1171, 1171, 1046, 525, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 1150, 1154, 1154, - 0, 341, 341, 341, 341, 341, 341, 341, 341, 0, 0, 341, - 341, 0, 0, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 0, 341, 341, 341, 341, 341, 341, 341, 0, 341, 0, - 0, 0, 341, 341, 341, 341, 0, 0, 1172, 341, 1173, 1154, - 1154, 1150, 1150, 1150, 1150, 0, 0, 1174, 1154, 0, 0, 1175, - 1176, 1162, 341, 0, 0, 0, 0, 0, 0, 0, 0, 1177, - 0, 0, 0, 0, 1178, 1179, 0, 1180, 341, 341, 1150, 1150, - 0, 0, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, - 341, 341, 11, 11, 1181, 1181, 1181, 1181, 1181, 1181, 840, 11, - 341, 1046, 542, 0, 0, 1150, 1150, 1154, 0, 341, 341, 341, - 341, 341, 341, 0, 0, 0, 0, 341, 341, 0, 0, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 0, 341, 341, - 341, 341, 341, 341, 341, 0, 341, 1182, 0, 341, 1183, 0, - 341, 341, 0, 0, 1172, 0, 1154, 1154, 1154, 1150, 1150, 0, - 0, 0, 0, 1150, 1150, 0, 0, 1150, 1150, 1162, 0, 0, - 0, 1150, 0, 0, 0, 0, 0, 0, 0, 1184, 1185, 1186, - 341, 0, 1187, 0, 0, 0, 0, 0, 0, 0, 1171, 1171, - 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1150, 1150, 341, 341, - 341, 1150, 1046, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1150, 1150, 1154, 0, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 0, 341, 341, 341, 0, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 0, 341, 341, 341, 341, 341, 341, - 341, 0, 341, 341, 0, 341, 341, 341, 341, 341, 0, 0, - 1172, 341, 1154, 1154, 1154, 1150, 1150, 1150, 1150, 1150, 0, 1150, - 1150, 1154, 0, 1154, 1154, 1162, 0, 0, 341, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 341, 341, 1150, 1150, 0, 0, 1171, 1171, 1171, 1171, 1171, 1171, - 1171, 1171, 1171, 1171, 1046, 11, 0, 0, 0, 0, 0, 0, - 0, 341, 1150, 1150, 1150, 1150, 1150, 1150, 0, 1150, 1154, 1154, - 0, 341, 341, 341, 341, 341, 341, 341, 341, 0, 0, 341, - 341, 0, 0, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 0, 341, 341, 341, 341, 341, 341, 341, 0, 341, 341, - 0, 341, 341, 341, 341, 341, 0, 0, 1172, 341, 1188, 1150, - 1154, 1150, 1150, 1150, 1150, 0, 0, 1189, 1190, 0, 0, 1191, - 1192, 1162, 0, 0, 0, 0, 0, 0, 0, 1150, 1193, 1194, - 0, 0, 0, 0, 1195, 1196, 0, 341, 341, 341, 1150, 1150, - 0, 0, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, - 840, 341, 1181, 1181, 1181, 1181, 1181, 1181, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 1150, 341, 0, 341, 341, 341, - 341, 341, 341, 0, 0, 0, 341, 341, 341, 0, 1197, 341, - 1198, 341, 0, 0, 0, 341, 341, 0, 341, 0, 341, 341, - 0, 0, 0, 341, 341, 0, 0, 0, 341, 341, 341, 0, - 0, 0, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 0, 0, 0, 0, 1199, 1154, 1150, 1154, 1154, 0, - 0, 0, 1200, 1201, 1154, 0, 1202, 1203, 1204, 1162, 0, 0, - 341, 0, 0, 0, 0, 0, 0, 1205, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1171, 1171, - 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1181, 1181, 1181, 77, - 77, 77, 77, 77, 77, 11, 77, 0, 0, 0, 0, 0, - 1150, 1154, 1154, 1154, 1150, 341, 341, 341, 341, 341, 341, 341, - 341, 0, 341, 341, 341, 0, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 0, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 0, 0, - 0, 341, 1150, 1150, 1150, 1154, 1154, 1154, 1154, 0, 1206, 1150, - 1207, 0, 1150, 1150, 1150, 1162, 0, 0, 0, 0, 0, 0, - 0, 1208, 1209, 0, 341, 341, 341, 0, 0, 0, 0, 0, - 341, 341, 1150, 1150, 0, 0, 1171, 1171, 1171, 1171, 1171, 1171, - 1171, 1171, 1171, 1171, 0, 0, 0, 0, 0, 0, 0, 1046, - 1210, 1210, 1210, 1210, 1210, 1210, 1210, 840, 341, 1150, 1154, 1154, - 1046, 341, 341, 341, 341, 341, 341, 341, 341, 0, 341, 341, - 341, 0, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 0, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 0, 341, 341, 341, 341, 341, 0, 0, 1172, 341, 1154, 1211, - 1212, 1154, 1213, 1154, 1154, 0, 1214, 1215, 1216, 0, 1217, 1218, - 1150, 1162, 0, 0, 0, 0, 0, 0, 0, 1219, 1220, 0, - 0, 0, 0, 0, 0, 0, 341, 0, 341, 341, 1150, 1150, - 0, 0, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, - 0, 341, 341, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1150, 1150, 1154, 1154, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 0, 341, 341, 341, 0, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 1162, 1162, 341, 1221, 1154, 1154, 1150, 1150, 1150, - 1150, 0, 1222, 1223, 1154, 0, 1224, 1225, 1226, 1162, 1227, 840, - 0, 0, 0, 0, 341, 341, 341, 1228, 1181, 1181, 1181, 1181, - 1181, 1181, 1181, 341, 341, 341, 1150, 1150, 0, 0, 1171, 1171, - 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1181, 1181, 1181, 1181, - 1181, 1181, 1181, 1181, 1181, 840, 341, 341, 341, 341, 341, 341, - 0, 1150, 1154, 1154, 0, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 0, - 0, 0, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 0, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 0, 341, 0, 0, 341, 341, 341, 341, 341, 341, 341, 0, - 0, 0, 1229, 0, 0, 0, 0, 1230, 1154, 1154, 1150, 1150, - 1150, 0, 1150, 0, 1154, 1231, 1232, 1154, 1233, 1234, 1235, 1236, - 0, 0, 0, 0, 0, 0, 1171, 1171, 1171, 1171, 1171, 1171, - 1171, 1171, 1171, 1171, 0, 0, 1154, 1154, 1046, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 1150, 341, 1237, - 1150, 1150, 1150, 1150, 1238, 1238, 1162, 0, 0, 0, 0, 11, - 341, 341, 341, 341, 341, 341, 525, 1150, 1239, 1239, 1239, 1239, - 1150, 1150, 1150, 1046, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, - 1171, 1171, 1046, 1046, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 341, 341, 0, 341, 0, 341, 341, - 341, 341, 341, 0, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 0, 341, 0, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 1150, 341, 1240, 1150, 1150, 1150, 1150, - 1241, 1241, 1162, 1150, 1150, 341, 0, 0, 341, 341, 341, 341, - 341, 0, 525, 0, 1242, 1242, 1242, 1242, 1150, 1150, 0, 0, - 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 0, 0, - 1243, 1244, 341, 341, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 341, 840, 840, 840, 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046, - 1245, 1046, 1046, 1046, 1046, 1046, 1046, 840, 1046, 840, 840, 840, - 555, 555, 840, 840, 840, 840, 840, 840, 1171, 1171, 1171, 1171, - 1171, 1171, 1171, 1171, 1171, 1171, 1181, 1181, 1181, 1181, 1181, 1181, - 1181, 1181, 1181, 1181, 840, 555, 840, 555, 840, 1246, 12, 13, - 12, 13, 1154, 1154, 341, 341, 341, 1247, 341, 341, 341, 341, - 0, 341, 341, 341, 341, 1248, 341, 341, 341, 341, 1249, 341, - 341, 341, 341, 1250, 341, 341, 341, 341, 1251, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 1252, 341, 341, - 341, 0, 0, 0, 0, 1253, 1254, 1255, 1256, 1257, 1258, 1259, - 1260, 1261, 1254, 1254, 1254, 1254, 1150, 1154, 1254, 1262, 542, 542, - 1162, 1046, 542, 542, 341, 341, 341, 341, 341, 1150, 1150, 1150, - 1150, 1150, 1150, 1263, 1150, 1150, 1150, 1150, 0, 1150, 1150, 1150, - 1150, 1264, 1150, 1150, 1150, 1150, 1265, 1150, 1150, 1150, 1150, 1266, - 1150, 1150, 1150, 1150, 1267, 1150, 1150, 1150, 1150, 1150, 1150, 1150, - 1150, 1150, 1150, 1150, 1150, 1268, 1150, 1150, 1150, 0, 840, 840, - 840, 840, 840, 840, 840, 840, 555, 840, 840, 840, 840, 840, - 840, 0, 840, 840, 1046, 1046, 1046, 1046, 1046, 840, 840, 840, - 840, 1046, 1046, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 1269, 1270, 341, 341, 341, 341, 1271, - 1271, 1150, 1272, 1150, 1150, 1154, 1150, 1150, 1150, 1150, 1150, 1172, - 1271, 1162, 1162, 1154, 1154, 1150, 1150, 341, 1171, 1171, 1171, 1171, - 1171, 1171, 1171, 1171, 1171, 1171, 1046, 1046, 1046, 1046, 1046, 1046, - 341, 341, 341, 341, 341, 341, 1154, 1154, 1150, 1150, 341, 341, - 341, 341, 1150, 1150, 1150, 341, 1271, 1271, 1271, 341, 341, 1271, - 1271, 1271, 1271, 1271, 1271, 1271, 341, 341, 341, 1150, 1150, 1150, - 1150, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 1150, 1271, 1154, 1150, 1150, 1271, 1271, 1271, 1271, 1271, - 1271, 555, 341, 1271, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, - 1171, 1171, 1271, 1271, 1271, 1150, 840, 840, 1273, 1274, 1275, 1276, - 1277, 1278, 1279, 1280, 1281, 1282, 1283, 1284, 1285, 1286, 1287, 1288, - 1289, 1290, 1291, 1292, 1293, 1294, 1295, 1296, 1297, 1298, 1299, 1300, - 1301, 1302, 1303, 1304, 1305, 1306, 1307, 1308, 1309, 1310, 0, 1311, - 0, 0, 0, 0, 0, 1312, 0, 0, 1313, 1314, 1315, 1316, - 1317, 1318, 1319, 1320, 1321, 1322, 1323, 1324, 1325, 1326, 1327, 1328, - 1329, 1330, 1331, 1332, 1333, 1334, 1335, 1336, 1337, 1338, 1339, 1340, - 1341, 1342, 1343, 1344, 1345, 1346, 1347, 1348, 1349, 1350, 1351, 1352, - 1353, 1354, 1355, 1046, 1356, 1357, 1358, 1359, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1361, 1362, 1363, 1363, 1363, - 1363, 1363, 1363, 1363, 1363, 1363, 1363, 1363, 1363, 1363, 1363, 1363, - 1363, 1363, 1363, 1363, 1363, 1363, 1363, 1363, 1363, 1363, 1363, 1363, - 1363, 1363, 1363, 1363, 1363, 1363, 1363, 1363, 1363, 1363, 1363, 1363, - 1363, 1363, 1363, 1363, 1363, 1363, 1363, 1363, 1363, 1363, 1363, 1363, - 1363, 1363, 1363, 1363, 1363, 1363, 1363, 1363, 1363, 1363, 1363, 1363, - 1363, 1363, 1363, 1363, 1363, 1363, 1363, 1363, 1364, 1364, 1364, 1364, - 1364, 1364, 1364, 1364, 1364, 1364, 1364, 1364, 1364, 1364, 1364, 1364, - 1364, 1364, 1364, 1364, 1364, 1364, 1364, 1364, 1364, 1364, 1364, 1364, - 1364, 1364, 1364, 1364, 1364, 1364, 1364, 1364, 1364, 1364, 1364, 1364, - 1364, 1364, 1364, 1364, 1364, 1364, 1364, 1364, 1364, 1364, 1364, 1364, - 1364, 1364, 1364, 1364, 1364, 1364, 1364, 1364, 1364, 1364, 1364, 1364, - 1364, 1364, 1364, 1364, 1364, 1364, 1364, 1364, 1364, 1364, 1364, 1364, - 1364, 1364, 1364, 1364, 1364, 1364, 1364, 1364, 1364, 1364, 1364, 1364, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 0, 341, 341, 341, 341, 0, 0, 341, 341, 341, 341, - 341, 341, 341, 0, 341, 0, 341, 341, 341, 341, 0, 0, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 0, 341, 341, 341, 341, 0, 0, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 0, 341, 341, - 341, 341, 0, 0, 341, 341, 341, 341, 341, 341, 341, 0, - 341, 0, 341, 341, 341, 341, 0, 0, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 0, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 0, 341, 341, - 341, 341, 0, 0, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 0, - 0, 542, 542, 542, 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046, - 1046, 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1181, - 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1181, 0, 0, 0, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 0, 0, 0, 0, 0, 0, 1365, 1366, 1367, 1368, - 1369, 1370, 1371, 1372, 1373, 1374, 1375, 1376, 1377, 1378, 1379, 1380, - 1381, 1382, 1383, 1384, 1385, 1386, 1387, 1388, 1389, 1390, 1391, 1392, - 1393, 1394, 1395, 1396, 1397, 1398, 1399, 1400, 1401, 1402, 1403, 1404, - 1405, 1406, 1407, 1408, 1409, 1410, 1411, 1412, 1413, 1414, 1415, 1416, - 1417, 1418, 1419, 1420, 1421, 1422, 1423, 1424, 1425, 1426, 1427, 1428, - 1429, 1430, 1431, 1432, 1433, 1434, 1435, 1436, 1437, 1438, 1439, 1440, - 1441, 1442, 1443, 1444, 1445, 1446, 1447, 1448, 1449, 1450, 0, 0, - 1451, 1452, 1453, 1454, 1455, 1456, 0, 0, 1086, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 840, 1046, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 8, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 12, 13, 0, 0, 0, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 1046, - 1046, 1046, 1457, 1457, 1457, 341, 341, 341, 341, 341, 341, 341, - 341, 0, 0, 0, 0, 0, 0, 0, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 0, 341, 341, - 341, 341, 1150, 1150, 1162, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 1150, 1150, - 1162, 1046, 1046, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 1150, 1150, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 0, 341, 341, - 341, 0, 1150, 1150, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 576, 576, 1154, 1150, - 1150, 1150, 1150, 1150, 1150, 1150, 1154, 1154, 1154, 1154, 1154, 1154, - 1154, 1154, 1150, 1154, 1154, 1150, 1150, 1150, 1150, 1150, 1150, 1150, - 1150, 1150, 1162, 1150, 1046, 1046, 1046, 525, 1046, 1046, 1046, 11, - 341, 542, 0, 0, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, - 1171, 1171, 0, 0, 0, 0, 0, 0, 1210, 1210, 1210, 1210, - 1210, 1210, 1210, 1210, 1210, 1210, 0, 0, 0, 0, 0, 0, - 9, 9, 9, 9, 9, 9, 1086, 9, 9, 9, 9, 576, - 576, 576, 1458, 0, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, - 1171, 1171, 0, 0, 0, 0, 0, 0, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 525, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 0, 0, 0, 0, 0, 0, 0, 341, 341, 341, 341, - 341, 1150, 1150, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 1088, 341, 0, 0, 0, 0, 0, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 0, - 1150, 1150, 1150, 1154, 1154, 1154, 1154, 1150, 1150, 1154, 1154, 1154, - 0, 0, 0, 0, 1154, 1154, 1150, 1154, 1154, 1154, 1154, 1154, - 1154, 1087, 542, 555, 0, 0, 0, 0, 77, 0, 0, 0, - 9, 9, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 0, 0, 341, 341, 341, 341, - 341, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 0, 0, 0, 0, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 0, 0, 0, 0, 0, 0, 1171, 1171, 1171, 1171, - 1171, 1171, 1171, 1171, 1171, 1171, 1181, 0, 0, 0, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 542, 555, 1154, 1154, 1150, - 0, 0, 1046, 1046, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 1154, 1150, 1154, - 1150, 1150, 1150, 1150, 1150, 1150, 1150, 0, 1162, 1271, 1150, 1271, - 1271, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1154, 1154, 1154, - 1154, 1154, 1154, 1150, 1150, 542, 542, 542, 542, 542, 542, 542, - 542, 0, 0, 555, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, - 1171, 1171, 0, 0, 0, 0, 0, 0, 1171, 1171, 1171, 1171, - 1171, 1171, 1171, 1171, 1171, 1171, 0, 0, 0, 0, 0, 0, - 1046, 1046, 1046, 1046, 1046, 1046, 1046, 525, 1046, 1046, 1046, 1046, - 1046, 1046, 0, 0, 542, 542, 542, 542, 542, 555, 555, 555, - 555, 555, 555, 542, 542, 555, 841, 555, 555, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1150, 1150, 1150, 1150, 1154, 1459, 1460, 1461, 1462, 1463, 1464, 1465, - 1466, 1467, 1468, 341, 341, 1469, 1470, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 1172, 1471, 1150, 1150, 1150, 1150, 1472, 1473, - 1474, 1475, 1476, 1477, 1478, 1479, 1480, 1481, 1482, 341, 341, 341, - 341, 341, 341, 341, 0, 0, 0, 0, 1171, 1171, 1171, 1171, - 1171, 1171, 1171, 1171, 1171, 1171, 1046, 1046, 1046, 1046, 1046, 1046, - 1046, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 542, - 555, 542, 542, 542, 542, 542, 542, 542, 840, 840, 840, 840, - 840, 840, 840, 840, 840, 0, 0, 0, 1150, 1150, 1154, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 1154, 1150, 1150, 1150, 1150, 1154, 1154, - 1150, 1150, 1482, 1162, 1150, 1150, 341, 341, 1171, 1171, 1171, 1171, - 1171, 1171, 1171, 1171, 1171, 1171, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 1172, 1154, 1150, 1150, 1154, 1154, 1154, 1150, 1154, 1150, - 1150, 1150, 1482, 1482, 0, 0, 0, 0, 0, 0, 0, 0, - 1046, 1046, 1046, 1046, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, - 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1154, 1154, 1150, 1172, - 0, 0, 0, 1046, 1046, 1046, 1046, 1046, 1171, 1171, 1171, 1171, - 1171, 1171, 1171, 1171, 1171, 1171, 0, 0, 0, 341, 341, 341, - 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 525, 525, 525, 525, 525, 525, 1046, 1046, - 1483, 1484, 1485, 1486, 1487, 1487, 1488, 1489, 1490, 0, 0, 0, - 0, 0, 0, 0, 1491, 1492, 1493, 1494, 1495, 1496, 1497, 1498, - 1499, 1500, 1501, 1502, 1503, 1504, 1505, 1506, 1507, 1508, 1509, 1510, - 1511, 1512, 1513, 1514, 1515, 1516, 1517, 1518, 1519, 1520, 1521, 1522, - 1523, 1524, 1525, 1526, 1527, 1528, 1529, 1530, 1531, 1532, 1533, 0, - 0, 1534, 1535, 1536, 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046, - 0, 0, 0, 0, 0, 0, 0, 0, 542, 542, 542, 1046, - 568, 555, 555, 555, 555, 555, 542, 542, 555, 555, 555, 555, - 542, 1154, 568, 568, 568, 568, 568, 568, 568, 341, 341, 341, - 341, 555, 341, 341, 341, 341, 341, 341, 542, 341, 341, 1154, - 542, 542, 341, 0, 0, 0, 0, 0, 215, 215, 215, 215, - 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, - 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, - 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, - 215, 215, 215, 215, 1537, 1538, 1539, 525, 1540, 1541, 1542, 1543, - 1544, 1545, 1546, 1547, 1548, 1549, 1550, 525, 1551, 1552, 1553, 1554, - 1555, 1556, 1557, 1558, 1559, 1560, 1561, 1562, 1563, 1564, 1565, 1566, - 1567, 1568, 525, 1569, 1570, 1571, 1572, 1573, 1574, 1575, 1576, 1577, - 1578, 1579, 1580, 1581, 1582, 1583, 1584, 1585, 1586, 1587, 1588, 1589, - 1590, 1591, 1592, 1593, 1594, 1595, 1596, 215, 215, 215, 215, 215, - 215, 215, 215, 215, 215, 215, 215, 215, 1597, 1598, 215, 215, - 215, 1599, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, - 215, 215, 215, 215, 215, 215, 1600, 215, 215, 215, 215, 215, - 215, 215, 215, 215, 215, 215, 215, 1601, 1602, 1603, 1604, 1567, - 1605, 1606, 1607, 1608, 1609, 1610, 1611, 1612, 1613, 1614, 1615, 1616, - 1617, 1618, 1619, 1620, 1621, 1622, 1623, 1624, 1625, 1626, 1627, 1628, - 1629, 1630, 1631, 1632, 1633, 1634, 1635, 1636, 542, 542, 555, 542, - 542, 542, 542, 542, 542, 542, 555, 542, 542, 578, 1637, 555, - 557, 542, 542, 542, 542, 542, 542, 542, 542, 542, 542, 542, - 542, 542, 542, 542, 542, 542, 542, 542, 542, 542, 542, 542, - 542, 542, 542, 542, 542, 542, 542, 542, 542, 542, 542, 542, - 542, 542, 554, 1088, 1088, 555, 0, 542, 577, 555, 542, 555, - 1638, 1639, 1640, 1641, 1642, 1643, 1644, 1645, 1646, 1647, 1648, 1649, - 1650, 1651, 1652, 1653, 1654, 1655, 1656, 1657, 1658, 1659, 1660, 1661, - 1662, 1663, 1664, 1665, 1666, 1667, 1668, 1669, 1670, 1671, 1672, 1673, - 1674, 1675, 1676, 1677, 1678, 1679, 1680, 1681, 1682, 1683, 1684, 1685, - 1686, 1687, 1688, 1689, 1690, 1691, 1692, 1693, 1694, 1695, 1696, 1697, - 1698, 1699, 1700, 1701, 1702, 1703, 1704, 1705, 1706, 1707, 1708, 1709, - 1710, 1711, 1712, 1713, 1714, 1715, 1716, 1717, 1718, 1719, 1720, 1721, - 1722, 1723, 1724, 1725, 1726, 1727, 1728, 1729, 1730, 1731, 1732, 1733, - 1734, 1735, 1736, 1737, 1738, 1739, 1740, 1741, 1742, 1743, 1744, 1745, - 1746, 1747, 1748, 1749, 1750, 1751, 1752, 1753, 1754, 1755, 1756, 1757, - 1758, 1759, 1760, 1761, 1762, 1763, 1764, 1765, 1766, 1767, 1768, 1769, - 1770, 1771, 1772, 1773, 1774, 1775, 1776, 1777, 1778, 1779, 1780, 1781, - 1782, 1783, 1784, 1785, 1786, 1787, 1788, 1789, 1790, 1791, 1792, 1793, - 215, 215, 1794, 215, 1795, 1796, 1797, 1798, 1799, 1800, 1801, 1802, - 1803, 1804, 1805, 1806, 1807, 1808, 1809, 1810, 1811, 1812, 1813, 1814, - 1815, 1816, 1817, 1818, 1819, 1820, 1821, 1822, 1823, 1824, 1825, 1826, - 1827, 1828, 1829, 1830, 1831, 1832, 1833, 1834, 1835, 1836, 1837, 1838, - 1839, 1840, 1841, 1842, 1843, 1844, 1845, 1846, 1847, 1848, 1849, 1850, - 1851, 1852, 1853, 1854, 1855, 1856, 1857, 1858, 1859, 1860, 1861, 1862, - 1863, 1864, 1865, 1866, 1867, 1868, 1869, 1870, 1871, 1872, 1873, 1874, - 1875, 1876, 1877, 1878, 1879, 1880, 1881, 1882, 1883, 1884, 1885, 1886, - 1887, 1888, 1889, 1890, 1891, 1892, 1893, 1894, 1895, 1896, 1897, 1898, - 1899, 1900, 1901, 1902, 1903, 1904, 1905, 1906, 1907, 1908, 1909, 1910, - 1911, 1912, 0, 0, 1913, 1914, 1915, 1916, 1917, 1918, 0, 0, - 1919, 1920, 1921, 1922, 1923, 1924, 1925, 1926, 1927, 1928, 1929, 1930, - 1931, 1932, 1933, 1934, 1935, 1936, 1937, 1938, 1939, 1940, 1941, 1942, - 1943, 1944, 1945, 1946, 1947, 1948, 1949, 1950, 1951, 1952, 1953, 1954, - 1955, 1956, 0, 0, 1957, 1958, 1959, 1960, 1961, 1962, 0, 0, - 1963, 1964, 1965, 1966, 1967, 1968, 1969, 1970, 0, 1971, 0, 1972, - 0, 1973, 0, 1974, 1975, 1976, 1977, 1978, 1979, 1980, 1981, 1982, - 1983, 1984, 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, - 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 0, 0, - 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, - 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024, 2025, 2026, 2027, 2028, - 2029, 2030, 2031, 2032, 2033, 2034, 2035, 2036, 2037, 2038, 2039, 2040, - 2041, 2042, 2043, 2044, 2045, 2046, 2047, 2048, 2049, 2050, 2051, 2052, - 2053, 2054, 2055, 2056, 2057, 0, 2058, 2059, 2060, 2061, 2062, 2063, - 2064, 2065, 2066, 2067, 2068, 2069, 2070, 2071, 2072, 0, 2073, 2074, - 2075, 2076, 2077, 2078, 2079, 2080, 2081, 2082, 2083, 2084, 2085, 2086, - 0, 0, 2087, 2088, 2089, 2090, 2091, 2092, 0, 2093, 2094, 2095, - 2096, 2097, 2098, 2099, 2100, 2101, 2102, 2103, 2104, 2105, 2106, 2107, - 2108, 2109, 2110, 2111, 0, 0, 2112, 2113, 2114, 0, 2115, 2116, - 2117, 2118, 2119, 2120, 2121, 2122, 2123, 0, 2124, 2125, 2126, 2126, - 2126, 2126, 2126, 2127, 2126, 2126, 2126, 1458, 2128, 2129, 2130, 2131, - 1086, 2132, 1086, 1086, 1086, 1086, 9, 2133, 2134, 2135, 2136, 2134, - 2134, 2135, 2136, 2134, 9, 9, 9, 9, 2137, 2138, 2139, 9, - 2140, 2141, 2142, 2143, 2144, 2145, 2146, 76, 10, 10, 10, 2147, - 2148, 9, 2149, 2150, 9, 81, 93, 9, 2151, 9, 2152, 48, - 48, 9, 9, 9, 2153, 12, 13, 2154, 2155, 2156, 9, 9, - 9, 9, 9, 9, 9, 9, 75, 9, 48, 9, 9, 2157, - 9, 9, 9, 9, 9, 9, 9, 2126, 1458, 1458, 1458, 1458, - 1458, 0, 2158, 2159, 2160, 2161, 1458, 1458, 1458, 1458, 1458, 1458, - 2162, 2163, 0, 0, 2164, 2165, 2166, 2167, 2168, 2169, 2170, 2171, - 2172, 2173, 2174, 2175, 2176, 2177, 2178, 2179, 2180, 2181, 2182, 2183, - 2184, 2185, 2186, 2187, 2188, 2189, 2190, 0, 2191, 2192, 2193, 2194, - 2195, 2196, 2197, 2198, 2199, 2200, 2201, 2202, 2203, 0, 0, 0, - 11, 11, 11, 11, 11, 11, 11, 11, 2204, 11, 11, 11, - 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 11, 11, 11, 11, 11, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 542, 542, 568, 568, 542, 542, 542, 542, 568, 568, 568, 542, - 542, 841, 841, 841, 841, 542, 841, 841, 841, 568, 568, 542, - 555, 542, 568, 568, 555, 555, 555, 555, 542, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 2205, 2206, 2207, 2208, 77, 2209, 2210, 2211, 77, 2212, 2213, 2214, - 2214, 2214, 2215, 2216, 2217, 2217, 2218, 2219, 77, 2220, 2221, 77, - 75, 2222, 2223, 2224, 2224, 2224, 77, 77, 2225, 2226, 2227, 77, - 2228, 77, 2229, 77, 2228, 77, 2230, 2231, 2232, 2207, 84, 2233, - 2234, 2235, 2236, 2237, 2238, 2239, 2240, 2241, 2242, 2243, 77, 2244, - 2245, 2246, 2247, 2248, 2249, 75, 75, 75, 75, 2250, 2251, 2233, - 2252, 2253, 77, 75, 77, 77, 2254, 840, 2255, 2256, 2257, 2258, - 2259, 2260, 2261, 2262, 2263, 2264, 2265, 2266, 2267, 2268, 2269, 2270, - 2271, 2272, 2273, 2274, 2275, 2276, 2277, 2278, 2279, 2280, 2281, 2282, - 2283, 2284, 2285, 2286, 2287, 2288, 2289, 2290, 2291, 2292, 2293, 2294, - 2295, 2296, 2297, 2298, 2299, 2300, 2301, 2302, 1457, 1457, 1457, 2303, - 2304, 1457, 1457, 1457, 1457, 2305, 77, 77, 0, 0, 0, 0, - 2306, 75, 2307, 75, 2308, 79, 79, 79, 79, 79, 2309, 2310, - 77, 77, 77, 77, 75, 77, 77, 75, 77, 77, 75, 77, - 77, 79, 79, 77, 77, 77, 2311, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 2312, 2313, 2314, 2315, 77, 2316, 77, 2317, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 75, 75, 75, 75, 75, 75, 75, 75, - 75, 75, 75, 75, 75, 2318, 2318, 2319, 2320, 75, 75, 75, - 2321, 2322, 2318, 2323, 2324, 2318, 75, 75, 75, 2318, 14, 85, - 75, 2318, 2318, 75, 75, 75, 2318, 2318, 2318, 2318, 75, 2318, - 2318, 2318, 2318, 2325, 2326, 2327, 2328, 75, 75, 75, 75, 2318, - 2329, 2330, 2318, 2331, 2332, 2318, 2318, 2318, 75, 75, 75, 75, - 75, 2318, 75, 2318, 2333, 2318, 2318, 2318, 2318, 2334, 2318, 2335, - 2336, 2337, 2318, 2338, 2339, 2340, 2318, 2318, 2318, 2341, 75, 75, - 75, 75, 2318, 2318, 2318, 2318, 75, 75, 75, 75, 75, 75, - 75, 75, 75, 2318, 2342, 2343, 2344, 75, 2345, 2346, 2318, 2318, - 2318, 2318, 2318, 2318, 75, 2347, 2348, 2349, 2350, 2351, 2352, 2353, - 2354, 2355, 2356, 2357, 2358, 2359, 2360, 2361, 2362, 2363, 2318, 2318, - 2364, 2365, 2366, 2367, 2368, 2369, 2370, 2371, 2372, 2373, 2318, 2318, - 2318, 75, 75, 2318, 2318, 2374, 2375, 75, 75, 75, 75, 75, - 2318, 75, 75, 75, 75, 75, 75, 75, 75, 75, 2376, 2318, - 75, 75, 2318, 2318, 2377, 2378, 2318, 2379, 2380, 2381, 2382, 2383, - 2318, 2318, 2384, 2385, 2386, 2387, 2318, 2318, 2318, 75, 75, 75, - 75, 75, 2318, 2318, 75, 75, 75, 75, 75, 75, 75, 75, - 75, 2318, 2318, 2318, 2318, 2318, 75, 75, 2318, 2318, 75, 75, - 75, 75, 2318, 2318, 2318, 2318, 2318, 2318, 2318, 2318, 2318, 2318, - 2388, 2389, 2390, 2391, 2318, 2318, 2318, 2318, 2318, 2318, 2392, 2393, - 2394, 2395, 75, 75, 2318, 2318, 2318, 2318, 2318, 2318, 2318, 2318, - 2318, 2318, 2318, 2318, 2318, 2318, 2318, 2318, 77, 77, 77, 77, - 77, 77, 77, 77, 12, 13, 12, 13, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 2396, 2396, - 77, 77, 77, 77, 2318, 2318, 77, 77, 77, 77, 77, 77, - 79, 2397, 2398, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, - 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, - 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, - 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, - 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, - 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 77, - 75, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 79, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 840, 77, 77, 77, 77, 77, 75, 75, 75, 75, 75, - 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, - 75, 75, 75, 75, 75, 75, 75, 75, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 79, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 75, 75, 75, 75, 75, 75, 77, 77, 77, 77, 77, 77, - 77, 2396, 2396, 2396, 2396, 79, 79, 79, 2396, 79, 79, 2396, - 77, 77, 77, 77, 79, 79, 79, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 2399, 2400, 2401, 2402, 2403, 2404, 2405, 2406, 2407, 2408, 2409, 2410, - 2411, 2412, 2413, 2414, 2415, 2416, 2417, 2418, 2419, 2420, 2421, 2422, - 2423, 2424, 2425, 2426, 2427, 2428, 2429, 2430, 2431, 2432, 2433, 2434, - 2435, 2436, 2437, 2438, 2439, 2440, 2441, 2442, 2443, 2444, 2445, 2446, - 2447, 2448, 2449, 2450, 2451, 2452, 2453, 2454, 2455, 2456, 2457, 2458, - 2459, 2460, 2461, 2462, 2463, 2464, 2465, 2466, 2467, 2468, 2469, 2470, - 2471, 2472, 2473, 2474, 2475, 2476, 2477, 2478, 2479, 2480, 2481, 2482, - 2483, 2484, 2485, 2486, 2487, 2488, 2489, 2490, 2491, 2492, 2493, 2494, - 2495, 2496, 2497, 2498, 2499, 2500, 2501, 2502, 2503, 2504, 2505, 2506, - 2507, 2508, 2509, 2510, 2511, 2512, 2513, 2514, 2515, 2516, 2517, 2518, - 2519, 2520, 2521, 2522, 2523, 2524, 2525, 2526, 2527, 2528, 2529, 2530, - 2531, 2532, 2533, 2534, 2535, 2536, 2537, 1210, 1210, 1210, 1210, 1210, - 1210, 1210, 1210, 1210, 1210, 1210, 1210, 1210, 1210, 1210, 1210, 1210, - 1210, 1210, 1210, 1210, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 79, 79, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 79, 75, 77, 77, 77, 77, - 77, 77, 77, 77, 79, 75, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 75, 75, 75, 2538, 2538, 2539, 2539, 75, 79, 79, 79, 79, - 79, 79, 77, 79, 79, 79, 79, 79, 79, 79, 79, 79, - 79, 79, 79, 77, 2396, 2396, 79, 79, 79, 79, 79, 79, - 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, - 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, - 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, - 79, 79, 79, 79, 79, 79, 79, 79, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 79, 79, 79, 79, - 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, - 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 2538, - 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, - 79, 79, 79, 2396, 79, 79, 79, 79, 79, 79, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 79, 79, 79, 2396, - 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, - 79, 2396, 79, 79, 79, 79, 79, 79, 79, 79, 2396, 2396, - 2540, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, - 79, 79, 79, 79, 79, 2396, 2396, 79, 79, 79, 79, 79, - 2396, 2396, 79, 79, 79, 79, 79, 79, 79, 79, 2396, 79, - 79, 79, 79, 79, 2396, 79, 79, 79, 79, 79, 79, 79, - 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, - 79, 79, 2396, 79, 79, 79, 79, 79, 79, 79, 2396, 2396, - 79, 2396, 79, 79, 79, 79, 2396, 79, 79, 2396, 79, 79, - 79, 79, 79, 79, 79, 2396, 77, 77, 79, 79, 2396, 2396, - 79, 79, 79, 79, 79, 79, 79, 77, 79, 77, 79, 77, - 77, 77, 77, 77, 77, 79, 77, 77, 77, 79, 77, 77, - 77, 77, 77, 77, 2396, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 79, 79, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 79, 77, 77, 79, - 77, 77, 77, 77, 2396, 77, 2396, 77, 77, 77, 77, 2396, - 2396, 2396, 77, 2396, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 79, 79, 79, 79, 79, 12, 13, 12, 13, - 12, 13, 12, 13, 12, 13, 12, 13, 12, 13, 1210, 1210, - 1210, 1210, 1210, 1210, 1210, 1210, 1210, 1210, 1210, 1210, 1210, 1210, - 1210, 1210, 1210, 1210, 1210, 1210, 1210, 1210, 1210, 1210, 1210, 1210, - 1210, 1210, 1210, 1210, 77, 2396, 2396, 2396, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 79, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 2396, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 2396, - 2318, 75, 75, 2318, 2318, 12, 13, 75, 2318, 2318, 75, 2318, - 2318, 2318, 75, 75, 75, 75, 75, 2318, 2318, 2318, 2318, 75, - 75, 75, 75, 75, 2318, 2318, 2318, 75, 75, 75, 2318, 2318, - 2318, 2318, 12, 13, 12, 13, 12, 13, 12, 13, 12, 13, - 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, - 75, 75, 75, 75, 840, 840, 840, 840, 840, 840, 840, 840, - 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, - 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, - 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, - 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, - 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, - 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, - 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, - 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, - 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, - 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, - 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, - 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, - 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, - 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, - 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, - 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, - 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, - 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, - 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, - 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, - 840, 840, 840, 840, 840, 840, 840, 840, 75, 75, 75, 75, - 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, - 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, - 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, - 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, - 2538, 2538, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, - 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, - 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, - 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, - 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, - 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, - 75, 75, 75, 75, 75, 75, 75, 12, 13, 12, 13, 12, - 13, 12, 13, 12, 13, 12, 13, 12, 13, 12, 13, 12, - 13, 12, 13, 12, 13, 75, 75, 2318, 2318, 2318, 2318, 2318, - 2318, 75, 2318, 2318, 2318, 2318, 2318, 2318, 2318, 2318, 2318, 2318, - 2318, 2318, 2318, 2318, 75, 75, 75, 75, 75, 75, 75, 75, - 2318, 75, 75, 75, 75, 75, 75, 75, 2318, 2318, 2318, 2318, - 2318, 2318, 75, 75, 75, 2318, 75, 75, 75, 75, 2318, 2318, - 2318, 2318, 2318, 75, 2318, 2318, 75, 75, 12, 13, 12, 13, - 2318, 75, 75, 75, 75, 2318, 75, 2318, 2318, 2318, 75, 75, - 2318, 2318, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, - 2318, 2318, 2318, 2318, 2318, 2318, 75, 75, 12, 13, 75, 75, - 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 2318, 2318, - 2541, 2318, 2318, 2318, 2318, 2318, 2318, 2318, 2318, 2318, 2318, 2318, - 2318, 2318, 2318, 2318, 2318, 75, 2318, 2318, 2318, 2318, 75, 75, - 2318, 75, 2318, 75, 75, 2318, 75, 2318, 2318, 2318, 2318, 75, - 75, 75, 75, 75, 2318, 2318, 75, 75, 75, 75, 75, 75, - 2318, 2318, 2318, 75, 75, 75, 75, 75, 75, 75, 75, 75, - 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, - 75, 75, 75, 2318, 2318, 75, 75, 75, 75, 75, 75, 75, - 75, 75, 75, 75, 2318, 2318, 75, 75, 75, 75, 2318, 2318, - 2318, 2318, 75, 2318, 2318, 75, 75, 2318, 2542, 2543, 2544, 75, - 75, 2318, 2318, 2318, 2318, 2318, 2318, 2318, 2318, 2318, 2318, 2318, - 2318, 2318, 2318, 2318, 2318, 2318, 2318, 2318, 2318, 2318, 2318, 2318, - 2318, 2318, 2318, 2318, 2318, 2318, 2318, 2318, 2318, 2318, 2318, 2318, - 2318, 2318, 2318, 2318, 2318, 2318, 2318, 2318, 75, 75, 2318, 2318, - 2318, 2318, 2318, 2318, 2318, 2318, 75, 2318, 2318, 2318, 2318, 2318, - 2318, 2318, 2318, 2318, 2318, 2318, 2318, 2318, 2318, 2318, 2318, 2318, - 2318, 2318, 2318, 2318, 2318, 2318, 2318, 2318, 2318, 2318, 2318, 2318, - 2318, 2318, 2318, 2318, 2318, 2318, 2318, 2318, 2318, 2318, 2318, 75, - 75, 75, 75, 75, 2545, 2546, 2318, 75, 75, 75, 2318, 2318, - 2318, 2318, 2318, 75, 75, 75, 75, 75, 2318, 2318, 2318, 75, - 75, 75, 75, 2318, 75, 75, 75, 2318, 2318, 2318, 2318, 2318, - 75, 2318, 75, 75, 77, 77, 77, 77, 77, 79, 79, 79, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 2396, 2396, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 75, 75, 75, 75, 75, 75, 75, 75, - 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, - 75, 77, 77, 75, 75, 75, 75, 75, 75, 77, 77, 77, - 2396, 77, 77, 77, 77, 2396, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 0, 0, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 0, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 2547, 77, 2548, 2549, 2550, 2551, - 2552, 2553, 2554, 2555, 2556, 2557, 2558, 2559, 2560, 2561, 2562, 2563, - 2564, 2565, 2566, 2567, 2568, 2569, 2570, 2571, 2572, 2573, 2574, 2575, - 2576, 2577, 2578, 2579, 2580, 2581, 2582, 2583, 2584, 2585, 2586, 2587, - 2588, 2589, 2590, 2591, 2592, 2593, 2594, 0, 2595, 2596, 2597, 2598, - 2599, 2600, 2601, 2602, 2603, 2604, 2605, 2606, 2607, 2608, 2609, 2610, - 2611, 2612, 2613, 2614, 2615, 2616, 2617, 2618, 2619, 2620, 2621, 2622, - 2623, 2624, 2625, 2626, 2627, 2628, 2629, 2630, 2631, 2632, 2633, 2634, - 2635, 2636, 2637, 2638, 2639, 2640, 2641, 0, 2642, 2643, 2644, 2645, - 2646, 2647, 2648, 2649, 2650, 2651, 2652, 2653, 2654, 2655, 2656, 2657, - 2658, 215, 2659, 2660, 215, 2661, 2662, 215, 215, 215, 215, 215, - 2663, 2664, 2665, 2666, 2667, 2668, 2669, 2670, 2671, 2672, 2673, 2674, - 2675, 2676, 2677, 2678, 2679, 2680, 2681, 2682, 2683, 2684, 2685, 2686, - 2687, 2688, 2689, 2690, 2691, 2692, 2693, 2694, 2695, 2696, 2697, 2698, - 2699, 2700, 2701, 2702, 2703, 2704, 2705, 2706, 2707, 2708, 2709, 2710, - 2711, 2712, 2713, 2714, 2715, 2716, 2717, 2718, 2719, 2720, 2721, 2722, - 2723, 2724, 2725, 2726, 2727, 2728, 2729, 2730, 2731, 2732, 2733, 2734, - 2735, 2736, 2737, 2738, 2739, 2740, 2741, 2742, 2743, 2744, 2745, 2746, - 2747, 2748, 2749, 2750, 2751, 2752, 2753, 2754, 2755, 2756, 2757, 2758, - 2759, 2760, 2761, 2762, 2763, 2764, 2765, 2766, 215, 77, 77, 77, - 77, 77, 77, 2767, 2768, 2769, 2770, 542, 542, 542, 2771, 2772, - 0, 0, 0, 0, 0, 9, 9, 9, 9, 1210, 9, 9, - 2773, 2774, 2775, 2776, 2777, 2778, 2779, 2780, 2781, 2782, 2783, 2784, - 2785, 2786, 2787, 2788, 2789, 2790, 2791, 2792, 2793, 2794, 2795, 2796, - 2797, 2798, 2799, 2800, 2801, 2802, 2803, 2804, 2805, 2806, 2807, 2808, - 2809, 2810, 0, 2811, 0, 0, 0, 0, 0, 2812, 0, 0, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 0, 0, 0, 0, - 0, 0, 0, 2813, 1046, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 1162, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 341, 341, 341, 341, 341, 341, 341, 0, - 341, 341, 341, 341, 341, 341, 341, 0, 341, 341, 341, 341, - 341, 341, 341, 0, 341, 341, 341, 341, 341, 341, 341, 0, - 341, 341, 341, 341, 341, 341, 341, 0, 341, 341, 341, 341, - 341, 341, 341, 0, 341, 341, 341, 341, 341, 341, 341, 0, - 341, 341, 341, 341, 341, 341, 341, 0, 542, 542, 542, 542, - 542, 542, 542, 542, 542, 542, 542, 542, 542, 542, 542, 542, - 542, 542, 542, 542, 542, 542, 542, 542, 542, 542, 542, 542, - 542, 542, 542, 542, 9, 9, 81, 93, 81, 93, 9, 9, - 9, 81, 93, 9, 81, 93, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 1086, 9, 9, 1086, 9, 81, 93, 9, 9, - 81, 93, 12, 13, 12, 13, 12, 13, 12, 13, 9, 9, - 9, 9, 9, 524, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 1086, 1086, 9, 9, 9, 9, 1086, 9, 2136, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 77, 77, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, - 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, - 2814, 2814, 0, 2814, 2814, 2814, 2814, 2815, 2814, 2814, 2814, 2814, - 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, - 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, - 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, - 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, - 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, - 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, - 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2816, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 2817, 2818, 2819, 2820, - 2821, 2822, 2823, 2824, 2825, 2826, 2827, 2828, 2829, 2830, 2831, 2832, - 2833, 2834, 2835, 2836, 2837, 2838, 2839, 2840, 2841, 2842, 2843, 2844, - 2845, 2846, 2847, 2848, 2849, 2850, 2851, 2852, 2853, 2854, 2855, 2856, - 2857, 2858, 2859, 2860, 2861, 2862, 2863, 2864, 2865, 2866, 2867, 2868, - 2869, 2870, 2871, 2872, 2873, 2874, 2875, 2876, 2877, 2878, 2879, 2880, - 2881, 2882, 2883, 2884, 2885, 2886, 2887, 2888, 2889, 2890, 2891, 2892, - 2893, 2894, 2895, 2896, 2897, 2898, 2899, 2900, 2901, 2902, 2903, 2904, - 2905, 2906, 2907, 2908, 2909, 2910, 2911, 2912, 2913, 2914, 2915, 2916, - 2917, 2918, 2919, 2920, 2921, 2922, 2923, 2924, 2925, 2926, 2927, 2928, - 2929, 2930, 2931, 2932, 2933, 2934, 2935, 2936, 2937, 2938, 2939, 2940, - 2941, 2942, 2943, 2944, 2945, 2946, 2947, 2948, 2949, 2950, 2951, 2952, - 2953, 2954, 2955, 2956, 2957, 2958, 2959, 2960, 2961, 2962, 2963, 2964, - 2965, 2966, 2967, 2968, 2969, 2970, 2971, 2972, 2973, 2974, 2975, 2976, - 2977, 2978, 2979, 2980, 2981, 2982, 2983, 2984, 2985, 2986, 2987, 2988, - 2989, 2990, 2991, 2992, 2993, 2994, 2995, 2996, 2997, 2998, 2999, 3000, - 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009, 3010, 3011, 3012, - 3013, 3014, 3015, 3016, 3017, 3018, 3019, 3020, 3021, 3022, 3023, 3024, - 3025, 3026, 3027, 3028, 3029, 3030, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 2814, 2814, 2814, 2814, - 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 0, 0, 0, 0, - 3031, 3032, 3032, 3032, 2814, 3033, 3034, 3035, 3036, 3037, 3036, 3037, - 3036, 3037, 3036, 3037, 3036, 3037, 2814, 2814, 3036, 3037, 3036, 3037, - 3036, 3037, 3036, 3037, 3038, 3039, 3040, 3040, 2814, 3035, 3035, 3035, - 3035, 3035, 3035, 3035, 3035, 3035, 3041, 1088, 554, 1087, 3042, 3042, - 3043, 3033, 3033, 3033, 3033, 3033, 3044, 2814, 3045, 3046, 3047, 3033, - 3034, 3048, 2814, 77, 0, 3034, 3034, 3034, 3034, 3034, 3049, 3034, - 3034, 3034, 3034, 3050, 3051, 3052, 3053, 3054, 3055, 3056, 3057, 3058, - 3059, 3060, 3061, 3062, 3063, 3064, 3065, 3066, 3067, 3068, 3069, 3070, - 3071, 3072, 3073, 3034, 3074, 3075, 3076, 3077, 3078, 3079, 3034, 3034, - 3034, 3034, 3034, 3080, 3081, 3082, 3083, 3084, 3085, 3086, 3087, 3088, - 3089, 3090, 3091, 3092, 3093, 3094, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3095, 3034, 3034, 0, 0, 3096, 3097, 3098, - 3099, 3100, 3101, 3102, 3038, 3034, 3034, 3034, 3034, 3034, 3103, 3034, - 3034, 3034, 3034, 3104, 3105, 3106, 3107, 3108, 3109, 3110, 3111, 3112, - 3113, 3114, 3115, 3116, 3117, 3118, 3119, 3120, 3121, 3122, 3123, 3124, - 3125, 3126, 3127, 3034, 3128, 3129, 3130, 3131, 3132, 3133, 3034, 3034, - 3034, 3034, 3034, 3134, 3135, 3136, 3137, 3138, 3139, 3140, 3141, 3142, - 3143, 3144, 3145, 3146, 3147, 3148, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3149, - 3150, 3151, 3152, 3034, 3153, 3034, 3034, 3154, 3155, 3156, 3157, 3032, - 3033, 3158, 3159, 3160, 0, 0, 0, 0, 0, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 0, 3161, 3162, 3163, 3164, 3165, 3166, 3167, - 3168, 3169, 3170, 3171, 3172, 3173, 3174, 3175, 3176, 3177, 3178, 3179, - 3180, 3181, 3182, 3183, 3184, 3185, 3186, 3187, 3188, 3189, 3190, 3191, - 3192, 3193, 3194, 3195, 3196, 3197, 3198, 3199, 3200, 3201, 3202, 3203, - 3204, 3205, 3206, 3207, 3208, 3209, 3210, 3211, 3212, 3213, 3214, 3215, - 3216, 3217, 3218, 3219, 3220, 3221, 3222, 3223, 3224, 3225, 3226, 3227, - 3228, 3229, 3230, 3231, 3232, 3233, 3234, 3235, 3236, 3237, 3238, 3239, - 3240, 3241, 3242, 3243, 3244, 3245, 3246, 3247, 3248, 3249, 3250, 3251, - 3252, 3253, 3254, 0, 3255, 3255, 3256, 3257, 3258, 3259, 3260, 3261, - 3262, 3263, 3264, 3265, 3266, 3267, 3268, 3269, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, - 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, - 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, - 2814, 2814, 2814, 2814, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3270, 3271, 3272, 3273, - 3274, 3275, 3276, 3277, 3278, 3279, 3280, 3281, 3282, 3283, 3284, 3285, - 3286, 3287, 3288, 3289, 3290, 3291, 3292, 3293, 3294, 3295, 3296, 3297, - 3298, 3299, 3300, 0, 3301, 3302, 3303, 3304, 3305, 3306, 3307, 3308, - 3309, 3310, 3311, 3312, 3313, 3314, 3315, 3316, 3317, 3318, 3319, 3320, - 3321, 3322, 3323, 3324, 3325, 3326, 3327, 3328, 3329, 3330, 3331, 3332, - 3333, 3334, 3335, 3336, 3337, 3338, 3339, 3340, 1181, 1181, 1181, 1181, - 1181, 1181, 1181, 1181, 3341, 3342, 3343, 3344, 3345, 3346, 3347, 3348, - 3349, 3350, 3351, 3352, 3353, 3354, 3355, 3356, 3357, 3358, 3359, 3360, - 3361, 3362, 3363, 3364, 3365, 3366, 3367, 3368, 3369, 3370, 3371, 3372, - 3373, 3374, 3375, 3376, 3377, 3378, 3379, 3380, 3381, 3382, 3383, 3384, - 3385, 3386, 3387, 3255, 3388, 3389, 3390, 3391, 3392, 3393, 3394, 3395, - 3396, 3397, 3398, 3399, 3400, 3401, 3402, 3403, 3404, 3405, 3406, 3407, - 3408, 3409, 3410, 3411, 3412, 3413, 3414, 3415, 3416, 3417, 3418, 3419, - 3420, 3421, 3422, 3423, 3424, 3425, 3426, 3427, 3428, 3429, 3430, 3431, - 3432, 3433, 3434, 3435, 3436, 3437, 3438, 3439, 3440, 3441, 3442, 3443, - 3444, 3445, 3446, 3447, 3448, 3449, 3450, 3451, 3452, 3453, 3454, 3455, - 3456, 3457, 3458, 3459, 3460, 3461, 3462, 3463, 3464, 3465, 3466, 3467, - 3468, 3469, 3470, 3471, 3472, 3473, 3474, 3475, 3476, 3477, 3478, 3479, - 3480, 3481, 3482, 3483, 3484, 3485, 3486, 3487, 3488, 3489, 3490, 3491, - 3492, 3493, 3494, 3495, 3496, 3497, 3498, 3499, 3500, 3501, 3502, 3503, - 3504, 3505, 3506, 3507, 3508, 3509, 3510, 3511, 3512, 3513, 3514, 3515, - 3516, 3517, 3518, 3519, 3520, 3521, 3522, 3523, 3524, 3525, 3526, 3527, - 3528, 3529, 3530, 3531, 3532, 3533, 3534, 3535, 3536, 3537, 3538, 3539, - 3540, 3541, 3542, 3543, 3544, 3545, 3546, 3547, 3548, 3549, 3550, 3551, - 3552, 3553, 3554, 3555, 3556, 3557, 3558, 3559, 3560, 3561, 3562, 3563, - 3564, 3565, 3566, 3567, 3568, 3569, 3570, 3571, 3572, 3573, 3574, 3575, - 3576, 3577, 3578, 3579, 3580, 3581, 3582, 3583, 3584, 3585, 3586, 3587, - 3588, 3589, 3590, 3591, 3592, 3593, 3594, 3595, 3596, 3597, 3598, 3599, - 3600, 3601, 3602, 3603, 3604, 3605, 3606, 3607, 3608, 3609, 3610, 3611, - 3612, 3613, 3614, 3615, 3616, 3617, 3618, 3619, 3620, 3621, 3622, 3623, - 3624, 3625, 3626, 3627, 3628, 3629, 3630, 3631, 3632, 3633, 3634, 3635, - 3636, 3637, 3638, 3639, 3640, 3641, 3642, 3643, 3644, 3645, 3646, 3647, - 3648, 3649, 3650, 3651, 3652, 3653, 3654, 3655, 3656, 3657, 3658, 3659, - 3660, 3661, 3662, 3663, 3664, 3665, 3666, 3667, 3668, 3669, 3670, 3671, - 3672, 3673, 3674, 3675, 3676, 3677, 3678, 3679, 3680, 3681, 3682, 3683, - 3684, 3685, 3686, 3687, 3688, 3689, 3690, 3691, 3692, 3693, 3694, 3695, - 3696, 3697, 3698, 3699, 3700, 3701, 3702, 3703, 3704, 3705, 3706, 3707, - 3708, 3709, 3710, 3711, 3712, 3713, 3714, 3715, 3716, 3717, 3718, 3719, - 3720, 3721, 3722, 3723, 3724, 3725, 3726, 3727, 3728, 3729, 3730, 3731, - 3732, 3733, 3734, 3735, 3736, 3737, 3738, 3739, 3740, 3741, 3742, 3743, - 3744, 3745, 3746, 3747, 3748, 3749, 3750, 3751, 3752, 3753, 3754, 3755, - 3756, 3757, 3758, 3759, 3760, 3761, 3762, 3763, 3764, 3765, 3766, 3767, - 3768, 3769, 3770, 3771, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 0, 0, 0, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3033, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 0, 0, 0, 2814, 2814, 2814, 2814, - 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, - 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, - 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, - 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, - 2814, 2814, 2814, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 525, 525, 525, 525, 525, 525, 1046, 1046, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 525, 9, 9, 9, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 1171, 1171, 1171, 1171, - 1171, 1171, 1171, 1171, 1171, 1171, 341, 341, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 3772, 3773, 3774, 3775, 3776, 3777, 3778, 3779, - 3780, 3781, 3782, 3783, 3784, 3785, 3786, 3787, 3788, 3789, 3790, 3791, - 3792, 3793, 3794, 3795, 3796, 3797, 3798, 3799, 3800, 3801, 3802, 3803, - 3804, 3805, 3806, 3807, 3808, 3809, 3810, 3811, 3812, 3813, 3814, 3815, - 3816, 3817, 341, 542, 841, 841, 841, 9, 542, 542, 542, 542, - 542, 542, 542, 542, 542, 542, 9, 524, 3818, 3819, 3820, 3821, - 3822, 3823, 3824, 3825, 3826, 3827, 3828, 3829, 3830, 3831, 3832, 3833, - 3834, 3835, 3836, 3837, 3838, 3839, 3840, 3841, 3842, 3843, 3844, 3845, - 3846, 3847, 542, 542, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 1457, 1457, 1457, 1457, 1457, 1457, 1457, 1457, 1457, 1457, - 542, 542, 1046, 1046, 1046, 1046, 1046, 1046, 0, 0, 0, 0, - 0, 0, 0, 0, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 524, 524, 524, 524, 524, 524, 524, 524, 524, - 47, 47, 3848, 3849, 3850, 3851, 3852, 3853, 3854, 3855, 3856, 3857, - 3858, 3859, 3860, 3861, 215, 215, 3862, 3863, 3864, 3865, 3866, 3867, - 3868, 3869, 3870, 3871, 3872, 3873, 3874, 3875, 3876, 3877, 3878, 3879, - 3880, 3881, 3882, 3883, 3884, 3885, 3886, 3887, 3888, 3889, 3890, 3891, - 3892, 3893, 3894, 3895, 3896, 3897, 3898, 3899, 3900, 3901, 3902, 3903, - 3904, 3905, 3906, 3907, 3908, 3909, 3910, 3911, 3912, 3913, 3914, 3915, - 3916, 3917, 3918, 3919, 3920, 3921, 3922, 3923, 3924, 215, 215, 215, - 215, 215, 215, 215, 215, 3925, 3926, 3927, 3928, 3929, 3930, 3931, - 3932, 3933, 3934, 3935, 3936, 3937, 3938, 3939, 524, 3940, 3940, 3941, - 3942, 3943, 215, 341, 3944, 3945, 3946, 3947, 3948, 215, 3949, 3950, - 3951, 3952, 3953, 3954, 3955, 3956, 3957, 3958, 3959, 3960, 3961, 3962, - 3963, 3964, 3965, 3966, 3967, 3968, 3969, 3970, 3971, 3972, 3973, 215, - 3974, 3975, 3976, 3977, 3978, 3979, 3980, 3981, 3982, 3983, 3984, 3985, - 3986, 3987, 3988, 3989, 0, 0, 3990, 3991, 3992, 3993, 3994, 3995, - 3996, 3997, 3998, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 3999, 4000, 341, - 4001, 4002, 215, 341, 341, 341, 341, 341, 341, 341, 1150, 341, - 341, 341, 1162, 341, 341, 341, 341, 1150, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 1154, 1154, 1150, 1150, 1154, - 77, 77, 77, 77, 1162, 0, 0, 0, 1181, 1181, 1181, 1181, - 1181, 1181, 840, 840, 11, 84, 0, 0, 0, 0, 0, 0, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 9, 9, 9, 9, 0, 0, 0, 0, - 0, 0, 0, 0, 1154, 1154, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 1154, 1154, 1154, 1154, - 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, - 1162, 1150, 0, 0, 0, 0, 0, 0, 0, 0, 1046, 1046, - 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 0, 0, - 0, 0, 0, 0, 542, 542, 542, 542, 542, 542, 542, 542, - 542, 542, 542, 542, 542, 542, 542, 542, 542, 542, 341, 341, - 341, 341, 341, 341, 1046, 1046, 1046, 341, 1046, 341, 341, 1150, - 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 1150, 1150, 1150, 1150, 1150, 555, 555, 555, 1046, 1046, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 1150, - 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1154, 1482, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1046, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 0, 0, 0, 1150, 1150, 1150, 1154, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 1172, - 1154, 1154, 1150, 1150, 1150, 1150, 1154, 1154, 1150, 1150, 1154, 1154, - 1482, 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046, - 1046, 1046, 0, 525, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, - 1171, 1171, 0, 0, 0, 0, 1046, 1046, 341, 341, 341, 341, - 341, 1150, 525, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 341, 341, - 341, 341, 341, 0, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 1150, 1150, 1150, - 1150, 1150, 1150, 1154, 1154, 1150, 1150, 1154, 1154, 1150, 1150, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 341, 341, 341, 1150, - 341, 341, 341, 341, 341, 341, 341, 341, 1150, 1154, 0, 0, - 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 0, 0, - 1046, 1046, 1046, 1046, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 525, 341, 341, 341, - 341, 341, 341, 840, 840, 840, 341, 1271, 1150, 1271, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 542, 341, 542, 542, 555, 341, 341, 542, 542, 341, 341, 341, - 341, 341, 542, 542, 341, 542, 341, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 341, 341, 525, 1046, 1046, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 1154, - 1150, 1150, 1154, 1154, 1046, 1046, 341, 525, 525, 1154, 1162, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 341, 341, 341, - 341, 341, 341, 0, 0, 341, 341, 341, 341, 341, 341, 0, - 0, 341, 341, 341, 341, 341, 341, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 341, 341, 341, 341, 341, 341, 341, 0, - 341, 341, 341, 341, 341, 341, 341, 0, 215, 215, 215, 215, - 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, - 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, - 215, 215, 215, 215, 215, 215, 215, 4003, 215, 215, 215, 215, - 215, 215, 215, 3940, 4004, 4005, 4006, 4007, 215, 215, 215, 215, - 215, 215, 215, 215, 215, 4008, 47, 47, 0, 0, 0, 0, - 4009, 4010, 4011, 4012, 4013, 4014, 4015, 4016, 4017, 4018, 4019, 4020, - 4021, 4022, 4023, 4024, 4025, 4026, 4027, 4028, 4029, 4030, 4031, 4032, - 4033, 4034, 4035, 4036, 4037, 4038, 4039, 4040, 4041, 4042, 4043, 4044, - 4045, 4046, 4047, 4048, 4049, 4050, 4051, 4052, 4053, 4054, 4055, 4056, - 4057, 4058, 4059, 4060, 4061, 4062, 4063, 4064, 4065, 4066, 4067, 4068, - 4069, 4070, 4071, 4072, 4073, 4074, 4075, 4076, 4077, 4078, 4079, 4080, - 4081, 4082, 4083, 4084, 4085, 4086, 4087, 4088, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 1154, 1154, 1150, 1154, 1154, - 1150, 1154, 1154, 1046, 1154, 1162, 0, 0, 1171, 1171, 1171, 1171, - 1171, 1171, 1171, 1171, 1171, 1171, 0, 0, 0, 0, 0, 0, - 4089, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4089, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4089, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4089, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4089, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4089, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4089, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4089, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4089, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4089, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4089, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4089, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4089, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4089, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4089, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4089, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4089, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4089, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4089, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4089, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4089, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4089, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4089, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4089, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4089, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4089, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4089, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4089, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4089, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4089, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4089, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4089, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4089, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4089, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4089, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4089, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4089, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4089, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4089, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4089, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4089, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4089, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4089, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4089, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4089, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4089, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4089, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4089, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4089, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4089, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4089, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4089, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4089, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4089, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4089, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4089, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4089, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4089, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4089, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4089, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4089, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4089, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4089, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4089, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4089, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4089, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4089, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4089, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4089, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1363, 1363, 1363, 1363, 1363, 1363, 1363, 1363, 1363, 1363, 1363, 1363, - 1363, 1363, 1363, 1363, 1363, 1363, 1363, 1363, 1363, 1363, 1363, 0, - 0, 0, 0, 1364, 1364, 1364, 1364, 1364, 1364, 1364, 1364, 1364, - 1364, 1364, 1364, 1364, 1364, 1364, 1364, 1364, 1364, 1364, 1364, 1364, - 1364, 1364, 1364, 1364, 1364, 1364, 1364, 1364, 1364, 1364, 1364, 1364, - 1364, 1364, 1364, 1364, 1364, 1364, 1364, 1364, 1364, 1364, 1364, 1364, - 1364, 1364, 1364, 1364, 0, 0, 0, 0, 4091, 4091, 4091, 4091, - 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, - 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, - 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, - 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, - 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, - 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, - 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, - 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, - 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, - 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, - 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, - 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, - 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, - 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, - 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, - 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, - 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, - 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, - 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, - 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, - 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, - 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, - 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, - 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, - 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, - 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, - 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, - 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, - 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, - 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, - 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, - 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, - 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, - 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, - 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, - 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, - 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, - 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, - 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, - 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, - 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, - 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, - 4092, 4092, 4092, 4092, 4093, 4094, 4095, 4096, 4097, 4098, 4099, 4100, - 4100, 4101, 4102, 4103, 4104, 4105, 4106, 4107, 4108, 4109, 4110, 4111, - 4112, 4113, 4114, 4115, 4116, 4117, 4118, 4119, 4120, 4121, 4122, 4123, - 4124, 4125, 4126, 4127, 4128, 4129, 4130, 4131, 4132, 4133, 4134, 4135, - 4136, 4137, 4138, 4139, 4140, 4141, 4142, 4143, 4144, 4145, 4146, 4147, - 4148, 4149, 4150, 4151, 4152, 4153, 4154, 4155, 4156, 4157, 4158, 4159, - 4160, 4161, 4162, 4163, 4164, 4165, 4166, 4167, 4168, 4169, 4170, 4171, - 4172, 4173, 4174, 4175, 4176, 4177, 4178, 4179, 4180, 4181, 4182, 4183, - 4112, 4184, 4185, 4186, 4187, 4188, 4189, 4190, 4191, 4192, 4193, 4194, - 4195, 4196, 4197, 4198, 4199, 4200, 4201, 4202, 4203, 4204, 4205, 4206, - 4207, 4208, 4209, 4210, 4211, 4212, 4213, 4214, 4215, 4216, 4217, 4218, - 4219, 4220, 4221, 4222, 4223, 4224, 4225, 4226, 4227, 4228, 4229, 4230, - 4231, 4232, 4233, 4234, 4235, 4236, 4237, 4238, 4239, 4240, 4241, 4242, - 4243, 4244, 4245, 4246, 4247, 4248, 4249, 4250, 4251, 4202, 4252, 4253, - 4254, 4255, 4256, 4257, 4258, 4259, 4186, 4260, 4261, 4262, 4263, 4264, - 4265, 4266, 4267, 4268, 4269, 4270, 4271, 4272, 4273, 4274, 4275, 4276, - 4277, 4278, 4279, 4112, 4280, 4281, 4282, 4283, 4284, 4285, 4286, 4287, - 4288, 4289, 4290, 4291, 4292, 4293, 4294, 4295, 4296, 4297, 4298, 4299, - 4300, 4301, 4302, 4303, 4304, 4305, 4306, 4188, 4307, 4308, 4309, 4310, - 4311, 4312, 4313, 4314, 4315, 4316, 4317, 4318, 4319, 4320, 4321, 4322, - 4323, 4324, 4325, 4326, 4327, 4328, 4329, 4330, 4331, 4332, 4333, 4334, - 4335, 4336, 4337, 4338, 4339, 4340, 4341, 4342, 4343, 4344, 4345, 4346, - 4347, 4348, 4349, 4350, 4351, 4352, 4353, 4354, 4355, 4356, 3034, 3034, - 4357, 3034, 4358, 3034, 3034, 4359, 4360, 4361, 4362, 4363, 4364, 4365, - 4366, 4367, 4368, 3034, 4369, 3034, 4370, 3034, 3034, 4371, 4372, 3034, - 3034, 3034, 4373, 4374, 4375, 4376, 4377, 4378, 4379, 4380, 4381, 4382, - 4383, 4384, 4385, 4386, 4387, 4388, 4389, 4390, 4391, 4392, 4393, 4394, - 4395, 4396, 4397, 4398, 4399, 4400, 4401, 4402, 4403, 4404, 4405, 4406, - 4407, 4408, 4409, 4410, 4411, 4412, 4413, 4414, 4415, 4416, 4417, 4241, - 4418, 4419, 4420, 4421, 4422, 4423, 4423, 4424, 4425, 4426, 4427, 4428, - 4429, 4430, 4431, 4371, 4432, 4433, 4434, 4435, 4436, 4437, 0, 0, - 4438, 4439, 4440, 4441, 4442, 4443, 4444, 4445, 4385, 4446, 4447, 4448, - 4357, 4449, 4450, 4451, 4452, 4453, 4454, 4455, 4456, 4457, 4458, 4459, - 4460, 4394, 4461, 4395, 4462, 4463, 4464, 4465, 4466, 4358, 4133, 4467, - 4468, 4469, 4203, 4290, 4470, 4471, 4402, 4472, 4403, 4473, 4474, 4475, - 4360, 4476, 4477, 4478, 4479, 4480, 4361, 4481, 4482, 4483, 4484, 4485, - 4486, 4417, 4487, 4488, 4241, 4489, 4421, 4490, 4491, 4492, 4493, 4494, - 4426, 4495, 4370, 4496, 4427, 4184, 4497, 4428, 4498, 4430, 4499, 4500, - 4501, 4502, 4503, 4432, 4366, 4504, 4433, 4505, 4434, 4506, 4100, 4507, - 4508, 4509, 4510, 4511, 4512, 4513, 4514, 4515, 4516, 4517, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 4518, 4519, 4520, 4521, 4522, 4523, 4524, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 4525, 4526, 4527, 4528, 4529, - 0, 0, 0, 0, 0, 4530, 4531, 4532, 4533, 4534, 4535, 4536, - 4537, 4538, 4539, 4540, 4541, 4542, 4543, 4544, 4545, 4546, 4547, 4548, - 4549, 4550, 4551, 4552, 4553, 4554, 4555, 0, 4556, 4557, 4558, 4559, - 4560, 0, 4561, 0, 4562, 4563, 0, 4564, 4565, 0, 4566, 4567, - 4568, 4569, 4570, 4571, 4572, 4573, 4574, 4575, 4576, 4577, 4578, 4579, - 4580, 4581, 4582, 4583, 4584, 4585, 4586, 4587, 4588, 4589, 4590, 4591, - 4592, 4593, 4594, 4595, 4596, 4597, 4598, 4599, 4600, 4601, 4602, 4603, - 4604, 4605, 4606, 4607, 4608, 4609, 4610, 4611, 4612, 4613, 4614, 4615, - 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4625, 4626, 4627, - 4628, 4629, 4630, 4631, 4632, 4633, 4634, 4635, 4636, 4637, 4638, 4639, - 4640, 4641, 4642, 4643, 4644, 4645, 4646, 4647, 4648, 4649, 4650, 4651, - 4652, 4653, 4654, 4655, 4656, 4657, 4658, 4659, 4660, 4661, 4662, 4663, - 4664, 4665, 4666, 4667, 4668, 4669, 4670, 4671, 4672, 4673, 4674, 4674, - 4674, 4674, 4674, 4674, 4674, 4674, 4674, 4674, 4674, 4674, 4674, 4674, - 4674, 4674, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 4675, 4676, 4677, 4678, 4679, - 4680, 4681, 4682, 4683, 4684, 4685, 4686, 4687, 4688, 4689, 4690, 4691, - 4692, 4693, 4694, 4695, 4696, 4697, 4698, 4699, 4700, 4701, 4702, 4703, - 4704, 4705, 4706, 4707, 4708, 4709, 4710, 4711, 4712, 4713, 4714, 4715, - 4716, 4717, 4718, 4719, 4720, 4721, 4722, 4713, 4723, 4724, 4725, 4726, - 4727, 4728, 4729, 4730, 4731, 4732, 4733, 4734, 4735, 4736, 4737, 4738, - 4739, 4740, 4741, 4742, 4743, 4744, 4745, 4746, 4747, 4748, 4749, 4750, - 4751, 4752, 4753, 4754, 4755, 4756, 4757, 4758, 4759, 4760, 4761, 4762, - 4763, 4764, 4765, 4766, 4767, 4768, 4769, 4770, 4771, 4772, 4773, 4774, - 4775, 4776, 4777, 4778, 4779, 4780, 4781, 4782, 4783, 4784, 4785, 4786, - 4787, 4788, 4789, 4790, 4791, 4792, 4793, 4794, 4795, 4796, 4797, 4798, - 4799, 4800, 4801, 4802, 4803, 4804, 4805, 4806, 4807, 4808, 4809, 4810, - 4811, 4812, 4813, 4814, 4815, 4816, 4817, 4818, 4819, 4820, 4821, 4822, - 4714, 4823, 4824, 4825, 4826, 4827, 4828, 4829, 4830, 4831, 4832, 4833, - 4834, 4835, 4836, 4837, 4838, 4839, 4840, 4841, 4842, 4843, 4844, 4845, - 4846, 4847, 4848, 4849, 4850, 4851, 4852, 4853, 4854, 4855, 4856, 4857, - 4858, 4859, 4860, 4861, 4862, 4863, 4864, 4865, 4866, 4867, 4868, 4869, - 4870, 4871, 4872, 4873, 4874, 4875, 4876, 4877, 4878, 4879, 4880, 4881, - 4882, 4883, 4884, 4885, 4886, 4887, 4888, 4889, 4890, 4891, 4892, 4893, - 4894, 4895, 4896, 4897, 4898, 4899, 4900, 4901, 4902, 4903, 4904, 4905, - 4906, 4907, 4908, 4909, 4910, 4911, 4912, 4913, 4914, 4915, 4916, 4917, - 4918, 4919, 4920, 4921, 4922, 4923, 4924, 4925, 4926, 4927, 4928, 4929, - 4930, 4931, 4932, 4933, 4934, 4935, 4936, 4937, 4938, 4939, 4940, 4941, - 4942, 4943, 4944, 4945, 4946, 4947, 4948, 4949, 4950, 4951, 4952, 4953, - 4954, 4955, 4956, 4957, 4958, 4959, 4960, 4961, 4962, 4963, 4964, 4965, - 4966, 4967, 4968, 4969, 4970, 4971, 4972, 4973, 4974, 4975, 4976, 4977, - 4978, 4979, 4980, 4981, 4982, 4983, 4984, 4985, 4986, 4987, 4988, 4989, - 4990, 4991, 4992, 4993, 4994, 4995, 4996, 4997, 4998, 4999, 5000, 5001, - 5002, 5003, 5004, 5005, 5006, 5007, 5008, 5009, 5010, 5011, 5012, 5013, - 5014, 5015, 5016, 5017, 5018, 5019, 5020, 5021, 5022, 5023, 5024, 5025, - 5026, 5027, 5028, 5029, 5030, 5031, 5032, 5033, 5034, 5035, 5036, 2136, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 5037, 5038, 5039, 5040, 5041, 5042, 5043, 5044, - 5045, 5046, 5047, 5048, 5049, 5050, 5051, 5052, 5053, 5054, 5055, 5056, - 5057, 5058, 5059, 5060, 5061, 5062, 5063, 5064, 5065, 5066, 5067, 5068, - 5069, 5070, 5071, 5072, 5073, 5074, 5075, 5076, 5077, 5078, 5079, 5080, - 5081, 5082, 5083, 5084, 5085, 5086, 5087, 5088, 5089, 5090, 5091, 5092, - 5093, 5094, 5095, 5096, 5097, 5098, 5099, 5100, 0, 0, 5101, 5102, - 5103, 5104, 5105, 5106, 5107, 5108, 5109, 5110, 5111, 5112, 5113, 5114, - 5115, 5116, 5117, 5118, 5119, 5120, 5121, 5122, 5123, 5124, 5125, 5126, - 5127, 5128, 5129, 5130, 5131, 5132, 5133, 5134, 5135, 5136, 5137, 5138, - 5139, 5140, 5141, 5142, 5143, 5144, 5145, 5146, 5147, 5148, 5149, 5150, - 5151, 5152, 5153, 5154, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 5155, 5156, 5157, 5158, - 5159, 5160, 5161, 5162, 5163, 5164, 5165, 5166, 5167, 77, 0, 0, - 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, - 576, 576, 576, 576, 5168, 5169, 5170, 5171, 5172, 5173, 5174, 5175, - 5176, 5177, 0, 0, 0, 0, 0, 0, 542, 542, 542, 542, - 542, 542, 542, 555, 555, 555, 555, 555, 555, 555, 542, 542, - 5178, 5179, 5180, 5181, 5181, 5182, 5183, 5184, 5185, 5186, 5187, 5188, - 5189, 5190, 5191, 5192, 5193, 5194, 5195, 5196, 5197, 3032, 3032, 5198, - 5199, 5200, 5200, 5200, 5200, 5201, 5201, 5201, 5202, 5203, 5204, 0, - 5205, 5206, 5207, 5208, 5209, 5210, 5211, 5212, 5213, 5214, 5215, 5216, - 5217, 5218, 5219, 5220, 5221, 5222, 5223, 0, 5224, 5225, 5226, 5227, - 0, 0, 0, 0, 5228, 5229, 5230, 1116, 5231, 0, 5232, 5233, - 5234, 5235, 5236, 5237, 5238, 5239, 5240, 5241, 5242, 5243, 5244, 5245, - 5246, 5247, 5248, 5249, 5250, 5251, 5252, 5253, 5254, 5255, 5256, 5257, - 5258, 5259, 5260, 5261, 5262, 5263, 5264, 5265, 5266, 5267, 5268, 5269, - 5270, 5271, 5272, 5273, 5274, 5275, 5276, 5277, 5278, 5279, 5280, 5281, - 5282, 5283, 5284, 5285, 5286, 5287, 5288, 5289, 5290, 5291, 5292, 5293, - 5294, 5295, 5296, 5297, 5298, 5299, 5300, 5301, 5302, 5303, 5304, 5305, - 5306, 5307, 5308, 5309, 5310, 5311, 5312, 5313, 5314, 5315, 5316, 5317, - 5318, 5319, 5320, 5321, 5322, 5323, 5324, 5325, 5326, 5327, 5328, 5329, - 5330, 5331, 5332, 5333, 5334, 5335, 5336, 5337, 5338, 5339, 5340, 5341, - 5342, 5343, 5344, 5345, 5346, 5347, 5348, 5349, 5350, 5351, 5352, 5353, - 5354, 5355, 5356, 5357, 5358, 5359, 5360, 5361, 5362, 5363, 5364, 5365, - 5366, 0, 0, 1458, 0, 5367, 5368, 5369, 5370, 5371, 5372, 5373, - 5374, 5375, 5376, 5377, 5378, 5379, 5380, 5381, 5382, 5383, 5384, 5385, - 5386, 5387, 5388, 5389, 5390, 5391, 5392, 5393, 5394, 5395, 5396, 5397, - 5398, 5399, 5400, 5401, 5402, 5403, 5404, 5405, 5406, 5407, 5408, 5409, - 5410, 5411, 5412, 5413, 5414, 5415, 5416, 5417, 5418, 5419, 5420, 5421, - 5422, 5423, 5424, 5425, 5426, 5427, 5428, 5429, 5430, 5431, 5432, 5433, - 5434, 5435, 5436, 5437, 5438, 5439, 5440, 5441, 5442, 5443, 5444, 5445, - 5446, 5447, 5448, 5449, 5450, 5451, 5452, 5453, 5454, 5455, 5456, 5457, - 5458, 5459, 5460, 5461, 5462, 5463, 5464, 5465, 5466, 5467, 5468, 5469, - 5470, 5471, 5472, 5473, 5474, 5475, 5476, 5477, 5478, 5479, 5480, 5481, - 5482, 5483, 5484, 5485, 5486, 5487, 5488, 5489, 5490, 5491, 5492, 5493, - 5494, 5495, 5496, 5497, 5498, 5499, 5500, 5501, 5502, 5503, 5504, 5505, - 5506, 5507, 5508, 5509, 5510, 5511, 5512, 5513, 5514, 5515, 5516, 5517, - 5518, 5519, 5520, 5521, 5522, 5523, 5524, 5525, 5526, 5527, 5528, 5529, - 5530, 5531, 5532, 5533, 5534, 5535, 5536, 5537, 5538, 5539, 5540, 5541, - 5542, 5543, 5544, 5545, 5546, 5547, 5548, 5549, 5550, 5551, 5552, 5553, - 5554, 5555, 5556, 0, 0, 0, 5557, 5558, 5559, 5560, 5561, 5562, - 0, 0, 5563, 5564, 5565, 5566, 5567, 5568, 0, 0, 5569, 5570, - 5571, 5572, 5573, 5574, 0, 0, 5575, 5576, 5577, 0, 0, 0, - 5578, 5579, 5580, 5581, 5582, 5583, 5584, 0, 5585, 5586, 5587, 5588, - 5589, 5590, 5591, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 5592, 5592, 5592, 77, 77, 0, 0, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 0, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 0, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 0, 341, 341, 0, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 0, 0, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 0, 0, 0, 0, 0, - 1046, 9, 1046, 0, 0, 0, 0, 1181, 1181, 1181, 1181, 1181, - 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1181, - 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1181, - 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1181, - 1181, 1181, 1181, 1181, 0, 0, 0, 840, 840, 840, 840, 840, - 840, 840, 840, 840, 5593, 5593, 5593, 5593, 5593, 5593, 5593, 5593, - 5593, 5593, 5593, 5593, 5593, 5593, 5593, 5593, 5593, 5593, 5593, 5593, - 5593, 5593, 5593, 5593, 5593, 5593, 5593, 5593, 5593, 5593, 5593, 5593, - 5593, 5593, 5593, 5593, 5593, 5593, 5593, 5593, 5593, 5593, 5593, 5593, - 5593, 5593, 5593, 5593, 5593, 5593, 5593, 5593, 5593, 1210, 1210, 1210, - 1210, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 1210, 1210, 77, 840, 840, 0, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 0, 0, 0, 77, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 840, 840, 840, 840, 840, 840, 840, 840, - 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, - 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, - 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, - 840, 555, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 0, 0, 0, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 555, 5594, 5594, 5594, 5594, 5594, 5594, 5594, 5594, 5594, 5594, 5594, - 5594, 5594, 5594, 5594, 5594, 5594, 5594, 5594, 5594, 5594, 5594, 5594, - 5594, 5594, 5594, 5594, 0, 0, 0, 0, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 1181, 1181, 1181, 1181, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 1457, 341, 341, 341, 341, 341, 341, 341, 341, 1457, 0, - 0, 0, 0, 0, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 542, 542, 542, 542, 542, 0, - 0, 0, 0, 0, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 0, 1046, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 0, 0, 0, 0, 341, 341, 341, 341, 341, 341, 341, 341, - 1046, 1457, 1457, 1457, 1457, 1457, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 5595, 5596, 5597, 5598, 5599, 5600, 5601, 5602, 5603, 5604, 5605, 5606, - 5607, 5608, 5609, 5610, 5611, 5612, 5613, 5614, 5615, 5616, 5617, 5618, - 5619, 5620, 5621, 5622, 5623, 5624, 5625, 5626, 5627, 5628, 5629, 5630, - 5631, 5632, 5633, 5634, 5635, 5636, 5637, 5638, 5639, 5640, 5641, 5642, - 5643, 5644, 5645, 5646, 5647, 5648, 5649, 5650, 5651, 5652, 5653, 5654, - 5655, 5656, 5657, 5658, 5659, 5660, 5661, 5662, 5663, 5664, 5665, 5666, - 5667, 5668, 5669, 5670, 5671, 5672, 5673, 5674, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 0, 0, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, - 1171, 1171, 0, 0, 0, 0, 0, 0, 5675, 5676, 5677, 5678, - 5679, 5680, 5681, 5682, 5683, 5684, 5685, 5686, 5687, 5688, 5689, 5690, - 5691, 5692, 5693, 5694, 5695, 5696, 5697, 5698, 5699, 5700, 5701, 5702, - 5703, 5704, 5705, 5706, 5707, 5708, 5709, 5710, 0, 0, 0, 0, - 5711, 5712, 5713, 5714, 5715, 5716, 5717, 5718, 5719, 5720, 5721, 5722, - 5723, 5724, 5725, 5726, 5727, 5728, 5729, 5730, 5731, 5732, 5733, 5734, - 5735, 5736, 5737, 5738, 5739, 5740, 5741, 5742, 5743, 5744, 5745, 5746, - 0, 0, 0, 0, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 0, 0, 0, 0, - 0, 0, 0, 0, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 1046, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 341, 341, 341, 341, - 341, 341, 341, 341, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1107, 1107, 1107, 1107, 1107, 1107, 0, 0, 1107, 0, 1107, 1107, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1107, 1107, 1107, 1107, 1107, 1107, 0, 1107, 1107, 0, 0, 0, - 1107, 0, 0, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1107, 1107, 0, 1104, 5747, 5747, 5747, 5747, 5747, 5747, 5747, 5747, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 5748, - 5748, 5747, 5747, 5747, 5747, 5747, 5747, 5747, 1107, 1107, 1107, 1107, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1107, 1107, 1107, 0, 0, 0, 0, 0, 0, 0, 0, 5747, - 5747, 5747, 5747, 5747, 5747, 5747, 5747, 5747, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 1107, 1107, 1107, 1107, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1107, 1107, 1107, 0, 1107, 1107, 0, 0, 0, 0, 0, 5747, - 5747, 5747, 5747, 5747, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1107, 1107, 5747, 5747, 5747, 5747, 5747, 5747, 0, 0, 0, 9, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1107, 1107, 0, 0, 0, 0, 0, 1104, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 0, 0, 0, 0, - 5747, 5747, 1107, 1107, 5747, 5747, 5747, 5747, 5747, 5747, 5747, 5747, - 5747, 5747, 5747, 5747, 5747, 5747, 5747, 5747, 0, 0, 5747, 5747, - 5747, 5747, 5747, 5747, 5747, 5747, 5747, 5747, 5747, 5747, 5747, 5747, - 5747, 5747, 5747, 5747, 5747, 5747, 5747, 5747, 5747, 5747, 5747, 5747, - 5747, 5747, 5747, 5747, 5747, 5747, 5747, 5747, 5747, 5747, 5747, 5747, - 5747, 5747, 5747, 5747, 5747, 5747, 5747, 5747, 1107, 1150, 1150, 1150, - 0, 1150, 1150, 0, 0, 0, 0, 0, 1150, 555, 1150, 542, - 1107, 1107, 1107, 1107, 0, 1107, 1107, 1107, 0, 1107, 1107, 1107, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1107, 1107, 0, 0, 542, 568, 555, 0, 0, 0, 0, 1162, - 5747, 5747, 5747, 5747, 5747, 5747, 5747, 5747, 5747, 0, 0, 0, - 0, 0, 0, 0, 1104, 1104, 1104, 1104, 1104, 1104, 1104, 1104, - 1104, 0, 0, 0, 0, 0, 0, 0, 1107, 1107, 1107, 1107, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1107, 5747, 5747, 1104, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 5747, 5747, 5747, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 1107, 1107, 1107, 1107, - 1107, 1107, 1107, 1107, 5748, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 542, 555, 0, - 0, 0, 0, 5747, 5747, 5747, 5747, 5747, 1104, 1104, 1104, 1104, - 1104, 1104, 1104, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1107, 1107, 1107, 1107, 1107, 1107, 0, 0, 0, 9, 9, 9, - 9, 9, 9, 9, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1107, 1107, 0, 0, 5747, 5747, 5747, 5747, 5747, 5747, 5747, 5747, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 0, 0, 0, 0, 0, - 5747, 5747, 5747, 5747, 5747, 5747, 5747, 5747, 1107, 1107, 1107, 1107, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1107, 1107, 0, 0, 0, 0, 0, 0, 0, 1104, 1104, 1104, - 1104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 5747, 5747, 5747, 5747, 5747, 5747, 5747, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1107, 1107, 1107, 1107, 1107, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 5749, 5750, 5751, 5752, 5753, 5754, 5755, 5756, 5757, 5758, 5759, 5760, - 5761, 5762, 5763, 5764, 5765, 5766, 5767, 5768, 5769, 5770, 5771, 5772, - 5773, 5774, 5775, 5776, 5777, 5778, 5779, 5780, 5781, 5782, 5783, 5784, - 5785, 5786, 5787, 5788, 5789, 5790, 5791, 5792, 5793, 5794, 5795, 5796, - 5797, 5798, 5799, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 5800, 5801, 5802, 5803, 5804, 5805, 5806, 5807, - 5808, 5809, 5810, 5811, 5812, 5813, 5814, 5815, 5816, 5817, 5818, 5819, - 5820, 5821, 5822, 5823, 5824, 5825, 5826, 5827, 5828, 5829, 5830, 5831, - 5832, 5833, 5834, 5835, 5836, 5837, 5838, 5839, 5840, 5841, 5842, 5843, - 5844, 5845, 5846, 5847, 5848, 5849, 5850, 0, 0, 0, 0, 0, - 0, 0, 5747, 5747, 5747, 5747, 5747, 5747, 1116, 1116, 1116, 1116, - 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, - 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, - 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 542, 542, 542, 542, - 0, 0, 0, 0, 0, 0, 0, 0, 1134, 1134, 1134, 1134, - 1134, 1134, 1134, 1134, 1134, 1134, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 5851, 5851, 5851, 5851, 5851, 5851, 5851, 5851, 5851, 5851, 5851, 5851, - 5851, 5851, 5851, 5851, 5851, 5851, 5851, 5851, 5851, 5851, 5851, 5851, - 5851, 5851, 5851, 5851, 5851, 5851, 5851, 0, 1107, 1107, 1107, 1107, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1107, 1107, 0, 542, 542, 1102, 0, 0, 1107, 1107, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 5747, 5747, 5747, - 5747, 5747, 5747, 5747, 5747, 5747, 5747, 1107, 0, 0, 0, 0, - 0, 0, 0, 0, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, - 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, - 1116, 1116, 555, 555, 542, 542, 542, 555, 542, 555, 555, 555, - 555, 5852, 5852, 5852, 5852, 1111, 1111, 1111, 1111, 1111, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 5747, 5747, 5747, - 5747, 5747, 5747, 5747, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 1154, 1150, 1154, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, - 1150, 1150, 1150, 1150, 1150, 1150, 1162, 1046, 1046, 1046, 1046, 1046, - 1046, 1046, 0, 0, 0, 0, 1210, 1210, 1210, 1210, 1210, 1210, - 1210, 1210, 1210, 1210, 1210, 1210, 1210, 1210, 1210, 1210, 1210, 1210, - 1210, 1210, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 1162, 1150, 1150, 1154, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 5853, 5854, 5855, 5856, 341, 341, 341, - 341, 341, 341, 341, 341, 5857, 341, 341, 341, 341, 341, 5858, - 341, 341, 341, 341, 1154, 1154, 1154, 1150, 1150, 1150, 1150, 1154, - 1154, 1162, 5859, 1046, 1046, 5860, 1046, 1046, 1046, 1046, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 5860, 0, 0, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 0, 0, 0, 0, 0, 0, 0, 1171, 1171, 1171, 1171, - 1171, 1171, 1171, 1171, 1171, 1171, 0, 0, 0, 0, 0, 0, - 542, 542, 542, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 5861, 1150, 1150, 1150, 1150, 1154, 1150, 5862, 5863, - 1150, 5864, 5865, 1162, 1162, 0, 1171, 1171, 1171, 1171, 1171, 1171, - 1171, 1171, 1171, 1171, 1046, 1046, 1046, 1046, 341, 1154, 1154, 341, - 0, 0, 0, 0, 0, 0, 0, 0, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 1172, 1046, 1046, 341, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 1150, 1150, 1154, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 1154, - 1154, 1154, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1154, - 1482, 341, 1227, 1227, 341, 1046, 1046, 1046, 1046, 1150, 1172, 1150, - 1150, 1046, 1154, 1150, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, - 1171, 1171, 341, 1046, 341, 1046, 1046, 1046, 0, 1181, 1181, 1181, - 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1181, - 1181, 1181, 1181, 1181, 1181, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 0, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 1154, 1154, 1154, 1150, 1150, 1150, 1154, 1154, 1150, 1482, 1172, 1150, - 1046, 1046, 1046, 1046, 1046, 1046, 1150, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 341, 341, 341, 341, 341, 341, 341, 0, 341, 0, 341, 341, - 341, 341, 0, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 0, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 1046, 0, 0, 0, 0, 0, 0, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 1150, - 1154, 1154, 1154, 1150, 1150, 1150, 1150, 1150, 1150, 1172, 1162, 0, - 0, 0, 0, 0, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, - 1171, 1171, 0, 0, 0, 0, 0, 0, 1150, 1150, 1154, 1154, - 0, 341, 341, 341, 341, 341, 341, 341, 341, 0, 0, 341, - 341, 0, 0, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 0, 341, 341, 341, 341, 341, 341, 341, 0, 341, 341, - 0, 341, 341, 341, 341, 341, 0, 1172, 1172, 341, 5866, 1154, - 1150, 1154, 1154, 1154, 1154, 0, 0, 5867, 1154, 0, 0, 5868, - 5869, 1482, 0, 0, 341, 0, 0, 0, 0, 0, 0, 5870, - 0, 0, 0, 0, 0, 341, 341, 341, 341, 341, 1154, 1154, - 0, 0, 542, 542, 542, 542, 542, 542, 542, 0, 0, 0, - 542, 542, 542, 542, 542, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 1154, 1154, 1154, 1150, 1150, 1150, 1150, - 1150, 1150, 1150, 1150, 1154, 1154, 1162, 1150, 1150, 1154, 1172, 341, - 341, 341, 341, 1046, 1046, 1046, 1046, 1046, 1171, 1171, 1171, 1171, - 1171, 1171, 1171, 1171, 1171, 1171, 1046, 1046, 0, 1046, 542, 341, - 341, 341, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 5871, 1154, 1154, 1150, - 1150, 1150, 1150, 1150, 1150, 5872, 5873, 5874, 5875, 5876, 5877, 1150, - 1150, 1154, 1162, 1172, 341, 341, 1046, 341, 0, 0, 0, 0, - 0, 0, 0, 0, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, - 1171, 1171, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 5878, - 1154, 1154, 1150, 1150, 1150, 1150, 0, 0, 5879, 5880, 5881, 5882, - 1150, 1150, 1154, 1162, 1172, 1046, 1046, 1046, 1046, 1046, 1046, 1046, - 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046, - 1046, 1046, 1046, 1046, 341, 341, 341, 341, 1150, 1150, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 1154, 1154, 1154, 1150, - 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1154, 1154, 1150, 1154, 1162, - 1150, 1046, 1046, 1046, 341, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, - 1171, 1171, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 1150, - 1154, 1150, 1154, 1154, 1150, 1150, 1150, 1150, 1150, 1150, 1482, 1172, - 341, 0, 0, 0, 0, 0, 0, 0, 1171, 1171, 1171, 1171, - 1171, 1171, 1171, 1171, 1171, 1171, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 0, 0, 1150, 1150, 1150, 1154, 1154, 1150, 1150, - 1150, 1150, 1154, 1150, 1150, 1150, 1150, 1162, 0, 0, 0, 0, - 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1181, 1181, - 1046, 1046, 1046, 840, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 1154, 1154, 1154, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, - 1154, 1162, 1172, 1046, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 5883, 5884, 5885, 5886, - 5887, 5888, 5889, 5890, 5891, 5892, 5893, 5894, 5895, 5896, 5897, 5898, - 5899, 5900, 5901, 5902, 5903, 5904, 5905, 5906, 5907, 5908, 5909, 5910, - 5911, 5912, 5913, 5914, 5915, 5916, 5917, 5918, 5919, 5920, 5921, 5922, - 5923, 5924, 5925, 5926, 5927, 5928, 5929, 5930, 5931, 5932, 5933, 5934, - 5935, 5936, 5937, 5938, 5939, 5940, 5941, 5942, 5943, 5944, 5945, 5946, - 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1181, 1181, - 1181, 1181, 1181, 1181, 1181, 1181, 1181, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 341, 341, 341, 341, 341, - 341, 341, 341, 0, 0, 341, 0, 0, 341, 341, 341, 341, - 341, 341, 341, 341, 0, 341, 341, 0, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 5947, 1154, 1154, 1154, - 1154, 5948, 0, 1154, 5949, 0, 0, 1150, 1150, 1482, 1162, 1227, - 1154, 1227, 1154, 1172, 1046, 1046, 1046, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, - 1171, 1171, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 341, 341, 341, 341, 341, 341, 341, 341, 0, 0, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 1154, 1154, 1154, 1150, 1150, 1150, 1150, 0, 0, 1150, 1150, - 1154, 1154, 1154, 1154, 1162, 341, 1046, 341, 1154, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 341, 1150, 1150, 1150, 1150, 1150, 1150, 5950, 5950, 1150, 1150, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 1150, 1162, 1150, 1150, 1150, 1150, 1154, 1227, 1150, - 1150, 1150, 1150, 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1162, - 0, 0, 0, 0, 0, 0, 0, 0, 341, 1150, 1150, 1150, - 1150, 1150, 1150, 1154, 1154, 1150, 1150, 1150, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 1227, 1227, 1227, 1227, 1227, 1227, 1150, 1150, 1150, 1150, 1150, 1150, - 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1154, 1150, 1162, 1046, 1046, - 1046, 341, 1046, 1046, 1046, 1046, 1046, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 0, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 1154, 1150, 1150, 1150, 1150, - 1150, 1150, 1150, 0, 1150, 1150, 1150, 1150, 1150, 1150, 1154, 5951, - 341, 1046, 1046, 1046, 1046, 1046, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, - 1171, 1171, 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1181, - 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1181, 0, 0, 0, - 1046, 1046, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 0, 0, 1150, 1150, - 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, - 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 0, 1154, 1150, 1150, - 1150, 1150, 1150, 1150, 1150, 1154, 1150, 1150, 1154, 1150, 1150, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 341, 341, 341, 341, 341, 341, 341, 0, 341, 341, 0, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 1150, 1150, 1150, 1150, 1150, 1150, 0, 0, 0, 1150, 0, - 1150, 1150, 0, 1150, 1150, 1150, 1172, 1150, 1162, 1162, 1227, 1150, - 0, 0, 0, 0, 0, 0, 0, 0, 1171, 1171, 1171, 1171, - 1171, 1171, 1171, 1171, 1171, 1171, 0, 0, 0, 0, 0, 0, - 341, 341, 341, 341, 341, 341, 0, 341, 341, 0, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 1154, 1154, 1154, 1154, 1154, 0, - 1150, 1150, 0, 1154, 1154, 1150, 1154, 1162, 341, 0, 0, 0, - 0, 0, 0, 0, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, - 1171, 1171, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 1150, 1150, 1154, 1154, 1046, - 1046, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 341, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 1181, 1181, 1181, 1181, - 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1181, - 1181, 1181, 1181, 1181, 1181, 77, 77, 77, 77, 77, 77, 77, - 77, 11, 11, 11, 11, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1046, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1457, 1457, 1457, 1457, 1457, 1457, 1457, 1457, - 1457, 1457, 1457, 1457, 1457, 1457, 1457, 1457, 1457, 1457, 1457, 1457, - 1457, 1457, 1457, 1457, 1457, 1457, 1457, 1457, 1457, 1457, 1457, 1457, - 1457, 1457, 1457, 1457, 1457, 1457, 1457, 1457, 1457, 1457, 1457, 1457, - 1457, 1457, 1457, 1457, 1457, 1457, 1457, 1457, 1457, 1457, 1457, 1457, - 1457, 1457, 1457, 1457, 1457, 1457, 1457, 1457, 1457, 1457, 1457, 1457, - 1457, 1457, 1457, 1457, 1457, 1457, 1457, 1457, 1457, 1457, 1457, 1457, - 1457, 1457, 1457, 1457, 1457, 1457, 1457, 1457, 1457, 1457, 1457, 1457, - 1457, 1457, 1457, 1457, 1457, 1457, 1457, 1457, 1457, 1457, 1457, 1457, - 1457, 1457, 1457, 1457, 1457, 1457, 1457, 0, 1046, 1046, 1046, 1046, - 1046, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 0, - 5952, 5952, 5952, 5952, 5952, 5952, 5952, 5952, 5952, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 0, 0, 0, 0, 0, 0, 0, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 0, 1171, 1171, 1171, 1171, - 1171, 1171, 1171, 1171, 1171, 1171, 0, 0, 0, 0, 1046, 1046, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 0, 0, 568, 568, 568, 568, - 568, 1046, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 542, 542, 542, 542, 542, 542, 542, 1046, 1046, 1046, 1046, 1046, - 840, 840, 840, 840, 525, 525, 525, 525, 1046, 840, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 1171, 1171, 1171, 1171, - 1171, 1171, 1171, 1171, 1171, 1171, 0, 1181, 1181, 1181, 1181, 1181, - 1181, 1181, 0, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 0, 0, 0, 0, 0, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 5953, 5954, 5955, 5956, - 5957, 5958, 5959, 5960, 5961, 5962, 5963, 5964, 5965, 5966, 5967, 5968, - 5969, 5970, 5971, 5972, 5973, 5974, 5975, 5976, 5977, 5978, 5979, 5980, - 5981, 5982, 5983, 5984, 5985, 5986, 5987, 5988, 5989, 5990, 5991, 5992, - 5993, 5994, 5995, 5996, 5997, 5998, 5999, 6000, 6001, 6002, 6003, 6004, - 6005, 6006, 6007, 6008, 6009, 6010, 6011, 6012, 6013, 6014, 6015, 6016, - 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1181, - 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1046, - 1046, 1046, 1046, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 0, - 0, 0, 0, 1150, 341, 1154, 1154, 1154, 1154, 1154, 1154, 1154, - 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, - 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, - 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, - 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, - 0, 0, 0, 0, 0, 0, 0, 1150, 1150, 1150, 1150, 525, - 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 3033, 3033, 3032, 3033, 1150, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 6017, 6017, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 0, 0, 0, 0, - 0, 0, 0, 0, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 3034, 3034, 3034, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 3034, 3034, 3034, 3034, 0, 0, 0, 0, - 0, 0, 0, 0, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 0, 0, 0, 0, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 0, 0, 0, 0, 0, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 0, 0, 0, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 0, 0, 0, 0, 0, 0, 0, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 0, 0, 840, 1150, 568, 1046, - 1458, 1458, 1458, 1458, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, - 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, - 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, - 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, - 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, - 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, - 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, - 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, - 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, - 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, - 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, - 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, - 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, - 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, - 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, - 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, - 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, - 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, - 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, - 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, - 840, 840, 840, 840, 840, 840, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 840, 840, 840, 840, 840, 840, 840, 840, - 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, - 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, - 840, 840, 840, 840, 840, 840, 840, 0, 0, 840, 840, 840, - 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, - 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, - 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, - 840, 840, 840, 840, 840, 840, 840, 6018, 6019, 840, 840, 840, - 840, 840, 6020, 6021, 6022, 6023, 6024, 6025, 6026, 6027, 6028, 568, - 568, 568, 840, 840, 840, 6029, 6030, 6031, 6032, 6033, 6034, 1458, - 1458, 1458, 1458, 1458, 1458, 1458, 1458, 555, 555, 555, 555, 555, - 555, 555, 555, 840, 840, 542, 542, 542, 542, 542, 555, 555, - 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, - 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, - 840, 840, 840, 840, 840, 840, 542, 542, 542, 542, 840, 840, - 840, 840, 840, 840, 840, 840, 840, 840, 840, 6035, 6036, 6037, - 6038, 6039, 6040, 6041, 6042, 840, 840, 840, 840, 840, 840, 840, - 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, - 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, - 840, 840, 840, 840, 840, 840, 840, 840, 840, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 542, 542, 542, 77, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1181, - 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1181, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1181, - 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1181, - 1181, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 6043, 2232, 2207, 2250, 2234, 2235, 6044, 2214, - 2217, 6045, 6046, 2218, 2237, 2220, 6047, 2222, 2223, 2224, 6048, 6049, - 6050, 6051, 6052, 6053, 6054, 2228, 6055, 6056, 6057, 2251, 2233, 6058, - 2213, 2215, 2252, 2253, 6059, 2219, 6060, 6061, 2238, 6062, 6063, 6064, - 6065, 6066, 6067, 6068, 6069, 6070, 6071, 6072, 6043, 2232, 2207, 2250, - 2234, 2235, 6044, 2214, 2217, 6045, 6046, 2218, 2237, 2220, 6047, 2222, - 2223, 2224, 6048, 6049, 6050, 6051, 6052, 6053, 6054, 2228, 6055, 6056, - 6057, 2251, 2233, 6058, 2213, 0, 2252, 2253, 6059, 2219, 6060, 6061, - 2238, 6062, 6063, 6064, 6065, 6066, 6067, 6068, 6069, 6070, 6071, 6072, - 6043, 2232, 2207, 2250, 2234, 2235, 6044, 2214, 2217, 6045, 6046, 2218, - 2237, 2220, 6047, 2222, 2223, 2224, 6048, 6049, 6050, 6051, 6052, 6053, - 6054, 2228, 6055, 6056, 6057, 2251, 2233, 6058, 2213, 2215, 2252, 2253, - 6059, 2219, 6060, 6061, 2238, 6062, 6063, 6064, 6065, 6066, 6067, 6068, - 6069, 6070, 6071, 6072, 6043, 0, 2207, 2250, 0, 0, 6044, 0, - 0, 6045, 6046, 0, 0, 2220, 6047, 2222, 2223, 0, 6048, 6049, - 6050, 6051, 6052, 6053, 6054, 2228, 6055, 6056, 6057, 2251, 0, 6058, - 0, 2215, 2252, 2253, 6059, 2219, 6060, 6061, 0, 6062, 6063, 6064, - 6065, 6066, 6067, 6068, 6069, 6070, 6071, 6072, 6043, 2232, 2207, 2250, - 2234, 2235, 6044, 2214, 2217, 6045, 6046, 2218, 2237, 2220, 6047, 2222, - 2223, 2224, 6048, 6049, 6050, 6051, 6052, 6053, 6054, 2228, 6055, 6056, - 6057, 2251, 2233, 6058, 2213, 2215, 2252, 2253, 6059, 2219, 6060, 6061, - 2238, 6062, 6063, 6064, 6065, 6066, 6067, 6068, 6069, 6070, 6071, 6072, - 6043, 2232, 0, 2250, 2234, 2235, 6044, 0, 0, 6045, 6046, 2218, - 2237, 2220, 6047, 2222, 2223, 0, 6048, 6049, 6050, 6051, 6052, 6053, - 6054, 0, 6055, 6056, 6057, 2251, 2233, 6058, 2213, 2215, 2252, 2253, - 6059, 2219, 6060, 6061, 2238, 6062, 6063, 6064, 6065, 6066, 6067, 6068, - 6069, 6070, 6071, 6072, 6043, 2232, 0, 2250, 2234, 2235, 6044, 0, - 2217, 6045, 6046, 2218, 2237, 0, 6047, 0, 0, 0, 6048, 6049, - 6050, 6051, 6052, 6053, 6054, 0, 6055, 6056, 6057, 2251, 2233, 6058, - 2213, 2215, 2252, 2253, 6059, 2219, 6060, 6061, 2238, 6062, 6063, 6064, - 6065, 6066, 6067, 6068, 6069, 6070, 6071, 6072, 6043, 2232, 2207, 2250, - 2234, 2235, 6044, 2214, 2217, 6045, 6046, 2218, 2237, 2220, 6047, 2222, - 2223, 2224, 6048, 6049, 6050, 6051, 6052, 6053, 6054, 2228, 6055, 6056, - 6057, 2251, 2233, 6058, 2213, 2215, 2252, 2253, 6059, 2219, 6060, 6061, - 2238, 6062, 6063, 6064, 6065, 6066, 6067, 6068, 6069, 6070, 6071, 6072, - 6043, 2232, 2207, 2250, 2234, 2235, 6044, 2214, 2217, 6045, 6046, 2218, - 2237, 2220, 6047, 2222, 2223, 2224, 6048, 6049, 6050, 6051, 6052, 6053, - 6054, 2228, 6055, 6056, 6057, 2251, 2233, 6058, 2213, 2215, 2252, 2253, - 6059, 2219, 6060, 6061, 2238, 6062, 6063, 6064, 6065, 6066, 6067, 6068, - 6069, 6070, 6071, 6072, 6043, 2232, 2207, 2250, 2234, 2235, 6044, 2214, - 2217, 6045, 6046, 2218, 2237, 2220, 6047, 2222, 2223, 2224, 6048, 6049, - 6050, 6051, 6052, 6053, 6054, 2228, 6055, 6056, 6057, 2251, 2233, 6058, - 2213, 2215, 2252, 2253, 6059, 2219, 6060, 6061, 2238, 6062, 6063, 6064, - 6065, 6066, 6067, 6068, 6069, 6070, 6071, 6072, 6043, 2232, 2207, 2250, - 2234, 2235, 6044, 2214, 2217, 6045, 6046, 2218, 2237, 2220, 6047, 2222, - 2223, 2224, 6048, 6049, 6050, 6051, 6052, 6053, 6054, 2228, 6055, 6056, - 6057, 2251, 2233, 6058, 2213, 2215, 2252, 2253, 6059, 2219, 6060, 6061, - 2238, 6062, 6063, 6064, 6065, 6066, 6067, 6068, 6069, 6070, 6071, 6072, - 6043, 2232, 2207, 2250, 2234, 2235, 6044, 2214, 2217, 6045, 6046, 2218, - 2237, 2220, 6047, 2222, 2223, 2224, 6048, 6049, 6050, 6051, 6052, 6053, - 6054, 2228, 6055, 6056, 6057, 2251, 2233, 6058, 2213, 2215, 2252, 2253, - 6059, 2219, 6060, 6061, 2238, 6062, 6063, 6064, 6065, 6066, 6067, 6068, - 6069, 6070, 6071, 6072, 6043, 2232, 2207, 2250, 2234, 2235, 6044, 2214, - 2217, 6045, 6046, 2218, 2237, 2220, 6047, 2222, 2223, 2224, 6048, 6049, - 6050, 6051, 6052, 6053, 6054, 2228, 6055, 6056, 6057, 2251, 2233, 6058, - 2213, 2215, 2252, 2253, 6059, 2219, 6060, 6061, 2238, 6062, 6063, 6064, - 6065, 6066, 6067, 6068, 6069, 6070, 6071, 6072, 6073, 6074, 0, 0, - 6075, 6076, 2247, 6077, 6078, 6079, 6080, 6081, 6082, 6083, 6084, 6085, - 6086, 6087, 6088, 2248, 6089, 6090, 6091, 6092, 6093, 6094, 6095, 6096, - 6097, 6098, 6099, 6100, 2246, 6101, 6102, 6103, 6104, 6105, 6106, 6107, - 6108, 6109, 6110, 6111, 6112, 2245, 6113, 6114, 6115, 6116, 6117, 6118, - 6119, 6120, 6121, 6122, 6123, 6124, 6125, 6126, 6127, 6128, 6075, 6076, - 2247, 6077, 6078, 6079, 6080, 6081, 6082, 6083, 6084, 6085, 6086, 6087, - 6088, 2248, 6089, 6090, 6091, 6092, 6093, 6094, 6095, 6096, 6097, 6098, - 6099, 6100, 2246, 6101, 6102, 6103, 6104, 6105, 6106, 6107, 6108, 6109, - 6110, 6111, 6112, 2245, 6113, 6114, 6115, 6116, 6117, 6118, 6119, 6120, - 6121, 6122, 6123, 6124, 6125, 6126, 6127, 6128, 6075, 6076, 2247, 6077, - 6078, 6079, 6080, 6081, 6082, 6083, 6084, 6085, 6086, 6087, 6088, 2248, - 6089, 6090, 6091, 6092, 6093, 6094, 6095, 6096, 6097, 6098, 6099, 6100, - 2246, 6101, 6102, 6103, 6104, 6105, 6106, 6107, 6108, 6109, 6110, 6111, - 6112, 2245, 6113, 6114, 6115, 6116, 6117, 6118, 6119, 6120, 6121, 6122, - 6123, 6124, 6125, 6126, 6127, 6128, 6075, 6076, 2247, 6077, 6078, 6079, - 6080, 6081, 6082, 6083, 6084, 6085, 6086, 6087, 6088, 2248, 6089, 6090, - 6091, 6092, 6093, 6094, 6095, 6096, 6097, 6098, 6099, 6100, 2246, 6101, - 6102, 6103, 6104, 6105, 6106, 6107, 6108, 6109, 6110, 6111, 6112, 2245, - 6113, 6114, 6115, 6116, 6117, 6118, 6119, 6120, 6121, 6122, 6123, 6124, - 6125, 6126, 6127, 6128, 6075, 6076, 2247, 6077, 6078, 6079, 6080, 6081, - 6082, 6083, 6084, 6085, 6086, 6087, 6088, 2248, 6089, 6090, 6091, 6092, - 6093, 6094, 6095, 6096, 6097, 6098, 6099, 6100, 2246, 6101, 6102, 6103, - 6104, 6105, 6106, 6107, 6108, 6109, 6110, 6111, 6112, 2245, 6113, 6114, - 6115, 6116, 6117, 6118, 6119, 6120, 6121, 6122, 6123, 6124, 6125, 6126, - 6127, 6128, 6129, 6130, 0, 0, 6131, 6132, 6133, 6134, 6135, 6136, - 6137, 6138, 6139, 6140, 6131, 6132, 6133, 6134, 6135, 6136, 6137, 6138, - 6139, 6140, 6131, 6132, 6133, 6134, 6135, 6136, 6137, 6138, 6139, 6140, - 6131, 6132, 6133, 6134, 6135, 6136, 6137, 6138, 6139, 6140, 6131, 6132, - 6133, 6134, 6135, 6136, 6137, 6138, 6139, 6140, 1150, 1150, 1150, 1150, - 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, - 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, - 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, - 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, - 1150, 1150, 1150, 840, 840, 840, 840, 1150, 1150, 1150, 1150, 1150, - 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, - 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, - 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, - 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 840, 840, 840, - 840, 840, 840, 840, 840, 1150, 840, 840, 840, 840, 840, 840, - 840, 840, 840, 840, 840, 840, 840, 840, 1150, 840, 840, 1046, - 1046, 1046, 1046, 1046, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 1150, 1150, 1150, 1150, 1150, - 0, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, - 1150, 1150, 1150, 1150, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 542, 542, 542, 542, 542, 542, 542, 0, 542, 542, 542, 542, - 542, 542, 542, 542, 542, 542, 542, 542, 542, 542, 542, 542, - 542, 0, 0, 542, 542, 542, 542, 542, 542, 542, 0, 542, - 542, 0, 542, 542, 542, 542, 542, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 0, 0, 0, 542, 542, 542, 542, 542, 542, 542, 525, - 525, 525, 525, 525, 525, 525, 0, 0, 1171, 1171, 1171, 1171, - 1171, 1171, 1171, 1171, 1171, 1171, 0, 0, 0, 0, 341, 840, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 542, 542, 542, 542, 1171, 1171, 1171, 1171, - 1171, 1171, 1171, 1171, 1171, 1171, 0, 0, 0, 0, 0, 11, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1107, 1107, 1107, 1107, 1107, 0, 0, 5747, 5747, 5747, 5747, 5747, - 5747, 5747, 5747, 5747, 555, 555, 555, 555, 555, 555, 555, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 6141, 6142, 6143, 6144, 6145, 6146, 6147, 6148, - 6149, 6150, 6151, 6152, 6153, 6154, 6155, 6156, 6157, 6158, 6159, 6160, - 6161, 6162, 6163, 6164, 6165, 6166, 6167, 6168, 6169, 6170, 6171, 6172, - 6173, 6174, 6175, 6176, 6177, 6178, 6179, 6180, 6181, 6182, 6183, 6184, - 6185, 6186, 6187, 6188, 6189, 6190, 6191, 6192, 6193, 6194, 6195, 6196, - 6197, 6198, 6199, 6200, 6201, 6202, 6203, 6204, 6205, 6206, 6207, 6208, - 542, 542, 542, 542, 542, 542, 1172, 1152, 0, 0, 0, 0, - 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 0, 0, - 0, 0, 1104, 1104, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 5852, 5852, 5852, 5852, 5852, 5852, 5852, 5852, 5852, 5852, 5852, - 5852, 5852, 5852, 5852, 5852, 5852, 5852, 5852, 5852, 5852, 5852, 5852, - 5852, 5852, 5852, 5852, 5852, 5852, 5852, 5852, 5852, 5852, 5852, 5852, - 5852, 5852, 5852, 5852, 5852, 5852, 5852, 5852, 5852, 5852, 5852, 5852, - 5852, 5852, 5852, 5852, 5852, 5852, 5852, 5852, 5852, 5852, 5852, 5852, - 1147, 5852, 5852, 5852, 1110, 5852, 5852, 5852, 5852, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 5852, 5852, 5852, 5852, 5852, 5852, 5852, 5852, 5852, 5852, 5852, - 5852, 5852, 5852, 5852, 5852, 5852, 5852, 5852, 5852, 5852, 5852, 5852, - 5852, 5852, 5852, 5852, 5852, 5852, 5852, 5852, 5852, 5852, 5852, 5852, - 5852, 5852, 5852, 5852, 5852, 5852, 5852, 5852, 5852, 5852, 1147, 5852, - 5852, 5852, 5852, 5852, 5852, 5852, 5852, 5852, 5852, 5852, 5852, 5852, - 5852, 5852, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 6209, 6210, 6211, 6212, 0, 6213, 6214, 6215, - 6216, 6217, 6218, 6219, 6220, 6221, 6222, 6223, 6224, 6225, 6226, 6227, - 6228, 6229, 6230, 6231, 6232, 6233, 6234, 6235, 6236, 6237, 6238, 6239, - 0, 6210, 6211, 0, 6240, 0, 0, 6215, 0, 6217, 6218, 6219, - 6220, 6221, 6222, 6223, 6224, 6225, 6226, 0, 6228, 6229, 6230, 6231, - 0, 6233, 0, 6235, 0, 0, 0, 0, 0, 0, 6211, 0, - 0, 0, 0, 6215, 0, 6217, 0, 6219, 0, 6221, 6222, 6223, - 0, 6225, 6226, 0, 6228, 0, 0, 6231, 0, 6233, 0, 6235, - 0, 6237, 0, 6239, 0, 6210, 6211, 0, 6240, 0, 0, 6215, - 6216, 6217, 6218, 0, 6220, 6221, 6222, 6223, 6224, 6225, 6226, 0, - 6228, 6229, 6230, 6231, 0, 6233, 6234, 6235, 6236, 0, 6238, 0, - 6209, 6210, 6211, 6212, 6240, 6213, 6214, 6215, 6216, 6217, 0, 6219, - 6220, 6221, 6222, 6223, 6224, 6225, 6226, 6227, 6228, 6229, 6230, 6231, - 6232, 6233, 6234, 6235, 0, 0, 0, 0, 0, 6210, 6211, 6212, - 0, 6213, 6214, 6215, 6216, 6217, 0, 6219, 6220, 6221, 6222, 6223, - 6224, 6225, 6226, 6227, 6228, 6229, 6230, 6231, 6232, 6233, 6234, 6235, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 75, 75, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 79, 79, 79, 79, - 2396, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, - 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, - 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, - 79, 79, 79, 79, 0, 0, 0, 0, 79, 79, 79, 79, - 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, - 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, - 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, - 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, - 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, - 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, - 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, - 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, - 79, 79, 79, 0, 0, 79, 79, 79, 79, 79, 79, 79, - 79, 79, 79, 79, 79, 79, 79, 79, 0, 79, 79, 79, - 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 2396, - 0, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, - 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, - 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, - 79, 79, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 6241, 6242, 6243, 6244, 6245, 6246, 6247, 6248, 6249, 6250, 6251, 1210, - 1210, 79, 79, 79, 6252, 6253, 6254, 6255, 6256, 6257, 6258, 6259, - 6260, 6261, 6262, 6263, 6264, 6265, 6266, 6267, 6268, 6269, 6270, 6271, - 6272, 6273, 6274, 6275, 6276, 6277, 6278, 6279, 6280, 6281, 6282, 79, - 6283, 6284, 6285, 6286, 6287, 6288, 6289, 6290, 6291, 6292, 6293, 6294, - 6295, 6296, 6297, 6298, 6299, 6300, 6301, 6302, 6303, 6304, 6305, 6306, - 6307, 6308, 6309, 6310, 6311, 6312, 6313, 6314, 840, 840, 840, 840, - 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, - 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 6315, 6316, - 6317, 79, 79, 79, 2540, 2540, 840, 840, 840, 840, 840, 840, - 840, 840, 840, 840, 840, 840, 2540, 2540, 840, 840, 840, 840, - 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 6318, 840, - 6319, 6318, 6318, 6318, 6318, 6318, 6318, 6318, 6318, 6318, 6318, 840, - 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, - 840, 840, 840, 840, 840, 79, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 6320, 6320, 6320, 6320, 6320, 6320, 6320, 6320, 6320, 6320, - 6320, 6320, 6320, 6320, 6320, 6320, 6320, 6320, 6320, 6320, 6320, 6320, - 6320, 6320, 6320, 6320, 6321, 6322, 6323, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 6324, 6325, 6326, 6327, - 6328, 6329, 6330, 6331, 6332, 6333, 6334, 6335, 6336, 6337, 6338, 6339, - 6340, 6341, 6342, 6343, 6344, 6345, 6346, 6347, 6348, 6349, 6350, 6351, - 6352, 6353, 6354, 6355, 6356, 6357, 6358, 6359, 6360, 6361, 6362, 6363, - 6364, 6365, 6366, 6367, 0, 0, 0, 0, 6368, 6369, 6370, 6371, - 6372, 6373, 6374, 6375, 6376, 0, 0, 0, 0, 0, 0, 0, - 6377, 6378, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 2396, 2396, 2396, 2396, 2396, 2396, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 79, 79, 79, 79, 79, 79, 79, - 79, 79, 79, 79, 79, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 2396, 79, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 79, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 79, 79, 79, 79, 2396, - 2396, 2396, 2396, 2396, 79, 79, 79, 79, 79, 79, 79, 79, - 79, 79, 79, 79, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 79, 79, 79, - 2396, 79, 79, 79, 2396, 2396, 2396, 6379, 6379, 6379, 6379, 6379, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 79, 2396, 79, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 79, 79, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 77, 77, 77, 77, 77, 77, - 77, 77, 79, 79, 79, 79, 79, 2396, 2396, 2396, 2396, 79, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, - 79, 79, 79, 79, 79, 79, 2396, 79, 79, 79, 79, 79, - 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, - 79, 79, 79, 79, 79, 79, 79, 79, 79, 2396, 2396, 79, - 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, - 2396, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, - 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, - 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, - 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, - 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, - 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, - 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, - 79, 79, 79, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 2396, 79, 79, 79, 79, 79, 79, 2396, 79, 79, 79, - 2396, 2396, 2396, 79, 79, 2396, 2396, 2396, 0, 0, 0, 0, - 0, 0, 0, 0, 79, 79, 79, 79, 79, 79, 79, 79, - 79, 79, 79, 2396, 2396, 0, 0, 0, 79, 79, 79, 79, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 0, 0, 0, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 79, 79, 79, - 79, 0, 0, 0, 0, 0, 0, 0, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 0, 0, 0, 0, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 0, 0, 0, 0, 0, 0, 0, 0, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 0, 0, - 0, 0, 0, 0, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 0, 0, 0, 0, - 0, 0, 0, 0, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 0, 0, - 79, 79, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 77, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 77, 2396, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 0, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 0, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, - 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, - 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, - 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, - 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, - 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, - 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, - 79, 79, 0, 0, 2396, 2396, 2396, 2396, 2396, 0, 0, 0, - 2396, 2396, 2396, 0, 0, 0, 0, 0, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, - 2396, 0, 0, 0, 0, 0, 0, 0, 2396, 2396, 2396, 2396, - 2396, 2396, 2396, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 2396, 2396, 2396, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 0, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 6131, 6132, 6133, 6134, 6135, 6136, 6137, 6138, - 6139, 6140, 0, 0, 0, 0, 0, 0, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 0, 0, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 6380, 6381, 6382, 6383, 6384, 4379, 6385, 6386, - 6387, 6388, 4380, 6389, 6390, 6391, 4381, 6392, 6393, 6394, 6395, 6396, - 6397, 6398, 6399, 6400, 6401, 6402, 6403, 4439, 6404, 6405, 6406, 6407, - 6408, 6409, 6410, 6411, 6412, 4444, 4382, 4383, 4445, 6413, 6414, 4190, - 6415, 4384, 6416, 6417, 6418, 6419, 6419, 6419, 6420, 6421, 6422, 6423, - 6424, 6425, 6426, 6427, 6428, 6429, 6430, 6431, 6432, 6433, 6434, 6435, - 6436, 6437, 6437, 4447, 6438, 6439, 6440, 6441, 4386, 6442, 6443, 6444, - 4343, 6445, 6446, 6447, 6448, 6449, 6450, 6451, 6452, 6453, 6454, 6455, - 6456, 6457, 6458, 6459, 6460, 6461, 6462, 6463, 6464, 6465, 6466, 6467, - 6468, 6469, 6470, 6470, 6471, 6472, 6473, 4186, 6474, 6475, 6476, 6477, - 6478, 6479, 6480, 6481, 4391, 6482, 6483, 6484, 6485, 6486, 6487, 6488, - 6489, 6490, 6491, 6492, 6493, 6494, 6495, 6496, 6497, 6498, 6499, 6500, - 6501, 6502, 4132, 6503, 6504, 6505, 6505, 6506, 6507, 6507, 6508, 6509, - 6510, 6511, 6512, 6513, 6514, 6515, 6516, 6517, 6518, 6519, 6520, 4392, - 6521, 6522, 6523, 6524, 4459, 6524, 6525, 4394, 6526, 6527, 6528, 6529, - 4395, 4105, 6530, 6531, 6532, 6533, 6534, 6535, 6536, 6537, 6538, 6539, - 6540, 6541, 6542, 6543, 6544, 6545, 6546, 6547, 6548, 6549, 6550, 6551, - 4396, 6552, 6553, 6554, 6555, 6556, 6557, 4398, 6558, 6559, 6560, 6561, - 6562, 6563, 6564, 6565, 4133, 4467, 6566, 6567, 6568, 6569, 6570, 6571, - 6572, 6573, 4399, 6574, 6575, 6576, 6577, 4510, 6578, 6579, 6580, 6581, - 6582, 6583, 6584, 6585, 6586, 6587, 6588, 6589, 6590, 4203, 6591, 6592, - 6593, 6594, 6595, 6596, 6597, 6598, 6599, 6600, 6601, 4400, 4290, 6602, - 6603, 6604, 6605, 6606, 6607, 6608, 6609, 4471, 6610, 6611, 6612, 6613, - 6614, 6615, 6616, 6617, 4472, 6618, 6619, 6620, 6621, 6622, 6623, 6624, - 6625, 6626, 6627, 6628, 6629, 4474, 6630, 6631, 6632, 6633, 6634, 6635, - 6636, 6637, 6638, 6639, 6640, 6640, 6641, 6642, 4476, 6643, 6644, 6645, - 6646, 6647, 6648, 6649, 4189, 6650, 6651, 6652, 6653, 6654, 6655, 6656, - 4482, 6657, 6658, 6659, 6660, 6661, 6662, 6662, 4483, 4512, 6663, 6664, - 6665, 6666, 6667, 4151, 4485, 6668, 6669, 4411, 6670, 6671, 4365, 6672, - 6673, 4415, 6674, 6675, 6676, 6677, 6677, 6678, 6679, 6680, 6681, 6682, - 6683, 6684, 6685, 6686, 6687, 6688, 6689, 6690, 6691, 6692, 6693, 6694, - 6695, 6696, 6697, 6698, 6699, 6700, 6701, 6702, 6703, 6704, 4421, 6705, - 6706, 6707, 6708, 6709, 6710, 6711, 6712, 6713, 6714, 6715, 6716, 6717, - 6718, 6719, 6720, 6506, 6721, 6722, 6723, 6724, 6725, 6726, 6727, 6728, - 6729, 6730, 6731, 6732, 4207, 6733, 6734, 6735, 6736, 6737, 6738, 4424, - 6739, 6740, 6741, 6742, 6743, 6744, 6745, 6746, 6747, 6748, 6749, 6750, - 6751, 6752, 6753, 6754, 6755, 6756, 6757, 6758, 4146, 6759, 6760, 6761, - 6762, 6763, 6764, 4492, 6765, 6766, 6767, 6768, 6769, 6770, 6771, 6772, - 6773, 6774, 6775, 6776, 6777, 6778, 6779, 6780, 6781, 6782, 6783, 6784, - 4497, 4498, 6785, 6786, 6787, 6788, 6789, 6790, 6791, 6792, 6793, 6794, - 6795, 6796, 6797, 4499, 6798, 6799, 6800, 6801, 6802, 6803, 6804, 6805, - 6806, 6807, 6808, 6809, 6810, 6811, 6812, 6813, 6814, 6815, 6816, 6817, - 6818, 6819, 6820, 6821, 6822, 6823, 6824, 6825, 6826, 6827, 4505, 4505, - 6828, 6829, 6830, 6831, 6832, 6833, 6834, 6835, 6836, 6837, 4506, 6838, - 6839, 6840, 6841, 6842, 6843, 6844, 6845, 6846, 6847, 6848, 6849, 6850, - 6851, 6852, 6853, 6854, 6855, 6856, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, 3034, - 3034, 3034, 3034, 3034, 3034, 3034, 3034, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 1458, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 2128, 2128, 2128, 2128, 2128, 2128, 2128, 2128, - 2128, 2128, 2128, 2128, 2128, 2128, 2128, 2128, 2128, 2128, 2128, 2128, - 2128, 2128, 2128, 2128, 2128, 2128, 2128, 2128, 2128, 2128, 2128, 2128, - 2128, 2128, 2128, 2128, 2128, 2128, 2128, 2128, 2128, 2128, 2128, 2128, - 2128, 2128, 2128, 2128, 2128, 2128, 2128, 2128, 2128, 2128, 2128, 2128, - 2128, 2128, 2128, 2128, 2128, 2128, 2128, 2128, 2128, 2128, 2128, 2128, - 2128, 2128, 2128, 2128, 2128, 2128, 2128, 2128, 2128, 2128, 2128, 2128, - 2128, 2128, 2128, 2128, 2128, 2128, 2128, 2128, 2128, 2128, 2128, 2128, - 2128, 2128, 2128, 2128, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, - 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, - 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, - 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, - 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, - 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, - 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, - 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, - 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, - 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, - 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, - 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, - 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, - 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, - 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, - 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, - 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, - 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, - 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, - 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, - 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, - 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, - 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, - 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, - 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, - 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, - 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, - 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, - 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, - 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, - 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, - 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, - 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, - 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, - 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, - 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, - 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, - 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, - 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, - 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, - 4092, 4092, 4092, 4092, 4092, 4092, 0, 0, -}; - -const boundclasses: [6857]BoundClass = [_]BoundClass{ - BoundClass.OTHER, - BoundClass.CONTROL, - BoundClass.CONTROL, - BoundClass.CONTROL, - BoundClass.LF, - BoundClass.CONTROL, - BoundClass.CR, - BoundClass.CONTROL, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.EXTENDED_PICTOGRAPHIC, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.CONTROL, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.EXTEND, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.OTHER, - BoundClass.EXTEND, - BoundClass.OTHER, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.OTHER, - BoundClass.PREPEND, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.CONTROL, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.EXTEND, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.PREPEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.SPACINGMARK, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.SPACINGMARK, - BoundClass.SPACINGMARK, - BoundClass.SPACINGMARK, - BoundClass.EXTEND, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.EXTEND, - BoundClass.SPACINGMARK, - BoundClass.SPACINGMARK, - BoundClass.SPACINGMARK, - BoundClass.SPACINGMARK, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.EXTEND, - BoundClass.SPACINGMARK, - BoundClass.SPACINGMARK, - BoundClass.SPACINGMARK, - BoundClass.SPACINGMARK, - BoundClass.SPACINGMARK, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.OTHER, - BoundClass.EXTEND, - BoundClass.SPACINGMARK, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.SPACINGMARK, - BoundClass.SPACINGMARK, - BoundClass.SPACINGMARK, - BoundClass.SPACINGMARK, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.SPACINGMARK, - BoundClass.SPACINGMARK, - BoundClass.SPACINGMARK, - BoundClass.SPACINGMARK, - BoundClass.SPACINGMARK, - BoundClass.PREPEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.SPACINGMARK, - BoundClass.SPACINGMARK, - BoundClass.SPACINGMARK, - BoundClass.SPACINGMARK, - BoundClass.SPACINGMARK, - BoundClass.EXTEND, - BoundClass.SPACINGMARK, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.SPACINGMARK, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.EXTEND, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.EXTEND, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.L, - BoundClass.L, - BoundClass.V, - BoundClass.V, - BoundClass.T, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.CONTROL, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.SPACINGMARK, - BoundClass.EXTEND, - BoundClass.SPACINGMARK, - BoundClass.SPACINGMARK, - BoundClass.SPACINGMARK, - BoundClass.SPACINGMARK, - BoundClass.SPACINGMARK, - BoundClass.EXTEND, - BoundClass.SPACINGMARK, - BoundClass.SPACINGMARK, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.EXTEND, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.EXTEND, - BoundClass.ZWJ, - BoundClass.CONTROL, - BoundClass.CONTROL, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.CONTROL, - BoundClass.CONTROL, - BoundClass.CONTROL, - BoundClass.CONTROL, - BoundClass.CONTROL, - BoundClass.CONTROL, - BoundClass.CONTROL, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.EXTENDED_PICTOGRAPHIC, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.EXTENDED_PICTOGRAPHIC, - BoundClass.OTHER, - BoundClass.CONTROL, - BoundClass.CONTROL, - BoundClass.CONTROL, - BoundClass.CONTROL, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.EXTENDED_PICTOGRAPHIC, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.EXTENDED_PICTOGRAPHIC, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.EXTENDED_PICTOGRAPHIC, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.EXTENDED_PICTOGRAPHIC, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.EXTENDED_PICTOGRAPHIC, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.EXTENDED_PICTOGRAPHIC, - BoundClass.EXTENDED_PICTOGRAPHIC, - BoundClass.EXTENDED_PICTOGRAPHIC, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTENDED_PICTOGRAPHIC, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.EXTENDED_PICTOGRAPHIC, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.EXTENDED_PICTOGRAPHIC, - BoundClass.OTHER, - BoundClass.EXTENDED_PICTOGRAPHIC, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.LV, - BoundClass.LVT, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.EXTEND, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.CONTROL, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.EXTEND, - BoundClass.PREPEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.SPACINGMARK, - BoundClass.SPACINGMARK, - BoundClass.SPACINGMARK, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.SPACINGMARK, - BoundClass.EXTEND, - BoundClass.SPACINGMARK, - BoundClass.SPACINGMARK, - BoundClass.EXTEND, - BoundClass.SPACINGMARK, - BoundClass.EXTEND, - BoundClass.SPACINGMARK, - BoundClass.SPACINGMARK, - BoundClass.SPACINGMARK, - BoundClass.SPACINGMARK, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.EXTEND, - BoundClass.SPACINGMARK, - BoundClass.SPACINGMARK, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.CONTROL, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.SPACINGMARK, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.EXTEND, - BoundClass.SPACINGMARK, - BoundClass.SPACINGMARK, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.EXTEND, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.EXTENDED_PICTOGRAPHIC, - BoundClass.EXTENDED_PICTOGRAPHIC, - BoundClass.OTHER, - BoundClass.REGIONAL_INDICATOR, - BoundClass.OTHER, - BoundClass.EXTENDED_PICTOGRAPHIC, - BoundClass.EXTENDED_PICTOGRAPHIC, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.EXTENDED_PICTOGRAPHIC, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.EXTENDED_PICTOGRAPHIC, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.EXTENDED_PICTOGRAPHIC, - BoundClass.EXTENDED_PICTOGRAPHIC, - BoundClass.EXTENDED_PICTOGRAPHIC, - BoundClass.EXTENDED_PICTOGRAPHIC, - BoundClass.EXTENDED_PICTOGRAPHIC, - BoundClass.EXTENDED_PICTOGRAPHIC, - BoundClass.EXTENDED_PICTOGRAPHIC, - BoundClass.EXTENDED_PICTOGRAPHIC, - BoundClass.EXTENDED_PICTOGRAPHIC, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.EXTENDED_PICTOGRAPHIC, - BoundClass.EXTENDED_PICTOGRAPHIC, - BoundClass.EXTEND, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, - BoundClass.OTHER, -}; diff --git a/crates/compiler/builtins/bitcode/src/list.zig b/crates/compiler/builtins/bitcode/src/list.zig index aea5b211138..b508a0eae53 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 742c4afff19..236848c01a2 100644 --- a/crates/compiler/builtins/bitcode/src/main.zig +++ b/crates/compiler/builtins/bitcode/src/main.zig @@ -36,6 +36,7 @@ comptime { exportDecFn(dec.fromStr, "from_str"); exportDecFn(dec.fromU64C, "from_u64"); exportDecFn(dec.logC, "log"); + exportDecFn(dec.powC, "pow"); exportDecFn(dec.mulC, "mul_with_overflow"); exportDecFn(dec.mulOrPanicC, "mul_or_panic"); exportDecFn(dec.mulSaturatedC, "mul_saturated"); @@ -52,6 +53,10 @@ comptime { inline for (INTEGERS) |T| { dec.exportFromInt(T, ROC_BUILTINS ++ ".dec.from_int."); + + dec.exportRound(T, ROC_BUILTINS ++ ".dec.round."); + dec.exportFloor(T, ROC_BUILTINS ++ ".dec.floor."); + dec.exportCeiling(T, ROC_BUILTINS ++ ".dec.ceiling."); } } @@ -75,6 +80,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"); @@ -110,19 +116,6 @@ comptime { exportNumFn(num.greaterThanU128, "greater_than.u128"); exportNumFn(num.greaterThanOrEqualU128, "greater_than_or_equal.u128"); - exportNumFn(num.compareI128, "compare.i128"); - exportNumFn(num.compareU128, "compare.u128"); - - exportNumFn(num.lessThanI128, "less_than.i128"); - exportNumFn(num.lessThanOrEqualI128, "less_than_or_equal.i128"); - exportNumFn(num.greaterThanI128, "greater_than.i128"); - exportNumFn(num.greaterThanOrEqualI128, "greater_than_or_equal.i128"); - - exportNumFn(num.lessThanU128, "less_than.u128"); - exportNumFn(num.lessThanOrEqualU128, "less_than_or_equal.u128"); - exportNumFn(num.greaterThanU128, "greater_than.u128"); - exportNumFn(num.greaterThanOrEqualU128, "greater_than_or_equal.u128"); - inline for (INTEGERS, 0..) |T, i| { num.exportPow(T, ROC_BUILTINS ++ "." ++ NUM ++ ".pow_int."); num.exportDivCeil(T, ROC_BUILTINS ++ "." ++ NUM ++ ".div_ceil."); @@ -134,6 +127,9 @@ comptime { num.exportCeiling(f32, T, ROC_BUILTINS ++ "." ++ NUM ++ ".ceiling_f32."); num.exportCeiling(f64, T, ROC_BUILTINS ++ "." ++ NUM ++ ".ceiling_f64."); + num.exportNumToFloatCast(T, f32, ROC_BUILTINS ++ "." ++ NUM ++ ".num_to_float_cast_f32."); + num.exportNumToFloatCast(T, f64, ROC_BUILTINS ++ "." ++ NUM ++ ".num_to_float_cast_f64."); + num.exportAddWithOverflow(T, ROC_BUILTINS ++ "." ++ NUM ++ ".add_with_overflow."); num.exportAddOrPanic(T, ROC_BUILTINS ++ "." ++ NUM ++ ".add_or_panic."); num.exportAddSaturatedInt(T, ROC_BUILTINS ++ "." ++ NUM ++ ".add_saturated."); @@ -190,15 +186,12 @@ comptime { const str = @import("str.zig"); comptime { exportStrFn(str.init, "init"); - exportStrFn(str.strToScalarsC, "to_scalars"); exportStrFn(str.strSplit, "str_split"); exportStrFn(str.countSegments, "count_segments"); - exportStrFn(str.countGraphemeClusters, "count_grapheme_clusters"); exportStrFn(str.countUtf8Bytes, "count_utf8_bytes"); exportStrFn(str.isEmpty, "is_empty"); exportStrFn(str.getCapacity, "capacity"); exportStrFn(str.startsWith, "starts_with"); - exportStrFn(str.startsWithScalar, "starts_with_scalar"); exportStrFn(str.endsWith, "ends_with"); exportStrFn(str.strConcatC, "concat"); exportStrFn(str.strJoinWithC, "joinWith"); @@ -207,8 +200,6 @@ comptime { exportStrFn(str.substringUnsafe, "substring_unsafe"); exportStrFn(str.getUnsafe, "get_unsafe"); exportStrFn(str.reserve, "reserve"); - exportStrFn(str.getScalarUnsafe, "get_scalar_unsafe"); - exportStrFn(str.appendScalar, "append_scalar"); exportStrFn(str.strToUtf8C, "to_utf8"); exportStrFn(str.fromUtf8RangeC, "from_utf8_range"); exportStrFn(str.repeat, "repeat"); @@ -217,7 +208,6 @@ comptime { exportStrFn(str.strTrimEnd, "trim_end"); exportStrFn(str.strCloneTo, "clone_to"); exportStrFn(str.withCapacity, "with_capacity"); - exportStrFn(str.strGraphemes, "graphemes"); exportStrFn(str.strAllocationPtr, "allocation_ptr"); exportStrFn(str.strReleaseExcessCapacity, "release_excess_capacity"); @@ -264,6 +254,9 @@ comptime { if (builtin.target.cpu.arch == .aarch64) { @export(__roc_force_setjmp, .{ .name = "__roc_force_setjmp", .linkage = .Weak }); @export(__roc_force_longjmp, .{ .name = "__roc_force_longjmp", .linkage = .Weak }); + } else if (builtin.os.tag == .windows) { + @export(__roc_force_setjmp_windows, .{ .name = "__roc_force_setjmp", .linkage = .Weak }); + @export(__roc_force_longjmp_windows, .{ .name = "__roc_force_longjmp", .linkage = .Weak }); } } @@ -279,14 +272,103 @@ pub extern fn _longjmp([*c]c_int, c_int) noreturn; pub extern fn sigsetjmp([*c]c_int, c_int) c_int; pub extern fn siglongjmp([*c]c_int, c_int) noreturn; pub extern fn longjmperror() void; + // Zig won't expose the externs (and hence link correctly) unless we force them to be used. fn __roc_force_setjmp(it: [*c]c_int) callconv(.C) c_int { return setjmp(it); } + fn __roc_force_longjmp(a0: [*c]c_int, a1: c_int) callconv(.C) noreturn { longjmp(a0, a1); } +pub extern fn windows_setjmp([*c]c_int) c_int; +pub extern fn windows_longjmp([*c]c_int, c_int) noreturn; + +fn __roc_force_setjmp_windows(it: [*c]c_int) callconv(.C) c_int { + return windows_setjmp(it); +} + +fn __roc_force_longjmp_windows(a0: [*c]c_int, a1: c_int) callconv(.C) noreturn { + windows_longjmp(a0, a1); +} + +comptime { + if (builtin.os.tag == .windows) { + asm ( + \\.global windows_longjmp; + \\windows_longjmp: + \\ movq 0x00(%rcx), %rdx + \\ movq 0x08(%rcx), %rbx + \\ # note 0x10 is not used yet! + \\ movq 0x18(%rcx), %rbp + \\ movq 0x20(%rcx), %rsi + \\ movq 0x28(%rcx), %rdi + \\ movq 0x30(%rcx), %r12 + \\ movq 0x38(%rcx), %r13 + \\ movq 0x40(%rcx), %r14 + \\ movq 0x48(%rcx), %r15 + \\ + \\ # restore stack pointer + \\ movq 0x10(%rcx), %rsp + \\ + \\ # load jmp address + \\ movq 0x50(%rcx), %r8 + \\ + \\ # set up return value + \\ movq %rbx, %rax + \\ + \\ movdqu 0x60(%rcx), %xmm6 + \\ movdqu 0x70(%rcx), %xmm7 + \\ movdqu 0x80(%rcx), %xmm8 + \\ movdqu 0x90(%rcx), %xmm9 + \\ movdqu 0xa0(%rcx), %xmm10 + \\ movdqu 0xb0(%rcx), %xmm11 + \\ movdqu 0xc0(%rcx), %xmm12 + \\ movdqu 0xd0(%rcx), %xmm13 + \\ movdqu 0xe0(%rcx), %xmm14 + \\ movdqu 0xf0(%rcx), %xmm15 + \\ + \\ jmp *%r8 + \\ + \\.global windows_setjmp; + \\windows_setjmp: + \\ movq %rdx, 0x00(%rcx) + \\ movq %rbx, 0x08(%rcx) + \\ # note 0x10 is not used yet! + \\ movq %rbp, 0x18(%rcx) + \\ movq %rsi, 0x20(%rcx) + \\ movq %rdi, 0x28(%rcx) + \\ movq %r12, 0x30(%rcx) + \\ movq %r13, 0x38(%rcx) + \\ movq %r14, 0x40(%rcx) + \\ movq %r15, 0x48(%rcx) + \\ + \\ # the stack location right after the windows_setjmp call + \\ leaq 0x08(%rsp), %r8 + \\ movq %r8, 0x10(%rcx) + \\ + \\ movq (%rsp), %r8 + \\ movq %r8, 0x50(%rcx) + \\ + \\ movdqu %xmm6, 0x60(%rcx) + \\ movdqu %xmm7, 0x70(%rcx) + \\ movdqu %xmm8, 0x80(%rcx) + \\ movdqu %xmm9, 0x90(%rcx) + \\ movdqu %xmm10, 0xa0(%rcx) + \\ movdqu %xmm11, 0xb0(%rcx) + \\ movdqu %xmm12, 0xc0(%rcx) + \\ movdqu %xmm13, 0xd0(%rcx) + \\ movdqu %xmm14, 0xe0(%rcx) + \\ movdqu %xmm15, 0xf0(%rcx) + \\ + \\ xorl %eax, %eax + \\ ret + \\ + ); + } +} + // Export helpers - Must be run inside a comptime fn exportBuiltinFn(comptime func: anytype, comptime func_name: []const u8) void { @export(func, .{ .name = "roc_builtins." ++ func_name, .linkage = .Strong }); diff --git a/crates/compiler/builtins/bitcode/src/num.zig b/crates/compiler/builtins/bitcode/src/num.zig index d388859554a..ed1b31a42ea 100644 --- a/crates/compiler/builtins/bitcode/src/num.zig +++ b/crates/compiler/builtins/bitcode/src/num.zig @@ -86,6 +86,15 @@ pub fn exportParseFloat(comptime T: type, comptime name: []const u8) void { @export(f, .{ .name = name ++ @typeName(T), .linkage = .Strong }); } +pub fn exportNumToFloatCast(comptime T: type, comptime F: type, comptime name: []const u8) void { + comptime var f = struct { + fn func(x: T) callconv(.C) F { + return @floatFromInt(x); + } + }.func; + @export(f, .{ .name = name ++ @typeName(T), .linkage = .Strong }); +} + pub fn exportPow(comptime T: type, comptime name: []const u8) void { comptime var f = struct { fn func(base: T, exp: T) callconv(.C) T { diff --git a/crates/compiler/builtins/bitcode/src/str.zig b/crates/compiler/builtins/bitcode/src/str.zig index f732b1e8e72..171f13ad691 100644 --- a/crates/compiler/builtins/bitcode/src/str.zig +++ b/crates/compiler/builtins/bitcode/src/str.zig @@ -1,6 +1,5 @@ const utils = @import("utils.zig"); const RocList = @import("list.zig").RocList; -const grapheme = @import("helpers/grapheme.zig"); const UpdateMode = utils.UpdateMode; const std = @import("std"); const mem = std.mem; @@ -552,242 +551,6 @@ pub fn strNumberOfBytes(string: RocStr) callconv(.C) usize { return string.len(); } -// Str.toScalars -pub fn strToScalarsC(str: RocStr) callconv(.C) RocList { - return @call(.always_inline, strToScalars, .{str}); -} - -fn strToScalars(string: RocStr) callconv(.C) RocList { - const len = string.len(); - - if (len == 0) { - return RocList.empty(); - } - - var capacity = len; - - if (!string.isSmallStr()) { - capacity = string.getCapacity(); - } - - // For purposes of preallocation, assume the number of code points is the same - // as the number of bytes. This might be longer than necessary, but definitely - // should not require a second allocation. - var answer = RocList.allocate(@alignOf(u32), capacity, @sizeOf(u32)); - - // `orelse unreachable` is fine here, because we already did an early - // return to verify the string was nonempty. - var answer_elems = answer.elements(u32) orelse unreachable; - var src_index: usize = 0; - var answer_index: usize = 0; - - while (src_index < len) { - src_index += writeNextScalar(string, src_index, answer_elems, answer_index); - answer_index += 1; - } - - answer.length = answer_index; - - return answer; -} - -// Given a non-empty RocStr, and a src_index byte index into that string, -// and a destination [*]u32, and an index into that destination, -// Parses the next scalar value out of the string (at the given byte index), -// writes it into the destination, and returns the number of bytes parsed. -inline fn writeNextScalar(non_empty_string: RocStr, src_index: usize, dest: [*]u32, dest_index: usize) usize { - const utf8_byte = non_empty_string.getUnchecked(src_index); - - // How UTF-8 bytes work: - // https://docs.teradata.com/r/Teradata-Database-International-Character-Set-Support/June-2017/Client-Character-Set-Options/UTF8-Client-Character-Set-Support/UTF8-Multibyte-Sequences - if (utf8_byte <= 127) { - // It's an ASCII character. Copy it over directly. - dest[dest_index] = @as(u32, @intCast(utf8_byte)); - - return 1; - } else if (utf8_byte >> 5 == 0b0000_0110) { - // Its three high order bits are 110, so this is a two-byte sequence. - - // Example: - // utf-8: 1100 1111 1011 0001 - // code pt: 0000 0011 1111 0001 (decimal: 1009) - - // Discard the first byte's high order bits of 110. - var code_pt = @as(u32, @intCast(utf8_byte & 0b0001_1111)); - - // Discard the second byte's high order bits of 10. - code_pt <<= 6; - code_pt |= non_empty_string.getUnchecked(src_index + 1) & 0b0011_1111; - - dest[dest_index] = code_pt; - - return 2; - } else if (utf8_byte >> 4 == 0b0000_1110) { - // Its four high order bits are 1110, so this is a three-byte sequence. - - // Discard the first byte's high order bits of 1110. - var code_pt = @as(u32, @intCast(utf8_byte & 0b0000_1111)); - - // Discard the second byte's high order bits of 10. - code_pt <<= 6; - code_pt |= non_empty_string.getUnchecked(src_index + 1) & 0b0011_1111; - - // Discard the third byte's high order bits of 10 (same as second byte). - code_pt <<= 6; - code_pt |= non_empty_string.getUnchecked(src_index + 2) & 0b0011_1111; - - dest[dest_index] = code_pt; - - return 3; - } else { - // This must be a four-byte sequence, so the five high order bits should be 11110. - - // Discard the first byte's high order bits of 11110. - var code_pt = @as(u32, @intCast(utf8_byte & 0b0000_0111)); - - // Discard the second byte's high order bits of 10. - code_pt <<= 6; - code_pt |= non_empty_string.getUnchecked(src_index + 1) & 0b0011_1111; - - // Discard the third byte's high order bits of 10 (same as second byte). - code_pt <<= 6; - code_pt |= non_empty_string.getUnchecked(src_index + 2) & 0b0011_1111; - - // Discard the fourth byte's high order bits of 10 (same as second and third). - code_pt <<= 6; - code_pt |= non_empty_string.getUnchecked(src_index + 3) & 0b0011_1111; - - dest[dest_index] = code_pt; - - return 4; - } -} - -test "strToScalars: empty string" { - const str = RocStr.fromSlice(""); - defer RocStr.decref(str); - - const expected = RocList.empty(); - const actual = strToScalars(str); - defer actual.decref(@sizeOf(u32)); - - try expect(RocList.eql(actual, expected)); -} - -test "strToScalars: One ASCII char" { - const str = RocStr.fromSlice("R"); - defer RocStr.decref(str); - - const expected_array = [_]u32{82}; - const expected = RocList.fromSlice(u32, expected_array[0..expected_array.len]); - defer expected.decref(@sizeOf(u32)); - - const actual = strToScalars(str); - defer actual.decref(@sizeOf(u32)); - - try expect(RocList.eql(actual, expected)); -} - -test "strToScalars: Multiple ASCII chars" { - const str = RocStr.fromSlice("Roc!"); - defer RocStr.decref(str); - - const expected_array = [_]u32{ 82, 111, 99, 33 }; - const expected = RocList.fromSlice(u32, expected_array[0..expected_array.len]); - defer expected.decref(@sizeOf(u32)); - - const actual = strToScalars(str); - defer actual.decref(@sizeOf(u32)); - - try expect(RocList.eql(actual, expected)); -} - -test "strToScalars: One 2-byte UTF-8 character" { - const str = RocStr.fromSlice("é"); - defer RocStr.decref(str); - - const expected_array = [_]u32{233}; - const expected = RocList.fromSlice(u32, expected_array[0..expected_array.len]); - defer expected.decref(@sizeOf(u32)); - - const actual = strToScalars(str); - defer actual.decref(@sizeOf(u32)); - - try expect(RocList.eql(actual, expected)); -} - -test "strToScalars: Multiple 2-byte UTF-8 characters" { - const str = RocStr.fromSlice("Cäfés"); - defer RocStr.decref(str); - - const expected_array = [_]u32{ 67, 228, 102, 233, 115 }; - const expected = RocList.fromSlice(u32, expected_array[0..expected_array.len]); - defer expected.decref(@sizeOf(u32)); - - const actual = strToScalars(str); - defer actual.decref(@sizeOf(u32)); - - try expect(RocList.eql(actual, expected)); -} - -test "strToScalars: One 3-byte UTF-8 character" { - const str = RocStr.fromSlice("鹏"); - defer RocStr.decref(str); - - const expected_array = [_]u32{40527}; - const expected = RocList.fromSlice(u32, expected_array[0..expected_array.len]); - defer expected.decref(@sizeOf(u32)); - - const actual = strToScalars(str); - defer actual.decref(@sizeOf(u32)); - - try expect(RocList.eql(actual, expected)); -} - -test "strToScalars: Multiple 3-byte UTF-8 characters" { - const str = RocStr.fromSlice("鹏很有趣"); - defer RocStr.decref(str); - - const expected_array = [_]u32{ 40527, 24456, 26377, 36259 }; - const expected = RocList.fromSlice(u32, expected_array[0..expected_array.len]); - defer expected.decref(@sizeOf(u32)); - - const actual = strToScalars(str); - defer actual.decref(@sizeOf(u32)); - - try expect(RocList.eql(actual, expected)); -} - -test "strToScalars: One 4-byte UTF-8 character" { - // from https://design215.com/toolbox/utf8-4byte-characters.php - const str = RocStr.fromSlice("𒀀"); - defer RocStr.decref(str); - - const expected_array = [_]u32{73728}; - const expected = RocList.fromSlice(u32, expected_array[0..expected_array.len]); - defer expected.decref(@sizeOf(u32)); - - const actual = strToScalars(str); - defer actual.decref(@sizeOf(u32)); - - try expect(RocList.eql(actual, expected)); -} - -test "strToScalars: Multiple 4-byte UTF-8 characters" { - // from https://design215.com/toolbox/utf8-4byte-characters.php - const str = RocStr.fromSlice("𒀀𒀁"); - defer RocStr.decref(str); - - const expected_array = [_]u32{ 73728, 73729 }; - const expected = RocList.fromSlice(u32, expected_array[0..expected_array.len]); - defer expected.decref(@sizeOf(u32)); - - const actual = strToScalars(str); - defer actual.decref(@sizeOf(u32)); - - try expect(RocList.eql(actual, expected)); -} - // Str.fromInt pub fn exportFromInt(comptime T: type, comptime name: []const u8) void { comptime var f = struct { @@ -1371,125 +1134,6 @@ test "countSegments: overlapping delimiter 2" { try expectEqual(segments_count, 3); } -// Str.countGraphemeClusters -pub fn countGraphemeClusters(string: RocStr) callconv(.C) usize { - if (string.isEmpty()) { - return 0; - } - - const bytes_len = string.len(); - const bytes_ptr = string.asU8ptr(); - - var bytes = bytes_ptr[0..bytes_len]; - var iter = (unicode.Utf8View.init(bytes) catch unreachable).iterator(); - - var count: usize = 0; - var grapheme_break_state: ?grapheme.BoundClass = null; - var grapheme_break_state_ptr = &grapheme_break_state; - var opt_last_codepoint: ?u21 = null; - while (iter.nextCodepoint()) |cur_codepoint| { - if (opt_last_codepoint) |last_codepoint| { - var did_break = grapheme.isGraphemeBreak(last_codepoint, cur_codepoint, grapheme_break_state_ptr); - if (did_break) { - count += 1; - grapheme_break_state = null; - } - } - opt_last_codepoint = cur_codepoint; - } - - // If there are no breaks, but the str is not empty, then there - // must be a single grapheme - if (bytes_len != 0) { - count += 1; - } - - return count; -} - -// Str.graphemes -pub fn strGraphemes(roc_str: RocStr) callconv(.C) RocList { - var break_state: ?grapheme.BoundClass = null; - var opt_last_codepoint: ?u21 = null; - var index: usize = 0; - var last_codepoint_len: u8 = 0; - - const alloc_ptr = @intFromPtr(roc_str.getAllocationPtr()) >> 1; - const init_fn = if (roc_str.isSmallStr()) - &initFromSmallStr - else - &initFromBigStr; - - var result = RocList.allocate(@alignOf(RocStr), countGraphemeClusters(roc_str), @sizeOf(RocStr)); - const graphemes = result.elements(RocStr) orelse return result; - var slice = roc_str.asSlice(); - var iter = (unicode.Utf8View.init(slice) catch unreachable).iterator(); - - while (iter.nextCodepoint()) |cur_codepoint| { - const cur_codepoint_len = unicode.utf8CodepointSequenceLength(cur_codepoint) catch unreachable; - if (opt_last_codepoint) |last_codepoint| { - var did_break = grapheme.isGraphemeBreak(last_codepoint, cur_codepoint, &break_state); - if (did_break) { - graphemes[index] = init_fn(@constCast(slice.ptr), last_codepoint_len, alloc_ptr); - slice = slice[last_codepoint_len..]; - index += 1; - break_state = null; - last_codepoint_len = 0; - } - } - last_codepoint_len += cur_codepoint_len; - opt_last_codepoint = cur_codepoint; - } - // Append last grapheme - graphemes[index] = init_fn(@constCast(slice.ptr), slice.len, alloc_ptr); - - if (!roc_str.isSmallStr()) { - // Correct refcount for all of the splits made. - roc_str.incref(index + 1); - } - return result; -} - -// these test both countGraphemeClusters() and strGraphemes() -fn graphemesTest(input: []const u8, expected: []const []const u8) !void { - const rocstr = RocStr.fromSlice(input); - defer rocstr.decref(); - const count = countGraphemeClusters(rocstr); - try expectEqual(expected.len, count); - - const graphemes = strGraphemes(rocstr); - defer graphemes.decref(@sizeOf(u8)); - if (input.len == 0) return; // empty string - const elems = graphemes.elements(RocStr) orelse unreachable; - for (expected, 0..) |g, i| { - try std.testing.expectEqualStrings(g, elems[i].asSlice()); - } -} - -test "graphemes: empty string" { - try graphemesTest("", &.{}); -} - -test "graphemes: ascii characters" { - try graphemesTest("abcd", &.{ "a", "b", "c", "d" }); -} - -test "graphemes: utf8 characters" { - try graphemesTest("ãxā", &.{ "ã", "x", "ā" }); -} - -test "graphemes: emojis" { - try graphemesTest("🤔🤔🤔", &.{ "🤔", "🤔", "🤔" }); -} - -test "graphemes: emojis and ut8 characters" { - try graphemesTest("🤔å🤔¥🤔ç", &.{ "🤔", "å", "🤔", "¥", "🤔", "ç" }); -} - -test "graphemes: emojis, ut8, and ascii characters" { - try graphemesTest("6🤔å🤔e¥🤔çpp", &.{ "6", "🤔", "å", "🤔", "e", "¥", "🤔", "ç", "p", "p" }); -} - pub fn countUtf8Bytes(string: RocStr) callconv(.C) usize { return string.len(); } @@ -1614,44 +1258,6 @@ pub fn repeat(string: RocStr, count: usize) callconv(.C) RocStr { return ret_string; } -// Str.startsWithScalar -pub fn startsWithScalar(string: RocStr, prefix: u32) callconv(.C) bool { - const len = string.len(); - - if (len == 0) { - return false; - } - - // Write this (non-empty) string's first scalar into `first_scalar` - var first_scalar: [1]u32 = undefined; - - _ = writeNextScalar(string, 0, &first_scalar, 0); - - // Return whether `first_scalar` equals `prefix` - return @as(*u32, @ptrCast(&first_scalar)).* == prefix; -} - -test "startsWithScalar: empty string" { - const whole = RocStr.empty(); - const prefix: u32 = 'x'; - try expect(!startsWithScalar(whole, prefix)); -} - -test "startsWithScalar: ascii char" { - const whole = RocStr.fromSlice("foobar"); - const prefix: u32 = 'f'; - try expect(startsWithScalar(whole, prefix)); -} - -test "startsWithScalar: emoji" { - const yes = RocStr.fromSlice("💖foobar"); - const no = RocStr.fromSlice("foobar"); - const prefix: u32 = '💖'; - - try expect(startsWithScalar(yes, prefix)); - try expect(!startsWithScalar(no, prefix)); -} - test "startsWith: foo starts with fo" { const foo = RocStr.fromSlice("foo"); const fo = RocStr.fromSlice("fo"); @@ -2761,78 +2367,6 @@ test "capacity: big string" { try expect(data.getCapacity() >= data_bytes.len); } -pub fn appendScalar(string: RocStr, scalar_u32: u32) callconv(.C) RocStr { - const scalar = @as(u21, @intCast(scalar_u32)); - const width = std.unicode.utf8CodepointSequenceLength(scalar) catch unreachable; - - var output = string.reallocate(string.len() + width); - var slice = output.asSliceWithCapacityMut(); - - _ = std.unicode.utf8Encode(scalar, slice[string.len() .. string.len() + width]) catch unreachable; - - return output; -} - -test "appendScalar: small A" { - const A: []const u8 = "A"; - - const data_bytes = "hello"; - var data = RocStr.init(data_bytes, data_bytes.len); - - const actual = appendScalar(data, A[0]); - defer actual.decref(); - - const expected_bytes = "helloA"; - const expected = RocStr.init(expected_bytes, expected_bytes.len); - defer expected.decref(); - - try expect(actual.eq(expected)); -} - -test "appendScalar: small 😀" { - const data_bytes = "hello"; - var data = RocStr.init(data_bytes, data_bytes.len); - - const actual = appendScalar(data, 0x1F600); - defer actual.decref(); - - const expected_bytes = "hello😀"; - const expected = RocStr.init(expected_bytes, expected_bytes.len); - defer expected.decref(); - - try expect(actual.eq(expected)); -} - -test "appendScalar: big A" { - const A: []const u8 = "A"; - - const data_bytes = "a string so large that it must be heap-allocated"; - var data = RocStr.init(data_bytes, data_bytes.len); - - const actual = appendScalar(data, A[0]); - defer actual.decref(); - - const expected_bytes = "a string so large that it must be heap-allocatedA"; - const expected = RocStr.init(expected_bytes, expected_bytes.len); - defer expected.decref(); - - try expect(actual.eq(expected)); -} - -test "appendScalar: big 😀" { - const data_bytes = "a string so large that it must be heap-allocated"; - var data = RocStr.init(data_bytes, data_bytes.len); - - const actual = appendScalar(data, 0x1F600); - defer actual.decref(); - - const expected_bytes = "a string so large that it must be heap-allocated😀"; - const expected = RocStr.init(expected_bytes, expected_bytes.len); - defer expected.decref(); - - try expect(actual.eq(expected)); -} - pub fn reserve(string: RocStr, spare: usize) callconv(.C) RocStr { const old_length = string.len(); if (string.getCapacity() >= old_length + spare) { @@ -2849,27 +2383,6 @@ pub fn withCapacity(capacity: usize) callconv(.C) RocStr { str.setLen(0); return str; } - -pub fn getScalarUnsafe(string: RocStr, index: usize) callconv(.C) extern struct { bytesParsed: usize, scalar: u32 } { - const slice = string.asSlice(); - const bytesParsed = @as(usize, @intCast(std.unicode.utf8ByteSequenceLength(slice[index]) catch unreachable)); - const scalar = std.unicode.utf8Decode(slice[index .. index + bytesParsed]) catch unreachable; - - return .{ .bytesParsed = bytesParsed, .scalar = @as(u32, @intCast(scalar)) }; -} - -test "getScalarUnsafe" { - const data_bytes = "A"; - var data = RocStr.init(data_bytes, data_bytes.len); - - const result = getScalarUnsafe(data, 0); - - const expected = try std.unicode.utf8Decode("A"); - - try expectEqual(result.scalar, @as(u32, @intCast(expected))); - try expectEqual(result.bytesParsed, 1); -} - pub fn strCloneTo( string: RocStr, ptr: [*]u8, diff --git a/crates/compiler/builtins/roc/Dict.roc b/crates/compiler/builtins/roc/Dict.roc index 7b27df659b6..c79f4404ac0 100644 --- a/crates/compiler/builtins/roc/Dict.roc +++ b/crates/compiler/builtins/roc/Dict.roc @@ -729,7 +729,7 @@ incrementDist = \distAndFingerprint -> distAndFingerprint + distInc incrementDistN = \distAndFingerprint, n -> - distAndFingerprint + (n * distInc) + distAndFingerprint + (Num.mulWrap n distInc) decrementDist = \distAndFingerprint -> distAndFingerprint - distInc @@ -837,7 +837,7 @@ removeBucketHelper = \buckets, bucketIndex -> nextIndex = nextBucketIndex bucketIndex (List.len buckets) nextBucket = listGetUnsafe buckets nextIndex # shift down until either empty or an element with correct spot is found - if nextBucket.distAndFingerprint >= distInc * 2 then + if nextBucket.distAndFingerprint >= Num.mulWrap distInc 2 then List.set buckets bucketIndex { nextBucket & distAndFingerprint: decrementDist nextBucket.distAndFingerprint } |> removeBucketHelper nextIndex else @@ -857,7 +857,7 @@ increaseSize = \@Dict { data, maxBucketCapacity, maxLoadFactor, shifts } -> shifts: newShifts, } else - crash "Dict hit limit of \(Num.toStr maxBucketCount) elements. Unable to grow more." + crash "Dict hit limit of $(Num.toStr maxBucketCount) elements. Unable to grow more." allocBucketsFromShift : U8, F32 -> (List Bucket, U64) allocBucketsFromShift = \shifts, maxLoadFactor -> @@ -1417,7 +1417,7 @@ wymix = \a, b -> wymum : U64, U64 -> { lower : U64, upper : U64 } wymum = \a, b -> - r = Num.toU128 a * Num.toU128 b + r = Num.mulWrap (Num.toU128 a) (Num.toU128 b) lower = Num.toU64 r upper = Num.shiftRightZfBy r 64 |> Num.toU64 diff --git a/crates/compiler/builtins/roc/List.roc b/crates/compiler/builtins/roc/List.roc index 0565e0128be..c19b9507062 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/roc/Num.roc b/crates/compiler/builtins/roc/Num.roc index 2b1e3782b16..5992af821c0 100644 --- a/crates/compiler/builtins/roc/Num.roc +++ b/crates/compiler/builtins/roc/Num.roc @@ -48,6 +48,7 @@ interface Num isLte, isGt, isGte, + isApproxEq, sin, cos, tan, @@ -661,6 +662,22 @@ isLte : Num a, Num a -> Bool ## is [defined to be unordered](https://en.wikipedia.org/wiki/NaN#Comparison_with_NaN).) isGte : Num a, Num a -> Bool +## Returns `Bool.true` if the first number and second number are within a specific threshold +## +## A specific relative and absolute tolerance can be provided to change the threshold +## +## If either argument is [*NaN*](Num.isNaN), returns `Bool.false` no matter what. (*NaN* +## is [defined to be unordered](https://en.wikipedia.org/wiki/NaN#Comparison_with_NaN).) +isApproxEq : Frac a, Frac a, { rtol ? Frac a, atol ? Frac a } -> Bool +isApproxEq = \value, refValue, { rtol ? 0.00001, atol ? 0.00000001 } -> value + <= refValue + && value + >= refValue + || Num.absDiff value refValue + <= atol + + rtol + * Num.abs refValue + ## Returns `Bool.true` if the number is `0`, and `Bool.false` otherwise. isZero : Num a -> Bool @@ -985,13 +1002,21 @@ divCeilChecked = \a, b -> ## Num.divTrunc 8 -3 ## ``` divTrunc : Int a, Int a -> Int a +divTrunc = \a, b -> + if Num.isZero b then + crash "Integer division by 0!" + else + Num.divTruncUnchecked a b divTruncChecked : Int a, Int a -> Result (Int a) [DivByZero] divTruncChecked = \a, b -> if Num.isZero b then Err DivByZero else - Ok (Num.divTrunc a b) + Ok (Num.divTruncUnchecked a b) + +## traps (hardware fault) when given zero as the second argument. +divTruncUnchecked : Int a, Int a -> Int a ## Obtains the remainder (truncating modulo) from the division of two integers. ## @@ -1006,13 +1031,21 @@ divTruncChecked = \a, b -> ## Num.rem -8 -3 ## ``` rem : Int a, Int a -> Int a +rem = \a, b -> + if Num.isZero b then + crash "Integer division by 0!" + else + Num.remUnchecked a b remChecked : Int a, Int a -> Result (Int a) [DivByZero] remChecked = \a, b -> if Num.isZero b then Err DivByZero else - Ok (Num.rem a b) + Ok (Num.remUnchecked a b) + +## traps (hardware fault) when given zero as the second argument. +remUnchecked : Int a, Int a -> Int a isMultipleOf : Int a, Int a -> Bool diff --git a/crates/compiler/builtins/roc/Str.roc b/crates/compiler/builtins/roc/Str.roc index 15ecf45f324..8b6558c78d3 100644 --- a/crates/compiler/builtins/roc/Str.roc +++ b/crates/compiler/builtins/roc/Str.roc @@ -1,90 +1,331 @@ -## Roc strings are sequences of text values. This module includes functions for combining strings, -## as well as breaking them up into smaller units—most commonly [extended grapheme clusters](http://www.unicode.org/glossary/#extended_grapheme_cluster) -## (referred to in this module's documentation as "graphemes" rather than "characters" for clarity; -## "characters" can mean very different things in different languages). +## Strings represent text. For example, `"Hi!"` is a string. ## -## This module focuses on graphemes (as opposed to, say, Unicode code points or LATIN-1 bytes) -## because graphemes avoid common classes of bugs. Breaking strings up using code points often -## leads to bugs around things like emoji, where multiple code points combine to form to a -## single rendered glyph. Graphemes avoid these bugs by treating multi-code-point things like -## emojis as indivisible units. +## This guide starts at a high level and works down to the in-memory representation of strings and their [performance characteristics](#performance). For reasons that will be explained later in this guide, some string operations are in the `Str` module while others (notably [capitalization](#capitalization), [code points](#code-points), [graphemes](#graphemes), and sorting) are in separate packages. There's also a list of recommendations for [when to use code points, graphemes, and UTF-8](#when-to-use). ## -## Because graphemes can have variable length (there's no upper limit on how many code points one -## grapheme can represent), it takes linear time to count the number of graphemes in a string, -## and also linear time to find an individual grapheme within a string by its position (or "index") -## among the string's other graphemes. The only way to get constant-time access to these is in a way -## that can result in bugs if the string contains multi-code-point things like emojis, which is why -## this module does not offer those. +## ## Syntax ## +## The most common way to represent strings is using quotation marks: ## -## ## Working with Unicode strings in Roc +## ``` +## "Hello, World!" +## ``` +## +## Using this syntax, the whole string must go on one line. You can write multiline strings using triple quotes: ## -## Unicode can represent text values which span multiple languages, symbols, and emoji. -## Here are some valid Roc strings: ## ``` -## "Roc!" -## "鹏" -## "🕊" +## text = +## """ +## In memory, this string will not have any spaces +## at its start. That's because the first line +## starts at the same indentation level as the +## opening quotation mark. Actually, none of these +## lines will be indented. +## +## However, this line will be indented! +## """ +## ``` +## +## In triple-quoted strings, both the opening and closing `"""` must be at the same indentation level. Lines in the string begin at that indentation level; the spaces that indent the multiline string itself are not considered content. +## +## ### Interpolation +## +## *String interpolation* is syntax for inserting a string into another string. +## ## ``` -## Every Unicode string is a sequence of [extended grapheme clusters](http://www.unicode.org/glossary/#extended_grapheme_cluster). -## An extended grapheme cluster represents what a person reading a string might -## call a "character" - like "A" or "ö" or "👩‍👩‍👦‍👦". -## Because the term "character" means different things in different areas of -## programming, and "extended grapheme cluster" is a mouthful, in Roc we use the -## term "grapheme" as a shorthand for the more precise "extended grapheme cluster." +## name = "Sam" ## -## You can get the number of graphemes in a string by calling `Str.countGraphemes` on it: +## "Hi, my name is $(name)!" ## ``` -## Str.countGraphemes "Roc!" -## Str.countGraphemes "折り紙" -## Str.countGraphemes "🕊" +## +## This will evaluate to the string `"Hi, my name is Sam!"` +## +## You can put any expression you like inside the parentheses, as long as it's all on one line: +## +## ``` +## colors = ["red", "green", "blue"] +## +## "The colors are $(colors |> Str.joinWith ", ")!" +## ``` +## +## Interpolation can be used in multiline strings, but the part inside the parentheses must still be on one line. +## +## ### Escapes +## +## There are a few special escape sequences in strings: +## +## * `\n` becomes a [newline](https://en.wikipedia.org/wiki/Newline) +## * `\r` becomes a [carriage return](https://en.wikipedia.org/wiki/Carriage_return#Computers) +## * `\t` becomes a [tab](https://en.wikipedia.org/wiki/Tab_key#Tab_characters) +## * `\"` becomes a normal `"` (this lets you write `"` inside a single-line string) +## * `\\` becomes a normal `\` (this lets you write `\` without it being treated as an escape) +## * `\$` becomes a normal `$` (this lets you write `$` followed by `(` without it being treated as [interpolation](#interpolation)) +## +## These work in both single-line and multiline strings. We'll also discuss another escape later, for inserting [Unicode code points](#code-points) into a string. +## +## ### Single quote syntax +## +## Try putting `'👩'` into `roc repl`. You should see this: +## ## ``` -## > The `countGraphemes` function walks through the entire string to get its answer, -## > so if you want to check whether a string is empty, you'll get much better performance -## > by calling `Str.isEmpty myStr` instead of `Str.countGraphemes myStr == 0`. +## » '👩' +## +## 128105 : Int * +## ``` +## +## The single-quote `'` syntax lets you represent a Unicode code point (discussed in the next section) in source code, in a way that renders as the actual text it represents rather than as a number literal. This lets you see what it looks like in the source code rather than looking at a number. +## +## At runtime, the single-quoted value will be treated the same as an ordinary number literal—in other words, `'👩'` is syntax sugar for writing `128105`. You can verify this in `roc repl`: +## +## ``` +## » '👩' == 128105 +## +## Bool.true : Bool +## ``` +## +## Double quotes (`"`), on the other hand, are not type-compatible with integers—not only because strings can be empty (`""` is valid, but `''` is not) but also because there may be more than one code point involved in any given string! +## +## There are also some special escape sequences in single-quote strings: +## +## * `\n` becomes a [newline](https://en.wikipedia.org/wiki/Newline) +## * `\r` becomes a [carriage return](https://en.wikipedia.org/wiki/Carriage_return#Computers) +## * `\t` becomes a [tab](https://en.wikipedia.org/wiki/Tab_key#Tab_characters) +## * `\'` becomes a normal `'` (this lets you write `'` inside a single-quote string) +## * `\\` becomes a normal `\` (this lets you write `\` without it being treated as an escape) +## +## Most often this single-quote syntax is used when writing parsers; most Roc programs never use it at all. +## +## ## Unicode +## +## Roc strings represent text using [Unicode](https://unicode.org) This guide will provide only a basic overview of Unicode (the [Unicode glossary](http://www.unicode.org/glossary/) has over 500 entries in it), but it will include the most relevant differences between these concepts: +## +## * Code points +## * Graphemes +## * UTF-8 +## +## It will also explain why some operations are included in Roc's builtin [Str](https://www.roc-lang.org/builtins/Str) +## module, and why others are in separate packages like [roc-lang/unicode](https://github.com/roc-lang/unicode). +## +## ### Graphemes +## +## Let's start with the following string: +## +## `"👩‍👩‍👦‍👦"` +## +## Some might call this a "character." After all, in a monospace font, it looks to be about the same width as the letter "A" or the punctuation mark "!"—both of which are commonly called "characters." Unfortunately, the term "character" in programming has changed meanings many times across the years and across programming languages, and today it's become a major source of confusion. +## +## Unicode uses the less ambiguous term [*grapheme*](https://www.unicode.org/glossary/#grapheme), which it defines as a "user-perceived character" (as opposed to one of the several historical ways the term "character" has been used in programming) or, alternatively, "A minimally distinctive unit of writing in the context of a particular writing system." +## +## By Unicode's definition, each of the following is an individual grapheme: +## +## * `a` +## * `鹏` +## * `👩‍👩‍👦‍👦` +## +## Note that although *grapheme* is less ambiguous than *character*, its definition is still open to interpretation. To address this, Unicode has formally specified [text segmentation rules](https://www.unicode.org/reports/tr29/) which define grapheme boundaries in precise technical terms. We won't get into those rules here, but since they can change with new Unicode releases, functions for working with graphemes are in the [roc-lang/unicode](https://github.com/roc-lang/unicode) package rather than in the builtin [`Str`](https://www.roc-lang.org/builtins/Str) module. This allows them to be updated without being blocked on a new release of the Roc language. +## +## ### Code Points +## +## Every Unicode text value can be broken down into [Unicode code points](http://www.unicode.org/glossary/#code_point), which are integers between `0` and `285_212_438` that describe components of the text. In memory, every Roc string is a sequence of these integers stored in a format called UTF-8, which will be discussed [later](#utf8). +## +## The string `"👩‍👩‍👦‍👦"` happens to be made up of these code points: +## +## ``` +## [128105, 8205, 128105, 8205, 128102, 8205, 128102] +## ``` +## +## From this we can see that: +## +## - One grapheme can be made up of multiple code points. In fact, there is no upper limit on how many code points can go into a single grapheme! (Some programming languages use the term "character" to refer to individual code points; this can be confusing for graphemes like 👩‍👩‍👦‍👦 because it visually looks like "one character" but no single code point can represent it.) +## - Sometimes code points repeat within an individual grapheme. Here, 128105 repeats twice, as does 128102, and there's an 8205 in between each of the other code points. +## +## ### Combining Code Points +## +## The reason every other code point in 👩‍👩‍👦‍👦 is 8205 is that code point 8205 joins together other code points. This emoji, known as ["Family: Woman, Woman, Boy, Boy"](https://emojipedia.org/family-woman-woman-boy-boy), is made by combining several emoji using [zero-width joiners](https://emojipedia.org/zero-width-joiner)—which are represented by code point 8205 in memory, and which have no visual repesentation on their own. +## +## Here are those code points again, this time with comments about what they represent: +## +## ``` +## [128105] # "👩" +## [8205] # (joiner) +## [128105] # "👩" +## [8205] # (joiner) +## [128102] # "👦" +## [8205] # (joiner) +## [128102] # "👦" +## ``` +## +## One way to read this is "woman emoji joined to woman emoji joined to boy emoji joined to boy emoji." Without the joins, it would be: +## +## ``` +## "👩👩👦👦" +## ``` +## +## With the joins, however, it is instead: +## +## ``` +## "👩‍👩‍👦‍👦" +## ``` +## +## Even though 👩‍👩‍👦‍👦 is visually smaller when rendered, it takes up almost twice as much memory as 👩👩👦👦 does! That's because it has all the same code points, plus the zero-width joiners in between them. +## +## ### String equality and normalization +## +## Besides emoji like 👩‍👩‍👦‍👦, another classic example of multiple code points being combined to render as one grapheme has to do with accent marks. Try putting these two strings into `roc repl`: +## +## ``` +## "caf\u(e9)" +## "cafe\u(301)" +## ``` +## +## The `\u(e9)` syntax is a way of inserting code points into string literals. In this case, it's the same as inserting the hexadecimal number `0xe9` as a code point onto the end of the string `"caf"`. Since Unicode code point `0xe9` happens to be `é`, the string `"caf\u(e9)"` ends up being identical in memory to the string `"café"`. +## +## We can verify this too: +## +## ``` +## » "caf\u(e9)" == "café" +## +## Bool.true : Bool +## ``` +## +## As it turns out, `"cafe\u(301)"` is another way to represent the same word. The Unicode code point 0x301 represents a ["combining acute accent"](https://unicodeplus.com/U+0301)—which essentially means that it will add an accent mark to whatever came before it. In this case, since `"cafe\u(301)"` has an `e` before the `"\u(301)"`, that `e` ends up with an accent mark on it and becomes `é`. +## +## Although these two strings get rendered identically to one another, they are different in memory because their code points are different! We can also confirm this in `roc repl`: +## +## ``` +## » "caf\u(e9)" == "cafe\u(301)" +## +## Bool.false : Bool +## ``` +## +## As you can imagine, this can be a source of bugs. Not only are they considered unequal, they also hash differently, meaning `"caf\u(e9)"` and `"cafe\u(301)"` can both be separate entries in the same [`Set`](https://www.roc-lang.org/builtins/Set). +## +## One way to prevent problems like these is to perform [Unicode normalization](https://www.unicode.org/reports/tr15/), a process which converts conceptually equivalent strings (like `"caf\u(e9)"` and `"cafe\u(301)"`) into one canonical in-memory representation. This makes equality checks on them pass, among other benefits. ## -## ### Escape sequences +## It would be technically possible for Roc to perform string normalization automatically on every equality check. Unfortunately, although some programs might want to treat `"caf\u(e9)"` and `"cafe\u(301)"` as equivalent, for other programs it might actually be important to be able to tell them apart. If these equality checks always passed, then there would be no way to tell them apart! +## +## As such, normalization must be performed explicitly when desired. Like graphemes, Unicode normalization rules can change with new releases of Unicode. As such, these functions are in separate packages instead of builtins (normalization is planned to be in [roc-lang/unicode](https://github.com/roc-lang/unicode) in the future, but it has not yet been implemented) so that updates to these functions based on new Unicode releases can happen without waiting on new releases of the Roc language. +## +## ### Capitalization +## +## We've already seen two examples of Unicode definitions that can change with new Unicode releases: graphemes and normalization. Another is capitalization; these rules can change with new Unicode releases (most often in the form of additions of new languages, but breaking changes to capitalization rules for existing languages are also possible), and so they are not included in builtin [`Str`](https://www.roc-lang.org/builtins/Str). +## +## This might seem particularly surprising, since capitalization functions are commonly included in standard libraries. However, it turns out that "capitalizing an arbitrary string" is impossible to do correctly without additional information. +## +## For example, what is the capitalized version of this string? ## -## If you put a `\` in a Roc string literal, it begins an *escape sequence*. -## An escape sequence is a convenient way to insert certain strings into other strings. -## For example, suppose you write this Roc string: ## ``` -## "I took the one less traveled by,\nAnd that has made all the difference." +## "i" ## ``` -## The `"\n"` in the middle will insert a line break into this string. There are -## other ways of getting a line break in there, but `"\n"` is the most common. ## -## Another way you could insert a newlines is by writing `\u(0A)` instead of `\n`. -## That would result in the same string, because the `\u` escape sequence inserts -## [Unicode code points](https://unicode.org/glossary/#code_point) directly into -## the string. The Unicode code point 10 is a newline, and 10 is `0A` in hexadecimal. -## `\u` escape sequences are always followed by a hexadecimal number inside `(` and `)` -## like this. +## * In English, the correct answer is `"I"`. +## * In Turkish, the correct answer is `"İ"`. +## +## Similarly, the correct lowercased version of the string `"I"` is `"i"` in English and `"ı"` in Turkish. +## +## Turkish is not the only language to use this [dotless i](https://en.wikipedia.org/wiki/Dotless_I), and it's an example of how a function which capitalizes strings cannot give correct answers without the additional information of which language's capitalization rules should be used. +## +## Many languages defer to the operating system's [localization](https://en.wikipedia.org/wiki/Internationalization_and_localization) settings for this information. In that design, calling a program's capitalization function with an input string of `"i"` might give an answer of `"I"` on one machine and `"İ"` on a different machine, even though it was the same program running on both systems. Naturally, this can cause bugs—but more than that, writing tests to prevent bugs like this usually requires extra complexity compared to writing ordinary tests. +## +## In general, Roc programs should give the same answers for the same inputs even when run on different machines. There are exceptions to this (e.g. a program running out of system resources on one machine, while being able to make more progress on a machine that has more resources), but operating system's language localization is not among them. +## +## For these reasons, capitalization functions are not in [`Str`](https://www.roc-lang.org/builtins/Str). There is a planned `roc-lang` package to handle use cases like capitalization and sorting—sorting can also vary by language as well as by things like country—but implementation work has not yet started on this package. +## +## ### UTF-8 +## +## Earlier, we discussed how Unicode code points can be described as [`U32`](https://www.roc-lang.org/builtins/Num#U32) integers. However, many common code points are very low integers, and can fit into a `U8` instead of needing an entire `U32` to represent them in memory. UTF-8 takes advantage of this, using a variable-width encoding to represent code points in 1-4 bytes, which saves a lot of memory in the typical case—especially compared to [UTF-16](https://en.wikipedia.org/wiki/UTF-16), which always uses at least 2 bytes to represent each code point, or [UTF-32](https://en.wikipedia.org/wiki/UTF-32), which always uses the maximum 4 bytes. +## +## This guide won't cover all the details of UTF-8, but the basic idea is this: +## +## - If a code point is 127 or lower, UTF-8 stores it in 1 byte. +## - If it's between 128 and 2047, UTF-8 stores it in 2 bytes. +## - If it's between 2048 and 65535, UTF-8 stores it in 3 bytes. +## - If it's higher than that, UTF-8 stores it in 4 bytes. +## +## The specific [UTF-8 encoding](https://en.wikipedia.org/wiki/UTF-8#Encoding) of these bytes involves using 1 to 5 bits of each byte for metadata about multi-byte sequences. +## +## A valuable feature of UTF-8 is that it is backwards-compatible with the [ASCII](https://en.wikipedia.org/wiki/ASCII) encoding that was widely used for many years. ASCII existed before Unicode did, and only used the integers 0 to 127 to represent its equivalent of code points. The Unicode code points 0 to 127 represent the same semantic information as ASCII, (e.g. the number 64 represents the letter "A" in both ASCII and in Unicode), and since UTF-8 represents code points 0 to 127 using one byte, all valid ASCII strings can be successfully parsed as UTF-8 without any need for conversion. +## +## Since many textual computer encodings—including [CSV](https://en.wikipedia.org/wiki/CSV), [XML](https://en.wikipedia.org/wiki/XML), and [JSON](https://en.wikipedia.org/wiki/JSON)—do not use any code points above 127 for their delimiters, it is often possible to write parsers for these formats using only `Str` functions which present UTF-8 as raw `U8` sequences, such as [`Str.walkUtf8`](https://www.roc-lang.org/builtins/Str#walkUtf8) and [`Str.toUtf8`](https://www.roc-lang.org/builtins/Str#toUtf8). In the typical case where they do not to need to parse out individual Unicode code points, they can get everything they need from `Str` UTF-8 functions without needing to depend on other packages. +## +## ### When to use code points, graphemes, and UTF-8 +## +## Deciding when to use code points, graphemes, and UTF-8 can be nonobvious to say the least! +## +## The way Roc organizes the `Str` module and supporting packages is designed to help answer this question. Every situation is different, but the following rules of thumb are typical: +## +## * Most often, using `Str` values along with helper functions like [`split`](https://www.roc-lang.org/builtins/Str#split), [`joinWith`](https://www.roc-lang.org/builtins/Str#joinWith), and so on, is the best option. +## * If you are specifically implementing a parser, working in UTF-8 bytes is usually the best option. So functions like [`walkUtf8`](https://www.roc-lang.org/builtins/Str#walkUtf8), [toUtf8](https://www.roc-lang.org/builtins/Str#toUtf8), and so on. (Note that single-quote literals produce number literals, so ASCII-range literals like `'a'` gives an integer literal that works with a UTF-8 `U8`.) +## * If you are implementing a Unicode library like [roc-lang/unicode](https://github.com/roc-lang/unicode), working in terms of code points will be unavoidable. Aside from basic readability considerations like `\u(...)` in string literals, if you have the option to avoid working in terms of code points, it is almost always correct to avoid them. +## * If it seems like a good idea to split a string into "characters" (graphemes), you should definitely stop and reconsider whether this is really the best design. Almost always, doing this is some combination of more error-prone or slower (usually both) than doing something else that does not require taking graphemes into consideration. +## +## For this reason (among others), grapheme functions live in [roc-lang/unicode](https://github.com/roc-lang/unicode) rather than in [`Str`](https://www.roc-lang.org/builtins/Str). They are more niche than they seem, so they should not be reached for all the time! +## +## ## Performance ## -## As another example, `"R\u(6F)c"` is the same string as `"Roc"`, because -## `"\u(6F)"` corresponds to the Unicode code point for lowercase `o`. If you -## want to [spice things up a bit](https://en.wikipedia.org/wiki/Metal_umlaut), -## you can write `"R\u(F6)c"` as an alternative way to get the string `"Röc"\. +## This section deals with how Roc strings are represented in memory, and their performance characteristics. ## -## Roc strings also support these escape sequences: +## A normal heap-allocated roc `Str` is represented on the stack as: +## - A "capacity" unsigned integer, which respresents how many bytes are allocated on the heap to hold the string's contents. +## - A "length" unsigned integer, which rerepresents how many of the "capacity" bytes are actually in use. (A `Str` can have more bytes allocated on the heap than are actually in use.) +## - The memory address of the first byte in the string's actual contents. ## -## * `\\` - an actual backslash (writing a single `\` always begins an escape sequence!) -## * `\"` - an actual quotation mark (writing a `"` without a `\` ends the string) -## * `\r` - [carriage return](https://en.wikipedia.org/wiki/Carriage_Return) -## * `\t` - [horizontal tab](https://en.wikipedia.org/wiki/Tab_key#Tab_characters) -## * `\v` - [vertical tab](https://en.wikipedia.org/wiki/Tab_key#Tab_characters) +## Each of these three fields is the same size: 64 bits on a 64-bit system, and 32 bits on a 32-bit system. The actual contents of the string are stored in one contiguous sequence of bytes, encoded as UTF-8, often on the heap but sometimes elsewhere—more on this later. Empty strings do not have heap allocations, so an empty `Str` on a 64-bit system still takes up 24 bytes on the stack (due to its three 64-bit fields). +## +## ### Reference counting and opportunistic mutation +## +## Like lists, dictionaries, and sets, Roc strings are automatically reference-counted and can benefit from opportunistic in-place mutation. The reference count is stored on the heap immediately before the first byte of the string's contents, and it has the same size as a memory address. This means it can count so high that it's impossible to write a Roc program which overflows a reference count, because having that many simultaneous references (each of which is a memory address) would have exhausted the operating system's address space first. +## +## When the string's reference count is 1, functions like [`Str.concat`](https://www.roc-lang.org/builtins/Str#concat) and [`Str.replaceEach`](https://www.roc-lang.org/builtins/Str#replaceEach) mutate the string in-place rather than allocating a new string. This preserves semantic immutability because it is unobservable in terms of the operation's output; if the reference count is 1, it means that memory would have otherwise been deallocated immediately anyway, and it's more efficient to reuse it instead of deallocating it and then immediately making a new allocation. +## +## The contents of statically-known strings (today that means string literals) are stored in the readonly section of the binary, so they do not need heap allocations or reference counts. They are not eligible for in-place mutation, since mutating the readonly section of the binary would cause an operating system [access violation](https://en.wikipedia.org/wiki/Segmentation_fault). +## +## ### Small String Optimization +## +## Roc uses a "small string optimization" when representing certain strings in memory. +## +## If you have a sufficiently long string, then on a 64-bit system it will be represented on the stack using 24 bytes, and on a 32-bit system it will take 12 bytes—plus however many bytes are in the string itself—on the heap. However, if there is a string shorter than either of these stack sizes (so, a string of up to 23 bytes on a 64-bit system, and up to 11 bytes on a 32-bit system), then that string will be stored entirely on the stack rather than having a separate heap allocation at all. +## +## This can be much more memory-efficient! However, `List` does not have this optimization (it has some runtime cost, and in the case of `List` it's not anticipated to come up nearly as often), which means when converting a small string to `List U8` it can result in a heap allocation. +## +## Note that this optimization is based entirely on how many UTF-8 bytes the string takes up in memory. It doesn't matter how many [graphemes](#graphemes), [code points](#code-points) or anything else it has; the only factor that determines whether a particular string is eligible for the small string optimization is the number of UTF-8 bytes it takes up in memory! +## +## ### Seamless Slices +## +## Try putting this into `roc repl`: ## -## You can also use escape sequences to insert named strings into other strings, like so: ## ``` -## name = "Lee" -## city = "Roctown" -## greeting = "Hello there, \(name)! Welcome to \(city)." +## » "foo/bar/baz" |> Str.split "/" +## +## ["foo", "bar", "baz"] : List Str +## ``` +## +## All of these strings are small enough that the [small string optimization](#small) will apply, so none of them will be allocated on the heap. +## +## Now let's suppose they were long enough that this optimization no longer applied: +## ## ``` -## Here, `greeting` will become the string `"Hello there, Lee! Welcome to Roctown."`. -## This is known as [string interpolation](https://en.wikipedia.org/wiki/String_interpolation), -## and you can use it as many times as you like inside a string. The name -## between the parentheses must refer to a `Str` value that is currently in -## scope, and it must be a name - it can't be an arbitrary expression like a function call. +## » "a much, much, much, much/longer/string compared to the last one!" |> Str.split "/" +## +## ["a much, much, much, much", "longer", "string compared to the last one!"] : List Str +## ``` +## +## Here, the only strings small enough for the small string optimization are `"/"` and `"longer"`. They will be allocated on the stack. +## +## The first and last strings in the returned list `"a much, much, much, much"` and `"string compared to the last one!"` will not be allocated on the heap either. Instead, they will be *seamless slices*, which means they will share memory with the original input string. +## +## * `"a much, much, much, much"` will share the first 24 bytes of the original string. +## * `"string compared to the last one!"` will share the last 32 bytes of the original string. +## +## All of these strings are semantically immutable, so sharing these bytes is an implementation detail that should only affect performance. By design, there is no way at either compile time or runtime to tell whether a string is a seamless slice. This allows the optimization's behavior to change in the future without affecting Roc programs' semantic behavior. +## +## Seamless slices create additional references to the original string, which make it ineligible for opportunistic mutation (along with the slices themselves; slices are never eligible for mutation), and which also make it take longer before the original string can be deallocated. A case where this might be noticeable in terms of performance would be: +## 1. A function takes a very large string as an argument and returns a much smaller slice into that string. +## 2. The smaller slice is used for a long time in the program, whereas the much larger original string stops being used. +## 3. In this situation, it might have been better for total program memory usage (although not necessarily overall performance) if the original large string could have been deallocated sooner, even at the expense of having to copy the smaller string into a new allocation instead of reusing the bytes with a seamless slice. +## +## If a situation like this comes up, a slice can be turned into a separate string by using [`Str.concat`](https://www.roc-lang.org/builtins/Str#concat) to concatenate the slice onto an empty string (or one created with [`Str.withCapacity`](https://www.roc-lang.org/builtins/Str#withCapacity)). +## +## Currently, the only way to get seamless slices of strings is by calling certain `Str` functions which return them. In general, `Str` functions which accept a string and return a subset of that string tend to do this. [`Str.trim`](https://www.roc-lang.org/builtins/Str#trim) is another example of a function which returns a seamless slice. interface Str exposes [ Utf8Problem, @@ -94,9 +335,7 @@ interface Str joinWith, split, repeat, - countGraphemes, countUtf8Bytes, - startsWithScalar, toUtf8, fromUtf8, fromUtf8Range, @@ -119,7 +358,6 @@ interface Str toI16, toU8, toI8, - toScalars, replaceEach, replaceFirst, replaceLast, @@ -129,12 +367,8 @@ interface Str walkUtf8WithIndex, reserve, releaseExcessCapacity, - appendScalar, - walkScalars, - walkScalarsUntil, withCapacity, withPrefix, - graphemes, contains, ] imports [ @@ -265,8 +499,7 @@ joinWith : List Str, Str -> Str ## Split a string around a separator. ## ## Passing `""` for the separator is not useful; -## it returns the original string wrapped in a [List]. To split a string -## into its individual [graphemes](https://stackoverflow.com/a/27331885/4200103), use `Str.graphemes` +## it returns the original string wrapped in a [List]. ## ``` ## expect Str.split "1,2,3" "," == ["1","2","3"] ## expect Str.split "1,2,3" "" == ["1,2,3"] @@ -285,78 +518,6 @@ split : Str, Str -> List Str ## ``` repeat : Str, Nat -> Str -## Counts the number of [extended grapheme clusters](http://www.unicode.org/glossary/#extended_grapheme_cluster) -## in the string. -## -## Note that the number of extended grapheme clusters can be different from the number -## of visual glyphs rendered! Consider the following examples: -## ``` -## expect Str.countGraphemes "Roc" == 3 -## expect Str.countGraphemes "👩‍👩‍👦‍👦" == 4 -## expect Str.countGraphemes "🕊" == 1 -## ``` -## Note that "👩‍👩‍👦‍👦" takes up 4 graphemes (even though visually it appears as a single -## glyph) because under the hood it's represented using an emoji modifier sequence. -## In contrast, "🕊" only takes up 1 grapheme because under the hood it's represented -## using a single Unicode code point. -countGraphemes : Str -> Nat - -## Split a string into its constituent graphemes. -## -## This function breaks a string into its individual [graphemes](https://stackoverflow.com/a/27331885/4200103), -## returning them as a list of strings. This is useful for working with text that -## contains complex characters, such as emojis. -## -## Examples: -## ``` -## expect Str.graphemes "Roc" == ["R", "o", "c"] -## expect Str.graphemes "नमस्ते" == ["न", "म", "स्", "ते"] -## expect Str.graphemes "👩‍👩‍👦‍👦" == ["👩‍", "👩‍", "👦‍", "👦"] -## ``` -## -## Note that the "👩‍👩‍👦‍👦" example consists of 4 grapheme clusters, although it visually -## appears as a single glyph. This is because it uses an emoji modifier sequence. -graphemes : Str -> List Str - -## If the string begins with a [Unicode code point](http://www.unicode.org/glossary/#code_point) -## equal to the given [U32], returns [Bool.true]. Otherwise returns [Bool.false]. -## -## If the given string is empty, or if the given [U32] is not a valid -## code point, returns [Bool.false]. -## ``` -## expect Str.startsWithScalar "鹏 means 'roc'" 40527 # "鹏" is Unicode scalar 40527 -## expect !Str.startsWithScalar "9" 9 # the Unicode scalar for "9" is 57, not 9 -## expect !Str.startsWithScalar "" 40527 -## ``` -## -## ## Performance Details -## -## This runs slightly faster than [Str.startsWith], so -## if you want to check whether a string begins with something that's representable -## in a single code point, you can use (for example) `Str.startsWithScalar '鹏'` -## instead of `Str.startsWith "鹏"`. ('鹏' evaluates to the [U32] value `40527`.) -## This will not work for graphemes which take up multiple code points, however; -## `Str.startsWithScalar '👩‍👩‍👦‍👦'` would be a compiler error because 👩‍👩‍👦‍👦 takes up -## multiple code points and cannot be represented as a single [U32]. -## You'd need to use `Str.startsWithScalar "🕊"` instead. -startsWithScalar : Str, U32 -> Bool - -## Returns a [List] of the [Unicode scalar values](https://unicode.org/glossary/#unicode_scalar_value) -## in the given string. -## -## (Roc strings contain only scalar values, not [surrogate code points](https://unicode.org/glossary/#surrogate_code_point), -## so this is equivalent to returning a list of the string's [code points](https://unicode.org/glossary/#code_point).) -## ``` -## expect Str.toScalars "Roc" == [82, 111, 99] -## expect Str.toScalars "鹏" == [40527] -## expect Str.toScalars "சி" == [2970, 3007] -## expect Str.toScalars "🐦" == [128038] -## expect Str.toScalars "👩‍👩‍👦‍👦" == [128105, 8205, 128105, 8205, 128102, 8205, 128102] -## expect Str.toScalars "I ♥ Roc" == [73, 32, 9829, 32, 82, 111, 99] -## expect Str.toScalars "" == [] -## ``` -toScalars : Str -> List U32 - ## Returns a [List] of the string's [U8] UTF-8 [code units](https://unicode.org/glossary/#code_unit). ## (To split the string into a [List] of smaller [Str] values instead of [U8] values, ## see [Str.split].) @@ -683,7 +844,7 @@ replaceFirst : Str, Str, Str -> Str replaceFirst = \haystack, needle, flower -> when splitFirst haystack needle is Ok { before, after } -> - "\(before)\(flower)\(after)" + "$(before)$(flower)$(after)" Err NotFound -> haystack @@ -701,7 +862,7 @@ replaceLast : Str, Str, Str -> Str replaceLast = \haystack, needle, flower -> when splitLast haystack needle is Ok { before, after } -> - "\(before)\(flower)\(after)" + "$(before)$(flower)$(after)" Err NotFound -> haystack @@ -907,80 +1068,6 @@ expect (walkUtf8 "鹏" [] List.append) == [233, 185, 143] ## Note: This will also convert seamless slices to regular lists. releaseExcessCapacity : Str -> Str -## is UB when the scalar is invalid -appendScalarUnsafe : Str, U32 -> Str - -## Append a [U32] scalar to the given string. If the given scalar is not a valid -## unicode value, it returns [Err InvalidScalar]. -## ``` -## expect Str.appendScalar "H" 105 == Ok "Hi" -## expect Str.appendScalar "😢" 0xabcdef == Err InvalidScalar -## ``` -appendScalar : Str, U32 -> Result Str [InvalidScalar] -appendScalar = \string, scalar -> - if isValidScalar scalar then - Ok (appendScalarUnsafe string scalar) - else - Err InvalidScalar - -isValidScalar : U32 -> Bool -isValidScalar = \scalar -> - scalar <= 0xD7FF || (scalar >= 0xE000 && scalar <= 0x10FFFF) - -getScalarUnsafe : Str, Nat -> { scalar : U32, bytesParsed : Nat } - -## Walks over the unicode [U32] values for the given [Str] and calls a function -## to update state for each. -## ``` -## f : List U32, U32 -> List U32 -## f = \state, scalar -> List.append state scalar -## expect Str.walkScalars "ABC" [] f == [65, 66, 67] -## ``` -walkScalars : Str, state, (state, U32 -> state) -> state -walkScalars = \string, init, step -> - walkScalarsHelp string init step 0 (Str.countUtf8Bytes string) - -walkScalarsHelp : Str, state, (state, U32 -> state), Nat, Nat -> state -walkScalarsHelp = \string, state, step, index, length -> - if index < length then - { scalar, bytesParsed } = getScalarUnsafe string index - newState = step state scalar - - walkScalarsHelp string newState step (Num.addWrap index bytesParsed) length - else - state - -## Walks over the unicode [U32] values for the given [Str] and calls a function -## to update state for each. -## ``` -## f : List U32, U32 -> [Break (List U32), Continue (List U32)] -## f = \state, scalar -> -## check = 66 -## if scalar == check then -## Break [check] -## else -## Continue (List.append state scalar) -## expect Str.walkScalarsUntil "ABC" [] f == [66] -## expect Str.walkScalarsUntil "AxC" [] f == [65, 120, 67] -## ``` -walkScalarsUntil : Str, state, (state, U32 -> [Break state, Continue state]) -> state -walkScalarsUntil = \string, init, step -> - walkScalarsUntilHelp string init step 0 (Str.countUtf8Bytes string) - -walkScalarsUntilHelp : Str, state, (state, U32 -> [Break state, Continue state]), Nat, Nat -> state -walkScalarsUntilHelp = \string, state, step, index, length -> - if index < length then - { scalar, bytesParsed } = getScalarUnsafe string index - - when step state scalar is - Continue newState -> - walkScalarsUntilHelp string newState step (Num.addWrap index bytesParsed) length - - Break newState -> - newState - else - state - strToNum : Str -> { berrorcode : U8, aresult : Num * } strToNumHelp : Str -> Result (Num a) [InvalidNumStr] diff --git a/crates/compiler/builtins/roc/TotallyNotJson.roc b/crates/compiler/builtins/roc/TotallyNotJson.roc index 1ed15f61ddb..48481545351 100644 --- a/crates/compiler/builtins/roc/TotallyNotJson.roc +++ b/crates/compiler/builtins/roc/TotallyNotJson.roc @@ -43,7 +43,7 @@ interface TotallyNotJson ## An opaque type with the `EncoderFormatting` and ## `DecoderFormatting` abilities. -Json := { fieldNameMapping : FieldNameMapping } +Json := {} implements [ EncoderFormatting { u8: encodeU8, @@ -89,21 +89,11 @@ Json := { fieldNameMapping : FieldNameMapping } ] ## Returns a JSON `Encoder` and `Decoder` -json = @Json { fieldNameMapping: Default } +json = @Json {} ## Returns a JSON `Encoder` and `Decoder` with configuration options -jsonWithOptions = \{ fieldNameMapping ? Default } -> - @Json { fieldNameMapping } - -## Mapping between Roc record fields and JSON object names -FieldNameMapping : [ - Default, # no transformation - SnakeCase, # snake_case - PascalCase, # PascalCase - KebabCase, # kabab-case - CamelCase, # camelCase - Custom (Str -> Str), # provide a custom formatting -] +jsonWithOptions = \{} -> + @Json {} # TODO encode as JSON numbers as base 10 decimal digits # e.g. the REPL `Num.toStr 12e42f64` gives @@ -171,14 +161,6 @@ encodeBool = \b -> else List.concat bytes (Str.toUtf8 "false") -# Test encode boolean -expect - input = [Bool.true, Bool.false] - actual = Encode.toBytes input json - expected = Str.toUtf8 "[true,false]" - - actual == expected - encodeString = \str -> Encode.custom \bytes, @Json {} -> List.concat bytes (encodeStrBytes str) @@ -248,38 +230,10 @@ escapedByteToJson = \b -> 0x09 -> [0x5c, 'r'] # U+0009 Tab _ -> [b] -expect escapedByteToJson '\n' == ['\\', 'n'] -expect escapedByteToJson '\\' == ['\\', '\\'] -expect escapedByteToJson '"' == ['\\', '"'] - -# Test encode small string -expect - input = "G'day" - actual = Encode.toBytes input json - expected = Str.toUtf8 "\"G'day\"" - - actual == expected - -# Test encode large string -expect - input = "the quick brown fox jumps over the lazy dog" - actual = Encode.toBytes input json - expected = Str.toUtf8 "\"the quick brown fox jumps over the lazy dog\"" - - actual == expected - -# Test encode with escapes e.g. "\r" encodes to "\\r" -expect - input = "the quick brown fox jumps over the lazy doga\r\nbc\\\"xz" - actual = Encode.toBytes input json - expected = Str.toUtf8 "\"the quick brown fox jumps over the lazy doga\\r\\nbc\\\\\\\"xz\"" - - actual == expected - encodeList = \lst, encodeElem -> - Encode.custom \bytes, @Json { fieldNameMapping } -> + Encode.custom \bytes, @Json {} -> writeList = \{ buffer, elemsLeft }, elem -> - bufferWithElem = appendWith buffer (encodeElem elem) (@Json { fieldNameMapping }) + bufferWithElem = appendWith buffer (encodeElem elem) (@Json {}) bufferWithSuffix = if elemsLeft > 1 then List.append bufferWithElem (Num.toU8 ',') @@ -293,27 +247,16 @@ encodeList = \lst, encodeElem -> List.append withList (Num.toU8 ']') -# Test encode list of floats -expect - input : List F64 - input = [-1, 0.00001, 1e12, 2.0e-2, 0.0003, 43] - actual = Encode.toBytes input json - expected = Str.toUtf8 "[-1,0.00001,1000000000000,0.02,0.0003,43]" - - actual == expected - encodeRecord = \fields -> - Encode.custom \bytes, @Json { fieldNameMapping } -> + Encode.custom \bytes, @Json {} -> writeRecord = \{ buffer, fieldsLeft }, { key, value } -> - - fieldName = toObjectNameUsingMap key fieldNameMapping - + fieldName = key bufferWithKeyValue = List.append buffer (Num.toU8 '"') |> List.concat (Str.toUtf8 fieldName) |> List.append (Num.toU8 '"') |> List.append (Num.toU8 ':') # Note we need to encode using the json config here - |> appendWith value (@Json { fieldNameMapping }) + |> appendWith value (@Json {}) bufferWithSuffix = if fieldsLeft > 1 then @@ -328,52 +271,11 @@ encodeRecord = \fields -> List.append bytesWithRecord (Num.toU8 '}') -# Test encode for a record with two strings ignoring whitespace -expect - input = { fruitCount: 2, ownerName: "Farmer Joe" } - encoder = jsonWithOptions { fieldNameMapping: PascalCase } - actual = Encode.toBytes input encoder - expected = Str.toUtf8 "{\"FruitCount\":2,\"OwnerName\":\"Farmer Joe\"}" - - actual == expected - -# Test encode of record with an array of strings and a boolean field -expect - input = { fruitFlavours: ["Apples", "Bananas", "Pears"], isFresh: Bool.true } - encoder = jsonWithOptions { fieldNameMapping: KebabCase } - actual = Encode.toBytes input encoder - expected = Str.toUtf8 "{\"fruit-flavours\":[\"Apples\",\"Bananas\",\"Pears\"],\"is-fresh\":true}" - - actual == expected - -# Test encode of record with a string and number field -expect - input = { firstSegment: "ab", secondSegment: 10u8 } - encoder = jsonWithOptions { fieldNameMapping: SnakeCase } - actual = Encode.toBytes input encoder - expected = Str.toUtf8 "{\"first_segment\":\"ab\",\"second_segment\":10}" - - actual == expected - -# Test encode of record of a record -expect - input = { outer: { inner: "a" }, other: { one: "b", two: 10u8 } } - encoder = jsonWithOptions { fieldNameMapping: Custom toYellingCase } - actual = Encode.toBytes input encoder - expected = Str.toUtf8 "{\"OTHER\":{\"ONE\":\"b\",\"TWO\":10},\"OUTER\":{\"INNER\":\"a\"}}" - - actual == expected - -toYellingCase = \str -> - Str.graphemes str - |> List.map toUppercase - |> Str.joinWith "" - encodeTuple = \elems -> - Encode.custom \bytes, @Json { fieldNameMapping } -> + Encode.custom \bytes, @Json {} -> writeTuple = \{ buffer, elemsLeft }, elemEncoder -> bufferWithElem = - appendWith buffer elemEncoder (@Json { fieldNameMapping }) + appendWith buffer elemEncoder (@Json {}) bufferWithSuffix = if elemsLeft > 1 then @@ -387,20 +289,11 @@ encodeTuple = \elems -> { buffer: bytesWithRecord } = List.walk elems { buffer: bytesHead, elemsLeft: List.len elems } writeTuple List.append bytesWithRecord (Num.toU8 ']') - -# Test encode of tuple -expect - input = ("The Answer is", 42) - actual = Encode.toBytes input json - expected = Str.toUtf8 "[\"The Answer is\",42]" - - actual == expected - encodeTag = \name, payload -> - Encode.custom \bytes, @Json { fieldNameMapping } -> + Encode.custom \bytes, @Json {} -> # Idea: encode `A v1 v2` as `{"A": [v1, v2]}` writePayload = \{ buffer, itemsLeft }, encoder -> - bufferWithValue = appendWith buffer encoder (@Json { fieldNameMapping }) + bufferWithValue = appendWith buffer encoder (@Json {}) bufferWithSuffix = if itemsLeft > 1 then List.append bufferWithValue (Num.toU8 ',') @@ -422,15 +315,6 @@ encodeTag = \name, payload -> List.append bytesWithPayload (Num.toU8 ']') |> List.append (Num.toU8 '}') -# Test encode of tag -expect - input = TheAnswer "is" 42 - encoder = jsonWithOptions { fieldNameMapping: KebabCase } - actual = Encode.toBytes input encoder - expected = Str.toUtf8 "{\"TheAnswer\":[\"is\",42]}" - - actual == expected - decodeU8 = Decode.custom \bytes, @Json {} -> { taken, rest } = takeJsonNumber bytes @@ -1334,7 +1218,7 @@ expect # JSON OBJECTS ----------------------------------------------------------------- -decodeRecord = \initialState, stepField, finalizer -> Decode.custom \bytes, @Json { fieldNameMapping } -> +decodeRecord = \initialState, stepField, finalizer -> Decode.custom \bytes, @Json {} -> # Recursively build up record from object field:value pairs decodeFields = \recordState, bytesBeforeField -> @@ -1361,8 +1245,7 @@ decodeRecord = \initialState, stepField, finalizer -> Decode.custom \bytes, @Jso # Decode the json value { val: updatedRecord, rest: bytesAfterValue } <- ( - fieldName = - fromObjectNameUsingMap objectName fieldNameMapping + fieldName = objectName # Retrieve value decoder for the current field when stepField recordState fieldName is @@ -1375,7 +1258,7 @@ decodeRecord = \initialState, stepField, finalizer -> Decode.custom \bytes, @Jso Keep valueDecoder -> # Decode the value using the decoder from the recordState # Note we need to pass json config options recursively here - Decode.decodeWith valueBytes valueDecoder (@Json { fieldNameMapping }) + Decode.decodeWith valueBytes valueDecoder (@Json {}) ) |> tryDecode @@ -1444,327 +1327,3 @@ ObjectState : [ AfterClosingBrace Nat, InvalidObject, ] - -# Test decode of record with two strings ignoring whitespace -expect - input = Str.toUtf8 " {\n\"FruitCount\"\t:2\n, \"OwnerName\": \"Farmer Joe\" } " - decoder = jsonWithOptions { fieldNameMapping: PascalCase } - actual = Decode.fromBytesPartial input decoder - expected = Ok { fruitCount: 2, ownerName: "Farmer Joe" } - - actual.result == expected - -# Test decode of record with an array of strings and a boolean field -expect - input = Str.toUtf8 "{\"fruit-flavours\": [\"Apples\",\"Bananas\",\"Pears\"], \"is-fresh\": true }" - decoder = jsonWithOptions { fieldNameMapping: KebabCase } - actual = Decode.fromBytesPartial input decoder - expected = Ok { fruitFlavours: ["Apples", "Bananas", "Pears"], isFresh: Bool.true } - - actual.result == expected - -# Test decode of record with a string and number field -expect - input = Str.toUtf8 "{\"first_segment\":\"ab\",\"second_segment\":10}" - decoder = jsonWithOptions { fieldNameMapping: SnakeCase } - actual = Decode.fromBytesPartial input decoder - expected = Ok { firstSegment: "ab", secondSegment: 10u8 } - - actual.result == expected - -# Test decode of record of a record -expect - input = Str.toUtf8 "{\"OUTER\":{\"INNER\":\"a\"},\"OTHER\":{\"ONE\":\"b\",\"TWO\":10}}" - decoder = jsonWithOptions { fieldNameMapping: Custom fromYellingCase } - actual = Decode.fromBytesPartial input decoder - expected = Ok { outer: { inner: "a" }, other: { one: "b", two: 10u8 } } - - actual.result == expected - -fromYellingCase = \str -> - Str.graphemes str - |> List.map toLowercase - |> Str.joinWith "" - -expect fromYellingCase "YELLING" == "yelling" - -# Complex example from IETF RFC 8259 (2017) -complexExampleJson = Str.toUtf8 "{\"Image\":{\"Animated\":false,\"Height\":600,\"Ids\":[116,943,234,38793],\"Thumbnail\":{\"Height\":125,\"Url\":\"http:\\/\\/www.example.com\\/image\\/481989943\",\"Width\":100},\"Title\":\"View from 15th Floor\",\"Width\":800}}" -complexExampleRecord = { - image: { - width: 800, - height: 600, - title: "View from 15th Floor", - thumbnail: { - url: "http://www.example.com/image/481989943", - height: 125, - width: 100, - }, - animated: Bool.false, - ids: [116, 943, 234, 38793], - }, -} - -# Test decode of Complex Example -expect - input = complexExampleJson - decoder = jsonWithOptions { fieldNameMapping: PascalCase } - actual = Decode.fromBytes input decoder - expected = Ok complexExampleRecord - - actual == expected - -# Test encode of Complex Example -expect - input = complexExampleRecord - encoder = jsonWithOptions { fieldNameMapping: PascalCase } - actual = Encode.toBytes input encoder - expected = complexExampleJson - - actual == expected - -fromObjectNameUsingMap : Str, FieldNameMapping -> Str -fromObjectNameUsingMap = \objectName, fieldNameMapping -> - when fieldNameMapping is - Default -> objectName - SnakeCase -> fromSnakeCase objectName - PascalCase -> fromPascalCase objectName - KebabCase -> fromKebabCase objectName - CamelCase -> fromCamelCase objectName - Custom transformation -> transformation objectName - -toObjectNameUsingMap : Str, FieldNameMapping -> Str -toObjectNameUsingMap = \fieldName, fieldNameMapping -> - when fieldNameMapping is - Default -> fieldName - SnakeCase -> toSnakeCase fieldName - PascalCase -> toPascalCase fieldName - KebabCase -> toKebabCase fieldName - CamelCase -> toCamelCase fieldName - Custom transformation -> transformation fieldName - -# Convert a `snake_case` JSON Object name to a Roc Field name -fromSnakeCase = \str -> - snakeToCamel str - -# Convert a `PascalCase` JSON Object name to a Roc Field name -fromPascalCase = \str -> - pascalToCamel str - -# Convert a `kabab-case` JSON Object name to a Roc Field name -fromKebabCase = \str -> - kebabToCamel str - -# Convert a `camelCase` JSON Object name to a Roc Field name -fromCamelCase = \str -> - # Nothing to change as Roc field names are camelCase by default - str - -# Convert a `camelCase` Roc Field name to a `snake_case` JSON Object name -toSnakeCase = \str -> - camelToSnake str - -# Convert a `camelCase` Roc Field name to a `PascalCase` JSON Object name -toPascalCase = \str -> - camelToPascal str - -# Convert a `camelCase` Roc Field name to a `kabab-case` JSON Object name -toKebabCase = \str -> - camelToKebeb str - -# Convert a `camelCase` Roc Field name to a `camelCase` JSON Object name -toCamelCase = \str -> - # Nothing to change as Roc field names are camelCase by default - str - -snakeToCamel : Str -> Str -snakeToCamel = \str -> - segments = Str.split str "_" - when segments is - [first, ..] -> - segments - |> List.dropFirst 1 - |> List.map uppercaseFirst - |> List.prepend first - |> Str.joinWith "" - - _ -> str - -expect snakeToCamel "snake_case_string" == "snakeCaseString" - -pascalToCamel : Str -> Str -pascalToCamel = \str -> - segments = Str.graphemes str - when segments is - [a, ..] -> - first = toLowercase a - rest = List.dropFirst segments 1 - - Str.joinWith (List.prepend rest first) "" - - _ -> str - -expect pascalToCamel "PascalCaseString" == "pascalCaseString" - -kebabToCamel : Str -> Str -kebabToCamel = \str -> - segments = Str.split str "-" - when segments is - [first, ..] -> - segments - |> List.dropFirst 1 - |> List.map uppercaseFirst - |> List.prepend first - |> Str.joinWith "" - - _ -> str - -expect kebabToCamel "kebab-case-string" == "kebabCaseString" - -camelToPascal : Str -> Str -camelToPascal = \str -> - segments = Str.graphemes str - when segments is - [a, ..] -> - first = toUppercase a - rest = List.dropFirst segments 1 - - Str.joinWith (List.prepend rest first) "" - - _ -> str - -expect camelToPascal "someCaseString" == "SomeCaseString" - -camelToKebeb : Str -> Str -camelToKebeb = \str -> - rest = Str.graphemes str - taken = List.withCapacity (List.len rest) - - camelToKebabHelp { taken, rest } - |> .taken - |> Str.joinWith "" - -camelToKebabHelp : { taken : List Str, rest : List Str } -> { taken : List Str, rest : List Str } -camelToKebabHelp = \{ taken, rest } -> - when rest is - [] -> { taken, rest } - [a, ..] if isUpperCase a -> - camelToKebabHelp { - taken: List.concat taken ["-", toLowercase a], - rest: List.dropFirst rest 1, - } - - [a, ..] -> - camelToKebabHelp { - taken: List.append taken a, - rest: List.dropFirst rest 1, - } - -expect camelToKebeb "someCaseString" == "some-case-string" - -camelToSnake : Str -> Str -camelToSnake = \str -> - rest = Str.graphemes str - taken = List.withCapacity (List.len rest) - - camelToSnakeHelp { taken, rest } - |> .taken - |> Str.joinWith "" - -camelToSnakeHelp : { taken : List Str, rest : List Str } -> { taken : List Str, rest : List Str } -camelToSnakeHelp = \{ taken, rest } -> - when rest is - [] -> { taken, rest } - [a, ..] if isUpperCase a -> - camelToSnakeHelp { - taken: List.concat taken ["_", toLowercase a], - rest: List.dropFirst rest 1, - } - - [a, ..] -> - camelToSnakeHelp { - taken: List.append taken a, - rest: List.dropFirst rest 1, - } - -expect camelToSnake "someCaseString" == "some_case_string" - -uppercaseFirst : Str -> Str -uppercaseFirst = \str -> - segments = Str.graphemes str - when segments is - [a, ..] -> - first = toUppercase a - rest = List.dropFirst segments 1 - - Str.joinWith (List.prepend rest first) "" - - _ -> str - -toUppercase : Str -> Str -toUppercase = \str -> - when str is - "a" -> "A" - "b" -> "B" - "c" -> "C" - "d" -> "D" - "e" -> "E" - "f" -> "F" - "g" -> "G" - "h" -> "H" - "i" -> "I" - "j" -> "J" - "k" -> "K" - "l" -> "L" - "m" -> "M" - "n" -> "N" - "o" -> "O" - "p" -> "P" - "q" -> "Q" - "r" -> "R" - "s" -> "S" - "t" -> "T" - "u" -> "U" - "v" -> "V" - "w" -> "W" - "x" -> "X" - "y" -> "Y" - "z" -> "Z" - _ -> str - -toLowercase : Str -> Str -toLowercase = \str -> - when str is - "A" -> "a" - "B" -> "b" - "C" -> "c" - "D" -> "d" - "E" -> "e" - "F" -> "f" - "G" -> "g" - "H" -> "h" - "I" -> "i" - "J" -> "j" - "K" -> "k" - "L" -> "l" - "M" -> "m" - "N" -> "n" - "O" -> "o" - "P" -> "p" - "Q" -> "q" - "R" -> "r" - "S" -> "s" - "T" -> "t" - "U" -> "u" - "V" -> "v" - "W" -> "w" - "X" -> "x" - "Y" -> "y" - "Z" -> "z" - _ -> str - -isUpperCase : Str -> Bool -isUpperCase = \str -> - when str is - "A" | "B" | "C" | "D" | "E" | "F" | "G" | "H" | "I" | "J" | "K" | "L" | "M" | "N" | "O" | "P" | "Q" | "R" | "S" | "T" | "U" | "V" | "W" | "X" | "Y" | "Z" -> Bool.true - _ -> Bool.false diff --git a/crates/compiler/builtins/src/bitcode.rs b/crates/compiler/builtins/src/bitcode.rs index 5a1c549f2e5..9587961a204 100644 --- a/crates/compiler/builtins/src/bitcode.rs +++ b/crates/compiler/builtins/src/bitcode.rs @@ -130,10 +130,10 @@ impl IntWidth { // according to https://reviews.llvm.org/D28990#655487 // // however, rust does not always think that this is true + // Our alignmets here are correct, but they will not match rust/zig/llvm until they update to llvm version 18. match target_info.architecture { - Architecture::X86_64 => 16, - Architecture::Aarch64 | Architecture::Aarch32 | Architecture::Wasm32 => 16, - Architecture::X86_32 => 8, + Architecture::X86_64 | Architecture::Aarch64 | Architecture::X86_32 => 16, + Architecture::Aarch32 | Architecture::Wasm32 => 8, } } } @@ -292,6 +292,10 @@ pub const NUM_FLOOR_F32: IntrinsicName = int_intrinsic!("roc_builtins.num.floor_ pub const NUM_FLOOR_F64: IntrinsicName = int_intrinsic!("roc_builtins.num.floor_f64"); pub const NUM_ROUND_F32: IntrinsicName = int_intrinsic!("roc_builtins.num.round_f32"); pub const NUM_ROUND_F64: IntrinsicName = int_intrinsic!("roc_builtins.num.round_f64"); +pub const INT_TO_FLOAT_CAST_F32: IntrinsicName = + int_intrinsic!("roc_builtins.num.num_to_float_cast_f32"); +pub const INT_TO_FLOAT_CAST_F64: IntrinsicName = + int_intrinsic!("roc_builtins.num.num_to_float_cast_f64"); pub const NUM_ADD_OR_PANIC_INT: IntrinsicName = int_intrinsic!("roc_builtins.num.add_or_panic"); pub const NUM_ADD_SATURATED_INT: IntrinsicName = int_intrinsic!("roc_builtins.num.add_saturated"); @@ -341,13 +345,10 @@ pub const STR_COUNT_SEGMENTS: &str = "roc_builtins.str.count_segments"; pub const STR_CONCAT: &str = "roc_builtins.str.concat"; pub const STR_JOIN_WITH: &str = "roc_builtins.str.joinWith"; pub const STR_SPLIT: &str = "roc_builtins.str.str_split"; -pub const STR_TO_SCALARS: &str = "roc_builtins.str.to_scalars"; -pub const STR_COUNT_GRAPEHEME_CLUSTERS: &str = "roc_builtins.str.count_grapheme_clusters"; pub const STR_COUNT_UTF8_BYTES: &str = "roc_builtins.str.count_utf8_bytes"; pub const STR_IS_EMPTY: &str = "roc_builtins.str.is_empty"; pub const STR_CAPACITY: &str = "roc_builtins.str.capacity"; pub const STR_STARTS_WITH: &str = "roc_builtins.str.starts_with"; -pub const STR_STARTS_WITH_SCALAR: &str = "roc_builtins.str.starts_with_scalar"; pub const STR_ENDS_WITH: &str = "roc_builtins.str.ends_with"; pub const STR_NUMBER_OF_BYTES: &str = "roc_builtins.str.number_of_bytes"; pub const STR_FROM_INT: IntrinsicName = int_intrinsic!("roc_builtins.str.from_int"); @@ -365,11 +366,8 @@ pub const STR_TRIM_START: &str = "roc_builtins.str.trim_start"; pub const STR_TRIM_END: &str = "roc_builtins.str.trim_end"; pub const STR_GET_UNSAFE: &str = "roc_builtins.str.get_unsafe"; pub const STR_RESERVE: &str = "roc_builtins.str.reserve"; -pub const STR_APPEND_SCALAR: &str = "roc_builtins.str.append_scalar"; -pub const STR_GET_SCALAR_UNSAFE: &str = "roc_builtins.str.get_scalar_unsafe"; pub const STR_CLONE_TO: &str = "roc_builtins.str.clone_to"; pub const STR_WITH_CAPACITY: &str = "roc_builtins.str.with_capacity"; -pub const STR_GRAPHEMES: &str = "roc_builtins.str.graphemes"; pub const STR_ALLOCATION_PTR: &str = "roc_builtins.str.allocation_ptr"; pub const STR_RELEASE_EXCESS_CAPACITY: &str = "roc_builtins.str.release_excess_capacity"; @@ -386,6 +384,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"; @@ -409,6 +408,7 @@ pub const DEC_FROM_INT: IntrinsicName = int_intrinsic!("roc_builtins.dec.from_in pub const DEC_FROM_STR: &str = "roc_builtins.dec.from_str"; pub const DEC_FROM_U64: &str = "roc_builtins.dec.from_u64"; pub const DEC_LOG: &str = "roc_builtins.dec.log"; +pub const DEC_POW: &str = "roc_builtins.dec.pow"; pub const DEC_MUL_OR_PANIC: &str = "roc_builtins.dec.mul_or_panic"; pub const DEC_MUL_SATURATED: &str = "roc_builtins.dec.mul_saturated"; pub const DEC_MUL_WITH_OVERFLOW: &str = "roc_builtins.dec.mul_with_overflow"; @@ -421,6 +421,9 @@ pub const DEC_SUB_WITH_OVERFLOW: &str = "roc_builtins.dec.sub_with_overflow"; pub const DEC_TAN: &str = "roc_builtins.dec.tan"; pub const DEC_TO_I128: &str = "roc_builtins.dec.to_i128"; pub const DEC_TO_STR: &str = "roc_builtins.dec.to_str"; +pub const DEC_ROUND: IntrinsicName = int_intrinsic!("roc_builtins.dec.round"); +pub const DEC_FLOOR: IntrinsicName = int_intrinsic!("roc_builtins.dec.floor"); +pub const DEC_CEILING: IntrinsicName = int_intrinsic!("roc_builtins.dec.ceiling"); pub const UTILS_DBG_IMPL: &str = "roc_builtins.utils.dbg_impl"; pub const UTILS_TEST_PANIC: &str = "roc_builtins.utils.test_panic"; @@ -445,6 +448,9 @@ pub const NOTIFY_PARENT_EXPECT: &str = "roc_builtins.utils.notify_parent_expect" pub const UTILS_LONGJMP: &str = "longjmp"; pub const UTILS_SETJMP: &str = "setjmp"; +pub const UTILS_WINDOWS_SETJMP: &str = "windows_setjmp"; +pub const UTILS_WINDOWS_LONGJMP: &str = "windows_longjmp"; + #[derive(Debug, Default)] pub struct IntToIntrinsicName { pub options: [IntrinsicName; 10], diff --git a/crates/compiler/can/src/builtins.rs b/crates/compiler/can/src/builtins.rs index 168faff98de..cf23d0a7306 100644 --- a/crates/compiler/can/src/builtins.rs +++ b/crates/compiler/can/src/builtins.rs @@ -115,10 +115,8 @@ map_symbol_to_lowlevel_and_arity! { StrJoinWith; STR_JOIN_WITH; 2, StrIsEmpty; STR_IS_EMPTY; 1, StrStartsWith; STR_STARTS_WITH; 2, - StrStartsWithScalar; STR_STARTS_WITH_SCALAR; 2, StrEndsWith; STR_ENDS_WITH; 2, StrSplit; STR_SPLIT; 2, - StrCountGraphemes; STR_COUNT_GRAPHEMES; 1, StrCountUtf8Bytes; STR_COUNT_UTF8_BYTES; 1, StrFromUtf8Range; STR_FROM_UTF8_RANGE_LOWLEVEL; 3, StrToUtf8; STR_TO_UTF8; 1, @@ -126,22 +124,18 @@ map_symbol_to_lowlevel_and_arity! { StrTrim; STR_TRIM; 1, StrTrimStart; STR_TRIM_START; 1, StrTrimEnd; STR_TRIM_END; 1, - StrToScalars; STR_TO_SCALARS; 1, StrGetUnsafe; STR_GET_UNSAFE; 2, StrSubstringUnsafe; STR_SUBSTRING_UNSAFE; 3, StrReserve; STR_RESERVE; 2, - StrAppendScalar; STR_APPEND_SCALAR_UNSAFE; 2, - StrGetScalarUnsafe; STR_GET_SCALAR_UNSAFE; 2, StrToNum; STR_TO_NUM; 1, - StrGetCapacity; STR_CAPACITY; 1, StrWithCapacity; STR_WITH_CAPACITY; 1, - StrGraphemes; STR_GRAPHEMES; 1, StrReleaseExcessCapacity; STR_RELEASE_EXCESS_CAPACITY; 1, ListLen; LIST_LEN; 1, 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, @@ -178,9 +172,9 @@ map_symbol_to_lowlevel_and_arity! { NumLte; NUM_LTE; 2, NumCompare; NUM_COMPARE; 2, NumDivFrac; NUM_DIV_FRAC; 2, - NumDivTruncUnchecked; NUM_DIV_TRUNC; 2, + NumDivTruncUnchecked; NUM_DIV_TRUNC_UNCHECKED; 2, NumDivCeilUnchecked; NUM_DIV_CEIL; 2, - NumRemUnchecked; NUM_REM; 2, + NumRemUnchecked; NUM_REM_UNCHECKED; 2, NumIsMultipleOf; NUM_IS_MULTIPLE_OF; 2, NumAbs; NUM_ABS; 1, NumNeg; NUM_NEG; 1, diff --git a/crates/compiler/can/src/expr.rs b/crates/compiler/can/src/expr.rs index f93eadeb02e..8d7d3bde72c 100644 --- a/crates/compiler/can/src/expr.rs +++ b/crates/compiler/can/src/expr.rs @@ -2423,7 +2423,9 @@ pub fn is_valid_interpolation(expr: &ast::Expr<'_>) -> bool { | ast::StrSegment::Plaintext(_) => true, // Disallow nested interpolation. Alternatively, we could allow it but require // a comment above it apologizing to the next person who has to read the code. - ast::StrSegment::Interpolated(_) => false, + ast::StrSegment::Interpolated(_) | ast::StrSegment::DeprecatedInterpolated(_) => { + false + } }) } ast::Expr::Record(fields) => fields.iter().all(|loc_field| match loc_field.value { @@ -2550,7 +2552,7 @@ fn flatten_str_lines<'a>( ); } }, - Interpolated(loc_expr) => { + Interpolated(loc_expr) | DeprecatedInterpolated(loc_expr) => { if is_valid_interpolation(loc_expr.value) { // Interpolations desugar to Str.concat calls output.references.insert_call(Symbol::STR_CONCAT); @@ -2598,10 +2600,38 @@ fn flatten_str_lines<'a>( fn desugar_str_segments(var_store: &mut VarStore, segments: Vec) -> Expr { use StrSegment::*; + let n = segments.len(); let mut iter = segments.into_iter().rev(); let mut loc_expr = match iter.next() { Some(Plaintext(string)) => Loc::at(Region::zero(), Expr::Str(string)), - Some(Interpolation(loc_expr)) => loc_expr, + Some(Interpolation(loc_expr)) => { + if n == 1 { + // We concat with the empty string to ensure a type error when loc_expr is not a string + let empty_string = Loc::at(Region::zero(), Expr::Str("".into())); + + let fn_expr = Loc::at( + Region::zero(), + Expr::Var(Symbol::STR_CONCAT, var_store.fresh()), + ); + let expr = Expr::Call( + Box::new(( + var_store.fresh(), + fn_expr, + var_store.fresh(), + var_store.fresh(), + )), + vec![ + (var_store.fresh(), empty_string), + (var_store.fresh(), loc_expr), + ], + CalledVia::StringInterpolation, + ); + + Loc::at(Region::zero(), expr) + } else { + loc_expr + } + } None => { // No segments? Empty string! diff --git a/crates/compiler/can/src/module.rs b/crates/compiler/can/src/module.rs index 1bb5cc4beca..50f3877f007 100644 --- a/crates/compiler/can/src/module.rs +++ b/crates/compiler/can/src/module.rs @@ -1051,14 +1051,13 @@ fn fix_values_captured_in_closure_expr( debug_assert!(!captures.is_empty()); captured_symbols.extend(captures); captured_symbols.swap_remove(i); - // Jump two, because the next element is now one of the newly-added captures, - // which we don't need to check. - i += 2; added_captures = true; - } else { - i += 1; } + + // Always jump one, because the current element either does not have captures or + // is now one of the newly-added captures, which we don't need to check. + i += 1; } if added_captures { // Re-sort, since we've added new captures. diff --git a/crates/compiler/can/src/operator.rs b/crates/compiler/can/src/operator.rs index 3cc06a623cd..554d0383002 100644 --- a/crates/compiler/can/src/operator.rs +++ b/crates/compiler/can/src/operator.rs @@ -594,7 +594,7 @@ pub fn desugar_expr<'a>( // line_info is an option so that we can lazily calculate it. // That way it there are no `dbg` statements, we never pay the cast of scanning the source an extra time. - if matches!(line_info, None) { + if line_info.is_none() { *line_info = Some(LineInfo::new(src)); } let line_col = line_info.as_ref().unwrap().convert_pos(region.start()); @@ -634,6 +634,22 @@ fn desugar_str_segments<'a>( StrSegment::Plaintext(_) | StrSegment::Unicode(_) | StrSegment::EscapedChar(_) => { *segment } + StrSegment::DeprecatedInterpolated(loc_expr) => { + let loc_desugared = desugar_expr( + arena, + arena.alloc(Loc { + region: loc_expr.region, + value: *loc_expr.value, + }), + src, + line_info, + module_path, + ); + StrSegment::DeprecatedInterpolated(Loc { + region: loc_desugared.region, + value: arena.alloc(loc_desugared.value), + }) + } StrSegment::Interpolated(loc_expr) => { let loc_desugared = desugar_expr( arena, diff --git a/crates/compiler/can/src/pattern.rs b/crates/compiler/can/src/pattern.rs index e0cf6de1ff6..bcb44774975 100644 --- a/crates/compiler/can/src/pattern.rs +++ b/crates/compiler/can/src/pattern.rs @@ -1071,7 +1071,7 @@ fn flatten_str_lines(lines: &[&[StrSegment<'_>]]) -> Pattern { Unicode(loc_digits) => { todo!("parse unicode digits {:?}", loc_digits); } - Interpolated(loc_expr) => { + Interpolated(loc_expr) | DeprecatedInterpolated(loc_expr) => { return Pattern::UnsupportedPattern(loc_expr.region); } EscapedChar(escaped) => buf.push(escaped.unescape()), diff --git a/crates/compiler/can/src/traverse.rs b/crates/compiler/can/src/traverse.rs index f92ae773bec..3f044eed37f 100644 --- a/crates/compiler/can/src/traverse.rs +++ b/crates/compiler/can/src/traverse.rs @@ -13,7 +13,7 @@ use crate::{ }, pattern::{DestructType, Pattern, RecordDestruct, TupleDestruct}, }; - +#[derive(Clone)] pub enum DeclarationInfo<'a> { Value { loc_symbol: Loc, @@ -164,7 +164,7 @@ pub fn walk_decls(visitor: &mut V, decls: &Declarations) { } } -fn walk_decl(visitor: &mut V, decl: DeclarationInfo<'_>) { +pub fn walk_decl(visitor: &mut V, decl: DeclarationInfo<'_>) { use DeclarationInfo::*; match decl { diff --git a/crates/compiler/can/tests/test_can.rs b/crates/compiler/can/tests/test_can.rs index f030c09573c..fa44b0e728b 100644 --- a/crates/compiler/can/tests/test_can.rs +++ b/crates/compiler/can/tests/test_can.rs @@ -280,12 +280,12 @@ mod test_can { #[test] fn correct_annotated_body() { let src = indoc!( - r#" + r" f : Num.Int * -> Num.Int * f = \ a -> a f - "# + " ); let arena = Bump::new(); let CanExprOut { problems, .. } = can_expr_with(&arena, test_home(), src); @@ -296,12 +296,12 @@ mod test_can { #[test] fn correct_annotated_body_with_comments() { let src = indoc!( - r#" + r" f : Num.Int * -> Num.Int * # comment f = \ a -> a f - "# + " ); let arena = Bump::new(); let CanExprOut { problems, .. } = can_expr_with(&arena, test_home(), src); @@ -312,12 +312,12 @@ mod test_can { #[test] fn name_mismatch_annotated_body() { let src = indoc!( - r#" + r" f : Num.Int * -> Num.Int * g = \ a -> a g - "# + " ); let arena = Bump::new(); let CanExprOut { problems, .. } = can_expr_with(&arena, test_home(), src); @@ -340,12 +340,12 @@ mod test_can { #[test] fn name_mismatch_annotated_body_with_comment() { let src = indoc!( - r#" + r" f : Num.Int * -> Num.Int * # comment g = \ a -> a g - "# + " ); let arena = Bump::new(); let CanExprOut { problems, .. } = can_expr_with(&arena, test_home(), src); @@ -368,13 +368,13 @@ mod test_can { #[test] fn separated_annotated_body() { let src = indoc!( - r#" + r" f : Num.Int * -> Num.Int * f = \ a -> a f 42 - "# + " ); let arena = Bump::new(); let CanExprOut { problems, .. } = can_expr_with(&arena, test_home(), src); @@ -389,13 +389,13 @@ mod test_can { #[test] fn separated_annotated_body_with_comment() { let src = indoc!( - r#" + r" f : Num.Int * -> Num.Int * # comment f = \ a -> a f 42 - "# + " ); let arena = Bump::new(); let CanExprOut { problems, .. } = can_expr_with(&arena, test_home(), src); @@ -410,13 +410,13 @@ mod test_can { #[test] fn shadowed_annotation() { let src = indoc!( - r#" + r" f : Num.Int * -> Num.Int * f : Num.Int * -> Num.Int * f - "# + " ); let arena = Bump::new(); let CanExprOut { problems, .. } = can_expr_with(&arena, test_home(), src); @@ -432,7 +432,7 @@ mod test_can { #[test] fn correct_nested_unannotated_body() { let src = indoc!( - r#" + r" f : Num.Int * f = g = 42 @@ -440,7 +440,7 @@ mod test_can { g + 1 f - "# + " ); let arena = Bump::new(); let CanExprOut { problems, .. } = can_expr_with(&arena, test_home(), src); @@ -451,7 +451,7 @@ mod test_can { #[test] fn correct_nested_annotated_body() { let src = indoc!( - r#" + r" f : Num.Int * f = g : Num.Int * @@ -460,7 +460,7 @@ mod test_can { g + 1 f - "# + " ); let arena = Bump::new(); let CanExprOut { problems, .. } = can_expr_with(&arena, test_home(), src); @@ -471,7 +471,7 @@ mod test_can { #[test] fn correct_nested_body_annotated_multiple_lines() { let src = indoc!( - r#" + r" f : Num.Int * f = g : Num.Int * @@ -482,7 +482,7 @@ mod test_can { g + h + z f - "# + " ); let arena = Bump::new(); let CanExprOut { problems, .. } = can_expr_with(&arena, test_home(), src); @@ -493,7 +493,7 @@ mod test_can { #[test] fn correct_nested_body_unannotated_multiple_lines() { let src = indoc!( - r#" + r" f : Num.Int * f = g = 42 @@ -503,7 +503,7 @@ mod test_can { g + h + z f - "# + " ); let arena = Bump::new(); let CanExprOut { problems, .. } = can_expr_with(&arena, test_home(), src); @@ -513,7 +513,7 @@ mod test_can { #[test] fn correct_double_nested_body() { let src = indoc!( - r#" + r" f : Num.Int * f = g = @@ -523,7 +523,7 @@ mod test_can { f - "# + " ); let arena = Bump::new(); let CanExprOut { problems, .. } = can_expr_with(&arena, test_home(), src); @@ -534,13 +534,13 @@ mod test_can { #[test] fn annotation_followed_with_unrelated_affectation() { let src = indoc!( - r#" + r" F : Str x = 1 x - "# + " ); let arena = Bump::new(); let CanExprOut { problems, .. } = can_expr_with(&arena, test_home(), src); @@ -554,7 +554,7 @@ mod test_can { #[test] fn two_annotations_followed_with_unrelated_affectation() { let src = indoc!( - r#" + r" G : Str F : {} @@ -562,7 +562,7 @@ mod test_can { x = 1 x - "# + " ); let arena = Bump::new(); let CanExprOut { problems, .. } = can_expr_with(&arena, test_home(), src); @@ -581,11 +581,11 @@ mod test_can { // // it only exists in the closure's arguments. // let arena = Bump::new(); // let src = indoc!( - // r#" + // r" // func = \arg -> arg // func 2 - // "# + // " // ); // let (_actual, output, problems, _var_store, _vars, _constraint) = // can_expr_with(&arena, test_home(), src); @@ -608,13 +608,13 @@ mod test_can { // fn call_by_pointer_for_fn_args() { // // This function will get passed in as a pointer. // let src = indoc!( - // r#" + // r" // apply = \f, x -> f x // identity = \a -> a // apply identity 5 - // "# + // " // ); // let arena = Bump::new(); // let (_actual, output, problems, _var_store, _vars, _constraint) = @@ -637,9 +637,9 @@ mod test_can { #[test] fn incorrect_optional_value() { let src = indoc!( - r#" + r" { x ? 42 } - "# + " ); let arena = Bump::new(); let CanExprOut { @@ -782,7 +782,7 @@ mod test_can { number = "42" - succeed { + succeed { number: <- parse number, raw: number, } @@ -817,7 +817,7 @@ mod test_can { fn multiple_record_builders_error() { let src = indoc!( r#" - succeed + succeed { a: <- apply "a" } { b: <- apply "b" } "# @@ -911,7 +911,7 @@ mod test_can { #[test] fn recognize_tail_calls() { let src = indoc!( - r#" + r" g = \x -> when x is 0 -> 0 @@ -936,7 +936,7 @@ mod test_can { { x: p, y: h } ) ) - "# + " ); let arena = Bump::new(); let CanExprOut { @@ -963,7 +963,7 @@ mod test_can { // #[test] // fn reproduce_incorrect_unused_defs() { // let src = indoc!( - // r#" + // r" // g = \x -> // when x is // 0 -> 0 @@ -983,7 +983,7 @@ mod test_can { // # variables must be (indirectly) referenced in the body for analysis to work // # { x: p, y: h } // g - // "# + // " // ); // let arena = Bump::new(); // let CanExprOut { @@ -1012,14 +1012,14 @@ mod test_can { #[test] fn when_tail_call() { let src = indoc!( - r#" + r" g = \x -> when x is 0 -> 0 _ -> g (x + 1) g 0 - "# + " ); let arena = Bump::new(); let CanExprOut { @@ -1034,11 +1034,11 @@ mod test_can { #[test] fn immediate_tail_call() { let src = indoc!( - r#" + r" f = \x -> f x f 0 - "# + " ); let arena = Bump::new(); let CanExprOut { @@ -1055,13 +1055,13 @@ mod test_can { #[test] fn when_condition_is_no_tail_call() { let src = indoc!( - r#" + r" q = \x -> when q x is _ -> 0 q 0 - "# + " ); let arena = Bump::new(); let CanExprOut { @@ -1076,7 +1076,7 @@ mod test_can { #[test] fn good_mutual_recursion() { let src = indoc!( - r#" + r" q = \x -> when x is 0 -> 0 @@ -1088,7 +1088,7 @@ mod test_can { _ -> q (x - 1) q p - "# + " ); let arena = Bump::new(); let CanExprOut { @@ -1107,11 +1107,11 @@ mod test_can { #[test] fn valid_self_recursion() { let src = indoc!( - r#" + r" boom = \_ -> boom {} boom - "# + " ); let arena = Bump::new(); let CanExprOut { @@ -1128,13 +1128,13 @@ mod test_can { #[test] fn invalid_mutual_recursion() { let src = indoc!( - r#" + r" x = y y = z z = x x - "# + " ); let home = test_home(); let arena = Bump::new(); @@ -1176,11 +1176,11 @@ mod test_can { #[test] fn dict() { let src = indoc!( - r#" + r" x = Dict.empty {} Dict.len x - "# + " ); let arena = Bump::new(); let CanExprOut { problems, .. } = can_expr_with(&arena, test_home(), src); @@ -1191,7 +1191,7 @@ mod test_can { #[test] fn unused_def_regression() { let src = indoc!( - r#" + r" Booly : [Yes, No, Maybe] y : Booly @@ -1205,7 +1205,7 @@ mod test_can { x = [y] x - "# + " ); let arena = Bump::new(); let CanExprOut { problems, .. } = can_expr_with(&arena, test_home(), src); @@ -1216,14 +1216,14 @@ mod test_can { #[test] fn optional_field_not_unused() { let src = indoc!( - r#" + r" fallbackZ = 3 fn = \{ x, y, z ? fallbackZ } -> { x, y, z } fn { x: 0, y: 1 } - "# + " ); let arena = Bump::new(); let CanExprOut { problems, .. } = can_expr_with(&arena, test_home(), src); @@ -1234,12 +1234,12 @@ mod test_can { #[test] fn issue_2534() { let src = indoc!( - r#" + r" x = { a: 1 } { x & a: 2 } - "# + " ); let arena = Bump::new(); let CanExprOut { problems, .. } = can_expr_with(&arena, test_home(), src); @@ -1252,13 +1252,13 @@ mod test_can { // // "local" should be used, because the closure used it. // // However, "unused" should be unused. // let (_, output, problems, _) = can_expr(indoc!( - // r#" + // r" // local = 5 // unused = 6 // func = \arg -> arg + local // 3 + func 2 - // "# + // " // )); // assert_eq!( @@ -1283,13 +1283,13 @@ mod test_can { //fn unused_closure() { // // "unused" should be unused because it's in func, which is unused. // let (_, output, problems, _) = can_expr(indoc!( - // r#" + // r" // local = 5 // unused = 6 // func = \arg -> arg + unused // local - // "# + // " // )); // assert_eq!( @@ -1316,9 +1316,9 @@ mod test_can { // #[test] // fn basic_unrecognized_constant() { // let (expr, output, problems, _) = can_expr(indoc!( - // r#" + // r" // x - // "# + // " // )); // assert_eq!( @@ -1342,12 +1342,12 @@ mod test_can { //#[test] //fn complex_unrecognized_constant() { // let (_, output, problems, _) = can_expr(indoc!( - // r#" + // r" // a = 5 // b = 6 // a + b * z - // "# + // " // )); // assert_eq!( @@ -1375,13 +1375,13 @@ mod test_can { // // This should report that both a and b are unused, since the return expr never references them. // // It should not report them as circular, since we haven't solved the halting problem here. // let (_, output, problems, _) = can_expr(indoc!( - // r#" + // r" // a = \arg -> if arg > 0 then b 7 else 0 // b = \arg -> if arg > 0 then a (arg - 1) else 0 // c = 5 // c - // "# + // " // )); // assert_eq!(problems, vec![unused("a"), unused("b")]); @@ -1400,7 +1400,7 @@ mod test_can { //#[test] //fn can_fibonacci() { // let (_, output, problems, _) = can_expr(indoc!( - // r#" + // r" // fibonacci = \num -> // if num < 2 then // num @@ -1408,7 +1408,7 @@ mod test_can { // fibonacci (num - 1) + fibonacci (num - 2) // fibonacci 9 - // "# + // " // )); // assert_eq!(problems, vec![]); @@ -1430,7 +1430,7 @@ mod test_can { // // is considered a tail call, even though it only // // calls itself from one branch! // let (_, output, problems, _) = can_expr(indoc!( - // r#" + // r" // factorial = \num -> // factorialHelp num 0 @@ -1441,7 +1441,7 @@ mod test_can { // factorialHelp (num - 1) (total * num) // factorial 9 - // "# + // " // )); // assert_eq!(problems, vec![]); @@ -1462,12 +1462,12 @@ mod test_can { // // This should report that neither a nor b are unused, // // since if you never call a function but do return it, that's okay! // let (_, output, problems, _) = can_expr(indoc!( - // r#" + // r" // a = \_ -> 42 // b = a // b - // "# + // " // )); // assert_eq!(problems, Vec::new()); @@ -1488,14 +1488,14 @@ mod test_can { //#[test] //fn reorder_assignments() { // let (expr, output, problems, _) = can_expr(indoc!( - // r#" + // r" // increment = \arg -> arg + 1 // z = (increment 2) + y // y = x + 1 // x = 9 // z * 3 - // "# + // " // )); // assert_eq!(problems, vec![]); @@ -1526,7 +1526,7 @@ mod test_can { //#[test] //fn reorder_closed_over_assignments() { // let (expr, output, problems, _) = can_expr(indoc!( - // r#" + // r" // z = func1 x // x = 9 // y = func2 3 @@ -1534,7 +1534,7 @@ mod test_can { // func2 = \arg -> arg + x // z - // "# + // " // )); // assert_eq!(problems, vec![]); @@ -1628,14 +1628,14 @@ mod test_can { //#[test] //fn circular_assignment() { // let (_, _, problems, _) = can_expr(indoc!( - // r#" + // r" // c = d + 3 // b = 2 + c // d = a + 7 // a = b + 1 // 2 + d - // "# + // " // )); // assert_eq!( @@ -1655,9 +1655,9 @@ mod test_can { // // There was a bug where this reported UnusedArgument("val") // // since it was used only in the returned function only. // let (_, _, problems, _) = can_expr(indoc!( - // r#" + // r" // \val -> \_ -> val - // "# + // " // )); // assert_eq!(problems, vec![]); @@ -1822,18 +1822,18 @@ mod test_can { // ); // } - // #[test] - // fn string_with_escaped_interpolation() { - // assert_parses_to( - // // This should NOT be string interpolation, because of the \\ - // indoc!( - // r#" - // "abcd\\(efg)hij" + // #[test] + // fn string_with_escaped_interpolation() { + // assert_parses_to( + // // This should NOT be string interpolation, because of the \\ + // indoc!( + // r#" + // "abcd\$(efg)hij" // "# - // ), - // Str(r#"abcd\(efg)hij"#.into()), - // ); - // } + // ), + // Str(r"abcd$(efg)hij".into()), + // ); + // } // #[test] // fn string_without_escape() { @@ -1848,7 +1848,7 @@ mod test_can { // #[test] // fn string_with_special_escapes() { - // expect_parsed_str(r#"x\x"#, r#""x\\x""#); + // expect_parsed_str(r"x\x", r#""x\\x""#); // expect_parsed_str(r#"x"x"#, r#""x\"x""#); // expect_parsed_str("x\tx", r#""x\tx""#); // expect_parsed_str("x\rx", r#""x\rx""#); diff --git a/crates/compiler/checkmate/www/.gitignore b/crates/compiler/checkmate/www/.gitignore deleted file mode 100644 index d43e34580d1..00000000000 --- a/crates/compiler/checkmate/www/.gitignore +++ /dev/null @@ -1,17 +0,0 @@ -/node_modules -/.pnp -.pnp.js - -/coverage - -/build - -.DS_Store -.env.local -.env.development.local -.env.test.local -.env.production.local - -npm-debug.log* -yarn-debug.log* -yarn-error.log* diff --git a/crates/compiler/debug_flags/src/lib.rs b/crates/compiler/debug_flags/src/lib.rs index ede77bd317a..e879408d64b 100644 --- a/crates/compiler/debug_flags/src/lib.rs +++ b/crates/compiler/debug_flags/src/lib.rs @@ -173,4 +173,7 @@ flags! { /// Don't build and use the subs cache (speeds up compilation of load and previous crates) ROC_SKIP_SUBS_CACHE + + /// Print out shell commands used to buid the Roc and host code + ROC_PRINT_BUILD_COMMANDS } diff --git a/crates/compiler/fmt/src/expr.rs b/crates/compiler/fmt/src/expr.rs index 31cbf781c9b..b9e5b591524 100644 --- a/crates/compiler/fmt/src/expr.rs +++ b/crates/compiler/fmt/src/expr.rs @@ -612,9 +612,20 @@ fn format_str_segment(seg: &StrSegment, buf: &mut Buf, indent: u16) { buf.push('\\'); buf.push(escaped.to_parsed_char()); } - Interpolated(loc_expr) => { + DeprecatedInterpolated(loc_expr) => { buf.push_str("\\("); - // e.g. (name) in "Hi, \(name)!" + // e.g. (name) in "Hi, $(name)!" + loc_expr.value.format_with_options( + buf, + Parens::NotNeeded, // We already printed parens! + Newlines::No, // Interpolations can never have newlines + indent, + ); + buf.push(')'); + } + Interpolated(loc_expr) => { + buf.push_str("$("); + // e.g. (name) in "Hi, $(name)!" loc_expr.value.format_with_options( buf, Parens::NotNeeded, // We already printed parens! diff --git a/crates/compiler/fmt/src/spaces.rs b/crates/compiler/fmt/src/spaces.rs index 6bec2468811..0caa8cffc76 100644 --- a/crates/compiler/fmt/src/spaces.rs +++ b/crates/compiler/fmt/src/spaces.rs @@ -154,7 +154,9 @@ fn fmt_comment(buf: &mut Buf, comment: &str) { } buf.push('#'); - if !comment.starts_with(' ') { + // Add a space between the starting `#` and the rest of the comment, + // unless there already is a space or the comment is of the form `#### something`. + if !comment.starts_with(' ') && !comment.starts_with('#') { buf.spaces(1); } buf.push_str(comment.trim_end()); @@ -656,6 +658,9 @@ impl<'a> RemoveSpaces<'a> for StrSegment<'a> { StrSegment::Unicode(t) => StrSegment::Unicode(t.remove_spaces(arena)), StrSegment::EscapedChar(c) => StrSegment::EscapedChar(c), StrSegment::Interpolated(t) => StrSegment::Interpolated(t.remove_spaces(arena)), + StrSegment::DeprecatedInterpolated(t) => { + StrSegment::DeprecatedInterpolated(t.remove_spaces(arena)) + } } } } diff --git a/crates/compiler/gen_dev/src/generic64/aarch64.rs b/crates/compiler/gen_dev/src/generic64/aarch64.rs index cdb7a35d312..71c937a3e44 100644 --- a/crates/compiler/gen_dev/src/generic64/aarch64.rs +++ b/crates/compiler/gen_dev/src/generic64/aarch64.rs @@ -1,3 +1,6 @@ +#![allow(clippy::redundant_closure_call)] +//|> clippy false positive: https://github.com/rust-lang/rust-clippy/issues/1553 + use crate::generic64::{storage::StorageManager, Assembler, CallConv, RegTrait}; use crate::{ pointer_layouts, single_register_floats, single_register_int_builtins, @@ -1242,6 +1245,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>, @@ -1266,6 +1279,7 @@ impl Assembler for AArch64Assembler { ) { add_reg64_reg64_reg64(buf, dst, src1, src2); } + #[inline(always)] fn add_freg32_freg32_freg32( buf: &mut Vec<'_, u8>, @@ -1285,6 +1299,25 @@ impl Assembler for AArch64Assembler { fadd_freg_freg_freg(buf, FloatWidth::F64, dst, src1, src2); } + #[inline(always)] + fn sub_freg32_freg32_freg32( + buf: &mut Vec<'_, u8>, + dst: AArch64FloatReg, + src1: AArch64FloatReg, + src2: AArch64FloatReg, + ) { + fsub_freg_freg_freg(buf, FloatWidth::F32, dst, src1, src2); + } + #[inline(always)] + fn sub_freg64_freg64_freg64( + buf: &mut Vec<'_, u8>, + dst: AArch64FloatReg, + src1: AArch64FloatReg, + src2: AArch64FloatReg, + ) { + fsub_freg_freg_freg(buf, FloatWidth::F64, dst, src1, src2); + } + #[inline(always)] fn call(buf: &mut Vec<'_, u8>, relocs: &mut Vec<'_, Relocation>, fn_name: String) { let inst = 0b1001_0100_0000_0000_0000_0000_0000_0000u32; @@ -1638,6 +1671,11 @@ impl Assembler for AArch64Assembler { Self::mov_freg64_mem64_offset32(buf, dst, AArch64GeneralReg::FP, offset) } + #[inline(always)] + fn mov_freg32_base32(buf: &mut Vec<'_, u8>, dst: AArch64FloatReg, offset: i32) { + Self::mov_freg32_mem32_offset32(buf, dst, AArch64GeneralReg::FP, offset) + } + #[inline(always)] fn mov_reg_mem_offset32( buf: &mut Vec<'_, u8>, @@ -3894,6 +3932,27 @@ fn fadd_freg_freg_freg( buf.extend(inst.bytes()); } +/// `FSUB Sd/Dd, Sn/Dn, Sm/Dm` -> Sub Sn/Dn and Sm/Dm and place the result into Sd/Dd. +#[inline(always)] +fn fsub_freg_freg_freg( + buf: &mut Vec<'_, u8>, + ftype: FloatWidth, + dst: AArch64FloatReg, + src1: AArch64FloatReg, + src2: AArch64FloatReg, +) { + let inst = + FloatingPointDataProcessingTwoSource::new(FloatingPointDataProcessingTwoSourceParams { + opcode: 0b0011, + ptype: ftype, + rd: dst, + rn: src1, + rm: src2, + }); + + buf.extend(inst.bytes()); +} + /// `FCMP Sn/Dn, Sm/Dm` -> Compare Sn/Dn and Sm/Dm, setting condition flags. #[inline(always)] fn fcmp_freg_freg( diff --git a/crates/compiler/gen_dev/src/generic64/disassembler_test_macro.rs b/crates/compiler/gen_dev/src/generic64/disassembler_test_macro.rs index a1dbd4b4305..b300426519a 100644 --- a/crates/compiler/gen_dev/src/generic64/disassembler_test_macro.rs +++ b/crates/compiler/gen_dev/src/generic64/disassembler_test_macro.rs @@ -1,3 +1,6 @@ +#![allow(clippy::redundant_closure_call)] +//|> clippy false positive: https://github.com/rust-lang/rust-clippy/issues/1553 + pub fn merge_instructions_without_line_numbers(instructions: capstone::Instructions) -> String { instructions .iter() diff --git a/crates/compiler/gen_dev/src/generic64/mod.rs b/crates/compiler/gen_dev/src/generic64/mod.rs index 73a1146e2ce..0ae17f2e078 100644 --- a/crates/compiler/gen_dev/src/generic64/mod.rs +++ b/crates/compiler/gen_dev/src/generic64/mod.rs @@ -164,8 +164,21 @@ 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( + buf: &mut Vec<'_, u8>, + dst: GeneralReg, + src1: GeneralReg, + src2: GeneralReg, + ); + fn add_freg32_freg32_freg32( buf: &mut Vec<'_, u8>, dst: FloatReg, @@ -178,12 +191,6 @@ pub trait Assembler: Sized + Copy { src1: FloatReg, src2: FloatReg, ); - fn add_reg64_reg64_reg64( - buf: &mut Vec<'_, u8>, - dst: GeneralReg, - src1: GeneralReg, - src2: GeneralReg, - ); fn and_reg64_reg64_reg64( buf: &mut Vec<'_, u8>, @@ -351,6 +358,7 @@ pub trait Assembler: Sized + Copy { // base32 is similar to stack based instructions but they reference the base/frame pointer. fn mov_freg64_base32(buf: &mut Vec<'_, u8>, dst: FloatReg, offset: i32); + fn mov_freg32_base32(buf: &mut Vec<'_, u8>, dst: FloatReg, offset: i32); fn mov_reg_base32( buf: &mut Vec<'_, u8>, @@ -629,6 +637,19 @@ pub trait Assembler: Sized + Copy { ASM: Assembler, CC: CallConv; + fn sub_freg32_freg32_freg32( + buf: &mut Vec<'_, u8>, + dst: FloatReg, + src1: FloatReg, + src2: FloatReg, + ); + fn sub_freg64_freg64_freg64( + buf: &mut Vec<'_, u8>, + dst: FloatReg, + src1: FloatReg, + src2: FloatReg, + ); + fn sub_reg64_reg64_imm32(buf: &mut Vec<'_, u8>, dst: GeneralReg, src1: GeneralReg, imm32: i32); fn sub_reg64_reg64_reg64( buf: &mut Vec<'_, u8>, @@ -1302,11 +1323,57 @@ 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), } } fn build_num_add(&mut self, dst: &Symbol, src1: &Symbol, src2: &Symbol, layout: &InLayout<'a>) { + match self.layout_interner.get_repr(*layout) { + LayoutRepr::Builtin(Builtin::Int(int_width)) => self.build_fn_call( + dst, + bitcode::NUM_ADD_OR_PANIC_INT[int_width].to_string(), + &[*src1, *src2], + &[*layout, *layout], + layout, + ), + + LayoutRepr::Builtin(Builtin::Float(FloatWidth::F64)) => { + let dst_reg = self.storage_manager.claim_float_reg(&mut self.buf, dst); + let src1_reg = self.storage_manager.load_to_float_reg(&mut self.buf, src1); + let src2_reg = self.storage_manager.load_to_float_reg(&mut self.buf, src2); + ASM::add_freg64_freg64_freg64(&mut self.buf, dst_reg, src1_reg, src2_reg); + } + LayoutRepr::Builtin(Builtin::Float(FloatWidth::F32)) => { + let dst_reg = self.storage_manager.claim_float_reg(&mut self.buf, dst); + let src1_reg = self.storage_manager.load_to_float_reg(&mut self.buf, src1); + let src2_reg = self.storage_manager.load_to_float_reg(&mut self.buf, src2); + ASM::add_freg32_freg32_freg32(&mut self.buf, dst_reg, src1_reg, src2_reg); + } + + LayoutRepr::DEC => self.build_fn_call( + dst, + bitcode::DEC_ADD_OR_PANIC.to_string(), + &[*src1, *src2], + &[Layout::DEC, Layout::DEC], + &Layout::DEC, + ), + + other => unreachable!("NumAdd for layout {other:?}"), + } + } + + fn build_num_add_wrap( + &mut self, + dst: &Symbol, + src1: &Symbol, + src2: &Symbol, + layout: &InLayout<'a>, + ) { match self.layout_interner.get_repr(*layout) { LayoutRepr::Builtin(Builtin::Int(quadword_and_smaller!())) => { let dst_reg = self.storage_manager.claim_general_reg(&mut self.buf, dst); @@ -1318,6 +1385,7 @@ impl< .load_to_general_reg(&mut self.buf, src2); ASM::add_reg64_reg64_reg64(&mut self.buf, dst_reg, src1_reg, src2_reg); } + LayoutRepr::Builtin(Builtin::Float(FloatWidth::F64)) => { let dst_reg = self.storage_manager.claim_float_reg(&mut self.buf, dst); let src1_reg = self.storage_manager.load_to_float_reg(&mut self.buf, src1); @@ -1330,16 +1398,16 @@ impl< let src2_reg = self.storage_manager.load_to_float_reg(&mut self.buf, src2); ASM::add_freg32_freg32_freg32(&mut self.buf, dst_reg, src1_reg, src2_reg); } - LayoutRepr::Builtin(Builtin::Decimal) => { - self.build_fn_call( - dst, - bitcode::DEC_ADD_OR_PANIC.to_string(), - &[*src1, *src2], - &[Layout::DEC, Layout::DEC], - &Layout::DEC, - ); - } - x => todo!("NumAdd: layout, {:?}", x), + + LayoutRepr::DEC => self.build_fn_call( + dst, + bitcode::DEC_ADD_SATURATED.to_string(), + &[*src1, *src2], + &[Layout::DEC, Layout::DEC], + &Layout::DEC, + ), + + other => unreachable!("NumAddWrap for layout {other:?}"), } } @@ -1424,9 +1492,38 @@ impl< } fn build_num_mul(&mut self, dst: &Symbol, src1: &Symbol, src2: &Symbol, layout: &InLayout<'a>) { - // for the time being, `num_mul` is implemented as wrapping multiplication. In roc, the normal - // `mul` should panic on overflow, but we just don't do that yet - self.build_num_mul_wrap(dst, src1, src2, layout) + match self.layout_interner.get_repr(*layout) { + LayoutRepr::Builtin(Builtin::Int(int_width)) => self.build_fn_call( + dst, + bitcode::NUM_MUL_OR_PANIC_INT[int_width].to_string(), + &[*src1, *src2], + &[*layout, *layout], + layout, + ), + + LayoutRepr::Builtin(Builtin::Float(FloatWidth::F64)) => { + let dst_reg = self.storage_manager.claim_float_reg(&mut self.buf, dst); + let src1_reg = self.storage_manager.load_to_float_reg(&mut self.buf, src1); + let src2_reg = self.storage_manager.load_to_float_reg(&mut self.buf, src2); + ASM::mul_freg64_freg64_freg64(&mut self.buf, dst_reg, src1_reg, src2_reg); + } + LayoutRepr::Builtin(Builtin::Float(FloatWidth::F32)) => { + let dst_reg = self.storage_manager.claim_float_reg(&mut self.buf, dst); + let src1_reg = self.storage_manager.load_to_float_reg(&mut self.buf, src1); + let src2_reg = self.storage_manager.load_to_float_reg(&mut self.buf, src2); + ASM::mul_freg32_freg32_freg32(&mut self.buf, dst_reg, src1_reg, src2_reg); + } + + LayoutRepr::DEC => self.build_fn_call( + dst, + bitcode::DEC_MUL_OR_PANIC.to_string(), + &[*src1, *src2], + &[Layout::DEC, Layout::DEC], + &Layout::DEC, + ), + + other => unreachable!("NumMul for layout {other:?}"), + } } fn build_num_mul_wrap( @@ -1609,6 +1706,15 @@ impl< let src2_reg = self.storage_manager.load_to_float_reg(&mut self.buf, src2); ASM::div_freg32_freg32_freg32(&mut self.buf, dst_reg, src1_reg, src2_reg); } + LayoutRepr::Builtin(Builtin::Decimal) => { + self.build_fn_call( + dst, + bitcode::DEC_DIV.to_string(), + &[*src1, *src2], + &[*layout, *layout], + layout, + ); + } x => todo!("NumDiv: layout, {:?}", x), } } @@ -1688,9 +1794,38 @@ impl< } fn build_num_sub(&mut self, dst: &Symbol, src1: &Symbol, src2: &Symbol, layout: &InLayout<'a>) { - // for the time being, `num_sub` is implemented as wrapping subtraction. In roc, the normal - // `sub` should panic on overflow, but we just don't do that yet - self.build_num_sub_wrap(dst, src1, src2, layout) + match self.layout_interner.get_repr(*layout) { + LayoutRepr::Builtin(Builtin::Int(int_width)) => self.build_fn_call( + dst, + bitcode::NUM_SUB_OR_PANIC_INT[int_width].to_string(), + &[*src1, *src2], + &[*layout, *layout], + layout, + ), + + LayoutRepr::Builtin(Builtin::Float(FloatWidth::F64)) => { + let dst_reg = self.storage_manager.claim_float_reg(&mut self.buf, dst); + let src1_reg = self.storage_manager.load_to_float_reg(&mut self.buf, src1); + let src2_reg = self.storage_manager.load_to_float_reg(&mut self.buf, src2); + ASM::sub_freg64_freg64_freg64(&mut self.buf, dst_reg, src1_reg, src2_reg); + } + LayoutRepr::Builtin(Builtin::Float(FloatWidth::F32)) => { + let dst_reg = self.storage_manager.claim_float_reg(&mut self.buf, dst); + let src1_reg = self.storage_manager.load_to_float_reg(&mut self.buf, src1); + let src2_reg = self.storage_manager.load_to_float_reg(&mut self.buf, src2); + ASM::sub_freg32_freg32_freg32(&mut self.buf, dst_reg, src1_reg, src2_reg); + } + + LayoutRepr::DEC => self.build_fn_call( + dst, + bitcode::DEC_SUB_OR_PANIC.to_string(), + &[*src1, *src2], + &[Layout::DEC, Layout::DEC], + &Layout::DEC, + ), + + other => unreachable!("NumMul for layout {other:?}"), + } } fn build_num_sub_wrap( @@ -2020,6 +2155,30 @@ impl< ); } + fn build_int_to_float_cast( + &mut self, + dst: &Symbol, + src: &Symbol, + int_width: IntWidth, + float_width: FloatWidth, + ) { + use roc_builtins::bitcode::{INT_TO_FLOAT_CAST_F32, INT_TO_FLOAT_CAST_F64}; + + self.build_fn_call( + dst, + match float_width { + FloatWidth::F32 => INT_TO_FLOAT_CAST_F32[int_width].to_string(), + FloatWidth::F64 => INT_TO_FLOAT_CAST_F64[int_width].to_string(), + }, + &[*src], + &[Layout::from_int_width(int_width)], + match float_width { + FloatWidth::F32 => &Layout::F32, + FloatWidth::F64 => &Layout::F64, + }, + ); + } + fn build_num_cmp( &mut self, dst: &Symbol, @@ -2675,6 +2834,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, @@ -2741,7 +2949,11 @@ impl< self.load_layout_alignment(list_layout, Symbol::DEV_TMP); // Load element_width argument (usize). - self.load_layout_stack_size(*ret_layout, Symbol::DEV_TMP2); + let element_layout = match self.interner().get_repr(*ret_layout) { + LayoutRepr::Builtin(Builtin::List(e)) => e, + _ => unreachable!(), + }; + self.load_layout_stack_size(element_layout, Symbol::DEV_TMP2); // Load UpdateMode.Immutable argument (0u8) let u8_layout = Layout::U8; @@ -3087,7 +3299,7 @@ impl< let elem_layout = arg_layouts[1]; // List alignment argument (u32). - self.load_layout_alignment(*ret_layout, Symbol::DEV_TMP); + self.load_layout_alignment(elem_layout, Symbol::DEV_TMP); // Have to pass the input element by pointer, so put it on the stack and load it's address. self.storage_manager @@ -4663,14 +4875,28 @@ impl< // move a zero into the lower 8 bytes ASM::mov_reg64_imm64(buf, tmp_reg, 0x0); - ASM::mov_base32_reg64(buf, base_offset, tmp_reg); + ASM::mov_base32_reg64(buf, base_offset + 8, tmp_reg); - ASM::mov_base32_reg64(buf, base_offset + 8, src_reg); + ASM::mov_base32_reg64(buf, base_offset, src_reg); self.free_symbol(&tmp); return; } + (U128, I128) | (I128, U128) => { + let to_offset = self.storage_manager.claim_stack_area_layout( + self.layout_interner, + *dst, + Layout::from_int_width(target), + ); + + let (from_offset, size) = self.storage_manager.stack_offset_and_size(src); + + self.storage_manager + .copy_to_stack_offset(buf, size, from_offset, to_offset); + + return; + } _ => {} } @@ -4794,39 +5020,51 @@ impl< } fn num_to_f32(&mut self, dst: &Symbol, src: &Symbol, arg_layout: &InLayout<'a>) { - let dst_reg = self.storage_manager.claim_float_reg(&mut self.buf, dst); match self.layout_interner.get_repr(*arg_layout) { LayoutRepr::Builtin(Builtin::Int(IntWidth::I32 | IntWidth::I64)) => { + let dst_reg = self.storage_manager.claim_float_reg(&mut self.buf, dst); let src_reg = self.storage_manager.load_to_general_reg(&mut self.buf, src); ASM::to_float_freg32_reg64(&mut self.buf, dst_reg, src_reg); } LayoutRepr::Builtin(Builtin::Float(FloatWidth::F64)) => { + 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::to_float_freg32_freg64(&mut self.buf, 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::mov_freg64_freg64(&mut self.buf, dst_reg, src_reg); } + LayoutRepr::Builtin(Builtin::Int(_)) => { + let int_width = arg_layout.to_int_width(); + self.build_int_to_float_cast(dst, src, int_width, FloatWidth::F32); + } arg => todo!("NumToFrac: layout, arg {arg:?}, ret {:?}", Layout::F32), } } fn num_to_f64(&mut self, dst: &Symbol, src: &Symbol, arg_layout: &InLayout<'a>) { - let dst_reg = self.storage_manager.claim_float_reg(&mut self.buf, dst); match self.layout_interner.get_repr(*arg_layout) { LayoutRepr::Builtin(Builtin::Int(IntWidth::I32 | IntWidth::I64)) => { + let dst_reg = self.storage_manager.claim_float_reg(&mut self.buf, dst); let src_reg = self.storage_manager.load_to_general_reg(&mut self.buf, src); ASM::to_float_freg64_reg64(&mut self.buf, 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::to_float_freg64_freg32(&mut self.buf, dst_reg, src_reg); } LayoutRepr::Builtin(Builtin::Float(FloatWidth::F64)) => { + 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::mov_freg64_freg64(&mut self.buf, dst_reg, src_reg); } + LayoutRepr::Builtin(Builtin::Int(_)) => { + let int_width = arg_layout.to_int_width(); + self.build_int_to_float_cast(dst, src, int_width, FloatWidth::F64); + } arg => todo!("NumToFrac: layout, arg {arg:?}, ret {:?}", Layout::F64), } } diff --git a/crates/compiler/gen_dev/src/generic64/storage.rs b/crates/compiler/gen_dev/src/generic64/storage.rs index 1c6b48e0541..b5814b0cbbc 100644 --- a/crates/compiler/gen_dev/src/generic64/storage.rs +++ b/crates/compiler/gen_dev/src/generic64/storage.rs @@ -448,17 +448,26 @@ impl< } Stack(ReferencedPrimitive { base_offset, size, .. - }) if base_offset % 8 == 0 && size == 8 => { - // The primitive is aligned and the data is exactly 8 bytes, treat it like regular stack. - let reg = self.get_float_reg(buf); - ASM::mov_freg64_base32(buf, reg, base_offset); - self.float_used_regs.push((reg, *sym)); - self.symbol_storage_map.insert(*sym, Reg(Float(reg))); - self.free_reference(sym); - reg - } - Stack(ReferencedPrimitive { .. }) => { - todo!("loading referenced primitives") + }) => { + if base_offset % 8 == 0 && size == 8 { + // The primitive is aligned and the data is exactly 8 bytes, treat it like regular stack. + let reg = self.get_float_reg(buf); + ASM::mov_freg64_base32(buf, reg, base_offset); + self.float_used_regs.push((reg, *sym)); + self.symbol_storage_map.insert(*sym, Reg(Float(reg))); + self.free_reference(sym); + reg + } else if base_offset % 4 == 0 && size == 4 { + // The primitive is aligned and the data is exactly 8 bytes, treat it like regular stack. + let reg = self.get_float_reg(buf); + ASM::mov_freg32_base32(buf, reg, base_offset); + self.float_used_regs.push((reg, *sym)); + self.symbol_storage_map.insert(*sym, Reg(Float(reg))); + self.free_reference(sym); + reg + } else { + todo!("loading referenced primitives") + } } Stack(Complex { .. }) => { internal_error!("Cannot load large values into float registers: {}", sym) @@ -570,12 +579,15 @@ impl< } Stack(ReferencedPrimitive { base_offset, size, .. - }) if base_offset % 8 == 0 && *size == 8 => { - // The primitive is aligned and the data is exactly 8 bytes, treat it like regular stack. - ASM::mov_freg64_base32(buf, reg, *base_offset); - } - Stack(ReferencedPrimitive { .. }) => { - todo!("loading referenced primitives") + }) => { + if base_offset % 8 == 0 && *size == 8 { + // The primitive is aligned and the data is exactly 8 bytes, treat it like regular stack. + ASM::mov_freg64_base32(buf, reg, *base_offset); + } else if base_offset % 4 == 0 && *size == 4 { + ASM::mov_freg32_base32(buf, reg, *base_offset); + } else { + todo!("loading referenced primitives") + } } Stack(Complex { .. }) => { internal_error!("Cannot load large values into float registers: {}", sym) diff --git a/crates/compiler/gen_dev/src/generic64/x86_64.rs b/crates/compiler/gen_dev/src/generic64/x86_64.rs index e44eab3acec..f03310886ad 100644 --- a/crates/compiler/gen_dev/src/generic64/x86_64.rs +++ b/crates/compiler/gen_dev/src/generic64/x86_64.rs @@ -1,3 +1,6 @@ +#![allow(clippy::redundant_closure_call)] +//|> clippy false positive: https://github.com/rust-lang/rust-clippy/issues/1553 + use crate::generic64::{storage::StorageManager, Assembler, CallConv, RegTrait}; use crate::{ pointer_layouts, single_register_floats, single_register_int_builtins, @@ -523,12 +526,12 @@ impl CallConv for X86_64Syste use X86_64GeneralReg::*; type ASM = X86_64Assembler; - // move the first argument to roc_panic (a *RocStr) into r8 - ASM::add_reg64_reg64_imm32(buf, R8, RSP, 8); + // move the first argument to roc_panic (a *const RocStr) into r8 + ASM::mov_reg64_reg64(buf, R8, RDI); // move the crash tag into the second return register. We add 1 to it because the 0 value // is already used for "no crash occurred" - ASM::add_reg64_reg64_imm32(buf, RDX, RDI, 1); + ASM::add_reg64_reg64_imm32(buf, RDX, RSI, 1); // the setlongjmp_buffer ASM::data_pointer(buf, relocs, String::from("setlongjmp_buffer"), RDI); @@ -1955,6 +1958,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>, @@ -2004,6 +2025,39 @@ impl Assembler for X86_64Assembler { } } + #[inline(always)] + fn sub_freg32_freg32_freg32( + buf: &mut Vec<'_, u8>, + dst: X86_64FloatReg, + src1: X86_64FloatReg, + src2: X86_64FloatReg, + ) { + if dst == src1 { + subss_freg32_freg32(buf, dst, src2); + } else if dst == src2 { + subss_freg32_freg32(buf, dst, src1); + } else { + movss_freg32_freg32(buf, dst, src1); + subss_freg32_freg32(buf, dst, src2); + } + } + #[inline(always)] + fn sub_freg64_freg64_freg64( + buf: &mut Vec<'_, u8>, + dst: X86_64FloatReg, + src1: X86_64FloatReg, + src2: X86_64FloatReg, + ) { + if dst == src1 { + subsd_freg64_freg64(buf, dst, src2); + } else if dst == src2 { + subsd_freg64_freg64(buf, dst, src1); + } else { + movsd_freg64_freg64(buf, dst, src1); + subsd_freg64_freg64(buf, dst, src2); + } + } + #[inline(always)] fn call(buf: &mut Vec<'_, u8>, relocs: &mut Vec<'_, Relocation>, fn_name: String) { buf.extend([0xE8, 0x00, 0x00, 0x00, 0x00]); @@ -2382,6 +2436,11 @@ impl Assembler for X86_64Assembler { movsd_freg64_base64_offset32(buf, dst, X86_64GeneralReg::RBP, offset) } + #[inline(always)] + fn mov_freg32_base32(buf: &mut Vec<'_, u8>, dst: X86_64FloatReg, offset: i32) { + movss_freg32_base32_offset32(buf, dst, X86_64GeneralReg::RBP, offset) + } + #[inline(always)] fn mov_reg_base32( buf: &mut Vec<'_, u8>, @@ -3052,128 +3111,102 @@ fn sar_reg64_reg64(buf: &mut Vec<'_, u8>, dst: X86_64GeneralReg) { buf.extend([rex, 0xD3, 0xC0 | (7 << 3) | dst_mod]); } -/// `ADDSD xmm1,xmm2/m64` -> Add the low double-precision floating-point value from xmm2/mem to xmm1 and store the result in xmm1. -#[inline(always)] -fn addsd_freg64_freg64(buf: &mut Vec<'_, u8>, dst: X86_64FloatReg, src: X86_64FloatReg) { +fn double_binary_operation( + buf: &mut Vec<'_, u8>, + dst: X86_64FloatReg, + src: X86_64FloatReg, + float_width: FloatWidth, + op_code2: u8, +) { + let op_code1 = match float_width { + FloatWidth::F32 => 0xF3, + FloatWidth::F64 => 0xF2, + }; 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([ - 0xF2, + op_code1, 0x40 | ((dst_high as u8) << 2) | (src_high as u8), 0x0F, - 0x58, + op_code2, 0xC0 | (dst_mod << 3) | (src_mod), ]) } else { - buf.extend([0xF2, 0x0F, 0x58, 0xC0 | (dst_mod << 3) | (src_mod)]) + buf.extend([op_code1, 0x0F, op_code2, 0xC0 | (dst_mod << 3) | (src_mod)]) } } +/// `ADDSD xmm1,xmm2/m64` -> Add the low double-precision floating-point value from xmm2/mem to xmm1 and store the result in xmm1. +#[inline(always)] +fn addsd_freg64_freg64(buf: &mut Vec<'_, u8>, dst: X86_64FloatReg, src: X86_64FloatReg) { + double_binary_operation(buf, dst, src, FloatWidth::F64, 0x58) +} + /// `ADDSS xmm1,xmm2/m64` -> Add the low single-precision floating-point value from xmm2/mem to xmm1 and store the result in xmm1. #[inline(always)] fn addss_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([ - 0xF3, - 0x40 | ((dst_high as u8) << 2) | (src_high as u8), - 0x0F, - 0x58, - 0xC0 | (dst_mod << 3) | (src_mod), - ]) - } else { - buf.extend([0xF3, 0x0F, 0x58, 0xC0 | (dst_mod << 3) | (src_mod)]) - } + double_binary_operation(buf, dst, src, FloatWidth::F32, 0x58) +} + +/// `SUBSD xmm1,xmm2/m64` -> Sub the low double-precision floating-point value from xmm2/mem to xmm1 and store the result in xmm1. +#[inline(always)] +fn subsd_freg64_freg64(buf: &mut Vec<'_, u8>, dst: X86_64FloatReg, src: X86_64FloatReg) { + double_binary_operation(buf, dst, src, FloatWidth::F64, 0x5C) +} + +/// `SUBSS xmm1,xmm2/m64` -> Sub the low single-precision floating-point value from xmm2/mem to xmm1 and store the result in xmm1. +#[inline(always)] +fn subss_freg32_freg32(buf: &mut Vec<'_, u8>, dst: X86_64FloatReg, src: X86_64FloatReg) { + double_binary_operation(buf, dst, src, FloatWidth::F32, 0x5C) } -/// `MULSD xmm1,xmm2/m64` -> Multiply the low double-precision floating-point value from xmm2/mem to xmm1 and store the result in xmm1. #[inline(always)] fn mulsd_freg64_freg64(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([ - 0xF2, - 0x40 | ((dst_high as u8) << 2) | (src_high as u8), - 0x0F, - 0x59, - 0xC0 | (dst_mod << 3) | (src_mod), - ]) - } else { - buf.extend([0xF2, 0x0F, 0x59, 0xC0 | (dst_mod << 3) | (src_mod)]) - } + double_binary_operation(buf, dst, src, FloatWidth::F64, 0x59) +} + +#[inline(always)] +fn mulss_freg32_freg32(buf: &mut Vec<'_, u8>, dst: X86_64FloatReg, src: X86_64FloatReg) { + double_binary_operation(buf, dst, src, FloatWidth::F32, 0x59) } /// `DIVSS xmm1,xmm2/m64` -> Divide the low single-precision floating-point value from xmm2/mem to xmm1 and store the result in xmm1. #[inline(always)] fn divss_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([ - 0xF3, - 0x40 | ((dst_high as u8) << 2) | (src_high as u8), - 0x0F, - 0x5E, - 0xC0 | (dst_mod << 3) | (src_mod), - ]) - } else { - buf.extend([0xF3, 0x0F, 0x5E, 0xC0 | (dst_mod << 3) | (src_mod)]) - } + double_binary_operation(buf, dst, src, FloatWidth::F32, 0x5E) } /// `DIVSD xmm1,xmm2/m64` -> Divide the low double-precision floating-point value from xmm2/mem to xmm1 and store the result in xmm1. #[inline(always)] fn divsd_freg64_freg64(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([ - 0xF2, - 0x40 | ((dst_high as u8) << 2) | (src_high as u8), - 0x0F, - 0x5E, - 0xC0 | (dst_mod << 3) | (src_mod), - ]) - } else { - buf.extend([0xF2, 0x0F, 0x5E, 0xC0 | (dst_mod << 3) | (src_mod)]) - } + double_binary_operation(buf, dst, src, FloatWidth::F64, 0x5E) } -/// `ADDSS xmm1,xmm2/m64` -> Add the low single-precision floating-point value from xmm2/mem to xmm1 and store the result in xmm1. #[inline(always)] -fn mulss_freg32_freg32(buf: &mut Vec<'_, u8>, dst: X86_64FloatReg, src: X86_64FloatReg) { +fn andpd_freg64_freg64(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([ - 0xF3, + 0x66, 0x40 | ((dst_high as u8) << 2) | (src_high as u8), 0x0F, - 0x59, + 0x54, 0xC0 | (dst_mod << 3) | (src_mod), ]) } else { - buf.extend([0xF3, 0x0F, 0x59, 0xC0 | (dst_mod << 3) | (src_mod)]) + buf.extend([0x66, 0x0F, 0x54, 0xC0 | (dst_mod << 3) | (src_mod)]) } } #[inline(always)] -fn andpd_freg64_freg64(buf: &mut Vec<'_, u8>, dst: X86_64FloatReg, src: X86_64FloatReg) { +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; @@ -3181,14 +3214,13 @@ fn andpd_freg64_freg64(buf: &mut Vec<'_, u8>, dst: X86_64FloatReg, src: X86_64Fl if dst_high || src_high { buf.extend([ - 0x66, 0x40 | ((dst_high as u8) << 2) | (src_high as u8), 0x0F, 0x54, 0xC0 | (dst_mod << 3) | (src_mod), ]) } else { - buf.extend([0x66, 0x0F, 0x54, 0xC0 | (dst_mod << 3) | (src_mod)]) + buf.extend([0x0F, 0x54, 0xC0 | (dst_mod << 3) | (src_mod)]) } } @@ -4496,6 +4528,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/gen_dev/src/lib.rs b/crates/compiler/gen_dev/src/lib.rs index 93a5fb914b3..16f520bf02b 100644 --- a/crates/compiler/gen_dev/src/lib.rs +++ b/crates/compiler/gen_dev/src/lib.rs @@ -358,27 +358,21 @@ trait Backend<'a> { where I: Iterator>, { - use std::fmt::Write; use std::hash::{BuildHasher, Hash, Hasher}; let symbol = name.name(); - let mut buf = String::with_capacity(1024); - + // NOTE: due to randomness, this will not be consistent between runs + let mut state = roc_collections::all::BuildHasher::default().build_hasher(); for a in arguments { - write!(buf, "{:?}", self.interner().dbg_stable(a)).expect("capacity"); + a.hash(&mut state); } // lambda set should not matter; it should already be added as an argument // but the niche of the lambda name may be the only thing differentiating two different // implementations of a function with the same symbol - write!(buf, "{:?}", name.niche().dbg_stable(self.interner())).expect("capacity"); - - write!(buf, "{:?}", self.interner().dbg_stable(result)).expect("capacity"); - - // NOTE: due to randomness, this will not be consistent between runs - let mut state = roc_collections::all::BuildHasher::default().build_hasher(); - buf.hash(&mut state); + name.niche().hash(&mut state); + result.hash(&mut state); let interns = self.interns(); let ident_string = symbol.as_str(interns); @@ -668,14 +662,22 @@ trait Backend<'a> { &Literal::Int((crash_tag as u128).to_ne_bytes()), ); + // this function gets a RocStr, but the roc_panic defined by a platform expects a `*RocStr`. + // we store the value in a global variable and then use a pointer to this global + let panic_msg_ptr = self.debug_symbol("panic_msg_ptr"); + let ignored = self.debug_symbol("ignored"); + self.build_data_pointer(&panic_msg_ptr, "panic_msg".to_string()); + self.load_literal_symbols(&[msg]); + self.build_ptr_store(ignored, panic_msg_ptr, msg, Layout::STR); + // Now that the arguments are needed, load them if they are literals. - let arguments = &[msg, error_message]; + let arguments = &[panic_msg_ptr, error_message]; self.load_literal_symbols(arguments); self.build_fn_call( &Symbol::DEV_TMP2, String::from("roc_panic"), arguments, - &[Layout::STR, Layout::U32], + &[Layout::U64, Layout::U32], &Layout::UNIT, ); @@ -1002,7 +1004,7 @@ trait Backend<'a> { arg_layouts[0], *ret_layout, "NumAdd: expected to have the same argument and return layout" ); - self.build_num_add(sym, &args[0], &args[1], ret_layout) + self.build_num_add_wrap(sym, &args[0], &args[1], ret_layout) } LowLevel::NumAddChecked => { self.build_num_add_checked(sym, &args[0], &args[1], &arg_layouts[0], ret_layout) @@ -1072,13 +1074,80 @@ trait Backend<'a> { ); self.build_num_neg(sym, &args[0], ret_layout) } - LowLevel::NumPowInt => self.build_fn_call( - sym, - bitcode::NUM_POW_INT[IntWidth::I64].to_string(), - args, - arg_layouts, - ret_layout, - ), + LowLevel::NumPowInt => { + let repr = self.interner().get_repr(arg_layouts[0]); + let LayoutRepr::Builtin(Builtin::Int(int_width)) = repr else { + unreachable!("invalid layout for NumPowInt") + }; + + self.build_fn_call( + sym, + bitcode::NUM_POW_INT[int_width].to_string(), + args, + arg_layouts, + ret_layout, + ) + } + LowLevel::NumPow => { + let intrinsic = match self.interner().get_repr(arg_layouts[0]) { + LayoutRepr::Builtin(Builtin::Float(float_width)) => { + &bitcode::NUM_POW[float_width] + } + LayoutRepr::DEC => bitcode::DEC_POW, + _ => unreachable!("invalid layout for NumPow"), + }; + + self.build_fn_call(sym, intrinsic.to_string(), args, arg_layouts, ret_layout) + } + + LowLevel::NumRound => { + let repr = self.interner().get_repr(*ret_layout); + let LayoutRepr::Builtin(Builtin::Int(int_width)) = repr else { + unreachable!("invalid return layout for NumRound") + }; + + let intrinsic = match arg_layouts[0] { + Layout::F32 => &bitcode::NUM_ROUND_F32[int_width], + Layout::F64 => &bitcode::NUM_ROUND_F64[int_width], + Layout::DEC => &bitcode::DEC_ROUND[int_width], + _ => unreachable!("invalid layout for NumRound"), + }; + + self.build_fn_call(sym, intrinsic.to_string(), args, arg_layouts, ret_layout) + } + + LowLevel::NumFloor => { + let repr = self.interner().get_repr(*ret_layout); + let LayoutRepr::Builtin(Builtin::Int(int_width)) = repr else { + unreachable!("invalid return layout for NumFloor") + }; + + let intrinsic = match arg_layouts[0] { + Layout::F32 => &bitcode::NUM_FLOOR_F32[int_width], + Layout::F64 => &bitcode::NUM_FLOOR_F64[int_width], + Layout::DEC => &bitcode::DEC_FLOOR[int_width], + _ => unreachable!("invalid layout for NumFloor"), + }; + + self.build_fn_call(sym, intrinsic.to_string(), args, arg_layouts, ret_layout) + } + + LowLevel::NumCeiling => { + let repr = self.interner().get_repr(*ret_layout); + let LayoutRepr::Builtin(Builtin::Int(int_width)) = repr else { + unreachable!("invalid return layout for NumCeiling") + }; + + let intrinsic = match arg_layouts[0] { + Layout::F32 => &bitcode::NUM_CEILING_F32[int_width], + Layout::F64 => &bitcode::NUM_CEILING_F64[int_width], + Layout::DEC => &bitcode::DEC_CEILING[int_width], + _ => unreachable!("invalid layout for NumCeiling"), + }; + + self.build_fn_call(sym, intrinsic.to_string(), args, arg_layouts, ret_layout) + } + LowLevel::NumSub => { debug_assert_eq!( 2, @@ -1385,13 +1454,36 @@ trait Backend<'a> { self.build_num_sqrt(*sym, args[0], float_width); } - LowLevel::NumRound => self.build_fn_call( - sym, - bitcode::NUM_ROUND_F64[IntWidth::I64].to_string(), - args, - arg_layouts, - ret_layout, - ), + LowLevel::NumSin => { + let intrinsic = match arg_layouts[0] { + Layout::F64 => &bitcode::NUM_SIN[FloatWidth::F64], + Layout::F32 => &bitcode::NUM_SIN[FloatWidth::F32], + Layout::DEC => bitcode::DEC_SIN, + _ => unreachable!("invalid layout for sin"), + }; + + self.build_fn_call(sym, intrinsic.to_string(), args, arg_layouts, ret_layout) + } + LowLevel::NumCos => { + let intrinsic = match arg_layouts[0] { + Layout::F64 => &bitcode::NUM_COS[FloatWidth::F64], + Layout::F32 => &bitcode::NUM_COS[FloatWidth::F32], + Layout::DEC => bitcode::DEC_COS, + _ => unreachable!("invalid layout for cos"), + }; + + self.build_fn_call(sym, intrinsic.to_string(), args, arg_layouts, ret_layout) + } + LowLevel::NumTan => { + let intrinsic = match arg_layouts[0] { + Layout::F64 => &bitcode::NUM_TAN[FloatWidth::F64], + Layout::F32 => &bitcode::NUM_TAN[FloatWidth::F32], + Layout::DEC => bitcode::DEC_TAN, + _ => unreachable!("invalid layout for tan"), + }; + + self.build_fn_call(sym, intrinsic.to_string(), args, arg_layouts, ret_layout) + } LowLevel::ListLen => { debug_assert_eq!( 1, @@ -1409,6 +1501,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, @@ -1486,20 +1587,6 @@ trait Backend<'a> { arg_layouts, ret_layout, ), - LowLevel::StrStartsWithScalar => self.build_fn_call( - sym, - bitcode::STR_STARTS_WITH_SCALAR.to_string(), - args, - arg_layouts, - ret_layout, - ), - LowLevel::StrAppendScalar => self.build_fn_call( - sym, - bitcode::STR_APPEND_SCALAR.to_string(), - args, - arg_layouts, - ret_layout, - ), LowLevel::StrEndsWith => self.build_fn_call( sym, bitcode::STR_ENDS_WITH.to_string(), @@ -1507,13 +1594,6 @@ trait Backend<'a> { arg_layouts, ret_layout, ), - LowLevel::StrCountGraphemes => self.build_fn_call( - sym, - bitcode::STR_COUNT_GRAPEHEME_CLUSTERS.to_string(), - args, - arg_layouts, - ret_layout, - ), LowLevel::StrSubstringUnsafe => self.build_fn_call( sym, bitcode::STR_SUBSTRING_UNSAFE.to_string(), @@ -1589,13 +1669,6 @@ trait Backend<'a> { arg_layouts, ret_layout, ), - LowLevel::StrToScalars => self.build_fn_call( - sym, - bitcode::STR_TO_SCALARS.to_string(), - args, - arg_layouts, - ret_layout, - ), LowLevel::StrGetUnsafe => self.build_fn_call( sym, bitcode::STR_GET_UNSAFE.to_string(), @@ -1603,13 +1676,6 @@ trait Backend<'a> { arg_layouts, ret_layout, ), - LowLevel::StrGetScalarUnsafe => self.build_fn_call( - sym, - bitcode::STR_GET_SCALAR_UNSAFE.to_string(), - args, - arg_layouts, - ret_layout, - ), LowLevel::StrToNum => { let number_layout = match self.interner().get_repr(*ret_layout) { LayoutRepr::Struct(field_layouts) => field_layouts[0], // TODO: why is it sometimes a struct? @@ -1936,6 +2002,23 @@ trait Backend<'a> { self.build_num_cmp(sym, &args[0], &args[1], &arg_layouts[0]); } + LowLevel::NumToFloatCast => { + let float_width = match *ret_layout { + Layout::F64 => FloatWidth::F64, + Layout::F32 => FloatWidth::F32, + _ => unreachable!("invalid return layout for NumToFloatCast"), + }; + + match arg_layouts[0].try_to_int_width() { + Some(int_width) => { + self.build_int_to_float_cast(sym, &args[0], int_width, float_width); + } + None => { + self.build_num_to_frac(sym, &args[0], &arg_layouts[0], ret_layout); + } + } + } + x => todo!("low level, {:?}", x), } } @@ -1962,12 +2045,15 @@ trait Backend<'a> { "NumIsZero: expected to have return layout of type Bool" ); + let literal = match self.interner().get_repr(arg_layouts[0]) { + LayoutRepr::Builtin(Builtin::Int(_)) => Literal::Int(0i128.to_ne_bytes()), + LayoutRepr::Builtin(Builtin::Float(_)) => Literal::Float(0.0), + LayoutRepr::DEC => Literal::Decimal([0; 16]), + _ => unreachable!("invalid layout for sin"), + }; + self.load_literal_symbols(args); - self.load_literal( - &Symbol::DEV_TMP, - &arg_layouts[0], - &Literal::Int(0i128.to_ne_bytes()), - ); + self.load_literal(&Symbol::DEV_TMP, &arg_layouts[0], &literal); self.build_eq(sym, &args[0], &Symbol::DEV_TMP, &arg_layouts[0]); self.free_symbol(&Symbol::DEV_TMP) } @@ -2008,18 +2094,6 @@ trait Backend<'a> { self.load_literal(sym, BOOL_LAYOUT, LITERAL); } } - Symbol::STR_IS_VALID_SCALAR => { - // just call the function - let fn_name = self.lambda_name_to_string( - func_name, - arg_layouts.iter().copied(), - None, - *ret_layout, - ); - // Now that the arguments are needed, load them if they are literals. - self.load_literal_symbols(args); - self.build_fn_call(sym, fn_name, args, arg_layouts, ret_layout) - } _other => { // just call the function let fn_name = self.lambda_name_to_string( @@ -2061,6 +2135,14 @@ trait Backend<'a> { target: IntWidth, ); + fn build_int_to_float_cast( + &mut self, + dst: &Symbol, + src: &Symbol, + int_width: IntWidth, + float_width: FloatWidth, + ); + /// build_num_abs stores the absolute value of src into dst. fn build_num_abs(&mut self, dst: &Symbol, src: &Symbol, layout: &InLayout<'a>); @@ -2086,6 +2168,14 @@ trait Backend<'a> { return_layout: &InLayout<'a>, ); + fn build_num_add_wrap( + &mut self, + dst: &Symbol, + src1: &Symbol, + src2: &Symbol, + layout: &InLayout<'a>, + ); + /// build_num_sub_checked stores the sum of src1 and src2 into dst. fn build_num_sub_checked( &mut self, @@ -2296,6 +2386,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_dev/src/object_builder.rs b/crates/compiler/gen_dev/src/object_builder.rs index 91a6ba225e0..c86907cfdd7 100644 --- a/crates/compiler/gen_dev/src/object_builder.rs +++ b/crates/compiler/gen_dev/src/object_builder.rs @@ -29,6 +29,28 @@ pub fn build_module<'a, 'r>( layout_interner: &'r mut STLayoutInterner<'a>, target: &Triple, procedures: MutMap<(symbol::Symbol, ProcLayout<'a>), Proc<'a>>, +) -> Object<'a> { + let module_object = build_module_help(env, interns, layout_interner, target, procedures); + + if std::env::var("ROC_DEV_WRITE_OBJ").is_ok() { + let module_out = module_object + .write() + .expect("failed to build output object"); + + let file_path = std::env::temp_dir().join("app.o"); + println!("gen-test object file written to {}", file_path.display()); + std::fs::write(&file_path, module_out).expect("failed to write object to file"); + } + + module_object +} + +fn build_module_help<'a, 'r>( + env: &'r Env<'a>, + interns: &'r mut Interns, + layout_interner: &'r mut STLayoutInterner<'a>, + target: &Triple, + procedures: MutMap<(symbol::Symbol, ProcLayout<'a>), Proc<'a>>, ) -> Object<'a> { match target { Triple { @@ -159,6 +181,30 @@ fn define_setlongjmp_buffer(output: &mut Object) -> SymbolId { symbol_id } +// needed to implement Crash when setjmp/longjmp is used +fn define_panic_msg(output: &mut Object) -> SymbolId { + let bss_section = output.section_id(StandardSection::Data); + + // 3 words for a RocStr + const SIZE: usize = 3 * core::mem::size_of::(); + + let symbol = Symbol { + name: b"panic_msg".to_vec(), + value: 0, + size: SIZE as u64, + kind: SymbolKind::Data, + scope: SymbolScope::Linkage, + weak: false, + section: SymbolSection::Section(bss_section), + flags: SymbolFlags::None, + }; + + let symbol_id = output.add_symbol(symbol); + output.add_symbol_data(symbol_id, bss_section, &[0x00; SIZE], 8); + + symbol_id +} + fn generate_setjmp<'a, B: Backend<'a>>(backend: &mut B, output: &mut Object) { let text_section = output.section_id(StandardSection::Text); let proc_symbol = Symbol { @@ -422,6 +468,7 @@ fn build_object<'a, B: Backend<'a>>( */ if backend.env().mode.generate_roc_panic() { + define_panic_msg(&mut output); define_setlongjmp_buffer(&mut output); generate_roc_panic(&mut backend, &mut output); diff --git a/crates/compiler/gen_llvm/src/llvm/build.rs b/crates/compiler/gen_llvm/src/llvm/build.rs index 03292d1a621..fddc840de38 100644 --- a/crates/compiler/gen_llvm/src/llvm/build.rs +++ b/crates/compiler/gen_llvm/src/llvm/build.rs @@ -949,6 +949,12 @@ impl<'a, 'ctx, 'env> Env<'a, 'ctx, 'env> { } pub fn new_debug_info(module: &Module<'ctx>) -> (DebugInfoBuilder<'ctx>, DICompileUnit<'ctx>) { + let debug_metadata_version = module.get_context().i32_type().const_int(3, false); + module.add_basic_value_flag( + "Debug Info Version", + inkwell::module::FlagBehavior::Warning, + debug_metadata_version, + ); module.create_debug_info_builder( true, /* language */ inkwell::debug_info::DWARFSourceLanguage::C, @@ -1065,17 +1071,19 @@ pub fn module_from_builtins<'ctx>( // Anything not depended on by a `roc_builtin.` function could already by DCE'd theoretically. // That said, this workaround is good enough and fixes compilations times. - // Also, must_keep is the functions we depend on that would normally be provide by libc. + // Also, must_keep is the functions we depend on that would normally be provide by libc or compiler-rt. // They are magically linked to by llvm builtins, so we must specify that they can't be DCE'd. let must_keep = [ + // Windows special required when floats are used "_fltused", + // From libc "floorf", "memcpy", "memset", - // I have no idea why this function is special. - // Without it, some tests hang on M1 mac outside of nix. + // From compiler-rt + "__divti3", + "__modti3", "__muloti4", - // fixes `Undefined Symbol in relocation` "__udivti3", // Roc special functions "__roc_force_longjmp", @@ -4897,10 +4905,8 @@ fn expose_function_to_host_help_c_abi_v2<'a, 'ctx>( Attribute::get_named_enum_kind_id("byval"), c_abi_type.as_any_type_enum(), ); - let nonnull = context.create_type_attribute( - Attribute::get_named_enum_kind_id("nonnull"), - c_abi_type.as_any_type_enum(), - ); + let nonnull = context + .create_enum_attribute(Attribute::get_named_enum_kind_id("nonnull"), 0); // C return pointer goes at the beginning of params, and we must skip it if it exists. let returns_pointer = matches!(cc_return, CCReturn::ByPointer); let param_index = i as u32 + returns_pointer as u32; @@ -5066,6 +5072,11 @@ fn expose_function_to_host_help_c_abi<'a, 'ctx>( } pub fn get_sjlj_buffer<'ctx>(env: &Env<'_, 'ctx, '_>) -> PointerValue<'ctx> { + let word_type = match env.target_info.ptr_width() { + PtrWidth::Bytes4 => env.context.i32_type(), + PtrWidth::Bytes8 => env.context.i64_type(), + }; + // The size of jump_buf is target-dependent. // - AArch64 needs 3 machine-sized words // - LLVM says the following about the SJLJ intrinsic: @@ -5077,11 +5088,15 @@ pub fn get_sjlj_buffer<'ctx>(env: &Env<'_, 'ctx, '_>) -> PointerValue<'ctx> { // The following three words are available for use in a target-specific manner. // // So, let's create a 5-word buffer. - let word_type = match env.target_info.ptr_width() { - PtrWidth::Bytes4 => env.context.i32_type(), - PtrWidth::Bytes8 => env.context.i64_type(), + let size = if env.target_info.operating_system == roc_target::OperatingSystem::Windows { + // Due to https://github.com/llvm/llvm-project/issues/72908 + // on windows, we store the register contents into this buffer directly! + 30 + } else { + 5 }; - let type_ = word_type.array_type(5); + + let type_ = word_type.array_type(size); let global = match env.module.get_global("roc_sjlj_buffer") { Some(global) => global, @@ -5099,9 +5114,12 @@ pub fn get_sjlj_buffer<'ctx>(env: &Env<'_, 'ctx, '_>) -> PointerValue<'ctx> { pub fn build_setjmp_call<'ctx>(env: &Env<'_, 'ctx, '_>) -> BasicValueEnum<'ctx> { let jmp_buf = get_sjlj_buffer(env); - if cfg!(target_arch = "aarch64") { + if env.target_info.architecture == roc_target::Architecture::Aarch64 { // Due to https://github.com/roc-lang/roc/issues/2965, we use a setjmp we linked in from Zig call_bitcode_fn(env, &[jmp_buf.into()], bitcode::UTILS_SETJMP) + } else if env.target_info.operating_system == roc_target::OperatingSystem::Windows { + // Due to https://github.com/llvm/llvm-project/issues/72908, we use a setjmp defined as asm in Zig + call_bitcode_fn(env, &[jmp_buf.into()], bitcode::UTILS_WINDOWS_SETJMP) } else { // Anywhere else, use the LLVM intrinsic. // https://llvm.org/docs/ExceptionHandling.html#llvm-eh-sjlj-setjmp @@ -6735,9 +6753,7 @@ pub fn to_cc_return<'a>( ) -> CCReturn { let return_size = layout_interner.stack_size(layout); let pass_result_by_pointer = match env.target_info.operating_system { - roc_target::OperatingSystem::Windows => { - return_size >= 2 * env.target_info.ptr_width() as u32 - } + roc_target::OperatingSystem::Windows => return_size > env.target_info.ptr_width() as u32, roc_target::OperatingSystem::Unix => return_size > 2 * env.target_info.ptr_width() as u32, roc_target::OperatingSystem::Wasi => return_size > 2 * env.target_info.ptr_width() as u32, }; diff --git a/crates/compiler/gen_llvm/src/llvm/externs.rs b/crates/compiler/gen_llvm/src/llvm/externs.rs index 8c5be59ffe5..7df0e97311b 100644 --- a/crates/compiler/gen_llvm/src/llvm/externs.rs +++ b/crates/compiler/gen_llvm/src/llvm/externs.rs @@ -315,11 +315,18 @@ pub fn add_sjlj_roc_panic(env: &Env<'_, '_, '_>) { pub fn build_longjmp_call(env: &Env) { let jmp_buf = get_sjlj_buffer(env); - if cfg!(target_arch = "aarch64") { - // Call the Zig-linked longjmp: `void longjmp(i32*, i32)` + if env.target_info.architecture == roc_target::Architecture::Aarch64 { + // Due to https://github.com/roc-lang/roc/issues/2965, we use a setjmp we linked in from Zig let tag = env.context.i32_type().const_int(1, false); let _call = call_void_bitcode_fn(env, &[jmp_buf.into(), tag.into()], bitcode::UTILS_LONGJMP); + } else if env.target_info.operating_system == roc_target::OperatingSystem::Windows { + let tag = env.context.i32_type().const_int(1, false); + let _call = call_void_bitcode_fn( + env, + &[jmp_buf.into(), tag.into()], + bitcode::UTILS_WINDOWS_LONGJMP, + ); } else { // Call the LLVM-intrinsic longjmp: `void @llvm.eh.sjlj.longjmp(i8* %setjmp_buf)` let jmp_buf_i8p = env.builder.new_build_pointer_cast( diff --git a/crates/compiler/gen_llvm/src/llvm/lowlevel.rs b/crates/compiler/gen_llvm/src/llvm/lowlevel.rs index 2bf059aff56..5e72b446f81 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, }, @@ -153,18 +153,6 @@ pub(crate) fn run_low_level<'a, 'ctx>( } } } - StrToScalars => { - // Str.toScalars : Str -> List U32 - arguments!(string); - - call_str_bitcode_fn( - env, - &[string], - &[], - BitcodeReturns::List, - bitcode::STR_TO_SCALARS, - ) - } StrStartsWith => { // Str.startsWith : Str, Str -> Bool arguments!(string, prefix); @@ -177,18 +165,6 @@ pub(crate) fn run_low_level<'a, 'ctx>( bitcode::STR_STARTS_WITH, ) } - StrStartsWithScalar => { - // Str.startsWithScalar : Str, U32 -> Bool - arguments!(string, prefix); - - call_str_bitcode_fn( - env, - &[string], - &[prefix], - BitcodeReturns::Basic, - bitcode::STR_STARTS_WITH_SCALAR, - ) - } StrEndsWith => { // Str.startsWith : Str, Str -> Bool arguments!(string, prefix); @@ -545,102 +521,6 @@ pub(crate) fn run_low_level<'a, 'ctx>( ); BasicValueEnum::IntValue(is_zero) } - StrCountGraphemes => { - // Str.countGraphemes : Str -> Nat - arguments!(string); - - call_str_bitcode_fn( - env, - &[string], - &[], - BitcodeReturns::Basic, - bitcode::STR_COUNT_GRAPEHEME_CLUSTERS, - ) - } - StrGetScalarUnsafe => { - // Str.getScalarUnsafe : Str, Nat -> { bytesParsed : Nat, scalar : U32 } - arguments!(string, index); - - let roc_return_type = - basic_type_from_layout(env, layout_interner, layout_interner.get_repr(layout)); - - use roc_target::Architecture::*; - use roc_target::OperatingSystem::*; - match env.target_info { - TargetInfo { - operating_system: Windows, - .. - } => { - let result = env.builder.new_build_alloca(roc_return_type, "result"); - - call_void_bitcode_fn( - env, - &[result.into(), string, index], - bitcode::STR_GET_SCALAR_UNSAFE, - ); - - let cast_result = env.builder.new_build_pointer_cast( - result, - roc_return_type.ptr_type(AddressSpace::default()), - "cast", - ); - - env.builder - .new_build_load(roc_return_type, cast_result, "load_result") - } - TargetInfo { - architecture: Wasm32, - .. - } => { - let result = env.builder.new_build_alloca(roc_return_type, "result"); - - call_void_bitcode_fn( - env, - &[ - result.into(), - pass_string_to_zig_wasm(env, string).into(), - index, - ], - bitcode::STR_GET_SCALAR_UNSAFE, - ); - - let cast_result = env.builder.new_build_pointer_cast( - result, - roc_return_type.ptr_type(AddressSpace::default()), - "cast", - ); - - env.builder - .new_build_load(roc_return_type, cast_result, "load_result") - } - TargetInfo { - operating_system: Unix, - .. - } => { - let result = call_str_bitcode_fn( - env, - &[string], - &[index], - BitcodeReturns::Basic, - bitcode::STR_GET_SCALAR_UNSAFE, - ); - - // zig will pad the struct to the alignment boundary, or bitpack it on 32-bit - // targets. So we have to cast it to the format that the roc code expects - let alloca = env - .builder - .new_build_alloca(result.get_type(), "to_roc_record"); - env.builder.new_build_store(alloca, result); - - env.builder - .new_build_load(roc_return_type, alloca, "to_roc_record") - } - TargetInfo { - operating_system: Wasi, - .. - } => unimplemented!(), - } - } StrCountUtf8Bytes => { // Str.countUtf8Bytes : Str -> Nat arguments!(string); @@ -653,12 +533,6 @@ pub(crate) fn run_low_level<'a, 'ctx>( bitcode::STR_COUNT_UTF8_BYTES, ) } - StrGetCapacity => { - // Str.capacity : Str -> Nat - arguments!(string); - - call_bitcode_fn(env, &[string], bitcode::STR_CAPACITY) - } StrSubstringUnsafe => { // Str.substringUnsafe : Str, Nat, Nat -> Str arguments!(string, start, length); @@ -695,18 +569,6 @@ pub(crate) fn run_low_level<'a, 'ctx>( bitcode::STR_RELEASE_EXCESS_CAPACITY, ) } - StrAppendScalar => { - // Str.appendScalar : Str, U32 -> Str - arguments!(string, capacity); - - call_str_bitcode_fn( - env, - &[string], - &[capacity], - BitcodeReturns::Str, - bitcode::STR_APPEND_SCALAR, - ) - } StrTrim => { // Str.trim : Str -> Str arguments!(string); @@ -749,18 +611,6 @@ pub(crate) fn run_low_level<'a, 'ctx>( bitcode::STR_WITH_CAPACITY, ) } - StrGraphemes => { - // Str.graphemes : Str -> List Str - arguments!(string); - - call_str_bitcode_fn( - env, - &[string], - &[], - BitcodeReturns::List, - bitcode::STR_GRAPHEMES, - ) - } ListLen => { // List.len : List * -> Nat arguments!(list); @@ -962,6 +812,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)); @@ -1853,6 +1728,11 @@ fn build_float_binop<'ctx>( let bd = env.builder; + let float_type = match float_width { + FloatWidth::F32 => env.context.f32_type(), + FloatWidth::F64 => env.context.f64_type(), + }; + match op { NumAdd => bd.new_build_float_add(lhs, rhs, "add_float").into(), NumAddChecked => { @@ -1865,10 +1745,8 @@ fn build_float_binop<'ctx>( .into_int_value(); let is_infinite = bd.new_build_not(is_finite, "negate"); - let struct_type = context.struct_type( - &[context.f64_type().into(), context.bool_type().into()], - false, - ); + let struct_type = + context.struct_type(&[float_type.into(), context.bool_type().into()], false); let struct_value = { let v1 = struct_type.const_zero(); @@ -1894,10 +1772,8 @@ fn build_float_binop<'ctx>( .into_int_value(); let is_infinite = bd.new_build_not(is_finite, "negate"); - let struct_type = context.struct_type( - &[context.f64_type().into(), context.bool_type().into()], - false, - ); + let struct_type = + context.struct_type(&[float_type.into(), context.bool_type().into()], false); let struct_value = { let v1 = struct_type.const_zero(); @@ -1924,10 +1800,8 @@ fn build_float_binop<'ctx>( .into_int_value(); let is_infinite = bd.new_build_not(is_finite, "negate"); - let struct_type = context.struct_type( - &[context.f64_type().into(), context.bool_type().into()], - false, - ); + let struct_type = + context.struct_type(&[float_type.into(), context.bool_type().into()], false); let struct_value = { let v1 = struct_type.const_zero(); @@ -2179,6 +2053,54 @@ fn dec_unary_op<'ctx>( } } +fn dec_binary_op<'ctx>( + env: &Env<'_, 'ctx, '_>, + fn_name: &str, + dec1: BasicValueEnum<'ctx>, + dec2: BasicValueEnum<'ctx>, +) -> BasicValueEnum<'ctx> { + use roc_target::Architecture::*; + use roc_target::OperatingSystem::*; + + let dec1 = dec1.into_int_value(); + let dec2 = dec2.into_int_value(); + + match env.target_info { + TargetInfo { + architecture: X86_64 | X86_32, + operating_system: Unix, + } => { + let (low1, high1) = dec_split_into_words(env, dec1); + let (low2, high2) = dec_split_into_words(env, dec2); + let lowr_highr = call_bitcode_fn( + env, + &[low1.into(), high1.into(), low2.into(), high2.into()], + fn_name, + ); + + let block = env.builder.get_insert_block().expect("to be in a function"); + let parent = block.get_parent().expect("to be in a function"); + + let ptr = + create_entry_block_alloca(env, parent, env.context.i128_type().into(), "to_i128"); + env.builder.build_store(ptr, lowr_highr).unwrap(); + + env.builder + .build_load(env.context.i128_type(), ptr, "to_i128") + .unwrap() + } + TargetInfo { + architecture: Wasm32, + operating_system: Unix, + } => call_bitcode_fn(env, &[dec1.into(), dec2.into()], fn_name), + _ => call_bitcode_fn( + env, + &[dec_alloca(env, dec1), dec_alloca(env, dec2)], + fn_name, + ), + } +} + fn dec_binop_with_overflow<'ctx>( env: &Env<'_, 'ctx, '_>, fn_name: &str, @@ -2309,11 +2231,13 @@ fn build_dec_unary_op<'a, 'ctx>( _layout_interner: &STLayoutInterner<'a>, _parent: FunctionValue<'ctx>, arg: BasicValueEnum<'ctx>, - _return_layout: InLayout<'a>, + return_layout: InLayout<'a>, op: LowLevel, ) -> BasicValueEnum<'ctx> { use roc_module::low_level::LowLevel::*; + let int_width = || return_layout.to_int_width(); + match op { NumAbs => dec_unary_op(env, bitcode::DEC_ABS, arg), NumAcos => dec_unary_op(env, bitcode::DEC_ACOS, arg), @@ -2323,6 +2247,10 @@ fn build_dec_unary_op<'a, 'ctx>( NumSin => dec_unary_op(env, bitcode::DEC_SIN, arg), NumTan => dec_unary_op(env, bitcode::DEC_TAN, arg), + NumRound => dec_unary_op(env, &bitcode::DEC_ROUND[int_width()], arg), + NumFloor => dec_unary_op(env, &bitcode::DEC_FLOOR[int_width()], arg), + NumCeiling => dec_unary_op(env, &bitcode::DEC_CEILING[int_width()], arg), + _ => { unreachable!("Unrecognized dec unary operation: {:?}", op); } @@ -2391,6 +2319,7 @@ fn build_dec_binop<'a, 'ctx>( &[lhs, rhs], &bitcode::NUM_GREATER_THAN_OR_EQUAL[IntWidth::I128], ), + NumPow => dec_binary_op(env, bitcode::DEC_POW, lhs, rhs), _ => { unreachable!("Unrecognized dec binary operation: {:?}", op); } @@ -2804,42 +2733,39 @@ fn build_float_unary_op<'a, 'ctx>( LayoutRepr::Builtin(Builtin::Int(int_width)) => int_width, _ => internal_error!("Ceiling return layout is not int: {:?}", layout), }; - match float_width { - FloatWidth::F32 => { - call_bitcode_fn(env, &[arg.into()], &bitcode::NUM_CEILING_F32[int_width]) - } - FloatWidth::F64 => { - call_bitcode_fn(env, &[arg.into()], &bitcode::NUM_CEILING_F64[int_width]) - } - } + + let intrinsic = match float_width { + FloatWidth::F32 => &bitcode::NUM_CEILING_F32[int_width], + FloatWidth::F64 => &bitcode::NUM_CEILING_F64[int_width], + }; + + call_bitcode_fn(env, &[arg.into()], intrinsic) } NumFloor => { let int_width = match layout_interner.get_repr(layout) { LayoutRepr::Builtin(Builtin::Int(int_width)) => int_width, _ => internal_error!("Floor return layout is not int: {:?}", layout), }; - match float_width { - FloatWidth::F32 => { - call_bitcode_fn(env, &[arg.into()], &bitcode::NUM_FLOOR_F32[int_width]) - } - FloatWidth::F64 => { - call_bitcode_fn(env, &[arg.into()], &bitcode::NUM_FLOOR_F64[int_width]) - } - } + + let intrinsic = match float_width { + FloatWidth::F32 => &bitcode::NUM_FLOOR_F32[int_width], + FloatWidth::F64 => &bitcode::NUM_FLOOR_F64[int_width], + }; + + call_bitcode_fn(env, &[arg.into()], intrinsic) } NumRound => { let int_width = match layout_interner.get_repr(layout) { LayoutRepr::Builtin(Builtin::Int(int_width)) => int_width, _ => internal_error!("Round return layout is not int: {:?}", layout), }; - match float_width { - FloatWidth::F32 => { - call_bitcode_fn(env, &[arg.into()], &bitcode::NUM_ROUND_F32[int_width]) - } - FloatWidth::F64 => { - call_bitcode_fn(env, &[arg.into()], &bitcode::NUM_ROUND_F64[int_width]) - } - } + + let intrinsic = match float_width { + FloatWidth::F32 => &bitcode::NUM_ROUND_F32[int_width], + FloatWidth::F64 => &bitcode::NUM_ROUND_F64[int_width], + }; + + call_bitcode_fn(env, &[arg.into()], intrinsic) } NumIsNan => call_bitcode_fn(env, &[arg.into()], &bitcode::NUM_IS_NAN[float_width]), NumIsInfinite => { diff --git a/crates/compiler/gen_llvm/src/llvm/refcounting.rs b/crates/compiler/gen_llvm/src/llvm/refcounting.rs index 243520d3188..9320d250e97 100644 --- a/crates/compiler/gen_llvm/src/llvm/refcounting.rs +++ b/crates/compiler/gen_llvm/src/llvm/refcounting.rs @@ -1295,14 +1295,24 @@ fn build_rec_union_recursive_decrement<'a, 'ctx>( _ => tag_id, }; + let block = env.context.append_basic_block(parent, "tag_id_decrement"); + env.builder.position_at_end(block); + // if none of the fields are or contain anything refcounted, just move on if fields_need_no_refcounting(layout_interner, field_layouts) { - continue; - } + // Still make sure to decrement the refcount of the union as a whole. + if let DecOrReuse::Dec = decrement_or_reuse { + let union_layout = LayoutRepr::Union(union_layout); + refcount_ptr.modify(call_mode, union_layout, env, layout_interner); + } - let block = env.context.append_basic_block(parent, "tag_id_decrement"); + // this function returns void + builder.new_build_return(None); - env.builder.position_at_end(block); + cases.push((tag_id_int_type.const_int(tag_id as u64, false), block)); + + continue; + } let fields_struct = LayoutRepr::struct_(field_layouts); let wrapper_type = basic_type_from_layout(env, layout_interner, fields_struct); @@ -1370,12 +1380,9 @@ fn build_rec_union_recursive_decrement<'a, 'ctx>( // and store them on the stack, then modify (and potentially free) the current cell, then // actually inc/dec the fields. - match decrement_or_reuse { - DecOrReuse::Reuse => {} - DecOrReuse::Dec => { - let union_layout = LayoutRepr::Union(union_layout); - refcount_ptr.modify(call_mode, union_layout, env, layout_interner); - } + if let DecOrReuse::Dec = decrement_or_reuse { + let union_layout = LayoutRepr::Union(union_layout); + refcount_ptr.modify(call_mode, union_layout, env, layout_interner); } for (field, field_layout) in deferred_nonrec { diff --git a/crates/compiler/gen_llvm/src/llvm/struct_.rs b/crates/compiler/gen_llvm/src/llvm/struct_.rs index 0b46ad6df6c..caae11494f2 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()) +} + +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"); - BuildStruct { - struct_type, - struct_val, + 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>( diff --git a/crates/compiler/gen_llvm/src/run_roc.rs b/crates/compiler/gen_llvm/src/run_roc.rs index 1c8ffd56624..a0ed596e298 100644 --- a/crates/compiler/gen_llvm/src/run_roc.rs +++ b/crates/compiler/gen_llvm/src/run_roc.rs @@ -128,7 +128,7 @@ macro_rules! run_jit_function { Err((error_msg, _)) => { eprintln!("This Roc code crashed with: \"{error_msg}\""); - Expr::MalformedClosure + Expr::REPL_RUNTIME_CRASH } } }}; @@ -165,10 +165,10 @@ macro_rules! run_jit_function_dynamic_type { let result = Result::from(call_result); match result { - Ok(()) => $transform(output.add(CALL_RESULT_WIDTH) as usize), - Err((msg, _crash_tag)) => { - eprintln!("{}", msg); - panic!("Roc hit an error"); + Ok(()) => Some($transform(output.add(CALL_RESULT_WIDTH) as usize)), + Err((error_msg, _)) => { + eprintln!("This Roc code crashed with: \"{error_msg}\""); + None } } } diff --git a/crates/compiler/gen_wasm/.gitignore b/crates/compiler/gen_wasm/.gitignore deleted file mode 100644 index bd517f6c968..00000000000 --- a/crates/compiler/gen_wasm/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -*.wasm -*.wat -/notes.md -/tmp diff --git a/crates/compiler/gen_wasm/src/low_level.rs b/crates/compiler/gen_wasm/src/low_level.rs index dfbb8420af7..273df948fc3 100644 --- a/crates/compiler/gen_wasm/src/low_level.rs +++ b/crates/compiler/gen_wasm/src/low_level.rs @@ -185,7 +185,6 @@ impl<'a> LowLevelCall<'a> { match self.lowlevel { // Str StrConcat => self.load_args_and_call_zig(backend, bitcode::STR_CONCAT), - StrToScalars => self.load_args_and_call_zig(backend, bitcode::STR_TO_SCALARS), StrGetUnsafe => self.load_args_and_call_zig(backend, bitcode::STR_GET_UNSAFE), StrJoinWith => self.load_args_and_call_zig(backend, bitcode::STR_JOIN_WITH), StrIsEmpty => match backend.storage.get(&self.arguments[0]) { @@ -200,18 +199,11 @@ impl<'a> LowLevelCall<'a> { _ => internal_error!("invalid storage for Str"), }, StrStartsWith => self.load_args_and_call_zig(backend, bitcode::STR_STARTS_WITH), - StrStartsWithScalar => { - self.load_args_and_call_zig(backend, bitcode::STR_STARTS_WITH_SCALAR) - } StrEndsWith => self.load_args_and_call_zig(backend, bitcode::STR_ENDS_WITH), StrSplit => self.load_args_and_call_zig(backend, bitcode::STR_SPLIT), - StrCountGraphemes => { - self.load_args_and_call_zig(backend, bitcode::STR_COUNT_GRAPEHEME_CLUSTERS) - } StrCountUtf8Bytes => { self.load_args_and_call_zig(backend, bitcode::STR_COUNT_UTF8_BYTES) } - StrGetCapacity => self.load_args_and_call_zig(backend, bitcode::STR_CAPACITY), StrToNum => { let number_layout = match backend.layout_interner.get_repr(self.ret_layout) { LayoutRepr::Struct(field_layouts) => field_layouts[0], @@ -263,16 +255,11 @@ impl<'a> LowLevelCall<'a> { self.load_args_and_call_zig(backend, bitcode::STR_RELEASE_EXCESS_CAPACITY) } StrRepeat => self.load_args_and_call_zig(backend, bitcode::STR_REPEAT), - StrAppendScalar => self.load_args_and_call_zig(backend, bitcode::STR_APPEND_SCALAR), StrTrim => self.load_args_and_call_zig(backend, bitcode::STR_TRIM), - StrGetScalarUnsafe => { - self.load_args_and_call_zig(backend, bitcode::STR_GET_SCALAR_UNSAFE) - } StrSubstringUnsafe => { self.load_args_and_call_zig(backend, bitcode::STR_SUBSTRING_UNSAFE) } StrWithCapacity => self.load_args_and_call_zig(backend, bitcode::STR_WITH_CAPACITY), - StrGraphemes => self.load_args_and_call_zig(backend, bitcode::STR_GRAPHEMES), // List ListLen => match backend.storage.get(&self.arguments[0]) { @@ -299,6 +286,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") } @@ -1575,6 +1584,10 @@ impl<'a> LowLevelCall<'a> { LayoutRepr::Builtin(Builtin::Float(width)) => { self.load_args_and_call_zig(backend, &bitcode::NUM_POW[width]); } + LayoutRepr::Builtin(Builtin::Decimal) => { + self.load_args_and_call_zig(backend, bitcode::DEC_POW); + } + _ => panic_ret_type(), }, @@ -1626,6 +1639,7 @@ impl<'a> LowLevelCall<'a> { match arg_type { F32 => self.load_args_and_call_zig(backend, &bitcode::NUM_ROUND_F32[width]), F64 => self.load_args_and_call_zig(backend, &bitcode::NUM_ROUND_F64[width]), + Decimal => self.load_args_and_call_zig(backend, &bitcode::DEC_ROUND[width]), _ => internal_error!("Invalid argument type for round: {:?}", arg_type), } } @@ -1633,6 +1647,14 @@ impl<'a> LowLevelCall<'a> { self.load_args(backend); let arg_type = CodeGenNumType::for_symbol(backend, self.arguments[0]); let ret_type = CodeGenNumType::from(self.ret_layout); + + let width = match ret_type { + CodeGenNumType::I32 => IntWidth::I32, + CodeGenNumType::I64 => IntWidth::I64, + CodeGenNumType::I128 => todo!("{:?} for I128", self.lowlevel), + _ => internal_error!("Invalid return type for round: {:?}", ret_type), + }; + match (arg_type, self.lowlevel) { (F32, NumCeiling) => { backend.code_builder.f32_ceil(); @@ -1640,14 +1662,21 @@ impl<'a> LowLevelCall<'a> { (F64, NumCeiling) => { backend.code_builder.f64_ceil(); } + (Decimal, NumCeiling) => { + return self.load_args_and_call_zig(backend, &bitcode::DEC_CEILING[width]); + } (F32, NumFloor) => { backend.code_builder.f32_floor(); } (F64, NumFloor) => { backend.code_builder.f64_floor(); } + (Decimal, NumFloor) => { + return self.load_args_and_call_zig(backend, &bitcode::DEC_FLOOR[width]); + } _ => internal_error!("Invalid argument type for ceiling: {:?}", arg_type), } + match (ret_type, arg_type) { // TODO: unsigned truncation (I32, F32) => backend.code_builder.i32_trunc_s_f32(), diff --git a/crates/compiler/gen_wasm/src/wasm32_sized.rs b/crates/compiler/gen_wasm/src/wasm32_sized.rs index 05ac6d95ec7..4332a26d183 100644 --- a/crates/compiler/gen_wasm/src/wasm32_sized.rs +++ b/crates/compiler/gen_wasm/src/wasm32_sized.rs @@ -22,8 +22,21 @@ macro_rules! wasm32_sized_primitive { } } -wasm32_sized_primitive!(u8, i8, u16, i16, u32, i32, char, u64, i64, u128, i128, f32, f64, bool,); -wasm32_sized_primitive!(RocDec, RocOrder, I128, U128,); +wasm32_sized_primitive!(u8, i8, u16, i16, u32, i32, char, u64, i64, f32, f64, bool,); +wasm32_sized_primitive!(RocOrder,); + +macro_rules! wasm32_16byte_aligned8 { + ($($type_name:ident ,)+) => { + $( + impl Wasm32Sized for $type_name { + const SIZE_OF_WASM: usize = 16; + const ALIGN_OF_WASM: usize = 8; + } + )* + } +} + +wasm32_16byte_aligned8!(i128, u128, I128, U128, RocDec,); impl Wasm32Sized for () { const SIZE_OF_WASM: usize = 0; @@ -75,19 +88,36 @@ impl Wasm32Sized for isize { const ALIGN_OF_WASM: usize = 4; } +const fn next_multiple_of(lhs: usize, rhs: usize) -> usize { + if lhs == 0 { + return lhs; + } + + match lhs % rhs { + 0 => lhs, + r => lhs + (rhs - r), + } +} + impl Wasm32Sized for (T, U) { - const SIZE_OF_WASM: usize = T::SIZE_OF_WASM + U::SIZE_OF_WASM; + const SIZE_OF_WASM: usize = + next_multiple_of(T::SIZE_OF_WASM + U::SIZE_OF_WASM, Self::ALIGN_OF_WASM); const ALIGN_OF_WASM: usize = max(&[T::ALIGN_OF_WASM, U::ALIGN_OF_WASM]); } impl Wasm32Sized for (T, U, V) { - const SIZE_OF_WASM: usize = T::SIZE_OF_WASM + U::SIZE_OF_WASM + V::SIZE_OF_WASM; + const SIZE_OF_WASM: usize = next_multiple_of( + T::SIZE_OF_WASM + U::SIZE_OF_WASM + V::SIZE_OF_WASM, + Self::ALIGN_OF_WASM, + ); const ALIGN_OF_WASM: usize = max(&[T::ALIGN_OF_WASM, U::ALIGN_OF_WASM, V::ALIGN_OF_WASM]); } impl Wasm32Sized for (T, U, V, W) { - const SIZE_OF_WASM: usize = - T::SIZE_OF_WASM + U::SIZE_OF_WASM + V::SIZE_OF_WASM + W::SIZE_OF_WASM; + const SIZE_OF_WASM: usize = next_multiple_of( + T::SIZE_OF_WASM + U::SIZE_OF_WASM + V::SIZE_OF_WASM + W::SIZE_OF_WASM, + Self::ALIGN_OF_WASM, + ); const ALIGN_OF_WASM: usize = max(&[ T::ALIGN_OF_WASM, U::ALIGN_OF_WASM, diff --git a/crates/compiler/load/Cargo.toml b/crates/compiler/load/Cargo.toml index 477c96c5ea8..b55099dabbb 100644 --- a/crates/compiler/load/Cargo.toml +++ b/crates/compiler/load/Cargo.toml @@ -29,11 +29,8 @@ roc_reporting = { path = "../../reporting" } roc_solve = { path = "../solve" } roc_target = { path = "../roc_target" } roc_error_macros = { path = "../../error_macros" } - -bumpalo.workspace = true - -[target.'cfg(not(windows))'.build-dependencies] roc_load_internal = { path = "../load_internal" } +bumpalo.workspace = true [dev-dependencies] roc_constrain = { path = "../constrain" } diff --git a/crates/compiler/load/build.rs b/crates/compiler/load/build.rs index bb963c50b48..8a17a04df11 100644 --- a/crates/compiler/load/build.rs +++ b/crates/compiler/load/build.rs @@ -1,6 +1,5 @@ use std::path::{Path, PathBuf}; -#[cfg(not(windows))] use bumpalo::Bump; use roc_error_macros::internal_error; use roc_module::symbol::ModuleId; @@ -47,19 +46,11 @@ fn write_subs_for_module(module_id: ModuleId, filename: &str) { output_path.extend([filename]); output_path.set_extension("dat"); - #[cfg(not(windows))] if SKIP_SUBS_CACHE { write_types_for_module_dummy(&output_path) } else { write_types_for_module_real(module_id, filename, &output_path) } - - #[cfg(windows)] - { - let _ = SKIP_SUBS_CACHE; - let _ = module_id; - write_types_for_module_dummy(&output_path) - } } fn write_types_for_module_dummy(output_path: &Path) { @@ -67,7 +58,6 @@ fn write_types_for_module_dummy(output_path: &Path) { std::fs::write(output_path, []).unwrap(); } -#[cfg(not(windows))] fn write_types_for_module_real(module_id: ModuleId, filename: &str, output_path: &Path) { use roc_can::module::TypeState; use roc_load_internal::file::{LoadingProblem, Threading}; diff --git a/crates/compiler/load/src/lib.rs b/crates/compiler/load/src/lib.rs index b1dc5665be9..58ec0ddfe22 100644 --- a/crates/compiler/load/src/lib.rs +++ b/crates/compiler/load/src/lib.rs @@ -247,7 +247,7 @@ fn read_cached_types() -> MutMap { // Wasm seems to re-order definitions between build time and runtime, but only in release mode. // That is very strange, but we can solve it separately - if !cfg!(target_family = "wasm") && !cfg!(windows) && !SKIP_SUBS_CACHE { + if !cfg!(target_family = "wasm") && !SKIP_SUBS_CACHE { output.insert(ModuleId::BOOL, deserialize_help(mod_bool)); output.insert(ModuleId::RESULT, deserialize_help(mod_result)); diff --git a/crates/compiler/load/tests/test_reporting.rs b/crates/compiler/load/tests/test_reporting.rs index 331eee480b3..27eda970143 100644 --- a/crates/compiler/load/tests/test_reporting.rs +++ b/crates/compiler/load/tests/test_reporting.rs @@ -475,12 +475,12 @@ mod test_reporting { test_report!( value_not_exposed, indoc!( - r#" + r" List.isempty 1 2 - "# + " ), - @r###" - ── NOT EXPOSED ─────────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── NOT EXPOSED in /code/proj/Main.roc ────────────────────────────────────────── The List module does not expose `isempty`: @@ -493,21 +493,21 @@ mod test_reporting { List.set List.get List.keepIf - "### + " ); test_report!( report_unused_def, indoc!( - r#" + r" x = 1 y = 2 x - "# + " ), - @r###" - ── UNUSED DEFINITION ───────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── UNUSED DEFINITION in /code/proj/Main.roc ──────────────────────────────────── `y` is not used anywhere in your code. @@ -516,23 +516,23 @@ mod test_reporting { If you didn't intend on using `y` then remove it so future readers of your code don't wonder why it is there. - "### + " ); test_report!( report_shadowing, indoc!( - r#" + r" i = 1 s = \i -> i + 1 s i - "# + " ), - @r###" - ── DUPLICATE NAME ──────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── DUPLICATE NAME in /code/proj/Main.roc ─────────────────────────────────────── The `i` name is first defined here: @@ -546,13 +546,13 @@ mod test_reporting { Since these variables have the same name, it's easy to use the wrong one by accident. Give one of them a new name. - "### + " ); test_report!( report_shadowing_in_annotation, indoc!( - r#" + r" Booly : [Yes, No] Booly : [Yes, No, Maybe] @@ -561,10 +561,10 @@ mod test_reporting { x = [] x - "# + " ), - @r###" - ── DUPLICATE NAME ──────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── DUPLICATE NAME in /code/proj/Main.roc ─────────────────────────────────────── The `Booly` name is first defined here: @@ -578,13 +578,13 @@ mod test_reporting { Since these aliases have the same name, it's easy to use the wrong one by accident. Give one of them a new name. - "### + " ); test_report!( report_precedence_problem_single_line, indoc!( - r#"x = 1 + r"x = 1 y = if selectedId != thisId == adminsId then 4 @@ -593,17 +593,17 @@ mod test_reporting { 5 { x, y } - "# + " ), - @r###" - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── SYNTAX PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── Using != and == together requires parentheses, to clarify how they should be grouped. 6│ if selectedId != thisId == adminsId then ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - "### + " ); test_report!( @@ -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. @@ -644,12 +644,12 @@ mod test_reporting { test_report!( lowercase_primitive_tag_bool, indoc!( - r#" + r" if true then 1 else 2 - "# + " ), - @r###" - ── UNRECOGNIZED NAME ───────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── UNRECOGNIZED NAME in /code/proj/Main.roc ──────────────────────────────────── Nothing is named `true` in this scope. @@ -662,13 +662,13 @@ mod test_reporting { Num Str Err - "### + " ); test_report!( report_precedence_problem_multiline, indoc!( - r#" + r" if 1 == 2 @@ -678,10 +678,10 @@ mod test_reporting { else 3 - "# + " ), - @r###" - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── SYNTAX PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── Using more than one == like this requires parentheses, to clarify how things should be grouped. @@ -689,7 +689,7 @@ mod test_reporting { 5│> 1 6│> == 2 7│> == 3 - "### + " ); test_report!( @@ -706,8 +706,8 @@ mod test_reporting { box "wizard" [] "# ), - @r###" - ── UNUSED ARGUMENT ─────────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── 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. @@ -729,17 +729,17 @@ mod test_reporting { If you didn't intend on using `y` then remove it so future readers of your code don't wonder why it is there. - "### + "# ); #[test] fn report_value_color() { let src: &str = indoc!( - r#" + r" activityIndicatorLarge = div view activityIndicatorLarge - "# + " ); let arena = Bump::new(); @@ -765,12 +765,12 @@ mod test_reporting { #[test] fn report_module_color() { let src: &str = indoc!( - r#" + r" x = 1 y = 2 x - "# + " ); let arena = Bump::new(); @@ -795,16 +795,16 @@ mod test_reporting { fn report_region_in_color() { color_report_problem_as( indoc!( - r#" + r" isDisabled = \user -> user.isAdmin theAdmin |> isDisabled - "# + " ), indoc!( - r#" - ── UNRECOGNIZED NAME ───────────────────────────────────── /code/proj/Main.roc ─ + r" + ── UNRECOGNIZED NAME in /code/proj/Main.roc ──────────────────────────────────── Nothing is named `theAdmin` in this scope. @@ -817,7 +817,7 @@ mod test_reporting { List Err Box - "# + " ), ); } @@ -829,8 +829,8 @@ mod test_reporting { if "foo" then 2 else 3 "# ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This `if` condition needs to be a Bool: @@ -843,20 +843,20 @@ mod test_reporting { But I need every `if` condition to evaluate to a Bool—either `Bool.true` or `Bool.false`. - "### + "# ); test_report!( when_if_guard, indoc!( - r#" + r" when 1 is 2 if 1 -> 0x0 _ -> 0x1 - "# + " ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This `if` guard condition needs to be a Bool: @@ -870,7 +870,7 @@ mod test_reporting { But I need every `if` guard condition to evaluate to a Bool—either `Bool.true` or `Bool.false`. - "### + " ); test_report!( @@ -880,8 +880,8 @@ mod test_reporting { if Bool.true then 2 else "foo" "# ), - @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: @@ -897,7 +897,7 @@ mod test_reporting { Num * All branches in an `if` must have the same type! - "### + "# ); test_report!( @@ -907,8 +907,8 @@ mod test_reporting { if Bool.true then 2 else if Bool.false then 2 else "foo" "# ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── The 3rd branch of this `if` does not match all the previous branches: @@ -924,7 +924,7 @@ mod test_reporting { Num * All branches in an `if` must have the same type! - "### + "# ); test_report!( @@ -937,8 +937,8 @@ mod test_reporting { _ -> "" "# ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── The 2nd branch of this `when` does not match all the previous branches: @@ -956,7 +956,7 @@ mod test_reporting { Str All branches of a `when` must have the same type! - "### + "# ); test_report!( @@ -975,8 +975,8 @@ mod test_reporting { #(Red, Red) -> "foo" "# ), - @r###" - ── UNSAFE PATTERN ──────────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── UNSAFE PATTERN in /code/proj/Main.roc ─────────────────────────────────────── This `when` does not cover all the possibilities: @@ -990,7 +990,7 @@ mod test_reporting { ( Red, Red ) I would have to crash if I saw one of those! Add branches for them! - "### + "# ); test_report!( @@ -1019,8 +1019,8 @@ mod test_reporting { [1, 3, "foo"] "# ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This list contains elements with different types: @@ -1036,18 +1036,18 @@ mod test_reporting { Num * Every element in a list must have the same type! - "### + "# ); test_report!( unwrap_num_elem_in_list, indoc!( - r#" + r" [1, 2.2, 0x3] - "# + " ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This list contains elements with different types: @@ -1066,7 +1066,7 @@ mod test_reporting { Tip: You can convert between integers and fractions using functions like `Num.toFrac` and `Num.round`. - "### + " ); test_report!( @@ -1079,8 +1079,8 @@ mod test_reporting { { x & foo: "bar" } "# ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── I cannot update the `.foo` field like this: @@ -1097,20 +1097,20 @@ mod test_reporting { Record update syntax does not allow you to change the type of fields. You can achieve that with record literal syntax. - "### + "# ); test_report!( circular_type, indoc!( - r#" + r" f = \g -> g g f - "# + " ), - @r###" - ── CIRCULAR TYPE ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── CIRCULAR TYPE in /code/proj/Main.roc ──────────────────────────────────────── I'm inferring a weird self-referential type for `f`: @@ -1122,20 +1122,20 @@ mod test_reporting { infinitely. (∞ -> a) -> a - "### + " ); test_report!( polymorphic_recursion, indoc!( - r#" + r" f = \x -> f [x] f - "# + " ), - @r###" - ── CIRCULAR TYPE ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── CIRCULAR TYPE in /code/proj/Main.roc ──────────────────────────────────────── I'm inferring a weird self-referential type for `f`: @@ -1147,21 +1147,21 @@ mod test_reporting { infinitely. List ∞ -> * - "### + " ); test_report!( polymorphic_mutual_recursion, indoc!( - r#" + r" f = \x -> g x g = \x -> f [x] f - "# + " ), - @r###" - ── CIRCULAR TYPE ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── 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`: @@ -1186,22 +1186,22 @@ mod test_reporting { infinitely. List ∞ -> * - "### + " ); test_report!( polymorphic_mutual_recursion_annotated, indoc!( - r#" + r" f : a -> List a f = \x -> g x g = \x -> f [x] f - "# + " ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This expression is used in an unexpected way: @@ -1221,23 +1221,23 @@ mod test_reporting { it will only produce a `List` value of a single specific type. Maybe change the type annotation to be more specific? Maybe change the code to be more general? - "### + " ); test_report!( polymorphic_mutual_recursion_dually_annotated_lie, indoc!( - r#" + r" f : a -> List a f = \x -> g x g : b -> List b g = \x -> f [x] f - "# + " ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This expression is used in an unexpected way: @@ -1257,21 +1257,21 @@ mod test_reporting { it will only produce a `List` value of a single specific type. Maybe change the type annotation to be more specific? Maybe change the code to be more general? - "### + " ); test_report!( polymorphic_recursion_inference_var, indoc!( - r#" + r" f : _ f = \x -> f [x] f - "# + " ), - @r###" - ── CIRCULAR TYPE ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── CIRCULAR TYPE in /code/proj/Main.roc ──────────────────────────────────────── I'm inferring a weird self-referential type for `f`: @@ -1283,21 +1283,21 @@ mod test_reporting { infinitely. List ∞ -> * - "### + " ); test_report!( polymorphic_recursion_with_deep_inference_var, indoc!( - r#" + r" f : _ -> List _ f = \x -> f [x] f - "# + " ), - @r###" - ── CIRCULAR TYPE ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── CIRCULAR TYPE in /code/proj/Main.roc ──────────────────────────────────────── I'm inferring a weird self-referential type for `f`: @@ -1309,19 +1309,19 @@ mod test_reporting { infinitely. List ∞ -> List * - "### + " ); test_report!( mutual_polymorphic_recursion_with_inference_var, indoc!( - r#" + r" f : _ -> List _ f = \x -> g x g = \x -> f [x] f - "# + " ), // TODO: the second error is duplicated because when solving `f : _ -> List _`, we // introduce the variable for `f` twice: once to solve `f` without generalization, @@ -1334,8 +1334,8 @@ mod test_reporting { // variables they can put themselves in, and to run the constraint algorithm // against that extra variable, rather than possibly having to translate a `Type` // again. - @r###" - ── CIRCULAR TYPE ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── 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`: @@ -1360,22 +1360,22 @@ mod test_reporting { infinitely. List ∞ -> List * - "### + " ); test_report!( mutual_polymorphic_recursion_with_inference_var_second, indoc!( - r#" + r" f = \x -> g x g : _ -> List _ g = \x -> f [x] f - "# + " ), - @r###" - ── CIRCULAR TYPE ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── 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`: @@ -1400,23 +1400,23 @@ mod test_reporting { infinitely. List ∞ -> List * - "### + " ); test_report!( record_field_mismatch, indoc!( - r#" + r" bar = { bar : 0x3 } f : { foo : Num.Int * } -> [Yes, No] f = \_ -> Yes f bar - "# + " ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This 1st argument to `f` has an unexpected type: @@ -1436,21 +1436,21 @@ mod test_reporting { Tip: Can more type annotations be added? Type annotations always help me give more specific messages, and I think they could help a lot in this case - "### + " ); test_report!( tag_mismatch, indoc!( - r#" + r" f : [Red, Green] -> [Yes, No] f = \_ -> Yes f Blue - "# + " ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This 1st argument to `f` has an unexpected type: @@ -1473,7 +1473,7 @@ mod test_reporting { Tip: Can more type annotations be added? Type annotations always help me give more specific messages, and I think they could help a lot in this case - "### + " ); test_report!( @@ -1486,8 +1486,8 @@ mod test_reporting { f (Blue 3.14) "# ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This 1st argument to `f` has an unexpected type: @@ -1510,21 +1510,21 @@ mod test_reporting { Tip: Can more type annotations be added? Type annotations always help me give more specific messages, and I think they could help a lot in this case - "### + " ); test_report!( from_annotation_if, indoc!( - r#" + r" x : Num.Int * x = if Bool.true then 3.14 else 4 x - "# + " ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the `then` branch of this `if` expression: @@ -1542,23 +1542,23 @@ mod test_reporting { Tip: You can convert between integers and fractions using functions like `Num.toFrac` and `Num.round`. - "### + " ); test_report!( from_annotation_when, indoc!( - r#" + r" x : Num.Int * x = when True is _ -> 3.14 x - "# + " ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the body of the `x` definition: @@ -1577,21 +1577,21 @@ mod test_reporting { Tip: You can convert between integers and fractions using functions like `Num.toFrac` and `Num.round`. - "### + " ); test_report!( from_annotation_function, indoc!( - r#" + r" x : Num.Int * -> Num.Int * x = \_ -> 3.14 x - "# + " ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the body of the `x` definition: @@ -1609,21 +1609,21 @@ mod test_reporting { Tip: You can convert between integers and fractions using functions like `Num.toFrac` and `Num.round`. - "### + " ); test_report!( fncall_value, indoc!( - r#" + r" x : Num.I64 x = 42 x 3 - "# + " ), - @r###" - ── TOO MANY ARGS ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TOO MANY ARGS in /code/proj/Main.roc ──────────────────────────────────────── The `x` value is not a function, but it was given 1 argument: @@ -1631,21 +1631,21 @@ mod test_reporting { ^ Are there any missing commas? Or missing parentheses? - "### + " ); test_report!( fncall_overapplied, indoc!( - r#" + r" f : Num.I64 -> Num.I64 f = \_ -> 42 f 1 2 - "# + " ), - @r###" - ── TOO MANY ARGS ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TOO MANY ARGS in /code/proj/Main.roc ──────────────────────────────────────── The `f` function expects 1 argument, but it got 2 instead: @@ -1653,21 +1653,21 @@ mod test_reporting { ^ Are there any missing commas? Or missing parentheses? - "### + " ); test_report!( fncall_underapplied, indoc!( - r#" + r" f : Num.I64, Num.I64 -> Num.I64 f = \_, _ -> 42 f 1 - "# + " ), - @r###" - ── TOO FEW ARGS ────────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TOO FEW ARGS in /code/proj/Main.roc ───────────────────────────────────────── The `f` function expects 2 arguments, but it got only 1: @@ -1676,19 +1676,19 @@ mod test_reporting { Roc does not allow functions to be partially applied. Use a closure to make partial application explicit. - "### + " ); test_report!( pattern_when_condition, indoc!( - r#" + r" when 1 is {} -> 42 - "# + " ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── The branches of this `when` expression don't match the condition: @@ -1704,20 +1704,20 @@ mod test_reporting { {}a The branches must be cases of the `when` condition's type! - "### + " ); test_report!( pattern_when_pattern, indoc!( - r#" + r" when 1 is 2 -> 3 {} -> 42 - "# + " ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── The 2nd pattern in this `when` does not match the previous ones: @@ -1731,19 +1731,19 @@ mod test_reporting { But all the previous branches match: Num * - "### + " ); test_report!( pattern_guard_mismatch_alias, indoc!( - r#" + r" when { foo: 1 } is { foo: True } -> 42 - "# + " ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── The branches of this `when` expression don't match the condition: @@ -1759,7 +1759,7 @@ mod test_reporting { { foo : [True] } The branches must be cases of the `when` condition's type! - "### + " ); test_report!( @@ -1770,8 +1770,8 @@ mod test_reporting { { foo: True } -> 42 "# ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── The branches of this `when` expression don't match the condition: @@ -1787,20 +1787,20 @@ mod test_reporting { { foo : [True] } The branches must be cases of the `when` condition's type! - "### + "# ); // needs some improvement, but the principle works test_report!( pattern_guard_does_not_bind_label, indoc!( - r#" + r" when { foo: 1 } is { foo: _ } -> foo - "# + " ), - @r###" - ── UNRECOGNIZED NAME ───────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── UNRECOGNIZED NAME in /code/proj/Main.roc ──────────────────────────────────── Nothing is named `foo` in this scope. @@ -1813,19 +1813,19 @@ mod test_reporting { Bool U8 F64 - "### + " ); test_report! { pattern_guard_can_be_shadowed_above, indoc!( - r#" + r" foo = 3 when { foo: 1 } is { foo: 2 } -> foo _ -> foo - "# + " ), @"" // should give no error } @@ -1833,14 +1833,14 @@ mod test_reporting { test_report! { pattern_guard_can_be_shadowed_below, indoc!( - r#" + r" when { foo: 1 } is { foo: 2 } -> foo = 3 foo _ -> 3 - "# + " ), // should give no error @"" @@ -1849,14 +1849,14 @@ mod test_reporting { test_report!( pattern_or_pattern_mismatch, indoc!( - r#" + r" when { foo: 1 } is {} | 1 -> 3 - "# + " ), // Just putting this here. We should probably handle or-patterns better - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── The 2nd pattern in this branch does not match the previous ones: @@ -1870,21 +1870,21 @@ mod test_reporting { But all the previous branches match: {}a - "### + " ); test_report!( pattern_let_mismatch, indoc!( - r#" + r" (Foo x) = 42 x - "# + " ), // Maybe this should specifically say the pattern doesn't work? - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This expression is used in an unexpected way: @@ -1898,21 +1898,21 @@ mod test_reporting { But you are trying to use it as: [Foo *] - "### + " ); test_report!( from_annotation_complex_pattern, indoc!( - r#" + r" { x } : { x : Num.Int * } { x } = { x: 4.0 } x - "# + " ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the body of this definition: @@ -1930,20 +1930,20 @@ mod test_reporting { Tip: You can convert between integers and fractions using functions like `Num.toFrac` and `Num.round`. - "### + " ); test_report!( malformed_int_pattern, indoc!( - r#" + r" when 1 is 100A -> 3 _ -> 4 - "# + " ), - @r###" - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── SYNTAX PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── This integer pattern is malformed: @@ -1951,20 +1951,20 @@ mod test_reporting { ^^^^ Tip: Learn more about number literals at TODO - "### + " ); test_report!( malformed_float_pattern, indoc!( - r#" + r" when 1 is 2.X -> 3 _ -> 4 - "# + " ), - @r###" - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── SYNTAX PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── This float pattern is malformed: @@ -1972,20 +1972,20 @@ mod test_reporting { ^^^ Tip: Learn more about number literals at TODO - "### + " ); test_report!( malformed_hex_pattern, indoc!( - r#" + r" when 1 is 0xZ -> 3 _ -> 4 - "# + " ), - @r###" - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── SYNTAX PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── This hex integer pattern is malformed: @@ -1993,20 +1993,20 @@ mod test_reporting { ^^^ Tip: Learn more about number literals at TODO - "### + " ); test_report!( malformed_oct_pattern, indoc!( - r#" + r" when 1 is 0o9 -> 3 _ -> 4 - "# + " ), - @r###" - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── SYNTAX PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── This octal integer pattern is malformed: @@ -2014,20 +2014,20 @@ mod test_reporting { ^^^ Tip: Learn more about number literals at TODO - "### + " ); test_report!( malformed_bin_pattern, indoc!( - r#" + r" when 1 is 0b4 -> 3 _ -> 4 - "# + " ), - @r###" - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── SYNTAX PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── This binary integer pattern is malformed: @@ -2035,21 +2035,21 @@ mod test_reporting { ^^^ Tip: Learn more about number literals at TODO - "### + " ); test_report!( missing_fields, indoc!( - r#" + r" x : { a : Num.Int *, b : Num.Frac *, c : Str } x = { b: 4.0 } x - "# + " ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the body of the `x` definition: @@ -2070,7 +2070,7 @@ mod test_reporting { } Tip: Looks like the c and a fields are missing. - "### + " ); // this previously reported the message below, not sure which is better @@ -2091,15 +2091,15 @@ mod test_reporting { test_report!( bad_double_rigid, indoc!( - r#" + r" f : a, b -> a f = \x, y -> if Bool.true then x else y f - "# + " ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the `else` branch of this `if` expression: @@ -2119,21 +2119,21 @@ mod test_reporting { Your code seems to be saying they are the same though. Maybe they should be the same in your type annotation? Maybe your code uses them in a weird way? - "### + " ); test_report!( bad_rigid_function, indoc!( - r#" + r" f : Str -> msg f = \_ -> Foo f - "# + " ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the body of the `f` definition: @@ -2154,21 +2154,21 @@ mod test_reporting { it will only produce a tag value of a single specific type. Maybe change the type annotation to be more specific? Maybe change the code to be more general? - "### + " ); test_report!( bad_rigid_value, indoc!( - r#" + r" f : msg f = 0x3 f - "# + " ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the body of the `f` definition: @@ -2189,22 +2189,22 @@ mod test_reporting { it will only produce a `Int` value of a single specific type. Maybe change the type annotation to be more specific? Maybe change the code to be more general? - "### + " ); // TODO improve tag suggestions test_report!( typo_lowercase_ok, indoc!( - r#" + r" f : Str -> [Ok Num.I64, InvalidFoo] f = \_ -> ok 4 f - "# + " ), - @r###" - ── UNRECOGNIZED NAME ───────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── UNRECOGNIZED NAME in /code/proj/Main.roc ──────────────────────────────────── Nothing is named `ok` in this scope. @@ -2217,14 +2217,14 @@ mod test_reporting { U8 Box Eq - "### + " ); // these error messages seem pretty helpful test_report!( typo_uppercase_ok, indoc!( - r#" + r" f : Str -> Num.I64 f = \_ -> ok = 3 @@ -2232,10 +2232,10 @@ mod test_reporting { Ok f - "# + " ), - @r###" - ── UNUSED DEFINITION ───────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── 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: @@ -2263,21 +2263,21 @@ mod test_reporting { But the type annotation on `f` says it should be: I64 - "### + " ); // invalid recursion test_report!( circular_definition_self, indoc!( - r#" + r" f = f f - "# + " ), - @r###" - ── CIRCULAR DEFINITION ─────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── CIRCULAR DEFINITION in /code/proj/Main.roc ────────────────────────────────── `f` is defined directly in terms of itself: @@ -2288,23 +2288,23 @@ mod test_reporting { infinite loop! Hint: Did you mean to define `f` as a function? - "### + " ); // invalid mutual recursion test_report!( circular_definition, indoc!( - r#" + r" foo = bar bar = foo foo - "# + " ), - @r###" - ── CIRCULAR DEFINITION ─────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── CIRCULAR DEFINITION in /code/proj/Main.roc ────────────────────────────────── The `foo` definition is causing a very tricky infinite loop: @@ -2319,20 +2319,20 @@ mod test_reporting { │ ↓ │ bar └─────┘ - "### + " ); test_report!( update_empty_record, indoc!( - r#" + r" x = {} { x & foo: 3 } - "# + " ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This `x` record doesn’t have a `foo` field: @@ -2340,21 +2340,21 @@ mod test_reporting { ^^^^^^ In fact, `x` is a record with no fields at all! - "### + " ); test_report!( update_record, indoc!( - r#" + r" x = { fo: 3, bar: 4 } { x & foo: 3 } - "# + " ), // TODO also suggest fields with the correct type - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This `x` record doesn’t have a `foo` field: @@ -2369,13 +2369,13 @@ mod test_reporting { } Maybe `foo:` should be `fo:` instead? - "### + " ); test_report!( update_record_ext, indoc!( - r#" + r" f : { fo: Num.I64 }ext -> Num.I64 f = \r -> r2 = { r & foo: r.fo } @@ -2383,11 +2383,11 @@ mod test_reporting { r2.fo f - "# + " ), // TODO also suggest fields with the correct type - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This `r` record doesn’t have a `foo` field: @@ -2401,21 +2401,21 @@ mod test_reporting { }ext Maybe `foo:` should be `fo:` instead? - "### + " ); test_report!( update_record_snippet, indoc!( - r#" + r" x = { fo: 3, bar: 4, baz: 3, spam: 42, foobar: 3 } { x & foo: 3 } - "# + " ), // TODO also suggest fields with the correct type - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This `x` record doesn’t have a `foo` field: @@ -2433,7 +2433,7 @@ mod test_reporting { } Maybe `foo:` should be `fo:` instead? - "### + " ); test_report!( @@ -2444,8 +2444,8 @@ mod test_reporting { "# ), // TODO also suggest fields with the correct type - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This 2nd argument to + has an unexpected type: @@ -2459,18 +2459,18 @@ mod test_reporting { But + needs its 2nd argument to be: Int * - "### + "# ); test_report!( int_frac, indoc!( - r#" + r" 0x4 + 3.14 - "# + " ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This 2nd argument to + has an unexpected type: @@ -2487,18 +2487,18 @@ mod test_reporting { Tip: You can convert between integers and fractions using functions like `Num.toFrac` and `Num.round`. - "### + " ); test_report!( boolean_tag, indoc!( - r#" + r" 42 + True - "# + " ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This 2nd argument to + has an unexpected type: @@ -2512,21 +2512,21 @@ mod test_reporting { But + needs its 2nd argument to be: Num * - "### + " ); test_report!( tag_missing, indoc!( - r#" + r" f : [A] -> [A, B] f = \a -> a f - "# + " ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the body of the `f` definition: @@ -2546,21 +2546,21 @@ mod test_reporting { Tip: Closed tag unions can't grow, because that might change the size in memory. Can you use an open tag union? - "### + " ); test_report!( tags_missing, indoc!( - r#" + r" f : [A] -> [A, B, C] f = \a -> a f - "# + " ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the body of the `f` definition: @@ -2584,13 +2584,13 @@ mod test_reporting { Tip: Closed tag unions can't grow, because that might change the size in memory. Can you use an open tag union? - "### + " ); test_report!( patterns_fn_not_exhaustive, indoc!( - r#" + r" Either : [Left {}, Right Str] x : Either @@ -2600,10 +2600,10 @@ mod test_reporting { f = \Left v -> v f x - "# + " ), - @r###" - ── UNSAFE PATTERN ──────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── 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: @@ -2638,13 +2638,13 @@ mod test_reporting { Tip: Closed tag unions can't grow, because that might change the size in memory. Can you use an open tag union? - "### + " ); test_report!( patterns_let_not_exhaustive, indoc!( - r#" + r" x : [Left {}, Right Str] x = Left {} @@ -2652,10 +2652,10 @@ mod test_reporting { (Left y) = x y - "# + " ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This expression is used in an unexpected way: @@ -2674,19 +2674,19 @@ mod test_reporting { Tip: Closed tag unions can't grow, because that might change the size in memory. Can you use an open tag union? - "### + " ); test_report!( patterns_when_not_exhaustive, indoc!( - r#" + r" when 0x1 is 2 -> 0x3 - "# + " ), - @r###" - ── UNSAFE PATTERN ──────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── UNSAFE PATTERN in /code/proj/Main.roc ─────────────────────────────────────── This `when` does not cover all the possibilities: @@ -2698,22 +2698,22 @@ mod test_reporting { _ I would have to crash if I saw one of those! Add branches for them! - "### + " ); test_report!( patterns_bool_not_exhaustive, indoc!( - r#" + r" x : [Red, Green] x = Green when x is Red -> 3 - "# + " ), - @r###" - ── UNSAFE PATTERN ──────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── UNSAFE PATTERN in /code/proj/Main.roc ─────────────────────────────────────── This `when` does not cover all the possibilities: @@ -2725,23 +2725,23 @@ mod test_reporting { Green I would have to crash if I saw one of those! Add branches for them! - "### + " ); test_report!( patterns_enum_not_exhaustive, indoc!( - r#" + r" x : [Red, Green, Blue] x = Red when x is Red -> 0 Green -> 1 - "# + " ), - @r###" - ── UNSAFE PATTERN ──────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── UNSAFE PATTERN in /code/proj/Main.roc ─────────────────────────────────────── This `when` does not cover all the possibilities: @@ -2754,23 +2754,23 @@ mod test_reporting { Blue I would have to crash if I saw one of those! Add branches for them! - "### + " ); test_report!( patterns_remote_data_not_exhaustive, indoc!( - r#" + r" RemoteData e a : [NotAsked, Loading, Failure e, Success a] x : RemoteData Num.I64 Str when x is NotAsked -> 3 - "# + " ), - @r###" - ── UNSAFE PATTERN ──────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── UNSAFE PATTERN in /code/proj/Main.roc ─────────────────────────────────────── This `when` does not cover all the possibilities: @@ -2784,22 +2784,22 @@ mod test_reporting { Success _ I would have to crash if I saw one of those! Add branches for them! - "### + " ); test_report!( patterns_record_not_exhaustive, indoc!( - r#" + r" x = { a: 3 } when x is { a: 4 } -> 4 - "# + " ), // 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 ─ + @r" + ── UNSAFE PATTERN in /code/proj/Main.roc ─────────────────────────────────────── This `when` does not cover all the possibilities: @@ -2811,13 +2811,13 @@ mod test_reporting { { a } I would have to crash if I saw one of those! Add branches for them! - "### + " ); test_report!( patterns_record_guard_not_exhaustive, indoc!( - r#" + r" y : [Nothing, Just Num.I64] y = Just 4 x = { a: y, b: 42} @@ -2825,10 +2825,10 @@ mod test_reporting { when x is { a: Nothing } -> 4 { a: Just 3 } -> 4 - "# + " ), - @r###" - ── UNSAFE PATTERN ──────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── UNSAFE PATTERN in /code/proj/Main.roc ─────────────────────────────────────── This `when` does not cover all the possibilities: @@ -2841,20 +2841,20 @@ mod test_reporting { { a: Just _ } I would have to crash if I saw one of those! Add branches for them! - "### + " ); test_report!( patterns_nested_tag_not_exhaustive, indoc!( - r#" + r" when Record Nothing 1 is Record (Nothing) b -> b Record (Just 3) b -> b - "# + " ), - @r###" - ── UNSAFE PATTERN ──────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── UNSAFE PATTERN in /code/proj/Main.roc ─────────────────────────────────────── This `when` does not cover all the possibilities: @@ -2867,21 +2867,21 @@ mod test_reporting { Record (Just _) _ I would have to crash if I saw one of those! Add branches for them! - "### + " ); test_report!( patterns_int_redundant, indoc!( - r#" + r" when 0x1 is 2 -> 3 2 -> 4 _ -> 5 - "# + " ), - @r###" - ── REDUNDANT PATTERN ───────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── REDUNDANT PATTERN in /code/proj/Main.roc ──────────────────────────────────── The 2nd pattern is redundant: @@ -2892,24 +2892,24 @@ mod test_reporting { Any value of this shape will be handled by a previous pattern, so this one should be removed. - "### + " ); test_report!( unify_alias_other, indoc!( - r#" + r" Foo a : { x : Num.Int a } f : Foo a -> Num.Int a f = \r -> r.x f { y: 3.14 } - "# + " ), // de-aliases the alias to give a better error message - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This 1st argument to `f` has an unexpected type: @@ -2929,25 +2929,25 @@ mod test_reporting { Tip: Can more type annotations be added? Type annotations always help me give more specific messages, and I think they could help a lot in this case - "### + " ); test_report!( #[ignore] cyclic_alias, indoc!( - r#" + r" Foo : { x : Bar } Bar : { y : Foo } f : Foo f - "# + " ), // should not report Bar as unused! - @r###" - ── CYCLIC ALIAS ────────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── CYCLIC ALIAS in /code/proj/Main.roc ───────────────────────────────────────── The `Foo` alias is self-recursive in an invalid way: @@ -2956,24 +2956,24 @@ mod test_reporting { Recursion in aliases is only allowed if recursion happens behind a tagged union, at least one variant of which is not recursive. - "### + " ); test_report!( self_recursive_alias, indoc!( - r#" + r" Foo : { x : Foo } f : Foo f = 3 f - "# + " ), // should not report Bar as unused! - @r###" - ── CYCLIC ALIAS ────────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── CYCLIC ALIAS in /code/proj/Main.roc ───────────────────────────────────────── The `Foo` alias is self-recursive in an invalid way: @@ -2982,18 +2982,18 @@ mod test_reporting { Recursion in aliases is only allowed if recursion happens behind a tagged union, at least one variant of which is not recursive. - "### + " ); test_report!( record_duplicate_field_same_type, indoc!( - r#" + r" { x: 4, y: 3, x: 4 } - "# + " ), - @r###" - ── DUPLICATE FIELD NAME ────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── DUPLICATE FIELD NAME in /code/proj/Main.roc ───────────────────────────────── This record defines the `.x` field twice! @@ -3006,7 +3006,7 @@ mod test_reporting { ^^^^ For clarity, remove the previous `.x` definitions from this record. - "### + " ); test_report!( @@ -3016,8 +3016,8 @@ mod test_reporting { { x: 4, y: 3, x: "foo" } "# ), - @r###" - ── DUPLICATE FIELD NAME ────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── DUPLICATE FIELD NAME in /code/proj/Main.roc ───────────────────────────────── This record defines the `.x` field twice! @@ -3030,7 +3030,7 @@ mod test_reporting { ^^^^^^^^ For clarity, remove the previous `.x` definitions from this record. - "### + "# ); test_report!( @@ -3044,8 +3044,8 @@ mod test_reporting { } "# ), - @r###" - ── DUPLICATE FIELD NAME ────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── DUPLICATE FIELD NAME in /code/proj/Main.roc ───────────────────────────────── This record defines the `.x` field twice! @@ -3064,7 +3064,7 @@ mod test_reporting { 8│ } For clarity, remove the previous `.x` definitions from this record. - "### + "# ); test_report!( @@ -3079,8 +3079,8 @@ mod test_reporting { } "# ), - @r###" - ── DUPLICATE FIELD NAME ────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── DUPLICATE FIELD NAME in /code/proj/Main.roc ───────────────────────────────── This record defines the `.x` field twice! @@ -3099,7 +3099,7 @@ mod test_reporting { 9│ } For clarity, remove the previous `.x` definitions from this record. - "### + "# ); test_report!( @@ -3112,8 +3112,8 @@ mod test_reporting { a "# ), - @r###" - ── DUPLICATE FIELD NAME ────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── DUPLICATE FIELD NAME in /code/proj/Main.roc ───────────────────────────────── This record type defines the `.foo` field twice! @@ -3127,7 +3127,7 @@ mod test_reporting { For clarity, remove the previous `.foo` definitions from this record type. - "### + " ); test_report!( @@ -3140,8 +3140,8 @@ mod test_reporting { a "# ), - @r###" - ── DUPLICATE TAG NAME ──────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── DUPLICATE TAG NAME in /code/proj/Main.roc ─────────────────────────────────── This tag union type defines the `Foo` tag twice! @@ -3155,22 +3155,22 @@ mod test_reporting { For clarity, remove the previous `Foo` definitions from this tag union type. - "### + " ); test_report!( annotation_definition_mismatch, indoc!( - r#" + r" bar : Num.I64 foo = \x -> x # NOTE: neither bar or foo are defined at this point 4 - "# + " ), - @r###" - ── NAMING PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── NAMING PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── This annotation does not match the definition immediately following it: @@ -3179,19 +3179,19 @@ mod test_reporting { 5│> foo = \x -> x Is it a typo? If not, put either a newline or comment between them. - "### + " ); test_report!( annotation_newline_body_is_fine, indoc!( - r#" + r" bar : Num.I64 foo = \x -> x foo bar - "# + " ), @"" ); @@ -3199,14 +3199,14 @@ mod test_reporting { test_report!( invalid_alias_rigid_var_pattern, indoc!( - r#" + r" MyAlias 1 : Num.I64 4 - "# + " ), - @r###" - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── 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. @@ -3224,21 +3224,21 @@ mod test_reporting { If you didn't intend on using `MyAlias` then remove it so future readers of your code don't wonder why it is there. - "### + " ); test_report!( invalid_opaque_rigid_var_pattern, indoc!( - r#" + r" Age 1 := Num.I64 a : Age a - "# + " ), - @r###" - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── SYNTAX PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── This definition of `Age` has an unexpected pattern: @@ -3246,21 +3246,21 @@ mod test_reporting { ^ Only type variables like `a` or `value` can occur in this position. - "### + " ); test_report!( invalid_num, indoc!( - r#" + r" a : Num.Num Num.I64 Num.F64 a = 3 a - "# + " ), - @r###" - ── TOO MANY TYPE ARGUMENTS ─────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TOO MANY TYPE ARGUMENTS in /code/proj/Main.roc ────────────────────────────── The `Num` opaque expects 1 type argument, but it got 2 instead: @@ -3268,21 +3268,21 @@ mod test_reporting { ^^^^^^^^^^^^^^^^^^^^^^^ Are there missing parentheses? - "### + " ); test_report!( invalid_num_fn, indoc!( - r#" + r" f : Str -> Num.Num Num.I64 Num.F64 f = \_ -> 3 f - "# + " ), - @r###" - ── TOO MANY TYPE ARGUMENTS ─────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TOO MANY TYPE ARGUMENTS in /code/proj/Main.roc ────────────────────────────── The `Num` opaque expects 1 type argument, but it got 2 instead: @@ -3290,23 +3290,23 @@ mod test_reporting { ^^^^^^^^^^^^^^^^^^^^^^^ Are there missing parentheses? - "### + " ); test_report!( too_few_type_arguments, indoc!( - r#" + r" Pair a b : [Pair a b] x : Pair Num.I64 x = Pair 2 3 x - "# + " ), - @r###" - ── TOO FEW TYPE ARGUMENTS ──────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TOO FEW TYPE ARGUMENTS in /code/proj/Main.roc ─────────────────────────────── The `Pair` alias expects 2 type arguments, but it got 1 instead: @@ -3314,23 +3314,23 @@ mod test_reporting { ^^^^^^^^^^^^ Are there missing parentheses? - "### + " ); test_report!( too_many_type_arguments, indoc!( - r#" + r" Pair a b : [Pair a b] x : Pair Num.I64 Num.I64 Num.I64 x = 3 x - "# + " ), - @r###" - ── TOO MANY TYPE ARGUMENTS ─────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TOO MANY TYPE ARGUMENTS in /code/proj/Main.roc ────────────────────────────── The `Pair` alias expects 2 type arguments, but it got 3 instead: @@ -3338,22 +3338,22 @@ mod test_reporting { ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Are there missing parentheses? - "### + " ); test_report!( phantom_type_variable, indoc!( - r#" + r" Foo a : [Foo] f : Foo Num.I64 f - "# + " ), - @r###" - ── UNUSED TYPE ALIAS PARAMETER ─────────────────────────── /code/proj/Main.roc ─ + @r#" + ── UNUSED TYPE ALIAS PARAMETER in /code/proj/Main.roc ────────────────────────── The `a` type parameter is not used in the `Foo` alias definition: @@ -3364,18 +3364,18 @@ mod test_reporting { Tip: If you want an unused type parameter (a so-called "phantom type"), read the guide section on phantom values. - "### + "# ); test_report!( elm_function_syntax, indoc!( - r#" + r" f x y = x - "# + " ), - @r###" - ── ARGUMENTS BEFORE EQUALS ────────────────── tmp/elm_function_syntax/Test.roc ─ + @r#" + ── ARGUMENTS BEFORE EQUALS in tmp/elm_function_syntax/Test.roc ───────────────── I am partway through parsing a definition, but I got stuck here: @@ -3387,7 +3387,7 @@ mod test_reporting { Looks like you are trying to define a function. In roc, functions are always written as a lambda, like increment = \n -> n + 1. - "### + "# ); test_report!( @@ -3402,8 +3402,8 @@ mod test_reporting { x "# ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the body of the `x` definition: @@ -3430,7 +3430,7 @@ mod test_reporting { Cons {} a, Nil, ] as a - "### + "# ); test_report!( @@ -3451,8 +3451,8 @@ 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 ─ + @r#" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the body of the `x` definition: @@ -3485,13 +3485,13 @@ mod test_reporting { ACons I64 (BList I64 I64), ANil, ] as a - "### + "# ); test_report!( integer_out_of_range, indoc!( - r#" + r" x = 170_141_183_460_469_231_731_687_303_715_884_105_728_000 y = -170_141_183_460_469_231_731_687_303_715_884_105_728_000 @@ -3503,10 +3503,10 @@ mod test_reporting { maxlit = 340_282_366_920_938_463_463_374_607_431_768_211_455 x + y + h + l + minlit + maxlit - "# + " ), - @r###" - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── 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: @@ -3568,22 +3568,22 @@ mod test_reporting { But + needs its 2nd argument to be: I128 or Dec - "### + " ); // have to deal with some whitespace issues because of the format! macro test_report!( float_out_of_range, indoc!( - r#" + r" overflow = 11.7976931348623157e308 underflow = -11.7976931348623157e308 overflow + underflow - "# + " ), - @r###" - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── 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: @@ -3606,7 +3606,7 @@ mod test_reporting { -1.7976931348623157e308 and 1.7976931348623157e308 Tip: Learn more about number literals at TODO - "### + " ); // the generated messages here are incorrect. Waiting for a rust nightly feature to land, @@ -3615,7 +3615,7 @@ mod test_reporting { test_report!( integer_malformed, indoc!( - r#" + r" dec = 100A hex = 0xZZZ @@ -3625,10 +3625,10 @@ mod test_reporting { bin = 0b2 dec + hex + oct + bin - "# + " ), - @r###" - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── 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: @@ -3675,13 +3675,13 @@ mod test_reporting { 0 and 1, or have an integer suffix. Tip: Learn more about number literals at TODO - "### + " ); test_report!( integer_empty, indoc!( - r#" + r" dec = 20 hex = 0x @@ -3691,10 +3691,10 @@ mod test_reporting { bin = 0b dec + hex + oct + bin - "# + " ), - @r###" - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── 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: @@ -3729,20 +3729,20 @@ mod test_reporting { digits 0 and 1, or have an integer suffix. Tip: Learn more about number literals at TODO - "### + " ); test_report!( float_malformed, indoc!( - r#" + r" x = 3.0A x - "# + " ), - @r###" - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── SYNTAX PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── This float literal contains an invalid digit: @@ -3753,13 +3753,13 @@ mod test_reporting { scientific notation 10e4, or have a float suffix. Tip: Learn more about number literals at TODO - "### + " ); test_report!( invalid_record_update, indoc!( - r#" + r" foo = { bar: 3 } updateNestedRecord = { foo.bar & x: 4 } @@ -3770,10 +3770,10 @@ mod test_reporting { x = { example & age: 4 } { updateNestedRecord, foo, x, y } - "# + " ), - @r###" - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── 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: @@ -3805,18 +3805,18 @@ mod test_reporting { ^^^^^^^^^^^^ Only variables can be updated with record update syntax. - "### + " ); test_report!( module_not_imported, indoc!( - r#" + r" Foo.test - "# + " ), - @r###" - ── MODULE NOT IMPORTED ─────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── MODULE NOT IMPORTED in /code/proj/Main.roc ────────────────────────────────── The `Foo` module is not imported: @@ -3830,18 +3830,18 @@ mod test_reporting { Bool Num Set - "### + " ); test_report!( optional_record_default_type_error, indoc!( - r#" + r" \{ x, y ? True } -> x + y - "# + " ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This 2nd argument to + has an unexpected type: @@ -3855,7 +3855,7 @@ mod test_reporting { But + needs its 2nd argument to be: Num a - "### + " ); test_report!( @@ -3868,8 +3868,8 @@ mod test_reporting { f "# ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── The 1st argument to `f` is weird: @@ -3883,22 +3883,22 @@ mod test_reporting { But the annotation on `f` says the 1st argument should be: { y ? I64, … } - "### + "# ); test_report!( optional_record_invalid_let_binding, indoc!( - r#" + r" \rec -> { x, y } : { x : Num.I64, y ? Str } { x, y } = rec { x, y } - "# + " ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the body of this definition: @@ -3915,21 +3915,21 @@ mod test_reporting { Tip: To extract the `.y` field it must be non-optional, but the type says this field is optional. Learn more about optional fields at TODO. - "### + " ); test_report!( optional_record_invalid_function, indoc!( - r#" + r" f : { x : Num.I64, y ? Num.I64 } -> Num.I64 f = \{ x, y } -> x + y f - "# + " ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── The 1st argument to `f` is weird: @@ -3946,23 +3946,23 @@ mod test_reporting { Tip: To extract the `.y` field it must be non-optional, but the type says this field is optional. Learn more about optional fields at TODO. - "### + " ); test_report!( optional_record_invalid_when, indoc!( - r#" + r" f : { x : Num.I64, y ? Num.I64 } -> Num.I64 f = \r -> when r is { x, y } -> x + y f - "# + " ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── The branches of this `when` expression don't match the condition: @@ -3981,21 +3981,21 @@ mod test_reporting { Tip: To extract the `.y` field it must be non-optional, but the type says this field is optional. Learn more about optional fields at TODO. - "### + " ); test_report!( optional_record_invalid_access, indoc!( - r#" + r" f : { x : Num.I64, y ? Num.I64 } -> Num.I64 f = \r -> r.y f - "# + " ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This expression is used in an unexpected way: @@ -4012,21 +4012,21 @@ mod test_reporting { Tip: To extract the `.y` field it must be non-optional, but the type says this field is optional. Learn more about optional fields at TODO. - "### + " ); test_report!( optional_record_invalid_accessor, indoc!( - r#" + r" f : { x : Num.I64, y ? Num.I64 } -> Num.I64 f = \r -> .y r f - "# + " ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This 1st argument to this function has an unexpected type: @@ -4043,7 +4043,7 @@ mod test_reporting { Tip: To extract the `.y` field it must be non-optional, but the type says this field is optional. Learn more about optional fields at TODO. - "### + " ); test_report!( @@ -4059,8 +4059,8 @@ mod test_reporting { f "# ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── The branches of this `when` expression don't match the condition: @@ -4077,7 +4077,7 @@ mod test_reporting { { y : Str, … } The branches must be cases of the `when` condition's type! - "### + "# ); test_report!( @@ -4093,8 +4093,8 @@ mod test_reporting { f "# ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── The branches of this `when` expression don't match the condition: @@ -4111,18 +4111,18 @@ mod test_reporting { { y ? Str, … } The branches must be cases of the `when` condition's type! - "### + "# ); test_report!( incorrect_optional_field, indoc!( - r#" + r" { x: 5, y ? 42 } - "# + " ), - @r###" - ── BAD OPTIONAL VALUE ──────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── BAD OPTIONAL VALUE in /code/proj/Main.roc ─────────────────────────────────── This record uses an optional value for the `.y` field in an incorrect context! @@ -4133,17 +4133,17 @@ mod test_reporting { You can only use optional values in record destructuring, like: { answer ? 42, otherField } = myRecord - "### + " ); test_report!( first_wildcard_is_required, indoc!( - r#" + r" when Foo 1 2 3 is Foo _ 1 _ -> 1 _ -> 2 - "# + " ), @"" ); @@ -4151,15 +4151,15 @@ mod test_reporting { test_report!( second_wildcard_is_redundant, indoc!( - r#" + r" when Foo 1 2 3 is Foo _ 1 _ -> 1 _ -> 2 _ -> 3 - "# + " ), - @r###" - ── REDUNDANT PATTERN ───────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── REDUNDANT PATTERN in /code/proj/Main.roc ──────────────────────────────────── The 3rd pattern is redundant: @@ -4171,13 +4171,13 @@ mod test_reporting { Any value of this shape will be handled by a previous pattern, so this one should be removed. - "### + " ); test_report!( alias_using_alias, indoc!( - r#" + r" # The color of a node. Leaves are considered Black. NodeColor : [Red, Black] @@ -4189,7 +4189,7 @@ mod test_reporting { Empty empty - "# + " ), @"" ); @@ -4197,14 +4197,14 @@ mod test_reporting { test_report!( unused_argument, indoc!( - r#" + r" f = \foo -> 1 f - "# + " ), - @r###" - ── UNUSED ARGUMENT ─────────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── UNUSED ARGUMENT in /code/proj/Main.roc ────────────────────────────────────── `f` doesn't use `foo`. @@ -4215,18 +4215,18 @@ mod test_reporting { really do need `foo` as an argument of `f`, prefix it with an underscore, like this: "_`foo`". Adding an underscore at the start of a variable name is a way of saying that the variable is not used. - "### + "# ); test_report!( qualified_tag, indoc!( - r#" + r" Foo.Bar - "# + " ), - @r###" - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── SYNTAX PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── I am trying to parse a qualified name here: @@ -4236,18 +4236,18 @@ mod test_reporting { This looks like a qualified tag name to me, but tags cannot be qualified! Maybe you wanted a qualified name, something like Json.Decode.string? - "### + " ); test_report!( module_ident_ends_with_dot, indoc!( - r#" + r" Foo.Bar. - "# + " ), - @r###" - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── SYNTAX PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── I am trying to parse a qualified name here: @@ -4256,18 +4256,18 @@ mod test_reporting { I was expecting to see an identifier next, like height. A complete qualified name looks something like Json.Decode.string. - "### + " ); test_report!( record_access_ends_with_dot, indoc!( - r#" + r" foo.bar. - "# + " ), - @r###" - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── SYNTAX PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── I am trying to parse a record field access here: @@ -4275,21 +4275,21 @@ mod test_reporting { ^ So I expect to see a lowercase letter next, like .name or .height. - "### + " ); test_report!( type_annotation_double_colon, indoc!( - r#" + r" f :: I64 f = 42 f - "# + " ), - @r###" - ── UNKNOWN OPERATOR ──────────────── tmp/type_annotation_double_colon/Test.roc ─ + @r#" + ── UNKNOWN OPERATOR in tmp/type_annotation_double_colon/Test.roc ─────────────── This looks like an operator, but it's not one I recognize! @@ -4301,7 +4301,7 @@ mod test_reporting { I have no specific suggestion for this operator, see TODO for the full list of operators in Roc. - "### + "# ); // NOTE: VERY BAD ERROR MESSAGE @@ -4311,17 +4311,17 @@ mod test_reporting { test_report!( double_equals_in_def, indoc!( - r#" + r" x = 3 y = x == 5 Num.add 1 2 { x, y } - "# + " ), - @r###" - ── TOO MANY ARGS ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TOO MANY ARGS in /code/proj/Main.roc ──────────────────────────────────────── This value is not a function, but it was given 3 arguments: @@ -4329,18 +4329,18 @@ mod test_reporting { ^ Are there any missing commas? Or missing parentheses? - "### + " ); test_report!( tag_union_open, indoc!( - r#" + r" f : [ - "# + " ), - @r###" - ── UNFINISHED TAG UNION TYPE ───────────────────── tmp/tag_union_open/Test.roc ─ + @r" + ── 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: @@ -4351,18 +4351,18 @@ mod test_reporting { I was expecting to see a closing square bracket before this, so try adding a ] and see if that helps? - "### + " ); test_report!( tag_union_end, indoc!( - r#" + r" f : [Yes, - "# + " ), - @r###" - ── UNFINISHED TAG UNION TYPE ────────────────────── tmp/tag_union_end/Test.roc ─ + @r" + ── 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: @@ -4373,18 +4373,18 @@ mod test_reporting { I was expecting to see a closing square bracket before this, so try adding a ] and see if that helps? - "### + " ); test_report!( tag_union_lowercase_tag_name, indoc!( - r#" + r" f : [lowercase] - "# + " ), - @r###" - ── WEIRD TAG NAME ────────────────── tmp/tag_union_lowercase_tag_name/Test.roc ─ + @r" + ── 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: @@ -4394,18 +4394,18 @@ mod test_reporting { I was expecting to see a tag name. Hint: Tag names start with an uppercase letter, like Err or Green. - "### + " ); test_report!( tag_union_second_lowercase_tag_name, indoc!( - r#" + r" f : [Good, bad] - "# + " ), - @r###" - ── WEIRD TAG NAME ─────────── tmp/tag_union_second_lowercase_tag_name/Test.roc ─ + @r" + ── 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: @@ -4415,18 +4415,18 @@ mod test_reporting { I was expecting to see a tag name. Hint: Tag names start with an uppercase letter, like Err or Green. - "### + " ); test_report!( record_type_open, indoc!( - r#" + r" f : { - "# + " ), - @r###" - ── UNFINISHED RECORD TYPE ────────────────────── tmp/record_type_open/Test.roc ─ + @r" + ── UNFINISHED RECORD TYPE in tmp/record_type_open/Test.roc ───────────────────── I am partway through parsing a record type, but I got stuck here: @@ -4437,19 +4437,19 @@ mod test_reporting { I was expecting to see a closing curly brace before this, so try adding a } and see if that helps? - "### + " ); test_report!( record_type_open_indent, indoc!( - r#" + r" f : { foo : I64, - "# + " ), - @r###" - ── UNFINISHED RECORD TYPE ─────────────── tmp/record_type_open_indent/Test.roc ─ + @r" + ── UNFINISHED RECORD TYPE in tmp/record_type_open_indent/Test.roc ────────────── I am partway through parsing a record type, but I got stuck here: @@ -4461,18 +4461,18 @@ mod test_reporting { I was expecting to see a closing curly brace before this, so try adding a } and see if that helps? - "### + " ); test_report!( record_type_end, indoc!( - r#" + r" f : { a: Int, - "# + " ), - @r###" - ── UNFINISHED RECORD TYPE ─────────────────────── tmp/record_type_end/Test.roc ─ + @r" + ── UNFINISHED RECORD TYPE in tmp/record_type_end/Test.roc ────────────────────── I am partway through parsing a record type, but I got stuck here: @@ -4483,18 +4483,18 @@ mod test_reporting { I was expecting to see a closing curly brace before this, so try adding a } and see if that helps? - "### + " ); test_report!( record_type_keyword_field_name, indoc!( - r#" + r" f : { if : I64 } - "# + " ), - @r###" - ── UNFINISHED RECORD TYPE ──────── tmp/record_type_keyword_field_name/Test.roc ─ + @r" + ── 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: @@ -4504,19 +4504,19 @@ mod test_reporting { Looks like you are trying to use `if` as a field name, but that is a reserved word. Try using a different name! - "### + " ); // a case where the message cannot be as good as elm's test_report!( record_type_missing_comma, indoc!( - r#" + r" f : { foo bar } - "# + " ), - @r###" - ── UNFINISHED RECORD TYPE ───────────── tmp/record_type_missing_comma/Test.roc ─ + @r" + ── UNFINISHED RECORD TYPE in tmp/record_type_missing_comma/Test.roc ──────────── I am partway through parsing a record type, but I got stuck here: @@ -4525,15 +4525,15 @@ mod test_reporting { I was expecting to see a colon, question mark, comma or closing curly brace. - "### + " ); // a case where the message cannot be as good as elm's test_report!( record_type_tab, "f : { foo \t }", - @r###" - ── TAB CHARACTER ──────────────────────────────── tmp/record_type_tab/Test.roc ─ + @r" + ── TAB CHARACTER in tmp/record_type_tab/Test.roc ─────────────────────────────── I encountered a tab character: @@ -4541,14 +4541,14 @@ mod test_reporting { ^ Tab characters are not allowed, use spaces instead. - "### + " ); test_report!( comment_with_tab, "# comment with a \t\n4", - @r###" - ── TAB CHARACTER ─────────────────────────────── tmp/comment_with_tab/Test.roc ─ + @r" + ── TAB CHARACTER in tmp/comment_with_tab/Test.roc ────────────────────────────── I encountered a tab character: @@ -4556,14 +4556,14 @@ mod test_reporting { ^ Tab characters are not allowed, use spaces instead. - "### + " ); test_report!( comment_with_control_character, "# comment with a \x07\n", - @r###" - ── ASCII CONTROL CHARACTER ─────── tmp/comment_with_control_character/Test.roc ─ + @r" + ── ASCII CONTROL CHARACTER in tmp/comment_with_control_character/Test.roc ────── I encountered an ASCII control character: @@ -4571,14 +4571,14 @@ mod test_reporting { ^ ASCII control characters are not allowed. - "### + " ); test_report!( record_type_carriage_return, "f : { \r foo }", - @r###" - ── MISPLACED CARRIAGE RETURN ──────── tmp/record_type_carriage_return/Test.roc ─ + @r" + ── MISPLACED CARRIAGE RETURN in tmp/record_type_carriage_return/Test.roc ─────── I encountered a stray carriage return (\r): @@ -4586,19 +4586,19 @@ mod test_reporting { ^ A carriage return (\r) has to be followed by a newline (\n). - "### + " ); // TODO bad error message test_report!( type_in_parens_start, indoc!( - r#" + r" f : ( - "# + " ), - @r###" - ── UNFINISHED PARENTHESES ────────────────── tmp/type_in_parens_start/Test.roc ─ + @r" + ── UNFINISHED PARENTHESES in tmp/type_in_parens_start/Test.roc ───────────────── I am partway through parsing a type in parentheses, but I got stuck here: @@ -4610,18 +4610,18 @@ mod test_reporting { I was expecting to see a closing parenthesis before this, so try adding a ) and see if that helps? - "### + " ); test_report!( type_in_parens_end, indoc!( - r#" + r" f : ( I64 - "# + " ), - @r###" - ── UNFINISHED PARENTHESES ──────────────────── tmp/type_in_parens_end/Test.roc ─ + @r" + ── UNFINISHED PARENTHESES in tmp/type_in_parens_end/Test.roc ─────────────────── I am partway through parsing a type in parentheses, but I got stuck here: @@ -4633,20 +4633,20 @@ mod test_reporting { I was expecting to see a closing parenthesis before this, so try adding a ) and see if that helps? - "### + " ); test_report!( type_apply_double_dot, indoc!( - r#" + r" f : Foo..Bar f - "# + " ), - @r###" - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── SYNTAX PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── I am confused by this type name: @@ -4655,7 +4655,7 @@ mod test_reporting { Type names start with an uppercase letter, and can optionally be qualified by a module name, like Bool or Http.Request.Request. - "### + " ); // ── DOUBLE DOT ────────────────────────────────────────────────────────────────── // @@ -4669,14 +4669,14 @@ mod test_reporting { test_report!( type_apply_trailing_dot, indoc!( - r#" + r" f : Foo.Bar. f - "# + " ), - @r###" - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── SYNTAX PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── I am confused by this type name: @@ -4685,7 +4685,7 @@ mod test_reporting { Type names start with an uppercase letter, and can optionally be qualified by a module name, like Bool or Http.Request.Request. - "### + " ); // ── TRAILING DOT ──────────────────────────────────────────────────────────────── // @@ -4700,12 +4700,12 @@ mod test_reporting { test_report!( type_apply_stray_dot, indoc!( - r#" + r" f : . - "# + " ), - @r###" - ── UNFINISHED TYPE ───────────────────────── tmp/type_apply_stray_dot/Test.roc ─ + @r" + ── UNFINISHED TYPE in tmp/type_apply_stray_dot/Test.roc ──────────────────────── I just started parsing a type, but I got stuck here: @@ -4713,20 +4713,20 @@ mod test_reporting { ^ I am expecting a type next, like Bool or List a. - "### + " ); test_report!( type_apply_start_with_number, indoc!( - r#" + r" f : Foo.1 f - "# + " ), - @r###" - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── SYNTAX PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── I am confused by this type name: @@ -4735,7 +4735,7 @@ mod test_reporting { Type names start with an uppercase letter, and can optionally be qualified by a module name, like Bool or Http.Request.Request. - "### + " ); // ── WEIRD QUALIFIED NAME ──────────────────────────────────────────────────────── // @@ -4750,14 +4750,14 @@ mod test_reporting { test_report!( type_apply_start_with_lowercase, indoc!( - r#" + r" f : Foo.foo f - "# + " ), - @r###" - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── SYNTAX PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── I am confused by this type name: @@ -4766,18 +4766,18 @@ mod test_reporting { Type names start with an uppercase letter, and can optionally be qualified by a module name, like Bool or Http.Request.Request. - "### + " ); test_report!( def_missing_final_expression, indoc!( - r#" + r" f : Foo.foo - "# + " ), - @r###" - ── MISSING FINAL EXPRESSION ──────── tmp/def_missing_final_expression/Test.roc ─ + @r#" + ── MISSING FINAL EXPRESSION in tmp/def_missing_final_expression/Test.roc ─────── I am partway through parsing a definition, but I got stuck here: @@ -4794,18 +4794,18 @@ mod test_reporting { y = 2 x + y - "### + "# ); test_report!( expression_indentation_end, indoc!( - r#" + r" f <- Foo.foo - "# + " ), - @r###" - ── INDENT ENDS AFTER EXPRESSION ────── tmp/expression_indentation_end/Test.roc ─ + @r#" + ── INDENT ENDS AFTER EXPRESSION in tmp/expression_indentation_end/Test.roc ───── I am partway through parsing an expression, but I got stuck here: @@ -4817,21 +4817,21 @@ mod test_reporting { Looks like the indentation ends prematurely here. Did you mean to have another expression after this line? - "### + "# ); test_report!( type_inline_alias, indoc!( - r#" + r" f : I64 as f = 0 f - "# + " ), - @r###" - ── UNFINISHED INLINE ALIAS ──────────────────── tmp/type_inline_alias/Test.roc ─ + @r" + ── UNFINISHED INLINE ALIAS in tmp/type_inline_alias/Test.roc ─────────────────── I just started parsing an inline type alias, but I got stuck here: @@ -4839,21 +4839,21 @@ mod test_reporting { ^ Note: I may be confused by indentation - "### + " ); test_report!( type_double_comma, indoc!( - r#" + r" f : I64,,I64 -> I64 f = 0 f - "# + " ), - @r###" - ── DOUBLE COMMA ─────────────────────────────── tmp/type_double_comma/Test.roc ─ + @r" + ── 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: @@ -4862,21 +4862,21 @@ mod test_reporting { ^ Try removing one of them. - "### + " ); test_report!( type_argument_no_arrow, indoc!( - r#" + r" f : I64, I64 f = 0 f - "# + " ), - @r###" - ── UNFINISHED TYPE ─────────────────────── tmp/type_argument_no_arrow/Test.roc ─ + @r" + ── UNFINISHED TYPE in tmp/type_argument_no_arrow/Test.roc ────────────────────── I am partway through parsing a type, but I got stuck here: @@ -4884,22 +4884,22 @@ mod test_reporting { ^ Note: I may be confused by indentation - "### + " ); // TODO could do better by pointing out we're parsing a function type test_report!( type_argument_arrow_then_nothing, indoc!( - r#" + r" f : I64, I64 -> f = 0 f - "# + " ), - @r###" - ── UNFINISHED TYPE ───────────── tmp/type_argument_arrow_then_nothing/Test.roc ─ + @r" + ── UNFINISHED TYPE in tmp/type_argument_arrow_then_nothing/Test.roc ──────────── I just started parsing a type, but I got stuck here: @@ -4907,7 +4907,7 @@ mod test_reporting { ^ Note: I may be confused by indentation - "### + " ); // TODO could do better by pointing out we're parsing a function type @@ -4923,8 +4923,8 @@ mod test_reporting { main = myDict "# ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the body of the `myDict` definition: @@ -4939,7 +4939,7 @@ mod test_reporting { But the type annotation on `myDict` says it should be: Dict I64 Str - "### + "# ); test_report!( @@ -4958,8 +4958,8 @@ mod test_reporting { main = myDict "# ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the body of the `myDict` definition: @@ -4974,24 +4974,24 @@ mod test_reporting { But the type annotation on `myDict` says it should be: HSet Str - "### + "# ); // this should get better with time test_report!( if_guard_without_condition, indoc!( - r#" + r" when Just 4 is Just if -> 4 _ -> 2 - "# + " ), - @r###" - ── IF GUARD NO CONDITION ───────────── tmp/if_guard_without_condition/Test.roc ─ + @r" + ── 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: @@ -5000,23 +5000,23 @@ mod test_reporting { ^ Try adding an expression before the arrow! - "### + " ); test_report!( empty_or_pattern, indoc!( - r#" + r" when Just 4 is Just 4 | -> 4 _ -> 2 - "# + " ), - @r###" - ── UNFINISHED PATTERN ────────────────────────── tmp/empty_or_pattern/Test.roc ─ + @r" + ── UNFINISHED PATTERN in tmp/empty_or_pattern/Test.roc ───────────────────────── I just started parsing a pattern, but I got stuck here: @@ -5024,24 +5024,24 @@ mod test_reporting { ^ Note: I may be confused by indentation - "### + " ); // TODO check if "what_is_next" is a keyword test_report!( pattern_binds_keyword, indoc!( - r#" + r" when Just 4 is Just when -> 4 _ -> 2 - "# + " ), - @r###" - ── MISSING ARROW ────────────────────────── tmp/pattern_binds_keyword/Test.roc ─ + @r" + ── MISSING ARROW in tmp/pattern_binds_keyword/Test.roc ───────────────────────── I am partway through parsing a `when` expression, but got stuck here: @@ -5063,21 +5063,21 @@ mod test_reporting { Notice the indentation. All patterns are aligned, and each branch is indented a bit more than the corresponding pattern. That is important! - "### + " ); // this should get better with time test_report!( when_missing_arrow, indoc!( - r#" + r" when 5 is 1 -> 2 _ - "# + " ), - @r###" - ── UNFINISHED WHEN ─────────────────────────── tmp/when_missing_arrow/Test.roc ─ + @r" + ── UNFINISHED WHEN in tmp/when_missing_arrow/Test.roc ────────────────────────── I was partway through parsing a `when` expression, but I got stuck here: @@ -5099,18 +5099,18 @@ mod test_reporting { Notice the indentation. All patterns are aligned, and each branch is indented a bit more than the corresponding pattern. That is important! - "### + " ); test_report!( lambda_double_comma, indoc!( - r#" + r" \a,,b -> 1 - "# + " ), - @r###" - ── UNFINISHED ARGUMENT LIST ───────────────── tmp/lambda_double_comma/Test.roc ─ + @r" + ── 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: @@ -5120,18 +5120,18 @@ mod test_reporting { I was expecting an argument pattern before this, so try adding an argument before the comma and see if that helps? - "### + " ); test_report!( lambda_leading_comma, indoc!( - r#" + r" \,b -> 1 - "# + " ), - @r###" - ── UNFINISHED ARGUMENT LIST ──────────────── tmp/lambda_leading_comma/Test.roc ─ + @r" + ── 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: @@ -5141,7 +5141,7 @@ mod test_reporting { I was expecting an argument pattern before this, so try adding an argument before the comma and see if that helps? - "### + " ); // this should get better with time @@ -5171,33 +5171,33 @@ mod test_reporting { test_report!( when_outdented_branch, indoc!( - r#" + r" when 4 is 5 -> 2 2 -> 2 - "# + " ), - @r###" - ── NOT END OF FILE ──────────────────────── tmp/when_outdented_branch/Test.roc ─ + @r" + ── NOT END OF FILE in tmp/when_outdented_branch/Test.roc ─────────────────────── I expected to reach the end of the file, but got stuck here: 6│ 2 -> 2 ^ - "### + " ); test_report!( when_over_indented_underscore, indoc!( - r#" + r" when 4 is 5 -> 2 _ -> 2 - "# + " ), - @r###" - ── UNEXPECTED ARROW ─────────────── tmp/when_over_indented_underscore/Test.roc ─ + @r" + ── UNEXPECTED ARROW in tmp/when_over_indented_underscore/Test.roc ────────────── I am parsing a `when` expression right now, but this arrow is confusing me: @@ -5221,20 +5221,20 @@ mod test_reporting { Notice the indentation. All patterns are aligned, and each branch is indented a bit more than the corresponding pattern. That is important! - "### + " ); test_report!( when_over_indented_int, indoc!( - r#" + r" when 4 is 5 -> Num.neg 2 -> 2 - "# + " ), - @r###" - ── UNEXPECTED ARROW ────────────────────── tmp/when_over_indented_int/Test.roc ─ + @r" + ── UNEXPECTED ARROW in tmp/when_over_indented_int/Test.roc ───────────────────── I am parsing a `when` expression right now, but this arrow is confusing me: @@ -5258,23 +5258,23 @@ mod test_reporting { Notice the indentation. All patterns are aligned, and each branch is indented a bit more than the corresponding pattern. That is important! - "### + " ); // TODO I think we can do better here test_report!( if_outdented_then, indoc!( - r#" + r" x = if 5 == 5 then 2 else 3 x - "# + " ), - @r###" - ── UNFINISHED IF ────────────────────────────── tmp/if_outdented_then/Test.roc ─ + @r" + ── UNFINISHED IF in tmp/if_outdented_then/Test.roc ───────────────────────────── I was partway through parsing an `if` expression, but I got stuck here: @@ -5282,19 +5282,19 @@ mod test_reporting { ^ I was expecting to see the `then` keyword next. - "### + " ); // this should get better with time test_report!( if_missing_else, indoc!( - r#" + r" if 5 == 5 then 2 - "# + " ), - @r###" - ── UNFINISHED IF ──────────────────────────────── tmp/if_missing_else/Test.roc ─ + @r" + ── UNFINISHED IF in tmp/if_missing_else/Test.roc ─────────────────────────────── I was partway through parsing an `if` expression, but I got stuck here: @@ -5302,18 +5302,18 @@ mod test_reporting { ^ I was expecting to see the `else` keyword next. - "### + " ); test_report!( list_double_comma, indoc!( - r#" + r" [1, 2, , 3] - "# + " ), - @r###" - ── UNFINISHED LIST ──────────────────────────── tmp/list_double_comma/Test.roc ─ + @r" + ── UNFINISHED LIST in tmp/list_double_comma/Test.roc ─────────────────────────── I am partway through started parsing a list, but I got stuck here: @@ -5322,18 +5322,18 @@ mod test_reporting { I was expecting to see a list entry before this comma, so try adding a list entry and see if that helps? - "### + " ); test_report!( list_without_end, indoc!( - r#" + r" [1, 2, - "# + " ), - @r###" - ── UNFINISHED LIST ───────────────────────────── tmp/list_without_end/Test.roc ─ + @r" + ── UNFINISHED LIST in tmp/list_without_end/Test.roc ──────────────────────────── I am partway through started parsing a list, but I got stuck here: @@ -5348,18 +5348,18 @@ mod test_reporting { Note: When I get stuck like this, it usually means that there is a missing parenthesis or bracket somewhere earlier. It could also be a stray keyword or operator. - "### + " ); test_report!( number_double_dot, indoc!( - r#" + r" 1.1.1 - "# + " ), - @r###" - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── SYNTAX PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── This float literal contains an invalid digit: @@ -5370,14 +5370,14 @@ mod test_reporting { scientific notation 10e4, or have a float suffix. Tip: Learn more about number literals at TODO - "### + " ); test_report!( unicode_not_hex, r#""abc\u(zzzz)def""#, - @r###" - ── WEIRD CODE POINT ───────────────────────────── tmp/unicode_not_hex/Test.roc ─ + @r#" + ── WEIRD CODE POINT in tmp/unicode_not_hex/Test.roc ──────────────────────────── I am partway through parsing a unicode code point, but I got stuck here: @@ -5388,14 +5388,14 @@ mod test_reporting { I was expecting a hexadecimal number, like \u(1100) or \u(00FF). Learn more about working with unicode in roc at TODO - "### + "# ); test_report!( unicode_too_large, r#""abc\u(110000)def""#, - @r###" - ── INVALID UNICODE ─────────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── INVALID UNICODE in /code/proj/Main.roc ────────────────────────────────────── This unicode code point is invalid: @@ -5403,14 +5403,14 @@ mod test_reporting { ^^^^^^ Learn more about working with unicode in roc at TODO - "### + "# ); test_report!( weird_escape, r#""abc\qdef""#, - @r###" - ── WEIRD ESCAPE ──────────────────────────────────── tmp/weird_escape/Test.roc ─ + @r#" + ── WEIRD ESCAPE in tmp/weird_escape/Test.roc ─────────────────────────────────── I was partway through parsing a string literal, but I got stuck here: @@ -5427,14 +5427,14 @@ mod test_reporting { - An escaped backslash: \\ - A unicode code point: \u(00FF) - An interpolated string: \(myVariable) - "### + "# ); test_report!( single_quote_too_long, - r#"'abcdef'"#, - @r###" - ── INVALID SCALAR ───────────────────────── tmp/single_quote_too_long/Test.roc ─ + r"'abcdef'", + @r#" + ── 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. @@ -5444,14 +5444,14 @@ mod test_reporting { You could change it to something like 'a' or '\n'. Note, roc strings use double quotes, like "hello". - "### + "# ); test_report!( single_no_end, r#""there is no end"#, - @r###" - ── ENDLESS STRING ───────────────────────────────── tmp/single_no_end/Test.roc ─ + @r#" + ── ENDLESS STRING in tmp/single_no_end/Test.roc ──────────────────────────────── I cannot find the end of this string: @@ -5460,14 +5460,14 @@ mod test_reporting { You could change it to something like "to be or not to be" or even just "". - "### + "# ); test_report!( multi_no_end, r#""""there is no end"#, - @r###" - ── ENDLESS STRING ────────────────────────────────── tmp/multi_no_end/Test.roc ─ + @r#" + ── ENDLESS STRING in tmp/multi_no_end/Test.roc ───────────────────────────────── I cannot find the end of this block string: @@ -5476,14 +5476,14 @@ mod test_reporting { You could change it to something like """to be or not to be""" or even just """""". - "### + "# ); test_report!( 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 ─ + @r#" + ── INSUFFICIENT INDENT IN MULTI-LINE STRING in ...insufficient_indent/Test.roc ─ This multiline string is not sufficiently indented: @@ -5494,18 +5494,18 @@ mod test_reporting { Lines in a multi-line string must be indented at least as much as the beginning """. This extra indentation is automatically removed from the string during compilation. - "### + "# ); test_report!( dbg_without_final_expression, indoc!( - r#" + r" dbg 42 - "# + " ), - @r###" - ── INDENT ENDS AFTER EXPRESSION ──── tmp/dbg_without_final_expression/Test.roc ─ + @r#" + ── 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: @@ -5516,18 +5516,18 @@ mod test_reporting { dbg 42 "done" - "### + "# ); test_report!( expect_without_final_expression, indoc!( - r#" + r" expect 1 + 1 == 2 - "# + " ), - @r###" - ── INDENT ENDS AFTER EXPRESSION ─ tmp/expect_without_final_expression/Test.roc ─ + @r#" + ── INDENT ENDS AFTER EXPRESSION in ...expect_without_final_expression/Test.roc ─ I am partway through parsing an expect statement, but I got stuck here: @@ -5539,7 +5539,7 @@ mod test_reporting { expect 1 + 1 == 2 "done" - "### + "# ); // https://github.com/roc-lang/roc/issues/1714 @@ -5549,15 +5549,15 @@ mod test_reporting { r#" greeting = "Privet" - if Bool.true then 1 else "\(greeting), World!" + if Bool.true then 1 else "$(greeting), World!" "#, ), - @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: - 6│ if Bool.true then 1 else "\(greeting), World!" + 6│ if Bool.true then 1 else "$(greeting), World!" ^^^^^^^^^^^^^^^^^^^^^ The `else` branch is a string of type: @@ -5569,7 +5569,7 @@ mod test_reporting { Num * All branches in an `if` must have the same type! - "### + "# ); macro_rules! comparison_binop_transparency_tests { @@ -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: @@ -5615,14 +5615,14 @@ All branches in an `if` must have the same type! test_report!( keyword_record_field_access, indoc!( - r#" + r" foo = {} foo.if - "# + " ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This `foo` record doesn’t have a `if` field: @@ -5630,18 +5630,18 @@ All branches in an `if` must have the same type! ^^^^^^ In fact, `foo` is a record with no fields at all! - "### + " ); test_report!( keyword_qualified_import, indoc!( - r#" + r" Num.if - "# + " ), - @r###" - ── NOT EXPOSED ─────────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── NOT EXPOSED in /code/proj/Main.roc ────────────────────────────────────────── The Num module does not expose `if`: @@ -5654,18 +5654,18 @@ All branches in an `if` must have the same type! Num.div Num.min Num.e - "### + " ); test_report!( stray_dot_expr, indoc!( - r#" + r" Num.add . 23 - "# + " ), - @r###" - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── SYNTAX PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── I am trying to parse a record field access here: @@ -5673,18 +5673,18 @@ All branches in an `if` must have the same type! ^ So I expect to see a lowercase letter next, like .name or .height. - "### + " ); test_report!( opaque_ref_field_access, indoc!( - r#" + r" @UUID.bar - "# + " ), - @r###" - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── SYNTAX PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── I am very confused by this field access: @@ -5692,18 +5692,18 @@ All branches in an `if` must have the same type! ^^^^ It looks like a record field access on an opaque reference. - "### + " ); test_report!( weird_accessor, indoc!( - r#" + r" .foo.bar - "# + " ), - @r###" - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── SYNTAX PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── I am very confused by this field access @@ -5713,18 +5713,18 @@ All branches in an `if` must have the same type! It looks like a field access on an accessor. I parse.client.name as (.client).name. Maybe use an anonymous function like (\r -> r.client.name) instead? - "### + " ); test_report!( closure_underscore_ident, indoc!( - r#" + r" \the_answer -> 100 - "# + " ), - @r###" - ── NAMING PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── NAMING PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── I am trying to parse an identifier here: @@ -5732,33 +5732,33 @@ All branches in an `if` must have the same type! ^ Underscores are not allowed in identifiers. Use camelCase instead! - "### + " ); test_report!( #[ignore] double_binop, indoc!( - r#" + r" key >= 97 && <= 122 - "# + " ), - @r#" - "# + @r" + " ); test_report!( #[ignore] case_of, indoc!( - r#" + r" case 1 of 1 -> True _ -> False - "# + " ), - @r###" - ── UNKNOWN OPERATOR ───────────────────────────────────── tmp/case_of/Test.roc ─ + @r#" + ── UNKNOWN OPERATOR in tmp/case_of/Test.roc ──────────────────────────────────── This looks like an operator, but it's not one I recognize! @@ -5780,7 +5780,7 @@ All branches in an `if` must have the same type! increment : I64 -> I64 increment = \n -> n + 1 - "### + "# ); test_report!( @@ -5790,8 +5790,8 @@ All branches in an `if` must have the same type! ["foo", bar("")] "# ), - @r###" - ── UNRECOGNIZED NAME ───────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── UNRECOGNIZED NAME in /code/proj/Main.roc ──────────────────────────────────── Nothing is named `bar` in this scope. @@ -5804,19 +5804,19 @@ All branches in an `if` must have the same type! Str Err U8 - "### + "# ); test_report!( invalid_operator, indoc!( - r#" + r" main = 5 ** 3 - "# + " ), - @r###" - ── UNKNOWN OPERATOR ──────────────────────────── tmp/invalid_operator/Test.roc ─ + @r#" + ── UNKNOWN OPERATOR in tmp/invalid_operator/Test.roc ─────────────────────────── This looks like an operator, but it's not one I recognize! @@ -5829,19 +5829,19 @@ All branches in an `if` must have the same type! I have no specific suggestion for this operator, see TODO for the full list of operators in Roc. - "### + "# ); test_report!( double_plus, indoc!( - r#" + r" main = [] ++ [] - "# + " ), - @r###" - ── UNKNOWN OPERATOR ───────────────────────────────── tmp/double_plus/Test.roc ─ + @r#" + ── UNKNOWN OPERATOR in tmp/double_plus/Test.roc ──────────────────────────────── This looks like an operator, but it's not one I recognize! @@ -5854,21 +5854,21 @@ All branches in an `if` must have the same type! To concatenate two lists or strings, try using List.concat or Str.concat instead. - "### + "# ); test_report!( inline_hastype, indoc!( - r#" + r" main = (\x -> x) : I64 3 - "# + " ), - @r###" - ── UNKNOWN OPERATOR ────────────────────────────── tmp/inline_hastype/Test.roc ─ + @r#" + ── UNKNOWN OPERATOR in tmp/inline_hastype/Test.roc ───────────────────────────── This looks like an operator, but it's not one I recognize! @@ -5884,7 +5884,7 @@ All branches in an `if` must have the same type! increment : I64 -> I64 increment = \x -> x + 1 - "### + "# ); // this is still bad, but changing the order and progress of other parsers should improve it @@ -5892,14 +5892,14 @@ All branches in an `if` must have the same type! test_report!( wild_case_arrow, indoc!( - r#" + r" main = 5 -> 3 - "# + " ), |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! @@ -5913,7 +5913,7 @@ Looks like you are trying to define a function.{} In roc, functions are always written as a lambda, like{} - increment = \n -> n + 1"###, + increment = \n -> n + 1"#, ' ', ' ' ) ) @@ -5931,8 +5931,8 @@ In roc, functions are always written as a lambda, like{} "# ), indoc!( - r#" - ── WEIRD PROVIDES ──────────────────────────────────────── /code/proj/Main.roc ─ + r" + ── WEIRD PROVIDES in /code/proj/Main.roc ─────────────────────────────────────── I am partway through parsing a provides list, but I got stuck here: @@ -5943,7 +5943,7 @@ In roc, functions are always written as a lambda, like{} I was expecting a type name, value name or function name next, like provides [Animal, default, tame] - "# + " ), ) } @@ -5966,8 +5966,8 @@ In roc, functions are always written as a lambda, like{} "# ), indoc!( - r#" - ── WEIRD PROVIDES ──────────────────────────────────────── /code/proj/Main.roc ─ + r" + ── WEIRD PROVIDES in /code/proj/Main.roc ─────────────────────────────────────── I am partway through parsing a header, but I got stuck here: @@ -5977,7 +5977,7 @@ In roc, functions are always written as a lambda, like{} I am expecting the `provides` keyword next, like provides [Animal, default, tame] - "# + " ), ) } @@ -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: @@ -6078,14 +6078,14 @@ In roc, functions are always written as a lambda, like{} fn missing_imports() { report_header_problem_as( indoc!( - r#" + r" interface Foobar exposes [main, Foo] - "# + " ), indoc!( - r#" - ── WEIRD IMPORTS ───────────────────────────────────────── /code/proj/Main.roc ─ + r" + ── WEIRD IMPORTS in /code/proj/Main.roc ──────────────────────────────────────── I am partway through parsing a header, but I got stuck here: @@ -6095,7 +6095,7 @@ In roc, functions are always written as a lambda, like{} I am expecting the `imports` keyword next, like imports [Animal, default, tame] - "# + " ), ) } @@ -6104,15 +6104,15 @@ In roc, functions are always written as a lambda, like{} fn exposes_identifier() { report_header_problem_as( indoc!( - r#" + r" interface Foobar exposes [main, @Foo] imports [pf.Task, Base64] - "# + " ), indoc!( - r#" - ── WEIRD EXPOSES ───────────────────────────────────────── /code/proj/Main.roc ─ + r" + ── WEIRD EXPOSES in /code/proj/Main.roc ──────────────────────────────────────── I am partway through parsing an `exposes` list, but I got stuck here: @@ -6123,7 +6123,7 @@ In roc, functions are always written as a lambda, like{} I was expecting a type name, value name or function name next, like exposes [Animal, default, tame] - "# + " ), ) } @@ -6132,15 +6132,15 @@ In roc, functions are always written as a lambda, like{} fn invalid_module_name() { report_header_problem_as( indoc!( - r#" + r" interface foobar exposes [main, @Foo] imports [pf.Task, Base64] - "# + " ), indoc!( - r#" - ── WEIRD MODULE NAME ───────────────────────────────────── /code/proj/Main.roc ─ + r" + ── WEIRD MODULE NAME in /code/proj/Main.roc ──────────────────────────────────── I am partway through parsing a header, but got stuck here: @@ -6149,7 +6149,7 @@ In roc, functions are always written as a lambda, like{} I am expecting a module name next, like BigNum or Main. Module names must start with an uppercase letter. - "# + " ), ) } @@ -6158,15 +6158,15 @@ In roc, functions are always written as a lambda, like{} fn invalid_app_name() { report_header_problem_as( indoc!( - r#" + r" app foobar exposes [main, @Foo] imports [pf.Task, Base64] - "# + " ), 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: @@ -6183,14 +6183,14 @@ In roc, functions are always written as a lambda, like{} test_report!( apply_unary_negative, indoc!( - r#" + r" foo = 3 -foo 1 2 - "# + " ), - @r###" - ── TOO MANY ARGS ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TOO MANY ARGS in /code/proj/Main.roc ──────────────────────────────────────── This value is not a function, but it was given 2 arguments: @@ -6198,20 +6198,20 @@ In roc, functions are always written as a lambda, like{} ^^^^ Are there any missing commas? Or missing parentheses? - "### + " ); test_report!( apply_unary_not, indoc!( - r#" + r" foo = Bool.true !foo 1 2 - "# + " ), - @r###" - ── TOO MANY ARGS ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TOO MANY ARGS in /code/proj/Main.roc ──────────────────────────────────────── This value is not a function, but it was given 2 arguments: @@ -6219,21 +6219,21 @@ In roc, functions are always written as a lambda, like{} ^^^^ Are there any missing commas? Or missing parentheses? - "### + " ); test_report!( applied_tag_function, indoc!( - r#" + r" x : List [Foo Str] x = List.map [1, 2] Foo x - "# + " ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the body of the `x` definition: @@ -6248,18 +6248,18 @@ In roc, functions are always written as a lambda, like{} But the type annotation on `x` says it should be: List [Foo Str] - "### + " ); test_report!( pattern_in_parens_open, indoc!( - r#" + r" \( a - "# + " ), - @r###" - ── UNFINISHED PARENTHESES ──────────────── tmp/pattern_in_parens_open/Test.roc ─ + @r" + ── UNFINISHED PARENTHESES in tmp/pattern_in_parens_open/Test.roc ─────────────── I am partway through parsing a pattern in parentheses, but I got stuck here: @@ -6271,18 +6271,18 @@ In roc, functions are always written as a lambda, like{} I was expecting to see a closing parenthesis before this, so try adding a ) and see if that helps? - "### + " ); test_report!( pattern_in_parens_end_comma, indoc!( - r#" + r" \( a, - "# + " ), - @r###" - ── UNFINISHED PARENTHESES ─────────── tmp/pattern_in_parens_end_comma/Test.roc ─ + @r" + ── 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: @@ -6294,18 +6294,18 @@ In roc, functions are always written as a lambda, like{} I was expecting to see a closing parenthesis before this, so try adding a ) and see if that helps? - "### + " ); test_report!( pattern_in_parens_end, indoc!( - r#" + r" \( a - "# + " ), - @r###" - ── UNFINISHED PARENTHESES ───────────────── tmp/pattern_in_parens_end/Test.roc ─ + @r" + ── UNFINISHED PARENTHESES in tmp/pattern_in_parens_end/Test.roc ──────────────── I am partway through parsing a pattern in parentheses, but I got stuck here: @@ -6317,19 +6317,19 @@ In roc, functions are always written as a lambda, like{} I was expecting to see a closing parenthesis before this, so try adding a ) and see if that helps? - "### + " ); test_report!( unfinished_closure_pattern_in_parens, indoc!( - r#" + r" x = \( a ) - "# + " ), - @r###" - ── UNFINISHED FUNCTION ───── tmp/unfinished_closure_pattern_in_parens/Test.roc ─ + @r" + ── UNFINISHED FUNCTION in tmp/unfinished_closure_pattern_in_parens/Test.roc ──── I was partway through parsing a function, but I got stuck here: @@ -6338,18 +6338,18 @@ In roc, functions are always written as a lambda, like{} ^ I just saw a pattern, so I was expecting to see a -> next. - "### + " ); test_report!( pattern_in_parens_indent_open, indoc!( - r#" + r" \( - "# + " ), - @r###" - ── UNFINISHED PARENTHESES ───────── tmp/pattern_in_parens_indent_open/Test.roc ─ + @r" + ── 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: @@ -6361,7 +6361,7 @@ In roc, functions are always written as a lambda, like{} I was expecting to see a closing parenthesis before this, so try adding a ) and see if that helps? - "### + " ); test_report!( @@ -6373,8 +6373,8 @@ In roc, functions are always written as a lambda, like{} x + 1 "# ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This 2nd argument to `map` has an unexpected type: @@ -6389,7 +6389,7 @@ In roc, functions are always written as a lambda, like{} But `map` needs its 2nd argument to be: Str -> Num * - "### + "# ); test_report!( @@ -6401,8 +6401,8 @@ In roc, functions are always written as a lambda, like{} 4 "# ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This `expect` condition needs to be a Bool: @@ -6415,21 +6415,21 @@ In roc, functions are always written as a lambda, like{} But I need every `expect` condition to evaluate to a Bool—either `Bool.true` or `Bool.false`. - "### + "# ); test_report!( num_too_general_wildcard, indoc!( - r#" + r" mult : Num.Num *, Num.F64 -> Num.F64 mult = \a, b -> a * b mult 0 0 - "# + " ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── 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: @@ -6459,21 +6459,21 @@ In roc, functions are always written as a lambda, like{} But the type annotation on `mult` says it should be: F64 - "### + " ); test_report!( num_too_general_named, indoc!( - r#" + r" mult : Num.Num a, Num.F64 -> Num.F64 mult = \a, b -> a * b mult 0 0 - "# + " ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── 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: @@ -6503,7 +6503,7 @@ In roc, functions are always written as a lambda, like{} But the type annotation on `mult` says it should be: F64 - "### + " ); test_report!( @@ -6522,8 +6522,8 @@ In roc, functions are always written as a lambda, like{} canIGo "# ), - @r###" - ── DUPLICATE NAME ──────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── 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: @@ -6541,7 +6541,7 @@ In roc, functions are always written as a lambda, like{} ^^^^^^^^ Are there missing parentheses? - "### + " ); test_report!( @@ -6560,8 +6560,8 @@ In roc, functions are always written as a lambda, like{} canIGo "# ), - @r###" - ── DUPLICATE NAME ──────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── 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: @@ -6579,21 +6579,21 @@ In roc, functions are always written as a lambda, like{} ^^^^^^^^^^^^ Are there missing parentheses? - "### + " ); test_report!( inference_var_conflict_in_rigid_links, indoc!( - r#" + r" f : a -> (_ -> b) where a implements Eq f = \x -> \y -> if x == y then x else y f - "# + " ), // TODO: We should tell the user that we inferred `_` as `a` - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the body of the `f` definition: @@ -6613,21 +6613,21 @@ In roc, functions are always written as a lambda, like{} Your code seems to be saying they are the same though. Maybe they should be the same in your type annotation? Maybe your code uses them in a weird way? - "### + " ); test_report!( error_wildcards_are_related, indoc!( - r#" + r" f : * -> * f = \x -> x f - "# + " ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the body of the `f` definition: @@ -6645,21 +6645,21 @@ In roc, functions are always written as a lambda, like{} Tip: Any connection between types must use a named type variable, not a `*`! Maybe the annotation on `f` should have a named type variable in place of the `*`? - "### + " ); test_report!( error_nested_wildcards_are_related, indoc!( - r#" + r" f : a, b, * -> {x: a, y: b, z: *} f = \x, y, z -> {x, y, z} f - "# + " ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the body of the `f` definition: @@ -6682,13 +6682,13 @@ In roc, functions are always written as a lambda, like{} Tip: Any connection between types must use a named type variable, not a `*`! Maybe the annotation on `f` should have a named type variable in place of the `*`? - "### + " ); test_report!( error_wildcards_are_related_in_nested_defs, indoc!( - r#" + r" f : a, b, * -> * f = \_, _, x2 -> inner : * -> * @@ -6696,10 +6696,10 @@ In roc, functions are always written as a lambda, like{} inner x2 f - "# + " ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the body of the `inner` definition: @@ -6717,18 +6717,18 @@ In roc, functions are always written as a lambda, like{} Tip: Any connection between types must use a named type variable, not a `*`! Maybe the annotation on `inner` should have a named type variable in place of the `*`? - "### + " ); test_report!( error_inline_alias_not_an_alias, indoc!( - r#" + r" f : List elem -> [Nil, Cons elem a] as a - "# + " ), - @r###" - ── NOT AN INLINE ALIAS ────────── tmp/error_inline_alias_not_an_alias/Test.roc ─ + @r" + ── 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: @@ -6737,18 +6737,18 @@ In roc, functions are always written as a lambda, like{} Inline alias types must start with an uppercase identifier and be followed by zero or more type arguments, like Point or List a. - "### + " ); test_report!( error_inline_alias_qualified, indoc!( - r#" + r" f : List elem -> [Nil, Cons elem a] as Module.LinkedList a - "# + " ), - @r###" - ── QUALIFIED ALIAS NAME ──────────── tmp/error_inline_alias_qualified/Test.roc ─ + @r" + ── QUALIFIED ALIAS NAME in tmp/error_inline_alias_qualified/Test.roc ─────────── This type alias has a qualified name: @@ -6757,18 +6757,18 @@ In roc, functions are always written as a lambda, like{} An alias introduces a new name to the current scope, so it must be unqualified. - "### + " ); test_report!( error_inline_alias_argument_uppercase, indoc!( - r#" + r" f : List elem -> [Nil, Cons elem a] as LinkedList U - "# + " ), - @r###" - ── TYPE ARGUMENT NOT LOWERCASE ─ ...r_inline_alias_argument_uppercase/Test.roc ─ + @r" + ── TYPE ARGUMENT NOT LOWERCASE in ..._inline_alias_argument_uppercase/Test.roc ─ This alias type argument is not lowercase: @@ -6776,7 +6776,7 @@ In roc, functions are always written as a lambda, like{} ^ All type arguments must be lowercase. - "### + " ); test_report!( @@ -6791,8 +6791,8 @@ In roc, functions are always written as a lambda, like{} isEmpty (Name "boo") "# ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This 1st argument to `isEmpty` has an unexpected type: @@ -6812,23 +6812,23 @@ In roc, functions are always written as a lambda, like{} Tip: Can more type annotations be added? Type annotations always help me give more specific messages, and I think they could help a lot in this case - "### + "# ); test_report!( issue_2326, indoc!( - r#" + r" C a b : a -> D a b D a b : { a, b } f : C a Num.Nat -> D a Num.Nat f = \c -> c 6 f - "# + " ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This 1st argument to `c` has an unexpected type: @@ -6848,20 +6848,20 @@ In roc, functions are always written as a lambda, like{} it will only produce a `Num` value of a single specific type. Maybe change the type annotation to be more specific? Maybe change the code to be more general? - "### + " ); test_report!( issue_2380_annotations_only, indoc!( - r#" + r" F : F a : F a - "# + " ), - @r###" - ── CYCLIC ALIAS ────────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── CYCLIC ALIAS in /code/proj/Main.roc ───────────────────────────────────────── The `F` alias is self-recursive in an invalid way: @@ -6870,21 +6870,21 @@ In roc, functions are always written as a lambda, like{} Recursion in aliases is only allowed if recursion happens behind a tagged union, at least one variant of which is not recursive. - "### + " ); test_report!( issue_2380_typed_body, indoc!( - r#" + r" F : F a : F a = 1 a - "# + " ), - @r###" - ── CYCLIC ALIAS ────────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── CYCLIC ALIAS in /code/proj/Main.roc ───────────────────────────────────────── The `F` alias is self-recursive in an invalid way: @@ -6893,20 +6893,20 @@ In roc, functions are always written as a lambda, like{} Recursion in aliases is only allowed if recursion happens behind a tagged union, at least one variant of which is not recursive. - "### + " ); test_report!( issue_2380_alias_with_vars, indoc!( - r#" + r" F a b : F a b a : F Str Str a - "# + " ), - @r###" - ── CYCLIC ALIAS ────────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── CYCLIC ALIAS in /code/proj/Main.roc ───────────────────────────────────────── The `F` alias is self-recursive in an invalid way: @@ -6915,7 +6915,7 @@ In roc, functions are always written as a lambda, like{} Recursion in aliases is only allowed if recursion happens behind a tagged union, at least one variant of which is not recursive. - "### + " ); test_report!( @@ -6930,8 +6930,8 @@ In roc, functions are always written as a lambda, like{} job { inputs: ["build", "test"] } "# ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── The 1st argument to `job` is weird: @@ -6949,7 +6949,7 @@ In roc, functions are always written as a lambda, like{} Tip: To extract the `.inputs` field it must be non-optional, but the type says this field is optional. Learn more about optional fields at TODO. - "### + " ); test_report!( @@ -6965,8 +6965,8 @@ In roc, functions are always written as a lambda, like{} job { inputs: ["build", "test"] } "# ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the body of the `job` definition: @@ -6982,22 +6982,22 @@ In roc, functions are always written as a lambda, like{} But the type annotation on `job` says it should be: [Job { inputs : List a }]a as a - "### + " ); test_report!( nested_datatype, indoc!( - r#" + r" Nested a : [Chain a (Nested (List a)), Term] s : Nested Str s - "# + " ), - @r###" - ── NESTED DATATYPE ─────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── NESTED DATATYPE in /code/proj/Main.roc ────────────────────────────────────── `Nested` is a nested datatype. Here is one recursive usage of it: @@ -7012,20 +7012,20 @@ In roc, functions are always written as a lambda, like{} Nested datatypes are not supported in Roc. Hint: Consider rewriting the definition of `Nested` to use the recursive type with the same arguments. - "### + " ); test_report!( nested_datatype_inline, indoc!( - r#" + r" f : {} -> [Chain a (Nested (List a)), Term] as Nested a f - "# + " ), - @r###" - ── NESTED DATATYPE ─────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── NESTED DATATYPE in /code/proj/Main.roc ────────────────────────────────────── `Nested` is a nested datatype. Here is one recursive usage of it: @@ -7040,7 +7040,7 @@ In roc, functions are always written as a lambda, like{} Nested datatypes are not supported in Roc. Hint: Consider rewriting the definition of `Nested` to use the recursive type with the same arguments. - "### + " ); macro_rules! mismatched_suffix_tests { @@ -7054,10 +7054,10 @@ In roc, functions are always written as a lambda, like{} let bad_type = if $suffix == "u8" { "I8" } else { "U8" }; format!(indoc!( - r#" + r" use : Num.{} -> Num.U8 use {}{} - "# + " ), bad_type, number, $suffix) }, |golden| { @@ -7072,8 +7072,8 @@ In roc, functions are always written as a lambda, like{} }; let real = format!(indoc!( - r#" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This 1st argument to `use` has an unexpected type: @@ -7087,7 +7087,7 @@ In roc, functions are always written as a lambda, like{} But `use` needs its 1st argument to be: {} - "# + " ), number, $suffix, carets, kind, typ, bad_type); assert_eq!(golden, real); @@ -7124,11 +7124,11 @@ In roc, functions are always written as a lambda, like{} let bad_suffix = if $suffix == "u8" { "i8" } else { "u8" }; format!(indoc!( - r#" + r" when {}{} is {}{} -> 1 _ -> 1 - "# + " ), number, bad_suffix, number, $suffix) }, |golden| { @@ -7139,8 +7139,8 @@ In roc, functions are always written as a lambda, like{} let bad_type = if $suffix == "u8" { "I8" } else { "U8" }; let real = format!(indoc!( - r#" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── The branches of this `when` expression don't match the condition: @@ -7157,7 +7157,7 @@ In roc, functions are always written as a lambda, like{} {} The branches must be cases of the `when` condition's type! - "# + " ), number, bad_suffix, number, $suffix, bad_type, typ); assert_eq!(golden, real); @@ -7186,13 +7186,13 @@ In roc, functions are always written as a lambda, like{} test_report!( bad_numeric_literal_suffix, indoc!( - r#" + r" 1u256 - "# + " ), // TODO: link to number suffixes - @r###" - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── SYNTAX PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── This integer literal contains an invalid digit: @@ -7203,19 +7203,19 @@ In roc, functions are always written as a lambda, like{} 0-9, or have an integer suffix. Tip: Learn more about number literals at TODO - "### + " ); test_report!( numer_literal_multi_suffix, indoc!( - r#" + r" 1u8u8 - "# + " ), // TODO: link to number suffixes - @r###" - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── SYNTAX PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── This integer literal contains an invalid digit: @@ -7226,48 +7226,48 @@ In roc, functions are always written as a lambda, like{} 0-9, or have an integer suffix. Tip: Learn more about number literals at TODO - "### + " ); test_report!( int_literal_has_float_suffix, indoc!( - r#" + r" 0b1f32 - "# + " ), - @r###" - ── CONFLICTING NUMBER SUFFIX ───────────────────────────── /code/proj/Main.roc ─ + @r" + ── CONFLICTING NUMBER SUFFIX in /code/proj/Main.roc ──────────────────────────── This number literal is an integer, but it has a float suffix: 4│ 0b1f32 ^^^^^^ - "### + " ); test_report!( float_literal_has_int_suffix, indoc!( - r#" + r" 1.0u8 - "# + " ), - @r###" - ── CONFLICTING NUMBER SUFFIX ───────────────────────────── /code/proj/Main.roc ─ + @r" + ── CONFLICTING NUMBER SUFFIX in /code/proj/Main.roc ──────────────────────────── This number literal is a float, but it has an integer suffix: 4│ 1.0u8 ^^^^^ - "### + " ); test_report!( u8_overflow, "256u8", - @r###" - ── NUMBER OVERFLOWS SUFFIX ─────────────────────────────── /code/proj/Main.roc ─ + @r" + ── NUMBER OVERFLOWS SUFFIX in /code/proj/Main.roc ────────────────────────────── This integer literal overflows the type indicated by its suffix: @@ -7276,14 +7276,14 @@ In roc, functions are always written as a lambda, like{} Tip: The suffix indicates this integer is a U8, whose maximum value is 255. - "### + " ); test_report!( negative_u8, "-1u8", - @r###" - ── NUMBER UNDERFLOWS SUFFIX ────────────────────────────── /code/proj/Main.roc ─ + @r" + ── NUMBER UNDERFLOWS SUFFIX in /code/proj/Main.roc ───────────────────────────── This integer literal underflows the type indicated by its suffix: @@ -7292,14 +7292,14 @@ In roc, functions are always written as a lambda, like{} Tip: The suffix indicates this integer is a U8, whose minimum value is 0. - "### + " ); test_report!( u16_overflow, "65536u16", - @r###" - ── NUMBER OVERFLOWS SUFFIX ─────────────────────────────── /code/proj/Main.roc ─ + @r" + ── NUMBER OVERFLOWS SUFFIX in /code/proj/Main.roc ────────────────────────────── This integer literal overflows the type indicated by its suffix: @@ -7308,14 +7308,14 @@ In roc, functions are always written as a lambda, like{} Tip: The suffix indicates this integer is a U16, whose maximum value is 65535. - "### + " ); test_report!( negative_u16, "-1u16", - @r###" - ── NUMBER UNDERFLOWS SUFFIX ────────────────────────────── /code/proj/Main.roc ─ + @r" + ── NUMBER UNDERFLOWS SUFFIX in /code/proj/Main.roc ───────────────────────────── This integer literal underflows the type indicated by its suffix: @@ -7324,14 +7324,14 @@ In roc, functions are always written as a lambda, like{} Tip: The suffix indicates this integer is a U16, whose minimum value is 0. - "### + " ); test_report!( u32_overflow, "4_294_967_296u32", - @r###" - ── NUMBER OVERFLOWS SUFFIX ─────────────────────────────── /code/proj/Main.roc ─ + @r" + ── NUMBER OVERFLOWS SUFFIX in /code/proj/Main.roc ────────────────────────────── This integer literal overflows the type indicated by its suffix: @@ -7340,14 +7340,14 @@ In roc, functions are always written as a lambda, like{} Tip: The suffix indicates this integer is a U32, whose maximum value is 4_294_967_295. - "### + " ); test_report!( negative_u32, "-1u32", - @r###" - ── NUMBER UNDERFLOWS SUFFIX ────────────────────────────── /code/proj/Main.roc ─ + @r" + ── NUMBER UNDERFLOWS SUFFIX in /code/proj/Main.roc ───────────────────────────── This integer literal underflows the type indicated by its suffix: @@ -7356,14 +7356,14 @@ In roc, functions are always written as a lambda, like{} Tip: The suffix indicates this integer is a U32, whose minimum value is 0. - "### + " ); test_report!( u64_overflow, "18_446_744_073_709_551_616u64", - @r###" - ── NUMBER OVERFLOWS SUFFIX ─────────────────────────────── /code/proj/Main.roc ─ + @r" + ── NUMBER OVERFLOWS SUFFIX in /code/proj/Main.roc ────────────────────────────── This integer literal overflows the type indicated by its suffix: @@ -7372,14 +7372,14 @@ In roc, functions are always written as a lambda, like{} Tip: The suffix indicates this integer is a U64, whose maximum value is 18_446_744_073_709_551_615. - "### + " ); test_report!( negative_u64, "-1u64", - @r###" - ── NUMBER UNDERFLOWS SUFFIX ────────────────────────────── /code/proj/Main.roc ─ + @r" + ── NUMBER UNDERFLOWS SUFFIX in /code/proj/Main.roc ───────────────────────────── This integer literal underflows the type indicated by its suffix: @@ -7388,14 +7388,14 @@ In roc, functions are always written as a lambda, like{} Tip: The suffix indicates this integer is a U64, whose minimum value is 0. - "### + " ); test_report!( negative_u128, "-1u128", - @r###" - ── NUMBER UNDERFLOWS SUFFIX ────────────────────────────── /code/proj/Main.roc ─ + @r" + ── NUMBER UNDERFLOWS SUFFIX in /code/proj/Main.roc ───────────────────────────── This integer literal underflows the type indicated by its suffix: @@ -7404,14 +7404,14 @@ In roc, functions are always written as a lambda, like{} Tip: The suffix indicates this integer is a U128, whose minimum value is 0. - "### + " ); test_report!( i8_overflow, "128i8", - @r###" - ── NUMBER OVERFLOWS SUFFIX ─────────────────────────────── /code/proj/Main.roc ─ + @r" + ── NUMBER OVERFLOWS SUFFIX in /code/proj/Main.roc ────────────────────────────── This integer literal overflows the type indicated by its suffix: @@ -7420,14 +7420,14 @@ In roc, functions are always written as a lambda, like{} Tip: The suffix indicates this integer is a I8, whose maximum value is 127. - "### + " ); test_report!( i8_underflow, "-129i8", - @r###" - ── NUMBER UNDERFLOWS SUFFIX ────────────────────────────── /code/proj/Main.roc ─ + @r" + ── NUMBER UNDERFLOWS SUFFIX in /code/proj/Main.roc ───────────────────────────── This integer literal underflows the type indicated by its suffix: @@ -7436,14 +7436,14 @@ In roc, functions are always written as a lambda, like{} Tip: The suffix indicates this integer is a I8, whose minimum value is -128. - "### + " ); test_report!( i16_overflow, "32768i16", - @r###" - ── NUMBER OVERFLOWS SUFFIX ─────────────────────────────── /code/proj/Main.roc ─ + @r" + ── NUMBER OVERFLOWS SUFFIX in /code/proj/Main.roc ────────────────────────────── This integer literal overflows the type indicated by its suffix: @@ -7452,14 +7452,14 @@ In roc, functions are always written as a lambda, like{} Tip: The suffix indicates this integer is a I16, whose maximum value is 32767. - "### + " ); test_report!( i16_underflow, "-32769i16", - @r###" - ── NUMBER UNDERFLOWS SUFFIX ────────────────────────────── /code/proj/Main.roc ─ + @r" + ── NUMBER UNDERFLOWS SUFFIX in /code/proj/Main.roc ───────────────────────────── This integer literal underflows the type indicated by its suffix: @@ -7468,14 +7468,14 @@ In roc, functions are always written as a lambda, like{} Tip: The suffix indicates this integer is a I16, whose minimum value is -32768. - "### + " ); test_report!( i32_overflow, "2_147_483_648i32", - @r###" - ── NUMBER OVERFLOWS SUFFIX ─────────────────────────────── /code/proj/Main.roc ─ + @r" + ── NUMBER OVERFLOWS SUFFIX in /code/proj/Main.roc ────────────────────────────── This integer literal overflows the type indicated by its suffix: @@ -7484,14 +7484,14 @@ In roc, functions are always written as a lambda, like{} Tip: The suffix indicates this integer is a I32, whose maximum value is 2_147_483_647. - "### + " ); test_report!( i32_underflow, "-2_147_483_649i32", - @r###" - ── NUMBER UNDERFLOWS SUFFIX ────────────────────────────── /code/proj/Main.roc ─ + @r" + ── NUMBER UNDERFLOWS SUFFIX in /code/proj/Main.roc ───────────────────────────── This integer literal underflows the type indicated by its suffix: @@ -7500,14 +7500,14 @@ In roc, functions are always written as a lambda, like{} Tip: The suffix indicates this integer is a I32, whose minimum value is -2_147_483_648. - "### + " ); test_report!( i64_overflow, "9_223_372_036_854_775_808i64", - @r###" - ── NUMBER OVERFLOWS SUFFIX ─────────────────────────────── /code/proj/Main.roc ─ + @r" + ── NUMBER OVERFLOWS SUFFIX in /code/proj/Main.roc ────────────────────────────── This integer literal overflows the type indicated by its suffix: @@ -7516,14 +7516,14 @@ In roc, functions are always written as a lambda, like{} Tip: The suffix indicates this integer is a I64, whose maximum value is 9_223_372_036_854_775_807. - "### + " ); test_report!( i64_underflow, "-9_223_372_036_854_775_809i64", - @r###" - ── NUMBER UNDERFLOWS SUFFIX ────────────────────────────── /code/proj/Main.roc ─ + @r" + ── NUMBER UNDERFLOWS SUFFIX in /code/proj/Main.roc ───────────────────────────── This integer literal underflows the type indicated by its suffix: @@ -7532,14 +7532,14 @@ In roc, functions are always written as a lambda, like{} Tip: The suffix indicates this integer is a I64, whose minimum value is -9_223_372_036_854_775_808. - "### + " ); test_report!( i128_overflow, "170_141_183_460_469_231_731_687_303_715_884_105_728i128", - @r###" - ── NUMBER OVERFLOWS SUFFIX ─────────────────────────────── /code/proj/Main.roc ─ + @r" + ── NUMBER OVERFLOWS SUFFIX in /code/proj/Main.roc ────────────────────────────── This integer literal overflows the type indicated by its suffix: @@ -7548,20 +7548,20 @@ In roc, functions are always written as a lambda, like{} Tip: The suffix indicates this integer is a I128, whose maximum value is 170_141_183_460_469_231_731_687_303_715_884_105_727. - "### + " ); test_report!( list_get_negative_number, indoc!( - r#" + r" List.get [1,2,3] -1 - "# + " ), // 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 ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This 2nd argument to `get` has an unexpected type: @@ -7575,19 +7575,19 @@ In roc, functions are always written as a lambda, like{} But `get` needs its 2nd argument to be: Nat - "### + " ); test_report!( list_get_negative_number_indirect, indoc!( - r#" + r" a = -9_223_372_036_854 List.get [1,2,3] a - "# + " ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This 2nd argument to `get` has an unexpected type: @@ -7601,20 +7601,20 @@ In roc, functions are always written as a lambda, like{} But `get` needs its 2nd argument to be: Nat - "### + " ); test_report!( list_get_negative_number_double_indirect, indoc!( - r#" + r" a = -9_223_372_036_854 b = a List.get [1,2,3] b - "# + " ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This 2nd argument to `get` has an unexpected type: @@ -7628,20 +7628,20 @@ In roc, functions are always written as a lambda, like{} But `get` needs its 2nd argument to be: Nat - "### + " ); test_report!( compare_unsigned_to_signed, indoc!( - r#" + r" when -1 is 1u8 -> 1 _ -> 1 - "# + " ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── The branches of this `when` expression don't match the condition: @@ -7658,21 +7658,21 @@ In roc, functions are always written as a lambda, like{} U8 The branches must be cases of the `when` condition's type! - "### + " ); test_report!( recursive_type_alias_is_newtype, indoc!( - r#" + r" R a : [Only (R a)] v : R Str v - "# + " ), - @r###" - ── CYCLIC ALIAS ────────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── CYCLIC ALIAS in /code/proj/Main.roc ───────────────────────────────────────── The `R` alias is self-recursive in an invalid way: @@ -7681,21 +7681,21 @@ In roc, functions are always written as a lambda, like{} Recursion in aliases is only allowed if recursion happens behind a tagged union, at least one variant of which is not recursive. - "### + " ); test_report!( recursive_type_alias_is_newtype_deep, indoc!( - r#" + r" R a : [Only { very: [Deep (R a)] }] v : R Str v - "# + " ), - @r###" - ── CYCLIC ALIAS ────────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── CYCLIC ALIAS in /code/proj/Main.roc ───────────────────────────────────────── The `R` alias is self-recursive in an invalid way: @@ -7704,22 +7704,22 @@ In roc, functions are always written as a lambda, like{} Recursion in aliases is only allowed if recursion happens behind a tagged union, at least one variant of which is not recursive. - "### + " ); test_report!( recursive_type_alias_is_newtype_mutual, indoc!( - r#" + r" Foo a : [Thing (Bar a)] Bar a : [Stuff (Foo a)] v : Bar Str v - "# + " ), - @r###" - ── CYCLIC ALIAS ────────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── CYCLIC ALIAS in /code/proj/Main.roc ───────────────────────────────────────── The `Foo` alias is recursive in an invalid way: @@ -7737,13 +7737,13 @@ In roc, functions are always written as a lambda, like{} Recursion in aliases is only allowed if recursion happens behind a tagged union, at least one variant of which is not recursive. - "### + " ); test_report!( issue_2458, indoc!( - r#" + r" Result a b : [Ok a, Err b] Foo a : [Blah (Result (Bar a) [])] @@ -7751,10 +7751,10 @@ In roc, functions are always written as a lambda, like{} v : Bar Str v - "# + " ), - @r###" - ── DUPLICATE NAME ──────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── DUPLICATE NAME in /code/proj/Main.roc ─────────────────────────────────────── This alias has the same name as a builtin: @@ -7763,18 +7763,18 @@ 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! - "### + " ); test_report!( opaque_type_not_in_scope, indoc!( - r#" + r" @Age 21 - "# + " ), - @r###" - ── OPAQUE TYPE NOT DEFINED ─────────────────────────────── /code/proj/Main.roc ─ + @r" + ── OPAQUE TYPE NOT DEFINED in /code/proj/Main.roc ────────────────────────────── The opaque type Age referenced here is not defined: @@ -7782,20 +7782,20 @@ In roc, functions are always written as a lambda, like{} ^^^^ Note: It looks like there are no opaque types declared in this scope yet! - "### + " ); test_report!( opaque_reference_not_opaque_type, indoc!( - r#" + r" Age : Num.U8 @Age 21 - "# + " ), - @r###" - ── OPAQUE TYPE NOT DEFINED ─────────────────────────────── /code/proj/Main.roc ─ + @r" + ── 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. @@ -7818,21 +7818,21 @@ 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. - "### + " ); test_report!( qualified_opaque_reference, indoc!( - r#" + r" OtherModule.@Age 21 - "# + " ), // TODO: get rid of the first error. Consider parsing OtherModule.@Age to completion // 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 ─ + @r" + ── 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: @@ -7850,25 +7850,25 @@ In roc, functions are always written as a lambda, like{} I was expecting to see an identifier next, like height. A complete qualified name looks something like Json.Decode.string. - "### + " ); test_report!( opaque_used_outside_declaration_scope, indoc!( - r#" + r" age = Age := Num.U8 21u8 @Age age - "# + " ), // TODO(opaques): there is a potential for a better error message here, if the usage of // `@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 ─ + @r" + ── 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: @@ -7886,7 +7886,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! - "### + " ); test_report!( @@ -7898,8 +7898,8 @@ In roc, functions are always written as a lambda, like{} alt "# ), - @r###" - ── MODULE NOT IMPORTED ─────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── MODULE NOT IMPORTED in /code/proj/Main.roc ────────────────────────────────── The `Task` module is not imported: @@ -7913,7 +7913,7 @@ In roc, functions are always written as a lambda, like{} List Num Box - "### + " ); test_report!( @@ -7930,8 +7930,8 @@ 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 ─ + @r#" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This expression is used in an unexpected way: @@ -7945,7 +7945,7 @@ In roc, functions are always written as a lambda, like{} But you are trying to use it as: U8 - "### + "# ); test_report!( @@ -7959,8 +7959,8 @@ In roc, functions are always written as a lambda, like{} else @F {} "# ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This expression is used in an unexpected way: @@ -7974,7 +7974,7 @@ In roc, functions are always written as a lambda, like{} But you are trying to use it as: Str - "### + " ); test_report!( @@ -7989,8 +7989,8 @@ In roc, functions are always written as a lambda, like{} v "# ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the body of the `v` definition: @@ -8010,25 +8010,25 @@ In roc, functions are always written as a lambda, like{} both types are the same opaque type. Did you mean to create an opaque type by wrapping it? If I have an opaque type Age := U32 I can create an instance of this opaque type by doing @Age 23. - "### + "# ); test_report!( opaque_mismatch_pattern_check, indoc!( - r#" + r" Age := Num.U8 f : Age -> Num.U8 f = \Age n -> n f - "# + " ), // 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 ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── The 1st argument to `f` is weird: @@ -8047,7 +8047,7 @@ In roc, functions are always written as a lambda, like{} both types are the same opaque type. Did you mean to create an opaque type by wrapping it? If I have an opaque type Age := U32 I can create an instance of this opaque type by doing @Age 23. - "### + " ); test_report!( @@ -8062,8 +8062,8 @@ In roc, functions are always written as a lambda, like{} @F {} -> "" "# ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── The 2nd pattern in this `when` does not match the previous ones: @@ -8077,7 +8077,7 @@ In roc, functions are always written as a lambda, like{} But all the previous branches match: F [A] - "### + "# ); test_report!( @@ -8093,8 +8093,8 @@ In roc, functions are always written as a lambda, like{} @F B -> "" "# ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── The branches of this `when` expression don't match the condition: @@ -8115,7 +8115,7 @@ In roc, functions are always written as a lambda, like{} Tip: Looks like the branches are missing coverage of the `C` tag. Tip: Maybe you need to add a catch-all branch, like `_`? - "### + "# ); test_report!( @@ -8131,8 +8131,8 @@ In roc, functions are always written as a lambda, like{} @F 2 -> "" "# ), - @r###" - ── UNSAFE PATTERN ──────────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── UNSAFE PATTERN in /code/proj/Main.roc ─────────────────────────────────────── This `when` does not cover all the possibilities: @@ -8145,13 +8145,13 @@ In roc, functions are always written as a lambda, like{} @F _ I would have to crash if I saw one of those! Add branches for them! - "### + "# ); test_report!( let_polymorphism_with_scoped_type_variables, indoc!( - r#" + r" f : a -> a f = \x -> y : a -> a @@ -8162,10 +8162,10 @@ In roc, functions are always written as a lambda, like{} (\_ -> x1) n f - "# + " ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This 1st argument to `y` has an unexpected type: @@ -8185,7 +8185,7 @@ In roc, functions are always written as a lambda, like{} it will only produce a `U8` value of a single specific type. Maybe change the type annotation to be more specific? Maybe change the code to be more general? - "### + " ); test_report!( @@ -8197,8 +8197,8 @@ In roc, functions are always written as a lambda, like{} A if Bool.true -> "" "# ), - @r###" - ── UNSAFE PATTERN ──────────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── UNSAFE PATTERN in /code/proj/Main.roc ─────────────────────────────────────── This `when` does not cover all the possibilities: @@ -8210,19 +8210,19 @@ In roc, functions are always written as a lambda, like{} A (note the lack of an if clause) I would have to crash if I saw one of those! Add branches for them! - "### + "# ); test_report!( invalid_record_extension_type, indoc!( - r#" + r" f : { x : Num.Nat }[] f - "# + " ), - @r###" - ── INVALID_EXTENSION_TYPE ──────────────────────────────── /code/proj/Main.roc ─ + @r" + ── INVALID_EXTENSION_TYPE in /code/proj/Main.roc ─────────────────────────────── This record extension type is invalid: @@ -8231,19 +8231,19 @@ In roc, functions are always written as a lambda, like{} Note: A record extension variable can only contain a type variable or another record. - "### + " ); test_report!( invalid_tag_extension_type, indoc!( - r#" + r" f : [A]Str f - "# + " ), - @r###" - ── INVALID_EXTENSION_TYPE ──────────────────────────────── /code/proj/Main.roc ─ + @r" + ── INVALID_EXTENSION_TYPE in /code/proj/Main.roc ─────────────────────────────── This tag union extension type is invalid: @@ -8252,13 +8252,13 @@ In roc, functions are always written as a lambda, like{} Note: A tag union extension variable can only contain a type variable or another tag union. - "### + " ); test_report!( unknown_type, indoc!( - r#" + r" Type : [Constructor UnknownType] insertHelper : UnknownType, Type -> Type @@ -8267,10 +8267,10 @@ In roc, functions are always written as a lambda, like{} Constructor _ -> Constructor h insertHelper - "# + " ), - @r###" - ── UNRECOGNIZED NAME ───────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── 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. @@ -8297,21 +8297,21 @@ In roc, functions are always written as a lambda, like{} Unsigned8 Unsigned16 Unsigned64 - "### + " ); test_report!( ability_first_demand_not_indented_enough, indoc!( - r#" + r" MEq implements eq : a, a -> U64 where a implements MEq 1 - "# + " ), - @r###" - ── UNFINISHED ABILITY ── tmp/ability_first_demand_not_indented_enough/Test.roc ─ + @r" + ── 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: @@ -8321,22 +8321,22 @@ In roc, functions are always written as a lambda, like{} ^ I suspect this line is not indented enough (by 1 spaces) - "### + " ); test_report!( ability_demands_not_indented_with_first, indoc!( - r#" + r" MEq implements eq : a, a -> U64 where a implements MEq neq : a, a -> U64 where a implements MEq 1 - "# + " ), - @r#" - ── UNFINISHED ABILITY ─── tmp/ability_demands_not_indented_with_first/Test.roc ─ + @r" + ── 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: @@ -8345,21 +8345,21 @@ In roc, functions are always written as a lambda, like{} 6│ neq : a, a -> U64 where a implements MEq ^ - I suspect this line is indented too much (by 4 spaces)"# + I suspect this line is indented too much (by 4 spaces)" ); test_report!( ability_demand_value_has_args, indoc!( - r#" + r" MEq implements eq b c : a, a -> U64 where a implements MEq 1 - "# + " ), - @r#" - ── UNFINISHED ABILITY ───────────── tmp/ability_demand_value_has_args/Test.roc ─ + @r" + ── UNFINISHED ABILITY in tmp/ability_demand_value_has_args/Test.roc ──────────── I was partway through parsing an ability definition, but I got stuck here: @@ -8369,21 +8369,21 @@ In roc, functions are always written as a lambda, like{} ^ I was expecting to see a : annotating the signature of this value - next."# + next." ); test_report!( ability_non_signature_expression, indoc!( - r#" + r" MEq implements 123 1 - "# + " ), - @r###" - ── UNFINISHED ABILITY ────────── tmp/ability_non_signature_expression/Test.roc ─ + @r" + ── UNFINISHED ABILITY in tmp/ability_non_signature_expression/Test.roc ───────── I was partway through parsing an ability definition, but I got stuck here: @@ -8393,20 +8393,20 @@ In roc, functions are always written as a lambda, like{} ^ I was expecting to see a value signature next. - "### + " ); test_report!( wildcard_in_alias, indoc!( - r#" + r" I : Num.Int * a : I a - "# + " ), - @r###" - ── UNBOUND TYPE VARIABLE ───────────────────────────────── /code/proj/Main.roc ─ + @r" + ── UNBOUND TYPE VARIABLE in /code/proj/Main.roc ──────────────────────────────── The definition of `I` has an unbound type variable: @@ -8415,20 +8415,20 @@ In roc, functions are always written as a lambda, like{} Tip: Type variables must be bound before the `:`. Perhaps you intended to add a type parameter to this type? - "### + " ); test_report!( wildcard_in_opaque, indoc!( - r#" + r" I := Num.Int * a : I a - "# + " ), - @r###" - ── UNBOUND TYPE VARIABLE ───────────────────────────────── /code/proj/Main.roc ─ + @r" + ── UNBOUND TYPE VARIABLE in /code/proj/Main.roc ──────────────────────────────── The definition of `I` has an unbound type variable: @@ -8437,20 +8437,20 @@ In roc, functions are always written as a lambda, like{} Tip: Type variables must be bound before the `:=`. Perhaps you intended to add a type parameter to this type? - "### + " ); test_report!( multiple_wildcards_in_alias, indoc!( - r#" + r" I : [A (Num.Int *), B (Num.Int *)] a : I a - "# + " ), - @r###" - ── UNBOUND TYPE VARIABLE ───────────────────────────────── /code/proj/Main.roc ─ + @r" + ── UNBOUND TYPE VARIABLE in /code/proj/Main.roc ──────────────────────────────── The definition of `I` has 2 unbound type variables. @@ -8461,20 +8461,20 @@ In roc, functions are always written as a lambda, like{} Tip: Type variables must be bound before the `:`. Perhaps you intended to add a type parameter to this type? - "### + " ); test_report!( inference_var_in_alias, indoc!( - r#" + r" I : Num.Int _ a : I a - "# + " ), - @r###" - ── UNBOUND TYPE VARIABLE ───────────────────────────────── /code/proj/Main.roc ─ + @r" + ── UNBOUND TYPE VARIABLE in /code/proj/Main.roc ──────────────────────────────── The definition of `I` has an unbound type variable: @@ -8483,20 +8483,20 @@ In roc, functions are always written as a lambda, like{} Tip: Type variables must be bound before the `:`. Perhaps you intended to add a type parameter to this type? - "### + " ); test_report!( unbound_var_in_alias, indoc!( - r#" + r" I : Num.Int a a : I a - "# + " ), - @r###" - ── UNBOUND TYPE VARIABLE ───────────────────────────────── /code/proj/Main.roc ─ + @r" + ── UNBOUND TYPE VARIABLE in /code/proj/Main.roc ──────────────────────────────── The definition of `I` has an unbound type variable: @@ -8505,7 +8505,7 @@ In roc, functions are always written as a lambda, like{} Tip: Type variables must be bound before the `:`. Perhaps you intended to add a type parameter to this type? - "### + " ); test_report!( @@ -8518,8 +8518,8 @@ In roc, functions are always written as a lambda, like{} hash : a -> U64 where a implements MHash "# ), - @r###" - ── ABILITY HAS TYPE VARIABLES ──────────────────────────── /code/proj/Main.roc ─ + @r" + ── 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. @@ -8538,7 +8538,7 @@ In roc, functions are always written as a lambda, like{} If you didn't intend on using `MHash` then remove it so future readers of your code don't wonder why it is there. - "### + " ); test_report!( @@ -8550,14 +8550,14 @@ In roc, functions are always written as a lambda, like{} MHash implements hash : a, b -> Num.U64 where a implements MHash, b implements Bool.Bool "# ), - @r###" - ── IMPLEMENTS CLAUSE IS NOT AN ABILITY ─────────────────── /code/proj/Main.roc ─ + @r#" + ── IMPLEMENTS CLAUSE IS NOT AN ABILITY in /code/proj/Main.roc ────────────────── The type referenced in this "implements" clause is not an ability: 3│ MHash implements hash : a, b -> Num.U64 where a implements MHash, b implements Bool.Bool ^^^^^^^^^ - "### + "# ); test_report!( @@ -8569,8 +8569,8 @@ In roc, functions are always written as a lambda, like{} Ab1 implements ab1 : a -> {} where a implements Ab1, a implements Ab1 "# ), - @r#" - ── DUPLICATE NAME ──────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── DUPLICATE NAME in /code/proj/Main.roc ─────────────────────────────────────── The `a` name is first defined here: @@ -8584,7 +8584,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. - "# + " ); test_report!( @@ -8598,8 +8598,8 @@ In roc, functions are always written as a lambda, like{} Ability implements ab1 : a -> U64 where a implements Ability "# ), - @r#" - ── DUPLICATE NAME ──────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── DUPLICATE NAME in /code/proj/Main.roc ─────────────────────────────────────── The `Ability` name is first defined here: @@ -8613,7 +8613,7 @@ In roc, functions are always written as a lambda, like{} Since these abilities have the same name, it's easy to use the wrong one by accident. Give one of them a new name. - "# + " ); test_report!( @@ -8625,8 +8625,8 @@ In roc, functions are always written as a lambda, like{} Ability implements ab : {} -> {} "# ), - @r#" - ── ABILITY MEMBER MISSING IMPLEMENTS CLAUSE ────────────── /code/proj/Main.roc ─ + @r" + ── 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. @@ -8650,7 +8650,7 @@ In roc, functions are always written as a lambda, like{} If you didn't intend on using `Ability` then remove it so future readers of your code don't wonder why it is there. - "# + " ); test_report!( @@ -8662,8 +8662,8 @@ In roc, functions are always written as a lambda, like{} MEq implements eq : a, b -> Bool.Bool where a implements MEq, b implements MEq "# ), - @r#" - ── ABILITY MEMBER BINDS MULTIPLE VARIABLES ─────────────── /code/proj/Main.roc ─ + @r" + ── 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:` @@ -8676,7 +8676,7 @@ In roc, functions are always written as a lambda, like{} looking at specializations! Hint: Did you mean to only bind `a` to `MEq`? - "# + " ); test_report!( @@ -8690,8 +8690,8 @@ In roc, functions are always written as a lambda, like{} f : a -> Num.U64 where a implements MHash "# ), - @r###" - ── ILLEGAL IMPLEMENTS CLAUSE ───────────────────────────── /code/proj/Main.roc ─ + @r" + ── 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`: @@ -8715,7 +8715,7 @@ In roc, functions are always written as a lambda, like{} a implements MHash Otherwise, the function does not need to be part of the ability! - "### + " ); test_report!( @@ -8731,8 +8731,8 @@ In roc, functions are always written as a lambda, like{} hash = \@Id n -> n "# ), - @r#" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with this specialization of `hash`: @@ -8746,7 +8746,7 @@ In roc, functions are always written as a lambda, like{} But the type annotation on `hash` says it must match: Id -> U64 - "# + " ); test_report!( @@ -8764,8 +8764,8 @@ In roc, functions are always written as a lambda, like{} eq = \@Id m, @Id n -> m == n "# ), - @r###" - ── INCOMPLETE ABILITY IMPLEMENTATION ───────────────────── /code/proj/Main.roc ─ + @r" + ── INCOMPLETE ABILITY IMPLEMENTATION in /code/proj/Main.roc ──────────────────── This type does not fully implement the `MEq` ability: @@ -8775,7 +8775,7 @@ In roc, functions are always written as a lambda, like{} The following necessary members are missing implementations: le - "### + " ); test_report!( @@ -8790,8 +8790,8 @@ In roc, functions are always written as a lambda, like{} hash = \_ -> 0u64 "# ), - @r###" - ── UNUSED DEFINITION ───────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── UNUSED DEFINITION in /code/proj/Main.roc ──────────────────────────────────── `hash` is not used anywhere in your code. @@ -8800,7 +8800,7 @@ In roc, functions are always written as a lambda, like{} If you didn't intend on using `hash` then remove it so future readers of your code don't wonder why it is there. - "### + " ); test_report!( @@ -8819,8 +8819,8 @@ 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 ─ + @r" + ── 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: @@ -8854,7 +8854,7 @@ In roc, functions are always written as a lambda, like{} Specializations can only be made for concrete types. If you have a generic implementation for this value, perhaps you don't need an ability? - "### + " ); test_report!( @@ -8872,8 +8872,8 @@ In roc, functions are always written as a lambda, like{} hash = \@One _ -> 0u64 "# ), - @r###" - ── OVERLOADED SPECIALIZATION ───────────────────────────── /code/proj/Main.roc ─ + @r" + ── OVERLOADED SPECIALIZATION in /code/proj/Main.roc ──────────────────────────── This ability member specialization is already claimed to specialize another opaque type: @@ -8885,7 +8885,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! - "### + " ); test_report!( @@ -8903,8 +8903,8 @@ In roc, functions are always written as a lambda, like{} eq = \@You {}, @AndI {} -> False "# ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with this specialization of `eq`: @@ -8920,7 +8920,7 @@ In roc, functions are always written as a lambda, like{} You, You -> Bool Tip: Did you mean to use `Bool.false` rather than `False`? - "### + " ); test_report!( @@ -8938,8 +8938,8 @@ In roc, functions are always written as a lambda, like{} hash = \@Id n -> n "# ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the body of the `hash` definition: @@ -8954,7 +8954,7 @@ In roc, functions are always written as a lambda, like{} But the type annotation on `hash` says it should be: U32 - "### + " ); test_report!( @@ -8979,8 +8979,8 @@ In roc, functions are always written as a lambda, like{} } "# ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── 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: @@ -9001,7 +9001,7 @@ In roc, functions are always written as a lambda, like{} ^^^^^^^^ The type `User` does not fully implement the ability `MHash`. - "### + " ); test_report!( @@ -9017,8 +9017,8 @@ In roc, functions are always written as a lambda, like{} 123 "# ), - @r#" - ── ABILITY NOT ON TOP-LEVEL ────────────────────────────── /code/proj/Main.roc ─ + @r" + ── ABILITY NOT ON TOP-LEVEL in /code/proj/Main.roc ───────────────────────────── This ability definition is not on the top-level of a module: @@ -9026,7 +9026,7 @@ In roc, functions are always written as a lambda, like{} 5│> hash : a -> U64 where a implements MHash Abilities can only be defined on the top-level of a Roc module. - "# + " ); test_report!( @@ -9045,8 +9045,8 @@ In roc, functions are always written as a lambda, like{} hashable = @Id 15 "# ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the body of the `hashable` definition: @@ -9067,7 +9067,7 @@ In roc, functions are always written as a lambda, like{} But, I see that the type is only ever used as a a `Id` value. Can you replace `a` with a more specific type? - "### + " ); test_report!( @@ -9091,8 +9091,8 @@ In roc, functions are always written as a lambda, like{} result = mulMHashes (@Id 100) (@Three {}) "# ), - @r###" - ── ABILITY USED AS TYPE ────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── 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: @@ -9119,7 +9119,7 @@ In roc, functions are always written as a lambda, like{} Hint: Perhaps you meant to include an `implements` annotation, like b implements MHash - "### + " ); test_report!( @@ -9135,8 +9135,8 @@ In roc, functions are always written as a lambda, like{} foo "# ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── The branches of this `when` expression don't match the condition: @@ -9158,7 +9158,7 @@ In roc, functions are always written as a lambda, like{} ] The branches must be cases of the `when` condition's type! - "### + "# ); // from https://github.com/roc-lang/roc/commit/1372737f5e53ee5bb96d7e1b9593985e5537023a @@ -9169,11 +9169,11 @@ In roc, functions are always written as a lambda, like{} test_report!( always_function, indoc!( - r#" + r" always = \val -> \_ -> val always - "# + " ), @"" ); @@ -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: @@ -9260,8 +9260,8 @@ In roc, functions are always written as a lambda, like{} default {} "# ), - @r#" - ── SPECIALIZATION NOT ON TOP-LEVEL ─────────────────────── /code/proj/Main.roc ─ + @r" + ── SPECIALIZATION NOT ON TOP-LEVEL in /code/proj/Main.roc ────────────────────── This specialization of the `default` ability member is in a nested scope: @@ -9270,7 +9270,7 @@ In roc, functions are always written as a lambda, like{} ^^^^^^^ Specializations can only be defined on the top-level of a module. - "# + " ); test_report!( @@ -9285,8 +9285,8 @@ In roc, functions are always written as a lambda, like{} Job lst -> lst == "" "# ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This 2nd argument to == has an unexpected type: @@ -9300,7 +9300,7 @@ In roc, functions are always written as a lambda, like{} But == needs its 2nd argument to be: List [Job ∞] as ∞ - "### + "# ); test_report!( @@ -9321,8 +9321,8 @@ In roc, functions are always written as a lambda, like{} go goal new "# ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── 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`: @@ -9368,13 +9368,13 @@ In roc, functions are always written as a lambda, like{} infinitely. Set ∞ - "### + " ); test_report!( cycle_through_non_function, indoc!( - r#" + r" force : ({} -> I64) -> I64 force = \eval -> eval {} @@ -9383,10 +9383,10 @@ In roc, functions are always written as a lambda, like{} t2 = t1 {} t2 - "# + " ), - @r#" - ── CIRCULAR DEFINITION ─────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── CIRCULAR DEFINITION in /code/proj/Main.roc ────────────────────────────────── The `t1` definition is causing a very tricky infinite loop: @@ -9401,7 +9401,7 @@ In roc, functions are always written as a lambda, like{} │ ↓ │ t2 └─────┘ - "# + " ); test_report!( @@ -9413,8 +9413,8 @@ In roc, functions are always written as a lambda, like{} main = Encode.toEncoder \x -> x "# ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This expression has a type that does not implement the abilities it's expected to: @@ -9426,7 +9426,7 @@ In roc, functions are always written as a lambda, like{} a -> a Note: `Encoding` cannot be generated for functions. - "### + " ); test_report!( @@ -9441,8 +9441,8 @@ 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 ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This expression has a type that does not implement the abilities it's expected to: @@ -9461,7 +9461,7 @@ In roc, functions are always written as a lambda, like{} Tip: `A` does not implement `Encoding`. Consider adding a custom implementation or `implements Encode.Encoding` to the definition of `A`. - "### + " ); test_report!( @@ -9478,8 +9478,8 @@ In roc, functions are always written as a lambda, like{} t2 = t1 {} "# ), - @r#" - ── CIRCULAR DEFINITION ─────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── CIRCULAR DEFINITION in /code/proj/Main.roc ────────────────────────────────── The `t1` definition is causing a very tricky infinite loop: @@ -9494,7 +9494,7 @@ In roc, functions are always written as a lambda, like{} │ ↓ │ t2 └─────┘ - "# + " ); test_report!( @@ -9508,8 +9508,8 @@ In roc, functions are always written as a lambda, like{} A := U8 implements [MEq {eq}] "# ), - @r###" - ── IMPLEMENTATION NOT FOUND ────────────────────────────── /code/proj/Main.roc ─ + @r" + ── 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: @@ -9530,7 +9530,7 @@ In roc, functions are always written as a lambda, like{} The following necessary members are missing implementations: eq - "### + " ); test_report!( @@ -9546,8 +9546,8 @@ In roc, functions are always written as a lambda, like{} myMEq = \m, n -> m == n "# ), - @r###" - ── UNRECOGNIZED NAME ───────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── 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: @@ -9571,7 +9571,7 @@ In roc, functions are always written as a lambda, like{} The following necessary members are missing implementations: eq - "### + " ); test_report!( @@ -9587,8 +9587,8 @@ In roc, functions are always written as a lambda, like{} myMEq = \m, n -> m == n "# ), - @r###" - ── OPTIONAL ABILITY IMPLEMENTATION ─────────────────────── /code/proj/Main.roc ─ + @r" + ── 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: @@ -9609,7 +9609,7 @@ In roc, functions are always written as a lambda, like{} The following necessary members are missing implementations: eq - "### + " ); test_report!( @@ -9625,8 +9625,8 @@ In roc, functions are always written as a lambda, like{} myEncoder = 1 "# ), - @r###" - ── OPTIONAL ABILITY IMPLEMENTATION ─────────────────────── /code/proj/Main.roc ─ + @r" + ── 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: @@ -9649,7 +9649,7 @@ In roc, functions are always written as a lambda, like{} The following necessary members are missing implementations: toEncoder - "### + " ); test_report!( @@ -9663,8 +9663,8 @@ In roc, functions are always written as a lambda, like{} A := U8 implements [ MEq {eq : Bool.eq} ] "# ), - @r###" - ── QUALIFIED ABILITY IMPLEMENTATION ────────────────────── /code/proj/Main.roc ─ + @r" + ── 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: @@ -9684,7 +9684,7 @@ In roc, functions are always written as a lambda, like{} The following necessary members are missing implementations: eq - "### + " ); test_report!( @@ -9698,8 +9698,8 @@ In roc, functions are always written as a lambda, like{} A := U8 implements [ MEq {eq : \m, n -> m == n} ] "# ), - @r###" - ── ABILITY IMPLEMENTATION NOT IDENTIFIER ───────────────── /code/proj/Main.roc ─ + @r" + ── 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: @@ -9721,7 +9721,7 @@ In roc, functions are always written as a lambda, like{} The following necessary members are missing implementations: eq - "### + " ); test_report!( @@ -9737,8 +9737,8 @@ In roc, functions are always written as a lambda, like{} eqA = \@A m, @A n -> m == n "# ), - @r###" - ── DUPLICATE IMPLEMENTATION ────────────────────────────── /code/proj/Main.roc ─ + @r" + ── DUPLICATE IMPLEMENTATION in /code/proj/Main.roc ───────────────────────────── This ability member implementation is duplicate: @@ -9751,7 +9751,7 @@ In roc, functions are always written as a lambda, like{} ^^^^^^^ Only one custom implementation can be defined for an ability member. - "### + " ); test_report!( @@ -9765,8 +9765,8 @@ In roc, functions are always written as a lambda, like{} A := U8 implements [ Foo {} ] "# ), - @r###" - ── NOT AN ABILITY ──────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── NOT AN ABILITY in /code/proj/Main.roc ─────────────────────────────────────── This identifier is not an ability in scope: @@ -9774,7 +9774,7 @@ In roc, functions are always written as a lambda, like{} ^^^ Only abilities can be implemented. - "### + " ); test_report!( @@ -9788,8 +9788,8 @@ In roc, functions are always written as a lambda, like{} A := {} implements [Ab] "# ), - @r###" - ── ILLEGAL DERIVE ──────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── ILLEGAL DERIVE in /code/proj/Main.roc ─────────────────────────────────────── This ability cannot be derived: @@ -9799,7 +9799,7 @@ In roc, functions are always written as a lambda, like{} Only builtin abilities can be derived. Note: The builtin abilities are `Encoding`, `Decoding`, `Hash`, `Eq`, `Inspect` - "### + " ); test_report!( @@ -9811,8 +9811,8 @@ In roc, functions are always written as a lambda, like{} A a := a -> a implements [Encode.Encoding] "# ), - @r###" - ── INCOMPLETE ABILITY IMPLEMENTATION ───────────────────── /code/proj/Main.roc ─ + @r" + ── INCOMPLETE ABILITY IMPLEMENTATION in /code/proj/Main.roc ──────────────────── I can't derive an implementation of the `Encoding` ability for `A`: @@ -9822,7 +9822,7 @@ In roc, functions are always written as a lambda, like{} Note: `Encoding` cannot be generated for functions. Tip: You can define a custom implementation of `Encoding` for `A`. - "### + " ); test_report!( @@ -9836,8 +9836,8 @@ In roc, functions are always written as a lambda, like{} B := {} "# ), - @r###" - ── INCOMPLETE ABILITY IMPLEMENTATION ───────────────────── /code/proj/Main.roc ─ + @r" + ── INCOMPLETE ABILITY IMPLEMENTATION in /code/proj/Main.roc ──────────────────── I can't derive an implementation of the `Encoding` ability for `A`: @@ -9848,7 +9848,7 @@ In roc, functions are always written as a lambda, like{} implementation or `implements Encode.Encoding` to the definition of `B`. Tip: You can define a custom implementation of `Encoding` for `A`. - "### + " ); test_report!( @@ -9888,8 +9888,8 @@ In roc, functions are always written as a lambda, like{} main = \n -> n + 2 "# ), - @r###" - ── DUPLICATE NAME ──────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── 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: @@ -9915,13 +9915,13 @@ In roc, functions are always written as a lambda, like{} assignment, consider removing the assignment. Since Roc is purely functional, assignments that don't introduce variables cannot affect a program's behavior! - "### + " ); test_report!( issue_1755, indoc!( - r#" + r" Handle := {} await : Result a err, (a -> Result b err) -> Result b err @@ -9935,10 +9935,10 @@ In roc, functions are always written as a lambda, like{} close handle withOpen - "# + " ), - @r#" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the body of the `withOpen` definition: @@ -9959,21 +9959,21 @@ In roc, functions are always written as a lambda, like{} Tip: Any connection between types must use a named type variable, not a `*`! Maybe the annotation on `withOpen` should have a named type variable in place of the `*`? - "# + " ); test_report!( recursive_body_and_annotation_with_inference_disagree, indoc!( - r#" + r" f : _ -> (_ -> Str) f = \_ -> if Bool.true then {} else f {} f - "# + " ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This expression is used in an unexpected way: @@ -9987,13 +9987,13 @@ In roc, functions are always written as a lambda, like{} But you are trying to use it as: * -> Str - "### + " ); test_report!( same_phantom_types_unify, indoc!( - r#" + r" F a b := b foo : F Str Str -> {} @@ -10001,7 +10001,7 @@ In roc, functions are always written as a lambda, like{} x : F Str Str foo x - "# + " ), @r"" // okay ); @@ -10009,7 +10009,7 @@ In roc, functions are always written as a lambda, like{} test_report!( different_phantom_types, indoc!( - r#" + r" F a b := b foo : F Str Str -> {} @@ -10017,10 +10017,10 @@ In roc, functions are always written as a lambda, like{} x : F U8 Str foo x - "# + " ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This 1st argument to `foo` has an unexpected type: @@ -10034,7 +10034,7 @@ In roc, functions are always written as a lambda, like{} But `foo` needs its 1st argument to be: F Str Str - "### + " ); test_report!( @@ -10053,19 +10053,19 @@ In roc, functions are always written as a lambda, like{} x : F MHash {} "# ), - @r###" - "### + @r" + " ); test_report!( int_literals_cannot_fit_in_same_type, indoc!( - r#" + r" 0x80000000000000000000000000000000 == -0x80000000000000000000000000000000 - "# + " ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This 2nd argument to == has an unexpected type: @@ -10079,18 +10079,18 @@ In roc, functions are always written as a lambda, like{} But == needs its 2nd argument to be: U128 - "### + " ); test_report!( num_literals_cannot_fit_in_same_type, indoc!( - r#" + r" 170141183460469231731687303715884105728 == -170141183460469231731687303715884105728 - "# + " ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This 2nd argument to == has an unexpected type: @@ -10104,13 +10104,13 @@ In roc, functions are always written as a lambda, like{} But == needs its 2nd argument to be: U128 - "### + " ); test_report!( recursive_alias_cannot_leak_into_recursive_opaque, indoc!( - r#" + r" OList := [Nil, Cons {} OList] AList : [Nil, Cons {} AList] @@ -10124,10 +10124,10 @@ In roc, functions are always written as a lambda, like{} Cons _ lst -> lst olist - "# + " ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the 2nd branch of this `when` expression: @@ -10152,19 +10152,19 @@ In roc, functions are always written as a lambda, like{} both types are the same opaque type. Did you mean to create an opaque type by wrapping it? If I have an opaque type Age := U32 I can create an instance of this opaque type by doing @Age 23. - "### + " ); test_report!( opaque_wrap_function_mismatch, indoc!( - r#" + r" A := U8 List.map [1u16, 2u16, 3u16] @A - "# + " ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This 2nd argument to `map` has an unexpected type: @@ -10178,7 +10178,7 @@ In roc, functions are always written as a lambda, like{} But `map` needs its 2nd argument to be: U16 -> A - "### + " ); test_report!( @@ -10189,8 +10189,8 @@ In roc, functions are always written as a lambda, like{} A x | B y -> x "# ), - @r###" - ── NAME NOT BOUND IN ALL PATTERNS ──────────────────────── /code/proj/Main.roc ─ + @r#" + ── 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. @@ -10221,7 +10221,7 @@ In roc, functions are always written as a lambda, like{} If you don't need to use `y`, prefix it with an underscore, like "_y", or replace it with just an "_". - "### + "# ); test_report!( @@ -10233,8 +10233,8 @@ In roc, functions are always written as a lambda, like{} A _ C -> "" "# ), - @r###" - ── UNSAFE PATTERN ──────────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── UNSAFE PATTERN in /code/proj/Main.roc ─────────────────────────────────────── This `when` does not cover all the possibilities: @@ -10247,20 +10247,20 @@ In roc, functions are always written as a lambda, like{} A _ _ I would have to crash if I saw one of those! Add branches for them! - "### + "# ); test_report!( forgot_to_remove_underscore, indoc!( - r#" + r" \_foo -> foo - "# + " ), |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. @@ -10280,7 +10280,7 @@ In roc, functions are always written as a lambda, like{} Bool U8 F64 - "### + " ), ) ); @@ -10288,16 +10288,16 @@ In roc, functions are always written as a lambda, like{} test_report!( call_with_underscore_identifier, indoc!( - r#" + r" f = \x, y, z -> x + y + z f 1 _ 1 - "# + " ), |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: @@ -10306,7 +10306,7 @@ In roc, functions are always written as a lambda, like{} An underscore can be used to ignore a value when pattern matching, but it cannot be used as a variable. - "### + " ), ) ); @@ -10314,16 +10314,16 @@ In roc, functions are always written as a lambda, like{} test_report!( call_with_declared_identifier_starting_with_underscore, indoc!( - r#" + r" f = \x, y, z -> x + y + z \a, _b -> f a _b 1 - "# + " ), |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: @@ -10338,7 +10338,7 @@ In roc, functions are always written as a lambda, like{} A variable's name can only start with an underscore if the variable is unused. Since you are using this variable, you could remove the underscore from its name in both places. - "### + " ), ) ); @@ -10346,17 +10346,17 @@ In roc, functions are always written as a lambda, like{} test_report!( call_with_undeclared_identifier_starting_with_underscore, indoc!( - r#" + r" f = \x, y, z -> x + y + z \a, _b -> f a _r 1 - "# + " ), |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: @@ -10365,7 +10365,7 @@ In roc, functions are always written as a lambda, like{} A variable's name can only start with an underscore if the variable is unused. But it looks like the variable is being used here! - "### + " ), ) ); @@ -10373,17 +10373,17 @@ In roc, functions are always written as a lambda, like{} test_report!( underscore_in_middle_of_identifier, indoc!( - r#" + r" f = \x, y, z -> x + y + z \a, _b -> f a var_name 1 - "# + " ), |golden| pretty_assertions::assert_eq!( golden, indoc!( - r###" - ── SYNTAX PROBLEM ──────────────────────────────────────── /code/proj/Main.roc ─ + r" + ── SYNTAX PROBLEM in /code/proj/Main.roc ─────────────────────────────────────── Underscores are not allowed in identifier names: @@ -10391,7 +10391,7 @@ In roc, functions are always written as a lambda, like{} ^^^^^^^^ I recommend using camelCase. It's the standard style in Roc code! - "### + " ), ) ); @@ -10409,8 +10409,8 @@ In roc, functions are always written as a lambda, like{} } "# ), - @r###" - ── BAD RECORD BUILDER ────────── tmp/optional_field_in_record_builder/Test.roc ─ + @r#" + ── 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: @@ -10425,7 +10425,7 @@ In roc, functions are always written as a lambda, like{} ^^^^^^^^^^^^^^ Optional fields can only appear when you destructure a record. - "### + "# ); test_report!( @@ -10438,8 +10438,8 @@ In roc, functions are always written as a lambda, like{} } "# ), - @r###" - ── BAD RECORD UPDATE ────────────────────── tmp/record_update_builder/Test.roc ─ + @r#" + ── 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: @@ -10452,7 +10452,7 @@ In roc, functions are always written as a lambda, like{} ^^^^^^^^^^^^^^^ Record builders cannot be updated like records. - "### + "# ); test_report!( @@ -10464,8 +10464,8 @@ In roc, functions are always written as a lambda, like{} { b: <- apply "b" } "# ), - @r###" - ── MULTIPLE RECORD BUILDERS ────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── MULTIPLE RECORD BUILDERS in /code/proj/Main.roc ───────────────────────────── This function is applied to multiple record builders: @@ -10477,7 +10477,7 @@ In roc, functions are always written as a lambda, like{} Tip: You can combine them or apply them separately. - "### + "# ); test_report!( @@ -10487,8 +10487,8 @@ In roc, functions are always written as a lambda, like{} { a: <- apply "a" } "# ), - @r###" - ── UNAPPLIED RECORD BUILDER ────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── UNAPPLIED RECORD BUILDER in /code/proj/Main.roc ───────────────────────────── This record builder was not applied to a function: @@ -10498,7 +10498,7 @@ In roc, functions are always written as a lambda, like{} However, we need a function to construct the record. Note: Functions must be applied directly. The pipe operator (|>) cannot be used. - "### + "# ); test_report!( @@ -10512,8 +10512,8 @@ In roc, functions are always written as a lambda, like{} } "# ), - @r###" - ── TOO MANY ARGS ───────────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── TOO MANY ARGS in /code/proj/Main.roc ──────────────────────────────────────── This value is not a function, but it was given 1 argument: @@ -10521,7 +10521,7 @@ In roc, functions are always written as a lambda, like{} ^^^ Tip: Remove `<-` to assign the field directly. - "### + "# ); // Skipping test because opaque types defined in the same module @@ -10544,8 +10544,8 @@ In roc, functions are always written as a lambda, like{} // } // "# // ), - // @r###" - // ── TOO MANY ARGS ───────────────────────────────────────── /code/proj/Main.roc ─ + // @r#" + // ── TOO MANY ARGS in /code/proj/Main.roc ──────────────────────────────────────── // This value is an opaque type, so it cannot be called with an argument: @@ -10553,13 +10553,13 @@ In roc, functions are always written as a lambda, like{} // ^^^^^^^ // Hint: Did you mean to apply it to a function first? - // "### + // "# // ); test_report!( destructure_assignment_introduces_no_variables_nested, indoc!( - r#" + r" Pair _ _ = Pair 0 1 _ = Pair 0 1 @@ -10569,10 +10569,10 @@ In roc, functions are always written as a lambda, like{} Foo = Foo 0 - "# + " ), - @r###" - ── UNNECESSARY DEFINITION ──────────────────────────────── /code/proj/Main.roc ─ + @r" + ── 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: @@ -10619,7 +10619,7 @@ In roc, functions are always written as a lambda, like{} assignment, consider removing the assignment. Since Roc is purely functional, assignments that don't introduce variables cannot affect a program's behavior! - "### + " ); test_report!( @@ -10637,8 +10637,8 @@ In roc, functions are always written as a lambda, like{} Foo = Foo "# ), - @r###" - ── UNNECESSARY DEFINITION ──────────────────────────────── /code/proj/Main.roc ─ + @r" + ── 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: @@ -10685,7 +10685,7 @@ In roc, functions are always written as a lambda, like{} assignment, consider removing the assignment. Since Roc is purely functional, assignments that don't introduce variables cannot affect a program's behavior! - "### + " ); test_report!( @@ -10701,8 +10701,8 @@ In roc, functions are always written as a lambda, like{} hash = \@Id _ -> 0 "# ), - @r###" - ── UNUSED DEFINITION ───────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── UNUSED DEFINITION in /code/proj/Main.roc ──────────────────────────────────── `hash` is not used anywhere in your code. @@ -10711,7 +10711,7 @@ In roc, functions are always written as a lambda, like{} If you didn't intend on using `hash` then remove it so future readers of your code don't wonder why it is there. - "### + " ); test_report!( @@ -10728,8 +10728,8 @@ In roc, functions are always written as a lambda, like{} hash = \@Id2 _ -> 0 "# ), - @r###" - ── WRONG SPECIALIZATION TYPE ───────────────────────────── /code/proj/Main.roc ─ + @r" + ── WRONG SPECIALIZATION TYPE in /code/proj/Main.roc ──────────────────────────── This specialization of `hash` is not for the expected type: @@ -10738,21 +10738,21 @@ In roc, functions are always written as a lambda, like{} It was previously claimed to be a specialization for `Id`, but was determined to actually specialize `Id2`! - "### + " ); test_report!( mismatched_record_annotation, indoc!( - r#" + r" x : { y : Str } x = {} x - "# + " ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the body of the `x` definition: @@ -10769,20 +10769,20 @@ In roc, functions are always written as a lambda, like{} { y : Str } Tip: Looks like the y field is missing. - "### + " ); test_report!( cyclic_opaque, indoc!( - r#" + r" Recursive := [Infinitely Recursive] 0 - "# + " ), - @r###" - ── CYCLIC ALIAS ────────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── CYCLIC ALIAS in /code/proj/Main.roc ───────────────────────────────────────── The `Recursive` opaque is self-recursive in an invalid way: @@ -10791,7 +10791,7 @@ In roc, functions are always written as a lambda, like{} Recursion in opaquees is only allowed if recursion happens behind a tagged union, at least one variant of which is not recursive. - "### + " ); test_report!( @@ -10803,8 +10803,8 @@ In roc, functions are always written as a lambda, like{} A a := a -> a implements [Decode.Decoding] "# ), - @r###" - ── INCOMPLETE ABILITY IMPLEMENTATION ───────────────────── /code/proj/Main.roc ─ + @r" + ── INCOMPLETE ABILITY IMPLEMENTATION in /code/proj/Main.roc ──────────────────── I can't derive an implementation of the `Decoding` ability for `A`: @@ -10814,7 +10814,7 @@ In roc, functions are always written as a lambda, like{} Note: `Decoding` cannot be generated for functions. Tip: You can define a custom implementation of `Decoding` for `A`. - "### + " ); test_report!( @@ -10828,8 +10828,8 @@ In roc, functions are always written as a lambda, like{} B := {} "# ), - @r###" - ── INCOMPLETE ABILITY IMPLEMENTATION ───────────────────── /code/proj/Main.roc ─ + @r" + ── INCOMPLETE ABILITY IMPLEMENTATION in /code/proj/Main.roc ──────────────────── I can't derive an implementation of the `Decoding` ability for `A`: @@ -10841,7 +10841,7 @@ In roc, functions are always written as a lambda, like{} Tip: You can define a custom implementation of `Decoding` for `A`. - "### + " ); test_report!( @@ -10883,8 +10883,8 @@ In roc, functions are always written as a lambda, like{} myDecoder "# ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This expression has a type that does not implement the abilities it's expected to: @@ -10896,7 +10896,7 @@ In roc, functions are always written as a lambda, like{} a -> a Note: `Decoding` cannot be generated for functions. - "### + " ); test_report!( @@ -10914,8 +10914,8 @@ In roc, functions are always written as a lambda, like{} myDecoder "# ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This expression has a type that does not implement the abilities it's expected to: @@ -10934,18 +10934,18 @@ In roc, functions are always written as a lambda, like{} Tip: `A` does not implement `Decoding`. Consider adding a custom implementation or `implements Decode.Decoding` to the definition of `A`. - "### + " ); test_report!( anonymous_function_does_not_use_param, indoc!( - r#" + r" (\x -> 5) 1 - "# + " ), - @r###" - ── UNUSED ARGUMENT ─────────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── UNUSED ARGUMENT in /code/proj/Main.roc ────────────────────────────────────── This function doesn't use `x`. @@ -10956,7 +10956,7 @@ In roc, functions are always written as a lambda, like{} really do need `x` as an argument of this function, prefix it with an underscore, like this: "_`x`". Adding an underscore at the start of a variable name is a way of saying that the variable is not used. - "### + "# ); test_report!( @@ -10976,8 +10976,8 @@ In roc, functions are always written as a lambda, like{} Ok "foo" "# ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── The branches of this `when` expression don't match the condition: @@ -10997,7 +10997,7 @@ In roc, functions are always written as a lambda, like{} [Good … *, …] The branches must be cases of the `when` condition's type! - "### + "# ); test_report!( @@ -11009,8 +11009,8 @@ In roc, functions are always written as a lambda, like{} f "# ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the body of the `f` definition: @@ -11034,7 +11034,7 @@ In roc, functions are always written as a lambda, like{} Tip: To extract the `.b` field it must be non-optional, but the type says this field is optional. Learn more about optional fields at TODO. - "### + "# ); test_report!( @@ -11046,8 +11046,8 @@ In roc, functions are always written as a lambda, like{} f "# ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the `then` branch of this `if` expression: @@ -11067,7 +11067,7 @@ In roc, functions are always written as a lambda, like{} } Tip: Looks like the b field is missing. - "### + "# ); test_report!( @@ -11078,8 +11078,8 @@ In roc, functions are always written as a lambda, like{} A foo -> "" "# ), - @r###" - ── UNUSED DEFINITION ───────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── UNUSED DEFINITION in /code/proj/Main.roc ──────────────────────────────────── `foo` is not used in this `when` branch. @@ -11088,7 +11088,7 @@ In roc, functions are always written as a lambda, like{} If you don't need to use `foo`, prefix it with an underscore, like "_foo", or replace it with just an "_". - "### + "# ); test_report!( @@ -11104,8 +11104,8 @@ In roc, functions are always written as a lambda, like{} _ -> "something went wrong" "# ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This expression has a type that does not implement the abilities it's expected to: @@ -11117,7 +11117,7 @@ In roc, functions are always written as a lambda, like{} * -> * Note: `Decoding` cannot be generated for functions. - "### + " ); test_report!( @@ -11133,8 +11133,8 @@ In roc, functions are always written as a lambda, like{} myDecoder "# ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This expression has a type that does not implement the abilities it's expected to: @@ -11153,7 +11153,7 @@ In roc, functions are always written as a lambda, like{} records that may or may not contain them at compile time, but are not a concept that extends to runtime! Maybe you wanted to use a `Result`? - "### + " ); test_report!( @@ -11167,8 +11167,8 @@ In roc, functions are always written as a lambda, like{} "# ), // no problem! - @r###" - "### + @r" + " ); test_report!( @@ -11183,8 +11183,8 @@ In roc, functions are always written as a lambda, like{} "# ), // no problem! - @r###" - "### + @r" + " ); test_report!( @@ -11199,8 +11199,8 @@ In roc, functions are always written as a lambda, like{} Err _ -> "" "# ), - @r###" - ── UNSAFE PATTERN ──────────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── UNSAFE PATTERN in /code/proj/Main.roc ─────────────────────────────────────── This `when` does not cover all the possibilities: @@ -11214,7 +11214,7 @@ In roc, functions are always written as a lambda, like{} Ok (Ok B) I would have to crash if I saw one of those! Add branches for them! - "### + "# ); test_report!( @@ -11227,8 +11227,8 @@ In roc, functions are always written as a lambda, like{} Ok (Ok A) -> "" "# ), - @r###" - ── UNSAFE PATTERN ──────────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── UNSAFE PATTERN in /code/proj/Main.roc ─────────────────────────────────────── This `when` does not cover all the possibilities: @@ -11240,7 +11240,7 @@ In roc, functions are always written as a lambda, like{} Ok (Ok B) I would have to crash if I saw one of those! Add branches for them! - "### + "# ); test_report!( @@ -11254,8 +11254,8 @@ In roc, functions are always written as a lambda, like{} Err _ -> "" "# ), - @r###" - ── UNMATCHABLE PATTERN ─────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── UNMATCHABLE PATTERN in /code/proj/Main.roc ────────────────────────────────── The 2nd pattern will never be matched: @@ -11266,7 +11266,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! - "### + "# ); test_report!( @@ -11281,8 +11281,8 @@ In roc, functions are always written as a lambda, like{} Err _ -> "" "# ), - @r###" - ── UNMATCHABLE PATTERN ─────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── 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: @@ -11306,7 +11306,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! - "### + "# ); test_report!( @@ -11318,8 +11318,8 @@ In roc, functions are always written as a lambda, like{} "" "# ), - @r###" - ── DUPLICATE NAME ──────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── DUPLICATE NAME in /code/proj/Main.roc ─────────────────────────────────────── This opaque type has the same name as a builtin: @@ -11328,7 +11328,7 @@ In roc, functions are always written as a lambda, like{} All builtin opaque types are in scope by default, so I need this opaque type to have a different name! - "### + " ); test_report!( @@ -11340,8 +11340,8 @@ In roc, functions are always written as a lambda, like{} main = "" "# ), - @r###" - ── UNUSED IMPORT ───────────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── UNUSED IMPORT in /code/proj/Main.roc ──────────────────────────────────────── `List.concat` is not used in this module. @@ -11349,7 +11349,7 @@ In roc, functions are always written as a lambda, like{} ^^^^^^ Since `List.concat` isn't used, you don't need to import it. - "### + "# ); test_report!( @@ -11362,8 +11362,8 @@ In roc, functions are always written as a lambda, like{} main = Str.concat "" "" "# ), - @r###" - "### + @r" + " ); test_report!( @@ -11378,8 +11378,8 @@ In roc, functions are always written as a lambda, like{} main = "" "# ), - @r###" - "### + @r" + " ); test_report!( @@ -11392,8 +11392,8 @@ In roc, functions are always written as a lambda, like{} if Bool.true then {} else main "# ), - @r###" - ── CIRCULAR DEFINITION ─────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── CIRCULAR DEFINITION in /code/proj/Main.roc ────────────────────────────────── `main` is defined directly in terms of itself: @@ -11404,7 +11404,7 @@ In roc, functions are always written as a lambda, like{} infinite loop! Hint: Did you mean to define `main` as a function? - "### + " ); test_report!( @@ -11414,8 +11414,8 @@ In roc, functions are always written as a lambda, like{} if True then "" else "" "# ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This `if` condition needs to be a Bool: @@ -11430,7 +11430,7 @@ In roc, functions are always written as a lambda, like{} or `Bool.false`. Tip: Did you mean to use `Bool.true` rather than `True`? - "### + "# ); test_report!( @@ -11440,8 +11440,8 @@ In roc, functions are always written as a lambda, like{} if False then "" else "" "# ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This `if` condition needs to be a Bool: @@ -11456,7 +11456,7 @@ In roc, functions are always written as a lambda, like{} or `Bool.false`. Tip: Did you mean to use `Bool.false` rather than `False`? - "### + "# ); test_report!( @@ -11468,8 +11468,8 @@ In roc, functions are always written as a lambda, like{} A a := a -> a implements [Hash] "# ), - @r###" - ── INCOMPLETE ABILITY IMPLEMENTATION ───────────────────── /code/proj/Main.roc ─ + @r" + ── INCOMPLETE ABILITY IMPLEMENTATION in /code/proj/Main.roc ──────────────────── I can't derive an implementation of the `Hash` ability for `A`: @@ -11479,7 +11479,7 @@ In roc, functions are always written as a lambda, like{} Note: `Hash` cannot be generated for functions. Tip: You can define a custom implementation of `Hash` for `A`. - "### + " ); test_report!( @@ -11493,8 +11493,8 @@ In roc, functions are always written as a lambda, like{} B := {} "# ), - @r###" - ── INCOMPLETE ABILITY IMPLEMENTATION ───────────────────── /code/proj/Main.roc ─ + @r" + ── INCOMPLETE ABILITY IMPLEMENTATION in /code/proj/Main.roc ──────────────────── I can't derive an implementation of the `Hash` ability for `A`: @@ -11506,7 +11506,7 @@ In roc, functions are always written as a lambda, like{} Tip: You can define a custom implementation of `Hash` for `A`. - "### + " ); test_report!( @@ -11576,8 +11576,8 @@ In roc, functions are always written as a lambda, like{} main = foo (\x -> x) "# ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This expression has a type that does not implement the abilities it's expected to: @@ -11589,7 +11589,7 @@ In roc, functions are always written as a lambda, like{} a -> a Note: `Hash` cannot be generated for functions. - "### + " ); test_report!( @@ -11603,8 +11603,8 @@ In roc, functions are always written as a lambda, like{} main = foo (A (\x -> x) B) "# ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This expression has a type that does not implement the abilities it's expected to: @@ -11622,7 +11622,7 @@ In roc, functions are always written as a lambda, like{} cannot be generated. Note: `Hash` cannot be generated for functions. - "### + " ); test_no_problem!( @@ -11649,8 +11649,8 @@ In roc, functions are always written as a lambda, like{} main = foo ("", \{} -> {}) "# ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This expression has a type that does not implement the abilities it's expected to: @@ -11671,22 +11671,22 @@ In roc, functions are always written as a lambda, like{} cannot be generated. Note: `Hash` cannot be generated for functions. - "### + "# ); test_report!( shift_by_negative, indoc!( - r#" + r" { a: Num.shiftLeftBy 1 -1, b: Num.shiftRightBy 1 -1, c: Num.shiftRightZfBy 1 -1, } - "# + " ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── 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: @@ -11730,21 +11730,21 @@ In roc, functions are always written as a lambda, like{} But `shiftLeftBy` needs its 2nd argument to be: U8 - "### + " ); test_report!( big_char_does_not_fit_in_u8, indoc!( - r#" + r" digits : List U8 digits = List.range { start: At '0', end: At '9' } List.contains digits '☃' - "# + " ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This 2nd argument to `contains` has an unexpected type: @@ -11758,7 +11758,7 @@ In roc, functions are always written as a lambda, like{} But `contains` needs its 2nd argument to be: Int Unsigned8 - "### + " ); test_report!( @@ -11770,8 +11770,8 @@ In roc, functions are always written as a lambda, like{} A a := a -> a implements [Eq] "# ), - @r###" - ── INCOMPLETE ABILITY IMPLEMENTATION ───────────────────── /code/proj/Main.roc ─ + @r" + ── INCOMPLETE ABILITY IMPLEMENTATION in /code/proj/Main.roc ──────────────────── I can't derive an implementation of the `Eq` ability for `A`: @@ -11781,7 +11781,7 @@ In roc, functions are always written as a lambda, like{} Note: `Eq` cannot be generated for functions. Tip: You can define a custom implementation of `Eq` for `A`. - "### + " ); test_report!( @@ -11795,8 +11795,8 @@ In roc, functions are always written as a lambda, like{} _ -> "" "# ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── The branches of this `when` expression don't match the condition: @@ -11813,7 +11813,7 @@ In roc, functions are always written as a lambda, like{} U16, I32, U32, I64, Nat, U64, I128, or U128 The branches must be cases of the `when` condition's type! - "### + "# ); test_report!( @@ -11825,8 +11825,8 @@ In roc, functions are always written as a lambda, like{} A := F32 implements [Eq] "# ), - @r###" - ── INCOMPLETE ABILITY IMPLEMENTATION ───────────────────── /code/proj/Main.roc ─ + @r" + ── INCOMPLETE ABILITY IMPLEMENTATION in /code/proj/Main.roc ──────────────────── I can't derive an implementation of the `Eq` ability for `A`: @@ -11839,7 +11839,7 @@ In roc, functions are always written as a lambda, like{} doesn't support total equality, it cannot support the `Eq` ability! Tip: You can define a custom implementation of `Eq` for `A`. - "### + " ); test_report!( @@ -11851,8 +11851,8 @@ In roc, functions are always written as a lambda, like{} A := F64 implements [Eq] "# ), - @r###" - ── INCOMPLETE ABILITY IMPLEMENTATION ───────────────────── /code/proj/Main.roc ─ + @r" + ── INCOMPLETE ABILITY IMPLEMENTATION in /code/proj/Main.roc ──────────────────── I can't derive an implementation of the `Eq` ability for `A`: @@ -11865,7 +11865,7 @@ In roc, functions are always written as a lambda, like{} doesn't support total equality, it cannot support the `Eq` ability! Tip: You can define a custom implementation of `Eq` for `A`. - "### + " ); test_report!( @@ -11879,8 +11879,8 @@ In roc, functions are always written as a lambda, like{} B := {} "# ), - @r###" - ── INCOMPLETE ABILITY IMPLEMENTATION ───────────────────── /code/proj/Main.roc ─ + @r" + ── INCOMPLETE ABILITY IMPLEMENTATION in /code/proj/Main.roc ──────────────────── I can't derive an implementation of the `Eq` ability for `A`: @@ -11892,7 +11892,7 @@ In roc, functions are always written as a lambda, like{} Tip: You can define a custom implementation of `Eq` for `A`. - "### + " ); test_report!( @@ -11962,8 +11962,8 @@ In roc, functions are always written as a lambda, like{} main = foo (\x -> x) "# ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This expression has a type that does not implement the abilities it's expected to: @@ -11975,7 +11975,7 @@ In roc, functions are always written as a lambda, like{} a -> a Note: `Eq` cannot be generated for functions. - "### + " ); test_report!( @@ -11989,8 +11989,8 @@ In roc, functions are always written as a lambda, like{} main = foo (A (\x -> x) B) "# ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This expression has a type that does not implement the abilities it's expected to: @@ -12008,18 +12008,18 @@ In roc, functions are always written as a lambda, like{} cannot be generated. Note: `Eq` cannot be generated for functions. - "### + " ); test_report!( cannot_eq_functions, indoc!( - r#" + r" (\x -> x) == (\x -> x) - "# + " ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This expression has a type that does not implement the abilities it's expected to: @@ -12031,18 +12031,18 @@ In roc, functions are always written as a lambda, like{} a -> a Note: `Eq` cannot be generated for functions. - "### + " ); test_report!( cannot_not_eq_functions, indoc!( - r#" + r" (\x -> x) == (\x -> x) - "# + " ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This expression has a type that does not implement the abilities it's expected to: @@ -12054,7 +12054,7 @@ In roc, functions are always written as a lambda, like{} a -> a Note: `Eq` cannot be generated for functions. - "### + " ); test_no_problem!( @@ -12081,8 +12081,8 @@ In roc, functions are always written as a lambda, like{} main = foo ("", 1.0f64) "# ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This expression has a type that does not implement the abilities it's expected to: @@ -12106,21 +12106,21 @@ In roc, functions are always written as a lambda, like{} because Roc's floating-point numbers cannot be compared for total equality - in Roc, `NaN` is never comparable to `NaN`. If a type doesn't support total equality, it cannot support the `Eq` ability! - "### + "# ); test_report!( cannot_import_structural_eq_not_eq, indoc!( - r#" + r" { a: Bool.structuralEq, b: Bool.structuralNotEq, } - "# + " ), - @r###" - ── NOT EXPOSED ─────────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── 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`: @@ -12147,7 +12147,7 @@ In roc, functions are always written as a lambda, like{} Bool.true Bool.boolIsEq Bool.false - "### + " ); test_report!( @@ -12161,8 +12161,8 @@ In roc, functions are always written as a lambda, like{} f : F ({} -> {}) "# ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This expression has a type that does not implement the abilities it's expected to: @@ -12174,7 +12174,7 @@ In roc, functions are always written as a lambda, like{} {} -> {} Note: `Hash` cannot be generated for functions. - "### + " ); test_report!( @@ -12186,8 +12186,8 @@ In roc, functions are always written as a lambda, like{} foo "# ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── The 1st argument to `foo` is weird: @@ -12201,7 +12201,7 @@ In roc, functions are always written as a lambda, like{} But the annotation on `foo` says the 1st argument should be: { a : Str } - "### + "# ); test_report!( @@ -12215,8 +12215,8 @@ In roc, functions are always written as a lambda, like{} main = "" "# ), - @r###" - ── INCOMPLETE ABILITY IMPLEMENTATION ───────────────────── /code/proj/Main.roc ─ + @r" + ── 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`: @@ -12248,20 +12248,20 @@ In roc, functions are always written as a lambda, like{} Note: `Encoding` cannot be generated for functions. Tip: You can define a custom implementation of `Encoding` for `F`. - "### + " ); test_report!( duplicate_ability_in_has_clause, indoc!( - r#" + r" f : a -> {} where a implements Hash & Hash f - "# + " ), - @r###" - ── DUPLICATE BOUND ABILITY ─────────────────────────────── /code/proj/Main.roc ─ + @r" + ── DUPLICATE BOUND ABILITY in /code/proj/Main.roc ────────────────────────────── I already saw that this type variable is bound to the `Hash` ability once before: @@ -12271,7 +12271,7 @@ In roc, functions are always written as a lambda, like{} Abilities only need to bound to a type variable once in an `implements` clause! - "### + " ); test_report!( @@ -12286,8 +12286,8 @@ In roc, functions are always written as a lambda, like{} main = \x -> g x "# ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This 1st argument to `g` has an unexpected type: @@ -12308,7 +12308,7 @@ In roc, functions are always written as a lambda, like{} But, I see that it's also used as if it implements the ability `Decoding`. Can you use `x` without that ability? If not, consider adding it to the `implements` clause of `x`. - "### + " ); test_report!( @@ -12323,8 +12323,8 @@ In roc, functions are always written as a lambda, like{} main = \x -> g x "# ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This 1st argument to `g` has an unexpected type: @@ -12345,7 +12345,7 @@ In roc, functions are always written as a lambda, like{} But, I see that it's also used as if it implements the abilities `Hash` and `Decoding`. Can you use `x` without those abilities? If not, consider adding them to the `implements` clause of `x`. - "### + " ); test_report!( @@ -12361,8 +12361,8 @@ In roc, functions are always written as a lambda, like{} main = \x -> g (f x) "# ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This 1st argument to `g` has an unexpected type: @@ -12383,7 +12383,7 @@ In roc, functions are always written as a lambda, like{} But, I see that it's also used as if it implements the ability `Decoding`. Can you use `x` without that ability? If not, consider adding it to the `implements` clause of `x`. - "### + " ); test_report!( @@ -12394,8 +12394,8 @@ In roc, functions are always written as a lambda, like{} [1, 2, -> "" "# ), - @r###" - ── UNFINISHED LIST PATTERN ────────── tmp/list_pattern_not_terminated/Test.roc ─ + @r#" + ── UNFINISHED LIST PATTERN in tmp/list_pattern_not_terminated/Test.roc ───────── I am partway through parsing a list pattern, but I got stuck here: @@ -12404,7 +12404,7 @@ In roc, functions are always written as a lambda, like{} I was expecting to see a closing square brace before this, so try adding a ] and see if that helps? - "### + "# ); test_report!( @@ -12415,8 +12415,8 @@ In roc, functions are always written as a lambda, like{} [...] -> "" "# ), - @r###" - ── INCORRECT REST PATTERN ─────── tmp/list_pattern_weird_rest_pattern/Test.roc ─ + @r#" + ── 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: @@ -12426,19 +12426,19 @@ In roc, functions are always written as a lambda, like{} List rest patterns, which match zero or more elements in a list, are denoted with .. - is that what you meant? - "### + "# ); test_report!( unnecessary_extension_variable, indoc!( - r#" + r" f : {} -> [A, B]* f - "# + " ), - @r###" - ── UNNECESSARY WILDCARD ────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── UNNECESSARY WILDCARD in /code/proj/Main.roc ───────────────────────────────── This type annotation has a wildcard type variable (`*`) that isn't needed. @@ -12453,7 +12453,7 @@ In roc, functions are always written as a lambda, like{} You can safely remove this to make the code more concise without changing what it means. - "### + " ); test_report!( @@ -12464,8 +12464,8 @@ In roc, functions are always written as a lambda, like{} [.., A, ..] -> "" "# ), - @r###" - ── MULTIPLE LIST REST PATTERNS ─────────────────────────── /code/proj/Main.roc ─ + @r#" + ── 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: @@ -12487,7 +12487,7 @@ In roc, functions are always written as a lambda, like{} _ I would have to crash if I saw one of those! Add branches for them! - "### + "# ); test_report!( @@ -12498,8 +12498,8 @@ In roc, functions are always written as a lambda, like{} [A, .., .., B] -> "" "# ), - @r###" - ── MULTIPLE LIST REST PATTERNS ─────────────────────────── /code/proj/Main.roc ─ + @r#" + ── 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: @@ -12521,7 +12521,7 @@ In roc, functions are always written as a lambda, like{} _ I would have to crash if I saw one of those! Add branches for them! - "### + "# ); test_report!( @@ -12532,8 +12532,8 @@ In roc, functions are always written as a lambda, like{} [A, 1u8] -> "" "# ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This list element doesn't match the types of other elements in the pattern: @@ -12548,7 +12548,7 @@ In roc, functions are always written as a lambda, like{} But the other elements in this list pattern match [A] - "### + "# ); test_report!( @@ -12559,8 +12559,8 @@ In roc, functions are always written as a lambda, like{} ["foo", "bar"] -> "" "# ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── The branches of this `when` expression don't match the condition: @@ -12579,7 +12579,7 @@ In roc, functions are always written as a lambda, like{} List Str The branches must be cases of the `when` condition's type! - "### + "# ); test_report!( @@ -12592,8 +12592,8 @@ In roc, functions are always written as a lambda, like{} [] -> "" "# ), - @r###" - ── UNSAFE PATTERN ──────────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── UNSAFE PATTERN in /code/proj/Main.roc ─────────────────────────────────────── This `when` does not cover all the possibilities: @@ -12605,7 +12605,7 @@ In roc, functions are always written as a lambda, like{} [_, ..] I would have to crash if I saw one of those! Add branches for them! - "### + "# ); test_no_problem!( @@ -12632,8 +12632,8 @@ In roc, functions are always written as a lambda, like{} [A, A] -> "" "# ), - @r###" - ── UNSAFE PATTERN ──────────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── UNSAFE PATTERN in /code/proj/Main.roc ─────────────────────────────────────── This `when` does not cover all the possibilities: @@ -12647,7 +12647,7 @@ In roc, functions are always written as a lambda, like{} [_, _, _, ..] I would have to crash if I saw one of those! Add branches for them! - "### + "# ); test_no_problem!( @@ -12676,8 +12676,8 @@ In roc, functions are always written as a lambda, like{} [..] -> "" "# ), - @r###" - ── REDUNDANT PATTERN ───────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── REDUNDANT PATTERN in /code/proj/Main.roc ──────────────────────────────────── The 2nd pattern is redundant: @@ -12688,19 +12688,19 @@ In roc, functions are always written as a lambda, like{} Any value of this shape will be handled by a previous pattern, so this one should be removed. - "### + "# ); test_no_problem!( list_match_spread_as, indoc!( - r#" + r" l : List [A, B] when l is [A, .. as rest] | [.. as rest, A] -> rest [.. as rest] -> rest - "# + " ) ); @@ -12742,8 +12742,8 @@ In roc, functions are always written as a lambda, like{} [A, ..] -> "" "# ), - @r###" - ── UNSAFE PATTERN ──────────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── UNSAFE PATTERN in /code/proj/Main.roc ─────────────────────────────────────── This `when` does not cover all the possibilities: @@ -12756,7 +12756,7 @@ In roc, functions are always written as a lambda, like{} [B, ..] I would have to crash if I saw one of those! Add branches for them! - "### + "# ); test_report!( @@ -12769,8 +12769,8 @@ In roc, functions are always written as a lambda, like{} [A, B, ..] -> "" "# ), - @r###" - ── UNSAFE PATTERN ──────────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── UNSAFE PATTERN in /code/proj/Main.roc ─────────────────────────────────────── This `when` does not cover all the possibilities: @@ -12784,7 +12784,7 @@ In roc, functions are always written as a lambda, like{} [_, A, ..] I would have to crash if I saw one of those! Add branches for them! - "### + "# ); test_no_problem!( @@ -12812,8 +12812,8 @@ In roc, functions are always written as a lambda, like{} [.., A] -> "" "# ), - @r###" - ── UNSAFE PATTERN ──────────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── UNSAFE PATTERN in /code/proj/Main.roc ─────────────────────────────────────── This `when` does not cover all the possibilities: @@ -12826,7 +12826,7 @@ In roc, functions are always written as a lambda, like{} [.., B] I would have to crash if I saw one of those! Add branches for them! - "### + "# ); test_report!( @@ -12839,8 +12839,8 @@ In roc, functions are always written as a lambda, like{} [.., B, A] -> "" "# ), - @r###" - ── UNSAFE PATTERN ──────────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── UNSAFE PATTERN in /code/proj/Main.roc ─────────────────────────────────────── This `when` does not cover all the possibilities: @@ -12854,7 +12854,7 @@ In roc, functions are always written as a lambda, like{} [.., _, B] I would have to crash if I saw one of those! Add branches for them! - "### + "# ); test_no_problem!( @@ -12888,8 +12888,8 @@ In roc, functions are always written as a lambda, like{} [B, .., A] -> "" "# ), - @r###" - ── UNSAFE PATTERN ──────────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── UNSAFE PATTERN in /code/proj/Main.roc ─────────────────────────────────────── This `when` does not cover all the possibilities: @@ -12904,7 +12904,7 @@ In roc, functions are always written as a lambda, like{} [_, .., _] I would have to crash if I saw one of those! Add branches for them! - "### + "# ); test_report!( @@ -12919,8 +12919,8 @@ In roc, functions are always written as a lambda, like{} [B, .., B] -> "" "# ), - @r###" - ── UNSAFE PATTERN ──────────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── UNSAFE PATTERN in /code/proj/Main.roc ─────────────────────────────────────── This `when` does not cover all the possibilities: @@ -12936,7 +12936,7 @@ In roc, functions are always written as a lambda, like{} [A, .., A] I would have to crash if I saw one of those! Add branches for them! - "### + "# ); test_report!( @@ -12951,8 +12951,8 @@ In roc, functions are always written as a lambda, like{} [A, A, .., A, A] -> "" "# ), - @r###" - ── UNSAFE PATTERN ──────────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── UNSAFE PATTERN in /code/proj/Main.roc ─────────────────────────────────────── This `when` does not cover all the possibilities: @@ -12969,7 +12969,7 @@ In roc, functions are always written as a lambda, like{} [_, _, _] I would have to crash if I saw one of those! Add branches for them! - "### + "# ); test_no_problem!( @@ -13000,8 +13000,8 @@ In roc, functions are always written as a lambda, like{} [[..], .., [.., B]] -> "" "# ), - @r###" - ── UNSAFE PATTERN ──────────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── UNSAFE PATTERN in /code/proj/Main.roc ─────────────────────────────────────── This `when` does not cover all the possibilities: @@ -13018,7 +13018,7 @@ In roc, functions are always written as a lambda, like{} [_, .., [.., A]] I would have to crash if I saw one of those! Add branches for them! - "### + "# ); test_report!( @@ -13034,8 +13034,8 @@ In roc, functions are always written as a lambda, like{} [..] -> "" "# ), - @r###" - ── REDUNDANT PATTERN ───────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── REDUNDANT PATTERN in /code/proj/Main.roc ──────────────────────────────────── The 3rd pattern is redundant: @@ -13047,7 +13047,7 @@ In roc, functions are always written as a lambda, like{} Any value of this shape will be handled by a previous pattern, so this one should be removed. - "### + "# ); test_report!( @@ -13062,8 +13062,8 @@ In roc, functions are always written as a lambda, like{} [..] -> "" "# ), - @r###" - ── REDUNDANT PATTERN ───────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── REDUNDANT PATTERN in /code/proj/Main.roc ──────────────────────────────────── The 3rd pattern is redundant: @@ -13075,7 +13075,7 @@ In roc, functions are always written as a lambda, like{} Any value of this shape will be handled by a previous pattern, so this one should be removed. - "### + "# ); test_report!( @@ -13090,8 +13090,8 @@ In roc, functions are always written as a lambda, like{} [.., _] -> "" "# ), - @r###" - ── REDUNDANT PATTERN ───────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── REDUNDANT PATTERN in /code/proj/Main.roc ──────────────────────────────────── The 3rd pattern is redundant: @@ -13103,7 +13103,7 @@ In roc, functions are always written as a lambda, like{} Any value of this shape will be handled by a previous pattern, so this one should be removed. - "### + "# ); test_report!( @@ -13118,8 +13118,8 @@ In roc, functions are always written as a lambda, like{} [..] -> "" "# ), - @r###" - ── REDUNDANT PATTERN ───────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── REDUNDANT PATTERN in /code/proj/Main.roc ──────────────────────────────────── The 2nd pattern is redundant: @@ -13130,7 +13130,7 @@ In roc, functions are always written as a lambda, like{} Any value of this shape will be handled by a previous pattern, so this one should be removed. - "### + "# ); test_no_problem!( @@ -13157,8 +13157,8 @@ In roc, functions are always written as a lambda, like{} f = \l -> if l == l then l else l "# ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This expression has a type that does not implement the abilities it's expected to: @@ -13178,18 +13178,18 @@ In roc, functions are always written as a lambda, like{} Tip: This type variable is not bound to `Eq`. Consider adding an `implements` clause to bind the type variable, like `where e implements Bool.Eq` - "### + " ); test_report!( crash_given_non_string, indoc!( - r#" + r" crash {} - "# + " ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This value passed to `crash` is not a string: @@ -13203,18 +13203,18 @@ In roc, functions are always written as a lambda, like{} But I can only `crash` with messages of type Str - "### + " ); test_report!( crash_unapplied, indoc!( - r#" + r" crash - "# + " ), - @r###" - ── UNAPPLIED CRASH ─────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── UNAPPLIED CRASH in /code/proj/Main.roc ────────────────────────────────────── This `crash` doesn't have a message given to it: @@ -13224,7 +13224,7 @@ In roc, functions are always written as a lambda, like{} `crash` must be passed a message to crash with at the exact place it's used. `crash` can't be used as a value that's passed around, like functions can be - it must be applied immediately! - "### + " ); test_report!( @@ -13234,8 +13234,8 @@ In roc, functions are always written as a lambda, like{} crash "" "" "# ), - @r###" - ── OVERAPPLIED CRASH ───────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── OVERAPPLIED CRASH in /code/proj/Main.roc ──────────────────────────────────── This `crash` has too many values given to it: @@ -13243,7 +13243,7 @@ In roc, functions are always written as a lambda, like{} ^^^^^ `crash` must be given exacly one message to crash with. - "### + "# ); test_no_problem!( @@ -13270,8 +13270,8 @@ In roc, functions are always written as a lambda, like{} main = n == 1f64 "# ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This expression has a type that does not implement the abilities it's expected to: @@ -13286,7 +13286,7 @@ In roc, functions are always written as a lambda, like{} because Roc's floating-point numbers cannot be compared for total equality - in Roc, `NaN` is never comparable to `NaN`. If a type doesn't support total equality, it cannot support the `Eq` ability! - "### + " ); test_no_problem!( @@ -13312,8 +13312,8 @@ In roc, functions are always written as a lambda, like{} g = \{} -> if Bool.true then "" else g {} "# ), - @r###" - ── DEFINITION ONLY USED IN RECURSION ───────────────────── /code/proj/Main.roc ─ + @r#" + ── DEFINITION ONLY USED IN RECURSION in /code/proj/Main.roc ──────────────────── This definition is only used in recursion with itself: @@ -13322,7 +13322,7 @@ In roc, functions are always written as a lambda, like{} If you don't intend to use or export this definition, it should be removed! - "### + "# ); test_no_problem!( @@ -13345,8 +13345,8 @@ In roc, functions are always written as a lambda, like{} g = \{} -> if Bool.true then "" else f {} "# ), - @r###" - ── DEFINITIONs ONLY USED IN RECURSION ──────────────────── /code/proj/Main.roc ─ + @r#" + ── DEFINITIONs ONLY USED IN RECURSION in /code/proj/Main.roc ─────────────────── These 2 definitions are only used in mutual recursion with themselves: @@ -13355,7 +13355,7 @@ In roc, functions are always written as a lambda, like{} If you don't intend to use or export any of them, they should all be removed! - "### + "# ); test_report!( @@ -13367,8 +13367,8 @@ In roc, functions are always written as a lambda, like{} g = \{} -> if Bool.true then "" else f {} "# ), - @r###" - "### + @r" + " ); test_report!( @@ -13381,8 +13381,8 @@ In roc, functions are always written as a lambda, like{} "" "# ), - @r###" - ── DEFINITION ONLY USED IN RECURSION ───────────────────── /code/proj/Main.roc ─ + @r#" + ── DEFINITION ONLY USED IN RECURSION in /code/proj/Main.roc ──────────────────── This definition is only used in recursion with itself: @@ -13391,7 +13391,7 @@ In roc, functions are always written as a lambda, like{} If you don't intend to use or export this definition, it should be removed! - "### + "# ); test_no_problem!( @@ -13417,8 +13417,8 @@ In roc, functions are always written as a lambda, like{} "" "# ), - @r###" - ── DEFINITIONs ONLY USED IN RECURSION ──────────────────── /code/proj/Main.roc ─ + @r#" + ── DEFINITIONs ONLY USED IN RECURSION in /code/proj/Main.roc ─────────────────── These 2 definitions are only used in mutual recursion with themselves: @@ -13427,7 +13427,7 @@ In roc, functions are always written as a lambda, like{} If you don't intend to use or export any of them, they should all be removed! - "### + "# ); test_report!( @@ -13441,8 +13441,8 @@ In roc, functions are always written as a lambda, like{} f "# ), - @r###" - "### + @r" + " ); // TODO(weakening-reports) @@ -13456,8 +13456,8 @@ In roc, functions are always written as a lambda, like{} {one, str} "#), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This 2nd argument to `concat` has an unexpected type: @@ -13471,7 +13471,7 @@ In roc, functions are always written as a lambda, like{} But `concat` needs its 2nd argument to be: List Str - "### + "# ); test_report!( @@ -13487,8 +13487,8 @@ In roc, functions are always written as a lambda, like{} else Two "# ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the `else` branch of this `if` expression: @@ -13506,7 +13506,7 @@ In roc, functions are always written as a lambda, like{} But the type annotation on `main` says it should be: [One] - "### + " ); test_report!( @@ -13524,8 +13524,8 @@ In roc, functions are always written as a lambda, like{} else Two "# ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the `else` branch of this `if` expression: @@ -13543,7 +13543,7 @@ In roc, functions are always written as a lambda, like{} But the type annotation on `main` says it should be: [One] - "### + " ); test_report!( @@ -13560,8 +13560,8 @@ In roc, functions are always written as a lambda, like{} Two -> Two "# ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the body of the `main` definition: @@ -13579,7 +13579,7 @@ In roc, functions are always written as a lambda, like{} But the type annotation on `main` says it should be: List […] - "### + " ); test_report!( @@ -13598,8 +13598,8 @@ In roc, functions are always written as a lambda, like{} Two -> Two "# ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the body of the `main` definition: @@ -13617,7 +13617,7 @@ In roc, functions are always written as a lambda, like{} But the type annotation on `main` says it should be: List […] - "### + " ); test_no_problem!( @@ -13649,8 +13649,8 @@ In roc, functions are always written as a lambda, like{} myDecoder "# ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This expression has a type that does not implement the abilities it's expected to: @@ -13664,7 +13664,7 @@ In roc, functions are always written as a lambda, like{} Note: Decoding to a Nat is not supported. Consider decoding to a fixed-sized unsigned integer, like U64, then converting to a Nat if needed. - "### + " ); test_report!( @@ -13678,8 +13678,8 @@ In roc, functions are always written as a lambda, like{} main = Encode.toEncoder x "# ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This expression has a type that does not implement the abilities it's expected to: @@ -13697,7 +13697,7 @@ In roc, functions are always written as a lambda, like{} cannot be generated. Tip: `Natural` does not implement `Encoding`. - "### + " ); test_no_problem!( @@ -13728,8 +13728,8 @@ In roc, functions are always written as a lambda, like{} myDecoder "# ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This expression has a type that does not implement the abilities it's expected to: @@ -13741,7 +13741,7 @@ In roc, functions are always written as a lambda, like{} U32, {} -> {} Note: `Decoding` cannot be generated for functions. - "### + " ); test_no_problem!( @@ -13768,8 +13768,8 @@ In roc, functions are always written as a lambda, like{} main = Encode.toEncoder x "# ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── This expression has a type that does not implement the abilities it's expected to: @@ -13781,7 +13781,7 @@ In roc, functions are always written as a lambda, like{} U32, {} -> {} Note: `Encoding` cannot be generated for functions. - "### + " ); test_report!( @@ -13808,8 +13808,8 @@ In roc, functions are always written as a lambda, like{} Zulip -> "zulip" "# ), - @r###" - ── UNSAFE PATTERN ──────────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── UNSAFE PATTERN in /code/proj/Main.roc ─────────────────────────────────────── This `when` does not cover all the possibilities: @@ -13825,19 +13825,19 @@ In roc, functions are always written as a lambda, like{} _ I would have to crash if I saw one of those! Add branches for them! - "### + "# ); test_no_problem!( openness_constraint_opens_under_tuple, indoc!( - r#" + r" x : [A, B, C] when (x, 1u8) is (A, _) -> Bool.true (B, _) -> Bool.true _ -> Bool.true - "# + " ) ); @@ -13856,8 +13856,8 @@ In roc, functions are always written as a lambda, like{} main = parser "hi" "# ), - @r###" - ── TOO MANY ARGS ───────────────────────────────────────── /code/proj/Main.roc ─ + @r#" + ── TOO MANY ARGS in /code/proj/Main.roc ──────────────────────────────────────── The `parser` value is an opaque type, so it cannot be called with an argument: @@ -13867,7 +13867,7 @@ In roc, functions are always written as a lambda, like{} I can't call an opaque type because I don't know what it is! Maybe you meant to unwrap it first? - "### + "# ); test_report!( @@ -13880,8 +13880,8 @@ In roc, functions are always written as a lambda, like{} f = \x -> x "# ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the body of the `f` definition: @@ -13898,7 +13898,7 @@ In roc, functions are always written as a lambda, like{} (U8, U8 -> U8) Tip: It looks like it takes too few arguments. I was expecting 1 more. - "### + " ); test_report!( @@ -13911,8 +13911,8 @@ In roc, functions are always written as a lambda, like{} f = \x, y, z -> x + y + z "# ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the body of the `f` definition: @@ -13929,7 +13929,7 @@ In roc, functions are always written as a lambda, like{} (U8, U8 -> U8) Tip: It looks like it takes too many arguments. I'm seeing 1 extra. - "### + " ); test_report!( @@ -13945,8 +13945,8 @@ In roc, functions are always written as a lambda, like{} f "# ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the body of the `f` definition: @@ -13963,7 +13963,7 @@ In roc, functions are always written as a lambda, like{} (U8, U8 -> U8) Tip: It looks like it takes too few arguments. I was expecting 1 more. - "### + " ); test_report!( @@ -13979,8 +13979,8 @@ In roc, functions are always written as a lambda, like{} f "# ), - @r###" - ── TYPE MISMATCH ───────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TYPE MISMATCH in /code/proj/Main.roc ──────────────────────────────────────── Something is off with the body of the `f` definition: @@ -13997,18 +13997,18 @@ In roc, functions are always written as a lambda, like{} (U8, U8 -> U8) Tip: It looks like it takes too many arguments. I'm seeing 1 extra. - "### + " ); test_report!( pizza_parens_right, indoc!( - r#" + r" 2 |> (Num.sub 3) - "# + " ), - @r###" - ── TOO FEW ARGS ────────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TOO FEW ARGS in /code/proj/Main.roc ───────────────────────────────────────── The `sub` function expects 2 arguments, but it got only 1: @@ -14017,18 +14017,18 @@ In roc, functions are always written as a lambda, like{} Roc does not allow functions to be partially applied. Use a closure to make partial application explicit. - "### + " ); test_report!( pizza_parens_middle, indoc!( - r#" + r" 2 |> (Num.sub 3) |> Num.sub 3 - "# + " ), - @r###" - ── TOO FEW ARGS ────────────────────────────────────────── /code/proj/Main.roc ─ + @r" + ── TOO FEW ARGS in /code/proj/Main.roc ───────────────────────────────────────── The `sub` function expects 2 arguments, but it got only 1: @@ -14037,6 +14037,6 @@ In roc, functions are always written as a lambda, like{} Roc does not allow functions to be partially applied. Use a closure to make partial application explicit. - "### + " ); } diff --git a/crates/compiler/load_internal/.gitignore b/crates/compiler/load_internal/.gitignore deleted file mode 100644 index cad23091000..00000000000 --- a/crates/compiler/load_internal/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/tmp \ No newline at end of file diff --git a/crates/compiler/load_internal/src/file.rs b/crates/compiler/load_internal/src/file.rs index a89e2b270d3..2dc7e7136cf 100644 --- a/crates/compiler/load_internal/src/file.rs +++ b/crates/compiler/load_internal/src/file.rs @@ -2174,6 +2174,38 @@ fn report_unused_imported_modules( } } +///Generates an errorfor modules that are imported from packages that don't exist +///TODO. This is temporary. Remove this once module params is implemented +fn check_for_missing_package_shorthand_in_cache<'a>( + header: &ModuleHeader, + shorthands: &Arc>>, +) -> Result<(), LoadingProblem<'a>> { + header.package_qualified_imported_modules + .iter() + .find_map(|pqim| match pqim { + PackageQualified::Unqualified(_) => None, + PackageQualified::Qualified(shorthand, _) => { + if!(shorthands.lock().iter().any(|(short,_)|short==shorthand)){ + let module_path=header.module_path.to_str().unwrap_or(""); + Some(LoadingProblem::FormattedReport( + match header.header_type { + HeaderType::Hosted { ..} | + HeaderType::Builtin {..} | + HeaderType::Interface {..} => + { + let mod_type= header.header_type.to_string(); + format!("The package shorthand '{shorthand}' that you are using in the 'imports' section of the header of module '{module_path}' doesn't exist.\nCheck that package shorthand is correct or reference the package in an 'app' or 'package' header.\nThis module is an {mod_type}, because of a bug in the compiler we are unable to directly typecheck {mod_type} modules with package imports so this error may not be correct. Please start checking at an app, package or platform file that imports this file.") + }, + _=> + format!("The package shorthand '{shorthand}' that you are using in the 'imports' section of the header of module '{module_path}' doesn't exist.\nCheck that package shorthand is correct or reference the package in an 'app' or 'package' header.") + })) + } else { + None + } + } + }).map_or(Ok(()),Err) +} + fn extend_header_with_builtin(header: &mut ModuleHeader, module: ModuleId) { header .package_qualified_imported_modules @@ -2257,7 +2289,9 @@ fn update<'a>( #[cfg(target_family = "wasm")] { - panic!("Specifying packages via URLs is curently unsupported in wasm."); + panic!( + "Specifying packages via URLs is currently unsupported in wasm." + ); } } else { // This wasn't a URL, so it must be a filesystem path. @@ -2387,6 +2421,7 @@ fn update<'a>( } } + check_for_missing_package_shorthand_in_cache(&header, &state.arc_shorthands)?; // store an ID to name mapping, so we know the file to read when fetching dependencies' headers for (name, id) in header.deps_by_name.iter() { state.module_cache.module_names.insert(*id, name.clone()); @@ -3803,6 +3838,35 @@ struct HeaderOutput<'a> { opt_platform_shorthand: Option<&'a str>, } +fn ensure_roc_file<'a>(filename: &Path, src_bytes: &[u8]) -> Result<(), LoadingProblem<'a>> { + match filename.extension() { + Some(ext) => { + if ext != ROC_FILE_EXTENSION { + return Err(LoadingProblem::FileProblem { + filename: filename.to_path_buf(), + error: io::ErrorKind::Unsupported, + }); + } + } + None => { + let index = src_bytes + .iter() + .position(|a| *a == b'\n') + .unwrap_or(src_bytes.len()); + let frist_line_bytes = src_bytes[0..index].to_vec(); + if let Ok(first_line) = String::from_utf8(frist_line_bytes) { + if !(first_line.starts_with("#!") && first_line.contains("roc")) { + return Err(LoadingProblem::FileProblem { + filename: filename.to_path_buf(), + error: std::io::ErrorKind::Unsupported, + }); + } + } + } + } + Ok(()) +} + fn parse_header<'a>( arena: &'a Bump, read_file_duration: Duration, @@ -3821,6 +3885,8 @@ fn parse_header<'a>( let parsed = roc_parse::module::parse_header(arena, parse_state.clone()); let parse_header_duration = parse_start.elapsed(); + ensure_roc_file(&filename, src_bytes)?; + // Insert the first entries for this module's timings let mut module_timing = ModuleTiming::new(start_time); @@ -3936,6 +4002,11 @@ fn parse_header<'a>( } else { &[] }; + let imports = if let Some(imports) = header.imports { + unspace(arena, imports.item.items) + } else { + &[] + }; let mut provides = bumpalo::collections::Vec::new_in(arena); @@ -3955,11 +4026,7 @@ fn parse_header<'a>( is_root_module, opt_shorthand, packages, - imports: if let Some(imports) = header.imports { - unspace(arena, imports.item.items) - } else { - &[] - }, + imports, header_type: HeaderType::App { provides: provides.into_bump_slice(), output_name: header.name.value, @@ -4143,7 +4210,7 @@ fn load_packages<'a>( #[cfg(target_family = "wasm")] { - panic!("Specifying packages via URLs is curently unsupported in wasm."); + panic!("Specifying packages via URLs is currently unsupported in wasm."); } } else { cwd.join(src) diff --git a/crates/compiler/load_internal/src/file/reporting.rs b/crates/compiler/load_internal/src/file/reporting.rs new file mode 100644 index 00000000000..cddd86246e8 --- /dev/null +++ b/crates/compiler/load_internal/src/file/reporting.rs @@ -0,0 +1,22 @@ +fn report_missing_package_shorthand2<'a>( + packages: &[Loc], + imports: &[Loc], +) -> Option> { + imports.iter().find_map(|i| match i.value { + ImportsEntry::Module(_, _) | ImportsEntry::IngestedFile(_, _) => None, + ImportsEntry::Package(shorthand, name, _) => { + let name=name.as_str(); + if packages + .iter() + .find(|p| p.value.shorthand == shorthand) + .is_none() + { + Some( + LoadingProblem::FormattedReport( + format!("The package shorthand '{shorthand}' that you are importing the module '{name}' from in '{shorthand}.{name}', doesn't exist in this module.\nImport it in the \"packages\" section of the header."))) + } else { + None + } + } + }) +} diff --git a/crates/compiler/load_internal/tests/test_load.rs b/crates/compiler/load_internal/tests/test_load.rs index cdc751ce618..a6298d0061b 100644 --- a/crates/compiler/load_internal/tests/test_load.rs +++ b/crates/compiler/load_internal/tests/test_load.rs @@ -323,9 +323,9 @@ fn import_transitive_alias() { // with variables in the importee let modules = vec![ ( - "RBTree", + "RBTree.roc", indoc!( - r#" + r" interface RBTree exposes [RedBlackTree, empty] imports [] # The color of a node. Leaves are considered Black. @@ -337,18 +337,18 @@ fn import_transitive_alias() { empty : RedBlackTree k v empty = Empty - "# + " ), ), ( - "Other", + "Other.roc", indoc!( - r#" + r" interface Other exposes [empty] imports [RBTree] empty : RBTree.RedBlackTree I64 I64 empty = RBTree.empty - "# + " ), ), ]; @@ -626,13 +626,13 @@ fn ingested_file_bytes() { #[test] fn parse_problem() { let modules = vec![( - "Main", + "Main.roc", indoc!( - r#" + r" interface Main exposes [main] imports [] main = [ - "# + " ), )]; @@ -641,7 +641,7 @@ fn parse_problem() { report, indoc!( " - ── UNFINISHED LIST ──────────────────────────────────── tmp/parse_problem/Main ─ + ── UNFINISHED LIST in tmp/parse_problem/Main.roc ─────────────────────────────── I am partway through started parsing a list, but I got stuck here: @@ -707,7 +707,7 @@ fn ingested_file_not_found() { #[test] fn platform_does_not_exist() { let modules = vec![( - "Main", + "main.roc", indoc!( r#" app "example" @@ -753,7 +753,7 @@ fn platform_parse_error() { ), ), ( - "Main", + "main.roc", indoc!( r#" app "hello-world" @@ -797,7 +797,7 @@ fn platform_exposes_main_return_by_pointer_issue() { ), ), ( - "Main", + "main.roc", indoc!( r#" app "hello-world" @@ -818,25 +818,25 @@ fn platform_exposes_main_return_by_pointer_issue() { fn opaque_wrapped_unwrapped_outside_defining_module() { let modules = vec![ ( - "Age", + "Age.roc", indoc!( - r#" + r" interface Age exposes [Age] imports [] Age := U32 - "# + " ), ), ( - "Main", + "Main.roc", indoc!( - r#" + r" interface Main exposes [twenty, readAge] imports [Age.{ Age }] twenty = @Age 20 readAge = \@Age n -> n - "# + " ), ), ]; @@ -846,8 +846,8 @@ fn opaque_wrapped_unwrapped_outside_defining_module() { assert_eq!( err, indoc!( - r#" - ── OPAQUE TYPE DECLARED OUTSIDE SCOPE ─ ...rapped_outside_defining_module/Main ─ + r" + ── OPAQUE TYPE DECLARED OUTSIDE SCOPE in ...d_outside_defining_module/Main.roc ─ 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 ...d_outside_defining_module/Main.roc ─ 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 ...aque_wrapped_unwrapped_outside_defining_module/Main.roc ─ Nothing from Age is used in this module. @@ -883,7 +883,7 @@ fn opaque_wrapped_unwrapped_outside_defining_module() { ^^^^^^^^^^^ Since Age isn't used, you don't need to import it. - "# + " ), "\n{}", err @@ -910,7 +910,7 @@ fn issue_2863_module_type_does_not_exist() { ), ), ( - "Main", + "main.roc", indoc!( r#" app "test" @@ -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.roc ───── Nothing is named `DoesNotExist` in this scope. @@ -971,7 +971,7 @@ fn import_builtin_in_platform_and_check_app() { ), ), ( - "Main", + "main.roc", indoc!( r#" app "test" @@ -991,13 +991,13 @@ fn import_builtin_in_platform_and_check_app() { #[test] fn module_doesnt_match_file_path() { let modules = vec![( - "Age", + "Age.roc", indoc!( - r#" + r" interface NotAge exposes [Age] imports [] Age := U32 - "# + " ), )]; @@ -1005,8 +1005,8 @@ fn module_doesnt_match_file_path() { assert_eq!( err, indoc!( - r#" - ── WEIRD MODULE NAME ─────────────────── tmp/module_doesnt_match_file_path/Age ─ + r" + ── WEIRD MODULE NAME in tmp/module_doesnt_match_file_path/Age.roc ────────────── This module name does not correspond with the file path it is defined in: @@ -1016,7 +1016,7 @@ fn module_doesnt_match_file_path() { Module names must correspond with the file paths they are defined in. For example, I expect to see BigNum defined in BigNum.roc, or Math.Sin - defined in Math/Sin.roc."# + defined in Math/Sin.roc." ), "\n{}", err @@ -1026,11 +1026,11 @@ fn module_doesnt_match_file_path() { #[test] fn module_cyclic_import_itself() { let modules = vec![( - "Age", + "Age.roc", indoc!( - r#" + r" interface Age exposes [] imports [Age] - "# + " ), )]; @@ -1038,8 +1038,8 @@ fn module_cyclic_import_itself() { assert_eq!( err, indoc!( - r#" - ── IMPORT CYCLE ────────────────────────── tmp/module_cyclic_import_itself/Age ─ + r" + ── IMPORT CYCLE in tmp/module_cyclic_import_itself/Age.roc ───────────────────── I can't compile Age because it depends on itself through the following chain of module imports: @@ -1052,30 +1052,29 @@ fn module_cyclic_import_itself() { Cyclic dependencies are not allowed in Roc! Can you restructure a module in this import chain so that it doesn't have to depend on - itself?"# + itself?" ), "\n{}", err ); } - #[test] fn module_cyclic_import_transitive() { let modules = vec![ ( - "Age", + "Age.roc", indoc!( - r#" + r" interface Age exposes [] imports [Person] - "# + " ), ), ( - "Person", + "Person.roc", indoc!( - r#" + r" interface Person exposes [] imports [Age] - "# + " ), ), ]; @@ -1084,8 +1083,8 @@ fn module_cyclic_import_transitive() { assert_eq!( err, indoc!( - r#" - ── IMPORT CYCLE ────────────────── tmp/module_cyclic_import_transitive/Age.roc ─ + r" + ── 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: @@ -1100,7 +1099,7 @@ fn module_cyclic_import_transitive() { Cyclic dependencies are not allowed in Roc! Can you restructure a module in this import chain so that it doesn't have to depend on - itself?"# + itself?" ), "\n{}", err @@ -1113,17 +1112,17 @@ fn nested_module_has_incorrect_name() { ( "Dep/Foo.roc", indoc!( - r#" + r" interface Foo exposes [] imports [] - "# + " ), ), ( "I.roc", indoc!( - r#" + r" interface I exposes [] imports [Dep.Foo] - "# + " ), ), ]; @@ -1132,8 +1131,8 @@ fn nested_module_has_incorrect_name() { assert_eq!( err, indoc!( - r#" - ── INCORRECT MODULE NAME ──── tmp/nested_module_has_incorrect_name/Dep/Foo.roc ─ + r" + ── INCORRECT MODULE NAME in tmp/nested_module_has_incorrect_name/Dep/Foo.roc ─── This module has a different name than I expected: @@ -1142,9 +1141,124 @@ fn nested_module_has_incorrect_name() { Based on the nesting and use of this module, I expect it to have name - Dep.Foo"# + Dep.Foo" ), "\n{}", err ); } +#[test] +fn module_interface_with_qualified_import() { + let modules = vec![( + "A.roc", + indoc!( + r" + interface A exposes [] imports [b.T] + " + ), + )]; + + let err = multiple_modules("module_interface_with_qualified_import", modules).unwrap_err(); + assert_eq!( + err, + indoc!( + r#" + The package shorthand 'b' that you are using in the 'imports' section of the header of module 'tmp/module_interface_with_qualified_import/A.roc' doesn't exist. + Check that package shorthand is correct or reference the package in an 'app' or 'package' header. + This module is an interface, because of a bug in the compiler we are unable to directly typecheck interface modules with package imports so this error may not be correct. Please start checking at an app, package or platform file that imports this file."# + ), + "\n{}", + err + ); +} +#[test] +fn app_missing_package_import() { + let modules = vec![( + "main.roc", + indoc!( + r#" + app "example" + packages { pack: "./package/main.roc" } + imports [notpack.Mod] + provides [] to pack + + main = "" + "# + ), + )]; + + let err = multiple_modules("app_missing_package_import", modules).unwrap_err(); + assert_eq!( + err, + indoc!( + r#" + The package shorthand 'notpack' that you are using in the 'imports' section of the header of module 'tmp/app_missing_package_import/main.roc' doesn't exist. + Check that package shorthand is correct or reference the package in an 'app' or 'package' header."# + ), + "\n{}", + err + ); +} + +#[test] +fn non_roc_file_extension() { + let modules = vec![( + "main.md", + indoc!( + r" + # Not a roc file + " + ), + )]; + + let expected = indoc!( + r" + ── NOT A ROC FILE in tmp/non_roc_file_extension/main.md ──────────────────────── + + I expected a file with extension `.roc` or without extension. + Instead I received a file with extension `.md`." + ); + let color_start = String::from_utf8(vec![27, 91, 51, 54, 109]).unwrap(); + let color_end = String::from_utf8(vec![27, 91, 48, 109]).unwrap(); + let err = multiple_modules("non_roc_file_extension", modules).unwrap_err(); + let err = err.replace(&color_start, ""); + let err = err.replace(&color_end, ""); + assert_eq!(err, expected, "\n{}", err); +} + +#[test] +fn roc_file_no_extension() { + let modules = vec![( + "main", + indoc!( + r#" + app "helloWorld" + packages { pf: "https://github.com/roc-lang/basic-cli/releases/download/0.8.1/x8URkvfyi9I0QhmVG98roKBUs_AZRkLFwFJVJ3942YA.tar.br" } + imports [pf.Stdout] + provides [main] to pf + + main = + Stdout.line "Hello, World!" + "# + ), + )]; + + let expected = indoc!( + r" + ── NOT A ROC FILE in tmp/roc_file_no_extension/main ──────────────────────────── + + I expected a file with either: + - extension `.roc` + - no extension and a roc shebang as the first line, e.g. + `#!/home/username/bin/roc_nightly/roc` + + The provided file did not start with a shebang `#!` containing the + string `roc`. Is tmp/roc_file_no_extension/main a Roc file?" + ); + let color_start = String::from_utf8(vec![27, 91, 51, 54, 109]).unwrap(); + let color_end = String::from_utf8(vec![27, 91, 48, 109]).unwrap(); + let err = multiple_modules("roc_file_no_extension", modules).unwrap_err(); + let err = err.replace(&color_start, ""); + let err = err.replace(&color_end, ""); + assert_eq!(err, expected, "\n{}", err); +} diff --git a/crates/compiler/module/src/called_via.rs b/crates/compiler/module/src/called_via.rs index 3cb7394be1a..e2ff5f45fb6 100644 --- a/crates/compiler/module/src/called_via.rs +++ b/crates/compiler/module/src/called_via.rs @@ -86,7 +86,7 @@ pub enum CalledVia { UnaryOp(UnaryOp), /// This call is the result of desugaring string interpolation, - /// e.g. "\(first) \(last)" is transformed into Str.concat (Str.concat first " ") last. + /// e.g. "$(first) $(last)" is transformed into Str.concat (Str.concat first " ") last. StringInterpolation, /// This call is the result of desugaring a Record Builder field. diff --git a/crates/compiler/module/src/low_level.rs b/crates/compiler/module/src/low_level.rs index c43307548a8..90044057c38 100644 --- a/crates/compiler/module/src/low_level.rs +++ b/crates/compiler/module/src/low_level.rs @@ -9,10 +9,8 @@ pub enum LowLevel { StrJoinWith, StrIsEmpty, StrStartsWith, - StrStartsWithScalar, StrEndsWith, StrSplit, - StrCountGraphemes, StrCountUtf8Bytes, StrFromInt, StrFromUtf8Range, @@ -23,15 +21,10 @@ pub enum LowLevel { StrTrimStart, StrTrimEnd, StrToNum, - StrToScalars, StrGetUnsafe, StrSubstringUnsafe, StrReserve, - StrAppendScalar, - StrGetScalarUnsafe, - StrGetCapacity, StrWithCapacity, - StrGraphemes, StrReleaseExcessCapacity, ListLen, ListWithCapacity, @@ -50,8 +43,9 @@ pub enum LowLevel { ListSublist, ListDropAt, ListSwap, - ListIsUnique, ListGetCapacity, + ListIsUnique, + ListClone, NumAdd, NumAddWrap, NumAddChecked, @@ -263,10 +257,8 @@ map_symbol_to_lowlevel! { StrJoinWith <= STR_JOIN_WITH; StrIsEmpty <= STR_IS_EMPTY; StrStartsWith <= STR_STARTS_WITH; - StrStartsWithScalar <= STR_STARTS_WITH_SCALAR; StrEndsWith <= STR_ENDS_WITH; StrSplit <= STR_SPLIT; - StrCountGraphemes <= STR_COUNT_GRAPHEMES; StrCountUtf8Bytes <= STR_COUNT_UTF8_BYTES; StrFromUtf8Range <= STR_FROM_UTF8_RANGE_LOWLEVEL; StrToUtf8 <= STR_TO_UTF8; @@ -274,16 +266,11 @@ map_symbol_to_lowlevel! { StrTrim <= STR_TRIM; StrTrimStart <= STR_TRIM_START; StrTrimEnd <= STR_TRIM_END; - StrToScalars <= STR_TO_SCALARS; StrGetUnsafe <= STR_GET_UNSAFE; StrSubstringUnsafe <= STR_SUBSTRING_UNSAFE; StrReserve <= STR_RESERVE; - StrAppendScalar <= STR_APPEND_SCALAR_UNSAFE; - StrGetScalarUnsafe <= STR_GET_SCALAR_UNSAFE; StrToNum <= STR_TO_NUM; - StrGetCapacity <= STR_CAPACITY; StrWithCapacity <= STR_WITH_CAPACITY; - StrGraphemes <= STR_GRAPHEMES; StrReleaseExcessCapacity <= STR_RELEASE_EXCESS_CAPACITY; ListLen <= LIST_LEN; ListGetCapacity <= LIST_CAPACITY; @@ -291,6 +278,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; @@ -318,8 +306,8 @@ map_symbol_to_lowlevel! { NumCompare <= NUM_COMPARE; NumDivFrac <= NUM_DIV_FRAC; NumDivCeilUnchecked <= NUM_DIV_CEIL; - NumDivTruncUnchecked <= NUM_DIV_TRUNC; - NumRemUnchecked <= NUM_REM; + NumDivTruncUnchecked <= NUM_DIV_TRUNC_UNCHECKED; + NumRemUnchecked <= NUM_REM_UNCHECKED; NumIsMultipleOf <= NUM_IS_MULTIPLE_OF; NumAbs <= NUM_ABS; NumNeg <= NUM_NEG; diff --git a/crates/compiler/module/src/symbol.rs b/crates/compiler/module/src/symbol.rs index 50b495df5de..1ef6f148ea5 100644 --- a/crates/compiler/module/src/symbol.rs +++ b/crates/compiler/module/src/symbol.rs @@ -1274,6 +1274,9 @@ define_builtins! { 162 NUM_PI: "pi" 163 NUM_TAU: "tau" 164 NUM_BITWISE_NOT: "bitwiseNot" + 165 NUM_IS_APPROX_EQ: "isApproxEq" + 166 NUM_DIV_TRUNC_UNCHECKED: "divTruncUnchecked" // traps on division by zero + 167 NUM_REM_UNCHECKED: "remUnchecked" // traps on division by zero } 4 BOOL: "Bool" => { 0 BOOL_BOOL: "Bool" exposed_type=true // the Bool.Bool type alias @@ -1297,14 +1300,14 @@ define_builtins! { 3 STR_CONCAT: "concat" 4 STR_JOIN_WITH: "joinWith" 5 STR_SPLIT: "split" - 6 STR_COUNT_GRAPHEMES: "countGraphemes" + 6 STR_WITH_PREFIX: "withPrefix" 7 STR_STARTS_WITH: "startsWith" 8 STR_ENDS_WITH: "endsWith" 9 STR_FROM_UTF8: "fromUtf8" 10 STR_UT8_PROBLEM: "Utf8Problem" // the Utf8Problem type alias 11 STR_UT8_BYTE_PROBLEM: "Utf8ByteProblem" // the Utf8ByteProblem type alias 12 STR_TO_UTF8: "toUtf8" - 13 STR_STARTS_WITH_SCALAR: "startsWithScalar" + 13 STR_WALK_UTF8: "walkUtf8" 14 STR_ALIAS_ANALYSIS_STATIC: "#aliasAnalysisStatic" // string with the static lifetime 15 STR_FROM_UTF8_RANGE: "fromUtf8Range" 16 STR_REPEAT: "repeat" @@ -1325,7 +1328,7 @@ define_builtins! { 31 STR_TO_I16: "toI16" 32 STR_TO_U8: "toU8" 33 STR_TO_I8: "toI8" - 34 STR_TO_SCALARS: "toScalars" + 34 STR_CONTAINS: "contains" 35 STR_GET_UNSAFE: "getUnsafe" 36 STR_COUNT_UTF8_BYTES: "countUtf8Bytes" 37 STR_SUBSTRING_UNSAFE: "substringUnsafe" @@ -1333,24 +1336,14 @@ define_builtins! { 39 STR_SPLIT_LAST: "splitLast" 40 STR_WALK_UTF8_WITH_INDEX: "walkUtf8WithIndex" 41 STR_RESERVE: "reserve" - 42 STR_APPEND_SCALAR_UNSAFE: "appendScalarUnsafe" - 43 STR_APPEND_SCALAR: "appendScalar" - 44 STR_GET_SCALAR_UNSAFE: "getScalarUnsafe" - 45 STR_WALK_SCALARS: "walkScalars" - 46 STR_WALK_SCALARS_UNTIL: "walkScalarsUntil" - 47 STR_TO_NUM: "strToNum" - 48 STR_FROM_UTF8_RANGE_LOWLEVEL: "fromUtf8RangeLowlevel" - 49 STR_CAPACITY: "capacity" - 50 STR_REPLACE_EACH: "replaceEach" - 51 STR_REPLACE_FIRST: "replaceFirst" - 52 STR_REPLACE_LAST: "replaceLast" - 53 STR_WITH_CAPACITY: "withCapacity" - 54 STR_WITH_PREFIX: "withPrefix" - 55 STR_GRAPHEMES: "graphemes" - 56 STR_IS_VALID_SCALAR: "isValidScalar" - 57 STR_RELEASE_EXCESS_CAPACITY: "releaseExcessCapacity" - 58 STR_WALK_UTF8: "walkUtf8" - 59 STR_CONTAINS: "contains" + 42 STR_TO_NUM: "strToNum" + 43 STR_FROM_UTF8_RANGE_LOWLEVEL: "fromUtf8RangeLowlevel" + 44 STR_CAPACITY: "capacity" + 45 STR_REPLACE_EACH: "replaceEach" + 46 STR_REPLACE_FIRST: "replaceFirst" + 47 STR_REPLACE_LAST: "replaceLast" + 48 STR_WITH_CAPACITY: "withCapacity" + 49 STR_RELEASE_EXCESS_CAPACITY: "releaseExcessCapacity" } 6 LIST: "List" => { 0 LIST_LIST: "List" exposed_apply_type=true // the List.List type alias @@ -1440,6 +1433,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 7ccf6dbc859..38e1c758ede 100644 --- a/crates/compiler/mono/src/drop_specialization.rs +++ b/crates/compiler/mono/src/drop_specialization.rs @@ -1533,17 +1533,14 @@ fn low_level_no_rc(lowlevel: &LowLevel) -> RC { match lowlevel { Unreachable => RC::Uknown, - ListLen | StrIsEmpty | StrToScalars | StrCountGraphemes | StrGraphemes - | StrCountUtf8Bytes | StrGetCapacity | ListGetCapacity => RC::NoRc, - ListWithCapacity | StrWithCapacity => RC::NoRc, + ListLen | StrIsEmpty | StrCountUtf8Bytes | ListGetCapacity | ListWithCapacity + | StrWithCapacity => RC::NoRc, ListReplaceUnsafe => RC::Rc, StrGetUnsafe | ListGetUnsafe => RC::NoRc, ListConcat => RC::Rc, StrConcat => RC::Rc, StrSubstringUnsafe => RC::Rc, StrReserve => RC::Rc, - StrAppendScalar => RC::Rc, - StrGetScalarUnsafe => RC::NoRc, StrTrim => RC::Rc, StrTrimStart => RC::Rc, StrTrimEnd => RC::Rc, @@ -1603,7 +1600,6 @@ fn low_level_no_rc(lowlevel: &LowLevel) -> RC { I128OfDec => RC::NoRc, DictPseudoSeed => RC::NoRc, StrStartsWith | StrEndsWith => RC::NoRc, - StrStartsWithScalar => RC::NoRc, StrFromUtf8Range => RC::Rc, StrToUtf8 => RC::Rc, StrRepeat => RC::NoRc, @@ -1611,6 +1607,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 9c3e2b0140e..c96dd6b8807 100644 --- a/crates/compiler/mono/src/inc_dec.rs +++ b/crates/compiler/mono/src/inc_dec.rs @@ -1283,8 +1283,7 @@ fn lowlevel_borrow_signature(arena: &Bump, op: LowLevel) -> &[Ownership] { match op { Unreachable => arena.alloc_slice_copy(&[irrelevant]), DictPseudoSeed => arena.alloc_slice_copy(&[irrelevant]), - ListLen | StrIsEmpty | StrToScalars | StrCountGraphemes | StrGraphemes - | StrCountUtf8Bytes | StrGetCapacity | ListGetCapacity => { + ListLen | StrIsEmpty | StrCountUtf8Bytes | ListGetCapacity => { arena.alloc_slice_copy(&[borrowed]) } ListWithCapacity | StrWithCapacity => arena.alloc_slice_copy(&[irrelevant]), @@ -1294,8 +1293,6 @@ fn lowlevel_borrow_signature(arena: &Bump, op: LowLevel) -> &[Ownership] { StrConcat => arena.alloc_slice_copy(&[owned, borrowed]), StrSubstringUnsafe => arena.alloc_slice_copy(&[owned, irrelevant, irrelevant]), StrReserve => arena.alloc_slice_copy(&[owned, irrelevant]), - StrAppendScalar => arena.alloc_slice_copy(&[owned, irrelevant]), - StrGetScalarUnsafe => arena.alloc_slice_copy(&[borrowed, irrelevant]), StrTrim => arena.alloc_slice_copy(&[owned]), StrTrimStart => arena.alloc_slice_copy(&[owned]), StrTrimEnd => arena.alloc_slice_copy(&[owned]), @@ -1308,7 +1305,6 @@ fn lowlevel_borrow_signature(arena: &Bump, op: LowLevel) -> &[Ownership] { ListMap3 => arena.alloc_slice_copy(&[owned, owned, owned, function, closure_data]), ListMap4 => arena.alloc_slice_copy(&[owned, owned, owned, owned, function, closure_data]), ListSortWith => arena.alloc_slice_copy(&[owned, function, closure_data]), - ListAppendUnsafe => arena.alloc_slice_copy(&[owned, owned]), ListReserve => arena.alloc_slice_copy(&[owned, irrelevant]), ListSublist => arena.alloc_slice_copy(&[owned, irrelevant, irrelevant]), @@ -1358,7 +1354,6 @@ fn lowlevel_borrow_signature(arena: &Bump, op: LowLevel) -> &[Ownership] { NumBytesToU64 => arena.alloc_slice_copy(&[borrowed, irrelevant]), NumBytesToU128 => arena.alloc_slice_copy(&[borrowed, irrelevant]), StrStartsWith | StrEndsWith => arena.alloc_slice_copy(&[borrowed, borrowed]), - StrStartsWithScalar => arena.alloc_slice_copy(&[borrowed, irrelevant]), StrFromUtf8Range => arena.alloc_slice_copy(&[owned, irrelevant, irrelevant]), StrToUtf8 => arena.alloc_slice_copy(&[owned]), StrRepeat => arena.alloc_slice_copy(&[borrowed, irrelevant]), @@ -1366,6 +1361,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") diff --git a/crates/compiler/mono/src/ir.rs b/crates/compiler/mono/src/ir.rs index 8bb2347710b..c8110a43c5a 100644 --- a/crates/compiler/mono/src/ir.rs +++ b/crates/compiler/mono/src/ir.rs @@ -5156,6 +5156,21 @@ pub fn with_hole<'a>( Err(_) => return runtime_error(env, "Can't update record with improper layout"), }; + let sorted_fields_filtered = + sorted_fields + .iter() + .filter_map(|(label, _, opt_field_layout)| { + match opt_field_layout { + Ok(_) => Some(label), + Err(_) => { + debug_assert!(!updates.contains_key(label)); + // this was an optional field, and now does not exist! + None + } + } + }); + let sorted_fields = Vec::from_iter_in(sorted_fields_filtered, env.arena); + let single_field_struct = sorted_fields.len() == 1; // The struct indexing generated by the current context @@ -5164,44 +5179,38 @@ pub fn with_hole<'a>( let mut new_struct_symbols = Vec::with_capacity_in(sorted_fields.len(), env.arena); // Information about the fields that are being updated let mut fields = Vec::with_capacity_in(sorted_fields.len(), env.arena); - let mut index = 0; - for (label, _, opt_field_layout) in sorted_fields.iter() { - let record_index = (structure, index); - match opt_field_layout { - Err(_) => { - debug_assert!(!updates.contains_key(label)); - // this was an optional field, and now does not exist! - // do not increment `index`! - } - Ok(_field_layout) => { - current_struct_indexing.push(record_index); - - // The struct with a single field is optimized in such a way that replacing later indexing will cause an incorrect IR. - // Thus, only insert these struct_indices if there is more than one field in the struct. - if !single_field_struct { - let original_struct_symbol = env.unique_symbol(); - env.struct_indexing - .insert(record_index, original_struct_symbol); - } - if let Some(field) = updates.get(label) { - let new_struct_symbol = possible_reuse_symbol_or_specialize( - env, - procs, - layout_cache, - &field.loc_expr.value, - field.var, - ); - new_struct_symbols.push(new_struct_symbol); - fields.push(UpdateExisting(field)); - } else { - new_struct_symbols - .push(*env.struct_indexing.get(record_index).unwrap()); - fields.push(CopyExisting); - } + // Create a symbol for each of the fields as they might be referenced later. + // The struct with a single field is optimized in such a way that replacing later indexing will cause an incorrect IR. + // Thus, only insert these struct_indices if there is more than one field in the struct. + if !single_field_struct { + for index in 0..sorted_fields.len() { + let record_index = (structure, index as u64); - index += 1; - } + current_struct_indexing.push(record_index); + + let original_struct_symbol = env.unique_symbol(); + env.struct_indexing + .insert(record_index, original_struct_symbol); + } + } + + for (index, label) in sorted_fields.iter().enumerate() { + let record_index = (structure, index as u64); + + if let Some(field) = updates.get(label) { + let new_struct_symbol = possible_reuse_symbol_or_specialize( + env, + procs, + layout_cache, + &field.loc_expr.value, + field.var, + ); + new_struct_symbols.push(new_struct_symbol); + fields.push(UpdateExisting(field)); + } else { + new_struct_symbols.push(*env.struct_indexing.get(record_index).unwrap()); + fields.push(CopyExisting); } } diff --git a/crates/compiler/mono/src/layout/intern.rs b/crates/compiler/mono/src/layout/intern.rs index 91758ee9dc8..9beb0142bb8 100644 --- a/crates/compiler/mono/src/layout/intern.rs +++ b/crates/compiler/mono/src/layout/intern.rs @@ -103,6 +103,13 @@ macro_rules! impl_to_from_int_width { _ => roc_error_macros::internal_error!("not an integer layout!") } } + + pub fn try_to_int_width(&self) -> Option { + match self { + $(&$layout => Some($int_width),)* + _ => None, + } + } } }; } diff --git a/crates/compiler/mono/src/low_level.rs b/crates/compiler/mono/src/low_level.rs index d0fe15a8ea4..a0ab0fabece 100644 --- a/crates/compiler/mono/src/low_level.rs +++ b/crates/compiler/mono/src/low_level.rs @@ -61,10 +61,8 @@ enum FirstOrder { StrJoinWith, StrIsEmpty, StrStartsWith, - StrStartsWithScalar, StrEndsWith, StrSplit, - StrCountGraphemes, StrFromInt, StrFromUtf8, StrFromUtf8Range, diff --git a/crates/compiler/parse/src/ast.rs b/crates/compiler/parse/src/ast.rs index 26df0ec57ac..4e67ab2bbf6 100644 --- a/crates/compiler/parse/src/ast.rs +++ b/crates/compiler/parse/src/ast.rs @@ -119,10 +119,11 @@ pub struct WhenPattern<'a> { #[derive(Clone, Copy, Debug, PartialEq)] pub enum StrSegment<'a> { - Plaintext(&'a str), // e.g. "foo" - Unicode(Loc<&'a str>), // e.g. "00A0" in "\u(00A0)" - EscapedChar(EscapedChar), // e.g. '\n' in "Hello!\n" - Interpolated(Loc<&'a Expr<'a>>), // e.g. (name) in "Hi, \(name)!" + Plaintext(&'a str), // e.g. "foo" + Unicode(Loc<&'a str>), // e.g. "00A0" in "\u(00A0)" + EscapedChar(EscapedChar), // e.g. '\n' in "Hello!\n" + Interpolated(Loc<&'a Expr<'a>>), + DeprecatedInterpolated(Loc<&'a Expr<'a>>), // The old "$(...)" syntax - will be removed someday } #[derive(Clone, Copy, Debug, PartialEq, Eq)] @@ -141,6 +142,7 @@ pub enum EscapedChar { SingleQuote, // \' Backslash, // \\ CarriageReturn, // \r + Dollar, // \$ } impl EscapedChar { @@ -155,6 +157,7 @@ impl EscapedChar { CarriageReturn => 'r', Tab => 't', Newline => 'n', + Dollar => '$', } } @@ -168,6 +171,7 @@ impl EscapedChar { CarriageReturn => '\r', Tab => '\t', Newline => '\n', + Dollar => '$', } } } @@ -213,6 +217,7 @@ impl<'a> TryFrom> for SingleQuoteSegment<'a> { StrSegment::Unicode(s) => Ok(SingleQuoteSegment::Unicode(s)), StrSegment::EscapedChar(s) => Ok(SingleQuoteSegment::EscapedChar(s)), StrSegment::Interpolated(_) => Err(ESingleQuote::InterpolationNotAllowed), + StrSegment::DeprecatedInterpolated(_) => Err(ESingleQuote::InterpolationNotAllowed), } } } @@ -1291,6 +1296,16 @@ impl<'a> Spaceable<'a> for ImplementsAbilities<'a> { } impl<'a> Expr<'a> { + pub const REPL_OPAQUE_FUNCTION: Self = Expr::Var { + module_name: "", + ident: "", + }; + + pub const REPL_RUNTIME_CRASH: Self = Expr::Var { + module_name: "", + ident: "*", + }; + pub fn loc_ref(&'a self, region: Region) -> Loc<&'a Self> { Loc { region, @@ -1587,7 +1602,9 @@ impl<'a> Malformed for StrSegment<'a> { fn is_malformed(&self) -> bool { match self { StrSegment::Plaintext(_) | StrSegment::Unicode(_) | StrSegment::EscapedChar(_) => false, - StrSegment::Interpolated(expr) => expr.is_malformed(), + StrSegment::Interpolated(expr) | StrSegment::DeprecatedInterpolated(expr) => { + expr.is_malformed() + } } } } diff --git a/crates/compiler/parse/src/header.rs b/crates/compiler/parse/src/header.rs index 3425f465738..fa15f096d40 100644 --- a/crates/compiler/parse/src/header.rs +++ b/crates/compiler/parse/src/header.rs @@ -23,6 +23,16 @@ impl<'a> HeaderType<'a> { HeaderType::Platform { .. } | HeaderType::Package { .. } => &[], } } + pub fn to_string(&'a self) -> &str { + match self { + HeaderType::App { .. } => "app", + HeaderType::Hosted { .. } => "hosted", + HeaderType::Builtin { .. } => "builtin", + HeaderType::Package { .. } => "package", + HeaderType::Platform { .. } => "platform", + HeaderType::Interface { .. } => "interface", + } + } } #[derive(Debug)] diff --git a/crates/compiler/parse/src/string_literal.rs b/crates/compiler/parse/src/string_literal.rs index 325674f7825..3bb467baac0 100644 --- a/crates/compiler/parse/src/string_literal.rs +++ b/crates/compiler/parse/src/string_literal.rs @@ -173,6 +173,8 @@ pub fn parse_str_like_literal<'a>() -> impl Parser<'a, StrLikeLiteral<'a>, EStri }; } + let mut preceded_by_dollar = false; + while let Some(&byte) = bytes.next() { // This is for the byte we just grabbed from the iterator. segment_parsed_bytes += 1; @@ -386,7 +388,7 @@ pub fn parse_str_like_literal<'a>() -> impl Parser<'a, StrLikeLiteral<'a>, EStri bytes.next(); } - segments.push(StrSegment::Interpolated(loc_expr)); + segments.push(StrSegment::DeprecatedInterpolated(loc_expr)); // Reset the segment segment_parsed_bytes = 0; @@ -437,6 +439,9 @@ pub fn parse_str_like_literal<'a>() -> impl Parser<'a, StrLikeLiteral<'a>, EStri Some(b'n') => { escaped_char!(EscapedChar::Newline); } + Some(b'$') => { + escaped_char!(EscapedChar::Dollar); + } _ => { // Invalid escape! A backslash must be followed // by either an open paren or else one of the @@ -445,10 +450,67 @@ pub fn parse_str_like_literal<'a>() -> impl Parser<'a, StrLikeLiteral<'a>, EStri } } } + b'(' if preceded_by_dollar && !is_single_quote => { + // We're about to begin string interpolation! + // + // End the previous segment so we can begin a new one. + // Retroactively end it right before the `$` char we parsed. + // (We can't use end_segment! here because it ends it right after + // the just-parsed character, which here would be '(' rather than '$') + // Don't push anything if the string would be empty. + if segment_parsed_bytes > 2 { + // exclude the 2 chars we just parsed, namely '$' and '(' + let string_bytes = &state.bytes()[0..(segment_parsed_bytes - 2)]; + + match std::str::from_utf8(string_bytes) { + Ok(string) => { + state.advance_mut(string.len()); + + segments.push(StrSegment::Plaintext(string)); + } + Err(_) => { + return Err(( + MadeProgress, + EString::Space(BadInputError::BadUtf8, state.pos()), + )); + } + } + } + + // Advance past the `$(` + state.advance_mut(2); + + let original_byte_count = state.bytes().len(); + + // Parse an arbitrary expression, followed by ')' + let (_progress, loc_expr, new_state) = skip_second!( + specialize_ref( + EString::Format, + loc(allocated(reset_min_indent(expr::expr_help()))) + ), + word1(b')', EString::FormatEnd) + ) + .parse(arena, state, min_indent)?; + + // Advance the iterator past the expr we just parsed. + for _ in 0..(original_byte_count - new_state.bytes().len()) { + bytes.next(); + } + + segments.push(StrSegment::Interpolated(loc_expr)); + + // Reset the segment + segment_parsed_bytes = 0; + state = new_state; + } _ => { // All other characters need no special handling. } } + + // iff the '$' is followed by '(', this is string interpolation. + // We'll check for the '(' on the next iteration of the loop. + preceded_by_dollar = byte == b'$'; } // We ran out of characters before finding a closed quote diff --git a/crates/compiler/parse/tests/test_parse.rs b/crates/compiler/parse/tests/test_parse.rs index b55e1ad269a..93e92728aa3 100644 --- a/crates/compiler/parse/tests/test_parse.rs +++ b/crates/compiler/parse/tests/test_parse.rs @@ -158,9 +158,20 @@ mod test_parse { // INTERPOLATION + #[test] + fn escaped_interpolation() { + assert_segments(r#""Hi, \$(name)!""#, |arena| { + bumpalo::vec![in arena; + Plaintext("Hi, "), + EscapedChar(EscapedChar::Dollar), + Plaintext("(name)!"), + ] + }); + } + #[test] fn string_with_interpolation_in_middle() { - assert_segments(r#""Hi, \(name)!""#, |arena| { + assert_segments(r#""Hi, $(name)!""#, |arena| { let expr = arena.alloc(Var { module_name: "", ident: "name", @@ -176,7 +187,7 @@ mod test_parse { #[test] fn string_with_interpolation_in_front() { - assert_segments(r#""\(name), hi!""#, |arena| { + assert_segments(r#""$(name), hi!""#, |arena| { let expr = arena.alloc(Var { module_name: "", ident: "name", @@ -189,9 +200,39 @@ mod test_parse { }); } + #[test] + fn string_of_just_dollar_sign() { + let arena = Bump::new(); + + assert_eq!( + Ok(Expr::Str(PlainLine("$"))), + parse_expr_with(&arena, arena.alloc(r#""$""#)) + ); + } + + #[test] + fn string_beginning_with_dollar() { + let arena = Bump::new(); + + assert_eq!( + Ok(Expr::Str(PlainLine("$foo"))), + parse_expr_with(&arena, arena.alloc(r#""$foo""#)) + ); + } + + #[test] + fn string_ending_with_dollar() { + let arena = Bump::new(); + + assert_eq!( + Ok(Expr::Str(PlainLine("foo$"))), + parse_expr_with(&arena, arena.alloc(r#""foo$""#)) + ); + } + #[test] fn string_with_interpolation_in_back() { - assert_segments(r#""Hello \(name)""#, |arena| { + assert_segments(r#""Hello $(name)""#, |arena| { let expr = arena.alloc(Var { module_name: "", ident: "name", @@ -206,7 +247,7 @@ mod test_parse { #[test] fn string_with_multiple_interpolations() { - assert_segments(r#""Hi, \(name)! How is \(project) going?""#, |arena| { + assert_segments(r#""Hi, $(name)! How is $(project) going?""#, |arena| { let expr1 = arena.alloc(Var { module_name: "", ident: "name", @@ -227,6 +268,32 @@ mod test_parse { }); } + #[test] + fn string_with_non_interpolation_dollar_signs() { + assert_segments( + r#""$a Hi, $(name)! $b How is $(project) going? $c""#, + |arena| { + let expr1 = arena.alloc(Var { + module_name: "", + ident: "name", + }); + + let expr2 = arena.alloc(Var { + module_name: "", + ident: "project", + }); + + bumpalo::vec![in arena; + Plaintext("$a Hi, "), + Interpolated(Loc::new(10, 14, expr1)), + Plaintext("! $b How is "), + Interpolated(Loc::new(29, 36, expr2)), + Plaintext(" going? $c") + ] + }, + ); + } + #[test] fn empty_source_file() { assert_parsing_fails("", SyntaxError::Eof(Region::zero())); @@ -272,11 +339,11 @@ mod test_parse { let arena = Bump::new(); let src = indoc!( - r#" + r" foo = \list -> isTest = \_ -> 5 List.map list isTest - "# + " ); let actual = module_defs() .parse(&arena, State::new(src.as_bytes()), 0) @@ -295,12 +362,12 @@ mod test_parse { // highlights a problem with the else branch demanding a newline after its expression let src = indoc!( - r#" + r" main = v = \y -> if x then y else z 1 - "# + " ); let state = State::new(src.as_bytes()); diff --git a/crates/compiler/region/src/all.rs b/crates/compiler/region/src/all.rs index 53ee9c6e2ec..04fbce35983 100644 --- a/crates/compiler/region/src/all.rs +++ b/crates/compiler/region/src/all.rs @@ -364,7 +364,7 @@ where } } -#[derive(Debug)] +#[derive(Debug, Clone)] pub struct LineInfo { line_offsets: Vec, } diff --git a/crates/compiler/solve/tests/solve_expr.rs b/crates/compiler/solve/tests/solve_expr.rs index 8edea65a2fb..2f31d56f94b 100644 --- a/crates/compiler/solve/tests/solve_expr.rs +++ b/crates/compiler/solve/tests/solve_expr.rs @@ -98,12 +98,12 @@ mod solve_expr { fn dec_literal() { infer_eq( indoc!( - r#" + r" val : Dec val = 1.2 val - "# + " ), "Dec", ); @@ -137,9 +137,9 @@ mod solve_expr { fn string_starts_with() { infer_eq_without_problem( indoc!( - r#" + r" Str.startsWith - "# + " ), "Str, Str -> Bool", ); @@ -149,9 +149,9 @@ mod solve_expr { fn string_from_int() { infer_eq_without_problem( indoc!( - r#" + r" Num.toStr - "# + " ), "Num * -> Str", ); @@ -161,9 +161,9 @@ mod solve_expr { fn string_from_utf8() { infer_eq_without_problem( indoc!( - r#" + r" Str.fromUtf8 - "# + " ), "List U8 -> Result Str [BadUtf8 Utf8ByteProblem Nat]", ); @@ -175,9 +175,9 @@ mod solve_expr { fn empty_list() { infer_eq( indoc!( - r#" + r" [] - "# + " ), "List *", ); @@ -187,9 +187,9 @@ mod solve_expr { fn list_of_lists() { infer_eq( indoc!( - r#" + r" [[]] - "# + " ), "List (List *)", ); @@ -199,9 +199,9 @@ mod solve_expr { fn triple_nested_list() { infer_eq( indoc!( - r#" + r" [[[]]] - "# + " ), "List (List (List *))", ); @@ -211,9 +211,9 @@ mod solve_expr { fn nested_empty_list() { infer_eq( indoc!( - r#" + r" [[], [[]]] - "# + " ), "List (List (List *))", ); @@ -223,9 +223,9 @@ mod solve_expr { fn list_of_one_int() { infer_eq( indoc!( - r#" + r" [42] - "# + " ), "List (Num *)", ); @@ -235,9 +235,9 @@ mod solve_expr { fn triple_nested_int_list() { infer_eq( indoc!( - r#" + r" [[[5]]] - "# + " ), "List (List (List (Num *)))", ); @@ -247,9 +247,9 @@ mod solve_expr { fn list_of_ints() { infer_eq( indoc!( - r#" + r" [1, 2, 3] - "# + " ), "List (Num *)", ); @@ -259,9 +259,9 @@ mod solve_expr { fn nested_list_of_ints() { infer_eq( indoc!( - r#" + r" [[1], [2, 3]] - "# + " ), "List (List (Num *))", ); @@ -312,7 +312,7 @@ mod solve_expr { r#" whatItIs = "great" - "type inference is \(whatItIs)!" + "type inference is $(whatItIs)!" "# ), "Str", @@ -326,7 +326,7 @@ mod solve_expr { r#" whatItIs = "great" - str = "type inference is \(whatItIs)!" + str = "type inference is $(whatItIs)!" whatItIs "# @@ -342,7 +342,7 @@ mod solve_expr { r#" rec = { whatItIs: "great" } - str = "type inference is \(rec.whatItIs)!" + str = "type inference is $(rec.whatItIs)!" rec "# @@ -381,9 +381,9 @@ mod solve_expr { fn mismatch_heterogeneous_nested_empty_list() { infer_eq( indoc!( - r#" + r" [[1], [[]]] - "# + " ), "List ", ); @@ -395,9 +395,9 @@ mod solve_expr { fn always_return_empty_record() { infer_eq( indoc!( - r#" + r" \_ -> {} - "# + " ), "* -> {}", ); @@ -407,9 +407,9 @@ mod solve_expr { fn two_arg_return_int() { infer_eq( indoc!( - r#" + r" \_, _ -> 42 - "# + " ), "*, * -> Num *", ); @@ -433,11 +433,11 @@ mod solve_expr { fn def_empty_record() { infer_eq( indoc!( - r#" + r" foo = {} foo - "# + " ), "{}", ); @@ -461,11 +461,11 @@ mod solve_expr { fn def_1_arg_closure() { infer_eq( indoc!( - r#" + r" fn = \_ -> {} fn - "# + " ), "* -> {}", ); @@ -516,9 +516,9 @@ mod solve_expr { fn applied_tag_function_list() { infer_eq_without_problem( indoc!( - r#" + r" [\x -> Bar x, Foo] - "# + " ), "List (a -> [Bar a, Foo a])", ) @@ -529,9 +529,9 @@ mod solve_expr { fn applied_tag_function_list_other_way() { infer_eq_without_problem( indoc!( - r#" + r" [Foo, \x -> Bar x] - "# + " ), "List (a -> [Bar a, Foo a])", ) @@ -542,7 +542,7 @@ mod solve_expr { fn applied_tag_function_record() { infer_eq_without_problem( indoc!( - r#" + r" foo0 = Foo foo1 = Foo foo2 = Foo @@ -552,7 +552,7 @@ mod solve_expr { y: [foo1, \x -> Foo x], z: [foo2, \x,y -> Foo x y] } - "# + " ), "{ x : List [Foo], y : List (a -> [Foo a]), z : List (b, c -> [Foo b c]) }", ) @@ -563,12 +563,12 @@ mod solve_expr { fn applied_tag_function_with_annotation() { infer_eq_without_problem( indoc!( - r#" + r" x : List [Foo I64] x = List.map [1, 2] Foo x - "# + " ), "List [Foo I64]", ) @@ -578,11 +578,11 @@ mod solve_expr { fn def_2_arg_closure() { infer_eq( indoc!( - r#" + r" func = \_, _ -> 42 func - "# + " ), "*, * -> Num *", ); @@ -638,7 +638,7 @@ mod solve_expr { fn def_multiple_ints() { infer_eq( indoc!( - r#" + r" c = b b = a @@ -646,7 +646,7 @@ mod solve_expr { a = 42 c - "# + " ), "Num *", ); @@ -656,7 +656,7 @@ mod solve_expr { fn def_returning_closure() { infer_eq( indoc!( - r#" + r" f = \z -> z g = \z -> z @@ -665,7 +665,7 @@ mod solve_expr { b = g x x ) - "# + " ), "a -> a", ); @@ -705,13 +705,13 @@ mod solve_expr { fn identity_infers_principal_type() { infer_eq( indoc!( - r#" + r" identity = \x -> x y = identity 5 identity - "# + " ), "a -> a", ); @@ -738,11 +738,11 @@ mod solve_expr { fn call_returns_list() { infer_eq( indoc!( - r#" + r" enlist = \val -> [val] enlist 5 - "# + " ), "List (Num *)", ); @@ -767,9 +767,9 @@ mod solve_expr { fn pizza_desugar() { infer_eq( indoc!( - r#" + r" 1 |> (\a -> a) - "# + " ), "Num *", ); @@ -793,9 +793,9 @@ mod solve_expr { fn anonymous_identity() { infer_eq( indoc!( - r#" + r" (\a -> a) 3.14 - "# + " ), "Frac *", ); @@ -805,9 +805,9 @@ mod solve_expr { fn identity_of_identity() { infer_eq( indoc!( - r#" + r" (\val -> val) (\val -> val) - "# + " ), "a -> a", ); @@ -817,11 +817,11 @@ mod solve_expr { fn recursive_identity() { infer_eq( indoc!( - r#" + r" identity = \val -> val identity identity - "# + " ), "a -> a", ); @@ -831,9 +831,9 @@ mod solve_expr { fn identity_function() { infer_eq( indoc!( - r#" + r" \val -> val - "# + " ), "a -> a", ); @@ -843,12 +843,12 @@ mod solve_expr { fn use_apply() { infer_eq( indoc!( - r#" + r" identity = \a -> a apply = \f, x -> f x apply identity 5 - "# + " ), "Num *", ); @@ -858,9 +858,9 @@ mod solve_expr { fn apply_function() { infer_eq( indoc!( - r#" + r" \f, x -> f x - "# + " ), "(a -> b), a -> b", ); @@ -871,13 +871,13 @@ mod solve_expr { // fn use_flip() { // infer_eq( // indoc!( - // r#" + // r" // flip = \f -> (\a b -> f b a) // neverendingInt = \f int -> f int // x = neverendingInt (\a -> a) 5 // flip neverendingInt - // "# + // " // ), // "(Num *, (a -> a)) -> Num *", // ); @@ -887,9 +887,9 @@ mod solve_expr { fn flip_function() { infer_eq( indoc!( - r#" + r" \f -> (\a, b -> f b a) - "# + " ), "(a, b -> c) -> (b, a -> c)", ); @@ -899,9 +899,9 @@ mod solve_expr { fn always_function() { infer_eq( indoc!( - r#" + r" \val -> \_ -> val - "# + " ), "a -> (* -> a)", ); @@ -911,9 +911,9 @@ mod solve_expr { fn pass_a_function() { infer_eq( indoc!( - r#" + r" \f -> f {} - "# + " ), "({} -> a) -> a", ); @@ -925,9 +925,9 @@ mod solve_expr { // fn div_operator() { // infer_eq( // indoc!( - // r#" + // r" // \l r -> l / r - // "# + // " // ), // "F64, F64 -> F64", // ); @@ -937,9 +937,9 @@ mod solve_expr { // fn basic_float_division() { // infer_eq( // indoc!( - // r#" + // r" // 1 / 2 - // "# + // " // ), // "F64", // ); @@ -949,9 +949,9 @@ mod solve_expr { // fn basic_int_division() { // infer_eq( // indoc!( - // r#" + // r" // 1 // 2 - // "# + // " // ), // "Num *", // ); @@ -961,9 +961,9 @@ mod solve_expr { // fn basic_addition() { // infer_eq( // indoc!( - // r#" + // r" // 1 + 2 - // "# + // " // ), // "Num *", // ); @@ -973,9 +973,9 @@ mod solve_expr { // fn basic_circular_type() { // infer_eq( // indoc!( - // r#" + // r" // \x -> x x - // "# + // " // ), // "", // ); @@ -984,9 +984,9 @@ mod solve_expr { // #[test] // fn y_combinator_has_circular_type() { // assert_eq!( - // infer(indoc!(r#" + // infer(indoc!(r" // \f -> (\x -> f x x) (\x -> f x x) - // "#)), + // ")), // Erroneous(Problem::CircularType) // ); // } @@ -1022,12 +1022,12 @@ mod solve_expr { fn if_with_int_literals() { infer_eq( indoc!( - r#" + r" if Bool.true then 42 else 24 - "# + " ), "Num *", ); @@ -1037,11 +1037,11 @@ mod solve_expr { fn when_with_int_literals() { infer_eq( indoc!( - r#" + r" when 1 is 1 -> 2 3 -> 4 - "# + " ), "Num *", ); @@ -1120,14 +1120,14 @@ mod solve_expr { fn record_with_bound_var() { infer_eq( indoc!( - r#" + r" fn = \rec -> x = rec.x rec fn - "# + " ), "{ x : a }b -> { x : a }b", ); @@ -1137,12 +1137,12 @@ mod solve_expr { fn using_type_signature() { infer_eq( indoc!( - r#" + r" bar : custom -> custom bar = \x -> x bar - "# + " ), "custom -> custom", ); @@ -1166,11 +1166,11 @@ mod solve_expr { fn type_signature_without_body_rigid() { infer_eq( indoc!( - r#" + r" foo : Num * -> custom foo 2 - "# + " ), "custom", ); @@ -1185,11 +1185,11 @@ mod solve_expr { fn type_signature_without_body_record() { infer_eq( indoc!( - r#" + r" { x, y } : { x : ({} -> custom), y : {} } x - "# + " ), "{} -> custom", ); @@ -1199,7 +1199,7 @@ mod solve_expr { fn empty_record_pattern() { infer_eq( indoc!( - r#" + r" # technically, an empty record can be destructured thunk = \{} -> 42 @@ -1207,7 +1207,7 @@ mod solve_expr { when xEmpty is { x: {} } -> {} - "# + " ), "{}", ); @@ -1218,12 +1218,12 @@ mod solve_expr { // check that a closed record remains closed infer_eq( indoc!( - r#" + r" foo : { x : custom } -> custom foo = \{ x } -> x foo - "# + " ), "{ x : custom } -> custom", ); @@ -1247,9 +1247,9 @@ mod solve_expr { fn bare_tag() { infer_eq( indoc!( - r#" + r" Foo - "# + " ), "[Foo]", ); @@ -1259,9 +1259,9 @@ mod solve_expr { fn single_tag_pattern() { infer_eq( indoc!( - r#" + r" \Foo -> 42 - "# + " ), "[Foo] -> Num *", ); @@ -1271,12 +1271,12 @@ mod solve_expr { fn two_tag_pattern() { infer_eq( indoc!( - r#" + r" \x -> when x is True -> 1 False -> 0 - "# + " ), "[False, True] -> Num *", ); @@ -1298,13 +1298,13 @@ mod solve_expr { fn record_extraction() { infer_eq( indoc!( - r#" + r" f = \x -> when x is { a, b: _ } -> a f - "# + " ), "{ a : a, b : * }* -> a", ); @@ -1314,10 +1314,10 @@ mod solve_expr { fn record_field_pattern_match_with_guard() { infer_eq( indoc!( - r#" + r" when { x: 5 } is { x: 4 } -> 4 - "# + " ), "Num *", ); @@ -1327,9 +1327,9 @@ mod solve_expr { fn tag_union_pattern_match() { infer_eq( indoc!( - r#" + r" \Foo x -> Foo x - "# + " ), "[Foo a] -> [Foo a]", ); @@ -1364,11 +1364,11 @@ mod solve_expr { fn qualified_annotation_num_integer() { infer_eq( indoc!( - r#" + r" int : Num.Num (Num.Integer Num.Signed64) int - "# + " ), "I64", ); @@ -1377,12 +1377,12 @@ mod solve_expr { fn qualified_annotated_num_integer() { infer_eq( indoc!( - r#" + r" int : Num.Num (Num.Integer Num.Signed64) int = 5 int - "# + " ), "I64", ); @@ -1391,11 +1391,11 @@ mod solve_expr { fn annotation_num_integer() { infer_eq( indoc!( - r#" + r" int : Num (Integer Signed64) int - "# + " ), "I64", ); @@ -1404,12 +1404,12 @@ mod solve_expr { fn annotated_num_integer() { infer_eq( indoc!( - r#" + r" int : Num (Integer Signed64) int = 5 int - "# + " ), "I64", ); @@ -1419,11 +1419,11 @@ mod solve_expr { fn qualified_annotation_using_i128() { infer_eq( indoc!( - r#" + r" int : Num.I128 int - "# + " ), "I128", ); @@ -1432,12 +1432,12 @@ mod solve_expr { fn qualified_annotated_using_i128() { infer_eq( indoc!( - r#" + r" int : Num.I128 int = 5 int - "# + " ), "I128", ); @@ -1446,11 +1446,11 @@ mod solve_expr { fn annotation_using_i128() { infer_eq( indoc!( - r#" + r" int : I128 int - "# + " ), "I128", ); @@ -1459,12 +1459,12 @@ mod solve_expr { fn annotated_using_i128() { infer_eq( indoc!( - r#" + r" int : I128 int = 5 int - "# + " ), "I128", ); @@ -1474,11 +1474,11 @@ mod solve_expr { fn qualified_annotation_using_u128() { infer_eq( indoc!( - r#" + r" int : Num.U128 int - "# + " ), "U128", ); @@ -1487,12 +1487,12 @@ mod solve_expr { fn qualified_annotated_using_u128() { infer_eq( indoc!( - r#" + r" int : Num.U128 int = 5 int - "# + " ), "U128", ); @@ -1501,11 +1501,11 @@ mod solve_expr { fn annotation_using_u128() { infer_eq( indoc!( - r#" + r" int : U128 int - "# + " ), "U128", ); @@ -1514,12 +1514,12 @@ mod solve_expr { fn annotated_using_u128() { infer_eq( indoc!( - r#" + r" int : U128 int = 5 int - "# + " ), "U128", ); @@ -1529,11 +1529,11 @@ mod solve_expr { fn qualified_annotation_using_i64() { infer_eq( indoc!( - r#" + r" int : Num.I64 int - "# + " ), "I64", ); @@ -1542,12 +1542,12 @@ mod solve_expr { fn qualified_annotated_using_i64() { infer_eq( indoc!( - r#" + r" int : Num.I64 int = 5 int - "# + " ), "I64", ); @@ -1556,11 +1556,11 @@ mod solve_expr { fn annotation_using_i64() { infer_eq( indoc!( - r#" + r" int : I64 int - "# + " ), "I64", ); @@ -1569,12 +1569,12 @@ mod solve_expr { fn annotated_using_i64() { infer_eq( indoc!( - r#" + r" int : I64 int = 5 int - "# + " ), "I64", ); @@ -1584,11 +1584,11 @@ mod solve_expr { fn qualified_annotation_using_u64() { infer_eq( indoc!( - r#" + r" int : Num.U64 int - "# + " ), "U64", ); @@ -1597,12 +1597,12 @@ mod solve_expr { fn qualified_annotated_using_u64() { infer_eq( indoc!( - r#" + r" int : Num.U64 int = 5 int - "# + " ), "U64", ); @@ -1611,11 +1611,11 @@ mod solve_expr { fn annotation_using_u64() { infer_eq( indoc!( - r#" + r" int : U64 int - "# + " ), "U64", ); @@ -1624,12 +1624,12 @@ mod solve_expr { fn annotated_using_u64() { infer_eq( indoc!( - r#" + r" int : U64 int = 5 int - "# + " ), "U64", ); @@ -1639,11 +1639,11 @@ mod solve_expr { fn qualified_annotation_using_i32() { infer_eq( indoc!( - r#" + r" int : Num.I32 int - "# + " ), "I32", ); @@ -1652,12 +1652,12 @@ mod solve_expr { fn qualified_annotated_using_i32() { infer_eq( indoc!( - r#" + r" int : Num.I32 int = 5 int - "# + " ), "I32", ); @@ -1666,11 +1666,11 @@ mod solve_expr { fn annotation_using_i32() { infer_eq( indoc!( - r#" + r" int : I32 int - "# + " ), "I32", ); @@ -1679,12 +1679,12 @@ mod solve_expr { fn annotated_using_i32() { infer_eq( indoc!( - r#" + r" int : I32 int = 5 int - "# + " ), "I32", ); @@ -1694,11 +1694,11 @@ mod solve_expr { fn qualified_annotation_using_u32() { infer_eq( indoc!( - r#" + r" int : Num.U32 int - "# + " ), "U32", ); @@ -1707,12 +1707,12 @@ mod solve_expr { fn qualified_annotated_using_u32() { infer_eq( indoc!( - r#" + r" int : Num.U32 int = 5 int - "# + " ), "U32", ); @@ -1721,11 +1721,11 @@ mod solve_expr { fn annotation_using_u32() { infer_eq( indoc!( - r#" + r" int : U32 int - "# + " ), "U32", ); @@ -1734,12 +1734,12 @@ mod solve_expr { fn annotated_using_u32() { infer_eq( indoc!( - r#" + r" int : U32 int = 5 int - "# + " ), "U32", ); @@ -1749,11 +1749,11 @@ mod solve_expr { fn qualified_annotation_using_i16() { infer_eq( indoc!( - r#" + r" int : Num.I16 int - "# + " ), "I16", ); @@ -1762,12 +1762,12 @@ mod solve_expr { fn qualified_annotated_using_i16() { infer_eq( indoc!( - r#" + r" int : Num.I16 int = 5 int - "# + " ), "I16", ); @@ -1776,11 +1776,11 @@ mod solve_expr { fn annotation_using_i16() { infer_eq( indoc!( - r#" + r" int : I16 int - "# + " ), "I16", ); @@ -1789,12 +1789,12 @@ mod solve_expr { fn annotated_using_i16() { infer_eq( indoc!( - r#" + r" int : I16 int = 5 int - "# + " ), "I16", ); @@ -1804,11 +1804,11 @@ mod solve_expr { fn qualified_annotation_using_u16() { infer_eq( indoc!( - r#" + r" int : Num.U16 int - "# + " ), "U16", ); @@ -1817,12 +1817,12 @@ mod solve_expr { fn qualified_annotated_using_u16() { infer_eq( indoc!( - r#" + r" int : Num.U16 int = 5 int - "# + " ), "U16", ); @@ -1831,11 +1831,11 @@ mod solve_expr { fn annotation_using_u16() { infer_eq( indoc!( - r#" + r" int : U16 int - "# + " ), "U16", ); @@ -1844,12 +1844,12 @@ mod solve_expr { fn annotated_using_u16() { infer_eq( indoc!( - r#" + r" int : U16 int = 5 int - "# + " ), "U16", ); @@ -1859,11 +1859,11 @@ mod solve_expr { fn qualified_annotation_using_i8() { infer_eq( indoc!( - r#" + r" int : Num.I8 int - "# + " ), "I8", ); @@ -1872,12 +1872,12 @@ mod solve_expr { fn qualified_annotated_using_i8() { infer_eq( indoc!( - r#" + r" int : Num.I8 int = 5 int - "# + " ), "I8", ); @@ -1886,11 +1886,11 @@ mod solve_expr { fn annotation_using_i8() { infer_eq( indoc!( - r#" + r" int : I8 int - "# + " ), "I8", ); @@ -1899,12 +1899,12 @@ mod solve_expr { fn annotated_using_i8() { infer_eq( indoc!( - r#" + r" int : I8 int = 5 int - "# + " ), "I8", ); @@ -1914,11 +1914,11 @@ mod solve_expr { fn qualified_annotation_using_u8() { infer_eq( indoc!( - r#" + r" int : Num.U8 int - "# + " ), "U8", ); @@ -1927,12 +1927,12 @@ mod solve_expr { fn qualified_annotated_using_u8() { infer_eq( indoc!( - r#" + r" int : Num.U8 int = 5 int - "# + " ), "U8", ); @@ -1941,11 +1941,11 @@ mod solve_expr { fn annotation_using_u8() { infer_eq( indoc!( - r#" + r" int : U8 int - "# + " ), "U8", ); @@ -1954,12 +1954,12 @@ mod solve_expr { fn annotated_using_u8() { infer_eq( indoc!( - r#" + r" int : U8 int = 5 int - "# + " ), "U8", ); @@ -1969,11 +1969,11 @@ mod solve_expr { fn qualified_annotation_num_floatingpoint() { infer_eq( indoc!( - r#" + r" float : Num.Num (Num.FloatingPoint Num.Binary64) float - "# + " ), "F64", ); @@ -1982,12 +1982,12 @@ mod solve_expr { fn qualified_annotated_num_floatingpoint() { infer_eq( indoc!( - r#" + r" float : Num.Num (Num.FloatingPoint Num.Binary64) float = 5.5 float - "# + " ), "F64", ); @@ -1996,11 +1996,11 @@ mod solve_expr { fn annotation_num_floatingpoint() { infer_eq( indoc!( - r#" + r" float : Num (FloatingPoint Binary64) float - "# + " ), "F64", ); @@ -2009,12 +2009,12 @@ mod solve_expr { fn annotated_num_floatingpoint() { infer_eq( indoc!( - r#" + r" float : Num (FloatingPoint Binary64) float = 5.5 float - "# + " ), "F64", ); @@ -2024,11 +2024,11 @@ mod solve_expr { fn qualified_annotation_f64() { infer_eq( indoc!( - r#" + r" float : Num.F64 float - "# + " ), "F64", ); @@ -2037,12 +2037,12 @@ mod solve_expr { fn qualified_annotated_f64() { infer_eq( indoc!( - r#" + r" float : Num.F64 float = 5.5 float - "# + " ), "F64", ); @@ -2051,11 +2051,11 @@ mod solve_expr { fn annotation_f64() { infer_eq( indoc!( - r#" + r" float : F64 float - "# + " ), "F64", ); @@ -2064,12 +2064,12 @@ mod solve_expr { fn annotated_f64() { infer_eq( indoc!( - r#" + r" float : F64 float = 5.5 float - "# + " ), "F64", ); @@ -2079,11 +2079,11 @@ mod solve_expr { fn qualified_annotation_f32() { infer_eq( indoc!( - r#" + r" float : Num.F32 float - "# + " ), "F32", ); @@ -2092,12 +2092,12 @@ mod solve_expr { fn qualified_annotated_f32() { infer_eq( indoc!( - r#" + r" float : Num.F32 float = 5.5 float - "# + " ), "F32", ); @@ -2106,11 +2106,11 @@ mod solve_expr { fn annotation_f32() { infer_eq( indoc!( - r#" + r" float : F32 float - "# + " ), "F32", ); @@ -2119,12 +2119,12 @@ mod solve_expr { fn annotated_f32() { infer_eq( indoc!( - r#" + r" float : F32 float = 5.5 float - "# + " ), "F32", ); @@ -2134,14 +2134,14 @@ mod solve_expr { fn fake_result_ok() { infer_eq( indoc!( - r#" + r" Res a e : [Okay a, Error e] ok : Res I64 * ok = Okay 5 ok - "# + " ), "Res I64 *", ); @@ -2168,12 +2168,12 @@ mod solve_expr { fn basic_result_ok() { infer_eq( indoc!( - r#" + r" ok : Result I64 * ok = Ok 5 ok - "# + " ), "Result I64 *", ); @@ -2221,13 +2221,13 @@ mod solve_expr { // // wasn't added to the vars_by_symbol. // infer_eq_without_problem( // indoc!( - // r#" + // r" // int : I64 // p = (\x -> x) int // p - // "# + // " // ), // "I64", // ); @@ -2237,14 +2237,14 @@ mod solve_expr { fn num_identity() { infer_eq_without_problem( indoc!( - r#" + r" numIdentity : Num.Num a -> Num.Num a numIdentity = \x -> x y = numIdentity 3.14 { numIdentity, x : numIdentity 42, y } - "# + " ), "{ numIdentity : Num a -> Num a, x : Num *, y : Frac * }", ); @@ -2254,7 +2254,7 @@ mod solve_expr { fn when_with_annotation() { infer_eq_without_problem( indoc!( - r#" + r" x : Num.Num (Num.Integer Num.Signed64) x = when 2 is @@ -2262,7 +2262,7 @@ mod solve_expr { _ -> 5 x - "# + " ), "I64", ); @@ -2273,14 +2273,14 @@ mod solve_expr { fn integer_sum() { infer_eq_without_problem( indoc!( - r#" + r" f = \n -> when n is 0 -> 0 _ -> f n f - "# + " ), "Num * -> Num *", ); @@ -2290,13 +2290,13 @@ mod solve_expr { fn identity_map() { infer_eq_without_problem( indoc!( - r#" + r" map : (a -> b), [Identity a] -> [Identity b] map = \f, identity -> when identity is Identity v -> Identity (f v) map - "# + " ), "(a -> b), [Identity a] -> [Identity b]", ); @@ -2306,14 +2306,14 @@ mod solve_expr { fn to_bit() { infer_eq_without_problem( indoc!( - r#" + r" toBit = \bool -> when bool is True -> 1 False -> 0 toBit - "# + " ), "[False, True] -> Num *", ); @@ -2342,14 +2342,14 @@ mod solve_expr { fn from_bit() { infer_eq_without_problem( indoc!( - r#" + r" fromBit = \int -> when int is 0 -> False _ -> True fromBit - "# + " ), "Num * -> [False, True]", ); @@ -2359,7 +2359,7 @@ mod solve_expr { fn result_map_explicit() { infer_eq_without_problem( indoc!( - r#" + r" map : (a -> b), [Err e, Ok a] -> [Err e, Ok b] map = \f, result -> when result is @@ -2367,7 +2367,7 @@ mod solve_expr { Err e -> Err e map - "# + " ), "(a -> b), [Err e, Ok a] -> [Err e, Ok b]", ); @@ -2377,7 +2377,7 @@ mod solve_expr { fn result_map_alias() { infer_eq_without_problem( indoc!( - r#" + r" Res e a : [Ok a, Err e] map : (a -> b), Res e a -> Res e b @@ -2387,7 +2387,7 @@ mod solve_expr { Err e -> Err e map - "# + " ), "(a -> b), Res e a -> Res e b", ); @@ -2397,11 +2397,11 @@ mod solve_expr { fn record_from_load() { infer_eq_without_problem( indoc!( - r#" + r" foo = \{ x } -> x foo { x: 5 } - "# + " ), "Num *", ); @@ -2411,7 +2411,7 @@ mod solve_expr { fn defs_from_load() { infer_eq_without_problem( indoc!( - r#" + r" alwaysThreePointZero = \_ -> 3.0 answer = 42 @@ -2421,7 +2421,7 @@ mod solve_expr { threePointZero = identity (alwaysThreePointZero {}) threePointZero - "# + " ), "Frac *", ); @@ -2463,14 +2463,14 @@ mod solve_expr { fn use_alias_with_argument_in_let() { infer_eq_without_problem( indoc!( - r#" + r" Foo a : { foo : a } v : Foo (Num.Num (Num.Integer Num.Signed64)) v = { foo: 42 } v - "# + " ), "Foo I64", ); @@ -2480,14 +2480,14 @@ mod solve_expr { fn identity_alias() { infer_eq_without_problem( indoc!( - r#" + r" Foo a : { foo : a } id : Foo a -> Foo a id = \x -> x id - "# + " ), "Foo a -> Foo a", ); @@ -2497,12 +2497,12 @@ mod solve_expr { fn linked_list_empty() { infer_eq_without_problem( indoc!( - r#" + r" empty : [Cons a (ConsList a), Nil] as ConsList a empty = Nil empty - "# + " ), "ConsList a", ); @@ -2512,12 +2512,12 @@ mod solve_expr { fn linked_list_singleton() { infer_eq_without_problem( indoc!( - r#" + r" singleton : a -> [Cons a (ConsList a), Nil] as ConsList a singleton = \x -> Cons x Nil singleton - "# + " ), "a -> ConsList a", ); @@ -2527,7 +2527,7 @@ mod solve_expr { fn peano_length() { infer_eq_without_problem( indoc!( - r#" + r" Peano : [S Peano, Z] length : Peano -> Num.Num (Num.Integer Num.Signed64) @@ -2537,7 +2537,7 @@ mod solve_expr { S v -> length v length - "# + " ), "Peano -> I64", ); @@ -2547,7 +2547,7 @@ mod solve_expr { fn peano_map() { infer_eq_without_problem( indoc!( - r#" + r" map : [S Peano, Z] as Peano -> Peano map = \peano -> when peano is @@ -2555,7 +2555,7 @@ mod solve_expr { S v -> S (map v) map - "# + " ), "Peano -> Peano", ); @@ -2565,7 +2565,7 @@ mod solve_expr { fn infer_linked_list_map() { infer_eq_without_problem( indoc!( - r#" + r" map = \f, list -> when list is Nil -> Nil @@ -2576,7 +2576,7 @@ mod solve_expr { Cons a b map - "# + " ), "(a -> b), [Cons a c, Nil] as c -> [Cons b d, Nil] as d", ); @@ -2586,7 +2586,7 @@ mod solve_expr { fn typecheck_linked_list_map() { infer_eq_without_problem( indoc!( - r#" + r" ConsList a : [Cons a (ConsList a), Nil] map : (a -> b), ConsList a -> ConsList b @@ -2597,7 +2597,7 @@ mod solve_expr { Cons (f x) (map f xs) map - "# + " ), "(a -> b), ConsList a -> ConsList b", ); @@ -2629,7 +2629,7 @@ mod solve_expr { fn mismatch_in_apply_gets_reported() { infer_eq( indoc!( - r#" + r" r : { x : (Num.Num (Num.Integer Signed64)) } r = { x : 1 } @@ -2639,7 +2639,7 @@ mod solve_expr { when 0 is 1 -> s.left 0 -> r - "# + " ), "", ); @@ -2649,7 +2649,7 @@ mod solve_expr { fn mismatch_in_tag_gets_reported() { infer_eq( indoc!( - r#" + r" r : [Ok Str.Str] r = Ok 1 @@ -2659,7 +2659,7 @@ mod solve_expr { when 0 is 1 -> s.left 0 -> r - "# + " ), "", ); @@ -2671,12 +2671,12 @@ mod solve_expr { // fn nums() { // infer_eq_without_problem( // indoc!( - // r#" + // r" // s : Num * // s = 3.1 // s - // "# + // " // ), // "", // ); @@ -2709,14 +2709,14 @@ mod solve_expr { fn unit_alias() { infer_eq( indoc!( - r#" + r" Unit : [Unit] unit : Unit unit = Unit unit - "# + " ), "Unit", ); @@ -2726,7 +2726,7 @@ mod solve_expr { fn rigid_in_letnonrec() { infer_eq_without_problem( indoc!( - r#" + r" ConsList a : [Cons a (ConsList a), Nil] toEmpty : ConsList a -> ConsList a @@ -2737,7 +2737,7 @@ mod solve_expr { result toEmpty - "# + " ), "ConsList a -> ConsList a", ); @@ -2747,7 +2747,7 @@ mod solve_expr { fn rigid_in_letrec_ignored() { infer_eq_without_problem( indoc!( - r#" + r" ConsList a : [Cons a (ConsList a), Nil] toEmpty : ConsList a -> ConsList a @@ -2758,7 +2758,7 @@ mod solve_expr { toEmpty result toEmpty - "# + " ), "ConsList a -> ConsList a", ); @@ -2846,7 +2846,7 @@ mod solve_expr { fn peano_map_infer_nested() { infer_eq( indoc!( - r#" + r" map = \peano -> when peano is Z -> Z @@ -2855,7 +2855,7 @@ mod solve_expr { map - "# + " ), "[S a, Z] as a -> [S b, Z] as b", ); @@ -2882,12 +2882,12 @@ mod solve_expr { fn let_tag_pattern_with_annotation() { infer_eq_without_problem( indoc!( - r#" + r" UserId x : [UserId I64] UserId x = UserId 42 x - "# + " ), "I64", ); @@ -2897,7 +2897,7 @@ mod solve_expr { fn typecheck_record_linked_list_map() { infer_eq_without_problem( indoc!( - r#" + r" ConsList q : [Cons { x: q, xs: ConsList q }, Nil] map : (a -> b), ConsList a -> ConsList b @@ -2908,7 +2908,7 @@ mod solve_expr { Cons { x: f x, xs : map f xs } map - "# + " ), "(a -> b), ConsList a -> ConsList b", ); @@ -2918,7 +2918,7 @@ mod solve_expr { fn infer_record_linked_list_map() { infer_eq_without_problem( indoc!( - r#" + r" map = \f, list -> when list is Nil -> Nil @@ -2926,7 +2926,7 @@ mod solve_expr { Cons { x: f x, xs : map f xs } map - "# + " ), "(a -> b), [Cons { x : a, xs : c }*, Nil] as c -> [Cons { x : b, xs : d }, Nil] as d", ); @@ -2936,7 +2936,7 @@ mod solve_expr { fn typecheck_mutually_recursive_tag_union_2() { infer_eq_without_problem( indoc!( - r#" + r" ListA a b : [Cons a (ListB b a), Nil] ListB a b : [Cons a (ListA b a), Nil] @@ -2953,7 +2953,7 @@ mod solve_expr { Cons a (Cons (f b) (toAs f newLista)) toAs - "# + " ), "(b -> a), ListA a b -> ConsList a", ); @@ -2963,7 +2963,7 @@ mod solve_expr { fn typecheck_mutually_recursive_tag_union_listabc() { infer_eq_without_problem( indoc!( - r#" + r" ListA a : [Cons a (ListB a)] ListB a : [Cons a (ListC a)] ListC a : [Cons a (ListA a), Nil] @@ -2972,7 +2972,7 @@ mod solve_expr { val = Cons 1 (Cons 2 (Cons 3 Nil)) val - "# + " ), "ListC I64", ); @@ -2982,7 +2982,7 @@ mod solve_expr { fn infer_mutually_recursive_tag_union() { infer_eq_without_problem( indoc!( - r#" + r" toAs = \f, lista -> when lista is Nil -> Nil @@ -2993,7 +2993,7 @@ mod solve_expr { Cons a (Cons (f b) (toAs f newLista)) toAs - "# + " ), "(a -> b), [Cons c [Cons a d, Nil], Nil] as d -> [Cons c [Cons b e], Nil] as e", ); @@ -3015,7 +3015,7 @@ mod solve_expr { fn type_more_general_than_signature() { infer_eq_without_problem( indoc!( - r#" + r" partition : Nat, Nat, List (Int a) -> [Pair Nat (List (Int a))] partition = \low, high, initialList -> when List.get initialList high is @@ -3026,7 +3026,7 @@ mod solve_expr { Pair (low - 1) initialList partition - "# + " ), "Nat, Nat, List (Int a) -> [Pair Nat (List (Int a))]", ); @@ -3036,7 +3036,7 @@ mod solve_expr { fn quicksort_partition() { infer_eq_without_problem( indoc!( - r#" + r" swap : Nat, Nat, List a -> List a swap = \i, j, list -> when Pair (List.get list i) (List.get list j) is @@ -3074,7 +3074,7 @@ mod solve_expr { Pair (low - 1) initialList partition - "# + " ), "Nat, Nat, List (Int a) -> [Pair Nat (List (Int a))]", ); @@ -3084,7 +3084,7 @@ mod solve_expr { fn identity_list() { infer_eq_without_problem( indoc!( - r#" + r" idList : List a -> List a idList = \list -> list @@ -3093,7 +3093,7 @@ mod solve_expr { foo - "# + " ), "List I64 -> List I64", ); @@ -3103,18 +3103,18 @@ mod solve_expr { fn list_get() { infer_eq_without_problem( indoc!( - r#" + r" List.get [10, 9, 8, 7] 1 - "# + " ), "Result (Num *) [OutOfBounds]", ); infer_eq_without_problem( indoc!( - r#" + r" List.get - "# + " ), "List a, Nat -> Result a [OutOfBounds]", ); @@ -3124,7 +3124,7 @@ mod solve_expr { fn use_rigid_twice() { infer_eq_without_problem( indoc!( - r#" + r" id1 : q -> q id1 = \x -> x @@ -3132,7 +3132,7 @@ mod solve_expr { id2 = \x -> x { id1, id2 } - "# + " ), "{ id1 : q -> q, id2 : q1 -> q1 }", ); @@ -3142,9 +3142,9 @@ mod solve_expr { fn map_insert() { infer_eq_without_problem( indoc!( - r#" + r" Dict.insert - "# + " ), "Dict k v, k, v -> Dict k v where k implements Hash & Eq", ); @@ -3154,9 +3154,9 @@ mod solve_expr { fn num_to_frac() { infer_eq_without_problem( indoc!( - r#" + r" Num.toFrac - "# + " ), "Num * -> Frac a", ); @@ -3166,9 +3166,9 @@ mod solve_expr { fn pow() { infer_eq_without_problem( indoc!( - r#" + r" Num.pow - "# + " ), "Frac a, Frac a -> Frac a", ); @@ -3178,9 +3178,9 @@ mod solve_expr { fn ceiling() { infer_eq_without_problem( indoc!( - r#" + r" Num.ceiling - "# + " ), "Frac * -> Int a", ); @@ -3190,9 +3190,9 @@ mod solve_expr { fn floor() { infer_eq_without_problem( indoc!( - r#" + r" Num.floor - "# + " ), "Frac * -> Int a", ); @@ -3202,9 +3202,9 @@ mod solve_expr { fn div() { infer_eq_without_problem( indoc!( - r#" + r" Num.div - "# + " ), "Frac a, Frac a -> Frac a", ) @@ -3214,9 +3214,9 @@ mod solve_expr { fn div_checked() { infer_eq_without_problem( indoc!( - r#" + r" Num.divChecked - "# + " ), "Frac a, Frac a -> Result (Frac a) [DivByZero]", ) @@ -3226,9 +3226,9 @@ mod solve_expr { fn div_ceil() { infer_eq_without_problem( indoc!( - r#" + r" Num.divCeil - "# + " ), "Int a, Int a -> Int a", ); @@ -3238,9 +3238,9 @@ mod solve_expr { fn div_ceil_checked() { infer_eq_without_problem( indoc!( - r#" + r" Num.divCeilChecked - "# + " ), "Int a, Int a -> Result (Int a) [DivByZero]", ); @@ -3250,9 +3250,9 @@ mod solve_expr { fn div_trunc() { infer_eq_without_problem( indoc!( - r#" + r" Num.divTrunc - "# + " ), "Int a, Int a -> Int a", ); @@ -3262,9 +3262,9 @@ mod solve_expr { fn div_trunc_checked() { infer_eq_without_problem( indoc!( - r#" + r" Num.divTruncChecked - "# + " ), "Int a, Int a -> Result (Int a) [DivByZero]", ); @@ -3274,9 +3274,9 @@ mod solve_expr { fn atan() { infer_eq_without_problem( indoc!( - r#" + r" Num.atan - "# + " ), "Frac a -> Frac a", ); @@ -3286,9 +3286,9 @@ mod solve_expr { fn min_i128() { infer_eq_without_problem( indoc!( - r#" + r" Num.minI128 - "# + " ), "I128", ); @@ -3298,9 +3298,9 @@ mod solve_expr { fn max_i128() { infer_eq_without_problem( indoc!( - r#" + r" Num.maxI128 - "# + " ), "I128", ); @@ -3310,9 +3310,9 @@ mod solve_expr { fn min_i64() { infer_eq_without_problem( indoc!( - r#" + r" Num.minI64 - "# + " ), "I64", ); @@ -3322,9 +3322,9 @@ mod solve_expr { fn max_i64() { infer_eq_without_problem( indoc!( - r#" + r" Num.maxI64 - "# + " ), "I64", ); @@ -3334,9 +3334,9 @@ mod solve_expr { fn min_u64() { infer_eq_without_problem( indoc!( - r#" + r" Num.minU64 - "# + " ), "U64", ); @@ -3346,9 +3346,9 @@ mod solve_expr { fn max_u64() { infer_eq_without_problem( indoc!( - r#" + r" Num.maxU64 - "# + " ), "U64", ); @@ -3358,9 +3358,9 @@ mod solve_expr { fn min_i32() { infer_eq_without_problem( indoc!( - r#" + r" Num.minI32 - "# + " ), "I32", ); @@ -3370,9 +3370,9 @@ mod solve_expr { fn max_i32() { infer_eq_without_problem( indoc!( - r#" + r" Num.maxI32 - "# + " ), "I32", ); @@ -3382,9 +3382,9 @@ mod solve_expr { fn min_u32() { infer_eq_without_problem( indoc!( - r#" + r" Num.minU32 - "# + " ), "U32", ); @@ -3394,9 +3394,9 @@ mod solve_expr { fn max_u32() { infer_eq_without_problem( indoc!( - r#" + r" Num.maxU32 - "# + " ), "U32", ); @@ -3406,7 +3406,7 @@ mod solve_expr { fn reconstruct_path() { infer_eq_without_problem( indoc!( - r#" + r" reconstructPath : Dict position position, position -> List position where position implements Hash & Eq reconstructPath = \cameFrom, goal -> when Dict.get cameFrom goal is @@ -3417,7 +3417,7 @@ mod solve_expr { List.append (reconstructPath cameFrom next) goal reconstructPath - "# + " ), "Dict position position, position -> List position where position implements Hash & Eq", ); @@ -3428,7 +3428,7 @@ mod solve_expr { // Related to a bug solved in 81fbab0b3fe4765bc6948727e603fc2d49590b1c infer_eq_without_problem( indoc!( - r#" + r" f = \r -> g = r.q h = r.p @@ -3436,7 +3436,7 @@ mod solve_expr { 42 f - "# + " ), "{ p : *, q : * }* -> Num *", ); @@ -3484,14 +3484,14 @@ mod solve_expr { fn when_with_or_pattern_and_guard() { infer_eq_without_problem( indoc!( - r#" + r" \x -> when x is 2 | 3 -> 0 a if a < 20 -> 1 3 | 4 if Bool.false -> 2 _ -> 3 - "# + " ), "Num * -> Num *", ); @@ -3503,7 +3503,7 @@ mod solve_expr { // Roc seems to do this correctly, tracking to make sure it stays that way infer_eq_without_problem( indoc!( - r#" + r" sort : ConsList cm -> ConsList cm sort = \xs -> @@ -3538,7 +3538,7 @@ mod solve_expr { ConsList a : [Nil, Cons a (ConsList a)] { x: sortWith, y: sort, z: sortBy } - "# + " ), "{ x : (foobar, foobar -> Order), ConsList foobar -> ConsList foobar, y : ConsList cm -> ConsList cm, z : (x -> cmpl), ConsList x -> ConsList x }" ); @@ -3556,7 +3556,7 @@ mod solve_expr { // // Roc seems to do this correctly, tracking to make sure it stays that way // infer_eq_without_problem( // indoc!( - // r#" + // r" // Type a : [TypeCtor (Type (Wrapper a))] // // Wrapper a : [Wrapper a] @@ -3570,7 +3570,7 @@ mod solve_expr { // encodeType1 v0 // // encodeType1 - // "# + // " // ), // "Type a -> Opaque", // ); @@ -3580,7 +3580,7 @@ mod solve_expr { fn rigids() { infer_eq_without_problem( indoc!( - r#" + r" f : List a -> List a f = \input -> # let-polymorphism at work @@ -3591,7 +3591,7 @@ mod solve_expr { Ok val -> List.append (x {}) val Err _ -> input f - "# + " ), "List a -> List a", ); @@ -3609,12 +3609,12 @@ mod solve_expr { // should hit a debug_assert! in debug mode, and produce a type error in release mode infer_eq_without_problem( indoc!( - r#" + r" test : ({ foo : I64 }ext -> Bool), { foo : I64 } -> Bool test = \fn, a -> fn a test - "# + " ), "should fail", ); @@ -3626,11 +3626,11 @@ mod solve_expr { fn optional_field_unifies_with_missing() { infer_eq_without_problem( indoc!( - r#" + r" negatePoint : { x : I64, y : I64, z ? Num c } -> { x : I64, y : I64, z : Num c } negatePoint { x: 1, y: 2 } - "# + " ), "{ x : I64, y : I64, z : Num c }", ); @@ -3657,11 +3657,11 @@ mod solve_expr { fn optional_field_unifies_with_present() { infer_eq_without_problem( indoc!( - r#" + r" negatePoint : { x : Num a, y : Num b, z ? c } -> { x : Num a, y : Num b, z : c } negatePoint { x: 1, y: 2.1, z: 0x3 } - "# + " ), "{ x : Num *, y : Frac *, z : Int * }", ); @@ -3688,9 +3688,9 @@ mod solve_expr { fn optional_field_function() { infer_eq_without_problem( indoc!( - r#" + r" \{ x, y ? 0 } -> x + y - "# + " ), "{ x : Num a, y ? Num a }* -> Num a", ); @@ -3700,11 +3700,11 @@ mod solve_expr { fn optional_field_let() { infer_eq_without_problem( indoc!( - r#" + r" { x, y ? 0 } = { x: 32 } x + y - "# + " ), "Num *", ); @@ -3714,11 +3714,11 @@ mod solve_expr { fn optional_field_when() { infer_eq_without_problem( indoc!( - r#" + r" \r -> when r is { x, y ? 0 } -> x + y - "# + " ), "{ x : Num a, y ? Num a }* -> Num a", ); @@ -3728,13 +3728,13 @@ mod solve_expr { fn optional_field_let_with_signature() { infer_eq_without_problem( indoc!( - r#" + r" \rec -> { x, y } : { x : I64, y ? Bool }* { x, y ? Bool.false } = rec { x, y } - "# + " ), "{ x : I64, y ? Bool }* -> { x : I64, y : Bool }", ); @@ -3744,9 +3744,9 @@ mod solve_expr { fn list_walk_backwards() { infer_eq_without_problem( indoc!( - r#" + r" List.walkBackwards - "# + " ), "List elem, state, (state, elem -> state) -> state", ); @@ -3756,13 +3756,13 @@ mod solve_expr { fn list_walk_backwards_example() { infer_eq_without_problem( indoc!( - r#" + r" empty : List I64 empty = [] List.walkBackwards empty 0 (\a, b -> a + b) - "# + " ), "I64", ); @@ -3771,7 +3771,7 @@ mod solve_expr { #[test] fn list_walk_with_index_until() { infer_eq_without_problem( - indoc!(r#"List.walkWithIndexUntil"#), + indoc!(r"List.walkWithIndexUntil"), "List elem, state, (state, elem, Nat -> [Break state, Continue state]) -> state", ); } @@ -3780,9 +3780,9 @@ mod solve_expr { fn list_drop_at() { infer_eq_without_problem( indoc!( - r#" + r" List.dropAt - "# + " ), "List elem, Nat -> List elem", ); @@ -3792,9 +3792,9 @@ mod solve_expr { fn str_trim() { infer_eq_without_problem( indoc!( - r#" + r" Str.trim - "# + " ), "Str -> Str", ); @@ -3804,9 +3804,9 @@ mod solve_expr { fn str_trim_start() { infer_eq_without_problem( indoc!( - r#" + r" Str.trimStart - "# + " ), "Str -> Str", ); @@ -3816,9 +3816,9 @@ mod solve_expr { fn list_take_first() { infer_eq_without_problem( indoc!( - r#" + r" List.takeFirst - "# + " ), "List elem, Nat -> List elem", ); @@ -3828,9 +3828,9 @@ mod solve_expr { fn list_take_last() { infer_eq_without_problem( indoc!( - r#" + r" List.takeLast - "# + " ), "List elem, Nat -> List elem", ); @@ -3840,9 +3840,9 @@ mod solve_expr { fn list_sublist() { infer_eq_without_problem( indoc!( - r#" + r" List.sublist - "# + " ), "List elem, { len : Nat, start : Nat } -> List elem", ); @@ -3860,9 +3860,9 @@ mod solve_expr { fn list_drop_last() { infer_eq_without_problem( indoc!( - r#" + r" List.dropLast - "# + " ), "List elem, Nat -> List elem", ); @@ -3872,9 +3872,9 @@ mod solve_expr { fn list_intersperse() { infer_eq_without_problem( indoc!( - r#" + r" List.intersperse - "# + " ), "List elem, elem -> List elem", ); @@ -3885,13 +3885,13 @@ mod solve_expr { // such functions will be lifted to the top-level, and are thus globally available! infer_eq_without_problem( indoc!( - r#" + r" f = \x -> x + 1 g = \y -> f y g - "# + " ), "Num a -> Num a", ); @@ -4638,11 +4638,11 @@ mod solve_expr { fn inference_var_inside_arrow() { infer_eq_without_problem( indoc!( - r#" + r" id : _ -> _ id = \x -> x id - "# + " ), "a -> a", ) @@ -4671,11 +4671,11 @@ mod solve_expr { fn inference_var_inside_ctor_linked() { infer_eq_without_problem( indoc!( - r#" + r" swapRcd: {x: _, y: _} -> {x: _, y: _} swapRcd = \{x, y} -> {x: y, y: x} swapRcd - "# + " ), "{ x : a, y : b } -> { x : b, y : a }", ) @@ -4685,11 +4685,11 @@ mod solve_expr { fn inference_var_link_with_rigid() { infer_eq_without_problem( indoc!( - r#" + r" swapRcd: {x: tx, y: ty} -> {x: _, y: _} swapRcd = \{x, y} -> {x: y, y: x} swapRcd - "# + " ), "{ x : tx, y : ty } -> { x : ty, y : tx }", ) @@ -4718,7 +4718,7 @@ mod solve_expr { // See https://github.com/roc-lang/roc/issues/2053 infer_eq_without_problem( indoc!( - r#" + r" pastelize: _ -> [Lavender, Peach]_ pastelize = \color -> when color is @@ -4726,7 +4726,7 @@ mod solve_expr { Orange -> Peach col -> col pastelize - "# + " ), "[Blue, Lavender, Orange, Peach]a -> [Blue, Lavender, Orange, Peach]a", ) @@ -4739,7 +4739,7 @@ mod solve_expr { r#" setRocEmail : _ -> { name: Str, email: Str }_ setRocEmail = \person -> - { person & email: "\(person.name)@roclang.com" } + { person & email: "$(person.name)@roclang.com" } setRocEmail "# ), @@ -4751,14 +4751,14 @@ mod solve_expr { fn issue_2217() { infer_eq_without_problem( indoc!( - r#" + r" LinkedList elem : [Empty, Prepend (LinkedList elem) elem] fromList : List elem -> LinkedList elem fromList = \elems -> List.walk elems Empty Prepend fromList - "# + " ), "List elem -> LinkedList elem", ) @@ -4768,12 +4768,12 @@ mod solve_expr { fn issue_2217_inlined() { infer_eq_without_problem( indoc!( - r#" + r" fromList : List elem -> [Empty, Prepend (LinkedList elem) elem] as LinkedList elem fromList = \elems -> List.walk elems Empty Prepend fromList - "# + " ), "List elem -> LinkedList elem", ) @@ -4783,12 +4783,12 @@ mod solve_expr { fn infer_union_input_position1() { infer_eq_without_problem( indoc!( - r#" + r" \tag -> when tag is A -> X B -> Y - "# + " ), "[A, B] -> [X, Y]", ) @@ -4798,13 +4798,13 @@ mod solve_expr { fn infer_union_input_position2() { infer_eq_without_problem( indoc!( - r#" + r" \tag -> when tag is A -> X B -> Y _ -> Z - "# + " ), "[A, B]* -> [X, Y, Z]", ) @@ -4814,12 +4814,12 @@ mod solve_expr { fn infer_union_input_position3() { infer_eq_without_problem( indoc!( - r#" + r" \tag -> when tag is A M -> X A N -> Y - "# + " ), "[A [M, N]] -> [X, Y]", ) @@ -4829,13 +4829,13 @@ mod solve_expr { fn infer_union_input_position4() { infer_eq_without_problem( indoc!( - r#" + r" \tag -> when tag is A M -> X A N -> Y A _ -> Z - "# + " ), "[A [M, N]*] -> [X, Y, Z]", ) @@ -4845,12 +4845,12 @@ mod solve_expr { fn infer_union_input_position5() { infer_eq_without_problem( indoc!( - r#" + r" \tag -> when tag is A (M J) -> X A (N K) -> X - "# + " ), "[A [M [J], N [K]]] -> [X]", ) @@ -4860,13 +4860,13 @@ mod solve_expr { fn infer_union_input_position6() { infer_eq_without_problem( indoc!( - r#" + r" \tag -> when tag is A M -> X B -> X A N -> X - "# + " ), "[A [M, N], B] -> [X]", ) @@ -4876,12 +4876,12 @@ mod solve_expr { fn infer_union_input_position7() { infer_eq_without_problem( indoc!( - r#" + r" \tag -> when tag is A -> X t -> t - "# + " ), "[A, X]a -> [A, X]a", ) @@ -4891,13 +4891,13 @@ mod solve_expr { fn infer_union_input_position8() { infer_eq_without_problem( indoc!( - r#" + r" \opt -> when opt is Some ({tag: A}) -> 1 Some ({tag: B}) -> 1 None -> 0 - "# + " ), "[None, Some { tag : [A, B] }*] -> Num *", ) @@ -4925,12 +4925,12 @@ mod solve_expr { fn infer_union_input_position10() { infer_eq_without_problem( indoc!( - r#" + r" \r -> when r is { x: Blue, y ? 3 } -> y { x: Red, y ? 5 } -> y - "# + " ), "{ x : [Blue, Red], y ? Num a }* -> Num a", ) @@ -4941,9 +4941,9 @@ mod solve_expr { fn infer_union_argument_position() { infer_eq_without_problem( indoc!( - r#" + r" \UserId id -> id + 1 - "# + " ), "[UserId (Num a)] -> Num a", ) @@ -4953,11 +4953,11 @@ mod solve_expr { fn infer_union_def_position() { infer_eq_without_problem( indoc!( - r#" + r" \email -> Email str = email Str.isEmpty str - "# + " ), "[Email Str] -> Bool", ) @@ -4967,7 +4967,7 @@ mod solve_expr { fn numeric_literal_suffixes() { infer_eq_without_problem( indoc!( - r#" + r" { u8: 123u8, u16: 123u16, @@ -5005,9 +5005,9 @@ mod solve_expr { ff32: 123f32, ff64: 123f64, } - "# + " ), - r#"{ bi128 : I128, bi16 : I16, bi32 : I32, bi64 : I64, bi8 : I8, bnat : Nat, bu128 : U128, bu16 : U16, bu32 : U32, bu64 : U64, bu8 : U8, dec : Dec, f32 : F32, f64 : F64, fdec : Dec, ff32 : F32, ff64 : F64, i128 : I128, i16 : I16, i32 : I32, i64 : I64, i8 : I8, nat : Nat, u128 : U128, u16 : U16, u32 : U32, u64 : U64, u8 : U8 }"#, + r"{ bi128 : I128, bi16 : I16, bi32 : I32, bi64 : I64, bi8 : I8, bnat : Nat, bu128 : U128, bu16 : U16, bu32 : U32, bu64 : U64, bu8 : U8, dec : Dec, f32 : F32, f64 : F64, fdec : Dec, ff32 : F32, ff64 : F64, i128 : I128, i16 : I16, i32 : I32, i64 : I64, i8 : I8, nat : Nat, u128 : U128, u16 : U16, u32 : U32, u64 : U64, u8 : U8 }", ) } @@ -5015,7 +5015,7 @@ mod solve_expr { fn numeric_literal_suffixes_in_pattern() { infer_eq_without_problem( indoc!( - r#" + r" { u8: (\n -> when n is @@ -5137,9 +5137,9 @@ mod solve_expr { 123f64 -> n _ -> n), } - "# + " ), - r#"{ bi128 : I128 -> I128, bi16 : I16 -> I16, bi32 : I32 -> I32, bi64 : I64 -> I64, bi8 : I8 -> I8, bnat : Nat -> Nat, bu128 : U128 -> U128, bu16 : U16 -> U16, bu32 : U32 -> U32, bu64 : U64 -> U64, bu8 : U8 -> U8, dec : Dec -> Dec, f32 : F32 -> F32, f64 : F64 -> F64, fdec : Dec -> Dec, ff32 : F32 -> F32, ff64 : F64 -> F64, i128 : I128 -> I128, i16 : I16 -> I16, i32 : I32 -> I32, i64 : I64 -> I64, i8 : I8 -> I8, nat : Nat -> Nat, u128 : U128 -> U128, u16 : U16 -> U16, u32 : U32 -> U32, u64 : U64 -> U64, u8 : U8 -> U8 }"#, + r"{ bi128 : I128 -> I128, bi16 : I16 -> I16, bi32 : I32 -> I32, bi64 : I64 -> I64, bi8 : I8 -> I8, bnat : Nat -> Nat, bu128 : U128 -> U128, bu16 : U16 -> U16, bu32 : U32 -> U32, bu64 : U64 -> U64, bu8 : U8 -> U8, dec : Dec -> Dec, f32 : F32 -> F32, f64 : F64 -> F64, fdec : Dec -> Dec, ff32 : F32 -> F32, ff64 : F64 -> F64, i128 : I128 -> I128, i16 : I16 -> I16, i32 : I32 -> I32, i64 : I64 -> I64, i8 : I8 -> I8, nat : Nat -> Nat, u128 : U128 -> U128, u16 : U16 -> U16, u32 : U32 -> U32, u64 : U64 -> U64, u8 : U8 -> U8 }", ) } } diff --git a/crates/compiler/test_gen/.gitignore b/crates/compiler/test_gen/.gitignore deleted file mode 100644 index 796b96d1c40..00000000000 --- a/crates/compiler/test_gen/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/build diff --git a/crates/compiler/test_gen/src/gen_abilities.rs b/crates/compiler/test_gen/src/gen_abilities.rs index 6a2d2404b4f..03889c74e15 100644 --- a/crates/compiler/test_gen/src/gen_abilities.rs +++ b/crates/compiler/test_gen/src/gen_abilities.rs @@ -542,7 +542,7 @@ mod encode_immediate { _ -> "" "# ), $num, stringify!($typ)), - RocStr::from(format!(r#"{}"#, $num).as_str()), + RocStr::from(format!(r"{}", $num).as_str()), RocStr ) } @@ -948,7 +948,7 @@ fn specialize_unique_newtype_records() { main = when Str.fromUtf8 (Encode.toBytes {a: Bool.true} TotallyNotJson.json) is Ok s -> when Str.fromUtf8 (Encode.toBytes {b: Bool.true} TotallyNotJson.json) is - Ok t -> "\(s)\(t)" + Ok t -> "$(s)$(t)" _ -> "" _ -> "" "# @@ -1011,7 +1011,7 @@ fn decode_derive_decoder_for_opaque() { _ -> "FAIL" "# ), - RocStr::from(r#"Hello, World!"#), + RocStr::from(r"Hello, World!"), RocStr ) } @@ -1458,7 +1458,7 @@ mod hash { use indoc::indoc; const TEST_HASHER: &str = indoc!( - r#" + r" THasher := List U8 implements [Hasher { addBytes: tAddBytes, addU8: tAddU8, @@ -1507,7 +1507,7 @@ mod hash { tComplete = \@THasher _ -> Num.maxU64 tRead = \@THasher bytes -> bytes - "# + " ); fn build_test(input: &str) -> String { @@ -1668,7 +1668,7 @@ mod hash { #[test] fn list_u8() { assert_evals_to!( - &build_test(r#"[15u8, 23u8, 37u8]"#), + &build_test(r"[15u8, 23u8, 37u8]"), RocList::from_slice(&[15, 23, 37]), RocList ) @@ -1700,7 +1700,7 @@ mod hash { #[test] fn empty_record() { assert_evals_to!( - &build_test(r#"{}"#), + &build_test(r"{}"), RocList::from_slice(&[] as &[u8]), RocList ) @@ -1728,7 +1728,7 @@ mod hash { fn record_of_list_of_records() { assert_evals_to!( &build_test( - r#"{ a: [ { b: 15u8 }, { b: 23u8 } ], b: [ { c: 45u8 }, { c: 73u8 } ] }"# + r"{ a: [ { b: 15u8 }, { b: 23u8 } ], b: [ { c: 45u8 }, { c: 73u8 } ] }" ), RocList::from_slice(&[15, 23, 45, 73]), RocList @@ -1757,7 +1757,7 @@ mod hash { fn tuple_of_list_of_tuples() { assert_evals_to!( &build_test( - r#"( [ ( 15u8, 32u8 ), ( 23u8, 41u8 ) ], [ (45u8, 63u8), (58u8, 73u8) ] )"# + r"( [ ( 15u8, 32u8 ), ( 23u8, 41u8 ) ], [ (45u8, 63u8), (58u8, 73u8) ] )" ), RocList::from_slice(&[15, 32, 23, 41, 45, 63, 58, 73]), RocList @@ -2152,7 +2152,7 @@ fn issue_4772_weakened_monomorphic_destructure() { with_larger_debug_stack(|| { assert_evals_to!( indoc!( - r###" + r#" app "test" imports [TotallyNotJson] provides [main] to "./platform" @@ -2173,7 +2173,7 @@ fn issue_4772_weakened_monomorphic_destructure() { main = getNumber |> Result.map .val |> Result.withDefault 0 - "### + "# ), 1234i64, i64 @@ -2302,7 +2302,7 @@ mod inspect { main = Inspect.toStr (@Op {}) "# ), - RocStr::from(r#""#), + RocStr::from(r""), RocStr ); } @@ -2322,7 +2322,7 @@ mod inspect { main = late (@Op {}) "# ), - RocStr::from(r#""#), + RocStr::from(r""), RocStr ); } diff --git a/crates/compiler/test_gen/src/gen_definitions.rs b/crates/compiler/test_gen/src/gen_definitions.rs index ef575efc480..a5af7927af2 100644 --- a/crates/compiler/test_gen/src/gen_definitions.rs +++ b/crates/compiler/test_gen/src/gen_definitions.rs @@ -19,11 +19,11 @@ use roc_std::{RocList, RocResult, RocStr}; fn def_closure_in_parens() { assert_evals_to!( indoc!( - r#" + r" id = (\x -> x) id 42u32 - "# + " ), 42, u32 @@ -35,11 +35,11 @@ fn def_closure_in_parens() { fn def_closure_in_multiple_parens() { assert_evals_to!( indoc!( - r#" + r" id = (((\x -> x))) id 42u32 - "# + " ), 42, u32 diff --git a/crates/compiler/test_gen/src/gen_dict.rs b/crates/compiler/test_gen/src/gen_dict.rs index a82a803b96b..933991fc8a2 100644 --- a/crates/compiler/test_gen/src/gen_dict.rs +++ b/crates/compiler/test_gen/src/gen_dict.rs @@ -20,9 +20,9 @@ use roc_std::{RocList, RocStr}; fn dict_empty_len() { assert_evals_to!( indoc!( - r#" + r" Dict.len (Dict.empty {}) - "# + " ), 0, usize @@ -34,11 +34,11 @@ fn dict_empty_len() { fn dict_insert_empty() { assert_evals_to!( indoc!( - r#" + r" Dict.empty {} |> Dict.insert 42 32 |> Dict.len - "# + " ), 1, usize @@ -50,12 +50,12 @@ fn dict_insert_empty() { fn dict_empty_contains() { assert_evals_to!( indoc!( - r#" + r" empty : Dict.Dict I64 F64 empty = Dict.empty {} Dict.contains empty 42 - "# + " ), false, bool @@ -67,12 +67,12 @@ fn dict_empty_contains() { fn dict_nonempty_contains() { assert_evals_to!( indoc!( - r#" + r" empty : Dict.Dict I64 F64 empty = Dict.insert (Dict.empty {}) 42 1.23 Dict.contains empty 42 - "# + " ), true, bool @@ -85,14 +85,14 @@ fn dict_nonempty_contains() { fn dict_empty_remove() { assert_evals_to!( indoc!( - r#" + r" empty : Dict.Dict I64 F64 empty = Dict.empty {} empty |> Dict.remove 42 |> Dict.len - "# + " ), 0, i64 @@ -104,7 +104,7 @@ fn dict_empty_remove() { fn dict_nonempty_remove() { assert_evals_to!( indoc!( - r#" + r" empty : Dict.Dict I64 F64 empty = Dict.insert (Dict.empty {}) 42 1.23 @@ -112,7 +112,7 @@ fn dict_nonempty_remove() { |> Dict.remove 42 |> Dict.len |> Num.toI64 - "# + " ), 0, i64 @@ -124,7 +124,7 @@ fn dict_nonempty_remove() { fn dict_nonempty_get() { assert_evals_to!( indoc!( - r#" + r" empty : Dict.Dict I64 F64 empty = Dict.insert (Dict.empty {}) 42 1.23 @@ -137,7 +137,7 @@ fn dict_nonempty_get() { |> Dict.insert 42 1.23f64 |> Dict.get 42 |> withDefault 0 - "# + " ), 1.23, f64 @@ -145,7 +145,7 @@ fn dict_nonempty_get() { assert_evals_to!( indoc!( - r#" + r" withDefault = \x, def -> when x is Ok v -> v @@ -155,7 +155,7 @@ fn dict_nonempty_get() { |> Dict.insert 42 1.23f64 |> Dict.get 43 |> withDefault 0 - "# + " ), 0.0, f64 @@ -167,7 +167,7 @@ fn dict_nonempty_get() { fn keys() { assert_evals_to!( indoc!( - r#" + r" myDict : Dict.Dict I64 I64 myDict = Dict.empty {} @@ -177,7 +177,7 @@ fn keys() { Dict.keys myDict - "# + " ), RocList::from_slice(&[0, 1, 2]), RocList @@ -189,7 +189,7 @@ fn keys() { fn values() { assert_evals_to!( indoc!( - r#" + r" myDict : Dict.Dict I64 I64 myDict = Dict.empty {} @@ -199,7 +199,7 @@ fn values() { Dict.values myDict - "# + " ), RocList::from_slice(&[100, 200, 300]), RocList @@ -211,14 +211,14 @@ fn values() { fn from_list_with_fold_simple() { assert_evals_to!( indoc!( - r#" + r" myDict : Dict.Dict I64 I64 myDict = [1,2,3] |> List.walk (Dict.empty {}) (\accum, value -> Dict.insert accum value value) Dict.values myDict - "# + " ), RocList::from_slice(&[1, 2, 3]), RocList @@ -230,7 +230,7 @@ fn from_list_with_fold_simple() { fn from_list_with_fold_reallocates() { assert_evals_to!( indoc!( - r#" + r" range : I64, I64, List I64-> List I64 range = \low, high, accum -> if low < high then @@ -245,7 +245,7 @@ fn from_list_with_fold_reallocates() { |> List.walk (Dict.empty {}) (\accum, value -> Dict.insert accum value value) Dict.values myDict - "# + " ), RocList::from_slice(&[ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, @@ -329,7 +329,7 @@ fn big_str_values() { fn unit_values() { assert_evals_to!( indoc!( - r#" + r" myDict : Dict.Dict I64 {} myDict = Dict.empty {} @@ -339,7 +339,7 @@ fn unit_values() { |> Dict.insert 3 {} Num.toI64 (Dict.len myDict) - "# + " ), 4, i64 @@ -351,13 +351,13 @@ fn unit_values() { fn single() { assert_evals_to!( indoc!( - r#" + r" myDict : Dict.Dict I64 {} myDict = Dict.single 12345 {} Num.toI64 (Dict.len myDict) - "# + " ), 1, i64 @@ -369,14 +369,14 @@ fn single() { fn insert_all() { assert_evals_to!( indoc!( - r#" + r" myDict : Dict I64 {} myDict = Dict.insertAll (Dict.single 0 {}) (Dict.single 1 {}) Dict.len myDict |> Num.toI64 - "# + " ), 2, i64 @@ -388,14 +388,14 @@ fn insert_all() { fn insert_all_prefer_second() { assert_evals_to!( indoc!( - r#" + r" myDict : Dict.Dict I64 I64 myDict = (Dict.single 0 100) |> Dict.insertAll (Dict.single 0 200) Dict.values myDict - "# + " ), RocList::from_slice(&[200]), RocList @@ -407,7 +407,7 @@ fn insert_all_prefer_second() { fn keep_shared() { assert_evals_to!( indoc!( - r#" + r" dict1 : Dict.Dict I64 {} dict1 = Dict.empty {} @@ -427,7 +427,7 @@ fn keep_shared() { Dict.keepShared dict1 dict2 |> Dict.len |> Num.toI64 - "# + " ), 2, i64 @@ -439,7 +439,7 @@ fn keep_shared() { fn keep_shared_value_must_match() { assert_evals_to!( indoc!( - r#" + r" dict1 : Dict.Dict I64 I64 dict1 = Dict.empty {} @@ -458,7 +458,7 @@ fn keep_shared_value_must_match() { Dict.keepShared dict1 dict2 |> Dict.values - "# + " ), RocList::from_slice(&[2]), RocList @@ -470,7 +470,7 @@ fn keep_shared_value_must_match() { fn remove_all() { assert_evals_to!( indoc!( - r#" + r" dict1 : Dict.Dict I64 {} dict1 = Dict.empty {} @@ -490,7 +490,7 @@ fn remove_all() { Dict.removeAll dict1 dict2 |> Dict.len |> Num.toI64 - "# + " ), 3, i64 @@ -502,7 +502,7 @@ fn remove_all() { fn remove_all_prefer_first() { assert_evals_to!( indoc!( - r#" + r" dict1 : Dict.Dict I64 I64 dict1 = Dict.empty {} @@ -521,7 +521,7 @@ fn remove_all_prefer_first() { Dict.removeAll dict1 dict2 |> Dict.values - "# + " ), RocList::from_slice(&[1, 5, 3]), RocList @@ -533,7 +533,7 @@ fn remove_all_prefer_first() { fn walk_sum_keys() { assert_evals_to!( indoc!( - r#" + r" dict1 : Dict.Dict I64 I64 dict1 = Dict.empty {} @@ -544,7 +544,7 @@ fn walk_sum_keys() { |> Dict.insert 5 5 Dict.walk dict1 0 \k, _, a -> k + a - "# + " ), 15, i64 diff --git a/crates/compiler/test_gen/src/gen_erased.rs b/crates/compiler/test_gen/src/gen_erased.rs index df4b87ff699..396f72a06c4 100644 --- a/crates/compiler/test_gen/src/gen_erased.rs +++ b/crates/compiler/test_gen/src/gen_erased.rs @@ -33,7 +33,7 @@ fn multi_branch_capturing() { f = \t, s -> if t then \{} -> 15nat - else \{} -> Str.countGraphemes s + else \{} -> Str.countUtf8Bytes s main = ((f Bool.true "abc") {}, (f Bool.false "abc") {}) "# diff --git a/crates/compiler/test_gen/src/gen_list.rs b/crates/compiler/test_gen/src/gen_list.rs index adfec177fcb..16323ed50ae 100644 --- a/crates/compiler/test_gen/src/gen_list.rs +++ b/crates/compiler/test_gen/src/gen_list.rs @@ -55,11 +55,11 @@ fn int_list_literal() { fn bool_list_literal() { assert_evals_to!( indoc!( - r#" + r" false = Bool.false [false] - "# + " ), RocList::from_slice(&[false; 1]), RocList @@ -73,12 +73,12 @@ fn bool_list_literal() { assert_evals_to!( indoc!( - r#" + r" false : Bool false = Bool.false [false] - "# + " ), RocList::from_slice(&[false; 1]), RocList @@ -116,9 +116,9 @@ fn dec_list_join() { fn bool_list_concat() { assert_evals_to!( indoc!( - r#" + r" List.concat [Bool.true, Bool.false] [Bool.false, Bool.true] - "# + " ), RocList::from_slice(&[true, false, false, true]), RocList @@ -126,9 +126,9 @@ fn bool_list_concat() { assert_evals_to!( indoc!( - r#" + r" List.concat [] [Bool.false, Bool.true] - "# + " ), RocList::from_slice(&[false, true]), RocList @@ -136,9 +136,9 @@ fn bool_list_concat() { assert_evals_to!( indoc!( - r#" + r" List.concat [Bool.true, Bool.false] [] - "# + " ), RocList::from_slice(&[true, false]), RocList @@ -150,12 +150,12 @@ fn bool_list_concat() { fn bool_list_literal_repeat() { assert_evals_to!( indoc!( - r#" + r" true : Bool true = Bool.true List.repeat true 23 - "# + " ), RocList::from_slice(&[true; 23]), RocList @@ -163,12 +163,12 @@ fn bool_list_literal_repeat() { assert_evals_to!( indoc!( - r#" + r" true : Bool true = Bool.true List.repeat { x: true, y: true } 23 - "# + " ), RocList::from_slice(&[[true, true]; 23]), RocList<[bool; 2]> @@ -176,12 +176,12 @@ fn bool_list_literal_repeat() { assert_evals_to!( indoc!( - r#" + r" true : Bool true = Bool.true List.repeat { x: true, y: true, a: true, b: true, c: true, d : true, e: true, f: true } 23 - "# + " ), RocList::from_slice(&[[true, true, true, true, true, true, true, true]; 23]), RocList<[bool; 8]> @@ -317,9 +317,9 @@ fn list_sublist() { fn list_map_try_ok() { assert_evals_to!( // No transformation - r#" + r" List.mapTry [1, 2, 3] \elem -> Ok elem - "#, + ", // Result I64 [] is unwrapped to just I64 RocList::::from_slice(&[1, 2, 3]), RocList @@ -330,7 +330,7 @@ fn list_map_try_ok() { List.mapTry [1, 2, 3] \num -> str = Num.toStr (num * 2) - Ok "\(str)!" + Ok "$(str)!" "#, // Result Str [] is unwrapped to just Str RocList::::from_slice(&[ @@ -348,22 +348,22 @@ fn list_map_try_err() { use core::convert::Infallible; assert_evals_to!( - r#" + r" List.mapTry [1, 2, 3] \_ -> Err -1 - "#, + ", RocResult::err(-1), RocResult, i64> ); assert_evals_to!( // If any element returns Err, the whole thing returns Err - r#" + r" List.mapTry [1, 2, 3] \num -> if num > 2 then Err -1 else Ok num - "#, + ", RocResult::err(-1), RocResult, i64> ); @@ -373,25 +373,25 @@ fn list_map_try_err() { #[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn list_split() { assert_evals_to!( - r#" + r" list = List.split [1, 2, 3] 0 list.before - "#, + ", RocList::::from_slice(&[]), RocList ); assert_evals_to!( - r#" + r" list = List.split [1, 2, 3] 0 list.others - "#, + ", RocList::from_slice(&[1, 2, 3]), RocList ); assert_evals_to!( - r#" + r" List.split [1, 2, 3] 1 - "#, + ", (RocList::from_slice(&[1]), RocList::from_slice(&[2, 3])), (RocList, RocList,) ); @@ -425,18 +425,18 @@ fn list_split() { #[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn list_split_first() { assert_evals_to!( - r#" + r" List.splitFirst [2, 3, 0, 4, 0, 6, 0, 8, 9] 0 |> Result.map .before - "#, + ", RocResult::ok(RocList::::from_slice(&[2, 3])), RocResult, ()> ); assert_evals_to!( - r#" + r" List.splitFirst [2, 3, 0, 4, 0, 6, 0, 8, 9] 0 |> Result.map .after - "#, + ", RocResult::ok(RocList::::from_slice(&[4, 0, 6, 0, 8, 9])), RocResult, ()> ); @@ -458,18 +458,18 @@ fn list_split_first() { #[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn list_split_last() { assert_evals_to!( - r#" + r" List.splitLast [2, 3, 0, 4, 0, 6, 0, 8, 9] 0 |> Result.map .before - "#, + ", RocResult::ok(RocList::::from_slice(&[2, 3, 0, 4, 0, 6])), RocResult, ()> ); assert_evals_to!( - r#" + r" List.splitLast [2, 3, 0, 4, 0, 6, 0, 8, 9] 0 |> Result.map .after - "#, + ", RocResult::ok(RocList::::from_slice(&[8, 9])), RocResult, ()> ); @@ -569,18 +569,18 @@ fn list_drop_at() { fn list_intersperse() { assert_evals_to!( indoc!( - r#" + r" List.intersperse [0, 0, 0] 1 - "# + " ), RocList::from_slice(&[0, 1, 0, 1, 0]), RocList ); assert_evals_to!( indoc!( - r#" + r" List.intersperse [] 1 - "# + " ), RocList::::from_slice(&[]), RocList @@ -592,12 +592,12 @@ fn list_intersperse() { fn list_drop_at_shared() { assert_evals_to!( indoc!( - r#" + r" list : List I64 list = [if Bool.true then 4 else 4, 5, 6] { newList: List.dropAt list 0, original: list } - "# + " ), ( // new_list @@ -614,12 +614,12 @@ fn list_drop_at_shared() { fn list_drop_if_empty_list_of_int() { assert_evals_to!( indoc!( - r#" + r" empty : List I64 empty = [] List.dropIf empty \_ -> Bool.true - "# + " ), RocList::::from_slice(&[]), RocList @@ -631,12 +631,12 @@ fn list_drop_if_empty_list_of_int() { fn list_drop_if_empty_list() { assert_evals_to!( indoc!( - r#" + r" alwaysTrue : I64 -> Bool alwaysTrue = \_ -> Bool.true List.dropIf [] alwaysTrue - "# + " ), RocList::::from_slice(&[]), RocList @@ -648,9 +648,9 @@ fn list_drop_if_empty_list() { fn list_drop_if_always_false_for_non_empty_list() { assert_evals_to!( indoc!( - r#" + r" List.dropIf [1,2,3,4,5,6,7,8] (\_ -> Bool.false) - "# + " ), RocList::from_slice(&[1, 2, 3, 4, 5, 6, 7, 8]), RocList @@ -662,9 +662,9 @@ fn list_drop_if_always_false_for_non_empty_list() { fn list_drop_if_always_true_for_non_empty_list() { assert_evals_to!( indoc!( - r#" + r" List.dropIf [1,2,3,4,5,6,7,8] (\_ -> Bool.true) - "# + " ), RocList::::from_slice(&[]), RocList @@ -676,9 +676,9 @@ fn list_drop_if_always_true_for_non_empty_list() { fn list_drop_if_geq3() { assert_evals_to!( indoc!( - r#" + r" List.dropIf [1,2,3,4,5,6,7,8] (\n -> n >= 3) - "# + " ), RocList::from_slice(&[1, 2]), RocList @@ -724,12 +724,12 @@ fn list_drop_last() { fn list_drop_last_mutable() { assert_evals_to!( indoc!( - r#" + r" list : List I64 list = [if Bool.true then 4 else 4, 5, 6] { newList: List.dropLast list 1, original: list } - "# + " ), ( // new_list @@ -788,13 +788,13 @@ fn list_append_to_empty_list() { fn list_append_to_empty_list_of_int() { assert_evals_to!( indoc!( - r#" + r" initThrees : List I64 initThrees = [] List.append (List.append initThrees 3) 3 - "# + " ), RocList::from_slice(&[3, 3]), RocList @@ -821,6 +821,30 @@ fn list_append_longer_list() { ); } +#[test] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] +fn list_append_record() { + assert_evals_to!( + indoc!( + r#" + [ + { name: "foo", content: "cfoo" }, + { name: "bar", content: "cbar" }, + { name: "baz", content: "cbaz" }, + ] + |> List.append { name: "spam", content: "cspam" } + "# + ), + RocList::from_slice(&[ + (RocStr::from("cfoo"), RocStr::from("foo"),), + (RocStr::from("cbar"), RocStr::from("bar"),), + (RocStr::from("cbaz"), RocStr::from("baz"),), + (RocStr::from("cspam"), RocStr::from("spam"),), + ]), + RocList<(RocStr, RocStr)> + ); +} + #[test] #[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn list_prepend() { @@ -833,13 +857,13 @@ fn list_prepend() { assert_evals_to!( indoc!( - r#" + r" init : List I64 init = [] List.prepend (List.prepend init 4) 6 - "# + " ), RocList::from_slice(&[6, 4]), RocList @@ -886,14 +910,33 @@ fn list_prepend_big_list() { ); } +#[test] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] +fn list_prepend_record() { + assert_evals_to!( + indoc!( + r" + payment1 : { amount: Dec, date: [RD I32] } + payment1 = { amount: 1dec, date: (RD 1000) } + payment2 : { amount: Dec, date: [RD I32] } + payment2 = { amount: 2dec, date: (RD 1001) } + + List.prepend [payment2] payment1 + " + ), + RocList::from_slice(&[(RocDec::from(1), 1000i32), (RocDec::from(2), 1001i32),]), + RocList<(RocDec, i32)> + ); +} + #[test] #[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn list_walk_backwards_empty_all_inline() { assert_evals_to!( indoc!( - r#" + r" List.walkBackwards [0x1] 0 \state, elem -> state + elem - "# + " ), 1, i64 @@ -901,13 +944,13 @@ fn list_walk_backwards_empty_all_inline() { assert_evals_to!( indoc!( - r#" + r" empty : List I64 empty = [] List.walkBackwards empty 0 \state, elem -> state + elem - "# + " ), 0, i64 @@ -935,7 +978,7 @@ fn list_walk_backwards_with_str() { fn list_walk_backwards_with_record() { assert_evals_to!( indoc!( - r#" + r" Bit : [Zero, One] byte : List Bit @@ -951,7 +994,7 @@ fn list_walk_backwards_with_record() { finalCounts = List.walkBackwards byte initialCounts acc finalCounts.ones * 10 + finalCounts.zeroes - "# + " ), 35, i64 @@ -977,24 +1020,20 @@ fn list_walk_with_str() { #[test] #[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn list_walk_subtraction() { - assert_evals_to!(r#"List.walk [1, 2] 1 Num.sub"#, (1 - 1) - 2, i64); + assert_evals_to!(r"List.walk [1, 2] 1 Num.sub", (1 - 1) - 2, i64); } #[test] #[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn list_walk_until_sum() { - assert_evals_to!( - r#"List.walkUntil [1, 2] 0 \a,b -> Continue (a + b)"#, - 3, - i64 - ); + assert_evals_to!(r"List.walkUntil [1, 2] 0 \a,b -> Continue (a + b)", 3, i64); } #[test] #[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn list_walk_with_index_until_sum() { assert_evals_to!( - r#" + r" List.walkWithIndexUntil [5, 7, 2, 3] 0 (\state, elem, index -> if elem % 2 == 0 then Break state @@ -1005,7 +1044,7 @@ fn list_walk_with_index_until_sum() { c = Num.toI64 state Continue (a + b + c) ) - "#, + ", 13, i64 ); @@ -1015,7 +1054,7 @@ fn list_walk_with_index_until_sum() { #[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn list_walk_implements_position() { assert_evals_to!( - r#" + r" Option a : [Some a, None] find : List a, a -> Option Nat where a implements Eq @@ -1033,7 +1072,7 @@ fn list_walk_implements_position() { when find [1, 2, 3] 3 is None -> 0 Some v -> v - "#, + ", 2, usize ); @@ -1043,7 +1082,7 @@ fn list_walk_implements_position() { #[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn list_walk_until_even_prefix_sum() { assert_evals_to!( - r#" + r" helper = \a, b -> if Num.isEven b then Continue (a + b) @@ -1051,7 +1090,7 @@ fn list_walk_until_even_prefix_sum() { else Break a - List.walkUntil [2, 4, 8, 9] 0 helper"#, + List.walkUntil [2, 4, 8, 9] 0 helper", 2 + 4 + 8, i64 ); @@ -1060,7 +1099,7 @@ fn list_walk_until_even_prefix_sum() { #[test] #[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn list_walk_from_sum() { - assert_evals_to!(r#"List.walkFrom [1, 2, 3] 1 0 Num.add"#, 5, i64); + assert_evals_to!(r"List.walkFrom [1, 2, 3] 1 0 Num.add", 5, i64); } #[test] @@ -1068,13 +1107,13 @@ fn list_walk_from_sum() { fn list_keep_if_empty_list_of_int() { assert_evals_to!( indoc!( - r#" + r" empty : List I64 empty = [] List.keepIf empty \_ -> Bool.true - "# + " ), RocList::::from_slice(&[]), RocList @@ -1086,14 +1125,14 @@ fn list_keep_if_empty_list_of_int() { fn list_keep_if_empty_list() { assert_evals_to!( indoc!( - r#" + r" alwaysTrue : I64 -> Bool alwaysTrue = \_ -> Bool.true List.keepIf [] alwaysTrue - "# + " ), RocList::::from_slice(&[]), RocList @@ -1105,7 +1144,7 @@ fn list_keep_if_empty_list() { fn list_keep_if_always_true_for_non_empty_list() { assert_evals_to!( indoc!( - r#" + r" alwaysTrue : I64 -> Bool alwaysTrue = \_ -> Bool.true @@ -1115,7 +1154,7 @@ fn list_keep_if_always_true_for_non_empty_list() { [1,2,3,4,5,6,7,8] List.keepIf oneThroughEight alwaysTrue - "# + " ), RocList::from_slice(&[1, 2, 3, 4, 5, 6, 7, 8]), RocList @@ -1127,13 +1166,13 @@ fn list_keep_if_always_true_for_non_empty_list() { fn list_keep_if_always_false_for_non_empty_list() { assert_evals_to!( indoc!( - r#" + r" alwaysFalse : I64 -> Bool alwaysFalse = \_ -> Bool.false List.keepIf [1,2,3,4,5,6,7,8] alwaysFalse - "# + " ), RocList::::from_slice(&[]), RocList @@ -1145,13 +1184,13 @@ fn list_keep_if_always_false_for_non_empty_list() { fn list_keep_if_one() { assert_evals_to!( indoc!( - r#" + r" intIsLessThanThree : I64 -> Bool intIsLessThanThree = \i -> i < 3 List.keepIf [1,2,3,4,5,6,7,8] intIsLessThanThree - "# + " ), RocList::from_slice(&[1, 2]), RocList @@ -1177,9 +1216,9 @@ fn list_keep_if_str_is_hello() { fn list_count_if_empty_list() { assert_evals_to!( indoc!( - r#" + r" List.countIf [] \_ -> Bool.true - "# + " ), 0, usize @@ -1191,7 +1230,7 @@ fn list_count_if_empty_list() { fn list_count_if_always_true_for_non_empty_list() { assert_evals_to!( indoc!( - r#" + r" alwaysTrue : I64 -> Bool alwaysTrue = \_ -> Bool.true @@ -1201,7 +1240,7 @@ fn list_count_if_always_true_for_non_empty_list() { [1,2,3,4,5,6,7,8] List.countIf oneThroughEight alwaysTrue - "# + " ), 8, usize @@ -1213,13 +1252,13 @@ fn list_count_if_always_true_for_non_empty_list() { fn list_count_if_always_false_for_non_empty_list() { assert_evals_to!( indoc!( - r#" + r" alwaysFalse : I64 -> Bool alwaysFalse = \_ -> Bool.false List.countIf [1,2,3,4,5,6,7,8] alwaysFalse - "# + " ), 0, usize @@ -1231,13 +1270,13 @@ fn list_count_if_always_false_for_non_empty_list() { fn list_count_if_condition() { assert_evals_to!( indoc!( - r#" + r" intIsLessThanThree : I64 -> Bool intIsLessThanThree = \i -> i < 3 List.countIf [1,2,3,4,5,6,7,8] intIsLessThanThree - "# + " ), 2, usize @@ -1263,13 +1302,13 @@ fn list_count_if_str() { fn list_map_on_empty_list_with_int_layout() { assert_evals_to!( indoc!( - r#" + r" empty : List I64 empty = [] List.map empty (\x -> x) - "# + " ), RocList::::from_slice(&[]), RocList @@ -1281,13 +1320,13 @@ fn list_map_on_empty_list_with_int_layout() { fn list_map_on_non_empty_list() { assert_evals_to!( indoc!( - r#" + r" nonEmpty : List I64 nonEmpty = [1] List.map nonEmpty (\x -> x) - "# + " ), RocList::from_slice(&[1]), RocList @@ -1299,13 +1338,13 @@ fn list_map_on_non_empty_list() { fn list_map_changes_input() { assert_evals_to!( indoc!( - r#" + r" nonEmpty : List I64 nonEmpty = [1] List.map nonEmpty (\x -> x + 1) - "# + " ), RocList::from_slice(&[2]), RocList @@ -1317,13 +1356,13 @@ fn list_map_changes_input() { fn list_map_on_big_list() { assert_evals_to!( indoc!( - r#" + r" nonEmpty : List I64 nonEmpty = [1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5] List.map nonEmpty (\x -> x * 2) - "# + " ), RocList::from_slice(&[ 2, 4, 6, 8, 10, 2, 4, 6, 8, 10, 2, 4, 6, 8, 10, 2, 4, 6, 8, 10, 2, 4, 6, 8, 10 @@ -1337,14 +1376,14 @@ fn list_map_on_big_list() { fn list_map_with_type_change() { assert_evals_to!( indoc!( - r#" + r" nonEmpty : List I64 nonEmpty = [1, 1, -4, 1, 2] List.map nonEmpty (\x -> x > 0) - "# + " ), RocList::from_slice(&[true, true, false, true, true]), RocList @@ -1356,7 +1395,7 @@ fn list_map_with_type_change() { fn list_map_using_defined_function() { assert_evals_to!( indoc!( - r#" + r" nonEmpty : List I64 nonEmpty = [2, 2, -4, 2, 3] @@ -1366,7 +1405,7 @@ fn list_map_using_defined_function() { i > 1 List.map nonEmpty greaterThanOne - "# + " ), RocList::from_slice(&[true, true, false, true, true]), RocList @@ -1378,9 +1417,9 @@ fn list_map_using_defined_function() { fn list_map_all_inline() { assert_evals_to!( indoc!( - r#" + r" List.map [] (\x -> x > 0) - "# + " ), RocList::::from_slice(&[]), RocList @@ -1392,7 +1431,7 @@ fn list_map_all_inline() { fn list_map_closure_int() { assert_evals_to!( indoc!( - r#" + r" int : I64 int = 123 @@ -1401,7 +1440,7 @@ fn list_map_closure_int() { [0] List.map single (\x -> x + int) - "# + " ), RocList::from_slice(&[123]), RocList @@ -1413,7 +1452,7 @@ fn list_map_closure_int() { fn list_map_closure_float() { assert_evals_to!( indoc!( - r#" + r" float : F64 float = 1.23 @@ -1422,7 +1461,7 @@ fn list_map_closure_float() { [0] List.map single (\x -> x + float) - "# + " ), RocList::from_slice(&[1.23]), RocList @@ -1451,9 +1490,9 @@ fn list_map_closure_string() { fn list_map4_group() { assert_evals_to!( indoc!( - r#" + r" List.map4 [1,2,3] [3,2,1] [2,1,3] [3,1,2] (\a, b, c, d -> Group a b c d) - "# + " ), RocList::from_slice(&[[1, 3, 2, 3], [2, 2, 1, 1], [3, 1, 3, 2]]), RocList<[i64; 4]> @@ -1484,9 +1523,9 @@ fn list_map4_different_length() { fn list_map3_group() { assert_evals_to!( indoc!( - r#" + r" List.map3 [1,2,3] [3,2,1] [2,1,3] (\a, b, c -> Group a b c) - "# + " ), RocList::from_slice(&[(1, 3, 2), (2, 2, 1), (3, 1, 3)]), RocList<(i64, i64, i64)> @@ -1516,10 +1555,10 @@ fn list_map3_different_length() { fn list_map2_pair() { assert_evals_to!( indoc!( - r#" + r" f = (\a,b -> Pair a b) List.map2 [1,2,3] [3,2,1] f - "# + " ), RocList::from_slice(&[(1, 3), (2, 2), (3, 1)]), RocList<(i64, i64)> @@ -1588,7 +1627,7 @@ fn list_join_two_non_empty_lists_of_float() { fn list_join_to_big_list() { assert_evals_to!( indoc!( - r#" + r" List.join [ [1.2f64, 1.1], @@ -1599,7 +1638,7 @@ fn list_join_to_big_list() { [3.0, 4.0, 5.0, 6.1, 9.0], [3.0, 4.0, 5.0, 6.1, 9.0] ] - "# + " ), RocList::from_slice(&[ 1.2, 1.1, 2.1, 2.2, 3.0, 4.0, 5.0, 6.1, 9.0, 3.0, 4.0, 5.0, 6.1, 9.0, 3.0, 4.0, 5.0, @@ -1614,13 +1653,13 @@ fn list_join_to_big_list() { fn list_join_defined_empty_list() { assert_evals_to!( indoc!( - r#" + r" empty : List F64 empty = [] List.join [[0.2, 11.11], empty] - "# + " ), RocList::from_slice(&[0.2, 11.11]), RocList @@ -1685,13 +1724,13 @@ fn list_repeat() { assert_evals_to!( indoc!( - r#" + r" noStrs : List Str noStrs = [] List.repeat noStrs 2 - "# + " ), RocList::from_slice(&[RocList::::default(), RocList::default()]), RocList> @@ -1725,13 +1764,13 @@ fn list_reverse() { fn list_reverse_empty_list_of_int() { assert_evals_to!( indoc!( - r#" + r" emptyList : List I64 emptyList = [] List.reverse emptyList - "# + " ), RocList::::from_slice(&[]), RocList @@ -1763,7 +1802,7 @@ fn list_concat_two_empty_lists() { fn list_concat_two_empty_lists_of_int() { assert_evals_to!( indoc!( - r#" + r" firstList : List I64 firstList = [] @@ -1773,7 +1812,7 @@ fn list_concat_two_empty_lists_of_int() { [] List.concat firstList secondList - "# + " ), RocList::::from_slice(&[]), RocList @@ -1918,11 +1957,11 @@ fn basic_int_list_len() { fn loaded_int_list_len() { assert_evals_to!( indoc!( - r#" + r" nums = [2, 4, 6] List.len nums - "# + " ), 3, usize @@ -1934,13 +1973,13 @@ fn loaded_int_list_len() { fn fn_int_list_len() { assert_evals_to!( indoc!( - r#" + r" getLen = \list -> List.len list nums = [2, 4, 6, 8] getLen nums - "# + " ), 4, usize @@ -1964,9 +2003,9 @@ fn empty_list_is_empty() { fn first_int_list() { assert_evals_to!( indoc!( - r#" + r" List.first [12, 9, 6, 3] - "# + " ), RocResult::ok(12), RocResult @@ -1992,9 +2031,9 @@ fn first_str_list() { fn first_wildcard_empty_list() { assert_evals_to!( indoc!( - r#" + r" List.last [] |> Result.map (\_ -> 0i64) - "# + " ), RocResult::err(()), RocResult @@ -2006,12 +2045,12 @@ fn first_wildcard_empty_list() { fn first_empty_list() { assert_evals_to!( indoc!( - r#" + r" list : List I64 list = [] List.first list - "# + " ), RocResult::err(()), RocResult @@ -2023,9 +2062,9 @@ fn first_empty_list() { fn last_int_list() { assert_evals_to!( indoc!( - r#" + r" List.last [12, 9, 6, 3] - "# + " ), RocResult::ok(3), RocResult @@ -2037,9 +2076,9 @@ fn last_int_list() { fn last_wildcard_empty_list() { assert_evals_to!( indoc!( - r#" + r" List.last [] |> Result.map (\_ -> 0i64) - "# + " ), RocResult::err(()), RocResult @@ -2051,12 +2090,12 @@ fn last_wildcard_empty_list() { fn last_empty_list() { assert_evals_to!( indoc!( - r#" + r" list : List I64 list = [] List.last list - "# + " ), RocResult::err(()), RocResult @@ -2068,12 +2107,12 @@ fn last_empty_list() { fn get_empty_list() { assert_evals_to!( indoc!( - r#" + r" list : List I64 list = [] List.get list 0 - "# + " ), RocResult::err(()), RocResult @@ -2088,10 +2127,10 @@ fn get_wildcard_empty_list() { // would make the test pointless. Therefore, we must explicitly change the type on the roc side assert_evals_to!( indoc!( - r#" + r" List.get [] 0 |> Result.map (\_ -> {}) - "# + " ), RocResult::err(()), RocResult<(), ()> @@ -2117,9 +2156,9 @@ fn get_str_list_ok() { fn get_int_list_ok() { assert_evals_to!( indoc!( - r#" + r" List.get [12, 9, 6] 1 - "# + " ), RocResult::ok(9), RocResult @@ -2131,9 +2170,9 @@ fn get_int_list_ok() { fn get_int_list_oob() { assert_evals_to!( indoc!( - r#" + r" List.get [12, 9, 6] 1000 - "# + " ), RocResult::err(()), RocResult @@ -2145,10 +2184,10 @@ fn get_int_list_oob() { fn replace_unique_int_list() { assert_evals_to!( indoc!( - r#" + r" record = List.replace [12, 9, 7, 1, 5] 2 33 record.list - "# + " ), RocList::from_slice(&[12, 9, 33, 1, 5]), RocList @@ -2160,10 +2199,10 @@ fn replace_unique_int_list() { fn replace_unique_int_list_out_of_bounds() { assert_evals_to!( indoc!( - r#" + r" record = List.replace [12, 9, 7, 1, 5] 5 33 record.value - "# + " ), 33, i64 @@ -2175,10 +2214,10 @@ fn replace_unique_int_list_out_of_bounds() { fn replace_unique_int_list_get_old_value() { assert_evals_to!( indoc!( - r#" + r" record = List.replace [12, 9, 7, 1, 5] 2 33 record.value - "# + " ), 7, i64 @@ -2190,12 +2229,12 @@ fn replace_unique_int_list_get_old_value() { fn replace_unique_get_large_value() { assert_evals_to!( indoc!( - r#" + r" list : List { a : U64, b: U64, c: U64, d: U64 } list = [{ a: 1, b: 2, c: 3, d: 4 }, { a: 5, b: 6, c: 7, d: 8 }, { a: 9, b: 10, c: 11, d: 12 }] record = List.replace list 1 { a: 13, b: 14, c: 15, d: 16 } record.value - "# + " ), [5, 6, 7, 8], [u64; 4] @@ -2207,7 +2246,7 @@ fn replace_unique_get_large_value() { fn replace_shared_int_list() { assert_evals_to!( indoc!( - r#" + r" wrapper = \shared -> # This should not mutate the original replaced = (List.replace shared 1 7.7).list @@ -2224,7 +2263,7 @@ fn replace_shared_int_list() { { x, y } wrapper [2.1f64, 4.3] - "# + " ), (7.7, 4.3), (f64, f64) @@ -2236,9 +2275,9 @@ fn replace_shared_int_list() { fn get_set_unique_int_list_i64() { assert_evals_to!( indoc!( - r#" + r" List.get (List.set [12, 9, 7, 3] 1 42) 1 - "# + " ), RocResult::ok(42), RocResult @@ -2250,9 +2289,9 @@ fn get_set_unique_int_list_i64() { fn get_set_unique_int_list_i8() { assert_evals_to!( indoc!( - r#" + r" List.get (List.set [12, 9, 7, 3] 1 42i8) 1 - "# + " ), RocResult::ok(42), RocResult @@ -2284,7 +2323,7 @@ fn set_unique_list_oob() { fn set_shared_int_list() { assert_evals_to!( indoc!( - r#" + r" wrapper = \shared -> # This should not mutate the original x = @@ -2300,7 +2339,7 @@ fn set_shared_int_list() { { x, y } wrapper [2.1f64, 4.3] - "# + " ), (7.7, 4.3), (f64, f64) @@ -2312,7 +2351,7 @@ fn set_shared_int_list() { fn set_shared_list_oob() { assert_evals_to!( indoc!( - r#" + r" shared = [2, 4] # This List.set is out of bounds, and should have no effect @@ -2327,7 +2366,7 @@ fn set_shared_list_oob() { Err _ -> 0 { x, y } - "# + " ), (4, 4), (i64, i64) @@ -2339,11 +2378,11 @@ fn set_shared_list_oob() { fn get_unique_int_list() { assert_evals_to!( indoc!( - r#" + r" unique = [2, 4] List.get unique 1 - "# + " ), RocResult::ok(4), RocResult @@ -2355,12 +2394,12 @@ fn get_unique_int_list() { fn gen_wrap_len() { assert_evals_to!( indoc!( - r#" + r" wrapLen = \list -> [List.len list] wrapLen [1, 7, 9] - "# + " ), RocList::from_slice(&[3]), RocList @@ -2372,12 +2411,12 @@ fn gen_wrap_len() { fn gen_wrap_first() { assert_evals_to!( indoc!( - r#" + r" wrapFirst = \list -> [List.first list] wrapFirst [1, 2] - "# + " ), RocList::from_slice(&[1]), RocList @@ -2389,7 +2428,7 @@ fn gen_wrap_first() { fn gen_duplicate() { assert_evals_to!( indoc!( - r#" + r" # Duplicate the first element into the second index dupe = \list -> when List.first list is @@ -2400,7 +2439,7 @@ fn gen_duplicate() { [] dupe [1, 2] - "# + " ), RocList::from_slice(&[1, 1]), RocList @@ -2668,12 +2707,12 @@ fn quicksort_singleton() { fn empty_list_increment_decrement() { assert_evals_to!( indoc!( - r#" + r" x : List I64 x = [] List.len x + List.len x - "# + " ), 0, usize @@ -2685,12 +2724,12 @@ fn empty_list_increment_decrement() { fn list_literal_increment_decrement() { assert_evals_to!( indoc!( - r#" + r" x : List I64 x = [1,2,3] List.len x + List.len x - "# + " ), 6, usize @@ -2702,7 +2741,7 @@ fn list_literal_increment_decrement() { fn list_pass_to_function() { assert_evals_to!( indoc!( - r#" + r" x : List I64 x = [1,2,3] @@ -2710,7 +2749,7 @@ fn list_pass_to_function() { id = \y -> y id x - "# + " ), RocList::from_slice(&[1, 2, 3]), RocList @@ -2722,7 +2761,7 @@ fn list_pass_to_function() { fn list_pass_to_set() { assert_evals_to!( indoc!( - r#" + r" x : List I64 x = [1,2,3] @@ -2730,7 +2769,7 @@ fn list_pass_to_set() { id = \y -> List.set y 0 0 id x - "# + " ), RocList::from_slice(&[0, 2, 3]), RocList @@ -2742,13 +2781,13 @@ fn list_pass_to_set() { fn list_wrap_in_tag() { assert_evals_to!( indoc!( - r#" + r" id : List I64 -> [Pair (List I64) I64] id = \y -> Pair y 4 when id [1,2,3] is Pair v _ -> v - "# + " ), RocList::from_slice(&[1, 2, 3]), RocList @@ -2784,7 +2823,7 @@ fn list_contains_str() { fn list_manual_range() { assert_evals_to!( indoc!( - r#" + r" range : I64, I64, List I64-> List I64 range = \low, high, accum -> if low < high then @@ -2793,7 +2832,7 @@ fn list_manual_range() { accum range 0 5 [42] - "# + " ), RocList::from_slice(&[42, 0, 1, 2, 3, 4]), RocList @@ -2805,10 +2844,10 @@ fn list_manual_range() { fn list_min() { assert_evals_to!( indoc!( - r#" + r" List.min [] |> Result.map (\_ -> {}) - "# + " ), RocResult::err(()), RocResult<(), ()> @@ -2816,9 +2855,9 @@ fn list_min() { assert_evals_to!( indoc!( - r#" + r" List.min [3, 1, 2] - "# + " ), RocResult::ok(1), RocResult @@ -2830,10 +2869,10 @@ fn list_min() { fn list_max() { assert_evals_to!( indoc!( - r#" + r" List.max [] |> Result.map (\_ -> {}) - "# + " ), RocResult::err(()), RocResult<(), ()> @@ -2841,9 +2880,9 @@ fn list_max() { assert_evals_to!( indoc!( - r#" + r" List.max [3, 1, 2] - "# + " ), RocResult::ok(3), RocResult @@ -2928,9 +2967,9 @@ fn list_keep_errs() { ); assert_evals_to!( indoc!( - r#" + r" List.keepErrs [0,1,2] (\x -> Num.remChecked x 0 |> Result.mapErr (\_ -> 32)) - "# + " ), RocList::from_slice(&[32, 32, 32]), RocList @@ -2959,14 +2998,14 @@ fn list_map_with_index() { fn cleanup_because_exception() { assert_evals_to!( indoc!( - r#" + r" x = [1,2] five : I64 five = 5 five + Num.maxI64 + 3 + (Num.intCast (List.len x)) - "# + " ), 9, i64 @@ -3084,9 +3123,9 @@ fn map_with_index_multi_record() { // see https://github.com/roc-lang/roc/issues/1700 assert_evals_to!( indoc!( - r#" + r" List.mapWithIndex [{ x: {}, y: {} }] \_, _ -> {} - "# + " ), RocList::from_slice(&[((), ())]), RocList<((), ())> @@ -3162,7 +3201,7 @@ fn list_find() { assert_evals_to!( indoc!( r#" - when List.findFirst ["a", "bc", "def", "g"] (\s -> Str.countGraphemes s > 1) is + when List.findFirst ["a", "bc", "def", "g"] (\s -> Str.countUtf8Bytes s > 1) is Ok v -> v Err _ -> "not found" "# @@ -3174,7 +3213,7 @@ fn list_find() { assert_evals_to!( indoc!( r#" - when List.findLast ["a", "bc", "def", "g"] (\s -> Str.countGraphemes s > 1) is + when List.findLast ["a", "bc", "def", "g"] (\s -> Str.countUtf8Bytes s > 1) is Ok v -> v Err _ -> "not found" "# @@ -3190,7 +3229,7 @@ fn list_find_not_found() { assert_evals_to!( indoc!( r#" - when List.findFirst ["a", "bc", "def", "g"] (\s -> Str.countGraphemes s > 5) is + when List.findFirst ["a", "bc", "def", "g"] (\s -> Str.countUtf8Bytes s > 5) is Ok v -> v Err _ -> "not found" "# @@ -3202,7 +3241,7 @@ fn list_find_not_found() { assert_evals_to!( indoc!( r#" - when List.findLast ["a", "bc", "def", "g"] (\s -> Str.countGraphemes s > 5) is + when List.findLast ["a", "bc", "def", "g"] (\s -> Str.countUtf8Bytes s > 5) is Ok v -> v Err _ -> "not found" "# @@ -3218,7 +3257,7 @@ fn list_find_empty_typed_list() { assert_evals_to!( indoc!( r#" - when List.findFirst [] (\s -> Str.countGraphemes s > 5) is + when List.findFirst [] (\s -> Str.countUtf8Bytes s > 5) is Ok v -> v Err _ -> "not found" "# @@ -3230,7 +3269,7 @@ fn list_find_empty_typed_list() { assert_evals_to!( indoc!( r#" - when List.findLast [] (\s -> Str.countGraphemes s > 5) is + when List.findLast [] (\s -> Str.countUtf8Bytes s > 5) is Ok v -> v Err _ -> "not found" "# @@ -3245,9 +3284,9 @@ fn list_find_empty_typed_list() { fn list_find_empty_layout() { assert_evals_to!( indoc!( - r#" + r" List.findFirst [] \_ -> Bool.true - "# + " ), // [Ok [], Err [NotFound]] gets unwrapped all the way to just [NotFound], // which is the unit! @@ -3257,9 +3296,9 @@ fn list_find_empty_layout() { assert_evals_to!( indoc!( - r#" + r" List.findLast [] \_ -> Bool.true - "# + " ), // [Ok [], Err [NotFound]] gets unwrapped all the way to just [NotFound], // which is the unit! @@ -3274,7 +3313,7 @@ fn list_find_index() { assert_evals_to!( indoc!( r#" - when List.findFirstIndex ["a", "bc", "def", "g"] (\s -> Str.countGraphemes s > 1) is + when List.findFirstIndex ["a", "bc", "def", "g"] (\s -> Str.countUtf8Bytes s > 1) is Ok v -> v Err _ -> 999 "# @@ -3286,7 +3325,7 @@ fn list_find_index() { assert_evals_to!( indoc!( r#" - when List.findLastIndex ["a", "bc", "def", "g"] (\s -> Str.countGraphemes s > 1) is + when List.findLastIndex ["a", "bc", "def", "g"] (\s -> Str.countUtf8Bytes s > 1) is Ok v -> v Err _ -> 999 "# @@ -3302,7 +3341,7 @@ fn list_find_index_not_found() { assert_evals_to!( indoc!( r#" - when List.findFirstIndex ["a", "bc", "def", "g"] (\s -> Str.countGraphemes s > 5) is + when List.findFirstIndex ["a", "bc", "def", "g"] (\s -> Str.countUtf8Bytes s > 5) is Ok v -> v Err _ -> 999 "# @@ -3314,7 +3353,7 @@ fn list_find_index_not_found() { assert_evals_to!( indoc!( r#" - when List.findLastIndex ["a", "bc", "def"] (\s -> Str.countGraphemes s > 5) is + when List.findLastIndex ["a", "bc", "def"] (\s -> Str.countUtf8Bytes s > 5) is Ok v -> v Err _ -> 999 "# @@ -3329,11 +3368,11 @@ fn list_find_index_not_found() { fn list_find_index_empty_typed_list() { assert_evals_to!( indoc!( - r#" - when List.findFirstIndex [] (\s -> Str.countGraphemes s > 5) is + r" + when List.findFirstIndex [] (\s -> Str.countUtf8Bytes s > 5) is Ok v -> v Err _ -> 999 - "# + " ), 999, usize @@ -3341,11 +3380,11 @@ fn list_find_index_empty_typed_list() { assert_evals_to!( indoc!( - r#" - when List.findLastIndex [] (\s -> Str.countGraphemes s > 5) is + r" + when List.findLastIndex [] (\s -> Str.countUtf8Bytes s > 5) is Ok v -> v Err _ -> 999 - "# + " ), 999, usize @@ -3357,9 +3396,9 @@ fn list_find_index_empty_typed_list() { fn list_ends_with_empty() { assert_evals_to!( indoc!( - r#" + r" List.endsWith [] [] - "# + " ), true, bool @@ -3435,9 +3474,9 @@ fn list_ends_with_nonempty() { fn list_starts_with_empty() { assert_evals_to!( indoc!( - r#" + r" List.startsWith [] [] - "# + " ), true, bool @@ -3513,14 +3552,14 @@ fn list_starts_with_nonempty() { fn monomorphized_lists() { assert_evals_to!( indoc!( - r#" + r" l = \{} -> [1, 2, 3] f : List U8, List U16 -> Nat f = \_, _ -> 18 f (l {}) (l {}) - "# + " ), 18, usize @@ -3532,12 +3571,12 @@ fn monomorphized_lists() { fn with_capacity() { assert_evals_to!( indoc!( - r#" + r" l : List U64 l = List.withCapacity 10 l - "# + " ), // Equality check for RocList does not account for capacity (10, RocList::with_capacity(10)), @@ -3552,13 +3591,13 @@ fn with_capacity_append() { // see https://github.com/roc-lang/roc/issues/1732 assert_evals_to!( indoc!( - r#" + r" List.withCapacity 10 |> List.append 0u64 |> List.append 1u64 |> List.append 2u64 |> List.append 3u64 - "# + " ), (10, RocList::from_slice(&[0, 1, 2, 3])), RocList, @@ -3571,9 +3610,9 @@ fn with_capacity_append() { fn reserve() { assert_evals_to!( indoc!( - r#" + r" List.reserve [] 15 - "# + " ), (15, RocList::empty()), RocList, @@ -3586,11 +3625,11 @@ fn reserve() { fn reserve_unchanged() { assert_evals_to!( indoc!( - r#" + r" a = [] b = List.reserve a 15 {a, b} - "# + " ), // a's capacity is unchanged when we reserve 15 more capcity // both lists are empty. @@ -3610,10 +3649,10 @@ fn reserve_unchanged() { fn release_excess_capacity() { assert_evals_to!( indoc!( - r#" + r" List.reserve [] 15 |> List.releaseExcessCapacity - "# + " ), (0, RocList::empty()), RocList, @@ -3626,10 +3665,10 @@ fn release_excess_capacity() { fn release_excess_capacity_with_len() { assert_evals_to!( indoc!( - r#" + r" List.reserve [1] 50 |> List.releaseExcessCapacity - "# + " ), (1, RocList::from_slice(&[1])), RocList, @@ -3642,9 +3681,9 @@ fn release_excess_capacity_with_len() { fn release_excess_capacity_empty() { assert_evals_to!( indoc!( - r#" + r" List.releaseExcessCapacity [] - "# + " ), (0, RocList::empty()), RocList, @@ -3657,11 +3696,11 @@ fn release_excess_capacity_empty() { fn call_function_in_empty_list() { assert_evals_to!( indoc!( - r#" + r" lst : List ({} -> {}) lst = [] List.map lst \f -> f {} - "# + " ), RocList::from_slice(&[]), RocList<()> @@ -3673,10 +3712,10 @@ fn call_function_in_empty_list() { fn call_function_in_empty_list_unbound() { assert_evals_to!( indoc!( - r#" + r" lst = [] List.map lst \f -> f {} - "# + " ), RocList::from_slice(&[]), RocList<()> @@ -3699,10 +3738,10 @@ fn issue_3571_lowlevel_call_function_with_bool_lambda_set() { List.concat state mappedVals add2 : Str -> Str - add2 = \x -> "added \(x)" + add2 = \x -> "added $(x)" mul2 : Str -> Str - mul2 = \x -> "multiplied \(x)" + mul2 = \x -> "multiplied $(x)" foo = [add2, mul2] bar = ["1", "2", "3", "4"] @@ -3720,9 +3759,9 @@ fn issue_3571_lowlevel_call_function_with_bool_lambda_set() { fn issue_3530_uninitialized_capacity_in_list_literal() { assert_evals_to!( indoc!( - r#" + r" [11,22,33] - "# + " ), 3, (usize, usize, usize), @@ -3754,7 +3793,7 @@ fn list_infer_usage() { #[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn list_walk_backwards_implements_position() { assert_evals_to!( - r#" + r" Option a : [Some a, None] find : List a, a -> Option Nat where a implements Eq @@ -3772,7 +3811,7 @@ fn list_walk_backwards_implements_position() { when find [1, 2, 3] 3 is None -> 0 Some v -> v - "#, + ", 0, usize ); @@ -3782,7 +3821,7 @@ fn list_walk_backwards_implements_position() { #[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn list_walk_backwards_until_sum() { assert_evals_to!( - r#"List.walkBackwardsUntil [1, 2] 0 \a,b -> Continue (a + b)"#, + r"List.walkBackwardsUntil [1, 2] 0 \a,b -> Continue (a + b)", 3, i64 ); @@ -3792,7 +3831,7 @@ fn list_walk_backwards_until_sum() { #[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn list_walk_backwards_until_even_prefix_sum() { assert_evals_to!( - r#" + r" helper = \a, b -> if Num.isEven b then Continue (a + b) @@ -3800,7 +3839,7 @@ fn list_walk_backwards_until_even_prefix_sum() { else Break a - List.walkBackwardsUntil [9, 8, 4, 2] 0 helper"#, + List.walkBackwardsUntil [9, 8, 4, 2] 0 helper", 2 + 4 + 8, i64 ); @@ -3810,7 +3849,7 @@ fn list_walk_backwards_until_even_prefix_sum() { #[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn list_walk_from_until_sum() { assert_evals_to!( - r#"List.walkFromUntil [1, 2, 3, 4] 2 0 \a,b -> Continue (a + b)"#, + r"List.walkFromUntil [1, 2, 3, 4] 2 0 \a,b -> Continue (a + b)", 7, i64 ); @@ -3820,7 +3859,7 @@ fn list_walk_from_until_sum() { #[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn concat_unique_to_nonunique_overlapping_issue_4697() { assert_evals_to!( - r#" + r" # originalList is shared, but others is unique. # When we concat originalList with others, others should be re-used. @@ -3828,7 +3867,7 @@ fn concat_unique_to_nonunique_overlapping_issue_4697() { others = [2u8, 3u8, 4u8] new = List.concat originalList others {a: originalList, b: new} - "#, + ", ( RocList::from_slice(&[1u8]), RocList::from_slice(&[1u8, 2, 3, 4]), @@ -3841,7 +3880,7 @@ fn concat_unique_to_nonunique_overlapping_issue_4697() { #[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn list_walk_from_even_prefix_sum() { assert_evals_to!( - r#" + r" helper = \a, b -> if Num.isEven b then Continue (a + b) @@ -3849,7 +3888,7 @@ fn list_walk_from_even_prefix_sum() { else Break a - List.walkFromUntil [2, 4, 8, 9] 1 0 helper"#, + List.walkFromUntil [2, 4, 8, 9] 1 0 helper", 4 + 8, i64 ); @@ -3864,9 +3903,9 @@ fn list_walk_from_even_prefix_sum() { fn list_range_length_overflow() { assert_evals_to!( indoc!( - r#" + r" List.range {start: At 255u8, end: Length 2} - "# + " ), RocList::::default(), RocList:: @@ -3892,13 +3931,13 @@ mod pattern_match { #[test] fn unary_exact_size_match() { assert_evals_to!( - r#" + r" helper = \l -> when l is [] -> 1u8 _ -> 2u8 [ helper [], helper [{}] ] - "#, + ", RocList::from_slice(&[1, 2]), RocList ) @@ -3907,7 +3946,7 @@ mod pattern_match { #[test] fn many_exact_size_match() { assert_evals_to!( - r#" + r" helper = \l -> when l is [] -> 1u8 [_] -> 2u8 @@ -3916,7 +3955,7 @@ mod pattern_match { _ -> 5u8 [ helper [], helper [{}], helper [{}, {}], helper [{}, {}, {}], helper [{}, {}, {}, {}] ] - "#, + ", RocList::from_slice(&[1, 2, 3, 4, 5]), RocList ) @@ -3926,7 +3965,7 @@ mod pattern_match { fn ranged_matches_head() { with_larger_debug_stack(|| { assert_evals_to!( - r#" + r" helper = \l -> when l is [] -> 1u8 [A] -> 2u8 @@ -3941,7 +3980,7 @@ mod pattern_match { helper [A, B], helper [A, B, A], helper [A, B, B], helper [A, B, A, B], helper [B], helper [B, A], helper [B, B], helper [B, A, B, B], ] - "#, + ", RocList::from_slice(&[ 1, // 2, // @@ -3958,7 +3997,7 @@ mod pattern_match { fn ranged_matches_tail() { with_larger_debug_stack(|| { assert_evals_to!( - r#" + r" helper = \l -> when l is [] -> 1u8 [A] -> 2u8 @@ -3973,7 +4012,7 @@ mod pattern_match { helper [B, A], helper [A, B, A], helper [B, B, A], helper [B, A, B, A], helper [B], helper [A, B], helper [B, B], helper [B, A, B, B], ] - "#, + ", RocList::from_slice(&[ 1, // 2, // @@ -3989,7 +4028,7 @@ mod pattern_match { #[test] fn bind_variables() { assert_evals_to!( - r#" + r" helper : List U16 -> U16 helper = \l -> when l is [] -> 1 @@ -4003,7 +4042,7 @@ mod pattern_match { helper [3, 5], helper [3, 5, 7], helper [2, 3, 5, 7], helper [11, 2, 3, 5, 7], helper [13, 11, 2, 3, 5, 7], ] - "#, + ", RocList::from_slice(&[ 1, // 5, // @@ -4017,7 +4056,7 @@ mod pattern_match { #[test] fn order_list_size_tests_issue_4732() { assert_evals_to!( - r#" + r" helper : List U8 -> U8 helper = \l -> when l is [1, ..] -> 1 @@ -4046,7 +4085,7 @@ mod pattern_match { helper [], helper [7], ] - "#, + ", RocList::from_slice(&[ 1, 1, // 2, 2, // @@ -4064,7 +4103,7 @@ mod pattern_match { #[test] fn rest_as() { assert_evals_to!( - r#" + r" helper : List U8 -> U8 helper = \l -> when l is [1, .. as rest, 1] -> helper rest @@ -4078,7 +4117,7 @@ mod pattern_match { helper [1, 1, 2, 4, 1], helper [1, 1, 8, 7, 3, 1, 1, 1], ] - "#, + ", RocList::from_slice(&[0, 4, 6, 11]), RocList ) diff --git a/crates/compiler/test_gen/src/gen_num.rs b/crates/compiler/test_gen/src/gen_num.rs index 29b597fdc73..7b5ca1338aa 100644 --- a/crates/compiler/test_gen/src/gen_num.rs +++ b/crates/compiler/test_gen/src/gen_num.rs @@ -18,12 +18,12 @@ use roc_std::{RocDec, RocOrder, RocResult}; fn nat_alias() { assert_evals_to!( indoc!( - r#" + r" i : Num.Nat i = 1 i - "# + " ), 1, usize @@ -35,12 +35,12 @@ fn nat_alias() { fn i128_signed_int_alias() { assert_evals_to!( indoc!( - r#" + r" i : I128 i = 128 i - "# + " ), 128, i128 @@ -70,12 +70,12 @@ fn i64_signed_int_alias() { fn i32_signed_int_alias() { assert_evals_to!( indoc!( - r#" + r" i : I32 i = 32 i - "# + " ), 32, i32 @@ -86,12 +86,12 @@ fn i32_signed_int_alias() { fn i16_signed_int_alias() { assert_evals_to!( indoc!( - r#" + r" i : I16 i = 16 i - "# + " ), 16, i16 @@ -102,12 +102,12 @@ fn i16_signed_int_alias() { fn i8_signed_int_alias() { assert_evals_to!( indoc!( - r#" + r" i : I8 i = 8 i - "# + " ), 8, i8 @@ -119,12 +119,12 @@ fn i8_signed_int_alias() { fn i128_hex_int_alias() { assert_evals_to!( indoc!( - r#" + r" f : I128 f = 0x123 f - "# + " ), 0x123, i128 @@ -135,12 +135,12 @@ fn i128_hex_int_alias() { fn i64_hex_int_alias() { assert_evals_to!( indoc!( - r#" + r" f : I64 f = 0x123 f - "# + " ), 0x123, i64 @@ -151,12 +151,12 @@ fn i64_hex_int_alias() { fn i32_hex_int_alias() { assert_evals_to!( indoc!( - r#" + r" f : I32 f = 0x123 f - "# + " ), 0x123, i32 @@ -167,12 +167,12 @@ fn i32_hex_int_alias() { fn i16_hex_int_alias() { assert_evals_to!( indoc!( - r#" + r" f : I16 f = 0x123 f - "# + " ), 0x123, i16 @@ -183,12 +183,12 @@ fn i16_hex_int_alias() { fn i8_hex_int_alias() { assert_evals_to!( indoc!( - r#" + r" f : I8 f = 0xA f - "# + " ), 0xA, i8 @@ -200,12 +200,12 @@ fn i8_hex_int_alias() { fn u128_signed_int_alias() { assert_evals_to!( indoc!( - r#" + r" i : U128 i = 128 i - "# + " ), 128, u128 @@ -216,12 +216,12 @@ fn u128_signed_int_alias() { fn u64_signed_int_alias() { assert_evals_to!( indoc!( - r#" + r" i : U64 i = 64 i - "# + " ), 64, u64 @@ -232,12 +232,12 @@ fn u64_signed_int_alias() { fn u32_signed_int_alias() { assert_evals_to!( indoc!( - r#" + r" i : U32 i = 32 i - "# + " ), 32, u32 @@ -248,12 +248,12 @@ fn u32_signed_int_alias() { fn u16_signed_int_alias() { assert_evals_to!( indoc!( - r#" + r" i : U16 i = 16 i - "# + " ), 16, u16 @@ -264,12 +264,12 @@ fn u16_signed_int_alias() { fn u8_signed_int_alias() { assert_evals_to!( indoc!( - r#" + r" i : U8 i = 8 i - "# + " ), 8, u8 @@ -281,12 +281,12 @@ fn u8_signed_int_alias() { fn u128_hex_int_alias() { assert_evals_to!( indoc!( - r#" + r" f : U128 f = 0x123 f - "# + " ), 0x123, i128 @@ -297,12 +297,12 @@ fn u128_hex_int_alias() { fn u64_hex_int_alias() { assert_evals_to!( indoc!( - r#" + r" f : U64 f = 0x123 f - "# + " ), 0x123, u64 @@ -313,12 +313,12 @@ fn u64_hex_int_alias() { fn u32_hex_int_alias() { assert_evals_to!( indoc!( - r#" + r" f : U32 f = 0x123 f - "# + " ), 0x123, u32 @@ -329,12 +329,12 @@ fn u32_hex_int_alias() { fn u16_hex_int_alias() { assert_evals_to!( indoc!( - r#" + r" f : U16 f = 0x123 f - "# + " ), 0x123, u16 @@ -345,12 +345,12 @@ fn u16_hex_int_alias() { fn u8_hex_int_alias() { assert_evals_to!( indoc!( - r#" + r" f : U8 f = 0xA f - "# + " ), 0xA, u8 @@ -361,11 +361,11 @@ fn u8_hex_int_alias() { fn character_literal() { assert_evals_to!( indoc!( - r#" + r" x = 'A' x - "# + " ), 65, i64 @@ -376,11 +376,11 @@ fn character_literal() { fn character_literal_back_slash() { assert_evals_to!( indoc!( - r#" + r" x = '\\' x - "# + " ), 92, i64 @@ -391,11 +391,11 @@ fn character_literal_back_slash() { fn character_literal_single_quote() { assert_evals_to!( indoc!( - r#" + r" x = '\'' x - "# + " ), 39, i64 @@ -406,11 +406,11 @@ fn character_literal_single_quote() { fn character_literal_new_line() { assert_evals_to!( indoc!( - r#" + r" x = '\n' x - "# + " ), 10, i64 @@ -422,12 +422,12 @@ fn character_literal_new_line() { fn dec_float_alias() { assert_evals_to!( indoc!( - r#" + r" x : Dec x = 2.1 x - "# + " ), RocDec::from_str_to_i128_unsafe("2.1"), i128 @@ -439,12 +439,12 @@ fn dec_float_alias() { fn f64_float_alias() { assert_evals_to!( indoc!( - r#" + r" f : F64 f = 3.6 f - "# + " ), 3.6, f64 @@ -455,12 +455,12 @@ fn f64_float_alias() { fn f32_float_alias() { assert_evals_to!( indoc!( - r#" + r" f : F32 f = 3.6 f - "# + " ), 3.6, f32 @@ -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] @@ -580,9 +587,9 @@ fn various_sized_abs() { fn abs_min_int_overflow() { assert_evals_to!( indoc!( - r#" + r" Num.abs Num.minI64 - "# + " ), 0, i64 @@ -594,7 +601,7 @@ fn abs_min_int_overflow() { fn gen_if_fn() { assert_evals_to!( indoc!( - r#" + r" limitedNegate = \num -> x = if num == 1 then @@ -606,7 +613,7 @@ fn gen_if_fn() { x limitedNegate 1 - "# + " ), -1, i64 @@ -618,9 +625,9 @@ fn gen_if_fn() { fn gen_float_eq() { assert_evals_to!( indoc!( - r#" + r" 1.0 == 1.0 - "# + " ), true, bool @@ -632,7 +639,7 @@ fn gen_float_eq() { fn gen_add_dec() { assert_evals_to!( indoc!( - r#" + r" x : Dec x = 2.1 @@ -643,49 +650,33 @@ fn gen_add_dec() { z = x + y z - "# + " ), RocDec::from_str_to_i128_unsafe("5.2"), i128 ); } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-dev", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn gen_add_f32() { - assert_evals_to!( - indoc!( - r#" - 1.1f32 + 2.4f32 + 3 - "# - ), - 6.5, - f32 - ); + assert_evals_to!("1.1f32 + 2.4f32 + 3", 6.5, f32); } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-dev", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn gen_add_f64() { - assert_evals_to!( - indoc!( - r#" - 1.1f64 + 2.4 + 3 - "# - ), - 6.5, - f64 - ); + assert_evals_to!("1.1f64 + 2.4 + 3", 6.5, f64); } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-dev", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn gen_wrap_add_nums() { assert_evals_to!( indoc!( - r#" + r" add2 = \num1, num2 -> num1 + num2 add2 4 5 - "# + " ), 9, i64 @@ -709,11 +700,11 @@ fn gen_div_f32() { fn gen_div_checked_f64() { assert_evals_to!( indoc!( - r#" + r" when Num.divChecked 48 2f64 is Ok val -> val Err _ -> -1 - "# + " ), 24.0, f64 @@ -725,11 +716,11 @@ fn gen_div_checked_f64() { fn gen_div_checked_by_zero_f64() { assert_evals_to!( indoc!( - r#" + r" when Num.divChecked 47 0f64 is Ok val -> val Err _ -> -1 - "# + " ), -1.0, f64 @@ -737,11 +728,11 @@ fn gen_div_checked_by_zero_f64() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn gen_div_dec() { assert_evals_to!( indoc!( - r#" + r" x : Dec x = 10 @@ -749,7 +740,7 @@ fn gen_div_dec() { y = 3 x / y - "# + " ), RocDec::from_str_to_i128_unsafe("3.333333333333333333"), i128 @@ -757,11 +748,11 @@ fn gen_div_dec() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn gen_div_checked_dec() { assert_evals_to!( indoc!( - r#" + r" x : Dec x = 10 @@ -771,18 +762,18 @@ fn gen_div_checked_dec() { when Num.divChecked x y is Ok val -> val Err _ -> -1 - "# + " ), RocDec::from_str_to_i128_unsafe("3.333333333333333333"), i128 ); } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn gen_div_checked_by_zero_dec() { assert_evals_to!( indoc!( - r#" + r" x : Dec x = 10 @@ -792,7 +783,7 @@ fn gen_div_checked_by_zero_dec() { when Num.divChecked x y is Ok val -> val Err _ -> -1 - "# + " ), RocDec::from_str_to_i128_unsafe("-1"), i128 @@ -800,33 +791,33 @@ fn gen_div_checked_by_zero_dec() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] #[should_panic(expected = r#"Roc failed with message: "Decimal division by 0!"#)] fn gen_div_dec_by_zero() { assert_evals_to!("1dec / 0", RocDec::from_str_to_i128_unsafe("-1"), i128); } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] #[should_panic(expected = r#"Roc failed with message: "Integer division by 0!"#)] fn gen_div_ceil_by_zero() { assert_evals_to!( - r#" + r" Num.divCeil 5 0 == 0 - "#, + ", false, bool ); } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-dev", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn gen_int_eq() { assert_evals_to!( indoc!( - r#" + r" 4 == 4 - "# + " ), true, bool @@ -834,13 +825,13 @@ fn gen_int_eq() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn gen_int_neq() { assert_evals_to!( indoc!( - r#" + r" 4 != 5 - "# + " ), true, bool @@ -866,11 +857,11 @@ fn float_greater_than() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn gen_dec_eq() { assert_evals_to!( indoc!( - r#" + r" x : Dec x = 4 @@ -878,7 +869,7 @@ fn gen_dec_eq() { y = 4 x == y - "# + " ), true, bool @@ -886,11 +877,11 @@ fn gen_dec_eq() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn gen_dec_neq() { assert_evals_to!( indoc!( - r#" + r" x : Dec x = 4 @@ -898,7 +889,7 @@ fn gen_dec_neq() { y = 5 x != y - "# + " ), true, bool @@ -906,17 +897,17 @@ fn gen_dec_neq() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn gen_wrap_int_neq() { assert_evals_to!( indoc!( - r#" + r" wrappedNotEq : a, a -> Bool where a implements Eq wrappedNotEq = \num1, num2 -> num1 != num2 wrappedNotEq 2 3 - "# + " ), true, bool @@ -924,13 +915,13 @@ fn gen_wrap_int_neq() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-dev", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn gen_add_i8() { assert_evals_to!( indoc!( - r#" + r" 1i8 + 2i8 + 3i8 - "# + " ), 6, i8 @@ -938,13 +929,13 @@ fn gen_add_i8() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-dev", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn gen_add_u8() { assert_evals_to!( indoc!( - r#" + r" 1u8 + 2u8 + 3u8 - "# + " ), 6, u8 @@ -952,13 +943,13 @@ fn gen_add_u8() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-dev", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn gen_add_i16() { assert_evals_to!( indoc!( - r#" + r" 1i16 + 2i16 + 3i16 - "# + " ), 6, i16 @@ -966,13 +957,13 @@ fn gen_add_i16() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-dev", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn gen_add_u16() { assert_evals_to!( indoc!( - r#" + r" 1u16 + 2u16 + 3u16 - "# + " ), 6, u16 @@ -980,13 +971,13 @@ fn gen_add_u16() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-dev", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn gen_add_i32() { assert_evals_to!( indoc!( - r#" + r" 1i32 + 2i32 + 3i32 - "# + " ), 6, i32 @@ -994,13 +985,13 @@ fn gen_add_i32() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-dev", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn gen_add_u32() { assert_evals_to!( indoc!( - r#" + r" 1u32 + 2u32 + 3u32 - "# + " ), 6, u32 @@ -1008,13 +999,13 @@ fn gen_add_u32() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-dev", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn gen_add_i64() { assert_evals_to!( indoc!( - r#" + r" 1 + 2 + 3 - "# + " ), 6, i64 @@ -1022,11 +1013,11 @@ fn gen_add_i64() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn gen_sub_dec() { assert_evals_to!( indoc!( - r#" + r" x : Dec x = 1.5 @@ -1037,7 +1028,7 @@ fn gen_sub_dec() { z = 3 (x - y) - z - "# + " ), RocDec::from_str_to_i128_unsafe("-3.9"), i128 @@ -1045,11 +1036,11 @@ fn gen_sub_dec() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn gen_mul_dec() { assert_evals_to!( indoc!( - r#" + r" x : Dec x = 2 @@ -1060,7 +1051,7 @@ fn gen_mul_dec() { z = 6 x * y * z - "# + " ), RocDec::from_str_to_i128_unsafe("48.0"), i128 @@ -1068,61 +1059,61 @@ fn gen_mul_dec() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn gen_sub_f64() { assert_evals_to!("1.5f64 - 2.4 - 3", -3.9, f64); } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn gen_sub_f32() { assert_evals_to!("1.5f32 - 2.4 - 3", -3.9, f32); } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-dev", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn gen_sub_i8() { assert_evals_to!("1i8 - 2i8 - 3i8", -4, i8); } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-dev", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn gen_sub_u8() { assert_evals_to!("8u8 - 2u8 - 3u8", 3, u8); } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-dev", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn gen_sub_i16() { assert_evals_to!("1i16 - 2i16 - 3i16", -4, i16); } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-dev", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn gen_sub_u16() { assert_evals_to!("8u16 - 2u16 - 3u16", 3, u16); } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-dev", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn gen_sub_i32() { assert_evals_to!("1i32 - 2i32 - 3i32", -4, i32); } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-dev", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn gen_sub_u32() { assert_evals_to!("8u32 - 2u32 - 3u32", 3, u32); } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-dev", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn gen_sub_i64() { assert_evals_to!("1 - 2 - 3", -4, i64); } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-dev", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn gen_signed_mul_quadword_and_lower() { assert_evals_to!("2i64 * 4 * 6", 48, i64); assert_evals_to!("2i32 * 4 * 6", 48, i32); @@ -1131,7 +1122,7 @@ fn gen_signed_mul_quadword_and_lower() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-dev", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn gen_unsigned_mul_quadword_and_lower() { assert_evals_to!("2u64 * 4 * 6", 48, u64); assert_evals_to!("2u32 * 4 * 6", 48, u32); @@ -1140,13 +1131,13 @@ fn gen_unsigned_mul_quadword_and_lower() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-dev", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn gen_mul_f64() { assert_evals_to!("2f64 * 4 * 6", 48.0, f64); } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-dev", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn gen_mul_f32() { assert_evals_to!("2f32 * 4 * 6", 48.0, f32); } @@ -1164,34 +1155,29 @@ fn gen_div_u64() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] +#[should_panic(expected = r#"User crash with message: "Integer division by 0!"#)] +fn gen_div_by_zero_i64() { + assert_evals_to!("1i64 // 0", 100, i64); +} + +#[test] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn gen_div_checked_i64() { assert_evals_to!( - indoc!( - r#" - when Num.divTruncChecked 1000 10 is - Ok val -> val - Err _ -> -1 - "# - ), - 100, - i64 + "Num.divTruncChecked 1000 10", + RocResult::ok(100), + RocResult ); } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn gen_div_checked_by_zero_i64() { assert_evals_to!( - indoc!( - r#" - when Num.divTruncChecked 1000 0 is - Err DivByZero -> 99 - _ -> -24 - "# - ), - 99, - i64 + "Num.divTruncChecked 1000 0", + RocResult::err(()), + RocResult ); } @@ -1201,24 +1187,35 @@ fn gen_rem_i64() { assert_evals_to!("Num.rem 8 3", 2, i64); } +#[test] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] +#[should_panic(expected = r#"User crash with message: "Integer division by 0!"#)] +fn gen_rem_div_by_zero_i64() { + assert_evals_to!("Num.rem 42 0", 100, i64); +} + +#[test] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] +fn gen_rem_checked_i64() { + assert_evals_to!( + "Num.remChecked 42 40", + RocResult::ok(2), + RocResult + ); +} + #[test] #[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn gen_rem_checked_div_by_zero_i64() { assert_evals_to!( - indoc!( - r#" - when Num.remChecked 8 0 is - Err DivByZero -> 4 - Ok _ -> -23 - "# - ), - 4, - i64 + "Num.remChecked 8 0", + RocResult::err(()), + RocResult ); } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn gen_is_positive_i64() { assert_evals_to!("Num.isPositive 0", false, bool); assert_evals_to!("Num.isPositive 1", true, bool); @@ -1226,7 +1223,7 @@ fn gen_is_positive_i64() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn gen_is_negative_i64() { assert_evals_to!("Num.isNegative 0", false, bool); assert_evals_to!("Num.isNegative 3", false, bool); @@ -1234,7 +1231,7 @@ fn gen_is_negative_i64() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn gen_is_positive_f64() { assert_evals_to!("Num.isPositive 0.0", false, bool); assert_evals_to!("Num.isPositive 4.7", true, bool); @@ -1242,7 +1239,7 @@ fn gen_is_positive_f64() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn gen_is_negative_f64() { assert_evals_to!("Num.isNegative 0.0", false, bool); assert_evals_to!("Num.isNegative 9.9", false, bool); @@ -1258,27 +1255,33 @@ fn gen_is_zero_i64() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn gen_is_zero_f64() { - assert_evals_to!("Num.isZero 0.0", true, bool); + assert_evals_to!("Num.isZero 0.0f64", true, bool); } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] +fn gen_is_zero_dec() { + assert_evals_to!("Num.isZero 0.0dec", true, bool); +} + +#[test] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn gen_is_odd() { assert_evals_to!("Num.isOdd 4", false, bool); assert_evals_to!("Num.isOdd 5", true, bool); } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn gen_is_even() { assert_evals_to!("Num.isEven 6", true, bool); assert_evals_to!("Num.isEven 7", false, bool); } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn sin() { assert_evals_to!("Num.sin 0f64", 0.0, f64); assert_evals_to!("Num.sin 1.41421356237f64", 0.9877659459922529, f64); @@ -1291,7 +1294,7 @@ fn sin() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn cos() { assert_evals_to!("Num.cos 0f64", 1.0, f64); assert_evals_to!("Num.cos 3.14159265359f64", -1.0, f64); @@ -1304,7 +1307,7 @@ fn cos() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn tan() { assert_evals_to!("Num.tan 0f64", 0.0f64, f64); assert_evals_to!("Num.tan 0dec", RocDec::from_str("0.0").unwrap(), RocDec); @@ -1343,7 +1346,7 @@ fn bitwise_or() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn lt_u8() { assert_evals_to!("1u8 < 2u8", true, bool); assert_evals_to!("1u8 < 1u8", false, bool); @@ -1353,7 +1356,7 @@ fn lt_u8() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn lte_u8() { assert_evals_to!("1u8 <= 1u8", true, bool); assert_evals_to!("2u8 <= 1u8", false, bool); @@ -1363,7 +1366,7 @@ fn lte_u8() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn gt_u8() { assert_evals_to!("2u8 > 1u8", true, bool); assert_evals_to!("2u8 > 2u8", false, bool); @@ -1373,7 +1376,7 @@ fn gt_u8() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn gte_u8() { assert_evals_to!("1u8 >= 1u8", true, bool); assert_evals_to!("1u8 >= 2u8", false, bool); @@ -1393,7 +1396,7 @@ fn lt_u64() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn lte_u64() { assert_evals_to!("1u64 <= 1u64", true, bool); assert_evals_to!("2u64 <= 1u64", false, bool); @@ -1413,7 +1416,7 @@ fn gt_u64() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn gte_u64() { assert_evals_to!("1u64 >= 1u64", true, bool); assert_evals_to!("1u64 >= 2u64", false, bool); @@ -1432,7 +1435,7 @@ fn lt_i64() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn lte_i64() { assert_evals_to!("1 <= 1", true, bool); assert_evals_to!("2 <= 1", false, bool); @@ -1450,7 +1453,7 @@ fn gt_i64() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn gte_i64() { assert_evals_to!("1 >= 1", true, bool); assert_evals_to!("1 >= 2", false, bool); @@ -1459,7 +1462,7 @@ fn gte_i64() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn lt_f64() { assert_evals_to!("1.1f64 < 1.2", true, bool); assert_evals_to!("1.1f64 < 1.1", false, bool); @@ -1468,7 +1471,7 @@ fn lt_f64() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn lte_f64() { assert_evals_to!("1.1f64 <= 1.1", true, bool); assert_evals_to!("1.2f64 <= 1.1", false, bool); @@ -1477,7 +1480,7 @@ fn lte_f64() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn gt_f64() { assert_evals_to!("2.2f64 > 1.1", true, bool); assert_evals_to!("2.2f64 > 2.2", false, bool); @@ -1486,7 +1489,7 @@ fn gt_f64() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn gte_f64() { assert_evals_to!("1.1f64 >= 1.1", true, bool); assert_evals_to!("1.1f64 >= 1.2", false, bool); @@ -1495,13 +1498,36 @@ fn gte_f64() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-dev", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] +fn gen_is_approx_eq() { + assert_evals_to!("Num.isApproxEq 1e10f64 1.00001e10f64 {}", true, bool); + assert_evals_to!("Num.isApproxEq 1e-7f64 1e-8f64 {}", false, bool); + assert_evals_to!("Num.isApproxEq 1e-8f32 1e-9f32 {}", true, bool); + assert_evals_to!("Num.isApproxEq 1e10f64 1.0001e10f64 {}", false, bool); + assert_evals_to!("Num.isApproxEq 1.0f32 1.0 {}", true, bool); + assert_evals_to!("Num.isApproxEq (1f64 / 0.0) (1f64 / 0.0) {}", true, bool); + assert_evals_to!("Num.isApproxEq (0f64 / 0.0) (0f64 / 0.0) {}", false, bool); + assert_evals_to!("Num.isApproxEq 1e-8f64 0f64 {}", true, bool); + assert_evals_to!("Num.isApproxEq 1e-7f64 0f64 {}", false, bool); + assert_evals_to!("Num.isApproxEq 1e-100f64 0f64 { atol: 0f64 }", false, bool); + assert_evals_to!("Num.isApproxEq 1e-7f64 0f64 { atol: 0f64 }", false, bool); + assert_evals_to!("Num.isApproxEq 1e-10f64 1e-20f64 {}", true, bool); + assert_evals_to!("Num.isApproxEq 1e-10f64 0f64 {}", true, bool); + assert_evals_to!( + "Num.isApproxEq 1e-10f64 0.999999e-10f64 { atol: 0f64 }", + true, + bool + ); +} + +#[test] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn gen_order_of_arithmetic_ops() { assert_evals_to!( indoc!( - r#" + r" 1 + 3 * 7 - 2 - "# + " ), 20, i64 @@ -1509,13 +1535,13 @@ fn gen_order_of_arithmetic_ops() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn gen_order_of_arithmetic_ops_complex_float() { assert_evals_to!( indoc!( - r#" + r" 3 - 48 * 2.0f64 - "# + " ), -93.0, f64 @@ -1523,18 +1549,18 @@ fn gen_order_of_arithmetic_ops_complex_float() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-dev", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn if_guard_bind_variable_false() { assert_evals_to!( indoc!( - r#" + r" wrapper = \{} -> when 10 is x if x == 5 -> 0 _ -> 42 wrapper {} - "# + " ), 42, i64 @@ -1542,18 +1568,18 @@ fn if_guard_bind_variable_false() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-dev", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn if_guard_bind_variable_true() { assert_evals_to!( indoc!( - r#" + r" wrapper = \{} -> when 10 is x if x == 10 -> 42 _ -> 0 wrapper {} - "# + " ), 42, i64 @@ -1561,18 +1587,18 @@ fn if_guard_bind_variable_true() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-dev", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn tail_call_elimination() { assert_evals_to!( indoc!( - r#" + r" sum = \n, accum -> when n is 0 -> accum _ -> sum (n - 1) (n + accum) sum 1_000_000 0 - "# + " ), 500000500000, i64 @@ -1591,7 +1617,7 @@ fn int_negate_dev() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn int_negate() { assert_evals_to!("Num.neg 123", -123, i64); assert_evals_to!("Num.neg Num.maxI64", -i64::MAX, i64); @@ -1606,9 +1632,9 @@ fn int_negate() { fn neg_min_int_overflow() { assert_evals_to!( indoc!( - r#" + r" Num.neg Num.minI64 - "# + " ), 0, i64 @@ -1616,15 +1642,15 @@ fn neg_min_int_overflow() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn gen_wrap_int_neg() { assert_evals_to!( indoc!( - r#" + r" wrappedNeg = \num -> -num wrappedNeg 3 - "# + " ), -3, i64 @@ -1632,16 +1658,16 @@ fn gen_wrap_int_neg() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-dev", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn gen_basic_fn() { assert_evals_to!( indoc!( - r#" + r" always42 : Num.Num (Num.Integer Num.Signed64) -> Num.Num (Num.Integer Num.Signed64) always42 = \_ -> 42 always42 5 - "# + " ), 42, i64 @@ -1665,14 +1691,14 @@ fn num_to_frac() { fn num_to_frac_f64_to_f32() { assert_evals_to!( indoc!( - r#" + r" f64 : F64 f64 = 9.0 f32 : F32 f32 = Num.toFrac f64 f32 - "# + " ), 9.0, f32 @@ -1684,7 +1710,7 @@ fn num_to_frac_f64_to_f32() { fn num_to_frac_f32_to_f32() { assert_evals_to!( indoc!( - r#" + r" arg : F32 arg = 9.0 @@ -1692,7 +1718,7 @@ fn num_to_frac_f32_to_f32() { ret : F32 ret = Num.toFrac arg ret - "# + " ), 9.0, f32 @@ -1704,7 +1730,7 @@ fn num_to_frac_f32_to_f32() { fn num_to_frac_f64_to_f64() { assert_evals_to!( indoc!( - r#" + r" arg : F64 arg = 9.0 @@ -1712,7 +1738,7 @@ fn num_to_frac_f64_to_f64() { ret : F64 ret = Num.toFrac arg ret - "# + " ), 9.0, f64 @@ -1724,7 +1750,7 @@ fn num_to_frac_f64_to_f64() { fn num_to_frac_f32_to_f64() { assert_evals_to!( indoc!( - r#" + r" f32 : F32 f32 = 9.0 @@ -1732,7 +1758,7 @@ fn num_to_frac_f32_to_f64() { f64 : F64 f64 = Num.toFrac f32 f64 - "# + " ), 9.0, f64 @@ -1744,12 +1770,12 @@ fn num_to_frac_f32_to_f64() { fn float_to_float() { assert_evals_to!( indoc!( - r#" + r" x : F64 x = Num.toFrac 0.5f64 x - "# + " ), 0.5, f64 @@ -1782,7 +1808,7 @@ fn frac_is_finite() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn int_compare() { assert_evals_to!("Num.compare 0 1", RocOrder::Lt, RocOrder); assert_evals_to!("Num.compare 1 1", RocOrder::Eq, RocOrder); @@ -1790,7 +1816,7 @@ fn int_compare() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn float_compare() { assert_evals_to!("Num.compare 0.01 3.14", RocOrder::Lt, RocOrder); assert_evals_to!("Num.compare 3.14 3.14", RocOrder::Eq, RocOrder); @@ -1798,49 +1824,88 @@ fn float_compare() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] -fn pow() { +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] +fn pow_f64() { assert_evals_to!("Num.pow 2.0f64 2.0f64", 4.0, f64); } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] -fn ceiling() { - assert_evals_to!("Num.ceiling 1.1f64", 2, i64); +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] +fn pow_dec() { + assert_evals_to!("Num.pow 2.0dec 2.0dec", RocDec::from(4), RocDec); } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] -fn floor() { +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] +fn round_f64() { + assert_evals_to!("Num.round 1.9f64", 2, i64); + assert_evals_to!("Num.round -1.9f64", -2, i64); + assert_evals_to!("Num.round 0.5f64", 1, i64); + assert_evals_to!("Num.round -0.5f64", -1, i64); +} + +#[test] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] +fn round_dec() { + assert_evals_to!("Num.round 1.9dec", 2, i64); + assert_evals_to!("Num.round -1.9dec", -2, i64); + assert_evals_to!("Num.round 0.5dec", 1, i64); + assert_evals_to!("Num.round -0.5dec", -1, i64); +} + +#[test] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] +fn ceiling_f64() { + assert_evals_to!("Num.ceiling 1.9f64", 2, i64); + assert_evals_to!("Num.ceiling -1.9f64", -1, i64); + assert_evals_to!("Num.ceiling 0.5f64", 1, i64); + assert_evals_to!("Num.ceiling -0.5f64", 0, i64); +} + +#[test] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] +fn ceiling_dec() { + assert_evals_to!("Num.ceiling 1.9dec", 2, i64); + assert_evals_to!("Num.ceiling -1.9dec", -1, i64); + assert_evals_to!("Num.ceiling 0.5dec", 1, i64); + assert_evals_to!("Num.ceiling -0.5dec", 0, i64); +} + +#[test] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] +fn floor_f64() { assert_evals_to!("Num.floor 1.9f64", 1, i64); assert_evals_to!("Num.floor -1.9f64", -2, i64); + assert_evals_to!("Num.floor 0.5f64", 0, i64); + assert_evals_to!("Num.floor -0.5f64", -1, i64); } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-dev", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] +fn floor_dec() { + assert_evals_to!("Num.floor 1.9dec", 1, i64); + assert_evals_to!("Num.floor -1.9dec", -2, i64); + assert_evals_to!("Num.floor 0.5dec", 0, i64); + assert_evals_to!("Num.floor -0.5dec", -1, i64); +} + +#[test] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn pow_int() { assert_evals_to!("Num.powInt 2 3", 8, i64); } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-dev", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn atan() { assert_evals_to!("Num.atan 10f64", 1.4711276743037347, f64); } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] #[should_panic(expected = r#"Roc failed with message: "Integer addition overflowed!"#)] fn int_add_overflow() { - assert_evals_to!( - indoc!( - r#" - 9_223_372_036_854_775_807 + 1 - "# - ), - 0, - i64 - ); + assert_evals_to!("9_223_372_036_854_775_807 + 1", 0, i64); } #[test] @@ -1894,7 +1959,7 @@ fn float_add_checked_fail() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] fn float_add_overflow() { assert_evals_to!( "1.7976931348623157e308f64 + 1.7976931348623157e308", @@ -1904,14 +1969,14 @@ fn float_add_overflow() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] #[should_panic(expected = r#"Roc failed with message: "Integer subtraction overflowed!"#)] fn int_sub_overflow() { assert_evals_to!("-9_223_372_036_854_775_808 - 1", 0, i64); } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-dev", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn int_sub_wrap() { assert_evals_to!( "Num.subWrap -9_223_372_036_854_775_808 1", @@ -1923,7 +1988,7 @@ fn int_sub_wrap() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn float_sub_overflow() { assert_evals_to!( "-1.7976931348623157e308f64 - 1.7976931348623157e308", @@ -1933,30 +1998,18 @@ fn float_sub_overflow() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn int_sub_checked() { assert_evals_to!( - indoc!( - r#" - when Num.subChecked 5 2 is - Ok v -> v - _ -> -1 - "# - ), - 3, - i64 + "Num.subChecked 5 2", + RocResult::ok(3), + RocResult ); assert_evals_to!( - indoc!( - r#" - when Num.subChecked Num.minI64 1 is - Err Overflow -> -1 - Ok v -> v - "# - ), - -1, - i64 + "Num.subChecked Num.minI64 1 ", + RocResult::err(()), + RocResult ); } @@ -1964,86 +2017,42 @@ fn int_sub_checked() { #[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] fn float_sub_checked() { assert_evals_to!( - indoc!( - r#" - when Num.subChecked 1.0 0.0f64 is - Ok v -> v - Err Overflow -> -1.0 - "# - ), - 1.0, - f64 + "Num.subChecked 1.0 0.0f64", + RocResult::ok(1.0), + RocResult ); assert_evals_to!( - indoc!( - r#" - when Num.subChecked -1.7976931348623157e308f64 1.7976931348623157e308 is - Err Overflow -> -1 - Ok v -> v - "# - ), - -1.0, - f64 + "Num.subChecked -1.7976931348623157e308f64 1.7976931348623157e308", + RocResult::err(()), + RocResult ); } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] #[should_panic(expected = r#"Roc failed with message: "Integer multiplication overflowed!"#)] fn int_positive_mul_overflow() { - assert_evals_to!( - indoc!( - r#" - 9_223_372_036_854_775_807 * 2 - "# - ), - 0, - i64 - ); + assert_evals_to!("9_223_372_036_854_775_807 * 2", 0, i64); } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] #[should_panic(expected = r#"Roc failed with message: "Integer multiplication overflowed!"#)] fn int_negative_mul_overflow() { - assert_evals_to!( - indoc!( - r#" - (-9_223_372_036_854_775_808) * 2 - "# - ), - 0, - i64 - ); + assert_evals_to!("(-9_223_372_036_854_775_808) * 2", 0, i64); } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn float_positive_mul_overflow() { - assert_evals_to!( - indoc!( - r#" - 1.7976931348623157e308f64 * 2 - "# - ), - f64::INFINITY, - f64 - ); + assert_evals_to!("1.7976931348623157e308f64 * 2", f64::INFINITY, f64); } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn float_negative_mul_overflow() { - assert_evals_to!( - indoc!( - r#" - -1.7976931348623157e308f64 * 2 - "# - ), - -f64::INFINITY, - f64 - ); + assert_evals_to!("-1.7976931348623157e308f64 * 2", -f64::INFINITY, f64); } #[test] @@ -2062,27 +2071,15 @@ fn int_mul_wrap_i128() { #[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn int_mul_checked() { assert_evals_to!( - indoc!( - r#" - when Num.mulChecked 20 2 is - Ok v -> v - _ -> -1 - "# - ), - 40, - i64 + "Num.mulChecked 20 2", + RocResult::ok(40), + RocResult:: ); assert_evals_to!( - indoc!( - r#" - when Num.mulChecked Num.maxI64 2 is - Err Overflow -> -1 - Ok v -> v - "# - ), - -1, - i64 + "Num.mulChecked Num.maxI64 2", + RocResult::err(()), + RocResult:: ); } @@ -2090,27 +2087,15 @@ fn int_mul_checked() { #[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] fn float_mul_checked() { assert_evals_to!( - indoc!( - r#" - when Num.mulChecked 20.0 2.0f64 is - Ok v -> v - Err Overflow -> -1.0 - "# - ), - 40.0, - f64 + "Num.mulChecked 20.0 2.0f64", + RocResult::ok(40.0), + RocResult:: ); assert_evals_to!( - indoc!( - r#" - when Num.mulChecked 1.7976931348623157e308f64 2 is - Err Overflow -> -1 - Ok v -> v - "# - ), - -1.0, - f64 + "Num.mulChecked 1.7976931348623157e308f64 2", + RocResult::err(()), + RocResult:: ); } @@ -2220,121 +2205,121 @@ fn max_i128() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn min_i64() { assert_evals_to!("Num.minI64", i64::MIN, i64); } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn max_i64() { assert_evals_to!("Num.maxI64", i64::MAX, i64); } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn min_u64() { assert_evals_to!("Num.minU64", u64::MIN, u64); } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn max_u64() { assert_evals_to!("Num.maxU64", u64::MAX, u64); } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn min_i32() { assert_evals_to!("Num.minI32", i32::MIN, i32); } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn max_i32() { assert_evals_to!("Num.maxI32", i32::MAX, i32); } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn min_u32() { assert_evals_to!("Num.minU32", u32::MIN, u32); } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn max_u32() { assert_evals_to!("Num.maxU32", u32::MAX, u32); } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn min_i16() { assert_evals_to!("Num.minI16", i16::MIN, i16); } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn max_i16() { assert_evals_to!("Num.maxI16", i16::MAX, i16); } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn min_u16() { assert_evals_to!("Num.minU16", u16::MIN, u16); } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn max_u16() { assert_evals_to!("Num.maxU16", u16::MAX, u16); } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn min_i8() { assert_evals_to!("Num.minI8", i8::MIN, i8); } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn max_i8() { assert_evals_to!("Num.maxI8", i8::MAX, i8); } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn min_u8() { assert_evals_to!("Num.minU8", u8::MIN, u8); } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn max_u8() { assert_evals_to!("Num.maxU8", u8::MAX, u8); } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn max_f64() { assert_evals_to!("Num.maxF64", f64::MAX, f64); } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn min_f64() { assert_evals_to!("Num.minF64", f64::MIN, f64); } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn max_f32() { assert_evals_to!("Num.maxF32", f32::MAX, f32); } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn min_f32() { assert_evals_to!("Num.minF32", f32::MIN, f32); } @@ -2388,7 +2373,7 @@ num_conversion_tests! { to_i64_truncate_wraps, "10_000_000_000_000_000_000i128", -8446744073709551616 ) "Num.toI128", i128, ( - to_i128_same_width, "15u128", 15 + to_i128_same_width, "15u128", 15, ["gen-dev"] to_i128_extend, "15i8", 15 ) "Num.toU8", u8, ( @@ -2415,8 +2400,9 @@ num_conversion_tests! { to_u64_truncate_wraps, "10_000_000_000_000_000_000_000i128", 1864712049423024128 ) "Num.toU128", u128, ( - to_u128_same_width, "15i128", 15 + to_u128_same_width, "15i128", 15, ["gen-dev"] to_u128_extend, "15i8", 15 + to_u128_big, "11562537357600483583u64", 11562537357600483583, ["gen-dev"] ) "Num.toNat", usize, ( to_nat_same_width, "15i64", 15, ["gen-wasm", "gen-dev"] @@ -2424,34 +2410,34 @@ num_conversion_tests! { to_nat_truncate, "115i128", 115 ) "Num.toF32", f32, ( - to_f32_from_i8, "15i8", 15.0 - to_f32_from_i16, "15i16", 15.0 - to_f32_from_i32, "15i32", 15.0 - to_f32_from_i64, "15i64", 15.0 - to_f32_from_i128, "15i128", 15.0 - to_f32_from_u8, "15u8", 15.0 - to_f32_from_u16, "15u16", 15.0 - to_f32_from_u32, "15u32", 15.0 - to_f32_from_u64, "15u64", 15.0 - to_f32_from_u128, "15u128", 15.0 - to_f32_from_nat, "15nat", 15.0 - to_f32_from_f32, "1.5f32", 1.5 - to_f32_from_f64, "1.5f64", 1.5 + to_f32_from_i8, "15i8", 15.0, ["gen-wasm", "gen-dev"] + to_f32_from_i16, "15i16", 15.0, ["gen-wasm", "gen-dev"] + to_f32_from_i32, "15i32", 15.0, ["gen-wasm", "gen-dev"] + to_f32_from_i64, "15i64", 15.0, ["gen-wasm", "gen-dev"] + to_f32_from_i128, "15i128", 15.0, ["gen-dev"] + to_f32_from_u8, "15u8", 15.0, ["gen-wasm", "gen-dev"] + to_f32_from_u16, "15u16", 15.0, ["gen-wasm", "gen-dev"] + to_f32_from_u32, "15u32", 15.0, ["gen-wasm", "gen-dev"] + to_f32_from_u64, "15u64", 15.0, ["gen-wasm", "gen-dev"] + to_f32_from_u128, "15u128", 15.0, ["gen-dev"] + to_f32_from_nat, "15nat", 15.0, ["gen-wasm", "gen-dev"] + to_f32_from_f32, "1.5f32", 1.5, ["gen-wasm", "gen-dev"] + to_f32_from_f64, "1.5f64", 1.5, ["gen-wasm", "gen-dev"] ) "Num.toF64", f64, ( - to_f64_from_i8, "15i8", 15.0 - to_f64_from_i16, "15i16", 15.0 - to_f64_from_i32, "15i32", 15.0 - to_f64_from_i64, "15i64", 15.0 - to_f64_from_i128, "15i128", 15.0 - to_f64_from_u8, "15u8", 15.0 - to_f64_from_u16, "15u16", 15.0 - to_f64_from_u32, "15u32", 15.0 - to_f64_from_u64, "15u64", 15.0 - to_f64_from_u128, "15u128", 15.0 - to_f64_from_nat, "15nat", 15.0 - to_f64_from_f32, "1.5f32", 1.5 - to_f64_from_f64, "1.5f64", 1.5 + to_f64_from_i8, "15i8", 15.0, ["gen-wasm", "gen-dev"] + to_f64_from_i16, "15i16", 15.0, ["gen-wasm", "gen-dev"] + to_f64_from_i32, "15i32", 15.0, ["gen-wasm", "gen-dev"] + to_f64_from_i64, "15i64", 15.0, ["gen-wasm", "gen-dev"] + to_f64_from_i128, "15i128", 15.0, ["gen-dev"] + to_f64_from_u8, "15u8", 15.0, ["gen-wasm", "gen-dev"] + to_f64_from_u16, "15u16", 15.0, ["gen-wasm", "gen-dev"] + to_f64_from_u32, "15u32", 15.0, ["gen-wasm", "gen-dev"] + to_f64_from_u64, "15u64", 15.0, ["gen-wasm", "gen-dev"] + to_f64_from_u128, "15u128", 15.0, ["gen-dev"] + to_f64_from_nat, "15nat", 15.0, ["gen-wasm", "gen-dev"] + to_f64_from_f32, "1.5f32", 1.5, ["gen-dev"] + to_f64_from_f64, "1.5f64", 1.5, ["gen-wasm", "gen-dev"] ) } @@ -2618,7 +2604,7 @@ fn is_multiple_of_signed() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn is_multiple_of_unsigned() { // true assert_evals_to!("Num.isMultipleOf 5u8 1", true, bool); @@ -2776,11 +2762,11 @@ fn bytes_to_u128_subtly_out_of_bounds() { fn bytes_to_u16_max_u8s() { assert_evals_to!( indoc!( - r#" + r" when Num.bytesToU16 [255, 255] 0 is Ok v -> v Err OutOfBounds -> 1 - "# + " ), 65535, u16 @@ -2792,11 +2778,11 @@ fn bytes_to_u16_max_u8s() { fn bytes_to_u16_min_u8s() { assert_evals_to!( indoc!( - r#" + r" when Num.bytesToU16 [0, 0] 0 is Ok v -> v Err OutOfBounds -> 1 - "# + " ), 0, u16 @@ -2808,11 +2794,11 @@ fn bytes_to_u16_min_u8s() { fn bytes_to_u16_random_u8s() { assert_evals_to!( indoc!( - r#" + r" when Num.bytesToU16 [164, 215] 0 is Ok v -> v Err OutOfBounds -> 1 - "# + " ), 55_204, u16 @@ -2824,11 +2810,11 @@ fn bytes_to_u16_random_u8s() { fn bytes_to_u32_min_u8s() { assert_evals_to!( indoc!( - r#" + r" when Num.bytesToU32 [0, 0, 0, 0] 0 is Ok v -> v Err OutOfBounds -> 1 - "# + " ), 0, u32 @@ -2840,11 +2826,11 @@ fn bytes_to_u32_min_u8s() { fn bytes_to_u32_max_u8s() { assert_evals_to!( indoc!( - r#" + r" when Num.bytesToU32 [255, 255, 255, 255] 0 is Ok v -> v Err OutOfBounds -> 1 - "# + " ), 4_294_967_295, u32 @@ -2856,11 +2842,11 @@ fn bytes_to_u32_max_u8s() { fn bytes_to_u32_random_u8s() { assert_evals_to!( indoc!( - r#" + r" when Num.bytesToU32 [252, 124, 128, 121] 0 is Ok v -> v Err OutOfBounds -> 1 - "# + " ), 2_038_463_740, u32 @@ -2872,11 +2858,11 @@ fn bytes_to_u32_random_u8s() { fn bytes_to_u64_min_u8s() { assert_evals_to!( indoc!( - r#" + r" when Num.bytesToU64 [0, 0, 0, 0, 0, 0, 0, 0] 0 is Ok v -> v Err OutOfBounds -> 1 - "# + " ), 0, u64 @@ -2888,11 +2874,11 @@ fn bytes_to_u64_min_u8s() { fn bytes_to_u64_max_u8s() { assert_evals_to!( indoc!( - r#" + r" when Num.bytesToU64 [255, 255, 255, 255, 255, 255, 255, 255] 0 is Ok v -> v Err OutOfBounds -> 1 - "# + " ), 18_446_744_073_709_551_615, u64 @@ -2904,11 +2890,11 @@ fn bytes_to_u64_max_u8s() { fn bytes_to_u64_random_u8s() { assert_evals_to!( indoc!( - r#" + r" when Num.bytesToU64 [252, 124, 128, 121, 1, 32, 177, 211] 0 is Ok v -> v Err OutOfBounds -> 1 - "# + " ), 15_254_008_603_586_100_476, u64 @@ -2920,11 +2906,11 @@ fn bytes_to_u64_random_u8s() { fn bytes_to_u128_min_u8s() { assert_evals_to!( indoc!( - r#" + r" when Num.bytesToU128 [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] 0 is Ok v -> v Err OutOfBounds -> 1 - "# + " ), 0, u128 @@ -2936,11 +2922,11 @@ fn bytes_to_u128_min_u8s() { fn bytes_to_u128_max_u8s() { assert_evals_to!( indoc!( - r#" + r" when Num.bytesToU128 [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255] 0 is Ok v -> v Err OutOfBounds -> 1 - "# + " ), 340_282_366_920_938_463_463_374_607_431_768_211_455, u128 @@ -2952,11 +2938,11 @@ fn bytes_to_u128_max_u8s() { fn bytes_to_u128_random_u8s() { assert_evals_to!( indoc!( - r#" + r" when Num.bytesToU128 [252, 124, 128, 121, 1, 32, 177, 211, 3, 57, 203, 122, 95, 164, 23, 145] 0 is Ok v -> v Err OutOfBounds -> 1 - "# + " ), 192_860_816_096_412_392_720_639_456_393_488_792_828, u128 @@ -2964,7 +2950,7 @@ fn bytes_to_u128_random_u8s() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn when_on_i32() { assert_evals_to!( indoc!( @@ -2987,7 +2973,7 @@ fn when_on_i32() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn when_on_i16() { assert_evals_to!( indoc!( @@ -3014,269 +3000,225 @@ fn when_on_i16() { fn num_to_str() { use roc_std::RocStr; - assert_evals_to!(r#"Num.toStr 1234"#, RocStr::from("1234"), RocStr); - assert_evals_to!(r#"Num.toStr 0"#, RocStr::from("0"), RocStr); - assert_evals_to!(r#"Num.toStr -1"#, RocStr::from("-1"), RocStr); + assert_evals_to!(r"Num.toStr 1234", RocStr::from("1234"), RocStr); + assert_evals_to!(r"Num.toStr 0", RocStr::from("0"), RocStr); + assert_evals_to!(r"Num.toStr -1", RocStr::from("-1"), RocStr); let max = format!("{}", i64::MAX); - assert_evals_to!( - r#"Num.toStr Num.maxI64"#, - RocStr::from(max.as_str()), - RocStr - ); + assert_evals_to!(r"Num.toStr Num.maxI64", RocStr::from(max.as_str()), RocStr); let min = format!("{}", i64::MIN); - assert_evals_to!( - r#"Num.toStr Num.minI64"#, - RocStr::from(min.as_str()), - RocStr - ); + assert_evals_to!(r"Num.toStr Num.minI64", RocStr::from(min.as_str()), RocStr); } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn num_to_str_u8() { use roc_std::RocStr; - assert_evals_to!(r#"Num.toStr 0u8"#, RocStr::from("0"), RocStr); - assert_evals_to!(r#"Num.toStr 1u8"#, RocStr::from("1"), RocStr); - assert_evals_to!(r#"Num.toStr 10u8"#, RocStr::from("10"), RocStr); + assert_evals_to!(r"Num.toStr 0u8", RocStr::from("0"), RocStr); + assert_evals_to!(r"Num.toStr 1u8", RocStr::from("1"), RocStr); + assert_evals_to!(r"Num.toStr 10u8", RocStr::from("10"), RocStr); let max = format!("{}", u8::MAX); - assert_evals_to!(r#"Num.toStr Num.maxU8"#, RocStr::from(max.as_str()), RocStr); + assert_evals_to!(r"Num.toStr Num.maxU8", RocStr::from(max.as_str()), RocStr); } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn num_to_str_u16() { use roc_std::RocStr; - assert_evals_to!(r#"Num.toStr 0u16"#, RocStr::from("0"), RocStr); - assert_evals_to!(r#"Num.toStr 1u16"#, RocStr::from("1"), RocStr); - assert_evals_to!(r#"Num.toStr 10u16"#, RocStr::from("10"), RocStr); + assert_evals_to!(r"Num.toStr 0u16", RocStr::from("0"), RocStr); + assert_evals_to!(r"Num.toStr 1u16", RocStr::from("1"), RocStr); + assert_evals_to!(r"Num.toStr 10u16", RocStr::from("10"), RocStr); let max = format!("{}", u16::MAX); - assert_evals_to!( - r#"Num.toStr Num.maxU16"#, - RocStr::from(max.as_str()), - RocStr - ); + assert_evals_to!(r"Num.toStr Num.maxU16", RocStr::from(max.as_str()), RocStr); } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn num_to_str_u32() { use roc_std::RocStr; - assert_evals_to!(r#"Num.toStr 0u32"#, RocStr::from("0"), RocStr); - assert_evals_to!(r#"Num.toStr 1u32"#, RocStr::from("1"), RocStr); - assert_evals_to!(r#"Num.toStr 10u32"#, RocStr::from("10"), RocStr); + assert_evals_to!(r"Num.toStr 0u32", RocStr::from("0"), RocStr); + assert_evals_to!(r"Num.toStr 1u32", RocStr::from("1"), RocStr); + assert_evals_to!(r"Num.toStr 10u32", RocStr::from("10"), RocStr); let max = format!("{}", u32::MAX); - assert_evals_to!( - r#"Num.toStr Num.maxU32"#, - RocStr::from(max.as_str()), - RocStr - ); + assert_evals_to!(r"Num.toStr Num.maxU32", RocStr::from(max.as_str()), RocStr); } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn num_to_str_u64() { use roc_std::RocStr; - assert_evals_to!(r#"Num.toStr 0u64"#, RocStr::from("0"), RocStr); - assert_evals_to!(r#"Num.toStr 1u64"#, RocStr::from("1"), RocStr); - assert_evals_to!(r#"Num.toStr 10u64"#, RocStr::from("10"), RocStr); + assert_evals_to!(r"Num.toStr 0u64", RocStr::from("0"), RocStr); + assert_evals_to!(r"Num.toStr 1u64", RocStr::from("1"), RocStr); + assert_evals_to!(r"Num.toStr 10u64", RocStr::from("10"), RocStr); let max = format!("{}", u64::MAX); - assert_evals_to!( - r#"Num.toStr Num.maxU64"#, - RocStr::from(max.as_str()), - RocStr - ); + assert_evals_to!(r"Num.toStr Num.maxU64", RocStr::from(max.as_str()), RocStr); } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn num_to_str_i8() { use roc_std::RocStr; - assert_evals_to!(r#"Num.toStr -10i8"#, RocStr::from("-10"), RocStr); - assert_evals_to!(r#"Num.toStr -1i8"#, RocStr::from("-1"), RocStr); - assert_evals_to!(r#"Num.toStr 0i8"#, RocStr::from("0"), RocStr); - assert_evals_to!(r#"Num.toStr 1i8"#, RocStr::from("1"), RocStr); - assert_evals_to!(r#"Num.toStr 10i8"#, RocStr::from("10"), RocStr); + assert_evals_to!(r"Num.toStr -10i8", RocStr::from("-10"), RocStr); + assert_evals_to!(r"Num.toStr -1i8", RocStr::from("-1"), RocStr); + assert_evals_to!(r"Num.toStr 0i8", RocStr::from("0"), RocStr); + assert_evals_to!(r"Num.toStr 1i8", RocStr::from("1"), RocStr); + assert_evals_to!(r"Num.toStr 10i8", RocStr::from("10"), RocStr); let max = format!("{}", i8::MAX); - assert_evals_to!(r#"Num.toStr Num.maxI8"#, RocStr::from(max.as_str()), RocStr); + assert_evals_to!(r"Num.toStr Num.maxI8", RocStr::from(max.as_str()), RocStr); let max = format!("{}", i8::MIN); - assert_evals_to!(r#"Num.toStr Num.minI8"#, RocStr::from(max.as_str()), RocStr); + assert_evals_to!(r"Num.toStr Num.minI8", RocStr::from(max.as_str()), RocStr); } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn num_to_str_i16() { use roc_std::RocStr; - assert_evals_to!(r#"Num.toStr -10i16"#, RocStr::from("-10"), RocStr); - assert_evals_to!(r#"Num.toStr -1i16"#, RocStr::from("-1"), RocStr); - assert_evals_to!(r#"Num.toStr 0i16"#, RocStr::from("0"), RocStr); - assert_evals_to!(r#"Num.toStr 1i16"#, RocStr::from("1"), RocStr); - assert_evals_to!(r#"Num.toStr 10i16"#, RocStr::from("10"), RocStr); + assert_evals_to!(r"Num.toStr -10i16", RocStr::from("-10"), RocStr); + assert_evals_to!(r"Num.toStr -1i16", RocStr::from("-1"), RocStr); + assert_evals_to!(r"Num.toStr 0i16", RocStr::from("0"), RocStr); + assert_evals_to!(r"Num.toStr 1i16", RocStr::from("1"), RocStr); + assert_evals_to!(r"Num.toStr 10i16", RocStr::from("10"), RocStr); let max = format!("{}", i16::MAX); - assert_evals_to!( - r#"Num.toStr Num.maxI16"#, - RocStr::from(max.as_str()), - RocStr - ); + assert_evals_to!(r"Num.toStr Num.maxI16", RocStr::from(max.as_str()), RocStr); let max = format!("{}", i16::MIN); - assert_evals_to!( - r#"Num.toStr Num.minI16"#, - RocStr::from(max.as_str()), - RocStr - ); + assert_evals_to!(r"Num.toStr Num.minI16", RocStr::from(max.as_str()), RocStr); } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn num_to_str_i32() { use roc_std::RocStr; - assert_evals_to!(r#"Num.toStr -10i32"#, RocStr::from("-10"), RocStr); - assert_evals_to!(r#"Num.toStr -1i32"#, RocStr::from("-1"), RocStr); - assert_evals_to!(r#"Num.toStr 0i32"#, RocStr::from("0"), RocStr); - assert_evals_to!(r#"Num.toStr 1i32"#, RocStr::from("1"), RocStr); - assert_evals_to!(r#"Num.toStr 10i32"#, RocStr::from("10"), RocStr); + assert_evals_to!(r"Num.toStr -10i32", RocStr::from("-10"), RocStr); + assert_evals_to!(r"Num.toStr -1i32", RocStr::from("-1"), RocStr); + assert_evals_to!(r"Num.toStr 0i32", RocStr::from("0"), RocStr); + assert_evals_to!(r"Num.toStr 1i32", RocStr::from("1"), RocStr); + assert_evals_to!(r"Num.toStr 10i32", RocStr::from("10"), RocStr); let max = format!("{}", i32::MAX); - assert_evals_to!( - r#"Num.toStr Num.maxI32"#, - RocStr::from(max.as_str()), - RocStr - ); + assert_evals_to!(r"Num.toStr Num.maxI32", RocStr::from(max.as_str()), RocStr); let max = format!("{}", i32::MIN); - assert_evals_to!( - r#"Num.toStr Num.minI32"#, - RocStr::from(max.as_str()), - RocStr - ); + assert_evals_to!(r"Num.toStr Num.minI32", RocStr::from(max.as_str()), RocStr); } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn num_to_str_i64() { use roc_std::RocStr; - assert_evals_to!(r#"Num.toStr -10i64"#, RocStr::from("-10"), RocStr); - assert_evals_to!(r#"Num.toStr -1i64"#, RocStr::from("-1"), RocStr); - assert_evals_to!(r#"Num.toStr 0i64"#, RocStr::from("0"), RocStr); - assert_evals_to!(r#"Num.toStr 1i64"#, RocStr::from("1"), RocStr); - assert_evals_to!(r#"Num.toStr 10i64"#, RocStr::from("10"), RocStr); + assert_evals_to!(r"Num.toStr -10i64", RocStr::from("-10"), RocStr); + assert_evals_to!(r"Num.toStr -1i64", RocStr::from("-1"), RocStr); + assert_evals_to!(r"Num.toStr 0i64", RocStr::from("0"), RocStr); + assert_evals_to!(r"Num.toStr 1i64", RocStr::from("1"), RocStr); + assert_evals_to!(r"Num.toStr 10i64", RocStr::from("10"), RocStr); let max = format!("{}", i64::MAX); - assert_evals_to!( - r#"Num.toStr Num.maxI64"#, - RocStr::from(max.as_str()), - RocStr - ); + assert_evals_to!(r"Num.toStr Num.maxI64", RocStr::from(max.as_str()), RocStr); let max = format!("{}", i64::MIN); - assert_evals_to!( - r#"Num.toStr Num.minI64"#, - RocStr::from(max.as_str()), - RocStr - ); + assert_evals_to!(r"Num.toStr Num.minI64", RocStr::from(max.as_str()), RocStr); } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn num_to_str_f32() { use roc_std::RocStr; - assert_evals_to!(r#"Num.toStr -10.75f32"#, RocStr::from("-10.75"), RocStr); - assert_evals_to!(r#"Num.toStr -1.75f32"#, RocStr::from("-1.75"), RocStr); - assert_evals_to!(r#"Num.toStr 0f32"#, RocStr::from("0"), RocStr); - assert_evals_to!(r#"Num.toStr 1.75f32"#, RocStr::from("1.75"), RocStr); - assert_evals_to!(r#"Num.toStr 10.75f32"#, RocStr::from("10.75"), RocStr); + assert_evals_to!(r"Num.toStr -10.75f32", RocStr::from("-10.75"), RocStr); + assert_evals_to!(r"Num.toStr -1.75f32", RocStr::from("-1.75"), RocStr); + assert_evals_to!(r"Num.toStr 0f32", RocStr::from("0"), RocStr); + assert_evals_to!(r"Num.toStr 1.75f32", RocStr::from("1.75"), RocStr); + assert_evals_to!(r"Num.toStr 10.75f32", RocStr::from("10.75"), RocStr); assert_evals_to!( - r#"Num.toStr Num.maxF32"#, + r"Num.toStr Num.maxF32", RocStr::from("340282346638528860000000000000000000000"), RocStr ); assert_evals_to!( - r#"Num.toStr Num.minF32"#, + r"Num.toStr Num.minF32", RocStr::from("-340282346638528860000000000000000000000"), RocStr ); } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn num_to_str_f64() { use roc_std::RocStr; - assert_evals_to!(r#"Num.toStr -10.75f64"#, RocStr::from("-10.75"), RocStr); - assert_evals_to!(r#"Num.toStr -1.75f64"#, RocStr::from("-1.75"), RocStr); - assert_evals_to!(r#"Num.toStr 0f64"#, RocStr::from("0"), RocStr); - assert_evals_to!(r#"Num.toStr 1.75f64"#, RocStr::from("1.75"), RocStr); - assert_evals_to!(r#"Num.toStr 10.75f64"#, RocStr::from("10.75"), RocStr); + assert_evals_to!(r"Num.toStr -10.75f64", RocStr::from("-10.75"), RocStr); + assert_evals_to!(r"Num.toStr -1.75f64", RocStr::from("-1.75"), RocStr); + assert_evals_to!(r"Num.toStr 0f64", RocStr::from("0"), RocStr); + assert_evals_to!(r"Num.toStr 1.75f64", RocStr::from("1.75"), RocStr); + assert_evals_to!(r"Num.toStr 10.75f64", RocStr::from("10.75"), RocStr); assert_evals_to!( - r#"Num.toStr Num.maxF64"#, + r"Num.toStr Num.maxF64", RocStr::from(f64::MAX.to_string().as_str()), RocStr ); assert_evals_to!( - r#"Num.toStr Num.minF64"#, + r"Num.toStr Num.minF64", RocStr::from(f64::MIN.to_string().as_str()), RocStr ); } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn num_to_str_dec() { use roc_std::RocStr; - assert_evals_to!(r#"Num.toStr -10.75dec"#, RocStr::from("-10.75"), RocStr); - assert_evals_to!(r#"Num.toStr -1.75dec"#, RocStr::from("-1.75"), RocStr); - assert_evals_to!(r#"Num.toStr 0dec"#, RocStr::from("0.0"), RocStr); - assert_evals_to!(r#"Num.toStr 1.75dec"#, RocStr::from("1.75"), RocStr); - assert_evals_to!(r#"Num.toStr 10.75dec"#, RocStr::from("10.75"), RocStr); + assert_evals_to!(r"Num.toStr -10.75dec", RocStr::from("-10.75"), RocStr); + assert_evals_to!(r"Num.toStr -1.75dec", RocStr::from("-1.75"), RocStr); + assert_evals_to!(r"Num.toStr 0dec", RocStr::from("0.0"), RocStr); + assert_evals_to!(r"Num.toStr 1.75dec", RocStr::from("1.75"), RocStr); + assert_evals_to!(r"Num.toStr 10.75dec", RocStr::from("10.75"), RocStr); assert_evals_to!( - r#"Num.toStr 170141183460469.105727dec"#, + r"Num.toStr 170141183460469.105727dec", RocStr::from("170141183460469.105727"), RocStr ); assert_evals_to!( - r#"Num.toStr -170141183460469.105727dec"#, + r"Num.toStr -170141183460469.105727dec", RocStr::from("-170141183460469.105727"), RocStr ); } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn u8_addition_greater_than_i8() { assert_evals_to!( indoc!( - r#" + r" x : U8 x = 100 y : U8 y = 100 x + y - "# + " ), 200, u8 @@ -3284,17 +3226,17 @@ fn u8_addition_greater_than_i8() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn u8_sub_greater_than_i8() { assert_evals_to!( indoc!( - r#" + r" x : U8 x = 255 y : U8 y = 55 x - y - "# + " ), 200, u8 @@ -3302,17 +3244,17 @@ fn u8_sub_greater_than_i8() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn u8_mul_greater_than_i8() { assert_evals_to!( indoc!( - r#" + r" x : U8 x = 40 y : U8 y = 5 x * y - "# + " ), 200, u8 @@ -3320,17 +3262,17 @@ fn u8_mul_greater_than_i8() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn add_saturated() { assert_evals_to!( indoc!( - r#" + r" x : U8 x = 200 y : U8 y = 200 Num.addSaturated x y - "# + " ), 255, u8 @@ -3338,13 +3280,13 @@ fn add_saturated() { assert_evals_to!( indoc!( - r#" + r" x : I8 x = 100 y : I8 y = 100 Num.addSaturated x y - "# + " ), 127, i8 @@ -3352,13 +3294,13 @@ fn add_saturated() { assert_evals_to!( indoc!( - r#" + r" x : I8 x = -100 y : I8 y = -100 Num.addSaturated x y - "# + " ), -128, i8 @@ -3366,43 +3308,43 @@ fn add_saturated() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn sub_saturated() { assert_evals_to!( indoc!( - r#" + r" x : U8 x = 10 y : U8 y = 20 Num.subSaturated x y - "# + " ), 0, u8 ); assert_evals_to!( indoc!( - r#" + r" x : I8 x = -100 y : I8 y = 100 Num.subSaturated x y - "# + " ), -128, i8 ); assert_evals_to!( indoc!( - r#" + r" x : I8 x = 100 y : I8 y = -100 Num.subSaturated x y - "# + " ), 127, i8 @@ -3414,65 +3356,65 @@ fn sub_saturated() { fn mul_saturated() { assert_evals_to!( indoc!( - r#" + r" x : U8 x = 20 y : U8 y = 20 Num.mulSaturated x y - "# + " ), 255, u8 ); assert_evals_to!( indoc!( - r#" + r" x : I8 x = -20 y : I8 y = -20 Num.mulSaturated x y - "# + " ), 127, i8 ); assert_evals_to!( indoc!( - r#" + r" x : I8 x = 20 y : I8 y = -20 Num.mulSaturated x y - "# + " ), -128, i8 ); assert_evals_to!( indoc!( - r#" + r" x : I8 x = -20 y : I8 y = 20 Num.mulSaturated x y - "# + " ), -128, i8 ); assert_evals_to!( indoc!( - r#" + r" x : I8 x = 20 y : I8 y = 20 Num.mulSaturated x y - "# + " ), 127, i8 @@ -3480,18 +3422,18 @@ fn mul_saturated() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn monomorphized_ints() { assert_evals_to!( indoc!( - r#" + r" x = 100 f : U8, U32 -> Nat f = \_, _ -> 18 f x x - "# + " ), 18, usize @@ -3499,18 +3441,18 @@ fn monomorphized_ints() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn monomorphized_floats() { assert_evals_to!( indoc!( - r#" + r" x = 100.0 f : F32, F64 -> Nat f = \_, _ -> 18 f x x - "# + " ), 18, usize @@ -3518,11 +3460,11 @@ fn monomorphized_floats() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn monomorphized_ints_names_dont_conflict() { assert_evals_to!( indoc!( - r#" + r" f : U8 -> Nat f = \_ -> 9 x = @@ -3534,7 +3476,7 @@ fn monomorphized_ints_names_dont_conflict() { f n x + y - "# + " ), 18, usize @@ -3542,7 +3484,7 @@ fn monomorphized_ints_names_dont_conflict() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn monomorphized_ints_aliased() { assert_evals_to!( indoc!( @@ -3569,18 +3511,18 @@ fn monomorphized_ints_aliased() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn to_float_f32() { assert_evals_to!( indoc!( - r#" + r" n : U8 n = 100 f : F32 f = Num.toFrac n f - "# + " ), 100., f32 @@ -3588,18 +3530,18 @@ fn to_float_f32() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn to_float_f64() { assert_evals_to!( indoc!( - r#" + r" n : U8 n = 100 f : F64 f = Num.toFrac n f - "# + " ), 100., f64 @@ -3612,9 +3554,9 @@ fn to_float_f64() { fn upcast_of_int_is_zext() { assert_evals_to!( indoc!( - r#" + r" Num.toU16 0b1000_0000u8 - "# + " ), 128, u16 @@ -3627,11 +3569,11 @@ fn upcast_of_int_is_zext() { fn upcast_of_int_checked_is_zext() { assert_evals_to!( indoc!( - r#" + r" when Num.toU16Checked 0b1000_0000u8 is Ok 128u16 -> 1u8 _ -> 0u8 - "# + " ), 1, u8 @@ -3639,13 +3581,13 @@ fn upcast_of_int_checked_is_zext() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn modulo_of_unsigned() { assert_evals_to!( indoc!( - r#" + r" 0b1111_1111u8 % 64 - "# + " ), 63, u8 @@ -3653,13 +3595,13 @@ fn modulo_of_unsigned() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn div_of_unsigned() { assert_evals_to!( indoc!( - r#" + r" 0b1111_1111u8 // 2 - "# + " ), 127, u8 @@ -3667,13 +3609,13 @@ fn div_of_unsigned() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn dec_float_suffix() { assert_evals_to!( indoc!( - r#" + r" 123.0dec - "# + " ), RocDec::from_str_to_i128_unsafe("123.0"), i128 @@ -3681,13 +3623,13 @@ fn dec_float_suffix() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn dec_no_decimal() { assert_evals_to!( indoc!( - r#" + r" 3dec - "# + " ), RocDec::from_str_to_i128_unsafe("3.0"), i128 @@ -3695,15 +3637,15 @@ fn dec_no_decimal() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn ceiling_to_u32() { assert_evals_to!( indoc!( - r#" + r" n : U32 n = Num.ceiling 124.5f64 n - "# + " ), 125, u32 @@ -3711,15 +3653,15 @@ fn ceiling_to_u32() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn floor_to_u32() { assert_evals_to!( indoc!( - r#" + r" n : U32 n = Num.floor 124.5f64 n - "# + " ), 124, u32 @@ -3727,15 +3669,15 @@ fn floor_to_u32() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn round_to_u32() { assert_evals_to!( indoc!( - r#" + r" n : U32 n = Num.round 124.49f64 n - "# + " ), 124, u32 @@ -3743,13 +3685,13 @@ fn round_to_u32() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn promote_u64_number_layout() { assert_evals_to!( indoc!( - r#" + r" 9999999999999999999 + 1 - "# + " ), 10000000000000000000, u64 @@ -3757,16 +3699,16 @@ fn promote_u64_number_layout() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn promote_i128_number_layout() { assert_evals_to!( indoc!( - r#" + r" { a: 18446744073709551616 + 1, b: -9223372036854775809 + 1, } - "# + " ), (18446744073709551617, -9223372036854775808), (i128, i128) @@ -3774,13 +3716,13 @@ fn promote_i128_number_layout() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn promote_u128_number_layout() { assert_evals_to!( indoc!( - r#" + r" 170141183460469231731687303715884105728 + 1 - "# + " ), 170141183460469231731687303715884105729, u128 @@ -3788,17 +3730,17 @@ fn promote_u128_number_layout() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn when_on_decimals() { assert_evals_to!( indoc!( - r#" + r" when 42.42dec is 42.42 -> 42 0.05 -> 1 3.14 -> 2 _ -> 4 - "# + " ), 42, i64 @@ -3806,12 +3748,12 @@ fn when_on_decimals() { assert_evals_to!( indoc!( - r#" + r" when 42.42dec is 0.05 -> 1 3.14 -> 2 _ -> 4 - "# + " ), 4, i64 @@ -3823,13 +3765,13 @@ fn when_on_decimals() { fn when_on_i128() { assert_evals_to!( indoc!( - r#" + r" when 1701411834604692317316873037158841057i128 is 1701411834604692317316873037158841057 -> 42 32 -> 1 64 -> 2 _ -> 4 - "# + " ), 42, i64 @@ -3837,17 +3779,17 @@ fn when_on_i128() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn when_on_u128() { assert_evals_to!( indoc!( - r#" + r" when 170141183460469231731687303715884105728u128 is 170141183460469231731687303715884105728u128 -> 42 32 -> 1 64 -> 2 _ -> 4 - "# + " ), 42, i64 @@ -3855,14 +3797,14 @@ fn when_on_u128() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn condition_polymorphic_num_becomes_float() { assert_evals_to!( indoc!( - r#" + r" x = if Bool.true then 2 else 3 x * 5f32 - "# + " ), 10., f32 @@ -3872,83 +3814,83 @@ fn condition_polymorphic_num_becomes_float() { #[test] #[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn num_count_leading_zero_bits() { - assert_evals_to!(r#"Num.countLeadingZeroBits 0b0010_1000u8"#, 2, u8); - assert_evals_to!(r#"Num.countLeadingZeroBits 0b0010_1000u16"#, 10, u8); - assert_evals_to!(r#"Num.countLeadingZeroBits 0b0010_1000u32"#, 26, u8); - assert_evals_to!(r#"Num.countLeadingZeroBits 0b0010_1000u64"#, 58, u8); + assert_evals_to!(r"Num.countLeadingZeroBits 0b0010_1000u8", 2, u8); + assert_evals_to!(r"Num.countLeadingZeroBits 0b0010_1000u16", 10, u8); + assert_evals_to!(r"Num.countLeadingZeroBits 0b0010_1000u32", 26, u8); + assert_evals_to!(r"Num.countLeadingZeroBits 0b0010_1000u64", 58, u8); } #[test] #[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn num_count_trailing_zero_bits() { - assert_evals_to!(r#"Num.countTrailingZeroBits 0b0010_1000u8"#, 3, u8); - assert_evals_to!(r#"Num.countTrailingZeroBits 0b0010_0000u16"#, 5, u8); - assert_evals_to!(r#"Num.countTrailingZeroBits 0u32"#, 32, u8); - assert_evals_to!(r#"Num.countTrailingZeroBits 0b0010_1111u64"#, 0, u8); + assert_evals_to!(r"Num.countTrailingZeroBits 0b0010_1000u8", 3, u8); + assert_evals_to!(r"Num.countTrailingZeroBits 0b0010_0000u16", 5, u8); + assert_evals_to!(r"Num.countTrailingZeroBits 0u32", 32, u8); + assert_evals_to!(r"Num.countTrailingZeroBits 0b0010_1111u64", 0, u8); } #[test] #[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn num_count_one_bits() { - assert_evals_to!(r#"Num.countOneBits 0b0010_1000u8"#, 2, u8); - assert_evals_to!(r#"Num.countOneBits 0b0010_0000u16"#, 1, u8); - assert_evals_to!(r#"Num.countOneBits 0u32"#, 0, u8); - assert_evals_to!(r#"Num.countOneBits 0b0010_1111u64"#, 5, u8); + assert_evals_to!(r"Num.countOneBits 0b0010_1000u8", 2, u8); + assert_evals_to!(r"Num.countOneBits 0b0010_0000u16", 1, u8); + assert_evals_to!(r"Num.countOneBits 0u32", 0, u8); + assert_evals_to!(r"Num.countOneBits 0b0010_1111u64", 5, u8); } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn num_abs_diff_int() { - assert_evals_to!(r#"Num.absDiff 0u8 0u8"#, 0, u8); - assert_evals_to!(r#"Num.absDiff 1u8 2u8"#, 1, u8); - assert_evals_to!(r#"Num.absDiff 2u8 1u8"#, 1, u8); - assert_evals_to!(r#"Num.absDiff -1 1"#, 2, i64); - assert_evals_to!(r#"Num.absDiff 1 -1"#, 2, i64); - assert_evals_to!(r#"Num.absDiff Num.minI64 -1"#, i64::MAX, i64); + assert_evals_to!(r"Num.absDiff 0u8 0u8", 0, u8); + assert_evals_to!(r"Num.absDiff 1u8 2u8", 1, u8); + assert_evals_to!(r"Num.absDiff 2u8 1u8", 1, u8); + assert_evals_to!(r"Num.absDiff -1 1", 2, i64); + assert_evals_to!(r"Num.absDiff 1 -1", 2, i64); + assert_evals_to!(r"Num.absDiff Num.minI64 -1", i64::MAX, i64); } #[test] #[cfg(feature = "gen-llvm")] fn num_abs_diff_large_bits() { - assert_evals_to!(r#"Num.absDiff 0u128 0u128"#, 0, u128); - assert_evals_to!(r#"Num.absDiff 1u128 2u128"#, 1, u128); - assert_evals_to!(r#"Num.absDiff -1i128 1i128"#, 2, i128); - assert_evals_to!(r#"Num.absDiff Num.minI128 -1i128"#, i128::MAX, i128); + assert_evals_to!(r"Num.absDiff 0u128 0u128", 0, u128); + assert_evals_to!(r"Num.absDiff 1u128 2u128", 1, u128); + assert_evals_to!(r"Num.absDiff -1i128 1i128", 2, i128); + assert_evals_to!(r"Num.absDiff Num.minI128 -1i128", i128::MAX, i128); } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn num_abs_diff_float() { - assert_evals_to!(r#"Num.absDiff 0.0f64 0.0"#, 0.0, f64); - assert_evals_to!(r#"Num.absDiff 1.0f64 2.0"#, 1.0, f64); - assert_evals_to!(r#"Num.absDiff 2.0f64 1.0"#, 1.0, f64); - assert_evals_to!(r#"Num.absDiff -1.0f64 1.0"#, 2.0, f64); - assert_evals_to!(r#"Num.absDiff 1.0f64 -1.0"#, 2.0, f64); + assert_evals_to!(r"Num.absDiff 0.0f64 0.0", 0.0, f64); + assert_evals_to!(r"Num.absDiff 1.0f64 2.0", 1.0, f64); + assert_evals_to!(r"Num.absDiff 2.0f64 1.0", 1.0, f64); + assert_evals_to!(r"Num.absDiff -1.0f64 1.0", 2.0, f64); + assert_evals_to!(r"Num.absDiff 1.0f64 -1.0", 2.0, f64); } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] #[should_panic(expected = r#"Roc failed with message: "Integer subtraction overflowed!"#)] fn num_abs_max_overflow() { - assert_evals_to!(r#"Num.absDiff Num.maxI64 -1"#, 0, i64); + assert_evals_to!(r"Num.absDiff Num.maxI64 -1", 0, i64); } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] #[should_panic(expected = r#"Roc failed with message: "Integer subtraction overflowed!"#)] fn num_abs_int_min_overflow() { - assert_evals_to!(r#"Num.absDiff Num.minI64 0"#, 0, i64); + assert_evals_to!(r"Num.absDiff Num.minI64 0", 0, i64); } #[test] #[cfg(feature = "gen-llvm")] #[should_panic(expected = r#"Roc failed with message: "Integer subtraction overflowed!"#)] fn num_abs_large_bits_min_overflow() { - assert_evals_to!(r#"Num.absDiff Num.minI128 0"#, 0, i128); + assert_evals_to!(r"Num.absDiff Num.minI128 0", 0, i128); } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn num_abs_float_overflow() { assert_evals_to!("Num.absDiff Num.maxF64 Num.minF64", f64::INFINITY, f64); } @@ -3982,9 +3924,9 @@ fn bool_in_switch() { fn add_checked_dec() { assert_evals_to!( indoc!( - r#" + r" Num.addChecked 2.0dec 4.0dec - "# + " ), RocResult::ok(RocDec::from(6)), RocResult @@ -3996,9 +3938,9 @@ fn add_checked_dec() { fn sub_checked_dec() { assert_evals_to!( indoc!( - r#" + r" Num.subChecked 5.0dec 2.0dec - "# + " ), RocResult::ok(RocDec::from(3)), RocResult @@ -4010,9 +3952,9 @@ fn sub_checked_dec() { fn mul_checked_dec() { assert_evals_to!( indoc!( - r#" + r" Num.mulChecked 5.0dec 2.0dec - "# + " ), RocResult::ok(RocDec::from_str("10.0").unwrap()), RocResult @@ -4024,12 +3966,12 @@ fn mul_checked_dec() { fn mul_checked_u128() { assert_evals_to!( indoc!( - r#" + r" x : Result U128 [ Overflow ] x = Num.mulChecked 5u128 2u128 x - "# + " ), RocResult::ok(5u128 * 2u128), RocResult @@ -4041,12 +3983,12 @@ fn mul_checked_u128() { fn sub_checked_u128() { assert_evals_to!( indoc!( - r#" + r" x : Result U128 [ Overflow ] x = Num.subChecked 5u128 2u128 x - "# + " ), RocResult::ok(5u128 - 2u128), RocResult @@ -4058,12 +4000,12 @@ fn sub_checked_u128() { fn add_checked_u128() { assert_evals_to!( indoc!( - r#" + r" x : Result U128 [ Overflow ] x = Num.addChecked 5u128 2u128 x - "# + " ), RocResult::ok(5u128 + 2u128), RocResult @@ -4073,23 +4015,23 @@ fn add_checked_u128() { #[test] #[cfg(any(feature = "gen-llvm", feature = "gen-dev", feature = "gen-wasm"))] fn num_min() { - assert_evals_to!(r#"Num.min 0 0"#, 0, i64); - assert_evals_to!(r#"Num.min 1 2"#, 1, i64); - assert_evals_to!(r#"Num.min 2 1"#, 1, i64); - assert_evals_to!(r#"Num.min 2 -2"#, -2, i64); - assert_evals_to!(r#"Num.min -2 2"#, -2, i64); - assert_evals_to!(r#"Num.min Num.minI64 Num.maxI64"#, i64::MIN, i64); - assert_evals_to!(r#"Num.min Num.maxI64 Num.minI64"#, i64::MIN, i64); + assert_evals_to!(r"Num.min 0 0", 0, i64); + assert_evals_to!(r"Num.min 1 2", 1, i64); + assert_evals_to!(r"Num.min 2 1", 1, i64); + assert_evals_to!(r"Num.min 2 -2", -2, i64); + assert_evals_to!(r"Num.min -2 2", -2, i64); + assert_evals_to!(r"Num.min Num.minI64 Num.maxI64", i64::MIN, i64); + assert_evals_to!(r"Num.min Num.maxI64 Num.minI64", i64::MIN, i64); } #[test] #[cfg(any(feature = "gen-llvm", feature = "gen-dev", feature = "gen-wasm"))] fn num_max() { - assert_evals_to!(r#"Num.max 0 0"#, 0, i64); - assert_evals_to!(r#"Num.max 1 2"#, 2, i64); - assert_evals_to!(r#"Num.max 2 1"#, 2, i64); - assert_evals_to!(r#"Num.max 2 -2"#, 2, i64); - assert_evals_to!(r#"Num.max -2 2"#, 2, i64); - assert_evals_to!(r#"Num.max Num.minI64 Num.maxI64"#, i64::MAX, i64); - assert_evals_to!(r#"Num.max Num.maxI64 Num.minI64"#, i64::MAX, i64); + assert_evals_to!(r"Num.max 0 0", 0, i64); + assert_evals_to!(r"Num.max 1 2", 2, i64); + assert_evals_to!(r"Num.max 2 1", 2, i64); + assert_evals_to!(r"Num.max 2 -2", 2, i64); + assert_evals_to!(r"Num.max -2 2", 2, i64); + assert_evals_to!(r"Num.max Num.minI64 Num.maxI64", i64::MAX, i64); + assert_evals_to!(r"Num.max Num.maxI64 Num.minI64", i64::MAX, i64); } diff --git a/crates/compiler/test_gen/src/gen_primitives.rs b/crates/compiler/test_gen/src/gen_primitives.rs index 4509a2a60c8..18d8b8f55aa 100644 --- a/crates/compiler/test_gen/src/gen_primitives.rs +++ b/crates/compiler/test_gen/src/gen_primitives.rs @@ -28,11 +28,11 @@ fn basic_float() { fn branch_first_float() { assert_evals_to!( indoc!( - r#" + r" when 1.23f64 is 1.23 -> 12 _ -> 34 - "# + " ), 12, i64 @@ -44,11 +44,11 @@ fn branch_first_float() { fn branch_second_float() { assert_evals_to!( indoc!( - r#" + r" when 2.34 is 1.23 -> 63 _ -> 48 - "# + " ), 48, i64 @@ -60,12 +60,12 @@ fn branch_second_float() { fn branch_third_float() { assert_evals_to!( indoc!( - r#" + r" when 10.0 is 1.0 -> 63 2.0 -> 48 _ -> 112 - "# + " ), 112, i64 @@ -77,11 +77,11 @@ fn branch_third_float() { fn branch_first_int() { assert_evals_to!( indoc!( - r#" + r" when 1 is 1 -> 12 _ -> 34 - "# + " ), 12, i64 @@ -93,11 +93,11 @@ fn branch_first_int() { fn branch_second_int() { assert_evals_to!( indoc!( - r#" + r" when 2 is 1 -> 63 _ -> 48 - "# + " ), 48, i64 @@ -109,12 +109,12 @@ fn branch_second_int() { fn branch_third_int() { assert_evals_to!( indoc!( - r#" + r" when 10 is 1 -> 63 2 -> 48 _ -> 112 - "# + " ), 112, i64 @@ -126,11 +126,11 @@ fn branch_third_int() { fn branch_store_variable() { assert_evals_to!( indoc!( - r#" + r" when 0 is 1 -> 12 a -> a - "# + " ), 0, i64 @@ -142,13 +142,13 @@ fn branch_store_variable() { fn when_one_element_tag() { assert_evals_to!( indoc!( - r#" + r" x : [Pair (Int a) (Int a)] x = Pair 0x2 0x3 when x is Pair l r -> l + r - "# + " ), 5, i64 @@ -160,14 +160,14 @@ fn when_one_element_tag() { fn when_two_element_tag_first() { assert_evals_to!( indoc!( - r#" + r" x : [A (Int a), B (Int a)] x = A 0x2 when x is A v -> v B v -> v - "# + " ), 2, i64 @@ -179,14 +179,14 @@ fn when_two_element_tag_first() { fn when_two_element_tag_second() { assert_evals_to!( indoc!( - r#" + r" x : [A (Int a), B (Int a)] x = B 0x3 when x is A v -> v B v -> v - "# + " ), 3, i64 @@ -198,10 +198,10 @@ fn when_two_element_tag_second() { fn gen_when_one_branch() { assert_evals_to!( indoc!( - r#" + r" when 1.23 is _ -> 23 - "# + " ), 23, i64 @@ -213,7 +213,7 @@ fn gen_when_one_branch() { fn gen_large_when_int() { assert_evals_to!( indoc!( - r#" + r" foo = \num -> when num is 0 -> 200 @@ -224,7 +224,7 @@ fn gen_large_when_int() { _ -> 1000 foo -3 - "# + " ), 111, i64 @@ -236,7 +236,7 @@ fn gen_large_when_int() { fn gen_large_when_float() { assert_evals_to!( indoc!( - r#" + r" foo = \num -> when num is 0.5f64 -> 200.1 @@ -247,7 +247,7 @@ fn gen_large_when_float() { _ -> 1000.6f64 foo -3.6 - "# + " ), 111.2, f64 @@ -259,11 +259,11 @@ fn gen_large_when_float() { fn or_pattern() { assert_evals_to!( indoc!( - r#" + r" when 2 is 1 | 2 -> 42 _ -> 1 - "# + " ), 42, i64 @@ -275,11 +275,11 @@ fn or_pattern() { fn apply_identity() { assert_evals_to!( indoc!( - r#" + r" identity = \a -> a identity 5 - "# + " ), 5, i64 @@ -291,12 +291,12 @@ fn apply_identity() { fn apply_unnamed_identity() { assert_evals_to!( indoc!( - r#" + r" wrapper = \{} -> (\a -> a) 5 wrapper {} - "# + " ), 5, i64 @@ -308,7 +308,7 @@ fn apply_unnamed_identity() { fn return_unnamed_fn() { assert_evals_to!( indoc!( - r#" + r" wrapper = \{} -> alwaysFloatIdentity : Int * -> (Frac a -> Frac a) alwaysFloatIdentity = \_ -> @@ -317,7 +317,7 @@ fn return_unnamed_fn() { (alwaysFloatIdentity 2) 1.23f64 wrapper {} - "# + " ), 1.23, f64 @@ -329,7 +329,7 @@ fn return_unnamed_fn() { fn gen_when_fn() { assert_evals_to!( indoc!( - r#" + r" limitedNegate = \num -> when num is 1 -> -1 @@ -337,7 +337,7 @@ fn gen_when_fn() { _ -> num limitedNegate 1 - "# + " ), -1, i64 @@ -349,11 +349,11 @@ fn gen_when_fn() { fn gen_basic_def() { assert_evals_to!( indoc!( - r#" + r" answer = 42 answer - "# + " ), 42, i64 @@ -361,11 +361,11 @@ fn gen_basic_def() { assert_evals_to!( indoc!( - r#" + r" float = 1.23f64 float - "# + " ), 1.23, f64 @@ -377,13 +377,13 @@ fn gen_basic_def() { fn gen_multiple_defs() { assert_evals_to!( indoc!( - r#" + r" answer = 42 float = 1.23f64 if float > 3 then answer else answer - "# + " ), 42, i64 @@ -391,13 +391,13 @@ fn gen_multiple_defs() { assert_evals_to!( indoc!( - r#" + r" answer = 42 float = 1.23f64 if answer > 3 then float else float - "# + " ), 1.23, f64 @@ -411,7 +411,7 @@ fn gen_multiple_defs() { // fn gen_chained_defs() { // assert_evals_to!( // indoc!( -// r#" +// r" // x = i1 // i3 = i2 // i1 = 1337 @@ -419,7 +419,7 @@ fn gen_multiple_defs() { // y = 12.4 // // i3 -// "# +// " // ), // 1337, // i64 @@ -431,7 +431,7 @@ fn gen_multiple_defs() { // fn gen_nested_defs_old() { // assert_evals_to!( // indoc!( -// r#" +// r" // x = 5 // // answer = @@ -461,7 +461,7 @@ fn gen_multiple_defs() { // y = 12.4 // // answer -// "# +// " // ), // 1337, // i64 @@ -473,7 +473,7 @@ fn gen_multiple_defs() { // fn let_x_in_x() { // assert_evals_to!( // indoc!( -// r#" +// r" // x = 5 // // answer = @@ -484,7 +484,7 @@ fn gen_multiple_defs() { // nested // // answer -// "# +// " // ), // 1337, // i64 @@ -496,7 +496,7 @@ fn gen_multiple_defs() { fn factorial() { assert_evals_to!( indoc!( - r#" + r" factorial = \n, accum -> when n is 0 -> @@ -506,7 +506,7 @@ fn factorial() { factorial (n - 1) (n * accum) factorial 10 1 - "# + " ), 3628800, i64 @@ -518,7 +518,7 @@ fn factorial() { fn peano1() { assert_evals_to!( indoc!( - r#" + r" Peano : [S Peano, Z] three : Peano @@ -527,7 +527,7 @@ fn peano1() { when three is Z -> 2 S _ -> 1 - "# + " ), 1, i64 @@ -539,7 +539,7 @@ fn peano1() { fn peano2() { assert_evals_to!( indoc!( - r#" + r" Peano : [S Peano, Z] three : Peano @@ -549,7 +549,7 @@ fn peano2() { S (S _) -> 1 S (_) -> 0 Z -> 0 - "# + " ), 1, i64 @@ -833,7 +833,7 @@ fn linked_list_map() { fn when_nested_maybe() { assert_evals_to!( indoc!( - r#" + r" Maybe a : [Nothing, Just a] x : Maybe (Maybe (Int a)) @@ -842,7 +842,7 @@ fn when_nested_maybe() { when x is Just (Just v) -> v + 0x1 _ -> 0x1 - "# + " ), 42, i64 @@ -850,7 +850,7 @@ fn when_nested_maybe() { assert_evals_to!( indoc!( - r#" + r" Maybe a : [Nothing, Just a] x : Maybe (Maybe (Int *)) @@ -860,7 +860,7 @@ fn when_nested_maybe() { Just (Just v) -> v + 0x1 Just Nothing -> 0x2 Nothing -> 0x1 - "# + " ), 2, i64 @@ -868,7 +868,7 @@ fn when_nested_maybe() { assert_evals_to!( indoc!( - r#" + r" Maybe a : [Nothing, Just a] x : Maybe (Maybe (Int *)) @@ -878,7 +878,7 @@ fn when_nested_maybe() { Just (Just v) -> v + 0x1 Just Nothing -> 0x2 Nothing -> 0x1 - "# + " ), 1, i64 @@ -890,7 +890,7 @@ fn when_nested_maybe() { fn when_peano() { assert_evals_to!( indoc!( - r#" + r" Peano : [S Peano, Z] three : Peano @@ -900,7 +900,7 @@ fn when_peano() { S (S _) -> 1 S (_) -> 2 Z -> 3 - "# + " ), 1, i64 @@ -908,7 +908,7 @@ fn when_peano() { assert_evals_to!( indoc!( - r#" + r" Peano : [S Peano, Z] three : Peano @@ -918,7 +918,7 @@ fn when_peano() { S (S _) -> 1 S (_) -> 2 Z -> 3 - "# + " ), 2, i64 @@ -926,7 +926,7 @@ fn when_peano() { assert_evals_to!( indoc!( - r#" + r" Peano : [S Peano, Z] three : Peano @@ -936,7 +936,7 @@ fn when_peano() { S (S _) -> 1 S (_) -> 2 Z -> 3 - "# + " ), 3, i64 @@ -955,7 +955,7 @@ fn when_peano() { fn overflow_frees_list() { assert_evals_to!( indoc!( - r#" + r" myList = [1,2,3] # integer overflow; must use the list so it is defined before the overflow @@ -967,7 +967,7 @@ fn overflow_frees_list() { index = Num.intCast n List.get myList index - "# + " ), (3, 0), (i64, i8) @@ -980,12 +980,12 @@ fn overflow_frees_list() { fn undefined_variable() { assert_evals_to!( indoc!( - r#" + r" if Bool.true then x + z else y + z - "# + " ), 3, i64 @@ -1016,12 +1016,12 @@ fn a_crash() { fn annotation_without_body() { assert_evals_to!( indoc!( - r#" + r" foo : Int * foo - "# + " ), 3, i64 @@ -2022,11 +2022,11 @@ fn hof_conditional() { // exposed issue with the if condition being just a symbol assert_evals_to!( indoc!( - r#" + r" passTrue = \f -> f Bool.true passTrue (\trueVal -> if trueVal then Bool.false else Bool.true) - "# + " ), 0, u8 @@ -2041,12 +2041,12 @@ fn hof_conditional() { fn pattern_shadowing() { assert_evals_to!( indoc!( - r#" + r" x = 4 when 4 is x -> x - "# + " ), 0, i64 @@ -2060,11 +2060,11 @@ fn pattern_shadowing() { fn unsupported_pattern_str_interp() { assert_evals_to!( indoc!( - r#" + r" { x: 4 } = { x : 4 } x - "# + " ), 0, i64 @@ -2120,14 +2120,14 @@ fn case_or_pattern() { // it is currently duplicated assert_evals_to!( indoc!( - r#" + r" x : [Red, Green, Blue] x = Red when x is Red | Green -> 0 Blue -> 1 - "# + " ), 0, i64 @@ -2517,11 +2517,11 @@ fn backpassing_result() { fn function_malformed_pattern() { assert_evals_to!( indoc!( - r#" + r" x = 3 (\x -> x) 42 - "# + " ), 3, i64 @@ -2534,12 +2534,12 @@ fn function_malformed_pattern() { fn call_invalid_layout() { assert_evals_to!( indoc!( - r#" + r" f : I64 -> I64 f = \x -> x f {} - "# + " ), 3, i64, @@ -3197,7 +3197,7 @@ fn recursively_build_effect() { hi = "Hello" name = "World" - "\(hi), \(name)!" + "$(hi), $(name)!" main = when nestHelp 4 is @@ -3261,12 +3261,12 @@ fn polymophic_expression_captured_inside_closure() { fn issue_2322() { assert_evals_to!( indoc!( - r#" + r" double = \x -> x * 2 doubleBind = \x -> (\_ -> double x) doubleThree = doubleBind 3 doubleThree {} - "# + " ), 6, i64 @@ -3312,14 +3312,14 @@ fn box_and_unbox_big_string() { fn box_and_unbox_nonrecursive_tag() { assert_evals_to!( indoc!( - r#" + r" result : Result U64 U64 result = Ok 42 result |> Box.box |> Box.unbox - "# + " ), roc_std::RocResult::ok(42), roc_std::RocResult @@ -3409,9 +3409,9 @@ fn box_and_unbox_f32() { fn box_and_unbox_record_2_u64() { assert_evals_to!( indoc!( - r#" + r" Box.unbox (Box.box { a: 15u64, b: 27u64 }) - "# + " ), (15, 27), (u64, u64) @@ -3423,9 +3423,9 @@ fn box_and_unbox_record_2_u64() { fn box_and_unbox_record_3_u64() { assert_evals_to!( indoc!( - r#" + r" Box.unbox (Box.box { a: 15u64, b: 27u64, c: 34u64 }) - "# + " ), (15, 27, 34), (u64, u64, u64) @@ -3437,9 +3437,9 @@ fn box_and_unbox_record_3_u64() { fn box_and_unbox_record_2_u8() { assert_evals_to!( indoc!( - r#" + r" Box.unbox (Box.box { a: 15u8, b: 27u8 }) - "# + " ), (15, 27), (u8, u8) @@ -3451,9 +3451,9 @@ fn box_and_unbox_record_2_u8() { fn box_and_unbox_record_3_u8() { assert_evals_to!( indoc!( - r#" + r" Box.unbox (Box.box { a: 15u8, b: 27u8, c: 34u8 }) - "# + " ), (15, 27, 34), (u8, u8, u8) @@ -3465,12 +3465,12 @@ fn box_and_unbox_record_3_u8() { fn box_and_unbox_tag_union() { assert_evals_to!( indoc!( - r#" + r" v : [A U8, B U8] # usually stack allocated v = B 27u8 Box.unbox (Box.box v) - "# + " ), (27, 1), (u8, u8) @@ -3534,7 +3534,7 @@ fn issue_2894() { fn polymorphic_def_used_in_closure() { assert_evals_to!( indoc!( - r#" + r" a : I64 -> _ a = \g -> f = { r: g, h: 32 } @@ -3543,7 +3543,7 @@ fn polymorphic_def_used_in_closure() { h1 = (\{} -> f.h) {} h1 a 1 - "# + " ), 32, u64 @@ -3555,13 +3555,13 @@ fn polymorphic_def_used_in_closure() { fn polymorphic_lambda_set_usage() { assert_evals_to!( indoc!( - r#" + r" id1 = \x -> x id2 = \y -> y id = if Bool.true then id1 else id2 id 9u8 - "# + " ), 9, u8 @@ -3573,7 +3573,7 @@ fn polymorphic_lambda_set_usage() { fn polymorphic_lambda_set_multiple_specializations() { assert_evals_to!( indoc!( - r#" + r" id1 = \x -> x id2 = \y -> y id = \z -> @@ -3581,7 +3581,7 @@ fn polymorphic_lambda_set_multiple_specializations() { f z (id 9u8) + Num.toU8 (id 16u16) - "# + " ), 25, u8 @@ -3642,14 +3642,14 @@ fn mutual_recursion_top_level_defs() { fn polymorphic_lambda_captures_polymorphic_value() { assert_evals_to!( indoc!( - r#" + r" x = 2 f1 = \_ -> x f = if Bool.true then f1 else f1 f {} - "# + " ), 2, u64 @@ -3661,7 +3661,7 @@ fn polymorphic_lambda_captures_polymorphic_value() { fn lambda_capture_niche_u64_vs_u8_capture() { assert_evals_to!( indoc!( - r#" + r" capture : _ -> ({} -> Str) capture = \val -> \{} -> @@ -3677,7 +3677,7 @@ fn lambda_capture_niche_u64_vs_u8_capture() { capture 18u8 fun {} - "# + " ), RocStr::from("123"), RocStr @@ -3789,14 +3789,14 @@ fn lambda_capture_niches_have_captured_function_in_closure() { fn recursive_call_capturing_function() { assert_evals_to!( indoc!( - r#" + r" a = \b -> c = \d -> if d == 7 then d else c (d + b) c 1 a 6 - "# + " ), 7, i64 @@ -3808,13 +3808,13 @@ fn recursive_call_capturing_function() { fn shared_pattern_variable_in_when_branches() { assert_evals_to!( indoc!( - r#" + r" f = \t -> when t is A x | B x -> x {a: f (A 15u8), b: (B 31u8)} - "# + " ), (15u8, 31u8), (u8, u8) @@ -3826,12 +3826,12 @@ fn shared_pattern_variable_in_when_branches() { fn symbol_not_bound_in_all_patterns_runs_when_no_bound_symbol_used() { assert_evals_to!( indoc!( - r#" + r" f = \t -> when t is A x | B y -> 31u8 {a: f (A 15u8), b: f (B 15u8)} - "# + " ), (31u8, 31u8), (u8, u8), @@ -3845,10 +3845,10 @@ fn symbol_not_bound_in_all_patterns_runs_when_no_bound_symbol_used() { fn symbol_not_bound_in_all_patterns_runs_when_bound_pattern_reached() { assert_evals_to!( indoc!( - r#" + r" when A 15u8 is A x | B y -> x - "# + " ), 15u8, u8, @@ -3865,10 +3865,10 @@ fn symbol_not_bound_in_all_patterns_runs_when_bound_pattern_reached() { fn runtime_error_when_degenerate_pattern_reached() { assert_evals_to!( indoc!( - r#" + r" when B 15u8 is A x | B y -> x + 5u8 - "# + " ), 15u8, u8, @@ -3953,8 +3953,8 @@ fn compose_recursive_lambda_set_productive_toplevel() { compose = \f, g -> \x -> g (f x) identity = \x -> x - exclaim = \s -> "\(s)!" - whisper = \s -> "(\(s))" + exclaim = \s -> "$(s)!" + whisper = \s -> "($(s))" main = res: Str -> Str @@ -3976,8 +3976,8 @@ fn compose_recursive_lambda_set_productive_nested() { compose = \f, g -> \x -> g (f x) identity = \x -> x - exclaim = \s -> "\(s)!" - whisper = \s -> "(\(s))" + exclaim = \s -> "$(s)!" + whisper = \s -> "($(s))" res: Str -> Str res = List.walk [ exclaim, whisper ] identity compose @@ -3998,8 +3998,8 @@ fn compose_recursive_lambda_set_productive_inferred() { compose = \f, g -> \x -> g (f x) identity = \x -> x - exclaim = \s -> "\(s)!" - whisper = \s -> "(\(s))" + exclaim = \s -> "$(s)!" + whisper = \s -> "($(s))" res = List.walk [ exclaim, whisper ] identity compose res "hello" @@ -4024,8 +4024,8 @@ fn compose_recursive_lambda_set_productive_nullable_wrapped() { else \x -> f (g x) identity = \x -> x - exclame = \s -> "\(s)!" - whisper = \s -> "(\(s))" + exclame = \s -> "$(s)!" + whisper = \s -> "($(s))" main = res: Str -> Str @@ -4399,7 +4399,7 @@ fn pattern_as_of_symbol() { fn function_specialization_information_in_lambda_set_thunk() { assert_evals_to!( indoc!( - r###" + r#" app "test" provides [main] to "./platform" andThen = \{} -> @@ -4409,7 +4409,7 @@ fn function_specialization_information_in_lambda_set_thunk() { between = andThen {} main = between \{} -> between \{} -> 10u8 - "### + "# ), 30, u8 @@ -4421,7 +4421,7 @@ fn function_specialization_information_in_lambda_set_thunk() { fn function_specialization_information_in_lambda_set_thunk_independent_defs() { assert_evals_to!( indoc!( - r###" + r#" app "test" provides [main] to "./platform" andThen = \{} -> @@ -4433,7 +4433,7 @@ fn function_specialization_information_in_lambda_set_thunk_independent_defs() { between2 = andThen {} main = between1 \{} -> between2 \{} -> 10u8 - "### + "# ), 30, u8 @@ -4526,7 +4526,7 @@ fn layout_cache_structure_with_multiple_recursive_structures() { fn reset_recursive_type_wraps_in_named_type() { assert_evals_to!( indoc!( - r###" + r#" app "test" provides [main] to "./platform" main : Str @@ -4552,8 +4552,8 @@ fn reset_recursive_type_wraps_in_named_type() { Cons x xs -> strX = f x strXs = printLinkedList xs f - "Cons \(strX) (\(strXs))" - "### + "Cons $(strX) ($(strXs))" + "# ), RocStr::from("Cons 2 (Cons 3 (Cons 4 (Nil)))"), RocStr @@ -4619,12 +4619,12 @@ fn many_arguments() { // exhausts all argument registers on x86 and aarch assert_evals_to!( indoc!( - r#" + r" fun = \a,b,c,d, e,f,g,h, i -> (a + b + c + d) + (e + f + g + h) + i fun 0i64 1 2 3 4 5 6 7 8 - "# + " ), 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8, i64 @@ -4636,9 +4636,9 @@ fn many_arguments() { fn multiple_uses_of_bool_true_record() { assert_evals_to!( indoc!( - r#" + r" (Bool.true, Bool.true).0 - "# + " ), true, bool @@ -4650,14 +4650,14 @@ fn multiple_uses_of_bool_true_record() { fn multiple_uses_of_bool_true_tag_union() { assert_evals_to!( indoc!( - r#" + r" x : [ One Bool Bool, Empty ] x = One Bool.true Bool.true when x is One a _ -> a Empty -> Bool.false - "# + " ), true, bool diff --git a/crates/compiler/test_gen/src/gen_records.rs b/crates/compiler/test_gen/src/gen_records.rs index 0851f493b3e..8454c091bcd 100644 --- a/crates/compiler/test_gen/src/gen_records.rs +++ b/crates/compiler/test_gen/src/gen_records.rs @@ -18,9 +18,9 @@ use roc_std::{RocList, RocStr}; fn basic_record() { assert_evals_to!( indoc!( - r#" + r" { y: 17, x: 15, z: 19 }.x - "# + " ), 15, i64 @@ -28,9 +28,9 @@ fn basic_record() { assert_evals_to!( indoc!( - r#" + r" { x: 15, y: 17, z: 19 }.y - "# + " ), 17, i64 @@ -38,9 +38,9 @@ fn basic_record() { assert_evals_to!( indoc!( - r#" + r" { x: 15, y: 17, z: 19 }.z - "# + " ), 19, i64 @@ -52,11 +52,11 @@ fn basic_record() { fn f64_record() { assert_evals_to!( indoc!( - r#" + r" rec = { y: 17.2f64, x: 15.1f64, z: 19.3f64 } rec.x - "# + " ), 15.1, f64 @@ -64,11 +64,11 @@ fn f64_record() { assert_evals_to!( indoc!( - r#" + r" rec = { y: 17.2f64, x: 15.1f64, z: 19.3f64 } rec.y - "# + " ), 17.2, f64 @@ -76,11 +76,11 @@ fn f64_record() { assert_evals_to!( indoc!( - r#" + r" rec = { y: 17.2f64, x: 15.1f64, z: 19.3f64 } rec.z - "# + " ), 19.3, f64 @@ -93,14 +93,14 @@ fn pass_bool_record() { // found a bug there the register to use was not incremented correctly assert_evals_to!( indoc!( - r#" + r" true : Bool true = Bool.true f = \_, x -> x f { x: true, y: true } 23 - "# + " ), 23, i64 @@ -124,11 +124,11 @@ fn fn_record() { assert_evals_to!( indoc!( - r#" + r" rec = { x: 15, y: 17, z: 19 } rec.z + rec.x - "# + " ), 34, i64 @@ -140,11 +140,11 @@ fn fn_record() { fn def_record() { assert_evals_to!( indoc!( - r#" + r" rec = { y: 17, x: 15, z: 19 } rec.x - "# + " ), 15, i64 @@ -152,11 +152,11 @@ fn def_record() { assert_evals_to!( indoc!( - r#" + r" rec = { x: 15, y: 17, z: 19 } rec.y - "# + " ), 17, i64 @@ -164,11 +164,11 @@ fn def_record() { assert_evals_to!( indoc!( - r#" + r" rec = { x: 15, y: 17, z: 19 } rec.z - "# + " ), 19, i64 @@ -180,10 +180,10 @@ fn def_record() { fn when_on_record() { assert_evals_to!( indoc!( - r#" + r" when { x: 0x2 } is { x } -> x + 3 - "# + " ), 5, i64 @@ -195,10 +195,10 @@ fn when_on_record() { fn when_record_with_guard_pattern() { assert_evals_to!( indoc!( - r#" + r" when { x: 0x2, y: 1.23 } is { x: var } -> var + 3 - "# + " ), 5, i64 @@ -210,11 +210,11 @@ fn when_record_with_guard_pattern() { fn let_with_record_pattern() { assert_evals_to!( indoc!( - r#" + r" { x } = { x: 0x2, y: 1.23 } x - "# + " ), 2, i64 @@ -226,11 +226,11 @@ fn let_with_record_pattern() { fn record_guard_pattern() { assert_evals_to!( indoc!( - r#" + r" when { x: 0x2, y: 1.23 } is { x: 0x4 } -> 5 { x } -> x + 3 - "# + " ), 5, i64 @@ -242,11 +242,11 @@ fn record_guard_pattern() { fn twice_record_access() { assert_evals_to!( indoc!( - r#" + r" x = {a: 0x2, b: 0x3 } x.a + x.b - "# + " ), 5, i64 @@ -257,11 +257,11 @@ fn twice_record_access() { fn empty_record() { assert_evals_to!( indoc!( - r#" + r" v = {} v - "# + " ), (), () @@ -272,9 +272,9 @@ fn empty_record() { fn i64_record2_literal() { assert_evals_to!( indoc!( - r#" + r" { x: 3, y: 5 } - "# + " ), (3, 5), (i64, i64) @@ -286,9 +286,9 @@ fn i64_record2_literal() { // fn i64_record3_literal() { // assert_evals_to!( // indoc!( -// r#" +// r" // { x: 3, y: 5, z: 17 } -// "# +// " // ), // (3, 5, 17), // (i64, i64, i64) @@ -299,9 +299,9 @@ fn i64_record2_literal() { fn f64_record2_literal() { assert_evals_to!( indoc!( - r#" + r" { x: 3.1f64, y: 5.1f64 } - "# + " ), (3.1, 5.1), (f64, f64) @@ -313,9 +313,9 @@ fn f64_record2_literal() { // fn f64_record3_literal() { // assert_evals_to!( // indoc!( -// r#" +// r" // { x: 3.1, y: 5.1, z: 17.1 } -// "# +// " // ), // (3.1, 5.1, 17.1), // (f64, f64, f64) @@ -327,12 +327,12 @@ fn f64_record2_literal() { // fn bool_record4_literal() { // assert_evals_to!( // indoc!( -// r#" +// r" // record : { a : Bool, b : Bool, c : Bool, d : Bool } // record = { a: Bool.true, b: Bool.true, c : Bool.true, d : Bool } // record -// "# +// " // ), // (true, false, false, true), // (bool, bool, bool, bool) @@ -343,9 +343,9 @@ fn f64_record2_literal() { fn i64_record1_literal() { assert_evals_to!( indoc!( - r#" + r" { a: 3 } - "# + " ), 3, i64 @@ -357,9 +357,9 @@ fn i64_record1_literal() { // fn i64_record9_literal() { // assert_evals_to!( // indoc!( -// r#" +// r" // { a: 3, b: 5, c: 17, d: 1, e: 9, f: 12, g: 13, h: 14, i: 15 } -// "# +// " // ), // (3, 5, 17, 1, 9, 12, 13, 14, 15), // (i64, i64, i64, i64, i64, i64, i64, i64, i64) @@ -371,9 +371,9 @@ fn i64_record1_literal() { // fn f64_record3_literal() { // assert_evals_to!( // indoc!( -// r#" +// r" // { x: 3.1, y: 5.1, z: 17.1 } -// "# +// " // ), // (3.1, 5.1, 17.1), // (f64, f64, f64) @@ -384,12 +384,12 @@ fn i64_record1_literal() { fn bool_literal() { assert_evals_to!( indoc!( - r#" + r" x : Bool x = Bool.true x - "# + " ), true, bool @@ -401,12 +401,12 @@ fn bool_literal() { fn return_record() { assert_evals_to!( indoc!( - r#" + r" x = 4 y = 3 { x, y } - "# + " ), (4, 3), (i64, i64) @@ -446,7 +446,7 @@ fn optional_field_when_use_default() { fn optional_field_when_use_default_nested() { assert_evals_to!( indoc!( - r#" + r" f = \r -> when r is { x: Blue, y ? 3 } -> y @@ -458,7 +458,7 @@ fn optional_field_when_use_default_nested() { d = f { x: Red } a * b * c * d - "# + " ), 3 * 5 * 7 * 11, i64 @@ -491,13 +491,13 @@ fn optional_field_destructure_module() { fn optional_field_destructure_expr() { assert_evals_to!( indoc!( - r#" + r" fn = \r -> { x ? 10, y } = r x + y fn { x: 4, y: 9 } - "# + " ), 13, i64 @@ -551,13 +551,13 @@ fn optional_field_let_no_use_default() { fn optional_field_let_no_use_default_nested() { assert_evals_to!( indoc!( - r#" + r" f = \r -> { x ? 10, y } = r x + y f { y: 9, x: 4 } - "# + " ), 13, i64 @@ -569,12 +569,12 @@ fn optional_field_let_no_use_default_nested() { fn optional_field_function_use_default() { assert_evals_to!( indoc!( - r#" + r" f = \{ x ? 10, y } -> x + y f { y: 9 } - "# + " ), 19, i64 @@ -605,12 +605,12 @@ fn optional_field_function_no_use_default() { fn optional_field_function_no_use_default_nested() { assert_evals_to!( indoc!( - r#" + r" f = \{ x ? 10, y } -> x + y f { x: 4, y: 9 } - "# + " ), 13, i64 @@ -622,10 +622,10 @@ fn optional_field_function_no_use_default_nested() { fn optional_field_singleton_record() { assert_evals_to!( indoc!( - r#" + r" when { x : 4 } is { x ? 3 } -> x - "# + " ), 4, i64 @@ -637,10 +637,10 @@ fn optional_field_singleton_record() { fn optional_field_empty_record() { assert_evals_to!( indoc!( - r#" + r" when { } is { x ? 3 } -> x - "# + " ), 3, i64 @@ -652,9 +652,9 @@ fn optional_field_empty_record() { fn return_record_2() { assert_evals_to!( indoc!( - r#" + r" { x: 3, y: 5 } - "# + " ), [3, 5], [i64; 2] @@ -666,9 +666,9 @@ fn return_record_2() { fn return_record_3() { assert_evals_to!( indoc!( - r#" + r" { x: 3, y: 5, z: 4 } - "# + " ), (3, 5, 4), (i64, i64, i64) @@ -680,9 +680,9 @@ fn return_record_3() { fn return_record_4() { assert_evals_to!( indoc!( - r#" + r" { a: 3, b: 5, c: 4, d: 2 } - "# + " ), [3, 5, 4, 2], [i64; 4] @@ -694,9 +694,9 @@ fn return_record_4() { fn return_record_5() { assert_evals_to!( indoc!( - r#" + r" { a: 3, b: 5, c: 4, d: 2, e: 1 } - "# + " ), [3, 5, 4, 2, 1], [i64; 5] @@ -708,9 +708,9 @@ fn return_record_5() { fn return_record_6() { assert_evals_to!( indoc!( - r#" + r" { a: 3, b: 5, c: 4, d: 2, e: 1, f: 7 } - "# + " ), [3, 5, 4, 2, 1, 7], [i64; 6] @@ -722,9 +722,9 @@ fn return_record_6() { fn return_record_7() { assert_evals_to!( indoc!( - r#" + r" { a: 3, b: 5, c: 4, d: 2, e: 1, f: 7, g: 8 } - "# + " ), [3, 5, 4, 2, 1, 7, 8], [i64; 7] @@ -736,9 +736,9 @@ fn return_record_7() { fn return_record_float_int() { assert_evals_to!( indoc!( - r#" + r" { a: 1.23f64, b: 0x1 } - "# + " ), (1.23, 0x1), (f64, i64) @@ -750,9 +750,9 @@ fn return_record_float_int() { fn return_record_int_float() { assert_evals_to!( indoc!( - r#" + r" { a: 0x1, b: 1.23f64 } - "# + " ), (0x1, 1.23), (i64, f64) @@ -764,9 +764,9 @@ fn return_record_int_float() { fn return_record_float_float() { assert_evals_to!( indoc!( - r#" + r" { a: 2.46f64, b: 1.23f64 } - "# + " ), (2.46, 1.23), (f64, f64) @@ -778,9 +778,9 @@ fn return_record_float_float() { fn return_record_float_float_float() { assert_evals_to!( indoc!( - r#" + r" { a: 2.46f64, b: 1.23f64, c: 0.1f64 } - "# + " ), (2.46, 1.23, 0.1), (f64, f64, f64) @@ -792,9 +792,9 @@ fn return_record_float_float_float() { fn return_nested_record() { assert_evals_to!( indoc!( - r#" + r" { flag: 0x0, payload: { a: 2.46f64, b: 1.23f64, c: 0.1f64 } } - "# + " ), (0x0, (2.46, 1.23, 0.1)), (i64, (f64, f64, f64)) @@ -806,13 +806,13 @@ fn return_nested_record() { fn nested_record_load() { assert_evals_to!( indoc!( - r#" + r" x = { a : { b : 0x5 } } y = x.a y.b - "# + " ), 5, i64 @@ -844,9 +844,9 @@ fn accessor_multi_element_record() { fn accessor_single_element_record() { assert_evals_to!( indoc!( - r#" + r" .foo { foo: 4 } - "# + " ), 4, i64 @@ -858,11 +858,11 @@ fn accessor_single_element_record() { fn update_record() { assert_evals_to!( indoc!( - r#" + r" rec = { foo: 42, bar: 2.46f64 } { rec & foo: rec.foo + 1 } - "# + " ), (2.46, 43), (f64, i64) @@ -874,11 +874,11 @@ fn update_record() { fn update_single_element_record() { assert_evals_to!( indoc!( - r#" + r" rec = { foo: 42} { rec & foo: rec.foo + 1 } - "# + " ), 43, i64 @@ -927,14 +927,14 @@ fn alignment_in_record() { fn blue_and_present() { assert_evals_to!( indoc!( - r#" + r" f = \r -> when r is { x: Blue, y ? 3 } -> y { x: Red, y ? 5 } -> y f { x: Blue, y: 7 } - "# + " ), 7, i64 @@ -946,14 +946,14 @@ fn blue_and_present() { fn blue_and_absent() { assert_evals_to!( indoc!( - r#" + r" f = \r -> when r is { x: Blue, y ? 3 } -> y { x: Red, y ? 5 } -> y f { x: Blue } - "# + " ), 3, i64 @@ -965,7 +965,7 @@ fn blue_and_absent() { fn update_the_only_field() { assert_evals_to!( indoc!( - r#" + r" Model : { foo : I64 } model : Model @@ -977,7 +977,7 @@ fn update_the_only_field() { newModel = { model & foo } newModel.foo - "# + " ), 4, i64 @@ -990,7 +990,7 @@ fn update_the_only_field() { fn both_have_unique_fields() { assert_evals_to!( indoc!( - r#" + r" a = { x: 42, y: 43 } b = { x: 42, z: 44 } @@ -998,7 +998,7 @@ fn both_have_unique_fields() { f = \{ x: x1}, { x: x2 } -> x1 + x2 f a b - "# + " ), 84, i64 diff --git a/crates/compiler/test_gen/src/gen_result.rs b/crates/compiler/test_gen/src/gen_result.rs index 99f4f3ff098..703d9fcd184 100644 --- a/crates/compiler/test_gen/src/gen_result.rs +++ b/crates/compiler/test_gen/src/gen_result.rs @@ -17,12 +17,12 @@ use roc_std::{RocResult, RocStr}; fn with_default_ok() { assert_evals_to!( indoc!( - r#" + r" result : Result I64 {} result = Ok 12345 Result.withDefault result 0 - "# + " ), 12345, i64 @@ -34,12 +34,12 @@ fn with_default_ok() { fn with_default_err() { assert_evals_to!( indoc!( - r#" + r" result : Result I64 {} result = Err {} Result.withDefault result 0 - "# + " ), 0, i64 @@ -51,14 +51,14 @@ fn with_default_err() { fn result_map() { assert_evals_to!( indoc!( - r#" + r" result : Result I64 {} result = Ok 2 result |> Result.map (\x -> x + 1) |> Result.withDefault 0 - "# + " ), 3, i64 @@ -66,14 +66,14 @@ fn result_map() { assert_evals_to!( indoc!( - r#" + r" result : Result I64 {} result = Err {} result |> Result.map (\x -> x + 1) |> Result.withDefault 0 - "# + " ), 0, i64 @@ -85,14 +85,14 @@ fn result_map() { fn result_map_err() { assert_evals_to!( indoc!( - r#" + r" result : Result {} I64 result = Err 2 when Result.mapErr result (\x -> x + 1) is Err n -> n Ok _ -> 0 - "# + " ), 3, i64 @@ -100,14 +100,14 @@ fn result_map_err() { assert_evals_to!( indoc!( - r#" + r" result : Result {} I64 result = Ok {} when Result.mapErr result (\x -> x + 1) is Err n -> n Ok _ -> 0 - "# + " ), 0, i64 @@ -119,10 +119,10 @@ fn result_map_err() { fn err_type_var() { assert_evals_to!( indoc!( - r#" + r" Result.map (Ok 3) (\x -> x + 1) |> Result.withDefault -1 - "# + " ), 4, i64 @@ -134,13 +134,13 @@ fn err_type_var() { fn err_type_var_annotation() { assert_evals_to!( indoc!( - r#" + r" ok : Result I64 * ok = Ok 3 Result.map ok (\x -> x + 1) |> Result.withDefault -1 - "# + " ), 4, i64 @@ -152,13 +152,13 @@ fn err_type_var_annotation() { fn err_empty_tag_union() { assert_evals_to!( indoc!( - r#" + r" ok : Result I64 [] ok = Ok 3 Result.map ok (\x -> x + 1) |> Result.withDefault -1 - "# + " ), 4, i64 @@ -170,12 +170,12 @@ fn err_empty_tag_union() { fn is_ok() { assert_evals_to!( indoc!( - r#" + r" result : Result I64 {} result = Ok 2 Result.isOk result - "# + " ), true, bool @@ -183,12 +183,12 @@ fn is_ok() { assert_evals_to!( indoc!( - r#" + r" result : Result I64 {} result = Err {} Result.isOk result - "# + " ), false, bool @@ -200,12 +200,12 @@ fn is_ok() { fn is_err() { assert_evals_to!( indoc!( - r#" + r" result : Result I64 {} result = Ok 2 Result.isErr result - "# + " ), false, bool @@ -213,12 +213,12 @@ fn is_err() { assert_evals_to!( indoc!( - r#" + r" result : Result I64 {} result = Err {} Result.isErr result - "# + " ), true, bool @@ -230,12 +230,12 @@ fn is_err() { fn roc_result_ok_i64() { assert_evals_to!( indoc!( - r#" + r" result : Result I64 {} result = Ok 42 result - "# + " ), RocResult::ok(42), RocResult @@ -250,12 +250,12 @@ fn roc_result_ok_f64() { assert_evals_to!( indoc!( - r#" + r" result : Result F64 {} result = Ok 42.0 result - "# + " ), RocResult::ok(42.0), RocResult diff --git a/crates/compiler/test_gen/src/gen_set.rs b/crates/compiler/test_gen/src/gen_set.rs index 75201c38a40..1e26b3bda16 100644 --- a/crates/compiler/test_gen/src/gen_set.rs +++ b/crates/compiler/test_gen/src/gen_set.rs @@ -20,9 +20,9 @@ use roc_std::RocList; fn empty_len() { assert_evals_to!( indoc!( - r#" + r" Set.len (Set.empty {}) - "# + " ), 0, usize @@ -34,9 +34,9 @@ fn empty_len() { fn single_len() { assert_evals_to!( indoc!( - r#" + r" Set.len (Set.single 42) - "# + " ), 1, usize @@ -48,9 +48,9 @@ fn single_len() { fn single_to_list() { assert_evals_to!( indoc!( - r#" + r" Set.toList (Set.single 42) - "# + " ), RocList::from_slice(&[42]), RocList @@ -58,9 +58,9 @@ fn single_to_list() { assert_evals_to!( indoc!( - r#" + r" Set.toList (Set.single 1) - "# + " ), RocList::from_slice(&[1]), RocList @@ -72,13 +72,13 @@ fn single_to_list() { fn insert() { assert_evals_to!( indoc!( - r#" + r" Set.empty {} |> Set.insert 0 |> Set.insert 1 |> Set.insert 2 |> Set.toList - "# + " ), RocList::from_slice(&[0, 1, 2]), RocList @@ -90,14 +90,14 @@ fn insert() { fn remove() { assert_evals_to!( indoc!( - r#" + r" Set.empty {} |> Set.insert 0 |> Set.insert 1 |> Set.remove 1 |> Set.remove 2 |> Set.toList - "# + " ), RocList::from_slice(&[0]), RocList @@ -109,7 +109,7 @@ fn remove() { fn union() { assert_evals_to!( indoc!( - r#" + r" set1 : Set.Set I64 set1 = Set.fromList [1,2] @@ -118,7 +118,7 @@ fn union() { Set.union set1 set2 |> Set.toList - "# + " ), RocList::from_slice(&[1, 3, 4, 2]), RocList @@ -130,7 +130,7 @@ fn union() { fn difference() { assert_evals_to!( indoc!( - r#" + r" set1 : Set.Set I64 set1 = Set.fromList [1,2] @@ -139,7 +139,7 @@ fn difference() { Set.difference set1 set2 |> Set.toList - "# + " ), RocList::from_slice(&[2]), RocList @@ -151,7 +151,7 @@ fn difference() { fn intersection() { assert_evals_to!( indoc!( - r#" + r" set1 : Set.Set I64 set1 = Set.fromList [1,2] @@ -160,7 +160,7 @@ fn intersection() { Set.intersection set1 set2 |> Set.toList - "# + " ), RocList::from_slice(&[1]), RocList @@ -172,9 +172,9 @@ fn intersection() { fn walk_sum() { assert_evals_to!( indoc!( - r#" + r" Set.walk (Set.fromList [1,2,3]) 0 (\x, y -> x + y) - "# + " ), 6, i64 @@ -186,9 +186,9 @@ fn walk_sum() { fn contains() { assert_evals_to!( indoc!( - r#" + r" Set.contains (Set.fromList [1,3,4]) 4 - "# + " ), true, bool @@ -196,9 +196,9 @@ fn contains() { assert_evals_to!( indoc!( - r#" + r" Set.contains (Set.fromList [1,3,4]) 2 - "# + " ), false, bool @@ -210,11 +210,11 @@ fn contains() { fn from_list() { assert_evals_to!( indoc!( - r#" + r" [1,2,2,3,1,4] |> Set.fromList |> Set.toList - "# + " ), RocList::from_slice(&[1, 2, 3, 4]), RocList @@ -222,14 +222,14 @@ fn from_list() { assert_evals_to!( indoc!( - r#" + r" empty : List I64 empty = [] empty |> Set.fromList |> Set.toList - "# + " ), RocList::::default(), RocList @@ -242,11 +242,11 @@ fn from_list() { fn from_list_void() { assert_evals_to!( indoc!( - r#" + r" [] |> Set.fromList |> Set.toList - "# + " ), RocList::::default(), RocList @@ -258,9 +258,9 @@ fn from_list_void() { fn to_list_empty() { assert_evals_to!( indoc!( - r#" + r" Set.toList (Set.empty {}) - "# + " ), RocList::::default(), RocList diff --git a/crates/compiler/test_gen/src/gen_str.rs b/crates/compiler/test_gen/src/gen_str.rs index 77ce175adbc..030fdd0776c 100644 --- a/crates/compiler/test_gen/src/gen_str.rs +++ b/crates/compiler/test_gen/src/gen_str.rs @@ -67,7 +67,7 @@ fn str_split_empty_delimiter() { r#" when List.first (Str.split "JJJ" "") is Ok str -> - Str.countGraphemes str + Str.countUtf8Bytes str _ -> 1729 @@ -97,7 +97,7 @@ fn str_split_bigger_delimiter_small_str() { r#" when List.first (Str.split "JJJ" "JJJJ there") is Ok str -> - Str.countGraphemes str + Str.countUtf8Bytes str _ -> 1729 @@ -528,21 +528,6 @@ fn str_starts_with() { assert_evals_to!(r#"Str.startsWith "" "hello world""#, false, bool); } -#[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-dev"))] -fn str_starts_with_scalar() { - assert_evals_to!( - &format!(r#"Str.startsWithScalar "foobar" {}"#, 'f' as u32), - true, - bool - ); - assert_evals_to!( - &format!(r#"Str.startsWithScalar "zoobar" {}"#, 'f' as u32), - false, - bool - ); -} - #[test] #[cfg(any(feature = "gen-llvm", feature = "gen-dev"))] fn str_ends_with() { @@ -551,28 +536,6 @@ fn str_ends_with() { assert_evals_to!(r#"Str.endsWith "" "hello world""#, false, bool); } -#[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-dev"))] -fn str_count_graphemes_small_str() { - assert_evals_to!(r#"Str.countGraphemes "å🤔""#, 2, usize); -} - -#[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-dev"))] -fn str_count_graphemes_three_js() { - assert_evals_to!(r#"Str.countGraphemes "JJJ""#, 3, usize); -} - -#[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-dev"))] -fn str_count_graphemes_big_str() { - assert_evals_to!( - r#"Str.countGraphemes "6🤔å🤔e¥🤔çppkd🙃1jdal🦯asdfa∆ltråø˚waia8918.,🏅jjc""#, - 45, - usize - ); -} - #[test] #[cfg(any(feature = "gen-llvm", feature = "gen-dev"))] fn str_starts_with_same_big_str() { @@ -1625,103 +1588,6 @@ fn issue_2811() { ); } -#[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-dev"))] -fn to_scalar_1_byte() { - assert_evals_to!( - indoc!( - r#" - Str.toScalars "R" - "# - ), - RocList::from_slice(&[82u32]), - RocList - ); - - assert_evals_to!( - indoc!( - r#" - Str.toScalars "Roc!" - "# - ), - RocList::from_slice(&[82u32, 111, 99, 33]), - RocList - ); -} - -#[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-dev"))] -fn to_scalar_2_byte() { - assert_evals_to!( - indoc!( - r#" - Str.toScalars "é" - "# - ), - RocList::from_slice(&[233u32]), - RocList - ); - - assert_evals_to!( - indoc!( - r#" - Str.toScalars "Cäfés" - "# - ), - RocList::from_slice(&[67u32, 228, 102, 233, 115]), - RocList - ); -} - -#[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-dev"))] -fn to_scalar_3_byte() { - assert_evals_to!( - indoc!( - r#" - Str.toScalars "鹏" - "# - ), - RocList::from_slice(&[40527u32]), - RocList - ); - - assert_evals_to!( - indoc!( - r#" - Str.toScalars "鹏很有趣" - "# - ), - RocList::from_slice(&[40527u32, 24456, 26377, 36259]), - RocList - ); -} - -#[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-dev"))] -fn to_scalar_4_byte() { - // from https://design215.com/toolbox/utf8-4byte-characters.php - assert_evals_to!( - indoc!( - r#" - Str.toScalars "𒀀" - "# - ), - RocList::from_slice(&[73728u32]), - RocList - ); - - assert_evals_to!( - indoc!( - r#" - Str.toScalars "𒀀𒀁" - "# - ), - RocList::from_slice(&[73728u32, 73729u32]), - RocList - ); -} - #[test] #[cfg(any(feature = "gen-llvm", feature = "gen-dev"))] fn str_split_first_one_char() { @@ -1875,11 +1741,11 @@ fn str_walk_utf8() { assert_evals_to!( indoc!( r#" - Str.walkUtf8WithIndex "abcd" [] (\list, byte, index -> List.append list (Pair index byte)) + Str.walkUtf8 "abcd" [] (\list, byte -> List.prepend list byte) "# ), - RocList::from_slice(&[(0, 'a'), (1, 'b'), (2, 'c'), (3, 'd')]), - RocList<(u32, char)> + RocList::from_slice(&[b'd', b'c', b'b', b'a']), + RocList ); } @@ -1909,34 +1775,6 @@ fn str_walk_utf8_with_index() { ); } -#[test] -#[cfg(feature = "gen-llvm")] -fn str_append_scalar() { - assert_evals_to!( - indoc!( - r#" - Str.appendScalar "abcd" 'A' - "# - ), - RocStr::from("abcdA"), - RocStr - ); -} - -#[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-dev"))] -fn str_walk_scalars() { - assert_evals_to!( - indoc!( - r#" - Str.walkScalars "abcd" [] List.append - "# - ), - RocList::from_slice(&['a', 'b', 'c', 'd']), - RocList - ); -} - #[test] #[cfg(feature = "gen-llvm-wasm")] fn llvm_wasm_str_layout() { diff --git a/crates/compiler/test_gen/src/gen_tags.rs b/crates/compiler/test_gen/src/gen_tags.rs index 3a67b9db441..2e32ebe8c82 100644 --- a/crates/compiler/test_gen/src/gen_tags.rs +++ b/crates/compiler/test_gen/src/gen_tags.rs @@ -39,14 +39,14 @@ fn width_and_alignment_u8_u8() { fn applied_tag_nothing() { assert_evals_to!( indoc!( - r#" + r" Maybe a : [Just a, Nothing] x : Maybe I64 x = Nothing x - "# + " ), 1, (i64, u8), @@ -59,14 +59,14 @@ fn applied_tag_nothing() { fn applied_tag_just() { assert_evals_to!( indoc!( - r#" + r" Maybe a : [Just a, Nothing] y : Maybe I64 y = Just 0x4 y - "# + " ), (0x4, 0), (i64, u8) @@ -78,7 +78,7 @@ fn applied_tag_just() { fn applied_tag_just_enum() { assert_evals_to!( indoc!( - r#" + r" Fruit : [Orange, Apple, Banana] Maybe a : [Just a, Nothing] @@ -89,7 +89,7 @@ fn applied_tag_just_enum() { y = Just orange y - "# + " ), (2, 0), (u8, u8) @@ -101,12 +101,12 @@ fn applied_tag_just_enum() { fn true_is_true() { assert_evals_to!( indoc!( - r#" + r" bool : Bool bool = Bool.true bool - "# + " ), true, bool @@ -118,12 +118,12 @@ fn true_is_true() { fn false_is_false() { assert_evals_to!( indoc!( - r#" + r" bool : Bool bool = Bool.false bool - "# + " ), false, bool @@ -135,7 +135,7 @@ fn false_is_false() { fn basic_enum() { assert_evals_to!( indoc!( - r#" + r" Fruit : [Apple, Orange, Banana] apple : Fruit @@ -145,7 +145,7 @@ fn basic_enum() { orange = Orange apple == orange - "# + " ), false, bool @@ -157,7 +157,7 @@ fn basic_enum() { fn even_odd() { assert_evals_to!( indoc!( - r#" + r" even = \n -> when n is 0 -> Bool.true @@ -171,7 +171,7 @@ fn even_odd() { _ -> even (n - 1) odd 5 && even 42 - "# + " ), true, bool @@ -183,9 +183,9 @@ fn even_odd() { fn gen_literal_true() { assert_evals_to!( indoc!( - r#" + r" if Bool.true then -1 else 1 - "# + " ), -1, i64 @@ -197,9 +197,9 @@ fn gen_literal_true() { fn gen_if_float() { assert_evals_to!( indoc!( - r#" + r" if Bool.true then -1.0 else 1.0f64 - "# + " ), -1.0, f64 @@ -210,14 +210,14 @@ fn gen_if_float() { fn when_on_nothing() { assert_evals_to!( indoc!( - r#" + r" x : [Nothing, Just I64] x = Nothing when x is Nothing -> 0x2 Just _ -> 0x1 - "# + " ), 2, i64 @@ -229,14 +229,14 @@ fn when_on_nothing() { fn when_on_just() { assert_evals_to!( indoc!( - r#" + r" x : [Nothing, Just I64] x = Just 41 when x is Just v -> v + 0x1 Nothing -> 0x1 - "# + " ), 42, i64 @@ -248,14 +248,14 @@ fn when_on_just() { fn when_on_result() { assert_evals_to!( indoc!( - r#" + r" x : Result I64 I64 x = Err 41 when x is Err v -> v + 1 Ok _ -> 1 - "# + " ), 42, i64 @@ -267,7 +267,7 @@ fn when_on_result() { fn when_on_these() { assert_evals_to!( indoc!( - r#" + r" These a b : [This a, That b, These a b] x : These I64 I64 @@ -277,7 +277,7 @@ fn when_on_these() { These a b -> a + b That v -> v This v -> v - "# + " ), 5, i64 @@ -290,11 +290,11 @@ fn match_on_two_values() { // this will produce a Chain internally assert_evals_to!( indoc!( - r#" + r" when Pair 2 3 is Pair 4 3 -> 9 Pair a b -> a + b - "# + " ), 5, i64 @@ -306,12 +306,12 @@ fn match_on_two_values() { fn pair_with_underscore() { assert_evals_to!( indoc!( - r#" + r" when Pair 2 3 is Pair 4 _ -> 1 Pair 3 _ -> 2 Pair a b -> a + b - "# + " ), 5, i64 @@ -324,7 +324,7 @@ fn result_with_underscore() { // This test revealed an issue with hashing Test values assert_evals_to!( indoc!( - r#" + r" x : Result I64 I64 x = Ok 2 @@ -332,7 +332,7 @@ fn result_with_underscore() { Ok 3 -> 1 Ok _ -> 2 Err _ -> 3 - "# + " ), 2, i64 @@ -369,7 +369,7 @@ fn maybe_is_just_not_nested() { fn maybe_is_just_nested() { assert_evals_to!( indoc!( - r#" + r" Maybe a : [Just a, Nothing] isJust : Maybe a -> Bool @@ -379,7 +379,7 @@ fn maybe_is_just_nested() { Just _ -> Bool.true isJust (Just 42) - "# + " ), true, bool @@ -391,7 +391,7 @@ fn maybe_is_just_nested() { fn nested_pattern_match() { assert_evals_to!( indoc!( - r#" + r" Maybe a : [Nothing, Just a] x : Maybe (Maybe I64) @@ -400,7 +400,7 @@ fn nested_pattern_match() { when x is Just (Just v) -> v + 0x1 _ -> 0x1 - "# + " ), 42, i64 @@ -428,11 +428,11 @@ fn if_guard_vanilla() { fn when_on_single_value_tag() { assert_evals_to!( indoc!( - r#" + r" when Identity 0 is Identity 0 -> 6 Identity s -> s - "# + " ), 6, i64 @@ -444,7 +444,7 @@ fn when_on_single_value_tag() { fn if_guard_multiple() { assert_evals_to!( indoc!( - r#" + r" f = \n -> when Identity n 0 is Identity x _ if x == 0 -> x + 0 @@ -453,7 +453,7 @@ fn if_guard_multiple() { Identity x _ -> x - x { a: f 0, b: f 1, c: f 2, d: f 4 } - "# + " ), [0, 1, 2, 0], [i64; 4] @@ -465,13 +465,13 @@ fn if_guard_multiple() { fn if_guard_constructor_switch() { assert_evals_to!( indoc!( - r#" + r" when Identity 32 0 is Identity 41 _ -> 0 Identity s 0 if s == 32 -> 3 # Identity s 0 -> s Identity z _ -> z - "# + " ), 3, i64 @@ -509,12 +509,12 @@ fn if_guard_constructor_switch() { fn if_guard_constructor_chain() { assert_evals_to!( indoc!( - r#" + r" when Identity 43 0 is Identity 42 _ if 3 == 3 -> 43 # Identity 42 _ -> 1 Identity z _ -> z - "# + " ), 43, i64 @@ -526,14 +526,14 @@ fn if_guard_constructor_chain() { fn if_guard_pattern_false() { assert_evals_to!( indoc!( - r#" + r" wrapper = \{} -> when 2 is 2 if Bool.false -> 0 _ -> 42 wrapper {} - "# + " ), 42, i64 @@ -545,14 +545,14 @@ fn if_guard_pattern_false() { fn if_guard_switch() { assert_evals_to!( indoc!( - r#" + r" wrapper = \{} -> when 2 is 2 | 3 if Bool.false -> 0 _ -> 42 wrapper {} - "# + " ), 42, i64 @@ -564,14 +564,14 @@ fn if_guard_switch() { fn if_guard_pattern_true() { assert_evals_to!( indoc!( - r#" + r" wrapper = \{} -> when 2 is 2 if Bool.true -> 42 _ -> 0 wrapper {} - "# + " ), 42, i64 @@ -583,14 +583,14 @@ fn if_guard_pattern_true() { fn if_guard_exhaustiveness() { assert_evals_to!( indoc!( - r#" + r" wrapper = \{} -> when 2 is _ if Bool.false -> 0 _ -> 42 wrapper {} - "# + " ), 42, i64 @@ -602,7 +602,7 @@ fn if_guard_exhaustiveness() { fn when_on_enum() { assert_evals_to!( indoc!( - r#" + r" Fruit : [Apple, Orange, Banana] apple : Fruit @@ -612,7 +612,7 @@ fn when_on_enum() { Apple -> 1 Banana -> 2 Orange -> 3 - "# + " ), 1, i64 @@ -624,14 +624,14 @@ fn when_on_enum() { fn pattern_matching_unit() { assert_evals_to!( indoc!( - r#" + r" Unit : [Unit] f : Unit -> I64 f = \Unit -> 42 f Unit - "# + " ), 42, i64 @@ -639,7 +639,7 @@ fn pattern_matching_unit() { assert_evals_to!( indoc!( - r#" + r" Unit : [Unit] x : Unit @@ -647,7 +647,7 @@ fn pattern_matching_unit() { when x is Unit -> 42 - "# + " ), 42, i64 @@ -655,12 +655,12 @@ fn pattern_matching_unit() { assert_evals_to!( indoc!( - r#" + r" f : {} -> I64 f = \{} -> 42 f {} - "# + " ), 42, i64 @@ -668,10 +668,10 @@ fn pattern_matching_unit() { assert_evals_to!( indoc!( - r#" + r" when {} is {} -> 42 - "# + " ), 42, i64 @@ -683,12 +683,12 @@ fn pattern_matching_unit() { fn one_element_tag() { assert_evals_to!( indoc!( - r#" + r" x : [Pair I64] x = Pair 2 x - "# + " ), 2, i64 @@ -721,14 +721,14 @@ fn nested_tag_union() { fn unit_type() { assert_evals_to!( indoc!( - r#" + r" Unit : [Unit] v : Unit v = Unit v - "# + " ), (), () @@ -740,12 +740,12 @@ fn unit_type() { fn join_point_if() { assert_evals_to!( indoc!( - r#" + r" x = if Bool.true then 1 else 2 x - "# + " ), 1, i64 @@ -757,7 +757,7 @@ fn join_point_if() { fn join_point_when() { assert_evals_to!( indoc!( - r#" + r" wrapper = \{} -> x : [Red, White, Blue] x = Blue @@ -771,7 +771,7 @@ fn join_point_when() { y wrapper {} - "# + " ), 3.1, f64 @@ -783,7 +783,7 @@ fn join_point_when() { fn join_point_with_cond_expr() { assert_evals_to!( indoc!( - r#" + r" wrapper = \{} -> y = when 1 + 2 is @@ -794,7 +794,7 @@ fn join_point_with_cond_expr() { y wrapper {} - "# + " ), 3, i64 @@ -802,7 +802,7 @@ fn join_point_with_cond_expr() { assert_evals_to!( indoc!( - r#" + r" y = if 1 + 2 > 0 then 3 @@ -810,7 +810,7 @@ fn join_point_with_cond_expr() { 0 y - "# + " ), 3, i64 @@ -1135,12 +1135,12 @@ fn applied_tag_function_pair() { fn tag_must_be_its_own_type() { assert_evals_to!( indoc!( - r#" + r" z : [A, B, C] z = Z z - "# + " ), 1, i64 @@ -1171,12 +1171,12 @@ fn recursive_tag_union_into_flat_tag_union() { fn monomorphized_tag() { assert_evals_to!( indoc!( - r#" + r" b = \{} -> Bar f : [Foo, Bar], [Bar, Baz] -> U8 f = \_, _ -> 18 f (b {}) (b {}) - "# + " ), 18, u8 @@ -1391,7 +1391,7 @@ fn issue_2445() { fn issue_2458() { assert_evals_to!( indoc!( - r#" + r" Foo a : [Blah (Bar a), Nothing {}] Bar a : Foo a @@ -1401,7 +1401,7 @@ fn issue_2458() { when v is Blah (Blah (Nothing {})) -> 15 _ -> 25 - "# + " ), 15, u8 @@ -1471,11 +1471,11 @@ fn issue_1162() { fn polymorphic_tag() { assert_evals_to!( indoc!( - r#" + r" x : [Y U8] x = Y 3 x - "# + " ), 3, // Y is a newtype, it gets unwrapped u8 @@ -1487,11 +1487,11 @@ fn polymorphic_tag() { fn issue_2725_alias_polymorphic_lambda() { assert_evals_to!( indoc!( - r#" + r" wrap = \value -> Tag value wrapIt = wrap wrapIt 42 - "# + " ), 42, // Tag is a newtype, it gets unwrapped i64 @@ -1717,7 +1717,7 @@ fn instantiate_annotated_as_recursive_alias_multiple_polymorphic_expr() { fn issue_3560_nested_tag_constructor_is_newtype() { assert_evals_to!( indoc!( - r#" + r" f : _ -> u8 f = \t -> when t is @@ -1725,7 +1725,7 @@ fn issue_3560_nested_tag_constructor_is_newtype() { Wrapper (AlternatePayload it) -> it {a: f (Wrapper (Payload 15u8)), b: f(Wrapper (AlternatePayload 31u8))} - "# + " ), (15, 31), (u8, u8) @@ -1737,7 +1737,7 @@ fn issue_3560_nested_tag_constructor_is_newtype() { fn issue_3560_nested_tag_constructor_is_record_newtype() { assert_evals_to!( indoc!( - r#" + r" f : _ -> u8 f = \t -> when t is @@ -1745,7 +1745,7 @@ fn issue_3560_nested_tag_constructor_is_record_newtype() { {wrapper: (AlternatePayload it)} -> it {a: f {wrapper: (Payload 15u8)}, b: f {wrapper: (AlternatePayload 31u8)}} - "# + " ), (15, 31), (u8, u8) @@ -1791,7 +1791,7 @@ fn alignment_i128() { fn error_type_in_tag_union_payload() { assert_evals_to!( indoc!( - r#" + r" f : ([] -> Bool) -> Bool f = \fun -> if Bool.true then @@ -1800,7 +1800,7 @@ fn error_type_in_tag_union_payload() { Bool.false f (\x -> x) - "# + " ), 0, u8, @@ -1864,7 +1864,7 @@ fn issue_3653_recursion_pointer_in_naked_opaque_localized() { fn issue_2165_recursive_tag_destructure() { assert_evals_to!( indoc!( - r#" + r" SomeTag : [ Ctor { rec : List SomeTag } ] x : SomeTag @@ -1872,7 +1872,7 @@ fn issue_2165_recursive_tag_destructure() { when x is Ctor { rec } -> Num.toStr (List.len rec) - "# + " ), RocStr::from("0"), RocStr @@ -2183,7 +2183,7 @@ fn issue_5162_recast_nested_nullable_unwrapped_layout() { with_larger_debug_stack(|| { assert_evals_to!( indoc!( - r###" + r#" app "test" provides [main] to "./platform" Concept : [ @@ -2197,7 +2197,7 @@ fn issue_5162_recast_nested_nullable_unwrapped_layout() { main = when Dict.single bottom 0 is _ -> Bool.true - "### + "# ), true, bool @@ -2210,7 +2210,7 @@ fn issue_5162_recast_nested_nullable_unwrapped_layout() { fn nullable_wrapped_eq_issue_5434() { assert_evals_to!( indoc!( - r###" + r#" app "test" provides [main] to "./platform" Value : [ @@ -2229,7 +2229,7 @@ fn nullable_wrapped_eq_issue_5434() { Bool.true else Bool.false - "### + "# ), false, bool @@ -2241,7 +2241,7 @@ fn nullable_wrapped_eq_issue_5434() { fn recursive_tag_id_in_allocation_basic() { assert_evals_to!( indoc!( - r###" + r#" app "test" provides [main] to "./platform" Value : [ @@ -2270,7 +2270,7 @@ fn recursive_tag_id_in_allocation_basic() { G _ -> "G" H _ -> "H" I _ -> "I" - "### + "# ), RocStr::from("H"), RocStr @@ -2282,7 +2282,7 @@ fn recursive_tag_id_in_allocation_basic() { fn recursive_tag_id_in_allocation_eq() { assert_evals_to!( indoc!( - r###" + r#" app "test" provides [main] to "./platform" Value : [ @@ -2304,7 +2304,7 @@ fn recursive_tag_id_in_allocation_eq() { y = H 42 main = (x == x) && (x != y) && (y == y) - "### + "# ), true, bool diff --git a/crates/compiler/test_gen/src/gen_tuples.rs b/crates/compiler/test_gen/src/gen_tuples.rs index 5d62885b968..1cef7ff7052 100644 --- a/crates/compiler/test_gen/src/gen_tuples.rs +++ b/crates/compiler/test_gen/src/gen_tuples.rs @@ -18,9 +18,9 @@ use roc_std::RocStr; fn basic_tuple() { assert_evals_to!( indoc!( - r#" + r" ( 15, 17, 19 ).0 - "# + " ), 15, i64 @@ -28,9 +28,9 @@ fn basic_tuple() { assert_evals_to!( indoc!( - r#" + r" ( 15, 17, 19 ).1 - "# + " ), 17, i64 @@ -38,9 +38,9 @@ fn basic_tuple() { assert_evals_to!( indoc!( - r#" + r" ( 15, 17, 19 ).2 - "# + " ), 19, i64 @@ -52,11 +52,11 @@ fn basic_tuple() { fn f64_tuple() { assert_evals_to!( indoc!( - r#" + r" tup = (17.2f64, 15.1f64, 19.3f64) tup.0 - "# + " ), 17.2, f64 @@ -64,11 +64,11 @@ fn f64_tuple() { assert_evals_to!( indoc!( - r#" + r" tup = (17.2f64, 15.1f64, 19.3f64) tup.1 - "# + " ), 15.1, f64 @@ -76,11 +76,11 @@ fn f64_tuple() { assert_evals_to!( indoc!( - r#" + r" tup = (17.2f64, 15.1f64, 19.3f64) tup.2 - "# + " ), 19.3, f64 @@ -104,11 +104,11 @@ fn fn_tuple() { assert_evals_to!( indoc!( - r#" + r" rec = (15, 17, 19) rec.2 + rec.0 - "# + " ), 34, i64 @@ -120,11 +120,11 @@ fn fn_tuple() { fn int_tuple() { assert_evals_to!( indoc!( - r#" + r" rec = (15, 17, 19) rec.0 - "# + " ), 15, i64 @@ -132,11 +132,11 @@ fn int_tuple() { assert_evals_to!( indoc!( - r#" + r" rec = (15, 17, 19) rec.1 - "# + " ), 17, i64 @@ -144,11 +144,11 @@ fn int_tuple() { assert_evals_to!( indoc!( - r#" + r" rec = (15, 17, 19) rec.2 - "# + " ), 19, i64 @@ -160,10 +160,10 @@ fn int_tuple() { fn when_on_tuple() { assert_evals_to!( indoc!( - r#" + r" when (0x2, 0x3) is (x, y) -> x + y - "# + " ), 5, i64 @@ -175,10 +175,10 @@ fn when_on_tuple() { fn when_tuple_with_guard_pattern() { assert_evals_to!( indoc!( - r#" + r" when (0x2, 1.23) is (var, _) -> var + 3 - "# + " ), 5, i64 @@ -190,11 +190,11 @@ fn when_tuple_with_guard_pattern() { fn let_with_tuple_pattern() { assert_evals_to!( indoc!( - r#" + r" (x, _ ) = (0x2, 1.23) x - "# + " ), 2, i64 @@ -202,11 +202,11 @@ fn let_with_tuple_pattern() { assert_evals_to!( indoc!( - r#" + r" (_, y) = (0x2, 0x3) y - "# + " ), 3, i64 @@ -218,11 +218,11 @@ fn let_with_tuple_pattern() { fn tuple_guard_pattern() { assert_evals_to!( indoc!( - r#" + r" when (0x2, 1.23) is (0x4, _) -> 5 (x, _) -> x + 4 - "# + " ), 6, i64 @@ -230,11 +230,11 @@ fn tuple_guard_pattern() { assert_evals_to!( indoc!( - r#" + r" when (0x2, 0x3) is (_, 0x4) -> 5 (_, x) -> x + 4 - "# + " ), 7, i64 @@ -246,11 +246,11 @@ fn tuple_guard_pattern() { fn twice_tuple_access() { assert_evals_to!( indoc!( - r#" + r" x = (0x2, 0x3) x.0 + x.1 - "# + " ), 5, i64 @@ -262,9 +262,9 @@ fn twice_tuple_access() { fn i64_tuple2_literal() { assert_evals_to!( indoc!( - r#" + r" (3, 5) - "# + " ), (3, 5), (i64, i64) @@ -276,9 +276,9 @@ fn i64_tuple2_literal() { fn i64_tuple3_literal() { assert_evals_to!( indoc!( - r#" + r" (3, 5, 17) - "# + " ), (3, 5, 17), (i64, i64, i64) @@ -290,9 +290,9 @@ fn i64_tuple3_literal() { fn f64_tuple2_literal() { assert_evals_to!( indoc!( - r#" + r" (3.1f64, 5.1f64) - "# + " ), (3.1, 5.1), (f64, f64) @@ -304,12 +304,12 @@ fn f64_tuple2_literal() { fn bool_tuple4_literal() { assert_evals_to!( indoc!( - r#" + r" tuple : (Bool, Bool, Bool, Bool) tuple = (Bool.true, Bool.false, Bool.false, Bool.true) tuple - "# + " ), (true, false, false, true), (bool, bool, bool, bool) @@ -323,9 +323,9 @@ fn bool_tuple4_literal() { fn i64_tuple9_literal() { assert_evals_to!( indoc!( - r#" + r" ( 3, 5, 17, 1, 9, 12, 13, 14, 15 ) - "# + " ), [3, 5, 17, 1, 9, 12, 13, 14, 15], [i64; 9] @@ -337,12 +337,12 @@ fn i64_tuple9_literal() { fn return_tuple() { assert_evals_to!( indoc!( - r#" + r" x = 4 y = 3 (x, y) - "# + " ), (4, 3), (i64, i64) @@ -354,9 +354,9 @@ fn return_tuple() { fn return_tuple_2() { assert_evals_to!( indoc!( - r#" + r" (3, 5) - "# + " ), [3, 5], [i64; 2] @@ -368,9 +368,9 @@ fn return_tuple_2() { fn return_tuple_3() { assert_evals_to!( indoc!( - r#" + r" ( 3, 5, 4 ) - "# + " ), (3, 5, 4), (i64, i64, i64) @@ -382,9 +382,9 @@ fn return_tuple_3() { fn return_tuple_4() { assert_evals_to!( indoc!( - r#" + r" ( 3, 5, 4, 2 ) - "# + " ), [3, 5, 4, 2], [i64; 4] @@ -398,9 +398,9 @@ fn return_tuple_4() { fn return_tuple_5() { assert_evals_to!( indoc!( - r#" + r" ( 3, 5, 4, 2, 1 ) - "# + " ), [3, 5, 4, 2, 1], [i64; 5] @@ -414,9 +414,9 @@ fn return_tuple_5() { fn return_tuple_6() { assert_evals_to!( indoc!( - r#" + r" ( 3, 5, 4, 2, 1, 7 ) - "# + " ), [3, 5, 4, 2, 1, 7], [i64; 6] @@ -430,9 +430,9 @@ fn return_tuple_6() { fn return_tuple_7() { assert_evals_to!( indoc!( - r#" + r" ( 3, 5, 4, 2, 1, 7, 8 ) - "# + " ), [3, 5, 4, 2, 1, 7, 8], [i64; 7] @@ -444,9 +444,9 @@ fn return_tuple_7() { fn return_tuple_float_int() { assert_evals_to!( indoc!( - r#" + r" (1.23f64, 0x1) - "# + " ), (1.23, 0x1), (f64, i64) @@ -458,9 +458,9 @@ fn return_tuple_float_int() { fn return_tuple_int_float() { assert_evals_to!( indoc!( - r#" + r" ( 0x1, 1.23f64 ) - "# + " ), (0x1, 1.23), (i64, f64) @@ -472,9 +472,9 @@ fn return_tuple_int_float() { fn return_tuple_float_float() { assert_evals_to!( indoc!( - r#" + r" ( 2.46f64, 1.23f64 ) - "# + " ), (2.46, 1.23), (f64, f64) @@ -486,9 +486,9 @@ fn return_tuple_float_float() { fn return_tuple_float_float_float() { assert_evals_to!( indoc!( - r#" + r" ( 2.46f64, 1.23f64, 0.1f64 ) - "# + " ), (2.46, 1.23, 0.1), (f64, f64, f64) @@ -500,9 +500,9 @@ fn return_tuple_float_float_float() { fn return_nested_tuple() { assert_evals_to!( indoc!( - r#" + r" (0x0, (2.46f64, 1.23f64, 0.1f64)) - "# + " ), (0x0, (2.46, 1.23, 0.1)), (i64, (f64, f64, f64)) @@ -514,13 +514,13 @@ fn return_nested_tuple() { fn nested_tuple_load() { assert_evals_to!( indoc!( - r#" + r" x = (0, (0x2, 0x5, 0x6)) y = x.1 y.2 - "# + " ), 6, i64 @@ -572,7 +572,7 @@ fn alignment_in_tuple() { fn tuple_length_polymorphism() { assert_evals_to!( indoc!( - r#" + r" a = (42, 43) b = (1, 2, 44) @@ -580,7 +580,7 @@ fn tuple_length_polymorphism() { f = \(x1, x2), (x3, x4) -> x1 + x2 + x3 + x4 f a b - "# + " ), 88, i64 diff --git a/crates/compiler/test_gen/src/helpers/dev.rs b/crates/compiler/test_gen/src/helpers/dev.rs index 9d90aaa5684..f5f2c2687f3 100644 --- a/crates/compiler/test_gen/src/helpers/dev.rs +++ b/crates/compiler/test_gen/src/helpers/dev.rs @@ -215,12 +215,6 @@ pub fn helper( let builtins_host_tempfile = roc_bitcode::host_tempfile().expect("failed to write host builtins object to tempfile"); - if std::env::var("ROC_DEV_WRITE_OBJ").is_ok() { - let file_path = std::env::temp_dir().join("app.o"); - println!("gen-test object file written to {}", file_path.display()); - std::fs::copy(&app_o_file, file_path).unwrap(); - } - let (mut child, dylib_path) = link( &target, app_o_file.clone(), diff --git a/crates/compiler/test_gen/src/helpers/from_wasm32_memory.rs b/crates/compiler/test_gen/src/helpers/from_wasm32_memory.rs index 218292a5889..f124006e876 100644 --- a/crates/compiler/test_gen/src/helpers/from_wasm32_memory.rs +++ b/crates/compiler/test_gen/src/helpers/from_wasm32_memory.rs @@ -91,15 +91,11 @@ impl FromWasm32Memory for RocList { let capacity = ::decode(memory, offset + 4 * Builtin::WRAPPER_CAPACITY); - let mut items = Vec::with_capacity(length as usize); - - for i in 0..length { - let item = ::decode( - memory, - elements + i * ::SIZE_OF_WASM as u32, - ); - items.push(item); - } + let step = ::SIZE_OF_WASM; + + let items: Vec<_> = (0..length) + .map(|i| ::decode(memory, elements + i * step as u32)) + .collect(); let mut list = RocList::with_capacity(capacity as usize); list.extend_from_slice(&items); diff --git a/crates/compiler/test_gen/src/wasm_str.rs b/crates/compiler/test_gen/src/wasm_str.rs index 8224fc1c446..5521c752c40 100644 --- a/crates/compiler/test_gen/src/wasm_str.rs +++ b/crates/compiler/test_gen/src/wasm_str.rs @@ -27,27 +27,6 @@ fn str_split_empty_delimiter() { ); } -// This test produces an app that exposes nothing to the host! -#[test] -#[ignore] -fn str_split_empty_delimiter_broken() { - assert_evals_to!( - indoc!( - r#" - when List.first (Str.split "JJJ" "") is - Ok str -> - Str.countGraphemes str - - _ -> - -1 - - "# - ), - 3, - usize - ); -} - #[test] fn str_split_bigger_delimiter_small_str() { assert_evals_to!( @@ -61,27 +40,6 @@ fn str_split_bigger_delimiter_small_str() { ); } -// This test produces an app that exposes nothing to the host! -#[test] -#[ignore] -fn str_split_bigger_delimiter_small_str_broken() { - assert_evals_to!( - indoc!( - r#" - when List.first (Str.split "JJJ" "JJJJ there") is - Ok str -> - Str.countGraphemes str - - _ -> - -1 - - "# - ), - 3, - usize - ); -} - #[test] fn str_split_str_concat_repeated() { assert_evals_to!( @@ -414,20 +372,6 @@ fn str_starts_with() { assert_evals_to!(r#"Str.startsWith "" "hello world""#, false, bool); } -#[test] -fn str_starts_with_scalar() { - assert_evals_to!( - &format!(r#"Str.startsWithScalar "foobar" {}"#, 'f' as u32), - true, - bool - ); - assert_evals_to!( - &format!(r#"Str.startsWithScalar "zoobar" {}"#, 'f' as u32), - false, - bool - ); -} - #[test] fn str_ends_with() { assert_evals_to!(r#"Str.endsWith "hello world" "world""#, true, bool); @@ -435,25 +379,6 @@ fn str_ends_with() { assert_evals_to!(r#"Str.endsWith "" "hello world""#, false, bool); } -#[test] -fn str_count_graphemes_small_str() { - assert_evals_to!(r#"Str.countGraphemes "å🤔""#, 2, usize); -} - -#[test] -fn str_count_graphemes_three_js() { - assert_evals_to!(r#"Str.countGraphemes "JJJ""#, 3, usize); -} - -#[test] -fn str_count_graphemes_big_str() { - assert_evals_to!( - r#"Str.countGraphemes "6🤔å🤔e¥🤔çppkd🙃1jdal🦯asdfa∆ltråø˚waia8918.,🏅jjc""#, - 45, - usize - ); -} - #[test] fn str_starts_with_same_big_str() { assert_evals_to!( @@ -1314,16 +1239,3 @@ fn str_to_dec() { RocDec ); } - -#[test] -fn str_walk_scalars() { - assert_evals_to!( - indoc!( - r#" - Str.walkScalars "abcd" [] List.append - "# - ), - RocList::from_slice(&['a', 'b', 'c', 'd']), - RocList - ); -} 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 e173e68196a..e901b169c0c 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,92 +2,92 @@ 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): - 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.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.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; +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.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; - ret Num.294; + let Num.306 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; + ret Num.306; procedure Num.51 (#Attr.2, #Attr.3): - let Num.293 : U64 = lowlevel NumAddWrap #Attr.2 #Attr.3; - ret Num.293; + let Num.305 : U64 = lowlevel NumAddWrap #Attr.2 #Attr.3; + ret Num.305; procedure Num.77 (#Attr.2, #Attr.3): - let Num.292 : U64 = lowlevel NumSubSaturated #Attr.2 #Attr.3; - ret Num.292; + let Num.304 : U64 = lowlevel NumSubSaturated #Attr.2 #Attr.3; + ret Num.304; procedure Test.1 (Test.2): let Test.13 : U64 = 0i64; diff --git a/crates/compiler/test_mono/generated/binary_tree_fbip.txt b/crates/compiler/test_mono/generated/binary_tree_fbip.txt index ced4126a8a0..9c972e86d44 100644 --- a/crates/compiler/test_mono/generated/binary_tree_fbip.txt +++ b/crates/compiler/test_mono/generated/binary_tree_fbip.txt @@ -1,6 +1,6 @@ procedure Num.19 (#Attr.2, #Attr.3): - let Num.291 : I64 = lowlevel NumAdd #Attr.2 #Attr.3; - ret Num.291; + let Num.303 : I64 = lowlevel NumAdd #Attr.2 #Attr.3; + ret Num.303; procedure Test.4 (Test.27): let Test.39 : [C [, C *self *self] *self, ] = TagId(0) ; 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 8e5a61f0bb1..ce9516fd56a 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 5ce6015e75f..8f4dc677693 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 4a7557932e3..e83eb870eec 100644 --- a/crates/compiler/test_mono/generated/capture_void_layout_task.txt +++ b/crates/compiler/test_mono/generated/capture_void_layout_task.txt @@ -1,39 +1,39 @@ -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; - -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; + let List.581 : [] = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.581; + +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; - ret Num.292; + let Num.304 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; + ret Num.304; procedure Num.51 (#Attr.2, #Attr.3): - let Num.291 : U64 = lowlevel NumAddWrap #Attr.2 #Attr.3; - ret Num.291; + let Num.303 : U64 = lowlevel NumAddWrap #Attr.2 #Attr.3; + ret Num.303; procedure Test.10 (Test.69, #Attr.12): let Test.72 : {} = UnionAtIndex (Id 0) (Index 0) #Attr.12; 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 9cbe7071b11..0c85dc0fe40 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,53 +2,53 @@ 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; - ret Num.291; + let Num.303 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; + ret Num.303; procedure Result.5 (Result.12, Result.13): let Result.39 : U8 = 1i64; diff --git a/crates/compiler/test_mono/generated/choose_i128_layout.txt b/crates/compiler/test_mono/generated/choose_i128_layout.txt index b2305c4f8b8..52d76be1289 100644 --- a/crates/compiler/test_mono/generated/choose_i128_layout.txt +++ b/crates/compiler/test_mono/generated/choose_i128_layout.txt @@ -1,6 +1,6 @@ procedure Num.19 (#Attr.2, #Attr.3): - let Num.292 : I128 = lowlevel NumAdd #Attr.2 #Attr.3; - ret Num.292; + let Num.304 : I128 = lowlevel NumAdd #Attr.2 #Attr.3; + ret Num.304; procedure Test.0 (): let Test.6 : I128 = 18446744073709551616i64; diff --git a/crates/compiler/test_mono/generated/choose_u128_layout.txt b/crates/compiler/test_mono/generated/choose_u128_layout.txt index 45e0310888e..fc389c9f897 100644 --- a/crates/compiler/test_mono/generated/choose_u128_layout.txt +++ b/crates/compiler/test_mono/generated/choose_u128_layout.txt @@ -1,6 +1,6 @@ procedure Num.19 (#Attr.2, #Attr.3): - let Num.291 : U128 = lowlevel NumAdd #Attr.2 #Attr.3; - ret Num.291; + let Num.303 : U128 = lowlevel NumAdd #Attr.2 #Attr.3; + ret Num.303; procedure Test.0 (): let Test.2 : U128 = 170141183460469231731687303715884105728u128; diff --git a/crates/compiler/test_mono/generated/choose_u64_layout.txt b/crates/compiler/test_mono/generated/choose_u64_layout.txt index 2de2204d034..0f11a36dcbb 100644 --- a/crates/compiler/test_mono/generated/choose_u64_layout.txt +++ b/crates/compiler/test_mono/generated/choose_u64_layout.txt @@ -1,6 +1,6 @@ procedure Num.19 (#Attr.2, #Attr.3): - let Num.291 : U64 = lowlevel NumAdd #Attr.2 #Attr.3; - ret Num.291; + let Num.303 : U64 = lowlevel NumAdd #Attr.2 #Attr.3; + ret Num.303; procedure Test.0 (): let Test.2 : U64 = 9999999999999999999i64; diff --git a/crates/compiler/test_mono/generated/closure_in_list.txt b/crates/compiler/test_mono/generated/closure_in_list.txt index dad30ed6da2..ffb77b5f87f 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 9795011c891..333f04fbe23 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,46 +2,46 @@ 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; - ret Num.292; + let Num.304 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; + ret Num.304; procedure Num.51 (#Attr.2, #Attr.3): - let Num.291 : U64 = lowlevel NumAddWrap #Attr.2 #Attr.3; - ret Num.291; + let Num.303 : U64 = lowlevel NumAddWrap #Attr.2 #Attr.3; + ret Num.303; procedure Str.3 (#Attr.2, #Attr.3): - let Str.294 : Str = lowlevel StrConcat #Attr.2 #Attr.3; - ret Str.294; + let Str.253 : Str = lowlevel StrConcat #Attr.2 #Attr.3; + ret Str.253; procedure Test.1 (Test.5): ret Test.5; diff --git a/crates/compiler/test_mono/generated/dbg_in_expect.txt b/crates/compiler/test_mono/generated/dbg_in_expect.txt index 77cbd8800ff..d6f2a8bc1e4 100644 --- a/crates/compiler/test_mono/generated/dbg_in_expect.txt +++ b/crates/compiler/test_mono/generated/dbg_in_expect.txt @@ -42,8 +42,8 @@ procedure Inspect.62 (Inspect.306): ret Inspect.306; procedure Str.3 (#Attr.2, #Attr.3): - let Str.292 : Str = lowlevel StrConcat #Attr.2 #Attr.3; - ret Str.292; + let Str.251 : Str = lowlevel StrConcat #Attr.2 #Attr.3; + ret Str.251; procedure Test.1 (): let Test.4 : Str = ""; diff --git a/crates/compiler/test_mono/generated/dbg_str_followed_by_number.txt b/crates/compiler/test_mono/generated/dbg_str_followed_by_number.txt index a8eaeeb5426..97059310420 100644 --- a/crates/compiler/test_mono/generated/dbg_str_followed_by_number.txt +++ b/crates/compiler/test_mono/generated/dbg_str_followed_by_number.txt @@ -38,8 +38,8 @@ procedure Inspect.62 (Inspect.306): ret Inspect.306; procedure Str.3 (#Attr.2, #Attr.3): - let Str.292 : Str = lowlevel StrConcat #Attr.2 #Attr.3; - ret Str.292; + let Str.251 : Str = lowlevel StrConcat #Attr.2 #Attr.3; + ret Str.251; procedure Test.0 (): let Test.3 : Str = ""; diff --git a/crates/compiler/test_mono/generated/dict.txt b/crates/compiler/test_mono/generated/dict.txt index a9c9bf3f21b..bcbb80a45bc 100644 --- a/crates/compiler/test_mono/generated/dict.txt +++ b/crates/compiler/test_mono/generated/dict.txt @@ -26,12 +26,12 @@ 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; - ret Num.291; + let Num.303 : U8 = lowlevel NumSub #Attr.2 #Attr.3; + ret Num.303; procedure Test.0 (): let Test.3 : {} = Struct {}; 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 4f8f4c29407..659715d7fd4 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,31 +2,31 @@ 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; - ret Num.291; + let Num.303 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; + ret Num.303; procedure Test.2 (Test.5): dec Test.5; diff --git a/crates/compiler/test_mono/generated/encode.txt b/crates/compiler/test_mono/generated/encode.txt index 121a386fe6c..d301e40e15b 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 1d88fc081af..8293dcff397 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 @@ -24,14 +24,6 @@ procedure #Derived.7 (#Derived.8, #Derived.9, #Derived.6): let #Derived_gen.13 : List U8 = CallByName Encode.24 #Derived.8 #Derived_gen.14 #Derived.9; ret #Derived_gen.13; -procedure Bool.1 (): - let Bool.76 : Int1 = false; - ret Bool.76; - -procedure Bool.2 (): - let Bool.75 : Int1 = true; - ret Bool.75; - procedure Encode.23 (Encode.98): ret Encode.98; @@ -52,7 +44,7 @@ procedure Encode.24 (Encode.99, Encode.107, Encode.101): ret Encode.111; procedure Encode.24 (Encode.99, Encode.107, Encode.101): - let Encode.113 : List U8 = CallByName TotallyNotJson.234 Encode.99 Encode.101 Encode.107; + let Encode.113 : List U8 = CallByName TotallyNotJson.201 Encode.99 Encode.101 Encode.107; ret Encode.113; procedure Encode.24 (Encode.99, Encode.107, Encode.101): @@ -60,11 +52,11 @@ procedure Encode.24 (Encode.99, Encode.107, Encode.101): ret Encode.115; procedure Encode.24 (Encode.99, Encode.107, Encode.101): - let Encode.117 : List U8 = CallByName TotallyNotJson.234 Encode.99 Encode.101 Encode.107; + let Encode.117 : List U8 = CallByName TotallyNotJson.201 Encode.99 Encode.101 Encode.107; ret Encode.117; procedure Encode.24 (Encode.99, Encode.107, Encode.101): - let Encode.120 : List U8 = CallByName TotallyNotJson.182 Encode.99 Encode.101 Encode.107; + let Encode.120 : List U8 = CallByName TotallyNotJson.150 Encode.99 Encode.101 Encode.107; ret Encode.120; procedure Encode.26 (Encode.105, Encode.106): @@ -73,1415 +65,529 @@ 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.13 (#Attr.2, #Attr.3): - let List.729 : List Str = lowlevel ListPrepend #Attr.2 #Attr.3; - ret List.729; - -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.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.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.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.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.18 (List.158, List.159, List.160): + let List.593 : U64 = 0i64; + let List.594 : U64 = CallByName List.6 List.158; + let List.592 : {List U8, U64} = CallByName List.90 List.158 List.159 List.160 List.593 List.594; + ret List.592; + +procedure List.18 (List.158, List.159, List.160): + let List.627 : U64 = 0i64; + let List.628 : U64 = CallByName List.6 List.158; + let List.626 : {List U8, U64} = CallByName List.90 List.158 List.159 List.160 List.627 List.628; + ret List.626; + +procedure List.18 (List.158, List.159, List.160): + let List.639 : U64 = 0i64; + let List.640 : U64 = CallByName List.6 List.158; + let List.638 : List U8 = CallByName List.90 List.158 List.159 List.160 List.639 List.640; + ret List.638; + +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.742; - ret List.201; - -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.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.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.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; - 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; + let List.203 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.676; + ret List.203; + +procedure List.4 (List.122, List.123): + let List.625 : U64 = 1i64; + let List.624 : List U8 = CallByName List.70 List.122 List.625; + let List.623 : List U8 = CallByName List.71 List.624 List.123; + ret List.623; + +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.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.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.741 : Int1 = CallByName Num.24 List.433 List.432; - if List.741 then - jump List.740 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.740 List.433; - -procedure List.6 (#Attr.2): - let List.636 : U64 = lowlevel ListLen #Attr.2; - ret List.636; + jump List.674 List.435; procedure List.6 (#Attr.2): - let List.725 : U64 = lowlevel ListLen #Attr.2; - ret List.725; + let List.605 : U64 = lowlevel ListLen #Attr.2; + ret List.605; procedure List.6 (#Attr.2): - let List.726 : U64 = lowlevel ListLen #Attr.2; - ret List.726; + let List.659 : U64 = lowlevel ListLen #Attr.2; + ret List.659; procedure List.6 (#Attr.2): - let List.728 : U64 = lowlevel ListLen #Attr.2; - ret List.728; + let List.661 : U64 = lowlevel ListLen #Attr.2; + ret List.661; procedure List.66 (#Attr.2, #Attr.3): - let List.608 : {Str, Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.608; + let List.602 : {Str, Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.602; procedure List.66 (#Attr.2, #Attr.3): - let List.676 : {Str, Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.676; + let List.636 : {Str, Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.636; procedure List.66 (#Attr.2, #Attr.3): - let List.688 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.688; - -procedure List.68 (#Attr.2): - let List.721 : List Str = lowlevel ListWithCapacity #Attr.2; - ret List.721; + let List.648 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.648; procedure List.68 (#Attr.2): - let List.723 : List U8 = lowlevel ListWithCapacity #Attr.2; - ret List.723; - -procedure List.70 (#Attr.2, #Attr.3): - let List.642 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; - ret List.642; + let List.663 : List U8 = lowlevel ListWithCapacity #Attr.2; + ret List.663; procedure List.70 (#Attr.2, #Attr.3): - let List.659 : List Str = lowlevel ListReserve #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; + let List.610 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; + ret List.610; 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.707 : List Str = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; - ret List.707; + let List.608 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; + ret List.608; 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.669 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; + ret List.669; procedure List.8 (#Attr.2, #Attr.3): - let List.692 : List Str = lowlevel ListConcat #Attr.2 #Attr.3; - ret List.692; - -procedure List.8 (#Attr.2, #Attr.3): - let List.700 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; - ret List.700; - -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; + let List.658 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; + ret List.658; + +procedure List.80 (#Derived_gen.50, #Derived_gen.51, #Derived_gen.52, #Derived_gen.53, #Derived_gen.54): + 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.157 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.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.688; + let List.692 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) List.495; + ret List.692; 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.686 : [C {U64, Int1}, C {U64, Int1}] = TagId(1) List.490; + ret List.686; in - jump List.751 #Derived_gen.30 #Derived_gen.31 #Derived_gen.32 #Derived_gen.33 #Derived_gen.34; - -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; + jump List.685 #Derived_gen.50 #Derived_gen.51 #Derived_gen.52 #Derived_gen.53 #Derived_gen.54; + +procedure List.90 (#Derived_gen.26, #Derived_gen.27, #Derived_gen.28, #Derived_gen.29, #Derived_gen.30): + joinpoint List.641 List.161 List.162 List.163 List.164 List.165: + let List.643 : Int1 = CallByName Num.22 List.164 List.165; + if List.643 then + let List.647 : U8 = CallByName List.66 List.161 List.164; + let List.166 : List U8 = CallByName TotallyNotJson.183 List.162 List.647; + let List.646 : U64 = 1i64; + let List.645 : U64 = CallByName Num.51 List.164 List.646; + jump List.641 List.161 List.166 List.163 List.645 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; - -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; + jump List.641 #Derived_gen.26 #Derived_gen.27 #Derived_gen.28 #Derived_gen.29 #Derived_gen.30; + +procedure List.90 (#Derived_gen.40, #Derived_gen.41, #Derived_gen.42, #Derived_gen.43, #Derived_gen.44): + joinpoint List.595 List.161 List.162 List.163 List.164 List.165: + let List.597 : Int1 = CallByName Num.22 List.164 List.165; + if List.597 then + let List.601 : {Str, Str} = CallByName List.66 List.161 List.164; + inc List.601; + let List.166 : {List U8, U64} = CallByName TotallyNotJson.203 List.162 List.601; + let List.600 : U64 = 1i64; + let List.599 : U64 = CallByName Num.51 List.164 List.600; + jump List.595 List.161 List.166 List.163 List.599 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; - -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; + jump List.595 #Derived_gen.40 #Derived_gen.41 #Derived_gen.42 #Derived_gen.43 #Derived_gen.44; + +procedure List.90 (#Derived_gen.45, #Derived_gen.46, #Derived_gen.47, #Derived_gen.48, #Derived_gen.49): + joinpoint List.629 List.161 List.162 List.163 List.164 List.165: + let List.631 : Int1 = CallByName Num.22 List.164 List.165; + if List.631 then + let List.635 : {Str, Str} = CallByName List.66 List.161 List.164; + inc List.635; + let List.166 : {List U8, U64} = CallByName TotallyNotJson.203 List.162 List.635; + let List.634 : U64 = 1i64; + let List.633 : U64 = CallByName Num.51 List.164 List.634; + jump List.629 List.161 List.166 List.163 List.633 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.629 #Derived_gen.45 #Derived_gen.46 #Derived_gen.47 #Derived_gen.48 #Derived_gen.49; procedure Num.127 (#Attr.2): - let Num.312 : U8 = lowlevel NumIntCast #Attr.2; - ret Num.312; + let Num.318 : U8 = lowlevel NumIntCast #Attr.2; + ret Num.318; procedure Num.19 (#Attr.2, #Attr.3): - let Num.316 : U64 = lowlevel NumAdd #Attr.2 #Attr.3; - ret Num.316; + let Num.322 : U64 = lowlevel NumAdd #Attr.2 #Attr.3; + ret Num.322; procedure Num.20 (#Attr.2, #Attr.3): - let Num.313 : U64 = lowlevel NumSub #Attr.2 #Attr.3; - ret Num.313; + let Num.319 : U64 = lowlevel NumSub #Attr.2 #Attr.3; + ret Num.319; procedure Num.21 (#Attr.2, #Attr.3): - let Num.318 : U64 = lowlevel NumMul #Attr.2 #Attr.3; - ret Num.318; + let Num.324 : U64 = lowlevel NumMul #Attr.2 #Attr.3; + ret Num.324; procedure Num.22 (#Attr.2, #Attr.3): - let Num.324 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; - ret Num.324; + let Num.330 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; + ret Num.330; procedure Num.24 (#Attr.2, #Attr.3): let Num.332 : Int1 = lowlevel NumGt #Attr.2 #Attr.3; ret Num.332; procedure Num.51 (#Attr.2, #Attr.3): - let Num.321 : U64 = lowlevel NumAddWrap #Attr.2 #Attr.3; - ret Num.321; + let Num.327 : U64 = lowlevel NumAddWrap #Attr.2 #Attr.3; + ret Num.327; procedure Num.75 (#Attr.2, #Attr.3): let Num.331 : U64 = lowlevel NumSubWrap #Attr.2 #Attr.3; ret Num.331; -procedure Num.77 (#Attr.2, #Attr.3): - let Num.330 : U64 = lowlevel NumSubSaturated #Attr.2 #Attr.3; - ret Num.330; - procedure Num.94 (#Attr.2, #Attr.3): - let Num.317 : U64 = lowlevel NumDivCeilUnchecked #Attr.2 #Attr.3; - ret Num.317; + let Num.323 : U64 = lowlevel NumDivCeilUnchecked #Attr.2 #Attr.3; + ret Num.323; procedure Str.12 (#Attr.2): - let Str.310 : List U8 = lowlevel StrToUtf8 #Attr.2; - ret Str.310; - -procedure Str.4 (#Attr.2, #Attr.3): - let Str.313 : Str = lowlevel StrJoinWith #Attr.2 #Attr.3; - ret Str.313; - -procedure Str.48 (#Attr.2, #Attr.3, #Attr.4): - let Str.301 : {U64, Str, Int1, U8} = lowlevel StrFromUtf8Range #Attr.2 #Attr.3 #Attr.4; - ret Str.301; - -procedure Str.55 (#Attr.2): - let Str.316 : List Str = lowlevel StrGraphemes #Attr.2; - ret Str.316; - -procedure Str.9 (Str.80): - let Str.299 : U64 = 0i64; - let Str.300 : U64 = CallByName List.6 Str.80; - let Str.81 : {U64, Str, Int1, U8} = CallByName Str.48 Str.80 Str.299 Str.300; - let Str.296 : Int1 = StructAtIndex 2 Str.81; - if Str.296 then - let Str.298 : Str = StructAtIndex 1 Str.81; - let Str.297 : [C {U64, U8}, C Str] = TagId(1) Str.298; - ret Str.297; - else - let Str.294 : U8 = StructAtIndex 3 Str.81; - let Str.295 : U64 = StructAtIndex 0 Str.81; - let #Derived_gen.58 : Str = StructAtIndex 1 Str.81; - dec #Derived_gen.58; - let Str.293 : {U64, U8} = Struct {Str.295, Str.294}; - let Str.292 : [C {U64, U8}, C Str] = TagId(0) Str.293; - ret Str.292; - -procedure TotallyNotJson.100 (TotallyNotJson.850): - let TotallyNotJson.1838 : Str = "a"; - let TotallyNotJson.1839 : Int1 = lowlevel Eq TotallyNotJson.1838 TotallyNotJson.850; - dec TotallyNotJson.1838; - if TotallyNotJson.1839 then - dec TotallyNotJson.850; - let TotallyNotJson.1761 : Str = "A"; - ret TotallyNotJson.1761; - else - let TotallyNotJson.1836 : Str = "b"; - let TotallyNotJson.1837 : Int1 = lowlevel Eq TotallyNotJson.1836 TotallyNotJson.850; - dec TotallyNotJson.1836; - if TotallyNotJson.1837 then - dec TotallyNotJson.850; - let TotallyNotJson.1762 : Str = "B"; - ret TotallyNotJson.1762; - else - let TotallyNotJson.1834 : Str = "c"; - let TotallyNotJson.1835 : Int1 = lowlevel Eq TotallyNotJson.1834 TotallyNotJson.850; - dec TotallyNotJson.1834; - if TotallyNotJson.1835 then - dec TotallyNotJson.850; - let TotallyNotJson.1763 : Str = "C"; - ret TotallyNotJson.1763; - else - let TotallyNotJson.1832 : Str = "d"; - let TotallyNotJson.1833 : Int1 = lowlevel Eq TotallyNotJson.1832 TotallyNotJson.850; - dec TotallyNotJson.1832; - if TotallyNotJson.1833 then - dec TotallyNotJson.850; - let TotallyNotJson.1764 : Str = "D"; - ret TotallyNotJson.1764; - else - let TotallyNotJson.1830 : Str = "e"; - let TotallyNotJson.1831 : Int1 = lowlevel Eq TotallyNotJson.1830 TotallyNotJson.850; - dec TotallyNotJson.1830; - if TotallyNotJson.1831 then - dec TotallyNotJson.850; - let TotallyNotJson.1765 : Str = "E"; - ret TotallyNotJson.1765; - else - let TotallyNotJson.1828 : Str = "f"; - let TotallyNotJson.1829 : Int1 = lowlevel Eq TotallyNotJson.1828 TotallyNotJson.850; - dec TotallyNotJson.1828; - if TotallyNotJson.1829 then - dec TotallyNotJson.850; - let TotallyNotJson.1766 : Str = "F"; - ret TotallyNotJson.1766; - else - let TotallyNotJson.1826 : Str = "g"; - let TotallyNotJson.1827 : Int1 = lowlevel Eq TotallyNotJson.1826 TotallyNotJson.850; - dec TotallyNotJson.1826; - if TotallyNotJson.1827 then - dec TotallyNotJson.850; - let TotallyNotJson.1767 : Str = "G"; - ret TotallyNotJson.1767; - else - let TotallyNotJson.1824 : Str = "h"; - let TotallyNotJson.1825 : Int1 = lowlevel Eq TotallyNotJson.1824 TotallyNotJson.850; - dec TotallyNotJson.1824; - if TotallyNotJson.1825 then - dec TotallyNotJson.850; - let TotallyNotJson.1768 : Str = "H"; - ret TotallyNotJson.1768; - else - let TotallyNotJson.1822 : Str = "i"; - let TotallyNotJson.1823 : Int1 = lowlevel Eq TotallyNotJson.1822 TotallyNotJson.850; - dec TotallyNotJson.1822; - if TotallyNotJson.1823 then - dec TotallyNotJson.850; - let TotallyNotJson.1769 : Str = "I"; - ret TotallyNotJson.1769; - else - let TotallyNotJson.1820 : Str = "j"; - let TotallyNotJson.1821 : Int1 = lowlevel Eq TotallyNotJson.1820 TotallyNotJson.850; - dec TotallyNotJson.1820; - if TotallyNotJson.1821 then - dec TotallyNotJson.850; - let TotallyNotJson.1770 : Str = "J"; - ret TotallyNotJson.1770; - else - let TotallyNotJson.1818 : Str = "k"; - let TotallyNotJson.1819 : Int1 = lowlevel Eq TotallyNotJson.1818 TotallyNotJson.850; - dec TotallyNotJson.1818; - if TotallyNotJson.1819 then - dec TotallyNotJson.850; - let TotallyNotJson.1771 : Str = "K"; - ret TotallyNotJson.1771; - else - let TotallyNotJson.1816 : Str = "l"; - let TotallyNotJson.1817 : Int1 = lowlevel Eq TotallyNotJson.1816 TotallyNotJson.850; - dec TotallyNotJson.1816; - if TotallyNotJson.1817 then - dec TotallyNotJson.850; - let TotallyNotJson.1772 : Str = "L"; - ret TotallyNotJson.1772; - else - let TotallyNotJson.1814 : Str = "m"; - let TotallyNotJson.1815 : Int1 = lowlevel Eq TotallyNotJson.1814 TotallyNotJson.850; - dec TotallyNotJson.1814; - if TotallyNotJson.1815 then - dec TotallyNotJson.850; - let TotallyNotJson.1773 : Str = "M"; - ret TotallyNotJson.1773; - else - let TotallyNotJson.1812 : Str = "n"; - let TotallyNotJson.1813 : Int1 = lowlevel Eq TotallyNotJson.1812 TotallyNotJson.850; - dec TotallyNotJson.1812; - if TotallyNotJson.1813 then - dec TotallyNotJson.850; - let TotallyNotJson.1774 : Str = "N"; - ret TotallyNotJson.1774; - else - let TotallyNotJson.1810 : Str = "o"; - let TotallyNotJson.1811 : Int1 = lowlevel Eq TotallyNotJson.1810 TotallyNotJson.850; - dec TotallyNotJson.1810; - if TotallyNotJson.1811 then - dec TotallyNotJson.850; - let TotallyNotJson.1775 : Str = "O"; - ret TotallyNotJson.1775; - else - let TotallyNotJson.1808 : Str = "p"; - let TotallyNotJson.1809 : Int1 = lowlevel Eq TotallyNotJson.1808 TotallyNotJson.850; - dec TotallyNotJson.1808; - if TotallyNotJson.1809 then - dec TotallyNotJson.850; - let TotallyNotJson.1776 : Str = "P"; - ret TotallyNotJson.1776; - else - let TotallyNotJson.1806 : Str = "q"; - let TotallyNotJson.1807 : Int1 = lowlevel Eq TotallyNotJson.1806 TotallyNotJson.850; - dec TotallyNotJson.1806; - if TotallyNotJson.1807 then - dec TotallyNotJson.850; - let TotallyNotJson.1777 : Str = "Q"; - ret TotallyNotJson.1777; - else - let TotallyNotJson.1804 : Str = "r"; - let TotallyNotJson.1805 : Int1 = lowlevel Eq TotallyNotJson.1804 TotallyNotJson.850; - dec TotallyNotJson.1804; - if TotallyNotJson.1805 then - dec TotallyNotJson.850; - let TotallyNotJson.1778 : Str = "R"; - ret TotallyNotJson.1778; - else - let TotallyNotJson.1802 : Str = "s"; - let TotallyNotJson.1803 : Int1 = lowlevel Eq TotallyNotJson.1802 TotallyNotJson.850; - dec TotallyNotJson.1802; - if TotallyNotJson.1803 then - dec TotallyNotJson.850; - let TotallyNotJson.1779 : Str = "S"; - ret TotallyNotJson.1779; - else - let TotallyNotJson.1800 : Str = "t"; - let TotallyNotJson.1801 : Int1 = lowlevel Eq TotallyNotJson.1800 TotallyNotJson.850; - dec TotallyNotJson.1800; - if TotallyNotJson.1801 then - dec TotallyNotJson.850; - let TotallyNotJson.1780 : Str = "T"; - ret TotallyNotJson.1780; - else - let TotallyNotJson.1798 : Str = "u"; - let TotallyNotJson.1799 : Int1 = lowlevel Eq TotallyNotJson.1798 TotallyNotJson.850; - dec TotallyNotJson.1798; - if TotallyNotJson.1799 then - dec TotallyNotJson.850; - let TotallyNotJson.1781 : Str = "U"; - ret TotallyNotJson.1781; - else - let TotallyNotJson.1796 : Str = "v"; - let TotallyNotJson.1797 : Int1 = lowlevel Eq TotallyNotJson.1796 TotallyNotJson.850; - dec TotallyNotJson.1796; - if TotallyNotJson.1797 then - dec TotallyNotJson.850; - let TotallyNotJson.1782 : Str = "V"; - ret TotallyNotJson.1782; - else - let TotallyNotJson.1794 : Str = "w"; - let TotallyNotJson.1795 : Int1 = lowlevel Eq TotallyNotJson.1794 TotallyNotJson.850; - dec TotallyNotJson.1794; - if TotallyNotJson.1795 then - dec TotallyNotJson.850; - let TotallyNotJson.1783 : Str = "W"; - ret TotallyNotJson.1783; - else - let TotallyNotJson.1792 : Str = "x"; - let TotallyNotJson.1793 : Int1 = lowlevel Eq TotallyNotJson.1792 TotallyNotJson.850; - dec TotallyNotJson.1792; - if TotallyNotJson.1793 then - dec TotallyNotJson.850; - let TotallyNotJson.1784 : Str = "X"; - ret TotallyNotJson.1784; - else - let TotallyNotJson.1790 : Str = "y"; - let TotallyNotJson.1791 : Int1 = lowlevel Eq TotallyNotJson.1790 TotallyNotJson.850; - dec TotallyNotJson.1790; - if TotallyNotJson.1791 then - dec TotallyNotJson.850; - let TotallyNotJson.1785 : Str = "Y"; - ret TotallyNotJson.1785; - else - let TotallyNotJson.1788 : Str = "z"; - let TotallyNotJson.1789 : Int1 = lowlevel Eq TotallyNotJson.1788 TotallyNotJson.850; - dec TotallyNotJson.1788; - if TotallyNotJson.1789 then - dec TotallyNotJson.850; - let TotallyNotJson.1786 : Str = "Z"; - ret TotallyNotJson.1786; - else - ret TotallyNotJson.850; - -procedure TotallyNotJson.101 (TotallyNotJson.851): - let TotallyNotJson.1659 : Str = "A"; - let TotallyNotJson.1660 : Int1 = lowlevel Eq TotallyNotJson.1659 TotallyNotJson.851; - dec TotallyNotJson.1659; - if TotallyNotJson.1660 then - dec TotallyNotJson.851; - let TotallyNotJson.1582 : Str = "a"; - ret TotallyNotJson.1582; - else - let TotallyNotJson.1657 : Str = "B"; - let TotallyNotJson.1658 : Int1 = lowlevel Eq TotallyNotJson.1657 TotallyNotJson.851; - dec TotallyNotJson.1657; - if TotallyNotJson.1658 then - dec TotallyNotJson.851; - let TotallyNotJson.1583 : Str = "b"; - ret TotallyNotJson.1583; - else - let TotallyNotJson.1655 : Str = "C"; - let TotallyNotJson.1656 : Int1 = lowlevel Eq TotallyNotJson.1655 TotallyNotJson.851; - dec TotallyNotJson.1655; - if TotallyNotJson.1656 then - dec TotallyNotJson.851; - let TotallyNotJson.1584 : Str = "c"; - ret TotallyNotJson.1584; - else - let TotallyNotJson.1653 : Str = "D"; - let TotallyNotJson.1654 : Int1 = lowlevel Eq TotallyNotJson.1653 TotallyNotJson.851; - dec TotallyNotJson.1653; - if TotallyNotJson.1654 then - dec TotallyNotJson.851; - let TotallyNotJson.1585 : Str = "d"; - ret TotallyNotJson.1585; - else - let TotallyNotJson.1651 : Str = "E"; - let TotallyNotJson.1652 : Int1 = lowlevel Eq TotallyNotJson.1651 TotallyNotJson.851; - dec TotallyNotJson.1651; - if TotallyNotJson.1652 then - dec TotallyNotJson.851; - let TotallyNotJson.1586 : Str = "e"; - ret TotallyNotJson.1586; - else - let TotallyNotJson.1649 : Str = "F"; - let TotallyNotJson.1650 : Int1 = lowlevel Eq TotallyNotJson.1649 TotallyNotJson.851; - dec TotallyNotJson.1649; - if TotallyNotJson.1650 then - dec TotallyNotJson.851; - let TotallyNotJson.1587 : Str = "f"; - ret TotallyNotJson.1587; - else - let TotallyNotJson.1647 : Str = "G"; - let TotallyNotJson.1648 : Int1 = lowlevel Eq TotallyNotJson.1647 TotallyNotJson.851; - dec TotallyNotJson.1647; - if TotallyNotJson.1648 then - dec TotallyNotJson.851; - let TotallyNotJson.1588 : Str = "g"; - ret TotallyNotJson.1588; - else - let TotallyNotJson.1645 : Str = "H"; - let TotallyNotJson.1646 : Int1 = lowlevel Eq TotallyNotJson.1645 TotallyNotJson.851; - dec TotallyNotJson.1645; - if TotallyNotJson.1646 then - dec TotallyNotJson.851; - let TotallyNotJson.1589 : Str = "h"; - ret TotallyNotJson.1589; - else - let TotallyNotJson.1643 : Str = "I"; - let TotallyNotJson.1644 : Int1 = lowlevel Eq TotallyNotJson.1643 TotallyNotJson.851; - dec TotallyNotJson.1643; - if TotallyNotJson.1644 then - dec TotallyNotJson.851; - let TotallyNotJson.1590 : Str = "i"; - ret TotallyNotJson.1590; - else - let TotallyNotJson.1641 : Str = "J"; - let TotallyNotJson.1642 : Int1 = lowlevel Eq TotallyNotJson.1641 TotallyNotJson.851; - dec TotallyNotJson.1641; - if TotallyNotJson.1642 then - dec TotallyNotJson.851; - let TotallyNotJson.1591 : Str = "j"; - ret TotallyNotJson.1591; - else - let TotallyNotJson.1639 : Str = "K"; - let TotallyNotJson.1640 : Int1 = lowlevel Eq TotallyNotJson.1639 TotallyNotJson.851; - dec TotallyNotJson.1639; - if TotallyNotJson.1640 then - dec TotallyNotJson.851; - let TotallyNotJson.1592 : Str = "k"; - ret TotallyNotJson.1592; - else - let TotallyNotJson.1637 : Str = "L"; - let TotallyNotJson.1638 : Int1 = lowlevel Eq TotallyNotJson.1637 TotallyNotJson.851; - dec TotallyNotJson.1637; - if TotallyNotJson.1638 then - dec TotallyNotJson.851; - let TotallyNotJson.1593 : Str = "l"; - ret TotallyNotJson.1593; - else - let TotallyNotJson.1635 : Str = "M"; - let TotallyNotJson.1636 : Int1 = lowlevel Eq TotallyNotJson.1635 TotallyNotJson.851; - dec TotallyNotJson.1635; - if TotallyNotJson.1636 then - dec TotallyNotJson.851; - let TotallyNotJson.1594 : Str = "m"; - ret TotallyNotJson.1594; - else - let TotallyNotJson.1633 : Str = "N"; - let TotallyNotJson.1634 : Int1 = lowlevel Eq TotallyNotJson.1633 TotallyNotJson.851; - dec TotallyNotJson.1633; - if TotallyNotJson.1634 then - dec TotallyNotJson.851; - let TotallyNotJson.1595 : Str = "n"; - ret TotallyNotJson.1595; - else - let TotallyNotJson.1631 : Str = "O"; - let TotallyNotJson.1632 : Int1 = lowlevel Eq TotallyNotJson.1631 TotallyNotJson.851; - dec TotallyNotJson.1631; - if TotallyNotJson.1632 then - dec TotallyNotJson.851; - let TotallyNotJson.1596 : Str = "o"; - ret TotallyNotJson.1596; - else - let TotallyNotJson.1629 : Str = "P"; - let TotallyNotJson.1630 : Int1 = lowlevel Eq TotallyNotJson.1629 TotallyNotJson.851; - dec TotallyNotJson.1629; - if TotallyNotJson.1630 then - dec TotallyNotJson.851; - let TotallyNotJson.1597 : Str = "p"; - ret TotallyNotJson.1597; - else - let TotallyNotJson.1627 : Str = "Q"; - let TotallyNotJson.1628 : Int1 = lowlevel Eq TotallyNotJson.1627 TotallyNotJson.851; - dec TotallyNotJson.1627; - if TotallyNotJson.1628 then - dec TotallyNotJson.851; - let TotallyNotJson.1598 : Str = "q"; - ret TotallyNotJson.1598; - else - let TotallyNotJson.1625 : Str = "R"; - let TotallyNotJson.1626 : Int1 = lowlevel Eq TotallyNotJson.1625 TotallyNotJson.851; - dec TotallyNotJson.1625; - if TotallyNotJson.1626 then - dec TotallyNotJson.851; - let TotallyNotJson.1599 : Str = "r"; - ret TotallyNotJson.1599; - else - let TotallyNotJson.1623 : Str = "S"; - let TotallyNotJson.1624 : Int1 = lowlevel Eq TotallyNotJson.1623 TotallyNotJson.851; - dec TotallyNotJson.1623; - if TotallyNotJson.1624 then - dec TotallyNotJson.851; - let TotallyNotJson.1600 : Str = "s"; - ret TotallyNotJson.1600; - else - let TotallyNotJson.1621 : Str = "T"; - let TotallyNotJson.1622 : Int1 = lowlevel Eq TotallyNotJson.1621 TotallyNotJson.851; - dec TotallyNotJson.1621; - if TotallyNotJson.1622 then - dec TotallyNotJson.851; - let TotallyNotJson.1601 : Str = "t"; - ret TotallyNotJson.1601; - else - let TotallyNotJson.1619 : Str = "U"; - let TotallyNotJson.1620 : Int1 = lowlevel Eq TotallyNotJson.1619 TotallyNotJson.851; - dec TotallyNotJson.1619; - if TotallyNotJson.1620 then - dec TotallyNotJson.851; - let TotallyNotJson.1602 : Str = "u"; - ret TotallyNotJson.1602; - else - let TotallyNotJson.1617 : Str = "V"; - let TotallyNotJson.1618 : Int1 = lowlevel Eq TotallyNotJson.1617 TotallyNotJson.851; - dec TotallyNotJson.1617; - if TotallyNotJson.1618 then - dec TotallyNotJson.851; - let TotallyNotJson.1603 : Str = "v"; - ret TotallyNotJson.1603; - else - let TotallyNotJson.1615 : Str = "W"; - let TotallyNotJson.1616 : Int1 = lowlevel Eq TotallyNotJson.1615 TotallyNotJson.851; - dec TotallyNotJson.1615; - if TotallyNotJson.1616 then - dec TotallyNotJson.851; - let TotallyNotJson.1604 : Str = "w"; - ret TotallyNotJson.1604; - else - let TotallyNotJson.1613 : Str = "X"; - let TotallyNotJson.1614 : Int1 = lowlevel Eq TotallyNotJson.1613 TotallyNotJson.851; - dec TotallyNotJson.1613; - if TotallyNotJson.1614 then - dec TotallyNotJson.851; - let TotallyNotJson.1605 : Str = "x"; - ret TotallyNotJson.1605; - else - let TotallyNotJson.1611 : Str = "Y"; - let TotallyNotJson.1612 : Int1 = lowlevel Eq TotallyNotJson.1611 TotallyNotJson.851; - dec TotallyNotJson.1611; - if TotallyNotJson.1612 then - dec TotallyNotJson.851; - let TotallyNotJson.1606 : Str = "y"; - ret TotallyNotJson.1606; - else - let TotallyNotJson.1609 : Str = "Z"; - let TotallyNotJson.1610 : Int1 = lowlevel Eq TotallyNotJson.1609 TotallyNotJson.851; - dec TotallyNotJson.1609; - if TotallyNotJson.1610 then - dec TotallyNotJson.851; - let TotallyNotJson.1607 : Str = "z"; - ret TotallyNotJson.1607; - else - ret TotallyNotJson.851; - -procedure TotallyNotJson.102 (TotallyNotJson.852): - let TotallyNotJson.1748 : Str = "A"; - let TotallyNotJson.1749 : Int1 = lowlevel Eq TotallyNotJson.1748 TotallyNotJson.852; - dec TotallyNotJson.1748; - if TotallyNotJson.1749 then - dec TotallyNotJson.852; - let TotallyNotJson.1671 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1671; + let Str.263 : List U8 = lowlevel StrToUtf8 #Attr.2; + ret Str.263; + +procedure Str.43 (#Attr.2, #Attr.3, #Attr.4): + let Str.260 : {U64, Str, Int1, U8} = lowlevel StrFromUtf8Range #Attr.2 #Attr.3 #Attr.4; + ret Str.260; + +procedure Str.9 (Str.68): + let Str.258 : U64 = 0i64; + let Str.259 : U64 = CallByName List.6 Str.68; + let Str.69 : {U64, Str, Int1, U8} = CallByName Str.43 Str.68 Str.258 Str.259; + let Str.255 : Int1 = StructAtIndex 2 Str.69; + if Str.255 then + let Str.257 : Str = StructAtIndex 1 Str.69; + let Str.256 : [C {U64, U8}, C Str] = TagId(1) Str.257; + ret Str.256; else - let TotallyNotJson.1746 : Str = "B"; - let TotallyNotJson.1747 : Int1 = lowlevel Eq TotallyNotJson.1746 TotallyNotJson.852; - dec TotallyNotJson.1746; - if TotallyNotJson.1747 then - dec TotallyNotJson.852; - let TotallyNotJson.1672 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1672; - else - let TotallyNotJson.1744 : Str = "C"; - let TotallyNotJson.1745 : Int1 = lowlevel Eq TotallyNotJson.1744 TotallyNotJson.852; - dec TotallyNotJson.1744; - if TotallyNotJson.1745 then - dec TotallyNotJson.852; - let TotallyNotJson.1673 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1673; - else - let TotallyNotJson.1742 : Str = "D"; - let TotallyNotJson.1743 : Int1 = lowlevel Eq TotallyNotJson.1742 TotallyNotJson.852; - dec TotallyNotJson.1742; - if TotallyNotJson.1743 then - dec TotallyNotJson.852; - let TotallyNotJson.1674 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1674; - else - let TotallyNotJson.1740 : Str = "E"; - let TotallyNotJson.1741 : Int1 = lowlevel Eq TotallyNotJson.1740 TotallyNotJson.852; - dec TotallyNotJson.1740; - if TotallyNotJson.1741 then - dec TotallyNotJson.852; - let TotallyNotJson.1675 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1675; - else - let TotallyNotJson.1738 : Str = "F"; - let TotallyNotJson.1739 : Int1 = lowlevel Eq TotallyNotJson.1738 TotallyNotJson.852; - dec TotallyNotJson.1738; - if TotallyNotJson.1739 then - dec TotallyNotJson.852; - let TotallyNotJson.1676 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1676; - else - let TotallyNotJson.1736 : Str = "G"; - let TotallyNotJson.1737 : Int1 = lowlevel Eq TotallyNotJson.1736 TotallyNotJson.852; - dec TotallyNotJson.1736; - if TotallyNotJson.1737 then - dec TotallyNotJson.852; - let TotallyNotJson.1677 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1677; - else - let TotallyNotJson.1734 : Str = "H"; - let TotallyNotJson.1735 : Int1 = lowlevel Eq TotallyNotJson.1734 TotallyNotJson.852; - dec TotallyNotJson.1734; - if TotallyNotJson.1735 then - dec TotallyNotJson.852; - let TotallyNotJson.1678 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1678; - else - let TotallyNotJson.1732 : Str = "I"; - let TotallyNotJson.1733 : Int1 = lowlevel Eq TotallyNotJson.1732 TotallyNotJson.852; - dec TotallyNotJson.1732; - if TotallyNotJson.1733 then - dec TotallyNotJson.852; - let TotallyNotJson.1679 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1679; - else - let TotallyNotJson.1730 : Str = "J"; - let TotallyNotJson.1731 : Int1 = lowlevel Eq TotallyNotJson.1730 TotallyNotJson.852; - dec TotallyNotJson.1730; - if TotallyNotJson.1731 then - dec TotallyNotJson.852; - let TotallyNotJson.1680 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1680; - else - let TotallyNotJson.1728 : Str = "K"; - let TotallyNotJson.1729 : Int1 = lowlevel Eq TotallyNotJson.1728 TotallyNotJson.852; - dec TotallyNotJson.1728; - if TotallyNotJson.1729 then - dec TotallyNotJson.852; - let TotallyNotJson.1681 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1681; - else - let TotallyNotJson.1726 : Str = "L"; - let TotallyNotJson.1727 : Int1 = lowlevel Eq TotallyNotJson.1726 TotallyNotJson.852; - dec TotallyNotJson.1726; - if TotallyNotJson.1727 then - dec TotallyNotJson.852; - let TotallyNotJson.1682 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1682; - else - let TotallyNotJson.1724 : Str = "M"; - let TotallyNotJson.1725 : Int1 = lowlevel Eq TotallyNotJson.1724 TotallyNotJson.852; - dec TotallyNotJson.1724; - if TotallyNotJson.1725 then - dec TotallyNotJson.852; - let TotallyNotJson.1683 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1683; - else - let TotallyNotJson.1722 : Str = "N"; - let TotallyNotJson.1723 : Int1 = lowlevel Eq TotallyNotJson.1722 TotallyNotJson.852; - dec TotallyNotJson.1722; - if TotallyNotJson.1723 then - dec TotallyNotJson.852; - let TotallyNotJson.1684 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1684; - else - let TotallyNotJson.1720 : Str = "O"; - let TotallyNotJson.1721 : Int1 = lowlevel Eq TotallyNotJson.1720 TotallyNotJson.852; - dec TotallyNotJson.1720; - if TotallyNotJson.1721 then - dec TotallyNotJson.852; - let TotallyNotJson.1685 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1685; - else - let TotallyNotJson.1718 : Str = "P"; - let TotallyNotJson.1719 : Int1 = lowlevel Eq TotallyNotJson.1718 TotallyNotJson.852; - dec TotallyNotJson.1718; - if TotallyNotJson.1719 then - dec TotallyNotJson.852; - let TotallyNotJson.1686 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1686; - else - let TotallyNotJson.1716 : Str = "Q"; - let TotallyNotJson.1717 : Int1 = lowlevel Eq TotallyNotJson.1716 TotallyNotJson.852; - dec TotallyNotJson.1716; - if TotallyNotJson.1717 then - dec TotallyNotJson.852; - let TotallyNotJson.1687 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1687; - else - let TotallyNotJson.1714 : Str = "R"; - let TotallyNotJson.1715 : Int1 = lowlevel Eq TotallyNotJson.1714 TotallyNotJson.852; - dec TotallyNotJson.1714; - if TotallyNotJson.1715 then - dec TotallyNotJson.852; - let TotallyNotJson.1688 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1688; - else - let TotallyNotJson.1712 : Str = "S"; - let TotallyNotJson.1713 : Int1 = lowlevel Eq TotallyNotJson.1712 TotallyNotJson.852; - dec TotallyNotJson.1712; - if TotallyNotJson.1713 then - dec TotallyNotJson.852; - let TotallyNotJson.1689 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1689; - else - let TotallyNotJson.1710 : Str = "T"; - let TotallyNotJson.1711 : Int1 = lowlevel Eq TotallyNotJson.1710 TotallyNotJson.852; - dec TotallyNotJson.1710; - if TotallyNotJson.1711 then - dec TotallyNotJson.852; - let TotallyNotJson.1690 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1690; - else - let TotallyNotJson.1708 : Str = "U"; - let TotallyNotJson.1709 : Int1 = lowlevel Eq TotallyNotJson.1708 TotallyNotJson.852; - dec TotallyNotJson.1708; - if TotallyNotJson.1709 then - dec TotallyNotJson.852; - let TotallyNotJson.1691 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1691; - else - let TotallyNotJson.1706 : Str = "V"; - let TotallyNotJson.1707 : Int1 = lowlevel Eq TotallyNotJson.1706 TotallyNotJson.852; - dec TotallyNotJson.1706; - if TotallyNotJson.1707 then - dec TotallyNotJson.852; - let TotallyNotJson.1692 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1692; - else - let TotallyNotJson.1704 : Str = "W"; - let TotallyNotJson.1705 : Int1 = lowlevel Eq TotallyNotJson.1704 TotallyNotJson.852; - dec TotallyNotJson.1704; - if TotallyNotJson.1705 then - dec TotallyNotJson.852; - let TotallyNotJson.1693 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1693; - else - let TotallyNotJson.1702 : Str = "X"; - let TotallyNotJson.1703 : Int1 = lowlevel Eq TotallyNotJson.1702 TotallyNotJson.852; - dec TotallyNotJson.1702; - if TotallyNotJson.1703 then - dec TotallyNotJson.852; - let TotallyNotJson.1694 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1694; - else - let TotallyNotJson.1700 : Str = "Y"; - let TotallyNotJson.1701 : Int1 = lowlevel Eq TotallyNotJson.1700 TotallyNotJson.852; - dec TotallyNotJson.1700; - if TotallyNotJson.1701 then - dec TotallyNotJson.852; - let TotallyNotJson.1695 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1695; - else - let TotallyNotJson.1698 : Str = "Z"; - let TotallyNotJson.1699 : Int1 = lowlevel Eq TotallyNotJson.1698 TotallyNotJson.852; - dec TotallyNotJson.1698; - dec TotallyNotJson.852; - if TotallyNotJson.1699 then - let TotallyNotJson.1696 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1696; - else - let TotallyNotJson.1697 : Int1 = CallByName Bool.1; - ret TotallyNotJson.1697; - -procedure TotallyNotJson.182 (TotallyNotJson.183, TotallyNotJson.1889, TotallyNotJson.181): - let TotallyNotJson.1892 : List U8 = CallByName TotallyNotJson.26 TotallyNotJson.181; - let TotallyNotJson.1891 : List U8 = CallByName List.8 TotallyNotJson.183 TotallyNotJson.1892; - ret TotallyNotJson.1891; - -procedure TotallyNotJson.189 (TotallyNotJson.1940, TotallyNotJson.192): - let TotallyNotJson.190 : U64 = StructAtIndex 0 TotallyNotJson.1940; - let TotallyNotJson.191 : Int1 = StructAtIndex 1 TotallyNotJson.1940; - switch TotallyNotJson.192: + let Str.253 : U8 = StructAtIndex 3 Str.69; + let Str.254 : U64 = StructAtIndex 0 Str.69; + let #Derived_gen.55 : Str = StructAtIndex 1 Str.69; + dec #Derived_gen.55; + let Str.252 : {U64, U8} = Struct {Str.254, Str.253}; + let Str.251 : [C {U64, U8}, C Str] = TagId(0) Str.252; + ret Str.251; + +procedure TotallyNotJson.150 (TotallyNotJson.151, TotallyNotJson.1043, TotallyNotJson.149): + let TotallyNotJson.1046 : List U8 = CallByName TotallyNotJson.26 TotallyNotJson.149; + let TotallyNotJson.1045 : List U8 = CallByName List.8 TotallyNotJson.151 TotallyNotJson.1046; + ret TotallyNotJson.1045; + +procedure TotallyNotJson.157 (TotallyNotJson.1094, TotallyNotJson.160): + let TotallyNotJson.158 : U64 = StructAtIndex 0 TotallyNotJson.1094; + let TotallyNotJson.159 : Int1 = StructAtIndex 1 TotallyNotJson.1094; + switch TotallyNotJson.160: case 34: - let TotallyNotJson.1943 : Int1 = false; - let TotallyNotJson.1942 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1943}; - let TotallyNotJson.1941 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1942; - ret TotallyNotJson.1941; + let TotallyNotJson.1097 : Int1 = false; + let TotallyNotJson.1096 : {U64, Int1} = Struct {TotallyNotJson.158, TotallyNotJson.1097}; + let TotallyNotJson.1095 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1096; + ret TotallyNotJson.1095; case 92: - let TotallyNotJson.1946 : Int1 = false; - let TotallyNotJson.1945 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1946}; - let TotallyNotJson.1944 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1945; - ret TotallyNotJson.1944; + let TotallyNotJson.1100 : Int1 = false; + let TotallyNotJson.1099 : {U64, Int1} = Struct {TotallyNotJson.158, TotallyNotJson.1100}; + let TotallyNotJson.1098 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1099; + ret TotallyNotJson.1098; case 47: - let TotallyNotJson.1949 : Int1 = false; - let TotallyNotJson.1948 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1949}; - let TotallyNotJson.1947 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1948; - ret TotallyNotJson.1947; + let TotallyNotJson.1103 : Int1 = false; + let TotallyNotJson.1102 : {U64, Int1} = Struct {TotallyNotJson.158, TotallyNotJson.1103}; + let TotallyNotJson.1101 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1102; + ret TotallyNotJson.1101; case 8: - let TotallyNotJson.1952 : Int1 = false; - let TotallyNotJson.1951 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1952}; - let TotallyNotJson.1950 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1951; - ret TotallyNotJson.1950; + let TotallyNotJson.1106 : Int1 = false; + let TotallyNotJson.1105 : {U64, Int1} = Struct {TotallyNotJson.158, TotallyNotJson.1106}; + let TotallyNotJson.1104 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1105; + ret TotallyNotJson.1104; case 12: - let TotallyNotJson.1955 : Int1 = false; - let TotallyNotJson.1954 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1955}; - let TotallyNotJson.1953 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1954; - ret TotallyNotJson.1953; + let TotallyNotJson.1109 : Int1 = false; + let TotallyNotJson.1108 : {U64, Int1} = Struct {TotallyNotJson.158, TotallyNotJson.1109}; + let TotallyNotJson.1107 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1108; + ret TotallyNotJson.1107; case 10: - let TotallyNotJson.1958 : Int1 = false; - let TotallyNotJson.1957 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1958}; - let TotallyNotJson.1956 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1957; - ret TotallyNotJson.1956; + let TotallyNotJson.1112 : Int1 = false; + let TotallyNotJson.1111 : {U64, Int1} = Struct {TotallyNotJson.158, TotallyNotJson.1112}; + let TotallyNotJson.1110 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1111; + ret TotallyNotJson.1110; case 13: - let TotallyNotJson.1961 : Int1 = false; - let TotallyNotJson.1960 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1961}; - let TotallyNotJson.1959 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1960; - ret TotallyNotJson.1959; + let TotallyNotJson.1115 : Int1 = false; + let TotallyNotJson.1114 : {U64, Int1} = Struct {TotallyNotJson.158, TotallyNotJson.1115}; + let TotallyNotJson.1113 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1114; + ret TotallyNotJson.1113; case 9: - let TotallyNotJson.1964 : Int1 = false; - let TotallyNotJson.1963 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1964}; - let TotallyNotJson.1962 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1963; - ret TotallyNotJson.1962; + let TotallyNotJson.1118 : Int1 = false; + let TotallyNotJson.1117 : {U64, Int1} = Struct {TotallyNotJson.158, TotallyNotJson.1118}; + let TotallyNotJson.1116 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1117; + ret TotallyNotJson.1116; default: - let TotallyNotJson.1968 : U64 = 1i64; - let TotallyNotJson.1967 : U64 = CallByName Num.19 TotallyNotJson.190 TotallyNotJson.1968; - let TotallyNotJson.1966 : {U64, Int1} = Struct {TotallyNotJson.1967, TotallyNotJson.191}; - let TotallyNotJson.1965 : [C {U64, Int1}, C {U64, Int1}] = TagId(1) TotallyNotJson.1966; - ret TotallyNotJson.1965; + let TotallyNotJson.1122 : U64 = 1i64; + let TotallyNotJson.1121 : U64 = CallByName Num.19 TotallyNotJson.158 TotallyNotJson.1122; + let TotallyNotJson.1120 : {U64, Int1} = Struct {TotallyNotJson.1121, TotallyNotJson.159}; + let TotallyNotJson.1119 : [C {U64, Int1}, C {U64, Int1}] = TagId(1) TotallyNotJson.1120; + ret TotallyNotJson.1119; -procedure TotallyNotJson.215 (TotallyNotJson.216, TotallyNotJson.217): - let TotallyNotJson.1911 : List U8 = CallByName TotallyNotJson.27 TotallyNotJson.217; - let TotallyNotJson.1910 : List U8 = CallByName List.8 TotallyNotJson.216 TotallyNotJson.1911; - ret TotallyNotJson.1910; - -procedure TotallyNotJson.234 (TotallyNotJson.235, TotallyNotJson.1175, TotallyNotJson.233): - let TotallyNotJson.1530 : I64 = 123i64; - let TotallyNotJson.1529 : U8 = CallByName Num.127 TotallyNotJson.1530; - let TotallyNotJson.238 : List U8 = CallByName List.4 TotallyNotJson.235 TotallyNotJson.1529; - let TotallyNotJson.1528 : U64 = CallByName List.6 TotallyNotJson.233; - let TotallyNotJson.1183 : {List U8, U64} = Struct {TotallyNotJson.238, TotallyNotJson.1528}; - let TotallyNotJson.1182 : {List U8, U64} = CallByName List.18 TotallyNotJson.233 TotallyNotJson.1183 TotallyNotJson.1175; - let TotallyNotJson.240 : List U8 = StructAtIndex 0 TotallyNotJson.1182; - let TotallyNotJson.1181 : I64 = 125i64; - let TotallyNotJson.1180 : U8 = CallByName Num.127 TotallyNotJson.1181; - let TotallyNotJson.1179 : List U8 = CallByName List.4 TotallyNotJson.240 TotallyNotJson.1180; - ret TotallyNotJson.1179; - -procedure TotallyNotJson.234 (TotallyNotJson.235, TotallyNotJson.1175, TotallyNotJson.233): - let TotallyNotJson.1886 : I64 = 123i64; - let TotallyNotJson.1885 : U8 = CallByName Num.127 TotallyNotJson.1886; - let TotallyNotJson.238 : List U8 = CallByName List.4 TotallyNotJson.235 TotallyNotJson.1885; - let TotallyNotJson.1884 : U64 = CallByName List.6 TotallyNotJson.233; - let TotallyNotJson.1539 : {List U8, U64} = Struct {TotallyNotJson.238, TotallyNotJson.1884}; - let TotallyNotJson.1538 : {List U8, U64} = CallByName List.18 TotallyNotJson.233 TotallyNotJson.1539 TotallyNotJson.1175; - let TotallyNotJson.240 : List U8 = StructAtIndex 0 TotallyNotJson.1538; - let TotallyNotJson.1537 : I64 = 125i64; - let TotallyNotJson.1536 : U8 = CallByName Num.127 TotallyNotJson.1537; - let TotallyNotJson.1535 : List U8 = CallByName List.4 TotallyNotJson.240 TotallyNotJson.1536; - ret TotallyNotJson.1535; - -procedure TotallyNotJson.237 (TotallyNotJson.1177, TotallyNotJson.1178, TotallyNotJson.236): - let TotallyNotJson.243 : Str = StructAtIndex 0 TotallyNotJson.1178; - let TotallyNotJson.244 : Str = StructAtIndex 1 TotallyNotJson.1178; - let TotallyNotJson.241 : List U8 = StructAtIndex 0 TotallyNotJson.1177; - let TotallyNotJson.242 : U64 = StructAtIndex 1 TotallyNotJson.1177; - let TotallyNotJson.245 : Str = CallByName TotallyNotJson.82 TotallyNotJson.243 TotallyNotJson.236; - let TotallyNotJson.1205 : I64 = 34i64; - let TotallyNotJson.1204 : U8 = CallByName Num.127 TotallyNotJson.1205; - let TotallyNotJson.1202 : List U8 = CallByName List.4 TotallyNotJson.241 TotallyNotJson.1204; - let TotallyNotJson.1203 : List U8 = CallByName Str.12 TotallyNotJson.245; - let TotallyNotJson.1199 : List U8 = CallByName List.8 TotallyNotJson.1202 TotallyNotJson.1203; - let TotallyNotJson.1201 : I64 = 34i64; - let TotallyNotJson.1200 : U8 = CallByName Num.127 TotallyNotJson.1201; - let TotallyNotJson.1196 : List U8 = CallByName List.4 TotallyNotJson.1199 TotallyNotJson.1200; - let TotallyNotJson.1198 : I64 = 58i64; - let TotallyNotJson.1197 : U8 = CallByName Num.127 TotallyNotJson.1198; - let TotallyNotJson.1194 : List U8 = CallByName List.4 TotallyNotJson.1196 TotallyNotJson.1197; - let TotallyNotJson.246 : List U8 = CallByName Encode.24 TotallyNotJson.1194 TotallyNotJson.244 TotallyNotJson.236; - joinpoint TotallyNotJson.1189 TotallyNotJson.247: - let TotallyNotJson.1187 : U64 = 1i64; - let TotallyNotJson.1186 : U64 = CallByName Num.20 TotallyNotJson.242 TotallyNotJson.1187; - let TotallyNotJson.1185 : {List U8, U64} = Struct {TotallyNotJson.247, TotallyNotJson.1186}; - ret TotallyNotJson.1185; +procedure TotallyNotJson.183 (TotallyNotJson.184, TotallyNotJson.185): + let TotallyNotJson.1065 : List U8 = CallByName TotallyNotJson.27 TotallyNotJson.185; + let TotallyNotJson.1064 : List U8 = CallByName List.8 TotallyNotJson.184 TotallyNotJson.1065; + ret TotallyNotJson.1064; + +procedure TotallyNotJson.201 (TotallyNotJson.202, TotallyNotJson.973, TotallyNotJson.200): + let TotallyNotJson.1006 : I64 = 123i64; + let TotallyNotJson.1005 : U8 = CallByName Num.127 TotallyNotJson.1006; + let TotallyNotJson.204 : List U8 = CallByName List.4 TotallyNotJson.202 TotallyNotJson.1005; + let TotallyNotJson.1004 : U64 = CallByName List.6 TotallyNotJson.200; + let TotallyNotJson.981 : {List U8, U64} = Struct {TotallyNotJson.204, TotallyNotJson.1004}; + let TotallyNotJson.982 : {} = Struct {}; + let TotallyNotJson.980 : {List U8, U64} = CallByName List.18 TotallyNotJson.200 TotallyNotJson.981 TotallyNotJson.982; + let TotallyNotJson.206 : List U8 = StructAtIndex 0 TotallyNotJson.980; + let TotallyNotJson.979 : I64 = 125i64; + let TotallyNotJson.978 : U8 = CallByName Num.127 TotallyNotJson.979; + let TotallyNotJson.977 : List U8 = CallByName List.4 TotallyNotJson.206 TotallyNotJson.978; + ret TotallyNotJson.977; + +procedure TotallyNotJson.201 (TotallyNotJson.202, TotallyNotJson.973, TotallyNotJson.200): + let TotallyNotJson.1040 : I64 = 123i64; + let TotallyNotJson.1039 : U8 = CallByName Num.127 TotallyNotJson.1040; + let TotallyNotJson.204 : List U8 = CallByName List.4 TotallyNotJson.202 TotallyNotJson.1039; + let TotallyNotJson.1038 : U64 = CallByName List.6 TotallyNotJson.200; + let TotallyNotJson.1015 : {List U8, U64} = Struct {TotallyNotJson.204, TotallyNotJson.1038}; + let TotallyNotJson.1016 : {} = Struct {}; + let TotallyNotJson.1014 : {List U8, U64} = CallByName List.18 TotallyNotJson.200 TotallyNotJson.1015 TotallyNotJson.1016; + let TotallyNotJson.206 : List U8 = StructAtIndex 0 TotallyNotJson.1014; + let TotallyNotJson.1013 : I64 = 125i64; + let TotallyNotJson.1012 : U8 = CallByName Num.127 TotallyNotJson.1013; + let TotallyNotJson.1011 : List U8 = CallByName List.4 TotallyNotJson.206 TotallyNotJson.1012; + ret TotallyNotJson.1011; + +procedure TotallyNotJson.203 (TotallyNotJson.975, TotallyNotJson.976): + let TotallyNotJson.209 : Str = StructAtIndex 0 TotallyNotJson.976; + let TotallyNotJson.210 : Str = StructAtIndex 1 TotallyNotJson.976; + let TotallyNotJson.207 : List U8 = StructAtIndex 0 TotallyNotJson.975; + let TotallyNotJson.208 : U64 = StructAtIndex 1 TotallyNotJson.975; + let TotallyNotJson.1003 : I64 = 34i64; + let TotallyNotJson.1002 : U8 = CallByName Num.127 TotallyNotJson.1003; + let TotallyNotJson.1000 : List U8 = CallByName List.4 TotallyNotJson.207 TotallyNotJson.1002; + let TotallyNotJson.1001 : List U8 = CallByName Str.12 TotallyNotJson.209; + let TotallyNotJson.997 : List U8 = CallByName List.8 TotallyNotJson.1000 TotallyNotJson.1001; + let TotallyNotJson.999 : I64 = 34i64; + let TotallyNotJson.998 : U8 = CallByName Num.127 TotallyNotJson.999; + let TotallyNotJson.994 : List U8 = CallByName List.4 TotallyNotJson.997 TotallyNotJson.998; + let TotallyNotJson.996 : I64 = 58i64; + let TotallyNotJson.995 : U8 = CallByName Num.127 TotallyNotJson.996; + let TotallyNotJson.992 : List U8 = CallByName List.4 TotallyNotJson.994 TotallyNotJson.995; + let TotallyNotJson.993 : {} = Struct {}; + let TotallyNotJson.212 : List U8 = CallByName Encode.24 TotallyNotJson.992 TotallyNotJson.210 TotallyNotJson.993; + joinpoint TotallyNotJson.987 TotallyNotJson.213: + let TotallyNotJson.985 : U64 = 1i64; + let TotallyNotJson.984 : U64 = CallByName Num.20 TotallyNotJson.208 TotallyNotJson.985; + let TotallyNotJson.983 : {List U8, U64} = Struct {TotallyNotJson.213, TotallyNotJson.984}; + ret TotallyNotJson.983; in - let TotallyNotJson.1193 : U64 = 1i64; - let TotallyNotJson.1190 : Int1 = CallByName Num.24 TotallyNotJson.242 TotallyNotJson.1193; - if TotallyNotJson.1190 then - let TotallyNotJson.1192 : I64 = 44i64; - let TotallyNotJson.1191 : U8 = CallByName Num.127 TotallyNotJson.1192; - let TotallyNotJson.1188 : List U8 = CallByName List.4 TotallyNotJson.246 TotallyNotJson.1191; - jump TotallyNotJson.1189 TotallyNotJson.1188; + let TotallyNotJson.991 : U64 = 1i64; + let TotallyNotJson.988 : Int1 = CallByName Num.24 TotallyNotJson.208 TotallyNotJson.991; + if TotallyNotJson.988 then + let TotallyNotJson.990 : I64 = 44i64; + let TotallyNotJson.989 : U8 = CallByName Num.127 TotallyNotJson.990; + let TotallyNotJson.986 : List U8 = CallByName List.4 TotallyNotJson.212 TotallyNotJson.989; + jump TotallyNotJson.987 TotallyNotJson.986; else - jump TotallyNotJson.1189 TotallyNotJson.246; - -procedure TotallyNotJson.237 (TotallyNotJson.1177, TotallyNotJson.1178, TotallyNotJson.236): - let TotallyNotJson.243 : Str = StructAtIndex 0 TotallyNotJson.1178; - let TotallyNotJson.244 : Str = StructAtIndex 1 TotallyNotJson.1178; - let TotallyNotJson.241 : List U8 = StructAtIndex 0 TotallyNotJson.1177; - let TotallyNotJson.242 : U64 = StructAtIndex 1 TotallyNotJson.1177; - let TotallyNotJson.245 : Str = CallByName TotallyNotJson.82 TotallyNotJson.243 TotallyNotJson.236; - let TotallyNotJson.1561 : I64 = 34i64; - let TotallyNotJson.1560 : U8 = CallByName Num.127 TotallyNotJson.1561; - let TotallyNotJson.1558 : List U8 = CallByName List.4 TotallyNotJson.241 TotallyNotJson.1560; - let TotallyNotJson.1559 : List U8 = CallByName Str.12 TotallyNotJson.245; - let TotallyNotJson.1555 : List U8 = CallByName List.8 TotallyNotJson.1558 TotallyNotJson.1559; - let TotallyNotJson.1557 : I64 = 34i64; - let TotallyNotJson.1556 : U8 = CallByName Num.127 TotallyNotJson.1557; - let TotallyNotJson.1552 : List U8 = CallByName List.4 TotallyNotJson.1555 TotallyNotJson.1556; - let TotallyNotJson.1554 : I64 = 58i64; - let TotallyNotJson.1553 : U8 = CallByName Num.127 TotallyNotJson.1554; - let TotallyNotJson.1550 : List U8 = CallByName List.4 TotallyNotJson.1552 TotallyNotJson.1553; - let TotallyNotJson.246 : List U8 = CallByName Encode.24 TotallyNotJson.1550 TotallyNotJson.244 TotallyNotJson.236; - joinpoint TotallyNotJson.1545 TotallyNotJson.247: - let TotallyNotJson.1543 : U64 = 1i64; - let TotallyNotJson.1542 : U64 = CallByName Num.20 TotallyNotJson.242 TotallyNotJson.1543; - let TotallyNotJson.1541 : {List U8, U64} = Struct {TotallyNotJson.247, TotallyNotJson.1542}; - ret TotallyNotJson.1541; + jump TotallyNotJson.987 TotallyNotJson.212; + +procedure TotallyNotJson.203 (TotallyNotJson.975, TotallyNotJson.976): + let TotallyNotJson.209 : Str = StructAtIndex 0 TotallyNotJson.976; + let TotallyNotJson.210 : Str = StructAtIndex 1 TotallyNotJson.976; + let TotallyNotJson.207 : List U8 = StructAtIndex 0 TotallyNotJson.975; + let TotallyNotJson.208 : U64 = StructAtIndex 1 TotallyNotJson.975; + let TotallyNotJson.1037 : I64 = 34i64; + let TotallyNotJson.1036 : U8 = CallByName Num.127 TotallyNotJson.1037; + let TotallyNotJson.1034 : List U8 = CallByName List.4 TotallyNotJson.207 TotallyNotJson.1036; + let TotallyNotJson.1035 : List U8 = CallByName Str.12 TotallyNotJson.209; + let TotallyNotJson.1031 : List U8 = CallByName List.8 TotallyNotJson.1034 TotallyNotJson.1035; + let TotallyNotJson.1033 : I64 = 34i64; + let TotallyNotJson.1032 : U8 = CallByName Num.127 TotallyNotJson.1033; + let TotallyNotJson.1028 : List U8 = CallByName List.4 TotallyNotJson.1031 TotallyNotJson.1032; + let TotallyNotJson.1030 : I64 = 58i64; + let TotallyNotJson.1029 : U8 = CallByName Num.127 TotallyNotJson.1030; + let TotallyNotJson.1026 : List U8 = CallByName List.4 TotallyNotJson.1028 TotallyNotJson.1029; + let TotallyNotJson.1027 : {} = Struct {}; + let TotallyNotJson.212 : List U8 = CallByName Encode.24 TotallyNotJson.1026 TotallyNotJson.210 TotallyNotJson.1027; + joinpoint TotallyNotJson.1021 TotallyNotJson.213: + let TotallyNotJson.1019 : U64 = 1i64; + let TotallyNotJson.1018 : U64 = CallByName Num.20 TotallyNotJson.208 TotallyNotJson.1019; + let TotallyNotJson.1017 : {List U8, U64} = Struct {TotallyNotJson.213, TotallyNotJson.1018}; + ret TotallyNotJson.1017; in - let TotallyNotJson.1549 : U64 = 1i64; - let TotallyNotJson.1546 : Int1 = CallByName Num.24 TotallyNotJson.242 TotallyNotJson.1549; - if TotallyNotJson.1546 then - let TotallyNotJson.1548 : I64 = 44i64; - let TotallyNotJson.1547 : U8 = CallByName Num.127 TotallyNotJson.1548; - let TotallyNotJson.1544 : List U8 = CallByName List.4 TotallyNotJson.246 TotallyNotJson.1547; - jump TotallyNotJson.1545 TotallyNotJson.1544; + let TotallyNotJson.1025 : U64 = 1i64; + let TotallyNotJson.1022 : Int1 = CallByName Num.24 TotallyNotJson.208 TotallyNotJson.1025; + if TotallyNotJson.1022 then + let TotallyNotJson.1024 : I64 = 44i64; + let TotallyNotJson.1023 : U8 = CallByName Num.127 TotallyNotJson.1024; + let TotallyNotJson.1020 : List U8 = CallByName List.4 TotallyNotJson.212 TotallyNotJson.1023; + jump TotallyNotJson.1021 TotallyNotJson.1020; else - jump TotallyNotJson.1545 TotallyNotJson.246; - -procedure TotallyNotJson.25 (TotallyNotJson.181): - let TotallyNotJson.1887 : Str = CallByName Encode.23 TotallyNotJson.181; - ret TotallyNotJson.1887; - -procedure TotallyNotJson.26 (TotallyNotJson.184): - let TotallyNotJson.185 : List U8 = CallByName Str.12 TotallyNotJson.184; - let TotallyNotJson.1969 : U64 = 0i64; - let TotallyNotJson.1970 : Int1 = true; - let TotallyNotJson.186 : {U64, Int1} = Struct {TotallyNotJson.1969, TotallyNotJson.1970}; - let TotallyNotJson.1939 : {} = Struct {}; - inc TotallyNotJson.185; - let TotallyNotJson.187 : {U64, Int1} = CallByName List.26 TotallyNotJson.185 TotallyNotJson.186 TotallyNotJson.1939; - let TotallyNotJson.1893 : Int1 = StructAtIndex 1 TotallyNotJson.187; - let TotallyNotJson.1937 : Int1 = true; - let TotallyNotJson.1938 : Int1 = lowlevel Eq TotallyNotJson.1937 TotallyNotJson.1893; - if TotallyNotJson.1938 then - let TotallyNotJson.1903 : U64 = CallByName List.6 TotallyNotJson.185; - let TotallyNotJson.1904 : U64 = 2i64; - let TotallyNotJson.1902 : U64 = CallByName Num.19 TotallyNotJson.1903 TotallyNotJson.1904; - let TotallyNotJson.1899 : List U8 = CallByName List.68 TotallyNotJson.1902; - let TotallyNotJson.1901 : U8 = 34i64; - let TotallyNotJson.1900 : List U8 = Array [TotallyNotJson.1901]; - let TotallyNotJson.1898 : List U8 = CallByName List.8 TotallyNotJson.1899 TotallyNotJson.1900; - let TotallyNotJson.1895 : List U8 = CallByName List.8 TotallyNotJson.1898 TotallyNotJson.185; - let TotallyNotJson.1897 : U8 = 34i64; - let TotallyNotJson.1896 : List U8 = Array [TotallyNotJson.1897]; - let TotallyNotJson.1894 : List U8 = CallByName List.8 TotallyNotJson.1895 TotallyNotJson.1896; - ret TotallyNotJson.1894; + jump TotallyNotJson.1021 TotallyNotJson.212; + +procedure TotallyNotJson.25 (TotallyNotJson.149): + let TotallyNotJson.1041 : Str = CallByName Encode.23 TotallyNotJson.149; + ret TotallyNotJson.1041; + +procedure TotallyNotJson.26 (TotallyNotJson.152): + let TotallyNotJson.153 : List U8 = CallByName Str.12 TotallyNotJson.152; + let TotallyNotJson.1123 : U64 = 0i64; + let TotallyNotJson.1124 : Int1 = true; + let TotallyNotJson.154 : {U64, Int1} = Struct {TotallyNotJson.1123, TotallyNotJson.1124}; + let TotallyNotJson.1093 : {} = Struct {}; + inc TotallyNotJson.153; + let TotallyNotJson.155 : {U64, Int1} = CallByName List.26 TotallyNotJson.153 TotallyNotJson.154 TotallyNotJson.1093; + let TotallyNotJson.1047 : Int1 = StructAtIndex 1 TotallyNotJson.155; + let TotallyNotJson.1091 : Int1 = true; + let TotallyNotJson.1092 : Int1 = lowlevel Eq TotallyNotJson.1091 TotallyNotJson.1047; + if TotallyNotJson.1092 then + let TotallyNotJson.1057 : U64 = CallByName List.6 TotallyNotJson.153; + let TotallyNotJson.1058 : U64 = 2i64; + let TotallyNotJson.1056 : U64 = CallByName Num.19 TotallyNotJson.1057 TotallyNotJson.1058; + let TotallyNotJson.1053 : List U8 = CallByName List.68 TotallyNotJson.1056; + let TotallyNotJson.1055 : U8 = 34i64; + let TotallyNotJson.1054 : List U8 = Array [TotallyNotJson.1055]; + let TotallyNotJson.1052 : List U8 = CallByName List.8 TotallyNotJson.1053 TotallyNotJson.1054; + let TotallyNotJson.1049 : List U8 = CallByName List.8 TotallyNotJson.1052 TotallyNotJson.153; + let TotallyNotJson.1051 : U8 = 34i64; + let TotallyNotJson.1050 : List U8 = Array [TotallyNotJson.1051]; + let TotallyNotJson.1048 : List U8 = CallByName List.8 TotallyNotJson.1049 TotallyNotJson.1050; + ret TotallyNotJson.1048; else - inc TotallyNotJson.185; - let TotallyNotJson.1936 : U64 = StructAtIndex 0 TotallyNotJson.187; - let TotallyNotJson.1935 : {List U8, List U8} = CallByName List.52 TotallyNotJson.185 TotallyNotJson.1936; - let TotallyNotJson.211 : List U8 = StructAtIndex 0 TotallyNotJson.1935; - let TotallyNotJson.213 : List U8 = StructAtIndex 1 TotallyNotJson.1935; - let TotallyNotJson.1933 : U64 = CallByName List.6 TotallyNotJson.185; - dec TotallyNotJson.185; - let TotallyNotJson.1934 : U64 = 120i64; - let TotallyNotJson.1931 : U64 = CallByName Num.21 TotallyNotJson.1933 TotallyNotJson.1934; - let TotallyNotJson.1932 : U64 = 100i64; - let TotallyNotJson.1930 : U64 = CallByName Num.94 TotallyNotJson.1931 TotallyNotJson.1932; - let TotallyNotJson.1927 : List U8 = CallByName List.68 TotallyNotJson.1930; - let TotallyNotJson.1929 : U8 = 34i64; - let TotallyNotJson.1928 : List U8 = Array [TotallyNotJson.1929]; - let TotallyNotJson.1926 : List U8 = CallByName List.8 TotallyNotJson.1927 TotallyNotJson.1928; - let TotallyNotJson.214 : List U8 = CallByName List.8 TotallyNotJson.1926 TotallyNotJson.211; - let TotallyNotJson.1909 : {} = Struct {}; - let TotallyNotJson.1906 : List U8 = CallByName List.18 TotallyNotJson.213 TotallyNotJson.214 TotallyNotJson.1909; - let TotallyNotJson.1908 : U8 = 34i64; - let TotallyNotJson.1907 : List U8 = Array [TotallyNotJson.1908]; - let TotallyNotJson.1905 : List U8 = CallByName List.8 TotallyNotJson.1906 TotallyNotJson.1907; - ret TotallyNotJson.1905; - -procedure TotallyNotJson.27 (TotallyNotJson.218): - switch TotallyNotJson.218: + inc TotallyNotJson.153; + let TotallyNotJson.1090 : U64 = StructAtIndex 0 TotallyNotJson.155; + let TotallyNotJson.1089 : {List U8, List U8} = CallByName List.52 TotallyNotJson.153 TotallyNotJson.1090; + let TotallyNotJson.179 : List U8 = StructAtIndex 0 TotallyNotJson.1089; + let TotallyNotJson.181 : List U8 = StructAtIndex 1 TotallyNotJson.1089; + let TotallyNotJson.1087 : U64 = CallByName List.6 TotallyNotJson.153; + dec TotallyNotJson.153; + let TotallyNotJson.1088 : U64 = 120i64; + let TotallyNotJson.1085 : U64 = CallByName Num.21 TotallyNotJson.1087 TotallyNotJson.1088; + let TotallyNotJson.1086 : U64 = 100i64; + let TotallyNotJson.1084 : U64 = CallByName Num.94 TotallyNotJson.1085 TotallyNotJson.1086; + let TotallyNotJson.1081 : List U8 = CallByName List.68 TotallyNotJson.1084; + let TotallyNotJson.1083 : U8 = 34i64; + let TotallyNotJson.1082 : List U8 = Array [TotallyNotJson.1083]; + let TotallyNotJson.1080 : List U8 = CallByName List.8 TotallyNotJson.1081 TotallyNotJson.1082; + let TotallyNotJson.182 : List U8 = CallByName List.8 TotallyNotJson.1080 TotallyNotJson.179; + let TotallyNotJson.1063 : {} = Struct {}; + let TotallyNotJson.1060 : List U8 = CallByName List.18 TotallyNotJson.181 TotallyNotJson.182 TotallyNotJson.1063; + let TotallyNotJson.1062 : U8 = 34i64; + let TotallyNotJson.1061 : List U8 = Array [TotallyNotJson.1062]; + let TotallyNotJson.1059 : List U8 = CallByName List.8 TotallyNotJson.1060 TotallyNotJson.1061; + ret TotallyNotJson.1059; + +procedure TotallyNotJson.27 (TotallyNotJson.186): + switch TotallyNotJson.186: case 34: - let TotallyNotJson.1912 : List U8 = Array [92i64, 34i64]; - ret TotallyNotJson.1912; + let TotallyNotJson.1066 : List U8 = Array [92i64, 34i64]; + ret TotallyNotJson.1066; case 92: - let TotallyNotJson.1913 : List U8 = Array [92i64, 92i64]; - ret TotallyNotJson.1913; + let TotallyNotJson.1067 : List U8 = Array [92i64, 92i64]; + ret TotallyNotJson.1067; case 47: - let TotallyNotJson.1914 : List U8 = Array [92i64, 47i64]; - ret TotallyNotJson.1914; + let TotallyNotJson.1068 : List U8 = Array [92i64, 47i64]; + ret TotallyNotJson.1068; case 8: - let TotallyNotJson.1916 : U8 = 98i64; - let TotallyNotJson.1915 : List U8 = Array [92i64, TotallyNotJson.1916]; - ret TotallyNotJson.1915; + let TotallyNotJson.1070 : U8 = 98i64; + let TotallyNotJson.1069 : List U8 = Array [92i64, TotallyNotJson.1070]; + ret TotallyNotJson.1069; case 12: - let TotallyNotJson.1918 : U8 = 102i64; - let TotallyNotJson.1917 : List U8 = Array [92i64, TotallyNotJson.1918]; - ret TotallyNotJson.1917; + let TotallyNotJson.1072 : U8 = 102i64; + let TotallyNotJson.1071 : List U8 = Array [92i64, TotallyNotJson.1072]; + ret TotallyNotJson.1071; case 10: - let TotallyNotJson.1920 : U8 = 110i64; - let TotallyNotJson.1919 : List U8 = Array [92i64, TotallyNotJson.1920]; - ret TotallyNotJson.1919; + let TotallyNotJson.1074 : U8 = 110i64; + let TotallyNotJson.1073 : List U8 = Array [92i64, TotallyNotJson.1074]; + ret TotallyNotJson.1073; case 13: - let TotallyNotJson.1922 : U8 = 114i64; - let TotallyNotJson.1921 : List U8 = Array [92i64, TotallyNotJson.1922]; - ret TotallyNotJson.1921; + let TotallyNotJson.1076 : U8 = 114i64; + let TotallyNotJson.1075 : List U8 = Array [92i64, TotallyNotJson.1076]; + ret TotallyNotJson.1075; case 9: - let TotallyNotJson.1924 : U8 = 114i64; - let TotallyNotJson.1923 : List U8 = Array [92i64, TotallyNotJson.1924]; - ret TotallyNotJson.1923; + let TotallyNotJson.1078 : U8 = 114i64; + let TotallyNotJson.1077 : List U8 = Array [92i64, TotallyNotJson.1078]; + ret TotallyNotJson.1077; default: - let TotallyNotJson.1925 : List U8 = Array [TotallyNotJson.218]; - ret TotallyNotJson.1925; + let TotallyNotJson.1079 : List U8 = Array [TotallyNotJson.186]; + ret TotallyNotJson.1079; -procedure TotallyNotJson.29 (TotallyNotJson.233): - let TotallyNotJson.1173 : List {Str, Str} = CallByName Encode.23 TotallyNotJson.233; - ret TotallyNotJson.1173; +procedure TotallyNotJson.29 (TotallyNotJson.200): + let TotallyNotJson.1007 : List {Str, Str} = CallByName Encode.23 TotallyNotJson.200; + ret TotallyNotJson.1007; -procedure TotallyNotJson.29 (TotallyNotJson.233): - let TotallyNotJson.1531 : List {Str, Str} = CallByName Encode.23 TotallyNotJson.233; - ret TotallyNotJson.1531; +procedure TotallyNotJson.29 (TotallyNotJson.200): + let TotallyNotJson.971 : List {Str, Str} = CallByName Encode.23 TotallyNotJson.200; + ret TotallyNotJson.971; procedure TotallyNotJson.8 (): - let TotallyNotJson.1172 : [C , C [], C , C , C , C ] = TagId(2) ; - ret TotallyNotJson.1172; - -procedure TotallyNotJson.82 (TotallyNotJson.802, TotallyNotJson.803): - let TotallyNotJson.1883 : U8 = GetTagId TotallyNotJson.803; - switch TotallyNotJson.1883: - case 2: - ret TotallyNotJson.802; - - case 5: - let TotallyNotJson.1563 : Str = CallByName TotallyNotJson.87 TotallyNotJson.802; - ret TotallyNotJson.1563; - - case 4: - let TotallyNotJson.1755 : Str = CallByName TotallyNotJson.88 TotallyNotJson.802; - ret TotallyNotJson.1755; - - case 3: - let TotallyNotJson.1845 : Str = CallByName TotallyNotJson.89 TotallyNotJson.802; - ret TotallyNotJson.1845; - - case 0: - let TotallyNotJson.1879 : Str = CallByName TotallyNotJson.90 TotallyNotJson.802; - ret TotallyNotJson.1879; - - default: - dec TotallyNotJson.802; - let TotallyNotJson.804 : [] = UnionAtIndex (Id 1) (Index 0) TotallyNotJson.803; - let TotallyNotJson.1882 : Str = "a Lambda Set is empty. Most likely there is a type error in your program."; - Crash TotallyNotJson.1882 - - -procedure TotallyNotJson.832 (TotallyNotJson.1496): - let TotallyNotJson.1853 : List Str = StructAtIndex 1 TotallyNotJson.1496; - let #Derived_gen.59 : List Str = StructAtIndex 0 TotallyNotJson.1496; - dec #Derived_gen.59; - ret TotallyNotJson.1853; - -procedure TotallyNotJson.840 (TotallyNotJson.1214): - let TotallyNotJson.1571 : List Str = StructAtIndex 1 TotallyNotJson.1214; - let #Derived_gen.57 : List Str = StructAtIndex 0 TotallyNotJson.1214; - dec #Derived_gen.57; - ret TotallyNotJson.1571; - -procedure TotallyNotJson.87 (TotallyNotJson.809): - let TotallyNotJson.1564 : Str = CallByName TotallyNotJson.97 TotallyNotJson.809; - ret TotallyNotJson.1564; - -procedure TotallyNotJson.88 (TotallyNotJson.810): - let TotallyNotJson.1756 : Str = CallByName TotallyNotJson.94 TotallyNotJson.810; - ret TotallyNotJson.1756; - -procedure TotallyNotJson.89 (TotallyNotJson.811): - let TotallyNotJson.1846 : Str = CallByName TotallyNotJson.95 TotallyNotJson.811; - ret TotallyNotJson.1846; - -procedure TotallyNotJson.90 (TotallyNotJson.812): - ret TotallyNotJson.812; - -procedure TotallyNotJson.94 (TotallyNotJson.824): - let TotallyNotJson.825 : List Str = CallByName Str.55 TotallyNotJson.824; - let TotallyNotJson.1842 : U64 = lowlevel ListLen TotallyNotJson.825; - let TotallyNotJson.1843 : U64 = 1i64; - let TotallyNotJson.1844 : Int1 = lowlevel NumGte TotallyNotJson.1842 TotallyNotJson.1843; - if TotallyNotJson.1844 then - dec TotallyNotJson.824; - let TotallyNotJson.1841 : U64 = 0i64; - let TotallyNotJson.826 : Str = lowlevel ListGetUnsafe TotallyNotJson.825 TotallyNotJson.1841; - inc TotallyNotJson.826; - let TotallyNotJson.827 : Str = CallByName TotallyNotJson.100 TotallyNotJson.826; - let TotallyNotJson.1760 : U64 = 1i64; - let TotallyNotJson.828 : List Str = CallByName List.38 TotallyNotJson.825 TotallyNotJson.1760; - let TotallyNotJson.1758 : List Str = CallByName List.13 TotallyNotJson.828 TotallyNotJson.827; - let TotallyNotJson.1759 : Str = ""; - let TotallyNotJson.1757 : Str = CallByName Str.4 TotallyNotJson.1758 TotallyNotJson.1759; - dec TotallyNotJson.1758; - dec TotallyNotJson.1759; - ret TotallyNotJson.1757; - else - dec TotallyNotJson.825; - ret TotallyNotJson.824; - -procedure TotallyNotJson.95 (TotallyNotJson.829): - let TotallyNotJson.830 : List Str = CallByName Str.55 TotallyNotJson.829; - dec TotallyNotJson.829; - let TotallyNotJson.1878 : U64 = CallByName List.6 TotallyNotJson.830; - let TotallyNotJson.831 : List Str = CallByName List.68 TotallyNotJson.1878; - let TotallyNotJson.1854 : {List Str, List Str} = Struct {TotallyNotJson.830, TotallyNotJson.831}; - let TotallyNotJson.1850 : {List Str, List Str} = CallByName TotallyNotJson.96 TotallyNotJson.1854; - let TotallyNotJson.1851 : {} = Struct {}; - let TotallyNotJson.1848 : List Str = CallByName TotallyNotJson.832 TotallyNotJson.1850; - let TotallyNotJson.1849 : Str = ""; - let TotallyNotJson.1847 : Str = CallByName Str.4 TotallyNotJson.1848 TotallyNotJson.1849; - dec TotallyNotJson.1848; - dec TotallyNotJson.1849; - ret TotallyNotJson.1847; - -procedure TotallyNotJson.96 (#Derived_gen.56): - joinpoint TotallyNotJson.1855 TotallyNotJson.1168: - let TotallyNotJson.834 : List Str = StructAtIndex 0 TotallyNotJson.1168; - let TotallyNotJson.833 : List Str = StructAtIndex 1 TotallyNotJson.1168; - let TotallyNotJson.1875 : U64 = lowlevel ListLen TotallyNotJson.834; - let TotallyNotJson.1876 : U64 = 1i64; - let TotallyNotJson.1877 : Int1 = lowlevel NumGte TotallyNotJson.1875 TotallyNotJson.1876; - if TotallyNotJson.1877 then - let TotallyNotJson.1874 : U64 = 0i64; - let TotallyNotJson.835 : Str = lowlevel ListGetUnsafe TotallyNotJson.834 TotallyNotJson.1874; - inc 2 TotallyNotJson.835; - joinpoint TotallyNotJson.1872 TotallyNotJson.1871: - if TotallyNotJson.1871 then - let TotallyNotJson.1864 : U64 = 1i64; - let TotallyNotJson.1859 : List Str = CallByName List.38 TotallyNotJson.834 TotallyNotJson.1864; - let TotallyNotJson.1862 : Str = "-"; - let TotallyNotJson.1863 : Str = CallByName TotallyNotJson.101 TotallyNotJson.835; - let TotallyNotJson.1861 : List Str = Array [TotallyNotJson.1862, TotallyNotJson.1863]; - let TotallyNotJson.1860 : List Str = CallByName List.8 TotallyNotJson.833 TotallyNotJson.1861; - let TotallyNotJson.1858 : {List Str, List Str} = Struct {TotallyNotJson.1859, TotallyNotJson.1860}; - jump TotallyNotJson.1855 TotallyNotJson.1858; - else - dec TotallyNotJson.835; - let TotallyNotJson.1870 : U64 = 0i64; - let TotallyNotJson.836 : Str = lowlevel ListGetUnsafe TotallyNotJson.834 TotallyNotJson.1870; - inc TotallyNotJson.836; - let TotallyNotJson.1869 : U64 = 1i64; - let TotallyNotJson.1867 : List Str = CallByName List.38 TotallyNotJson.834 TotallyNotJson.1869; - let TotallyNotJson.1868 : List Str = CallByName List.4 TotallyNotJson.833 TotallyNotJson.836; - let TotallyNotJson.1866 : {List Str, List Str} = Struct {TotallyNotJson.1867, TotallyNotJson.1868}; - jump TotallyNotJson.1855 TotallyNotJson.1866; - in - let TotallyNotJson.1873 : Int1 = CallByName TotallyNotJson.102 TotallyNotJson.835; - jump TotallyNotJson.1872 TotallyNotJson.1873; - else - let TotallyNotJson.1856 : {List Str, List Str} = Struct {TotallyNotJson.834, TotallyNotJson.833}; - ret TotallyNotJson.1856; - in - jump TotallyNotJson.1855 #Derived_gen.56; - -procedure TotallyNotJson.97 (TotallyNotJson.837): - let TotallyNotJson.838 : List Str = CallByName Str.55 TotallyNotJson.837; - dec TotallyNotJson.837; - let TotallyNotJson.1754 : U64 = CallByName List.6 TotallyNotJson.838; - let TotallyNotJson.839 : List Str = CallByName List.68 TotallyNotJson.1754; - let TotallyNotJson.1572 : {List Str, List Str} = Struct {TotallyNotJson.838, TotallyNotJson.839}; - let TotallyNotJson.1568 : {List Str, List Str} = CallByName TotallyNotJson.98 TotallyNotJson.1572; - let TotallyNotJson.1569 : {} = Struct {}; - let TotallyNotJson.1566 : List Str = CallByName TotallyNotJson.840 TotallyNotJson.1568; - let TotallyNotJson.1567 : Str = ""; - let TotallyNotJson.1565 : Str = CallByName Str.4 TotallyNotJson.1566 TotallyNotJson.1567; - dec TotallyNotJson.1566; - dec TotallyNotJson.1567; - ret TotallyNotJson.1565; - -procedure TotallyNotJson.98 (#Derived_gen.41): - joinpoint TotallyNotJson.1573 TotallyNotJson.1169: - let TotallyNotJson.842 : List Str = StructAtIndex 0 TotallyNotJson.1169; - let TotallyNotJson.841 : List Str = StructAtIndex 1 TotallyNotJson.1169; - let TotallyNotJson.1751 : U64 = lowlevel ListLen TotallyNotJson.842; - let TotallyNotJson.1752 : U64 = 1i64; - let TotallyNotJson.1753 : Int1 = lowlevel NumGte TotallyNotJson.1751 TotallyNotJson.1752; - if TotallyNotJson.1753 then - let TotallyNotJson.1750 : U64 = 0i64; - let TotallyNotJson.843 : Str = lowlevel ListGetUnsafe TotallyNotJson.842 TotallyNotJson.1750; - inc 2 TotallyNotJson.843; - joinpoint TotallyNotJson.1669 TotallyNotJson.1668: - if TotallyNotJson.1668 then - let TotallyNotJson.1661 : U64 = 1i64; - let TotallyNotJson.1577 : List Str = CallByName List.38 TotallyNotJson.842 TotallyNotJson.1661; - let TotallyNotJson.1580 : Str = "_"; - let TotallyNotJson.1581 : Str = CallByName TotallyNotJson.101 TotallyNotJson.843; - let TotallyNotJson.1579 : List Str = Array [TotallyNotJson.1580, TotallyNotJson.1581]; - let TotallyNotJson.1578 : List Str = CallByName List.8 TotallyNotJson.841 TotallyNotJson.1579; - let TotallyNotJson.1576 : {List Str, List Str} = Struct {TotallyNotJson.1577, TotallyNotJson.1578}; - jump TotallyNotJson.1573 TotallyNotJson.1576; - else - dec TotallyNotJson.843; - let TotallyNotJson.1667 : U64 = 0i64; - let TotallyNotJson.844 : Str = lowlevel ListGetUnsafe TotallyNotJson.842 TotallyNotJson.1667; - inc TotallyNotJson.844; - let TotallyNotJson.1666 : U64 = 1i64; - let TotallyNotJson.1664 : List Str = CallByName List.38 TotallyNotJson.842 TotallyNotJson.1666; - let TotallyNotJson.1665 : List Str = CallByName List.4 TotallyNotJson.841 TotallyNotJson.844; - let TotallyNotJson.1663 : {List Str, List Str} = Struct {TotallyNotJson.1664, TotallyNotJson.1665}; - jump TotallyNotJson.1573 TotallyNotJson.1663; - in - let TotallyNotJson.1670 : Int1 = CallByName TotallyNotJson.102 TotallyNotJson.843; - jump TotallyNotJson.1669 TotallyNotJson.1670; - else - let TotallyNotJson.1574 : {List Str, List Str} = Struct {TotallyNotJson.842, TotallyNotJson.841}; - ret TotallyNotJson.1574; - in - jump TotallyNotJson.1573 #Derived_gen.41; + let TotallyNotJson.970 : {} = Struct {}; + ret TotallyNotJson.970; procedure Test.0 (): let Test.12 : Str = "bar"; - let Test.10 : [C , C [], C , C , C , C ] = CallByName TotallyNotJson.8; + let Test.10 : {} = CallByName TotallyNotJson.8; let Test.8 : List U8 = CallByName Encode.26 Test.12 Test.10; let Test.1 : [C {U64, U8}, C Str] = CallByName Str.9 Test.8; let Test.5 : U8 = 1i64; 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 34ccd66d7dd..0c981af2124 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 @@ -11,14 +11,6 @@ procedure #Derived.2 (#Derived.3, #Derived.4, #Derived.1): let #Derived_gen.3 : List U8 = CallByName Encode.24 #Derived.3 #Derived_gen.4 #Derived.4; ret #Derived_gen.3; -procedure Bool.1 (): - let Bool.49 : Int1 = false; - ret Bool.49; - -procedure Bool.2 (): - let Bool.48 : Int1 = true; - ret Bool.48; - procedure Encode.23 (Encode.98): ret Encode.98; @@ -33,11 +25,11 @@ procedure Encode.24 (Encode.99, Encode.107, Encode.101): ret Encode.111; procedure Encode.24 (Encode.99, Encode.107, Encode.101): - let Encode.113 : List U8 = CallByName TotallyNotJson.234 Encode.99 Encode.101 Encode.107; + let Encode.113 : List U8 = CallByName TotallyNotJson.201 Encode.99 Encode.101 Encode.107; ret Encode.113; procedure Encode.24 (Encode.99, Encode.107, Encode.101): - let Encode.116 : List U8 = CallByName TotallyNotJson.182 Encode.99 Encode.101 Encode.107; + let Encode.116 : List U8 = CallByName TotallyNotJson.150 Encode.99 Encode.101 Encode.107; ret Encode.116; procedure Encode.26 (Encode.105, Encode.106): @@ -46,1334 +38,447 @@ 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.13 (#Attr.2, #Attr.3): - let List.661 : List Str = lowlevel ListPrepend #Attr.2 #Attr.3; - ret List.661; +procedure List.102 (List.486, List.487, List.488): + let List.649 : U64 = 0i64; + let List.650 : U64 = CallByName List.6 List.486; + let List.648 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.80 List.486 List.487 List.488 List.649 List.650; + ret List.648; -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.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.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; - else - let List.201 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.674; - ret List.201; - -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.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; +procedure List.18 (List.158, List.159, List.160): + let List.593 : U64 = 0i64; + let List.594 : U64 = CallByName List.6 List.158; + let List.592 : {List U8, U64} = CallByName List.90 List.158 List.159 List.160 List.593 List.594; ret List.592; -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.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.18 (List.158, List.159, List.160): + let List.605 : U64 = 0i64; + let List.606 : U64 = CallByName List.6 List.158; + let List.604 : List U8 = CallByName List.90 List.158 List.159 List.160 List.605 List.606; + ret List.604; + +procedure List.26 (List.199, List.200, List.201): + let List.642 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.102 List.199 List.200 List.201; + let List.645 : U8 = 1i64; + let List.646 : U8 = GetTagId List.642; + let List.647 : Int1 = lowlevel Eq List.645 List.646; + if List.647 then + let List.202 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.642; + ret List.202; + else + let List.203 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.642; + ret List.203; -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; - ret List.636; +procedure List.4 (List.122, List.123): + let List.591 : U64 = 1i64; + let List.590 : List U8 = CallByName List.70 List.122 List.591; + let List.589 : List U8 = CallByName List.71 List.590 List.123; + ret List.589; -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.633 : U64 = StructAtIndex 1 List.419; + let List.634 : U64 = StructAtIndex 0 List.419; + let List.632 : List U8 = CallByName List.72 List.418 List.633 List.634; + ret List.632; -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.52 (List.433, List.434): + let List.435 : U64 = CallByName List.6 List.433; + joinpoint List.640 List.436: + let List.638 : U64 = 0i64; + let List.637 : {U64, U64} = Struct {List.436, List.638}; + inc List.433; + let List.437 : List U8 = CallByName List.49 List.433 List.637; + let List.636 : U64 = CallByName Num.75 List.435 List.436; + let List.631 : {U64, U64} = Struct {List.636, List.436}; + let List.438 : List U8 = CallByName List.49 List.433 List.631; + let List.630 : {List U8, List U8} = Struct {List.437, List.438}; + ret List.630; in - let List.673 : Int1 = CallByName Num.24 List.433 List.432; - if List.673 then - jump List.672 List.432; + let List.641 : Int1 = CallByName Num.24 List.435 List.434; + if List.641 then + jump List.640 List.434; else - jump List.672 List.433; - -procedure List.6 (#Attr.2): - let List.657 : U64 = lowlevel ListLen #Attr.2; - ret List.657; + jump List.640 List.435; procedure List.6 (#Attr.2): - let List.658 : U64 = lowlevel ListLen #Attr.2; - ret List.658; + let List.625 : U64 = lowlevel ListLen #Attr.2; + ret List.625; procedure List.6 (#Attr.2): - let List.660 : U64 = lowlevel ListLen #Attr.2; - ret List.660; + let List.627 : U64 = lowlevel ListLen #Attr.2; + ret List.627; procedure List.66 (#Attr.2, #Attr.3): - let List.608 : {Str, Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.608; + let List.602 : {Str, Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.602; 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.653 : List Str = lowlevel ListWithCapacity #Attr.2; - ret List.653; + let List.614 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.614; procedure List.68 (#Attr.2): - let List.655 : List U8 = lowlevel ListWithCapacity #Attr.2; - ret List.655; + let List.629 : List U8 = lowlevel ListWithCapacity #Attr.2; + ret List.629; procedure List.70 (#Attr.2, #Attr.3): - let List.574 : List U8 = lowlevel ListReserve #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; - ret List.591; - -procedure List.71 (#Attr.2, #Attr.3): - let List.572 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.572; + let List.576 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; + ret List.576; 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.639 : List Str = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; - ret List.639; + 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.667 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; - ret List.667; + let List.635 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; + ret List.635; procedure List.8 (#Attr.2, #Attr.3): - let List.624 : List Str = lowlevel ListConcat #Attr.2 #Attr.3; + let List.624 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; ret List.624; -procedure List.8 (#Attr.2, #Attr.3): - let List.632 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; - ret List.632; - -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; +procedure List.80 (#Derived_gen.18, #Derived_gen.19, #Derived_gen.20, #Derived_gen.21, #Derived_gen.22): + joinpoint List.651 List.489 List.490 List.491 List.492 List.493: + let List.653 : Int1 = CallByName Num.22 List.492 List.493; + if List.653 then + let List.662 : U8 = CallByName List.66 List.489 List.492; + let List.654 : [C {U64, Int1}, C {U64, Int1}] = CallByName TotallyNotJson.157 List.490 List.662; + let List.659 : U8 = 1i64; + let List.660 : U8 = GetTagId List.654; + let List.661 : Int1 = lowlevel Eq List.659 List.660; + if List.661 then + let List.494 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.654; + let List.657 : U64 = 1i64; + let List.656 : U64 = CallByName Num.51 List.492 List.657; + jump List.651 List.489 List.494 List.491 List.656 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.654; + let List.658 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) List.495; + ret List.658; 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.652 : [C {U64, Int1}, C {U64, Int1}] = TagId(1) List.490; + ret List.652; in - jump List.683 #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; + jump List.651 #Derived_gen.18 #Derived_gen.19 #Derived_gen.20 #Derived_gen.21 #Derived_gen.22; + +procedure List.90 (#Derived_gen.10, #Derived_gen.11, #Derived_gen.12, #Derived_gen.13, #Derived_gen.14): + joinpoint List.607 List.161 List.162 List.163 List.164 List.165: + let List.609 : Int1 = CallByName Num.22 List.164 List.165; + if List.609 then + let List.613 : U8 = CallByName List.66 List.161 List.164; + let List.166 : List U8 = CallByName TotallyNotJson.183 List.162 List.613; + let List.612 : U64 = 1i64; + let List.611 : U64 = CallByName Num.51 List.164 List.612; + jump List.607 List.161 List.166 List.163 List.611 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; - -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; + jump List.607 #Derived_gen.10 #Derived_gen.11 #Derived_gen.12 #Derived_gen.13 #Derived_gen.14; + +procedure List.90 (#Derived_gen.26, #Derived_gen.27, #Derived_gen.28, #Derived_gen.29, #Derived_gen.30): + joinpoint List.595 List.161 List.162 List.163 List.164 List.165: + let List.597 : Int1 = CallByName Num.22 List.164 List.165; + if List.597 then + let List.601 : {Str, Str} = CallByName List.66 List.161 List.164; + inc List.601; + let List.166 : {List U8, U64} = CallByName TotallyNotJson.203 List.162 List.601; + let List.600 : U64 = 1i64; + let List.599 : U64 = CallByName Num.51 List.164 List.600; + jump List.595 List.161 List.166 List.163 List.599 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.595 #Derived_gen.26 #Derived_gen.27 #Derived_gen.28 #Derived_gen.29 #Derived_gen.30; procedure Num.127 (#Attr.2): - let Num.296 : U8 = lowlevel NumIntCast #Attr.2; - ret Num.296; + let Num.308 : U8 = lowlevel NumIntCast #Attr.2; + ret Num.308; procedure Num.19 (#Attr.2, #Attr.3): - let Num.300 : U64 = lowlevel NumAdd #Attr.2 #Attr.3; - ret Num.300; + let Num.312 : U64 = lowlevel NumAdd #Attr.2 #Attr.3; + ret Num.312; procedure Num.20 (#Attr.2, #Attr.3): - let Num.297 : U64 = lowlevel NumSub #Attr.2 #Attr.3; - ret Num.297; + let Num.309 : U64 = lowlevel NumSub #Attr.2 #Attr.3; + ret Num.309; procedure Num.21 (#Attr.2, #Attr.3): - let Num.302 : U64 = lowlevel NumMul #Attr.2 #Attr.3; - ret Num.302; + let Num.314 : U64 = lowlevel NumMul #Attr.2 #Attr.3; + ret Num.314; procedure Num.22 (#Attr.2, #Attr.3): - let Num.308 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; - ret Num.308; + let Num.320 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; + ret Num.320; procedure Num.24 (#Attr.2, #Attr.3): - let Num.316 : Int1 = lowlevel NumGt #Attr.2 #Attr.3; - ret Num.316; + let Num.322 : Int1 = lowlevel NumGt #Attr.2 #Attr.3; + ret Num.322; procedure Num.51 (#Attr.2, #Attr.3): - let Num.305 : U64 = lowlevel NumAddWrap #Attr.2 #Attr.3; - ret Num.305; + let Num.317 : U64 = lowlevel NumAddWrap #Attr.2 #Attr.3; + ret Num.317; procedure Num.75 (#Attr.2, #Attr.3): - let Num.315 : U64 = lowlevel NumSubWrap #Attr.2 #Attr.3; - ret Num.315; - -procedure Num.77 (#Attr.2, #Attr.3): - let Num.314 : U64 = lowlevel NumSubSaturated #Attr.2 #Attr.3; - ret Num.314; + let Num.321 : U64 = lowlevel NumSubWrap #Attr.2 #Attr.3; + ret Num.321; procedure Num.94 (#Attr.2, #Attr.3): - let Num.301 : U64 = lowlevel NumDivCeilUnchecked #Attr.2 #Attr.3; - ret Num.301; + let Num.313 : U64 = lowlevel NumDivCeilUnchecked #Attr.2 #Attr.3; + ret Num.313; procedure Str.12 (#Attr.2): - let Str.303 : List U8 = lowlevel StrToUtf8 #Attr.2; - ret Str.303; - -procedure Str.4 (#Attr.2, #Attr.3): - let Str.306 : Str = lowlevel StrJoinWith #Attr.2 #Attr.3; - ret Str.306; - -procedure Str.48 (#Attr.2, #Attr.3, #Attr.4): - let Str.301 : {U64, Str, Int1, U8} = lowlevel StrFromUtf8Range #Attr.2 #Attr.3 #Attr.4; - ret Str.301; - -procedure Str.55 (#Attr.2): - let Str.309 : List Str = lowlevel StrGraphemes #Attr.2; - ret Str.309; - -procedure Str.9 (Str.80): - let Str.299 : U64 = 0i64; - let Str.300 : U64 = CallByName List.6 Str.80; - let Str.81 : {U64, Str, Int1, U8} = CallByName Str.48 Str.80 Str.299 Str.300; - let Str.296 : Int1 = StructAtIndex 2 Str.81; - if Str.296 then - let Str.298 : Str = StructAtIndex 1 Str.81; - let Str.297 : [C {U64, U8}, C Str] = TagId(1) Str.298; - ret Str.297; - else - let Str.294 : U8 = StructAtIndex 3 Str.81; - let Str.295 : U64 = StructAtIndex 0 Str.81; - let #Derived_gen.36 : Str = StructAtIndex 1 Str.81; - dec #Derived_gen.36; - let Str.293 : {U64, U8} = Struct {Str.295, Str.294}; - let Str.292 : [C {U64, U8}, C Str] = TagId(0) Str.293; - ret Str.292; - -procedure TotallyNotJson.100 (TotallyNotJson.850): - let TotallyNotJson.1482 : Str = "a"; - let TotallyNotJson.1483 : Int1 = lowlevel Eq TotallyNotJson.1482 TotallyNotJson.850; - dec TotallyNotJson.1482; - if TotallyNotJson.1483 then - dec TotallyNotJson.850; - let TotallyNotJson.1405 : Str = "A"; - ret TotallyNotJson.1405; + let Str.262 : List U8 = lowlevel StrToUtf8 #Attr.2; + ret Str.262; + +procedure Str.43 (#Attr.2, #Attr.3, #Attr.4): + let Str.260 : {U64, Str, Int1, U8} = lowlevel StrFromUtf8Range #Attr.2 #Attr.3 #Attr.4; + ret Str.260; + +procedure Str.9 (Str.68): + let Str.258 : U64 = 0i64; + let Str.259 : U64 = CallByName List.6 Str.68; + let Str.69 : {U64, Str, Int1, U8} = CallByName Str.43 Str.68 Str.258 Str.259; + let Str.255 : Int1 = StructAtIndex 2 Str.69; + if Str.255 then + let Str.257 : Str = StructAtIndex 1 Str.69; + let Str.256 : [C {U64, U8}, C Str] = TagId(1) Str.257; + ret Str.256; else - let TotallyNotJson.1480 : Str = "b"; - let TotallyNotJson.1481 : Int1 = lowlevel Eq TotallyNotJson.1480 TotallyNotJson.850; - dec TotallyNotJson.1480; - if TotallyNotJson.1481 then - dec TotallyNotJson.850; - let TotallyNotJson.1406 : Str = "B"; - ret TotallyNotJson.1406; - else - let TotallyNotJson.1478 : Str = "c"; - let TotallyNotJson.1479 : Int1 = lowlevel Eq TotallyNotJson.1478 TotallyNotJson.850; - dec TotallyNotJson.1478; - if TotallyNotJson.1479 then - dec TotallyNotJson.850; - let TotallyNotJson.1407 : Str = "C"; - ret TotallyNotJson.1407; - else - let TotallyNotJson.1476 : Str = "d"; - let TotallyNotJson.1477 : Int1 = lowlevel Eq TotallyNotJson.1476 TotallyNotJson.850; - dec TotallyNotJson.1476; - if TotallyNotJson.1477 then - dec TotallyNotJson.850; - let TotallyNotJson.1408 : Str = "D"; - ret TotallyNotJson.1408; - else - let TotallyNotJson.1474 : Str = "e"; - let TotallyNotJson.1475 : Int1 = lowlevel Eq TotallyNotJson.1474 TotallyNotJson.850; - dec TotallyNotJson.1474; - if TotallyNotJson.1475 then - dec TotallyNotJson.850; - let TotallyNotJson.1409 : Str = "E"; - ret TotallyNotJson.1409; - else - let TotallyNotJson.1472 : Str = "f"; - let TotallyNotJson.1473 : Int1 = lowlevel Eq TotallyNotJson.1472 TotallyNotJson.850; - dec TotallyNotJson.1472; - if TotallyNotJson.1473 then - dec TotallyNotJson.850; - let TotallyNotJson.1410 : Str = "F"; - ret TotallyNotJson.1410; - else - let TotallyNotJson.1470 : Str = "g"; - let TotallyNotJson.1471 : Int1 = lowlevel Eq TotallyNotJson.1470 TotallyNotJson.850; - dec TotallyNotJson.1470; - if TotallyNotJson.1471 then - dec TotallyNotJson.850; - let TotallyNotJson.1411 : Str = "G"; - ret TotallyNotJson.1411; - else - let TotallyNotJson.1468 : Str = "h"; - let TotallyNotJson.1469 : Int1 = lowlevel Eq TotallyNotJson.1468 TotallyNotJson.850; - dec TotallyNotJson.1468; - if TotallyNotJson.1469 then - dec TotallyNotJson.850; - let TotallyNotJson.1412 : Str = "H"; - ret TotallyNotJson.1412; - else - let TotallyNotJson.1466 : Str = "i"; - let TotallyNotJson.1467 : Int1 = lowlevel Eq TotallyNotJson.1466 TotallyNotJson.850; - dec TotallyNotJson.1466; - if TotallyNotJson.1467 then - dec TotallyNotJson.850; - let TotallyNotJson.1413 : Str = "I"; - ret TotallyNotJson.1413; - else - let TotallyNotJson.1464 : Str = "j"; - let TotallyNotJson.1465 : Int1 = lowlevel Eq TotallyNotJson.1464 TotallyNotJson.850; - dec TotallyNotJson.1464; - if TotallyNotJson.1465 then - dec TotallyNotJson.850; - let TotallyNotJson.1414 : Str = "J"; - ret TotallyNotJson.1414; - else - let TotallyNotJson.1462 : Str = "k"; - let TotallyNotJson.1463 : Int1 = lowlevel Eq TotallyNotJson.1462 TotallyNotJson.850; - dec TotallyNotJson.1462; - if TotallyNotJson.1463 then - dec TotallyNotJson.850; - let TotallyNotJson.1415 : Str = "K"; - ret TotallyNotJson.1415; - else - let TotallyNotJson.1460 : Str = "l"; - let TotallyNotJson.1461 : Int1 = lowlevel Eq TotallyNotJson.1460 TotallyNotJson.850; - dec TotallyNotJson.1460; - if TotallyNotJson.1461 then - dec TotallyNotJson.850; - let TotallyNotJson.1416 : Str = "L"; - ret TotallyNotJson.1416; - else - let TotallyNotJson.1458 : Str = "m"; - let TotallyNotJson.1459 : Int1 = lowlevel Eq TotallyNotJson.1458 TotallyNotJson.850; - dec TotallyNotJson.1458; - if TotallyNotJson.1459 then - dec TotallyNotJson.850; - let TotallyNotJson.1417 : Str = "M"; - ret TotallyNotJson.1417; - else - let TotallyNotJson.1456 : Str = "n"; - let TotallyNotJson.1457 : Int1 = lowlevel Eq TotallyNotJson.1456 TotallyNotJson.850; - dec TotallyNotJson.1456; - if TotallyNotJson.1457 then - dec TotallyNotJson.850; - let TotallyNotJson.1418 : Str = "N"; - ret TotallyNotJson.1418; - else - let TotallyNotJson.1454 : Str = "o"; - let TotallyNotJson.1455 : Int1 = lowlevel Eq TotallyNotJson.1454 TotallyNotJson.850; - dec TotallyNotJson.1454; - if TotallyNotJson.1455 then - dec TotallyNotJson.850; - let TotallyNotJson.1419 : Str = "O"; - ret TotallyNotJson.1419; - else - let TotallyNotJson.1452 : Str = "p"; - let TotallyNotJson.1453 : Int1 = lowlevel Eq TotallyNotJson.1452 TotallyNotJson.850; - dec TotallyNotJson.1452; - if TotallyNotJson.1453 then - dec TotallyNotJson.850; - let TotallyNotJson.1420 : Str = "P"; - ret TotallyNotJson.1420; - else - let TotallyNotJson.1450 : Str = "q"; - let TotallyNotJson.1451 : Int1 = lowlevel Eq TotallyNotJson.1450 TotallyNotJson.850; - dec TotallyNotJson.1450; - if TotallyNotJson.1451 then - dec TotallyNotJson.850; - let TotallyNotJson.1421 : Str = "Q"; - ret TotallyNotJson.1421; - else - let TotallyNotJson.1448 : Str = "r"; - let TotallyNotJson.1449 : Int1 = lowlevel Eq TotallyNotJson.1448 TotallyNotJson.850; - dec TotallyNotJson.1448; - if TotallyNotJson.1449 then - dec TotallyNotJson.850; - let TotallyNotJson.1422 : Str = "R"; - ret TotallyNotJson.1422; - else - let TotallyNotJson.1446 : Str = "s"; - let TotallyNotJson.1447 : Int1 = lowlevel Eq TotallyNotJson.1446 TotallyNotJson.850; - dec TotallyNotJson.1446; - if TotallyNotJson.1447 then - dec TotallyNotJson.850; - let TotallyNotJson.1423 : Str = "S"; - ret TotallyNotJson.1423; - else - let TotallyNotJson.1444 : Str = "t"; - let TotallyNotJson.1445 : Int1 = lowlevel Eq TotallyNotJson.1444 TotallyNotJson.850; - dec TotallyNotJson.1444; - if TotallyNotJson.1445 then - dec TotallyNotJson.850; - let TotallyNotJson.1424 : Str = "T"; - ret TotallyNotJson.1424; - else - let TotallyNotJson.1442 : Str = "u"; - let TotallyNotJson.1443 : Int1 = lowlevel Eq TotallyNotJson.1442 TotallyNotJson.850; - dec TotallyNotJson.1442; - if TotallyNotJson.1443 then - dec TotallyNotJson.850; - let TotallyNotJson.1425 : Str = "U"; - ret TotallyNotJson.1425; - else - let TotallyNotJson.1440 : Str = "v"; - let TotallyNotJson.1441 : Int1 = lowlevel Eq TotallyNotJson.1440 TotallyNotJson.850; - dec TotallyNotJson.1440; - if TotallyNotJson.1441 then - dec TotallyNotJson.850; - let TotallyNotJson.1426 : Str = "V"; - ret TotallyNotJson.1426; - else - let TotallyNotJson.1438 : Str = "w"; - let TotallyNotJson.1439 : Int1 = lowlevel Eq TotallyNotJson.1438 TotallyNotJson.850; - dec TotallyNotJson.1438; - if TotallyNotJson.1439 then - dec TotallyNotJson.850; - let TotallyNotJson.1427 : Str = "W"; - ret TotallyNotJson.1427; - else - let TotallyNotJson.1436 : Str = "x"; - let TotallyNotJson.1437 : Int1 = lowlevel Eq TotallyNotJson.1436 TotallyNotJson.850; - dec TotallyNotJson.1436; - if TotallyNotJson.1437 then - dec TotallyNotJson.850; - let TotallyNotJson.1428 : Str = "X"; - ret TotallyNotJson.1428; - else - let TotallyNotJson.1434 : Str = "y"; - let TotallyNotJson.1435 : Int1 = lowlevel Eq TotallyNotJson.1434 TotallyNotJson.850; - dec TotallyNotJson.1434; - if TotallyNotJson.1435 then - dec TotallyNotJson.850; - let TotallyNotJson.1429 : Str = "Y"; - ret TotallyNotJson.1429; - else - let TotallyNotJson.1432 : Str = "z"; - let TotallyNotJson.1433 : Int1 = lowlevel Eq TotallyNotJson.1432 TotallyNotJson.850; - dec TotallyNotJson.1432; - if TotallyNotJson.1433 then - dec TotallyNotJson.850; - let TotallyNotJson.1430 : Str = "Z"; - ret TotallyNotJson.1430; - else - ret TotallyNotJson.850; - -procedure TotallyNotJson.101 (TotallyNotJson.851): - let TotallyNotJson.1303 : Str = "A"; - let TotallyNotJson.1304 : Int1 = lowlevel Eq TotallyNotJson.1303 TotallyNotJson.851; - dec TotallyNotJson.1303; - if TotallyNotJson.1304 then - dec TotallyNotJson.851; - let TotallyNotJson.1226 : Str = "a"; - ret TotallyNotJson.1226; - else - let TotallyNotJson.1301 : Str = "B"; - let TotallyNotJson.1302 : Int1 = lowlevel Eq TotallyNotJson.1301 TotallyNotJson.851; - dec TotallyNotJson.1301; - if TotallyNotJson.1302 then - dec TotallyNotJson.851; - let TotallyNotJson.1227 : Str = "b"; - ret TotallyNotJson.1227; - else - let TotallyNotJson.1299 : Str = "C"; - let TotallyNotJson.1300 : Int1 = lowlevel Eq TotallyNotJson.1299 TotallyNotJson.851; - dec TotallyNotJson.1299; - if TotallyNotJson.1300 then - dec TotallyNotJson.851; - let TotallyNotJson.1228 : Str = "c"; - ret TotallyNotJson.1228; - else - let TotallyNotJson.1297 : Str = "D"; - let TotallyNotJson.1298 : Int1 = lowlevel Eq TotallyNotJson.1297 TotallyNotJson.851; - dec TotallyNotJson.1297; - if TotallyNotJson.1298 then - dec TotallyNotJson.851; - let TotallyNotJson.1229 : Str = "d"; - ret TotallyNotJson.1229; - else - let TotallyNotJson.1295 : Str = "E"; - let TotallyNotJson.1296 : Int1 = lowlevel Eq TotallyNotJson.1295 TotallyNotJson.851; - dec TotallyNotJson.1295; - if TotallyNotJson.1296 then - dec TotallyNotJson.851; - let TotallyNotJson.1230 : Str = "e"; - ret TotallyNotJson.1230; - else - let TotallyNotJson.1293 : Str = "F"; - let TotallyNotJson.1294 : Int1 = lowlevel Eq TotallyNotJson.1293 TotallyNotJson.851; - dec TotallyNotJson.1293; - if TotallyNotJson.1294 then - dec TotallyNotJson.851; - let TotallyNotJson.1231 : Str = "f"; - ret TotallyNotJson.1231; - else - let TotallyNotJson.1291 : Str = "G"; - let TotallyNotJson.1292 : Int1 = lowlevel Eq TotallyNotJson.1291 TotallyNotJson.851; - dec TotallyNotJson.1291; - if TotallyNotJson.1292 then - dec TotallyNotJson.851; - let TotallyNotJson.1232 : Str = "g"; - ret TotallyNotJson.1232; - else - let TotallyNotJson.1289 : Str = "H"; - let TotallyNotJson.1290 : Int1 = lowlevel Eq TotallyNotJson.1289 TotallyNotJson.851; - dec TotallyNotJson.1289; - if TotallyNotJson.1290 then - dec TotallyNotJson.851; - let TotallyNotJson.1233 : Str = "h"; - ret TotallyNotJson.1233; - else - let TotallyNotJson.1287 : Str = "I"; - let TotallyNotJson.1288 : Int1 = lowlevel Eq TotallyNotJson.1287 TotallyNotJson.851; - dec TotallyNotJson.1287; - if TotallyNotJson.1288 then - dec TotallyNotJson.851; - let TotallyNotJson.1234 : Str = "i"; - ret TotallyNotJson.1234; - else - let TotallyNotJson.1285 : Str = "J"; - let TotallyNotJson.1286 : Int1 = lowlevel Eq TotallyNotJson.1285 TotallyNotJson.851; - dec TotallyNotJson.1285; - if TotallyNotJson.1286 then - dec TotallyNotJson.851; - let TotallyNotJson.1235 : Str = "j"; - ret TotallyNotJson.1235; - else - let TotallyNotJson.1283 : Str = "K"; - let TotallyNotJson.1284 : Int1 = lowlevel Eq TotallyNotJson.1283 TotallyNotJson.851; - dec TotallyNotJson.1283; - if TotallyNotJson.1284 then - dec TotallyNotJson.851; - let TotallyNotJson.1236 : Str = "k"; - ret TotallyNotJson.1236; - else - let TotallyNotJson.1281 : Str = "L"; - let TotallyNotJson.1282 : Int1 = lowlevel Eq TotallyNotJson.1281 TotallyNotJson.851; - dec TotallyNotJson.1281; - if TotallyNotJson.1282 then - dec TotallyNotJson.851; - let TotallyNotJson.1237 : Str = "l"; - ret TotallyNotJson.1237; - else - let TotallyNotJson.1279 : Str = "M"; - let TotallyNotJson.1280 : Int1 = lowlevel Eq TotallyNotJson.1279 TotallyNotJson.851; - dec TotallyNotJson.1279; - if TotallyNotJson.1280 then - dec TotallyNotJson.851; - let TotallyNotJson.1238 : Str = "m"; - ret TotallyNotJson.1238; - else - let TotallyNotJson.1277 : Str = "N"; - let TotallyNotJson.1278 : Int1 = lowlevel Eq TotallyNotJson.1277 TotallyNotJson.851; - dec TotallyNotJson.1277; - if TotallyNotJson.1278 then - dec TotallyNotJson.851; - let TotallyNotJson.1239 : Str = "n"; - ret TotallyNotJson.1239; - else - let TotallyNotJson.1275 : Str = "O"; - let TotallyNotJson.1276 : Int1 = lowlevel Eq TotallyNotJson.1275 TotallyNotJson.851; - dec TotallyNotJson.1275; - if TotallyNotJson.1276 then - dec TotallyNotJson.851; - let TotallyNotJson.1240 : Str = "o"; - ret TotallyNotJson.1240; - else - let TotallyNotJson.1273 : Str = "P"; - let TotallyNotJson.1274 : Int1 = lowlevel Eq TotallyNotJson.1273 TotallyNotJson.851; - dec TotallyNotJson.1273; - if TotallyNotJson.1274 then - dec TotallyNotJson.851; - let TotallyNotJson.1241 : Str = "p"; - ret TotallyNotJson.1241; - else - let TotallyNotJson.1271 : Str = "Q"; - let TotallyNotJson.1272 : Int1 = lowlevel Eq TotallyNotJson.1271 TotallyNotJson.851; - dec TotallyNotJson.1271; - if TotallyNotJson.1272 then - dec TotallyNotJson.851; - let TotallyNotJson.1242 : Str = "q"; - ret TotallyNotJson.1242; - else - let TotallyNotJson.1269 : Str = "R"; - let TotallyNotJson.1270 : Int1 = lowlevel Eq TotallyNotJson.1269 TotallyNotJson.851; - dec TotallyNotJson.1269; - if TotallyNotJson.1270 then - dec TotallyNotJson.851; - let TotallyNotJson.1243 : Str = "r"; - ret TotallyNotJson.1243; - else - let TotallyNotJson.1267 : Str = "S"; - let TotallyNotJson.1268 : Int1 = lowlevel Eq TotallyNotJson.1267 TotallyNotJson.851; - dec TotallyNotJson.1267; - if TotallyNotJson.1268 then - dec TotallyNotJson.851; - let TotallyNotJson.1244 : Str = "s"; - ret TotallyNotJson.1244; - else - let TotallyNotJson.1265 : Str = "T"; - let TotallyNotJson.1266 : Int1 = lowlevel Eq TotallyNotJson.1265 TotallyNotJson.851; - dec TotallyNotJson.1265; - if TotallyNotJson.1266 then - dec TotallyNotJson.851; - let TotallyNotJson.1245 : Str = "t"; - ret TotallyNotJson.1245; - else - let TotallyNotJson.1263 : Str = "U"; - let TotallyNotJson.1264 : Int1 = lowlevel Eq TotallyNotJson.1263 TotallyNotJson.851; - dec TotallyNotJson.1263; - if TotallyNotJson.1264 then - dec TotallyNotJson.851; - let TotallyNotJson.1246 : Str = "u"; - ret TotallyNotJson.1246; - else - let TotallyNotJson.1261 : Str = "V"; - let TotallyNotJson.1262 : Int1 = lowlevel Eq TotallyNotJson.1261 TotallyNotJson.851; - dec TotallyNotJson.1261; - if TotallyNotJson.1262 then - dec TotallyNotJson.851; - let TotallyNotJson.1247 : Str = "v"; - ret TotallyNotJson.1247; - else - let TotallyNotJson.1259 : Str = "W"; - let TotallyNotJson.1260 : Int1 = lowlevel Eq TotallyNotJson.1259 TotallyNotJson.851; - dec TotallyNotJson.1259; - if TotallyNotJson.1260 then - dec TotallyNotJson.851; - let TotallyNotJson.1248 : Str = "w"; - ret TotallyNotJson.1248; - else - let TotallyNotJson.1257 : Str = "X"; - let TotallyNotJson.1258 : Int1 = lowlevel Eq TotallyNotJson.1257 TotallyNotJson.851; - dec TotallyNotJson.1257; - if TotallyNotJson.1258 then - dec TotallyNotJson.851; - let TotallyNotJson.1249 : Str = "x"; - ret TotallyNotJson.1249; - else - let TotallyNotJson.1255 : Str = "Y"; - let TotallyNotJson.1256 : Int1 = lowlevel Eq TotallyNotJson.1255 TotallyNotJson.851; - dec TotallyNotJson.1255; - if TotallyNotJson.1256 then - dec TotallyNotJson.851; - let TotallyNotJson.1250 : Str = "y"; - ret TotallyNotJson.1250; - else - let TotallyNotJson.1253 : Str = "Z"; - let TotallyNotJson.1254 : Int1 = lowlevel Eq TotallyNotJson.1253 TotallyNotJson.851; - dec TotallyNotJson.1253; - if TotallyNotJson.1254 then - dec TotallyNotJson.851; - let TotallyNotJson.1251 : Str = "z"; - ret TotallyNotJson.1251; - else - ret TotallyNotJson.851; - -procedure TotallyNotJson.102 (TotallyNotJson.852): - let TotallyNotJson.1392 : Str = "A"; - let TotallyNotJson.1393 : Int1 = lowlevel Eq TotallyNotJson.1392 TotallyNotJson.852; - dec TotallyNotJson.1392; - if TotallyNotJson.1393 then - dec TotallyNotJson.852; - let TotallyNotJson.1315 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1315; - else - let TotallyNotJson.1390 : Str = "B"; - let TotallyNotJson.1391 : Int1 = lowlevel Eq TotallyNotJson.1390 TotallyNotJson.852; - dec TotallyNotJson.1390; - if TotallyNotJson.1391 then - dec TotallyNotJson.852; - let TotallyNotJson.1316 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1316; - else - let TotallyNotJson.1388 : Str = "C"; - let TotallyNotJson.1389 : Int1 = lowlevel Eq TotallyNotJson.1388 TotallyNotJson.852; - dec TotallyNotJson.1388; - if TotallyNotJson.1389 then - dec TotallyNotJson.852; - let TotallyNotJson.1317 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1317; - else - let TotallyNotJson.1386 : Str = "D"; - let TotallyNotJson.1387 : Int1 = lowlevel Eq TotallyNotJson.1386 TotallyNotJson.852; - dec TotallyNotJson.1386; - if TotallyNotJson.1387 then - dec TotallyNotJson.852; - let TotallyNotJson.1318 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1318; - else - let TotallyNotJson.1384 : Str = "E"; - let TotallyNotJson.1385 : Int1 = lowlevel Eq TotallyNotJson.1384 TotallyNotJson.852; - dec TotallyNotJson.1384; - if TotallyNotJson.1385 then - dec TotallyNotJson.852; - let TotallyNotJson.1319 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1319; - else - let TotallyNotJson.1382 : Str = "F"; - let TotallyNotJson.1383 : Int1 = lowlevel Eq TotallyNotJson.1382 TotallyNotJson.852; - dec TotallyNotJson.1382; - if TotallyNotJson.1383 then - dec TotallyNotJson.852; - let TotallyNotJson.1320 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1320; - else - let TotallyNotJson.1380 : Str = "G"; - let TotallyNotJson.1381 : Int1 = lowlevel Eq TotallyNotJson.1380 TotallyNotJson.852; - dec TotallyNotJson.1380; - if TotallyNotJson.1381 then - dec TotallyNotJson.852; - let TotallyNotJson.1321 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1321; - else - let TotallyNotJson.1378 : Str = "H"; - let TotallyNotJson.1379 : Int1 = lowlevel Eq TotallyNotJson.1378 TotallyNotJson.852; - dec TotallyNotJson.1378; - if TotallyNotJson.1379 then - dec TotallyNotJson.852; - let TotallyNotJson.1322 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1322; - else - let TotallyNotJson.1376 : Str = "I"; - let TotallyNotJson.1377 : Int1 = lowlevel Eq TotallyNotJson.1376 TotallyNotJson.852; - dec TotallyNotJson.1376; - if TotallyNotJson.1377 then - dec TotallyNotJson.852; - let TotallyNotJson.1323 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1323; - else - let TotallyNotJson.1374 : Str = "J"; - let TotallyNotJson.1375 : Int1 = lowlevel Eq TotallyNotJson.1374 TotallyNotJson.852; - dec TotallyNotJson.1374; - if TotallyNotJson.1375 then - dec TotallyNotJson.852; - let TotallyNotJson.1324 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1324; - else - let TotallyNotJson.1372 : Str = "K"; - let TotallyNotJson.1373 : Int1 = lowlevel Eq TotallyNotJson.1372 TotallyNotJson.852; - dec TotallyNotJson.1372; - if TotallyNotJson.1373 then - dec TotallyNotJson.852; - let TotallyNotJson.1325 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1325; - else - let TotallyNotJson.1370 : Str = "L"; - let TotallyNotJson.1371 : Int1 = lowlevel Eq TotallyNotJson.1370 TotallyNotJson.852; - dec TotallyNotJson.1370; - if TotallyNotJson.1371 then - dec TotallyNotJson.852; - let TotallyNotJson.1326 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1326; - else - let TotallyNotJson.1368 : Str = "M"; - let TotallyNotJson.1369 : Int1 = lowlevel Eq TotallyNotJson.1368 TotallyNotJson.852; - dec TotallyNotJson.1368; - if TotallyNotJson.1369 then - dec TotallyNotJson.852; - let TotallyNotJson.1327 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1327; - else - let TotallyNotJson.1366 : Str = "N"; - let TotallyNotJson.1367 : Int1 = lowlevel Eq TotallyNotJson.1366 TotallyNotJson.852; - dec TotallyNotJson.1366; - if TotallyNotJson.1367 then - dec TotallyNotJson.852; - let TotallyNotJson.1328 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1328; - else - let TotallyNotJson.1364 : Str = "O"; - let TotallyNotJson.1365 : Int1 = lowlevel Eq TotallyNotJson.1364 TotallyNotJson.852; - dec TotallyNotJson.1364; - if TotallyNotJson.1365 then - dec TotallyNotJson.852; - let TotallyNotJson.1329 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1329; - else - let TotallyNotJson.1362 : Str = "P"; - let TotallyNotJson.1363 : Int1 = lowlevel Eq TotallyNotJson.1362 TotallyNotJson.852; - dec TotallyNotJson.1362; - if TotallyNotJson.1363 then - dec TotallyNotJson.852; - let TotallyNotJson.1330 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1330; - else - let TotallyNotJson.1360 : Str = "Q"; - let TotallyNotJson.1361 : Int1 = lowlevel Eq TotallyNotJson.1360 TotallyNotJson.852; - dec TotallyNotJson.1360; - if TotallyNotJson.1361 then - dec TotallyNotJson.852; - let TotallyNotJson.1331 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1331; - else - let TotallyNotJson.1358 : Str = "R"; - let TotallyNotJson.1359 : Int1 = lowlevel Eq TotallyNotJson.1358 TotallyNotJson.852; - dec TotallyNotJson.1358; - if TotallyNotJson.1359 then - dec TotallyNotJson.852; - let TotallyNotJson.1332 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1332; - else - let TotallyNotJson.1356 : Str = "S"; - let TotallyNotJson.1357 : Int1 = lowlevel Eq TotallyNotJson.1356 TotallyNotJson.852; - dec TotallyNotJson.1356; - if TotallyNotJson.1357 then - dec TotallyNotJson.852; - let TotallyNotJson.1333 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1333; - else - let TotallyNotJson.1354 : Str = "T"; - let TotallyNotJson.1355 : Int1 = lowlevel Eq TotallyNotJson.1354 TotallyNotJson.852; - dec TotallyNotJson.1354; - if TotallyNotJson.1355 then - dec TotallyNotJson.852; - let TotallyNotJson.1334 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1334; - else - let TotallyNotJson.1352 : Str = "U"; - let TotallyNotJson.1353 : Int1 = lowlevel Eq TotallyNotJson.1352 TotallyNotJson.852; - dec TotallyNotJson.1352; - if TotallyNotJson.1353 then - dec TotallyNotJson.852; - let TotallyNotJson.1335 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1335; - else - let TotallyNotJson.1350 : Str = "V"; - let TotallyNotJson.1351 : Int1 = lowlevel Eq TotallyNotJson.1350 TotallyNotJson.852; - dec TotallyNotJson.1350; - if TotallyNotJson.1351 then - dec TotallyNotJson.852; - let TotallyNotJson.1336 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1336; - else - let TotallyNotJson.1348 : Str = "W"; - let TotallyNotJson.1349 : Int1 = lowlevel Eq TotallyNotJson.1348 TotallyNotJson.852; - dec TotallyNotJson.1348; - if TotallyNotJson.1349 then - dec TotallyNotJson.852; - let TotallyNotJson.1337 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1337; - else - let TotallyNotJson.1346 : Str = "X"; - let TotallyNotJson.1347 : Int1 = lowlevel Eq TotallyNotJson.1346 TotallyNotJson.852; - dec TotallyNotJson.1346; - if TotallyNotJson.1347 then - dec TotallyNotJson.852; - let TotallyNotJson.1338 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1338; - else - let TotallyNotJson.1344 : Str = "Y"; - let TotallyNotJson.1345 : Int1 = lowlevel Eq TotallyNotJson.1344 TotallyNotJson.852; - dec TotallyNotJson.1344; - if TotallyNotJson.1345 then - dec TotallyNotJson.852; - let TotallyNotJson.1339 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1339; - else - let TotallyNotJson.1342 : Str = "Z"; - let TotallyNotJson.1343 : Int1 = lowlevel Eq TotallyNotJson.1342 TotallyNotJson.852; - dec TotallyNotJson.852; - dec TotallyNotJson.1342; - if TotallyNotJson.1343 then - let TotallyNotJson.1340 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1340; - else - let TotallyNotJson.1341 : Int1 = CallByName Bool.1; - ret TotallyNotJson.1341; - -procedure TotallyNotJson.182 (TotallyNotJson.183, TotallyNotJson.1533, TotallyNotJson.181): - let TotallyNotJson.1536 : List U8 = CallByName TotallyNotJson.26 TotallyNotJson.181; - let TotallyNotJson.1535 : List U8 = CallByName List.8 TotallyNotJson.183 TotallyNotJson.1536; - ret TotallyNotJson.1535; - -procedure TotallyNotJson.189 (TotallyNotJson.1584, TotallyNotJson.192): - let TotallyNotJson.190 : U64 = StructAtIndex 0 TotallyNotJson.1584; - let TotallyNotJson.191 : Int1 = StructAtIndex 1 TotallyNotJson.1584; - switch TotallyNotJson.192: + let Str.253 : U8 = StructAtIndex 3 Str.69; + let Str.254 : U64 = StructAtIndex 0 Str.69; + let #Derived_gen.34 : Str = StructAtIndex 1 Str.69; + dec #Derived_gen.34; + let Str.252 : {U64, U8} = Struct {Str.254, Str.253}; + let Str.251 : [C {U64, U8}, C Str] = TagId(0) Str.252; + ret Str.251; + +procedure TotallyNotJson.150 (TotallyNotJson.151, TotallyNotJson.1009, TotallyNotJson.149): + let TotallyNotJson.1012 : List U8 = CallByName TotallyNotJson.26 TotallyNotJson.149; + let TotallyNotJson.1011 : List U8 = CallByName List.8 TotallyNotJson.151 TotallyNotJson.1012; + ret TotallyNotJson.1011; + +procedure TotallyNotJson.157 (TotallyNotJson.1060, TotallyNotJson.160): + let TotallyNotJson.158 : U64 = StructAtIndex 0 TotallyNotJson.1060; + let TotallyNotJson.159 : Int1 = StructAtIndex 1 TotallyNotJson.1060; + switch TotallyNotJson.160: case 34: - let TotallyNotJson.1587 : Int1 = false; - let TotallyNotJson.1586 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1587}; - let TotallyNotJson.1585 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1586; - ret TotallyNotJson.1585; + let TotallyNotJson.1063 : Int1 = false; + let TotallyNotJson.1062 : {U64, Int1} = Struct {TotallyNotJson.158, TotallyNotJson.1063}; + let TotallyNotJson.1061 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1062; + ret TotallyNotJson.1061; case 92: - let TotallyNotJson.1590 : Int1 = false; - let TotallyNotJson.1589 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1590}; - let TotallyNotJson.1588 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1589; - ret TotallyNotJson.1588; + let TotallyNotJson.1066 : Int1 = false; + let TotallyNotJson.1065 : {U64, Int1} = Struct {TotallyNotJson.158, TotallyNotJson.1066}; + let TotallyNotJson.1064 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1065; + ret TotallyNotJson.1064; case 47: - let TotallyNotJson.1593 : Int1 = false; - let TotallyNotJson.1592 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1593}; - let TotallyNotJson.1591 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1592; - ret TotallyNotJson.1591; + let TotallyNotJson.1069 : Int1 = false; + let TotallyNotJson.1068 : {U64, Int1} = Struct {TotallyNotJson.158, TotallyNotJson.1069}; + let TotallyNotJson.1067 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1068; + ret TotallyNotJson.1067; case 8: - let TotallyNotJson.1596 : Int1 = false; - let TotallyNotJson.1595 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1596}; - let TotallyNotJson.1594 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1595; - ret TotallyNotJson.1594; + let TotallyNotJson.1072 : Int1 = false; + let TotallyNotJson.1071 : {U64, Int1} = Struct {TotallyNotJson.158, TotallyNotJson.1072}; + let TotallyNotJson.1070 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1071; + ret TotallyNotJson.1070; case 12: - let TotallyNotJson.1599 : Int1 = false; - let TotallyNotJson.1598 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1599}; - let TotallyNotJson.1597 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1598; - ret TotallyNotJson.1597; + let TotallyNotJson.1075 : Int1 = false; + let TotallyNotJson.1074 : {U64, Int1} = Struct {TotallyNotJson.158, TotallyNotJson.1075}; + let TotallyNotJson.1073 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1074; + ret TotallyNotJson.1073; case 10: - let TotallyNotJson.1602 : Int1 = false; - let TotallyNotJson.1601 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1602}; - let TotallyNotJson.1600 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1601; - ret TotallyNotJson.1600; + let TotallyNotJson.1078 : Int1 = false; + let TotallyNotJson.1077 : {U64, Int1} = Struct {TotallyNotJson.158, TotallyNotJson.1078}; + let TotallyNotJson.1076 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1077; + ret TotallyNotJson.1076; case 13: - let TotallyNotJson.1605 : Int1 = false; - let TotallyNotJson.1604 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1605}; - let TotallyNotJson.1603 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1604; - ret TotallyNotJson.1603; + let TotallyNotJson.1081 : Int1 = false; + let TotallyNotJson.1080 : {U64, Int1} = Struct {TotallyNotJson.158, TotallyNotJson.1081}; + let TotallyNotJson.1079 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1080; + ret TotallyNotJson.1079; case 9: - let TotallyNotJson.1608 : Int1 = false; - let TotallyNotJson.1607 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1608}; - let TotallyNotJson.1606 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1607; - ret TotallyNotJson.1606; + let TotallyNotJson.1084 : Int1 = false; + let TotallyNotJson.1083 : {U64, Int1} = Struct {TotallyNotJson.158, TotallyNotJson.1084}; + let TotallyNotJson.1082 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1083; + ret TotallyNotJson.1082; default: - let TotallyNotJson.1612 : U64 = 1i64; - let TotallyNotJson.1611 : U64 = CallByName Num.19 TotallyNotJson.190 TotallyNotJson.1612; - let TotallyNotJson.1610 : {U64, Int1} = Struct {TotallyNotJson.1611, TotallyNotJson.191}; - let TotallyNotJson.1609 : [C {U64, Int1}, C {U64, Int1}] = TagId(1) TotallyNotJson.1610; - ret TotallyNotJson.1609; + let TotallyNotJson.1088 : U64 = 1i64; + let TotallyNotJson.1087 : U64 = CallByName Num.19 TotallyNotJson.158 TotallyNotJson.1088; + let TotallyNotJson.1086 : {U64, Int1} = Struct {TotallyNotJson.1087, TotallyNotJson.159}; + let TotallyNotJson.1085 : [C {U64, Int1}, C {U64, Int1}] = TagId(1) TotallyNotJson.1086; + ret TotallyNotJson.1085; -procedure TotallyNotJson.215 (TotallyNotJson.216, TotallyNotJson.217): - let TotallyNotJson.1555 : List U8 = CallByName TotallyNotJson.27 TotallyNotJson.217; - let TotallyNotJson.1554 : List U8 = CallByName List.8 TotallyNotJson.216 TotallyNotJson.1555; - ret TotallyNotJson.1554; - -procedure TotallyNotJson.234 (TotallyNotJson.235, TotallyNotJson.1175, TotallyNotJson.233): - let TotallyNotJson.1530 : I64 = 123i64; - let TotallyNotJson.1529 : U8 = CallByName Num.127 TotallyNotJson.1530; - let TotallyNotJson.238 : List U8 = CallByName List.4 TotallyNotJson.235 TotallyNotJson.1529; - let TotallyNotJson.1528 : U64 = CallByName List.6 TotallyNotJson.233; - let TotallyNotJson.1183 : {List U8, U64} = Struct {TotallyNotJson.238, TotallyNotJson.1528}; - let TotallyNotJson.1182 : {List U8, U64} = CallByName List.18 TotallyNotJson.233 TotallyNotJson.1183 TotallyNotJson.1175; - let TotallyNotJson.240 : List U8 = StructAtIndex 0 TotallyNotJson.1182; - let TotallyNotJson.1181 : I64 = 125i64; - let TotallyNotJson.1180 : U8 = CallByName Num.127 TotallyNotJson.1181; - let TotallyNotJson.1179 : List U8 = CallByName List.4 TotallyNotJson.240 TotallyNotJson.1180; - ret TotallyNotJson.1179; - -procedure TotallyNotJson.237 (TotallyNotJson.1177, TotallyNotJson.1178, TotallyNotJson.236): - let TotallyNotJson.243 : Str = StructAtIndex 0 TotallyNotJson.1178; - let TotallyNotJson.244 : Str = StructAtIndex 1 TotallyNotJson.1178; - let TotallyNotJson.241 : List U8 = StructAtIndex 0 TotallyNotJson.1177; - let TotallyNotJson.242 : U64 = StructAtIndex 1 TotallyNotJson.1177; - let TotallyNotJson.245 : Str = CallByName TotallyNotJson.82 TotallyNotJson.243 TotallyNotJson.236; - let TotallyNotJson.1205 : I64 = 34i64; - let TotallyNotJson.1204 : U8 = CallByName Num.127 TotallyNotJson.1205; - let TotallyNotJson.1202 : List U8 = CallByName List.4 TotallyNotJson.241 TotallyNotJson.1204; - let TotallyNotJson.1203 : List U8 = CallByName Str.12 TotallyNotJson.245; - let TotallyNotJson.1199 : List U8 = CallByName List.8 TotallyNotJson.1202 TotallyNotJson.1203; - let TotallyNotJson.1201 : I64 = 34i64; - let TotallyNotJson.1200 : U8 = CallByName Num.127 TotallyNotJson.1201; - let TotallyNotJson.1196 : List U8 = CallByName List.4 TotallyNotJson.1199 TotallyNotJson.1200; - let TotallyNotJson.1198 : I64 = 58i64; - let TotallyNotJson.1197 : U8 = CallByName Num.127 TotallyNotJson.1198; - let TotallyNotJson.1194 : List U8 = CallByName List.4 TotallyNotJson.1196 TotallyNotJson.1197; - let TotallyNotJson.246 : List U8 = CallByName Encode.24 TotallyNotJson.1194 TotallyNotJson.244 TotallyNotJson.236; - joinpoint TotallyNotJson.1189 TotallyNotJson.247: - let TotallyNotJson.1187 : U64 = 1i64; - let TotallyNotJson.1186 : U64 = CallByName Num.20 TotallyNotJson.242 TotallyNotJson.1187; - let TotallyNotJson.1185 : {List U8, U64} = Struct {TotallyNotJson.247, TotallyNotJson.1186}; - ret TotallyNotJson.1185; +procedure TotallyNotJson.183 (TotallyNotJson.184, TotallyNotJson.185): + let TotallyNotJson.1031 : List U8 = CallByName TotallyNotJson.27 TotallyNotJson.185; + let TotallyNotJson.1030 : List U8 = CallByName List.8 TotallyNotJson.184 TotallyNotJson.1031; + ret TotallyNotJson.1030; + +procedure TotallyNotJson.201 (TotallyNotJson.202, TotallyNotJson.973, TotallyNotJson.200): + let TotallyNotJson.1006 : I64 = 123i64; + let TotallyNotJson.1005 : U8 = CallByName Num.127 TotallyNotJson.1006; + let TotallyNotJson.204 : List U8 = CallByName List.4 TotallyNotJson.202 TotallyNotJson.1005; + let TotallyNotJson.1004 : U64 = CallByName List.6 TotallyNotJson.200; + let TotallyNotJson.981 : {List U8, U64} = Struct {TotallyNotJson.204, TotallyNotJson.1004}; + let TotallyNotJson.982 : {} = Struct {}; + let TotallyNotJson.980 : {List U8, U64} = CallByName List.18 TotallyNotJson.200 TotallyNotJson.981 TotallyNotJson.982; + let TotallyNotJson.206 : List U8 = StructAtIndex 0 TotallyNotJson.980; + let TotallyNotJson.979 : I64 = 125i64; + let TotallyNotJson.978 : U8 = CallByName Num.127 TotallyNotJson.979; + let TotallyNotJson.977 : List U8 = CallByName List.4 TotallyNotJson.206 TotallyNotJson.978; + ret TotallyNotJson.977; + +procedure TotallyNotJson.203 (TotallyNotJson.975, TotallyNotJson.976): + let TotallyNotJson.209 : Str = StructAtIndex 0 TotallyNotJson.976; + let TotallyNotJson.210 : Str = StructAtIndex 1 TotallyNotJson.976; + let TotallyNotJson.207 : List U8 = StructAtIndex 0 TotallyNotJson.975; + let TotallyNotJson.208 : U64 = StructAtIndex 1 TotallyNotJson.975; + let TotallyNotJson.1003 : I64 = 34i64; + let TotallyNotJson.1002 : U8 = CallByName Num.127 TotallyNotJson.1003; + let TotallyNotJson.1000 : List U8 = CallByName List.4 TotallyNotJson.207 TotallyNotJson.1002; + let TotallyNotJson.1001 : List U8 = CallByName Str.12 TotallyNotJson.209; + let TotallyNotJson.997 : List U8 = CallByName List.8 TotallyNotJson.1000 TotallyNotJson.1001; + let TotallyNotJson.999 : I64 = 34i64; + let TotallyNotJson.998 : U8 = CallByName Num.127 TotallyNotJson.999; + let TotallyNotJson.994 : List U8 = CallByName List.4 TotallyNotJson.997 TotallyNotJson.998; + let TotallyNotJson.996 : I64 = 58i64; + let TotallyNotJson.995 : U8 = CallByName Num.127 TotallyNotJson.996; + let TotallyNotJson.992 : List U8 = CallByName List.4 TotallyNotJson.994 TotallyNotJson.995; + let TotallyNotJson.993 : {} = Struct {}; + let TotallyNotJson.212 : List U8 = CallByName Encode.24 TotallyNotJson.992 TotallyNotJson.210 TotallyNotJson.993; + joinpoint TotallyNotJson.987 TotallyNotJson.213: + let TotallyNotJson.985 : U64 = 1i64; + let TotallyNotJson.984 : U64 = CallByName Num.20 TotallyNotJson.208 TotallyNotJson.985; + let TotallyNotJson.983 : {List U8, U64} = Struct {TotallyNotJson.213, TotallyNotJson.984}; + ret TotallyNotJson.983; in - let TotallyNotJson.1193 : U64 = 1i64; - let TotallyNotJson.1190 : Int1 = CallByName Num.24 TotallyNotJson.242 TotallyNotJson.1193; - if TotallyNotJson.1190 then - let TotallyNotJson.1192 : I64 = 44i64; - let TotallyNotJson.1191 : U8 = CallByName Num.127 TotallyNotJson.1192; - let TotallyNotJson.1188 : List U8 = CallByName List.4 TotallyNotJson.246 TotallyNotJson.1191; - jump TotallyNotJson.1189 TotallyNotJson.1188; + let TotallyNotJson.991 : U64 = 1i64; + let TotallyNotJson.988 : Int1 = CallByName Num.24 TotallyNotJson.208 TotallyNotJson.991; + if TotallyNotJson.988 then + let TotallyNotJson.990 : I64 = 44i64; + let TotallyNotJson.989 : U8 = CallByName Num.127 TotallyNotJson.990; + let TotallyNotJson.986 : List U8 = CallByName List.4 TotallyNotJson.212 TotallyNotJson.989; + jump TotallyNotJson.987 TotallyNotJson.986; else - jump TotallyNotJson.1189 TotallyNotJson.246; - -procedure TotallyNotJson.25 (TotallyNotJson.181): - let TotallyNotJson.1531 : Str = CallByName Encode.23 TotallyNotJson.181; - ret TotallyNotJson.1531; - -procedure TotallyNotJson.26 (TotallyNotJson.184): - let TotallyNotJson.185 : List U8 = CallByName Str.12 TotallyNotJson.184; - let TotallyNotJson.1613 : U64 = 0i64; - let TotallyNotJson.1614 : Int1 = true; - let TotallyNotJson.186 : {U64, Int1} = Struct {TotallyNotJson.1613, TotallyNotJson.1614}; - let TotallyNotJson.1583 : {} = Struct {}; - inc TotallyNotJson.185; - let TotallyNotJson.187 : {U64, Int1} = CallByName List.26 TotallyNotJson.185 TotallyNotJson.186 TotallyNotJson.1583; - let TotallyNotJson.1537 : Int1 = StructAtIndex 1 TotallyNotJson.187; - let TotallyNotJson.1581 : Int1 = true; - let TotallyNotJson.1582 : Int1 = lowlevel Eq TotallyNotJson.1581 TotallyNotJson.1537; - if TotallyNotJson.1582 then - let TotallyNotJson.1547 : U64 = CallByName List.6 TotallyNotJson.185; - let TotallyNotJson.1548 : U64 = 2i64; - let TotallyNotJson.1546 : U64 = CallByName Num.19 TotallyNotJson.1547 TotallyNotJson.1548; - let TotallyNotJson.1543 : List U8 = CallByName List.68 TotallyNotJson.1546; - let TotallyNotJson.1545 : U8 = 34i64; - let TotallyNotJson.1544 : List U8 = Array [TotallyNotJson.1545]; - let TotallyNotJson.1542 : List U8 = CallByName List.8 TotallyNotJson.1543 TotallyNotJson.1544; - let TotallyNotJson.1539 : List U8 = CallByName List.8 TotallyNotJson.1542 TotallyNotJson.185; - let TotallyNotJson.1541 : U8 = 34i64; - let TotallyNotJson.1540 : List U8 = Array [TotallyNotJson.1541]; - let TotallyNotJson.1538 : List U8 = CallByName List.8 TotallyNotJson.1539 TotallyNotJson.1540; - ret TotallyNotJson.1538; + jump TotallyNotJson.987 TotallyNotJson.212; + +procedure TotallyNotJson.25 (TotallyNotJson.149): + let TotallyNotJson.1007 : Str = CallByName Encode.23 TotallyNotJson.149; + ret TotallyNotJson.1007; + +procedure TotallyNotJson.26 (TotallyNotJson.152): + let TotallyNotJson.153 : List U8 = CallByName Str.12 TotallyNotJson.152; + let TotallyNotJson.1089 : U64 = 0i64; + let TotallyNotJson.1090 : Int1 = true; + let TotallyNotJson.154 : {U64, Int1} = Struct {TotallyNotJson.1089, TotallyNotJson.1090}; + let TotallyNotJson.1059 : {} = Struct {}; + inc TotallyNotJson.153; + let TotallyNotJson.155 : {U64, Int1} = CallByName List.26 TotallyNotJson.153 TotallyNotJson.154 TotallyNotJson.1059; + let TotallyNotJson.1013 : Int1 = StructAtIndex 1 TotallyNotJson.155; + let TotallyNotJson.1057 : Int1 = true; + let TotallyNotJson.1058 : Int1 = lowlevel Eq TotallyNotJson.1057 TotallyNotJson.1013; + if TotallyNotJson.1058 then + let TotallyNotJson.1023 : U64 = CallByName List.6 TotallyNotJson.153; + let TotallyNotJson.1024 : U64 = 2i64; + let TotallyNotJson.1022 : U64 = CallByName Num.19 TotallyNotJson.1023 TotallyNotJson.1024; + let TotallyNotJson.1019 : List U8 = CallByName List.68 TotallyNotJson.1022; + let TotallyNotJson.1021 : U8 = 34i64; + let TotallyNotJson.1020 : List U8 = Array [TotallyNotJson.1021]; + let TotallyNotJson.1018 : List U8 = CallByName List.8 TotallyNotJson.1019 TotallyNotJson.1020; + let TotallyNotJson.1015 : List U8 = CallByName List.8 TotallyNotJson.1018 TotallyNotJson.153; + let TotallyNotJson.1017 : U8 = 34i64; + let TotallyNotJson.1016 : List U8 = Array [TotallyNotJson.1017]; + let TotallyNotJson.1014 : List U8 = CallByName List.8 TotallyNotJson.1015 TotallyNotJson.1016; + ret TotallyNotJson.1014; else - inc TotallyNotJson.185; - let TotallyNotJson.1580 : U64 = StructAtIndex 0 TotallyNotJson.187; - let TotallyNotJson.1579 : {List U8, List U8} = CallByName List.52 TotallyNotJson.185 TotallyNotJson.1580; - let TotallyNotJson.211 : List U8 = StructAtIndex 0 TotallyNotJson.1579; - let TotallyNotJson.213 : List U8 = StructAtIndex 1 TotallyNotJson.1579; - let TotallyNotJson.1577 : U64 = CallByName List.6 TotallyNotJson.185; - dec TotallyNotJson.185; - let TotallyNotJson.1578 : U64 = 120i64; - let TotallyNotJson.1575 : U64 = CallByName Num.21 TotallyNotJson.1577 TotallyNotJson.1578; - let TotallyNotJson.1576 : U64 = 100i64; - let TotallyNotJson.1574 : U64 = CallByName Num.94 TotallyNotJson.1575 TotallyNotJson.1576; - let TotallyNotJson.1571 : List U8 = CallByName List.68 TotallyNotJson.1574; - let TotallyNotJson.1573 : U8 = 34i64; - let TotallyNotJson.1572 : List U8 = Array [TotallyNotJson.1573]; - let TotallyNotJson.1570 : List U8 = CallByName List.8 TotallyNotJson.1571 TotallyNotJson.1572; - let TotallyNotJson.214 : List U8 = CallByName List.8 TotallyNotJson.1570 TotallyNotJson.211; - let TotallyNotJson.1553 : {} = Struct {}; - let TotallyNotJson.1550 : List U8 = CallByName List.18 TotallyNotJson.213 TotallyNotJson.214 TotallyNotJson.1553; - let TotallyNotJson.1552 : U8 = 34i64; - let TotallyNotJson.1551 : List U8 = Array [TotallyNotJson.1552]; - let TotallyNotJson.1549 : List U8 = CallByName List.8 TotallyNotJson.1550 TotallyNotJson.1551; - ret TotallyNotJson.1549; - -procedure TotallyNotJson.27 (TotallyNotJson.218): - switch TotallyNotJson.218: + inc TotallyNotJson.153; + let TotallyNotJson.1056 : U64 = StructAtIndex 0 TotallyNotJson.155; + let TotallyNotJson.1055 : {List U8, List U8} = CallByName List.52 TotallyNotJson.153 TotallyNotJson.1056; + let TotallyNotJson.179 : List U8 = StructAtIndex 0 TotallyNotJson.1055; + let TotallyNotJson.181 : List U8 = StructAtIndex 1 TotallyNotJson.1055; + let TotallyNotJson.1053 : U64 = CallByName List.6 TotallyNotJson.153; + dec TotallyNotJson.153; + let TotallyNotJson.1054 : U64 = 120i64; + let TotallyNotJson.1051 : U64 = CallByName Num.21 TotallyNotJson.1053 TotallyNotJson.1054; + let TotallyNotJson.1052 : U64 = 100i64; + let TotallyNotJson.1050 : U64 = CallByName Num.94 TotallyNotJson.1051 TotallyNotJson.1052; + let TotallyNotJson.1047 : List U8 = CallByName List.68 TotallyNotJson.1050; + let TotallyNotJson.1049 : U8 = 34i64; + let TotallyNotJson.1048 : List U8 = Array [TotallyNotJson.1049]; + let TotallyNotJson.1046 : List U8 = CallByName List.8 TotallyNotJson.1047 TotallyNotJson.1048; + let TotallyNotJson.182 : List U8 = CallByName List.8 TotallyNotJson.1046 TotallyNotJson.179; + let TotallyNotJson.1029 : {} = Struct {}; + let TotallyNotJson.1026 : List U8 = CallByName List.18 TotallyNotJson.181 TotallyNotJson.182 TotallyNotJson.1029; + let TotallyNotJson.1028 : U8 = 34i64; + let TotallyNotJson.1027 : List U8 = Array [TotallyNotJson.1028]; + let TotallyNotJson.1025 : List U8 = CallByName List.8 TotallyNotJson.1026 TotallyNotJson.1027; + ret TotallyNotJson.1025; + +procedure TotallyNotJson.27 (TotallyNotJson.186): + switch TotallyNotJson.186: case 34: - let TotallyNotJson.1556 : List U8 = Array [92i64, 34i64]; - ret TotallyNotJson.1556; + let TotallyNotJson.1032 : List U8 = Array [92i64, 34i64]; + ret TotallyNotJson.1032; case 92: - let TotallyNotJson.1557 : List U8 = Array [92i64, 92i64]; - ret TotallyNotJson.1557; + let TotallyNotJson.1033 : List U8 = Array [92i64, 92i64]; + ret TotallyNotJson.1033; case 47: - let TotallyNotJson.1558 : List U8 = Array [92i64, 47i64]; - ret TotallyNotJson.1558; + let TotallyNotJson.1034 : List U8 = Array [92i64, 47i64]; + ret TotallyNotJson.1034; case 8: - let TotallyNotJson.1560 : U8 = 98i64; - let TotallyNotJson.1559 : List U8 = Array [92i64, TotallyNotJson.1560]; - ret TotallyNotJson.1559; + let TotallyNotJson.1036 : U8 = 98i64; + let TotallyNotJson.1035 : List U8 = Array [92i64, TotallyNotJson.1036]; + ret TotallyNotJson.1035; case 12: - let TotallyNotJson.1562 : U8 = 102i64; - let TotallyNotJson.1561 : List U8 = Array [92i64, TotallyNotJson.1562]; - ret TotallyNotJson.1561; + let TotallyNotJson.1038 : U8 = 102i64; + let TotallyNotJson.1037 : List U8 = Array [92i64, TotallyNotJson.1038]; + ret TotallyNotJson.1037; case 10: - let TotallyNotJson.1564 : U8 = 110i64; - let TotallyNotJson.1563 : List U8 = Array [92i64, TotallyNotJson.1564]; - ret TotallyNotJson.1563; + let TotallyNotJson.1040 : U8 = 110i64; + let TotallyNotJson.1039 : List U8 = Array [92i64, TotallyNotJson.1040]; + ret TotallyNotJson.1039; case 13: - let TotallyNotJson.1566 : U8 = 114i64; - let TotallyNotJson.1565 : List U8 = Array [92i64, TotallyNotJson.1566]; - ret TotallyNotJson.1565; + let TotallyNotJson.1042 : U8 = 114i64; + let TotallyNotJson.1041 : List U8 = Array [92i64, TotallyNotJson.1042]; + ret TotallyNotJson.1041; case 9: - let TotallyNotJson.1568 : U8 = 114i64; - let TotallyNotJson.1567 : List U8 = Array [92i64, TotallyNotJson.1568]; - ret TotallyNotJson.1567; + let TotallyNotJson.1044 : U8 = 114i64; + let TotallyNotJson.1043 : List U8 = Array [92i64, TotallyNotJson.1044]; + ret TotallyNotJson.1043; default: - let TotallyNotJson.1569 : List U8 = Array [TotallyNotJson.218]; - ret TotallyNotJson.1569; + let TotallyNotJson.1045 : List U8 = Array [TotallyNotJson.186]; + ret TotallyNotJson.1045; -procedure TotallyNotJson.29 (TotallyNotJson.233): - let TotallyNotJson.1173 : List {Str, Str} = CallByName Encode.23 TotallyNotJson.233; - ret TotallyNotJson.1173; +procedure TotallyNotJson.29 (TotallyNotJson.200): + let TotallyNotJson.971 : List {Str, Str} = CallByName Encode.23 TotallyNotJson.200; + ret TotallyNotJson.971; procedure TotallyNotJson.8 (): - let TotallyNotJson.1172 : [C , C [], C , C , C , C ] = TagId(2) ; - ret TotallyNotJson.1172; - -procedure TotallyNotJson.82 (TotallyNotJson.802, TotallyNotJson.803): - let TotallyNotJson.1527 : U8 = GetTagId TotallyNotJson.803; - switch TotallyNotJson.1527: - case 2: - ret TotallyNotJson.802; - - case 5: - let TotallyNotJson.1207 : Str = CallByName TotallyNotJson.87 TotallyNotJson.802; - ret TotallyNotJson.1207; - - case 4: - let TotallyNotJson.1399 : Str = CallByName TotallyNotJson.88 TotallyNotJson.802; - ret TotallyNotJson.1399; - - case 3: - let TotallyNotJson.1489 : Str = CallByName TotallyNotJson.89 TotallyNotJson.802; - ret TotallyNotJson.1489; - - case 0: - let TotallyNotJson.1523 : Str = CallByName TotallyNotJson.90 TotallyNotJson.802; - ret TotallyNotJson.1523; - - default: - dec TotallyNotJson.802; - let TotallyNotJson.804 : [] = UnionAtIndex (Id 1) (Index 0) TotallyNotJson.803; - let TotallyNotJson.1526 : Str = "a Lambda Set is empty. Most likely there is a type error in your program."; - Crash TotallyNotJson.1526 - - -procedure TotallyNotJson.832 (TotallyNotJson.1496): - let TotallyNotJson.1497 : List Str = StructAtIndex 1 TotallyNotJson.1496; - let #Derived_gen.37 : List Str = StructAtIndex 0 TotallyNotJson.1496; - dec #Derived_gen.37; - ret TotallyNotJson.1497; - -procedure TotallyNotJson.840 (TotallyNotJson.1214): - let TotallyNotJson.1215 : List Str = StructAtIndex 1 TotallyNotJson.1214; - let #Derived_gen.38 : List Str = StructAtIndex 0 TotallyNotJson.1214; - dec #Derived_gen.38; - ret TotallyNotJson.1215; - -procedure TotallyNotJson.87 (TotallyNotJson.809): - let TotallyNotJson.1208 : Str = CallByName TotallyNotJson.97 TotallyNotJson.809; - ret TotallyNotJson.1208; - -procedure TotallyNotJson.88 (TotallyNotJson.810): - let TotallyNotJson.1400 : Str = CallByName TotallyNotJson.94 TotallyNotJson.810; - ret TotallyNotJson.1400; - -procedure TotallyNotJson.89 (TotallyNotJson.811): - let TotallyNotJson.1490 : Str = CallByName TotallyNotJson.95 TotallyNotJson.811; - ret TotallyNotJson.1490; - -procedure TotallyNotJson.90 (TotallyNotJson.812): - ret TotallyNotJson.812; - -procedure TotallyNotJson.94 (TotallyNotJson.824): - let TotallyNotJson.825 : List Str = CallByName Str.55 TotallyNotJson.824; - let TotallyNotJson.1486 : U64 = lowlevel ListLen TotallyNotJson.825; - let TotallyNotJson.1487 : U64 = 1i64; - let TotallyNotJson.1488 : Int1 = lowlevel NumGte TotallyNotJson.1486 TotallyNotJson.1487; - if TotallyNotJson.1488 then - dec TotallyNotJson.824; - let TotallyNotJson.1485 : U64 = 0i64; - let TotallyNotJson.826 : Str = lowlevel ListGetUnsafe TotallyNotJson.825 TotallyNotJson.1485; - inc TotallyNotJson.826; - let TotallyNotJson.827 : Str = CallByName TotallyNotJson.100 TotallyNotJson.826; - let TotallyNotJson.1404 : U64 = 1i64; - let TotallyNotJson.828 : List Str = CallByName List.38 TotallyNotJson.825 TotallyNotJson.1404; - let TotallyNotJson.1402 : List Str = CallByName List.13 TotallyNotJson.828 TotallyNotJson.827; - let TotallyNotJson.1403 : Str = ""; - let TotallyNotJson.1401 : Str = CallByName Str.4 TotallyNotJson.1402 TotallyNotJson.1403; - dec TotallyNotJson.1403; - dec TotallyNotJson.1402; - ret TotallyNotJson.1401; - else - dec TotallyNotJson.825; - ret TotallyNotJson.824; - -procedure TotallyNotJson.95 (TotallyNotJson.829): - let TotallyNotJson.830 : List Str = CallByName Str.55 TotallyNotJson.829; - dec TotallyNotJson.829; - let TotallyNotJson.1522 : U64 = CallByName List.6 TotallyNotJson.830; - let TotallyNotJson.831 : List Str = CallByName List.68 TotallyNotJson.1522; - let TotallyNotJson.1498 : {List Str, List Str} = Struct {TotallyNotJson.830, TotallyNotJson.831}; - let TotallyNotJson.1494 : {List Str, List Str} = CallByName TotallyNotJson.96 TotallyNotJson.1498; - let TotallyNotJson.1495 : {} = Struct {}; - let TotallyNotJson.1492 : List Str = CallByName TotallyNotJson.832 TotallyNotJson.1494; - let TotallyNotJson.1493 : Str = ""; - let TotallyNotJson.1491 : Str = CallByName Str.4 TotallyNotJson.1492 TotallyNotJson.1493; - dec TotallyNotJson.1493; - dec TotallyNotJson.1492; - ret TotallyNotJson.1491; - -procedure TotallyNotJson.96 (#Derived_gen.30): - joinpoint TotallyNotJson.1499 TotallyNotJson.1168: - let TotallyNotJson.834 : List Str = StructAtIndex 0 TotallyNotJson.1168; - let TotallyNotJson.833 : List Str = StructAtIndex 1 TotallyNotJson.1168; - let TotallyNotJson.1519 : U64 = lowlevel ListLen TotallyNotJson.834; - let TotallyNotJson.1520 : U64 = 1i64; - let TotallyNotJson.1521 : Int1 = lowlevel NumGte TotallyNotJson.1519 TotallyNotJson.1520; - if TotallyNotJson.1521 then - let TotallyNotJson.1518 : U64 = 0i64; - let TotallyNotJson.835 : Str = lowlevel ListGetUnsafe TotallyNotJson.834 TotallyNotJson.1518; - inc 2 TotallyNotJson.835; - joinpoint TotallyNotJson.1516 TotallyNotJson.1515: - if TotallyNotJson.1515 then - let TotallyNotJson.1508 : U64 = 1i64; - let TotallyNotJson.1503 : List Str = CallByName List.38 TotallyNotJson.834 TotallyNotJson.1508; - let TotallyNotJson.1506 : Str = "-"; - let TotallyNotJson.1507 : Str = CallByName TotallyNotJson.101 TotallyNotJson.835; - let TotallyNotJson.1505 : List Str = Array [TotallyNotJson.1506, TotallyNotJson.1507]; - let TotallyNotJson.1504 : List Str = CallByName List.8 TotallyNotJson.833 TotallyNotJson.1505; - let TotallyNotJson.1502 : {List Str, List Str} = Struct {TotallyNotJson.1503, TotallyNotJson.1504}; - jump TotallyNotJson.1499 TotallyNotJson.1502; - else - dec TotallyNotJson.835; - let TotallyNotJson.1514 : U64 = 0i64; - let TotallyNotJson.836 : Str = lowlevel ListGetUnsafe TotallyNotJson.834 TotallyNotJson.1514; - inc TotallyNotJson.836; - let TotallyNotJson.1513 : U64 = 1i64; - let TotallyNotJson.1511 : List Str = CallByName List.38 TotallyNotJson.834 TotallyNotJson.1513; - let TotallyNotJson.1512 : List Str = CallByName List.4 TotallyNotJson.833 TotallyNotJson.836; - let TotallyNotJson.1510 : {List Str, List Str} = Struct {TotallyNotJson.1511, TotallyNotJson.1512}; - jump TotallyNotJson.1499 TotallyNotJson.1510; - in - let TotallyNotJson.1517 : Int1 = CallByName TotallyNotJson.102 TotallyNotJson.835; - jump TotallyNotJson.1516 TotallyNotJson.1517; - else - let TotallyNotJson.1500 : {List Str, List Str} = Struct {TotallyNotJson.834, TotallyNotJson.833}; - ret TotallyNotJson.1500; - in - jump TotallyNotJson.1499 #Derived_gen.30; - -procedure TotallyNotJson.97 (TotallyNotJson.837): - let TotallyNotJson.838 : List Str = CallByName Str.55 TotallyNotJson.837; - dec TotallyNotJson.837; - let TotallyNotJson.1398 : U64 = CallByName List.6 TotallyNotJson.838; - let TotallyNotJson.839 : List Str = CallByName List.68 TotallyNotJson.1398; - let TotallyNotJson.1216 : {List Str, List Str} = Struct {TotallyNotJson.838, TotallyNotJson.839}; - let TotallyNotJson.1212 : {List Str, List Str} = CallByName TotallyNotJson.98 TotallyNotJson.1216; - let TotallyNotJson.1213 : {} = Struct {}; - let TotallyNotJson.1210 : List Str = CallByName TotallyNotJson.840 TotallyNotJson.1212; - let TotallyNotJson.1211 : Str = ""; - let TotallyNotJson.1209 : Str = CallByName Str.4 TotallyNotJson.1210 TotallyNotJson.1211; - dec TotallyNotJson.1211; - dec TotallyNotJson.1210; - ret TotallyNotJson.1209; - -procedure TotallyNotJson.98 (#Derived_gen.15): - joinpoint TotallyNotJson.1217 TotallyNotJson.1169: - let TotallyNotJson.842 : List Str = StructAtIndex 0 TotallyNotJson.1169; - let TotallyNotJson.841 : List Str = StructAtIndex 1 TotallyNotJson.1169; - let TotallyNotJson.1395 : U64 = lowlevel ListLen TotallyNotJson.842; - let TotallyNotJson.1396 : U64 = 1i64; - let TotallyNotJson.1397 : Int1 = lowlevel NumGte TotallyNotJson.1395 TotallyNotJson.1396; - if TotallyNotJson.1397 then - let TotallyNotJson.1394 : U64 = 0i64; - let TotallyNotJson.843 : Str = lowlevel ListGetUnsafe TotallyNotJson.842 TotallyNotJson.1394; - inc 2 TotallyNotJson.843; - joinpoint TotallyNotJson.1313 TotallyNotJson.1312: - if TotallyNotJson.1312 then - let TotallyNotJson.1305 : U64 = 1i64; - let TotallyNotJson.1221 : List Str = CallByName List.38 TotallyNotJson.842 TotallyNotJson.1305; - let TotallyNotJson.1224 : Str = "_"; - let TotallyNotJson.1225 : Str = CallByName TotallyNotJson.101 TotallyNotJson.843; - let TotallyNotJson.1223 : List Str = Array [TotallyNotJson.1224, TotallyNotJson.1225]; - let TotallyNotJson.1222 : List Str = CallByName List.8 TotallyNotJson.841 TotallyNotJson.1223; - let TotallyNotJson.1220 : {List Str, List Str} = Struct {TotallyNotJson.1221, TotallyNotJson.1222}; - jump TotallyNotJson.1217 TotallyNotJson.1220; - else - dec TotallyNotJson.843; - let TotallyNotJson.1311 : U64 = 0i64; - let TotallyNotJson.844 : Str = lowlevel ListGetUnsafe TotallyNotJson.842 TotallyNotJson.1311; - inc TotallyNotJson.844; - let TotallyNotJson.1310 : U64 = 1i64; - let TotallyNotJson.1308 : List Str = CallByName List.38 TotallyNotJson.842 TotallyNotJson.1310; - let TotallyNotJson.1309 : List Str = CallByName List.4 TotallyNotJson.841 TotallyNotJson.844; - let TotallyNotJson.1307 : {List Str, List Str} = Struct {TotallyNotJson.1308, TotallyNotJson.1309}; - jump TotallyNotJson.1217 TotallyNotJson.1307; - in - let TotallyNotJson.1314 : Int1 = CallByName TotallyNotJson.102 TotallyNotJson.843; - jump TotallyNotJson.1313 TotallyNotJson.1314; - else - let TotallyNotJson.1218 : {List Str, List Str} = Struct {TotallyNotJson.842, TotallyNotJson.841}; - ret TotallyNotJson.1218; - in - jump TotallyNotJson.1217 #Derived_gen.15; + let TotallyNotJson.970 : {} = Struct {}; + ret TotallyNotJson.970; procedure Test.0 (): let Test.11 : Str = "foo"; - let Test.10 : [C , C [], C , C , C , C ] = CallByName TotallyNotJson.8; + let Test.10 : {} = CallByName TotallyNotJson.8; let Test.8 : List U8 = CallByName Encode.26 Test.11 Test.10; let Test.1 : [C {U64, U8}, C Str] = CallByName Str.9 Test.8; let Test.5 : U8 = 1i64; 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 12d0964dec8..3673c77e0b5 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 @@ -18,14 +18,6 @@ procedure #Derived.2 (#Derived.3, #Derived.4, #Derived.1): let #Derived_gen.3 : List U8 = CallByName Encode.24 #Derived.3 #Derived_gen.4 #Derived.4; ret #Derived_gen.3; -procedure Bool.1 (): - let Bool.49 : Int1 = false; - ret Bool.49; - -procedure Bool.2 (): - let Bool.48 : Int1 = true; - ret Bool.48; - procedure Encode.23 (Encode.98): ret Encode.98; @@ -40,11 +32,11 @@ procedure Encode.24 (Encode.99, Encode.107, Encode.101): ret Encode.111; procedure Encode.24 (Encode.99, Encode.107, Encode.101): - let Encode.113 : List U8 = CallByName TotallyNotJson.234 Encode.99 Encode.101 Encode.107; + let Encode.113 : List U8 = CallByName TotallyNotJson.201 Encode.99 Encode.101 Encode.107; ret Encode.113; procedure Encode.24 (Encode.99, Encode.107, Encode.101): - let Encode.117 : List U8 = CallByName TotallyNotJson.182 Encode.99 Encode.101 Encode.107; + let Encode.117 : List U8 = CallByName TotallyNotJson.150 Encode.99 Encode.101 Encode.107; ret Encode.117; procedure Encode.26 (Encode.105, Encode.106): @@ -53,1336 +45,449 @@ 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.13 (#Attr.2, #Attr.3): - let List.661 : List Str = lowlevel ListPrepend #Attr.2 #Attr.3; - ret List.661; +procedure List.102 (List.486, List.487, List.488): + let List.649 : U64 = 0i64; + let List.650 : U64 = CallByName List.6 List.486; + let List.648 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.80 List.486 List.487 List.488 List.649 List.650; + ret List.648; -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.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.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; - else - let List.201 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.674; - ret List.201; - -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.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; +procedure List.18 (List.158, List.159, List.160): + let List.593 : U64 = 0i64; + let List.594 : U64 = CallByName List.6 List.158; + let List.592 : {List U8, U64} = CallByName List.90 List.158 List.159 List.160 List.593 List.594; ret List.592; -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.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.18 (List.158, List.159, List.160): + let List.605 : U64 = 0i64; + let List.606 : U64 = CallByName List.6 List.158; + let List.604 : List U8 = CallByName List.90 List.158 List.159 List.160 List.605 List.606; + ret List.604; + +procedure List.26 (List.199, List.200, List.201): + let List.642 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.102 List.199 List.200 List.201; + let List.645 : U8 = 1i64; + let List.646 : U8 = GetTagId List.642; + let List.647 : Int1 = lowlevel Eq List.645 List.646; + if List.647 then + let List.202 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.642; + ret List.202; + else + let List.203 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.642; + ret List.203; -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; - ret List.636; +procedure List.4 (List.122, List.123): + let List.591 : U64 = 1i64; + let List.590 : List U8 = CallByName List.70 List.122 List.591; + let List.589 : List U8 = CallByName List.71 List.590 List.123; + ret List.589; -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.633 : U64 = StructAtIndex 1 List.419; + let List.634 : U64 = StructAtIndex 0 List.419; + let List.632 : List U8 = CallByName List.72 List.418 List.633 List.634; + ret List.632; -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.52 (List.433, List.434): + let List.435 : U64 = CallByName List.6 List.433; + joinpoint List.640 List.436: + let List.638 : U64 = 0i64; + let List.637 : {U64, U64} = Struct {List.436, List.638}; + inc List.433; + let List.437 : List U8 = CallByName List.49 List.433 List.637; + let List.636 : U64 = CallByName Num.75 List.435 List.436; + let List.631 : {U64, U64} = Struct {List.636, List.436}; + let List.438 : List U8 = CallByName List.49 List.433 List.631; + let List.630 : {List U8, List U8} = Struct {List.437, List.438}; + ret List.630; in - let List.673 : Int1 = CallByName Num.24 List.433 List.432; - if List.673 then - jump List.672 List.432; + let List.641 : Int1 = CallByName Num.24 List.435 List.434; + if List.641 then + jump List.640 List.434; else - jump List.672 List.433; - -procedure List.6 (#Attr.2): - let List.657 : U64 = lowlevel ListLen #Attr.2; - ret List.657; + jump List.640 List.435; procedure List.6 (#Attr.2): - let List.658 : U64 = lowlevel ListLen #Attr.2; - ret List.658; + let List.625 : U64 = lowlevel ListLen #Attr.2; + ret List.625; procedure List.6 (#Attr.2): - let List.660 : U64 = lowlevel ListLen #Attr.2; - ret List.660; + let List.627 : U64 = lowlevel ListLen #Attr.2; + ret List.627; procedure List.66 (#Attr.2, #Attr.3): - let List.608 : {Str, Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.608; + let List.602 : {Str, Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.602; 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.653 : List Str = lowlevel ListWithCapacity #Attr.2; - ret List.653; + let List.614 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.614; procedure List.68 (#Attr.2): - let List.655 : List U8 = lowlevel ListWithCapacity #Attr.2; - ret List.655; + let List.629 : List U8 = lowlevel ListWithCapacity #Attr.2; + ret List.629; procedure List.70 (#Attr.2, #Attr.3): - let List.574 : List U8 = lowlevel ListReserve #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; - ret List.591; - -procedure List.71 (#Attr.2, #Attr.3): - let List.572 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.572; + let List.576 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; + ret List.576; 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.639 : List Str = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; - ret List.639; + 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.667 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; - ret List.667; + let List.635 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; + ret List.635; procedure List.8 (#Attr.2, #Attr.3): - let List.624 : List Str = lowlevel ListConcat #Attr.2 #Attr.3; + let List.624 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; ret List.624; -procedure List.8 (#Attr.2, #Attr.3): - let List.632 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; - ret List.632; - -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; +procedure List.80 (#Derived_gen.22, #Derived_gen.23, #Derived_gen.24, #Derived_gen.25, #Derived_gen.26): + joinpoint List.651 List.489 List.490 List.491 List.492 List.493: + let List.653 : Int1 = CallByName Num.22 List.492 List.493; + if List.653 then + let List.662 : U8 = CallByName List.66 List.489 List.492; + let List.654 : [C {U64, Int1}, C {U64, Int1}] = CallByName TotallyNotJson.157 List.490 List.662; + let List.659 : U8 = 1i64; + let List.660 : U8 = GetTagId List.654; + let List.661 : Int1 = lowlevel Eq List.659 List.660; + if List.661 then + let List.494 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.654; + let List.657 : U64 = 1i64; + let List.656 : U64 = CallByName Num.51 List.492 List.657; + jump List.651 List.489 List.494 List.491 List.656 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.654; + let List.658 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) List.495; + ret List.658; 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.652 : [C {U64, Int1}, C {U64, Int1}] = TagId(1) List.490; + ret List.652; in - jump List.683 #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; + jump List.651 #Derived_gen.22 #Derived_gen.23 #Derived_gen.24 #Derived_gen.25 #Derived_gen.26; + +procedure List.90 (#Derived_gen.14, #Derived_gen.15, #Derived_gen.16, #Derived_gen.17, #Derived_gen.18): + joinpoint List.607 List.161 List.162 List.163 List.164 List.165: + let List.609 : Int1 = CallByName Num.22 List.164 List.165; + if List.609 then + let List.613 : U8 = CallByName List.66 List.161 List.164; + let List.166 : List U8 = CallByName TotallyNotJson.183 List.162 List.613; + let List.612 : U64 = 1i64; + let List.611 : U64 = CallByName Num.51 List.164 List.612; + jump List.607 List.161 List.166 List.163 List.611 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; - -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; + jump List.607 #Derived_gen.14 #Derived_gen.15 #Derived_gen.16 #Derived_gen.17 #Derived_gen.18; + +procedure List.90 (#Derived_gen.30, #Derived_gen.31, #Derived_gen.32, #Derived_gen.33, #Derived_gen.34): + joinpoint List.595 List.161 List.162 List.163 List.164 List.165: + let List.597 : Int1 = CallByName Num.22 List.164 List.165; + if List.597 then + let List.601 : {Str, Str} = CallByName List.66 List.161 List.164; + inc List.601; + let List.166 : {List U8, U64} = CallByName TotallyNotJson.203 List.162 List.601; + let List.600 : U64 = 1i64; + let List.599 : U64 = CallByName Num.51 List.164 List.600; + jump List.595 List.161 List.166 List.163 List.599 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.595 #Derived_gen.30 #Derived_gen.31 #Derived_gen.32 #Derived_gen.33 #Derived_gen.34; procedure Num.127 (#Attr.2): - let Num.296 : U8 = lowlevel NumIntCast #Attr.2; - ret Num.296; + let Num.308 : U8 = lowlevel NumIntCast #Attr.2; + ret Num.308; procedure Num.19 (#Attr.2, #Attr.3): - let Num.300 : U64 = lowlevel NumAdd #Attr.2 #Attr.3; - ret Num.300; + let Num.312 : U64 = lowlevel NumAdd #Attr.2 #Attr.3; + ret Num.312; procedure Num.20 (#Attr.2, #Attr.3): - let Num.297 : U64 = lowlevel NumSub #Attr.2 #Attr.3; - ret Num.297; + let Num.309 : U64 = lowlevel NumSub #Attr.2 #Attr.3; + ret Num.309; procedure Num.21 (#Attr.2, #Attr.3): - let Num.302 : U64 = lowlevel NumMul #Attr.2 #Attr.3; - ret Num.302; + let Num.314 : U64 = lowlevel NumMul #Attr.2 #Attr.3; + ret Num.314; procedure Num.22 (#Attr.2, #Attr.3): - let Num.308 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; - ret Num.308; + let Num.320 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; + ret Num.320; procedure Num.24 (#Attr.2, #Attr.3): - let Num.316 : Int1 = lowlevel NumGt #Attr.2 #Attr.3; - ret Num.316; + let Num.322 : Int1 = lowlevel NumGt #Attr.2 #Attr.3; + ret Num.322; procedure Num.51 (#Attr.2, #Attr.3): - let Num.305 : U64 = lowlevel NumAddWrap #Attr.2 #Attr.3; - ret Num.305; + let Num.317 : U64 = lowlevel NumAddWrap #Attr.2 #Attr.3; + ret Num.317; procedure Num.75 (#Attr.2, #Attr.3): - let Num.315 : U64 = lowlevel NumSubWrap #Attr.2 #Attr.3; - ret Num.315; - -procedure Num.77 (#Attr.2, #Attr.3): - let Num.314 : U64 = lowlevel NumSubSaturated #Attr.2 #Attr.3; - ret Num.314; + let Num.321 : U64 = lowlevel NumSubWrap #Attr.2 #Attr.3; + ret Num.321; procedure Num.94 (#Attr.2, #Attr.3): - let Num.301 : U64 = lowlevel NumDivCeilUnchecked #Attr.2 #Attr.3; - ret Num.301; + let Num.313 : U64 = lowlevel NumDivCeilUnchecked #Attr.2 #Attr.3; + ret Num.313; procedure Str.12 (#Attr.2): - let Str.303 : List U8 = lowlevel StrToUtf8 #Attr.2; - ret Str.303; - -procedure Str.4 (#Attr.2, #Attr.3): - let Str.306 : Str = lowlevel StrJoinWith #Attr.2 #Attr.3; - ret Str.306; - -procedure Str.48 (#Attr.2, #Attr.3, #Attr.4): - let Str.301 : {U64, Str, Int1, U8} = lowlevel StrFromUtf8Range #Attr.2 #Attr.3 #Attr.4; - ret Str.301; - -procedure Str.55 (#Attr.2): - let Str.309 : List Str = lowlevel StrGraphemes #Attr.2; - ret Str.309; - -procedure Str.9 (Str.80): - let Str.299 : U64 = 0i64; - let Str.300 : U64 = CallByName List.6 Str.80; - let Str.81 : {U64, Str, Int1, U8} = CallByName Str.48 Str.80 Str.299 Str.300; - let Str.296 : Int1 = StructAtIndex 2 Str.81; - if Str.296 then - let Str.298 : Str = StructAtIndex 1 Str.81; - let Str.297 : [C {U64, U8}, C Str] = TagId(1) Str.298; - ret Str.297; - else - let Str.294 : U8 = StructAtIndex 3 Str.81; - let Str.295 : U64 = StructAtIndex 0 Str.81; - let #Derived_gen.40 : Str = StructAtIndex 1 Str.81; - dec #Derived_gen.40; - let Str.293 : {U64, U8} = Struct {Str.295, Str.294}; - let Str.292 : [C {U64, U8}, C Str] = TagId(0) Str.293; - ret Str.292; - -procedure TotallyNotJson.100 (TotallyNotJson.850): - let TotallyNotJson.1482 : Str = "a"; - let TotallyNotJson.1483 : Int1 = lowlevel Eq TotallyNotJson.1482 TotallyNotJson.850; - dec TotallyNotJson.1482; - if TotallyNotJson.1483 then - dec TotallyNotJson.850; - let TotallyNotJson.1405 : Str = "A"; - ret TotallyNotJson.1405; + let Str.262 : List U8 = lowlevel StrToUtf8 #Attr.2; + ret Str.262; + +procedure Str.43 (#Attr.2, #Attr.3, #Attr.4): + let Str.260 : {U64, Str, Int1, U8} = lowlevel StrFromUtf8Range #Attr.2 #Attr.3 #Attr.4; + ret Str.260; + +procedure Str.9 (Str.68): + let Str.258 : U64 = 0i64; + let Str.259 : U64 = CallByName List.6 Str.68; + let Str.69 : {U64, Str, Int1, U8} = CallByName Str.43 Str.68 Str.258 Str.259; + let Str.255 : Int1 = StructAtIndex 2 Str.69; + if Str.255 then + let Str.257 : Str = StructAtIndex 1 Str.69; + let Str.256 : [C {U64, U8}, C Str] = TagId(1) Str.257; + ret Str.256; else - let TotallyNotJson.1480 : Str = "b"; - let TotallyNotJson.1481 : Int1 = lowlevel Eq TotallyNotJson.1480 TotallyNotJson.850; - dec TotallyNotJson.1480; - if TotallyNotJson.1481 then - dec TotallyNotJson.850; - let TotallyNotJson.1406 : Str = "B"; - ret TotallyNotJson.1406; - else - let TotallyNotJson.1478 : Str = "c"; - let TotallyNotJson.1479 : Int1 = lowlevel Eq TotallyNotJson.1478 TotallyNotJson.850; - dec TotallyNotJson.1478; - if TotallyNotJson.1479 then - dec TotallyNotJson.850; - let TotallyNotJson.1407 : Str = "C"; - ret TotallyNotJson.1407; - else - let TotallyNotJson.1476 : Str = "d"; - let TotallyNotJson.1477 : Int1 = lowlevel Eq TotallyNotJson.1476 TotallyNotJson.850; - dec TotallyNotJson.1476; - if TotallyNotJson.1477 then - dec TotallyNotJson.850; - let TotallyNotJson.1408 : Str = "D"; - ret TotallyNotJson.1408; - else - let TotallyNotJson.1474 : Str = "e"; - let TotallyNotJson.1475 : Int1 = lowlevel Eq TotallyNotJson.1474 TotallyNotJson.850; - dec TotallyNotJson.1474; - if TotallyNotJson.1475 then - dec TotallyNotJson.850; - let TotallyNotJson.1409 : Str = "E"; - ret TotallyNotJson.1409; - else - let TotallyNotJson.1472 : Str = "f"; - let TotallyNotJson.1473 : Int1 = lowlevel Eq TotallyNotJson.1472 TotallyNotJson.850; - dec TotallyNotJson.1472; - if TotallyNotJson.1473 then - dec TotallyNotJson.850; - let TotallyNotJson.1410 : Str = "F"; - ret TotallyNotJson.1410; - else - let TotallyNotJson.1470 : Str = "g"; - let TotallyNotJson.1471 : Int1 = lowlevel Eq TotallyNotJson.1470 TotallyNotJson.850; - dec TotallyNotJson.1470; - if TotallyNotJson.1471 then - dec TotallyNotJson.850; - let TotallyNotJson.1411 : Str = "G"; - ret TotallyNotJson.1411; - else - let TotallyNotJson.1468 : Str = "h"; - let TotallyNotJson.1469 : Int1 = lowlevel Eq TotallyNotJson.1468 TotallyNotJson.850; - dec TotallyNotJson.1468; - if TotallyNotJson.1469 then - dec TotallyNotJson.850; - let TotallyNotJson.1412 : Str = "H"; - ret TotallyNotJson.1412; - else - let TotallyNotJson.1466 : Str = "i"; - let TotallyNotJson.1467 : Int1 = lowlevel Eq TotallyNotJson.1466 TotallyNotJson.850; - dec TotallyNotJson.1466; - if TotallyNotJson.1467 then - dec TotallyNotJson.850; - let TotallyNotJson.1413 : Str = "I"; - ret TotallyNotJson.1413; - else - let TotallyNotJson.1464 : Str = "j"; - let TotallyNotJson.1465 : Int1 = lowlevel Eq TotallyNotJson.1464 TotallyNotJson.850; - dec TotallyNotJson.1464; - if TotallyNotJson.1465 then - dec TotallyNotJson.850; - let TotallyNotJson.1414 : Str = "J"; - ret TotallyNotJson.1414; - else - let TotallyNotJson.1462 : Str = "k"; - let TotallyNotJson.1463 : Int1 = lowlevel Eq TotallyNotJson.1462 TotallyNotJson.850; - dec TotallyNotJson.1462; - if TotallyNotJson.1463 then - dec TotallyNotJson.850; - let TotallyNotJson.1415 : Str = "K"; - ret TotallyNotJson.1415; - else - let TotallyNotJson.1460 : Str = "l"; - let TotallyNotJson.1461 : Int1 = lowlevel Eq TotallyNotJson.1460 TotallyNotJson.850; - dec TotallyNotJson.1460; - if TotallyNotJson.1461 then - dec TotallyNotJson.850; - let TotallyNotJson.1416 : Str = "L"; - ret TotallyNotJson.1416; - else - let TotallyNotJson.1458 : Str = "m"; - let TotallyNotJson.1459 : Int1 = lowlevel Eq TotallyNotJson.1458 TotallyNotJson.850; - dec TotallyNotJson.1458; - if TotallyNotJson.1459 then - dec TotallyNotJson.850; - let TotallyNotJson.1417 : Str = "M"; - ret TotallyNotJson.1417; - else - let TotallyNotJson.1456 : Str = "n"; - let TotallyNotJson.1457 : Int1 = lowlevel Eq TotallyNotJson.1456 TotallyNotJson.850; - dec TotallyNotJson.1456; - if TotallyNotJson.1457 then - dec TotallyNotJson.850; - let TotallyNotJson.1418 : Str = "N"; - ret TotallyNotJson.1418; - else - let TotallyNotJson.1454 : Str = "o"; - let TotallyNotJson.1455 : Int1 = lowlevel Eq TotallyNotJson.1454 TotallyNotJson.850; - dec TotallyNotJson.1454; - if TotallyNotJson.1455 then - dec TotallyNotJson.850; - let TotallyNotJson.1419 : Str = "O"; - ret TotallyNotJson.1419; - else - let TotallyNotJson.1452 : Str = "p"; - let TotallyNotJson.1453 : Int1 = lowlevel Eq TotallyNotJson.1452 TotallyNotJson.850; - dec TotallyNotJson.1452; - if TotallyNotJson.1453 then - dec TotallyNotJson.850; - let TotallyNotJson.1420 : Str = "P"; - ret TotallyNotJson.1420; - else - let TotallyNotJson.1450 : Str = "q"; - let TotallyNotJson.1451 : Int1 = lowlevel Eq TotallyNotJson.1450 TotallyNotJson.850; - dec TotallyNotJson.1450; - if TotallyNotJson.1451 then - dec TotallyNotJson.850; - let TotallyNotJson.1421 : Str = "Q"; - ret TotallyNotJson.1421; - else - let TotallyNotJson.1448 : Str = "r"; - let TotallyNotJson.1449 : Int1 = lowlevel Eq TotallyNotJson.1448 TotallyNotJson.850; - dec TotallyNotJson.1448; - if TotallyNotJson.1449 then - dec TotallyNotJson.850; - let TotallyNotJson.1422 : Str = "R"; - ret TotallyNotJson.1422; - else - let TotallyNotJson.1446 : Str = "s"; - let TotallyNotJson.1447 : Int1 = lowlevel Eq TotallyNotJson.1446 TotallyNotJson.850; - dec TotallyNotJson.1446; - if TotallyNotJson.1447 then - dec TotallyNotJson.850; - let TotallyNotJson.1423 : Str = "S"; - ret TotallyNotJson.1423; - else - let TotallyNotJson.1444 : Str = "t"; - let TotallyNotJson.1445 : Int1 = lowlevel Eq TotallyNotJson.1444 TotallyNotJson.850; - dec TotallyNotJson.1444; - if TotallyNotJson.1445 then - dec TotallyNotJson.850; - let TotallyNotJson.1424 : Str = "T"; - ret TotallyNotJson.1424; - else - let TotallyNotJson.1442 : Str = "u"; - let TotallyNotJson.1443 : Int1 = lowlevel Eq TotallyNotJson.1442 TotallyNotJson.850; - dec TotallyNotJson.1442; - if TotallyNotJson.1443 then - dec TotallyNotJson.850; - let TotallyNotJson.1425 : Str = "U"; - ret TotallyNotJson.1425; - else - let TotallyNotJson.1440 : Str = "v"; - let TotallyNotJson.1441 : Int1 = lowlevel Eq TotallyNotJson.1440 TotallyNotJson.850; - dec TotallyNotJson.1440; - if TotallyNotJson.1441 then - dec TotallyNotJson.850; - let TotallyNotJson.1426 : Str = "V"; - ret TotallyNotJson.1426; - else - let TotallyNotJson.1438 : Str = "w"; - let TotallyNotJson.1439 : Int1 = lowlevel Eq TotallyNotJson.1438 TotallyNotJson.850; - dec TotallyNotJson.1438; - if TotallyNotJson.1439 then - dec TotallyNotJson.850; - let TotallyNotJson.1427 : Str = "W"; - ret TotallyNotJson.1427; - else - let TotallyNotJson.1436 : Str = "x"; - let TotallyNotJson.1437 : Int1 = lowlevel Eq TotallyNotJson.1436 TotallyNotJson.850; - dec TotallyNotJson.1436; - if TotallyNotJson.1437 then - dec TotallyNotJson.850; - let TotallyNotJson.1428 : Str = "X"; - ret TotallyNotJson.1428; - else - let TotallyNotJson.1434 : Str = "y"; - let TotallyNotJson.1435 : Int1 = lowlevel Eq TotallyNotJson.1434 TotallyNotJson.850; - dec TotallyNotJson.1434; - if TotallyNotJson.1435 then - dec TotallyNotJson.850; - let TotallyNotJson.1429 : Str = "Y"; - ret TotallyNotJson.1429; - else - let TotallyNotJson.1432 : Str = "z"; - let TotallyNotJson.1433 : Int1 = lowlevel Eq TotallyNotJson.1432 TotallyNotJson.850; - dec TotallyNotJson.1432; - if TotallyNotJson.1433 then - dec TotallyNotJson.850; - let TotallyNotJson.1430 : Str = "Z"; - ret TotallyNotJson.1430; - else - ret TotallyNotJson.850; - -procedure TotallyNotJson.101 (TotallyNotJson.851): - let TotallyNotJson.1303 : Str = "A"; - let TotallyNotJson.1304 : Int1 = lowlevel Eq TotallyNotJson.1303 TotallyNotJson.851; - dec TotallyNotJson.1303; - if TotallyNotJson.1304 then - dec TotallyNotJson.851; - let TotallyNotJson.1226 : Str = "a"; - ret TotallyNotJson.1226; - else - let TotallyNotJson.1301 : Str = "B"; - let TotallyNotJson.1302 : Int1 = lowlevel Eq TotallyNotJson.1301 TotallyNotJson.851; - dec TotallyNotJson.1301; - if TotallyNotJson.1302 then - dec TotallyNotJson.851; - let TotallyNotJson.1227 : Str = "b"; - ret TotallyNotJson.1227; - else - let TotallyNotJson.1299 : Str = "C"; - let TotallyNotJson.1300 : Int1 = lowlevel Eq TotallyNotJson.1299 TotallyNotJson.851; - dec TotallyNotJson.1299; - if TotallyNotJson.1300 then - dec TotallyNotJson.851; - let TotallyNotJson.1228 : Str = "c"; - ret TotallyNotJson.1228; - else - let TotallyNotJson.1297 : Str = "D"; - let TotallyNotJson.1298 : Int1 = lowlevel Eq TotallyNotJson.1297 TotallyNotJson.851; - dec TotallyNotJson.1297; - if TotallyNotJson.1298 then - dec TotallyNotJson.851; - let TotallyNotJson.1229 : Str = "d"; - ret TotallyNotJson.1229; - else - let TotallyNotJson.1295 : Str = "E"; - let TotallyNotJson.1296 : Int1 = lowlevel Eq TotallyNotJson.1295 TotallyNotJson.851; - dec TotallyNotJson.1295; - if TotallyNotJson.1296 then - dec TotallyNotJson.851; - let TotallyNotJson.1230 : Str = "e"; - ret TotallyNotJson.1230; - else - let TotallyNotJson.1293 : Str = "F"; - let TotallyNotJson.1294 : Int1 = lowlevel Eq TotallyNotJson.1293 TotallyNotJson.851; - dec TotallyNotJson.1293; - if TotallyNotJson.1294 then - dec TotallyNotJson.851; - let TotallyNotJson.1231 : Str = "f"; - ret TotallyNotJson.1231; - else - let TotallyNotJson.1291 : Str = "G"; - let TotallyNotJson.1292 : Int1 = lowlevel Eq TotallyNotJson.1291 TotallyNotJson.851; - dec TotallyNotJson.1291; - if TotallyNotJson.1292 then - dec TotallyNotJson.851; - let TotallyNotJson.1232 : Str = "g"; - ret TotallyNotJson.1232; - else - let TotallyNotJson.1289 : Str = "H"; - let TotallyNotJson.1290 : Int1 = lowlevel Eq TotallyNotJson.1289 TotallyNotJson.851; - dec TotallyNotJson.1289; - if TotallyNotJson.1290 then - dec TotallyNotJson.851; - let TotallyNotJson.1233 : Str = "h"; - ret TotallyNotJson.1233; - else - let TotallyNotJson.1287 : Str = "I"; - let TotallyNotJson.1288 : Int1 = lowlevel Eq TotallyNotJson.1287 TotallyNotJson.851; - dec TotallyNotJson.1287; - if TotallyNotJson.1288 then - dec TotallyNotJson.851; - let TotallyNotJson.1234 : Str = "i"; - ret TotallyNotJson.1234; - else - let TotallyNotJson.1285 : Str = "J"; - let TotallyNotJson.1286 : Int1 = lowlevel Eq TotallyNotJson.1285 TotallyNotJson.851; - dec TotallyNotJson.1285; - if TotallyNotJson.1286 then - dec TotallyNotJson.851; - let TotallyNotJson.1235 : Str = "j"; - ret TotallyNotJson.1235; - else - let TotallyNotJson.1283 : Str = "K"; - let TotallyNotJson.1284 : Int1 = lowlevel Eq TotallyNotJson.1283 TotallyNotJson.851; - dec TotallyNotJson.1283; - if TotallyNotJson.1284 then - dec TotallyNotJson.851; - let TotallyNotJson.1236 : Str = "k"; - ret TotallyNotJson.1236; - else - let TotallyNotJson.1281 : Str = "L"; - let TotallyNotJson.1282 : Int1 = lowlevel Eq TotallyNotJson.1281 TotallyNotJson.851; - dec TotallyNotJson.1281; - if TotallyNotJson.1282 then - dec TotallyNotJson.851; - let TotallyNotJson.1237 : Str = "l"; - ret TotallyNotJson.1237; - else - let TotallyNotJson.1279 : Str = "M"; - let TotallyNotJson.1280 : Int1 = lowlevel Eq TotallyNotJson.1279 TotallyNotJson.851; - dec TotallyNotJson.1279; - if TotallyNotJson.1280 then - dec TotallyNotJson.851; - let TotallyNotJson.1238 : Str = "m"; - ret TotallyNotJson.1238; - else - let TotallyNotJson.1277 : Str = "N"; - let TotallyNotJson.1278 : Int1 = lowlevel Eq TotallyNotJson.1277 TotallyNotJson.851; - dec TotallyNotJson.1277; - if TotallyNotJson.1278 then - dec TotallyNotJson.851; - let TotallyNotJson.1239 : Str = "n"; - ret TotallyNotJson.1239; - else - let TotallyNotJson.1275 : Str = "O"; - let TotallyNotJson.1276 : Int1 = lowlevel Eq TotallyNotJson.1275 TotallyNotJson.851; - dec TotallyNotJson.1275; - if TotallyNotJson.1276 then - dec TotallyNotJson.851; - let TotallyNotJson.1240 : Str = "o"; - ret TotallyNotJson.1240; - else - let TotallyNotJson.1273 : Str = "P"; - let TotallyNotJson.1274 : Int1 = lowlevel Eq TotallyNotJson.1273 TotallyNotJson.851; - dec TotallyNotJson.1273; - if TotallyNotJson.1274 then - dec TotallyNotJson.851; - let TotallyNotJson.1241 : Str = "p"; - ret TotallyNotJson.1241; - else - let TotallyNotJson.1271 : Str = "Q"; - let TotallyNotJson.1272 : Int1 = lowlevel Eq TotallyNotJson.1271 TotallyNotJson.851; - dec TotallyNotJson.1271; - if TotallyNotJson.1272 then - dec TotallyNotJson.851; - let TotallyNotJson.1242 : Str = "q"; - ret TotallyNotJson.1242; - else - let TotallyNotJson.1269 : Str = "R"; - let TotallyNotJson.1270 : Int1 = lowlevel Eq TotallyNotJson.1269 TotallyNotJson.851; - dec TotallyNotJson.1269; - if TotallyNotJson.1270 then - dec TotallyNotJson.851; - let TotallyNotJson.1243 : Str = "r"; - ret TotallyNotJson.1243; - else - let TotallyNotJson.1267 : Str = "S"; - let TotallyNotJson.1268 : Int1 = lowlevel Eq TotallyNotJson.1267 TotallyNotJson.851; - dec TotallyNotJson.1267; - if TotallyNotJson.1268 then - dec TotallyNotJson.851; - let TotallyNotJson.1244 : Str = "s"; - ret TotallyNotJson.1244; - else - let TotallyNotJson.1265 : Str = "T"; - let TotallyNotJson.1266 : Int1 = lowlevel Eq TotallyNotJson.1265 TotallyNotJson.851; - dec TotallyNotJson.1265; - if TotallyNotJson.1266 then - dec TotallyNotJson.851; - let TotallyNotJson.1245 : Str = "t"; - ret TotallyNotJson.1245; - else - let TotallyNotJson.1263 : Str = "U"; - let TotallyNotJson.1264 : Int1 = lowlevel Eq TotallyNotJson.1263 TotallyNotJson.851; - dec TotallyNotJson.1263; - if TotallyNotJson.1264 then - dec TotallyNotJson.851; - let TotallyNotJson.1246 : Str = "u"; - ret TotallyNotJson.1246; - else - let TotallyNotJson.1261 : Str = "V"; - let TotallyNotJson.1262 : Int1 = lowlevel Eq TotallyNotJson.1261 TotallyNotJson.851; - dec TotallyNotJson.1261; - if TotallyNotJson.1262 then - dec TotallyNotJson.851; - let TotallyNotJson.1247 : Str = "v"; - ret TotallyNotJson.1247; - else - let TotallyNotJson.1259 : Str = "W"; - let TotallyNotJson.1260 : Int1 = lowlevel Eq TotallyNotJson.1259 TotallyNotJson.851; - dec TotallyNotJson.1259; - if TotallyNotJson.1260 then - dec TotallyNotJson.851; - let TotallyNotJson.1248 : Str = "w"; - ret TotallyNotJson.1248; - else - let TotallyNotJson.1257 : Str = "X"; - let TotallyNotJson.1258 : Int1 = lowlevel Eq TotallyNotJson.1257 TotallyNotJson.851; - dec TotallyNotJson.1257; - if TotallyNotJson.1258 then - dec TotallyNotJson.851; - let TotallyNotJson.1249 : Str = "x"; - ret TotallyNotJson.1249; - else - let TotallyNotJson.1255 : Str = "Y"; - let TotallyNotJson.1256 : Int1 = lowlevel Eq TotallyNotJson.1255 TotallyNotJson.851; - dec TotallyNotJson.1255; - if TotallyNotJson.1256 then - dec TotallyNotJson.851; - let TotallyNotJson.1250 : Str = "y"; - ret TotallyNotJson.1250; - else - let TotallyNotJson.1253 : Str = "Z"; - let TotallyNotJson.1254 : Int1 = lowlevel Eq TotallyNotJson.1253 TotallyNotJson.851; - dec TotallyNotJson.1253; - if TotallyNotJson.1254 then - dec TotallyNotJson.851; - let TotallyNotJson.1251 : Str = "z"; - ret TotallyNotJson.1251; - else - ret TotallyNotJson.851; - -procedure TotallyNotJson.102 (TotallyNotJson.852): - let TotallyNotJson.1392 : Str = "A"; - let TotallyNotJson.1393 : Int1 = lowlevel Eq TotallyNotJson.1392 TotallyNotJson.852; - dec TotallyNotJson.1392; - if TotallyNotJson.1393 then - dec TotallyNotJson.852; - let TotallyNotJson.1315 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1315; - else - let TotallyNotJson.1390 : Str = "B"; - let TotallyNotJson.1391 : Int1 = lowlevel Eq TotallyNotJson.1390 TotallyNotJson.852; - dec TotallyNotJson.1390; - if TotallyNotJson.1391 then - dec TotallyNotJson.852; - let TotallyNotJson.1316 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1316; - else - let TotallyNotJson.1388 : Str = "C"; - let TotallyNotJson.1389 : Int1 = lowlevel Eq TotallyNotJson.1388 TotallyNotJson.852; - dec TotallyNotJson.1388; - if TotallyNotJson.1389 then - dec TotallyNotJson.852; - let TotallyNotJson.1317 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1317; - else - let TotallyNotJson.1386 : Str = "D"; - let TotallyNotJson.1387 : Int1 = lowlevel Eq TotallyNotJson.1386 TotallyNotJson.852; - dec TotallyNotJson.1386; - if TotallyNotJson.1387 then - dec TotallyNotJson.852; - let TotallyNotJson.1318 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1318; - else - let TotallyNotJson.1384 : Str = "E"; - let TotallyNotJson.1385 : Int1 = lowlevel Eq TotallyNotJson.1384 TotallyNotJson.852; - dec TotallyNotJson.1384; - if TotallyNotJson.1385 then - dec TotallyNotJson.852; - let TotallyNotJson.1319 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1319; - else - let TotallyNotJson.1382 : Str = "F"; - let TotallyNotJson.1383 : Int1 = lowlevel Eq TotallyNotJson.1382 TotallyNotJson.852; - dec TotallyNotJson.1382; - if TotallyNotJson.1383 then - dec TotallyNotJson.852; - let TotallyNotJson.1320 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1320; - else - let TotallyNotJson.1380 : Str = "G"; - let TotallyNotJson.1381 : Int1 = lowlevel Eq TotallyNotJson.1380 TotallyNotJson.852; - dec TotallyNotJson.1380; - if TotallyNotJson.1381 then - dec TotallyNotJson.852; - let TotallyNotJson.1321 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1321; - else - let TotallyNotJson.1378 : Str = "H"; - let TotallyNotJson.1379 : Int1 = lowlevel Eq TotallyNotJson.1378 TotallyNotJson.852; - dec TotallyNotJson.1378; - if TotallyNotJson.1379 then - dec TotallyNotJson.852; - let TotallyNotJson.1322 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1322; - else - let TotallyNotJson.1376 : Str = "I"; - let TotallyNotJson.1377 : Int1 = lowlevel Eq TotallyNotJson.1376 TotallyNotJson.852; - dec TotallyNotJson.1376; - if TotallyNotJson.1377 then - dec TotallyNotJson.852; - let TotallyNotJson.1323 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1323; - else - let TotallyNotJson.1374 : Str = "J"; - let TotallyNotJson.1375 : Int1 = lowlevel Eq TotallyNotJson.1374 TotallyNotJson.852; - dec TotallyNotJson.1374; - if TotallyNotJson.1375 then - dec TotallyNotJson.852; - let TotallyNotJson.1324 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1324; - else - let TotallyNotJson.1372 : Str = "K"; - let TotallyNotJson.1373 : Int1 = lowlevel Eq TotallyNotJson.1372 TotallyNotJson.852; - dec TotallyNotJson.1372; - if TotallyNotJson.1373 then - dec TotallyNotJson.852; - let TotallyNotJson.1325 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1325; - else - let TotallyNotJson.1370 : Str = "L"; - let TotallyNotJson.1371 : Int1 = lowlevel Eq TotallyNotJson.1370 TotallyNotJson.852; - dec TotallyNotJson.1370; - if TotallyNotJson.1371 then - dec TotallyNotJson.852; - let TotallyNotJson.1326 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1326; - else - let TotallyNotJson.1368 : Str = "M"; - let TotallyNotJson.1369 : Int1 = lowlevel Eq TotallyNotJson.1368 TotallyNotJson.852; - dec TotallyNotJson.1368; - if TotallyNotJson.1369 then - dec TotallyNotJson.852; - let TotallyNotJson.1327 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1327; - else - let TotallyNotJson.1366 : Str = "N"; - let TotallyNotJson.1367 : Int1 = lowlevel Eq TotallyNotJson.1366 TotallyNotJson.852; - dec TotallyNotJson.1366; - if TotallyNotJson.1367 then - dec TotallyNotJson.852; - let TotallyNotJson.1328 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1328; - else - let TotallyNotJson.1364 : Str = "O"; - let TotallyNotJson.1365 : Int1 = lowlevel Eq TotallyNotJson.1364 TotallyNotJson.852; - dec TotallyNotJson.1364; - if TotallyNotJson.1365 then - dec TotallyNotJson.852; - let TotallyNotJson.1329 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1329; - else - let TotallyNotJson.1362 : Str = "P"; - let TotallyNotJson.1363 : Int1 = lowlevel Eq TotallyNotJson.1362 TotallyNotJson.852; - dec TotallyNotJson.1362; - if TotallyNotJson.1363 then - dec TotallyNotJson.852; - let TotallyNotJson.1330 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1330; - else - let TotallyNotJson.1360 : Str = "Q"; - let TotallyNotJson.1361 : Int1 = lowlevel Eq TotallyNotJson.1360 TotallyNotJson.852; - dec TotallyNotJson.1360; - if TotallyNotJson.1361 then - dec TotallyNotJson.852; - let TotallyNotJson.1331 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1331; - else - let TotallyNotJson.1358 : Str = "R"; - let TotallyNotJson.1359 : Int1 = lowlevel Eq TotallyNotJson.1358 TotallyNotJson.852; - dec TotallyNotJson.1358; - if TotallyNotJson.1359 then - dec TotallyNotJson.852; - let TotallyNotJson.1332 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1332; - else - let TotallyNotJson.1356 : Str = "S"; - let TotallyNotJson.1357 : Int1 = lowlevel Eq TotallyNotJson.1356 TotallyNotJson.852; - dec TotallyNotJson.1356; - if TotallyNotJson.1357 then - dec TotallyNotJson.852; - let TotallyNotJson.1333 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1333; - else - let TotallyNotJson.1354 : Str = "T"; - let TotallyNotJson.1355 : Int1 = lowlevel Eq TotallyNotJson.1354 TotallyNotJson.852; - dec TotallyNotJson.1354; - if TotallyNotJson.1355 then - dec TotallyNotJson.852; - let TotallyNotJson.1334 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1334; - else - let TotallyNotJson.1352 : Str = "U"; - let TotallyNotJson.1353 : Int1 = lowlevel Eq TotallyNotJson.1352 TotallyNotJson.852; - dec TotallyNotJson.1352; - if TotallyNotJson.1353 then - dec TotallyNotJson.852; - let TotallyNotJson.1335 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1335; - else - let TotallyNotJson.1350 : Str = "V"; - let TotallyNotJson.1351 : Int1 = lowlevel Eq TotallyNotJson.1350 TotallyNotJson.852; - dec TotallyNotJson.1350; - if TotallyNotJson.1351 then - dec TotallyNotJson.852; - let TotallyNotJson.1336 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1336; - else - let TotallyNotJson.1348 : Str = "W"; - let TotallyNotJson.1349 : Int1 = lowlevel Eq TotallyNotJson.1348 TotallyNotJson.852; - dec TotallyNotJson.1348; - if TotallyNotJson.1349 then - dec TotallyNotJson.852; - let TotallyNotJson.1337 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1337; - else - let TotallyNotJson.1346 : Str = "X"; - let TotallyNotJson.1347 : Int1 = lowlevel Eq TotallyNotJson.1346 TotallyNotJson.852; - dec TotallyNotJson.1346; - if TotallyNotJson.1347 then - dec TotallyNotJson.852; - let TotallyNotJson.1338 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1338; - else - let TotallyNotJson.1344 : Str = "Y"; - let TotallyNotJson.1345 : Int1 = lowlevel Eq TotallyNotJson.1344 TotallyNotJson.852; - dec TotallyNotJson.1344; - if TotallyNotJson.1345 then - dec TotallyNotJson.852; - let TotallyNotJson.1339 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1339; - else - let TotallyNotJson.1342 : Str = "Z"; - let TotallyNotJson.1343 : Int1 = lowlevel Eq TotallyNotJson.1342 TotallyNotJson.852; - dec TotallyNotJson.852; - dec TotallyNotJson.1342; - if TotallyNotJson.1343 then - let TotallyNotJson.1340 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1340; - else - let TotallyNotJson.1341 : Int1 = CallByName Bool.1; - ret TotallyNotJson.1341; - -procedure TotallyNotJson.182 (TotallyNotJson.183, TotallyNotJson.1533, TotallyNotJson.181): - let TotallyNotJson.1536 : List U8 = CallByName TotallyNotJson.26 TotallyNotJson.181; - let TotallyNotJson.1535 : List U8 = CallByName List.8 TotallyNotJson.183 TotallyNotJson.1536; - ret TotallyNotJson.1535; - -procedure TotallyNotJson.189 (TotallyNotJson.1584, TotallyNotJson.192): - let TotallyNotJson.190 : U64 = StructAtIndex 0 TotallyNotJson.1584; - let TotallyNotJson.191 : Int1 = StructAtIndex 1 TotallyNotJson.1584; - switch TotallyNotJson.192: + let Str.253 : U8 = StructAtIndex 3 Str.69; + let Str.254 : U64 = StructAtIndex 0 Str.69; + let #Derived_gen.38 : Str = StructAtIndex 1 Str.69; + dec #Derived_gen.38; + let Str.252 : {U64, U8} = Struct {Str.254, Str.253}; + let Str.251 : [C {U64, U8}, C Str] = TagId(0) Str.252; + ret Str.251; + +procedure TotallyNotJson.150 (TotallyNotJson.151, TotallyNotJson.1009, TotallyNotJson.149): + let TotallyNotJson.1012 : List U8 = CallByName TotallyNotJson.26 TotallyNotJson.149; + let TotallyNotJson.1011 : List U8 = CallByName List.8 TotallyNotJson.151 TotallyNotJson.1012; + ret TotallyNotJson.1011; + +procedure TotallyNotJson.157 (TotallyNotJson.1060, TotallyNotJson.160): + let TotallyNotJson.158 : U64 = StructAtIndex 0 TotallyNotJson.1060; + let TotallyNotJson.159 : Int1 = StructAtIndex 1 TotallyNotJson.1060; + switch TotallyNotJson.160: case 34: - let TotallyNotJson.1587 : Int1 = false; - let TotallyNotJson.1586 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1587}; - let TotallyNotJson.1585 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1586; - ret TotallyNotJson.1585; + let TotallyNotJson.1063 : Int1 = false; + let TotallyNotJson.1062 : {U64, Int1} = Struct {TotallyNotJson.158, TotallyNotJson.1063}; + let TotallyNotJson.1061 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1062; + ret TotallyNotJson.1061; case 92: - let TotallyNotJson.1590 : Int1 = false; - let TotallyNotJson.1589 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1590}; - let TotallyNotJson.1588 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1589; - ret TotallyNotJson.1588; + let TotallyNotJson.1066 : Int1 = false; + let TotallyNotJson.1065 : {U64, Int1} = Struct {TotallyNotJson.158, TotallyNotJson.1066}; + let TotallyNotJson.1064 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1065; + ret TotallyNotJson.1064; case 47: - let TotallyNotJson.1593 : Int1 = false; - let TotallyNotJson.1592 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1593}; - let TotallyNotJson.1591 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1592; - ret TotallyNotJson.1591; + let TotallyNotJson.1069 : Int1 = false; + let TotallyNotJson.1068 : {U64, Int1} = Struct {TotallyNotJson.158, TotallyNotJson.1069}; + let TotallyNotJson.1067 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1068; + ret TotallyNotJson.1067; case 8: - let TotallyNotJson.1596 : Int1 = false; - let TotallyNotJson.1595 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1596}; - let TotallyNotJson.1594 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1595; - ret TotallyNotJson.1594; + let TotallyNotJson.1072 : Int1 = false; + let TotallyNotJson.1071 : {U64, Int1} = Struct {TotallyNotJson.158, TotallyNotJson.1072}; + let TotallyNotJson.1070 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1071; + ret TotallyNotJson.1070; case 12: - let TotallyNotJson.1599 : Int1 = false; - let TotallyNotJson.1598 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1599}; - let TotallyNotJson.1597 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1598; - ret TotallyNotJson.1597; + let TotallyNotJson.1075 : Int1 = false; + let TotallyNotJson.1074 : {U64, Int1} = Struct {TotallyNotJson.158, TotallyNotJson.1075}; + let TotallyNotJson.1073 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1074; + ret TotallyNotJson.1073; case 10: - let TotallyNotJson.1602 : Int1 = false; - let TotallyNotJson.1601 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1602}; - let TotallyNotJson.1600 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1601; - ret TotallyNotJson.1600; + let TotallyNotJson.1078 : Int1 = false; + let TotallyNotJson.1077 : {U64, Int1} = Struct {TotallyNotJson.158, TotallyNotJson.1078}; + let TotallyNotJson.1076 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1077; + ret TotallyNotJson.1076; case 13: - let TotallyNotJson.1605 : Int1 = false; - let TotallyNotJson.1604 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1605}; - let TotallyNotJson.1603 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1604; - ret TotallyNotJson.1603; + let TotallyNotJson.1081 : Int1 = false; + let TotallyNotJson.1080 : {U64, Int1} = Struct {TotallyNotJson.158, TotallyNotJson.1081}; + let TotallyNotJson.1079 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1080; + ret TotallyNotJson.1079; case 9: - let TotallyNotJson.1608 : Int1 = false; - let TotallyNotJson.1607 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1608}; - let TotallyNotJson.1606 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1607; - ret TotallyNotJson.1606; + let TotallyNotJson.1084 : Int1 = false; + let TotallyNotJson.1083 : {U64, Int1} = Struct {TotallyNotJson.158, TotallyNotJson.1084}; + let TotallyNotJson.1082 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1083; + ret TotallyNotJson.1082; default: - let TotallyNotJson.1612 : U64 = 1i64; - let TotallyNotJson.1611 : U64 = CallByName Num.19 TotallyNotJson.190 TotallyNotJson.1612; - let TotallyNotJson.1610 : {U64, Int1} = Struct {TotallyNotJson.1611, TotallyNotJson.191}; - let TotallyNotJson.1609 : [C {U64, Int1}, C {U64, Int1}] = TagId(1) TotallyNotJson.1610; - ret TotallyNotJson.1609; + let TotallyNotJson.1088 : U64 = 1i64; + let TotallyNotJson.1087 : U64 = CallByName Num.19 TotallyNotJson.158 TotallyNotJson.1088; + let TotallyNotJson.1086 : {U64, Int1} = Struct {TotallyNotJson.1087, TotallyNotJson.159}; + let TotallyNotJson.1085 : [C {U64, Int1}, C {U64, Int1}] = TagId(1) TotallyNotJson.1086; + ret TotallyNotJson.1085; -procedure TotallyNotJson.215 (TotallyNotJson.216, TotallyNotJson.217): - let TotallyNotJson.1555 : List U8 = CallByName TotallyNotJson.27 TotallyNotJson.217; - let TotallyNotJson.1554 : List U8 = CallByName List.8 TotallyNotJson.216 TotallyNotJson.1555; - ret TotallyNotJson.1554; - -procedure TotallyNotJson.234 (TotallyNotJson.235, TotallyNotJson.1175, TotallyNotJson.233): - let TotallyNotJson.1530 : I64 = 123i64; - let TotallyNotJson.1529 : U8 = CallByName Num.127 TotallyNotJson.1530; - let TotallyNotJson.238 : List U8 = CallByName List.4 TotallyNotJson.235 TotallyNotJson.1529; - let TotallyNotJson.1528 : U64 = CallByName List.6 TotallyNotJson.233; - let TotallyNotJson.1183 : {List U8, U64} = Struct {TotallyNotJson.238, TotallyNotJson.1528}; - let TotallyNotJson.1182 : {List U8, U64} = CallByName List.18 TotallyNotJson.233 TotallyNotJson.1183 TotallyNotJson.1175; - let TotallyNotJson.240 : List U8 = StructAtIndex 0 TotallyNotJson.1182; - let TotallyNotJson.1181 : I64 = 125i64; - let TotallyNotJson.1180 : U8 = CallByName Num.127 TotallyNotJson.1181; - let TotallyNotJson.1179 : List U8 = CallByName List.4 TotallyNotJson.240 TotallyNotJson.1180; - ret TotallyNotJson.1179; - -procedure TotallyNotJson.237 (TotallyNotJson.1177, TotallyNotJson.1178, TotallyNotJson.236): - let TotallyNotJson.243 : Str = StructAtIndex 0 TotallyNotJson.1178; - let TotallyNotJson.244 : Str = StructAtIndex 1 TotallyNotJson.1178; - let TotallyNotJson.241 : List U8 = StructAtIndex 0 TotallyNotJson.1177; - let TotallyNotJson.242 : U64 = StructAtIndex 1 TotallyNotJson.1177; - let TotallyNotJson.245 : Str = CallByName TotallyNotJson.82 TotallyNotJson.243 TotallyNotJson.236; - let TotallyNotJson.1205 : I64 = 34i64; - let TotallyNotJson.1204 : U8 = CallByName Num.127 TotallyNotJson.1205; - let TotallyNotJson.1202 : List U8 = CallByName List.4 TotallyNotJson.241 TotallyNotJson.1204; - let TotallyNotJson.1203 : List U8 = CallByName Str.12 TotallyNotJson.245; - let TotallyNotJson.1199 : List U8 = CallByName List.8 TotallyNotJson.1202 TotallyNotJson.1203; - let TotallyNotJson.1201 : I64 = 34i64; - let TotallyNotJson.1200 : U8 = CallByName Num.127 TotallyNotJson.1201; - let TotallyNotJson.1196 : List U8 = CallByName List.4 TotallyNotJson.1199 TotallyNotJson.1200; - let TotallyNotJson.1198 : I64 = 58i64; - let TotallyNotJson.1197 : U8 = CallByName Num.127 TotallyNotJson.1198; - let TotallyNotJson.1194 : List U8 = CallByName List.4 TotallyNotJson.1196 TotallyNotJson.1197; - let TotallyNotJson.246 : List U8 = CallByName Encode.24 TotallyNotJson.1194 TotallyNotJson.244 TotallyNotJson.236; - joinpoint TotallyNotJson.1189 TotallyNotJson.247: - let TotallyNotJson.1187 : U64 = 1i64; - let TotallyNotJson.1186 : U64 = CallByName Num.20 TotallyNotJson.242 TotallyNotJson.1187; - let TotallyNotJson.1185 : {List U8, U64} = Struct {TotallyNotJson.247, TotallyNotJson.1186}; - ret TotallyNotJson.1185; +procedure TotallyNotJson.183 (TotallyNotJson.184, TotallyNotJson.185): + let TotallyNotJson.1031 : List U8 = CallByName TotallyNotJson.27 TotallyNotJson.185; + let TotallyNotJson.1030 : List U8 = CallByName List.8 TotallyNotJson.184 TotallyNotJson.1031; + ret TotallyNotJson.1030; + +procedure TotallyNotJson.201 (TotallyNotJson.202, TotallyNotJson.973, TotallyNotJson.200): + let TotallyNotJson.1006 : I64 = 123i64; + let TotallyNotJson.1005 : U8 = CallByName Num.127 TotallyNotJson.1006; + let TotallyNotJson.204 : List U8 = CallByName List.4 TotallyNotJson.202 TotallyNotJson.1005; + let TotallyNotJson.1004 : U64 = CallByName List.6 TotallyNotJson.200; + let TotallyNotJson.981 : {List U8, U64} = Struct {TotallyNotJson.204, TotallyNotJson.1004}; + let TotallyNotJson.982 : {} = Struct {}; + let TotallyNotJson.980 : {List U8, U64} = CallByName List.18 TotallyNotJson.200 TotallyNotJson.981 TotallyNotJson.982; + let TotallyNotJson.206 : List U8 = StructAtIndex 0 TotallyNotJson.980; + let TotallyNotJson.979 : I64 = 125i64; + let TotallyNotJson.978 : U8 = CallByName Num.127 TotallyNotJson.979; + let TotallyNotJson.977 : List U8 = CallByName List.4 TotallyNotJson.206 TotallyNotJson.978; + ret TotallyNotJson.977; + +procedure TotallyNotJson.203 (TotallyNotJson.975, TotallyNotJson.976): + let TotallyNotJson.209 : Str = StructAtIndex 0 TotallyNotJson.976; + let TotallyNotJson.210 : Str = StructAtIndex 1 TotallyNotJson.976; + let TotallyNotJson.207 : List U8 = StructAtIndex 0 TotallyNotJson.975; + let TotallyNotJson.208 : U64 = StructAtIndex 1 TotallyNotJson.975; + let TotallyNotJson.1003 : I64 = 34i64; + let TotallyNotJson.1002 : U8 = CallByName Num.127 TotallyNotJson.1003; + let TotallyNotJson.1000 : List U8 = CallByName List.4 TotallyNotJson.207 TotallyNotJson.1002; + let TotallyNotJson.1001 : List U8 = CallByName Str.12 TotallyNotJson.209; + let TotallyNotJson.997 : List U8 = CallByName List.8 TotallyNotJson.1000 TotallyNotJson.1001; + let TotallyNotJson.999 : I64 = 34i64; + let TotallyNotJson.998 : U8 = CallByName Num.127 TotallyNotJson.999; + let TotallyNotJson.994 : List U8 = CallByName List.4 TotallyNotJson.997 TotallyNotJson.998; + let TotallyNotJson.996 : I64 = 58i64; + let TotallyNotJson.995 : U8 = CallByName Num.127 TotallyNotJson.996; + let TotallyNotJson.992 : List U8 = CallByName List.4 TotallyNotJson.994 TotallyNotJson.995; + let TotallyNotJson.993 : {} = Struct {}; + let TotallyNotJson.212 : List U8 = CallByName Encode.24 TotallyNotJson.992 TotallyNotJson.210 TotallyNotJson.993; + joinpoint TotallyNotJson.987 TotallyNotJson.213: + let TotallyNotJson.985 : U64 = 1i64; + let TotallyNotJson.984 : U64 = CallByName Num.20 TotallyNotJson.208 TotallyNotJson.985; + let TotallyNotJson.983 : {List U8, U64} = Struct {TotallyNotJson.213, TotallyNotJson.984}; + ret TotallyNotJson.983; in - let TotallyNotJson.1193 : U64 = 1i64; - let TotallyNotJson.1190 : Int1 = CallByName Num.24 TotallyNotJson.242 TotallyNotJson.1193; - if TotallyNotJson.1190 then - let TotallyNotJson.1192 : I64 = 44i64; - let TotallyNotJson.1191 : U8 = CallByName Num.127 TotallyNotJson.1192; - let TotallyNotJson.1188 : List U8 = CallByName List.4 TotallyNotJson.246 TotallyNotJson.1191; - jump TotallyNotJson.1189 TotallyNotJson.1188; + let TotallyNotJson.991 : U64 = 1i64; + let TotallyNotJson.988 : Int1 = CallByName Num.24 TotallyNotJson.208 TotallyNotJson.991; + if TotallyNotJson.988 then + let TotallyNotJson.990 : I64 = 44i64; + let TotallyNotJson.989 : U8 = CallByName Num.127 TotallyNotJson.990; + let TotallyNotJson.986 : List U8 = CallByName List.4 TotallyNotJson.212 TotallyNotJson.989; + jump TotallyNotJson.987 TotallyNotJson.986; else - jump TotallyNotJson.1189 TotallyNotJson.246; - -procedure TotallyNotJson.25 (TotallyNotJson.181): - let TotallyNotJson.1615 : Str = CallByName Encode.23 TotallyNotJson.181; - ret TotallyNotJson.1615; - -procedure TotallyNotJson.26 (TotallyNotJson.184): - let TotallyNotJson.185 : List U8 = CallByName Str.12 TotallyNotJson.184; - let TotallyNotJson.1613 : U64 = 0i64; - let TotallyNotJson.1614 : Int1 = true; - let TotallyNotJson.186 : {U64, Int1} = Struct {TotallyNotJson.1613, TotallyNotJson.1614}; - let TotallyNotJson.1583 : {} = Struct {}; - inc TotallyNotJson.185; - let TotallyNotJson.187 : {U64, Int1} = CallByName List.26 TotallyNotJson.185 TotallyNotJson.186 TotallyNotJson.1583; - let TotallyNotJson.1537 : Int1 = StructAtIndex 1 TotallyNotJson.187; - let TotallyNotJson.1581 : Int1 = true; - let TotallyNotJson.1582 : Int1 = lowlevel Eq TotallyNotJson.1581 TotallyNotJson.1537; - if TotallyNotJson.1582 then - let TotallyNotJson.1547 : U64 = CallByName List.6 TotallyNotJson.185; - let TotallyNotJson.1548 : U64 = 2i64; - let TotallyNotJson.1546 : U64 = CallByName Num.19 TotallyNotJson.1547 TotallyNotJson.1548; - let TotallyNotJson.1543 : List U8 = CallByName List.68 TotallyNotJson.1546; - let TotallyNotJson.1545 : U8 = 34i64; - let TotallyNotJson.1544 : List U8 = Array [TotallyNotJson.1545]; - let TotallyNotJson.1542 : List U8 = CallByName List.8 TotallyNotJson.1543 TotallyNotJson.1544; - let TotallyNotJson.1539 : List U8 = CallByName List.8 TotallyNotJson.1542 TotallyNotJson.185; - let TotallyNotJson.1541 : U8 = 34i64; - let TotallyNotJson.1540 : List U8 = Array [TotallyNotJson.1541]; - let TotallyNotJson.1538 : List U8 = CallByName List.8 TotallyNotJson.1539 TotallyNotJson.1540; - ret TotallyNotJson.1538; + jump TotallyNotJson.987 TotallyNotJson.212; + +procedure TotallyNotJson.25 (TotallyNotJson.149): + let TotallyNotJson.1091 : Str = CallByName Encode.23 TotallyNotJson.149; + ret TotallyNotJson.1091; + +procedure TotallyNotJson.26 (TotallyNotJson.152): + let TotallyNotJson.153 : List U8 = CallByName Str.12 TotallyNotJson.152; + let TotallyNotJson.1089 : U64 = 0i64; + let TotallyNotJson.1090 : Int1 = true; + let TotallyNotJson.154 : {U64, Int1} = Struct {TotallyNotJson.1089, TotallyNotJson.1090}; + let TotallyNotJson.1059 : {} = Struct {}; + inc TotallyNotJson.153; + let TotallyNotJson.155 : {U64, Int1} = CallByName List.26 TotallyNotJson.153 TotallyNotJson.154 TotallyNotJson.1059; + let TotallyNotJson.1013 : Int1 = StructAtIndex 1 TotallyNotJson.155; + let TotallyNotJson.1057 : Int1 = true; + let TotallyNotJson.1058 : Int1 = lowlevel Eq TotallyNotJson.1057 TotallyNotJson.1013; + if TotallyNotJson.1058 then + let TotallyNotJson.1023 : U64 = CallByName List.6 TotallyNotJson.153; + let TotallyNotJson.1024 : U64 = 2i64; + let TotallyNotJson.1022 : U64 = CallByName Num.19 TotallyNotJson.1023 TotallyNotJson.1024; + let TotallyNotJson.1019 : List U8 = CallByName List.68 TotallyNotJson.1022; + let TotallyNotJson.1021 : U8 = 34i64; + let TotallyNotJson.1020 : List U8 = Array [TotallyNotJson.1021]; + let TotallyNotJson.1018 : List U8 = CallByName List.8 TotallyNotJson.1019 TotallyNotJson.1020; + let TotallyNotJson.1015 : List U8 = CallByName List.8 TotallyNotJson.1018 TotallyNotJson.153; + let TotallyNotJson.1017 : U8 = 34i64; + let TotallyNotJson.1016 : List U8 = Array [TotallyNotJson.1017]; + let TotallyNotJson.1014 : List U8 = CallByName List.8 TotallyNotJson.1015 TotallyNotJson.1016; + ret TotallyNotJson.1014; else - inc TotallyNotJson.185; - let TotallyNotJson.1580 : U64 = StructAtIndex 0 TotallyNotJson.187; - let TotallyNotJson.1579 : {List U8, List U8} = CallByName List.52 TotallyNotJson.185 TotallyNotJson.1580; - let TotallyNotJson.211 : List U8 = StructAtIndex 0 TotallyNotJson.1579; - let TotallyNotJson.213 : List U8 = StructAtIndex 1 TotallyNotJson.1579; - let TotallyNotJson.1577 : U64 = CallByName List.6 TotallyNotJson.185; - dec TotallyNotJson.185; - let TotallyNotJson.1578 : U64 = 120i64; - let TotallyNotJson.1575 : U64 = CallByName Num.21 TotallyNotJson.1577 TotallyNotJson.1578; - let TotallyNotJson.1576 : U64 = 100i64; - let TotallyNotJson.1574 : U64 = CallByName Num.94 TotallyNotJson.1575 TotallyNotJson.1576; - let TotallyNotJson.1571 : List U8 = CallByName List.68 TotallyNotJson.1574; - let TotallyNotJson.1573 : U8 = 34i64; - let TotallyNotJson.1572 : List U8 = Array [TotallyNotJson.1573]; - let TotallyNotJson.1570 : List U8 = CallByName List.8 TotallyNotJson.1571 TotallyNotJson.1572; - let TotallyNotJson.214 : List U8 = CallByName List.8 TotallyNotJson.1570 TotallyNotJson.211; - let TotallyNotJson.1553 : {} = Struct {}; - let TotallyNotJson.1550 : List U8 = CallByName List.18 TotallyNotJson.213 TotallyNotJson.214 TotallyNotJson.1553; - let TotallyNotJson.1552 : U8 = 34i64; - let TotallyNotJson.1551 : List U8 = Array [TotallyNotJson.1552]; - let TotallyNotJson.1549 : List U8 = CallByName List.8 TotallyNotJson.1550 TotallyNotJson.1551; - ret TotallyNotJson.1549; - -procedure TotallyNotJson.27 (TotallyNotJson.218): - switch TotallyNotJson.218: + inc TotallyNotJson.153; + let TotallyNotJson.1056 : U64 = StructAtIndex 0 TotallyNotJson.155; + let TotallyNotJson.1055 : {List U8, List U8} = CallByName List.52 TotallyNotJson.153 TotallyNotJson.1056; + let TotallyNotJson.179 : List U8 = StructAtIndex 0 TotallyNotJson.1055; + let TotallyNotJson.181 : List U8 = StructAtIndex 1 TotallyNotJson.1055; + let TotallyNotJson.1053 : U64 = CallByName List.6 TotallyNotJson.153; + dec TotallyNotJson.153; + let TotallyNotJson.1054 : U64 = 120i64; + let TotallyNotJson.1051 : U64 = CallByName Num.21 TotallyNotJson.1053 TotallyNotJson.1054; + let TotallyNotJson.1052 : U64 = 100i64; + let TotallyNotJson.1050 : U64 = CallByName Num.94 TotallyNotJson.1051 TotallyNotJson.1052; + let TotallyNotJson.1047 : List U8 = CallByName List.68 TotallyNotJson.1050; + let TotallyNotJson.1049 : U8 = 34i64; + let TotallyNotJson.1048 : List U8 = Array [TotallyNotJson.1049]; + let TotallyNotJson.1046 : List U8 = CallByName List.8 TotallyNotJson.1047 TotallyNotJson.1048; + let TotallyNotJson.182 : List U8 = CallByName List.8 TotallyNotJson.1046 TotallyNotJson.179; + let TotallyNotJson.1029 : {} = Struct {}; + let TotallyNotJson.1026 : List U8 = CallByName List.18 TotallyNotJson.181 TotallyNotJson.182 TotallyNotJson.1029; + let TotallyNotJson.1028 : U8 = 34i64; + let TotallyNotJson.1027 : List U8 = Array [TotallyNotJson.1028]; + let TotallyNotJson.1025 : List U8 = CallByName List.8 TotallyNotJson.1026 TotallyNotJson.1027; + ret TotallyNotJson.1025; + +procedure TotallyNotJson.27 (TotallyNotJson.186): + switch TotallyNotJson.186: case 34: - let TotallyNotJson.1556 : List U8 = Array [92i64, 34i64]; - ret TotallyNotJson.1556; + let TotallyNotJson.1032 : List U8 = Array [92i64, 34i64]; + ret TotallyNotJson.1032; case 92: - let TotallyNotJson.1557 : List U8 = Array [92i64, 92i64]; - ret TotallyNotJson.1557; + let TotallyNotJson.1033 : List U8 = Array [92i64, 92i64]; + ret TotallyNotJson.1033; case 47: - let TotallyNotJson.1558 : List U8 = Array [92i64, 47i64]; - ret TotallyNotJson.1558; + let TotallyNotJson.1034 : List U8 = Array [92i64, 47i64]; + ret TotallyNotJson.1034; case 8: - let TotallyNotJson.1560 : U8 = 98i64; - let TotallyNotJson.1559 : List U8 = Array [92i64, TotallyNotJson.1560]; - ret TotallyNotJson.1559; + let TotallyNotJson.1036 : U8 = 98i64; + let TotallyNotJson.1035 : List U8 = Array [92i64, TotallyNotJson.1036]; + ret TotallyNotJson.1035; case 12: - let TotallyNotJson.1562 : U8 = 102i64; - let TotallyNotJson.1561 : List U8 = Array [92i64, TotallyNotJson.1562]; - ret TotallyNotJson.1561; + let TotallyNotJson.1038 : U8 = 102i64; + let TotallyNotJson.1037 : List U8 = Array [92i64, TotallyNotJson.1038]; + ret TotallyNotJson.1037; case 10: - let TotallyNotJson.1564 : U8 = 110i64; - let TotallyNotJson.1563 : List U8 = Array [92i64, TotallyNotJson.1564]; - ret TotallyNotJson.1563; + let TotallyNotJson.1040 : U8 = 110i64; + let TotallyNotJson.1039 : List U8 = Array [92i64, TotallyNotJson.1040]; + ret TotallyNotJson.1039; case 13: - let TotallyNotJson.1566 : U8 = 114i64; - let TotallyNotJson.1565 : List U8 = Array [92i64, TotallyNotJson.1566]; - ret TotallyNotJson.1565; + let TotallyNotJson.1042 : U8 = 114i64; + let TotallyNotJson.1041 : List U8 = Array [92i64, TotallyNotJson.1042]; + ret TotallyNotJson.1041; case 9: - let TotallyNotJson.1568 : U8 = 114i64; - let TotallyNotJson.1567 : List U8 = Array [92i64, TotallyNotJson.1568]; - ret TotallyNotJson.1567; + let TotallyNotJson.1044 : U8 = 114i64; + let TotallyNotJson.1043 : List U8 = Array [92i64, TotallyNotJson.1044]; + ret TotallyNotJson.1043; default: - let TotallyNotJson.1569 : List U8 = Array [TotallyNotJson.218]; - ret TotallyNotJson.1569; + let TotallyNotJson.1045 : List U8 = Array [TotallyNotJson.186]; + ret TotallyNotJson.1045; -procedure TotallyNotJson.29 (TotallyNotJson.233): - let TotallyNotJson.1173 : List {Str, Str} = CallByName Encode.23 TotallyNotJson.233; - ret TotallyNotJson.1173; +procedure TotallyNotJson.29 (TotallyNotJson.200): + let TotallyNotJson.971 : List {Str, Str} = CallByName Encode.23 TotallyNotJson.200; + ret TotallyNotJson.971; procedure TotallyNotJson.8 (): - let TotallyNotJson.1172 : [C , C [], C , C , C , C ] = TagId(2) ; - ret TotallyNotJson.1172; - -procedure TotallyNotJson.82 (TotallyNotJson.802, TotallyNotJson.803): - let TotallyNotJson.1527 : U8 = GetTagId TotallyNotJson.803; - switch TotallyNotJson.1527: - case 2: - ret TotallyNotJson.802; - - case 5: - let TotallyNotJson.1207 : Str = CallByName TotallyNotJson.87 TotallyNotJson.802; - ret TotallyNotJson.1207; - - case 4: - let TotallyNotJson.1399 : Str = CallByName TotallyNotJson.88 TotallyNotJson.802; - ret TotallyNotJson.1399; - - case 3: - let TotallyNotJson.1489 : Str = CallByName TotallyNotJson.89 TotallyNotJson.802; - ret TotallyNotJson.1489; - - case 0: - let TotallyNotJson.1523 : Str = CallByName TotallyNotJson.90 TotallyNotJson.802; - ret TotallyNotJson.1523; - - default: - dec TotallyNotJson.802; - let TotallyNotJson.804 : [] = UnionAtIndex (Id 1) (Index 0) TotallyNotJson.803; - let TotallyNotJson.1526 : Str = "a Lambda Set is empty. Most likely there is a type error in your program."; - Crash TotallyNotJson.1526 - - -procedure TotallyNotJson.832 (TotallyNotJson.1496): - let TotallyNotJson.1497 : List Str = StructAtIndex 1 TotallyNotJson.1496; - let #Derived_gen.41 : List Str = StructAtIndex 0 TotallyNotJson.1496; - dec #Derived_gen.41; - ret TotallyNotJson.1497; - -procedure TotallyNotJson.840 (TotallyNotJson.1214): - let TotallyNotJson.1215 : List Str = StructAtIndex 1 TotallyNotJson.1214; - let #Derived_gen.42 : List Str = StructAtIndex 0 TotallyNotJson.1214; - dec #Derived_gen.42; - ret TotallyNotJson.1215; - -procedure TotallyNotJson.87 (TotallyNotJson.809): - let TotallyNotJson.1208 : Str = CallByName TotallyNotJson.97 TotallyNotJson.809; - ret TotallyNotJson.1208; - -procedure TotallyNotJson.88 (TotallyNotJson.810): - let TotallyNotJson.1400 : Str = CallByName TotallyNotJson.94 TotallyNotJson.810; - ret TotallyNotJson.1400; - -procedure TotallyNotJson.89 (TotallyNotJson.811): - let TotallyNotJson.1490 : Str = CallByName TotallyNotJson.95 TotallyNotJson.811; - ret TotallyNotJson.1490; - -procedure TotallyNotJson.90 (TotallyNotJson.812): - ret TotallyNotJson.812; - -procedure TotallyNotJson.94 (TotallyNotJson.824): - let TotallyNotJson.825 : List Str = CallByName Str.55 TotallyNotJson.824; - let TotallyNotJson.1486 : U64 = lowlevel ListLen TotallyNotJson.825; - let TotallyNotJson.1487 : U64 = 1i64; - let TotallyNotJson.1488 : Int1 = lowlevel NumGte TotallyNotJson.1486 TotallyNotJson.1487; - if TotallyNotJson.1488 then - dec TotallyNotJson.824; - let TotallyNotJson.1485 : U64 = 0i64; - let TotallyNotJson.826 : Str = lowlevel ListGetUnsafe TotallyNotJson.825 TotallyNotJson.1485; - inc TotallyNotJson.826; - let TotallyNotJson.827 : Str = CallByName TotallyNotJson.100 TotallyNotJson.826; - let TotallyNotJson.1404 : U64 = 1i64; - let TotallyNotJson.828 : List Str = CallByName List.38 TotallyNotJson.825 TotallyNotJson.1404; - let TotallyNotJson.1402 : List Str = CallByName List.13 TotallyNotJson.828 TotallyNotJson.827; - let TotallyNotJson.1403 : Str = ""; - let TotallyNotJson.1401 : Str = CallByName Str.4 TotallyNotJson.1402 TotallyNotJson.1403; - dec TotallyNotJson.1403; - dec TotallyNotJson.1402; - ret TotallyNotJson.1401; - else - dec TotallyNotJson.825; - ret TotallyNotJson.824; - -procedure TotallyNotJson.95 (TotallyNotJson.829): - let TotallyNotJson.830 : List Str = CallByName Str.55 TotallyNotJson.829; - dec TotallyNotJson.829; - let TotallyNotJson.1522 : U64 = CallByName List.6 TotallyNotJson.830; - let TotallyNotJson.831 : List Str = CallByName List.68 TotallyNotJson.1522; - let TotallyNotJson.1498 : {List Str, List Str} = Struct {TotallyNotJson.830, TotallyNotJson.831}; - let TotallyNotJson.1494 : {List Str, List Str} = CallByName TotallyNotJson.96 TotallyNotJson.1498; - let TotallyNotJson.1495 : {} = Struct {}; - let TotallyNotJson.1492 : List Str = CallByName TotallyNotJson.832 TotallyNotJson.1494; - let TotallyNotJson.1493 : Str = ""; - let TotallyNotJson.1491 : Str = CallByName Str.4 TotallyNotJson.1492 TotallyNotJson.1493; - dec TotallyNotJson.1493; - dec TotallyNotJson.1492; - ret TotallyNotJson.1491; - -procedure TotallyNotJson.96 (#Derived_gen.34): - joinpoint TotallyNotJson.1499 TotallyNotJson.1168: - let TotallyNotJson.834 : List Str = StructAtIndex 0 TotallyNotJson.1168; - let TotallyNotJson.833 : List Str = StructAtIndex 1 TotallyNotJson.1168; - let TotallyNotJson.1519 : U64 = lowlevel ListLen TotallyNotJson.834; - let TotallyNotJson.1520 : U64 = 1i64; - let TotallyNotJson.1521 : Int1 = lowlevel NumGte TotallyNotJson.1519 TotallyNotJson.1520; - if TotallyNotJson.1521 then - let TotallyNotJson.1518 : U64 = 0i64; - let TotallyNotJson.835 : Str = lowlevel ListGetUnsafe TotallyNotJson.834 TotallyNotJson.1518; - inc 2 TotallyNotJson.835; - joinpoint TotallyNotJson.1516 TotallyNotJson.1515: - if TotallyNotJson.1515 then - let TotallyNotJson.1508 : U64 = 1i64; - let TotallyNotJson.1503 : List Str = CallByName List.38 TotallyNotJson.834 TotallyNotJson.1508; - let TotallyNotJson.1506 : Str = "-"; - let TotallyNotJson.1507 : Str = CallByName TotallyNotJson.101 TotallyNotJson.835; - let TotallyNotJson.1505 : List Str = Array [TotallyNotJson.1506, TotallyNotJson.1507]; - let TotallyNotJson.1504 : List Str = CallByName List.8 TotallyNotJson.833 TotallyNotJson.1505; - let TotallyNotJson.1502 : {List Str, List Str} = Struct {TotallyNotJson.1503, TotallyNotJson.1504}; - jump TotallyNotJson.1499 TotallyNotJson.1502; - else - dec TotallyNotJson.835; - let TotallyNotJson.1514 : U64 = 0i64; - let TotallyNotJson.836 : Str = lowlevel ListGetUnsafe TotallyNotJson.834 TotallyNotJson.1514; - inc TotallyNotJson.836; - let TotallyNotJson.1513 : U64 = 1i64; - let TotallyNotJson.1511 : List Str = CallByName List.38 TotallyNotJson.834 TotallyNotJson.1513; - let TotallyNotJson.1512 : List Str = CallByName List.4 TotallyNotJson.833 TotallyNotJson.836; - let TotallyNotJson.1510 : {List Str, List Str} = Struct {TotallyNotJson.1511, TotallyNotJson.1512}; - jump TotallyNotJson.1499 TotallyNotJson.1510; - in - let TotallyNotJson.1517 : Int1 = CallByName TotallyNotJson.102 TotallyNotJson.835; - jump TotallyNotJson.1516 TotallyNotJson.1517; - else - let TotallyNotJson.1500 : {List Str, List Str} = Struct {TotallyNotJson.834, TotallyNotJson.833}; - ret TotallyNotJson.1500; - in - jump TotallyNotJson.1499 #Derived_gen.34; - -procedure TotallyNotJson.97 (TotallyNotJson.837): - let TotallyNotJson.838 : List Str = CallByName Str.55 TotallyNotJson.837; - dec TotallyNotJson.837; - let TotallyNotJson.1398 : U64 = CallByName List.6 TotallyNotJson.838; - let TotallyNotJson.839 : List Str = CallByName List.68 TotallyNotJson.1398; - let TotallyNotJson.1216 : {List Str, List Str} = Struct {TotallyNotJson.838, TotallyNotJson.839}; - let TotallyNotJson.1212 : {List Str, List Str} = CallByName TotallyNotJson.98 TotallyNotJson.1216; - let TotallyNotJson.1213 : {} = Struct {}; - let TotallyNotJson.1210 : List Str = CallByName TotallyNotJson.840 TotallyNotJson.1212; - let TotallyNotJson.1211 : Str = ""; - let TotallyNotJson.1209 : Str = CallByName Str.4 TotallyNotJson.1210 TotallyNotJson.1211; - dec TotallyNotJson.1211; - dec TotallyNotJson.1210; - ret TotallyNotJson.1209; - -procedure TotallyNotJson.98 (#Derived_gen.19): - joinpoint TotallyNotJson.1217 TotallyNotJson.1169: - let TotallyNotJson.842 : List Str = StructAtIndex 0 TotallyNotJson.1169; - let TotallyNotJson.841 : List Str = StructAtIndex 1 TotallyNotJson.1169; - let TotallyNotJson.1395 : U64 = lowlevel ListLen TotallyNotJson.842; - let TotallyNotJson.1396 : U64 = 1i64; - let TotallyNotJson.1397 : Int1 = lowlevel NumGte TotallyNotJson.1395 TotallyNotJson.1396; - if TotallyNotJson.1397 then - let TotallyNotJson.1394 : U64 = 0i64; - let TotallyNotJson.843 : Str = lowlevel ListGetUnsafe TotallyNotJson.842 TotallyNotJson.1394; - inc 2 TotallyNotJson.843; - joinpoint TotallyNotJson.1313 TotallyNotJson.1312: - if TotallyNotJson.1312 then - let TotallyNotJson.1305 : U64 = 1i64; - let TotallyNotJson.1221 : List Str = CallByName List.38 TotallyNotJson.842 TotallyNotJson.1305; - let TotallyNotJson.1224 : Str = "_"; - let TotallyNotJson.1225 : Str = CallByName TotallyNotJson.101 TotallyNotJson.843; - let TotallyNotJson.1223 : List Str = Array [TotallyNotJson.1224, TotallyNotJson.1225]; - let TotallyNotJson.1222 : List Str = CallByName List.8 TotallyNotJson.841 TotallyNotJson.1223; - let TotallyNotJson.1220 : {List Str, List Str} = Struct {TotallyNotJson.1221, TotallyNotJson.1222}; - jump TotallyNotJson.1217 TotallyNotJson.1220; - else - dec TotallyNotJson.843; - let TotallyNotJson.1311 : U64 = 0i64; - let TotallyNotJson.844 : Str = lowlevel ListGetUnsafe TotallyNotJson.842 TotallyNotJson.1311; - inc TotallyNotJson.844; - let TotallyNotJson.1310 : U64 = 1i64; - let TotallyNotJson.1308 : List Str = CallByName List.38 TotallyNotJson.842 TotallyNotJson.1310; - let TotallyNotJson.1309 : List Str = CallByName List.4 TotallyNotJson.841 TotallyNotJson.844; - let TotallyNotJson.1307 : {List Str, List Str} = Struct {TotallyNotJson.1308, TotallyNotJson.1309}; - jump TotallyNotJson.1217 TotallyNotJson.1307; - in - let TotallyNotJson.1314 : Int1 = CallByName TotallyNotJson.102 TotallyNotJson.843; - jump TotallyNotJson.1313 TotallyNotJson.1314; - else - let TotallyNotJson.1218 : {List Str, List Str} = Struct {TotallyNotJson.842, TotallyNotJson.841}; - ret TotallyNotJson.1218; - in - jump TotallyNotJson.1217 #Derived_gen.19; + let TotallyNotJson.970 : {} = Struct {}; + ret TotallyNotJson.970; procedure Test.0 (): let Test.11 : Str = "foo"; let Test.12 : Str = "bar"; let Test.9 : {Str, Str} = Struct {Test.11, Test.12}; - let Test.10 : [C , C [], C , C , C , C ] = CallByName TotallyNotJson.8; + let Test.10 : {} = CallByName TotallyNotJson.8; let Test.8 : List U8 = CallByName Encode.26 Test.9 Test.10; let Test.1 : [C {U64, U8}, C Str] = CallByName Str.9 Test.8; let Test.5 : U8 = 1i64; diff --git a/crates/compiler/test_mono/generated/encode_derived_string.txt b/crates/compiler/test_mono/generated/encode_derived_string.txt index 6ee8452eb5b..a6c16f88cd2 100644 --- a/crates/compiler/test_mono/generated/encode_derived_string.txt +++ b/crates/compiler/test_mono/generated/encode_derived_string.txt @@ -2,7 +2,7 @@ procedure Encode.23 (Encode.98): ret Encode.98; procedure Encode.24 (Encode.99, Encode.107, Encode.101): - let Encode.111 : List U8 = CallByName TotallyNotJson.182 Encode.99 Encode.101 Encode.107; + let Encode.111 : List U8 = CallByName TotallyNotJson.150 Encode.99 Encode.101 Encode.107; ret Encode.111; procedure Encode.26 (Encode.105, Encode.106): @@ -11,343 +11,343 @@ 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.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.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.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.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.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; - -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.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; + let List.203 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.607; + ret List.203; + +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.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; - -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; + let List.579 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; + ret List.579; + +procedure List.80 (#Derived_gen.0, #Derived_gen.1, #Derived_gen.2, #Derived_gen.3, #Derived_gen.4): + 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.157 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; - -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; + jump List.616 #Derived_gen.0 #Derived_gen.1 #Derived_gen.2 #Derived_gen.3 #Derived_gen.4; + +procedure List.90 (#Derived_gen.8, #Derived_gen.9, #Derived_gen.10, #Derived_gen.11, #Derived_gen.12): + 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.183 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.8 #Derived_gen.9 #Derived_gen.10 #Derived_gen.11 #Derived_gen.12; procedure Num.19 (#Attr.2, #Attr.3): - let Num.292 : U64 = lowlevel NumAdd #Attr.2 #Attr.3; - ret Num.292; + let Num.304 : U64 = lowlevel NumAdd #Attr.2 #Attr.3; + ret Num.304; procedure Num.21 (#Attr.2, #Attr.3): - let Num.294 : U64 = lowlevel NumMul #Attr.2 #Attr.3; - ret Num.294; + let Num.306 : U64 = lowlevel NumMul #Attr.2 #Attr.3; + ret Num.306; procedure Num.22 (#Attr.2, #Attr.3): - let Num.298 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; - ret Num.298; + let Num.310 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; + ret Num.310; procedure Num.24 (#Attr.2, #Attr.3): - let Num.300 : Int1 = lowlevel NumGt #Attr.2 #Attr.3; - ret Num.300; + let Num.312 : Int1 = lowlevel NumGt #Attr.2 #Attr.3; + ret Num.312; procedure Num.51 (#Attr.2, #Attr.3): - let Num.296 : U64 = lowlevel NumAddWrap #Attr.2 #Attr.3; - ret Num.296; + let Num.308 : U64 = lowlevel NumAddWrap #Attr.2 #Attr.3; + ret Num.308; procedure Num.75 (#Attr.2, #Attr.3): - let Num.299 : U64 = lowlevel NumSubWrap #Attr.2 #Attr.3; - ret Num.299; + let Num.311 : U64 = lowlevel NumSubWrap #Attr.2 #Attr.3; + ret Num.311; procedure Num.94 (#Attr.2, #Attr.3): - let Num.293 : U64 = lowlevel NumDivCeilUnchecked #Attr.2 #Attr.3; - ret Num.293; + let Num.305 : U64 = lowlevel NumDivCeilUnchecked #Attr.2 #Attr.3; + ret Num.305; procedure Str.12 (#Attr.2): - let Str.302 : List U8 = lowlevel StrToUtf8 #Attr.2; - ret Str.302; - -procedure Str.48 (#Attr.2, #Attr.3, #Attr.4): - let Str.301 : {U64, Str, Int1, U8} = lowlevel StrFromUtf8Range #Attr.2 #Attr.3 #Attr.4; - ret Str.301; - -procedure Str.9 (Str.80): - let Str.299 : U64 = 0i64; - let Str.300 : U64 = CallByName List.6 Str.80; - let Str.81 : {U64, Str, Int1, U8} = CallByName Str.48 Str.80 Str.299 Str.300; - let Str.296 : Int1 = StructAtIndex 2 Str.81; - if Str.296 then - let Str.298 : Str = StructAtIndex 1 Str.81; - let Str.297 : [C {U64, U8}, C Str] = TagId(1) Str.298; - ret Str.297; + let Str.261 : List U8 = lowlevel StrToUtf8 #Attr.2; + ret Str.261; + +procedure Str.43 (#Attr.2, #Attr.3, #Attr.4): + let Str.260 : {U64, Str, Int1, U8} = lowlevel StrFromUtf8Range #Attr.2 #Attr.3 #Attr.4; + ret Str.260; + +procedure Str.9 (Str.68): + let Str.258 : U64 = 0i64; + let Str.259 : U64 = CallByName List.6 Str.68; + let Str.69 : {U64, Str, Int1, U8} = CallByName Str.43 Str.68 Str.258 Str.259; + let Str.255 : Int1 = StructAtIndex 2 Str.69; + if Str.255 then + let Str.257 : Str = StructAtIndex 1 Str.69; + let Str.256 : [C {U64, U8}, C Str] = TagId(1) Str.257; + ret Str.256; else - let Str.294 : U8 = StructAtIndex 3 Str.81; - let Str.295 : U64 = StructAtIndex 0 Str.81; - let #Derived_gen.13 : Str = StructAtIndex 1 Str.81; + let Str.253 : U8 = StructAtIndex 3 Str.69; + let Str.254 : U64 = StructAtIndex 0 Str.69; + let #Derived_gen.13 : Str = StructAtIndex 1 Str.69; dec #Derived_gen.13; - let Str.293 : {U64, U8} = Struct {Str.295, Str.294}; - let Str.292 : [C {U64, U8}, C Str] = TagId(0) Str.293; - ret Str.292; - -procedure TotallyNotJson.182 (TotallyNotJson.183, TotallyNotJson.1175, TotallyNotJson.181): - let TotallyNotJson.1178 : List U8 = CallByName TotallyNotJson.26 TotallyNotJson.181; - let TotallyNotJson.1177 : List U8 = CallByName List.8 TotallyNotJson.183 TotallyNotJson.1178; - ret TotallyNotJson.1177; - -procedure TotallyNotJson.189 (TotallyNotJson.1226, TotallyNotJson.192): - let TotallyNotJson.190 : U64 = StructAtIndex 0 TotallyNotJson.1226; - let TotallyNotJson.191 : Int1 = StructAtIndex 1 TotallyNotJson.1226; - switch TotallyNotJson.192: + let Str.252 : {U64, U8} = Struct {Str.254, Str.253}; + let Str.251 : [C {U64, U8}, C Str] = TagId(0) Str.252; + ret Str.251; + +procedure TotallyNotJson.150 (TotallyNotJson.151, TotallyNotJson.973, TotallyNotJson.149): + let TotallyNotJson.976 : List U8 = CallByName TotallyNotJson.26 TotallyNotJson.149; + let TotallyNotJson.975 : List U8 = CallByName List.8 TotallyNotJson.151 TotallyNotJson.976; + ret TotallyNotJson.975; + +procedure TotallyNotJson.157 (TotallyNotJson.1024, TotallyNotJson.160): + let TotallyNotJson.158 : U64 = StructAtIndex 0 TotallyNotJson.1024; + let TotallyNotJson.159 : Int1 = StructAtIndex 1 TotallyNotJson.1024; + switch TotallyNotJson.160: case 34: - let TotallyNotJson.1229 : Int1 = false; - let TotallyNotJson.1228 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1229}; - let TotallyNotJson.1227 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1228; - ret TotallyNotJson.1227; + let TotallyNotJson.1027 : Int1 = false; + let TotallyNotJson.1026 : {U64, Int1} = Struct {TotallyNotJson.158, TotallyNotJson.1027}; + let TotallyNotJson.1025 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1026; + ret TotallyNotJson.1025; case 92: - let TotallyNotJson.1232 : Int1 = false; - let TotallyNotJson.1231 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1232}; - let TotallyNotJson.1230 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1231; - ret TotallyNotJson.1230; + let TotallyNotJson.1030 : Int1 = false; + let TotallyNotJson.1029 : {U64, Int1} = Struct {TotallyNotJson.158, TotallyNotJson.1030}; + let TotallyNotJson.1028 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1029; + ret TotallyNotJson.1028; case 47: - let TotallyNotJson.1235 : Int1 = false; - let TotallyNotJson.1234 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1235}; - let TotallyNotJson.1233 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1234; - ret TotallyNotJson.1233; + let TotallyNotJson.1033 : Int1 = false; + let TotallyNotJson.1032 : {U64, Int1} = Struct {TotallyNotJson.158, TotallyNotJson.1033}; + let TotallyNotJson.1031 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1032; + ret TotallyNotJson.1031; case 8: - let TotallyNotJson.1238 : Int1 = false; - let TotallyNotJson.1237 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1238}; - let TotallyNotJson.1236 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1237; - ret TotallyNotJson.1236; + let TotallyNotJson.1036 : Int1 = false; + let TotallyNotJson.1035 : {U64, Int1} = Struct {TotallyNotJson.158, TotallyNotJson.1036}; + let TotallyNotJson.1034 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1035; + ret TotallyNotJson.1034; case 12: - let TotallyNotJson.1241 : Int1 = false; - let TotallyNotJson.1240 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1241}; - let TotallyNotJson.1239 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1240; - ret TotallyNotJson.1239; + let TotallyNotJson.1039 : Int1 = false; + let TotallyNotJson.1038 : {U64, Int1} = Struct {TotallyNotJson.158, TotallyNotJson.1039}; + let TotallyNotJson.1037 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1038; + ret TotallyNotJson.1037; case 10: - let TotallyNotJson.1244 : Int1 = false; - let TotallyNotJson.1243 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1244}; - let TotallyNotJson.1242 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1243; - ret TotallyNotJson.1242; + let TotallyNotJson.1042 : Int1 = false; + let TotallyNotJson.1041 : {U64, Int1} = Struct {TotallyNotJson.158, TotallyNotJson.1042}; + let TotallyNotJson.1040 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1041; + ret TotallyNotJson.1040; case 13: - let TotallyNotJson.1247 : Int1 = false; - let TotallyNotJson.1246 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1247}; - let TotallyNotJson.1245 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1246; - ret TotallyNotJson.1245; + let TotallyNotJson.1045 : Int1 = false; + let TotallyNotJson.1044 : {U64, Int1} = Struct {TotallyNotJson.158, TotallyNotJson.1045}; + let TotallyNotJson.1043 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1044; + ret TotallyNotJson.1043; case 9: - let TotallyNotJson.1250 : Int1 = false; - let TotallyNotJson.1249 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1250}; - let TotallyNotJson.1248 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1249; - ret TotallyNotJson.1248; + let TotallyNotJson.1048 : Int1 = false; + let TotallyNotJson.1047 : {U64, Int1} = Struct {TotallyNotJson.158, TotallyNotJson.1048}; + let TotallyNotJson.1046 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1047; + ret TotallyNotJson.1046; default: - let TotallyNotJson.1254 : U64 = 1i64; - let TotallyNotJson.1253 : U64 = CallByName Num.19 TotallyNotJson.190 TotallyNotJson.1254; - let TotallyNotJson.1252 : {U64, Int1} = Struct {TotallyNotJson.1253, TotallyNotJson.191}; - let TotallyNotJson.1251 : [C {U64, Int1}, C {U64, Int1}] = TagId(1) TotallyNotJson.1252; - ret TotallyNotJson.1251; + let TotallyNotJson.1052 : U64 = 1i64; + let TotallyNotJson.1051 : U64 = CallByName Num.19 TotallyNotJson.158 TotallyNotJson.1052; + let TotallyNotJson.1050 : {U64, Int1} = Struct {TotallyNotJson.1051, TotallyNotJson.159}; + let TotallyNotJson.1049 : [C {U64, Int1}, C {U64, Int1}] = TagId(1) TotallyNotJson.1050; + ret TotallyNotJson.1049; -procedure TotallyNotJson.215 (TotallyNotJson.216, TotallyNotJson.217): - let TotallyNotJson.1197 : List U8 = CallByName TotallyNotJson.27 TotallyNotJson.217; - let TotallyNotJson.1196 : List U8 = CallByName List.8 TotallyNotJson.216 TotallyNotJson.1197; - ret TotallyNotJson.1196; - -procedure TotallyNotJson.25 (TotallyNotJson.181): - let TotallyNotJson.1173 : Str = CallByName Encode.23 TotallyNotJson.181; - ret TotallyNotJson.1173; - -procedure TotallyNotJson.26 (TotallyNotJson.184): - let TotallyNotJson.185 : List U8 = CallByName Str.12 TotallyNotJson.184; - let TotallyNotJson.1255 : U64 = 0i64; - let TotallyNotJson.1256 : Int1 = true; - let TotallyNotJson.186 : {U64, Int1} = Struct {TotallyNotJson.1255, TotallyNotJson.1256}; - let TotallyNotJson.1225 : {} = Struct {}; - inc TotallyNotJson.185; - let TotallyNotJson.187 : {U64, Int1} = CallByName List.26 TotallyNotJson.185 TotallyNotJson.186 TotallyNotJson.1225; - let TotallyNotJson.1179 : Int1 = StructAtIndex 1 TotallyNotJson.187; - let TotallyNotJson.1223 : Int1 = true; - let TotallyNotJson.1224 : Int1 = lowlevel Eq TotallyNotJson.1223 TotallyNotJson.1179; - if TotallyNotJson.1224 then - let TotallyNotJson.1189 : U64 = CallByName List.6 TotallyNotJson.185; - let TotallyNotJson.1190 : U64 = 2i64; - let TotallyNotJson.1188 : U64 = CallByName Num.19 TotallyNotJson.1189 TotallyNotJson.1190; - let TotallyNotJson.1185 : List U8 = CallByName List.68 TotallyNotJson.1188; - let TotallyNotJson.1187 : U8 = 34i64; - let TotallyNotJson.1186 : List U8 = Array [TotallyNotJson.1187]; - let TotallyNotJson.1184 : List U8 = CallByName List.8 TotallyNotJson.1185 TotallyNotJson.1186; - let TotallyNotJson.1181 : List U8 = CallByName List.8 TotallyNotJson.1184 TotallyNotJson.185; - let TotallyNotJson.1183 : U8 = 34i64; - let TotallyNotJson.1182 : List U8 = Array [TotallyNotJson.1183]; - let TotallyNotJson.1180 : List U8 = CallByName List.8 TotallyNotJson.1181 TotallyNotJson.1182; - ret TotallyNotJson.1180; +procedure TotallyNotJson.183 (TotallyNotJson.184, TotallyNotJson.185): + let TotallyNotJson.995 : List U8 = CallByName TotallyNotJson.27 TotallyNotJson.185; + let TotallyNotJson.994 : List U8 = CallByName List.8 TotallyNotJson.184 TotallyNotJson.995; + ret TotallyNotJson.994; + +procedure TotallyNotJson.25 (TotallyNotJson.149): + let TotallyNotJson.971 : Str = CallByName Encode.23 TotallyNotJson.149; + ret TotallyNotJson.971; + +procedure TotallyNotJson.26 (TotallyNotJson.152): + let TotallyNotJson.153 : List U8 = CallByName Str.12 TotallyNotJson.152; + let TotallyNotJson.1053 : U64 = 0i64; + let TotallyNotJson.1054 : Int1 = true; + let TotallyNotJson.154 : {U64, Int1} = Struct {TotallyNotJson.1053, TotallyNotJson.1054}; + let TotallyNotJson.1023 : {} = Struct {}; + inc TotallyNotJson.153; + let TotallyNotJson.155 : {U64, Int1} = CallByName List.26 TotallyNotJson.153 TotallyNotJson.154 TotallyNotJson.1023; + let TotallyNotJson.977 : Int1 = StructAtIndex 1 TotallyNotJson.155; + let TotallyNotJson.1021 : Int1 = true; + let TotallyNotJson.1022 : Int1 = lowlevel Eq TotallyNotJson.1021 TotallyNotJson.977; + if TotallyNotJson.1022 then + let TotallyNotJson.987 : U64 = CallByName List.6 TotallyNotJson.153; + let TotallyNotJson.988 : U64 = 2i64; + let TotallyNotJson.986 : U64 = CallByName Num.19 TotallyNotJson.987 TotallyNotJson.988; + let TotallyNotJson.983 : List U8 = CallByName List.68 TotallyNotJson.986; + let TotallyNotJson.985 : U8 = 34i64; + let TotallyNotJson.984 : List U8 = Array [TotallyNotJson.985]; + let TotallyNotJson.982 : List U8 = CallByName List.8 TotallyNotJson.983 TotallyNotJson.984; + let TotallyNotJson.979 : List U8 = CallByName List.8 TotallyNotJson.982 TotallyNotJson.153; + let TotallyNotJson.981 : U8 = 34i64; + let TotallyNotJson.980 : List U8 = Array [TotallyNotJson.981]; + let TotallyNotJson.978 : List U8 = CallByName List.8 TotallyNotJson.979 TotallyNotJson.980; + ret TotallyNotJson.978; else - inc TotallyNotJson.185; - let TotallyNotJson.1222 : U64 = StructAtIndex 0 TotallyNotJson.187; - let TotallyNotJson.1221 : {List U8, List U8} = CallByName List.52 TotallyNotJson.185 TotallyNotJson.1222; - let TotallyNotJson.211 : List U8 = StructAtIndex 0 TotallyNotJson.1221; - let TotallyNotJson.213 : List U8 = StructAtIndex 1 TotallyNotJson.1221; - let TotallyNotJson.1219 : U64 = CallByName List.6 TotallyNotJson.185; - dec TotallyNotJson.185; - let TotallyNotJson.1220 : U64 = 120i64; - let TotallyNotJson.1217 : U64 = CallByName Num.21 TotallyNotJson.1219 TotallyNotJson.1220; - let TotallyNotJson.1218 : U64 = 100i64; - let TotallyNotJson.1216 : U64 = CallByName Num.94 TotallyNotJson.1217 TotallyNotJson.1218; - let TotallyNotJson.1213 : List U8 = CallByName List.68 TotallyNotJson.1216; - let TotallyNotJson.1215 : U8 = 34i64; - let TotallyNotJson.1214 : List U8 = Array [TotallyNotJson.1215]; - let TotallyNotJson.1212 : List U8 = CallByName List.8 TotallyNotJson.1213 TotallyNotJson.1214; - let TotallyNotJson.214 : List U8 = CallByName List.8 TotallyNotJson.1212 TotallyNotJson.211; - let TotallyNotJson.1195 : {} = Struct {}; - let TotallyNotJson.1192 : List U8 = CallByName List.18 TotallyNotJson.213 TotallyNotJson.214 TotallyNotJson.1195; - let TotallyNotJson.1194 : U8 = 34i64; - let TotallyNotJson.1193 : List U8 = Array [TotallyNotJson.1194]; - let TotallyNotJson.1191 : List U8 = CallByName List.8 TotallyNotJson.1192 TotallyNotJson.1193; - ret TotallyNotJson.1191; - -procedure TotallyNotJson.27 (TotallyNotJson.218): - switch TotallyNotJson.218: + inc TotallyNotJson.153; + let TotallyNotJson.1020 : U64 = StructAtIndex 0 TotallyNotJson.155; + let TotallyNotJson.1019 : {List U8, List U8} = CallByName List.52 TotallyNotJson.153 TotallyNotJson.1020; + let TotallyNotJson.179 : List U8 = StructAtIndex 0 TotallyNotJson.1019; + let TotallyNotJson.181 : List U8 = StructAtIndex 1 TotallyNotJson.1019; + let TotallyNotJson.1017 : U64 = CallByName List.6 TotallyNotJson.153; + dec TotallyNotJson.153; + let TotallyNotJson.1018 : U64 = 120i64; + let TotallyNotJson.1015 : U64 = CallByName Num.21 TotallyNotJson.1017 TotallyNotJson.1018; + let TotallyNotJson.1016 : U64 = 100i64; + let TotallyNotJson.1014 : U64 = CallByName Num.94 TotallyNotJson.1015 TotallyNotJson.1016; + let TotallyNotJson.1011 : List U8 = CallByName List.68 TotallyNotJson.1014; + let TotallyNotJson.1013 : U8 = 34i64; + let TotallyNotJson.1012 : List U8 = Array [TotallyNotJson.1013]; + let TotallyNotJson.1010 : List U8 = CallByName List.8 TotallyNotJson.1011 TotallyNotJson.1012; + let TotallyNotJson.182 : List U8 = CallByName List.8 TotallyNotJson.1010 TotallyNotJson.179; + let TotallyNotJson.993 : {} = Struct {}; + let TotallyNotJson.990 : List U8 = CallByName List.18 TotallyNotJson.181 TotallyNotJson.182 TotallyNotJson.993; + let TotallyNotJson.992 : U8 = 34i64; + let TotallyNotJson.991 : List U8 = Array [TotallyNotJson.992]; + let TotallyNotJson.989 : List U8 = CallByName List.8 TotallyNotJson.990 TotallyNotJson.991; + ret TotallyNotJson.989; + +procedure TotallyNotJson.27 (TotallyNotJson.186): + switch TotallyNotJson.186: case 34: - let TotallyNotJson.1198 : List U8 = Array [92i64, 34i64]; - ret TotallyNotJson.1198; + let TotallyNotJson.996 : List U8 = Array [92i64, 34i64]; + ret TotallyNotJson.996; case 92: - let TotallyNotJson.1199 : List U8 = Array [92i64, 92i64]; - ret TotallyNotJson.1199; + let TotallyNotJson.997 : List U8 = Array [92i64, 92i64]; + ret TotallyNotJson.997; case 47: - let TotallyNotJson.1200 : List U8 = Array [92i64, 47i64]; - ret TotallyNotJson.1200; + let TotallyNotJson.998 : List U8 = Array [92i64, 47i64]; + ret TotallyNotJson.998; case 8: - let TotallyNotJson.1202 : U8 = 98i64; - let TotallyNotJson.1201 : List U8 = Array [92i64, TotallyNotJson.1202]; - ret TotallyNotJson.1201; + let TotallyNotJson.1000 : U8 = 98i64; + let TotallyNotJson.999 : List U8 = Array [92i64, TotallyNotJson.1000]; + ret TotallyNotJson.999; case 12: - let TotallyNotJson.1204 : U8 = 102i64; - let TotallyNotJson.1203 : List U8 = Array [92i64, TotallyNotJson.1204]; - ret TotallyNotJson.1203; + let TotallyNotJson.1002 : U8 = 102i64; + let TotallyNotJson.1001 : List U8 = Array [92i64, TotallyNotJson.1002]; + ret TotallyNotJson.1001; case 10: - let TotallyNotJson.1206 : U8 = 110i64; - let TotallyNotJson.1205 : List U8 = Array [92i64, TotallyNotJson.1206]; - ret TotallyNotJson.1205; + let TotallyNotJson.1004 : U8 = 110i64; + let TotallyNotJson.1003 : List U8 = Array [92i64, TotallyNotJson.1004]; + ret TotallyNotJson.1003; case 13: - let TotallyNotJson.1208 : U8 = 114i64; - let TotallyNotJson.1207 : List U8 = Array [92i64, TotallyNotJson.1208]; - ret TotallyNotJson.1207; + let TotallyNotJson.1006 : U8 = 114i64; + let TotallyNotJson.1005 : List U8 = Array [92i64, TotallyNotJson.1006]; + ret TotallyNotJson.1005; case 9: - let TotallyNotJson.1210 : U8 = 114i64; - let TotallyNotJson.1209 : List U8 = Array [92i64, TotallyNotJson.1210]; - ret TotallyNotJson.1209; + let TotallyNotJson.1008 : U8 = 114i64; + let TotallyNotJson.1007 : List U8 = Array [92i64, TotallyNotJson.1008]; + ret TotallyNotJson.1007; default: - let TotallyNotJson.1211 : List U8 = Array [TotallyNotJson.218]; - ret TotallyNotJson.1211; + let TotallyNotJson.1009 : List U8 = Array [TotallyNotJson.186]; + ret TotallyNotJson.1009; procedure TotallyNotJson.8 (): - let TotallyNotJson.1172 : [C , C [], C , C , C , C ] = TagId(2) ; - ret TotallyNotJson.1172; + let TotallyNotJson.970 : {} = Struct {}; + ret TotallyNotJson.970; procedure Test.0 (): let Test.9 : Str = "abc"; - let Test.10 : [C , C [], C , C , C , C ] = CallByName TotallyNotJson.8; + let Test.10 : {} = CallByName TotallyNotJson.8; let Test.8 : List U8 = CallByName Encode.26 Test.9 Test.10; let Test.1 : [C {U64, U8}, C Str] = CallByName Str.9 Test.8; let Test.5 : U8 = 1i64; 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 ef63b007eb0..7ef4924ea65 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 @@ -10,7 +10,7 @@ procedure #Derived.3 (#Derived.4, #Derived.5, #Derived.1): let #Derived_gen.7 : Str = "A"; let #Derived_gen.9 : Str = CallByName TotallyNotJson.25 #Derived.1; let #Derived_gen.8 : List Str = Array [#Derived_gen.9]; - let #Derived_gen.6 : {Str, List Str} = CallByName TotallyNotJson.32 #Derived_gen.7 #Derived_gen.8; + let #Derived_gen.6 : {Str, List Str} = CallByName TotallyNotJson.31 #Derived_gen.7 #Derived_gen.8; jump #Derived_gen.5 #Derived_gen.6; procedure Encode.23 (Encode.98): @@ -27,11 +27,11 @@ procedure Encode.24 (Encode.99, Encode.107, Encode.101): ret Encode.111; procedure Encode.24 (Encode.99, Encode.107, Encode.101): - let Encode.113 : List U8 = CallByName TotallyNotJson.264 Encode.99 Encode.101 Encode.107; + let Encode.113 : List U8 = CallByName TotallyNotJson.228 Encode.99 Encode.101 Encode.107; ret Encode.113; procedure Encode.24 (Encode.99, Encode.107, Encode.101): - let Encode.116 : List U8 = CallByName TotallyNotJson.182 Encode.99 Encode.101 Encode.107; + let Encode.116 : List U8 = CallByName TotallyNotJson.150 Encode.99 Encode.101 Encode.107; ret Encode.116; procedure Encode.26 (Encode.105, Encode.106): @@ -40,452 +40,454 @@ 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.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.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.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.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.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.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.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; - -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.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.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; + let List.203 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.648; + ret List.203; + +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.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.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.6 (#Attr.2): + let List.624 : U64 = lowlevel ListLen #Attr.2; + ret List.624; + procedure List.66 (#Attr.2, #Attr.3): - let List.606 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.606; + let List.608 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.608; procedure List.66 (#Attr.2, #Attr.3): - let List.618 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.618; + 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; + 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.157 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; - -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; + jump List.657 #Derived_gen.26 #Derived_gen.27 #Derived_gen.28 #Derived_gen.29 #Derived_gen.30; + +procedure List.90 (#Derived_gen.13, #Derived_gen.14, #Derived_gen.15, #Derived_gen.16, #Derived_gen.17): + 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.183 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; - -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; + jump List.613 #Derived_gen.13 #Derived_gen.14 #Derived_gen.15 #Derived_gen.16 #Derived_gen.17; + +procedure List.90 (#Derived_gen.18, #Derived_gen.19, #Derived_gen.20, #Derived_gen.21, #Derived_gen.22): + 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.230 List.162 List.607; + 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.18 #Derived_gen.19 #Derived_gen.20 #Derived_gen.21 #Derived_gen.22; procedure Num.127 (#Attr.2): - let Num.298 : U8 = lowlevel NumIntCast #Attr.2; - ret Num.298; + let Num.310 : U8 = lowlevel NumIntCast #Attr.2; + ret Num.310; procedure Num.19 (#Attr.2, #Attr.3): - let Num.302 : U64 = lowlevel NumAdd #Attr.2 #Attr.3; - ret Num.302; + let Num.314 : U64 = lowlevel NumAdd #Attr.2 #Attr.3; + ret Num.314; procedure Num.20 (#Attr.2, #Attr.3): - let Num.299 : U64 = lowlevel NumSub #Attr.2 #Attr.3; - ret Num.299; + let Num.311 : U64 = lowlevel NumSub #Attr.2 #Attr.3; + ret Num.311; procedure Num.21 (#Attr.2, #Attr.3): - let Num.304 : U64 = lowlevel NumMul #Attr.2 #Attr.3; - ret Num.304; + let Num.316 : U64 = lowlevel NumMul #Attr.2 #Attr.3; + ret Num.316; procedure Num.22 (#Attr.2, #Attr.3): - let Num.310 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; - ret Num.310; + let Num.322 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; + ret Num.322; procedure Num.24 (#Attr.2, #Attr.3): - let Num.312 : Int1 = lowlevel NumGt #Attr.2 #Attr.3; - ret Num.312; + let Num.324 : Int1 = lowlevel NumGt #Attr.2 #Attr.3; + ret Num.324; procedure Num.51 (#Attr.2, #Attr.3): - let Num.307 : U64 = lowlevel NumAddWrap #Attr.2 #Attr.3; - ret Num.307; + let Num.319 : U64 = lowlevel NumAddWrap #Attr.2 #Attr.3; + ret Num.319; procedure Num.75 (#Attr.2, #Attr.3): - let Num.311 : U64 = lowlevel NumSubWrap #Attr.2 #Attr.3; - ret Num.311; + let Num.323 : U64 = lowlevel NumSubWrap #Attr.2 #Attr.3; + ret Num.323; procedure Num.94 (#Attr.2, #Attr.3): - let Num.303 : U64 = lowlevel NumDivCeilUnchecked #Attr.2 #Attr.3; - ret Num.303; + let Num.315 : U64 = lowlevel NumDivCeilUnchecked #Attr.2 #Attr.3; + ret Num.315; procedure Str.12 (#Attr.2): - let Str.303 : List U8 = lowlevel StrToUtf8 #Attr.2; - ret Str.303; - -procedure Str.48 (#Attr.2, #Attr.3, #Attr.4): - let Str.301 : {U64, Str, Int1, U8} = lowlevel StrFromUtf8Range #Attr.2 #Attr.3 #Attr.4; - ret Str.301; - -procedure Str.9 (Str.80): - let Str.299 : U64 = 0i64; - let Str.300 : U64 = CallByName List.6 Str.80; - let Str.81 : {U64, Str, Int1, U8} = CallByName Str.48 Str.80 Str.299 Str.300; - let Str.296 : Int1 = StructAtIndex 2 Str.81; - if Str.296 then - let Str.298 : Str = StructAtIndex 1 Str.81; - let Str.297 : [C {U64, U8}, C Str] = TagId(1) Str.298; - ret Str.297; + let Str.262 : List U8 = lowlevel StrToUtf8 #Attr.2; + ret Str.262; + +procedure Str.43 (#Attr.2, #Attr.3, #Attr.4): + let Str.260 : {U64, Str, Int1, U8} = lowlevel StrFromUtf8Range #Attr.2 #Attr.3 #Attr.4; + ret Str.260; + +procedure Str.9 (Str.68): + let Str.258 : U64 = 0i64; + let Str.259 : U64 = CallByName List.6 Str.68; + let Str.69 : {U64, Str, Int1, U8} = CallByName Str.43 Str.68 Str.258 Str.259; + let Str.255 : Int1 = StructAtIndex 2 Str.69; + if Str.255 then + let Str.257 : Str = StructAtIndex 1 Str.69; + let Str.256 : [C {U64, U8}, C Str] = TagId(1) Str.257; + ret Str.256; else - let Str.294 : U8 = StructAtIndex 3 Str.81; - let Str.295 : U64 = StructAtIndex 0 Str.81; - let #Derived_gen.34 : Str = StructAtIndex 1 Str.81; + let Str.253 : U8 = StructAtIndex 3 Str.69; + let Str.254 : U64 = StructAtIndex 0 Str.69; + let #Derived_gen.34 : Str = StructAtIndex 1 Str.69; dec #Derived_gen.34; - let Str.293 : {U64, U8} = Struct {Str.295, Str.294}; - let Str.292 : [C {U64, U8}, C Str] = TagId(0) Str.293; - ret Str.292; - -procedure TotallyNotJson.182 (TotallyNotJson.183, TotallyNotJson.1216, TotallyNotJson.181): - let TotallyNotJson.1219 : List U8 = CallByName TotallyNotJson.26 TotallyNotJson.181; - let TotallyNotJson.1218 : List U8 = CallByName List.8 TotallyNotJson.183 TotallyNotJson.1219; - ret TotallyNotJson.1218; - -procedure TotallyNotJson.189 (TotallyNotJson.1267, TotallyNotJson.192): - let TotallyNotJson.190 : U64 = StructAtIndex 0 TotallyNotJson.1267; - let TotallyNotJson.191 : Int1 = StructAtIndex 1 TotallyNotJson.1267; - switch TotallyNotJson.192: + let Str.252 : {U64, U8} = Struct {Str.254, Str.253}; + let Str.251 : [C {U64, U8}, C Str] = TagId(0) Str.252; + ret Str.251; + +procedure TotallyNotJson.150 (TotallyNotJson.151, TotallyNotJson.1014, TotallyNotJson.149): + let TotallyNotJson.1017 : List U8 = CallByName TotallyNotJson.26 TotallyNotJson.149; + let TotallyNotJson.1016 : List U8 = CallByName List.8 TotallyNotJson.151 TotallyNotJson.1017; + ret TotallyNotJson.1016; + +procedure TotallyNotJson.157 (TotallyNotJson.1065, TotallyNotJson.160): + let TotallyNotJson.158 : U64 = StructAtIndex 0 TotallyNotJson.1065; + let TotallyNotJson.159 : Int1 = StructAtIndex 1 TotallyNotJson.1065; + switch TotallyNotJson.160: case 34: - let TotallyNotJson.1270 : Int1 = false; - let TotallyNotJson.1269 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1270}; - let TotallyNotJson.1268 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1269; - ret TotallyNotJson.1268; + let TotallyNotJson.1068 : Int1 = false; + let TotallyNotJson.1067 : {U64, Int1} = Struct {TotallyNotJson.158, TotallyNotJson.1068}; + let TotallyNotJson.1066 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1067; + ret TotallyNotJson.1066; case 92: - let TotallyNotJson.1273 : Int1 = false; - let TotallyNotJson.1272 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1273}; - let TotallyNotJson.1271 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1272; - ret TotallyNotJson.1271; + let TotallyNotJson.1071 : Int1 = false; + let TotallyNotJson.1070 : {U64, Int1} = Struct {TotallyNotJson.158, TotallyNotJson.1071}; + let TotallyNotJson.1069 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1070; + ret TotallyNotJson.1069; case 47: - let TotallyNotJson.1276 : Int1 = false; - let TotallyNotJson.1275 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1276}; - let TotallyNotJson.1274 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1275; - ret TotallyNotJson.1274; + let TotallyNotJson.1074 : Int1 = false; + let TotallyNotJson.1073 : {U64, Int1} = Struct {TotallyNotJson.158, TotallyNotJson.1074}; + let TotallyNotJson.1072 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1073; + ret TotallyNotJson.1072; case 8: - let TotallyNotJson.1279 : Int1 = false; - let TotallyNotJson.1278 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1279}; - let TotallyNotJson.1277 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1278; - ret TotallyNotJson.1277; + let TotallyNotJson.1077 : Int1 = false; + let TotallyNotJson.1076 : {U64, Int1} = Struct {TotallyNotJson.158, TotallyNotJson.1077}; + let TotallyNotJson.1075 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1076; + ret TotallyNotJson.1075; case 12: - let TotallyNotJson.1282 : Int1 = false; - let TotallyNotJson.1281 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1282}; - let TotallyNotJson.1280 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1281; - ret TotallyNotJson.1280; + let TotallyNotJson.1080 : Int1 = false; + let TotallyNotJson.1079 : {U64, Int1} = Struct {TotallyNotJson.158, TotallyNotJson.1080}; + let TotallyNotJson.1078 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1079; + ret TotallyNotJson.1078; case 10: - let TotallyNotJson.1285 : Int1 = false; - let TotallyNotJson.1284 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1285}; - let TotallyNotJson.1283 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1284; - ret TotallyNotJson.1283; + let TotallyNotJson.1083 : Int1 = false; + let TotallyNotJson.1082 : {U64, Int1} = Struct {TotallyNotJson.158, TotallyNotJson.1083}; + let TotallyNotJson.1081 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1082; + ret TotallyNotJson.1081; case 13: - let TotallyNotJson.1288 : Int1 = false; - let TotallyNotJson.1287 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1288}; - let TotallyNotJson.1286 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1287; - ret TotallyNotJson.1286; + let TotallyNotJson.1086 : Int1 = false; + let TotallyNotJson.1085 : {U64, Int1} = Struct {TotallyNotJson.158, TotallyNotJson.1086}; + let TotallyNotJson.1084 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1085; + ret TotallyNotJson.1084; case 9: - let TotallyNotJson.1291 : Int1 = false; - let TotallyNotJson.1290 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1291}; - let TotallyNotJson.1289 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1290; - ret TotallyNotJson.1289; + let TotallyNotJson.1089 : Int1 = false; + let TotallyNotJson.1088 : {U64, Int1} = Struct {TotallyNotJson.158, TotallyNotJson.1089}; + let TotallyNotJson.1087 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1088; + ret TotallyNotJson.1087; default: - let TotallyNotJson.1295 : U64 = 1i64; - let TotallyNotJson.1294 : U64 = CallByName Num.19 TotallyNotJson.190 TotallyNotJson.1295; - let TotallyNotJson.1293 : {U64, Int1} = Struct {TotallyNotJson.1294, TotallyNotJson.191}; - let TotallyNotJson.1292 : [C {U64, Int1}, C {U64, Int1}] = TagId(1) TotallyNotJson.1293; - ret TotallyNotJson.1292; + let TotallyNotJson.1093 : U64 = 1i64; + let TotallyNotJson.1092 : U64 = CallByName Num.19 TotallyNotJson.158 TotallyNotJson.1093; + let TotallyNotJson.1091 : {U64, Int1} = Struct {TotallyNotJson.1092, TotallyNotJson.159}; + let TotallyNotJson.1090 : [C {U64, Int1}, C {U64, Int1}] = TagId(1) TotallyNotJson.1091; + ret TotallyNotJson.1090; -procedure TotallyNotJson.215 (TotallyNotJson.216, TotallyNotJson.217): - let TotallyNotJson.1238 : List U8 = CallByName TotallyNotJson.27 TotallyNotJson.217; - let TotallyNotJson.1237 : List U8 = CallByName List.8 TotallyNotJson.216 TotallyNotJson.1238; - ret TotallyNotJson.1237; - -procedure TotallyNotJson.25 (TotallyNotJson.181): - let TotallyNotJson.1214 : Str = CallByName Encode.23 TotallyNotJson.181; - ret TotallyNotJson.1214; - -procedure TotallyNotJson.26 (TotallyNotJson.184): - let TotallyNotJson.185 : List U8 = CallByName Str.12 TotallyNotJson.184; - let TotallyNotJson.1296 : U64 = 0i64; - let TotallyNotJson.1297 : Int1 = true; - let TotallyNotJson.186 : {U64, Int1} = Struct {TotallyNotJson.1296, TotallyNotJson.1297}; - let TotallyNotJson.1266 : {} = Struct {}; - inc TotallyNotJson.185; - let TotallyNotJson.187 : {U64, Int1} = CallByName List.26 TotallyNotJson.185 TotallyNotJson.186 TotallyNotJson.1266; - let TotallyNotJson.1220 : Int1 = StructAtIndex 1 TotallyNotJson.187; - let TotallyNotJson.1264 : Int1 = true; - let TotallyNotJson.1265 : Int1 = lowlevel Eq TotallyNotJson.1264 TotallyNotJson.1220; - if TotallyNotJson.1265 then - let TotallyNotJson.1230 : U64 = CallByName List.6 TotallyNotJson.185; - let TotallyNotJson.1231 : U64 = 2i64; - let TotallyNotJson.1229 : U64 = CallByName Num.19 TotallyNotJson.1230 TotallyNotJson.1231; - let TotallyNotJson.1226 : List U8 = CallByName List.68 TotallyNotJson.1229; - let TotallyNotJson.1228 : U8 = 34i64; - let TotallyNotJson.1227 : List U8 = Array [TotallyNotJson.1228]; - let TotallyNotJson.1225 : List U8 = CallByName List.8 TotallyNotJson.1226 TotallyNotJson.1227; - let TotallyNotJson.1222 : List U8 = CallByName List.8 TotallyNotJson.1225 TotallyNotJson.185; - let TotallyNotJson.1224 : U8 = 34i64; - let TotallyNotJson.1223 : List U8 = Array [TotallyNotJson.1224]; - let TotallyNotJson.1221 : List U8 = CallByName List.8 TotallyNotJson.1222 TotallyNotJson.1223; - ret TotallyNotJson.1221; - else - inc TotallyNotJson.185; - let TotallyNotJson.1263 : U64 = StructAtIndex 0 TotallyNotJson.187; - let TotallyNotJson.1262 : {List U8, List U8} = CallByName List.52 TotallyNotJson.185 TotallyNotJson.1263; - let TotallyNotJson.211 : List U8 = StructAtIndex 0 TotallyNotJson.1262; - let TotallyNotJson.213 : List U8 = StructAtIndex 1 TotallyNotJson.1262; - let TotallyNotJson.1260 : U64 = CallByName List.6 TotallyNotJson.185; - dec TotallyNotJson.185; - let TotallyNotJson.1261 : U64 = 120i64; - let TotallyNotJson.1258 : U64 = CallByName Num.21 TotallyNotJson.1260 TotallyNotJson.1261; - let TotallyNotJson.1259 : U64 = 100i64; - let TotallyNotJson.1257 : U64 = CallByName Num.94 TotallyNotJson.1258 TotallyNotJson.1259; - let TotallyNotJson.1254 : List U8 = CallByName List.68 TotallyNotJson.1257; - let TotallyNotJson.1256 : U8 = 34i64; - let TotallyNotJson.1255 : List U8 = Array [TotallyNotJson.1256]; - let TotallyNotJson.1253 : List U8 = CallByName List.8 TotallyNotJson.1254 TotallyNotJson.1255; - let TotallyNotJson.214 : List U8 = CallByName List.8 TotallyNotJson.1253 TotallyNotJson.211; - let TotallyNotJson.1236 : {} = Struct {}; - let TotallyNotJson.1233 : List U8 = CallByName List.18 TotallyNotJson.213 TotallyNotJson.214 TotallyNotJson.1236; - let TotallyNotJson.1235 : U8 = 34i64; - let TotallyNotJson.1234 : List U8 = Array [TotallyNotJson.1235]; - let TotallyNotJson.1232 : List U8 = CallByName List.8 TotallyNotJson.1233 TotallyNotJson.1234; - ret TotallyNotJson.1232; - -procedure TotallyNotJson.264 (TotallyNotJson.265, TotallyNotJson.1175, #Attr.12): - let TotallyNotJson.263 : List Str = StructAtIndex 1 #Attr.12; - let TotallyNotJson.262 : Str = StructAtIndex 0 #Attr.12; - let TotallyNotJson.1213 : I64 = 123i64; - let TotallyNotJson.1212 : U8 = CallByName Num.127 TotallyNotJson.1213; - let TotallyNotJson.1209 : List U8 = CallByName List.4 TotallyNotJson.265 TotallyNotJson.1212; - let TotallyNotJson.1211 : I64 = 34i64; - let TotallyNotJson.1210 : U8 = CallByName Num.127 TotallyNotJson.1211; - let TotallyNotJson.1207 : List U8 = CallByName List.4 TotallyNotJson.1209 TotallyNotJson.1210; - let TotallyNotJson.1208 : List U8 = CallByName Str.12 TotallyNotJson.262; - let TotallyNotJson.1204 : List U8 = CallByName List.8 TotallyNotJson.1207 TotallyNotJson.1208; - let TotallyNotJson.1206 : I64 = 34i64; - let TotallyNotJson.1205 : U8 = CallByName Num.127 TotallyNotJson.1206; - let TotallyNotJson.1201 : List U8 = CallByName List.4 TotallyNotJson.1204 TotallyNotJson.1205; - let TotallyNotJson.1203 : I64 = 58i64; - let TotallyNotJson.1202 : U8 = CallByName Num.127 TotallyNotJson.1203; - let TotallyNotJson.1198 : List U8 = CallByName List.4 TotallyNotJson.1201 TotallyNotJson.1202; - let TotallyNotJson.1200 : I64 = 91i64; - let TotallyNotJson.1199 : U8 = CallByName Num.127 TotallyNotJson.1200; - let TotallyNotJson.268 : List U8 = CallByName List.4 TotallyNotJson.1198 TotallyNotJson.1199; - let TotallyNotJson.1197 : U64 = CallByName List.6 TotallyNotJson.263; - let TotallyNotJson.1185 : {List U8, U64} = Struct {TotallyNotJson.268, TotallyNotJson.1197}; - let TotallyNotJson.1184 : {List U8, U64} = CallByName List.18 TotallyNotJson.263 TotallyNotJson.1185 TotallyNotJson.1175; - let TotallyNotJson.270 : List U8 = StructAtIndex 0 TotallyNotJson.1184; - let TotallyNotJson.1183 : I64 = 93i64; - let TotallyNotJson.1182 : U8 = CallByName Num.127 TotallyNotJson.1183; - let TotallyNotJson.1179 : List U8 = CallByName List.4 TotallyNotJson.270 TotallyNotJson.1182; - let TotallyNotJson.1181 : I64 = 125i64; - let TotallyNotJson.1180 : U8 = CallByName Num.127 TotallyNotJson.1181; - let TotallyNotJson.1178 : List U8 = CallByName List.4 TotallyNotJson.1179 TotallyNotJson.1180; - ret TotallyNotJson.1178; - -procedure TotallyNotJson.267 (TotallyNotJson.1177, TotallyNotJson.273, TotallyNotJson.266): - let TotallyNotJson.271 : List U8 = StructAtIndex 0 TotallyNotJson.1177; - let TotallyNotJson.272 : U64 = StructAtIndex 1 TotallyNotJson.1177; - let TotallyNotJson.274 : List U8 = CallByName Encode.24 TotallyNotJson.271 TotallyNotJson.273 TotallyNotJson.266; - joinpoint TotallyNotJson.1191 TotallyNotJson.275: - let TotallyNotJson.1189 : U64 = 1i64; - let TotallyNotJson.1188 : U64 = CallByName Num.20 TotallyNotJson.272 TotallyNotJson.1189; - let TotallyNotJson.1187 : {List U8, U64} = Struct {TotallyNotJson.275, TotallyNotJson.1188}; - ret TotallyNotJson.1187; +procedure TotallyNotJson.183 (TotallyNotJson.184, TotallyNotJson.185): + let TotallyNotJson.1036 : List U8 = CallByName TotallyNotJson.27 TotallyNotJson.185; + let TotallyNotJson.1035 : List U8 = CallByName List.8 TotallyNotJson.184 TotallyNotJson.1036; + ret TotallyNotJson.1035; + +procedure TotallyNotJson.228 (TotallyNotJson.229, TotallyNotJson.973, #Attr.12): + let TotallyNotJson.227 : List Str = StructAtIndex 1 #Attr.12; + let TotallyNotJson.226 : Str = StructAtIndex 0 #Attr.12; + let TotallyNotJson.1011 : I64 = 123i64; + let TotallyNotJson.1010 : U8 = CallByName Num.127 TotallyNotJson.1011; + let TotallyNotJson.1007 : List U8 = CallByName List.4 TotallyNotJson.229 TotallyNotJson.1010; + let TotallyNotJson.1009 : I64 = 34i64; + let TotallyNotJson.1008 : U8 = CallByName Num.127 TotallyNotJson.1009; + let TotallyNotJson.1005 : List U8 = CallByName List.4 TotallyNotJson.1007 TotallyNotJson.1008; + let TotallyNotJson.1006 : List U8 = CallByName Str.12 TotallyNotJson.226; + let TotallyNotJson.1002 : List U8 = CallByName List.8 TotallyNotJson.1005 TotallyNotJson.1006; + let TotallyNotJson.1004 : I64 = 34i64; + let TotallyNotJson.1003 : U8 = CallByName Num.127 TotallyNotJson.1004; + let TotallyNotJson.999 : List U8 = CallByName List.4 TotallyNotJson.1002 TotallyNotJson.1003; + let TotallyNotJson.1001 : I64 = 58i64; + let TotallyNotJson.1000 : U8 = CallByName Num.127 TotallyNotJson.1001; + let TotallyNotJson.996 : List U8 = CallByName List.4 TotallyNotJson.999 TotallyNotJson.1000; + let TotallyNotJson.998 : I64 = 91i64; + let TotallyNotJson.997 : U8 = CallByName Num.127 TotallyNotJson.998; + let TotallyNotJson.231 : List U8 = CallByName List.4 TotallyNotJson.996 TotallyNotJson.997; + let TotallyNotJson.995 : U64 = CallByName List.6 TotallyNotJson.227; + let TotallyNotJson.983 : {List U8, U64} = Struct {TotallyNotJson.231, TotallyNotJson.995}; + let TotallyNotJson.984 : {} = Struct {}; + let TotallyNotJson.982 : {List U8, U64} = CallByName List.18 TotallyNotJson.227 TotallyNotJson.983 TotallyNotJson.984; + let TotallyNotJson.233 : List U8 = StructAtIndex 0 TotallyNotJson.982; + let TotallyNotJson.981 : I64 = 93i64; + let TotallyNotJson.980 : U8 = CallByName Num.127 TotallyNotJson.981; + let TotallyNotJson.977 : List U8 = CallByName List.4 TotallyNotJson.233 TotallyNotJson.980; + let TotallyNotJson.979 : I64 = 125i64; + let TotallyNotJson.978 : U8 = CallByName Num.127 TotallyNotJson.979; + let TotallyNotJson.976 : List U8 = CallByName List.4 TotallyNotJson.977 TotallyNotJson.978; + ret TotallyNotJson.976; + +procedure TotallyNotJson.230 (TotallyNotJson.975, TotallyNotJson.236): + let TotallyNotJson.234 : List U8 = StructAtIndex 0 TotallyNotJson.975; + let TotallyNotJson.235 : U64 = StructAtIndex 1 TotallyNotJson.975; + let TotallyNotJson.994 : {} = Struct {}; + let TotallyNotJson.237 : List U8 = CallByName Encode.24 TotallyNotJson.234 TotallyNotJson.236 TotallyNotJson.994; + joinpoint TotallyNotJson.989 TotallyNotJson.238: + let TotallyNotJson.987 : U64 = 1i64; + let TotallyNotJson.986 : U64 = CallByName Num.20 TotallyNotJson.235 TotallyNotJson.987; + let TotallyNotJson.985 : {List U8, U64} = Struct {TotallyNotJson.238, TotallyNotJson.986}; + ret TotallyNotJson.985; in - let TotallyNotJson.1195 : U64 = 1i64; - let TotallyNotJson.1192 : Int1 = CallByName Num.24 TotallyNotJson.272 TotallyNotJson.1195; - if TotallyNotJson.1192 then - let TotallyNotJson.1194 : I64 = 44i64; - let TotallyNotJson.1193 : U8 = CallByName Num.127 TotallyNotJson.1194; - let TotallyNotJson.1190 : List U8 = CallByName List.4 TotallyNotJson.274 TotallyNotJson.1193; - jump TotallyNotJson.1191 TotallyNotJson.1190; + let TotallyNotJson.993 : U64 = 1i64; + let TotallyNotJson.990 : Int1 = CallByName Num.24 TotallyNotJson.235 TotallyNotJson.993; + if TotallyNotJson.990 then + let TotallyNotJson.992 : I64 = 44i64; + let TotallyNotJson.991 : U8 = CallByName Num.127 TotallyNotJson.992; + let TotallyNotJson.988 : List U8 = CallByName List.4 TotallyNotJson.237 TotallyNotJson.991; + jump TotallyNotJson.989 TotallyNotJson.988; else - jump TotallyNotJson.1191 TotallyNotJson.274; - -procedure TotallyNotJson.27 (TotallyNotJson.218): - switch TotallyNotJson.218: + jump TotallyNotJson.989 TotallyNotJson.237; + +procedure TotallyNotJson.25 (TotallyNotJson.149): + let TotallyNotJson.1012 : Str = CallByName Encode.23 TotallyNotJson.149; + ret TotallyNotJson.1012; + +procedure TotallyNotJson.26 (TotallyNotJson.152): + let TotallyNotJson.153 : List U8 = CallByName Str.12 TotallyNotJson.152; + let TotallyNotJson.1094 : U64 = 0i64; + let TotallyNotJson.1095 : Int1 = true; + let TotallyNotJson.154 : {U64, Int1} = Struct {TotallyNotJson.1094, TotallyNotJson.1095}; + let TotallyNotJson.1064 : {} = Struct {}; + inc TotallyNotJson.153; + let TotallyNotJson.155 : {U64, Int1} = CallByName List.26 TotallyNotJson.153 TotallyNotJson.154 TotallyNotJson.1064; + let TotallyNotJson.1018 : Int1 = StructAtIndex 1 TotallyNotJson.155; + let TotallyNotJson.1062 : Int1 = true; + let TotallyNotJson.1063 : Int1 = lowlevel Eq TotallyNotJson.1062 TotallyNotJson.1018; + if TotallyNotJson.1063 then + let TotallyNotJson.1028 : U64 = CallByName List.6 TotallyNotJson.153; + let TotallyNotJson.1029 : U64 = 2i64; + let TotallyNotJson.1027 : U64 = CallByName Num.19 TotallyNotJson.1028 TotallyNotJson.1029; + let TotallyNotJson.1024 : List U8 = CallByName List.68 TotallyNotJson.1027; + let TotallyNotJson.1026 : U8 = 34i64; + let TotallyNotJson.1025 : List U8 = Array [TotallyNotJson.1026]; + let TotallyNotJson.1023 : List U8 = CallByName List.8 TotallyNotJson.1024 TotallyNotJson.1025; + let TotallyNotJson.1020 : List U8 = CallByName List.8 TotallyNotJson.1023 TotallyNotJson.153; + let TotallyNotJson.1022 : U8 = 34i64; + let TotallyNotJson.1021 : List U8 = Array [TotallyNotJson.1022]; + let TotallyNotJson.1019 : List U8 = CallByName List.8 TotallyNotJson.1020 TotallyNotJson.1021; + ret TotallyNotJson.1019; + else + inc TotallyNotJson.153; + let TotallyNotJson.1061 : U64 = StructAtIndex 0 TotallyNotJson.155; + let TotallyNotJson.1060 : {List U8, List U8} = CallByName List.52 TotallyNotJson.153 TotallyNotJson.1061; + let TotallyNotJson.179 : List U8 = StructAtIndex 0 TotallyNotJson.1060; + let TotallyNotJson.181 : List U8 = StructAtIndex 1 TotallyNotJson.1060; + let TotallyNotJson.1058 : U64 = CallByName List.6 TotallyNotJson.153; + dec TotallyNotJson.153; + let TotallyNotJson.1059 : U64 = 120i64; + let TotallyNotJson.1056 : U64 = CallByName Num.21 TotallyNotJson.1058 TotallyNotJson.1059; + let TotallyNotJson.1057 : U64 = 100i64; + let TotallyNotJson.1055 : U64 = CallByName Num.94 TotallyNotJson.1056 TotallyNotJson.1057; + let TotallyNotJson.1052 : List U8 = CallByName List.68 TotallyNotJson.1055; + let TotallyNotJson.1054 : U8 = 34i64; + let TotallyNotJson.1053 : List U8 = Array [TotallyNotJson.1054]; + let TotallyNotJson.1051 : List U8 = CallByName List.8 TotallyNotJson.1052 TotallyNotJson.1053; + let TotallyNotJson.182 : List U8 = CallByName List.8 TotallyNotJson.1051 TotallyNotJson.179; + let TotallyNotJson.1034 : {} = Struct {}; + let TotallyNotJson.1031 : List U8 = CallByName List.18 TotallyNotJson.181 TotallyNotJson.182 TotallyNotJson.1034; + let TotallyNotJson.1033 : U8 = 34i64; + let TotallyNotJson.1032 : List U8 = Array [TotallyNotJson.1033]; + let TotallyNotJson.1030 : List U8 = CallByName List.8 TotallyNotJson.1031 TotallyNotJson.1032; + ret TotallyNotJson.1030; + +procedure TotallyNotJson.27 (TotallyNotJson.186): + switch TotallyNotJson.186: case 34: - let TotallyNotJson.1239 : List U8 = Array [92i64, 34i64]; - ret TotallyNotJson.1239; + let TotallyNotJson.1037 : List U8 = Array [92i64, 34i64]; + ret TotallyNotJson.1037; case 92: - let TotallyNotJson.1240 : List U8 = Array [92i64, 92i64]; - ret TotallyNotJson.1240; + let TotallyNotJson.1038 : List U8 = Array [92i64, 92i64]; + ret TotallyNotJson.1038; case 47: - let TotallyNotJson.1241 : List U8 = Array [92i64, 47i64]; - ret TotallyNotJson.1241; + let TotallyNotJson.1039 : List U8 = Array [92i64, 47i64]; + ret TotallyNotJson.1039; case 8: - let TotallyNotJson.1243 : U8 = 98i64; - let TotallyNotJson.1242 : List U8 = Array [92i64, TotallyNotJson.1243]; - ret TotallyNotJson.1242; + let TotallyNotJson.1041 : U8 = 98i64; + let TotallyNotJson.1040 : List U8 = Array [92i64, TotallyNotJson.1041]; + ret TotallyNotJson.1040; case 12: - let TotallyNotJson.1245 : U8 = 102i64; - let TotallyNotJson.1244 : List U8 = Array [92i64, TotallyNotJson.1245]; - ret TotallyNotJson.1244; + let TotallyNotJson.1043 : U8 = 102i64; + let TotallyNotJson.1042 : List U8 = Array [92i64, TotallyNotJson.1043]; + ret TotallyNotJson.1042; case 10: - let TotallyNotJson.1247 : U8 = 110i64; - let TotallyNotJson.1246 : List U8 = Array [92i64, TotallyNotJson.1247]; - ret TotallyNotJson.1246; + let TotallyNotJson.1045 : U8 = 110i64; + let TotallyNotJson.1044 : List U8 = Array [92i64, TotallyNotJson.1045]; + ret TotallyNotJson.1044; case 13: - let TotallyNotJson.1249 : U8 = 114i64; - let TotallyNotJson.1248 : List U8 = Array [92i64, TotallyNotJson.1249]; - ret TotallyNotJson.1248; + let TotallyNotJson.1047 : U8 = 114i64; + let TotallyNotJson.1046 : List U8 = Array [92i64, TotallyNotJson.1047]; + ret TotallyNotJson.1046; case 9: - let TotallyNotJson.1251 : U8 = 114i64; - let TotallyNotJson.1250 : List U8 = Array [92i64, TotallyNotJson.1251]; - ret TotallyNotJson.1250; + let TotallyNotJson.1049 : U8 = 114i64; + let TotallyNotJson.1048 : List U8 = Array [92i64, TotallyNotJson.1049]; + ret TotallyNotJson.1048; default: - let TotallyNotJson.1252 : List U8 = Array [TotallyNotJson.218]; - ret TotallyNotJson.1252; + let TotallyNotJson.1050 : List U8 = Array [TotallyNotJson.186]; + ret TotallyNotJson.1050; -procedure TotallyNotJson.32 (TotallyNotJson.262, TotallyNotJson.263): - let TotallyNotJson.1174 : {Str, List Str} = Struct {TotallyNotJson.262, TotallyNotJson.263}; - let TotallyNotJson.1173 : {Str, List Str} = CallByName Encode.23 TotallyNotJson.1174; - ret TotallyNotJson.1173; +procedure TotallyNotJson.31 (TotallyNotJson.226, TotallyNotJson.227): + let TotallyNotJson.972 : {Str, List Str} = Struct {TotallyNotJson.226, TotallyNotJson.227}; + let TotallyNotJson.971 : {Str, List Str} = CallByName Encode.23 TotallyNotJson.972; + ret TotallyNotJson.971; procedure TotallyNotJson.8 (): - let TotallyNotJson.1172 : [C , C [], C , C , C , C ] = TagId(2) ; - ret TotallyNotJson.1172; + let TotallyNotJson.970 : {} = Struct {}; + ret TotallyNotJson.970; procedure Test.0 (): let Test.12 : Str = "foo"; - let Test.11 : [C , C [], C , C , C , C ] = CallByName TotallyNotJson.8; + let Test.11 : {} = CallByName TotallyNotJson.8; let Test.10 : List U8 = CallByName Encode.26 Test.12 Test.11; let Test.2 : [C {U64, U8}, C Str] = CallByName Str.9 Test.10; let Test.7 : U8 = 1i64; 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 78f685c25cf..89aede92377 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 @@ -13,7 +13,7 @@ procedure #Derived.4 (#Derived.5, #Derived.6, #Derived.1): let #Derived_gen.9 : Str = CallByName TotallyNotJson.25 #Derived.2; let #Derived_gen.10 : Str = CallByName TotallyNotJson.25 #Derived.3; let #Derived_gen.8 : List Str = Array [#Derived_gen.9, #Derived_gen.10]; - let #Derived_gen.6 : {Str, List Str} = CallByName TotallyNotJson.32 #Derived_gen.7 #Derived_gen.8; + let #Derived_gen.6 : {Str, List Str} = CallByName TotallyNotJson.31 #Derived_gen.7 #Derived_gen.8; jump #Derived_gen.5 #Derived_gen.6; procedure Encode.23 (Encode.98): @@ -30,11 +30,11 @@ procedure Encode.24 (Encode.99, Encode.107, Encode.101): ret Encode.111; procedure Encode.24 (Encode.99, Encode.107, Encode.101): - let Encode.113 : List U8 = CallByName TotallyNotJson.264 Encode.99 Encode.101 Encode.107; + let Encode.113 : List U8 = CallByName TotallyNotJson.228 Encode.99 Encode.101 Encode.107; ret Encode.113; procedure Encode.24 (Encode.99, Encode.107, Encode.101): - let Encode.117 : List U8 = CallByName TotallyNotJson.182 Encode.99 Encode.101 Encode.107; + let Encode.117 : List U8 = CallByName TotallyNotJson.150 Encode.99 Encode.101 Encode.107; ret Encode.117; procedure Encode.26 (Encode.105, Encode.106): @@ -43,454 +43,456 @@ 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.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.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.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.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.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.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.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; - -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.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.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; + let List.203 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.648; + ret List.203; + +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.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.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.6 (#Attr.2): + let List.624 : U64 = lowlevel ListLen #Attr.2; + ret List.624; + procedure List.66 (#Attr.2, #Attr.3): - let List.606 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.606; + let List.608 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.608; procedure List.66 (#Attr.2, #Attr.3): - let List.618 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.618; + 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; - -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; + let List.633 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; + ret List.633; + +procedure List.80 (#Derived_gen.19, #Derived_gen.20, #Derived_gen.21, #Derived_gen.22, #Derived_gen.23): + 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.157 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; - -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; + jump List.657 #Derived_gen.19 #Derived_gen.20 #Derived_gen.21 #Derived_gen.22 #Derived_gen.23; + +procedure List.90 (#Derived_gen.14, #Derived_gen.15, #Derived_gen.16, #Derived_gen.17, #Derived_gen.18): + 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.230 List.162 List.607; + 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.611 #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; + jump List.601 #Derived_gen.14 #Derived_gen.15 #Derived_gen.16 #Derived_gen.17 #Derived_gen.18; + +procedure List.90 (#Derived_gen.24, #Derived_gen.25, #Derived_gen.26, #Derived_gen.27, #Derived_gen.28): + 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.183 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.599 #Derived_gen.24 #Derived_gen.25 #Derived_gen.26 #Derived_gen.27 #Derived_gen.28; + jump List.613 #Derived_gen.24 #Derived_gen.25 #Derived_gen.26 #Derived_gen.27 #Derived_gen.28; procedure Num.127 (#Attr.2): - let Num.298 : U8 = lowlevel NumIntCast #Attr.2; - ret Num.298; + let Num.310 : U8 = lowlevel NumIntCast #Attr.2; + ret Num.310; procedure Num.19 (#Attr.2, #Attr.3): - let Num.302 : U64 = lowlevel NumAdd #Attr.2 #Attr.3; - ret Num.302; + let Num.314 : U64 = lowlevel NumAdd #Attr.2 #Attr.3; + ret Num.314; procedure Num.20 (#Attr.2, #Attr.3): - let Num.299 : U64 = lowlevel NumSub #Attr.2 #Attr.3; - ret Num.299; + let Num.311 : U64 = lowlevel NumSub #Attr.2 #Attr.3; + ret Num.311; procedure Num.21 (#Attr.2, #Attr.3): - let Num.304 : U64 = lowlevel NumMul #Attr.2 #Attr.3; - ret Num.304; + let Num.316 : U64 = lowlevel NumMul #Attr.2 #Attr.3; + ret Num.316; procedure Num.22 (#Attr.2, #Attr.3): - let Num.310 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; - ret Num.310; + let Num.322 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; + ret Num.322; procedure Num.24 (#Attr.2, #Attr.3): - let Num.312 : Int1 = lowlevel NumGt #Attr.2 #Attr.3; - ret Num.312; + let Num.324 : Int1 = lowlevel NumGt #Attr.2 #Attr.3; + ret Num.324; procedure Num.51 (#Attr.2, #Attr.3): - let Num.307 : U64 = lowlevel NumAddWrap #Attr.2 #Attr.3; - ret Num.307; + let Num.319 : U64 = lowlevel NumAddWrap #Attr.2 #Attr.3; + ret Num.319; procedure Num.75 (#Attr.2, #Attr.3): - let Num.311 : U64 = lowlevel NumSubWrap #Attr.2 #Attr.3; - ret Num.311; + let Num.323 : U64 = lowlevel NumSubWrap #Attr.2 #Attr.3; + ret Num.323; procedure Num.94 (#Attr.2, #Attr.3): - let Num.303 : U64 = lowlevel NumDivCeilUnchecked #Attr.2 #Attr.3; - ret Num.303; + let Num.315 : U64 = lowlevel NumDivCeilUnchecked #Attr.2 #Attr.3; + ret Num.315; procedure Str.12 (#Attr.2): - let Str.303 : List U8 = lowlevel StrToUtf8 #Attr.2; - ret Str.303; - -procedure Str.48 (#Attr.2, #Attr.3, #Attr.4): - let Str.301 : {U64, Str, Int1, U8} = lowlevel StrFromUtf8Range #Attr.2 #Attr.3 #Attr.4; - ret Str.301; - -procedure Str.9 (Str.80): - let Str.299 : U64 = 0i64; - let Str.300 : U64 = CallByName List.6 Str.80; - let Str.81 : {U64, Str, Int1, U8} = CallByName Str.48 Str.80 Str.299 Str.300; - let Str.296 : Int1 = StructAtIndex 2 Str.81; - if Str.296 then - let Str.298 : Str = StructAtIndex 1 Str.81; - let Str.297 : [C {U64, U8}, C Str] = TagId(1) Str.298; - ret Str.297; + let Str.262 : List U8 = lowlevel StrToUtf8 #Attr.2; + ret Str.262; + +procedure Str.43 (#Attr.2, #Attr.3, #Attr.4): + let Str.260 : {U64, Str, Int1, U8} = lowlevel StrFromUtf8Range #Attr.2 #Attr.3 #Attr.4; + ret Str.260; + +procedure Str.9 (Str.68): + let Str.258 : U64 = 0i64; + let Str.259 : U64 = CallByName List.6 Str.68; + let Str.69 : {U64, Str, Int1, U8} = CallByName Str.43 Str.68 Str.258 Str.259; + let Str.255 : Int1 = StructAtIndex 2 Str.69; + if Str.255 then + let Str.257 : Str = StructAtIndex 1 Str.69; + let Str.256 : [C {U64, U8}, C Str] = TagId(1) Str.257; + ret Str.256; else - let Str.294 : U8 = StructAtIndex 3 Str.81; - let Str.295 : U64 = StructAtIndex 0 Str.81; - let #Derived_gen.35 : Str = StructAtIndex 1 Str.81; + let Str.253 : U8 = StructAtIndex 3 Str.69; + let Str.254 : U64 = StructAtIndex 0 Str.69; + let #Derived_gen.35 : Str = StructAtIndex 1 Str.69; dec #Derived_gen.35; - let Str.293 : {U64, U8} = Struct {Str.295, Str.294}; - let Str.292 : [C {U64, U8}, C Str] = TagId(0) Str.293; - ret Str.292; - -procedure TotallyNotJson.182 (TotallyNotJson.183, TotallyNotJson.1216, TotallyNotJson.181): - let TotallyNotJson.1219 : List U8 = CallByName TotallyNotJson.26 TotallyNotJson.181; - let TotallyNotJson.1218 : List U8 = CallByName List.8 TotallyNotJson.183 TotallyNotJson.1219; - ret TotallyNotJson.1218; - -procedure TotallyNotJson.189 (TotallyNotJson.1267, TotallyNotJson.192): - let TotallyNotJson.190 : U64 = StructAtIndex 0 TotallyNotJson.1267; - let TotallyNotJson.191 : Int1 = StructAtIndex 1 TotallyNotJson.1267; - switch TotallyNotJson.192: + let Str.252 : {U64, U8} = Struct {Str.254, Str.253}; + let Str.251 : [C {U64, U8}, C Str] = TagId(0) Str.252; + ret Str.251; + +procedure TotallyNotJson.150 (TotallyNotJson.151, TotallyNotJson.1014, TotallyNotJson.149): + let TotallyNotJson.1017 : List U8 = CallByName TotallyNotJson.26 TotallyNotJson.149; + let TotallyNotJson.1016 : List U8 = CallByName List.8 TotallyNotJson.151 TotallyNotJson.1017; + ret TotallyNotJson.1016; + +procedure TotallyNotJson.157 (TotallyNotJson.1065, TotallyNotJson.160): + let TotallyNotJson.158 : U64 = StructAtIndex 0 TotallyNotJson.1065; + let TotallyNotJson.159 : Int1 = StructAtIndex 1 TotallyNotJson.1065; + switch TotallyNotJson.160: case 34: - let TotallyNotJson.1270 : Int1 = false; - let TotallyNotJson.1269 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1270}; - let TotallyNotJson.1268 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1269; - ret TotallyNotJson.1268; + let TotallyNotJson.1068 : Int1 = false; + let TotallyNotJson.1067 : {U64, Int1} = Struct {TotallyNotJson.158, TotallyNotJson.1068}; + let TotallyNotJson.1066 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1067; + ret TotallyNotJson.1066; case 92: - let TotallyNotJson.1273 : Int1 = false; - let TotallyNotJson.1272 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1273}; - let TotallyNotJson.1271 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1272; - ret TotallyNotJson.1271; + let TotallyNotJson.1071 : Int1 = false; + let TotallyNotJson.1070 : {U64, Int1} = Struct {TotallyNotJson.158, TotallyNotJson.1071}; + let TotallyNotJson.1069 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1070; + ret TotallyNotJson.1069; case 47: - let TotallyNotJson.1276 : Int1 = false; - let TotallyNotJson.1275 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1276}; - let TotallyNotJson.1274 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1275; - ret TotallyNotJson.1274; + let TotallyNotJson.1074 : Int1 = false; + let TotallyNotJson.1073 : {U64, Int1} = Struct {TotallyNotJson.158, TotallyNotJson.1074}; + let TotallyNotJson.1072 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1073; + ret TotallyNotJson.1072; case 8: - let TotallyNotJson.1279 : Int1 = false; - let TotallyNotJson.1278 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1279}; - let TotallyNotJson.1277 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1278; - ret TotallyNotJson.1277; + let TotallyNotJson.1077 : Int1 = false; + let TotallyNotJson.1076 : {U64, Int1} = Struct {TotallyNotJson.158, TotallyNotJson.1077}; + let TotallyNotJson.1075 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1076; + ret TotallyNotJson.1075; case 12: - let TotallyNotJson.1282 : Int1 = false; - let TotallyNotJson.1281 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1282}; - let TotallyNotJson.1280 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1281; - ret TotallyNotJson.1280; + let TotallyNotJson.1080 : Int1 = false; + let TotallyNotJson.1079 : {U64, Int1} = Struct {TotallyNotJson.158, TotallyNotJson.1080}; + let TotallyNotJson.1078 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1079; + ret TotallyNotJson.1078; case 10: - let TotallyNotJson.1285 : Int1 = false; - let TotallyNotJson.1284 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1285}; - let TotallyNotJson.1283 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1284; - ret TotallyNotJson.1283; + let TotallyNotJson.1083 : Int1 = false; + let TotallyNotJson.1082 : {U64, Int1} = Struct {TotallyNotJson.158, TotallyNotJson.1083}; + let TotallyNotJson.1081 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1082; + ret TotallyNotJson.1081; case 13: - let TotallyNotJson.1288 : Int1 = false; - let TotallyNotJson.1287 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1288}; - let TotallyNotJson.1286 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1287; - ret TotallyNotJson.1286; + let TotallyNotJson.1086 : Int1 = false; + let TotallyNotJson.1085 : {U64, Int1} = Struct {TotallyNotJson.158, TotallyNotJson.1086}; + let TotallyNotJson.1084 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1085; + ret TotallyNotJson.1084; case 9: - let TotallyNotJson.1291 : Int1 = false; - let TotallyNotJson.1290 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1291}; - let TotallyNotJson.1289 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1290; - ret TotallyNotJson.1289; + let TotallyNotJson.1089 : Int1 = false; + let TotallyNotJson.1088 : {U64, Int1} = Struct {TotallyNotJson.158, TotallyNotJson.1089}; + let TotallyNotJson.1087 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1088; + ret TotallyNotJson.1087; default: - let TotallyNotJson.1295 : U64 = 1i64; - let TotallyNotJson.1294 : U64 = CallByName Num.19 TotallyNotJson.190 TotallyNotJson.1295; - let TotallyNotJson.1293 : {U64, Int1} = Struct {TotallyNotJson.1294, TotallyNotJson.191}; - let TotallyNotJson.1292 : [C {U64, Int1}, C {U64, Int1}] = TagId(1) TotallyNotJson.1293; - ret TotallyNotJson.1292; + let TotallyNotJson.1093 : U64 = 1i64; + let TotallyNotJson.1092 : U64 = CallByName Num.19 TotallyNotJson.158 TotallyNotJson.1093; + let TotallyNotJson.1091 : {U64, Int1} = Struct {TotallyNotJson.1092, TotallyNotJson.159}; + let TotallyNotJson.1090 : [C {U64, Int1}, C {U64, Int1}] = TagId(1) TotallyNotJson.1091; + ret TotallyNotJson.1090; -procedure TotallyNotJson.215 (TotallyNotJson.216, TotallyNotJson.217): - let TotallyNotJson.1238 : List U8 = CallByName TotallyNotJson.27 TotallyNotJson.217; - let TotallyNotJson.1237 : List U8 = CallByName List.8 TotallyNotJson.216 TotallyNotJson.1238; - ret TotallyNotJson.1237; - -procedure TotallyNotJson.25 (TotallyNotJson.181): - let TotallyNotJson.1298 : Str = CallByName Encode.23 TotallyNotJson.181; - ret TotallyNotJson.1298; - -procedure TotallyNotJson.26 (TotallyNotJson.184): - let TotallyNotJson.185 : List U8 = CallByName Str.12 TotallyNotJson.184; - let TotallyNotJson.1296 : U64 = 0i64; - let TotallyNotJson.1297 : Int1 = true; - let TotallyNotJson.186 : {U64, Int1} = Struct {TotallyNotJson.1296, TotallyNotJson.1297}; - let TotallyNotJson.1266 : {} = Struct {}; - inc TotallyNotJson.185; - let TotallyNotJson.187 : {U64, Int1} = CallByName List.26 TotallyNotJson.185 TotallyNotJson.186 TotallyNotJson.1266; - let TotallyNotJson.1220 : Int1 = StructAtIndex 1 TotallyNotJson.187; - let TotallyNotJson.1264 : Int1 = true; - let TotallyNotJson.1265 : Int1 = lowlevel Eq TotallyNotJson.1264 TotallyNotJson.1220; - if TotallyNotJson.1265 then - let TotallyNotJson.1230 : U64 = CallByName List.6 TotallyNotJson.185; - let TotallyNotJson.1231 : U64 = 2i64; - let TotallyNotJson.1229 : U64 = CallByName Num.19 TotallyNotJson.1230 TotallyNotJson.1231; - let TotallyNotJson.1226 : List U8 = CallByName List.68 TotallyNotJson.1229; - let TotallyNotJson.1228 : U8 = 34i64; - let TotallyNotJson.1227 : List U8 = Array [TotallyNotJson.1228]; - let TotallyNotJson.1225 : List U8 = CallByName List.8 TotallyNotJson.1226 TotallyNotJson.1227; - let TotallyNotJson.1222 : List U8 = CallByName List.8 TotallyNotJson.1225 TotallyNotJson.185; - let TotallyNotJson.1224 : U8 = 34i64; - let TotallyNotJson.1223 : List U8 = Array [TotallyNotJson.1224]; - let TotallyNotJson.1221 : List U8 = CallByName List.8 TotallyNotJson.1222 TotallyNotJson.1223; - ret TotallyNotJson.1221; - else - inc TotallyNotJson.185; - let TotallyNotJson.1263 : U64 = StructAtIndex 0 TotallyNotJson.187; - let TotallyNotJson.1262 : {List U8, List U8} = CallByName List.52 TotallyNotJson.185 TotallyNotJson.1263; - let TotallyNotJson.211 : List U8 = StructAtIndex 0 TotallyNotJson.1262; - let TotallyNotJson.213 : List U8 = StructAtIndex 1 TotallyNotJson.1262; - let TotallyNotJson.1260 : U64 = CallByName List.6 TotallyNotJson.185; - dec TotallyNotJson.185; - let TotallyNotJson.1261 : U64 = 120i64; - let TotallyNotJson.1258 : U64 = CallByName Num.21 TotallyNotJson.1260 TotallyNotJson.1261; - let TotallyNotJson.1259 : U64 = 100i64; - let TotallyNotJson.1257 : U64 = CallByName Num.94 TotallyNotJson.1258 TotallyNotJson.1259; - let TotallyNotJson.1254 : List U8 = CallByName List.68 TotallyNotJson.1257; - let TotallyNotJson.1256 : U8 = 34i64; - let TotallyNotJson.1255 : List U8 = Array [TotallyNotJson.1256]; - let TotallyNotJson.1253 : List U8 = CallByName List.8 TotallyNotJson.1254 TotallyNotJson.1255; - let TotallyNotJson.214 : List U8 = CallByName List.8 TotallyNotJson.1253 TotallyNotJson.211; - let TotallyNotJson.1236 : {} = Struct {}; - let TotallyNotJson.1233 : List U8 = CallByName List.18 TotallyNotJson.213 TotallyNotJson.214 TotallyNotJson.1236; - let TotallyNotJson.1235 : U8 = 34i64; - let TotallyNotJson.1234 : List U8 = Array [TotallyNotJson.1235]; - let TotallyNotJson.1232 : List U8 = CallByName List.8 TotallyNotJson.1233 TotallyNotJson.1234; - ret TotallyNotJson.1232; - -procedure TotallyNotJson.264 (TotallyNotJson.265, TotallyNotJson.1175, #Attr.12): - let TotallyNotJson.263 : List Str = StructAtIndex 1 #Attr.12; - let TotallyNotJson.262 : Str = StructAtIndex 0 #Attr.12; - let TotallyNotJson.1213 : I64 = 123i64; - let TotallyNotJson.1212 : U8 = CallByName Num.127 TotallyNotJson.1213; - let TotallyNotJson.1209 : List U8 = CallByName List.4 TotallyNotJson.265 TotallyNotJson.1212; - let TotallyNotJson.1211 : I64 = 34i64; - let TotallyNotJson.1210 : U8 = CallByName Num.127 TotallyNotJson.1211; - let TotallyNotJson.1207 : List U8 = CallByName List.4 TotallyNotJson.1209 TotallyNotJson.1210; - let TotallyNotJson.1208 : List U8 = CallByName Str.12 TotallyNotJson.262; - let TotallyNotJson.1204 : List U8 = CallByName List.8 TotallyNotJson.1207 TotallyNotJson.1208; - let TotallyNotJson.1206 : I64 = 34i64; - let TotallyNotJson.1205 : U8 = CallByName Num.127 TotallyNotJson.1206; - let TotallyNotJson.1201 : List U8 = CallByName List.4 TotallyNotJson.1204 TotallyNotJson.1205; - let TotallyNotJson.1203 : I64 = 58i64; - let TotallyNotJson.1202 : U8 = CallByName Num.127 TotallyNotJson.1203; - let TotallyNotJson.1198 : List U8 = CallByName List.4 TotallyNotJson.1201 TotallyNotJson.1202; - let TotallyNotJson.1200 : I64 = 91i64; - let TotallyNotJson.1199 : U8 = CallByName Num.127 TotallyNotJson.1200; - let TotallyNotJson.268 : List U8 = CallByName List.4 TotallyNotJson.1198 TotallyNotJson.1199; - let TotallyNotJson.1197 : U64 = CallByName List.6 TotallyNotJson.263; - let TotallyNotJson.1185 : {List U8, U64} = Struct {TotallyNotJson.268, TotallyNotJson.1197}; - let TotallyNotJson.1184 : {List U8, U64} = CallByName List.18 TotallyNotJson.263 TotallyNotJson.1185 TotallyNotJson.1175; - let TotallyNotJson.270 : List U8 = StructAtIndex 0 TotallyNotJson.1184; - let TotallyNotJson.1183 : I64 = 93i64; - let TotallyNotJson.1182 : U8 = CallByName Num.127 TotallyNotJson.1183; - let TotallyNotJson.1179 : List U8 = CallByName List.4 TotallyNotJson.270 TotallyNotJson.1182; - let TotallyNotJson.1181 : I64 = 125i64; - let TotallyNotJson.1180 : U8 = CallByName Num.127 TotallyNotJson.1181; - let TotallyNotJson.1178 : List U8 = CallByName List.4 TotallyNotJson.1179 TotallyNotJson.1180; - ret TotallyNotJson.1178; - -procedure TotallyNotJson.267 (TotallyNotJson.1177, TotallyNotJson.273, TotallyNotJson.266): - let TotallyNotJson.271 : List U8 = StructAtIndex 0 TotallyNotJson.1177; - let TotallyNotJson.272 : U64 = StructAtIndex 1 TotallyNotJson.1177; - let TotallyNotJson.274 : List U8 = CallByName Encode.24 TotallyNotJson.271 TotallyNotJson.273 TotallyNotJson.266; - joinpoint TotallyNotJson.1191 TotallyNotJson.275: - let TotallyNotJson.1189 : U64 = 1i64; - let TotallyNotJson.1188 : U64 = CallByName Num.20 TotallyNotJson.272 TotallyNotJson.1189; - let TotallyNotJson.1187 : {List U8, U64} = Struct {TotallyNotJson.275, TotallyNotJson.1188}; - ret TotallyNotJson.1187; +procedure TotallyNotJson.183 (TotallyNotJson.184, TotallyNotJson.185): + let TotallyNotJson.1036 : List U8 = CallByName TotallyNotJson.27 TotallyNotJson.185; + let TotallyNotJson.1035 : List U8 = CallByName List.8 TotallyNotJson.184 TotallyNotJson.1036; + ret TotallyNotJson.1035; + +procedure TotallyNotJson.228 (TotallyNotJson.229, TotallyNotJson.973, #Attr.12): + let TotallyNotJson.227 : List Str = StructAtIndex 1 #Attr.12; + let TotallyNotJson.226 : Str = StructAtIndex 0 #Attr.12; + let TotallyNotJson.1011 : I64 = 123i64; + let TotallyNotJson.1010 : U8 = CallByName Num.127 TotallyNotJson.1011; + let TotallyNotJson.1007 : List U8 = CallByName List.4 TotallyNotJson.229 TotallyNotJson.1010; + let TotallyNotJson.1009 : I64 = 34i64; + let TotallyNotJson.1008 : U8 = CallByName Num.127 TotallyNotJson.1009; + let TotallyNotJson.1005 : List U8 = CallByName List.4 TotallyNotJson.1007 TotallyNotJson.1008; + let TotallyNotJson.1006 : List U8 = CallByName Str.12 TotallyNotJson.226; + let TotallyNotJson.1002 : List U8 = CallByName List.8 TotallyNotJson.1005 TotallyNotJson.1006; + let TotallyNotJson.1004 : I64 = 34i64; + let TotallyNotJson.1003 : U8 = CallByName Num.127 TotallyNotJson.1004; + let TotallyNotJson.999 : List U8 = CallByName List.4 TotallyNotJson.1002 TotallyNotJson.1003; + let TotallyNotJson.1001 : I64 = 58i64; + let TotallyNotJson.1000 : U8 = CallByName Num.127 TotallyNotJson.1001; + let TotallyNotJson.996 : List U8 = CallByName List.4 TotallyNotJson.999 TotallyNotJson.1000; + let TotallyNotJson.998 : I64 = 91i64; + let TotallyNotJson.997 : U8 = CallByName Num.127 TotallyNotJson.998; + let TotallyNotJson.231 : List U8 = CallByName List.4 TotallyNotJson.996 TotallyNotJson.997; + let TotallyNotJson.995 : U64 = CallByName List.6 TotallyNotJson.227; + let TotallyNotJson.983 : {List U8, U64} = Struct {TotallyNotJson.231, TotallyNotJson.995}; + let TotallyNotJson.984 : {} = Struct {}; + let TotallyNotJson.982 : {List U8, U64} = CallByName List.18 TotallyNotJson.227 TotallyNotJson.983 TotallyNotJson.984; + let TotallyNotJson.233 : List U8 = StructAtIndex 0 TotallyNotJson.982; + let TotallyNotJson.981 : I64 = 93i64; + let TotallyNotJson.980 : U8 = CallByName Num.127 TotallyNotJson.981; + let TotallyNotJson.977 : List U8 = CallByName List.4 TotallyNotJson.233 TotallyNotJson.980; + let TotallyNotJson.979 : I64 = 125i64; + let TotallyNotJson.978 : U8 = CallByName Num.127 TotallyNotJson.979; + let TotallyNotJson.976 : List U8 = CallByName List.4 TotallyNotJson.977 TotallyNotJson.978; + ret TotallyNotJson.976; + +procedure TotallyNotJson.230 (TotallyNotJson.975, TotallyNotJson.236): + let TotallyNotJson.234 : List U8 = StructAtIndex 0 TotallyNotJson.975; + let TotallyNotJson.235 : U64 = StructAtIndex 1 TotallyNotJson.975; + let TotallyNotJson.994 : {} = Struct {}; + let TotallyNotJson.237 : List U8 = CallByName Encode.24 TotallyNotJson.234 TotallyNotJson.236 TotallyNotJson.994; + joinpoint TotallyNotJson.989 TotallyNotJson.238: + let TotallyNotJson.987 : U64 = 1i64; + let TotallyNotJson.986 : U64 = CallByName Num.20 TotallyNotJson.235 TotallyNotJson.987; + let TotallyNotJson.985 : {List U8, U64} = Struct {TotallyNotJson.238, TotallyNotJson.986}; + ret TotallyNotJson.985; in - let TotallyNotJson.1195 : U64 = 1i64; - let TotallyNotJson.1192 : Int1 = CallByName Num.24 TotallyNotJson.272 TotallyNotJson.1195; - if TotallyNotJson.1192 then - let TotallyNotJson.1194 : I64 = 44i64; - let TotallyNotJson.1193 : U8 = CallByName Num.127 TotallyNotJson.1194; - let TotallyNotJson.1190 : List U8 = CallByName List.4 TotallyNotJson.274 TotallyNotJson.1193; - jump TotallyNotJson.1191 TotallyNotJson.1190; + let TotallyNotJson.993 : U64 = 1i64; + let TotallyNotJson.990 : Int1 = CallByName Num.24 TotallyNotJson.235 TotallyNotJson.993; + if TotallyNotJson.990 then + let TotallyNotJson.992 : I64 = 44i64; + let TotallyNotJson.991 : U8 = CallByName Num.127 TotallyNotJson.992; + let TotallyNotJson.988 : List U8 = CallByName List.4 TotallyNotJson.237 TotallyNotJson.991; + jump TotallyNotJson.989 TotallyNotJson.988; else - jump TotallyNotJson.1191 TotallyNotJson.274; - -procedure TotallyNotJson.27 (TotallyNotJson.218): - switch TotallyNotJson.218: + jump TotallyNotJson.989 TotallyNotJson.237; + +procedure TotallyNotJson.25 (TotallyNotJson.149): + let TotallyNotJson.1096 : Str = CallByName Encode.23 TotallyNotJson.149; + ret TotallyNotJson.1096; + +procedure TotallyNotJson.26 (TotallyNotJson.152): + let TotallyNotJson.153 : List U8 = CallByName Str.12 TotallyNotJson.152; + let TotallyNotJson.1094 : U64 = 0i64; + let TotallyNotJson.1095 : Int1 = true; + let TotallyNotJson.154 : {U64, Int1} = Struct {TotallyNotJson.1094, TotallyNotJson.1095}; + let TotallyNotJson.1064 : {} = Struct {}; + inc TotallyNotJson.153; + let TotallyNotJson.155 : {U64, Int1} = CallByName List.26 TotallyNotJson.153 TotallyNotJson.154 TotallyNotJson.1064; + let TotallyNotJson.1018 : Int1 = StructAtIndex 1 TotallyNotJson.155; + let TotallyNotJson.1062 : Int1 = true; + let TotallyNotJson.1063 : Int1 = lowlevel Eq TotallyNotJson.1062 TotallyNotJson.1018; + if TotallyNotJson.1063 then + let TotallyNotJson.1028 : U64 = CallByName List.6 TotallyNotJson.153; + let TotallyNotJson.1029 : U64 = 2i64; + let TotallyNotJson.1027 : U64 = CallByName Num.19 TotallyNotJson.1028 TotallyNotJson.1029; + let TotallyNotJson.1024 : List U8 = CallByName List.68 TotallyNotJson.1027; + let TotallyNotJson.1026 : U8 = 34i64; + let TotallyNotJson.1025 : List U8 = Array [TotallyNotJson.1026]; + let TotallyNotJson.1023 : List U8 = CallByName List.8 TotallyNotJson.1024 TotallyNotJson.1025; + let TotallyNotJson.1020 : List U8 = CallByName List.8 TotallyNotJson.1023 TotallyNotJson.153; + let TotallyNotJson.1022 : U8 = 34i64; + let TotallyNotJson.1021 : List U8 = Array [TotallyNotJson.1022]; + let TotallyNotJson.1019 : List U8 = CallByName List.8 TotallyNotJson.1020 TotallyNotJson.1021; + ret TotallyNotJson.1019; + else + inc TotallyNotJson.153; + let TotallyNotJson.1061 : U64 = StructAtIndex 0 TotallyNotJson.155; + let TotallyNotJson.1060 : {List U8, List U8} = CallByName List.52 TotallyNotJson.153 TotallyNotJson.1061; + let TotallyNotJson.179 : List U8 = StructAtIndex 0 TotallyNotJson.1060; + let TotallyNotJson.181 : List U8 = StructAtIndex 1 TotallyNotJson.1060; + let TotallyNotJson.1058 : U64 = CallByName List.6 TotallyNotJson.153; + dec TotallyNotJson.153; + let TotallyNotJson.1059 : U64 = 120i64; + let TotallyNotJson.1056 : U64 = CallByName Num.21 TotallyNotJson.1058 TotallyNotJson.1059; + let TotallyNotJson.1057 : U64 = 100i64; + let TotallyNotJson.1055 : U64 = CallByName Num.94 TotallyNotJson.1056 TotallyNotJson.1057; + let TotallyNotJson.1052 : List U8 = CallByName List.68 TotallyNotJson.1055; + let TotallyNotJson.1054 : U8 = 34i64; + let TotallyNotJson.1053 : List U8 = Array [TotallyNotJson.1054]; + let TotallyNotJson.1051 : List U8 = CallByName List.8 TotallyNotJson.1052 TotallyNotJson.1053; + let TotallyNotJson.182 : List U8 = CallByName List.8 TotallyNotJson.1051 TotallyNotJson.179; + let TotallyNotJson.1034 : {} = Struct {}; + let TotallyNotJson.1031 : List U8 = CallByName List.18 TotallyNotJson.181 TotallyNotJson.182 TotallyNotJson.1034; + let TotallyNotJson.1033 : U8 = 34i64; + let TotallyNotJson.1032 : List U8 = Array [TotallyNotJson.1033]; + let TotallyNotJson.1030 : List U8 = CallByName List.8 TotallyNotJson.1031 TotallyNotJson.1032; + ret TotallyNotJson.1030; + +procedure TotallyNotJson.27 (TotallyNotJson.186): + switch TotallyNotJson.186: case 34: - let TotallyNotJson.1239 : List U8 = Array [92i64, 34i64]; - ret TotallyNotJson.1239; + let TotallyNotJson.1037 : List U8 = Array [92i64, 34i64]; + ret TotallyNotJson.1037; case 92: - let TotallyNotJson.1240 : List U8 = Array [92i64, 92i64]; - ret TotallyNotJson.1240; + let TotallyNotJson.1038 : List U8 = Array [92i64, 92i64]; + ret TotallyNotJson.1038; case 47: - let TotallyNotJson.1241 : List U8 = Array [92i64, 47i64]; - ret TotallyNotJson.1241; + let TotallyNotJson.1039 : List U8 = Array [92i64, 47i64]; + ret TotallyNotJson.1039; case 8: - let TotallyNotJson.1243 : U8 = 98i64; - let TotallyNotJson.1242 : List U8 = Array [92i64, TotallyNotJson.1243]; - ret TotallyNotJson.1242; + let TotallyNotJson.1041 : U8 = 98i64; + let TotallyNotJson.1040 : List U8 = Array [92i64, TotallyNotJson.1041]; + ret TotallyNotJson.1040; case 12: - let TotallyNotJson.1245 : U8 = 102i64; - let TotallyNotJson.1244 : List U8 = Array [92i64, TotallyNotJson.1245]; - ret TotallyNotJson.1244; + let TotallyNotJson.1043 : U8 = 102i64; + let TotallyNotJson.1042 : List U8 = Array [92i64, TotallyNotJson.1043]; + ret TotallyNotJson.1042; case 10: - let TotallyNotJson.1247 : U8 = 110i64; - let TotallyNotJson.1246 : List U8 = Array [92i64, TotallyNotJson.1247]; - ret TotallyNotJson.1246; + let TotallyNotJson.1045 : U8 = 110i64; + let TotallyNotJson.1044 : List U8 = Array [92i64, TotallyNotJson.1045]; + ret TotallyNotJson.1044; case 13: - let TotallyNotJson.1249 : U8 = 114i64; - let TotallyNotJson.1248 : List U8 = Array [92i64, TotallyNotJson.1249]; - ret TotallyNotJson.1248; + let TotallyNotJson.1047 : U8 = 114i64; + let TotallyNotJson.1046 : List U8 = Array [92i64, TotallyNotJson.1047]; + ret TotallyNotJson.1046; case 9: - let TotallyNotJson.1251 : U8 = 114i64; - let TotallyNotJson.1250 : List U8 = Array [92i64, TotallyNotJson.1251]; - ret TotallyNotJson.1250; + let TotallyNotJson.1049 : U8 = 114i64; + let TotallyNotJson.1048 : List U8 = Array [92i64, TotallyNotJson.1049]; + ret TotallyNotJson.1048; default: - let TotallyNotJson.1252 : List U8 = Array [TotallyNotJson.218]; - ret TotallyNotJson.1252; + let TotallyNotJson.1050 : List U8 = Array [TotallyNotJson.186]; + ret TotallyNotJson.1050; -procedure TotallyNotJson.32 (TotallyNotJson.262, TotallyNotJson.263): - let TotallyNotJson.1174 : {Str, List Str} = Struct {TotallyNotJson.262, TotallyNotJson.263}; - let TotallyNotJson.1173 : {Str, List Str} = CallByName Encode.23 TotallyNotJson.1174; - ret TotallyNotJson.1173; +procedure TotallyNotJson.31 (TotallyNotJson.226, TotallyNotJson.227): + let TotallyNotJson.972 : {Str, List Str} = Struct {TotallyNotJson.226, TotallyNotJson.227}; + let TotallyNotJson.971 : {Str, List Str} = CallByName Encode.23 TotallyNotJson.972; + ret TotallyNotJson.971; procedure TotallyNotJson.8 (): - let TotallyNotJson.1172 : [C , C [], C , C , C , C ] = TagId(2) ; - ret TotallyNotJson.1172; + let TotallyNotJson.970 : {} = Struct {}; + ret TotallyNotJson.970; procedure Test.0 (): let Test.13 : Str = "foo"; let Test.12 : Str = "foo"; let Test.1 : {Str, Str} = Struct {Test.12, Test.13}; - let Test.11 : [C , C [], C , C , C , C ] = CallByName TotallyNotJson.8; + let Test.11 : {} = CallByName TotallyNotJson.8; let Test.10 : List U8 = CallByName Encode.26 Test.1 Test.11; let Test.2 : [C {U64, U8}, C Str] = CallByName Str.9 Test.10; let Test.7 : U8 = 1i64; diff --git a/crates/compiler/test_mono/generated/factorial.txt b/crates/compiler/test_mono/generated/factorial.txt index 717d3587f3d..f7d37b76898 100644 --- a/crates/compiler/test_mono/generated/factorial.txt +++ b/crates/compiler/test_mono/generated/factorial.txt @@ -1,10 +1,10 @@ procedure Num.20 (#Attr.2, #Attr.3): - let Num.292 : I64 = lowlevel NumSub #Attr.2 #Attr.3; - ret Num.292; + let Num.304 : I64 = lowlevel NumSub #Attr.2 #Attr.3; + ret Num.304; procedure Num.21 (#Attr.2, #Attr.3): - let Num.291 : I64 = lowlevel NumMul #Attr.2 #Attr.3; - ret Num.291; + let Num.303 : I64 = lowlevel NumMul #Attr.2 #Attr.3; + ret Num.303; procedure Test.1 (#Derived_gen.0, #Derived_gen.1): joinpoint Test.7 Test.2 Test.3: diff --git a/crates/compiler/test_mono/generated/function_specialization_information_in_lambda_set_thunk.txt b/crates/compiler/test_mono/generated/function_specialization_information_in_lambda_set_thunk.txt index 4d69e95e442..56e8d063010 100644 --- a/crates/compiler/test_mono/generated/function_specialization_information_in_lambda_set_thunk.txt +++ b/crates/compiler/test_mono/generated/function_specialization_information_in_lambda_set_thunk.txt @@ -1,6 +1,6 @@ procedure Num.19 (#Attr.2, #Attr.3): - let Num.291 : I64 = lowlevel NumAdd #Attr.2 #Attr.3; - ret Num.291; + let Num.303 : I64 = lowlevel NumAdd #Attr.2 #Attr.3; + ret Num.303; procedure Test.1 (Test.8): let Test.3 : I64 = 10i64; diff --git a/crates/compiler/test_mono/generated/function_specialization_information_in_lambda_set_thunk_independent_defs.txt b/crates/compiler/test_mono/generated/function_specialization_information_in_lambda_set_thunk_independent_defs.txt index 4dfc909fd47..34f2ebc3cda 100644 --- a/crates/compiler/test_mono/generated/function_specialization_information_in_lambda_set_thunk_independent_defs.txt +++ b/crates/compiler/test_mono/generated/function_specialization_information_in_lambda_set_thunk_independent_defs.txt @@ -1,6 +1,6 @@ procedure Num.19 (#Attr.2, #Attr.3): - let Num.292 : U8 = lowlevel NumAdd #Attr.2 #Attr.3; - ret Num.292; + let Num.304 : U8 = lowlevel NumAdd #Attr.2 #Attr.3; + ret Num.304; procedure Test.1 (Test.9): let Test.4 : U8 = 10i64; diff --git a/crates/compiler/test_mono/generated/inline_return_joinpoints_in_bool_lambda_set.txt b/crates/compiler/test_mono/generated/inline_return_joinpoints_in_bool_lambda_set.txt index 9fede6f07e2..912720bd2ba 100644 --- a/crates/compiler/test_mono/generated/inline_return_joinpoints_in_bool_lambda_set.txt +++ b/crates/compiler/test_mono/generated/inline_return_joinpoints_in_bool_lambda_set.txt @@ -3,8 +3,8 @@ procedure Bool.1 (): ret Bool.23; procedure Num.19 (#Attr.2, #Attr.3): - let Num.291 : I64 = lowlevel NumAdd #Attr.2 #Attr.3; - ret Num.291; + let Num.303 : I64 = lowlevel NumAdd #Attr.2 #Attr.3; + ret Num.303; procedure Test.3 (Test.4): ret Test.4; diff --git a/crates/compiler/test_mono/generated/inline_return_joinpoints_in_enum_lambda_set.txt b/crates/compiler/test_mono/generated/inline_return_joinpoints_in_enum_lambda_set.txt index 481e999acc2..1b38efb1788 100644 --- a/crates/compiler/test_mono/generated/inline_return_joinpoints_in_enum_lambda_set.txt +++ b/crates/compiler/test_mono/generated/inline_return_joinpoints_in_enum_lambda_set.txt @@ -1,6 +1,6 @@ procedure Num.19 (#Attr.2, #Attr.3): - let Num.293 : I64 = lowlevel NumAdd #Attr.2 #Attr.3; - ret Num.293; + let Num.305 : I64 = lowlevel NumAdd #Attr.2 #Attr.3; + ret Num.305; procedure Test.2 (Test.3): switch Test.3: diff --git a/crates/compiler/test_mono/generated/inline_return_joinpoints_in_union_lambda_set.txt b/crates/compiler/test_mono/generated/inline_return_joinpoints_in_union_lambda_set.txt index 631a170f03d..4bf47958133 100644 --- a/crates/compiler/test_mono/generated/inline_return_joinpoints_in_union_lambda_set.txt +++ b/crates/compiler/test_mono/generated/inline_return_joinpoints_in_union_lambda_set.txt @@ -1,6 +1,6 @@ procedure Num.19 (#Attr.2, #Attr.3): - let Num.292 : I64 = lowlevel NumAdd #Attr.2 #Attr.3; - ret Num.292; + let Num.304 : I64 = lowlevel NumAdd #Attr.2 #Attr.3; + ret Num.304; procedure Test.2 (Test.3, Test.1): let Test.18 : Int1 = false; diff --git a/crates/compiler/test_mono/generated/inspect_derived_dict.txt b/crates/compiler/test_mono/generated/inspect_derived_dict.txt index f3f5a2b85ee..df927fbf276 100644 --- a/crates/compiler/test_mono/generated/inspect_derived_dict.txt +++ b/crates/compiler/test_mono/generated/inspect_derived_dict.txt @@ -45,8 +45,8 @@ procedure Dict.1 (Dict.726): procedure Dict.10 (Dict.727, Dict.180, Dict.181): let Dict.179 : List {Str, I64} = StructAtIndex 1 Dict.727; - let #Derived_gen.68 : List {U32, U32} = StructAtIndex 0 Dict.727; - dec #Derived_gen.68; + let #Derived_gen.66 : List {U32, U32} = StructAtIndex 0 Dict.727; + dec #Derived_gen.66; let Dict.1113 : {Str, Int1} = CallByName List.18 Dict.179 Dict.180 Dict.181; ret Dict.1113; @@ -165,8 +165,8 @@ procedure Dict.399 (Dict.400, Dict.848, Dict.402, Dict.398): procedure Dict.4 (Dict.732): let Dict.157 : List {Str, I64} = StructAtIndex 1 Dict.732; - let #Derived_gen.66 : List {U32, U32} = StructAtIndex 0 Dict.732; - dec #Derived_gen.66; + let #Derived_gen.67 : List {U32, U32} = StructAtIndex 0 Dict.732; + dec #Derived_gen.67; let Dict.893 : U64 = CallByName List.6 Dict.157; dec Dict.157; ret Dict.893; @@ -219,8 +219,8 @@ procedure Dict.59 (Dict.722): let Dict.378 : U64 = StructAtIndex 2 Dict.722; let Dict.379 : Float32 = StructAtIndex 3 Dict.722; let Dict.380 : U8 = StructAtIndex 4 Dict.722; - let #Derived_gen.67 : List {U32, U32} = StructAtIndex 0 Dict.722; - dec #Derived_gen.67; + let #Derived_gen.68 : List {U32, U32} = StructAtIndex 0 Dict.722; + dec #Derived_gen.68; let Dict.888 : U64 = CallByName Dict.47; let Dict.844 : Int1 = CallByName Bool.7 Dict.378 Dict.888; if Dict.844 then @@ -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.25, #Derived_gen.26, #Derived_gen.27): 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.25 #Derived_gen.26 #Derived_gen.27; -procedure Dict.67 (#Derived_gen.43, #Derived_gen.44, #Derived_gen.45): +procedure Dict.67 (#Derived_gen.38, #Derived_gen.39, #Derived_gen.40): 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.38 #Derived_gen.39 #Derived_gen.40; 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.41, #Derived_gen.42, #Derived_gen.43, #Derived_gen.44, #Derived_gen.45, #Derived_gen.46): 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.41 #Derived_gen.42 #Derived_gen.43 #Derived_gen.44 #Derived_gen.45 #Derived_gen.46; -procedure Dict.84 (#Derived_gen.59, #Derived_gen.60, #Derived_gen.61, #Derived_gen.62): +procedure Dict.84 (#Derived_gen.32, #Derived_gen.33, #Derived_gen.34, #Derived_gen.35): 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.32 #Derived_gen.33 #Derived_gen.34 #Derived_gen.35; procedure Dict.85 (): let Dict.921 : U64 = 11562461410679940143i64; @@ -634,7 +634,7 @@ procedure Dict.89 (Dict.507, Dict.508): procedure Dict.90 (Dict.511, Dict.512): let Dict.913 : U128 = CallByName Num.135 Dict.511; let Dict.914 : U128 = CallByName Num.135 Dict.512; - let Dict.513 : U128 = CallByName Num.21 Dict.913 Dict.914; + let Dict.513 : U128 = CallByName Num.78 Dict.913 Dict.914; let Dict.514 : U64 = CallByName Num.133 Dict.513; let Dict.912 : U8 = 64i64; let Dict.911 : U128 = CallByName Num.74 Dict.513 Dict.912; @@ -890,315 +890,315 @@ 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.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.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; +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.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.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.585 : U64 = lowlevel ListLen #Attr.2; - ret List.585; + let List.587 : U64 = lowlevel ListLen #Attr.2; + ret List.587; procedure List.6 (#Attr.2): - let List.632 : U64 = lowlevel ListLen #Attr.2; - ret List.632; + let List.634 : U64 = lowlevel ListLen #Attr.2; + ret List.634; procedure List.6 (#Attr.2): - let List.644 : U64 = lowlevel ListLen #Attr.2; - ret List.644; - -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; + 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; + +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.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; + let List.600 : {List {Str, I64}, {Str, I64}} = Struct {List.111, List.113}; ret List.600; - else - let List.598 : {List {Str, I64}, {Str, I64}} = Struct {List.110, List.112}; - ret List.598; 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; - ret List.607; + let List.609 : List {Str, I64} = lowlevel ListReserve #Attr.2 #Attr.3; + ret List.609; procedure List.71 (#Attr.2, #Attr.3): - let List.605 : List {Str, I64} = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.605; + let List.607 : List {Str, I64} = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; + ret List.607; 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.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; - else - ret List.139; - in - jump List.620 #Derived_gen.46 #Derived_gen.47 #Derived_gen.48; - -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; + let List.628 : List {U32, U32} = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; + ret List.628; + +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.88 (#Derived_gen.54, #Derived_gen.55, #Derived_gen.56): + 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 - dec List.159; - ret List.160; + ret List.140; in - jump List.572 #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; + jump List.622 #Derived_gen.54 #Derived_gen.55 #Derived_gen.56; + +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 : {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.16 #Derived_gen.17 #Derived_gen.18 #Derived_gen.19 #Derived_gen.20; 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; + 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.168; - ret List.169; + dec List.161; + ret List.162; in - jump List.611 #Derived_gen.49 #Derived_gen.50 #Derived_gen.51 #Derived_gen.52 #Derived_gen.53; + jump List.638 #Derived_gen.49 #Derived_gen.50 #Derived_gen.51 #Derived_gen.52 #Derived_gen.53; + +procedure List.91 (#Derived_gen.57, #Derived_gen.58, #Derived_gen.59, #Derived_gen.60, #Derived_gen.61): + 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.170; + ret List.171; + in + jump List.613 #Derived_gen.57 #Derived_gen.58 #Derived_gen.59 #Derived_gen.60 #Derived_gen.61; procedure Num.131 (#Attr.2): - let Num.310 : U32 = lowlevel NumIntCast #Attr.2; - ret Num.310; + let Num.322 : U32 = lowlevel NumIntCast #Attr.2; + ret Num.322; procedure Num.133 (#Attr.2): - let Num.365 : U64 = lowlevel NumIntCast #Attr.2; - ret Num.365; + let Num.377 : U64 = lowlevel NumIntCast #Attr.2; + ret Num.377; procedure Num.133 (#Attr.2): - let Num.366 : U64 = lowlevel NumIntCast #Attr.2; - ret Num.366; + let Num.378 : U64 = lowlevel NumIntCast #Attr.2; + ret Num.378; procedure Num.133 (#Attr.2): - let Num.381 : U64 = lowlevel NumIntCast #Attr.2; - ret Num.381; + let Num.393 : U64 = lowlevel NumIntCast #Attr.2; + ret Num.393; procedure Num.135 (#Attr.2): - let Num.387 : U128 = lowlevel NumIntCast #Attr.2; - ret Num.387; + let Num.399 : U128 = lowlevel NumIntCast #Attr.2; + ret Num.399; procedure Num.137 (#Attr.2): - let Num.301 : U64 = lowlevel NumIntCast #Attr.2; - ret Num.301; + let Num.313 : U64 = lowlevel NumIntCast #Attr.2; + ret Num.313; procedure Num.137 (#Attr.2): - let Num.307 : U64 = lowlevel NumIntCast #Attr.2; - ret Num.307; + let Num.319 : U64 = lowlevel NumIntCast #Attr.2; + ret Num.319; procedure Num.139 (#Attr.2): - let Num.334 : Float32 = lowlevel NumToFloatCast #Attr.2; - ret Num.334; + let Num.346 : Float32 = lowlevel NumToFloatCast #Attr.2; + ret Num.346; -procedure Num.159 (Num.240, Num.241): - let Num.336 : Int1 = CallByName Num.22 Num.240 Num.241; - if Num.336 then - ret Num.240; +procedure Num.159 (Num.247, Num.248): + let Num.348 : Int1 = CallByName Num.22 Num.247 Num.248; + if Num.348 then + ret Num.247; else - ret Num.241; + ret Num.248; procedure Num.19 (#Attr.2, #Attr.3): - let Num.291 : U32 = lowlevel NumAdd #Attr.2 #Attr.3; - ret Num.291; + let Num.303 : U32 = lowlevel NumAdd #Attr.2 #Attr.3; + ret Num.303; procedure Num.20 (#Attr.2, #Attr.3): - let Num.311 : U64 = lowlevel NumSub #Attr.2 #Attr.3; - ret Num.311; + let Num.323 : U64 = lowlevel NumSub #Attr.2 #Attr.3; + ret Num.323; procedure Num.20 (#Attr.2, #Attr.3): - let Num.314 : U8 = lowlevel NumSub #Attr.2 #Attr.3; - ret Num.314; - -procedure Num.21 (#Attr.2, #Attr.3): - let Num.327 : Float32 = lowlevel NumMul #Attr.2 #Attr.3; - ret Num.327; + let Num.326 : U8 = lowlevel NumSub #Attr.2 #Attr.3; + ret Num.326; procedure Num.21 (#Attr.2, #Attr.3): - let Num.385 : U128 = lowlevel NumMul #Attr.2 #Attr.3; - ret Num.385; + let Num.345 : Float32 = lowlevel NumMul #Attr.2 #Attr.3; + ret Num.345; procedure Num.22 (#Attr.2, #Attr.3): - let Num.331 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; - ret Num.331; + let Num.342 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; + ret Num.342; procedure Num.22 (#Attr.2, #Attr.3): - let Num.460 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; - ret Num.460; + let Num.472 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; + ret Num.472; procedure Num.23 (#Attr.2, #Attr.3): - let Num.453 : Int1 = lowlevel NumLte #Attr.2 #Attr.3; - ret Num.453; + let Num.465 : Int1 = lowlevel NumLte #Attr.2 #Attr.3; + ret Num.465; procedure Num.24 (#Attr.2, #Attr.3): - let Num.315 : Int1 = lowlevel NumGt #Attr.2 #Attr.3; - ret Num.315; + let Num.327 : Int1 = lowlevel NumGt #Attr.2 #Attr.3; + ret Num.327; procedure Num.24 (#Attr.2, #Attr.3): - let Num.456 : Int1 = lowlevel NumGt #Attr.2 #Attr.3; - ret Num.456; + let Num.468 : Int1 = lowlevel NumGt #Attr.2 #Attr.3; + ret Num.468; procedure Num.25 (#Attr.2, #Attr.3): - let Num.457 : Int1 = lowlevel NumGte #Attr.2 #Attr.3; - ret Num.457; + let Num.469 : Int1 = lowlevel NumGte #Attr.2 #Attr.3; + ret Num.469; procedure Num.50 (#Attr.2): - let Num.333 : U64 = lowlevel NumFloor #Attr.2; - ret Num.333; + let Num.344 : U64 = lowlevel NumFloor #Attr.2; + ret Num.344; procedure Num.51 (#Attr.2, #Attr.3): - let Num.459 : U64 = lowlevel NumAddWrap #Attr.2 #Attr.3; - ret Num.459; + let Num.471 : U64 = lowlevel NumAddWrap #Attr.2 #Attr.3; + ret Num.471; procedure Num.69 (#Attr.2, #Attr.3): - let Num.319 : U32 = lowlevel NumBitwiseAnd #Attr.2 #Attr.3; - ret Num.319; + let Num.331 : U32 = lowlevel NumBitwiseAnd #Attr.2 #Attr.3; + ret Num.331; procedure Num.70 (#Attr.2, #Attr.3): - let Num.363 : U64 = lowlevel NumBitwiseXor #Attr.2 #Attr.3; - ret Num.363; + let Num.375 : U64 = lowlevel NumBitwiseXor #Attr.2 #Attr.3; + ret Num.375; procedure Num.71 (#Attr.2, #Attr.3): - let Num.318 : U32 = lowlevel NumBitwiseOr #Attr.2 #Attr.3; - ret Num.318; + let Num.330 : U32 = lowlevel NumBitwiseOr #Attr.2 #Attr.3; + ret Num.330; procedure Num.71 (#Attr.2, #Attr.3): - let Num.401 : U64 = lowlevel NumBitwiseOr #Attr.2 #Attr.3; - ret Num.401; + let Num.413 : U64 = lowlevel NumBitwiseOr #Attr.2 #Attr.3; + ret Num.413; procedure Num.72 (#Attr.2, #Attr.3): - let Num.292 : U32 = lowlevel NumShiftLeftBy #Attr.2 #Attr.3; - ret Num.292; + let Num.304 : U32 = lowlevel NumShiftLeftBy #Attr.2 #Attr.3; + ret Num.304; procedure Num.72 (#Attr.2, #Attr.3): - let Num.416 : U64 = lowlevel NumShiftLeftBy #Attr.2 #Attr.3; - ret Num.416; + let Num.428 : U64 = lowlevel NumShiftLeftBy #Attr.2 #Attr.3; + ret Num.428; procedure Num.74 (#Attr.2, #Attr.3): - let Num.382 : U128 = lowlevel NumShiftRightZfBy #Attr.2 #Attr.3; - ret Num.382; + let Num.394 : U128 = lowlevel NumShiftRightZfBy #Attr.2 #Attr.3; + ret Num.394; procedure Num.74 (#Attr.2, #Attr.3): - let Num.384 : U64 = lowlevel NumShiftRightZfBy #Attr.2 #Attr.3; - ret Num.384; + let Num.396 : U64 = lowlevel NumShiftRightZfBy #Attr.2 #Attr.3; + ret Num.396; procedure Num.75 (#Attr.2, #Attr.3): - let Num.320 : U32 = lowlevel NumSubWrap #Attr.2 #Attr.3; - ret Num.320; + let Num.332 : U32 = lowlevel NumSubWrap #Attr.2 #Attr.3; + ret Num.332; procedure Num.75 (#Attr.2, #Attr.3): - let Num.450 : U64 = lowlevel NumSubWrap #Attr.2 #Attr.3; - ret Num.450; + let Num.462 : U64 = lowlevel NumSubWrap #Attr.2 #Attr.3; + ret Num.462; + +procedure Num.78 (#Attr.2, #Attr.3): + let Num.397 : U128 = lowlevel NumMulWrap #Attr.2 #Attr.3; + ret Num.397; procedure Num.96 (#Attr.2): - let Num.330 : Str = lowlevel NumToStr #Attr.2; - ret Num.330; + let Num.341 : Str = lowlevel NumToStr #Attr.2; + ret Num.341; procedure Num.96 (#Attr.2): - let Num.458 : Str = lowlevel NumToStr #Attr.2; - ret Num.458; + let Num.470 : Str = lowlevel NumToStr #Attr.2; + ret Num.470; procedure Str.12 (#Attr.2): - let Str.294 : List U8 = lowlevel StrToUtf8 #Attr.2; - ret Str.294; + let Str.253 : List U8 = lowlevel StrToUtf8 #Attr.2; + ret Str.253; procedure Str.3 (#Attr.2, #Attr.3): - let Str.295 : Str = lowlevel StrConcat #Attr.2 #Attr.3; - ret Str.295; + let Str.254 : Str = lowlevel StrConcat #Attr.2 #Attr.3; + ret Str.254; procedure Test.0 (): let Test.8 : Str = "a"; diff --git a/crates/compiler/test_mono/generated/inspect_derived_list.txt b/crates/compiler/test_mono/generated/inspect_derived_list.txt index dbe4e118691..3f74e10e2d7 100644 --- a/crates/compiler/test_mono/generated/inspect_derived_list.txt +++ b/crates/compiler/test_mono/generated/inspect_derived_list.txt @@ -125,50 +125,50 @@ 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; - -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; + let List.581 : I64 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.581; + +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; - ret Num.293; + let Num.305 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; + ret Num.305; procedure Num.51 (#Attr.2, #Attr.3): - let Num.292 : U64 = lowlevel NumAddWrap #Attr.2 #Attr.3; - ret Num.292; + let Num.304 : U64 = lowlevel NumAddWrap #Attr.2 #Attr.3; + ret Num.304; procedure Num.96 (#Attr.2): - let Num.291 : Str = lowlevel NumToStr #Attr.2; - ret Num.291; + let Num.303 : Str = lowlevel NumToStr #Attr.2; + ret Num.303; procedure Str.3 (#Attr.2, #Attr.3): - let Str.292 : Str = lowlevel StrConcat #Attr.2 #Attr.3; - ret Str.292; + let Str.251 : Str = lowlevel StrConcat #Attr.2 #Attr.3; + ret Str.251; procedure Test.0 (): let Test.2 : List I64 = Array [1i64, 2i64, 3i64]; 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 376a483e4dd..79e32fad8ec 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,77 +200,77 @@ 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.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; - ret List.581; +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.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.580 : U64 = lowlevel ListLen #Attr.2; - ret List.580; + let List.582 : U64 = lowlevel ListLen #Attr.2; + ret List.582; procedure List.6 (#Attr.2): - let List.592 : U64 = lowlevel ListLen #Attr.2; - ret List.592; + let List.594 : U64 = lowlevel ListLen #Attr.2; + ret List.594; 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.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; + let List.593 : {Str, Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.593; + +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; - -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; + jump List.586 #Derived_gen.32 #Derived_gen.33 #Derived_gen.34 #Derived_gen.35 #Derived_gen.36; + +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; - ret Num.294; + let Num.306 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; + ret Num.306; procedure Num.51 (#Attr.2, #Attr.3): - let Num.293 : U64 = lowlevel NumAddWrap #Attr.2 #Attr.3; - ret Num.293; + let Num.305 : U64 = lowlevel NumAddWrap #Attr.2 #Attr.3; + ret Num.305; procedure Str.3 (#Attr.2, #Attr.3): - let Str.293 : Str = lowlevel StrConcat #Attr.2 #Attr.3; - ret Str.293; + let Str.252 : Str = lowlevel StrConcat #Attr.2 #Attr.3; + ret Str.252; procedure Test.0 (): let Test.4 : Str = "bar"; diff --git a/crates/compiler/test_mono/generated/inspect_derived_record.txt b/crates/compiler/test_mono/generated/inspect_derived_record.txt index 4159f3f3dae..7db6433b67e 100644 --- a/crates/compiler/test_mono/generated/inspect_derived_record.txt +++ b/crates/compiler/test_mono/generated/inspect_derived_record.txt @@ -150,55 +150,55 @@ 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; - -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; + let List.581 : {[C I64, C Decimal], Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.581; + +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; - ret Num.294; + let Num.306 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; + ret Num.306; procedure Num.51 (#Attr.2, #Attr.3): - let Num.293 : U64 = lowlevel NumAddWrap #Attr.2 #Attr.3; - ret Num.293; + let Num.305 : U64 = lowlevel NumAddWrap #Attr.2 #Attr.3; + ret Num.305; procedure Num.96 (#Attr.2): - let Num.291 : Str = lowlevel NumToStr #Attr.2; - ret Num.291; + let Num.303 : Str = lowlevel NumToStr #Attr.2; + ret Num.303; procedure Num.96 (#Attr.2): - let Num.292 : Str = lowlevel NumToStr #Attr.2; - ret Num.292; + let Num.304 : Str = lowlevel NumToStr #Attr.2; + ret Num.304; procedure Str.3 (#Attr.2, #Attr.3): - let Str.292 : Str = lowlevel StrConcat #Attr.2 #Attr.3; - ret Str.292; + let Str.251 : Str = lowlevel StrConcat #Attr.2 #Attr.3; + ret Str.251; procedure Test.0 (): let Test.3 : Decimal = 3dec; 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 789513140df..ef1cc903f99 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,47 +127,47 @@ 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; - -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; + let List.581 : {Str, Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.581; + +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; - ret Num.292; + let Num.304 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; + ret Num.304; procedure Num.51 (#Attr.2, #Attr.3): - let Num.291 : U64 = lowlevel NumAddWrap #Attr.2 #Attr.3; - ret Num.291; + let Num.303 : U64 = lowlevel NumAddWrap #Attr.2 #Attr.3; + ret Num.303; procedure Str.3 (#Attr.2, #Attr.3): - let Str.292 : Str = lowlevel StrConcat #Attr.2 #Attr.3; - ret Str.292; + let Str.251 : Str = lowlevel StrConcat #Attr.2 #Attr.3; + ret Str.251; procedure Test.0 (): let Test.3 : Str = "foo"; 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 f368c1ab168..f5eddefca6f 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,47 +134,47 @@ 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; - -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; + let List.581 : {Str, Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.581; + +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; - ret Num.292; + let Num.304 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; + ret Num.304; procedure Num.51 (#Attr.2, #Attr.3): - let Num.291 : U64 = lowlevel NumAddWrap #Attr.2 #Attr.3; - ret Num.291; + let Num.303 : U64 = lowlevel NumAddWrap #Attr.2 #Attr.3; + ret Num.303; procedure Str.3 (#Attr.2, #Attr.3): - let Str.292 : Str = lowlevel StrConcat #Attr.2 #Attr.3; - ret Str.292; + let Str.251 : Str = lowlevel StrConcat #Attr.2 #Attr.3; + ret Str.251; procedure Test.0 (): let Test.3 : Str = "foo"; diff --git a/crates/compiler/test_mono/generated/inspect_derived_string.txt b/crates/compiler/test_mono/generated/inspect_derived_string.txt index af0f8f01dca..f3c3f850a4b 100644 --- a/crates/compiler/test_mono/generated/inspect_derived_string.txt +++ b/crates/compiler/test_mono/generated/inspect_derived_string.txt @@ -38,8 +38,8 @@ procedure Inspect.62 (Inspect.306): ret Inspect.306; procedure Str.3 (#Attr.2, #Attr.3): - let Str.292 : Str = lowlevel StrConcat #Attr.2 #Attr.3; - ret Str.292; + let Str.251 : Str = lowlevel StrConcat #Attr.2 #Attr.3; + ret Str.251; procedure Test.0 (): let Test.2 : Str = "abc"; 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 71e668f88d2..a41d0d006d9 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,54 +122,54 @@ 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.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.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.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; - -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; + let List.581 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.581; + +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; - ret Num.292; + let Num.304 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; + ret Num.304; procedure Num.51 (#Attr.2, #Attr.3): - let Num.291 : U64 = lowlevel NumAddWrap #Attr.2 #Attr.3; - ret Num.291; + let Num.303 : U64 = lowlevel NumAddWrap #Attr.2 #Attr.3; + ret Num.303; procedure Str.3 (#Attr.2, #Attr.3): - let Str.292 : Str = lowlevel StrConcat #Attr.2 #Attr.3; - ret Str.292; + let Str.251 : Str = lowlevel StrConcat #Attr.2 #Attr.3; + ret Str.251; procedure Test.0 (): let Test.4 : Str = "foo"; 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 6fe588ef1a9..c404093b81a 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,54 +125,54 @@ 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.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.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.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; - -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; + let List.581 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.581; + +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; - ret Num.292; + let Num.304 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; + ret Num.304; procedure Num.51 (#Attr.2, #Attr.3): - let Num.291 : U64 = lowlevel NumAddWrap #Attr.2 #Attr.3; - ret Num.291; + let Num.303 : U64 = lowlevel NumAddWrap #Attr.2 #Attr.3; + ret Num.303; procedure Str.3 (#Attr.2, #Attr.3): - let Str.292 : Str = lowlevel StrConcat #Attr.2 #Attr.3; - ret Str.292; + let Str.251 : Str = lowlevel StrConcat #Attr.2 #Attr.3; + ret Str.251; procedure Test.0 (): let Test.5 : Str = "foo"; diff --git a/crates/compiler/test_mono/generated/ir_int_add.txt b/crates/compiler/test_mono/generated/ir_int_add.txt index d60f7829b8e..2aed041f776 100644 --- a/crates/compiler/test_mono/generated/ir_int_add.txt +++ b/crates/compiler/test_mono/generated/ir_int_add.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 Num.19 (#Attr.2, #Attr.3): - let Num.293 : U64 = lowlevel NumAdd #Attr.2 #Attr.3; - ret Num.293; + let Num.305 : U64 = lowlevel NumAdd #Attr.2 #Attr.3; + ret Num.305; procedure Test.0 (): let Test.1 : List I64 = Array [1i64, 2i64]; diff --git a/crates/compiler/test_mono/generated/ir_plus.txt b/crates/compiler/test_mono/generated/ir_plus.txt index da8a6a3bca6..0c0c4058e4f 100644 --- a/crates/compiler/test_mono/generated/ir_plus.txt +++ b/crates/compiler/test_mono/generated/ir_plus.txt @@ -1,6 +1,6 @@ procedure Num.19 (#Attr.2, #Attr.3): - let Num.291 : I64 = lowlevel NumAdd #Attr.2 #Attr.3; - ret Num.291; + let Num.303 : I64 = lowlevel NumAdd #Attr.2 #Attr.3; + ret Num.303; procedure Test.0 (): let Test.2 : I64 = 1i64; diff --git a/crates/compiler/test_mono/generated/ir_round.txt b/crates/compiler/test_mono/generated/ir_round.txt index 151fdbdf756..a92e4eb8237 100644 --- a/crates/compiler/test_mono/generated/ir_round.txt +++ b/crates/compiler/test_mono/generated/ir_round.txt @@ -1,6 +1,6 @@ procedure Num.45 (#Attr.2): - let Num.291 : I64 = lowlevel NumRound #Attr.2; - ret Num.291; + let Num.303 : I64 = lowlevel NumRound #Attr.2; + ret Num.303; procedure Test.0 (): let Test.2 : Decimal = 3.6dec; diff --git a/crates/compiler/test_mono/generated/ir_two_defs.txt b/crates/compiler/test_mono/generated/ir_two_defs.txt index 595f5a71718..00f3a118f8a 100644 --- a/crates/compiler/test_mono/generated/ir_two_defs.txt +++ b/crates/compiler/test_mono/generated/ir_two_defs.txt @@ -1,6 +1,6 @@ procedure Num.19 (#Attr.2, #Attr.3): - let Num.291 : I64 = lowlevel NumAdd #Attr.2 #Attr.3; - ret Num.291; + let Num.303 : I64 = lowlevel NumAdd #Attr.2 #Attr.3; + ret Num.303; procedure Test.0 (): let Test.1 : I64 = 3i64; diff --git a/crates/compiler/test_mono/generated/ir_when_idiv.txt b/crates/compiler/test_mono/generated/ir_when_idiv.txt index d37bd533f43..2ab91d0187a 100644 --- a/crates/compiler/test_mono/generated/ir_when_idiv.txt +++ b/crates/compiler/test_mono/generated/ir_when_idiv.txt @@ -1,22 +1,22 @@ -procedure Num.30 (#Attr.2): - let Num.298 : I64 = 0i64; - let Num.297 : Int1 = lowlevel Eq #Attr.2 Num.298; - ret Num.297; +procedure Num.166 (#Attr.2, #Attr.3): + let Num.305 : I64 = lowlevel NumDivTruncUnchecked #Attr.2 #Attr.3; + ret Num.305; -procedure Num.39 (#Attr.2, #Attr.3): - let Num.293 : I64 = lowlevel NumDivTruncUnchecked #Attr.2 #Attr.3; - ret Num.293; +procedure Num.30 (#Attr.2): + let Num.310 : I64 = 0i64; + let Num.309 : Int1 = lowlevel Eq #Attr.2 Num.310; + ret Num.309; -procedure Num.40 (Num.262, Num.263): - let Num.294 : Int1 = CallByName Num.30 Num.263; - if Num.294 then - let Num.296 : {} = Struct {}; - let Num.295 : [C {}, C I64] = TagId(0) Num.296; - ret Num.295; +procedure Num.40 (Num.271, Num.272): + let Num.306 : Int1 = CallByName Num.30 Num.272; + if Num.306 then + let Num.308 : {} = Struct {}; + let Num.307 : [C {}, C I64] = TagId(0) Num.308; + ret Num.307; else - let Num.292 : I64 = CallByName Num.39 Num.262 Num.263; - let Num.291 : [C {}, C I64] = TagId(1) Num.292; - ret Num.291; + let Num.304 : I64 = CallByName Num.166 Num.271 Num.272; + let Num.303 : [C {}, C I64] = TagId(1) Num.304; + ret Num.303; procedure Test.0 (): let Test.8 : I64 = 1000i64; diff --git a/crates/compiler/test_mono/generated/ir_when_just.txt b/crates/compiler/test_mono/generated/ir_when_just.txt index 483c35e910f..8f2422191c8 100644 --- a/crates/compiler/test_mono/generated/ir_when_just.txt +++ b/crates/compiler/test_mono/generated/ir_when_just.txt @@ -1,6 +1,6 @@ procedure Num.19 (#Attr.2, #Attr.3): - let Num.291 : I64 = lowlevel NumAdd #Attr.2 #Attr.3; - ret Num.291; + let Num.303 : I64 = lowlevel NumAdd #Attr.2 #Attr.3; + ret Num.303; procedure Test.0 (): let Test.10 : I64 = 41i64; 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 b332177e711..324f9147207 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,69 +6,69 @@ 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; - ret Num.291; + let Num.303 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; + ret Num.303; -procedure Str.27 (Str.100): - let Str.292 : [C Int1, C I64] = CallByName Str.73 Str.100; - ret Str.292; +procedure Str.27 (Str.88): + let Str.251 : [C Int1, C I64] = CallByName Str.61 Str.88; + ret Str.251; -procedure Str.47 (#Attr.2): - let Str.300 : {I64, U8} = lowlevel StrToNum #Attr.2; - ret Str.300; +procedure Str.42 (#Attr.2): + let Str.259 : {I64, U8} = lowlevel StrToNum #Attr.2; + ret Str.259; -procedure Str.73 (Str.236): - let Str.237 : {I64, U8} = CallByName Str.47 Str.236; - dec Str.236; - let Str.298 : U8 = StructAtIndex 1 Str.237; - let Str.299 : U8 = 0i64; - let Str.295 : Int1 = CallByName Bool.11 Str.298 Str.299; - if Str.295 then - let Str.297 : I64 = StructAtIndex 0 Str.237; - let Str.296 : [C Int1, C I64] = TagId(1) Str.297; - ret Str.296; +procedure Str.61 (Str.195): + let Str.196 : {I64, U8} = CallByName Str.42 Str.195; + dec Str.195; + let Str.257 : U8 = StructAtIndex 1 Str.196; + let Str.258 : U8 = 0i64; + let Str.254 : Int1 = CallByName Bool.11 Str.257 Str.258; + if Str.254 then + let Str.256 : I64 = StructAtIndex 0 Str.196; + let Str.255 : [C Int1, C I64] = TagId(1) Str.256; + ret Str.255; else - let Str.294 : Int1 = false; - let Str.293 : [C Int1, C I64] = TagId(0) Str.294; - ret Str.293; + let Str.253 : Int1 = false; + let Str.252 : [C Int1, C I64] = TagId(0) Str.253; + ret Str.252; procedure Test.0 (): let Test.3 : Int1 = CallByName Bool.2; diff --git a/crates/compiler/test_mono/generated/issue_4749.txt b/crates/compiler/test_mono/generated/issue_4749.txt index 8735610956d..2a5b1dbaee8 100644 --- a/crates/compiler/test_mono/generated/issue_4749.txt +++ b/crates/compiler/test_mono/generated/issue_4749.txt @@ -30,11 +30,11 @@ procedure Decode.24 (Decode.101): ret Decode.101; procedure Decode.25 (Decode.102, Decode.121, Decode.104): - let Decode.134 : {List U8, [C {}, C Str]} = CallByName TotallyNotJson.525 Decode.102 Decode.104; + let Decode.134 : {List U8, [C {}, C Str]} = CallByName TotallyNotJson.488 Decode.102 Decode.104; ret Decode.134; procedure Decode.26 (Decode.105, Decode.106): - let Decode.133 : {} = CallByName TotallyNotJson.60; + let Decode.133 : {} = CallByName TotallyNotJson.59; let Decode.132 : {List U8, [C {}, C Str]} = CallByName Decode.25 Decode.105 Decode.133 Decode.106; ret Decode.132; @@ -64,185 +64,185 @@ 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.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.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.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.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.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; - -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; + dec List.106; + let List.612 : {} = Struct {}; + let List.611 : [C {}, C U8] = TagId(0) List.612; + ret List.611; + +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; - -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.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.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.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; + 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.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.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.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.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.61 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; - ret Num.294; + let Num.306 : U8 = lowlevel NumAdd #Attr.2 #Attr.3; + ret Num.306; procedure Num.19 (#Attr.2, #Attr.3): - let Num.303 : U64 = lowlevel NumAdd #Attr.2 #Attr.3; - ret Num.303; + let Num.315 : U64 = lowlevel NumAdd #Attr.2 #Attr.3; + ret Num.315; procedure Num.20 (#Attr.2, #Attr.3): - let Num.306 : U8 = lowlevel NumSub #Attr.2 #Attr.3; - ret Num.306; + let Num.318 : U8 = lowlevel NumSub #Attr.2 #Attr.3; + ret Num.318; procedure Num.22 (#Attr.2, #Attr.3): - let Num.328 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; - ret Num.328; + let Num.340 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; + ret Num.340; procedure Num.23 (#Attr.2, #Attr.3): - let Num.312 : Int1 = lowlevel NumLte #Attr.2 #Attr.3; - ret Num.312; + let Num.324 : Int1 = lowlevel NumLte #Attr.2 #Attr.3; + ret Num.324; procedure Num.25 (#Attr.2, #Attr.3): - let Num.318 : Int1 = lowlevel NumGte #Attr.2 #Attr.3; - ret Num.318; + let Num.330 : Int1 = lowlevel NumGte #Attr.2 #Attr.3; + ret Num.330; procedure Num.51 (#Attr.2, #Attr.3): - let Num.329 : U64 = lowlevel NumAddWrap #Attr.2 #Attr.3; - ret Num.329; + let Num.341 : U64 = lowlevel NumAddWrap #Attr.2 #Attr.3; + ret Num.341; procedure Num.71 (#Attr.2, #Attr.3): - let Num.291 : U8 = lowlevel NumBitwiseOr #Attr.2 #Attr.3; - ret Num.291; + let Num.303 : U8 = lowlevel NumBitwiseOr #Attr.2 #Attr.3; + ret Num.303; procedure Num.72 (#Attr.2, #Attr.3): - let Num.292 : U8 = lowlevel NumShiftLeftBy #Attr.2 #Attr.3; - ret Num.292; + let Num.304 : U8 = lowlevel NumShiftLeftBy #Attr.2 #Attr.3; + ret Num.304; procedure Num.77 (#Attr.2, #Attr.3): - let Num.325 : U64 = lowlevel NumSubSaturated #Attr.2 #Attr.3; - ret Num.325; - -procedure Str.48 (#Attr.2, #Attr.3, #Attr.4): - let Str.301 : {U64, Str, Int1, U8} = lowlevel StrFromUtf8Range #Attr.2 #Attr.3 #Attr.4; - ret Str.301; - -procedure Str.9 (Str.80): - let Str.299 : U64 = 0i64; - let Str.300 : U64 = CallByName List.6 Str.80; - let Str.81 : {U64, Str, Int1, U8} = CallByName Str.48 Str.80 Str.299 Str.300; - let Str.296 : Int1 = StructAtIndex 2 Str.81; - if Str.296 then - let Str.298 : Str = StructAtIndex 1 Str.81; - let Str.297 : [C {U64, U8}, C Str] = TagId(1) Str.298; - ret Str.297; + let Num.337 : U64 = lowlevel NumSubSaturated #Attr.2 #Attr.3; + ret Num.337; + +procedure Str.43 (#Attr.2, #Attr.3, #Attr.4): + let Str.260 : {U64, Str, Int1, U8} = lowlevel StrFromUtf8Range #Attr.2 #Attr.3 #Attr.4; + ret Str.260; + +procedure Str.9 (Str.68): + let Str.258 : U64 = 0i64; + let Str.259 : U64 = CallByName List.6 Str.68; + let Str.69 : {U64, Str, Int1, U8} = CallByName Str.43 Str.68 Str.258 Str.259; + let Str.255 : Int1 = StructAtIndex 2 Str.69; + if Str.255 then + let Str.257 : Str = StructAtIndex 1 Str.69; + let Str.256 : [C {U64, U8}, C Str] = TagId(1) Str.257; + ret Str.256; else - let Str.294 : U8 = StructAtIndex 3 Str.81; - let Str.295 : U64 = StructAtIndex 0 Str.81; - let #Derived_gen.7 : Str = StructAtIndex 1 Str.81; - dec #Derived_gen.7; - let Str.293 : {U64, U8} = Struct {Str.295, Str.294}; - let Str.292 : [C {U64, U8}, C Str] = TagId(0) Str.293; - ret Str.292; + let Str.253 : U8 = StructAtIndex 3 Str.69; + let Str.254 : U64 = StructAtIndex 0 Str.69; + let #Derived_gen.6 : Str = StructAtIndex 1 Str.69; + dec #Derived_gen.6; + let Str.252 : {U64, U8} = Struct {Str.254, Str.253}; + let Str.251 : [C {U64, U8}, C Str] = TagId(0) Str.252; + ret Str.251; procedure Test.3 (): let Test.0 : List U8 = Array [82i64, 111i64, 99i64]; - let Test.8 : [C , C [], C , C , C , C ] = CallByName TotallyNotJson.8; + let Test.8 : {} = CallByName TotallyNotJson.8; inc Test.0; let Test.1 : [C [C List U8, C ], C Str] = CallByName Decode.27 Test.0 Test.8; let Test.7 : Str = "Roc"; @@ -255,571 +255,571 @@ procedure Test.3 (): let Test.4 : {} = Struct {}; ret Test.4; -procedure TotallyNotJson.525 (TotallyNotJson.526, TotallyNotJson.1175): - joinpoint TotallyNotJson.1459: - inc TotallyNotJson.526; - let TotallyNotJson.1328 : {List U8, List U8} = CallByName TotallyNotJson.61 TotallyNotJson.526; - let TotallyNotJson.530 : List U8 = StructAtIndex 0 TotallyNotJson.1328; - let TotallyNotJson.529 : List U8 = StructAtIndex 1 TotallyNotJson.1328; - inc TotallyNotJson.529; - let TotallyNotJson.1324 : Int1 = CallByName List.1 TotallyNotJson.529; - if TotallyNotJson.1324 then - dec TotallyNotJson.530; - dec TotallyNotJson.529; - let TotallyNotJson.1327 : {} = Struct {}; - let TotallyNotJson.1326 : [C {}, C Str] = TagId(0) TotallyNotJson.1327; - let TotallyNotJson.1325 : {List U8, [C {}, C Str]} = Struct {TotallyNotJson.526, TotallyNotJson.1326}; - ret TotallyNotJson.1325; +procedure TotallyNotJson.488 (TotallyNotJson.489, TotallyNotJson.973): + joinpoint TotallyNotJson.1257: + inc TotallyNotJson.489; + let TotallyNotJson.1126 : {List U8, List U8} = CallByName TotallyNotJson.60 TotallyNotJson.489; + let TotallyNotJson.493 : List U8 = StructAtIndex 0 TotallyNotJson.1126; + let TotallyNotJson.492 : List U8 = StructAtIndex 1 TotallyNotJson.1126; + inc TotallyNotJson.492; + let TotallyNotJson.1122 : Int1 = CallByName List.1 TotallyNotJson.492; + if TotallyNotJson.1122 then + dec TotallyNotJson.492; + dec TotallyNotJson.493; + let TotallyNotJson.1125 : {} = Struct {}; + let TotallyNotJson.1124 : [C {}, C Str] = TagId(0) TotallyNotJson.1125; + let TotallyNotJson.1123 : {List U8, [C {}, C Str]} = Struct {TotallyNotJson.489, TotallyNotJson.1124}; + ret TotallyNotJson.1123; else - let TotallyNotJson.1322 : U64 = CallByName List.6 TotallyNotJson.529; - let TotallyNotJson.1323 : U64 = 2i64; - let TotallyNotJson.1320 : U64 = CallByName Num.77 TotallyNotJson.1322 TotallyNotJson.1323; - let TotallyNotJson.1321 : U64 = 1i64; - let TotallyNotJson.1319 : {U64, U64} = Struct {TotallyNotJson.1320, TotallyNotJson.1321}; - let TotallyNotJson.1194 : List U8 = CallByName List.49 TotallyNotJson.529 TotallyNotJson.1319; - let TotallyNotJson.1195 : {} = Struct {}; - let TotallyNotJson.1190 : {List U8, List U8} = CallByName TotallyNotJson.534 TotallyNotJson.1194; - let TotallyNotJson.1191 : {} = Struct {}; - let TotallyNotJson.1189 : List U8 = CallByName TotallyNotJson.536 TotallyNotJson.1190; - let TotallyNotJson.533 : [C {U64, U8}, C Str] = CallByName Str.9 TotallyNotJson.1189; - let TotallyNotJson.1186 : U8 = 1i64; - let TotallyNotJson.1187 : U8 = GetTagId TotallyNotJson.533; - let TotallyNotJson.1188 : Int1 = lowlevel Eq TotallyNotJson.1186 TotallyNotJson.1187; - if TotallyNotJson.1188 then - dec TotallyNotJson.526; - let TotallyNotJson.537 : Str = UnionAtIndex (Id 1) (Index 0) TotallyNotJson.533; - let TotallyNotJson.1182 : [C {}, C Str] = TagId(1) TotallyNotJson.537; - let TotallyNotJson.1181 : {List U8, [C {}, C Str]} = Struct {TotallyNotJson.530, TotallyNotJson.1182}; - ret TotallyNotJson.1181; + let TotallyNotJson.1120 : U64 = CallByName List.6 TotallyNotJson.492; + let TotallyNotJson.1121 : U64 = 2i64; + let TotallyNotJson.1118 : U64 = CallByName Num.77 TotallyNotJson.1120 TotallyNotJson.1121; + let TotallyNotJson.1119 : U64 = 1i64; + let TotallyNotJson.1117 : {U64, U64} = Struct {TotallyNotJson.1118, TotallyNotJson.1119}; + let TotallyNotJson.992 : List U8 = CallByName List.49 TotallyNotJson.492 TotallyNotJson.1117; + let TotallyNotJson.993 : {} = Struct {}; + let TotallyNotJson.988 : {List U8, List U8} = CallByName TotallyNotJson.497 TotallyNotJson.992; + let TotallyNotJson.989 : {} = Struct {}; + let TotallyNotJson.987 : List U8 = CallByName TotallyNotJson.499 TotallyNotJson.988; + let TotallyNotJson.496 : [C {U64, U8}, C Str] = CallByName Str.9 TotallyNotJson.987; + let TotallyNotJson.984 : U8 = 1i64; + let TotallyNotJson.985 : U8 = GetTagId TotallyNotJson.496; + let TotallyNotJson.986 : Int1 = lowlevel Eq TotallyNotJson.984 TotallyNotJson.985; + if TotallyNotJson.986 then + dec TotallyNotJson.489; + let TotallyNotJson.500 : Str = UnionAtIndex (Id 1) (Index 0) TotallyNotJson.496; + let TotallyNotJson.980 : [C {}, C Str] = TagId(1) TotallyNotJson.500; + let TotallyNotJson.979 : {List U8, [C {}, C Str]} = Struct {TotallyNotJson.493, TotallyNotJson.980}; + ret TotallyNotJson.979; else - dec TotallyNotJson.530; - dec TotallyNotJson.533; - let TotallyNotJson.1185 : {} = Struct {}; - let TotallyNotJson.1184 : [C {}, C Str] = TagId(0) TotallyNotJson.1185; - let TotallyNotJson.1183 : {List U8, [C {}, C Str]} = Struct {TotallyNotJson.526, TotallyNotJson.1184}; - ret TotallyNotJson.1183; + dec TotallyNotJson.493; + dec TotallyNotJson.496; + let TotallyNotJson.983 : {} = Struct {}; + let TotallyNotJson.982 : [C {}, C Str] = TagId(0) TotallyNotJson.983; + let TotallyNotJson.981 : {List U8, [C {}, C Str]} = Struct {TotallyNotJson.489, TotallyNotJson.982}; + ret TotallyNotJson.981; in - let TotallyNotJson.1457 : U64 = lowlevel ListLen TotallyNotJson.526; - let TotallyNotJson.1458 : U64 = 4i64; - let TotallyNotJson.1464 : Int1 = lowlevel NumGte TotallyNotJson.1457 TotallyNotJson.1458; - if TotallyNotJson.1464 then - let TotallyNotJson.1454 : U64 = 3i64; - let TotallyNotJson.1455 : U8 = lowlevel ListGetUnsafe TotallyNotJson.526 TotallyNotJson.1454; - let TotallyNotJson.1456 : U8 = 108i64; - let TotallyNotJson.1463 : Int1 = lowlevel Eq TotallyNotJson.1456 TotallyNotJson.1455; - if TotallyNotJson.1463 then - let TotallyNotJson.1451 : U64 = 2i64; - let TotallyNotJson.1452 : U8 = lowlevel ListGetUnsafe TotallyNotJson.526 TotallyNotJson.1451; - let TotallyNotJson.1453 : U8 = 108i64; - let TotallyNotJson.1462 : Int1 = lowlevel Eq TotallyNotJson.1453 TotallyNotJson.1452; - if TotallyNotJson.1462 then - let TotallyNotJson.1448 : U64 = 1i64; - let TotallyNotJson.1449 : U8 = lowlevel ListGetUnsafe TotallyNotJson.526 TotallyNotJson.1448; - let TotallyNotJson.1450 : U8 = 117i64; - let TotallyNotJson.1461 : Int1 = lowlevel Eq TotallyNotJson.1450 TotallyNotJson.1449; - if TotallyNotJson.1461 then - let TotallyNotJson.1445 : U64 = 0i64; - let TotallyNotJson.1446 : U8 = lowlevel ListGetUnsafe TotallyNotJson.526 TotallyNotJson.1445; - let TotallyNotJson.1447 : U8 = 110i64; - let TotallyNotJson.1460 : Int1 = lowlevel Eq TotallyNotJson.1447 TotallyNotJson.1446; - if TotallyNotJson.1460 then - let TotallyNotJson.1180 : U64 = 4i64; - let TotallyNotJson.1177 : List U8 = CallByName List.38 TotallyNotJson.526 TotallyNotJson.1180; - let TotallyNotJson.1179 : Str = "null"; - let TotallyNotJson.1178 : [C {}, C Str] = TagId(1) TotallyNotJson.1179; - let TotallyNotJson.1176 : {List U8, [C {}, C Str]} = Struct {TotallyNotJson.1177, TotallyNotJson.1178}; - ret TotallyNotJson.1176; + let TotallyNotJson.1255 : U64 = lowlevel ListLen TotallyNotJson.489; + let TotallyNotJson.1256 : U64 = 4i64; + let TotallyNotJson.1262 : Int1 = lowlevel NumGte TotallyNotJson.1255 TotallyNotJson.1256; + if TotallyNotJson.1262 then + let TotallyNotJson.1252 : U64 = 3i64; + let TotallyNotJson.1253 : U8 = lowlevel ListGetUnsafe TotallyNotJson.489 TotallyNotJson.1252; + let TotallyNotJson.1254 : U8 = 108i64; + let TotallyNotJson.1261 : Int1 = lowlevel Eq TotallyNotJson.1254 TotallyNotJson.1253; + if TotallyNotJson.1261 then + let TotallyNotJson.1249 : U64 = 2i64; + let TotallyNotJson.1250 : U8 = lowlevel ListGetUnsafe TotallyNotJson.489 TotallyNotJson.1249; + let TotallyNotJson.1251 : U8 = 108i64; + let TotallyNotJson.1260 : Int1 = lowlevel Eq TotallyNotJson.1251 TotallyNotJson.1250; + if TotallyNotJson.1260 then + let TotallyNotJson.1246 : U64 = 1i64; + let TotallyNotJson.1247 : U8 = lowlevel ListGetUnsafe TotallyNotJson.489 TotallyNotJson.1246; + let TotallyNotJson.1248 : U8 = 117i64; + let TotallyNotJson.1259 : Int1 = lowlevel Eq TotallyNotJson.1248 TotallyNotJson.1247; + if TotallyNotJson.1259 then + let TotallyNotJson.1243 : U64 = 0i64; + let TotallyNotJson.1244 : U8 = lowlevel ListGetUnsafe TotallyNotJson.489 TotallyNotJson.1243; + let TotallyNotJson.1245 : U8 = 110i64; + let TotallyNotJson.1258 : Int1 = lowlevel Eq TotallyNotJson.1245 TotallyNotJson.1244; + if TotallyNotJson.1258 then + let TotallyNotJson.978 : U64 = 4i64; + let TotallyNotJson.975 : List U8 = CallByName List.38 TotallyNotJson.489 TotallyNotJson.978; + let TotallyNotJson.977 : Str = "null"; + let TotallyNotJson.976 : [C {}, C Str] = TagId(1) TotallyNotJson.977; + let TotallyNotJson.974 : {List U8, [C {}, C Str]} = Struct {TotallyNotJson.975, TotallyNotJson.976}; + ret TotallyNotJson.974; else - jump TotallyNotJson.1459; + jump TotallyNotJson.1257; else - jump TotallyNotJson.1459; + jump TotallyNotJson.1257; else - jump TotallyNotJson.1459; + jump TotallyNotJson.1257; else - jump TotallyNotJson.1459; + jump TotallyNotJson.1257; else - jump TotallyNotJson.1459; - -procedure TotallyNotJson.534 (TotallyNotJson.535): - let TotallyNotJson.1318 : List U8 = Array []; - let TotallyNotJson.1197 : {List U8, List U8} = Struct {TotallyNotJson.535, TotallyNotJson.1318}; - let TotallyNotJson.1196 : {List U8, List U8} = CallByName TotallyNotJson.70 TotallyNotJson.1197; - ret TotallyNotJson.1196; - -procedure TotallyNotJson.536 (TotallyNotJson.1192): - let TotallyNotJson.1193 : List U8 = StructAtIndex 1 TotallyNotJson.1192; - let #Derived_gen.6 : List U8 = StructAtIndex 0 TotallyNotJson.1192; - dec #Derived_gen.6; - ret TotallyNotJson.1193; - -procedure TotallyNotJson.60 (): - let TotallyNotJson.1174 : {} = Struct {}; - let TotallyNotJson.1173 : {} = CallByName Decode.24 TotallyNotJson.1174; - ret TotallyNotJson.1173; - -procedure TotallyNotJson.61 (TotallyNotJson.541): - let TotallyNotJson.1340 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = TagId(4) ; - let TotallyNotJson.1341 : {} = Struct {}; - inc TotallyNotJson.541; - let TotallyNotJson.1329 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = CallByName List.26 TotallyNotJson.541 TotallyNotJson.1340 TotallyNotJson.1341; - let TotallyNotJson.1337 : U8 = 2i64; - let TotallyNotJson.1338 : U8 = GetTagId TotallyNotJson.1329; - let TotallyNotJson.1339 : Int1 = lowlevel Eq TotallyNotJson.1337 TotallyNotJson.1338; - if TotallyNotJson.1339 then - inc TotallyNotJson.541; - let TotallyNotJson.543 : U64 = UnionAtIndex (Id 2) (Index 0) TotallyNotJson.1329; - let TotallyNotJson.1331 : List U8 = CallByName List.38 TotallyNotJson.541 TotallyNotJson.543; - let TotallyNotJson.1334 : U64 = 0i64; - let TotallyNotJson.1333 : {U64, U64} = Struct {TotallyNotJson.543, TotallyNotJson.1334}; - let TotallyNotJson.1332 : List U8 = CallByName List.49 TotallyNotJson.541 TotallyNotJson.1333; - let TotallyNotJson.1330 : {List U8, List U8} = Struct {TotallyNotJson.1331, TotallyNotJson.1332}; - ret TotallyNotJson.1330; + jump TotallyNotJson.1257; + +procedure TotallyNotJson.497 (TotallyNotJson.498): + let TotallyNotJson.1116 : List U8 = Array []; + let TotallyNotJson.995 : {List U8, List U8} = Struct {TotallyNotJson.498, TotallyNotJson.1116}; + let TotallyNotJson.994 : {List U8, List U8} = CallByName TotallyNotJson.69 TotallyNotJson.995; + ret TotallyNotJson.994; + +procedure TotallyNotJson.499 (TotallyNotJson.990): + let TotallyNotJson.991 : List U8 = StructAtIndex 1 TotallyNotJson.990; + let #Derived_gen.7 : List U8 = StructAtIndex 0 TotallyNotJson.990; + dec #Derived_gen.7; + ret TotallyNotJson.991; + +procedure TotallyNotJson.59 (): + let TotallyNotJson.972 : {} = Struct {}; + let TotallyNotJson.971 : {} = CallByName Decode.24 TotallyNotJson.972; + ret TotallyNotJson.971; + +procedure TotallyNotJson.60 (TotallyNotJson.504): + let TotallyNotJson.1138 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = TagId(4) ; + let TotallyNotJson.1139 : {} = Struct {}; + inc TotallyNotJson.504; + let TotallyNotJson.1127 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = CallByName List.26 TotallyNotJson.504 TotallyNotJson.1138 TotallyNotJson.1139; + let TotallyNotJson.1135 : U8 = 2i64; + let TotallyNotJson.1136 : U8 = GetTagId TotallyNotJson.1127; + let TotallyNotJson.1137 : Int1 = lowlevel Eq TotallyNotJson.1135 TotallyNotJson.1136; + if TotallyNotJson.1137 then + inc TotallyNotJson.504; + let TotallyNotJson.506 : U64 = UnionAtIndex (Id 2) (Index 0) TotallyNotJson.1127; + let TotallyNotJson.1129 : List U8 = CallByName List.38 TotallyNotJson.504 TotallyNotJson.506; + let TotallyNotJson.1132 : U64 = 0i64; + let TotallyNotJson.1131 : {U64, U64} = Struct {TotallyNotJson.506, TotallyNotJson.1132}; + let TotallyNotJson.1130 : List U8 = CallByName List.49 TotallyNotJson.504 TotallyNotJson.1131; + let TotallyNotJson.1128 : {List U8, List U8} = Struct {TotallyNotJson.1129, TotallyNotJson.1130}; + ret TotallyNotJson.1128; else - let TotallyNotJson.1336 : List U8 = Array []; - let TotallyNotJson.1335 : {List U8, List U8} = Struct {TotallyNotJson.541, TotallyNotJson.1336}; - ret TotallyNotJson.1335; - -procedure TotallyNotJson.62 (TotallyNotJson.544, TotallyNotJson.545): - let TotallyNotJson.1342 : {[C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64], U8} = Struct {TotallyNotJson.544, TotallyNotJson.545}; - joinpoint TotallyNotJson.1385: - let TotallyNotJson.1383 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = TagId(3) ; - let TotallyNotJson.1382 : [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) TotallyNotJson.1383; - ret TotallyNotJson.1382; + let TotallyNotJson.1134 : List U8 = Array []; + let TotallyNotJson.1133 : {List U8, List U8} = Struct {TotallyNotJson.504, TotallyNotJson.1134}; + ret TotallyNotJson.1133; + +procedure TotallyNotJson.61 (TotallyNotJson.507, TotallyNotJson.508): + let TotallyNotJson.1140 : {[C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64], U8} = Struct {TotallyNotJson.507, TotallyNotJson.508}; + joinpoint TotallyNotJson.1183: + let TotallyNotJson.1181 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = TagId(3) ; + let TotallyNotJson.1180 : [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) TotallyNotJson.1181; + ret TotallyNotJson.1180; in - let TotallyNotJson.1386 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = StructAtIndex 0 TotallyNotJson.1342; - let TotallyNotJson.1444 : U8 = GetTagId TotallyNotJson.1386; - switch TotallyNotJson.1444: + let TotallyNotJson.1184 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = StructAtIndex 0 TotallyNotJson.1140; + let TotallyNotJson.1242 : U8 = GetTagId TotallyNotJson.1184; + switch TotallyNotJson.1242: case 4: - let TotallyNotJson.546 : U8 = StructAtIndex 1 TotallyNotJson.1342; - joinpoint TotallyNotJson.1388 TotallyNotJson.1387: - if TotallyNotJson.1387 then - let TotallyNotJson.1345 : U64 = 1i64; - let TotallyNotJson.1344 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = TagId(0) TotallyNotJson.1345; - let TotallyNotJson.1343 : [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) TotallyNotJson.1344; - ret TotallyNotJson.1343; + let TotallyNotJson.509 : U8 = StructAtIndex 1 TotallyNotJson.1140; + joinpoint TotallyNotJson.1186 TotallyNotJson.1185: + if TotallyNotJson.1185 then + let TotallyNotJson.1143 : U64 = 1i64; + let TotallyNotJson.1142 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = TagId(0) TotallyNotJson.1143; + let TotallyNotJson.1141 : [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) TotallyNotJson.1142; + ret TotallyNotJson.1141; else - jump TotallyNotJson.1385; + jump TotallyNotJson.1183; in - let TotallyNotJson.1390 : U8 = 34i64; - let TotallyNotJson.1389 : Int1 = CallByName Bool.11 TotallyNotJson.546 TotallyNotJson.1390; - jump TotallyNotJson.1388 TotallyNotJson.1389; + let TotallyNotJson.1188 : U8 = 34i64; + let TotallyNotJson.1187 : Int1 = CallByName Bool.11 TotallyNotJson.509 TotallyNotJson.1188; + jump TotallyNotJson.1186 TotallyNotJson.1187; case 0: - let TotallyNotJson.1401 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = StructAtIndex 0 TotallyNotJson.1342; - let TotallyNotJson.549 : U64 = UnionAtIndex (Id 0) (Index 0) TotallyNotJson.1401; - let TotallyNotJson.550 : U8 = StructAtIndex 1 TotallyNotJson.1342; - joinpoint TotallyNotJson.1398 TotallyNotJson.1392: - if TotallyNotJson.1392 then - let TotallyNotJson.1349 : U64 = 1i64; - let TotallyNotJson.1348 : U64 = CallByName Num.19 TotallyNotJson.549 TotallyNotJson.1349; - let TotallyNotJson.1347 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = TagId(2) TotallyNotJson.1348; - let TotallyNotJson.1346 : [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) TotallyNotJson.1347; - ret TotallyNotJson.1346; + let TotallyNotJson.1199 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = StructAtIndex 0 TotallyNotJson.1140; + let TotallyNotJson.512 : U64 = UnionAtIndex (Id 0) (Index 0) TotallyNotJson.1199; + let TotallyNotJson.513 : U8 = StructAtIndex 1 TotallyNotJson.1140; + joinpoint TotallyNotJson.1196 TotallyNotJson.1190: + if TotallyNotJson.1190 then + let TotallyNotJson.1147 : U64 = 1i64; + let TotallyNotJson.1146 : U64 = CallByName Num.19 TotallyNotJson.512 TotallyNotJson.1147; + let TotallyNotJson.1145 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = TagId(2) TotallyNotJson.1146; + let TotallyNotJson.1144 : [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) TotallyNotJson.1145; + ret TotallyNotJson.1144; else - let TotallyNotJson.1397 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = StructAtIndex 0 TotallyNotJson.1342; - let TotallyNotJson.553 : U64 = UnionAtIndex (Id 0) (Index 0) TotallyNotJson.1397; - let TotallyNotJson.554 : U8 = StructAtIndex 1 TotallyNotJson.1342; - joinpoint TotallyNotJson.1394 TotallyNotJson.1393: - if TotallyNotJson.1393 then - let TotallyNotJson.1353 : U64 = 1i64; - let TotallyNotJson.1352 : U64 = CallByName Num.19 TotallyNotJson.553 TotallyNotJson.1353; - let TotallyNotJson.1351 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = TagId(1) TotallyNotJson.1352; - let TotallyNotJson.1350 : [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) TotallyNotJson.1351; - ret TotallyNotJson.1350; + let TotallyNotJson.1195 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = StructAtIndex 0 TotallyNotJson.1140; + let TotallyNotJson.516 : U64 = UnionAtIndex (Id 0) (Index 0) TotallyNotJson.1195; + let TotallyNotJson.517 : U8 = StructAtIndex 1 TotallyNotJson.1140; + joinpoint TotallyNotJson.1192 TotallyNotJson.1191: + if TotallyNotJson.1191 then + let TotallyNotJson.1151 : U64 = 1i64; + let TotallyNotJson.1150 : U64 = CallByName Num.19 TotallyNotJson.516 TotallyNotJson.1151; + let TotallyNotJson.1149 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = TagId(1) TotallyNotJson.1150; + let TotallyNotJson.1148 : [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) TotallyNotJson.1149; + ret TotallyNotJson.1148; else - let TotallyNotJson.1384 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = StructAtIndex 0 TotallyNotJson.1342; - let TotallyNotJson.557 : U64 = UnionAtIndex (Id 0) (Index 0) TotallyNotJson.1384; - let TotallyNotJson.1357 : U64 = 1i64; - let TotallyNotJson.1356 : U64 = CallByName Num.19 TotallyNotJson.557 TotallyNotJson.1357; - let TotallyNotJson.1355 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = TagId(0) TotallyNotJson.1356; - let TotallyNotJson.1354 : [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) TotallyNotJson.1355; - ret TotallyNotJson.1354; + let TotallyNotJson.1182 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = StructAtIndex 0 TotallyNotJson.1140; + let TotallyNotJson.520 : U64 = UnionAtIndex (Id 0) (Index 0) TotallyNotJson.1182; + let TotallyNotJson.1155 : U64 = 1i64; + let TotallyNotJson.1154 : U64 = CallByName Num.19 TotallyNotJson.520 TotallyNotJson.1155; + let TotallyNotJson.1153 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = TagId(0) TotallyNotJson.1154; + let TotallyNotJson.1152 : [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) TotallyNotJson.1153; + ret TotallyNotJson.1152; in - let TotallyNotJson.1396 : U8 = 92i64; - let TotallyNotJson.1395 : Int1 = CallByName Bool.11 TotallyNotJson.554 TotallyNotJson.1396; - jump TotallyNotJson.1394 TotallyNotJson.1395; + let TotallyNotJson.1194 : U8 = 92i64; + let TotallyNotJson.1193 : Int1 = CallByName Bool.11 TotallyNotJson.517 TotallyNotJson.1194; + jump TotallyNotJson.1192 TotallyNotJson.1193; in - let TotallyNotJson.1400 : U8 = 34i64; - let TotallyNotJson.1399 : Int1 = CallByName Bool.11 TotallyNotJson.550 TotallyNotJson.1400; - jump TotallyNotJson.1398 TotallyNotJson.1399; + let TotallyNotJson.1198 : U8 = 34i64; + let TotallyNotJson.1197 : Int1 = CallByName Bool.11 TotallyNotJson.513 TotallyNotJson.1198; + jump TotallyNotJson.1196 TotallyNotJson.1197; case 1: - let TotallyNotJson.1410 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = StructAtIndex 0 TotallyNotJson.1342; - let TotallyNotJson.560 : U64 = UnionAtIndex (Id 1) (Index 0) TotallyNotJson.1410; - let TotallyNotJson.561 : U8 = StructAtIndex 1 TotallyNotJson.1342; - joinpoint TotallyNotJson.1408 TotallyNotJson.1402: - if TotallyNotJson.1402 then - let TotallyNotJson.1361 : U64 = 1i64; - let TotallyNotJson.1360 : U64 = CallByName Num.19 TotallyNotJson.560 TotallyNotJson.1361; - let TotallyNotJson.1359 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = TagId(0) TotallyNotJson.1360; - let TotallyNotJson.1358 : [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) TotallyNotJson.1359; - ret TotallyNotJson.1358; + let TotallyNotJson.1208 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = StructAtIndex 0 TotallyNotJson.1140; + let TotallyNotJson.523 : U64 = UnionAtIndex (Id 1) (Index 0) TotallyNotJson.1208; + let TotallyNotJson.524 : U8 = StructAtIndex 1 TotallyNotJson.1140; + joinpoint TotallyNotJson.1206 TotallyNotJson.1200: + if TotallyNotJson.1200 then + let TotallyNotJson.1159 : U64 = 1i64; + let TotallyNotJson.1158 : U64 = CallByName Num.19 TotallyNotJson.523 TotallyNotJson.1159; + let TotallyNotJson.1157 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = TagId(0) TotallyNotJson.1158; + let TotallyNotJson.1156 : [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) TotallyNotJson.1157; + ret TotallyNotJson.1156; else - let TotallyNotJson.1407 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = StructAtIndex 0 TotallyNotJson.1342; - let TotallyNotJson.564 : U64 = UnionAtIndex (Id 1) (Index 0) TotallyNotJson.1407; - let TotallyNotJson.565 : U8 = StructAtIndex 1 TotallyNotJson.1342; - joinpoint TotallyNotJson.1404 TotallyNotJson.1403: - if TotallyNotJson.1403 then - let TotallyNotJson.1365 : U64 = 1i64; - let TotallyNotJson.1364 : U64 = CallByName Num.19 TotallyNotJson.564 TotallyNotJson.1365; - let TotallyNotJson.1363 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = TagId(5) TotallyNotJson.1364; - let TotallyNotJson.1362 : [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) TotallyNotJson.1363; - ret TotallyNotJson.1362; + let TotallyNotJson.1205 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = StructAtIndex 0 TotallyNotJson.1140; + let TotallyNotJson.527 : U64 = UnionAtIndex (Id 1) (Index 0) TotallyNotJson.1205; + let TotallyNotJson.528 : U8 = StructAtIndex 1 TotallyNotJson.1140; + joinpoint TotallyNotJson.1202 TotallyNotJson.1201: + if TotallyNotJson.1201 then + let TotallyNotJson.1163 : U64 = 1i64; + let TotallyNotJson.1162 : U64 = CallByName Num.19 TotallyNotJson.527 TotallyNotJson.1163; + let TotallyNotJson.1161 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = TagId(5) TotallyNotJson.1162; + let TotallyNotJson.1160 : [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) TotallyNotJson.1161; + ret TotallyNotJson.1160; else - jump TotallyNotJson.1385; + jump TotallyNotJson.1183; in - let TotallyNotJson.1406 : U8 = 117i64; - let TotallyNotJson.1405 : Int1 = CallByName Bool.11 TotallyNotJson.565 TotallyNotJson.1406; - jump TotallyNotJson.1404 TotallyNotJson.1405; + let TotallyNotJson.1204 : U8 = 117i64; + let TotallyNotJson.1203 : Int1 = CallByName Bool.11 TotallyNotJson.528 TotallyNotJson.1204; + jump TotallyNotJson.1202 TotallyNotJson.1203; in - let TotallyNotJson.1409 : Int1 = CallByName TotallyNotJson.63 TotallyNotJson.561; - jump TotallyNotJson.1408 TotallyNotJson.1409; + let TotallyNotJson.1207 : Int1 = CallByName TotallyNotJson.62 TotallyNotJson.524; + jump TotallyNotJson.1206 TotallyNotJson.1207; case 5: - let TotallyNotJson.1431 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = StructAtIndex 0 TotallyNotJson.1342; - let TotallyNotJson.568 : U64 = UnionAtIndex (Id 5) (Index 0) TotallyNotJson.1431; - let TotallyNotJson.569 : U8 = StructAtIndex 1 TotallyNotJson.1342; - joinpoint TotallyNotJson.1412 TotallyNotJson.1411: - if TotallyNotJson.1411 then - let TotallyNotJson.1369 : U64 = 1i64; - let TotallyNotJson.1368 : U64 = CallByName Num.19 TotallyNotJson.568 TotallyNotJson.1369; - let TotallyNotJson.1367 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = TagId(6) TotallyNotJson.1368; - let TotallyNotJson.1366 : [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) TotallyNotJson.1367; - ret TotallyNotJson.1366; + let TotallyNotJson.1229 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = StructAtIndex 0 TotallyNotJson.1140; + let TotallyNotJson.531 : U64 = UnionAtIndex (Id 5) (Index 0) TotallyNotJson.1229; + let TotallyNotJson.532 : U8 = StructAtIndex 1 TotallyNotJson.1140; + joinpoint TotallyNotJson.1210 TotallyNotJson.1209: + if TotallyNotJson.1209 then + let TotallyNotJson.1167 : U64 = 1i64; + let TotallyNotJson.1166 : U64 = CallByName Num.19 TotallyNotJson.531 TotallyNotJson.1167; + let TotallyNotJson.1165 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = TagId(6) TotallyNotJson.1166; + let TotallyNotJson.1164 : [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) TotallyNotJson.1165; + ret TotallyNotJson.1164; else - jump TotallyNotJson.1385; + jump TotallyNotJson.1183; in - let TotallyNotJson.1413 : Int1 = CallByName TotallyNotJson.65 TotallyNotJson.569; - jump TotallyNotJson.1412 TotallyNotJson.1413; + let TotallyNotJson.1211 : Int1 = CallByName TotallyNotJson.64 TotallyNotJson.532; + jump TotallyNotJson.1210 TotallyNotJson.1211; case 6: - let TotallyNotJson.1435 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = StructAtIndex 0 TotallyNotJson.1342; - let TotallyNotJson.572 : U64 = UnionAtIndex (Id 6) (Index 0) TotallyNotJson.1435; - let TotallyNotJson.573 : U8 = StructAtIndex 1 TotallyNotJson.1342; - joinpoint TotallyNotJson.1433 TotallyNotJson.1432: - if TotallyNotJson.1432 then - let TotallyNotJson.1373 : U64 = 1i64; - let TotallyNotJson.1372 : U64 = CallByName Num.19 TotallyNotJson.572 TotallyNotJson.1373; - let TotallyNotJson.1371 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = TagId(7) TotallyNotJson.1372; - let TotallyNotJson.1370 : [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) TotallyNotJson.1371; - ret TotallyNotJson.1370; + let TotallyNotJson.1233 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = StructAtIndex 0 TotallyNotJson.1140; + let TotallyNotJson.535 : U64 = UnionAtIndex (Id 6) (Index 0) TotallyNotJson.1233; + let TotallyNotJson.536 : U8 = StructAtIndex 1 TotallyNotJson.1140; + joinpoint TotallyNotJson.1231 TotallyNotJson.1230: + if TotallyNotJson.1230 then + let TotallyNotJson.1171 : U64 = 1i64; + let TotallyNotJson.1170 : U64 = CallByName Num.19 TotallyNotJson.535 TotallyNotJson.1171; + let TotallyNotJson.1169 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = TagId(7) TotallyNotJson.1170; + let TotallyNotJson.1168 : [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) TotallyNotJson.1169; + ret TotallyNotJson.1168; else - jump TotallyNotJson.1385; + jump TotallyNotJson.1183; in - let TotallyNotJson.1434 : Int1 = CallByName TotallyNotJson.65 TotallyNotJson.573; - jump TotallyNotJson.1433 TotallyNotJson.1434; + let TotallyNotJson.1232 : Int1 = CallByName TotallyNotJson.64 TotallyNotJson.536; + jump TotallyNotJson.1231 TotallyNotJson.1232; case 7: - let TotallyNotJson.1439 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = StructAtIndex 0 TotallyNotJson.1342; - let TotallyNotJson.576 : U64 = UnionAtIndex (Id 7) (Index 0) TotallyNotJson.1439; - let TotallyNotJson.577 : U8 = StructAtIndex 1 TotallyNotJson.1342; - joinpoint TotallyNotJson.1437 TotallyNotJson.1436: - if TotallyNotJson.1436 then - let TotallyNotJson.1377 : U64 = 1i64; - let TotallyNotJson.1376 : U64 = CallByName Num.19 TotallyNotJson.576 TotallyNotJson.1377; - let TotallyNotJson.1375 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = TagId(8) TotallyNotJson.1376; - let TotallyNotJson.1374 : [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) TotallyNotJson.1375; - ret TotallyNotJson.1374; + let TotallyNotJson.1237 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = StructAtIndex 0 TotallyNotJson.1140; + let TotallyNotJson.539 : U64 = UnionAtIndex (Id 7) (Index 0) TotallyNotJson.1237; + let TotallyNotJson.540 : U8 = StructAtIndex 1 TotallyNotJson.1140; + joinpoint TotallyNotJson.1235 TotallyNotJson.1234: + if TotallyNotJson.1234 then + let TotallyNotJson.1175 : U64 = 1i64; + let TotallyNotJson.1174 : U64 = CallByName Num.19 TotallyNotJson.539 TotallyNotJson.1175; + let TotallyNotJson.1173 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = TagId(8) TotallyNotJson.1174; + let TotallyNotJson.1172 : [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) TotallyNotJson.1173; + ret TotallyNotJson.1172; else - jump TotallyNotJson.1385; + jump TotallyNotJson.1183; in - let TotallyNotJson.1438 : Int1 = CallByName TotallyNotJson.65 TotallyNotJson.577; - jump TotallyNotJson.1437 TotallyNotJson.1438; + let TotallyNotJson.1236 : Int1 = CallByName TotallyNotJson.64 TotallyNotJson.540; + jump TotallyNotJson.1235 TotallyNotJson.1236; case 8: - let TotallyNotJson.1443 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = StructAtIndex 0 TotallyNotJson.1342; - let TotallyNotJson.580 : U64 = UnionAtIndex (Id 8) (Index 0) TotallyNotJson.1443; - let TotallyNotJson.581 : U8 = StructAtIndex 1 TotallyNotJson.1342; - joinpoint TotallyNotJson.1441 TotallyNotJson.1440: - if TotallyNotJson.1440 then - let TotallyNotJson.1381 : U64 = 1i64; - let TotallyNotJson.1380 : U64 = CallByName Num.19 TotallyNotJson.580 TotallyNotJson.1381; - let TotallyNotJson.1379 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = TagId(0) TotallyNotJson.1380; - let TotallyNotJson.1378 : [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) TotallyNotJson.1379; - ret TotallyNotJson.1378; + let TotallyNotJson.1241 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = StructAtIndex 0 TotallyNotJson.1140; + let TotallyNotJson.543 : U64 = UnionAtIndex (Id 8) (Index 0) TotallyNotJson.1241; + let TotallyNotJson.544 : U8 = StructAtIndex 1 TotallyNotJson.1140; + joinpoint TotallyNotJson.1239 TotallyNotJson.1238: + if TotallyNotJson.1238 then + let TotallyNotJson.1179 : U64 = 1i64; + let TotallyNotJson.1178 : U64 = CallByName Num.19 TotallyNotJson.543 TotallyNotJson.1179; + let TotallyNotJson.1177 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = TagId(0) TotallyNotJson.1178; + let TotallyNotJson.1176 : [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) TotallyNotJson.1177; + ret TotallyNotJson.1176; else - jump TotallyNotJson.1385; + jump TotallyNotJson.1183; in - let TotallyNotJson.1442 : Int1 = CallByName TotallyNotJson.65 TotallyNotJson.581; - jump TotallyNotJson.1441 TotallyNotJson.1442; + let TotallyNotJson.1240 : Int1 = CallByName TotallyNotJson.64 TotallyNotJson.544; + jump TotallyNotJson.1239 TotallyNotJson.1240; default: - jump TotallyNotJson.1385; + jump TotallyNotJson.1183; -procedure TotallyNotJson.63 (TotallyNotJson.586): - switch TotallyNotJson.586: +procedure TotallyNotJson.62 (TotallyNotJson.549): + switch TotallyNotJson.549: case 34: - let TotallyNotJson.1286 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1286; + let TotallyNotJson.1084 : Int1 = CallByName Bool.2; + ret TotallyNotJson.1084; case 92: - let TotallyNotJson.1287 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1287; + let TotallyNotJson.1085 : Int1 = CallByName Bool.2; + ret TotallyNotJson.1085; case 47: - let TotallyNotJson.1288 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1288; + let TotallyNotJson.1086 : Int1 = CallByName Bool.2; + ret TotallyNotJson.1086; case 98: - let TotallyNotJson.1289 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1289; + let TotallyNotJson.1087 : Int1 = CallByName Bool.2; + ret TotallyNotJson.1087; case 102: - let TotallyNotJson.1290 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1290; + let TotallyNotJson.1088 : Int1 = CallByName Bool.2; + ret TotallyNotJson.1088; case 110: - let TotallyNotJson.1291 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1291; + let TotallyNotJson.1089 : Int1 = CallByName Bool.2; + ret TotallyNotJson.1089; case 114: - let TotallyNotJson.1292 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1292; + let TotallyNotJson.1090 : Int1 = CallByName Bool.2; + ret TotallyNotJson.1090; case 116: - let TotallyNotJson.1293 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1293; + let TotallyNotJson.1091 : Int1 = CallByName Bool.2; + ret TotallyNotJson.1091; default: - let TotallyNotJson.1294 : Int1 = CallByName Bool.1; - ret TotallyNotJson.1294; + let TotallyNotJson.1092 : Int1 = CallByName Bool.1; + ret TotallyNotJson.1092; -procedure TotallyNotJson.64 (TotallyNotJson.587): - switch TotallyNotJson.587: +procedure TotallyNotJson.63 (TotallyNotJson.550): + switch TotallyNotJson.550: case 34: - let TotallyNotJson.1263 : U8 = 34i64; - ret TotallyNotJson.1263; + let TotallyNotJson.1061 : U8 = 34i64; + ret TotallyNotJson.1061; case 92: - let TotallyNotJson.1264 : U8 = 92i64; - ret TotallyNotJson.1264; + let TotallyNotJson.1062 : U8 = 92i64; + ret TotallyNotJson.1062; case 47: - let TotallyNotJson.1265 : U8 = 47i64; - ret TotallyNotJson.1265; + let TotallyNotJson.1063 : U8 = 47i64; + ret TotallyNotJson.1063; case 98: - let TotallyNotJson.1266 : U8 = 8i64; - ret TotallyNotJson.1266; + let TotallyNotJson.1064 : U8 = 8i64; + ret TotallyNotJson.1064; case 102: - let TotallyNotJson.1267 : U8 = 12i64; - ret TotallyNotJson.1267; + let TotallyNotJson.1065 : U8 = 12i64; + ret TotallyNotJson.1065; case 110: - let TotallyNotJson.1268 : U8 = 10i64; - ret TotallyNotJson.1268; + let TotallyNotJson.1066 : U8 = 10i64; + ret TotallyNotJson.1066; case 114: - let TotallyNotJson.1269 : U8 = 13i64; - ret TotallyNotJson.1269; + let TotallyNotJson.1067 : U8 = 13i64; + ret TotallyNotJson.1067; case 116: - let TotallyNotJson.1270 : U8 = 9i64; - ret TotallyNotJson.1270; + let TotallyNotJson.1068 : U8 = 9i64; + ret TotallyNotJson.1068; default: - ret TotallyNotJson.587; + ret TotallyNotJson.550; -procedure TotallyNotJson.65 (TotallyNotJson.588): - let TotallyNotJson.1430 : U8 = 48i64; - let TotallyNotJson.1427 : Int1 = CallByName Num.25 TotallyNotJson.588 TotallyNotJson.1430; - let TotallyNotJson.1429 : U8 = 57i64; - let TotallyNotJson.1428 : Int1 = CallByName Num.23 TotallyNotJson.588 TotallyNotJson.1429; - let TotallyNotJson.1415 : Int1 = CallByName Bool.3 TotallyNotJson.1427 TotallyNotJson.1428; - let TotallyNotJson.1426 : U8 = 97i64; - let TotallyNotJson.1423 : Int1 = CallByName Num.25 TotallyNotJson.588 TotallyNotJson.1426; - let TotallyNotJson.1425 : U8 = 102i64; - let TotallyNotJson.1424 : Int1 = CallByName Num.23 TotallyNotJson.588 TotallyNotJson.1425; - let TotallyNotJson.1417 : Int1 = CallByName Bool.3 TotallyNotJson.1423 TotallyNotJson.1424; - let TotallyNotJson.1422 : U8 = 65i64; - let TotallyNotJson.1419 : Int1 = CallByName Num.25 TotallyNotJson.588 TotallyNotJson.1422; - let TotallyNotJson.1421 : U8 = 70i64; - let TotallyNotJson.1420 : Int1 = CallByName Num.23 TotallyNotJson.588 TotallyNotJson.1421; - let TotallyNotJson.1418 : Int1 = CallByName Bool.3 TotallyNotJson.1419 TotallyNotJson.1420; - let TotallyNotJson.1416 : Int1 = CallByName Bool.4 TotallyNotJson.1417 TotallyNotJson.1418; - let TotallyNotJson.1414 : Int1 = CallByName Bool.4 TotallyNotJson.1415 TotallyNotJson.1416; - ret TotallyNotJson.1414; - -procedure TotallyNotJson.66 (TotallyNotJson.589): - let TotallyNotJson.1242 : U8 = 48i64; - let TotallyNotJson.1239 : Int1 = CallByName Num.25 TotallyNotJson.589 TotallyNotJson.1242; - let TotallyNotJson.1241 : U8 = 57i64; - let TotallyNotJson.1240 : Int1 = CallByName Num.23 TotallyNotJson.589 TotallyNotJson.1241; - let TotallyNotJson.1236 : Int1 = CallByName Bool.3 TotallyNotJson.1239 TotallyNotJson.1240; - if TotallyNotJson.1236 then - let TotallyNotJson.1238 : U8 = 48i64; - let TotallyNotJson.1237 : U8 = CallByName Num.20 TotallyNotJson.589 TotallyNotJson.1238; - ret TotallyNotJson.1237; +procedure TotallyNotJson.64 (TotallyNotJson.551): + let TotallyNotJson.1228 : U8 = 48i64; + let TotallyNotJson.1225 : Int1 = CallByName Num.25 TotallyNotJson.551 TotallyNotJson.1228; + let TotallyNotJson.1227 : U8 = 57i64; + let TotallyNotJson.1226 : Int1 = CallByName Num.23 TotallyNotJson.551 TotallyNotJson.1227; + let TotallyNotJson.1213 : Int1 = CallByName Bool.3 TotallyNotJson.1225 TotallyNotJson.1226; + let TotallyNotJson.1224 : U8 = 97i64; + let TotallyNotJson.1221 : Int1 = CallByName Num.25 TotallyNotJson.551 TotallyNotJson.1224; + let TotallyNotJson.1223 : U8 = 102i64; + let TotallyNotJson.1222 : Int1 = CallByName Num.23 TotallyNotJson.551 TotallyNotJson.1223; + let TotallyNotJson.1215 : Int1 = CallByName Bool.3 TotallyNotJson.1221 TotallyNotJson.1222; + let TotallyNotJson.1220 : U8 = 65i64; + let TotallyNotJson.1217 : Int1 = CallByName Num.25 TotallyNotJson.551 TotallyNotJson.1220; + let TotallyNotJson.1219 : U8 = 70i64; + let TotallyNotJson.1218 : Int1 = CallByName Num.23 TotallyNotJson.551 TotallyNotJson.1219; + let TotallyNotJson.1216 : Int1 = CallByName Bool.3 TotallyNotJson.1217 TotallyNotJson.1218; + let TotallyNotJson.1214 : Int1 = CallByName Bool.4 TotallyNotJson.1215 TotallyNotJson.1216; + let TotallyNotJson.1212 : Int1 = CallByName Bool.4 TotallyNotJson.1213 TotallyNotJson.1214; + ret TotallyNotJson.1212; + +procedure TotallyNotJson.65 (TotallyNotJson.552): + let TotallyNotJson.1040 : U8 = 48i64; + let TotallyNotJson.1037 : Int1 = CallByName Num.25 TotallyNotJson.552 TotallyNotJson.1040; + let TotallyNotJson.1039 : U8 = 57i64; + let TotallyNotJson.1038 : Int1 = CallByName Num.23 TotallyNotJson.552 TotallyNotJson.1039; + let TotallyNotJson.1034 : Int1 = CallByName Bool.3 TotallyNotJson.1037 TotallyNotJson.1038; + if TotallyNotJson.1034 then + let TotallyNotJson.1036 : U8 = 48i64; + let TotallyNotJson.1035 : U8 = CallByName Num.20 TotallyNotJson.552 TotallyNotJson.1036; + ret TotallyNotJson.1035; else - let TotallyNotJson.1235 : U8 = 97i64; - let TotallyNotJson.1232 : Int1 = CallByName Num.25 TotallyNotJson.589 TotallyNotJson.1235; - let TotallyNotJson.1234 : U8 = 102i64; - let TotallyNotJson.1233 : Int1 = CallByName Num.23 TotallyNotJson.589 TotallyNotJson.1234; - let TotallyNotJson.1227 : Int1 = CallByName Bool.3 TotallyNotJson.1232 TotallyNotJson.1233; - if TotallyNotJson.1227 then - let TotallyNotJson.1231 : U8 = 97i64; - let TotallyNotJson.1229 : U8 = CallByName Num.20 TotallyNotJson.589 TotallyNotJson.1231; - let TotallyNotJson.1230 : U8 = 10i64; - let TotallyNotJson.1228 : U8 = CallByName Num.19 TotallyNotJson.1229 TotallyNotJson.1230; - ret TotallyNotJson.1228; + let TotallyNotJson.1033 : U8 = 97i64; + let TotallyNotJson.1030 : Int1 = CallByName Num.25 TotallyNotJson.552 TotallyNotJson.1033; + let TotallyNotJson.1032 : U8 = 102i64; + let TotallyNotJson.1031 : Int1 = CallByName Num.23 TotallyNotJson.552 TotallyNotJson.1032; + let TotallyNotJson.1025 : Int1 = CallByName Bool.3 TotallyNotJson.1030 TotallyNotJson.1031; + if TotallyNotJson.1025 then + let TotallyNotJson.1029 : U8 = 97i64; + let TotallyNotJson.1027 : U8 = CallByName Num.20 TotallyNotJson.552 TotallyNotJson.1029; + let TotallyNotJson.1028 : U8 = 10i64; + let TotallyNotJson.1026 : U8 = CallByName Num.19 TotallyNotJson.1027 TotallyNotJson.1028; + ret TotallyNotJson.1026; else - let TotallyNotJson.1226 : U8 = 65i64; - let TotallyNotJson.1223 : Int1 = CallByName Num.25 TotallyNotJson.589 TotallyNotJson.1226; - let TotallyNotJson.1225 : U8 = 70i64; - let TotallyNotJson.1224 : Int1 = CallByName Num.23 TotallyNotJson.589 TotallyNotJson.1225; - let TotallyNotJson.1218 : Int1 = CallByName Bool.3 TotallyNotJson.1223 TotallyNotJson.1224; - if TotallyNotJson.1218 then - let TotallyNotJson.1222 : U8 = 65i64; - let TotallyNotJson.1220 : U8 = CallByName Num.20 TotallyNotJson.589 TotallyNotJson.1222; - let TotallyNotJson.1221 : U8 = 10i64; - let TotallyNotJson.1219 : U8 = CallByName Num.19 TotallyNotJson.1220 TotallyNotJson.1221; - ret TotallyNotJson.1219; + let TotallyNotJson.1024 : U8 = 65i64; + let TotallyNotJson.1021 : Int1 = CallByName Num.25 TotallyNotJson.552 TotallyNotJson.1024; + let TotallyNotJson.1023 : U8 = 70i64; + let TotallyNotJson.1022 : Int1 = CallByName Num.23 TotallyNotJson.552 TotallyNotJson.1023; + let TotallyNotJson.1016 : Int1 = CallByName Bool.3 TotallyNotJson.1021 TotallyNotJson.1022; + if TotallyNotJson.1016 then + let TotallyNotJson.1020 : U8 = 65i64; + let TotallyNotJson.1018 : U8 = CallByName Num.20 TotallyNotJson.552 TotallyNotJson.1020; + let TotallyNotJson.1019 : U8 = 10i64; + let TotallyNotJson.1017 : U8 = CallByName Num.19 TotallyNotJson.1018 TotallyNotJson.1019; + ret TotallyNotJson.1017; else - let TotallyNotJson.1217 : Str = "got an invalid hex char"; - Crash TotallyNotJson.1217 - -procedure TotallyNotJson.67 (TotallyNotJson.590, TotallyNotJson.591): - let TotallyNotJson.1208 : U8 = 4i64; - let TotallyNotJson.1207 : U8 = CallByName Num.72 TotallyNotJson.590 TotallyNotJson.1208; - let TotallyNotJson.1206 : U8 = CallByName Num.71 TotallyNotJson.1207 TotallyNotJson.591; - ret TotallyNotJson.1206; - -procedure TotallyNotJson.68 (TotallyNotJson.592, TotallyNotJson.593, TotallyNotJson.594, TotallyNotJson.595): - let TotallyNotJson.596 : U8 = CallByName TotallyNotJson.66 TotallyNotJson.592; - let TotallyNotJson.597 : U8 = CallByName TotallyNotJson.66 TotallyNotJson.593; - let TotallyNotJson.598 : U8 = CallByName TotallyNotJson.66 TotallyNotJson.594; - let TotallyNotJson.599 : U8 = CallByName TotallyNotJson.66 TotallyNotJson.595; - let TotallyNotJson.1215 : U8 = 0i64; - let TotallyNotJson.1212 : Int1 = CallByName Bool.11 TotallyNotJson.596 TotallyNotJson.1215; - let TotallyNotJson.1214 : U8 = 0i64; - let TotallyNotJson.1213 : Int1 = CallByName Bool.11 TotallyNotJson.597 TotallyNotJson.1214; - let TotallyNotJson.1209 : Int1 = CallByName Bool.3 TotallyNotJson.1212 TotallyNotJson.1213; - if TotallyNotJson.1209 then - let TotallyNotJson.1211 : U8 = CallByName TotallyNotJson.67 TotallyNotJson.598 TotallyNotJson.599; - let TotallyNotJson.1210 : List U8 = Array [TotallyNotJson.1211]; - ret TotallyNotJson.1210; + let TotallyNotJson.1015 : Str = "got an invalid hex char"; + Crash TotallyNotJson.1015 + +procedure TotallyNotJson.66 (TotallyNotJson.553, TotallyNotJson.554): + let TotallyNotJson.1006 : U8 = 4i64; + let TotallyNotJson.1005 : U8 = CallByName Num.72 TotallyNotJson.553 TotallyNotJson.1006; + let TotallyNotJson.1004 : U8 = CallByName Num.71 TotallyNotJson.1005 TotallyNotJson.554; + ret TotallyNotJson.1004; + +procedure TotallyNotJson.67 (TotallyNotJson.555, TotallyNotJson.556, TotallyNotJson.557, TotallyNotJson.558): + let TotallyNotJson.559 : U8 = CallByName TotallyNotJson.65 TotallyNotJson.555; + let TotallyNotJson.560 : U8 = CallByName TotallyNotJson.65 TotallyNotJson.556; + let TotallyNotJson.561 : U8 = CallByName TotallyNotJson.65 TotallyNotJson.557; + let TotallyNotJson.562 : U8 = CallByName TotallyNotJson.65 TotallyNotJson.558; + let TotallyNotJson.1013 : U8 = 0i64; + let TotallyNotJson.1010 : Int1 = CallByName Bool.11 TotallyNotJson.559 TotallyNotJson.1013; + let TotallyNotJson.1012 : U8 = 0i64; + let TotallyNotJson.1011 : Int1 = CallByName Bool.11 TotallyNotJson.560 TotallyNotJson.1012; + let TotallyNotJson.1007 : Int1 = CallByName Bool.3 TotallyNotJson.1010 TotallyNotJson.1011; + if TotallyNotJson.1007 then + let TotallyNotJson.1009 : U8 = CallByName TotallyNotJson.66 TotallyNotJson.561 TotallyNotJson.562; + let TotallyNotJson.1008 : List U8 = Array [TotallyNotJson.1009]; + ret TotallyNotJson.1008; else - let TotallyNotJson.1204 : U8 = CallByName TotallyNotJson.67 TotallyNotJson.596 TotallyNotJson.597; - let TotallyNotJson.1205 : U8 = CallByName TotallyNotJson.67 TotallyNotJson.598 TotallyNotJson.599; - let TotallyNotJson.1203 : List U8 = Array [TotallyNotJson.1204, TotallyNotJson.1205]; - ret TotallyNotJson.1203; - -procedure TotallyNotJson.69 (): - let TotallyNotJson.1248 : U8 = 102i64; - let TotallyNotJson.1249 : U8 = 102i64; - let TotallyNotJson.1250 : U8 = 100i64; - let TotallyNotJson.1251 : U8 = 100i64; - let TotallyNotJson.1247 : List U8 = CallByName TotallyNotJson.68 TotallyNotJson.1248 TotallyNotJson.1249 TotallyNotJson.1250 TotallyNotJson.1251; - ret TotallyNotJson.1247; - -procedure TotallyNotJson.70 (#Derived_gen.0): - joinpoint TotallyNotJson.1198 TotallyNotJson.1166: - let TotallyNotJson.600 : List U8 = StructAtIndex 0 TotallyNotJson.1166; - inc 4 TotallyNotJson.600; - let TotallyNotJson.601 : List U8 = StructAtIndex 1 TotallyNotJson.1166; - let TotallyNotJson.1317 : U64 = 0i64; - let TotallyNotJson.602 : [C {}, C U8] = CallByName List.2 TotallyNotJson.600 TotallyNotJson.1317; - let TotallyNotJson.1316 : U64 = 1i64; - let TotallyNotJson.603 : [C {}, C U8] = CallByName List.2 TotallyNotJson.600 TotallyNotJson.1316; - let TotallyNotJson.1315 : U64 = 2i64; - let TotallyNotJson.604 : List U8 = CallByName List.38 TotallyNotJson.600 TotallyNotJson.1315; - let TotallyNotJson.1314 : U64 = 6i64; - let TotallyNotJson.605 : List U8 = CallByName List.38 TotallyNotJson.600 TotallyNotJson.1314; - let TotallyNotJson.1199 : {[C {}, C U8], [C {}, C U8]} = Struct {TotallyNotJson.602, TotallyNotJson.603}; - joinpoint TotallyNotJson.1279: - let TotallyNotJson.1278 : [C {}, C U8] = StructAtIndex 0 TotallyNotJson.1199; - let TotallyNotJson.616 : U8 = UnionAtIndex (Id 1) (Index 0) TotallyNotJson.1278; - let TotallyNotJson.1276 : U64 = 1i64; - let TotallyNotJson.1274 : List U8 = CallByName List.38 TotallyNotJson.600 TotallyNotJson.1276; - let TotallyNotJson.1275 : List U8 = CallByName List.4 TotallyNotJson.601 TotallyNotJson.616; - let TotallyNotJson.1273 : {List U8, List U8} = Struct {TotallyNotJson.1274, TotallyNotJson.1275}; - jump TotallyNotJson.1198 TotallyNotJson.1273; + let TotallyNotJson.1002 : U8 = CallByName TotallyNotJson.66 TotallyNotJson.559 TotallyNotJson.560; + let TotallyNotJson.1003 : U8 = CallByName TotallyNotJson.66 TotallyNotJson.561 TotallyNotJson.562; + let TotallyNotJson.1001 : List U8 = Array [TotallyNotJson.1002, TotallyNotJson.1003]; + ret TotallyNotJson.1001; + +procedure TotallyNotJson.68 (): + let TotallyNotJson.1046 : U8 = 102i64; + let TotallyNotJson.1047 : U8 = 102i64; + let TotallyNotJson.1048 : U8 = 100i64; + let TotallyNotJson.1049 : U8 = 100i64; + let TotallyNotJson.1045 : List U8 = CallByName TotallyNotJson.67 TotallyNotJson.1046 TotallyNotJson.1047 TotallyNotJson.1048 TotallyNotJson.1049; + ret TotallyNotJson.1045; + +procedure TotallyNotJson.69 (#Derived_gen.0): + joinpoint TotallyNotJson.996 TotallyNotJson.967: + let TotallyNotJson.563 : List U8 = StructAtIndex 0 TotallyNotJson.967; + inc 4 TotallyNotJson.563; + let TotallyNotJson.564 : List U8 = StructAtIndex 1 TotallyNotJson.967; + let TotallyNotJson.1115 : U64 = 0i64; + let TotallyNotJson.565 : [C {}, C U8] = CallByName List.2 TotallyNotJson.563 TotallyNotJson.1115; + let TotallyNotJson.1114 : U64 = 1i64; + let TotallyNotJson.566 : [C {}, C U8] = CallByName List.2 TotallyNotJson.563 TotallyNotJson.1114; + let TotallyNotJson.1113 : U64 = 2i64; + let TotallyNotJson.567 : List U8 = CallByName List.38 TotallyNotJson.563 TotallyNotJson.1113; + let TotallyNotJson.1112 : U64 = 6i64; + let TotallyNotJson.568 : List U8 = CallByName List.38 TotallyNotJson.563 TotallyNotJson.1112; + let TotallyNotJson.997 : {[C {}, C U8], [C {}, C U8]} = Struct {TotallyNotJson.565, TotallyNotJson.566}; + joinpoint TotallyNotJson.1077: + let TotallyNotJson.1076 : [C {}, C U8] = StructAtIndex 0 TotallyNotJson.997; + let TotallyNotJson.579 : U8 = UnionAtIndex (Id 1) (Index 0) TotallyNotJson.1076; + let TotallyNotJson.1074 : U64 = 1i64; + let TotallyNotJson.1072 : List U8 = CallByName List.38 TotallyNotJson.563 TotallyNotJson.1074; + let TotallyNotJson.1073 : List U8 = CallByName List.4 TotallyNotJson.564 TotallyNotJson.579; + let TotallyNotJson.1071 : {List U8, List U8} = Struct {TotallyNotJson.1072, TotallyNotJson.1073}; + jump TotallyNotJson.996 TotallyNotJson.1071; in - let TotallyNotJson.1310 : [C {}, C U8] = StructAtIndex 0 TotallyNotJson.1199; - let TotallyNotJson.1311 : U8 = 1i64; - let TotallyNotJson.1312 : U8 = GetTagId TotallyNotJson.1310; - let TotallyNotJson.1313 : Int1 = lowlevel Eq TotallyNotJson.1311 TotallyNotJson.1312; - if TotallyNotJson.1313 then - let TotallyNotJson.1306 : [C {}, C U8] = StructAtIndex 1 TotallyNotJson.1199; - let TotallyNotJson.1307 : U8 = 1i64; - let TotallyNotJson.1308 : U8 = GetTagId TotallyNotJson.1306; - let TotallyNotJson.1309 : Int1 = lowlevel Eq TotallyNotJson.1307 TotallyNotJson.1308; - if TotallyNotJson.1309 then - let TotallyNotJson.1305 : [C {}, C U8] = StructAtIndex 0 TotallyNotJson.1199; - let TotallyNotJson.607 : U8 = UnionAtIndex (Id 1) (Index 0) TotallyNotJson.1305; - let TotallyNotJson.1304 : [C {}, C U8] = StructAtIndex 1 TotallyNotJson.1199; - let TotallyNotJson.608 : U8 = UnionAtIndex (Id 1) (Index 0) TotallyNotJson.1304; - joinpoint TotallyNotJson.1298 TotallyNotJson.1280: - if TotallyNotJson.1280 then - dec TotallyNotJson.600; - let TotallyNotJson.1256 : U64 = lowlevel ListLen TotallyNotJson.604; - let TotallyNotJson.1257 : U64 = 4i64; - let TotallyNotJson.1258 : Int1 = lowlevel NumGte TotallyNotJson.1256 TotallyNotJson.1257; - if TotallyNotJson.1258 then - let TotallyNotJson.1255 : U64 = 0i64; - let TotallyNotJson.609 : U8 = lowlevel ListGetUnsafe TotallyNotJson.604 TotallyNotJson.1255; - let TotallyNotJson.1254 : U64 = 1i64; - let TotallyNotJson.610 : U8 = lowlevel ListGetUnsafe TotallyNotJson.604 TotallyNotJson.1254; - let TotallyNotJson.1253 : U64 = 2i64; - let TotallyNotJson.611 : U8 = lowlevel ListGetUnsafe TotallyNotJson.604 TotallyNotJson.1253; - let TotallyNotJson.1252 : U64 = 3i64; - let TotallyNotJson.612 : U8 = lowlevel ListGetUnsafe TotallyNotJson.604 TotallyNotJson.1252; - dec TotallyNotJson.604; - let TotallyNotJson.613 : List U8 = CallByName TotallyNotJson.68 TotallyNotJson.609 TotallyNotJson.610 TotallyNotJson.611 TotallyNotJson.612; - let TotallyNotJson.1202 : List U8 = CallByName List.8 TotallyNotJson.601 TotallyNotJson.613; - let TotallyNotJson.1201 : {List U8, List U8} = Struct {TotallyNotJson.605, TotallyNotJson.1202}; - jump TotallyNotJson.1198 TotallyNotJson.1201; + let TotallyNotJson.1108 : [C {}, C U8] = StructAtIndex 0 TotallyNotJson.997; + let TotallyNotJson.1109 : U8 = 1i64; + let TotallyNotJson.1110 : U8 = GetTagId TotallyNotJson.1108; + let TotallyNotJson.1111 : Int1 = lowlevel Eq TotallyNotJson.1109 TotallyNotJson.1110; + if TotallyNotJson.1111 then + let TotallyNotJson.1104 : [C {}, C U8] = StructAtIndex 1 TotallyNotJson.997; + let TotallyNotJson.1105 : U8 = 1i64; + let TotallyNotJson.1106 : U8 = GetTagId TotallyNotJson.1104; + let TotallyNotJson.1107 : Int1 = lowlevel Eq TotallyNotJson.1105 TotallyNotJson.1106; + if TotallyNotJson.1107 then + let TotallyNotJson.1103 : [C {}, C U8] = StructAtIndex 0 TotallyNotJson.997; + let TotallyNotJson.570 : U8 = UnionAtIndex (Id 1) (Index 0) TotallyNotJson.1103; + let TotallyNotJson.1102 : [C {}, C U8] = StructAtIndex 1 TotallyNotJson.997; + let TotallyNotJson.571 : U8 = UnionAtIndex (Id 1) (Index 0) TotallyNotJson.1102; + joinpoint TotallyNotJson.1096 TotallyNotJson.1078: + if TotallyNotJson.1078 then + dec TotallyNotJson.563; + let TotallyNotJson.1054 : U64 = lowlevel ListLen TotallyNotJson.567; + let TotallyNotJson.1055 : U64 = 4i64; + let TotallyNotJson.1056 : Int1 = lowlevel NumGte TotallyNotJson.1054 TotallyNotJson.1055; + if TotallyNotJson.1056 then + let TotallyNotJson.1053 : U64 = 0i64; + let TotallyNotJson.572 : U8 = lowlevel ListGetUnsafe TotallyNotJson.567 TotallyNotJson.1053; + let TotallyNotJson.1052 : U64 = 1i64; + let TotallyNotJson.573 : U8 = lowlevel ListGetUnsafe TotallyNotJson.567 TotallyNotJson.1052; + let TotallyNotJson.1051 : U64 = 2i64; + let TotallyNotJson.574 : U8 = lowlevel ListGetUnsafe TotallyNotJson.567 TotallyNotJson.1051; + let TotallyNotJson.1050 : U64 = 3i64; + let TotallyNotJson.575 : U8 = lowlevel ListGetUnsafe TotallyNotJson.567 TotallyNotJson.1050; + dec TotallyNotJson.567; + let TotallyNotJson.576 : List U8 = CallByName TotallyNotJson.67 TotallyNotJson.572 TotallyNotJson.573 TotallyNotJson.574 TotallyNotJson.575; + let TotallyNotJson.1000 : List U8 = CallByName List.8 TotallyNotJson.564 TotallyNotJson.576; + let TotallyNotJson.999 : {List U8, List U8} = Struct {TotallyNotJson.568, TotallyNotJson.1000}; + jump TotallyNotJson.996 TotallyNotJson.999; else - dec TotallyNotJson.605; - let TotallyNotJson.1246 : List U8 = CallByName TotallyNotJson.69; - let TotallyNotJson.1245 : List U8 = CallByName List.8 TotallyNotJson.601 TotallyNotJson.1246; - let TotallyNotJson.1244 : {List U8, List U8} = Struct {TotallyNotJson.604, TotallyNotJson.1245}; - jump TotallyNotJson.1198 TotallyNotJson.1244; + dec TotallyNotJson.568; + let TotallyNotJson.1044 : List U8 = CallByName TotallyNotJson.68; + let TotallyNotJson.1043 : List U8 = CallByName List.8 TotallyNotJson.564 TotallyNotJson.1044; + let TotallyNotJson.1042 : {List U8, List U8} = Struct {TotallyNotJson.567, TotallyNotJson.1043}; + jump TotallyNotJson.996 TotallyNotJson.1042; else - dec TotallyNotJson.605; - let TotallyNotJson.1297 : [C {}, C U8] = StructAtIndex 0 TotallyNotJson.1199; - let TotallyNotJson.614 : U8 = UnionAtIndex (Id 1) (Index 0) TotallyNotJson.1297; - let TotallyNotJson.1296 : [C {}, C U8] = StructAtIndex 1 TotallyNotJson.1199; - let TotallyNotJson.615 : U8 = UnionAtIndex (Id 1) (Index 0) TotallyNotJson.1296; - joinpoint TotallyNotJson.1282 TotallyNotJson.1281: - if TotallyNotJson.1281 then - dec TotallyNotJson.600; - let TotallyNotJson.1262 : U8 = CallByName TotallyNotJson.64 TotallyNotJson.615; - let TotallyNotJson.1261 : List U8 = CallByName List.4 TotallyNotJson.601 TotallyNotJson.1262; - let TotallyNotJson.1260 : {List U8, List U8} = Struct {TotallyNotJson.604, TotallyNotJson.1261}; - jump TotallyNotJson.1198 TotallyNotJson.1260; + dec TotallyNotJson.568; + let TotallyNotJson.1095 : [C {}, C U8] = StructAtIndex 0 TotallyNotJson.997; + let TotallyNotJson.577 : U8 = UnionAtIndex (Id 1) (Index 0) TotallyNotJson.1095; + let TotallyNotJson.1094 : [C {}, C U8] = StructAtIndex 1 TotallyNotJson.997; + let TotallyNotJson.578 : U8 = UnionAtIndex (Id 1) (Index 0) TotallyNotJson.1094; + joinpoint TotallyNotJson.1080 TotallyNotJson.1079: + if TotallyNotJson.1079 then + dec TotallyNotJson.563; + let TotallyNotJson.1060 : U8 = CallByName TotallyNotJson.63 TotallyNotJson.578; + let TotallyNotJson.1059 : List U8 = CallByName List.4 TotallyNotJson.564 TotallyNotJson.1060; + let TotallyNotJson.1058 : {List U8, List U8} = Struct {TotallyNotJson.567, TotallyNotJson.1059}; + jump TotallyNotJson.996 TotallyNotJson.1058; else - dec TotallyNotJson.604; - jump TotallyNotJson.1279; + dec TotallyNotJson.567; + jump TotallyNotJson.1077; in - let TotallyNotJson.1295 : U8 = 92i64; - let TotallyNotJson.1284 : Int1 = CallByName Bool.11 TotallyNotJson.614 TotallyNotJson.1295; - let TotallyNotJson.1285 : Int1 = CallByName TotallyNotJson.63 TotallyNotJson.615; - let TotallyNotJson.1283 : Int1 = CallByName Bool.3 TotallyNotJson.1284 TotallyNotJson.1285; - jump TotallyNotJson.1282 TotallyNotJson.1283; + let TotallyNotJson.1093 : U8 = 92i64; + let TotallyNotJson.1082 : Int1 = CallByName Bool.11 TotallyNotJson.577 TotallyNotJson.1093; + let TotallyNotJson.1083 : Int1 = CallByName TotallyNotJson.62 TotallyNotJson.578; + let TotallyNotJson.1081 : Int1 = CallByName Bool.3 TotallyNotJson.1082 TotallyNotJson.1083; + jump TotallyNotJson.1080 TotallyNotJson.1081; in - let TotallyNotJson.1303 : U8 = 92i64; - let TotallyNotJson.1300 : Int1 = CallByName Bool.11 TotallyNotJson.607 TotallyNotJson.1303; - let TotallyNotJson.1302 : U8 = 117i64; - let TotallyNotJson.1301 : Int1 = CallByName Bool.11 TotallyNotJson.608 TotallyNotJson.1302; - let TotallyNotJson.1299 : Int1 = CallByName Bool.3 TotallyNotJson.1300 TotallyNotJson.1301; - jump TotallyNotJson.1298 TotallyNotJson.1299; + let TotallyNotJson.1101 : U8 = 92i64; + let TotallyNotJson.1098 : Int1 = CallByName Bool.11 TotallyNotJson.570 TotallyNotJson.1101; + let TotallyNotJson.1100 : U8 = 117i64; + let TotallyNotJson.1099 : Int1 = CallByName Bool.11 TotallyNotJson.571 TotallyNotJson.1100; + let TotallyNotJson.1097 : Int1 = CallByName Bool.3 TotallyNotJson.1098 TotallyNotJson.1099; + jump TotallyNotJson.1096 TotallyNotJson.1097; else - dec TotallyNotJson.605; - dec TotallyNotJson.604; - jump TotallyNotJson.1279; + dec TotallyNotJson.568; + dec TotallyNotJson.567; + jump TotallyNotJson.1077; else - dec TotallyNotJson.605; - dec TotallyNotJson.604; - let TotallyNotJson.1277 : {List U8, List U8} = Struct {TotallyNotJson.600, TotallyNotJson.601}; - ret TotallyNotJson.1277; + dec TotallyNotJson.568; + dec TotallyNotJson.567; + let TotallyNotJson.1075 : {List U8, List U8} = Struct {TotallyNotJson.563, TotallyNotJson.564}; + ret TotallyNotJson.1075; in - jump TotallyNotJson.1198 #Derived_gen.0; + jump TotallyNotJson.996 #Derived_gen.0; procedure TotallyNotJson.8 (): - let TotallyNotJson.1172 : [C , C [], C , C , C , C ] = TagId(2) ; - ret TotallyNotJson.1172; + let TotallyNotJson.970 : {} = Struct {}; + ret TotallyNotJson.970; diff --git a/crates/compiler/test_mono/generated/issue_4770.txt b/crates/compiler/test_mono/generated/issue_4770.txt index d1d59b8a8fd..e2643116fda 100644 --- a/crates/compiler/test_mono/generated/issue_4770.txt +++ b/crates/compiler/test_mono/generated/issue_4770.txt @@ -6,92 +6,92 @@ 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; - ret Num.291; + let Num.303 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; + ret Num.303; procedure Num.22 (#Attr.2, #Attr.3): - let Num.294 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; - ret Num.294; + let Num.306 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; + ret Num.306; procedure Num.51 (#Attr.2, #Attr.3): - let Num.293 : U64 = lowlevel NumAddWrap #Attr.2 #Attr.3; - ret Num.293; + let Num.305 : U64 = lowlevel NumAddWrap #Attr.2 #Attr.3; + ret Num.305; procedure Test.1 (#Derived_gen.0): joinpoint Test.26 Test.6: 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 449451bdf79..3e62764afa4 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 @@ -30,221 +30,221 @@ procedure Decode.24 (Decode.101): ret Decode.101; procedure Decode.25 (Decode.102, Decode.121, Decode.104): - let Decode.124 : {List U8, [C {}, C Str]} = CallByName TotallyNotJson.525 Decode.102 Decode.104; + let Decode.124 : {List U8, [C {}, C Str]} = CallByName TotallyNotJson.488 Decode.102 Decode.104; ret Decode.124; procedure Decode.26 (Decode.105, Decode.106): - let Decode.123 : {} = CallByName TotallyNotJson.60; + let Decode.123 : {} = CallByName TotallyNotJson.59; 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.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.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.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.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.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; - -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; + dec List.106; + let List.608 : {} = Struct {}; + let List.607 : [C {}, C U8] = TagId(0) List.608; + ret List.607; + +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; - -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.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.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.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; + 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.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.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.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.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; - -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; + let List.591 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; + ret List.591; + +procedure List.80 (#Derived_gen.1, #Derived_gen.2, #Derived_gen.3, #Derived_gen.4, #Derived_gen.5): + 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.61 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.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; - ret Num.294; + let Num.306 : U8 = lowlevel NumAdd #Attr.2 #Attr.3; + ret Num.306; procedure Num.19 (#Attr.2, #Attr.3): - let Num.303 : U64 = lowlevel NumAdd #Attr.2 #Attr.3; - ret Num.303; + let Num.315 : U64 = lowlevel NumAdd #Attr.2 #Attr.3; + ret Num.315; procedure Num.20 (#Attr.2, #Attr.3): - let Num.306 : U8 = lowlevel NumSub #Attr.2 #Attr.3; - ret Num.306; + let Num.318 : U8 = lowlevel NumSub #Attr.2 #Attr.3; + ret Num.318; procedure Num.22 (#Attr.2, #Attr.3): - let Num.328 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; - ret Num.328; + let Num.340 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; + ret Num.340; procedure Num.23 (#Attr.2, #Attr.3): - let Num.312 : Int1 = lowlevel NumLte #Attr.2 #Attr.3; - ret Num.312; + let Num.324 : Int1 = lowlevel NumLte #Attr.2 #Attr.3; + ret Num.324; procedure Num.25 (#Attr.2, #Attr.3): - let Num.318 : Int1 = lowlevel NumGte #Attr.2 #Attr.3; - ret Num.318; + let Num.330 : Int1 = lowlevel NumGte #Attr.2 #Attr.3; + ret Num.330; procedure Num.51 (#Attr.2, #Attr.3): - let Num.329 : U64 = lowlevel NumAddWrap #Attr.2 #Attr.3; - ret Num.329; + let Num.341 : U64 = lowlevel NumAddWrap #Attr.2 #Attr.3; + ret Num.341; procedure Num.71 (#Attr.2, #Attr.3): - let Num.291 : U8 = lowlevel NumBitwiseOr #Attr.2 #Attr.3; - ret Num.291; + let Num.303 : U8 = lowlevel NumBitwiseOr #Attr.2 #Attr.3; + ret Num.303; procedure Num.72 (#Attr.2, #Attr.3): - let Num.292 : U8 = lowlevel NumShiftLeftBy #Attr.2 #Attr.3; - ret Num.292; + let Num.304 : U8 = lowlevel NumShiftLeftBy #Attr.2 #Attr.3; + ret Num.304; procedure Num.77 (#Attr.2, #Attr.3): - let Num.325 : U64 = lowlevel NumSubSaturated #Attr.2 #Attr.3; - ret Num.325; + let Num.337 : U64 = lowlevel NumSubSaturated #Attr.2 #Attr.3; + ret Num.337; procedure Str.12 (#Attr.2): - let Str.301 : List U8 = lowlevel StrToUtf8 #Attr.2; - ret Str.301; - -procedure Str.27 (Str.100): - let Str.292 : [C {}, C I64] = CallByName Str.73 Str.100; - ret Str.292; - -procedure Str.47 (#Attr.2): - let Str.300 : {I64, U8} = lowlevel StrToNum #Attr.2; - ret Str.300; - -procedure Str.48 (#Attr.2, #Attr.3, #Attr.4): - let Str.311 : {U64, Str, Int1, U8} = lowlevel StrFromUtf8Range #Attr.2 #Attr.3 #Attr.4; - ret Str.311; - -procedure Str.73 (Str.236): - let Str.237 : {I64, U8} = CallByName Str.47 Str.236; - dec Str.236; - let Str.298 : U8 = StructAtIndex 1 Str.237; - let Str.299 : U8 = 0i64; - let Str.295 : Int1 = CallByName Bool.11 Str.298 Str.299; - if Str.295 then - let Str.297 : I64 = StructAtIndex 0 Str.237; - let Str.296 : [C {}, C I64] = TagId(1) Str.297; - ret Str.296; + let Str.260 : List U8 = lowlevel StrToUtf8 #Attr.2; + ret Str.260; + +procedure Str.27 (Str.88): + let Str.251 : [C {}, C I64] = CallByName Str.61 Str.88; + ret Str.251; + +procedure Str.42 (#Attr.2): + let Str.259 : {I64, U8} = lowlevel StrToNum #Attr.2; + ret Str.259; + +procedure Str.43 (#Attr.2, #Attr.3, #Attr.4): + let Str.270 : {U64, Str, Int1, U8} = lowlevel StrFromUtf8Range #Attr.2 #Attr.3 #Attr.4; + ret Str.270; + +procedure Str.61 (Str.195): + let Str.196 : {I64, U8} = CallByName Str.42 Str.195; + dec Str.195; + let Str.257 : U8 = StructAtIndex 1 Str.196; + let Str.258 : U8 = 0i64; + let Str.254 : Int1 = CallByName Bool.11 Str.257 Str.258; + if Str.254 then + let Str.256 : I64 = StructAtIndex 0 Str.196; + let Str.255 : [C {}, C I64] = TagId(1) Str.256; + ret Str.255; else - let Str.294 : {} = Struct {}; - let Str.293 : [C {}, C I64] = TagId(0) Str.294; - ret Str.293; - -procedure Str.9 (Str.80): - let Str.309 : U64 = 0i64; - let Str.310 : U64 = CallByName List.6 Str.80; - let Str.81 : {U64, Str, Int1, U8} = CallByName Str.48 Str.80 Str.309 Str.310; - let Str.306 : Int1 = StructAtIndex 2 Str.81; - if Str.306 then - let Str.308 : Str = StructAtIndex 1 Str.81; - let Str.307 : [C {U64, U8}, C Str] = TagId(1) Str.308; - ret Str.307; + let Str.253 : {} = Struct {}; + let Str.252 : [C {}, C I64] = TagId(0) Str.253; + ret Str.252; + +procedure Str.9 (Str.68): + let Str.268 : U64 = 0i64; + let Str.269 : U64 = CallByName List.6 Str.68; + let Str.69 : {U64, Str, Int1, U8} = CallByName Str.43 Str.68 Str.268 Str.269; + let Str.265 : Int1 = StructAtIndex 2 Str.69; + if Str.265 then + let Str.267 : Str = StructAtIndex 1 Str.69; + let Str.266 : [C {U64, U8}, C Str] = TagId(1) Str.267; + ret Str.266; else - let Str.304 : U8 = StructAtIndex 3 Str.81; - let Str.305 : U64 = StructAtIndex 0 Str.81; - let #Derived_gen.6 : Str = StructAtIndex 1 Str.81; - dec #Derived_gen.6; - let Str.303 : {U64, U8} = Struct {Str.305, Str.304}; - let Str.302 : [C {U64, U8}, C Str] = TagId(0) Str.303; - ret Str.302; + let Str.263 : U8 = StructAtIndex 3 Str.69; + let Str.264 : U64 = StructAtIndex 0 Str.69; + let #Derived_gen.7 : Str = StructAtIndex 1 Str.69; + dec #Derived_gen.7; + let Str.262 : {U64, U8} = Struct {Str.264, Str.263}; + let Str.261 : [C {U64, U8}, C Str] = TagId(0) Str.262; + ret Str.261; procedure Test.0 (): let Test.37 : Str = "-1234"; let Test.35 : List U8 = CallByName Str.12 Test.37; - let Test.36 : [C , C [], C , C , C , C ] = CallByName TotallyNotJson.8; + let Test.36 : {} = CallByName TotallyNotJson.8; let Test.34 : {List U8, [C {}, C Str]} = CallByName Decode.26 Test.35 Test.36; let Test.2 : List U8 = StructAtIndex 0 Test.34; let Test.1 : [C {}, C Str] = StructAtIndex 1 Test.34; @@ -287,571 +287,571 @@ procedure Test.12 (): let Test.13 : {} = Struct {}; ret Test.13; -procedure TotallyNotJson.525 (TotallyNotJson.526, TotallyNotJson.1175): - joinpoint TotallyNotJson.1459: - inc TotallyNotJson.526; - let TotallyNotJson.1328 : {List U8, List U8} = CallByName TotallyNotJson.61 TotallyNotJson.526; - let TotallyNotJson.530 : List U8 = StructAtIndex 0 TotallyNotJson.1328; - let TotallyNotJson.529 : List U8 = StructAtIndex 1 TotallyNotJson.1328; - inc TotallyNotJson.529; - let TotallyNotJson.1324 : Int1 = CallByName List.1 TotallyNotJson.529; - if TotallyNotJson.1324 then - dec TotallyNotJson.530; - dec TotallyNotJson.529; - let TotallyNotJson.1327 : {} = Struct {}; - let TotallyNotJson.1326 : [C {}, C Str] = TagId(0) TotallyNotJson.1327; - let TotallyNotJson.1325 : {List U8, [C {}, C Str]} = Struct {TotallyNotJson.526, TotallyNotJson.1326}; - ret TotallyNotJson.1325; +procedure TotallyNotJson.488 (TotallyNotJson.489, TotallyNotJson.973): + joinpoint TotallyNotJson.1257: + inc TotallyNotJson.489; + let TotallyNotJson.1126 : {List U8, List U8} = CallByName TotallyNotJson.60 TotallyNotJson.489; + let TotallyNotJson.493 : List U8 = StructAtIndex 0 TotallyNotJson.1126; + let TotallyNotJson.492 : List U8 = StructAtIndex 1 TotallyNotJson.1126; + inc TotallyNotJson.492; + let TotallyNotJson.1122 : Int1 = CallByName List.1 TotallyNotJson.492; + if TotallyNotJson.1122 then + dec TotallyNotJson.492; + dec TotallyNotJson.493; + let TotallyNotJson.1125 : {} = Struct {}; + let TotallyNotJson.1124 : [C {}, C Str] = TagId(0) TotallyNotJson.1125; + let TotallyNotJson.1123 : {List U8, [C {}, C Str]} = Struct {TotallyNotJson.489, TotallyNotJson.1124}; + ret TotallyNotJson.1123; else - let TotallyNotJson.1322 : U64 = CallByName List.6 TotallyNotJson.529; - let TotallyNotJson.1323 : U64 = 2i64; - let TotallyNotJson.1320 : U64 = CallByName Num.77 TotallyNotJson.1322 TotallyNotJson.1323; - let TotallyNotJson.1321 : U64 = 1i64; - let TotallyNotJson.1319 : {U64, U64} = Struct {TotallyNotJson.1320, TotallyNotJson.1321}; - let TotallyNotJson.1194 : List U8 = CallByName List.49 TotallyNotJson.529 TotallyNotJson.1319; - let TotallyNotJson.1195 : {} = Struct {}; - let TotallyNotJson.1190 : {List U8, List U8} = CallByName TotallyNotJson.534 TotallyNotJson.1194; - let TotallyNotJson.1191 : {} = Struct {}; - let TotallyNotJson.1189 : List U8 = CallByName TotallyNotJson.536 TotallyNotJson.1190; - let TotallyNotJson.533 : [C {U64, U8}, C Str] = CallByName Str.9 TotallyNotJson.1189; - let TotallyNotJson.1186 : U8 = 1i64; - let TotallyNotJson.1187 : U8 = GetTagId TotallyNotJson.533; - let TotallyNotJson.1188 : Int1 = lowlevel Eq TotallyNotJson.1186 TotallyNotJson.1187; - if TotallyNotJson.1188 then - dec TotallyNotJson.526; - let TotallyNotJson.537 : Str = UnionAtIndex (Id 1) (Index 0) TotallyNotJson.533; - let TotallyNotJson.1182 : [C {}, C Str] = TagId(1) TotallyNotJson.537; - let TotallyNotJson.1181 : {List U8, [C {}, C Str]} = Struct {TotallyNotJson.530, TotallyNotJson.1182}; - ret TotallyNotJson.1181; + let TotallyNotJson.1120 : U64 = CallByName List.6 TotallyNotJson.492; + let TotallyNotJson.1121 : U64 = 2i64; + let TotallyNotJson.1118 : U64 = CallByName Num.77 TotallyNotJson.1120 TotallyNotJson.1121; + let TotallyNotJson.1119 : U64 = 1i64; + let TotallyNotJson.1117 : {U64, U64} = Struct {TotallyNotJson.1118, TotallyNotJson.1119}; + let TotallyNotJson.992 : List U8 = CallByName List.49 TotallyNotJson.492 TotallyNotJson.1117; + let TotallyNotJson.993 : {} = Struct {}; + let TotallyNotJson.988 : {List U8, List U8} = CallByName TotallyNotJson.497 TotallyNotJson.992; + let TotallyNotJson.989 : {} = Struct {}; + let TotallyNotJson.987 : List U8 = CallByName TotallyNotJson.499 TotallyNotJson.988; + let TotallyNotJson.496 : [C {U64, U8}, C Str] = CallByName Str.9 TotallyNotJson.987; + let TotallyNotJson.984 : U8 = 1i64; + let TotallyNotJson.985 : U8 = GetTagId TotallyNotJson.496; + let TotallyNotJson.986 : Int1 = lowlevel Eq TotallyNotJson.984 TotallyNotJson.985; + if TotallyNotJson.986 then + dec TotallyNotJson.489; + let TotallyNotJson.500 : Str = UnionAtIndex (Id 1) (Index 0) TotallyNotJson.496; + let TotallyNotJson.980 : [C {}, C Str] = TagId(1) TotallyNotJson.500; + let TotallyNotJson.979 : {List U8, [C {}, C Str]} = Struct {TotallyNotJson.493, TotallyNotJson.980}; + ret TotallyNotJson.979; else - dec TotallyNotJson.530; - dec TotallyNotJson.533; - let TotallyNotJson.1185 : {} = Struct {}; - let TotallyNotJson.1184 : [C {}, C Str] = TagId(0) TotallyNotJson.1185; - let TotallyNotJson.1183 : {List U8, [C {}, C Str]} = Struct {TotallyNotJson.526, TotallyNotJson.1184}; - ret TotallyNotJson.1183; + dec TotallyNotJson.493; + dec TotallyNotJson.496; + let TotallyNotJson.983 : {} = Struct {}; + let TotallyNotJson.982 : [C {}, C Str] = TagId(0) TotallyNotJson.983; + let TotallyNotJson.981 : {List U8, [C {}, C Str]} = Struct {TotallyNotJson.489, TotallyNotJson.982}; + ret TotallyNotJson.981; in - let TotallyNotJson.1457 : U64 = lowlevel ListLen TotallyNotJson.526; - let TotallyNotJson.1458 : U64 = 4i64; - let TotallyNotJson.1464 : Int1 = lowlevel NumGte TotallyNotJson.1457 TotallyNotJson.1458; - if TotallyNotJson.1464 then - let TotallyNotJson.1454 : U64 = 3i64; - let TotallyNotJson.1455 : U8 = lowlevel ListGetUnsafe TotallyNotJson.526 TotallyNotJson.1454; - let TotallyNotJson.1456 : U8 = 108i64; - let TotallyNotJson.1463 : Int1 = lowlevel Eq TotallyNotJson.1456 TotallyNotJson.1455; - if TotallyNotJson.1463 then - let TotallyNotJson.1451 : U64 = 2i64; - let TotallyNotJson.1452 : U8 = lowlevel ListGetUnsafe TotallyNotJson.526 TotallyNotJson.1451; - let TotallyNotJson.1453 : U8 = 108i64; - let TotallyNotJson.1462 : Int1 = lowlevel Eq TotallyNotJson.1453 TotallyNotJson.1452; - if TotallyNotJson.1462 then - let TotallyNotJson.1448 : U64 = 1i64; - let TotallyNotJson.1449 : U8 = lowlevel ListGetUnsafe TotallyNotJson.526 TotallyNotJson.1448; - let TotallyNotJson.1450 : U8 = 117i64; - let TotallyNotJson.1461 : Int1 = lowlevel Eq TotallyNotJson.1450 TotallyNotJson.1449; - if TotallyNotJson.1461 then - let TotallyNotJson.1445 : U64 = 0i64; - let TotallyNotJson.1446 : U8 = lowlevel ListGetUnsafe TotallyNotJson.526 TotallyNotJson.1445; - let TotallyNotJson.1447 : U8 = 110i64; - let TotallyNotJson.1460 : Int1 = lowlevel Eq TotallyNotJson.1447 TotallyNotJson.1446; - if TotallyNotJson.1460 then - let TotallyNotJson.1180 : U64 = 4i64; - let TotallyNotJson.1177 : List U8 = CallByName List.38 TotallyNotJson.526 TotallyNotJson.1180; - let TotallyNotJson.1179 : Str = "null"; - let TotallyNotJson.1178 : [C {}, C Str] = TagId(1) TotallyNotJson.1179; - let TotallyNotJson.1176 : {List U8, [C {}, C Str]} = Struct {TotallyNotJson.1177, TotallyNotJson.1178}; - ret TotallyNotJson.1176; + let TotallyNotJson.1255 : U64 = lowlevel ListLen TotallyNotJson.489; + let TotallyNotJson.1256 : U64 = 4i64; + let TotallyNotJson.1262 : Int1 = lowlevel NumGte TotallyNotJson.1255 TotallyNotJson.1256; + if TotallyNotJson.1262 then + let TotallyNotJson.1252 : U64 = 3i64; + let TotallyNotJson.1253 : U8 = lowlevel ListGetUnsafe TotallyNotJson.489 TotallyNotJson.1252; + let TotallyNotJson.1254 : U8 = 108i64; + let TotallyNotJson.1261 : Int1 = lowlevel Eq TotallyNotJson.1254 TotallyNotJson.1253; + if TotallyNotJson.1261 then + let TotallyNotJson.1249 : U64 = 2i64; + let TotallyNotJson.1250 : U8 = lowlevel ListGetUnsafe TotallyNotJson.489 TotallyNotJson.1249; + let TotallyNotJson.1251 : U8 = 108i64; + let TotallyNotJson.1260 : Int1 = lowlevel Eq TotallyNotJson.1251 TotallyNotJson.1250; + if TotallyNotJson.1260 then + let TotallyNotJson.1246 : U64 = 1i64; + let TotallyNotJson.1247 : U8 = lowlevel ListGetUnsafe TotallyNotJson.489 TotallyNotJson.1246; + let TotallyNotJson.1248 : U8 = 117i64; + let TotallyNotJson.1259 : Int1 = lowlevel Eq TotallyNotJson.1248 TotallyNotJson.1247; + if TotallyNotJson.1259 then + let TotallyNotJson.1243 : U64 = 0i64; + let TotallyNotJson.1244 : U8 = lowlevel ListGetUnsafe TotallyNotJson.489 TotallyNotJson.1243; + let TotallyNotJson.1245 : U8 = 110i64; + let TotallyNotJson.1258 : Int1 = lowlevel Eq TotallyNotJson.1245 TotallyNotJson.1244; + if TotallyNotJson.1258 then + let TotallyNotJson.978 : U64 = 4i64; + let TotallyNotJson.975 : List U8 = CallByName List.38 TotallyNotJson.489 TotallyNotJson.978; + let TotallyNotJson.977 : Str = "null"; + let TotallyNotJson.976 : [C {}, C Str] = TagId(1) TotallyNotJson.977; + let TotallyNotJson.974 : {List U8, [C {}, C Str]} = Struct {TotallyNotJson.975, TotallyNotJson.976}; + ret TotallyNotJson.974; else - jump TotallyNotJson.1459; + jump TotallyNotJson.1257; else - jump TotallyNotJson.1459; + jump TotallyNotJson.1257; else - jump TotallyNotJson.1459; + jump TotallyNotJson.1257; else - jump TotallyNotJson.1459; + jump TotallyNotJson.1257; else - jump TotallyNotJson.1459; - -procedure TotallyNotJson.534 (TotallyNotJson.535): - let TotallyNotJson.1318 : List U8 = Array []; - let TotallyNotJson.1197 : {List U8, List U8} = Struct {TotallyNotJson.535, TotallyNotJson.1318}; - let TotallyNotJson.1196 : {List U8, List U8} = CallByName TotallyNotJson.70 TotallyNotJson.1197; - ret TotallyNotJson.1196; - -procedure TotallyNotJson.536 (TotallyNotJson.1192): - let TotallyNotJson.1193 : List U8 = StructAtIndex 1 TotallyNotJson.1192; - let #Derived_gen.7 : List U8 = StructAtIndex 0 TotallyNotJson.1192; - dec #Derived_gen.7; - ret TotallyNotJson.1193; - -procedure TotallyNotJson.60 (): - let TotallyNotJson.1174 : {} = Struct {}; - let TotallyNotJson.1173 : {} = CallByName Decode.24 TotallyNotJson.1174; - ret TotallyNotJson.1173; - -procedure TotallyNotJson.61 (TotallyNotJson.541): - let TotallyNotJson.1340 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = TagId(4) ; - let TotallyNotJson.1341 : {} = Struct {}; - inc TotallyNotJson.541; - let TotallyNotJson.1329 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = CallByName List.26 TotallyNotJson.541 TotallyNotJson.1340 TotallyNotJson.1341; - let TotallyNotJson.1337 : U8 = 2i64; - let TotallyNotJson.1338 : U8 = GetTagId TotallyNotJson.1329; - let TotallyNotJson.1339 : Int1 = lowlevel Eq TotallyNotJson.1337 TotallyNotJson.1338; - if TotallyNotJson.1339 then - inc TotallyNotJson.541; - let TotallyNotJson.543 : U64 = UnionAtIndex (Id 2) (Index 0) TotallyNotJson.1329; - let TotallyNotJson.1331 : List U8 = CallByName List.38 TotallyNotJson.541 TotallyNotJson.543; - let TotallyNotJson.1334 : U64 = 0i64; - let TotallyNotJson.1333 : {U64, U64} = Struct {TotallyNotJson.543, TotallyNotJson.1334}; - let TotallyNotJson.1332 : List U8 = CallByName List.49 TotallyNotJson.541 TotallyNotJson.1333; - let TotallyNotJson.1330 : {List U8, List U8} = Struct {TotallyNotJson.1331, TotallyNotJson.1332}; - ret TotallyNotJson.1330; + jump TotallyNotJson.1257; + +procedure TotallyNotJson.497 (TotallyNotJson.498): + let TotallyNotJson.1116 : List U8 = Array []; + let TotallyNotJson.995 : {List U8, List U8} = Struct {TotallyNotJson.498, TotallyNotJson.1116}; + let TotallyNotJson.994 : {List U8, List U8} = CallByName TotallyNotJson.69 TotallyNotJson.995; + ret TotallyNotJson.994; + +procedure TotallyNotJson.499 (TotallyNotJson.990): + let TotallyNotJson.991 : List U8 = StructAtIndex 1 TotallyNotJson.990; + let #Derived_gen.6 : List U8 = StructAtIndex 0 TotallyNotJson.990; + dec #Derived_gen.6; + ret TotallyNotJson.991; + +procedure TotallyNotJson.59 (): + let TotallyNotJson.972 : {} = Struct {}; + let TotallyNotJson.971 : {} = CallByName Decode.24 TotallyNotJson.972; + ret TotallyNotJson.971; + +procedure TotallyNotJson.60 (TotallyNotJson.504): + let TotallyNotJson.1138 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = TagId(4) ; + let TotallyNotJson.1139 : {} = Struct {}; + inc TotallyNotJson.504; + let TotallyNotJson.1127 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = CallByName List.26 TotallyNotJson.504 TotallyNotJson.1138 TotallyNotJson.1139; + let TotallyNotJson.1135 : U8 = 2i64; + let TotallyNotJson.1136 : U8 = GetTagId TotallyNotJson.1127; + let TotallyNotJson.1137 : Int1 = lowlevel Eq TotallyNotJson.1135 TotallyNotJson.1136; + if TotallyNotJson.1137 then + inc TotallyNotJson.504; + let TotallyNotJson.506 : U64 = UnionAtIndex (Id 2) (Index 0) TotallyNotJson.1127; + let TotallyNotJson.1129 : List U8 = CallByName List.38 TotallyNotJson.504 TotallyNotJson.506; + let TotallyNotJson.1132 : U64 = 0i64; + let TotallyNotJson.1131 : {U64, U64} = Struct {TotallyNotJson.506, TotallyNotJson.1132}; + let TotallyNotJson.1130 : List U8 = CallByName List.49 TotallyNotJson.504 TotallyNotJson.1131; + let TotallyNotJson.1128 : {List U8, List U8} = Struct {TotallyNotJson.1129, TotallyNotJson.1130}; + ret TotallyNotJson.1128; else - let TotallyNotJson.1336 : List U8 = Array []; - let TotallyNotJson.1335 : {List U8, List U8} = Struct {TotallyNotJson.541, TotallyNotJson.1336}; - ret TotallyNotJson.1335; - -procedure TotallyNotJson.62 (TotallyNotJson.544, TotallyNotJson.545): - let TotallyNotJson.1342 : {[C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64], U8} = Struct {TotallyNotJson.544, TotallyNotJson.545}; - joinpoint TotallyNotJson.1385: - let TotallyNotJson.1383 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = TagId(3) ; - let TotallyNotJson.1382 : [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) TotallyNotJson.1383; - ret TotallyNotJson.1382; + let TotallyNotJson.1134 : List U8 = Array []; + let TotallyNotJson.1133 : {List U8, List U8} = Struct {TotallyNotJson.504, TotallyNotJson.1134}; + ret TotallyNotJson.1133; + +procedure TotallyNotJson.61 (TotallyNotJson.507, TotallyNotJson.508): + let TotallyNotJson.1140 : {[C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64], U8} = Struct {TotallyNotJson.507, TotallyNotJson.508}; + joinpoint TotallyNotJson.1183: + let TotallyNotJson.1181 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = TagId(3) ; + let TotallyNotJson.1180 : [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) TotallyNotJson.1181; + ret TotallyNotJson.1180; in - let TotallyNotJson.1386 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = StructAtIndex 0 TotallyNotJson.1342; - let TotallyNotJson.1444 : U8 = GetTagId TotallyNotJson.1386; - switch TotallyNotJson.1444: + let TotallyNotJson.1184 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = StructAtIndex 0 TotallyNotJson.1140; + let TotallyNotJson.1242 : U8 = GetTagId TotallyNotJson.1184; + switch TotallyNotJson.1242: case 4: - let TotallyNotJson.546 : U8 = StructAtIndex 1 TotallyNotJson.1342; - joinpoint TotallyNotJson.1388 TotallyNotJson.1387: - if TotallyNotJson.1387 then - let TotallyNotJson.1345 : U64 = 1i64; - let TotallyNotJson.1344 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = TagId(0) TotallyNotJson.1345; - let TotallyNotJson.1343 : [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) TotallyNotJson.1344; - ret TotallyNotJson.1343; + let TotallyNotJson.509 : U8 = StructAtIndex 1 TotallyNotJson.1140; + joinpoint TotallyNotJson.1186 TotallyNotJson.1185: + if TotallyNotJson.1185 then + let TotallyNotJson.1143 : U64 = 1i64; + let TotallyNotJson.1142 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = TagId(0) TotallyNotJson.1143; + let TotallyNotJson.1141 : [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) TotallyNotJson.1142; + ret TotallyNotJson.1141; else - jump TotallyNotJson.1385; + jump TotallyNotJson.1183; in - let TotallyNotJson.1390 : U8 = 34i64; - let TotallyNotJson.1389 : Int1 = CallByName Bool.11 TotallyNotJson.546 TotallyNotJson.1390; - jump TotallyNotJson.1388 TotallyNotJson.1389; + let TotallyNotJson.1188 : U8 = 34i64; + let TotallyNotJson.1187 : Int1 = CallByName Bool.11 TotallyNotJson.509 TotallyNotJson.1188; + jump TotallyNotJson.1186 TotallyNotJson.1187; case 0: - let TotallyNotJson.1401 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = StructAtIndex 0 TotallyNotJson.1342; - let TotallyNotJson.549 : U64 = UnionAtIndex (Id 0) (Index 0) TotallyNotJson.1401; - let TotallyNotJson.550 : U8 = StructAtIndex 1 TotallyNotJson.1342; - joinpoint TotallyNotJson.1398 TotallyNotJson.1392: - if TotallyNotJson.1392 then - let TotallyNotJson.1349 : U64 = 1i64; - let TotallyNotJson.1348 : U64 = CallByName Num.19 TotallyNotJson.549 TotallyNotJson.1349; - let TotallyNotJson.1347 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = TagId(2) TotallyNotJson.1348; - let TotallyNotJson.1346 : [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) TotallyNotJson.1347; - ret TotallyNotJson.1346; + let TotallyNotJson.1199 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = StructAtIndex 0 TotallyNotJson.1140; + let TotallyNotJson.512 : U64 = UnionAtIndex (Id 0) (Index 0) TotallyNotJson.1199; + let TotallyNotJson.513 : U8 = StructAtIndex 1 TotallyNotJson.1140; + joinpoint TotallyNotJson.1196 TotallyNotJson.1190: + if TotallyNotJson.1190 then + let TotallyNotJson.1147 : U64 = 1i64; + let TotallyNotJson.1146 : U64 = CallByName Num.19 TotallyNotJson.512 TotallyNotJson.1147; + let TotallyNotJson.1145 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = TagId(2) TotallyNotJson.1146; + let TotallyNotJson.1144 : [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) TotallyNotJson.1145; + ret TotallyNotJson.1144; else - let TotallyNotJson.1397 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = StructAtIndex 0 TotallyNotJson.1342; - let TotallyNotJson.553 : U64 = UnionAtIndex (Id 0) (Index 0) TotallyNotJson.1397; - let TotallyNotJson.554 : U8 = StructAtIndex 1 TotallyNotJson.1342; - joinpoint TotallyNotJson.1394 TotallyNotJson.1393: - if TotallyNotJson.1393 then - let TotallyNotJson.1353 : U64 = 1i64; - let TotallyNotJson.1352 : U64 = CallByName Num.19 TotallyNotJson.553 TotallyNotJson.1353; - let TotallyNotJson.1351 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = TagId(1) TotallyNotJson.1352; - let TotallyNotJson.1350 : [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) TotallyNotJson.1351; - ret TotallyNotJson.1350; + let TotallyNotJson.1195 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = StructAtIndex 0 TotallyNotJson.1140; + let TotallyNotJson.516 : U64 = UnionAtIndex (Id 0) (Index 0) TotallyNotJson.1195; + let TotallyNotJson.517 : U8 = StructAtIndex 1 TotallyNotJson.1140; + joinpoint TotallyNotJson.1192 TotallyNotJson.1191: + if TotallyNotJson.1191 then + let TotallyNotJson.1151 : U64 = 1i64; + let TotallyNotJson.1150 : U64 = CallByName Num.19 TotallyNotJson.516 TotallyNotJson.1151; + let TotallyNotJson.1149 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = TagId(1) TotallyNotJson.1150; + let TotallyNotJson.1148 : [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) TotallyNotJson.1149; + ret TotallyNotJson.1148; else - let TotallyNotJson.1384 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = StructAtIndex 0 TotallyNotJson.1342; - let TotallyNotJson.557 : U64 = UnionAtIndex (Id 0) (Index 0) TotallyNotJson.1384; - let TotallyNotJson.1357 : U64 = 1i64; - let TotallyNotJson.1356 : U64 = CallByName Num.19 TotallyNotJson.557 TotallyNotJson.1357; - let TotallyNotJson.1355 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = TagId(0) TotallyNotJson.1356; - let TotallyNotJson.1354 : [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) TotallyNotJson.1355; - ret TotallyNotJson.1354; + let TotallyNotJson.1182 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = StructAtIndex 0 TotallyNotJson.1140; + let TotallyNotJson.520 : U64 = UnionAtIndex (Id 0) (Index 0) TotallyNotJson.1182; + let TotallyNotJson.1155 : U64 = 1i64; + let TotallyNotJson.1154 : U64 = CallByName Num.19 TotallyNotJson.520 TotallyNotJson.1155; + let TotallyNotJson.1153 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = TagId(0) TotallyNotJson.1154; + let TotallyNotJson.1152 : [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) TotallyNotJson.1153; + ret TotallyNotJson.1152; in - let TotallyNotJson.1396 : U8 = 92i64; - let TotallyNotJson.1395 : Int1 = CallByName Bool.11 TotallyNotJson.554 TotallyNotJson.1396; - jump TotallyNotJson.1394 TotallyNotJson.1395; + let TotallyNotJson.1194 : U8 = 92i64; + let TotallyNotJson.1193 : Int1 = CallByName Bool.11 TotallyNotJson.517 TotallyNotJson.1194; + jump TotallyNotJson.1192 TotallyNotJson.1193; in - let TotallyNotJson.1400 : U8 = 34i64; - let TotallyNotJson.1399 : Int1 = CallByName Bool.11 TotallyNotJson.550 TotallyNotJson.1400; - jump TotallyNotJson.1398 TotallyNotJson.1399; + let TotallyNotJson.1198 : U8 = 34i64; + let TotallyNotJson.1197 : Int1 = CallByName Bool.11 TotallyNotJson.513 TotallyNotJson.1198; + jump TotallyNotJson.1196 TotallyNotJson.1197; case 1: - let TotallyNotJson.1410 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = StructAtIndex 0 TotallyNotJson.1342; - let TotallyNotJson.560 : U64 = UnionAtIndex (Id 1) (Index 0) TotallyNotJson.1410; - let TotallyNotJson.561 : U8 = StructAtIndex 1 TotallyNotJson.1342; - joinpoint TotallyNotJson.1408 TotallyNotJson.1402: - if TotallyNotJson.1402 then - let TotallyNotJson.1361 : U64 = 1i64; - let TotallyNotJson.1360 : U64 = CallByName Num.19 TotallyNotJson.560 TotallyNotJson.1361; - let TotallyNotJson.1359 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = TagId(0) TotallyNotJson.1360; - let TotallyNotJson.1358 : [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) TotallyNotJson.1359; - ret TotallyNotJson.1358; + let TotallyNotJson.1208 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = StructAtIndex 0 TotallyNotJson.1140; + let TotallyNotJson.523 : U64 = UnionAtIndex (Id 1) (Index 0) TotallyNotJson.1208; + let TotallyNotJson.524 : U8 = StructAtIndex 1 TotallyNotJson.1140; + joinpoint TotallyNotJson.1206 TotallyNotJson.1200: + if TotallyNotJson.1200 then + let TotallyNotJson.1159 : U64 = 1i64; + let TotallyNotJson.1158 : U64 = CallByName Num.19 TotallyNotJson.523 TotallyNotJson.1159; + let TotallyNotJson.1157 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = TagId(0) TotallyNotJson.1158; + let TotallyNotJson.1156 : [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) TotallyNotJson.1157; + ret TotallyNotJson.1156; else - let TotallyNotJson.1407 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = StructAtIndex 0 TotallyNotJson.1342; - let TotallyNotJson.564 : U64 = UnionAtIndex (Id 1) (Index 0) TotallyNotJson.1407; - let TotallyNotJson.565 : U8 = StructAtIndex 1 TotallyNotJson.1342; - joinpoint TotallyNotJson.1404 TotallyNotJson.1403: - if TotallyNotJson.1403 then - let TotallyNotJson.1365 : U64 = 1i64; - let TotallyNotJson.1364 : U64 = CallByName Num.19 TotallyNotJson.564 TotallyNotJson.1365; - let TotallyNotJson.1363 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = TagId(5) TotallyNotJson.1364; - let TotallyNotJson.1362 : [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) TotallyNotJson.1363; - ret TotallyNotJson.1362; + let TotallyNotJson.1205 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = StructAtIndex 0 TotallyNotJson.1140; + let TotallyNotJson.527 : U64 = UnionAtIndex (Id 1) (Index 0) TotallyNotJson.1205; + let TotallyNotJson.528 : U8 = StructAtIndex 1 TotallyNotJson.1140; + joinpoint TotallyNotJson.1202 TotallyNotJson.1201: + if TotallyNotJson.1201 then + let TotallyNotJson.1163 : U64 = 1i64; + let TotallyNotJson.1162 : U64 = CallByName Num.19 TotallyNotJson.527 TotallyNotJson.1163; + let TotallyNotJson.1161 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = TagId(5) TotallyNotJson.1162; + let TotallyNotJson.1160 : [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) TotallyNotJson.1161; + ret TotallyNotJson.1160; else - jump TotallyNotJson.1385; + jump TotallyNotJson.1183; in - let TotallyNotJson.1406 : U8 = 117i64; - let TotallyNotJson.1405 : Int1 = CallByName Bool.11 TotallyNotJson.565 TotallyNotJson.1406; - jump TotallyNotJson.1404 TotallyNotJson.1405; + let TotallyNotJson.1204 : U8 = 117i64; + let TotallyNotJson.1203 : Int1 = CallByName Bool.11 TotallyNotJson.528 TotallyNotJson.1204; + jump TotallyNotJson.1202 TotallyNotJson.1203; in - let TotallyNotJson.1409 : Int1 = CallByName TotallyNotJson.63 TotallyNotJson.561; - jump TotallyNotJson.1408 TotallyNotJson.1409; + let TotallyNotJson.1207 : Int1 = CallByName TotallyNotJson.62 TotallyNotJson.524; + jump TotallyNotJson.1206 TotallyNotJson.1207; case 5: - let TotallyNotJson.1431 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = StructAtIndex 0 TotallyNotJson.1342; - let TotallyNotJson.568 : U64 = UnionAtIndex (Id 5) (Index 0) TotallyNotJson.1431; - let TotallyNotJson.569 : U8 = StructAtIndex 1 TotallyNotJson.1342; - joinpoint TotallyNotJson.1412 TotallyNotJson.1411: - if TotallyNotJson.1411 then - let TotallyNotJson.1369 : U64 = 1i64; - let TotallyNotJson.1368 : U64 = CallByName Num.19 TotallyNotJson.568 TotallyNotJson.1369; - let TotallyNotJson.1367 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = TagId(6) TotallyNotJson.1368; - let TotallyNotJson.1366 : [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) TotallyNotJson.1367; - ret TotallyNotJson.1366; + let TotallyNotJson.1229 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = StructAtIndex 0 TotallyNotJson.1140; + let TotallyNotJson.531 : U64 = UnionAtIndex (Id 5) (Index 0) TotallyNotJson.1229; + let TotallyNotJson.532 : U8 = StructAtIndex 1 TotallyNotJson.1140; + joinpoint TotallyNotJson.1210 TotallyNotJson.1209: + if TotallyNotJson.1209 then + let TotallyNotJson.1167 : U64 = 1i64; + let TotallyNotJson.1166 : U64 = CallByName Num.19 TotallyNotJson.531 TotallyNotJson.1167; + let TotallyNotJson.1165 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = TagId(6) TotallyNotJson.1166; + let TotallyNotJson.1164 : [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) TotallyNotJson.1165; + ret TotallyNotJson.1164; else - jump TotallyNotJson.1385; + jump TotallyNotJson.1183; in - let TotallyNotJson.1413 : Int1 = CallByName TotallyNotJson.65 TotallyNotJson.569; - jump TotallyNotJson.1412 TotallyNotJson.1413; + let TotallyNotJson.1211 : Int1 = CallByName TotallyNotJson.64 TotallyNotJson.532; + jump TotallyNotJson.1210 TotallyNotJson.1211; case 6: - let TotallyNotJson.1435 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = StructAtIndex 0 TotallyNotJson.1342; - let TotallyNotJson.572 : U64 = UnionAtIndex (Id 6) (Index 0) TotallyNotJson.1435; - let TotallyNotJson.573 : U8 = StructAtIndex 1 TotallyNotJson.1342; - joinpoint TotallyNotJson.1433 TotallyNotJson.1432: - if TotallyNotJson.1432 then - let TotallyNotJson.1373 : U64 = 1i64; - let TotallyNotJson.1372 : U64 = CallByName Num.19 TotallyNotJson.572 TotallyNotJson.1373; - let TotallyNotJson.1371 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = TagId(7) TotallyNotJson.1372; - let TotallyNotJson.1370 : [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) TotallyNotJson.1371; - ret TotallyNotJson.1370; + let TotallyNotJson.1233 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = StructAtIndex 0 TotallyNotJson.1140; + let TotallyNotJson.535 : U64 = UnionAtIndex (Id 6) (Index 0) TotallyNotJson.1233; + let TotallyNotJson.536 : U8 = StructAtIndex 1 TotallyNotJson.1140; + joinpoint TotallyNotJson.1231 TotallyNotJson.1230: + if TotallyNotJson.1230 then + let TotallyNotJson.1171 : U64 = 1i64; + let TotallyNotJson.1170 : U64 = CallByName Num.19 TotallyNotJson.535 TotallyNotJson.1171; + let TotallyNotJson.1169 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = TagId(7) TotallyNotJson.1170; + let TotallyNotJson.1168 : [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) TotallyNotJson.1169; + ret TotallyNotJson.1168; else - jump TotallyNotJson.1385; + jump TotallyNotJson.1183; in - let TotallyNotJson.1434 : Int1 = CallByName TotallyNotJson.65 TotallyNotJson.573; - jump TotallyNotJson.1433 TotallyNotJson.1434; + let TotallyNotJson.1232 : Int1 = CallByName TotallyNotJson.64 TotallyNotJson.536; + jump TotallyNotJson.1231 TotallyNotJson.1232; case 7: - let TotallyNotJson.1439 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = StructAtIndex 0 TotallyNotJson.1342; - let TotallyNotJson.576 : U64 = UnionAtIndex (Id 7) (Index 0) TotallyNotJson.1439; - let TotallyNotJson.577 : U8 = StructAtIndex 1 TotallyNotJson.1342; - joinpoint TotallyNotJson.1437 TotallyNotJson.1436: - if TotallyNotJson.1436 then - let TotallyNotJson.1377 : U64 = 1i64; - let TotallyNotJson.1376 : U64 = CallByName Num.19 TotallyNotJson.576 TotallyNotJson.1377; - let TotallyNotJson.1375 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = TagId(8) TotallyNotJson.1376; - let TotallyNotJson.1374 : [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) TotallyNotJson.1375; - ret TotallyNotJson.1374; + let TotallyNotJson.1237 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = StructAtIndex 0 TotallyNotJson.1140; + let TotallyNotJson.539 : U64 = UnionAtIndex (Id 7) (Index 0) TotallyNotJson.1237; + let TotallyNotJson.540 : U8 = StructAtIndex 1 TotallyNotJson.1140; + joinpoint TotallyNotJson.1235 TotallyNotJson.1234: + if TotallyNotJson.1234 then + let TotallyNotJson.1175 : U64 = 1i64; + let TotallyNotJson.1174 : U64 = CallByName Num.19 TotallyNotJson.539 TotallyNotJson.1175; + let TotallyNotJson.1173 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = TagId(8) TotallyNotJson.1174; + let TotallyNotJson.1172 : [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) TotallyNotJson.1173; + ret TotallyNotJson.1172; else - jump TotallyNotJson.1385; + jump TotallyNotJson.1183; in - let TotallyNotJson.1438 : Int1 = CallByName TotallyNotJson.65 TotallyNotJson.577; - jump TotallyNotJson.1437 TotallyNotJson.1438; + let TotallyNotJson.1236 : Int1 = CallByName TotallyNotJson.64 TotallyNotJson.540; + jump TotallyNotJson.1235 TotallyNotJson.1236; case 8: - let TotallyNotJson.1443 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = StructAtIndex 0 TotallyNotJson.1342; - let TotallyNotJson.580 : U64 = UnionAtIndex (Id 8) (Index 0) TotallyNotJson.1443; - let TotallyNotJson.581 : U8 = StructAtIndex 1 TotallyNotJson.1342; - joinpoint TotallyNotJson.1441 TotallyNotJson.1440: - if TotallyNotJson.1440 then - let TotallyNotJson.1381 : U64 = 1i64; - let TotallyNotJson.1380 : U64 = CallByName Num.19 TotallyNotJson.580 TotallyNotJson.1381; - let TotallyNotJson.1379 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = TagId(0) TotallyNotJson.1380; - let TotallyNotJson.1378 : [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) TotallyNotJson.1379; - ret TotallyNotJson.1378; + let TotallyNotJson.1241 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = StructAtIndex 0 TotallyNotJson.1140; + let TotallyNotJson.543 : U64 = UnionAtIndex (Id 8) (Index 0) TotallyNotJson.1241; + let TotallyNotJson.544 : U8 = StructAtIndex 1 TotallyNotJson.1140; + joinpoint TotallyNotJson.1239 TotallyNotJson.1238: + if TotallyNotJson.1238 then + let TotallyNotJson.1179 : U64 = 1i64; + let TotallyNotJson.1178 : U64 = CallByName Num.19 TotallyNotJson.543 TotallyNotJson.1179; + let TotallyNotJson.1177 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = TagId(0) TotallyNotJson.1178; + let TotallyNotJson.1176 : [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) TotallyNotJson.1177; + ret TotallyNotJson.1176; else - jump TotallyNotJson.1385; + jump TotallyNotJson.1183; in - let TotallyNotJson.1442 : Int1 = CallByName TotallyNotJson.65 TotallyNotJson.581; - jump TotallyNotJson.1441 TotallyNotJson.1442; + let TotallyNotJson.1240 : Int1 = CallByName TotallyNotJson.64 TotallyNotJson.544; + jump TotallyNotJson.1239 TotallyNotJson.1240; default: - jump TotallyNotJson.1385; + jump TotallyNotJson.1183; -procedure TotallyNotJson.63 (TotallyNotJson.586): - switch TotallyNotJson.586: +procedure TotallyNotJson.62 (TotallyNotJson.549): + switch TotallyNotJson.549: case 34: - let TotallyNotJson.1286 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1286; + let TotallyNotJson.1084 : Int1 = CallByName Bool.2; + ret TotallyNotJson.1084; case 92: - let TotallyNotJson.1287 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1287; + let TotallyNotJson.1085 : Int1 = CallByName Bool.2; + ret TotallyNotJson.1085; case 47: - let TotallyNotJson.1288 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1288; + let TotallyNotJson.1086 : Int1 = CallByName Bool.2; + ret TotallyNotJson.1086; case 98: - let TotallyNotJson.1289 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1289; + let TotallyNotJson.1087 : Int1 = CallByName Bool.2; + ret TotallyNotJson.1087; case 102: - let TotallyNotJson.1290 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1290; + let TotallyNotJson.1088 : Int1 = CallByName Bool.2; + ret TotallyNotJson.1088; case 110: - let TotallyNotJson.1291 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1291; + let TotallyNotJson.1089 : Int1 = CallByName Bool.2; + ret TotallyNotJson.1089; case 114: - let TotallyNotJson.1292 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1292; + let TotallyNotJson.1090 : Int1 = CallByName Bool.2; + ret TotallyNotJson.1090; case 116: - let TotallyNotJson.1293 : Int1 = CallByName Bool.2; - ret TotallyNotJson.1293; + let TotallyNotJson.1091 : Int1 = CallByName Bool.2; + ret TotallyNotJson.1091; default: - let TotallyNotJson.1294 : Int1 = CallByName Bool.1; - ret TotallyNotJson.1294; + let TotallyNotJson.1092 : Int1 = CallByName Bool.1; + ret TotallyNotJson.1092; -procedure TotallyNotJson.64 (TotallyNotJson.587): - switch TotallyNotJson.587: +procedure TotallyNotJson.63 (TotallyNotJson.550): + switch TotallyNotJson.550: case 34: - let TotallyNotJson.1263 : U8 = 34i64; - ret TotallyNotJson.1263; + let TotallyNotJson.1061 : U8 = 34i64; + ret TotallyNotJson.1061; case 92: - let TotallyNotJson.1264 : U8 = 92i64; - ret TotallyNotJson.1264; + let TotallyNotJson.1062 : U8 = 92i64; + ret TotallyNotJson.1062; case 47: - let TotallyNotJson.1265 : U8 = 47i64; - ret TotallyNotJson.1265; + let TotallyNotJson.1063 : U8 = 47i64; + ret TotallyNotJson.1063; case 98: - let TotallyNotJson.1266 : U8 = 8i64; - ret TotallyNotJson.1266; + let TotallyNotJson.1064 : U8 = 8i64; + ret TotallyNotJson.1064; case 102: - let TotallyNotJson.1267 : U8 = 12i64; - ret TotallyNotJson.1267; + let TotallyNotJson.1065 : U8 = 12i64; + ret TotallyNotJson.1065; case 110: - let TotallyNotJson.1268 : U8 = 10i64; - ret TotallyNotJson.1268; + let TotallyNotJson.1066 : U8 = 10i64; + ret TotallyNotJson.1066; case 114: - let TotallyNotJson.1269 : U8 = 13i64; - ret TotallyNotJson.1269; + let TotallyNotJson.1067 : U8 = 13i64; + ret TotallyNotJson.1067; case 116: - let TotallyNotJson.1270 : U8 = 9i64; - ret TotallyNotJson.1270; + let TotallyNotJson.1068 : U8 = 9i64; + ret TotallyNotJson.1068; default: - ret TotallyNotJson.587; + ret TotallyNotJson.550; -procedure TotallyNotJson.65 (TotallyNotJson.588): - let TotallyNotJson.1430 : U8 = 48i64; - let TotallyNotJson.1427 : Int1 = CallByName Num.25 TotallyNotJson.588 TotallyNotJson.1430; - let TotallyNotJson.1429 : U8 = 57i64; - let TotallyNotJson.1428 : Int1 = CallByName Num.23 TotallyNotJson.588 TotallyNotJson.1429; - let TotallyNotJson.1415 : Int1 = CallByName Bool.3 TotallyNotJson.1427 TotallyNotJson.1428; - let TotallyNotJson.1426 : U8 = 97i64; - let TotallyNotJson.1423 : Int1 = CallByName Num.25 TotallyNotJson.588 TotallyNotJson.1426; - let TotallyNotJson.1425 : U8 = 102i64; - let TotallyNotJson.1424 : Int1 = CallByName Num.23 TotallyNotJson.588 TotallyNotJson.1425; - let TotallyNotJson.1417 : Int1 = CallByName Bool.3 TotallyNotJson.1423 TotallyNotJson.1424; - let TotallyNotJson.1422 : U8 = 65i64; - let TotallyNotJson.1419 : Int1 = CallByName Num.25 TotallyNotJson.588 TotallyNotJson.1422; - let TotallyNotJson.1421 : U8 = 70i64; - let TotallyNotJson.1420 : Int1 = CallByName Num.23 TotallyNotJson.588 TotallyNotJson.1421; - let TotallyNotJson.1418 : Int1 = CallByName Bool.3 TotallyNotJson.1419 TotallyNotJson.1420; - let TotallyNotJson.1416 : Int1 = CallByName Bool.4 TotallyNotJson.1417 TotallyNotJson.1418; - let TotallyNotJson.1414 : Int1 = CallByName Bool.4 TotallyNotJson.1415 TotallyNotJson.1416; - ret TotallyNotJson.1414; - -procedure TotallyNotJson.66 (TotallyNotJson.589): - let TotallyNotJson.1242 : U8 = 48i64; - let TotallyNotJson.1239 : Int1 = CallByName Num.25 TotallyNotJson.589 TotallyNotJson.1242; - let TotallyNotJson.1241 : U8 = 57i64; - let TotallyNotJson.1240 : Int1 = CallByName Num.23 TotallyNotJson.589 TotallyNotJson.1241; - let TotallyNotJson.1236 : Int1 = CallByName Bool.3 TotallyNotJson.1239 TotallyNotJson.1240; - if TotallyNotJson.1236 then - let TotallyNotJson.1238 : U8 = 48i64; - let TotallyNotJson.1237 : U8 = CallByName Num.20 TotallyNotJson.589 TotallyNotJson.1238; - ret TotallyNotJson.1237; +procedure TotallyNotJson.64 (TotallyNotJson.551): + let TotallyNotJson.1228 : U8 = 48i64; + let TotallyNotJson.1225 : Int1 = CallByName Num.25 TotallyNotJson.551 TotallyNotJson.1228; + let TotallyNotJson.1227 : U8 = 57i64; + let TotallyNotJson.1226 : Int1 = CallByName Num.23 TotallyNotJson.551 TotallyNotJson.1227; + let TotallyNotJson.1213 : Int1 = CallByName Bool.3 TotallyNotJson.1225 TotallyNotJson.1226; + let TotallyNotJson.1224 : U8 = 97i64; + let TotallyNotJson.1221 : Int1 = CallByName Num.25 TotallyNotJson.551 TotallyNotJson.1224; + let TotallyNotJson.1223 : U8 = 102i64; + let TotallyNotJson.1222 : Int1 = CallByName Num.23 TotallyNotJson.551 TotallyNotJson.1223; + let TotallyNotJson.1215 : Int1 = CallByName Bool.3 TotallyNotJson.1221 TotallyNotJson.1222; + let TotallyNotJson.1220 : U8 = 65i64; + let TotallyNotJson.1217 : Int1 = CallByName Num.25 TotallyNotJson.551 TotallyNotJson.1220; + let TotallyNotJson.1219 : U8 = 70i64; + let TotallyNotJson.1218 : Int1 = CallByName Num.23 TotallyNotJson.551 TotallyNotJson.1219; + let TotallyNotJson.1216 : Int1 = CallByName Bool.3 TotallyNotJson.1217 TotallyNotJson.1218; + let TotallyNotJson.1214 : Int1 = CallByName Bool.4 TotallyNotJson.1215 TotallyNotJson.1216; + let TotallyNotJson.1212 : Int1 = CallByName Bool.4 TotallyNotJson.1213 TotallyNotJson.1214; + ret TotallyNotJson.1212; + +procedure TotallyNotJson.65 (TotallyNotJson.552): + let TotallyNotJson.1040 : U8 = 48i64; + let TotallyNotJson.1037 : Int1 = CallByName Num.25 TotallyNotJson.552 TotallyNotJson.1040; + let TotallyNotJson.1039 : U8 = 57i64; + let TotallyNotJson.1038 : Int1 = CallByName Num.23 TotallyNotJson.552 TotallyNotJson.1039; + let TotallyNotJson.1034 : Int1 = CallByName Bool.3 TotallyNotJson.1037 TotallyNotJson.1038; + if TotallyNotJson.1034 then + let TotallyNotJson.1036 : U8 = 48i64; + let TotallyNotJson.1035 : U8 = CallByName Num.20 TotallyNotJson.552 TotallyNotJson.1036; + ret TotallyNotJson.1035; else - let TotallyNotJson.1235 : U8 = 97i64; - let TotallyNotJson.1232 : Int1 = CallByName Num.25 TotallyNotJson.589 TotallyNotJson.1235; - let TotallyNotJson.1234 : U8 = 102i64; - let TotallyNotJson.1233 : Int1 = CallByName Num.23 TotallyNotJson.589 TotallyNotJson.1234; - let TotallyNotJson.1227 : Int1 = CallByName Bool.3 TotallyNotJson.1232 TotallyNotJson.1233; - if TotallyNotJson.1227 then - let TotallyNotJson.1231 : U8 = 97i64; - let TotallyNotJson.1229 : U8 = CallByName Num.20 TotallyNotJson.589 TotallyNotJson.1231; - let TotallyNotJson.1230 : U8 = 10i64; - let TotallyNotJson.1228 : U8 = CallByName Num.19 TotallyNotJson.1229 TotallyNotJson.1230; - ret TotallyNotJson.1228; + let TotallyNotJson.1033 : U8 = 97i64; + let TotallyNotJson.1030 : Int1 = CallByName Num.25 TotallyNotJson.552 TotallyNotJson.1033; + let TotallyNotJson.1032 : U8 = 102i64; + let TotallyNotJson.1031 : Int1 = CallByName Num.23 TotallyNotJson.552 TotallyNotJson.1032; + let TotallyNotJson.1025 : Int1 = CallByName Bool.3 TotallyNotJson.1030 TotallyNotJson.1031; + if TotallyNotJson.1025 then + let TotallyNotJson.1029 : U8 = 97i64; + let TotallyNotJson.1027 : U8 = CallByName Num.20 TotallyNotJson.552 TotallyNotJson.1029; + let TotallyNotJson.1028 : U8 = 10i64; + let TotallyNotJson.1026 : U8 = CallByName Num.19 TotallyNotJson.1027 TotallyNotJson.1028; + ret TotallyNotJson.1026; else - let TotallyNotJson.1226 : U8 = 65i64; - let TotallyNotJson.1223 : Int1 = CallByName Num.25 TotallyNotJson.589 TotallyNotJson.1226; - let TotallyNotJson.1225 : U8 = 70i64; - let TotallyNotJson.1224 : Int1 = CallByName Num.23 TotallyNotJson.589 TotallyNotJson.1225; - let TotallyNotJson.1218 : Int1 = CallByName Bool.3 TotallyNotJson.1223 TotallyNotJson.1224; - if TotallyNotJson.1218 then - let TotallyNotJson.1222 : U8 = 65i64; - let TotallyNotJson.1220 : U8 = CallByName Num.20 TotallyNotJson.589 TotallyNotJson.1222; - let TotallyNotJson.1221 : U8 = 10i64; - let TotallyNotJson.1219 : U8 = CallByName Num.19 TotallyNotJson.1220 TotallyNotJson.1221; - ret TotallyNotJson.1219; + let TotallyNotJson.1024 : U8 = 65i64; + let TotallyNotJson.1021 : Int1 = CallByName Num.25 TotallyNotJson.552 TotallyNotJson.1024; + let TotallyNotJson.1023 : U8 = 70i64; + let TotallyNotJson.1022 : Int1 = CallByName Num.23 TotallyNotJson.552 TotallyNotJson.1023; + let TotallyNotJson.1016 : Int1 = CallByName Bool.3 TotallyNotJson.1021 TotallyNotJson.1022; + if TotallyNotJson.1016 then + let TotallyNotJson.1020 : U8 = 65i64; + let TotallyNotJson.1018 : U8 = CallByName Num.20 TotallyNotJson.552 TotallyNotJson.1020; + let TotallyNotJson.1019 : U8 = 10i64; + let TotallyNotJson.1017 : U8 = CallByName Num.19 TotallyNotJson.1018 TotallyNotJson.1019; + ret TotallyNotJson.1017; else - let TotallyNotJson.1217 : Str = "got an invalid hex char"; - Crash TotallyNotJson.1217 - -procedure TotallyNotJson.67 (TotallyNotJson.590, TotallyNotJson.591): - let TotallyNotJson.1208 : U8 = 4i64; - let TotallyNotJson.1207 : U8 = CallByName Num.72 TotallyNotJson.590 TotallyNotJson.1208; - let TotallyNotJson.1206 : U8 = CallByName Num.71 TotallyNotJson.1207 TotallyNotJson.591; - ret TotallyNotJson.1206; - -procedure TotallyNotJson.68 (TotallyNotJson.592, TotallyNotJson.593, TotallyNotJson.594, TotallyNotJson.595): - let TotallyNotJson.596 : U8 = CallByName TotallyNotJson.66 TotallyNotJson.592; - let TotallyNotJson.597 : U8 = CallByName TotallyNotJson.66 TotallyNotJson.593; - let TotallyNotJson.598 : U8 = CallByName TotallyNotJson.66 TotallyNotJson.594; - let TotallyNotJson.599 : U8 = CallByName TotallyNotJson.66 TotallyNotJson.595; - let TotallyNotJson.1215 : U8 = 0i64; - let TotallyNotJson.1212 : Int1 = CallByName Bool.11 TotallyNotJson.596 TotallyNotJson.1215; - let TotallyNotJson.1214 : U8 = 0i64; - let TotallyNotJson.1213 : Int1 = CallByName Bool.11 TotallyNotJson.597 TotallyNotJson.1214; - let TotallyNotJson.1209 : Int1 = CallByName Bool.3 TotallyNotJson.1212 TotallyNotJson.1213; - if TotallyNotJson.1209 then - let TotallyNotJson.1211 : U8 = CallByName TotallyNotJson.67 TotallyNotJson.598 TotallyNotJson.599; - let TotallyNotJson.1210 : List U8 = Array [TotallyNotJson.1211]; - ret TotallyNotJson.1210; + let TotallyNotJson.1015 : Str = "got an invalid hex char"; + Crash TotallyNotJson.1015 + +procedure TotallyNotJson.66 (TotallyNotJson.553, TotallyNotJson.554): + let TotallyNotJson.1006 : U8 = 4i64; + let TotallyNotJson.1005 : U8 = CallByName Num.72 TotallyNotJson.553 TotallyNotJson.1006; + let TotallyNotJson.1004 : U8 = CallByName Num.71 TotallyNotJson.1005 TotallyNotJson.554; + ret TotallyNotJson.1004; + +procedure TotallyNotJson.67 (TotallyNotJson.555, TotallyNotJson.556, TotallyNotJson.557, TotallyNotJson.558): + let TotallyNotJson.559 : U8 = CallByName TotallyNotJson.65 TotallyNotJson.555; + let TotallyNotJson.560 : U8 = CallByName TotallyNotJson.65 TotallyNotJson.556; + let TotallyNotJson.561 : U8 = CallByName TotallyNotJson.65 TotallyNotJson.557; + let TotallyNotJson.562 : U8 = CallByName TotallyNotJson.65 TotallyNotJson.558; + let TotallyNotJson.1013 : U8 = 0i64; + let TotallyNotJson.1010 : Int1 = CallByName Bool.11 TotallyNotJson.559 TotallyNotJson.1013; + let TotallyNotJson.1012 : U8 = 0i64; + let TotallyNotJson.1011 : Int1 = CallByName Bool.11 TotallyNotJson.560 TotallyNotJson.1012; + let TotallyNotJson.1007 : Int1 = CallByName Bool.3 TotallyNotJson.1010 TotallyNotJson.1011; + if TotallyNotJson.1007 then + let TotallyNotJson.1009 : U8 = CallByName TotallyNotJson.66 TotallyNotJson.561 TotallyNotJson.562; + let TotallyNotJson.1008 : List U8 = Array [TotallyNotJson.1009]; + ret TotallyNotJson.1008; else - let TotallyNotJson.1204 : U8 = CallByName TotallyNotJson.67 TotallyNotJson.596 TotallyNotJson.597; - let TotallyNotJson.1205 : U8 = CallByName TotallyNotJson.67 TotallyNotJson.598 TotallyNotJson.599; - let TotallyNotJson.1203 : List U8 = Array [TotallyNotJson.1204, TotallyNotJson.1205]; - ret TotallyNotJson.1203; - -procedure TotallyNotJson.69 (): - let TotallyNotJson.1248 : U8 = 102i64; - let TotallyNotJson.1249 : U8 = 102i64; - let TotallyNotJson.1250 : U8 = 100i64; - let TotallyNotJson.1251 : U8 = 100i64; - let TotallyNotJson.1247 : List U8 = CallByName TotallyNotJson.68 TotallyNotJson.1248 TotallyNotJson.1249 TotallyNotJson.1250 TotallyNotJson.1251; - ret TotallyNotJson.1247; - -procedure TotallyNotJson.70 (#Derived_gen.5): - joinpoint TotallyNotJson.1198 TotallyNotJson.1166: - let TotallyNotJson.600 : List U8 = StructAtIndex 0 TotallyNotJson.1166; - inc 4 TotallyNotJson.600; - let TotallyNotJson.601 : List U8 = StructAtIndex 1 TotallyNotJson.1166; - let TotallyNotJson.1317 : U64 = 0i64; - let TotallyNotJson.602 : [C {}, C U8] = CallByName List.2 TotallyNotJson.600 TotallyNotJson.1317; - let TotallyNotJson.1316 : U64 = 1i64; - let TotallyNotJson.603 : [C {}, C U8] = CallByName List.2 TotallyNotJson.600 TotallyNotJson.1316; - let TotallyNotJson.1315 : U64 = 2i64; - let TotallyNotJson.604 : List U8 = CallByName List.38 TotallyNotJson.600 TotallyNotJson.1315; - let TotallyNotJson.1314 : U64 = 6i64; - let TotallyNotJson.605 : List U8 = CallByName List.38 TotallyNotJson.600 TotallyNotJson.1314; - let TotallyNotJson.1199 : {[C {}, C U8], [C {}, C U8]} = Struct {TotallyNotJson.602, TotallyNotJson.603}; - joinpoint TotallyNotJson.1279: - let TotallyNotJson.1278 : [C {}, C U8] = StructAtIndex 0 TotallyNotJson.1199; - let TotallyNotJson.616 : U8 = UnionAtIndex (Id 1) (Index 0) TotallyNotJson.1278; - let TotallyNotJson.1276 : U64 = 1i64; - let TotallyNotJson.1274 : List U8 = CallByName List.38 TotallyNotJson.600 TotallyNotJson.1276; - let TotallyNotJson.1275 : List U8 = CallByName List.4 TotallyNotJson.601 TotallyNotJson.616; - let TotallyNotJson.1273 : {List U8, List U8} = Struct {TotallyNotJson.1274, TotallyNotJson.1275}; - jump TotallyNotJson.1198 TotallyNotJson.1273; + let TotallyNotJson.1002 : U8 = CallByName TotallyNotJson.66 TotallyNotJson.559 TotallyNotJson.560; + let TotallyNotJson.1003 : U8 = CallByName TotallyNotJson.66 TotallyNotJson.561 TotallyNotJson.562; + let TotallyNotJson.1001 : List U8 = Array [TotallyNotJson.1002, TotallyNotJson.1003]; + ret TotallyNotJson.1001; + +procedure TotallyNotJson.68 (): + let TotallyNotJson.1046 : U8 = 102i64; + let TotallyNotJson.1047 : U8 = 102i64; + let TotallyNotJson.1048 : U8 = 100i64; + let TotallyNotJson.1049 : U8 = 100i64; + let TotallyNotJson.1045 : List U8 = CallByName TotallyNotJson.67 TotallyNotJson.1046 TotallyNotJson.1047 TotallyNotJson.1048 TotallyNotJson.1049; + ret TotallyNotJson.1045; + +procedure TotallyNotJson.69 (#Derived_gen.0): + joinpoint TotallyNotJson.996 TotallyNotJson.967: + let TotallyNotJson.563 : List U8 = StructAtIndex 0 TotallyNotJson.967; + inc 4 TotallyNotJson.563; + let TotallyNotJson.564 : List U8 = StructAtIndex 1 TotallyNotJson.967; + let TotallyNotJson.1115 : U64 = 0i64; + let TotallyNotJson.565 : [C {}, C U8] = CallByName List.2 TotallyNotJson.563 TotallyNotJson.1115; + let TotallyNotJson.1114 : U64 = 1i64; + let TotallyNotJson.566 : [C {}, C U8] = CallByName List.2 TotallyNotJson.563 TotallyNotJson.1114; + let TotallyNotJson.1113 : U64 = 2i64; + let TotallyNotJson.567 : List U8 = CallByName List.38 TotallyNotJson.563 TotallyNotJson.1113; + let TotallyNotJson.1112 : U64 = 6i64; + let TotallyNotJson.568 : List U8 = CallByName List.38 TotallyNotJson.563 TotallyNotJson.1112; + let TotallyNotJson.997 : {[C {}, C U8], [C {}, C U8]} = Struct {TotallyNotJson.565, TotallyNotJson.566}; + joinpoint TotallyNotJson.1077: + let TotallyNotJson.1076 : [C {}, C U8] = StructAtIndex 0 TotallyNotJson.997; + let TotallyNotJson.579 : U8 = UnionAtIndex (Id 1) (Index 0) TotallyNotJson.1076; + let TotallyNotJson.1074 : U64 = 1i64; + let TotallyNotJson.1072 : List U8 = CallByName List.38 TotallyNotJson.563 TotallyNotJson.1074; + let TotallyNotJson.1073 : List U8 = CallByName List.4 TotallyNotJson.564 TotallyNotJson.579; + let TotallyNotJson.1071 : {List U8, List U8} = Struct {TotallyNotJson.1072, TotallyNotJson.1073}; + jump TotallyNotJson.996 TotallyNotJson.1071; in - let TotallyNotJson.1310 : [C {}, C U8] = StructAtIndex 0 TotallyNotJson.1199; - let TotallyNotJson.1311 : U8 = 1i64; - let TotallyNotJson.1312 : U8 = GetTagId TotallyNotJson.1310; - let TotallyNotJson.1313 : Int1 = lowlevel Eq TotallyNotJson.1311 TotallyNotJson.1312; - if TotallyNotJson.1313 then - let TotallyNotJson.1306 : [C {}, C U8] = StructAtIndex 1 TotallyNotJson.1199; - let TotallyNotJson.1307 : U8 = 1i64; - let TotallyNotJson.1308 : U8 = GetTagId TotallyNotJson.1306; - let TotallyNotJson.1309 : Int1 = lowlevel Eq TotallyNotJson.1307 TotallyNotJson.1308; - if TotallyNotJson.1309 then - let TotallyNotJson.1305 : [C {}, C U8] = StructAtIndex 0 TotallyNotJson.1199; - let TotallyNotJson.607 : U8 = UnionAtIndex (Id 1) (Index 0) TotallyNotJson.1305; - let TotallyNotJson.1304 : [C {}, C U8] = StructAtIndex 1 TotallyNotJson.1199; - let TotallyNotJson.608 : U8 = UnionAtIndex (Id 1) (Index 0) TotallyNotJson.1304; - joinpoint TotallyNotJson.1298 TotallyNotJson.1280: - if TotallyNotJson.1280 then - dec TotallyNotJson.600; - let TotallyNotJson.1256 : U64 = lowlevel ListLen TotallyNotJson.604; - let TotallyNotJson.1257 : U64 = 4i64; - let TotallyNotJson.1258 : Int1 = lowlevel NumGte TotallyNotJson.1256 TotallyNotJson.1257; - if TotallyNotJson.1258 then - let TotallyNotJson.1255 : U64 = 0i64; - let TotallyNotJson.609 : U8 = lowlevel ListGetUnsafe TotallyNotJson.604 TotallyNotJson.1255; - let TotallyNotJson.1254 : U64 = 1i64; - let TotallyNotJson.610 : U8 = lowlevel ListGetUnsafe TotallyNotJson.604 TotallyNotJson.1254; - let TotallyNotJson.1253 : U64 = 2i64; - let TotallyNotJson.611 : U8 = lowlevel ListGetUnsafe TotallyNotJson.604 TotallyNotJson.1253; - let TotallyNotJson.1252 : U64 = 3i64; - let TotallyNotJson.612 : U8 = lowlevel ListGetUnsafe TotallyNotJson.604 TotallyNotJson.1252; - dec TotallyNotJson.604; - let TotallyNotJson.613 : List U8 = CallByName TotallyNotJson.68 TotallyNotJson.609 TotallyNotJson.610 TotallyNotJson.611 TotallyNotJson.612; - let TotallyNotJson.1202 : List U8 = CallByName List.8 TotallyNotJson.601 TotallyNotJson.613; - let TotallyNotJson.1201 : {List U8, List U8} = Struct {TotallyNotJson.605, TotallyNotJson.1202}; - jump TotallyNotJson.1198 TotallyNotJson.1201; + let TotallyNotJson.1108 : [C {}, C U8] = StructAtIndex 0 TotallyNotJson.997; + let TotallyNotJson.1109 : U8 = 1i64; + let TotallyNotJson.1110 : U8 = GetTagId TotallyNotJson.1108; + let TotallyNotJson.1111 : Int1 = lowlevel Eq TotallyNotJson.1109 TotallyNotJson.1110; + if TotallyNotJson.1111 then + let TotallyNotJson.1104 : [C {}, C U8] = StructAtIndex 1 TotallyNotJson.997; + let TotallyNotJson.1105 : U8 = 1i64; + let TotallyNotJson.1106 : U8 = GetTagId TotallyNotJson.1104; + let TotallyNotJson.1107 : Int1 = lowlevel Eq TotallyNotJson.1105 TotallyNotJson.1106; + if TotallyNotJson.1107 then + let TotallyNotJson.1103 : [C {}, C U8] = StructAtIndex 0 TotallyNotJson.997; + let TotallyNotJson.570 : U8 = UnionAtIndex (Id 1) (Index 0) TotallyNotJson.1103; + let TotallyNotJson.1102 : [C {}, C U8] = StructAtIndex 1 TotallyNotJson.997; + let TotallyNotJson.571 : U8 = UnionAtIndex (Id 1) (Index 0) TotallyNotJson.1102; + joinpoint TotallyNotJson.1096 TotallyNotJson.1078: + if TotallyNotJson.1078 then + dec TotallyNotJson.563; + let TotallyNotJson.1054 : U64 = lowlevel ListLen TotallyNotJson.567; + let TotallyNotJson.1055 : U64 = 4i64; + let TotallyNotJson.1056 : Int1 = lowlevel NumGte TotallyNotJson.1054 TotallyNotJson.1055; + if TotallyNotJson.1056 then + let TotallyNotJson.1053 : U64 = 0i64; + let TotallyNotJson.572 : U8 = lowlevel ListGetUnsafe TotallyNotJson.567 TotallyNotJson.1053; + let TotallyNotJson.1052 : U64 = 1i64; + let TotallyNotJson.573 : U8 = lowlevel ListGetUnsafe TotallyNotJson.567 TotallyNotJson.1052; + let TotallyNotJson.1051 : U64 = 2i64; + let TotallyNotJson.574 : U8 = lowlevel ListGetUnsafe TotallyNotJson.567 TotallyNotJson.1051; + let TotallyNotJson.1050 : U64 = 3i64; + let TotallyNotJson.575 : U8 = lowlevel ListGetUnsafe TotallyNotJson.567 TotallyNotJson.1050; + dec TotallyNotJson.567; + let TotallyNotJson.576 : List U8 = CallByName TotallyNotJson.67 TotallyNotJson.572 TotallyNotJson.573 TotallyNotJson.574 TotallyNotJson.575; + let TotallyNotJson.1000 : List U8 = CallByName List.8 TotallyNotJson.564 TotallyNotJson.576; + let TotallyNotJson.999 : {List U8, List U8} = Struct {TotallyNotJson.568, TotallyNotJson.1000}; + jump TotallyNotJson.996 TotallyNotJson.999; else - dec TotallyNotJson.605; - let TotallyNotJson.1246 : List U8 = CallByName TotallyNotJson.69; - let TotallyNotJson.1245 : List U8 = CallByName List.8 TotallyNotJson.601 TotallyNotJson.1246; - let TotallyNotJson.1244 : {List U8, List U8} = Struct {TotallyNotJson.604, TotallyNotJson.1245}; - jump TotallyNotJson.1198 TotallyNotJson.1244; + dec TotallyNotJson.568; + let TotallyNotJson.1044 : List U8 = CallByName TotallyNotJson.68; + let TotallyNotJson.1043 : List U8 = CallByName List.8 TotallyNotJson.564 TotallyNotJson.1044; + let TotallyNotJson.1042 : {List U8, List U8} = Struct {TotallyNotJson.567, TotallyNotJson.1043}; + jump TotallyNotJson.996 TotallyNotJson.1042; else - dec TotallyNotJson.605; - let TotallyNotJson.1297 : [C {}, C U8] = StructAtIndex 0 TotallyNotJson.1199; - let TotallyNotJson.614 : U8 = UnionAtIndex (Id 1) (Index 0) TotallyNotJson.1297; - let TotallyNotJson.1296 : [C {}, C U8] = StructAtIndex 1 TotallyNotJson.1199; - let TotallyNotJson.615 : U8 = UnionAtIndex (Id 1) (Index 0) TotallyNotJson.1296; - joinpoint TotallyNotJson.1282 TotallyNotJson.1281: - if TotallyNotJson.1281 then - dec TotallyNotJson.600; - let TotallyNotJson.1262 : U8 = CallByName TotallyNotJson.64 TotallyNotJson.615; - let TotallyNotJson.1261 : List U8 = CallByName List.4 TotallyNotJson.601 TotallyNotJson.1262; - let TotallyNotJson.1260 : {List U8, List U8} = Struct {TotallyNotJson.604, TotallyNotJson.1261}; - jump TotallyNotJson.1198 TotallyNotJson.1260; + dec TotallyNotJson.568; + let TotallyNotJson.1095 : [C {}, C U8] = StructAtIndex 0 TotallyNotJson.997; + let TotallyNotJson.577 : U8 = UnionAtIndex (Id 1) (Index 0) TotallyNotJson.1095; + let TotallyNotJson.1094 : [C {}, C U8] = StructAtIndex 1 TotallyNotJson.997; + let TotallyNotJson.578 : U8 = UnionAtIndex (Id 1) (Index 0) TotallyNotJson.1094; + joinpoint TotallyNotJson.1080 TotallyNotJson.1079: + if TotallyNotJson.1079 then + dec TotallyNotJson.563; + let TotallyNotJson.1060 : U8 = CallByName TotallyNotJson.63 TotallyNotJson.578; + let TotallyNotJson.1059 : List U8 = CallByName List.4 TotallyNotJson.564 TotallyNotJson.1060; + let TotallyNotJson.1058 : {List U8, List U8} = Struct {TotallyNotJson.567, TotallyNotJson.1059}; + jump TotallyNotJson.996 TotallyNotJson.1058; else - dec TotallyNotJson.604; - jump TotallyNotJson.1279; + dec TotallyNotJson.567; + jump TotallyNotJson.1077; in - let TotallyNotJson.1295 : U8 = 92i64; - let TotallyNotJson.1284 : Int1 = CallByName Bool.11 TotallyNotJson.614 TotallyNotJson.1295; - let TotallyNotJson.1285 : Int1 = CallByName TotallyNotJson.63 TotallyNotJson.615; - let TotallyNotJson.1283 : Int1 = CallByName Bool.3 TotallyNotJson.1284 TotallyNotJson.1285; - jump TotallyNotJson.1282 TotallyNotJson.1283; + let TotallyNotJson.1093 : U8 = 92i64; + let TotallyNotJson.1082 : Int1 = CallByName Bool.11 TotallyNotJson.577 TotallyNotJson.1093; + let TotallyNotJson.1083 : Int1 = CallByName TotallyNotJson.62 TotallyNotJson.578; + let TotallyNotJson.1081 : Int1 = CallByName Bool.3 TotallyNotJson.1082 TotallyNotJson.1083; + jump TotallyNotJson.1080 TotallyNotJson.1081; in - let TotallyNotJson.1303 : U8 = 92i64; - let TotallyNotJson.1300 : Int1 = CallByName Bool.11 TotallyNotJson.607 TotallyNotJson.1303; - let TotallyNotJson.1302 : U8 = 117i64; - let TotallyNotJson.1301 : Int1 = CallByName Bool.11 TotallyNotJson.608 TotallyNotJson.1302; - let TotallyNotJson.1299 : Int1 = CallByName Bool.3 TotallyNotJson.1300 TotallyNotJson.1301; - jump TotallyNotJson.1298 TotallyNotJson.1299; + let TotallyNotJson.1101 : U8 = 92i64; + let TotallyNotJson.1098 : Int1 = CallByName Bool.11 TotallyNotJson.570 TotallyNotJson.1101; + let TotallyNotJson.1100 : U8 = 117i64; + let TotallyNotJson.1099 : Int1 = CallByName Bool.11 TotallyNotJson.571 TotallyNotJson.1100; + let TotallyNotJson.1097 : Int1 = CallByName Bool.3 TotallyNotJson.1098 TotallyNotJson.1099; + jump TotallyNotJson.1096 TotallyNotJson.1097; else - dec TotallyNotJson.605; - dec TotallyNotJson.604; - jump TotallyNotJson.1279; + dec TotallyNotJson.568; + dec TotallyNotJson.567; + jump TotallyNotJson.1077; else - dec TotallyNotJson.605; - dec TotallyNotJson.604; - let TotallyNotJson.1277 : {List U8, List U8} = Struct {TotallyNotJson.600, TotallyNotJson.601}; - ret TotallyNotJson.1277; + dec TotallyNotJson.568; + dec TotallyNotJson.567; + let TotallyNotJson.1075 : {List U8, List U8} = Struct {TotallyNotJson.563, TotallyNotJson.564}; + ret TotallyNotJson.1075; in - jump TotallyNotJson.1198 #Derived_gen.5; + jump TotallyNotJson.996 #Derived_gen.0; procedure TotallyNotJson.8 (): - let TotallyNotJson.1172 : [C , C [], C , C , C , C ] = TagId(2) ; - ret TotallyNotJson.1172; + let TotallyNotJson.970 : {} = Struct {}; + ret TotallyNotJson.970; diff --git a/crates/compiler/test_mono/generated/issue_5513.txt b/crates/compiler/test_mono/generated/issue_5513.txt new file mode 100644 index 00000000000..b7ec6aa4c35 --- /dev/null +++ b/crates/compiler/test_mono/generated/issue_5513.txt @@ -0,0 +1,11 @@ +procedure Test.1 (Test.2): + let Test.7 : I64 = StructAtIndex 1 Test.2; + let Test.5 : {I64, I64} = Struct {Test.7, Test.7}; + ret Test.5; + +procedure Test.0 (): + let Test.8 : I64 = 0i64; + let Test.9 : I64 = 0i64; + let Test.4 : {I64, I64} = Struct {Test.8, Test.9}; + let Test.3 : {I64, I64} = CallByName Test.1 Test.4; + ret Test.3; diff --git a/crates/compiler/test_mono/generated/issue_6174.txt b/crates/compiler/test_mono/generated/issue_6174.txt new file mode 100644 index 00000000000..d0f09619cb6 --- /dev/null +++ b/crates/compiler/test_mono/generated/issue_6174.txt @@ -0,0 +1,37 @@ +procedure Bool.1 (): + let Bool.23 : Int1 = false; + ret Bool.23; + +procedure Test.2 (Test.11, Test.1): + if Test.1 then + let Test.29 : I64 = 0i64; + let Test.28 : [C {}, C I64] = TagId(1) Test.29; + ret Test.28; + else + let Test.27 : {} = Struct {}; + let Test.26 : [C {}, C I64] = TagId(0) Test.27; + ret Test.26; + +procedure Test.3 (Test.12, Test.1): + if Test.1 then + let Test.23 : I64 = 0i64; + let Test.22 : [C {}, C I64] = TagId(1) Test.23; + ret Test.22; + else + let Test.21 : {} = Struct {}; + let Test.20 : [C {}, C I64] = TagId(0) Test.21; + ret Test.20; + +procedure Test.4 (Test.13, Test.1): + let Test.25 : {} = Struct {}; + let Test.17 : [C {}, C I64] = CallByName Test.2 Test.25 Test.1; + let Test.19 : {} = Struct {}; + let Test.18 : [C {}, C I64] = CallByName Test.3 Test.19 Test.1; + let Test.16 : List [C {}, C I64] = Array [Test.17, Test.18]; + ret Test.16; + +procedure Test.0 (): + let Test.1 : Int1 = CallByName Bool.1; + let Test.15 : {} = Struct {}; + let Test.14 : List [C {}, C I64] = CallByName Test.4 Test.15 Test.1; + ret Test.14; diff --git a/crates/compiler/test_mono/generated/issue_6196.txt b/crates/compiler/test_mono/generated/issue_6196.txt index c360b158457..1c7034a4fe8 100644 --- a/crates/compiler/test_mono/generated/issue_6196.txt +++ b/crates/compiler/test_mono/generated/issue_6196.txt @@ -1,6 +1,6 @@ procedure Num.20 (#Attr.2, #Attr.3): - let Num.291 : U64 = lowlevel NumSub #Attr.2 #Attr.3; - ret Num.291; + let Num.303 : U64 = lowlevel NumSub #Attr.2 #Attr.3; + ret Num.303; procedure Test.1 (#Derived_gen.0, #Derived_gen.1): joinpoint Test.12 Test.2 Test.3: diff --git a/crates/compiler/test_mono/generated/lambda_capture_niche_u8_vs_u64.txt b/crates/compiler/test_mono/generated/lambda_capture_niche_u8_vs_u64.txt index eeaa308265b..876e17a47e7 100644 --- a/crates/compiler/test_mono/generated/lambda_capture_niche_u8_vs_u64.txt +++ b/crates/compiler/test_mono/generated/lambda_capture_niche_u8_vs_u64.txt @@ -1,10 +1,10 @@ procedure Num.96 (#Attr.2): - let Num.291 : Str = lowlevel NumToStr #Attr.2; - ret Num.291; + let Num.303 : Str = lowlevel NumToStr #Attr.2; + ret Num.303; procedure Num.96 (#Attr.2): - let Num.292 : Str = lowlevel NumToStr #Attr.2; - ret Num.292; + let Num.304 : Str = lowlevel NumToStr #Attr.2; + ret Num.304; procedure Test.1 (Test.4): let Test.13 : [C U8, C U64] = TagId(1) Test.4; diff --git a/crates/compiler/test_mono/generated/lambda_capture_niches_with_other_lambda_capture.txt b/crates/compiler/test_mono/generated/lambda_capture_niches_with_other_lambda_capture.txt index 143235362fd..d608ea651bf 100644 --- a/crates/compiler/test_mono/generated/lambda_capture_niches_with_other_lambda_capture.txt +++ b/crates/compiler/test_mono/generated/lambda_capture_niches_with_other_lambda_capture.txt @@ -1,10 +1,14 @@ +procedure Str.3 (#Attr.2, #Attr.3): + let Str.251 : Str = lowlevel StrConcat #Attr.2 #Attr.3; + ret Str.251; + procedure Test.1 (Test.5): let Test.16 : [C {}, C U64, C Str] = TagId(0) Test.5; ret Test.16; procedure Test.1 (Test.5): - let Test.30 : [C {}, C U64, C Str] = TagId(1) Test.5; - ret Test.30; + let Test.31 : [C {}, C U64, C Str] = TagId(1) Test.5; + ret Test.31; procedure Test.2 (Test.7): let Test.23 : [C {}, C U64, C Str] = TagId(2) Test.7; @@ -16,13 +20,16 @@ procedure Test.6 (Test.17, #Attr.12): ret Test.19; procedure Test.6 (Test.17, #Attr.12): - let Test.34 : U64 = UnionAtIndex (Id 1) (Index 0) #Attr.12; - let Test.33 : Str = ""; - ret Test.33; + let Test.35 : U64 = UnionAtIndex (Id 1) (Index 0) #Attr.12; + let Test.34 : Str = ""; + ret Test.34; procedure Test.8 (Test.24, #Attr.12): - let Test.27 : Str = UnionAtIndex (Id 2) (Index 0) #Attr.12; - ret Test.27; + let Test.28 : Str = UnionAtIndex (Id 2) (Index 0) #Attr.12; + let Test.27 : Str = ""; + let Test.26 : Str = CallByName Str.3 Test.27 Test.28; + dec Test.28; + ret Test.26; procedure Test.0 (): let Test.3 : U8 = 0u8; @@ -55,7 +62,7 @@ procedure Test.0 (): jump Test.13 Test.21; default: - let Test.29 : U64 = 1i64; - let Test.28 : [C {}, C U64, C Str] = CallByName Test.1 Test.29; - jump Test.13 Test.28; + let Test.30 : U64 = 1i64; + let Test.29 : [C {}, C U64, C Str] = CallByName Test.1 Test.30; + jump Test.13 Test.29; diff --git a/crates/compiler/test_mono/generated/lambda_set_with_imported_toplevels_issue_4733.txt b/crates/compiler/test_mono/generated/lambda_set_with_imported_toplevels_issue_4733.txt index 69e526d85b3..f941849e0c4 100644 --- a/crates/compiler/test_mono/generated/lambda_set_with_imported_toplevels_issue_4733.txt +++ b/crates/compiler/test_mono/generated/lambda_set_with_imported_toplevels_issue_4733.txt @@ -7,12 +7,12 @@ procedure Bool.2 (): ret Bool.24; procedure Num.19 (#Attr.2, #Attr.3): - let Num.291 : U64 = lowlevel NumAdd #Attr.2 #Attr.3; - ret Num.291; + let Num.303 : U64 = lowlevel NumAdd #Attr.2 #Attr.3; + ret Num.303; procedure Num.21 (#Attr.2, #Attr.3): - let Num.292 : U64 = lowlevel NumMul #Attr.2 #Attr.3; - ret Num.292; + let Num.304 : U64 = lowlevel NumMul #Attr.2 #Attr.3; + ret Num.304; procedure Test.0 (Test.8): let Test.20 : Int1 = CallByName Bool.2; 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 169634192e8..410ad8b07c3 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,40 +1,40 @@ -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; - ret Num.292; + let Num.304 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; + ret Num.304; procedure Num.51 (#Attr.2, #Attr.3): - let Num.291 : U64 = lowlevel NumAddWrap #Attr.2 #Attr.3; - ret Num.291; + let Num.303 : U64 = lowlevel NumAddWrap #Attr.2 #Attr.3; + ret Num.303; procedure Test.7 (Test.11, Test.12): let Test.17 : {[C *self, ], [, C {[C *self, ], *self}]} = Struct {Test.12, Test.11}; diff --git a/crates/compiler/test_mono/generated/linked_list_filter.txt b/crates/compiler/test_mono/generated/linked_list_filter.txt index 2daa0e1a299..0a4cbfd7973 100644 --- a/crates/compiler/test_mono/generated/linked_list_filter.txt +++ b/crates/compiler/test_mono/generated/linked_list_filter.txt @@ -1,11 +1,11 @@ -procedure Num.31 (Num.234): - let Num.292 : I64 = 2i64; - let Num.291 : Int1 = CallByName Num.86 Num.234 Num.292; - ret Num.291; +procedure Num.31 (Num.241): + let Num.304 : I64 = 2i64; + let Num.303 : Int1 = CallByName Num.86 Num.241 Num.304; + ret Num.303; procedure Num.86 (#Attr.2, #Attr.3): - let Num.293 : Int1 = lowlevel NumIsMultipleOf #Attr.2 #Attr.3; - ret Num.293; + let Num.305 : Int1 = lowlevel NumIsMultipleOf #Attr.2 #Attr.3; + ret Num.305; procedure Test.2 (#Derived_gen.0, #Derived_gen.1): let #Derived_gen.3 : [, C I64 *self] = NullPointer; diff --git a/crates/compiler/test_mono/generated/linked_list_map.txt b/crates/compiler/test_mono/generated/linked_list_map.txt index c77b3e477fa..389d633f2ae 100644 --- a/crates/compiler/test_mono/generated/linked_list_map.txt +++ b/crates/compiler/test_mono/generated/linked_list_map.txt @@ -1,6 +1,6 @@ procedure Num.19 (#Attr.2, #Attr.3): - let Num.291 : I64 = lowlevel NumAdd #Attr.2 #Attr.3; - ret Num.291; + let Num.303 : I64 = lowlevel NumAdd #Attr.2 #Attr.3; + ret Num.303; procedure Test.10 (Test.11): let Test.28 : I64 = 1i64; diff --git a/crates/compiler/test_mono/generated/list_append.txt b/crates/compiler/test_mono/generated/list_append.txt index e8fcc578111..43dc4b24409 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 c635c46e0d9..af9f28c7fab 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 ac188ff54a0..fd0b3ee4e6b 100644 --- a/crates/compiler/test_mono/generated/list_cannot_update_inplace.txt +++ b/crates/compiler/test_mono/generated/list_cannot_update_inplace.txt @@ -1,33 +1,33 @@ -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; - -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; + let List.572 : U64 = lowlevel ListLen #Attr.2; + ret List.572; + +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; - ret Num.291; + let Num.303 : U64 = lowlevel NumAdd #Attr.2 #Attr.3; + ret Num.303; procedure Num.22 (#Attr.2, #Attr.3): - let Num.292 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; - ret Num.292; + let Num.304 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; + ret Num.304; procedure Test.1 (): let Test.8 : List I64 = Array [1i64, 2i64, 3i64]; diff --git a/crates/compiler/test_mono/generated/list_get.txt b/crates/compiler/test_mono/generated/list_get.txt index bf50499e0ac..f0e4f00ae79 100644 --- a/crates/compiler/test_mono/generated/list_get.txt +++ b/crates/compiler/test_mono/generated/list_get.txt @@ -1,28 +1,28 @@ -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; - ret Num.291; + let Num.303 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; + ret Num.303; procedure Test.1 (Test.2): let Test.6 : List I64 = Array [1i64, 2i64, 3i64]; diff --git a/crates/compiler/test_mono/generated/list_len.txt b/crates/compiler/test_mono/generated/list_len.txt index e51c03489a0..8dc4765352d 100644 --- a/crates/compiler/test_mono/generated/list_len.txt +++ b/crates/compiler/test_mono/generated/list_len.txt @@ -1,14 +1,14 @@ 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; - ret Num.291; + let Num.303 : U64 = lowlevel NumAdd #Attr.2 #Attr.3; + ret Num.303; procedure Test.0 (): let Test.1 : List I64 = Array [1i64, 2i64, 3i64]; 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 f3eee0fa871..6874909f422 100644 --- a/crates/compiler/test_mono/generated/list_map_closure_borrows.txt +++ b/crates/compiler/test_mono/generated/list_map_closure_borrows.txt @@ -1,42 +1,42 @@ -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; - ret Num.291; + let Num.303 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; + ret Num.303; procedure Str.16 (#Attr.2, #Attr.3): - let Str.292 : Str = lowlevel StrRepeat #Attr.2 #Attr.3; - ret Str.292; + let Str.251 : Str = lowlevel StrRepeat #Attr.2 #Attr.3; + ret Str.251; procedure Str.3 (#Attr.2, #Attr.3): - let Str.293 : Str = lowlevel StrConcat #Attr.2 #Attr.3; - ret Str.293; + let Str.252 : Str = lowlevel StrConcat #Attr.2 #Attr.3; + ret Str.252; procedure Test.1 (): let Test.21 : Str = "lllllllllllllllllllllooooooooooong"; 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 876f2b41c27..1b2b9fb5f4d 100644 --- a/crates/compiler/test_mono/generated/list_map_closure_owns.txt +++ b/crates/compiler/test_mono/generated/list_map_closure_owns.txt @@ -1,38 +1,38 @@ -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; - ret Num.291; + let Num.303 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; + ret Num.303; procedure Str.3 (#Attr.2, #Attr.3): - let Str.293 : Str = lowlevel StrConcat #Attr.2 #Attr.3; - ret Str.293; + let Str.252 : Str = lowlevel StrConcat #Attr.2 #Attr.3; + ret Str.252; procedure Test.1 (): let Test.21 : Str = "lllllllllllllllllllllooooooooooong"; 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 7dc61e37685..37a295f5aee 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,28 +1,28 @@ 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): - let Num.293 : U8 = lowlevel NumAdd #Attr.2 #Attr.3; - ret Num.293; + let Num.305 : U8 = lowlevel NumAdd #Attr.2 #Attr.3; + ret Num.305; procedure Test.4 (Test.5, #Attr.12): let Test.16 : U8 = UnionAtIndex (Id 0) (Index 0) #Attr.12; 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 37faccea1f6..4a2133997c1 100644 --- a/crates/compiler/test_mono/generated/list_pass_to_function.txt +++ b/crates/compiler/test_mono/generated/list_pass_to_function.txt @@ -1,29 +1,29 @@ -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; - ret Num.291; + let Num.303 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; + ret Num.303; procedure Test.2 (Test.3): let Test.6 : U64 = 0i64; diff --git a/crates/compiler/test_mono/generated/list_sort_asc.txt b/crates/compiler/test_mono/generated/list_sort_asc.txt index 48800b0b1cd..6e9310c99c2 100644 --- a/crates/compiler/test_mono/generated/list_sort_asc.txt +++ b/crates/compiler/test_mono/generated/list_sort_asc.txt @@ -1,15 +1,15 @@ 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; - ret Num.291; + let Num.303 : U8 = lowlevel NumCompare #Attr.2 #Attr.3; + ret Num.303; procedure Test.0 (): let Test.2 : List I64 = Array [4i64, 3i64, 2i64, 1i64]; diff --git a/crates/compiler/test_mono/generated/multiline_record_pattern.txt b/crates/compiler/test_mono/generated/multiline_record_pattern.txt index 2e73bc54863..5bc945a4db7 100644 --- a/crates/compiler/test_mono/generated/multiline_record_pattern.txt +++ b/crates/compiler/test_mono/generated/multiline_record_pattern.txt @@ -1,6 +1,6 @@ procedure Num.19 (#Attr.2, #Attr.3): - let Num.292 : I64 = lowlevel NumAdd #Attr.2 #Attr.3; - ret Num.292; + let Num.304 : I64 = lowlevel NumAdd #Attr.2 #Attr.3; + ret Num.304; procedure Test.0 (): let Test.7 : I64 = 1i64; diff --git a/crates/compiler/test_mono/generated/nested_optional_field_with_binary_op.txt b/crates/compiler/test_mono/generated/nested_optional_field_with_binary_op.txt index 404f08f3d88..44a34caff61 100644 --- a/crates/compiler/test_mono/generated/nested_optional_field_with_binary_op.txt +++ b/crates/compiler/test_mono/generated/nested_optional_field_with_binary_op.txt @@ -1,6 +1,6 @@ procedure Num.19 (#Attr.2, #Attr.3): - let Num.291 : I64 = lowlevel NumAdd #Attr.2 #Attr.3; - ret Num.291; + let Num.303 : I64 = lowlevel NumAdd #Attr.2 #Attr.3; + ret Num.303; procedure Test.0 (): let Test.17 : {} = Struct {}; diff --git a/crates/compiler/test_mono/generated/nested_pattern_match.txt b/crates/compiler/test_mono/generated/nested_pattern_match.txt index 8ab6fb8c26a..c030a8121aa 100644 --- a/crates/compiler/test_mono/generated/nested_pattern_match.txt +++ b/crates/compiler/test_mono/generated/nested_pattern_match.txt @@ -1,6 +1,6 @@ procedure Num.19 (#Attr.2, #Attr.3): - let Num.291 : I64 = lowlevel NumAdd #Attr.2 #Attr.3; - ret Num.291; + let Num.303 : I64 = lowlevel NumAdd #Attr.2 #Attr.3; + ret Num.303; procedure Test.0 (): let Test.19 : I64 = 41i64; diff --git a/crates/compiler/test_mono/generated/num_width_gt_u8_layout_as_float.txt b/crates/compiler/test_mono/generated/num_width_gt_u8_layout_as_float.txt index 9f45bc3b6e6..16e0980fdc2 100644 --- a/crates/compiler/test_mono/generated/num_width_gt_u8_layout_as_float.txt +++ b/crates/compiler/test_mono/generated/num_width_gt_u8_layout_as_float.txt @@ -1,6 +1,6 @@ procedure Num.37 (#Attr.2, #Attr.3): - let Num.291 : Decimal = lowlevel NumDivFrac #Attr.2 #Attr.3; - ret Num.291; + let Num.303 : Decimal = lowlevel NumDivFrac #Attr.2 #Attr.3; + ret Num.303; procedure Test.0 (): let Test.2 : Decimal = 1dec; diff --git a/crates/compiler/test_mono/generated/optional_field_with_binary_op.txt b/crates/compiler/test_mono/generated/optional_field_with_binary_op.txt index d0bfce4f16b..c69ccff98ef 100644 --- a/crates/compiler/test_mono/generated/optional_field_with_binary_op.txt +++ b/crates/compiler/test_mono/generated/optional_field_with_binary_op.txt @@ -1,6 +1,6 @@ procedure Num.19 (#Attr.2, #Attr.3): - let Num.291 : I64 = lowlevel NumAdd #Attr.2 #Attr.3; - ret Num.291; + let Num.303 : I64 = lowlevel NumAdd #Attr.2 #Attr.3; + ret Num.303; procedure Test.0 (): let Test.5 : {} = Struct {}; diff --git a/crates/compiler/test_mono/generated/optional_when.txt b/crates/compiler/test_mono/generated/optional_when.txt index b6dfd711f88..e04cd0a5970 100644 --- a/crates/compiler/test_mono/generated/optional_when.txt +++ b/crates/compiler/test_mono/generated/optional_when.txt @@ -1,6 +1,6 @@ procedure Num.21 (#Attr.2, #Attr.3): - let Num.293 : I64 = lowlevel NumMul #Attr.2 #Attr.3; - ret Num.293; + let Num.305 : I64 = lowlevel NumMul #Attr.2 #Attr.3; + ret Num.305; procedure Test.1 (Test.6): let Test.21 : Int1 = false; diff --git a/crates/compiler/test_mono/generated/polymorphic_expression_unification.txt b/crates/compiler/test_mono/generated/polymorphic_expression_unification.txt index a0f79514511..10f9905d3ef 100644 --- a/crates/compiler/test_mono/generated/polymorphic_expression_unification.txt +++ b/crates/compiler/test_mono/generated/polymorphic_expression_unification.txt @@ -3,8 +3,8 @@ procedure Bool.11 (#Attr.2, #Attr.3): ret Bool.23; procedure Str.3 (#Attr.2, #Attr.3): - let Str.293 : Str = lowlevel StrConcat #Attr.2 #Attr.3; - ret Str.293; + let Str.252 : Str = lowlevel StrConcat #Attr.2 #Attr.3; + ret Str.252; procedure Test.2 (Test.7): let Test.24 : Str = ".trace(\""; diff --git a/crates/compiler/test_mono/generated/quicksort_help.txt b/crates/compiler/test_mono/generated/quicksort_help.txt index 9362c4246a8..b5af3b2d74b 100644 --- a/crates/compiler/test_mono/generated/quicksort_help.txt +++ b/crates/compiler/test_mono/generated/quicksort_help.txt @@ -1,14 +1,14 @@ procedure Num.19 (#Attr.2, #Attr.3): - let Num.291 : I64 = lowlevel NumAdd #Attr.2 #Attr.3; - ret Num.291; + let Num.303 : I64 = lowlevel NumAdd #Attr.2 #Attr.3; + ret Num.303; procedure Num.20 (#Attr.2, #Attr.3): - let Num.292 : I64 = lowlevel NumSub #Attr.2 #Attr.3; - ret Num.292; + let Num.304 : I64 = lowlevel NumSub #Attr.2 #Attr.3; + ret Num.304; procedure Num.22 (#Attr.2, #Attr.3): - let Num.293 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; - ret Num.293; + let Num.305 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; + ret Num.305; procedure Test.1 (#Derived_gen.0, #Derived_gen.1, #Derived_gen.2): joinpoint Test.12 Test.2 Test.3 Test.4: diff --git a/crates/compiler/test_mono/generated/quicksort_swap.txt b/crates/compiler/test_mono/generated/quicksort_swap.txt index 176c1a7a5cf..857c2bc5a68 100644 --- a/crates/compiler/test_mono/generated/quicksort_swap.txt +++ b/crates/compiler/test_mono/generated/quicksort_swap.txt @@ -1,47 +1,47 @@ -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; - ret Num.293; + let Num.305 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; + ret Num.305; procedure Test.1 (Test.2): let Test.28 : U64 = 0i64; diff --git a/crates/compiler/test_mono/generated/rb_tree_fbip.txt b/crates/compiler/test_mono/generated/rb_tree_fbip.txt index bcd691966f2..006aff3017b 100644 --- a/crates/compiler/test_mono/generated/rb_tree_fbip.txt +++ b/crates/compiler/test_mono/generated/rb_tree_fbip.txt @@ -1,10 +1,10 @@ procedure Num.22 (#Attr.2, #Attr.3): - let Num.294 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; - ret Num.294; + let Num.306 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; + ret Num.306; procedure Num.24 (#Attr.2, #Attr.3): - let Num.292 : Int1 = lowlevel NumGt #Attr.2 #Attr.3; - ret Num.292; + let Num.304 : Int1 = lowlevel NumGt #Attr.2 #Attr.3; + ret Num.304; procedure Test.3 (#Derived_gen.0, #Derived_gen.1, #Derived_gen.2): let #Derived_gen.4 : [C *self I64 *self I32 Int1, ] = NullPointer; diff --git a/crates/compiler/test_mono/generated/record_optional_field_function_no_use_default.txt b/crates/compiler/test_mono/generated/record_optional_field_function_no_use_default.txt index 6c34a3e64a4..956e342b164 100644 --- a/crates/compiler/test_mono/generated/record_optional_field_function_no_use_default.txt +++ b/crates/compiler/test_mono/generated/record_optional_field_function_no_use_default.txt @@ -1,6 +1,6 @@ procedure Num.19 (#Attr.2, #Attr.3): - let Num.291 : I64 = lowlevel NumAdd #Attr.2 #Attr.3; - ret Num.291; + let Num.303 : I64 = lowlevel NumAdd #Attr.2 #Attr.3; + ret Num.303; procedure Test.1 (Test.4): let Test.2 : I64 = StructAtIndex 0 Test.4; diff --git a/crates/compiler/test_mono/generated/record_optional_field_function_use_default.txt b/crates/compiler/test_mono/generated/record_optional_field_function_use_default.txt index d40a2a60f24..629b4a132a7 100644 --- a/crates/compiler/test_mono/generated/record_optional_field_function_use_default.txt +++ b/crates/compiler/test_mono/generated/record_optional_field_function_use_default.txt @@ -1,6 +1,6 @@ procedure Num.19 (#Attr.2, #Attr.3): - let Num.291 : I64 = lowlevel NumAdd #Attr.2 #Attr.3; - ret Num.291; + let Num.303 : I64 = lowlevel NumAdd #Attr.2 #Attr.3; + ret Num.303; procedure Test.1 (Test.4): let Test.2 : I64 = 10i64; diff --git a/crates/compiler/test_mono/generated/record_optional_field_let_no_use_default.txt b/crates/compiler/test_mono/generated/record_optional_field_let_no_use_default.txt index 775506b2828..ab6b67d3544 100644 --- a/crates/compiler/test_mono/generated/record_optional_field_let_no_use_default.txt +++ b/crates/compiler/test_mono/generated/record_optional_field_let_no_use_default.txt @@ -1,6 +1,6 @@ procedure Num.19 (#Attr.2, #Attr.3): - let Num.291 : I64 = lowlevel NumAdd #Attr.2 #Attr.3; - ret Num.291; + let Num.303 : I64 = lowlevel NumAdd #Attr.2 #Attr.3; + ret Num.303; procedure Test.1 (Test.2): let Test.3 : I64 = StructAtIndex 0 Test.2; diff --git a/crates/compiler/test_mono/generated/record_optional_field_let_use_default.txt b/crates/compiler/test_mono/generated/record_optional_field_let_use_default.txt index 9f896c746f9..aa28e37ecfb 100644 --- a/crates/compiler/test_mono/generated/record_optional_field_let_use_default.txt +++ b/crates/compiler/test_mono/generated/record_optional_field_let_use_default.txt @@ -1,6 +1,6 @@ procedure Num.19 (#Attr.2, #Attr.3): - let Num.291 : I64 = lowlevel NumAdd #Attr.2 #Attr.3; - ret Num.291; + let Num.303 : I64 = lowlevel NumAdd #Attr.2 #Attr.3; + ret Num.303; procedure Test.1 (Test.2): let Test.3 : I64 = 10i64; diff --git a/crates/compiler/test_mono/generated/record_update.txt b/crates/compiler/test_mono/generated/record_update.txt index 3b233839888..1a9ac165186 100644 --- a/crates/compiler/test_mono/generated/record_update.txt +++ b/crates/compiler/test_mono/generated/record_update.txt @@ -1,41 +1,41 @@ -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; - ret Num.291; + let Num.303 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; + ret Num.303; procedure Test.1 (Test.2): let Test.6 : List U64 = StructAtIndex 0 Test.2; - let Test.8 : List U64 = StructAtIndex 1 Test.2; - let Test.10 : List U64 = StructAtIndex 2 Test.2; + let Test.7 : List U64 = StructAtIndex 1 Test.2; + let Test.8 : List U64 = StructAtIndex 2 Test.2; let Test.13 : U64 = 8i64; let Test.14 : U64 = 8i64; - let Test.9 : List U64 = CallByName List.3 Test.8 Test.13 Test.14; + let Test.10 : List U64 = CallByName List.3 Test.7 Test.13 Test.14; let Test.11 : U64 = 7i64; let Test.12 : U64 = 7i64; - let Test.7 : List U64 = CallByName List.3 Test.6 Test.11 Test.12; - let Test.5 : {List U64, List U64, List U64} = Struct {Test.7, Test.9, Test.10}; + let Test.9 : List U64 = CallByName List.3 Test.6 Test.11 Test.12; + let Test.5 : {List U64, List U64, List U64} = Struct {Test.9, Test.10, Test.8}; ret Test.5; procedure Test.0 (): diff --git a/crates/compiler/test_mono/generated/recursive_call_capturing_function.txt b/crates/compiler/test_mono/generated/recursive_call_capturing_function.txt index 46f3c7b7bca..50f06fd6d44 100644 --- a/crates/compiler/test_mono/generated/recursive_call_capturing_function.txt +++ b/crates/compiler/test_mono/generated/recursive_call_capturing_function.txt @@ -3,8 +3,8 @@ procedure Bool.2 (): ret Bool.23; procedure Num.19 (#Attr.2, #Attr.3): - let Num.291 : U32 = lowlevel NumAdd #Attr.2 #Attr.3; - ret Num.291; + let Num.303 : U32 = lowlevel NumAdd #Attr.2 #Attr.3; + ret Num.303; procedure Test.1 (Test.2): let Test.8 : U32 = 0i64; 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 1d8626f04d0..5b01a4ab339 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/recursive_lambda_set_resolved_only_upon_specialization.txt b/crates/compiler/test_mono/generated/recursive_lambda_set_resolved_only_upon_specialization.txt index 230679128f7..35f508a79ec 100644 --- a/crates/compiler/test_mono/generated/recursive_lambda_set_resolved_only_upon_specialization.txt +++ b/crates/compiler/test_mono/generated/recursive_lambda_set_resolved_only_upon_specialization.txt @@ -3,12 +3,12 @@ procedure Bool.11 (#Attr.2, #Attr.3): ret Bool.23; procedure Num.20 (#Attr.2, #Attr.3): - let Num.292 : U8 = lowlevel NumSub #Attr.2 #Attr.3; - ret Num.292; + let Num.304 : U8 = lowlevel NumSub #Attr.2 #Attr.3; + ret Num.304; procedure Num.21 (#Attr.2, #Attr.3): - let Num.291 : U8 = lowlevel NumMul #Attr.2 #Attr.3; - ret Num.291; + let Num.303 : U8 = lowlevel NumMul #Attr.2 #Attr.3; + ret Num.303; procedure Test.1 (#Derived_gen.2, #Derived_gen.3): joinpoint Test.11 Test.2 Test.3: diff --git a/crates/compiler/test_mono/generated/recursively_build_effect.txt b/crates/compiler/test_mono/generated/recursively_build_effect.txt index c480f7db06f..74aae0d2356 100644 --- a/crates/compiler/test_mono/generated/recursively_build_effect.txt +++ b/crates/compiler/test_mono/generated/recursively_build_effect.txt @@ -1,10 +1,10 @@ procedure Num.20 (#Attr.2, #Attr.3): - let Num.291 : I64 = lowlevel NumSub #Attr.2 #Attr.3; - ret Num.291; + let Num.303 : I64 = lowlevel NumSub #Attr.2 #Attr.3; + ret Num.303; procedure Str.3 (#Attr.2, #Attr.3): - let Str.294 : Str = lowlevel StrConcat #Attr.2 #Attr.3; - ret Str.294; + let Str.253 : Str = lowlevel StrConcat #Attr.2 #Attr.3; + ret Str.253; procedure Test.11 (Test.29, #Attr.12): let Test.32 : {} = UnionAtIndex (Id 0) (Index 0) #Attr.12; diff --git a/crates/compiler/test_mono/generated/rigids.txt b/crates/compiler/test_mono/generated/rigids.txt index 12c3f4fcd0c..c451f183e84 100644 --- a/crates/compiler/test_mono/generated/rigids.txt +++ b/crates/compiler/test_mono/generated/rigids.txt @@ -1,47 +1,47 @@ -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; - ret Num.293; + let Num.305 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; + ret Num.305; procedure Test.1 (Test.2, Test.3, Test.4): inc 2 Test.4; diff --git a/crates/compiler/test_mono/generated/specialize_after_match.txt b/crates/compiler/test_mono/generated/specialize_after_match.txt index 02d920d9a99..0175e6fe4fc 100644 --- a/crates/compiler/test_mono/generated/specialize_after_match.txt +++ b/crates/compiler/test_mono/generated/specialize_after_match.txt @@ -1,10 +1,10 @@ procedure Num.19 (#Attr.2, #Attr.3): - let Num.292 : U64 = lowlevel NumAdd #Attr.2 #Attr.3; - ret Num.292; + let Num.304 : U64 = lowlevel NumAdd #Attr.2 #Attr.3; + ret Num.304; procedure Num.24 (#Attr.2, #Attr.3): - let Num.293 : Int1 = lowlevel NumGt #Attr.2 #Attr.3; - ret Num.293; + let Num.305 : Int1 = lowlevel NumGt #Attr.2 #Attr.3; + ret Num.305; procedure Test.2 (Test.9, Test.10): let Test.38 : U8 = 1i64; diff --git a/crates/compiler/test_mono/generated/specialize_closures.txt b/crates/compiler/test_mono/generated/specialize_closures.txt index c4fb2d12cdd..de31decd3c5 100644 --- a/crates/compiler/test_mono/generated/specialize_closures.txt +++ b/crates/compiler/test_mono/generated/specialize_closures.txt @@ -3,12 +3,12 @@ procedure Bool.2 (): ret Bool.24; procedure Num.19 (#Attr.2, #Attr.3): - let Num.292 : I64 = lowlevel NumAdd #Attr.2 #Attr.3; - ret Num.292; + let Num.304 : I64 = lowlevel NumAdd #Attr.2 #Attr.3; + ret Num.304; procedure Num.21 (#Attr.2, #Attr.3): - let Num.291 : I64 = lowlevel NumMul #Attr.2 #Attr.3; - ret Num.291; + let Num.303 : I64 = lowlevel NumMul #Attr.2 #Attr.3; + ret Num.303; procedure Test.1 (Test.2, Test.3): let Test.15 : U8 = GetTagId Test.2; diff --git a/crates/compiler/test_mono/generated/specialize_lowlevel.txt b/crates/compiler/test_mono/generated/specialize_lowlevel.txt index 5f6fe5671d3..2a2afeba79f 100644 --- a/crates/compiler/test_mono/generated/specialize_lowlevel.txt +++ b/crates/compiler/test_mono/generated/specialize_lowlevel.txt @@ -3,12 +3,12 @@ procedure Bool.2 (): ret Bool.23; procedure Num.19 (#Attr.2, #Attr.3): - let Num.292 : I64 = lowlevel NumAdd #Attr.2 #Attr.3; - ret Num.292; + let Num.304 : I64 = lowlevel NumAdd #Attr.2 #Attr.3; + ret Num.304; procedure Num.21 (#Attr.2, #Attr.3): - let Num.291 : I64 = lowlevel NumMul #Attr.2 #Attr.3; - ret Num.291; + let Num.303 : I64 = lowlevel NumMul #Attr.2 #Attr.3; + ret Num.303; procedure Test.6 (Test.8, #Attr.12): let Test.20 : I64 = UnionAtIndex (Id 0) (Index 0) #Attr.12; diff --git a/crates/compiler/test_mono/generated/tail_call_elimination.txt b/crates/compiler/test_mono/generated/tail_call_elimination.txt index fa269476476..a61c0f7ebab 100644 --- a/crates/compiler/test_mono/generated/tail_call_elimination.txt +++ b/crates/compiler/test_mono/generated/tail_call_elimination.txt @@ -1,10 +1,10 @@ procedure Num.19 (#Attr.2, #Attr.3): - let Num.291 : I64 = lowlevel NumAdd #Attr.2 #Attr.3; - ret Num.291; + let Num.303 : I64 = lowlevel NumAdd #Attr.2 #Attr.3; + ret Num.303; procedure Num.20 (#Attr.2, #Attr.3): - let Num.292 : I64 = lowlevel NumSub #Attr.2 #Attr.3; - ret Num.292; + let Num.304 : I64 = lowlevel NumSub #Attr.2 #Attr.3; + ret Num.304; procedure Test.1 (#Derived_gen.0, #Derived_gen.1): joinpoint Test.7 Test.2 Test.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 f8b6a8eced5..2cebc641c71 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 @@ -16,11 +16,11 @@ procedure Encode.24 (Encode.99, Encode.107, Encode.101): ret Encode.111; procedure Encode.24 (Encode.99, Encode.107, Encode.101): - let Encode.113 : List U8 = CallByName TotallyNotJson.264 Encode.99 Encode.101 Encode.107; + let Encode.113 : List U8 = CallByName TotallyNotJson.228 Encode.99 Encode.101 Encode.107; ret Encode.113; procedure Encode.24 (Encode.99, Encode.107, Encode.101): - let Encode.118 : List U8 = CallByName TotallyNotJson.182 Encode.99 Encode.101 Encode.107; + let Encode.118 : List U8 = CallByName TotallyNotJson.150 Encode.99 Encode.101 Encode.107; ret Encode.118; procedure Encode.26 (Encode.105, Encode.106): @@ -29,199 +29,199 @@ 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.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.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.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.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.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.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.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; - -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.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.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; + let List.203 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.647; + ret List.203; + +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.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.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.6 (#Attr.2): + let List.623 : U64 = lowlevel ListLen #Attr.2; + ret List.623; + procedure List.66 (#Attr.2, #Attr.3): - let List.605 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.605; + let List.607 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.607; procedure List.66 (#Attr.2, #Attr.3): - let List.617 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.617; + 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; - -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; + let List.632 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; + ret List.632; + +procedure List.80 (#Derived_gen.6, #Derived_gen.7, #Derived_gen.8, #Derived_gen.9, #Derived_gen.10): + 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.157 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; - -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; + jump List.656 #Derived_gen.6 #Derived_gen.7 #Derived_gen.8 #Derived_gen.9 #Derived_gen.10; + +procedure List.90 (#Derived_gen.11, #Derived_gen.12, #Derived_gen.13, #Derived_gen.14, #Derived_gen.15): + 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.230 List.162 List.606; + 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; - -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; + jump List.600 #Derived_gen.11 #Derived_gen.12 #Derived_gen.13 #Derived_gen.14 #Derived_gen.15; + +procedure List.90 (#Derived_gen.19, #Derived_gen.20, #Derived_gen.21, #Derived_gen.22, #Derived_gen.23): + 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.183 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.19 #Derived_gen.20 #Derived_gen.21 #Derived_gen.22 #Derived_gen.23; procedure Num.127 (#Attr.2): - let Num.298 : U8 = lowlevel NumIntCast #Attr.2; - ret Num.298; + let Num.310 : U8 = lowlevel NumIntCast #Attr.2; + ret Num.310; procedure Num.19 (#Attr.2, #Attr.3): - let Num.302 : U64 = lowlevel NumAdd #Attr.2 #Attr.3; - ret Num.302; + let Num.314 : U64 = lowlevel NumAdd #Attr.2 #Attr.3; + ret Num.314; procedure Num.20 (#Attr.2, #Attr.3): - let Num.299 : U64 = lowlevel NumSub #Attr.2 #Attr.3; - ret Num.299; + let Num.311 : U64 = lowlevel NumSub #Attr.2 #Attr.3; + ret Num.311; procedure Num.21 (#Attr.2, #Attr.3): - let Num.304 : U64 = lowlevel NumMul #Attr.2 #Attr.3; - ret Num.304; + let Num.316 : U64 = lowlevel NumMul #Attr.2 #Attr.3; + ret Num.316; procedure Num.22 (#Attr.2, #Attr.3): - let Num.310 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; - ret Num.310; + let Num.322 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; + ret Num.322; procedure Num.24 (#Attr.2, #Attr.3): - let Num.312 : Int1 = lowlevel NumGt #Attr.2 #Attr.3; - ret Num.312; + let Num.324 : Int1 = lowlevel NumGt #Attr.2 #Attr.3; + ret Num.324; procedure Num.51 (#Attr.2, #Attr.3): - let Num.307 : U64 = lowlevel NumAddWrap #Attr.2 #Attr.3; - ret Num.307; + let Num.319 : U64 = lowlevel NumAddWrap #Attr.2 #Attr.3; + ret Num.319; procedure Num.75 (#Attr.2, #Attr.3): - let Num.311 : U64 = lowlevel NumSubWrap #Attr.2 #Attr.3; - ret Num.311; + let Num.323 : U64 = lowlevel NumSubWrap #Attr.2 #Attr.3; + ret Num.323; procedure Num.94 (#Attr.2, #Attr.3): - let Num.303 : U64 = lowlevel NumDivCeilUnchecked #Attr.2 #Attr.3; - ret Num.303; + let Num.315 : U64 = lowlevel NumDivCeilUnchecked #Attr.2 #Attr.3; + ret Num.315; procedure Str.12 (#Attr.2): - let Str.293 : List U8 = lowlevel StrToUtf8 #Attr.2; - ret Str.293; + let Str.252 : List U8 = lowlevel StrToUtf8 #Attr.2; + ret Str.252; procedure Test.2 (Test.10): let Test.15 : {Str, Str} = CallByName Encode.23 Test.10; @@ -246,7 +246,7 @@ procedure Test.5 (Test.6, Test.7, Test.4): dec #Derived_gen.24; let Test.28 : Str = CallByName TotallyNotJson.25 Test.29; let Test.27 : List Str = Array [Test.28]; - let Test.19 : {Str, List Str} = CallByName TotallyNotJson.32 Test.26 Test.27; + let Test.19 : {Str, List Str} = CallByName TotallyNotJson.31 Test.26 Test.27; jump Test.20 Test.19; else let Test.21 : Str = "B"; @@ -255,238 +255,240 @@ procedure Test.5 (Test.6, Test.7, Test.4): dec #Derived_gen.25; let Test.23 : Str = CallByName TotallyNotJson.25 Test.24; let Test.22 : List Str = Array [Test.23]; - let Test.19 : {Str, List Str} = CallByName TotallyNotJson.32 Test.21 Test.22; + let Test.19 : {Str, List Str} = CallByName TotallyNotJson.31 Test.21 Test.22; jump Test.20 Test.19; -procedure TotallyNotJson.182 (TotallyNotJson.183, TotallyNotJson.1219, TotallyNotJson.181): - let TotallyNotJson.1222 : List U8 = CallByName TotallyNotJson.26 TotallyNotJson.181; - let TotallyNotJson.1221 : List U8 = CallByName List.8 TotallyNotJson.183 TotallyNotJson.1222; - ret TotallyNotJson.1221; +procedure TotallyNotJson.150 (TotallyNotJson.151, TotallyNotJson.1017, TotallyNotJson.149): + let TotallyNotJson.1020 : List U8 = CallByName TotallyNotJson.26 TotallyNotJson.149; + let TotallyNotJson.1019 : List U8 = CallByName List.8 TotallyNotJson.151 TotallyNotJson.1020; + ret TotallyNotJson.1019; -procedure TotallyNotJson.189 (TotallyNotJson.1270, TotallyNotJson.192): - let TotallyNotJson.190 : U64 = StructAtIndex 0 TotallyNotJson.1270; - let TotallyNotJson.191 : Int1 = StructAtIndex 1 TotallyNotJson.1270; - switch TotallyNotJson.192: +procedure TotallyNotJson.157 (TotallyNotJson.1068, TotallyNotJson.160): + let TotallyNotJson.158 : U64 = StructAtIndex 0 TotallyNotJson.1068; + let TotallyNotJson.159 : Int1 = StructAtIndex 1 TotallyNotJson.1068; + switch TotallyNotJson.160: case 34: - let TotallyNotJson.1273 : Int1 = false; - let TotallyNotJson.1272 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1273}; - let TotallyNotJson.1271 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1272; - ret TotallyNotJson.1271; + let TotallyNotJson.1071 : Int1 = false; + let TotallyNotJson.1070 : {U64, Int1} = Struct {TotallyNotJson.158, TotallyNotJson.1071}; + let TotallyNotJson.1069 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1070; + ret TotallyNotJson.1069; case 92: - let TotallyNotJson.1276 : Int1 = false; - let TotallyNotJson.1275 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1276}; - let TotallyNotJson.1274 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1275; - ret TotallyNotJson.1274; + let TotallyNotJson.1074 : Int1 = false; + let TotallyNotJson.1073 : {U64, Int1} = Struct {TotallyNotJson.158, TotallyNotJson.1074}; + let TotallyNotJson.1072 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1073; + ret TotallyNotJson.1072; case 47: - let TotallyNotJson.1279 : Int1 = false; - let TotallyNotJson.1278 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1279}; - let TotallyNotJson.1277 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1278; - ret TotallyNotJson.1277; + let TotallyNotJson.1077 : Int1 = false; + let TotallyNotJson.1076 : {U64, Int1} = Struct {TotallyNotJson.158, TotallyNotJson.1077}; + let TotallyNotJson.1075 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1076; + ret TotallyNotJson.1075; case 8: - let TotallyNotJson.1282 : Int1 = false; - let TotallyNotJson.1281 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1282}; - let TotallyNotJson.1280 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1281; - ret TotallyNotJson.1280; + let TotallyNotJson.1080 : Int1 = false; + let TotallyNotJson.1079 : {U64, Int1} = Struct {TotallyNotJson.158, TotallyNotJson.1080}; + let TotallyNotJson.1078 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1079; + ret TotallyNotJson.1078; case 12: - let TotallyNotJson.1285 : Int1 = false; - let TotallyNotJson.1284 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1285}; - let TotallyNotJson.1283 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1284; - ret TotallyNotJson.1283; + let TotallyNotJson.1083 : Int1 = false; + let TotallyNotJson.1082 : {U64, Int1} = Struct {TotallyNotJson.158, TotallyNotJson.1083}; + let TotallyNotJson.1081 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1082; + ret TotallyNotJson.1081; case 10: - let TotallyNotJson.1288 : Int1 = false; - let TotallyNotJson.1287 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1288}; - let TotallyNotJson.1286 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1287; - ret TotallyNotJson.1286; + let TotallyNotJson.1086 : Int1 = false; + let TotallyNotJson.1085 : {U64, Int1} = Struct {TotallyNotJson.158, TotallyNotJson.1086}; + let TotallyNotJson.1084 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1085; + ret TotallyNotJson.1084; case 13: - let TotallyNotJson.1291 : Int1 = false; - let TotallyNotJson.1290 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1291}; - let TotallyNotJson.1289 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1290; - ret TotallyNotJson.1289; + let TotallyNotJson.1089 : Int1 = false; + let TotallyNotJson.1088 : {U64, Int1} = Struct {TotallyNotJson.158, TotallyNotJson.1089}; + let TotallyNotJson.1087 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1088; + ret TotallyNotJson.1087; case 9: - let TotallyNotJson.1294 : Int1 = false; - let TotallyNotJson.1293 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1294}; - let TotallyNotJson.1292 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1293; - ret TotallyNotJson.1292; + let TotallyNotJson.1092 : Int1 = false; + let TotallyNotJson.1091 : {U64, Int1} = Struct {TotallyNotJson.158, TotallyNotJson.1092}; + let TotallyNotJson.1090 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1091; + ret TotallyNotJson.1090; default: - let TotallyNotJson.1298 : U64 = 1i64; - let TotallyNotJson.1297 : U64 = CallByName Num.19 TotallyNotJson.190 TotallyNotJson.1298; - let TotallyNotJson.1296 : {U64, Int1} = Struct {TotallyNotJson.1297, TotallyNotJson.191}; - let TotallyNotJson.1295 : [C {U64, Int1}, C {U64, Int1}] = TagId(1) TotallyNotJson.1296; - ret TotallyNotJson.1295; + let TotallyNotJson.1096 : U64 = 1i64; + let TotallyNotJson.1095 : U64 = CallByName Num.19 TotallyNotJson.158 TotallyNotJson.1096; + let TotallyNotJson.1094 : {U64, Int1} = Struct {TotallyNotJson.1095, TotallyNotJson.159}; + let TotallyNotJson.1093 : [C {U64, Int1}, C {U64, Int1}] = TagId(1) TotallyNotJson.1094; + ret TotallyNotJson.1093; -procedure TotallyNotJson.215 (TotallyNotJson.216, TotallyNotJson.217): - let TotallyNotJson.1241 : List U8 = CallByName TotallyNotJson.27 TotallyNotJson.217; - let TotallyNotJson.1240 : List U8 = CallByName List.8 TotallyNotJson.216 TotallyNotJson.1241; - ret TotallyNotJson.1240; - -procedure TotallyNotJson.25 (TotallyNotJson.181): - let TotallyNotJson.1301 : Str = CallByName Encode.23 TotallyNotJson.181; - ret TotallyNotJson.1301; - -procedure TotallyNotJson.26 (TotallyNotJson.184): - let TotallyNotJson.185 : List U8 = CallByName Str.12 TotallyNotJson.184; - let TotallyNotJson.1299 : U64 = 0i64; - let TotallyNotJson.1300 : Int1 = true; - let TotallyNotJson.186 : {U64, Int1} = Struct {TotallyNotJson.1299, TotallyNotJson.1300}; - let TotallyNotJson.1269 : {} = Struct {}; - inc TotallyNotJson.185; - let TotallyNotJson.187 : {U64, Int1} = CallByName List.26 TotallyNotJson.185 TotallyNotJson.186 TotallyNotJson.1269; - let TotallyNotJson.1223 : Int1 = StructAtIndex 1 TotallyNotJson.187; - let TotallyNotJson.1267 : Int1 = true; - let TotallyNotJson.1268 : Int1 = lowlevel Eq TotallyNotJson.1267 TotallyNotJson.1223; - if TotallyNotJson.1268 then - let TotallyNotJson.1233 : U64 = CallByName List.6 TotallyNotJson.185; - let TotallyNotJson.1234 : U64 = 2i64; - let TotallyNotJson.1232 : U64 = CallByName Num.19 TotallyNotJson.1233 TotallyNotJson.1234; - let TotallyNotJson.1229 : List U8 = CallByName List.68 TotallyNotJson.1232; - let TotallyNotJson.1231 : U8 = 34i64; - let TotallyNotJson.1230 : List U8 = Array [TotallyNotJson.1231]; - let TotallyNotJson.1228 : List U8 = CallByName List.8 TotallyNotJson.1229 TotallyNotJson.1230; - let TotallyNotJson.1225 : List U8 = CallByName List.8 TotallyNotJson.1228 TotallyNotJson.185; - let TotallyNotJson.1227 : U8 = 34i64; - let TotallyNotJson.1226 : List U8 = Array [TotallyNotJson.1227]; - let TotallyNotJson.1224 : List U8 = CallByName List.8 TotallyNotJson.1225 TotallyNotJson.1226; - ret TotallyNotJson.1224; - else - inc TotallyNotJson.185; - let TotallyNotJson.1266 : U64 = StructAtIndex 0 TotallyNotJson.187; - let TotallyNotJson.1265 : {List U8, List U8} = CallByName List.52 TotallyNotJson.185 TotallyNotJson.1266; - let TotallyNotJson.211 : List U8 = StructAtIndex 0 TotallyNotJson.1265; - let TotallyNotJson.213 : List U8 = StructAtIndex 1 TotallyNotJson.1265; - let TotallyNotJson.1263 : U64 = CallByName List.6 TotallyNotJson.185; - dec TotallyNotJson.185; - let TotallyNotJson.1264 : U64 = 120i64; - let TotallyNotJson.1261 : U64 = CallByName Num.21 TotallyNotJson.1263 TotallyNotJson.1264; - let TotallyNotJson.1262 : U64 = 100i64; - let TotallyNotJson.1260 : U64 = CallByName Num.94 TotallyNotJson.1261 TotallyNotJson.1262; - let TotallyNotJson.1257 : List U8 = CallByName List.68 TotallyNotJson.1260; - let TotallyNotJson.1259 : U8 = 34i64; - let TotallyNotJson.1258 : List U8 = Array [TotallyNotJson.1259]; - let TotallyNotJson.1256 : List U8 = CallByName List.8 TotallyNotJson.1257 TotallyNotJson.1258; - let TotallyNotJson.214 : List U8 = CallByName List.8 TotallyNotJson.1256 TotallyNotJson.211; - let TotallyNotJson.1239 : {} = Struct {}; - let TotallyNotJson.1236 : List U8 = CallByName List.18 TotallyNotJson.213 TotallyNotJson.214 TotallyNotJson.1239; - let TotallyNotJson.1238 : U8 = 34i64; - let TotallyNotJson.1237 : List U8 = Array [TotallyNotJson.1238]; - let TotallyNotJson.1235 : List U8 = CallByName List.8 TotallyNotJson.1236 TotallyNotJson.1237; - ret TotallyNotJson.1235; - -procedure TotallyNotJson.264 (TotallyNotJson.265, TotallyNotJson.1175, #Attr.12): - let TotallyNotJson.263 : List Str = StructAtIndex 1 #Attr.12; - let TotallyNotJson.262 : Str = StructAtIndex 0 #Attr.12; - let TotallyNotJson.1213 : I64 = 123i64; - let TotallyNotJson.1212 : U8 = CallByName Num.127 TotallyNotJson.1213; - let TotallyNotJson.1209 : List U8 = CallByName List.4 TotallyNotJson.265 TotallyNotJson.1212; - let TotallyNotJson.1211 : I64 = 34i64; - let TotallyNotJson.1210 : U8 = CallByName Num.127 TotallyNotJson.1211; - let TotallyNotJson.1207 : List U8 = CallByName List.4 TotallyNotJson.1209 TotallyNotJson.1210; - let TotallyNotJson.1208 : List U8 = CallByName Str.12 TotallyNotJson.262; - let TotallyNotJson.1204 : List U8 = CallByName List.8 TotallyNotJson.1207 TotallyNotJson.1208; - let TotallyNotJson.1206 : I64 = 34i64; - let TotallyNotJson.1205 : U8 = CallByName Num.127 TotallyNotJson.1206; - let TotallyNotJson.1201 : List U8 = CallByName List.4 TotallyNotJson.1204 TotallyNotJson.1205; - let TotallyNotJson.1203 : I64 = 58i64; - let TotallyNotJson.1202 : U8 = CallByName Num.127 TotallyNotJson.1203; - let TotallyNotJson.1198 : List U8 = CallByName List.4 TotallyNotJson.1201 TotallyNotJson.1202; - let TotallyNotJson.1200 : I64 = 91i64; - let TotallyNotJson.1199 : U8 = CallByName Num.127 TotallyNotJson.1200; - let TotallyNotJson.268 : List U8 = CallByName List.4 TotallyNotJson.1198 TotallyNotJson.1199; - let TotallyNotJson.1197 : U64 = CallByName List.6 TotallyNotJson.263; - let TotallyNotJson.1185 : {List U8, U64} = Struct {TotallyNotJson.268, TotallyNotJson.1197}; - let TotallyNotJson.1184 : {List U8, U64} = CallByName List.18 TotallyNotJson.263 TotallyNotJson.1185 TotallyNotJson.1175; - let TotallyNotJson.270 : List U8 = StructAtIndex 0 TotallyNotJson.1184; - let TotallyNotJson.1183 : I64 = 93i64; - let TotallyNotJson.1182 : U8 = CallByName Num.127 TotallyNotJson.1183; - let TotallyNotJson.1179 : List U8 = CallByName List.4 TotallyNotJson.270 TotallyNotJson.1182; - let TotallyNotJson.1181 : I64 = 125i64; - let TotallyNotJson.1180 : U8 = CallByName Num.127 TotallyNotJson.1181; - let TotallyNotJson.1178 : List U8 = CallByName List.4 TotallyNotJson.1179 TotallyNotJson.1180; - ret TotallyNotJson.1178; - -procedure TotallyNotJson.267 (TotallyNotJson.1177, TotallyNotJson.273, TotallyNotJson.266): - let TotallyNotJson.271 : List U8 = StructAtIndex 0 TotallyNotJson.1177; - let TotallyNotJson.272 : U64 = StructAtIndex 1 TotallyNotJson.1177; - let TotallyNotJson.274 : List U8 = CallByName Encode.24 TotallyNotJson.271 TotallyNotJson.273 TotallyNotJson.266; - joinpoint TotallyNotJson.1191 TotallyNotJson.275: - let TotallyNotJson.1189 : U64 = 1i64; - let TotallyNotJson.1188 : U64 = CallByName Num.20 TotallyNotJson.272 TotallyNotJson.1189; - let TotallyNotJson.1187 : {List U8, U64} = Struct {TotallyNotJson.275, TotallyNotJson.1188}; - ret TotallyNotJson.1187; +procedure TotallyNotJson.183 (TotallyNotJson.184, TotallyNotJson.185): + let TotallyNotJson.1039 : List U8 = CallByName TotallyNotJson.27 TotallyNotJson.185; + let TotallyNotJson.1038 : List U8 = CallByName List.8 TotallyNotJson.184 TotallyNotJson.1039; + ret TotallyNotJson.1038; + +procedure TotallyNotJson.228 (TotallyNotJson.229, TotallyNotJson.973, #Attr.12): + let TotallyNotJson.227 : List Str = StructAtIndex 1 #Attr.12; + let TotallyNotJson.226 : Str = StructAtIndex 0 #Attr.12; + let TotallyNotJson.1011 : I64 = 123i64; + let TotallyNotJson.1010 : U8 = CallByName Num.127 TotallyNotJson.1011; + let TotallyNotJson.1007 : List U8 = CallByName List.4 TotallyNotJson.229 TotallyNotJson.1010; + let TotallyNotJson.1009 : I64 = 34i64; + let TotallyNotJson.1008 : U8 = CallByName Num.127 TotallyNotJson.1009; + let TotallyNotJson.1005 : List U8 = CallByName List.4 TotallyNotJson.1007 TotallyNotJson.1008; + let TotallyNotJson.1006 : List U8 = CallByName Str.12 TotallyNotJson.226; + let TotallyNotJson.1002 : List U8 = CallByName List.8 TotallyNotJson.1005 TotallyNotJson.1006; + let TotallyNotJson.1004 : I64 = 34i64; + let TotallyNotJson.1003 : U8 = CallByName Num.127 TotallyNotJson.1004; + let TotallyNotJson.999 : List U8 = CallByName List.4 TotallyNotJson.1002 TotallyNotJson.1003; + let TotallyNotJson.1001 : I64 = 58i64; + let TotallyNotJson.1000 : U8 = CallByName Num.127 TotallyNotJson.1001; + let TotallyNotJson.996 : List U8 = CallByName List.4 TotallyNotJson.999 TotallyNotJson.1000; + let TotallyNotJson.998 : I64 = 91i64; + let TotallyNotJson.997 : U8 = CallByName Num.127 TotallyNotJson.998; + let TotallyNotJson.231 : List U8 = CallByName List.4 TotallyNotJson.996 TotallyNotJson.997; + let TotallyNotJson.995 : U64 = CallByName List.6 TotallyNotJson.227; + let TotallyNotJson.983 : {List U8, U64} = Struct {TotallyNotJson.231, TotallyNotJson.995}; + let TotallyNotJson.984 : {} = Struct {}; + let TotallyNotJson.982 : {List U8, U64} = CallByName List.18 TotallyNotJson.227 TotallyNotJson.983 TotallyNotJson.984; + let TotallyNotJson.233 : List U8 = StructAtIndex 0 TotallyNotJson.982; + let TotallyNotJson.981 : I64 = 93i64; + let TotallyNotJson.980 : U8 = CallByName Num.127 TotallyNotJson.981; + let TotallyNotJson.977 : List U8 = CallByName List.4 TotallyNotJson.233 TotallyNotJson.980; + let TotallyNotJson.979 : I64 = 125i64; + let TotallyNotJson.978 : U8 = CallByName Num.127 TotallyNotJson.979; + let TotallyNotJson.976 : List U8 = CallByName List.4 TotallyNotJson.977 TotallyNotJson.978; + ret TotallyNotJson.976; + +procedure TotallyNotJson.230 (TotallyNotJson.975, TotallyNotJson.236): + let TotallyNotJson.234 : List U8 = StructAtIndex 0 TotallyNotJson.975; + let TotallyNotJson.235 : U64 = StructAtIndex 1 TotallyNotJson.975; + let TotallyNotJson.994 : {} = Struct {}; + let TotallyNotJson.237 : List U8 = CallByName Encode.24 TotallyNotJson.234 TotallyNotJson.236 TotallyNotJson.994; + joinpoint TotallyNotJson.989 TotallyNotJson.238: + let TotallyNotJson.987 : U64 = 1i64; + let TotallyNotJson.986 : U64 = CallByName Num.20 TotallyNotJson.235 TotallyNotJson.987; + let TotallyNotJson.985 : {List U8, U64} = Struct {TotallyNotJson.238, TotallyNotJson.986}; + ret TotallyNotJson.985; in - let TotallyNotJson.1195 : U64 = 1i64; - let TotallyNotJson.1192 : Int1 = CallByName Num.24 TotallyNotJson.272 TotallyNotJson.1195; - if TotallyNotJson.1192 then - let TotallyNotJson.1194 : I64 = 44i64; - let TotallyNotJson.1193 : U8 = CallByName Num.127 TotallyNotJson.1194; - let TotallyNotJson.1190 : List U8 = CallByName List.4 TotallyNotJson.274 TotallyNotJson.1193; - jump TotallyNotJson.1191 TotallyNotJson.1190; + let TotallyNotJson.993 : U64 = 1i64; + let TotallyNotJson.990 : Int1 = CallByName Num.24 TotallyNotJson.235 TotallyNotJson.993; + if TotallyNotJson.990 then + let TotallyNotJson.992 : I64 = 44i64; + let TotallyNotJson.991 : U8 = CallByName Num.127 TotallyNotJson.992; + let TotallyNotJson.988 : List U8 = CallByName List.4 TotallyNotJson.237 TotallyNotJson.991; + jump TotallyNotJson.989 TotallyNotJson.988; else - jump TotallyNotJson.1191 TotallyNotJson.274; - -procedure TotallyNotJson.27 (TotallyNotJson.218): - switch TotallyNotJson.218: + jump TotallyNotJson.989 TotallyNotJson.237; + +procedure TotallyNotJson.25 (TotallyNotJson.149): + let TotallyNotJson.1099 : Str = CallByName Encode.23 TotallyNotJson.149; + ret TotallyNotJson.1099; + +procedure TotallyNotJson.26 (TotallyNotJson.152): + let TotallyNotJson.153 : List U8 = CallByName Str.12 TotallyNotJson.152; + let TotallyNotJson.1097 : U64 = 0i64; + let TotallyNotJson.1098 : Int1 = true; + let TotallyNotJson.154 : {U64, Int1} = Struct {TotallyNotJson.1097, TotallyNotJson.1098}; + let TotallyNotJson.1067 : {} = Struct {}; + inc TotallyNotJson.153; + let TotallyNotJson.155 : {U64, Int1} = CallByName List.26 TotallyNotJson.153 TotallyNotJson.154 TotallyNotJson.1067; + let TotallyNotJson.1021 : Int1 = StructAtIndex 1 TotallyNotJson.155; + let TotallyNotJson.1065 : Int1 = true; + let TotallyNotJson.1066 : Int1 = lowlevel Eq TotallyNotJson.1065 TotallyNotJson.1021; + if TotallyNotJson.1066 then + let TotallyNotJson.1031 : U64 = CallByName List.6 TotallyNotJson.153; + let TotallyNotJson.1032 : U64 = 2i64; + let TotallyNotJson.1030 : U64 = CallByName Num.19 TotallyNotJson.1031 TotallyNotJson.1032; + let TotallyNotJson.1027 : List U8 = CallByName List.68 TotallyNotJson.1030; + let TotallyNotJson.1029 : U8 = 34i64; + let TotallyNotJson.1028 : List U8 = Array [TotallyNotJson.1029]; + let TotallyNotJson.1026 : List U8 = CallByName List.8 TotallyNotJson.1027 TotallyNotJson.1028; + let TotallyNotJson.1023 : List U8 = CallByName List.8 TotallyNotJson.1026 TotallyNotJson.153; + let TotallyNotJson.1025 : U8 = 34i64; + let TotallyNotJson.1024 : List U8 = Array [TotallyNotJson.1025]; + let TotallyNotJson.1022 : List U8 = CallByName List.8 TotallyNotJson.1023 TotallyNotJson.1024; + ret TotallyNotJson.1022; + else + inc TotallyNotJson.153; + let TotallyNotJson.1064 : U64 = StructAtIndex 0 TotallyNotJson.155; + let TotallyNotJson.1063 : {List U8, List U8} = CallByName List.52 TotallyNotJson.153 TotallyNotJson.1064; + let TotallyNotJson.179 : List U8 = StructAtIndex 0 TotallyNotJson.1063; + let TotallyNotJson.181 : List U8 = StructAtIndex 1 TotallyNotJson.1063; + let TotallyNotJson.1061 : U64 = CallByName List.6 TotallyNotJson.153; + dec TotallyNotJson.153; + let TotallyNotJson.1062 : U64 = 120i64; + let TotallyNotJson.1059 : U64 = CallByName Num.21 TotallyNotJson.1061 TotallyNotJson.1062; + let TotallyNotJson.1060 : U64 = 100i64; + let TotallyNotJson.1058 : U64 = CallByName Num.94 TotallyNotJson.1059 TotallyNotJson.1060; + let TotallyNotJson.1055 : List U8 = CallByName List.68 TotallyNotJson.1058; + let TotallyNotJson.1057 : U8 = 34i64; + let TotallyNotJson.1056 : List U8 = Array [TotallyNotJson.1057]; + let TotallyNotJson.1054 : List U8 = CallByName List.8 TotallyNotJson.1055 TotallyNotJson.1056; + let TotallyNotJson.182 : List U8 = CallByName List.8 TotallyNotJson.1054 TotallyNotJson.179; + let TotallyNotJson.1037 : {} = Struct {}; + let TotallyNotJson.1034 : List U8 = CallByName List.18 TotallyNotJson.181 TotallyNotJson.182 TotallyNotJson.1037; + let TotallyNotJson.1036 : U8 = 34i64; + let TotallyNotJson.1035 : List U8 = Array [TotallyNotJson.1036]; + let TotallyNotJson.1033 : List U8 = CallByName List.8 TotallyNotJson.1034 TotallyNotJson.1035; + ret TotallyNotJson.1033; + +procedure TotallyNotJson.27 (TotallyNotJson.186): + switch TotallyNotJson.186: case 34: - let TotallyNotJson.1242 : List U8 = Array [92i64, 34i64]; - ret TotallyNotJson.1242; + let TotallyNotJson.1040 : List U8 = Array [92i64, 34i64]; + ret TotallyNotJson.1040; case 92: - let TotallyNotJson.1243 : List U8 = Array [92i64, 92i64]; - ret TotallyNotJson.1243; + let TotallyNotJson.1041 : List U8 = Array [92i64, 92i64]; + ret TotallyNotJson.1041; case 47: - let TotallyNotJson.1244 : List U8 = Array [92i64, 47i64]; - ret TotallyNotJson.1244; + let TotallyNotJson.1042 : List U8 = Array [92i64, 47i64]; + ret TotallyNotJson.1042; case 8: - let TotallyNotJson.1246 : U8 = 98i64; - let TotallyNotJson.1245 : List U8 = Array [92i64, TotallyNotJson.1246]; - ret TotallyNotJson.1245; + let TotallyNotJson.1044 : U8 = 98i64; + let TotallyNotJson.1043 : List U8 = Array [92i64, TotallyNotJson.1044]; + ret TotallyNotJson.1043; case 12: - let TotallyNotJson.1248 : U8 = 102i64; - let TotallyNotJson.1247 : List U8 = Array [92i64, TotallyNotJson.1248]; - ret TotallyNotJson.1247; + let TotallyNotJson.1046 : U8 = 102i64; + let TotallyNotJson.1045 : List U8 = Array [92i64, TotallyNotJson.1046]; + ret TotallyNotJson.1045; case 10: - let TotallyNotJson.1250 : U8 = 110i64; - let TotallyNotJson.1249 : List U8 = Array [92i64, TotallyNotJson.1250]; - ret TotallyNotJson.1249; + let TotallyNotJson.1048 : U8 = 110i64; + let TotallyNotJson.1047 : List U8 = Array [92i64, TotallyNotJson.1048]; + ret TotallyNotJson.1047; case 13: - let TotallyNotJson.1252 : U8 = 114i64; - let TotallyNotJson.1251 : List U8 = Array [92i64, TotallyNotJson.1252]; - ret TotallyNotJson.1251; + let TotallyNotJson.1050 : U8 = 114i64; + let TotallyNotJson.1049 : List U8 = Array [92i64, TotallyNotJson.1050]; + ret TotallyNotJson.1049; case 9: - let TotallyNotJson.1254 : U8 = 114i64; - let TotallyNotJson.1253 : List U8 = Array [92i64, TotallyNotJson.1254]; - ret TotallyNotJson.1253; + let TotallyNotJson.1052 : U8 = 114i64; + let TotallyNotJson.1051 : List U8 = Array [92i64, TotallyNotJson.1052]; + ret TotallyNotJson.1051; default: - let TotallyNotJson.1255 : List U8 = Array [TotallyNotJson.218]; - ret TotallyNotJson.1255; + let TotallyNotJson.1053 : List U8 = Array [TotallyNotJson.186]; + ret TotallyNotJson.1053; -procedure TotallyNotJson.32 (TotallyNotJson.262, TotallyNotJson.263): - let TotallyNotJson.1215 : {Str, List Str} = Struct {TotallyNotJson.262, TotallyNotJson.263}; - let TotallyNotJson.1214 : {Str, List Str} = CallByName Encode.23 TotallyNotJson.1215; - ret TotallyNotJson.1214; +procedure TotallyNotJson.31 (TotallyNotJson.226, TotallyNotJson.227): + let TotallyNotJson.1013 : {Str, List Str} = Struct {TotallyNotJson.226, TotallyNotJson.227}; + let TotallyNotJson.1012 : {Str, List Str} = CallByName Encode.23 TotallyNotJson.1013; + ret TotallyNotJson.1012; procedure TotallyNotJson.8 (): - let TotallyNotJson.1172 : [C , C [], C , C , C , C ] = TagId(2) ; - ret TotallyNotJson.1172; + let TotallyNotJson.970 : {} = Struct {}; + ret TotallyNotJson.970; procedure Test.0 (): let Test.12 : {Str, Str} = CallByName Test.3; - let Test.13 : [C , C [], C , C , C , C ] = CallByName TotallyNotJson.8; + let Test.13 : {} = CallByName TotallyNotJson.8; let Test.11 : List U8 = CallByName Encode.26 Test.12 Test.13; ret Test.11; 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 9fc42a535de..bd7349bf0a0 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 @@ -11,7 +11,7 @@ procedure #Derived.2 (#Derived.3, #Derived.4, #Attr.12): in let #Derived_gen.17 : Str = "A"; let #Derived_gen.18 : List [] = Array []; - let #Derived_gen.16 : {Str, List []} = CallByName TotallyNotJson.32 #Derived_gen.17 #Derived_gen.18; + let #Derived_gen.16 : {Str, List []} = CallByName TotallyNotJson.31 #Derived_gen.17 #Derived_gen.18; jump #Derived_gen.15 #Derived_gen.16; procedure #Derived.5 (#Derived.6): @@ -27,7 +27,7 @@ procedure #Derived.7 (#Derived.8, #Derived.9, #Attr.12): in let #Derived_gen.7 : Str = "B"; let #Derived_gen.8 : List [] = Array []; - let #Derived_gen.6 : {Str, List []} = CallByName TotallyNotJson.32 #Derived_gen.7 #Derived_gen.8; + let #Derived_gen.6 : {Str, List []} = CallByName TotallyNotJson.31 #Derived_gen.7 #Derived_gen.8; jump #Derived_gen.5 #Derived_gen.6; procedure Bool.2 (): @@ -56,7 +56,7 @@ procedure Encode.24 (Encode.99, Encode.107, Encode.101): ret Encode.111; procedure Encode.24 (Encode.99, Encode.107, Encode.101): - let Encode.113 : List U8 = CallByName TotallyNotJson.264 Encode.99 Encode.101 Encode.107; + let Encode.113 : List U8 = CallByName TotallyNotJson.228 Encode.99 Encode.101 Encode.107; ret Encode.113; procedure Encode.24 (Encode.99, Encode.107, Encode.101): @@ -72,7 +72,7 @@ procedure Encode.24 (Encode.99, Encode.107, Encode.101): procedure Encode.24 (Encode.99, Encode.107, Encode.101): - let Encode.121 : List U8 = CallByName TotallyNotJson.264 Encode.99 Encode.101 Encode.107; + let Encode.121 : List U8 = CallByName TotallyNotJson.228 Encode.99 Encode.101 Encode.107; ret Encode.121; procedure Encode.26 (Encode.105, Encode.106): @@ -81,105 +81,105 @@ 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; - ret List.607; + let List.609 : U64 = lowlevel ListLen #Attr.2; + ret List.609; procedure List.6 (#Attr.2): - let List.647 : U64 = lowlevel ListLen #Attr.2; - ret List.647; + let List.649 : U64 = lowlevel ListLen #Attr.2; + ret List.649; procedure List.66 (#Attr.2, #Attr.3): - let List.605 : [C {}, C {}] = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.605; + let List.607 : [C {}, C {}] = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.607; procedure List.66 (#Attr.2, #Attr.3): - let List.645 : [] = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.645; + let List.647 : [] = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.647; 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; - -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; + let List.650 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; + ret List.650; + +procedure List.90 (#Derived_gen.23, #Derived_gen.24, #Derived_gen.25, #Derived_gen.26, #Derived_gen.27): + 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.230 List.162 List.646; + 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.598 #Derived_gen.20 #Derived_gen.21 #Derived_gen.22 #Derived_gen.23 #Derived_gen.24; - -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; + jump List.640 #Derived_gen.23 #Derived_gen.24 #Derived_gen.25 #Derived_gen.26 #Derived_gen.27; + +procedure List.90 (#Derived_gen.40, #Derived_gen.41, #Derived_gen.42, #Derived_gen.43, #Derived_gen.44): + 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.230 List.162 List.606; + 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.638 #Derived_gen.31 #Derived_gen.32 #Derived_gen.33 #Derived_gen.34 #Derived_gen.35; + jump List.600 #Derived_gen.40 #Derived_gen.41 #Derived_gen.42 #Derived_gen.43 #Derived_gen.44; procedure Num.127 (#Attr.2): - let Num.310 : U8 = lowlevel NumIntCast #Attr.2; - ret Num.310; + let Num.322 : U8 = lowlevel NumIntCast #Attr.2; + ret Num.322; procedure Num.20 (#Attr.2, #Attr.3): - let Num.311 : U64 = lowlevel NumSub #Attr.2 #Attr.3; - ret Num.311; + let Num.323 : U64 = lowlevel NumSub #Attr.2 #Attr.3; + ret Num.323; procedure Num.22 (#Attr.2, #Attr.3): - let Num.314 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; - ret Num.314; + let Num.326 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; + ret Num.326; procedure Num.24 (#Attr.2, #Attr.3): - let Num.312 : Int1 = lowlevel NumGt #Attr.2 #Attr.3; - ret Num.312; + let Num.324 : Int1 = lowlevel NumGt #Attr.2 #Attr.3; + ret Num.324; procedure Num.51 (#Attr.2, #Attr.3): - let Num.313 : U64 = lowlevel NumAddWrap #Attr.2 #Attr.3; - ret Num.313; + let Num.325 : U64 = lowlevel NumAddWrap #Attr.2 #Attr.3; + ret Num.325; procedure Str.12 (#Attr.2): - let Str.293 : List U8 = lowlevel StrToUtf8 #Attr.2; - ret Str.293; + let Str.252 : List U8 = lowlevel StrToUtf8 #Attr.2; + ret Str.252; procedure Test.2 (Test.11): let Test.18 : {{}, {}} = CallByName Encode.23 Test.11; @@ -202,136 +202,140 @@ procedure Test.5 (Test.6, Test.7, Test.4): let Test.32 : {} = StructAtIndex 0 Test.4; let Test.31 : [C {}, C {}] = CallByName #Derived.0 Test.32; let Test.30 : List [C {}, C {}] = Array [Test.31]; - let Test.22 : {Str, List [C {}, C {}]} = CallByName TotallyNotJson.32 Test.29 Test.30; + let Test.22 : {Str, List [C {}, C {}]} = CallByName TotallyNotJson.31 Test.29 Test.30; jump Test.23 Test.22; else let Test.24 : Str = "B"; let Test.27 : {} = StructAtIndex 1 Test.4; let Test.26 : [C {}, C {}] = CallByName #Derived.5 Test.27; let Test.25 : List [C {}, C {}] = Array [Test.26]; - let Test.22 : {Str, List [C {}, C {}]} = CallByName TotallyNotJson.32 Test.24 Test.25; + let Test.22 : {Str, List [C {}, C {}]} = CallByName TotallyNotJson.31 Test.24 Test.25; jump Test.23 Test.22; -procedure TotallyNotJson.264 (TotallyNotJson.265, TotallyNotJson.1175, #Attr.12): - let TotallyNotJson.263 : List [C {}, C {}] = StructAtIndex 1 #Attr.12; - let TotallyNotJson.262 : Str = StructAtIndex 0 #Attr.12; - let TotallyNotJson.1213 : I64 = 123i64; - let TotallyNotJson.1212 : U8 = CallByName Num.127 TotallyNotJson.1213; - let TotallyNotJson.1209 : List U8 = CallByName List.4 TotallyNotJson.265 TotallyNotJson.1212; - let TotallyNotJson.1211 : I64 = 34i64; - let TotallyNotJson.1210 : U8 = CallByName Num.127 TotallyNotJson.1211; - let TotallyNotJson.1207 : List U8 = CallByName List.4 TotallyNotJson.1209 TotallyNotJson.1210; - let TotallyNotJson.1208 : List U8 = CallByName Str.12 TotallyNotJson.262; - let TotallyNotJson.1204 : List U8 = CallByName List.8 TotallyNotJson.1207 TotallyNotJson.1208; - let TotallyNotJson.1206 : I64 = 34i64; - let TotallyNotJson.1205 : U8 = CallByName Num.127 TotallyNotJson.1206; - let TotallyNotJson.1201 : List U8 = CallByName List.4 TotallyNotJson.1204 TotallyNotJson.1205; - let TotallyNotJson.1203 : I64 = 58i64; - let TotallyNotJson.1202 : U8 = CallByName Num.127 TotallyNotJson.1203; - let TotallyNotJson.1198 : List U8 = CallByName List.4 TotallyNotJson.1201 TotallyNotJson.1202; - let TotallyNotJson.1200 : I64 = 91i64; - let TotallyNotJson.1199 : U8 = CallByName Num.127 TotallyNotJson.1200; - let TotallyNotJson.268 : List U8 = CallByName List.4 TotallyNotJson.1198 TotallyNotJson.1199; - let TotallyNotJson.1197 : U64 = CallByName List.6 TotallyNotJson.263; - let TotallyNotJson.1185 : {List U8, U64} = Struct {TotallyNotJson.268, TotallyNotJson.1197}; - let TotallyNotJson.1184 : {List U8, U64} = CallByName List.18 TotallyNotJson.263 TotallyNotJson.1185 TotallyNotJson.1175; - let TotallyNotJson.270 : List U8 = StructAtIndex 0 TotallyNotJson.1184; - let TotallyNotJson.1183 : I64 = 93i64; - let TotallyNotJson.1182 : U8 = CallByName Num.127 TotallyNotJson.1183; - let TotallyNotJson.1179 : List U8 = CallByName List.4 TotallyNotJson.270 TotallyNotJson.1182; - let TotallyNotJson.1181 : I64 = 125i64; - let TotallyNotJson.1180 : U8 = CallByName Num.127 TotallyNotJson.1181; - let TotallyNotJson.1178 : List U8 = CallByName List.4 TotallyNotJson.1179 TotallyNotJson.1180; - ret TotallyNotJson.1178; - -procedure TotallyNotJson.264 (TotallyNotJson.265, TotallyNotJson.1175, #Attr.12): - let TotallyNotJson.263 : List [] = StructAtIndex 1 #Attr.12; - let TotallyNotJson.262 : Str = StructAtIndex 0 #Attr.12; - let TotallyNotJson.1256 : I64 = 123i64; - let TotallyNotJson.1255 : U8 = CallByName Num.127 TotallyNotJson.1256; - let TotallyNotJson.1252 : List U8 = CallByName List.4 TotallyNotJson.265 TotallyNotJson.1255; - let TotallyNotJson.1254 : I64 = 34i64; - let TotallyNotJson.1253 : U8 = CallByName Num.127 TotallyNotJson.1254; - let TotallyNotJson.1250 : List U8 = CallByName List.4 TotallyNotJson.1252 TotallyNotJson.1253; - let TotallyNotJson.1251 : List U8 = CallByName Str.12 TotallyNotJson.262; - let TotallyNotJson.1247 : List U8 = CallByName List.8 TotallyNotJson.1250 TotallyNotJson.1251; - let TotallyNotJson.1249 : I64 = 34i64; - let TotallyNotJson.1248 : U8 = CallByName Num.127 TotallyNotJson.1249; - let TotallyNotJson.1244 : List U8 = CallByName List.4 TotallyNotJson.1247 TotallyNotJson.1248; - let TotallyNotJson.1246 : I64 = 58i64; - let TotallyNotJson.1245 : U8 = CallByName Num.127 TotallyNotJson.1246; - let TotallyNotJson.1241 : List U8 = CallByName List.4 TotallyNotJson.1244 TotallyNotJson.1245; - let TotallyNotJson.1243 : I64 = 91i64; - let TotallyNotJson.1242 : U8 = CallByName Num.127 TotallyNotJson.1243; - let TotallyNotJson.268 : List U8 = CallByName List.4 TotallyNotJson.1241 TotallyNotJson.1242; - let TotallyNotJson.1240 : U64 = CallByName List.6 TotallyNotJson.263; - let TotallyNotJson.1228 : {List U8, U64} = Struct {TotallyNotJson.268, TotallyNotJson.1240}; - let TotallyNotJson.1227 : {List U8, U64} = CallByName List.18 TotallyNotJson.263 TotallyNotJson.1228 TotallyNotJson.1175; - let TotallyNotJson.270 : List U8 = StructAtIndex 0 TotallyNotJson.1227; - let TotallyNotJson.1226 : I64 = 93i64; - let TotallyNotJson.1225 : U8 = CallByName Num.127 TotallyNotJson.1226; - let TotallyNotJson.1222 : List U8 = CallByName List.4 TotallyNotJson.270 TotallyNotJson.1225; - let TotallyNotJson.1224 : I64 = 125i64; - let TotallyNotJson.1223 : U8 = CallByName Num.127 TotallyNotJson.1224; - let TotallyNotJson.1221 : List U8 = CallByName List.4 TotallyNotJson.1222 TotallyNotJson.1223; - ret TotallyNotJson.1221; - -procedure TotallyNotJson.267 (TotallyNotJson.1177, TotallyNotJson.273, TotallyNotJson.266): - let TotallyNotJson.271 : List U8 = StructAtIndex 0 TotallyNotJson.1177; - let TotallyNotJson.272 : U64 = StructAtIndex 1 TotallyNotJson.1177; - let TotallyNotJson.274 : List U8 = CallByName Encode.24 TotallyNotJson.271 TotallyNotJson.273 TotallyNotJson.266; - joinpoint TotallyNotJson.1191 TotallyNotJson.275: - let TotallyNotJson.1189 : U64 = 1i64; - let TotallyNotJson.1188 : U64 = CallByName Num.20 TotallyNotJson.272 TotallyNotJson.1189; - let TotallyNotJson.1187 : {List U8, U64} = Struct {TotallyNotJson.275, TotallyNotJson.1188}; - ret TotallyNotJson.1187; +procedure TotallyNotJson.228 (TotallyNotJson.229, TotallyNotJson.973, #Attr.12): + let TotallyNotJson.227 : List [C {}, C {}] = StructAtIndex 1 #Attr.12; + let TotallyNotJson.226 : Str = StructAtIndex 0 #Attr.12; + let TotallyNotJson.1011 : I64 = 123i64; + let TotallyNotJson.1010 : U8 = CallByName Num.127 TotallyNotJson.1011; + let TotallyNotJson.1007 : List U8 = CallByName List.4 TotallyNotJson.229 TotallyNotJson.1010; + let TotallyNotJson.1009 : I64 = 34i64; + let TotallyNotJson.1008 : U8 = CallByName Num.127 TotallyNotJson.1009; + let TotallyNotJson.1005 : List U8 = CallByName List.4 TotallyNotJson.1007 TotallyNotJson.1008; + let TotallyNotJson.1006 : List U8 = CallByName Str.12 TotallyNotJson.226; + let TotallyNotJson.1002 : List U8 = CallByName List.8 TotallyNotJson.1005 TotallyNotJson.1006; + let TotallyNotJson.1004 : I64 = 34i64; + let TotallyNotJson.1003 : U8 = CallByName Num.127 TotallyNotJson.1004; + let TotallyNotJson.999 : List U8 = CallByName List.4 TotallyNotJson.1002 TotallyNotJson.1003; + let TotallyNotJson.1001 : I64 = 58i64; + let TotallyNotJson.1000 : U8 = CallByName Num.127 TotallyNotJson.1001; + let TotallyNotJson.996 : List U8 = CallByName List.4 TotallyNotJson.999 TotallyNotJson.1000; + let TotallyNotJson.998 : I64 = 91i64; + let TotallyNotJson.997 : U8 = CallByName Num.127 TotallyNotJson.998; + let TotallyNotJson.231 : List U8 = CallByName List.4 TotallyNotJson.996 TotallyNotJson.997; + let TotallyNotJson.995 : U64 = CallByName List.6 TotallyNotJson.227; + let TotallyNotJson.983 : {List U8, U64} = Struct {TotallyNotJson.231, TotallyNotJson.995}; + let TotallyNotJson.984 : {} = Struct {}; + let TotallyNotJson.982 : {List U8, U64} = CallByName List.18 TotallyNotJson.227 TotallyNotJson.983 TotallyNotJson.984; + let TotallyNotJson.233 : List U8 = StructAtIndex 0 TotallyNotJson.982; + let TotallyNotJson.981 : I64 = 93i64; + let TotallyNotJson.980 : U8 = CallByName Num.127 TotallyNotJson.981; + let TotallyNotJson.977 : List U8 = CallByName List.4 TotallyNotJson.233 TotallyNotJson.980; + let TotallyNotJson.979 : I64 = 125i64; + let TotallyNotJson.978 : U8 = CallByName Num.127 TotallyNotJson.979; + let TotallyNotJson.976 : List U8 = CallByName List.4 TotallyNotJson.977 TotallyNotJson.978; + ret TotallyNotJson.976; + +procedure TotallyNotJson.228 (TotallyNotJson.229, TotallyNotJson.973, #Attr.12): + let TotallyNotJson.227 : List [] = StructAtIndex 1 #Attr.12; + let TotallyNotJson.226 : Str = StructAtIndex 0 #Attr.12; + let TotallyNotJson.1054 : I64 = 123i64; + let TotallyNotJson.1053 : U8 = CallByName Num.127 TotallyNotJson.1054; + let TotallyNotJson.1050 : List U8 = CallByName List.4 TotallyNotJson.229 TotallyNotJson.1053; + let TotallyNotJson.1052 : I64 = 34i64; + let TotallyNotJson.1051 : U8 = CallByName Num.127 TotallyNotJson.1052; + let TotallyNotJson.1048 : List U8 = CallByName List.4 TotallyNotJson.1050 TotallyNotJson.1051; + let TotallyNotJson.1049 : List U8 = CallByName Str.12 TotallyNotJson.226; + let TotallyNotJson.1045 : List U8 = CallByName List.8 TotallyNotJson.1048 TotallyNotJson.1049; + let TotallyNotJson.1047 : I64 = 34i64; + let TotallyNotJson.1046 : U8 = CallByName Num.127 TotallyNotJson.1047; + let TotallyNotJson.1042 : List U8 = CallByName List.4 TotallyNotJson.1045 TotallyNotJson.1046; + let TotallyNotJson.1044 : I64 = 58i64; + let TotallyNotJson.1043 : U8 = CallByName Num.127 TotallyNotJson.1044; + let TotallyNotJson.1039 : List U8 = CallByName List.4 TotallyNotJson.1042 TotallyNotJson.1043; + let TotallyNotJson.1041 : I64 = 91i64; + let TotallyNotJson.1040 : U8 = CallByName Num.127 TotallyNotJson.1041; + let TotallyNotJson.231 : List U8 = CallByName List.4 TotallyNotJson.1039 TotallyNotJson.1040; + let TotallyNotJson.1038 : U64 = CallByName List.6 TotallyNotJson.227; + let TotallyNotJson.1026 : {List U8, U64} = Struct {TotallyNotJson.231, TotallyNotJson.1038}; + let TotallyNotJson.1027 : {} = Struct {}; + let TotallyNotJson.1025 : {List U8, U64} = CallByName List.18 TotallyNotJson.227 TotallyNotJson.1026 TotallyNotJson.1027; + let TotallyNotJson.233 : List U8 = StructAtIndex 0 TotallyNotJson.1025; + let TotallyNotJson.1024 : I64 = 93i64; + let TotallyNotJson.1023 : U8 = CallByName Num.127 TotallyNotJson.1024; + let TotallyNotJson.1020 : List U8 = CallByName List.4 TotallyNotJson.233 TotallyNotJson.1023; + let TotallyNotJson.1022 : I64 = 125i64; + let TotallyNotJson.1021 : U8 = CallByName Num.127 TotallyNotJson.1022; + let TotallyNotJson.1019 : List U8 = CallByName List.4 TotallyNotJson.1020 TotallyNotJson.1021; + ret TotallyNotJson.1019; + +procedure TotallyNotJson.230 (TotallyNotJson.975, TotallyNotJson.236): + let TotallyNotJson.234 : List U8 = StructAtIndex 0 TotallyNotJson.975; + let TotallyNotJson.235 : U64 = StructAtIndex 1 TotallyNotJson.975; + let TotallyNotJson.1037 : {} = Struct {}; + let TotallyNotJson.237 : List U8 = CallByName Encode.24 TotallyNotJson.234 TotallyNotJson.236 TotallyNotJson.1037; + joinpoint TotallyNotJson.1032 TotallyNotJson.238: + let TotallyNotJson.1030 : U64 = 1i64; + let TotallyNotJson.1029 : U64 = CallByName Num.20 TotallyNotJson.235 TotallyNotJson.1030; + let TotallyNotJson.1028 : {List U8, U64} = Struct {TotallyNotJson.238, TotallyNotJson.1029}; + ret TotallyNotJson.1028; in - let TotallyNotJson.1195 : U64 = 1i64; - let TotallyNotJson.1192 : Int1 = CallByName Num.24 TotallyNotJson.272 TotallyNotJson.1195; - if TotallyNotJson.1192 then - let TotallyNotJson.1194 : I64 = 44i64; - let TotallyNotJson.1193 : U8 = CallByName Num.127 TotallyNotJson.1194; - let TotallyNotJson.1190 : List U8 = CallByName List.4 TotallyNotJson.274 TotallyNotJson.1193; - jump TotallyNotJson.1191 TotallyNotJson.1190; + let TotallyNotJson.1036 : U64 = 1i64; + let TotallyNotJson.1033 : Int1 = CallByName Num.24 TotallyNotJson.235 TotallyNotJson.1036; + if TotallyNotJson.1033 then + let TotallyNotJson.1035 : I64 = 44i64; + let TotallyNotJson.1034 : U8 = CallByName Num.127 TotallyNotJson.1035; + let TotallyNotJson.1031 : List U8 = CallByName List.4 TotallyNotJson.237 TotallyNotJson.1034; + jump TotallyNotJson.1032 TotallyNotJson.1031; else - jump TotallyNotJson.1191 TotallyNotJson.274; - -procedure TotallyNotJson.267 (TotallyNotJson.1177, TotallyNotJson.273, TotallyNotJson.266): - let TotallyNotJson.271 : List U8 = StructAtIndex 0 TotallyNotJson.1177; - let TotallyNotJson.272 : U64 = StructAtIndex 1 TotallyNotJson.1177; - let TotallyNotJson.274 : List U8 = CallByName Encode.24 TotallyNotJson.271 TotallyNotJson.273 TotallyNotJson.266; - joinpoint TotallyNotJson.1234 TotallyNotJson.275: - let TotallyNotJson.1232 : U64 = 1i64; - let TotallyNotJson.1231 : U64 = CallByName Num.20 TotallyNotJson.272 TotallyNotJson.1232; - let TotallyNotJson.1230 : {List U8, U64} = Struct {TotallyNotJson.275, TotallyNotJson.1231}; - ret TotallyNotJson.1230; + jump TotallyNotJson.1032 TotallyNotJson.237; + +procedure TotallyNotJson.230 (TotallyNotJson.975, TotallyNotJson.236): + let TotallyNotJson.234 : List U8 = StructAtIndex 0 TotallyNotJson.975; + let TotallyNotJson.235 : U64 = StructAtIndex 1 TotallyNotJson.975; + let TotallyNotJson.994 : {} = Struct {}; + let TotallyNotJson.237 : List U8 = CallByName Encode.24 TotallyNotJson.234 TotallyNotJson.236 TotallyNotJson.994; + joinpoint TotallyNotJson.989 TotallyNotJson.238: + let TotallyNotJson.987 : U64 = 1i64; + let TotallyNotJson.986 : U64 = CallByName Num.20 TotallyNotJson.235 TotallyNotJson.987; + let TotallyNotJson.985 : {List U8, U64} = Struct {TotallyNotJson.238, TotallyNotJson.986}; + ret TotallyNotJson.985; in - let TotallyNotJson.1238 : U64 = 1i64; - let TotallyNotJson.1235 : Int1 = CallByName Num.24 TotallyNotJson.272 TotallyNotJson.1238; - if TotallyNotJson.1235 then - let TotallyNotJson.1237 : I64 = 44i64; - let TotallyNotJson.1236 : U8 = CallByName Num.127 TotallyNotJson.1237; - let TotallyNotJson.1233 : List U8 = CallByName List.4 TotallyNotJson.274 TotallyNotJson.1236; - jump TotallyNotJson.1234 TotallyNotJson.1233; + let TotallyNotJson.993 : U64 = 1i64; + let TotallyNotJson.990 : Int1 = CallByName Num.24 TotallyNotJson.235 TotallyNotJson.993; + if TotallyNotJson.990 then + let TotallyNotJson.992 : I64 = 44i64; + let TotallyNotJson.991 : U8 = CallByName Num.127 TotallyNotJson.992; + let TotallyNotJson.988 : List U8 = CallByName List.4 TotallyNotJson.237 TotallyNotJson.991; + jump TotallyNotJson.989 TotallyNotJson.988; else - jump TotallyNotJson.1234 TotallyNotJson.274; + jump TotallyNotJson.989 TotallyNotJson.237; -procedure TotallyNotJson.32 (TotallyNotJson.262, TotallyNotJson.263): - let TotallyNotJson.1215 : {Str, List [C {}, C {}]} = Struct {TotallyNotJson.262, TotallyNotJson.263}; - let TotallyNotJson.1214 : {Str, List [C {}, C {}]} = CallByName Encode.23 TotallyNotJson.1215; - ret TotallyNotJson.1214; +procedure TotallyNotJson.31 (TotallyNotJson.226, TotallyNotJson.227): + let TotallyNotJson.1013 : {Str, List [C {}, C {}]} = Struct {TotallyNotJson.226, TotallyNotJson.227}; + let TotallyNotJson.1012 : {Str, List [C {}, C {}]} = CallByName Encode.23 TotallyNotJson.1013; + ret TotallyNotJson.1012; -procedure TotallyNotJson.32 (TotallyNotJson.262, TotallyNotJson.263): - let TotallyNotJson.1258 : {Str, List []} = Struct {TotallyNotJson.262, TotallyNotJson.263}; - let TotallyNotJson.1257 : {Str, List []} = CallByName Encode.23 TotallyNotJson.1258; - ret TotallyNotJson.1257; +procedure TotallyNotJson.31 (TotallyNotJson.226, TotallyNotJson.227): + let TotallyNotJson.1056 : {Str, List []} = Struct {TotallyNotJson.226, TotallyNotJson.227}; + let TotallyNotJson.1055 : {Str, List []} = CallByName Encode.23 TotallyNotJson.1056; + ret TotallyNotJson.1055; procedure TotallyNotJson.8 (): - let TotallyNotJson.1172 : [C , C [], C , C , C , C ] = TagId(2) ; - ret TotallyNotJson.1172; + let TotallyNotJson.970 : {} = Struct {}; + ret TotallyNotJson.970; procedure Test.0 (): let Test.13 : {{}, {}} = CallByName Test.3; - let Test.14 : [C , C [], C , C , C , C ] = CallByName TotallyNotJson.8; + let Test.14 : {} = CallByName TotallyNotJson.8; let Test.12 : List U8 = CallByName Encode.26 Test.13 Test.14; ret Test.12; diff --git a/crates/compiler/test_mono/generated/weakening_avoids_overspecialization.txt b/crates/compiler/test_mono/generated/weakening_avoids_overspecialization.txt index 7b93e58ad19..e49eeb2dfc0 100644 --- a/crates/compiler/test_mono/generated/weakening_avoids_overspecialization.txt +++ b/crates/compiler/test_mono/generated/weakening_avoids_overspecialization.txt @@ -2,92 +2,92 @@ 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): - 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.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.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; +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.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; - ret Num.294; + let Num.306 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; + ret Num.306; procedure Num.51 (#Attr.2, #Attr.3): - let Num.293 : U64 = lowlevel NumAddWrap #Attr.2 #Attr.3; - ret Num.293; + let Num.305 : U64 = lowlevel NumAddWrap #Attr.2 #Attr.3; + ret Num.305; procedure Num.77 (#Attr.2, #Attr.3): - let Num.292 : U64 = lowlevel NumSubSaturated #Attr.2 #Attr.3; - ret Num.292; + let Num.304 : U64 = lowlevel NumSubSaturated #Attr.2 #Attr.3; + ret Num.304; procedure Test.3 (Test.4, Test.12): let Test.13 : [C U64, C U64] = TagId(0) Test.4; diff --git a/crates/compiler/test_mono/generated/when_guard_appears_multiple_times_in_compiled_decision_tree_issue_5176.txt b/crates/compiler/test_mono/generated/when_guard_appears_multiple_times_in_compiled_decision_tree_issue_5176.txt index 298ed21efb8..60e5fe79568 100644 --- a/crates/compiler/test_mono/generated/when_guard_appears_multiple_times_in_compiled_decision_tree_issue_5176.txt +++ b/crates/compiler/test_mono/generated/when_guard_appears_multiple_times_in_compiled_decision_tree_issue_5176.txt @@ -3,8 +3,8 @@ procedure Bool.2 (): ret Bool.25; procedure Num.19 (#Attr.2, #Attr.3): - let Num.291 : U8 = lowlevel NumAdd #Attr.2 #Attr.3; - ret Num.291; + let Num.303 : U8 = lowlevel NumAdd #Attr.2 #Attr.3; + ret Num.303; procedure Test.1 (Test.2): joinpoint Test.12: diff --git a/crates/compiler/test_mono/generated/when_nested_maybe.txt b/crates/compiler/test_mono/generated/when_nested_maybe.txt index 8ab6fb8c26a..c030a8121aa 100644 --- a/crates/compiler/test_mono/generated/when_nested_maybe.txt +++ b/crates/compiler/test_mono/generated/when_nested_maybe.txt @@ -1,6 +1,6 @@ procedure Num.19 (#Attr.2, #Attr.3): - let Num.291 : I64 = lowlevel NumAdd #Attr.2 #Attr.3; - ret Num.291; + let Num.303 : I64 = lowlevel NumAdd #Attr.2 #Attr.3; + ret Num.303; procedure Test.0 (): let Test.19 : I64 = 41i64; diff --git a/crates/compiler/test_mono/generated/when_on_record.txt b/crates/compiler/test_mono/generated/when_on_record.txt index 6f052db29b3..1788be7c8fc 100644 --- a/crates/compiler/test_mono/generated/when_on_record.txt +++ b/crates/compiler/test_mono/generated/when_on_record.txt @@ -1,6 +1,6 @@ procedure Num.19 (#Attr.2, #Attr.3): - let Num.291 : I64 = lowlevel NumAdd #Attr.2 #Attr.3; - ret Num.291; + let Num.303 : I64 = lowlevel NumAdd #Attr.2 #Attr.3; + ret Num.303; procedure Test.0 (): let Test.5 : I64 = 2i64; diff --git a/crates/compiler/test_mono/generated/when_on_two_values.txt b/crates/compiler/test_mono/generated/when_on_two_values.txt index e0a56835679..7f98a47a3e4 100644 --- a/crates/compiler/test_mono/generated/when_on_two_values.txt +++ b/crates/compiler/test_mono/generated/when_on_two_values.txt @@ -1,6 +1,6 @@ procedure Num.19 (#Attr.2, #Attr.3): - let Num.291 : I64 = lowlevel NumAdd #Attr.2 #Attr.3; - ret Num.291; + let Num.303 : I64 = lowlevel NumAdd #Attr.2 #Attr.3; + ret Num.303; procedure Test.0 (): let Test.15 : I64 = 3i64; diff --git a/crates/compiler/test_mono/src/tests.rs b/crates/compiler/test_mono/src/tests.rs index 2f99efe3a3e..c24ecc21ab8 100644 --- a/crates/compiler/test_mono/src/tests.rs +++ b/crates/compiler/test_mono/src/tests.rs @@ -252,133 +252,133 @@ fn verify_procedures<'a>( #[mono_test] fn ir_int_literal() { - r#" + r" 5 - "# + " } #[mono_test] fn ir_int_add() { - r#" + r" x = [1,2] 5 + 4 + 3 + List.len x - "# + " } #[mono_test] fn ir_assignment() { - r#" + r" x = 5 x - "# + " } #[mono_test] fn ir_when_maybe() { - r#" + r" when Just 3 is Just n -> n Nothing -> 0 - "# + " } #[mono_test] fn ir_when_these() { - r#" + r" when These 1 2 is This x -> x That y -> y These x _ -> x - "# + " } #[mono_test] fn ir_when_record() { - r#" + r" when { x: 1, y: 3.14 } is { x } -> x - "# + " } #[mono_test] fn ir_plus() { - r#" + r" 1 + 2 - "# + " } #[mono_test] fn ir_round() { - r#" + r" Num.round 3.6 - "# + " } #[mono_test] fn ir_when_idiv() { - r#" + r" when Num.divTruncChecked 1000 10 is Ok val -> val Err _ -> -1 - "# + " } #[mono_test] fn ir_two_defs() { - r#" + r" x = 3 y = 4 x + y - "# + " } #[mono_test] fn ir_when_just() { - r#" + r" x : [Nothing, Just I64] x = Just 41 when x is Just v -> v + 0x1 Nothing -> 0x1 - "# + " } #[mono_test] fn one_element_tag() { - r#" + r" x : [Pair I64] x = Pair 2 x - "# + " } #[mono_test] fn guard_pattern_true() { - r#" + r" wrapper = \{} -> when 2 is 2 if Bool.false -> 42 _ -> 0 wrapper {} - "# + " } #[mono_test] fn when_on_record() { - r#" + r" when { x: 0x2 } is { x } -> x + 3 - "# + " } #[mono_test] fn when_nested_maybe() { - r#" + r" Maybe a : [Nothing, Just a] x : Maybe (Maybe I64) @@ -387,56 +387,56 @@ fn when_nested_maybe() { when x is Just (Just v) -> v + 0x1 _ -> 0x1 - "# + " } #[mono_test] fn when_on_two_values() { - r#" + r" when Pair 2 3 is Pair 4 3 -> 9 Pair a b -> a + b - "# + " } #[mono_test] fn dict() { - r#" + r" Dict.len (Dict.empty {}) - "# + " } #[mono_test] fn list_append_closure() { - r#" + r" myFunction = \l -> List.append l 42 myFunction [1, 2] - "# + " } #[mono_test] fn list_append() { // TODO this leaks at the moment // ListAppend needs to decrement its arguments - r#" + r" List.append [1] 2 - "# + " } #[mono_test] fn list_len() { - r#" + r" x = [1,2,3] y = [1.0] List.len x + List.len y - "# + " } #[mono_test] fn when_joinpoint() { - r#" + r" wrapper = \{} -> x : [Red, White, Blue] x = Blue @@ -450,34 +450,34 @@ fn when_joinpoint() { y wrapper {} - "# + " } #[mono_test] fn simple_if() { - r#" + r" if Bool.true then 1 else 2 - "# + " } #[mono_test] fn if_multi_branch() { - r#" + r" if Bool.true then 1 else if Bool.false then 2 else 3 - "# + " } #[mono_test] fn when_on_result() { - r#" + r" wrapper = \{} -> x : Result I64 I64 x = Ok 2 @@ -490,71 +490,71 @@ fn when_on_result() { y wrapper {} - "# + " } #[mono_test] fn let_with_record_pattern() { - r#" + r" { x } = { x: 0x2, y: 3.14 } x - "# + " } #[mono_test] fn let_with_record_pattern_list() { - r#" + r" { x } = { x: [1, 3, 4], y: 3.14 } x - "# + " } #[mono_test] fn if_guard_bind_variable_false() { - r#" + r" wrapper = \{} -> when 10 is x if x == 5 -> 0 _ -> 42 wrapper {} - "# + " } #[mono_test] fn alias_variable() { - r#" + r" x = 5 y = x 3 - "# + " } #[mono_test] fn alias_variable_and_return_it() { - r#" + r" x = 5 y = x y - "# + " } #[mono_test] fn branch_store_variable() { - r#" + r" when 0 is 1 -> 12 a -> a - "# + " } #[mono_test] fn list_pass_to_function() { - r#" + r" x : List I64 x = [1,2,3] @@ -562,57 +562,57 @@ fn list_pass_to_function() { id = \y -> List.set y 0 0 id x - "# + " } #[mono_test] fn record_optional_field_let_no_use_default() { - r#" + r" f = \r -> { x ? 10, y } = r x + y f { x: 4, y: 9 } - "# + " } #[mono_test] fn record_optional_field_let_use_default() { - r#" + r" f = \r -> { x ? 10, y } = r x + y f { y: 9 } - "# + " } #[mono_test] fn record_optional_field_function_no_use_default() { - r#" + r" f = \{ x ? 10, y } -> x + y f { x: 4, y: 9 } - "# + " } #[mono_test] fn record_optional_field_function_use_default() { - r#" + r" f = \{ x ? 10, y } -> x + y f { y: 9 } - "# + " } #[mono_test] fn quicksort_help() { // do we still need with_larger_debug_stack? - r#" + r" quicksortHelp : List (Num a), I64, I64 -> List (Num a) quicksortHelp = \list, low, high -> if low < high then @@ -625,7 +625,7 @@ fn quicksort_help() { list quicksortHelp [] 0 0 - "# + " } #[mono_test] @@ -745,7 +745,7 @@ fn quicksort_swap() { #[mono_test] fn factorial() { - r#" + r" factorial = \n, accum -> when n is 0 -> @@ -755,12 +755,12 @@ fn factorial() { factorial (n - 1) (n * accum) factorial 10 1 - "# + " } #[mono_test] fn is_nil() { - r#" + r" ConsList a : [Cons a (ConsList a), Nil] isNil : ConsList a -> Bool @@ -770,13 +770,13 @@ fn is_nil() { Cons _ _ -> Bool.false isNil (Cons 0x2 Nil) - "# + " } #[mono_test] #[ignore] fn has_none() { - r#" + r" Maybe a : [Just a, Nothing] ConsList a : [Cons a (ConsList a), Nil] @@ -788,7 +788,7 @@ fn has_none() { Cons (Just _) xs -> hasNone xs hasNone (Cons (Just 3) Nil) - "# + " } #[mono_test] @@ -839,29 +839,29 @@ fn list_cannot_update_inplace() { #[mono_test] fn list_get() { - r#" + r" wrapper = \{} -> List.get [1,2,3] 0 wrapper {} - "# + " } #[mono_test] fn peano() { - r#" + r" Peano : [S Peano, Z] three : Peano three = S (S (S Z)) three - "# + " } #[mono_test] fn peano1() { - r#" + r" Peano : [S Peano, Z] three : Peano @@ -870,12 +870,12 @@ fn peano1() { when three is Z -> 0 S _ -> 1 - "# + " } #[mono_test] fn peano2() { - r#" + r" Peano : [S Peano, Z] three : Peano @@ -885,12 +885,12 @@ fn peano2() { S (S _) -> 1 S (_) -> 0 Z -> 0 - "# + " } #[mono_test] fn optional_when() { - r#" + r" f = \r -> when r is { x: Blue, y ? 3 } -> y @@ -902,15 +902,15 @@ fn optional_when() { d = f { x: Red } a * b * c * d - "# + " } #[mono_test] fn optional_field_with_binary_op() { - r#" + r" { bar ? 1 + 1 } = {} bar - "# + " } #[mono_test] @@ -924,7 +924,7 @@ fn nested_optional_field_with_binary_op() { #[mono_test] fn multiline_record_pattern() { - r#" + r" x = { a: 1, b: 2, c: 3 } { a, @@ -933,12 +933,12 @@ fn multiline_record_pattern() { } = x a + b + c - "# + " } #[mono_test] fn nested_pattern_match() { - r#" + r" Maybe a : [Nothing, Just a] x : Maybe (Maybe I64) @@ -947,13 +947,13 @@ fn nested_pattern_match() { when x is Just (Just v) -> v + 0x1 _ -> 0x1 - "# + " } #[mono_test] #[ignore] fn linked_list_length_twice() { - r#" + r" LinkedList a : [Nil, Cons a (LinkedList a)] nil : LinkedList I64 @@ -966,7 +966,7 @@ fn linked_list_length_twice() { Cons _ rest -> 1 + length rest length nil + length nil - "# + " } #[mono_test] @@ -996,7 +996,7 @@ fn rigids() { #[mono_test] fn let_x_in_x() { - r#" + r" x = 5 answer = @@ -1007,12 +1007,12 @@ fn let_x_in_x() { nested answer - "# + " } #[mono_test] fn let_x_in_x_indirect() { - r#" + r" x = 5 answer = @@ -1026,7 +1026,7 @@ fn let_x_in_x_indirect() { nested { answer, unused }.answer - "# + " } #[mono_test] @@ -1310,13 +1310,13 @@ fn monomorphized_applied_tag() { #[ignore = "Cannot compile polymorphic closures yet"] fn aliased_polymorphic_closure() { indoc!( - r#" + r" n : U8 n = 1 f = \{} -> (\a -> n) g = f {} g {} - "# + " ) } @@ -1341,11 +1341,11 @@ fn issue_2535_let_weakened_fields_referenced_in_list() { #[mono_test] fn issue_2725_alias_polymorphic_lambda() { indoc!( - r#" + r" wrap = \value -> Tag value wrapIt = wrap wrapIt 42 - "# + " ) } @@ -1361,7 +1361,7 @@ fn issue_2583_specialize_errors_behind_unified_branches() { #[mono_test] fn issue_2810() { indoc!( - r#" + r" Command : [Command Tool] Job : [Job Command] @@ -1371,7 +1371,7 @@ fn issue_2810() { a : Job a = Job (Command (FromJob (Job (Command SystemTool)))) a - "# + " ) } @@ -1608,14 +1608,14 @@ fn choose_correct_recursion_var_under_record() { #[mono_test] fn tail_call_elimination() { indoc!( - r#" + r" sum = \n, accum -> when n is 0 -> accum _ -> sum (n - 1) (n + accum) sum 1_000_000 0 - "# + " ) } @@ -1650,7 +1650,7 @@ fn tail_call_with_different_layout() { #[mono_test] fn lambda_capture_niche_u8_vs_u64() { indoc!( - r#" + r" capture : _ -> ({} -> Str) capture = \val -> \{} -> @@ -1665,7 +1665,7 @@ fn lambda_capture_niche_u8_vs_u64() { False -> capture 18u8 fun {} - "# + " ) } @@ -1679,7 +1679,7 @@ fn lambda_capture_niches_with_other_lambda_capture() { when val is _ -> "" - capture2 = \val -> \{} -> "\(val)" + capture2 = \val -> \{} -> "$(val)" x : [A, B, C] x = A @@ -1777,37 +1777,37 @@ fn lambda_set_niche_same_layout_different_constructor() { #[mono_test] fn choose_u64_layout() { indoc!( - r#" + r" 9999999999999999999 + 1 - "# + " ) } #[mono_test] fn choose_i128_layout() { indoc!( - r#" + r" { a: 18446744073709551616 + 1, b: -9223372036854775809 + 1, } - "# + " ) } #[mono_test] fn choose_u128_layout() { indoc!( - r#" + r" 170141183460469231731687303715884105728 + 1 - "# + " ) } #[mono_test] fn recursive_call_capturing_function() { indoc!( - r#" + r" a = \b -> c : U32 -> U32 c = \d -> @@ -1815,28 +1815,28 @@ fn recursive_call_capturing_function() { c 0 a 6 - "# + " ) } #[mono_test] fn call_function_in_empty_list() { indoc!( - r#" + r" lst : List ({} -> {}) lst = [] List.map lst \f -> f {} - "# + " ) } #[mono_test] fn call_function_in_empty_list_unbound() { indoc!( - r#" + r" lst = [] List.map lst \f -> f {} - "# + " ) } @@ -1984,7 +1984,7 @@ fn polymorphic_expression_unification() { ] parseFunction : Str -> RenderTree parseFunction = \name -> - last = Indent [Text ".trace(\"\(name)\")" ] + last = Indent [Text ".trace(\"$(name)\")" ] Indent [last] values = parseFunction "interface_header" @@ -2048,9 +2048,9 @@ fn issue_3669() { #[mono_test] fn num_width_gt_u8_layout_as_float() { indoc!( - r#" + r" 1 / 200 - "# + " ) } @@ -2254,7 +2254,7 @@ fn tuple_pattern_match() { #[mono_test(mode = "test")] fn issue_4705() { indoc!( - r###" + r" interface Test exposes [] imports [] go : {} -> Bool @@ -2264,28 +2264,28 @@ fn issue_4705() { input = {} x = go input x - "### + " ) } #[mono_test(mode = "test", large_stack = "true")] fn issue_4749() { indoc!( - r###" + r#" interface Test exposes [] imports [TotallyNotJson] expect input = [82, 111, 99] got = Decode.fromBytes input TotallyNotJson.json got == Ok "Roc" - "### + "# ) } #[mono_test(mode = "test")] fn lambda_set_with_imported_toplevels_issue_4733() { indoc!( - r###" + r" interface Test exposes [] imports [] fn = \{} -> @@ -2297,28 +2297,28 @@ fn lambda_set_with_imported_toplevels_issue_4733() { \a -> op a a expect ((fn {}) 3) == 9 - "### + " ) } #[mono_test] fn order_list_size_tests_issue_4732() { indoc!( - r###" + r#" when [] is [1, ..] -> "B1" [2, 1, ..] -> "B2" [3, 2, 1, ..] -> "B3" [4, 3, 2, 1, ..] -> "B4" _ -> "Catchall" - "### + "# ) } #[mono_test] fn anonymous_closure_in_polymorphic_expression_issue_4717() { indoc!( - r###" + r#" app "test" provides [main] to "platform" chompWhile : (List U8) -> (List U8) @@ -2331,14 +2331,14 @@ fn anonymous_closure_in_polymorphic_expression_issue_4717() { List.dropFirst input index main = chompWhile [1u8, 2u8, 3u8] - "### + "# ) } #[mono_test] fn list_map_take_capturing_or_noncapturing() { indoc!( - r###" + r#" app "test" provides [main] to "platform" main = @@ -2355,28 +2355,28 @@ fn list_map_take_capturing_or_noncapturing() { k = \n -> n + n k List.map [1u8, 2u8, 3u8] f - "### + "# ) } #[mono_test] fn issue_4557() { indoc!( - r###" + r#" app "test" provides [main] to "./platform" isEqQ = \q1, q2 -> when T q1 q2 is T (U f1) (U f2) -> Bool.or (isEqQ (U f2) (U f1)) (f1 {} == f2 {}) main = isEqQ (U \{} -> "a") (U \{} -> "a") - "### + "# ) } #[mono_test] fn nullable_wrapped_with_nullable_not_last_index() { indoc!( - r###" + r#" app "test" provides [main] to "./platform" Parser : [ @@ -2393,14 +2393,14 @@ fn nullable_wrapped_with_nullable_not_last_index() { CharLiteral -> "c" main = toIdParser CharLiteral == "c" - "### + "# ) } #[mono_test] fn pattern_as_toplevel() { indoc!( - r###" + r#" app "test" provides [main] to "./platform" record = { a: 42i64, b: "foo" } @@ -2409,14 +2409,14 @@ fn pattern_as_toplevel() { when record is { a: 42i64 } as r -> record == r _ -> Bool.false - "### + "# ) } #[mono_test] fn pattern_as_nested() { indoc!( - r###" + r#" app "test" provides [main] to "./platform" record = { a: 42i64, b: "foo" } @@ -2425,20 +2425,20 @@ fn pattern_as_nested() { when Pair {} record is Pair {} ({ a: 42i64 } as r) -> record == r _ -> Bool.false - "### + "# ) } #[mono_test] fn pattern_as_of_symbol() { indoc!( - r###" + r#" app "test" provides [main] to "./platform" main = when "foo" is a as b -> a == b - "### + "# ) } @@ -2447,7 +2447,7 @@ fn function_specialization_information_in_lambda_set_thunk() { // https://github.com/roc-lang/roc/issues/4734 // https://rwx.notion.site/Let-generalization-Let-s-not-742a3ab23ff742619129dcc848a271cf#6b08b0a203fb443db2d7238a0eb154eb indoc!( - r###" + r#" app "test" provides [main] to "./platform" andThen = \{} -> @@ -2457,7 +2457,7 @@ fn function_specialization_information_in_lambda_set_thunk() { between = andThen {} main = between \{} -> between \{} -> 10 - "### + "# ) } @@ -2466,7 +2466,7 @@ fn function_specialization_information_in_lambda_set_thunk_independent_defs() { // https://github.com/roc-lang/roc/issues/4734 // https://rwx.notion.site/Let-generalization-Let-s-not-742a3ab23ff742619129dcc848a271cf#6b08b0a203fb443db2d7238a0eb154eb indoc!( - r###" + r#" app "test" provides [main] to "./platform" andThen = \{} -> @@ -2478,14 +2478,14 @@ fn function_specialization_information_in_lambda_set_thunk_independent_defs() { between2 = andThen {} main = between1 \{} -> between2 \{} -> 10u8 - "### + "# ) } #[mono_test(mode = "test", large_stack = "true")] fn issue_4772_weakened_monomorphic_destructure() { indoc!( - r###" + r#" interface Test exposes [] imports [TotallyNotJson] getNumber = @@ -2505,7 +2505,7 @@ fn issue_4772_weakened_monomorphic_destructure() { expect result = getNumber result == Ok {val : -1234i64, input : []} - "### + "# ) } @@ -2515,7 +2515,7 @@ fn weakening_avoids_overspecialization() { // `index` - to `Nat` and the default integer type, `I64`. The test is to ensure only one // specialization, that of `Nat`, exists. indoc!( - r###" + r#" app "test" provides [main] to "./platform" main : (List U8) -> (List U8) @@ -2526,7 +2526,7 @@ fn weakening_avoids_overspecialization() { input else List.dropFirst input index - "### + "# ) } @@ -2540,7 +2540,7 @@ fn recursively_build_effect() { hi = "Hello" name = "World" - "\(hi), \(name)!" + "$(hi), $(name)!" main = when nestHelp 4 is @@ -2856,8 +2856,8 @@ fn compose_recursive_lambda_set_productive_nullable_wrapped() { else \x -> f (g x) identity = \x -> x - exclame = \s -> "\(s)!" - whisper = \s -> "(\(s))" + exclame = \s -> "$(s)!" + whisper = \s -> "($(s))" main = res: Str -> Str @@ -3124,13 +3124,13 @@ fn drop_specialize_after_jump() { #[mono_test(mode = "test")] fn dbg_in_expect() { indoc!( - r###" + r#" interface Test exposes [] imports [] expect dbg "" Bool.true - "### + "# ) } @@ -3463,3 +3463,40 @@ fn issue_6196() { "# ) } + +#[mono_test] +fn issue_5513() { + indoc!( + r" + f = \state -> + { state & a: state.b } + f { a: 0, b: 0 } + " + ) +} + +#[mono_test] +fn issue_6174() { + indoc!( + r" + g = Bool.false + + a = \_ -> + if g then + Ok 0 + else + Err NoNumber + + b = \_ -> + if g then + Ok 0 + else + Err NoNumber + + c = \_ -> + [a {}, b {}] + + c {} + " + ) +} diff --git a/crates/compiler/test_syntax/fuzz/.gitignore b/crates/compiler/test_syntax/fuzz/.gitignore deleted file mode 100644 index a0925114d61..00000000000 --- a/crates/compiler/test_syntax/fuzz/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -target -corpus -artifacts diff --git a/crates/compiler/test_syntax/tests/snapshots/pass/mixed_docs.expr.formatted.roc b/crates/compiler/test_syntax/tests/snapshots/pass/mixed_docs.expr.formatted.roc deleted file mode 100644 index 31d9cebf6bf..00000000000 --- a/crates/compiler/test_syntax/tests/snapshots/pass/mixed_docs.expr.formatted.roc +++ /dev/null @@ -1,7 +0,0 @@ -# ## not docs! -## docs, but with a problem -## (namely that this is a mix of docs and regular comments) -# not docs -x = 5 - -42 \ No newline at end of file diff --git a/crates/compiler/test_syntax/tests/snapshots/pass/newline_in_packages.full.formatted.roc b/crates/compiler/test_syntax/tests/snapshots/pass/newline_in_packages.full.formatted.roc index 89ebd0eed28..206999c37de 100644 --- a/crates/compiler/test_syntax/tests/snapshots/pass/newline_in_packages.full.formatted.roc +++ b/crates/compiler/test_syntax/tests/snapshots/pass/newline_in_packages.full.formatted.roc @@ -1,7 +1,7 @@ app "hello" packages { pf: - "https://github.com/roc-lang/basic-cli/releases/download/0.7.1/Icc3xJoIixF3hCcfXrDwLCu4wQHtNdPyoJkEbkgIElA.tar.br", + "https://github.com/roc-lang/basic-cli/releases/download/0.8.1/x8URkvfyi9I0QhmVG98roKBUs_AZRkLFwFJVJ3942YA.tar.br", } imports [pf.Stdout] provides [main] to pf diff --git a/crates/compiler/test_syntax/tests/snapshots/pass/newline_in_packages.full.result-ast b/crates/compiler/test_syntax/tests/snapshots/pass/newline_in_packages.full.result-ast index b7cc7c7b278..ea12da2acac 100644 --- a/crates/compiler/test_syntax/tests/snapshots/pass/newline_in_packages.full.result-ast +++ b/crates/compiler/test_syntax/tests/snapshots/pass/newline_in_packages.full.result-ast @@ -24,7 +24,7 @@ Full { Newline, ], package_name: @31-145 PackageName( - "https://github.com/roc-lang/basic-cli/releases/download/0.7.1/Icc3xJoIixF3hCcfXrDwLCu4wQHtNdPyoJkEbkgIElA.tar.br", + "https://github.com/roc-lang/basic-cli/releases/download/0.8.1/x8URkvfyi9I0QhmVG98roKBUs_AZRkLFwFJVJ3942YA.tar.br", ), }, [ diff --git a/crates/compiler/test_syntax/tests/snapshots/pass/newline_in_packages.full.roc b/crates/compiler/test_syntax/tests/snapshots/pass/newline_in_packages.full.roc index e778a2c8fc3..815876604d8 100644 --- a/crates/compiler/test_syntax/tests/snapshots/pass/newline_in_packages.full.roc +++ b/crates/compiler/test_syntax/tests/snapshots/pass/newline_in_packages.full.roc @@ -1,6 +1,6 @@ app "hello" packages { pf: -"https://github.com/roc-lang/basic-cli/releases/download/0.7.1/Icc3xJoIixF3hCcfXrDwLCu4wQHtNdPyoJkEbkgIElA.tar.br" +"https://github.com/roc-lang/basic-cli/releases/download/0.8.1/x8URkvfyi9I0QhmVG98roKBUs_AZRkLFwFJVJ3942YA.tar.br" } imports [pf.Stdout] provides [main] to pf diff --git a/crates/compiler/test_syntax/tests/snapshots/pass/not_docs.expr.formatted.roc b/crates/compiler/test_syntax/tests/snapshots/pass/not_docs.expr.formatted.roc deleted file mode 100644 index 2e10556b31e..00000000000 --- a/crates/compiler/test_syntax/tests/snapshots/pass/not_docs.expr.formatted.roc +++ /dev/null @@ -1,7 +0,0 @@ -# ###### -# ## not docs! -# #still not docs -# ##### -x = 5 - -42 \ No newline at end of file diff --git a/crates/compiler/test_syntax/tests/test_fmt.rs b/crates/compiler/test_syntax/tests/test_fmt.rs index 13d9941fab9..3e26b04de79 100644 --- a/crates/compiler/test_syntax/tests/test_fmt.rs +++ b/crates/compiler/test_syntax/tests/test_fmt.rs @@ -152,22 +152,22 @@ mod test_fmt { expr_formats_to( &format!( indoc!( - r#" + r" # first comment{space} x = 0 # second comment{space} x - "# + " ), space = " ", ), indoc!( - r#" + r" # first comment x = 0 # second comment x - "# + " ), ); } @@ -175,59 +175,59 @@ mod test_fmt { #[test] fn def_with_inline_comment() { expr_formats_same(indoc!( - r#" + r" x = 0 # comment x - "# + " )); expr_formats_to( indoc!( - r#" + r" x = 0# comment x - "# + " ), indoc!( - r#" + r" x = 0 # comment x - "# + " ), ); expr_formats_to( indoc!( - r#" + r" x = 0# comment x - "# + " ), indoc!( - r#" + r" x = 0 # comment x - "# + " ), ); expr_formats_to( indoc!( - r#" + r" x = 0 # comment x - "# + " ), indoc!( - r#" + r" x = 0 # comment x - "# + " ), ); } @@ -261,7 +261,7 @@ mod test_fmt { #[test] fn type_annotation_allow_blank_line_before_and_after_comment() { expr_formats_same(indoc!( - r#" + r" person : { firstName : Str, # comment @@ -269,11 +269,11 @@ mod test_fmt { } person - "# + " )); expr_formats_same(indoc!( - r#" + r" person : { firstName : Str, @@ -282,11 +282,11 @@ mod test_fmt { } person - "# + " )); expr_formats_same(indoc!( - r#" + r" person : { firstName : Str, # comment @@ -295,11 +295,11 @@ mod test_fmt { } person - "# + " )); expr_formats_same(indoc!( - r#" + r" person : { firstName : Str, @@ -309,11 +309,11 @@ mod test_fmt { } person - "# + " )); expr_formats_same(indoc!( - r#" + r" person : { firstName : Str, @@ -326,11 +326,11 @@ mod test_fmt { } person - "# + " )); expr_formats_same(indoc!( - r#" + r" person : { firstName : Str, @@ -342,12 +342,12 @@ mod test_fmt { } person - "# + " )); expr_formats_to( indoc!( - r#" + r" person : { # comment @@ -357,10 +357,10 @@ mod test_fmt { } person - "# + " ), indoc!( - r#" + r" person : { # comment @@ -369,13 +369,13 @@ mod test_fmt { } person - "# + " ), ); expr_formats_to( indoc!( - r#" + r" person : { firstName : Str, lastName : Str, @@ -385,10 +385,10 @@ mod test_fmt { } person - "# + " ), indoc!( - r#" + r" person : { firstName : Str, lastName : Str, @@ -397,13 +397,13 @@ mod test_fmt { } person - "# + " ), ); expr_formats_to( indoc!( - r#" + r" person : { firstName : Str, @@ -413,10 +413,10 @@ mod test_fmt { } person - "# + " ), indoc!( - r#" + r" person : { firstName : Str, @@ -425,13 +425,13 @@ mod test_fmt { } person - "# + " ), ); expr_formats_to( indoc!( - r#" + r" person : { firstName : Str, # comment @@ -441,10 +441,10 @@ mod test_fmt { } person - "# + " ), indoc!( - r#" + r" person : { firstName : Str, # comment @@ -453,13 +453,13 @@ mod test_fmt { } person - "# + " ), ); expr_formats_to( indoc!( - r#" + r" person : { firstName : Str, @@ -471,10 +471,10 @@ mod test_fmt { } person - "# + " ), indoc!( - r#" + r" person : { firstName : Str, @@ -484,7 +484,7 @@ mod test_fmt { } person - "# + " ), ); } @@ -723,7 +723,7 @@ mod test_fmt { #[test] fn list_allow_blank_line_before_and_after_comment() { expr_formats_same(indoc!( - r#" + r" list = [ 0, # comment @@ -731,11 +731,11 @@ mod test_fmt { ] list - "# + " )); expr_formats_same(indoc!( - r#" + r" list = [ 0, @@ -744,11 +744,11 @@ mod test_fmt { ] list - "# + " )); expr_formats_same(indoc!( - r#" + r" list = [ 0, # comment @@ -757,11 +757,11 @@ mod test_fmt { ] list - "# + " )); expr_formats_same(indoc!( - r#" + r" list = [ 0, @@ -771,11 +771,11 @@ mod test_fmt { ] list - "# + " )); expr_formats_same(indoc!( - r#" + r" list = [ 0, @@ -788,11 +788,11 @@ mod test_fmt { ] list - "# + " )); expr_formats_same(indoc!( - r#" + r" list = [ 0, @@ -804,11 +804,11 @@ mod test_fmt { ] list - "# + " )); expr_formats_to( indoc!( - r#" + r" list = [ # comment @@ -818,10 +818,10 @@ mod test_fmt { ] list - "# + " ), indoc!( - r#" + r" list = [ # comment @@ -830,13 +830,13 @@ mod test_fmt { ] list - "# + " ), ); expr_formats_to( indoc!( - r#" + r" list = [ 0, 1, @@ -846,10 +846,10 @@ mod test_fmt { ] list - "# + " ), indoc!( - r#" + r" list = [ 0, 1, @@ -858,13 +858,13 @@ mod test_fmt { ] list - "# + " ), ); expr_formats_to( indoc!( - r#" + r" list = [ 0, @@ -874,10 +874,10 @@ mod test_fmt { ] list - "# + " ), indoc!( - r#" + r" list = [ 0, @@ -886,13 +886,13 @@ mod test_fmt { ] list - "# + " ), ); expr_formats_to( indoc!( - r#" + r" list = [ 0, # comment @@ -902,10 +902,10 @@ mod test_fmt { ] list - "# + " ), indoc!( - r#" + r" list = [ 0, # comment @@ -914,13 +914,13 @@ mod test_fmt { ] list - "# + " ), ); expr_formats_to( indoc!( - r#" + r" list = [ 0, @@ -932,10 +932,10 @@ mod test_fmt { ] list - "# + " ), indoc!( - r#" + r" list = [ 0, @@ -945,7 +945,7 @@ mod test_fmt { ] list - "# + " ), ); } @@ -954,16 +954,16 @@ mod test_fmt { fn force_space_at_beginning_of_comment() { expr_formats_to( indoc!( - r#" + r" #comment f - "# + " ), indoc!( - r#" + r" # comment f - "# + " ), ); } @@ -971,12 +971,12 @@ mod test_fmt { #[test] fn func_def() { expr_formats_same(indoc!( - r#" + r" f = \x, y -> x f 4 - "# + " )); } @@ -1155,63 +1155,63 @@ mod test_fmt { #[test] fn zero() { expr_formats_same(indoc!( - r#" + r" 0 - "# + " )); } #[test] fn zero_point_zero() { expr_formats_same(indoc!( - r#" + r" 0.0 - "# + " )); } #[test] fn int_with_underscores() { expr_formats_same(indoc!( - r#" + r" 1_23_456 - "# + " )); } #[test] fn float_with_underscores() { expr_formats_same(indoc!( - r#" + r" 1_23_456.7_89_10 - "# + " )); } #[test] fn multi_arg_closure() { expr_formats_same(indoc!( - r#" + r" \a, b, c -> a b c - "# + " )); } #[test] fn destructure_tag_closure() { expr_formats_same(indoc!( - r#" + r" \Foo a -> Foo a - "# + " )); } #[test] fn destructure_nested_tag_closure() { expr_formats_same(indoc!( - r#" + r" \Foo (Bar a) -> Foo (Bar a) - "# + " )); } @@ -1220,44 +1220,44 @@ mod test_fmt { #[test] fn single_def() { expr_formats_same(indoc!( - r#" + r" x = 5 42 - "# + " )); } #[test] fn two_defs() { expr_formats_same(indoc!( - r#" + r" x = 5 y = 10 42 - "# + " )); expr_formats_to( indoc!( - r#" + r" x = 5 y = 10 42 - "# + " ), indoc!( - r#" + r" x = 5 y = 10 42 - "# + " ), ); } @@ -1266,23 +1266,23 @@ mod test_fmt { fn excess_parens() { expr_formats_to( indoc!( - r#" + r" x = (5) y = ((10)) 42 - "# + " ), indoc!( - r#" + r" x = 5 y = 10 42 - "# + " ), ); } @@ -1290,42 +1290,42 @@ mod test_fmt { #[test] fn defs_with_defs() { expr_formats_same(indoc!( - r#" + r" x = y = 4 z = 8 w x - "# + " )); } #[test] fn comment_between_two_defs() { expr_formats_same(indoc!( - r#" + r" x = 5 # Hello y = 10 42 - "# + " )); expr_formats_same(indoc!( - r#" + r" x = 5 # Hello # two comments y = 10 42 - "# + " )); expr_formats_same(indoc!( - r#" + r" x = 5 # Hello # two comments @@ -1333,7 +1333,7 @@ mod test_fmt { # v-- This is the return value 42 - "# + " )); } @@ -1341,7 +1341,7 @@ mod test_fmt { fn space_between_comments() { expr_formats_to( indoc!( - r#" + r" # 9 # A @@ -1349,16 +1349,16 @@ mod test_fmt { # C 9 - "# + " ), indoc!( - r#" + r" # 9 # A # B # C 9 - "# + " ), ); } @@ -1367,7 +1367,7 @@ mod test_fmt { fn reduce_space_between_comments() { expr_formats_to( indoc!( - r#" + r" # First @@ -1375,20 +1375,20 @@ mod test_fmt { # Second x - "# + " ), indoc!( - r#" + r" # First # Second x - "# + " ), ); expr_formats_to( indoc!( - r#" + r" f = \x -> # 1st @@ -1399,10 +1399,10 @@ mod test_fmt { x f 4 - "# + " ), indoc!( - r#" + r" f = \x -> # 1st @@ -1410,7 +1410,7 @@ mod test_fmt { x f 4 - "# + " ), ); } @@ -1418,64 +1418,64 @@ mod test_fmt { #[test] fn doesnt_detect_comment_in_comment() { expr_formats_same(indoc!( - r#" + r" # One Comment # Still one Comment 9 - "# + " )); } #[test] fn parenthetical_def() { expr_formats_same(indoc!( - r#" + r" (UserId userId) = 5 y = 10 42 - "# + " )); expr_formats_same(indoc!( - r#" + r" # A (UserId userId) = 5 # B y = 10 42 - "# + " )); } #[test] fn record_destructuring() { expr_formats_same(indoc!( - r#" + r" { x, y } = 5 { x: 5 } = { x: 5 } 42 - "# + " )); } #[test] fn record_field_destructuring() { expr_formats_same(indoc!( - r#" + r" when foo is { x: 5 } -> 42 - "# + " )); } #[test] fn lambda_returns_record() { expr_formats_same(indoc!( - r#" + r" toRecord = \_ -> { x: 1, y: 2, @@ -1483,20 +1483,20 @@ mod test_fmt { } toRecord - "# + " )); expr_formats_same(indoc!( - r#" + r" func = \_ -> { x: 1, y: 2, z: 3 } func - "# + " )); expr_formats_same(indoc!( - r#" + r" toRecord = \_ -> val = 0 @@ -1507,12 +1507,12 @@ mod test_fmt { } toRecord - "# + " )); expr_formats_to( indoc!( - r#" + r" toRecord = \_ -> { x: 1, @@ -1521,10 +1521,10 @@ mod test_fmt { } toRecord - "# + " ), indoc!( - r#" + r" toRecord = \_ -> { x: 1, y: 2, @@ -1532,7 +1532,7 @@ mod test_fmt { } toRecord - "# + " ), ); } @@ -1540,7 +1540,7 @@ mod test_fmt { #[test] fn lambda_returns_list() { expr_formats_same(indoc!( - r#" + r" toList = \_ -> [ 1, 2, @@ -1548,20 +1548,20 @@ mod test_fmt { ] toList - "# + " )); expr_formats_same(indoc!( - r#" + r" func = \_ -> [1, 2, 3] func - "# + " )); expr_formats_same(indoc!( - r#" + r" toList = \_ -> val = 0 @@ -1572,12 +1572,12 @@ mod test_fmt { ] toList - "# + " )); expr_formats_to( indoc!( - r#" + r" toList = \_ -> [ 1, @@ -1586,10 +1586,10 @@ mod test_fmt { ] toList - "# + " ), indoc!( - r#" + r" toList = \_ -> [ 1, 2, @@ -1597,7 +1597,7 @@ mod test_fmt { ] toList - "# + " ), ); } @@ -1605,7 +1605,7 @@ mod test_fmt { #[test] fn multiline_list_func_arg() { expr_formats_same(indoc!( - r#" + r" result = func arg [ 1, 2, @@ -1613,32 +1613,32 @@ mod test_fmt { ] result - "# + " )); expr_formats_to( indoc!( - r#" + r" result = func arg [ 1, 2, 3 ] result - "# + " ), indoc!( - r#" + r" result = func arg [1, 2, 3] result - "# + " ), ); expr_formats_to( indoc!( - r#" + r" result = func arg [ 1, 2, @@ -1646,10 +1646,10 @@ mod test_fmt { ] result - "# + " ), indoc!( - r#" + r" result = func arg [ 1, 2, @@ -1657,13 +1657,13 @@ mod test_fmt { ] result - "# + " ), ); expr_formats_to( indoc!( - r#" + r" result = func [ 1, 2, @@ -1672,10 +1672,10 @@ mod test_fmt { arg result - "# + " ), indoc!( - r#" + r" result = func [ 1, @@ -1685,14 +1685,14 @@ mod test_fmt { arg result - "# + " ), ); // TODO: do we want to override the user's intent like this? expr_formats_to( indoc!( - r#" + r" result = func arg [ 1, @@ -1701,10 +1701,10 @@ mod test_fmt { ] result - "# + " ), indoc!( - r#" + r" result = func arg [ 1, 2, @@ -1712,12 +1712,12 @@ mod test_fmt { ] result - "# + " ), ); expr_formats_same(indoc!( - r#" + r" result = func arg [ @@ -1727,14 +1727,14 @@ mod test_fmt { ] result - "# + " )); } #[test] fn multiline_record_func_arg() { expr_formats_same(indoc!( - r#" + r" result = func arg { x: 1, y: 2, @@ -1742,32 +1742,32 @@ mod test_fmt { } result - "# + " )); expr_formats_to( indoc!( - r#" + r" result = func arg { x: 1, y: 2, z: 3 } result - "# + " ), indoc!( - r#" + r" result = func arg { x: 1, y: 2, z: 3 } result - "# + " ), ); expr_formats_to( indoc!( - r#" + r" result = func arg { x: 1, y: 2, @@ -1775,10 +1775,10 @@ mod test_fmt { } result - "# + " ), indoc!( - r#" + r" result = func arg { x: 1, y: 2, @@ -1786,13 +1786,13 @@ mod test_fmt { } result - "# + " ), ); expr_formats_to( indoc!( - r#" + r" result = func { x: 1, y: 2, @@ -1801,10 +1801,10 @@ mod test_fmt { arg result - "# + " ), indoc!( - r#" + r" result = func { x: 1, @@ -1814,14 +1814,14 @@ mod test_fmt { arg result - "# + " ), ); // TODO: do we want to override the user's intent like this? expr_formats_to( indoc!( - r#" + r" result = func arg { x: 1, @@ -1830,10 +1830,10 @@ mod test_fmt { } result - "# + " ), indoc!( - r#" + r" result = func arg { x: 1, y: 2, @@ -1841,12 +1841,12 @@ mod test_fmt { } result - "# + " ), ); expr_formats_same(indoc!( - r#" + r" result = func arg { @@ -1856,68 +1856,68 @@ mod test_fmt { } result - "# + " )); } #[test] fn record_updating() { expr_formats_same(indoc!( - r#" + r" { shoes & leftShoe: nothing } - "# + " )); expr_formats_to( indoc!( - r#" + r" { shoes & rightShoe : nothing } - "# + " ), indoc!( - r#" + r" { shoes & rightShoe: nothing } - "# + " ), ); expr_formats_to( indoc!( - r#" + r" { shoes & rightShoe : nothing } - "# + " ), indoc!( - r#" + r" { shoes & rightShoe: nothing } - "# + " ), ); expr_formats_same(indoc!( - r#" + r" { shoes & rightShoe: newRightShoe, leftShoe: newLeftShoe, } - "# + " )); expr_formats_to( indoc!( - r#" + r" { shoes & rightShoe: bareFoot , leftShoe: bareFoot } - "# + " ), indoc!( - r#" + r" { shoes & rightShoe: bareFoot, leftShoe: bareFoot, } - "# + " ), ); } @@ -2089,20 +2089,20 @@ mod test_fmt { #[test] fn final_comments_in_records() { expr_formats_same(indoc!( - r#" + r" { x: 42, # comment - }"# + }" )); expr_formats_same(indoc!( - r#" + r" { x: 42, # comment # other comment - }"# + }" )); } @@ -2110,21 +2110,21 @@ mod test_fmt { fn final_comments_without_comma_in_records() { expr_formats_to( indoc!( - r#" + r" { y: 41, # comment 1 x: 42 # comment 2 - }"# + }" ), indoc!( - r#" + r" { y: 41, # comment 1 x: 42, # comment 2 - }"# + }" ), ); } @@ -2133,21 +2133,21 @@ mod test_fmt { fn multiple_final_comments_without_comma_in_records() { expr_formats_to( indoc!( - r#" + r" { y: 41, x: 42 # comment 1 # comment 2 - }"# + }" ), indoc!( - r#" + r" { y: 41, x: 42, # comment 1 # comment 2 - }"# + }" ), ); } @@ -2156,7 +2156,7 @@ mod test_fmt { fn comments_with_newlines_in_records() { expr_formats_to( indoc!( - r#" + r" { z: 44 #comment 0 , @@ -2168,10 +2168,10 @@ mod test_fmt { # comment 3 # comment 4 - }"# + }" ), indoc!( - r#" + r" { z: 44, # comment 0 @@ -2181,7 +2181,7 @@ mod test_fmt { x: 42, # comment 3 # comment 4 - }"# + }" ), ); } @@ -2190,21 +2190,21 @@ mod test_fmt { fn multiple_final_comments_with_comma_in_records() { expr_formats_to( indoc!( - r#" + r" { y: 41, x: 42, # comment 1 # comment 2 - }"# + }" ), indoc!( - r#" + r" { y: 41, x: 42, # comment 1 # comment 2 - }"# + }" ), ); } @@ -2213,21 +2213,21 @@ mod test_fmt { fn trailing_comma_in_record_annotation() { expr_formats_to( indoc!( - r#" + r" f: { y : Int *, x : Int * , } - f"# + f" ), indoc!( - r#" + r" f : { y : Int *, x : Int *, } - f"# + f" ), ); } @@ -2235,19 +2235,19 @@ mod test_fmt { #[test] fn trailing_comma_in_record_annotation_same() { expr_formats_same(indoc!( - r#" + r" f : { y : Int *, x : Int *, } f - "# + " )); expr_formats_to( indoc!( - r#" + r" f : { y : Int *, @@ -2255,17 +2255,17 @@ mod test_fmt { } f - "# + " ), indoc!( - r#" + r" f : { y : Int *, x : Int *, } f - "# + " ), ); } @@ -2273,33 +2273,33 @@ mod test_fmt { #[test] fn multiline_type_definition() { expr_formats_same(indoc!( - r#" + r" f : Int * - f"# + f" )); } #[test] fn multiline_empty_record_type_definition() { expr_formats_same(indoc!( - r#" + r" f : {} f - "# + " )); expr_formats_same(indoc!( - r#" + r" f : { } f - "# + " )); } @@ -2307,19 +2307,19 @@ mod test_fmt { fn type_definition_comment_after_colon() { expr_formats_to( indoc!( - r#" + r" f : # comment {} - f"# + f" ), indoc!( - r#" + r" f : # comment {} - f"# + f" ), ); } @@ -2328,35 +2328,35 @@ mod test_fmt { fn type_definition_add_space_around_optional_record() { expr_formats_to( indoc!( - r#" + r" f : { a ?Str } - f"# + f" ), indoc!( - r#" + r" f : { a ? Str } - f"# + f" ), ); expr_formats_to( indoc!( - r#" + r" f : { a ?Str, } - f"# + f" ), indoc!( - r#" + r" f : { a ? Str, } - f"# + f" ), ); } @@ -2366,20 +2366,20 @@ mod test_fmt { fn final_comment_in_empty_record_type_definition() { expr_formats_to( indoc!( - r#" + r" f : { # comment } - f"# + f" ), indoc!( - r#" + r" f : { # comment } - f"# + f" ), ); } @@ -2387,94 +2387,94 @@ mod test_fmt { #[test] fn multiline_curly_brace_type() { expr_formats_same(indoc!( - r#" + r" x : { a : Int, } x - "# + " )); expr_formats_same(indoc!( - r#" + r" x : { a : Int } x - "# + " )); } #[test] fn multiline_brace_type() { expr_formats_same(indoc!( - r#" + r" x : [ Int, ] x - "# + " )); expr_formats_same(indoc!( - r#" + r" x : [Int] x - "# + " )); } #[test] fn multiline_fn_signature() { expr_formats_same(indoc!( - r#" + r" foo : Str, Nat -> Bool foo - "# + " )); expr_formats_same(indoc!( - r#" + r" foo : Str, Int, Nat -> Bool foo - "# + " )); expr_formats_to( indoc!( - r#" + r" foo : Str, Nat -> Bool foo - "# + " ), indoc!( - r#" + r" foo : Str, Nat -> Bool foo - "# + " ), ); expr_formats_to( indoc!( - r#" + r" foo : Str, @@ -2483,37 +2483,37 @@ mod test_fmt { -> Bool foo - "# + " ), indoc!( - r#" + r" foo : Str, Nat -> Bool foo - "# + " ), ); expr_formats_to( indoc!( - r#" + r" foo : Str, Nat -> Bool foo - "# + " ), indoc!( - r#" + r" foo : Str, Nat -> Bool foo - "# + " ), ); } @@ -2522,7 +2522,7 @@ mod test_fmt { fn final_comment_record_annotation() { expr_formats_to( indoc!( - r#" + r" f : { x: Int * # comment 1 @@ -2530,16 +2530,16 @@ mod test_fmt { # comment 2 } - f"# + f" ), indoc!( - r#" + r" f : { x : Int *, # comment 1 # comment 2 } - f"# + f" ), ); } @@ -2547,79 +2547,79 @@ mod test_fmt { #[test] fn def_closure() { expr_formats_same(indoc!( - r#" + r" identity = \a -> a identity 42 - "# + " )); expr_formats_same(indoc!( - r#" + r" identity = \a -> a identity 44 - "# + " )); expr_formats_same(indoc!( - r#" + r" identity = \a -> a # Hello identity 40 - "# + " )); expr_formats_to( indoc!( - r#" + r" identity = \a -> a identity 41 - "# + " ), indoc!( - r#" + r" identity = \a -> a identity 41 - "# + " ), ); expr_formats_to( indoc!( - r#" + r" identity = \a -> a + b identity 4010 - "# + " ), indoc!( - r#" + r" identity = \a -> a + b identity 4010 - "# + " ), ); expr_formats_same(indoc!( - r#" + r" identity = \a, b -> a identity 43 - "# + " )); // expr_formats_same(indoc!( - // r#" + // r" // identity = // \{ // x, @@ -2628,11 +2628,11 @@ mod test_fmt { // -> a // // identity 43 - // "# + // " // )); expr_formats_same(indoc!( - r#" + r" identity = \a, b, # it's c!! @@ -2640,14 +2640,14 @@ mod test_fmt { -> a identity 43 - "# + " )); } #[test] fn closure_multiline_pattern() { expr_formats_same(indoc!( - r#" + r" identity = \a, b, # it's c!! @@ -2655,7 +2655,7 @@ mod test_fmt { -> a identity 43 - "# + " )); } @@ -2681,38 +2681,38 @@ mod test_fmt { #[test] fn multi_line_list() { expr_formats_same(indoc!( - r#" + r" [ 7, 8, 9, ] - "# + " )); expr_formats_to( indoc!( - r#" + r" [ 17 , 18 , 19 ] - "# + " ), indoc!( - r#" + r" [ 17, 18, 19, ] - "# + " ), ); expr_formats_to( indoc!( - r#" + r" [ 27 , 28 @@ -2720,85 +2720,85 @@ mod test_fmt { , 29 ] - "# + " ), indoc!( - r#" + r" [ 27, 28, 29, ] - "# + " ), ); expr_formats_to( indoc!( - r#" + r" [ 157, 158, 159 ] - "# + " ), indoc!( - r#" + r" [ 157, 158, 159, ] - "# + " ), ); expr_formats_to( indoc!( - r#" + r" [ 557, 648, 759, 837 ] - "# + " ), indoc!( - r#" + r" [ 557, 648, 759, 837, ] - "# + " ), ); expr_formats_to( indoc!( - r#" + r" [ 257, 358, # Hey! 459 ] - "# + " ), indoc!( - r#" + r" [ 257, 358, # Hey! 459, ] - "# + " ), ); expr_formats_to( indoc!( - r#" + r" [ # Thirty Seven @@ -2809,10 +2809,10 @@ mod test_fmt { , 39 ] - "# + " ), indoc!( - r#" + r" [ # Thirty Seven @@ -2821,13 +2821,13 @@ mod test_fmt { 38, 39, ] - "# + " ), ); expr_formats_to( indoc!( - r#" + r" [ # 47! # Top 47 47 @@ -2840,10 +2840,10 @@ mod test_fmt { # Bottom 49 # 49! ] - "# + " ), indoc!( - r#" + r" [ # 47! # Top 47 @@ -2857,7 +2857,7 @@ mod test_fmt { # Bottom 49 # 49! ] - "# + " ), ); } @@ -2865,52 +2865,52 @@ mod test_fmt { fn ending_comments_in_list() { expr_formats_to( indoc!( - r#" + r" [ # Top 49 49 # Bottom 49 , # 49! ] - "# + " ), indoc!( - r#" + r" [ # Top 49 49, # Bottom 49 # 49! ] - "# + " ), ); } #[test] fn multi_line_list_def() { expr_formats_same(indoc!( - r#" + r" l = [ 1, 2, ] l - "# + " )); expr_formats_same(indoc!( - r#" + r" l = [1, 2] l - "# + " )); expr_formats_to( indoc!( - r#" + r" l = [ 1, @@ -2918,46 +2918,46 @@ mod test_fmt { ] l - "# + " ), indoc!( - r#" + r" l = [ 1, 2, ] l - "# + " ), ); expr_formats_to( indoc!( - r#" + r" results = [ Ok 4, Ok 5 ] allOks results - "# + " ), indoc!( - r#" + r" results = [ Ok 4, Ok 5, ] allOks results - "# + " ), ); expr_formats_to( indoc!( - r#" + r" results = # Let's count past 6 [ @@ -2966,10 +2966,10 @@ mod test_fmt { ] allOks results - "# + " ), indoc!( - r#" + r" results = # Let's count past 6 [ @@ -2978,7 +2978,7 @@ mod test_fmt { ] allOks results - "# + " ), ); } @@ -3012,35 +3012,35 @@ mod test_fmt { expr_formats_to( indoc!( - r#" + r" f = \a, b -> { } f - "# + " ), indoc!( - r#" + r" f = \a, b -> {} f - "# + " ), ); expr_formats_to( indoc!( - r#" + r" { } <- f a b {} - "# + " ), indoc!( - r#" + r" {} <- f a b {} - "# + " ), ); } @@ -3049,10 +3049,10 @@ mod test_fmt { #[ignore] fn empty_record_with_comment() { expr_formats_same(indoc!( - r#" + r" { # comment - }"# + }" )); } @@ -3061,9 +3061,9 @@ mod test_fmt { fn empty_record_with_newline() { expr_formats_to( indoc!( - r#" + r" { - }"# + }" ), "{}", ); @@ -3081,19 +3081,19 @@ mod test_fmt { #[test] fn two_fields_newline() { expr_formats_same(indoc!( - r#" + r" { x: 4, y: 42, } - "# + " )); } #[test] fn multi_line_record_def() { expr_formats_same(indoc!( - r#" + r" pos = { x: 4, y: 11, @@ -3101,20 +3101,20 @@ mod test_fmt { } pos - "# + " )); expr_formats_same(indoc!( - r#" + r" pos = { x: 4, y: 11, z: 16 } pos - "# + " )); expr_formats_same(indoc!( - r#" + r" myDef = list = [ a, @@ -3127,12 +3127,12 @@ mod test_fmt { } myDef - "# + " )); expr_formats_to( indoc!( - r#" + r" pos = { x: 4, @@ -3141,10 +3141,10 @@ mod test_fmt { } pos - "# + " ), indoc!( - r#" + r" pos = { x: 4, y: 11, @@ -3152,30 +3152,30 @@ mod test_fmt { } pos - "# + " ), ); expr_formats_to( indoc!( - r#" + r" pos = { x: 5, y: 10, } pos - "# + " ), indoc!( - r#" + r" pos = { x: 5, y: 10, } pos - "# + " ), ); } @@ -3184,19 +3184,19 @@ mod test_fmt { fn two_fields_center_newline() { expr_formats_to( indoc!( - r#" + r" { x: 4, y: 42 } - "# + " ), indoc!( - r#" + r" { x: 4, y: 42, } - "# + " ), ); } @@ -3204,11 +3204,11 @@ mod test_fmt { #[test] fn one_unnamed_field() { expr_formats_same(indoc!( - r#" + r" foo = 4 { foo } - "# + " )); } @@ -3217,29 +3217,29 @@ mod test_fmt { #[test] fn single_line_if() { expr_formats_same(indoc!( - r#" + r" if foo bar then a b c else d e f - "# + " )); expr_formats_same(indoc!( - r#" + r" if foo (a b c) then a b c else d e f - "# + " )); } #[test] fn multi_line_if_condition() { expr_formats_same(indoc!( - r#" + r" if waterWillBoil pressure temperature then turnOnAc else identity - "# + " )); } @@ -3247,7 +3247,7 @@ mod test_fmt { fn multi_line_if_condition_with_spaces() { expr_formats_to( indoc!( - r#" + r" if @@ -3259,17 +3259,17 @@ mod test_fmt { else identity - "# + " ), indoc!( - r#" + r" if willBoil home water then \_ -> leave else identity - "# + " ), ); } @@ -3277,7 +3277,7 @@ mod test_fmt { #[test] fn multi_line_if_condition_with_multi_line_expr_1() { expr_formats_same(indoc!( - r#" + r" if snowWillFall pressure @@ -3286,7 +3286,7 @@ mod test_fmt { bundleUp else identity - "# + " )); } @@ -3309,7 +3309,7 @@ mod test_fmt { fn if_removes_newlines_from_else() { expr_formats_to( indoc!( - r#" + r" if isPrime 8 then @@ -3322,10 +3322,10 @@ mod test_fmt { # F just (div 1 8) - "# + " ), indoc!( - r#" + r" if isPrime 8 then @@ -3336,7 +3336,7 @@ mod test_fmt { # E # F just (div 1 8) - "# + " ), ); } @@ -3345,7 +3345,7 @@ mod test_fmt { fn if_removes_newlines_from_then() { expr_formats_to( indoc!( - r#" + r" if isPrime 9 then @@ -3358,10 +3358,10 @@ mod test_fmt { else just (div 1 9) - "# + " ), indoc!( - r#" + r" if isPrime 9 then @@ -3371,7 +3371,7 @@ mod test_fmt { # GG else just (div 1 9) - "# + " ), ); } @@ -3380,7 +3380,7 @@ mod test_fmt { fn if_removes_newlines_from_condition() { expr_formats_to( indoc!( - r#" + r" if # Is @@ -3395,10 +3395,10 @@ mod test_fmt { nothing else just (div 1 10) - "# + " ), indoc!( - r#" + r" if # Is # It @@ -3408,7 +3408,7 @@ mod test_fmt { nothing else just (div 1 10) - "# + " ), ); } @@ -3417,28 +3417,28 @@ mod test_fmt { fn multi_line_if() { expr_formats_to( indoc!( - r#" + r" if lessThan four five then four else five - "# + " ), indoc!( - r#" + r" if lessThan four five then four else five - "# + " ), ); expr_formats_to( indoc!( - r#" + r" if lessThan three four then @@ -3451,36 +3451,36 @@ mod test_fmt { four - "# + " ), indoc!( - r#" + r" if lessThan three four then three else four - "# + " ), ); expr_formats_same(indoc!( - r#" + r" if foo bar then a b c else d e f - "# + " )); } #[test] fn multi_line_application() { expr_formats_same(indoc!( - r#" + r" combine peanutButter chocolate - "# + " )); } @@ -3488,34 +3488,34 @@ mod test_fmt { fn partial_multi_line_application() { expr_formats_to( indoc!( - r#" + r" mix vodka tonic - "# + " ), indoc!( - r#" + r" mix vodka tonic - "# + " ), ); expr_formats_to( indoc!( - r#" + r" f a b c - "# + " ), indoc!( - r#" + r" f a b c - "# + " ), ); } @@ -3525,14 +3525,14 @@ mod test_fmt { #[test] fn integer_when() { expr_formats_same(indoc!( - r#" + r" when b is 1 -> 1 _ -> 2 - "# + " )); } @@ -3540,7 +3540,7 @@ mod test_fmt { fn integer_when_with_space() { expr_formats_to( indoc!( - r#" + r" when year is 1999 -> @@ -3552,17 +3552,17 @@ mod test_fmt { _ -> 0 - "# + " ), indoc!( - r#" + r" when year is 1999 -> 1 _ -> 0 - "# + " ), ); } @@ -3570,7 +3570,7 @@ mod test_fmt { #[test] fn when_with_comments() { expr_formats_same(indoc!( - r#" + r" when b is # look at cases 1 -> # when 1 @@ -3583,7 +3583,7 @@ mod test_fmt { # more comment 2 - "# + " )); } @@ -3603,20 +3603,20 @@ mod test_fmt { #[test] fn nested_when() { expr_formats_same(indoc!( - r#" + r" when b is _ -> when c is _ -> 1 - "# + " )); } #[test] fn def_when() { expr_formats_same(indoc!( - r#" + r" myLongFunctionName = \x -> when b is 1 | 2 -> @@ -3628,7 +3628,7 @@ mod test_fmt { 5 123 - "# + " )); } @@ -3641,7 +3641,7 @@ mod test_fmt { // we want to make sure the `when` is at the beginning of the line, inserting // a newline if necessary. indoc!( - r#" + r" myLongFunctionName = \x -> when b is 1 | 2 -> when c is @@ -3652,10 +3652,10 @@ mod test_fmt { 5 123 - "# + " ), indoc!( - r#" + r" myLongFunctionName = \x -> when b is 1 | 2 -> @@ -3667,7 +3667,7 @@ mod test_fmt { 5 123 - "# + " ), ); } @@ -3675,7 +3675,7 @@ mod test_fmt { #[test] fn when_with_alternatives_1() { expr_formats_same(indoc!( - r#" + r" when b is 1 | 2 -> when c is @@ -3684,20 +3684,20 @@ mod test_fmt { 3 | 4 -> 5 - "# + " )); } #[test] fn when_with_alternatives_2() { expr_formats_same(indoc!( - r#" + r" when b is # a comment here 1 | 2 -> # a comment there 1 - "# + " )); } @@ -3705,19 +3705,19 @@ mod test_fmt { fn when_with_alternatives_3() { expr_formats_to( indoc!( - r#" + r" when b is 1 | 2 |3 -> 1 - "# + " ), indoc!( - r#" + r" when b is 1 | 2 | 3 -> 1 - "# + " ), ); } @@ -3726,7 +3726,7 @@ mod test_fmt { fn when_with_alternatives_4() { expr_formats_to( indoc!( - r#" + r" when b is 1 | 2 | 3 @@ -3746,10 +3746,10 @@ mod test_fmt { | 18 -> 19 20 -> 21 - "# + " ), indoc!( - r#" + r" when b is 1 | 2 @@ -3769,7 +3769,7 @@ mod test_fmt { | 18 -> 19 20 -> 21 - "# + " ), ); } @@ -3778,19 +3778,19 @@ mod test_fmt { fn with_multiline_pattern_indentation() { expr_formats_to( indoc!( - r#" + r" when b is 3->4 9 |8->9 - "# + " ), indoc!( - r#" + r" when b is 3 -> 4 9 | 8 -> 9 - "# + " ), ); } @@ -3798,7 +3798,7 @@ mod test_fmt { #[test] fn multi_line_when_condition_1() { expr_formats_same(indoc!( - r#" + r" when complexFunction a b c is @@ -3807,14 +3807,14 @@ mod test_fmt { _ -> Just True - "# + " )); } #[test] fn multi_line_when_condition_2() { expr_formats_same(indoc!( - r#" + r" when # this is quite complicated complexFunction a b c @@ -3825,7 +3825,7 @@ mod test_fmt { Simple z -> z - "# + " )); } @@ -3833,7 +3833,7 @@ mod test_fmt { fn multi_line_when_condition_3() { expr_formats_to( indoc!( - r#" + r" x = 2 y = 3 @@ -3844,10 +3844,10 @@ mod test_fmt { _ -> y - "# + " ), indoc!( - r#" + r" x = 2 y = 3 @@ -3860,7 +3860,7 @@ mod test_fmt { _ -> y - "# + " ), ); } @@ -3869,7 +3869,7 @@ mod test_fmt { fn multi_line_when_condition_4() { expr_formats_to( indoc!( - r#" + r" x = 2 y = 3 @@ -3881,10 +3881,10 @@ mod test_fmt { _ -> y - "# + " ), indoc!( - r#" + r" x = 2 y = 3 @@ -3897,7 +3897,7 @@ mod test_fmt { _ -> y - "# + " ), ); } @@ -3930,57 +3930,57 @@ mod test_fmt { #[test] fn single_line_when_patterns() { expr_formats_same(indoc!( - r#" + r" when x is Foo -> 1 Bar -> 2 - "# + " )); expr_formats_same(indoc!( - r#" + r" when x is Foo -> 1 Bar -> 2 - "# + " )); expr_formats_to( indoc!( - r#" + r" when x is Foo -> 1 Bar -> 2 - "# + " ), indoc!( - r#" + r" when x is Foo -> 1 Bar -> 2 - "# + " ), ); expr_formats_to( indoc!( - r#" + r" when x is Foo -> 1 Bar -> 2 - "# + " ), indoc!( - r#" + r" when x is Foo -> 1 Bar -> 2 - "# + " ), ); } @@ -3988,11 +3988,11 @@ mod test_fmt { #[test] fn when_with_single_quote_char() { expr_formats_same(indoc!( - r#" + r" when x is '0' -> 0 '1' -> 1 - "# + " )); } @@ -4002,7 +4002,7 @@ mod test_fmt { fn multiple_blank_lines_collapse_to_one() { expr_formats_to( indoc!( - r#" + r" x = 5 @@ -4012,16 +4012,16 @@ mod test_fmt { 42 - "# + " ), indoc!( - r#" + r" x = 5 y = 10 42 - "# + " ), ); } @@ -4029,7 +4029,7 @@ mod test_fmt { #[test] fn def_returning_closure() { expr_formats_same(indoc!( - r#" + r" f = \x -> x g = \x -> x @@ -4038,7 +4038,7 @@ mod test_fmt { b = f x x - "# + " )); } @@ -4048,7 +4048,7 @@ mod test_fmt { // which of course is not the same tree (and nor does it parse) expr_formats_to( indoc!( - r#" + r" \x -> m = 2 @@ -4056,17 +4056,17 @@ mod test_fmt { m1 = insert m n powerOf10 42 - "# + " ), indoc!( - r#" + r" \x -> m = 2 m1 = insert m n powerOf10 42 - "# + " ), ); } @@ -4074,21 +4074,21 @@ mod test_fmt { #[test] fn when_guard() { expr_formats_same(indoc!( - r#" + r" when maybeScore is Just score if score > 21 -> win _ -> nextRound - "# + " )); } #[test] fn when_guard_using_function() { expr_formats_same(indoc!( - r#" + r" when authenticationResponse is Ok user if hasPermission user -> loadPage route user @@ -4098,7 +4098,7 @@ mod test_fmt { Err _ -> ErrorPage - "# + " )); } @@ -4107,21 +4107,21 @@ mod test_fmt { #[test] fn accessor() { expr_formats_same(indoc!( - r#" + r" .id - "# + " )); expr_formats_same(indoc!( - r#" + r" user.name - "# + " )); expr_formats_same(indoc!( - r#" + r" (getUser userId users).name - "# + " )); } @@ -4130,12 +4130,12 @@ mod test_fmt { #[test] fn precedence_conflict() { expr_formats_same(indoc!( - r#" + r" if True == False == True then False else True - "# + " )); } @@ -4143,17 +4143,17 @@ mod test_fmt { fn multi_line_precedence_conflict_1() { expr_formats_to( indoc!( - r#" + r" if True == False == True then False else True - "# + " ), indoc!( - r#" + r" if True == False @@ -4162,7 +4162,7 @@ mod test_fmt { False else True - "# + " ), ); } @@ -4197,14 +4197,14 @@ mod test_fmt { #[test] fn precedence_conflict_functions() { expr_formats_same(indoc!( - r#" + r" when f x == g y == h z is True -> Ok 1 False -> Err 2 - "# + " )); } @@ -4257,17 +4257,17 @@ mod test_fmt { fn multiline_binop_with_comments() { expr_formats_to( indoc!( - r#" + r" x = 1 + 1 # comment 1 - 1 # comment 2 * 1 # comment 3 x - "# + " ), indoc!( - r#" + r" x = 1 + 1 # comment 1 @@ -4275,87 +4275,87 @@ mod test_fmt { * 1 # comment 3 x - "# + " ), ); expr_formats_to( indoc!( - r#" + r" x = 1 + 1 # comment 1 * 1 # comment 2 x - "# + " ), indoc!( - r#" + r" x = 1 + 1 # comment 1 * 1 # comment 2 x - "# + " ), ); expr_formats_to( indoc!( - r#" + r" x = 1 + 1 # comment x - "# + " ), indoc!( - r#" + r" x = 1 + 1 # comment x - "# + " ), ); expr_formats_to( indoc!( - r#" + r" x = 1 * 1 + 1 # comment x - "# + " ), indoc!( - r#" + r" x = 1 * 1 + 1 # comment x - "# + " ), ); expr_formats_to( indoc!( - r#" + r" x = 1 - 1 * 1 + 1 x - "# + " ), indoc!( - r#" + r" x = 1 - 1 @@ -4363,7 +4363,7 @@ mod test_fmt { + 1 x - "# + " ), ); } @@ -4371,7 +4371,7 @@ mod test_fmt { #[test] fn multiline_binop_if_with_comments() { expr_formats_same(indoc!( - r#" + r" if x + 1 # comment 1 @@ -4382,7 +4382,7 @@ mod test_fmt { < 1 # comment 4 else 42 - "# + " )); } @@ -4453,27 +4453,27 @@ mod test_fmt { #[test] fn precedence_conflict_greater_than() { expr_formats_same(indoc!( - r#" + r" 3 > 4 > 10 - "# + " )); } #[test] fn precedence_conflict_greater_than_and_less_than() { expr_formats_same(indoc!( - r#" + r" 1 < 4 > 1 - "# + " )); } #[test] fn binop_if() { expr_formats_same(indoc!( - r#" + r" 5 * (if x > 0 then 1 else 2) - "# + " )); } @@ -4482,20 +4482,20 @@ mod test_fmt { #[test] fn unary_op() { expr_formats_same(indoc!( - r#" + r" y = -4 !x - "# + " )); } #[test] fn unary_call_parens() { expr_formats_same(indoc!( - r#" + r" !(f 1) - "# + " )); } @@ -4503,9 +4503,9 @@ mod test_fmt { fn unary_call_no_parens() { // TIL: Negating a function "does what you might expect"... which is cool! expr_formats_same(indoc!( - r#" + r" !f 1 - "# + " )); } @@ -4514,9 +4514,9 @@ mod test_fmt { #[test] fn binary_op() { expr_formats_same(indoc!( - r#" + r" 1 == 1 - "# + " )); } @@ -4524,14 +4524,14 @@ mod test_fmt { fn binary_op_with_spaces() { expr_formats_to( indoc!( - r#" + r" 2 != 3 - "# + " ), indoc!( - r#" + r" 2 != 3 - "# + " ), ); } @@ -4539,11 +4539,11 @@ mod test_fmt { #[test] fn multi_line_binary_op_1() { expr_formats_same(indoc!( - r#" + r" isLast && isEmpty && isLoaded - "# + " )); } @@ -4551,21 +4551,21 @@ mod test_fmt { fn multi_line_binary_op_2() { expr_formats_to( indoc!( - r#" + r" x = 1 < 2 f x - "# + " ), indoc!( - r#" + r" x = 1 < 2 f x - "# + " ), ); } @@ -4574,20 +4574,20 @@ mod test_fmt { fn multi_line_binary_op_with_comments() { expr_formats_to( indoc!( - r#" + r" 1 * 2 / 3 // 4 - "# + " ), indoc!( - r#" + r" 1 * 2 / 3 // 4 - "# + " ), ); } @@ -4596,19 +4596,19 @@ mod test_fmt { fn partial_multi_line_binary_op_1() { expr_formats_to( indoc!( - r#" + r" 2 % 3 // 5 + 7 - "# + " ), indoc!( - r#" + r" 2 % 3 // 5 + 7 - "# + " ), ); } @@ -4617,17 +4617,17 @@ mod test_fmt { fn partial_multi_line_binary_op_2() { expr_formats_to( indoc!( - r#" + r" isGreenLight && isRedLight && isYellowLight - "# + " ), indoc!( - r#" + r" isGreenLight && isRedLight && isYellowLight - "# + " ), ); } @@ -4635,55 +4635,55 @@ mod test_fmt { #[test] fn pipline_op_with_apply() { expr_formats_same(indoc!( - r#" + r" output |> List.set (offset + 0) b |> List.set (offset + 1) a - "# + " )); } #[test] fn apply_lambda() { expr_formats_same(indoc!( - r#" + r" List.map xs (\i -> i + length) - "# + " )); } #[test] fn pipline_apply_lambda_1() { expr_formats_same(indoc!( - r#" + r" shout |> List.map xs (\i -> i) - "# + " )); } #[test] fn pipline_apply_lambda_2() { expr_formats_same(indoc!( - r#" + r" shout |> List.map xs (\i -> i) |> List.join - "# + " )); } #[test] fn comment_between_multiline_ann_args() { expr_formats_same(indoc!( - r#" + r" blah : Str, # comment @@ -4691,14 +4691,14 @@ mod test_fmt { -> Str 42 - "# + " )) } #[test] fn pipeline_apply_lambda_multiline() { expr_formats_same(indoc!( - r#" + r" example = \model -> model |> withModel @@ -4712,12 +4712,12 @@ mod test_fmt { ) example - "# + " )); expr_formats_to( indoc!( - r#" + r" example = \model -> model |> withModel @@ -4731,10 +4731,10 @@ mod test_fmt { ) example - "# + " ), indoc!( - r#" + r" example = \model -> model |> withModel @@ -4748,7 +4748,7 @@ mod test_fmt { ) example - "# + " ), ); } @@ -4756,12 +4756,12 @@ mod test_fmt { #[test] fn func_call_trailing_multiline_lambda() { expr_formats_same(indoc!( - r#" + r" list = List.map [1, 2, 3] \x -> x + 1 list - "# + " )); } @@ -4770,8 +4770,8 @@ mod test_fmt { #[test] fn single_line_interface() { module_formats_same(indoc!( - r#" - interface Foo exposes [] imports []"# + r" + interface Foo exposes [] imports []" )); } @@ -4780,15 +4780,15 @@ mod test_fmt { // TODO: make the formatter add a space between '42' and # below: module_formats_to( indoc!( - r#" + r" interface Foo exposes [] imports [] - a = 42 # Yay greetings"# + a = 42 # Yay greetings" ), indoc!( - r#" + r" interface Foo exposes [] imports [] a = 42 # Yay greetings - "# + " ), ); } @@ -4796,37 +4796,37 @@ mod test_fmt { #[test] fn multiline_interface() { module_formats_same(indoc!( - r#" + r" interface Foo exposes [] - imports []"# + imports []" )); } #[test] fn interface_exposing() { module_formats_same(indoc!( - r#" + r" interface Foo exposes [Bar, Baz, a, b] - imports []"# + imports []" )); } #[test] fn interface_importing() { module_formats_same(indoc!( - r#" + r" interface Foo exposes [Bar, Baz, a, b] - imports [Blah, Thing.{ foo, bar }, Stuff]"# + imports [Blah, Thing.{ foo, bar }, Stuff]" )); } #[test] fn multi_line_interface() { module_formats_same(indoc!( - r#" + r" interface Foo exposes [ Stuff, @@ -4836,7 +4836,7 @@ mod test_fmt { imports [ Blah, Baz.{ stuff, things }, - ]"# + ]" )); } @@ -4927,15 +4927,15 @@ mod test_fmt { #[test] fn single_line_hosted() { module_formats_same(indoc!( - r#" - hosted Foo exposes [] imports [] generates Bar with []"# + r" + hosted Foo exposes [] imports [] generates Bar with []" )); } #[test] fn multi_line_hosted() { module_formats_same(indoc!( - r#" + r" hosted Foo exposes [ Stuff, @@ -4950,7 +4950,7 @@ mod test_fmt { map, after, loop, - ]"# + ]" )); } @@ -4959,38 +4959,38 @@ mod test_fmt { #[test] fn list_alias() { expr_formats_same(indoc!( - r#" + r" ConsList a : [Cons a (ConsList a), Nil] f : ConsList a -> ConsList a f = \_ -> Nil f - "# + " )); } #[test] fn wildcard() { expr_formats_same(indoc!( - r#" + r" f : List * f = [] a - "# + " )); } #[test] fn identity() { expr_formats_same(indoc!( - r#" + r" f : a -> a f = [] a - "# + " )); } @@ -5016,28 +5016,28 @@ mod test_fmt { #[test] fn multiline_tag_union_annotation_no_comments() { expr_formats_same(indoc!( - r#" + r" b : [ True, False, ] b - "# + " )); expr_formats_same(indoc!( - r#" + r" b : [True, False] b - "# + " )); expr_formats_to( indoc!( - r#" + r" b : [ True, @@ -5045,40 +5045,40 @@ mod test_fmt { ] b - "# + " ), indoc!( - r#" + r" b : [ True, False, ] b - "# + " ), ); expr_formats_to( indoc!( - r#" + r" b : [ True, False, ] b - "# + " ), indoc!( - r#" + r" b : [ True, False, ] b - "# + " ), ); } @@ -5086,7 +5086,7 @@ mod test_fmt { #[test] fn multiline_tag_union_annotation_beginning_on_same_line() { expr_formats_same(indoc!( - r#" + r" Expr : [ Add Expr Expr, Mul Expr Expr, @@ -5094,7 +5094,7 @@ mod test_fmt { Var I64, ] - Expr"# + Expr" )); } @@ -5102,7 +5102,7 @@ mod test_fmt { fn multiline_tag_union_annotation_with_final_comment() { expr_formats_to( indoc!( - r#" + r" b : [ True, @@ -5113,10 +5113,10 @@ mod test_fmt { ] b - "# + " ), indoc!( - r#" + r" b : [ True, # comment 1 @@ -5125,7 +5125,7 @@ mod test_fmt { ] b - "# + " ), ); } @@ -5133,12 +5133,12 @@ mod test_fmt { #[test] fn tag_union() { expr_formats_same(indoc!( - r#" + r" f : [True, False] -> [True, False] f = \x -> x a - "# + " )); } @@ -5147,7 +5147,7 @@ mod test_fmt { // #[test] // fn multiline_tag_union_function_annotation() { // expr_formats_same(indoc!( - // r#" + // r" // f : // [ // True, @@ -5160,14 +5160,14 @@ mod test_fmt { // f = \x -> x // a - // "# + // " // )); // } #[test] fn recursive_tag_union() { expr_formats_same(indoc!( - r#" + r" f : [Cons a (ConsList a), Nil] as ConsList a -> [Just a, Nothing] f = \list -> when list is @@ -5178,100 +5178,100 @@ mod test_fmt { Just first f - "# + " )); } #[test] fn function_application_package_type() { expr_formats_same(indoc!( - r#" + r" main : Task.Task {} [] main = 42 main - "# + " )); } #[test] fn record_type() { expr_formats_same(indoc!( - r#" + r" f : { foo : Int * } f = { foo: 1000 } a - "# + " )); } #[test] fn record_pattern_with_apply_guard() { expr_formats_same(indoc!( - r#" + r" when { x: 1 } is { x: Just 4 } -> 4 - "# + " )); } #[test] fn record_pattern_with_record_guard() { expr_formats_same(indoc!( - r#" + r" when { x: 1 } is { x: { x: True } } -> 4 - "# + " )); } #[test] fn body_starts_with_spaces_multiline() { expr_formats_same(indoc!( - r#" + r" y = Foo 1 2 y - "# + " )); } #[test] fn backpassing_simple() { expr_formats_same(indoc!( - r#" + r" getChar = \ctx -> x <- Task.await (getCharScope scope) 42 42 - "# + " )); } #[test] fn backpassing_apply_tag() { expr_formats_same(indoc!( - r#" + r" getChar = \ctx -> (T val newScope) <- Task.await (getCharScope scope) 42 42 - "# + " )); } #[test] fn backpassing_parens_body() { expr_formats_same(indoc!( - r#" + r" Task.fromResult ( b <- binaryOp ctx @@ -5280,12 +5280,12 @@ mod test_fmt { else 0 ) - "# + " )); expr_formats_to( indoc!( - r#" + r" Task.fromResult (b <- binaryOp ctx if a == b then @@ -5293,10 +5293,10 @@ mod test_fmt { else 0 ) - "# + " ), indoc!( - r#" + r" Task.fromResult ( b <- binaryOp ctx @@ -5305,23 +5305,23 @@ mod test_fmt { else 0 ) - "# + " ), ); expr_formats_to( indoc!( - r#" + r" Task.fromResult (b <- binaryOp ctx if a == b then -1 else 0) - "# + " ), indoc!( - r#" + r" Task.fromResult ( b <- binaryOp ctx @@ -5330,7 +5330,7 @@ mod test_fmt { else 0 ) - "# + " ), ); } @@ -5338,31 +5338,31 @@ mod test_fmt { #[test] fn backpassing_body_on_newline() { expr_formats_same(indoc!( - r#" + r" getChar = \ctx -> x <- Task.await (getCharScope scope) 42 42 - "# + " )); } #[test] fn multiline_higher_order_function() { expr_formats_same(indoc!( - r#" + r" foo : (Str -> Bool) -> Bool 42 - "# + " )); expr_formats_same(indoc!( - r#" + r" foo : (Str -> Bool), Str @@ -5371,117 +5371,117 @@ mod test_fmt { 42 42 - "# + " )); expr_formats_same(indoc!( - r#" + r" foo : (Str -> Bool) -> Bool 42 - "# + " )); expr_formats_same(indoc!( - r#" + r" foo : (Str -> Bool), Str -> Bool foo = \bar, baz -> 42 42 - "# + " )); expr_formats_same(indoc!( - r#" + r" foo : (Str -> Bool), Str -> Bool # comment foo = \bar, baz -> 42 42 - "# + " )); } #[test] fn multiline_opaque_tag_union() { expr_formats_same(indoc!( - r#" + r" A := [ B, C, ] 0 - "# + " )); } #[test] fn opaque_implements_clause() { expr_formats_same(indoc!( - r#" + r" A := U8 implements [Eq, Hash] 0 - "# + " )); expr_formats_to( indoc!( - r#" + r" A := U8 implements [Eq, Hash] 0 - "# + " ), indoc!( - r#" + r" A := U8 implements [Eq, Hash] 0 - "# + " ), ); expr_formats_to( indoc!( - r#" + r" A := a where a implements Hash implements [ Eq, Hash ] 0 - "# + " ), indoc!( - r#" + r" A := a where a implements Hash implements [Eq, Hash] 0 - "# + " ), ); expr_formats_to( indoc!( - r#" + r" A := U8 implements [] 0 - "# + " ), indoc!( - r#" + r" A := U8 implements [] 0 - "# + " ), ); } @@ -5490,7 +5490,7 @@ mod test_fmt { fn comma_prefixed_indented_record() { expr_formats_to( indoc!( - r#" + r" Model position : { evaluated : Set position , openSet : Set position @@ -5500,10 +5500,10 @@ mod test_fmt { a - "#, + ", ), indoc!( - r#" + r" Model position : { evaluated : Set position, openSet : Set position, @@ -5512,7 +5512,7 @@ mod test_fmt { } a - "#, + ", ), ); } @@ -5520,24 +5520,24 @@ mod test_fmt { #[test] fn opaque_implements_with_impls() { expr_formats_same(indoc!( - r#" + r" A := U8 implements [Eq { eq }, Hash { hash }] 0 - "# + " )); expr_formats_same(indoc!( - r#" + r" A := U8 implements [Eq { eq, eq1 }] 0 - "# + " )); expr_formats_to( indoc!( - r#" + r" A := U8 implements [Eq { eq, eq1 }] A := U8 implements [Eq { eq, @@ -5545,10 +5545,10 @@ mod test_fmt { }] 0 - "# + " ), indoc!( - r#" + r" A := U8 implements [Eq { eq, eq1 }] A := U8 implements [ Eq { @@ -5558,25 +5558,25 @@ mod test_fmt { ] 0 - "# + " ), ); expr_formats_same(indoc!( - r#" + r" A := a where a implements Other implements [Eq { eq }, Hash { hash }] 0 - "# + " )); expr_formats_same(indoc!( - r#" + r" A := U8 implements [Eq {}] 0 - "# + " )); } @@ -5584,7 +5584,7 @@ mod test_fmt { fn comments_in_multiline_tag_union_annotation() { expr_formats_to( indoc!( - r#" + r" UnionAnn : [ Foo, # comment 1 Bar, # comment 2 @@ -5594,10 +5594,10 @@ mod test_fmt { ] 0 - "# + " ), indoc!( - r#" + r" UnionAnn : [ Foo, # comment 1 Bar, # comment 2 @@ -5607,7 +5607,7 @@ mod test_fmt { ] 0 - "# + " ), ); } @@ -5615,7 +5615,7 @@ mod test_fmt { #[test] fn test_where_after() { expr_formats_same(indoc!( - r#" + r" Dict k v := { metadata : List I8, dataIndices : List Nat, @@ -5624,7 +5624,7 @@ mod test_fmt { } where k implements Hash & Eq a - "# + " )); } @@ -5687,7 +5687,7 @@ mod test_fmt { #[test] fn expect_single_line() { expr_formats_same(indoc!( - r#" + r" x = 5 expect x == y @@ -5695,11 +5695,11 @@ mod test_fmt { expect y == z 42 - "# + " )); module_formats_same(indoc!( - r#" + r" interface Foo exposes [] imports [] expect x == y @@ -5707,14 +5707,14 @@ mod test_fmt { expect y == z foo = bar - "# + " )); } #[test] fn expect_multiline() { expr_formats_same(indoc!( - r#" + r" x = 5 expect @@ -5722,11 +5722,11 @@ mod test_fmt { |> baz 42 - "# + " )); module_formats_same(indoc!( - r#" + r" interface Foo exposes [] imports [] expect @@ -5738,7 +5738,7 @@ mod test_fmt { etc foo = bar - "# + " )); } @@ -5788,49 +5788,49 @@ mod test_fmt { #[test] fn format_chars() { expr_formats_same(indoc!( - r#" + r" ' ' - "# + " )); expr_formats_same(indoc!( - r#" + r" '\n' - "# + " )); } #[test] fn format_char_pattern() { expr_formats_same(indoc!( - r#" + r" when x is ' ' -> x '\n' -> x '\t' -> x - "# + " )); } #[test] fn format_nested_pipeline() { expr_formats_same(indoc!( - r#" + r" (a |> b) |> c - "# + " )); expr_formats_same(indoc!( - r#" + r" a |> b |> c - "# + " )); } #[test] fn ability_member_doc_comments() { module_formats_same(indoc!( - r#" + r" interface Foo exposes [] imports [] A implements @@ -5841,19 +5841,19 @@ mod test_fmt { de : a -> a where a implements A f = g - "# + " )); } #[test] fn leading_comments_preserved() { module_formats_same(indoc!( - r#" + r" # hello world interface Foo exposes [] imports [] - "# + " )); module_formats_same(indoc!( @@ -5879,32 +5879,32 @@ mod test_fmt { #[test] fn clauses_with_multiple_abilities() { expr_formats_same(indoc!( - r#" + r" f : {} -> a where a implements Eq & Hash & Decode f - "# + " )); expr_formats_to( indoc!( - r#" + r" f : {} -> a where a implements Eq & Hash & Decode, b implements Eq & Hash f - "# + " ), indoc!( // TODO: ideally, this would look a bit nicer - consider // f : {} -> a // where a implements Eq & Hash & Decode, // b implements Eq & Hash - r#" + r" f : {} -> a where a implements Eq & Hash & Decode, b implements Eq & Hash f - "# + " ), ); } @@ -5912,58 +5912,58 @@ mod test_fmt { #[test] fn format_list_patterns() { expr_formats_same(indoc!( - r#" + r" when [] is [] -> [] - "# + " )); expr_formats_to( indoc!( - r#" + r" when [] is [ ] -> [] - "# + " ), indoc!( - r#" + r" when [] is [] -> [] - "# + " ), ); expr_formats_to( indoc!( - r#" + r" when [] is [ x, .. , A 5 6, .. ] -> [] - "# + " ), indoc!( - r#" + r" when [] is [x, .., A 5 6, ..] -> [] - "# + " ), ); expr_formats_to( indoc!( - r#" + r" when [] is [ x, 4, 5 ] -> [] [ .., 5 ] -> [] [ x, .. ] -> [] - "# + " ), indoc!( - r#" + r" when [] is [x, 4, 5] -> [] [.., 5] -> [] [x, ..] -> [] - "# + " ), ); } @@ -6007,7 +6007,7 @@ mod test_fmt { fn issue_6197() { expr_formats_to( indoc!( - r#" + r" when l1 is [ .. @@ -6018,14 +6018,14 @@ mod test_fmt { l2 -> f rest - "# + " ), indoc!( - r#" + r" when l1 is [.. as rest] as l2 -> f rest - "# + " ), ); } @@ -6034,7 +6034,7 @@ mod test_fmt { // #[test] // fn multiline_apply() { // expr_formats_same(indoc!( - // r#" + // r" // f : // Result a // { x : Int * @@ -6044,7 +6044,7 @@ mod test_fmt { // -> Int * // f = // \_ -> 4 - // "# + // " // )); // } } diff --git a/crates/compiler/test_syntax/tests/test_snapshots.rs b/crates/compiler/test_syntax/tests/test_snapshots.rs index 81f398d1d4f..e5309701399 100644 --- a/crates/compiler/test_syntax/tests/test_snapshots.rs +++ b/crates/compiler/test_syntax/tests/test_snapshots.rs @@ -731,7 +731,7 @@ mod test_snapshots { #[test] fn string_with_interpolation_in_middle() { - assert_segments(r#""Hi, \(name)!""#, |arena| { + assert_segments(r#""Hi, $(name)!""#, |arena| { let expr = arena.alloc(Var { module_name: "", ident: "name", @@ -747,7 +747,7 @@ mod test_snapshots { #[test] fn string_with_interpolation_in_front() { - assert_segments(r#""\(name), hi!""#, |arena| { + assert_segments(r#""$(name), hi!""#, |arena| { let expr = arena.alloc(Var { module_name: "", ident: "name", @@ -762,7 +762,7 @@ mod test_snapshots { #[test] fn string_with_interpolation_in_back() { - assert_segments(r#""Hello \(name)""#, |arena| { + assert_segments(r#""Hello $(name)""#, |arena| { let expr = arena.alloc(Var { module_name: "", ident: "name", @@ -777,7 +777,7 @@ mod test_snapshots { #[test] fn string_with_multiple_interpolations() { - assert_segments(r#""Hi, \(name)! How is \(project) going?""#, |arena| { + assert_segments(r#""Hi, $(name)! How is $(project) going?""#, |arena| { let expr1 = arena.alloc(Var { module_name: "", ident: "name", diff --git a/crates/compiler/uitest/tests/ability/specialize/inspect/opaque_automatic.txt b/crates/compiler/uitest/tests/ability/specialize/inspect/opaque_automatic.txt index a415bbc58c3..8aa1d448f41 100644 --- a/crates/compiler/uitest/tests/ability/specialize/inspect/opaque_automatic.txt +++ b/crates/compiler/uitest/tests/ability/specialize/inspect/opaque_automatic.txt @@ -46,8 +46,8 @@ procedure Inspect.62 (Inspect.306): ret Inspect.306; procedure Str.3 (#Attr.2, #Attr.3): - let Str.292 : Str = lowlevel StrConcat #Attr.2 #Attr.3; - ret Str.292; + let Str.251 : Str = lowlevel StrConcat #Attr.2 #Attr.3; + ret Str.251; procedure Test.0 (): let Test.4 : {} = Struct {}; diff --git a/crates/compiler/uitest/tests/ability/specialize/inspect/opaque_automatic_late.txt b/crates/compiler/uitest/tests/ability/specialize/inspect/opaque_automatic_late.txt index 004c4ceb670..9d720641bc6 100644 --- a/crates/compiler/uitest/tests/ability/specialize/inspect/opaque_automatic_late.txt +++ b/crates/compiler/uitest/tests/ability/specialize/inspect/opaque_automatic_late.txt @@ -49,8 +49,8 @@ procedure Inspect.62 (Inspect.306): ret Inspect.306; procedure Str.3 (#Attr.2, #Attr.3): - let Str.292 : Str = lowlevel StrConcat #Attr.2 #Attr.3; - ret Str.292; + let Str.251 : Str = lowlevel StrConcat #Attr.2 #Attr.3; + ret Str.251; procedure Test.2 (Test.3): let Test.4 : Str = CallByName Inspect.34 Test.3; diff --git a/crates/docs/.gitignore b/crates/docs/.gitignore deleted file mode 100644 index 42afabfd2ab..00000000000 --- a/crates/docs/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/build \ No newline at end of file diff --git a/crates/docs/src/lib.rs b/crates/docs/src/lib.rs index 5fc3d5753a5..820e4c87426 100644 --- a/crates/docs/src/lib.rs +++ b/crates/docs/src/lib.rs @@ -1015,7 +1015,8 @@ fn markdown_to_html( } }; - let markdown_options = pulldown_cmark::Options::ENABLE_TABLES; + let markdown_options = + pulldown_cmark::Options::ENABLE_TABLES | pulldown_cmark::Options::ENABLE_HEADING_ATTRIBUTES; let mut in_code_block: Option = None; let mut to_highlight = String::new(); diff --git a/crates/docs/src/static/styles.css b/crates/docs/src/static/styles.css index 46fef3872ed..4f61345c06e 100644 --- a/crates/docs/src/static/styles.css +++ b/crates/docs/src/static/styles.css @@ -177,6 +177,9 @@ main { max-width: 740px; /* necessary for text-overflow: ellipsis to work in descendants */ min-width: 0; + /* fixes issues with horizonatal scroll in cases where word is too long, + like in one of the examples at https://www.roc-lang.org/builtins/Num#Dec */ + overflow-wrap: break-word; } /* Module links on the package index page (/index.html) */ diff --git a/crates/glue/.gitignore b/crates/glue/.gitignore deleted file mode 100644 index 4bdc65207fd..00000000000 --- a/crates/glue/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.so -*.dylib -*.dll diff --git a/crates/glue/platform/Types.roc b/crates/glue/platform/Types.roc index eca34dc9fcd..3448fa5813f 100644 --- a/crates/glue/platform/Types.roc +++ b/crates/glue/platform/Types.roc @@ -45,7 +45,7 @@ shape = \@Types types, id -> Err OutOfBounds -> idStr = Num.toStr (InternalTypeId.toNat id) - crash "TypeId #\(idStr) was not found in Types. This should never happen, and means there was a bug in `roc glue`. If you have time, please open an issue at " + crash "TypeId #$(idStr) was not found in Types. This should never happen, and means there was a bug in `roc glue`. If you have time, please open an issue at " alignment : Types, TypeId -> U32 alignment = \@Types types, id -> @@ -54,7 +54,7 @@ alignment = \@Types types, id -> Err OutOfBounds -> idStr = Num.toStr (InternalTypeId.toNat id) - crash "TypeId #\(idStr) was not found in Types. This should never happen, and means there was a bug in `roc glue`. If you have time, please open an issue at " + crash "TypeId #$(idStr) was not found in Types. This should never happen, and means there was a bug in `roc glue`. If you have time, please open an issue at " size : Types, TypeId -> U32 size = \@Types types, id -> @@ -63,4 +63,4 @@ size = \@Types types, id -> Err OutOfBounds -> idStr = Num.toStr (InternalTypeId.toNat id) - crash "TypeId #\(idStr) was not found in Types. This should never happen, and means there was a bug in `roc glue`. If you have time, please open an issue at " + crash "TypeId #$(idStr) was not found in Types. This should never happen, and means there was a bug in `roc glue`. If you have time, please open an issue at " diff --git a/crates/glue/src/RustGlue.roc b/crates/glue/src/RustGlue.roc index 284315f918e..15c3a3cbc3d 100644 --- a/crates/glue/src/RustGlue.roc +++ b/crates/glue/src/RustGlue.roc @@ -27,10 +27,10 @@ makeGlue = \typesByArch -> Str.concat content """ - #[cfg(target_arch = "\(archStr)")] - mod \(archStr); - #[cfg(target_arch = "\(archStr)")] - pub use \(archStr)::*; + #[cfg(target_arch = "$(archStr)")] + mod $(archStr); + #[cfg(target_arch = "$(archStr)")] + pub use $(archStr)::*; """ @@ -123,7 +123,7 @@ convertTypesToFile = \types -> archStr = archName arch { - name: "roc_app/src/\(archStr).rs", + name: "roc_app/src/$(archStr).rs", content: content |> generateEntryPoints types, } @@ -141,15 +141,15 @@ generateEntryPoint = \buf, types, name, id -> type = typeName types argId indexStr = Num.toStr index - "arg\(indexStr): \(type)" + "arg$(indexStr): $(type)" ret = typeName types rocFn.ret - "(\(arguments)) -> \(ret)" + "($(arguments)) -> $(ret)" _ -> ret = typeName types id - "() -> \(ret)" + "() -> $(ret)" (externSignature, returnTypeName, returnsFn) = when Types.shape types id is @@ -159,20 +159,20 @@ generateEntryPoint = \buf, types, name, id -> type = typeName types argId if canDeriveCopy types shape then - "_: \(type)" + "_: $(type)" else - "_: &mut core::mem::ManuallyDrop<\(type)>" + "_: &mut core::mem::ManuallyDrop<$(type)>" ret = typeName types rocFn.ret when Types.shape types rocFn.ret is Function _ -> - ("(_: *mut u8, \(arguments))", ret, Bool.true) - _ -> - ("(_: *mut \(ret), \(arguments))", ret, Bool.false) + ("(_: *mut u8, $(arguments))", ret, Bool.true) + _ -> + ("(_: *mut $(ret), $(arguments))", ret, Bool.false) _ -> ret = typeName types id - ("(_: *mut \(ret))", ret, Bool.false) + ("(_: *mut $(ret))", ret, Bool.false) externArguments = when Types.shape types id is @@ -181,32 +181,32 @@ generateEntryPoint = \buf, types, name, id -> indexStr = Num.toStr index if canDeriveCopy types shape then - "arg\(indexStr)" + "arg$(indexStr)" else - "&mut core::mem::ManuallyDrop::new(arg\(indexStr))" + "&mut core::mem::ManuallyDrop::new(arg$(indexStr))" _ -> "" if returnsFn then """ - \(buf) + $(buf) - pub fn \(name)\(publicSignature) { + pub fn $(name)$(publicSignature) { extern "C" { - fn roc__\(name)_1_exposed_generic\(externSignature); - fn roc__\(name)_1_exposed_size() -> i64; + fn roc__$(name)_1_exposed_generic$(externSignature); + fn roc__$(name)_1_exposed_size() -> i64; } unsafe { - let capacity = roc__\(name)_1_exposed_size() as usize; + let capacity = roc__$(name)_1_exposed_size() as usize; - let mut ret = \(returnTypeName) { + let mut ret = $(returnTypeName) { closure_data: Vec::with_capacity(capacity), }; ret.closure_data.resize(capacity, 0); - roc__\(name)_1_exposed_generic(ret.closure_data.as_mut_ptr(), \(externArguments)); + roc__$(name)_1_exposed_generic(ret.closure_data.as_mut_ptr(), $(externArguments)); ret } @@ -214,17 +214,17 @@ generateEntryPoint = \buf, types, name, id -> """ else """ - \(buf) + $(buf) - pub fn \(name)\(publicSignature) { + pub fn $(name)$(publicSignature) { extern "C" { - fn roc__\(name)_1_exposed_generic\(externSignature); + fn roc__$(name)_1_exposed_generic$(externSignature); } let mut ret = core::mem::MaybeUninit::uninit(); unsafe { - roc__\(name)_1_exposed_generic(ret.as_mut_ptr(), \(externArguments)); + roc__$(name)_1_exposed_generic(ret.as_mut_ptr(), $(externArguments)); ret.assume_init() } @@ -241,7 +241,7 @@ generateFunction = \buf, types, rocFn -> type = typeName types argId indexStr = Num.toStr index - "arg\(indexStr): \(type)" + "arg$(indexStr): $(type)" externDefArguments = withoutUnit = @@ -249,7 +249,7 @@ generateFunction = \buf, types, rocFn -> type = typeName types argId indexStr = Num.toStr index - "arg\(indexStr): *const \(type)" + "arg$(indexStr): *const $(type)" if Str.isEmpty withoutUnit then # These always have a first argument that's a pointer, even if it's to nothing. @@ -262,7 +262,7 @@ generateFunction = \buf, types, rocFn -> toArgStr rocFn.args types \_argId, _shape, index -> indexStr = Num.toStr index - "&arg\(indexStr)" + "&arg$(indexStr)" if Str.isEmpty withoutUnit then # These always have a first argument that's a pointer, even if it's to nothing. @@ -275,24 +275,24 @@ generateFunction = \buf, types, rocFn -> ret = typeName types rocFn.ret """ - \(buf) + $(buf) #[repr(C)] #[derive(Debug)] - pub struct \(name) { + pub struct $(name) { closure_data: Vec, } - impl \(name) { - pub fn force_thunk(mut self\(publicComma)\(publicArguments)) -> \(ret) { + impl $(name) { + pub fn force_thunk(mut self$(publicComma)$(publicArguments)) -> $(ret) { extern "C" { - fn \(externName)(\(externDefArguments), closure_data: *mut u8, output: *mut \(ret)); + fn $(externName)($(externDefArguments), closure_data: *mut u8, output: *mut $(ret)); } let mut output = core::mem::MaybeUninit::uninit(); unsafe { - \(externName)(\(externCallArguments), self.closure_data.as_mut_ptr(), output.as_mut_ptr()); + $(externName)($(externCallArguments), self.closure_data.as_mut_ptr(), output.as_mut_ptr()); output.assume_init() } @@ -322,7 +322,7 @@ generateStruct = \buf, types, id, name, structFields, visibility -> buf |> generateDeriveStr types structType IncludeDebug - |> Str.concat "#[repr(\(repr))]\n\(pub)struct \(escapedName) {\n" + |> Str.concat "#[repr($(repr))]\n$(pub)struct $(escapedName) {\n" |> generateStructFields types Public structFields |> Str.concat "}\n\n" @@ -344,18 +344,18 @@ generateStructFieldWithoutClosure = \types, visibility -> Public -> "pub" Private -> "" - Str.concat accum "\(indent)\(pub) \(escapedFieldName): \(typeStr),\n" + Str.concat accum "$(indent)$(pub) $(escapedFieldName): $(typeStr),\n" nameTagUnionPayloadFields = \payloadFields -> # Tag union payloads have numbered fields, so we prefix them # with an "f" because Rust doesn't allow struct fields to be numbers. when payloadFields is HasNoClosure fields -> - renamedFields = List.map fields \{ name, id } -> { name: "f\(name)", id } + renamedFields = List.map fields \{ name, id } -> { name: "f$(name)", id } HasNoClosure renamedFields HasClosure fields -> - renamedFields = List.map fields \{ name, id, accessors } -> { name: "f\(name)", id, accessors } + renamedFields = List.map fields \{ name, id, accessors } -> { name: "f$(name)", id, accessors } HasClosure renamedFields generateEnumeration = \buf, types, enumType, name, tags, tagBytes -> @@ -365,7 +365,7 @@ generateEnumeration = \buf, types, enumType, name, tags, tagBytes -> buf |> generateDeriveStr types enumType ExcludeDebug - |> Str.concat "#[repr(u\(reprBits))]\npub enum \(escapedName) {\n" + |> Str.concat "#[repr(u$(reprBits))]\npub enum $(escapedName) {\n" |> \b -> List.walkWithIndex tags b generateEnumTags |> # Enums require a custom debug impl to ensure naming is identical on all platforms. @@ -373,43 +373,43 @@ generateEnumeration = \buf, types, enumType, name, tags, tagBytes -> """ } - impl core::fmt::Debug for \(escapedName) { + impl core::fmt::Debug for $(escapedName) { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { match self { """ |> \b -> List.walk tags b (generateEnumTagsDebug name) - |> Str.concat "\(indent)\(indent)}\n\(indent)}\n}\n\n" + |> Str.concat "$(indent)$(indent)}\n$(indent)}\n}\n\n" generateEnumTags = \accum, name, index -> indexStr = Num.toStr index - Str.concat accum "\(indent)\(name) = \(indexStr),\n" + Str.concat accum "$(indent)$(name) = $(indexStr),\n" generateEnumTagsDebug = \name -> \accum, tagName -> - Str.concat accum "\(indent)\(indent)\(indent)Self::\(tagName) => f.write_str(\"\(name)::\(tagName)\"),\n" + Str.concat accum "$(indent)$(indent)$(indent)Self::$(tagName) => f.write_str(\"$(name)::$(tagName)\"),\n" deriveCloneTagUnion : Str, Str, List { name : Str, payload : [Some TypeId, None] } -> Str deriveCloneTagUnion = \buf, tagUnionType, tags -> clones = List.walk tags "" \accum, { name: tagName } -> """ - \(accum) - \(tagName) => union_\(tagUnionType) { - \(tagName): self.payload.\(tagName).clone(), + $(accum) + $(tagName) => union_$(tagUnionType) { + $(tagName): self.payload.$(tagName).clone(), }, """ """ - \(buf) + $(buf) - impl Clone for \(tagUnionType) { + impl Clone for $(tagUnionType) { fn clone(&self) -> Self { - use discriminant_\(tagUnionType)::*; + use discriminant_$(tagUnionType)::*; let payload = unsafe { - match self.discriminant {\(clones) + match self.discriminant {$(clones) } }; @@ -431,22 +431,22 @@ deriveDebugTagUnion = \buf, types, tagUnionType, tags -> None -> "()" """ - \(accum) - \(tagName) => { - let field: &\(type) = &self.payload.\(tagName); - f.debug_tuple("\(tagUnionType)::\(tagName)").field(field).finish() + $(accum) + $(tagName) => { + let field: &$(type) = &self.payload.$(tagName); + f.debug_tuple("$(tagUnionType)::$(tagName)").field(field).finish() }, """ """ - \(buf) + $(buf) - impl core::fmt::Debug for \(tagUnionType) { + impl core::fmt::Debug for $(tagUnionType) { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - use discriminant_\(tagUnionType)::*; + use discriminant_$(tagUnionType)::*; unsafe { - match self.discriminant {\(checks) + match self.discriminant {$(checks) } } } @@ -457,9 +457,9 @@ deriveEqTagUnion : Str, Types, Shape, Str -> Str deriveEqTagUnion = \buf, types, shape, tagUnionType -> if canSupportEqHashOrd types shape then """ - \(buf) + $(buf) - impl Eq for \(tagUnionType) {} + impl Eq for $(tagUnionType) {} """ else buf @@ -470,23 +470,23 @@ derivePartialEqTagUnion = \buf, types, shape, tagUnionType, tags -> checks = List.walk tags "" \accum, { name: tagName } -> """ - \(accum) - \(tagName) => self.payload.\(tagName) == other.payload.\(tagName), + $(accum) + $(tagName) => self.payload.$(tagName) == other.payload.$(tagName), """ """ - \(buf) + $(buf) - impl PartialEq for \(tagUnionType) { + impl PartialEq for $(tagUnionType) { fn eq(&self, other: &Self) -> bool { - use discriminant_\(tagUnionType)::*; + use discriminant_$(tagUnionType)::*; if self.discriminant != other.discriminant { return false; } unsafe { - match self.discriminant {\(checks) + match self.discriminant {$(checks) } } } @@ -499,9 +499,9 @@ deriveOrdTagUnion : Str, Types, Shape, Str -> Str deriveOrdTagUnion = \buf, types, shape, tagUnionType -> if canSupportEqHashOrd types shape then """ - \(buf) + $(buf) - impl Ord for \(tagUnionType) { + impl Ord for $(tagUnionType) { fn cmp(&self, other: &Self) -> std::cmp::Ordering { self.partial_cmp(other).unwrap() } @@ -516,16 +516,16 @@ derivePartialOrdTagUnion = \buf, types, shape, tagUnionType, tags -> checks = List.walk tags "" \accum, { name: tagName } -> """ - \(accum) - \(tagName) => self.payload.\(tagName).partial_cmp(&other.payload.\(tagName)), + $(accum) + $(tagName) => self.payload.$(tagName).partial_cmp(&other.payload.$(tagName)), """ """ - \(buf) + $(buf) - impl PartialOrd for \(tagUnionType) { + impl PartialOrd for $(tagUnionType) { fn partial_cmp(&self, other: &Self) -> Option { - use discriminant_\(tagUnionType)::*; + use discriminant_$(tagUnionType)::*; use std::cmp::Ordering::*; @@ -533,7 +533,7 @@ derivePartialOrdTagUnion = \buf, types, shape, tagUnionType, tags -> Less => Option::Some(Less), Greater => Option::Some(Greater), Equal => unsafe { - match self.discriminant {\(checks) + match self.discriminant {$(checks) } }, } @@ -549,19 +549,19 @@ deriveHashTagUnion = \buf, types, shape, tagUnionType, tags -> checks = List.walk tags "" \accum, { name: tagName } -> """ - \(accum) - \(tagName) => self.payload.\(tagName).hash(state), + $(accum) + $(tagName) => self.payload.$(tagName).hash(state), """ """ - \(buf) + $(buf) - impl core::hash::Hash for \(tagUnionType) { + impl core::hash::Hash for $(tagUnionType) { fn hash(&self, state: &mut H) { - use discriminant_\(tagUnionType)::*; + use discriminant_$(tagUnionType)::*; unsafe { - match self.discriminant {\(checks) + match self.discriminant {$(checks) } } } @@ -573,7 +573,7 @@ deriveHashTagUnion = \buf, types, shape, tagUnionType, tags -> generateConstructorFunctions : Str, Types, Str, List { name : Str, payload : [Some TypeId, None] } -> Str generateConstructorFunctions = \buf, types, tagUnionType, tags -> buf - |> Str.concat "\n\nimpl \(tagUnionType) {" + |> Str.concat "\n\nimpl $(tagUnionType) {" |> \b -> List.walk tags b \accum, r -> generateConstructorFunction accum types tagUnionType r.name r.payload |> Str.concat "\n}\n\n" @@ -582,13 +582,13 @@ generateConstructorFunction = \buf, types, tagUnionType, name, optPayload -> when optPayload is None -> """ - \(buf) + $(buf) - pub fn \(name)() -> Self { + pub fn $(name)() -> Self { Self { - discriminant: discriminant_\(tagUnionType)::\(name), - payload: union_\(tagUnionType) { - \(name): (), + discriminant: discriminant_$(tagUnionType)::$(name), + payload: union_$(tagUnionType) { + $(name): (), } } } @@ -605,13 +605,13 @@ generateConstructorFunction = \buf, types, tagUnionType, name, optPayload -> "core::mem::ManuallyDrop::new(payload)" """ - \(buf) + $(buf) - pub fn \(name)(payload: \(payloadType)) -> Self { + pub fn $(name)(payload: $(payloadType)) -> Self { Self { - discriminant: discriminant_\(tagUnionType)::\(name), - payload: union_\(tagUnionType) { - \(name): \(new), + discriminant: discriminant_$(tagUnionType)::$(name), + payload: union_$(tagUnionType) { + $(name): $(new), } } } @@ -620,7 +620,7 @@ generateConstructorFunction = \buf, types, tagUnionType, name, optPayload -> generateDestructorFunctions : Str, Types, Str, List { name : Str, payload : [Some TypeId, None] } -> Str generateDestructorFunctions = \buf, types, tagUnionType, tags -> buf - |> Str.concat "\n\nimpl \(tagUnionType) {" + |> Str.concat "\n\nimpl $(tagUnionType) {" |> \b -> List.walk tags b \accum, r -> generateDestructorFunction accum types tagUnionType r.name r.payload |> Str.concat "\n}\n\n" @@ -629,10 +629,10 @@ generateDestructorFunction = \buf, types, tagUnionType, name, optPayload -> when optPayload is None -> """ - \(buf) + $(buf) - pub fn is_\(name)(&self) -> bool { - matches!(self.discriminant, discriminant_\(tagUnionType)::\(name)) + pub fn is_$(name)(&self) -> bool { + matches!(self.discriminant, discriminant_$(tagUnionType)::$(name)) } """ @@ -642,28 +642,28 @@ generateDestructorFunction = \buf, types, tagUnionType, name, optPayload -> take = if canDeriveCopy types shape then - "unsafe { self.payload.\(name) }" + "unsafe { self.payload.$(name) }" else - "unsafe { core::mem::ManuallyDrop::take(&mut self.payload.\(name)) }" + "unsafe { core::mem::ManuallyDrop::take(&mut self.payload.$(name)) }" """ - \(buf) + $(buf) - pub fn unwrap_\(name)(mut self) -> \(payloadType) { - debug_assert_eq!(self.discriminant, discriminant_\(tagUnionType)::\(name)); - \(take) + pub fn unwrap_$(name)(mut self) -> $(payloadType) { + debug_assert_eq!(self.discriminant, discriminant_$(tagUnionType)::$(name)); + $(take) } - pub fn is_\(name)(&self) -> bool { - matches!(self.discriminant, discriminant_\(tagUnionType)::\(name)) + pub fn is_$(name)(&self) -> bool { + matches!(self.discriminant, discriminant_$(tagUnionType)::$(name)) } """ generateNonRecursiveTagUnion : Str, Types, TypeId, Str, List { name : Str, payload : [Some TypeId, None] }, U32, U32 -> Str generateNonRecursiveTagUnion = \buf, types, id, name, tags, discriminantSize, discriminantOffset -> escapedName = escapeKW name - discriminantName = "discriminant_\(escapedName)" - unionName = "union_\(escapedName)" + discriminantName = "discriminant_$(escapedName)" + unionName = "union_$(escapedName)" discriminantOffsetStr = Num.toStr discriminantOffset tagNames = List.map tags \{ name: n } -> n selfMut = "self" @@ -700,34 +700,34 @@ generateNonRecursiveTagUnion = \buf, types, id, name, tags, discriminantSize, di buf |> generateDiscriminant types discriminantName tagNames discriminantSize - |> Str.concat "#[repr(C, align(\(align)))]\npub union \(unionName) {\n" + |> Str.concat "#[repr(C, align($(align)))]\npub union $(unionName) {\n" |> \b -> List.walk tags b (generateUnionField types) |> Str.concat """ } - const _SIZE_CHECK_\(unionName): () = assert!(core::mem::size_of::<\(unionName)>() == \(sizeOfUnionStr)); - const _ALIGN_CHECK_\(unionName): () = assert!(core::mem::align_of::<\(unionName)>() == \(alignOfUnionStr)); + const _SIZE_CHECK_$(unionName): () = assert!(core::mem::size_of::<$(unionName)>() == $(sizeOfUnionStr)); + const _ALIGN_CHECK_$(unionName): () = assert!(core::mem::align_of::<$(unionName)>() == $(alignOfUnionStr)); - const _SIZE_CHECK_\(escapedName): () = assert!(core::mem::size_of::<\(escapedName)>() == \(sizeOfSelf)); - const _ALIGN_CHECK_\(escapedName): () = assert!(core::mem::align_of::<\(escapedName)>() == \(alignOfSelf)); + const _SIZE_CHECK_$(escapedName): () = assert!(core::mem::size_of::<$(escapedName)>() == $(sizeOfSelf)); + const _ALIGN_CHECK_$(escapedName): () = assert!(core::mem::align_of::<$(escapedName)>() == $(alignOfSelf)); - impl \(escapedName) { - \(discriminantDocComment) - pub fn discriminant(&self) -> \(discriminantName) { + impl $(escapedName) { + $(discriminantDocComment) + pub fn discriminant(&self) -> $(discriminantName) { unsafe { let bytes = core::mem::transmute::<&Self, &[u8; core::mem::size_of::()]>(self); - core::mem::transmute::(*bytes.as_ptr().add(\(discriminantOffsetStr))) + core::mem::transmute::(*bytes.as_ptr().add($(discriminantOffsetStr))) } } /// Internal helper - fn set_discriminant(&mut self, discriminant: \(discriminantName)) { - let discriminant_ptr: *mut \(discriminantName) = (self as *mut \(escapedName)).cast(); + fn set_discriminant(&mut self, discriminant: $(discriminantName)) { + let discriminant_ptr: *mut $(discriminantName) = (self as *mut $(escapedName)).cast(); unsafe { - *(discriminant_ptr.add(\(discriminantOffsetStr))) = discriminant; + *(discriminant_ptr.add($(discriminantOffsetStr))) = discriminant; } } } @@ -737,9 +737,9 @@ generateNonRecursiveTagUnion = \buf, types, id, name, tags, discriminantSize, di |> Str.concat """ #[repr(C)] - pub struct \(escapedName) { - payload: union_\(escapedName), - discriminant: discriminant_\(escapedName), + pub struct $(escapedName) { + payload: union_$(escapedName), + discriminant: discriminant_$(escapedName), } """ |> deriveCloneTagUnion escapedName tags @@ -758,7 +758,7 @@ generateNonRecursiveTagUnion = \buf, types, id, name, tags, discriminantSize, di b |> Str.concat """ - impl Drop for \(escapedName) { + impl Drop for $(escapedName) { fn drop(&mut self) { // Drop the payloads @@ -776,7 +776,7 @@ generateNonRecursiveTagUnion = \buf, types, id, name, tags, discriminantSize, di generateNonNullableUnwrapped = \buf, types, name, tagName, payload, discriminantSize, _discriminantOffset, _nullTagIndex -> escapedName = escapeKW name - discriminantName = "discriminant_\(escapedName)" + discriminantName = "discriminant_$(escapedName)" payloadFields = when Types.shape types payload is @@ -791,65 +791,65 @@ generateNonNullableUnwrapped = \buf, types, name, tagName, payload, discriminant payloadFieldNames = commaSeparated "" payloadFields \_, i -> n = Num.toStr i - "f\(n)" + "f$(n)" constructorArguments = commaSeparated "" payloadFields \id, i -> n = Num.toStr i type = typeName types id - "f\(n): \(type)" + "f$(n): $(type)" debugFields = payloadFields |> List.mapWithIndex \_, i -> n = Num.toStr i - ".field(&node.f\(n))" + ".field(&node.f$(n))" |> Str.joinWith "" buf1 = buf |> generateDiscriminant types discriminantName [tagName] discriminantSize """ - \(buf1) + $(buf1) #[repr(transparent)] #[derive(Clone, PartialEq, PartialOrd, Eq, Ord, Hash)] - pub struct \(escapedName)(roc_std::RocBox<\(name)_\(tagName)>); + pub struct $(escapedName)(roc_std::RocBox<$(name)_$(tagName)>); - impl \(escapedName) { - pub fn \(tagName)(\(constructorArguments)) -> Self { - let payload = \(name)_\(tagName) { \(payloadFieldNames) }; + impl $(escapedName) { + pub fn $(tagName)($(constructorArguments)) -> Self { + let payload = $(name)_$(tagName) { $(payloadFieldNames) }; Self(roc_std::RocBox::new(payload)) } } - impl core::fmt::Debug for \(escapedName) { + impl core::fmt::Debug for $(escapedName) { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let node = &self.0; - f.debug_tuple("\(escapedName)::\(tagName)")\(debugFields).finish() + f.debug_tuple("$(escapedName)::$(tagName)")$(debugFields).finish() } } """ generateRecursiveTagUnion = \buf, types, id, tagUnionName, tags, discriminantSize, _discriminantOffset, nullTagIndex -> escapedName = escapeKW tagUnionName - discriminantName = "discriminant_\(escapedName)" + discriminantName = "discriminant_$(escapedName)" tagNames = List.map tags \{ name: n } -> n # self = "(&*self.union_pointer())" # selfMut = "(&mut *self.union_pointer())" # other = "(&*other.union_pointer())" - unionName = "union_\(escapedName)" + unionName = "union_$(escapedName)" discriminants = tagNames |> Str.joinWith ", " - |> \b -> "[ \(b) ]" + |> \b -> "[ $(b) ]" nullTagId = when nullTagIndex is Some index -> n = Num.toStr index - "discriminants[\(n)]" + "discriminants[$(n)]" None -> """ @@ -881,15 +881,15 @@ generateRecursiveTagUnion = \buf, types, id, tagUnionName, tags, discriminantSiz i: i + 1, accum: """ - \(accum) - pub fn get_\(tagName)_f\(fieldIndex)(&self) -> &\(fieldTypeName) { - debug_assert!(self.is_\(tagName)()); + $(accum) + pub fn get_$(tagName)_f$(fieldIndex)(&self) -> &$(fieldTypeName) { + debug_assert!(self.is_$(tagName)()); // extern "C" { // fn foobar(tag_id: u16, field_index: usize) -> usize; // } - // let offset = unsafe { foobar(\(fieldIndex)) }; + // let offset = unsafe { foobar($(fieldIndex)) }; let offset = 0; unsafe { &*self.unmasked_pointer().add(offset).cast() } } @@ -901,13 +901,13 @@ generateRecursiveTagUnion = \buf, types, id, tagUnionName, tags, discriminantSiz payloadFieldNames = commaSeparated "" payloadFields \_, i -> n = Num.toStr i - "f\(n)" + "f$(n)" constructorArguments = commaSeparated "" payloadFields \payloadId, i -> n = Num.toStr i type = typeName types payloadId - "f\(n): \(type)" + "f$(n): $(type)" fixManuallyDrop = when optPayload is @@ -924,37 +924,37 @@ generateRecursiveTagUnion = \buf, types, id, tagUnionName, tags, discriminantSiz if Some (Num.intCast index) == nullTagIndex then """ - pub fn is_\(tagName)(&self) -> bool { - matches!(self.discriminant(), discriminant_\(escapedName)::\(tagName)) + pub fn is_$(tagName)(&self) -> bool { + matches!(self.discriminant(), discriminant_$(escapedName)::$(tagName)) } - pub fn \(tagName)(\(constructorArguments)) -> Self { + pub fn $(tagName)($(constructorArguments)) -> Self { Self(std::ptr::null_mut()) } """ else """ - pub fn is_\(tagName)(&self) -> bool { - matches!(self.discriminant(), discriminant_\(escapedName)::\(tagName)) + pub fn is_$(tagName)(&self) -> bool { + matches!(self.discriminant(), discriminant_$(escapedName)::$(tagName)) } - pub fn \(tagName)(\(constructorArguments)) -> Self { - let tag_id = discriminant_\(escapedName)::\(tagName); + pub fn $(tagName)($(constructorArguments)) -> Self { + let tag_id = discriminant_$(escapedName)::$(tagName); - let payload = \(escapedName)_\(tagName) { \(payloadFieldNames) } ; + let payload = $(escapedName)_$(tagName) { $(payloadFieldNames) } ; - let union_payload = union_\(escapedName) { \(tagName): \(fixManuallyDrop) }; + let union_payload = union_$(escapedName) { $(tagName): $(fixManuallyDrop) }; let ptr = unsafe { roc_std::RocBox::leak(roc_std::RocBox::new(union_payload)) }; Self((ptr as usize | tag_id as usize) as *mut _) } - \(fieldGetters) + $(fieldGetters) - pub fn get_\(tagName)(mut self) -> \(escapedName)_\(tagName) { - debug_assert!(self.is_\(tagName)()); + pub fn get_$(tagName)(mut self) -> $(escapedName)_$(tagName) { + debug_assert!(self.is_$(tagName)()); - unsafe { core::mem::ManuallyDrop::take(&mut self.ptr_read_union().\(tagName)) } + unsafe { core::mem::ManuallyDrop::take(&mut self.ptr_read_union().$(tagName)) } } """ @@ -966,16 +966,16 @@ generateRecursiveTagUnion = \buf, types, id, tagUnionName, tags, discriminantSiz cloneCase = \{ name: tagName }, index -> if Some (Num.intCast index) == nullTagIndex then """ - \(tagName) => Self::\(tagName)(), + $(tagName) => Self::$(tagName)(), """ else """ - \(tagName) => { - let tag_id = discriminant_\(escapedName)::\(tagName); + $(tagName) => { + let tag_id = discriminant_$(escapedName)::$(tagName); let payload_union = unsafe { self.ptr_read_union() }; - let payload = union_\(escapedName) { - \(tagName): unsafe { payload_union.\(tagName).clone() }, + let payload = union_$(escapedName) { + $(tagName): unsafe { payload_union.$(tagName).clone() }, }; let ptr = unsafe { roc_std::RocBox::leak(roc_std::RocBox::new(payload)) }; @@ -992,16 +992,16 @@ generateRecursiveTagUnion = \buf, types, id, tagUnionName, tags, discriminantSiz partialEqCase = \{ name: tagName }, index -> if Some (Num.intCast index) == nullTagIndex then """ - \(tagName) => true, + $(tagName) => true, """ else """ - \(tagName) => { + $(tagName) => { let payload_union1 = unsafe { self.ptr_read_union() }; let payload_union2 = unsafe { other.ptr_read_union() }; unsafe { - payload_union1.\(tagName) == payload_union2.\(tagName) + payload_union1.$(tagName) == payload_union2.$(tagName) } }, """ @@ -1014,21 +1014,21 @@ generateRecursiveTagUnion = \buf, types, id, tagUnionName, tags, discriminantSiz partialEqImpl = if canSupportPartialEqOrd types (Types.shape types id) then """ - impl PartialEq for \(escapedName) { + impl PartialEq for $(escapedName) { fn eq(&self, other: &Self) -> bool { - use discriminant_\(escapedName)::*; + use discriminant_$(escapedName)::*; if self.discriminant() != other.discriminant() { return false; } match self.discriminant() { - \(partialEqCases) + $(partialEqCases) } } } - impl Eq for \(escapedName) {} + impl Eq for $(escapedName) {} """ else "" @@ -1036,7 +1036,7 @@ generateRecursiveTagUnion = \buf, types, id, tagUnionName, tags, discriminantSiz debugCase = \{ name: tagName, payload: optPayload }, index -> if Some (Num.intCast index) == nullTagIndex then """ - \(tagName) => f.debug_tuple("\(escapedName)::\(tagName)").finish(), + $(tagName) => f.debug_tuple("$(escapedName)::$(tagName)").finish(), """ else payloadFields = @@ -1058,15 +1058,15 @@ generateRecursiveTagUnion = \buf, types, id, tagUnionName, tags, discriminantSiz payloadFields |> List.mapWithIndex \_, i -> n = Num.toStr i - ".field(&payload_union.\(tagName).f\(n))" + ".field(&payload_union.$(tagName).f$(n))" |> Str.joinWith "" """ - \(tagName) => { + $(tagName) => { let payload_union = unsafe { self.ptr_read_union() }; unsafe { - f.debug_tuple("\(escapedName)::\(tagName)")\(debugFields).finish() + f.debug_tuple("$(escapedName)::$(tagName)")$(debugFields).finish() } }, """ @@ -1079,13 +1079,13 @@ generateRecursiveTagUnion = \buf, types, id, tagUnionName, tags, discriminantSiz hashCase = \{ name: tagName }, index -> if Some (Num.intCast index) == nullTagIndex then """ - \(tagName) => {} + $(tagName) => {} """ else """ - \(tagName) => { + $(tagName) => { let payload_union = unsafe { self.ptr_read_union() }; - unsafe { payload_union.\(tagName).hash(state) }; + unsafe { payload_union.$(tagName).hash(state) }; }, """ @@ -1097,14 +1097,14 @@ generateRecursiveTagUnion = \buf, types, id, tagUnionName, tags, discriminantSiz hashImpl = if canSupportPartialEqOrd types (Types.shape types id) then """ - impl core::hash::Hash for \(escapedName) { + impl core::hash::Hash for $(escapedName) { fn hash(&self, state: &mut H) { - use discriminant_\(escapedName)::*; + use discriminant_$(escapedName)::*; self.discriminant().hash(state); match self.discriminant() { - \(hashCases) + $(hashCases) } } } @@ -1115,16 +1115,16 @@ generateRecursiveTagUnion = \buf, types, id, tagUnionName, tags, discriminantSiz partialOrdCase = \{ name: tagName }, index -> if Some (Num.intCast index) == nullTagIndex then """ - \(tagName) => std::cmp::Ordering::Equal, + $(tagName) => std::cmp::Ordering::Equal, """ else """ - \(tagName) => { + $(tagName) => { let payload_union1 = unsafe { self.ptr_read_union() }; let payload_union2 = unsafe { other.ptr_read_union() }; unsafe { - payload_union1.\(tagName).cmp(&payload_union2.\(tagName)) + payload_union1.$(tagName).cmp(&payload_union2.$(tagName)) } }, """ @@ -1137,15 +1137,15 @@ generateRecursiveTagUnion = \buf, types, id, tagUnionName, tags, discriminantSiz partialOrdImpl = if canSupportPartialEqOrd types (Types.shape types id) then """ - impl PartialOrd for \(escapedName) { + impl PartialOrd for $(escapedName) { fn partial_cmp(&self, other: &Self) -> Option { Some(::cmp(self, other)) } } - impl Ord for \(escapedName) { + impl Ord for $(escapedName) { fn cmp(&self, other: &Self) -> std::cmp::Ordering { - use discriminant_\(escapedName)::*; + use discriminant_$(escapedName)::*; use std::cmp::Ordering::*; @@ -1154,7 +1154,7 @@ generateRecursiveTagUnion = \buf, types, id, tagUnionName, tags, discriminantSiz Greater => Greater, Equal => unsafe { match self.discriminant() { - \(partialOrdCases) + $(partialOrdCases) } }, } @@ -1172,21 +1172,21 @@ generateRecursiveTagUnion = \buf, types, id, tagUnionName, tags, discriminantSiz |> Str.concat """ #[repr(transparent)] - pub struct \(escapedName)(*mut \(unionName)); + pub struct $(escapedName)(*mut $(unionName)); - const _SIZE_CHECK_\(escapedName): () = assert!(core::mem::size_of::<\(escapedName)>() == \(sizeOfSelf)); - const _ALIGN_CHECK_\(escapedName): () = assert!(core::mem::align_of::<\(escapedName)>() == \(alignOfSelf)); + const _SIZE_CHECK_$(escapedName): () = assert!(core::mem::size_of::<$(escapedName)>() == $(sizeOfSelf)); + const _ALIGN_CHECK_$(escapedName): () = assert!(core::mem::align_of::<$(escapedName)>() == $(alignOfSelf)); - impl \(escapedName) { - pub fn discriminant(&self) -> discriminant_\(escapedName) { + impl $(escapedName) { + pub fn discriminant(&self) -> discriminant_$(escapedName) { let discriminants = { - use \(discriminantName)::*; + use $(discriminantName)::*; - \(discriminants) + $(discriminants) }; if self.0.is_null() { - \(nullTagId) + $(nullTagId) } else { match std::mem::size_of::() { 4 => discriminants[self.0 as usize & 0b011], @@ -1196,7 +1196,7 @@ generateRecursiveTagUnion = \buf, types, id, tagUnionName, tags, discriminantSiz } } - fn unmasked_pointer(&self) -> *mut union_\(escapedName) { + fn unmasked_pointer(&self) -> *mut union_$(escapedName) { debug_assert!(!self.0.is_null()); let mask = match std::mem::size_of::() { @@ -1205,50 +1205,50 @@ generateRecursiveTagUnion = \buf, types, id, tagUnionName, tags, discriminantSiz _ => unreachable!(), }; - ((self.0 as usize) & mask) as *mut union_\(escapedName) + ((self.0 as usize) & mask) as *mut union_$(escapedName) } - unsafe fn ptr_read_union(&self) -> core::mem::ManuallyDrop { + unsafe fn ptr_read_union(&self) -> core::mem::ManuallyDrop { let ptr = self.unmasked_pointer(); core::mem::ManuallyDrop::new(unsafe { std::ptr::read(ptr) }) } - \(constructors) + $(constructors) } - impl Clone for \(escapedName) { + impl Clone for $(escapedName) { fn clone(&self) -> Self { - use discriminant_\(escapedName)::*; + use discriminant_$(escapedName)::*; let discriminant = self.discriminant(); match discriminant { - \(cloneCases) + $(cloneCases) } } } - \(partialEqImpl) + $(partialEqImpl) - \(hashImpl) + $(hashImpl) - \(partialOrdImpl) + $(partialOrdImpl) - impl core::fmt::Debug for \(escapedName) { + impl core::fmt::Debug for $(escapedName) { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - use discriminant_\(escapedName)::*; + use discriminant_$(escapedName)::*; match self.discriminant() { - \(debugCases) + $(debugCases) } } } #[repr(C)] - union \(unionName) { + union $(unionName) { """ |> \b -> List.walk tags b (generateUnionField types) |> generateTagUnionSizer types id tags @@ -1262,7 +1262,7 @@ generateTagUnionDropPayload = \buf, types, selfMut, tags, discriminantName, disc # just drop the pointer. buf |> writeIndents indents - |> Str.concat "unsafe { core::mem::ManuallyDrop::drop(&mut core::ptr::read(self.pointer).\(name)); }" + |> Str.concat "unsafe { core::mem::ManuallyDrop::drop(&mut core::ptr::read(self.pointer).$(name)); }" Err ListWasEmpty -> crash "unreachable" @@ -1271,7 +1271,7 @@ generateTagUnionDropPayload = \buf, types, selfMut, tags, discriminantName, disc |> writeTagImpls tags discriminantName indents \name, payload -> when payload is Some id if cannotSupportCopy types (Types.shape types id) -> - "unsafe { core::mem::ManuallyDrop::drop(&mut \(selfMut).payload.\(name)) }," + "unsafe { core::mem::ManuallyDrop::drop(&mut $(selfMut).payload.$(name)) }," _ -> # If it had no payload, or if the payload had no pointers, @@ -1294,7 +1294,7 @@ writeTagImpls = \buf, tags, discriminantName, indents, f -> branchStr = f name payload accum |> writeIndents (indents + 1) - |> Str.concat "\(discriminantName)::\(name) => \(branchStr)\n" + |> Str.concat "$(discriminantName)::$(name) => $(branchStr)\n" |> writeIndents indents |> Str.concat "}\n" @@ -1313,7 +1313,7 @@ generateTagUnionSizer = \buf, types, id, tags -> size = getSizeRoundedToAlignment types id sizeStr = Num.toStr size - Str.concat buf "\(indent)_sizer: [u8; \(sizeStr)],\n" + Str.concat buf "$(indent)_sizer: [u8; $(sizeStr)],\n" else buf @@ -1348,15 +1348,15 @@ generateUnionField = \types -> # types with pointers need ManuallyDrop # because rust unions don't (and can't) # know how to drop them automatically! - "core::mem::ManuallyDrop<\(typeStr)>" + "core::mem::ManuallyDrop<$(typeStr)>" else typeStr - Str.concat accum "\(indent)\(escapedFieldName): \(fullTypeStr),\n" + Str.concat accum "$(indent)$(escapedFieldName): $(fullTypeStr),\n" None -> # use unit as the payload - Str.concat accum "\(indent)\(escapedFieldName): (),\n" + Str.concat accum "$(indent)$(escapedFieldName): (),\n" commaSeparated : Str, List a, (a, Nat -> Str) -> Str commaSeparated = \buf, items, step -> @@ -1383,19 +1383,19 @@ generateNullableUnwrapped = \buf, types, tagUnionid, name, nullTag, nonNullTag, payloadFieldNames = commaSeparated "" payloadFields \_, i -> n = Num.toStr i - "f\(n)" + "f$(n)" constructorArguments = commaSeparated "" payloadFields \id, i -> n = Num.toStr i type = typeName types id - "f\(n): \(type)" + "f$(n): $(type)" debugFields = payloadFields |> List.mapWithIndex \_, i -> n = Num.toStr i - ".field(&node.f\(n))" + ".field(&node.f$(n))" |> Str.joinWith "" discriminant = @@ -1403,18 +1403,18 @@ generateNullableUnwrapped = \buf, types, tagUnionid, name, nullTag, nonNullTag, FirstTagIsNull -> """ #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] - pub enum discriminant_\(name) { - \(nullTag) = 0, - \(nonNullTag) = 1, + pub enum discriminant_$(name) { + $(nullTag) = 0, + $(nonNullTag) = 1, } """ SecondTagIsNull -> """ #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] - pub enum discriminant_\(name) { - \(nonNullTag) = 0, - \(nullTag) = 1, + pub enum discriminant_$(name) { + $(nonNullTag) = 0, + $(nullTag) = 1, } """ @@ -1422,67 +1422,67 @@ generateNullableUnwrapped = \buf, types, tagUnionid, name, nullTag, nonNullTag, alignOfSelf = Num.toStr (Types.alignment types tagUnionid) """ - \(buf) + $(buf) #[derive(PartialOrd, Ord)] #[repr(C)] - pub struct \(name)(*mut \(name)_\(nonNullTag)); + pub struct $(name)(*mut $(name)_$(nonNullTag)); - \(discriminant) + $(discriminant) - const _SIZE_CHECK_\(name): () = assert!(core::mem::size_of::<\(name)>() == \(sizeOfSelf)); - const _ALIGN_CHECK_\(name): () = assert!(core::mem::align_of::<\(name)>() == \(alignOfSelf)); + const _SIZE_CHECK_$(name): () = assert!(core::mem::size_of::<$(name)>() == $(sizeOfSelf)); + const _ALIGN_CHECK_$(name): () = assert!(core::mem::align_of::<$(name)>() == $(alignOfSelf)); - impl \(name) { - pub fn \(nullTag)() -> Self { + impl $(name) { + pub fn $(nullTag)() -> Self { Self(core::ptr::null_mut()) } - pub fn \(nonNullTag)(\(constructorArguments)) -> Self { - let payload = \(name)_\(nonNullTag) { \(payloadFieldNames) }; + pub fn $(nonNullTag)($(constructorArguments)) -> Self { + let payload = $(name)_$(nonNullTag) { $(payloadFieldNames) }; let ptr = unsafe { roc_std::RocBox::leak(roc_std::RocBox::new(payload)) }; Self(ptr) } - pub fn discriminant(&self) -> discriminant_\(name) { - if self.is_\(nullTag)() { - discriminant_\(name)::\(nullTag) + pub fn discriminant(&self) -> discriminant_$(name) { + if self.is_$(nullTag)() { + discriminant_$(name)::$(nullTag) } else { - discriminant_\(name)::\(nonNullTag) + discriminant_$(name)::$(nonNullTag) } } - pub fn is_\(nullTag)(&self) -> bool { + pub fn is_$(nullTag)(&self) -> bool { self.0.is_null() } - pub fn is_\(nonNullTag)(&self) -> bool { + pub fn is_$(nonNullTag)(&self) -> bool { !self.0.is_null() } } - impl core::fmt::Debug for \(name) { + impl core::fmt::Debug for $(name) { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - if self.is_\(nullTag)() { - f.debug_tuple("\(name)::\(nullTag)").finish() + if self.is_$(nullTag)() { + f.debug_tuple("$(name)::$(nullTag)").finish() } else { let node = core::mem::ManuallyDrop::new(unsafe { std::ptr::read(self.0) }); - f.debug_tuple("\(name)::\(nonNullTag)")\(debugFields).finish() + f.debug_tuple("$(name)::$(nonNullTag)")$(debugFields).finish() } } } - impl Clone for \(name) { + impl Clone for $(name) { fn clone(&self) -> Self { - if self.is_\(nullTag)() { - Self::\(nullTag)() + if self.is_$(nullTag)() { + Self::$(nullTag)() } else { use std::ops::Deref; let node_ref = core::mem::ManuallyDrop::new(unsafe { std::ptr::read(self.0) }); - let payload : \(name)_\(nonNullTag) = (node_ref.deref()).clone(); + let payload : $(name)_$(nonNullTag) = (node_ref.deref()).clone(); let ptr = unsafe { roc_std::RocBox::leak(roc_std::RocBox::new(payload)) }; @@ -1491,13 +1491,13 @@ generateNullableUnwrapped = \buf, types, tagUnionid, name, nullTag, nonNullTag, } } - impl PartialEq for \(name) { + impl PartialEq for $(name) { fn eq(&self, other: &Self) -> bool { if self.discriminant() != other.discriminant() { return false; } - if self.is_\(nullTag)() { + if self.is_$(nullTag)() { return true; } @@ -1508,13 +1508,13 @@ generateNullableUnwrapped = \buf, types, tagUnionid, name, nullTag, nonNullTag, } } - impl Eq for \(name) {} + impl Eq for $(name) {} - impl core::hash::Hash for \(name) { + impl core::hash::Hash for $(name) { fn hash(&self, state: &mut H) { self.discriminant().hash(state); - if self.is_\(nonNullTag)() { + if self.is_$(nonNullTag)() { let payload = core::mem::ManuallyDrop::new(unsafe { std::ptr::read(self.0) }); payload.hash(state); } @@ -1543,7 +1543,7 @@ generateSingleTagStruct = \buf, types, name, tagName, payload -> List.mapWithIndex fields \{ id }, index -> indexStr = Num.toStr index - { name: "f\(indexStr)", id } + { name: "f$(indexStr)", id } |> HasNoClosure asStructType = Struct { @@ -1553,7 +1553,7 @@ generateSingleTagStruct = \buf, types, name, tagName, payload -> buf |> generateDeriveStr types asStructType ExcludeDebug - |> Str.concat "#[repr(\(repr))]\npub struct \(escapedName) " + |> Str.concat "#[repr($(repr))]\npub struct $(escapedName) " |> \b -> if List.isEmpty fields then generateZeroElementSingleTagStruct b escapedName tagName @@ -1570,7 +1570,7 @@ generateMultiElementSingleTagStruct = \buf, types, name, tagName, payloadFields, |> Str.concat "}\n\n" |> Str.concat """ - impl \(name) { + impl $(name) { """ |> \b -> @@ -1583,18 +1583,18 @@ generateMultiElementSingleTagStruct = \buf, types, name, tagName, payloadFields, |> List.mapWithIndex \fieldTypeName, index -> indexStr = Num.toStr index - "f\(indexStr): \(fieldTypeName)" + "f$(indexStr): $(fieldTypeName)" fields = payloadFields |> List.mapWithIndex \_, index -> indexStr = Num.toStr index - "f\(indexStr)" + "f$(indexStr)" fieldAccesses = fields |> List.map \field -> - "self.\(field)" + "self.$(field)" { b, @@ -1605,18 +1605,18 @@ generateMultiElementSingleTagStruct = \buf, types, name, tagName, payloadFields, } |> \{ b, args, fields, fieldTypes, fieldAccesses } -> argsStr = Str.joinWith args ", " - fieldsStr = Str.joinWith fields "\n\(indent)\(indent)\(indent)" + fieldsStr = Str.joinWith fields ",\n$(indent)$(indent)$(indent)" { b: Str.concat b """ - \(indent)/// A tag named ``\(tagName)``, with the given payload. - \(indent)pub fn \(tagName)(\(argsStr)) -> Self { - \(indent) Self { - \(indent) \(fieldsStr) - \(indent) } - \(indent)} + $(indent)/// A tag named ``$(tagName)``, with the given payload. + $(indent)pub fn $(tagName)($(argsStr)) -> Self { + $(indent) Self { + $(indent) $(fieldsStr) + $(indent) } + $(indent)} """, @@ -1631,11 +1631,11 @@ generateMultiElementSingleTagStruct = \buf, types, name, tagName, payloadFields, b: Str.concat b """ - \(indent)/// Since `\(name)` only has one tag (namely, `\(tagName)`), - \(indent)/// convert it to `\(tagName)`'s payload. - \(indent)pub fn into_\(tagName)(self) -> \(retType) { - \(indent) \(retExpr) - \(indent)} + $(indent)/// Since `$(name)` only has one tag (namely, `$(tagName)`), + $(indent)/// convert it to `$(tagName)`'s payload. + $(indent)pub fn into_$(tagName)(self) -> $(retType) { + $(indent) $(retExpr) + $(indent)} """, @@ -1645,21 +1645,21 @@ generateMultiElementSingleTagStruct = \buf, types, name, tagName, payloadFields, |> \{ b, fieldTypes, fieldAccesses } -> retType = fieldTypes - |> List.map \ft -> "&\(ft)" + |> List.map \ft -> "&$(ft)" |> asRustTuple retExpr = fieldAccesses - |> List.map \fa -> "&\(fa)" + |> List.map \fa -> "&$(fa)" |> asRustTuple Str.concat b """ - \(indent)/// Since `\(name)` only has one tag (namely, `\(tagName)`), - \(indent)/// convert it to `\(tagName)`'s payload. - \(indent)pub fn as_\(tagName)(&self) -> \(retType) { - \(indent) \(retExpr) - \(indent)} + $(indent)/// Since `$(name)` only has one tag (namely, `$(tagName)`), + $(indent)/// convert it to `$(tagName)`'s payload. + $(indent)pub fn as_$(tagName)(&self) -> $(retType) { + $(indent) $(retExpr) + $(indent)} """ |> Str.concat @@ -1667,9 +1667,9 @@ generateMultiElementSingleTagStruct = \buf, types, name, tagName, payloadFields, } - impl core::fmt::Debug for \(name) { + impl core::fmt::Debug for $(name) { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - f.debug_tuple("\(name)::\(tagName)") + f.debug_tuple("$(name)::$(tagName)") """ |> \b -> @@ -1677,7 +1677,7 @@ generateMultiElementSingleTagStruct = \buf, types, name, tagName, payloadFields, |> List.mapWithIndex \_, index -> indexStr = Num.toStr index - "\(indent)\(indent)\(indent)\(indent).field(&self.f\(indexStr))\n" + "$(indent)$(indent)$(indent)$(indent).field(&self.f$(indexStr))\n" |> List.walk b Str.concat |> Str.concat """ @@ -1696,7 +1696,7 @@ asRustTuple = \list -> if List.len list == 1 then joined else - "(\(joined))" + "($(joined))" generateZeroElementSingleTagStruct = \buf, name, tagName -> # A single tag with no payload is a zero-sized unit type, so @@ -1705,26 +1705,26 @@ generateZeroElementSingleTagStruct = \buf, name, tagName -> |> Str.concat "();\n\n" |> Str.concat """ - impl \(name) { - /// A tag named \(tagName), which has no payload. - pub const \(tagName): Self = Self(); + impl $(name) { + /// A tag named $(tagName), which has no payload. + pub const $(tagName): Self = Self(); - /// Other `into_` methods return a payload, but since \(tagName) tag + /// Other `into_` methods return a payload, but since $(tagName) tag /// has no payload, this does nothing and is only here for completeness. - pub fn into_\(tagName)(self) { + pub fn into_$(tagName)(self) { () } - /// Other `as_` methods return a payload, but since \(tagName) tag + /// Other `as_` methods return a payload, but since $(tagName) tag /// has no payload, this does nothing and is only here for completeness. - pub fn as_\(tagName)(&self) { + pub fn as_$(tagName)(&self) { () } } - impl core::fmt::Debug for \(name) { + impl core::fmt::Debug for $(name) { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - f.write_str("\(name)::\(tagName)") + f.write_str("$(name)::$(tagName)") } } @@ -1971,28 +1971,28 @@ typeName = \types, id -> keyName = typeName types key valueName = typeName types value - "roc_std::RocDict<\(keyName), \(valueName)>" + "roc_std::RocDict<$(keyName), $(valueName)>" RocSet elem -> elemName = typeName types elem - "roc_std::RocSet<\(elemName)>" + "roc_std::RocSet<$(elemName)>" RocList elem -> elemName = typeName types elem - "roc_std::RocList<\(elemName)>" + "roc_std::RocList<$(elemName)>" RocBox elem -> elemName = typeName types elem - "roc_std::RocBox<\(elemName)>" + "roc_std::RocBox<$(elemName)>" RocResult ok err -> okName = typeName types ok errName = typeName types err - "roc_std::RocResult<\(okName), \(errName)>" + "roc_std::RocResult<$(okName), $(errName)>" RecursivePointer content -> typeName types content @@ -2127,7 +2127,7 @@ escapeKW = \input -> # https://doc.rust-lang.org/rust-by-example/compatibility/raw_identifiers.html # another design would be to add an underscore after it; this is an experiment! if Set.contains reservedKeywords input then - "r#\(input)" + "r#$(input)" else input diff --git a/crates/glue/src/ZigGlue.roc b/crates/glue/src/ZigGlue.roc index 00fee23ce2a..c5a60fc56ed 100644 --- a/crates/glue/src/ZigGlue.roc +++ b/crates/glue/src/ZigGlue.roc @@ -4,6 +4,8 @@ app "zig-glue" pf.Types.{ Types }, pf.File.{ File }, "../../compiler/builtins/bitcode/src/list.zig" as rocStdList : Str, + "../../compiler/builtins/bitcode/src/str.zig" as rocStdStr : Str, + "../../compiler/builtins/bitcode/src/utils.zig" as rocStdUtils : Str, ] provides [makeGlue] to pf @@ -18,10 +20,16 @@ makeGlue = \typesByArch -> staticFiles : List File staticFiles = [ { name: "list.zig", content: rocStdList }, + { name: "str.zig", content: rocStdStr }, + { name: "utils.zig", content: rocStdUtils }, ] convertTypesToFile : Types -> File -convertTypesToFile = \_ -> { - name: "glue.zig", - content: "// Nothing to see yet", -} +convertTypesToFile = \_ -> { name: "main.zig", content } + +content = + """ + // ⚠️ GENERATED CODE ⚠️ + // + // This package is generated by the `roc glue` CLI command + """ diff --git a/crates/glue/src/glue.rs b/crates/glue/src/glue.rs index 2504e7a13f4..6dcb093e798 100644 --- a/crates/glue/src/glue.rs +++ b/crates/glue/src/glue.rs @@ -2971,20 +2971,7 @@ impl Clone for U4 { target_arch = "x86_64" ))] fn clone(&self) -> Self { - let mut answer = unsafe { - match self.discriminant() { - discriminant_U4::None => core::mem::transmute::, U4>( - core::mem::MaybeUninit::uninit(), - ), - discriminant_U4::Some => Self { - Some: self.Some.clone(), - }, - } - }; - - answer.set_discriminant(self.discriminant()); - - answer + *self } } @@ -3260,20 +3247,7 @@ impl Clone for U3 { target_arch = "x86_64" ))] fn clone(&self) -> Self { - let mut answer = unsafe { - match self.discriminant() { - discriminant_U3::None => core::mem::transmute::, U3>( - core::mem::MaybeUninit::uninit(), - ), - discriminant_U3::Some => Self { - Some: self.Some.clone(), - }, - } - }; - - answer.set_discriminant(self.discriminant()); - - answer + *self } } @@ -3549,20 +3523,7 @@ impl Clone for U1 { target_arch = "x86_64" ))] fn clone(&self) -> Self { - let mut answer = unsafe { - match self.discriminant() { - discriminant_U1::None => core::mem::transmute::, U1>( - core::mem::MaybeUninit::uninit(), - ), - discriminant_U1::Some => Self { - Some: self.Some.clone(), - }, - } - }; - - answer.set_discriminant(self.discriminant()); - - answer + *self } } diff --git a/crates/glue/src/load.rs b/crates/glue/src/load.rs index b329d1fefc7..2c13c51a5c6 100644 --- a/crates/glue/src/load.rs +++ b/crates/glue/src/load.rs @@ -57,6 +57,7 @@ pub fn generate( opt_level: OptLevel::Development, emit_debug_info: false, emit_llvm_ir: false, + fuzz: false, }; let load_config = standard_load_config( @@ -130,46 +131,19 @@ pub fn generate( } let lib = unsafe { Library::new(lib_path) }.unwrap(); - type MakeGlueReturnType = - roc_std::RocResult, roc_std::RocStr>; - type MakeGlue = unsafe extern "C" fn( - *mut RocCallResult, - &roc_std::RocList, - ); - - let make_glue: libloading::Symbol = unsafe { - lib.get("roc__makeGlueForHost_1_exposed_generic".as_bytes()) - .unwrap_or_else(|_| panic!("Unable to load glue function")) - }; let roc_types: roc_std::RocList = types.iter().map(|x| x.into()).collect(); - let mut files = - RocCallResult::new(roc_std::RocResult::err(roc_std::RocStr::empty())); - unsafe { make_glue(&mut files, &roc_types) }; - - // Roc will free data passed into it. So forget that data. - std::mem::forget(roc_types); - - let files: Result, roc_std::RocStr> = - match Result::from(files) { - Err((msg, tag)) => match tag { - CrashTag::Roc => panic!(r#"Roc failed with message: "{msg}""#), - CrashTag::User => panic!(r#"User crash with message: "{msg}""#), - }, - Ok(x) => x.into(), - }; - - let files = files.unwrap_or_else(|err| { - eprintln!("Glue generation failed: {err}"); - - process::exit(1); - }); + + // NOTE: DO NOT DROP LIB! the return value will include static roc strings that + // are only kept alive when the dynamic library is not unloaded! + let files = call_roc_make_glue(&lib, backend, roc_types); + for roc_type::File { name, content } in &files { let valid_name = PathBuf::from(name.as_str()) .components() .all(|comp| matches!(comp, Component::CurDir | Component::Normal(_))); - if !valid_name { - eprintln!("File name was invalid: {}", &name); + if !valid_name || name.is_empty() { + eprintln!("File name was invalid: {:?}", &name); process::exit(1); } @@ -242,6 +216,69 @@ pub fn generate( } } +fn call_roc_make_glue( + lib: &Library, + backend: CodeGenBackend, + roc_types: roc_std::RocList, +) -> roc_std::RocList { + let roc_call_result = match backend { + CodeGenBackend::Assembly(_) => { + type MakeGlueReturnType = RocCallResult< + roc_std::RocResult, roc_std::RocStr>, + >; + type MakeGlue = + unsafe extern "C" fn(roc_std::RocList) -> MakeGlueReturnType; + + let name_of_main = "test_main"; + + let make_glue: libloading::Symbol = unsafe { + lib.get(name_of_main.as_bytes()) + .unwrap_or_else(|_| panic!("Unable to load glue function")) + }; + + unsafe { make_glue(roc_types) } + } + CodeGenBackend::Llvm(_) => { + type MakeGlueReturnType = + roc_std::RocResult, roc_std::RocStr>; + type MakeGlue = unsafe extern "C" fn( + *mut RocCallResult, + &roc_std::RocList, + ); + + let name_of_main = "roc__makeGlueForHost_1_exposed_generic"; + + let make_glue: libloading::Symbol = unsafe { + lib.get(name_of_main.as_bytes()) + .unwrap_or_else(|_| panic!("Unable to load glue function")) + }; + let mut files = RocCallResult::new(roc_std::RocResult::err(roc_std::RocStr::empty())); + unsafe { make_glue(&mut files, &roc_types) }; + + // Roc will free data passed into it. So forget that data. + std::mem::forget(roc_types); + + files + } + + CodeGenBackend::Wasm => todo!(), + }; + + match Result::from(roc_call_result) { + Err((msg, tag)) => match tag { + CrashTag::Roc => panic!(r#"Roc failed with message: "{msg}""#), + CrashTag::User => panic!(r#"User crash with message: "{msg}""#), + }, + Ok(files_or_error) => match Result::from(files_or_error) { + Err(err) => { + eprintln!("Glue generation failed: {err}"); + process::exit(1); + } + Ok(files) => files, + }, + } +} + fn number_lambda_sets(subs: &Subs, initial: Variable) -> Vec { let mut lambda_sets = vec![]; let mut stack = vec![initial]; diff --git a/crates/glue/src/roc_type/mod.rs b/crates/glue/src/roc_type/mod.rs index e053f8b0cc1..15ed2627218 100644 --- a/crates/glue/src/roc_type/mod.rs +++ b/crates/glue/src/roc_type/mod.rs @@ -3553,20 +3553,7 @@ impl Clone for U1 { target_arch = "x86_64" ))] fn clone(&self) -> Self { - let mut answer = unsafe { - match self.discriminant() { - discriminant_U1::None => core::mem::transmute::, U1>( - core::mem::MaybeUninit::uninit(), - ), - discriminant_U1::Some => Self { - Some: self.Some.clone(), - }, - } - }; - - answer.set_discriminant(self.discriminant()); - - answer + *self } } diff --git a/crates/glue/tests/fixture-templates/rust/Cargo.toml b/crates/glue/tests/fixture-templates/rust/Cargo.toml index 56f73f42ff6..68ddebfcd86 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/crates/glue/tests/fixtures/.gitignore b/crates/glue/tests/fixtures/.gitignore deleted file mode 100644 index 5d524b27514..00000000000 --- a/crates/glue/tests/fixtures/.gitignore +++ /dev/null @@ -1,12 +0,0 @@ -Cargo.lock -Cargo.toml -build.rs -host.c -test_glue -roc_externs.rs -main.rs -app -dynhost -libapp.so -metadata -preprocessedhost diff --git a/crates/glue/tests/test_glue_cli.rs b/crates/glue/tests/test_glue_cli.rs index a41818aea15..119245878f3 100644 --- a/crates/glue/tests/test_glue_cli.rs +++ b/crates/glue/tests/test_glue_cli.rs @@ -14,7 +14,15 @@ mod glue_cli_run { use crate::helpers::fixtures_dir; use cli_utils::helpers::{has_error, run_glue, run_roc, Out}; use std::fs; - use std::path::Path; + use std::path::{Path, PathBuf}; + + #[cfg(all(target_os = "linux", target_arch = "x86_64"))] + const TEST_LEGACY_LINKER: bool = true; + + // Surgical linker currently only supports linux x86_64, + // so we're always testing the legacy linker on other targets. + #[cfg(not(all(target_os = "linux", target_arch = "x86_64")))] + const TEST_LEGACY_LINKER: bool = false; /// This macro does two things. /// @@ -40,11 +48,8 @@ mod glue_cli_run { generate_glue_for(&dir, std::iter::empty()); - let test_name_str = stringify!($test_name); - - // TODO after #5924 is fixed; remove this if - if !(cfg!(target_os = "linux") && (test_name_str == "nullable_unwrapped" || test_name_str == "nullable_wrapped")) { - let out = run_app(&dir.join("app.roc"), std::iter::empty()); + fn validate<'a, I: IntoIterator>(dir: PathBuf, args: I) { + let out = run_app(&dir.join("app.roc"), args); assert!(out.status.success()); let ignorable = "🔨 Rebuilding platform...\n"; @@ -57,6 +62,21 @@ mod glue_cli_run { out.stdout ); } + + + let test_name_str = stringify!($test_name); + + // TODO after #5924 is fixed; remove this + let skip_on_linux_surgical_linker = ["closures", "option", "nullable_wrapped", "enumeration", "nested_record"]; + + // Validate linux with the default linker. + if !(cfg!(target_os = "linux") && (skip_on_linux_surgical_linker.contains(&test_name_str))) { + validate(dir.clone(), std::iter::empty()); + } + + if TEST_LEGACY_LINKER { + validate(dir, ["--linker=legacy"]); + } } )* @@ -235,7 +255,7 @@ mod glue_cli_run { glue_out } - fn run_app<'a, I: IntoIterator>(app_file: &'a Path, args: I) -> Out { + fn run_app<'a, 'b, I: IntoIterator>(app_file: &'b Path, args: I) -> Out { // Generate test_glue for this platform let compile_out = run_roc( // converting these all to String avoids lifetime issues diff --git a/crates/highlight/src/lib.rs b/crates/highlight/src/lib.rs index 2f30e2b293f..b31694c9fc6 100644 --- a/crates/highlight/src/lib.rs +++ b/crates/highlight/src/lib.rs @@ -1,5 +1,4 @@ use roc_parse::highlight::Token; -use roc_region::all::Loc; pub fn highlight_roc_code(code: &str) -> String { let buf = highlight(code); @@ -14,11 +13,22 @@ pub fn highlight_roc_code_inline(code: &str) -> String { } pub fn highlight(code: &str) -> Vec { - let locations: Vec> = roc_parse::highlight::highlight(code); let mut buf: Vec = Vec::new(); let mut offset = 0; - for location in locations { + // Sometimes code snippets start with "»" in order to show that they're in the repl. + // Special-case that even though it's normally not a valid highlight. + const REPL_PROMPT: &str = "»"; + + let code = if let Some(stripped) = code.strip_prefix(REPL_PROMPT) { + buf = push_html_span(buf, REPL_PROMPT, "kw"); + + stripped + } else { + code + }; + + for location in roc_parse::highlight::highlight(code) { let current_text = &code[offset..location.byte_range().end]; match location.value { diff --git a/crates/lang_srv/Cargo.toml b/crates/lang_srv/Cargo.toml index f608f702765..1bd963e9a87 100644 --- a/crates/lang_srv/Cargo.toml +++ b/crates/lang_srv/Cargo.toml @@ -7,6 +7,10 @@ edition = "2021" name = "roc_language_server" path = "src/server.rs" +[dev-dependencies] +expect-test = "1.4.1" + + [dependencies] roc_can = { path = "../compiler/can" } roc_collections = { path = "../compiler/collections" } @@ -27,3 +31,6 @@ parking_lot.workspace = true tower-lsp = "0.17.0" tokio = { version = "1.20.1", features = [ "rt", "rt-multi-thread", "macros", "io-std" ] } +log.workspace = true +indoc.workspace=true +env_logger = "0.10.1" diff --git a/crates/lang_srv/README.md b/crates/lang_srv/README.md index 5a047706318..c8b8a8cbaf1 100644 --- a/crates/lang_srv/README.md +++ b/crates/lang_srv/README.md @@ -78,3 +78,21 @@ If you're using coc.nvim and want to use the configuration above, be sure to als If you want to debug the server, use [debug_server.sh](./debug_server.sh) instead of the direct binary. + +If you would like to enable debug logging set the `ROCLS_LOG` environment variable to `debug` or `trace` for even more logs. +eg: `ROCLS_LOG=debug` + +## Testing + +Tests use expect-test, which is a snapshot/expect testing framework. +If a change is made that requires updating the expect tests run `cargo test` confirm that the diff is correct, then run `UPDATE_EXPECT=1 cargo test` to update the contents of the files with the new output. + +## Config + +You can set the environment variables below to control the operation of the language. + +`ROCLS_DEBOUNCE_MS`: Sets the amount of time to delay starting analysis of the document when a change comes in. This prevents starting pointless analysis while you are typing normally. +Default: `100` + +`ROCLS_LATEST_DOC_TIMEOUT_MS`: Sets the timeout for waiting for an analysis of the latest document to be complete. If a request is sent that needs the latest version of the document to be analyzed, then it will wait up to this duration before just giving up. +Default: `5000` diff --git a/crates/lang_srv/debug_server.sh b/crates/lang_srv/debug_server.sh index 812c2d3d56f..3eb8439a974 100755 --- a/crates/lang_srv/debug_server.sh +++ b/crates/lang_srv/debug_server.sh @@ -1,4 +1,5 @@ #!/usr/bin/bash SCRIPT_DIR=$(cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd) +RUST_LOG=debug ${SCRIPT_DIR}/../../target/debug/roc_language_server "$@" 2> /tmp/roc_language_server.err diff --git a/crates/lang_srv/src/analysis.rs b/crates/lang_srv/src/analysis.rs index 6725db5940a..7a85efecd5d 100644 --- a/crates/lang_srv/src/analysis.rs +++ b/crates/lang_srv/src/analysis.rs @@ -1,116 +1,120 @@ -use std::{ - collections::HashMap, - path::{Path, PathBuf}, -}; +use std::path::{Path, PathBuf}; use bumpalo::Bump; use roc_can::{abilities::AbilitiesStore, expr::Declarations}; use roc_collections::MutMap; use roc_load::{CheckedModule, LoadedModule}; -use roc_module::symbol::{Interns, ModuleId, Symbol}; +use roc_module::symbol::{Interns, ModuleId}; use roc_packaging::cache::{self, RocCacheDir}; use roc_region::all::LineInfo; use roc_reporting::report::RocDocAllocator; use roc_solve_problem::TypeError; use roc_types::subs::Subs; -use tower_lsp::lsp_types::{ - Diagnostic, GotoDefinitionResponse, Hover, HoverContents, Location, MarkedString, Position, - Range, SemanticTokenType, SemanticTokens, SemanticTokensResult, TextEdit, Url, -}; -use crate::convert::{ - diag::{IntoLspDiagnostic, ProblemFmt}, - ToRange, ToRocPosition, -}; +use tower_lsp::lsp_types::{Diagnostic, SemanticTokenType, Url}; +mod analysed_doc; +mod completion; mod parse_ast; mod semantic_tokens; mod tokens; +mod utils; -use self::{parse_ast::Ast, semantic_tokens::arrange_semantic_tokens, tokens::Token}; -pub const HIGHLIGHT_TOKENS_LEGEND: &[SemanticTokenType] = Token::LEGEND; +use crate::convert::diag::{IntoLspDiagnostic, ProblemFmt}; -pub(crate) struct GlobalAnalysis { - pub documents: Vec, -} +pub(crate) use self::analysed_doc::{AnalyzedDocument, DocInfo}; +use self::{analysed_doc::ModuleIdToUrl, tokens::Token}; -impl GlobalAnalysis { - pub fn new(source_url: Url, source: String) -> GlobalAnalysis { - let arena = Bump::new(); +pub const HIGHLIGHT_TOKENS_LEGEND: &[SemanticTokenType] = Token::LEGEND; - let fi = source_url.to_file_path().unwrap(); - let src_dir = find_src_dir(&fi).to_path_buf(); - let line_info = LineInfo::new(&source); +#[derive(Debug, Clone)] +pub(super) struct AnalyzedModule { + module_id: ModuleId, + interns: Interns, + subs: Subs, + abilities: AbilitiesStore, + declarations: Declarations, + // We need this because ModuleIds are not stable between compilations, so a ModuleId visible to + // one module may not be true global to the language server. + module_id_to_url: ModuleIdToUrl, +} +#[derive(Debug, Clone)] +pub struct AnalysisResult { + module: Option, + diagnostics: Vec, +} - let loaded = roc_load::load_and_typecheck_str( - &arena, - fi, - &source, - src_dir, - roc_target::TargetInfo::default_x86_64(), - roc_load::FunctionKind::LambdaSet, - roc_reporting::report::RenderTarget::Generic, - RocCacheDir::Persistent(cache::roc_cache_dir().as_path()), - roc_reporting::report::DEFAULT_PALETTE, - ); - - let module = match loaded { - Ok(module) => module, - Err(problem) => { - let all_problems = problem - .into_lsp_diagnostic(&()) - .into_iter() - .collect::>(); - - let analyzed_document = AnalyzedDocument { - url: source_url, - line_info, - source, +pub(crate) fn global_analysis(doc_info: DocInfo) -> Vec { + let fi = doc_info.url.to_file_path().unwrap(); + let src_dir = find_src_dir(&fi).to_path_buf(); + + let arena = Bump::new(); + let loaded = roc_load::load_and_typecheck_str( + &arena, + fi, + &doc_info.source, + src_dir, + roc_target::TargetInfo::default_x86_64(), + roc_load::FunctionKind::LambdaSet, + roc_reporting::report::RenderTarget::Generic, + RocCacheDir::Persistent(cache::roc_cache_dir().as_path()), + roc_reporting::report::DEFAULT_PALETTE, + ); + + let module = match loaded { + Ok(module) => module, + Err(problem) => { + let all_problems = problem + .into_lsp_diagnostic(&()) + .into_iter() + .collect::>(); + + let analyzed_document = AnalyzedDocument { + doc_info, + analysis_result: AnalysisResult { module: None, diagnostics: all_problems, - }; - - return GlobalAnalysis { - documents: vec![analyzed_document], - }; - } - }; - - let mut documents = vec![]; - - let LoadedModule { - interns, - mut can_problems, - mut type_problems, - mut declarations_by_id, - sources, - mut typechecked, - solved, - abilities_store, - .. - } = module; - - let mut root_module = Some(RootModule { - subs: solved.into_inner(), - abilities_store, - }); - - let mut builder = AnalyzedDocumentBuilder { - interns: &interns, - module_id_to_url: module_id_to_url_from_sources(&sources), - can_problems: &mut can_problems, - type_problems: &mut type_problems, - declarations_by_id: &mut declarations_by_id, - typechecked: &mut typechecked, - root_module: &mut root_module, - }; + }, + }; - for (module_id, (path, source)) in sources { - documents.push(builder.build_document(path, source, module_id)); + return vec![analyzed_document]; } - - GlobalAnalysis { documents } - } + }; + + let mut documents = vec![]; + + let LoadedModule { + interns, + mut can_problems, + mut type_problems, + mut declarations_by_id, + sources, + mut typechecked, + solved, + abilities_store, + .. + } = module; + + let mut root_module = Some(RootModule { + subs: solved.into_inner(), + abilities_store, + }); + + let mut builder = AnalyzedDocumentBuilder { + interns: &interns, + module_id_to_url: module_id_to_url_from_sources(&sources), + can_problems: &mut can_problems, + type_problems: &mut type_problems, + declarations_by_id: &mut declarations_by_id, + typechecked: &mut typechecked, + root_module: &mut root_module, + }; + + for (module_id, (path, source)) in sources { + documents.push(builder.build_document(path, source, module_id, doc_info.version)); + } + + documents } fn find_src_dir(path: &Path) -> &Path { @@ -169,6 +173,7 @@ impl<'a> AnalyzedDocumentBuilder<'a> { path: PathBuf, source: Box, module_id: ModuleId, + version: i32, ) -> AnalyzedDocument { let subs; let abilities; @@ -198,11 +203,16 @@ impl<'a> AnalyzedDocumentBuilder<'a> { let diagnostics = self.build_diagnostics(&path, &source, &line_info, module_id); AnalyzedDocument { - url: path_to_url(&path), - line_info, - source: source.into(), - module: Some(analyzed_module), - diagnostics, + doc_info: DocInfo { + url: path_to_url(&path), + line_info, + source: source.into(), + version, + }, + analysis_result: AnalysisResult { + module: Some(analyzed_module), + diagnostics, + }, } } @@ -243,157 +253,3 @@ impl<'a> AnalyzedDocumentBuilder<'a> { all_problems } } - -type ModuleIdToUrl = HashMap; - -#[derive(Debug)] -struct AnalyzedModule { - module_id: ModuleId, - interns: Interns, - subs: Subs, - abilities: AbilitiesStore, - declarations: Declarations, - // We need this because ModuleIds are not stable between compilations, so a ModuleId visible to - // one module may not be true global to the language server. - module_id_to_url: ModuleIdToUrl, -} - -#[derive(Debug)] -pub(crate) struct AnalyzedDocument { - url: Url, - line_info: LineInfo, - source: String, - module: Option, - diagnostics: Vec, -} - -impl AnalyzedDocument { - pub fn url(&self) -> &Url { - &self.url - } - - fn line_info(&self) -> &LineInfo { - &self.line_info - } - - fn module_mut(&mut self) -> Option<&mut AnalyzedModule> { - self.module.as_mut() - } - - fn module(&self) -> Option<&AnalyzedModule> { - self.module.as_ref() - } - - fn location(&self, range: Range) -> Location { - Location { - uri: self.url.clone(), - range, - } - } - - fn whole_document_range(&self) -> Range { - let line_info = self.line_info(); - let start = Position::new(0, 0); - let end = Position::new(line_info.num_lines(), 0); - Range::new(start, end) - } - - pub fn diagnostics(&mut self) -> Vec { - self.diagnostics.clone() - } - - pub fn symbol_at(&self, position: Position) -> Option { - let line_info = self.line_info(); - - let position = position.to_roc_position(line_info); - - let AnalyzedModule { - declarations, - abilities, - .. - } = self.module()?; - - let found_symbol = - roc_can::traverse::find_closest_symbol_at(position, declarations, abilities)?; - - Some(found_symbol.implementation_symbol()) - } - - pub fn hover(&mut self, position: Position) -> Option { - let line_info = self.line_info(); - - let pos = position.to_roc_position(line_info); - - let AnalyzedModule { - subs, - declarations, - module_id, - interns, - .. - } = self.module_mut()?; - - let (region, var) = roc_can::traverse::find_closest_type_at(pos, declarations)?; - - let snapshot = subs.snapshot(); - let type_str = roc_types::pretty_print::name_and_print_var( - var, - subs, - *module_id, - interns, - roc_types::pretty_print::DebugPrint::NOTHING, - ); - subs.rollback_to(snapshot); - - let range = region.to_range(self.line_info()); - - Some(Hover { - contents: HoverContents::Scalar(MarkedString::String(type_str)), - range: Some(range), - }) - } - - pub fn definition(&self, symbol: Symbol) -> Option { - let AnalyzedModule { declarations, .. } = self.module()?; - - let found_declaration = roc_can::traverse::find_declaration(symbol, declarations)?; - - let range = found_declaration.region().to_range(self.line_info()); - - Some(GotoDefinitionResponse::Scalar(self.location(range))) - } - - pub fn format(&self) -> Option> { - let source = &self.source; - let arena = &Bump::new(); - - let ast = Ast::parse(arena, source).ok()?; - let fmt = ast.fmt(); - - if source == fmt.as_str() { - None - } else { - let range = self.whole_document_range(); - let text_edit = TextEdit::new(range, fmt.to_string().to_string()); - Some(vec![text_edit]) - } - } - - pub fn semantic_tokens(&self) -> Option { - let source = &self.source; - let arena = &Bump::new(); - - let ast = Ast::parse(arena, source).ok()?; - let tokens = ast.semantic_tokens(); - - let data = arrange_semantic_tokens(tokens, &self.line_info); - - Some(SemanticTokensResult::Tokens(SemanticTokens { - result_id: None, - data, - })) - } - - pub(crate) fn module_url(&self, module_id: ModuleId) -> Option { - self.module()?.module_id_to_url.get(&module_id).cloned() - } -} diff --git a/crates/lang_srv/src/analysis/analysed_doc.rs b/crates/lang_srv/src/analysis/analysed_doc.rs new file mode 100644 index 00000000000..1f8911336c0 --- /dev/null +++ b/crates/lang_srv/src/analysis/analysed_doc.rs @@ -0,0 +1,251 @@ +use log::debug; +use std::collections::HashMap; + +use bumpalo::Bump; + +use roc_module::symbol::{ModuleId, Symbol}; + +use roc_region::all::LineInfo; + +use tower_lsp::lsp_types::{ + CompletionItem, Diagnostic, GotoDefinitionResponse, Hover, HoverContents, LanguageString, + Location, MarkedString, Position, Range, SemanticTokens, SemanticTokensResult, TextEdit, Url, +}; + +use crate::{ + analysis::completion::{field_completion, get_completion_items}, + convert::{ToRange, ToRocPosition}, +}; + +use super::{ + parse_ast::Ast, + semantic_tokens::arrange_semantic_tokens, + utils::{format_var_type, is_roc_identifier_char}, + AnalysisResult, AnalyzedModule, +}; + +pub(super) type ModuleIdToUrl = HashMap; + +#[derive(Debug, Clone)] +pub struct AnalyzedDocument { + pub doc_info: DocInfo, + pub analysis_result: AnalysisResult, +} + +#[derive(Debug, Clone)] +pub struct DocInfo { + pub url: Url, + pub line_info: LineInfo, + pub source: String, + pub version: i32, +} +impl DocInfo { + pub fn new(url: Url, source: String, version: i32) -> Self { + Self { + url, + line_info: LineInfo::new(&source), + source, + version, + } + } + + #[cfg(debug_assertions)] + #[allow(unused)] + fn debug_log_prefix(&self, offset: usize) { + debug!("Prefix source: {:?}", self.source); + + let last_few = self.source.get(offset - 5..offset + 5).unwrap(); + + let (before, after) = last_few.split_at(5); + + debug!( + "Starting to get completion items at offset: {:?} content: '{:?}|{:?}'", + offset, before, after + ); + } + + fn whole_document_range(&self) -> Range { + let start = Position::new(0, 0); + let end = Position::new(self.line_info.num_lines(), 0); + Range::new(start, end) + } + pub fn get_prefix_at_position(&self, position: Position) -> String { + let position = position.to_roc_position(&self.line_info); + let offset = position.offset as usize; + let source = &self.source.as_bytes()[..offset]; + let symbol_len = source + .iter() + .rev() + .take_while(|&a| is_roc_identifier_char(&(*a as char))) + .count(); + let symbol = &self.source[offset - symbol_len..offset]; + + String::from(symbol) + } + pub fn format(&self) -> Option> { + let source = &self.source; + let arena = &Bump::new(); + + let ast = Ast::parse(arena, source).ok()?; + let fmt = ast.fmt(); + + if source == fmt.as_str() { + None + } else { + let range = self.whole_document_range(); + let text_edit = TextEdit::new(range, fmt.to_string().to_string()); + Some(vec![text_edit]) + } + } + + pub fn semantic_tokens(&self) -> Option { + let source = &self.source; + let arena = &Bump::new(); + + let ast = Ast::parse(arena, source).ok()?; + let tokens = ast.semantic_tokens(); + + let data = arrange_semantic_tokens(tokens, &self.line_info); + + Some(SemanticTokensResult::Tokens(SemanticTokens { + result_id: None, + data, + })) + } +} + +impl AnalyzedDocument { + pub fn url(&self) -> &Url { + &self.doc_info.url + } + + fn line_info(&self) -> &LineInfo { + &self.doc_info.line_info + } + + fn module(&self) -> Option<&AnalyzedModule> { + self.analysis_result.module.as_ref() + } + + fn location(&self, range: Range) -> Location { + Location { + uri: self.doc_info.url.clone(), + range, + } + } + + pub fn type_checked(&self) -> bool { + self.analysis_result.module.is_some() + } + + pub fn diagnostics(&self) -> Vec { + self.analysis_result.diagnostics.clone() + } + + pub fn symbol_at(&self, position: Position) -> Option { + let line_info = self.line_info(); + + let position = position.to_roc_position(line_info); + + let AnalyzedModule { + declarations, + abilities, + .. + } = self.module()?; + + let found_symbol = + roc_can::traverse::find_closest_symbol_at(position, declarations, abilities)?; + + Some(found_symbol.implementation_symbol()) + } + + pub fn hover(&self, position: Position) -> Option { + let line_info = self.line_info(); + + let pos = position.to_roc_position(line_info); + + let AnalyzedModule { + subs, + declarations, + module_id, + interns, + .. + } = self.module()?; + + let (region, var) = roc_can::traverse::find_closest_type_at(pos, declarations)?; + let type_str = format_var_type(var, &mut subs.clone(), module_id, interns); + + let range = region.to_range(self.line_info()); + + Some(Hover { + contents: HoverContents::Scalar(MarkedString::LanguageString(LanguageString { + language: "roc".to_string(), + value: type_str, + })), + range: Some(range), + }) + } + + pub fn definition(&self, symbol: Symbol) -> Option { + let AnalyzedModule { declarations, .. } = self.module()?; + + let found_declaration = roc_can::traverse::find_declaration(symbol, declarations)?; + + let range = found_declaration.region().to_range(self.line_info()); + + Some(GotoDefinitionResponse::Scalar(self.location(range))) + } + + pub(crate) fn module_url(&self, module_id: ModuleId) -> Option { + self.module()?.module_id_to_url.get(&module_id).cloned() + } + + pub fn completion_items( + &self, + position: Position, + latest_doc: &DocInfo, + ) -> Option> { + let symbol_prefix = latest_doc.get_prefix_at_position(position); + debug!( + "Starting to get completion items for prefix: {:?} docVersion:{:?}", + symbol_prefix, latest_doc.version + ); + let len_diff = latest_doc.source.len() as i32 - self.doc_info.source.len() as i32; + + //We offset the position because we need the position to be in the correct scope in the most recently parsed version of the source. The quick and dirty method is to just remove the difference in length between the source files from the offset. This could cause issues, but is very easy + //TODO: this is kind of a hack and should be removed once we can do some minimal parsing without full type checking + let mut position = position.to_roc_position(&latest_doc.line_info); + position.offset = (position.offset as i32 - len_diff - 1) as u32; + debug!("Completion offset: {:?}", position.offset); + + let AnalyzedModule { + module_id, + interns, + subs, + declarations, + .. + } = self.module()?; + + let is_field_completion = symbol_prefix.contains('.'); + if is_field_completion { + field_completion( + position, + symbol_prefix, + declarations, + interns, + &mut subs.clone(), + module_id, + ) + } else { + let completions = get_completion_items( + position, + symbol_prefix, + declarations, + &mut subs.clone(), + module_id, + interns, + ); + Some(completions) + } + } +} diff --git a/crates/lang_srv/src/analysis/completion.rs b/crates/lang_srv/src/analysis/completion.rs new file mode 100644 index 00000000000..c780e4cb2c4 --- /dev/null +++ b/crates/lang_srv/src/analysis/completion.rs @@ -0,0 +1,443 @@ +use log::{debug, trace, warn}; +use roc_can::{ + def::Def, + expr::{ClosureData, Declarations, Expr, WhenBranch}, + pattern::{ListPatterns, Pattern, RecordDestruct, TupleDestruct}, + traverse::{walk_decl, walk_def, walk_expr, DeclarationInfo, Visitor}, +}; +use roc_module::symbol::{Interns, ModuleId, Symbol}; +use roc_region::all::{Loc, Position, Region}; +use roc_types::subs::{Subs, Variable}; +use tower_lsp::lsp_types::{CompletionItem, CompletionItemKind}; + +use super::utils::format_var_type; + +pub struct CompletionVisitor<'a> { + position: Position, + found_decls: Vec<(Symbol, Variable)>, + pub interns: &'a Interns, + pub prefix: String, +} + +impl Visitor for CompletionVisitor<'_> { + fn should_visit(&mut self, region: Region) -> bool { + region.contains_pos(self.position) + } + + fn visit_expr(&mut self, expr: &Expr, region: Region, var: Variable) { + if region.contains_pos(self.position) { + let mut res = self.expression_defs(expr); + self.found_decls.append(&mut res); + + walk_expr(self, expr, var); + } + } + + fn visit_decl(&mut self, decl: DeclarationInfo<'_>) { + match decl { + DeclarationInfo::Value { loc_expr, .. } + | DeclarationInfo::Function { + loc_body: loc_expr, .. + } + | DeclarationInfo::Destructure { loc_expr, .. } => { + let res = self.decl_to_completion_item(&decl); + self.found_decls.extend(res); + if loc_expr.region.contains_pos(self.position) { + walk_decl(self, decl); + }; + } + _ => { + walk_decl(self, decl); + } + } + } + + fn visit_def(&mut self, def: &Def) { + let res = self.extract_defs(def); + self.found_decls.extend(res); + walk_def(self, def); + } +} +impl CompletionVisitor<'_> { + fn extract_defs(&mut self, def: &Def) -> Vec<(Symbol, Variable)> { + trace!("Completion begin"); + def.pattern_vars + .iter() + .map(|(symbol, var)| (*symbol, *var)) + .collect() + } + fn expression_defs(&self, expr: &Expr) -> Vec<(Symbol, Variable)> { + match expr { + Expr::When { + expr_var, branches, .. + } => self.when_is_expr(branches, expr_var), + Expr::Closure(ClosureData { + arguments, + loc_body, + .. + }) => { + //if we are inside the closure complete it's vars + if loc_body.region.contains_pos(self.position) { + arguments + .iter() + .flat_map(|(var, _, pat)| self.patterns(&pat.value, var)) + .collect() + } else { + vec![] + } + } + _ => vec![], + } + } + + ///Extract any variables made available by the branch of a when_is expression that contains `self.position` + fn when_is_expr( + &self, + branches: &[WhenBranch], + expr_var: &Variable, + ) -> Vec<(Symbol, Variable)> { + branches + .iter() + .flat_map( + |WhenBranch { + patterns, value, .. + }| { + if value.region.contains_pos(self.position) { + patterns + .iter() + .flat_map(|pattern| self.patterns(&pattern.pattern.value, expr_var)) + .collect() + } else { + vec![] + } + }, + ) + .collect() + } + + fn record_destructure(&self, destructs: &[Loc]) -> Vec<(Symbol, Variable)> { + destructs + .iter() + .flat_map(|a| match &a.value.typ { + roc_can::pattern::DestructType::Required + | roc_can::pattern::DestructType::Optional(_, _) => { + vec![(a.value.symbol, a.value.var)] + } + roc_can::pattern::DestructType::Guard(var, pat) => self.patterns(&pat.value, var), + }) + .collect() + } + + fn tuple_destructure(&self, destructs: &[Loc]) -> Vec<(Symbol, Variable)> { + destructs + .iter() + .flat_map(|a| { + let (var, pattern) = &a.value.typ; + self.patterns(&pattern.value, var) + }) + .collect() + } + + fn list_pattern(&self, list_elems: &ListPatterns, var: &Variable) -> Vec<(Symbol, Variable)> { + list_elems + .patterns + .iter() + .flat_map(|a| self.patterns(&a.value, var)) + .collect() + } + fn tag_pattern(&self, arguments: &[(Variable, Loc)]) -> Vec<(Symbol, Variable)> { + arguments + .iter() + .flat_map(|(var, pat)| self.patterns(&pat.value, var)) + .collect() + } + + fn as_pattern( + &self, + as_pat: &Pattern, + as_symbol: Symbol, + var: &Variable, + ) -> Vec<(Symbol, Variable)> { + //Get the variables introduced within the pattern + let mut patterns = self.patterns(as_pat, var); + //Add the "as" that wraps the whole pattern + patterns.push((as_symbol, *var)); + patterns + } + ///Returns a list of symbols defined by this pattern. + ///`pattern_var`: Variable type of the entire pattern. This will be returned if the pattern turns out to be an identifier + fn patterns( + &self, + pattern: &roc_can::pattern::Pattern, + pattern_var: &Variable, + ) -> Vec<(Symbol, Variable)> { + match pattern { + roc_can::pattern::Pattern::Identifier(symbol) => { + if self.is_match(symbol) { + vec![(*symbol, *pattern_var)] + } else { + vec![] + } + } + Pattern::AppliedTag { arguments, .. } => self.tag_pattern(arguments), + Pattern::UnwrappedOpaque { argument, .. } => { + self.patterns(&argument.1.value, &argument.0) + } + Pattern::List { + elem_var, patterns, .. + } => self.list_pattern(patterns, elem_var), + roc_can::pattern::Pattern::As(pat, symbol) => { + self.as_pattern(&pat.value, *symbol, pattern_var) + } + roc_can::pattern::Pattern::RecordDestructure { destructs, .. } => { + self.record_destructure(destructs) + } + roc_can::pattern::Pattern::TupleDestructure { destructs, .. } => { + self.tuple_destructure(destructs) + } + _ => vec![], + } + } + + fn is_match(&self, symbol: &Symbol) -> bool { + symbol.as_str(self.interns).starts_with(&self.prefix) + } + + fn decl_to_completion_item(&self, decl: &DeclarationInfo) -> Vec<(Symbol, Variable)> { + match decl { + DeclarationInfo::Value { + expr_var, pattern, .. + } => self.patterns(pattern, expr_var), + DeclarationInfo::Function { + expr_var, + pattern, + function, + loc_body, + .. + } => { + let mut out = vec![]; + //Append the function declaration itself for recursive calls + out.extend(self.patterns(pattern, expr_var)); + + if loc_body.region.contains_pos(self.position) { + //also add the arguments if we are inside the function + let args = function + .value + .arguments + .iter() + .flat_map(|(var, _, pat)| self.patterns(&pat.value, var)); + //We add in the pattern for the function declaration + out.extend(args); + trace!("Added function args to completion output =:{:#?}", out); + } + out + } + DeclarationInfo::Destructure { + loc_pattern, + expr_var, + .. + } => self.patterns(&loc_pattern.value, expr_var), + DeclarationInfo::Expectation { .. } => vec![], + } + } +} + +fn get_completions( + position: Position, + decls: &Declarations, + prefix: String, + interns: &Interns, +) -> Vec<(Symbol, Variable)> { + let mut visitor = CompletionVisitor { + position, + found_decls: Vec::new(), + interns, + prefix, + }; + visitor.visit_decls(decls); + visitor.found_decls +} + +fn make_completion_item( + subs: &mut Subs, + module_id: &ModuleId, + interns: &Interns, + str: String, + var: Variable, +) -> CompletionItem { + let type_str = format_var_type(var, subs, module_id, interns); + let typ = match subs.get(var).content { + roc_types::subs::Content::Structure(var) => match var { + roc_types::subs::FlatType::Apply(_, _) => CompletionItemKind::FUNCTION, + roc_types::subs::FlatType::Func(_, _, _) => CompletionItemKind::FUNCTION, + roc_types::subs::FlatType::EmptyTagUnion + | roc_types::subs::FlatType::TagUnion(_, _) => CompletionItemKind::ENUM, + _ => CompletionItemKind::VARIABLE, + }, + a => { + debug!( + "No specific completionKind for variable type: {:?} defaulting to 'Variable'", + a + ); + CompletionItemKind::VARIABLE + } + }; + + CompletionItem { + label: str, + detail: Some(type_str), + kind: Some(typ), + + ..Default::default() + } +} +/// Walks through declarations that would be accessible from the provided position adding them to a list of completion items until all accessible declarations have been fully explored +pub fn get_completion_items( + position: Position, + prefix: String, + decls: &Declarations, + subs: &mut Subs, + module_id: &ModuleId, + interns: &Interns, +) -> Vec { + let completions = get_completions(position, decls, prefix, interns); + make_completion_items( + subs, + module_id, + interns, + completions + .into_iter() + .map(|(symb, var)| (symb.as_str(interns).to_string(), var)) + .collect(), + ) +} +fn make_completion_items( + subs: &mut Subs, + module_id: &ModuleId, + interns: &Interns, + completions: Vec<(String, Variable)>, +) -> Vec { + completions + .into_iter() + .map(|(symbol, var)| make_completion_item(subs, module_id, interns, symbol, var)) + .collect() +} + +///Finds the types of and names of all the fields of a record +///`var` should be a `Variable` that you know is a record's type or else it will return an empty list +fn find_record_fields(var: Variable, subs: &mut Subs) -> Vec<(String, Variable)> { + let content = subs.get(var); + match content.content { + roc_types::subs::Content::Structure(typ) => match typ { + roc_types::subs::FlatType::Record(fields, ext) => { + let field_types = fields.unsorted_iterator(subs, ext); + + match field_types { + Ok(field) => field + .map(|a| (a.0.clone().into(), a.1.into_inner())) + .collect::>(), + Err(err) => { + warn!("Error getting record field types for completion: {:?}", err); + vec![] + } + } + } + roc_types::subs::FlatType::Tuple(elems, ext) => { + let elems = elems.unsorted_iterator(subs, ext); + + match elems { + Ok(elem) => elem.map(|(num, var)| (num.to_string(), var)).collect(), + Err(err) => { + warn!("Error getting tuple elems for completion: {:?}", err); + vec![] + } + } + } + + _ => { + warn!( + "Trying to get field completion for a type that is not a record: {:?}", + typ + ); + vec![] + } + }, + roc_types::subs::Content::Error => { + //This is caused by typechecking our partially typed variable name causing the typechecking to be confused as the type of the parent variable + //TODO! ideally i could recover using some previous typecheck result that isn't broken + warn!("Variable type of record was of type 'error', cannot access field",); + vec![] + } + _ => { + warn!( + "Variable before field was unsupported type: {:?}", + subs.dbg(var) + ); + vec![] + } + } +} + +struct FieldCompletion { + var: String, + field: String, + middle_fields: Vec, +} +///Splits a completion prefix for a field into its components +///E.g. a.b.c.d->{var:"a",middle_fields:["b","c"],field:"d"} +fn get_field_completion_parts(symbol_prefix: &str) -> Option { + let mut parts = symbol_prefix.split('.').collect::>(); + let field = parts.pop().unwrap_or("").to_string(); + let var = parts.remove(0); + //Now that we have the head and tail removed this is all the intermediate fields + let middle_fields = parts.into_iter().map(ToString::to_string).collect(); + + Some(FieldCompletion { + var: var.to_string(), + field, + middle_fields, + }) +} +pub fn field_completion( + position: Position, + symbol_prefix: String, + declarations: &Declarations, + interns: &Interns, + subs: &mut Subs, + module_id: &ModuleId, +) -> Option> { + let FieldCompletion { + var, + field, + middle_fields, + } = get_field_completion_parts(&symbol_prefix)?; + + debug!( + "Getting record field completions: variable: {:?} field: {:?} middle: {:?} ", + var, field, middle_fields + ); + + let completion = get_completions(position, declarations, var.to_string(), interns) + .into_iter() + .map(|a| (a.0.as_str(interns).to_string(), a.1)) + .next()?; + + //If we have a type that has nested records we could have a completion prefix like: "var.field1.field2.fi" + //If the document isn't fully typechecked we won't know what the type of field2 is for us to offer completions based on it's fields + //Instead we get the type of "var" and then the type of "field1" within var's type and then "field2" within field1's type etc etc, until we have the type of the record we are actually looking for field completions for. + let completion_record = middle_fields.iter().fold(completion, |state, chain_field| { + let fields_vars = find_record_fields(state.1, subs); + fields_vars + .into_iter() + .find(|type_field| chain_field == &type_field.0) + .unwrap_or(state) + }); + + let field_completions: Vec<_> = find_record_fields(completion_record.1, subs) + .into_iter() + .filter(|(str, _)| str.starts_with(&field.to_string())) + .collect(); + + let field_completions = make_completion_items(subs, module_id, interns, field_completions); + Some(field_completions) +} diff --git a/crates/lang_srv/src/analysis/utils.rs b/crates/lang_srv/src/analysis/utils.rs new file mode 100644 index 00000000000..79699466166 --- /dev/null +++ b/crates/lang_srv/src/analysis/utils.rs @@ -0,0 +1,24 @@ +use roc_module::symbol::{Interns, ModuleId}; +use roc_types::subs::{Subs, Variable}; + +pub(super) fn format_var_type( + var: Variable, + subs: &mut Subs, + module_id: &ModuleId, + interns: &Interns, +) -> String { + let snapshot = subs.snapshot(); + let type_str = roc_types::pretty_print::name_and_print_var( + var, + subs, + *module_id, + interns, + roc_types::pretty_print::DebugPrint::NOTHING, + ); + subs.rollback_to(snapshot); + type_str +} + +pub(super) fn is_roc_identifier_char(char: &char) -> bool { + matches!(char,'a'..='z'|'A'..='Z'|'0'..='9'|'.') +} diff --git a/crates/lang_srv/src/registry.rs b/crates/lang_srv/src/registry.rs index 3b5a60c2aee..09c021fc8c9 100644 --- a/crates/lang_srv/src/registry.rs +++ b/crates/lang_srv/src/registry.rs @@ -1,75 +1,219 @@ -use std::collections::HashMap; +use log::{debug, info, trace}; + +use std::{ + collections::HashMap, + sync::{Arc, OnceLock}, + time::Duration, +}; + +use tokio::sync::{Mutex, MutexGuard}; use tower_lsp::lsp_types::{ - Diagnostic, GotoDefinitionResponse, Hover, Position, SemanticTokensResult, TextEdit, Url, + CompletionResponse, Diagnostic, GotoDefinitionResponse, Hover, Position, SemanticTokensResult, + TextEdit, Url, }; -use crate::analysis::{AnalyzedDocument, GlobalAnalysis}; +use crate::analysis::{AnalyzedDocument, DocInfo}; + +#[derive(Debug)] +pub(crate) struct DocumentPair { + info: DocInfo, + latest_document: OnceLock>, + last_good_document: Arc, +} + +impl DocumentPair { + pub(crate) fn new( + latest_doc: Arc, + last_good_document: Arc, + ) -> Self { + Self { + info: latest_doc.doc_info.clone(), + latest_document: OnceLock::from(latest_doc), + last_good_document, + } + } +} + +#[derive(Debug)] +pub(crate) struct RegistryConfig { + pub(crate) latest_document_timeout: Duration, +} -pub(crate) enum DocumentChange { - Modified(Url, String), - Closed(Url), +impl Default for RegistryConfig { + fn default() -> Self { + Self { + latest_document_timeout: Duration::from_millis(5000), + } + } } #[derive(Debug, Default)] pub(crate) struct Registry { - documents: HashMap, + documents: Mutex>, + config: RegistryConfig, } impl Registry { - pub fn apply_change(&mut self, change: DocumentChange) { - match change { - DocumentChange::Modified(url, source) => { - let GlobalAnalysis { documents } = GlobalAnalysis::new(url, source); - - // Only replace the set of documents and all dependencies that were re-analyzed. - // Note that this is actually the opposite of what we want - in truth we want to - // re-evaluate all dependents! - for document in documents { - let url = document.url().clone(); - self.documents.insert(url.clone(), document); + pub(crate) fn new(config: RegistryConfig) -> Self { + Self { + documents: Default::default(), + config, + } + } + + pub async fn get_latest_version(&self, url: &Url) -> Option { + self.documents.lock().await.get(url).map(|x| x.info.version) + } + + fn update_document( + documents: &mut MutexGuard<'_, HashMap>, + document: Arc, + updating_url: &Url, + ) { + if &document.doc_info.url == updating_url { + //Write the newly analysed document into the oncelock that any request requiring the latest document will be waiting on + if let Some(a) = documents.get_mut(updating_url) { + a.latest_document.set(document.clone()).unwrap() + } + } + + let url = document.url().clone(); + match documents.get_mut(&url) { + Some(old_doc) => { + //If the latest doc_info has a version higher than what we are setting we shouldn't overwrite the document, but we can update the last_good_document if the parse went well + if old_doc.info.version > document.doc_info.version { + if document.type_checked() { + *old_doc = DocumentPair { + info: old_doc.info.clone(), + latest_document: old_doc.latest_document.clone(), + last_good_document: document, + }; + } + } else if document.type_checked() { + *old_doc = DocumentPair::new(document.clone(), document); + } else { + debug!( + "Document typechecking failed at version {:?}, not updating last_good_document", + &document.doc_info.version + ); + *old_doc = DocumentPair::new(document, old_doc.last_good_document.clone()); } } - DocumentChange::Closed(_url) => { - // Do nothing. + None => { + documents.insert(url.clone(), DocumentPair::new(document.clone(), document)); + } + } + } + + pub async fn apply_changes<'a>(&self, analysed_docs: Vec, updating_url: Url) { + let mut documents = self.documents.lock().await; + debug!( + "Finished doc analysis for doc: {}", + updating_url.to_string() + ); + + for document in analysed_docs { + let document = Arc::new(document); + Registry::update_document(&mut documents, document, &updating_url); + } + } + + pub async fn apply_doc_info_changes(&self, url: Url, info: DocInfo) { + let mut documents_lock = self.documents.lock().await; + let doc = documents_lock.get_mut(&url); + match doc { + Some(a) => { + debug!( + "Set the docInfo for {:?} to version:{:?}", + url.as_str(), + info.version + ); + *a = DocumentPair { + info, + last_good_document: a.last_good_document.clone(), + latest_document: OnceLock::new(), + }; } + None => debug!("So existing docinfo for {:?} ", url.as_str()), } } - fn document_by_url(&mut self, url: &Url) -> Option<&mut AnalyzedDocument> { - self.documents.get_mut(url) + async fn document_info_by_url(&self, url: &Url) -> Option { + self.documents.lock().await.get(url).map(|a| a.info.clone()) } - pub fn diagnostics(&mut self, url: &Url) -> Vec { - let Some(document) = self.document_by_url(url) else { + ///Tries to get the latest document from analysis. + ///Gives up and returns none after 5 seconds. + async fn latest_document_by_url(&self, url: &Url) -> Option> { + tokio::time::timeout(self.config.latest_document_timeout, async { + //TODO: This should really be a condvar that is triggered by the latest being ready, this will do for now though + loop { + let docs = self.documents.lock().await; + if let Some(a) = docs.get(url) { + if let Some(a) = a.latest_document.get() { + return a.clone(); + } + } + drop(docs); + tokio::task::yield_now().await; + } + }) + .await + .ok() + } + + pub async fn diagnostics(&self, url: &Url) -> Vec { + let Some(document) = self.latest_document_by_url(url).await else { return vec![]; }; document.diagnostics() } - pub fn hover(&mut self, url: &Url, position: Position) -> Option { - self.document_by_url(url)?.hover(position) + pub async fn hover(&self, url: &Url, position: Position) -> Option { + self.latest_document_by_url(url).await?.hover(position) } - pub fn goto_definition( - &mut self, + pub async fn goto_definition( + &self, url: &Url, position: Position, ) -> Option { - let document = self.document_by_url(url)?; + let document = self.latest_document_by_url(url).await?; let symbol = document.symbol_at(position)?; let def_document_url = document.module_url(symbol.module_id())?; - let def_document = self.document_by_url(&def_document_url)?; + let def_document = self.latest_document_by_url(&def_document_url).await?; def_document.definition(symbol) } - pub fn formatting(&mut self, url: &Url) -> Option> { - let document = self.document_by_url(url)?; + pub async fn formatting(&self, url: &Url) -> Option> { + let document = self.document_info_by_url(url).await?; document.format() } - pub fn semantic_tokens(&mut self, url: &Url) -> Option { - let document = self.document_by_url(url)?; + pub async fn semantic_tokens(&self, url: &Url) -> Option { + let document = self.document_info_by_url(url).await?; document.semantic_tokens() } + pub async fn completion_items( + &self, + url: &Url, + position: Position, + ) -> Option { + trace!("Starting completion "); + let lock = self.documents.lock().await; + let pair = lock.get(url)?; + + let latest_doc_info = &pair.info; + info!( + "Using document version:{:?} for completion ", + latest_doc_info.version + ); + + let completions = pair + .last_good_document + .completion_items(position, latest_doc_info)?; + + Some(CompletionResponse::Array(completions)) + } } diff --git a/crates/lang_srv/src/server.rs b/crates/lang_srv/src/server.rs index cef37b3b665..19e05550b98 100644 --- a/crates/lang_srv/src/server.rs +++ b/crates/lang_srv/src/server.rs @@ -1,32 +1,65 @@ use analysis::HIGHLIGHT_TOKENS_LEGEND; -use parking_lot::{Mutex, MutexGuard}; -use registry::{DocumentChange, Registry}; + +use log::{debug, trace}; +use registry::{Registry, RegistryConfig}; +use std::future::Future; +use std::time::Duration; + use tower_lsp::jsonrpc::Result; use tower_lsp::lsp_types::*; use tower_lsp::{Client, LanguageServer, LspService, Server}; +use crate::analysis::{global_analysis, DocInfo}; + mod analysis; mod convert; mod registry; -#[derive(Debug)] -struct RocLs { +struct RocServer { + pub state: RocServerState, client: Client, - registry: Mutex, } -impl std::panic::RefUnwindSafe for RocLs {} +struct RocServerConfig { + pub debounce_ms: Duration, +} -impl RocLs { - pub fn new(client: Client) -> Self { +impl Default for RocServerConfig { + fn default() -> Self { Self { - client, - registry: Mutex::new(Registry::default()), + debounce_ms: Duration::from_millis(100), } } +} + +///This exists so we can test most of RocLs without anything LSP related +struct RocServerState { + registry: Registry, + config: RocServerConfig, +} - fn registry(&self) -> MutexGuard { - self.registry.lock() +impl std::panic::RefUnwindSafe for RocServer {} + +fn read_env_num(name: &str) -> Option { + std::env::var(name) + .ok() + .and_then(|a| str::parse::(&a).ok()) +} + +impl RocServer { + pub fn new(client: Client) -> Self { + let registry_config = RegistryConfig { + latest_document_timeout: Duration::from_millis( + read_env_num("ROCLS_LATEST_DOC_TIMEOUT_MS").unwrap_or(5000), + ), + }; + let config = RocServerConfig { + debounce_ms: Duration::from_millis(read_env_num("ROCLS_DEBOUNCE_MS").unwrap_or(100)), + }; + Self { + state: RocServerState::new(config, Registry::new(registry_config)), + client, + } } pub fn capabilities() -> ServerCapabilities { @@ -61,39 +94,120 @@ impl RocLs { range: None, full: Some(SemanticTokensFullOptions::Bool(true)), }); - + let completion_provider = CompletionOptions { + resolve_provider: Some(false), + trigger_characters: Some(vec![".".to_string()]), + all_commit_characters: None, + work_done_progress_options: WorkDoneProgressOptions { + work_done_progress: None, + }, + }; ServerCapabilities { text_document_sync: Some(text_document_sync), hover_provider: Some(hover_provider), definition_provider: Some(OneOf::Right(definition_provider)), document_formatting_provider: Some(OneOf::Right(document_formatting_provider)), semantic_tokens_provider: Some(semantic_tokens_provider), + completion_provider: Some(completion_provider), ..ServerCapabilities::default() } } /// Records a document content change. async fn change(&self, fi: Url, text: String, version: i32) { - self.registry() - .apply_change(DocumentChange::Modified(fi.clone(), text)); + let updating_result = self.state.change(&fi, text, version).await; - let diagnostics = match std::panic::catch_unwind(|| self.registry().diagnostics(&fi)) { - Ok(ds) => ds, - Err(_) => return, - }; + //The analysis task can be cancelled by another change coming in which will update the watched variable + if let Err(e) = updating_result { + debug!("Cancelled change. Reason:{:?}", e); + return; + } + + debug!("Applied_changes getting and returning diagnostics"); + + let diagnostics = self.state.registry.diagnostics(&fi).await; self.client .publish_diagnostics(fi, diagnostics, Some(version)) .await; } +} + +impl RocServerState { + pub fn new(config: RocServerConfig, registry: Registry) -> RocServerState { + Self { config, registry } + } + + async fn registry(&self) -> &Registry { + &self.registry + } + + async fn close(&self, _fi: Url) {} + + pub async fn change( + &self, + fi: &Url, + text: String, + version: i32, + ) -> std::result::Result<(), String> { + debug!("V{:?}:starting change", version); + let doc_info = DocInfo::new(fi.clone(), text, version); + + self.registry + .apply_doc_info_changes(fi.clone(), doc_info.clone()) + .await; + + debug!( + "V{:?}:finished updating docinfo, starting analysis ", + version + ); + + let inner_ref = self; + let updating_result = async { + //This reduces wasted computation by waiting to allow a new change to come in and update the version before we check, but does delay the final analysis. Ideally this would be replaced with cancelling the analysis when a new one comes in. + tokio::time::sleep(self.config.debounce_ms).await; + let is_latest = inner_ref + .registry + .get_latest_version(fi) + .await + .map(|latest| latest == version) + .unwrap_or(true); + if !is_latest { + return Err("Not latest version skipping analysis".to_string()); + } + + let results = match tokio::task::spawn_blocking(|| global_analysis(doc_info)).await { + Err(e) => return Err(format!("Document analysis failed. reason:{:?}", e)), + Ok(a) => a, + }; + let latest_version = inner_ref.registry.get_latest_version(fi).await; - async fn close(&self, fi: Url) { - self.registry().apply_change(DocumentChange::Closed(fi)); + //if this version is not the latest another change must have come in and this analysis is useless + //if there is no older version we can just proceed with the update + if let Some(latest_version) = latest_version { + if latest_version != version { + return Err(format!( + "Version {0} doesn't match latest: {1} discarding analysis", + version, latest_version + )); + } + } + debug!( + "V{:?}:finished document analysis applying changes ", + version + ); + + inner_ref.registry.apply_changes(results, fi.clone()).await; + Ok(()) + } + .await; + debug!("V{:?}:finished document change process", version); + updating_result } } #[tower_lsp::async_trait] -impl LanguageServer for RocLs { +impl LanguageServer for RocServer { async fn initialize(&self, _: InitializeParams) -> Result { Ok(InitializeResult { capabilities: Self::capabilities(), @@ -127,7 +241,7 @@ impl LanguageServer for RocLs { async fn did_close(&self, params: DidCloseTextDocumentParams) { let TextDocumentIdentifier { uri } = params.text_document; - self.close(uri).await; + self.state.close(uri).await; } async fn shutdown(&self) -> Result<()> { @@ -144,7 +258,13 @@ impl LanguageServer for RocLs { work_done_progress_params: _, } = params; - panic_wrapper(|| self.registry().hover(&text_document.uri, position)) + panic_wrapper_async(|| async { + self.state + .registry + .hover(&text_document.uri, position) + .await + }) + .await } async fn goto_definition( @@ -161,10 +281,14 @@ impl LanguageServer for RocLs { partial_result_params: _, } = params; - panic_wrapper(|| { - self.registry() + panic_wrapper_async(|| async { + self.state + .registry() + .await .goto_definition(&text_document.uri, position) + .await }) + .await } async fn formatting(&self, params: DocumentFormattingParams) -> Result>> { @@ -174,7 +298,14 @@ impl LanguageServer for RocLs { work_done_progress_params: _, } = params; - panic_wrapper(|| self.registry().formatting(&text_document.uri)) + panic_wrapper_async(|| async { + self.state + .registry() + .await + .formatting(&text_document.uri) + .await + }) + .await } async fn semantic_tokens_full( @@ -187,22 +318,184 @@ impl LanguageServer for RocLs { partial_result_params: _, } = params; - panic_wrapper(|| self.registry().semantic_tokens(&text_document.uri)) + panic_wrapper_async(|| async { + self.state + .registry() + .await + .semantic_tokens(&text_document.uri) + .await + }) + .await + } + + async fn completion(&self, params: CompletionParams) -> Result> { + let doc = params.text_document_position; + trace!("Got completion request"); + + panic_wrapper_async(|| async { + self.state + .registry + .completion_items(&doc.text_document.uri, doc.position) + .await + }) + .await } } -fn panic_wrapper(f: impl FnOnce() -> Option + std::panic::UnwindSafe) -> Result> { +async fn panic_wrapper_async( + f: impl FnOnce() -> Fut + std::panic::UnwindSafe, +) -> Result> +where + Fut: Future>, +{ match std::panic::catch_unwind(f) { - Ok(r) => Ok(r), + Ok(r) => Ok(r.await), Err(_) => Err(tower_lsp::jsonrpc::Error::internal_error()), } } #[tokio::main] async fn main() { + env_logger::Builder::from_env("ROCLS_LOG").init(); + let stdin = tokio::io::stdin(); let stdout = tokio::io::stdout(); - let (service, socket) = LspService::new(RocLs::new); + let (service, socket) = LspService::new(RocServer::new); Server::new(stdin, stdout, socket).serve(service).await; } + +#[cfg(test)] +mod tests { + use std::sync::Once; + + use expect_test::expect; + use indoc::indoc; + use log::info; + + use super::*; + + fn completion_resp_to_labels(resp: CompletionResponse) -> Vec { + match resp { + CompletionResponse::Array(list) => list.into_iter(), + CompletionResponse::List(list) => list.items.into_iter(), + } + .map(|item| item.label) + .collect::>() + } + ///Gets completion and returns only the label for each completion + async fn get_completion_labels( + reg: &Registry, + url: &Url, + position: Position, + ) -> Option> { + reg.completion_items(url, position) + .await + .map(completion_resp_to_labels) + } + + const DOC_LIT: &str = indoc! {r#" + interface Test + exposes [] + imports [] + "#}; + static INIT: Once = Once::new(); + async fn test_setup(doc: String) -> (RocServerState, Url) { + INIT.call_once(|| { + env_logger::builder() + .is_test(true) + .filter_level(log::LevelFilter::Trace) + .init(); + }); + info!("Doc is:\n{0}", doc); + let url = Url::parse("file:/Test.roc").unwrap(); + + let inner = RocServerState::new(RocServerConfig::default(), Registry::default()); + //setup the file + inner.change(&url, doc, 0).await.unwrap(); + (inner, url) + } + ///Test that completion works properly when we apply an "as" pattern to an identifier + #[tokio::test] + async fn test_completion_as_identifier() { + let suffix = DOC_LIT.to_string() + + indoc! {r#" + main = + when a is + inn as outer -> + "#}; + let (inner, url) = test_setup(suffix.clone()).await; + let position = Position::new(6, 7); + let reg = &inner.registry; + + let change = suffix.clone() + "o"; + inner.change(&url, change, 1).await.unwrap(); + let comp1 = get_completion_labels(reg, &url, position).await; + + let c = suffix.clone() + "i"; + inner.change(&url, c, 2).await.unwrap(); + let comp2 = get_completion_labels(reg, &url, position).await; + + let actual = [comp1, comp2]; + expect![[r#" + [ + Some( + [ + "outer", + ], + ), + Some( + [ + "inn", + "outer", + ], + ), + ] + "#]] + .assert_debug_eq(&actual) + } + + ///Test that completion works properly when we apply an "as" pattern to a record + #[tokio::test] + async fn test_completion_as_record() { + let doc = DOC_LIT.to_string() + + indoc! {r#" + main = + when a is + {one,two} as outer -> + "#}; + + let (inner, url) = test_setup(doc.clone()).await; + let position = Position::new(6, 7); + let reg = &inner.registry; + + let change = doc.clone() + "o"; + inner.change(&url, change, 1).await.unwrap(); + let comp1 = get_completion_labels(reg, &url, position).await; + + let c = doc.clone() + "t"; + inner.change(&url, c, 2).await.unwrap(); + let comp2 = get_completion_labels(reg, &url, position).await; + let actual = [comp1, comp2]; + + expect![[r#" + [ + Some( + [ + "one", + "two", + "outer", + ], + ), + Some( + [ + "one", + "two", + "outer", + ], + ), + ] + "#]] + .assert_debug_eq(&actual); + } +} diff --git a/crates/packaging/src/https.rs b/crates/packaging/src/https.rs index c015e9e442a..b76ab1b05fe 100644 --- a/crates/packaging/src/https.rs +++ b/crates/packaging/src/https.rs @@ -438,11 +438,19 @@ impl Read for ProgressReporter { self.read += size; if let Some(total) = self.total { - eprint!( - "\u{001b}[2K\u{001b}[G[{:.1} / {:.1} MB]", - self.read as f32 / 1_000_000.0, - total as f32 / 1_000_000.0, - ); + let total = total as f32 / 1_000_000.0; + let read = self.read as f32 / 1_000_000.0; + + if total < 1.0 { + eprint!( + "\u{001b}[2K\u{001b}[G[{:.1} / {:.1} KB]", + // Convert MB to KB + read * 1000.0, + total * 1000.0, + ); + } else { + eprint!("\u{001b}[2K\u{001b}[G[{:.1} / {:.1} MB]", read, total,); + } } else { eprint!( "\u{001b}[2K\u{001b}[G[{:.1} MB]", diff --git a/crates/packaging/src/tarball.rs b/crates/packaging/src/tarball.rs index 460378f8fa0..1792f0f2f14 100644 --- a/crates/packaging/src/tarball.rs +++ b/crates/packaging/src/tarball.rs @@ -156,6 +156,7 @@ fn write_archive(path: &Path, writer: W) -> io::Result<()> { Some("rm"), // legacy linker formats Some("o"), + Some("a"), Some("obj"), Some("wasm"), // optimized wasm builds compile to .zig for now, diff --git a/crates/repl_cli/src/cli_gen.rs b/crates/repl_cli/src/cli_gen.rs index 81c86981fc0..f6170467b96 100644 --- a/crates/repl_cli/src/cli_gen.rs +++ b/crates/repl_cli/src/cli_gen.rs @@ -117,14 +117,13 @@ impl<'a> ReplApp<'a> for CliApp { main_fn_name: &str, ret_bytes: usize, mut transform: F, - ) -> T + ) -> Option where F: FnMut(&'a Self::Memory, usize) -> T, Self::Memory: 'a, { - run_jit_function_dynamic_type!(self.lib, main_fn_name, ret_bytes, |v| transform( - &CliMemory, v - )) + let mut t = |v| transform(&CliMemory, v); + run_jit_function_dynamic_type!(self.lib, main_fn_name, ret_bytes, t) } } diff --git a/crates/repl_eval/src/eval.rs b/crates/repl_eval/src/eval.rs index 2f987ba09de..b9473b80772 100644 --- a/crates/repl_eval/src/eval.rs +++ b/crates/repl_eval/src/eval.rs @@ -265,8 +265,6 @@ fn get_tags_vars_and_variant<'a>( (vars_of_tag, union_variant) } -const FAKE_EXPR: &Loc = &Loc::at_zero(Expr::Crash); - fn expr_of_tag<'a, M: ReplAppMemory>( env: &mut Env<'a, '_>, mem: &'a M, @@ -296,6 +294,7 @@ fn expr_of_tag<'a, M: ReplAppMemory>( cmp_fields(&env.layout_cache.interner, i1, *lay1, i2, *lay2) }); + const FAKE_EXPR: &Loc = &Loc::at_zero(Expr::Crash); let mut output: Vec<&Loc> = Vec::from_iter_in(std::iter::repeat(FAKE_EXPR).take(layouts.len()), env.arena); let mut field_addr = data_addr; @@ -359,11 +358,6 @@ fn tag_id_from_recursive_ptr<'a, M: ReplAppMemory>( } } -const OPAQUE_FUNCTION: Expr = Expr::Var { - module_name: "", - ident: "", -}; - fn jit_to_ast_help<'a, A: ReplApp<'a>>( env: &mut Env<'a, '_>, app: &mut A, @@ -430,7 +424,10 @@ fn jit_to_ast_help<'a, A: ReplApp<'a>>( Expr::Str(StrLiteral::PlainLine(arena_str)) }; - app.call_function_returns_roc_str(env.target_info, main_fn_name, body) + match app.call_function_returns_roc_str(env.target_info, main_fn_name, body) { + Some(string) => string, + None => Expr::REPL_RUNTIME_CRASH, + } } LayoutRepr::Builtin(Builtin::List(elem_layout)) => app.call_function_returns_roc_list( main_fn_name, @@ -476,7 +473,7 @@ fn jit_to_ast_help<'a, A: ReplApp<'a>>( } Content::Structure(FlatType::Func(_, _, _)) => { // a function with a struct as the closure environment - OPAQUE_FUNCTION + Expr::REPL_OPAQUE_FUNCTION } other => { unreachable!( @@ -486,16 +483,21 @@ fn jit_to_ast_help<'a, A: ReplApp<'a>>( } }; - app.call_function_dynamic_size( + let opt_struct = app.call_function_dynamic_size( main_fn_name, result_stack_size as usize, struct_addr_to_ast, - ) + ); + + match opt_struct { + Some(struct_) => struct_, + None => Expr::REPL_RUNTIME_CRASH, + } } LayoutRepr::Union(UnionLayout::NonRecursive(_)) => { let size = env.layout_cache.interner.stack_size(layout); - app.call_function_dynamic_size( + let opt_union = app.call_function_dynamic_size( main_fn_name, size as usize, |mem: &'a A::Memory, addr: usize| { @@ -508,7 +510,12 @@ fn jit_to_ast_help<'a, A: ReplApp<'a>>( env.subs.get_root_key_without_compacting(raw_var), ) }, - ) + ); + + match opt_union { + Some(union_) => union_, + None => Expr::REPL_RUNTIME_CRASH, + } } LayoutRepr::Union(UnionLayout::Recursive(_)) | LayoutRepr::Union(UnionLayout::NonNullableUnwrapped(_)) @@ -516,7 +523,7 @@ fn jit_to_ast_help<'a, A: ReplApp<'a>>( | LayoutRepr::Union(UnionLayout::NullableWrapped { .. }) => { let size = env.layout_cache.interner.stack_size(layout); - app.call_function_dynamic_size( + let opt_union = app.call_function_dynamic_size( main_fn_name, size as usize, |mem: &'a A::Memory, addr: usize| { @@ -529,7 +536,12 @@ fn jit_to_ast_help<'a, A: ReplApp<'a>>( env.subs.get_root_key_without_compacting(raw_var), ) }, - ) + ); + + match opt_union { + Some(union_) => union_, + None => Expr::REPL_RUNTIME_CRASH, + } } LayoutRepr::RecursivePointer(_) => { unreachable!("RecursivePointers can only be inside structures") @@ -538,7 +550,7 @@ fn jit_to_ast_help<'a, A: ReplApp<'a>>( unreachable!("Ptr will never be visible to users") } LayoutRepr::LambdaSet(_) | LayoutRepr::FunctionPointer(_) | LayoutRepr::Erased(_) => { - OPAQUE_FUNCTION + Expr::REPL_OPAQUE_FUNCTION } }; @@ -578,7 +590,7 @@ fn addr_to_ast<'a, M: ReplAppMemory>( let expr = match (raw_content, layout) { (Content::Structure(FlatType::Func(_, _, _)), _) | (_, LayoutRepr::LambdaSet(_) | LayoutRepr::FunctionPointer(_) | LayoutRepr::Erased(_)) => { - OPAQUE_FUNCTION + Expr::REPL_OPAQUE_FUNCTION } (_, LayoutRepr::Builtin(Builtin::Bool)) => { // TODO: bits are not as expected here. @@ -1484,5 +1496,12 @@ fn number_literal_to_ast(arena: &Bump, num: T) -> Expr<'_> let mut string = bumpalo::collections::String::with_capacity_in(64, arena); write!(string, "{num}").unwrap(); - Expr::Num(string.into_bump_str()) + + if string == "inf" { + Expr::Num("∞") + } else if string == "-inf" { + Expr::Num("-∞") + } else { + Expr::Num(string.into_bump_str()) + } } diff --git a/crates/repl_eval/src/gen.rs b/crates/repl_eval/src/gen.rs index 658db41dd57..8aec07a5f36 100644 --- a/crates/repl_eval/src/gen.rs +++ b/crates/repl_eval/src/gen.rs @@ -52,7 +52,7 @@ pub fn compile_to_mono<'a, 'i, I: Iterator>( target_info: TargetInfo, palette: Palette, ) -> (Option>, Problems) { - let filename = PathBuf::from(""); + let filename = PathBuf::from("replfile.roc"); let src_dir = PathBuf::from("fake/test/path"); let (bytes_before_expr, module_src) = promote_expr_to_module(arena, defs, expr); let loaded = roc_load::load_and_monomorphize_from_str( diff --git a/crates/repl_eval/src/lib.rs b/crates/repl_eval/src/lib.rs index 5f5cbc58731..e7643ba30b9 100644 --- a/crates/repl_eval/src/lib.rs +++ b/crates/repl_eval/src/lib.rs @@ -25,12 +25,13 @@ pub trait ReplApp<'a> { self.call_function(main_fn_name, transform) } + /// When the executed code calls roc_panic, this function will return None fn call_function_returns_roc_str( &mut self, target_info: TargetInfo, main_fn_name: &str, transform: F, - ) -> T + ) -> Option where F: Fn(&'a Self::Memory, usize) -> T, Self::Memory: 'a, @@ -45,12 +46,14 @@ pub trait ReplApp<'a> { /// Run user code that returns a struct or union, whose size is provided as an argument /// The `transform` callback takes the app's memory and the address of the returned value + /// + /// When the executed code calls roc_panic, this function will return None fn call_function_dynamic_size( &mut self, main_fn_name: &str, ret_bytes: usize, transform: F, - ) -> T + ) -> Option where F: FnMut(&'a Self::Memory, usize) -> T, Self::Memory: 'a; diff --git a/crates/repl_expect/src/app.rs b/crates/repl_expect/src/app.rs index 4bfc364f102..d7f2085c0a7 100644 --- a/crates/repl_expect/src/app.rs +++ b/crates/repl_expect/src/app.rs @@ -121,7 +121,7 @@ impl<'a> ReplApp<'a> for ExpectReplApp<'a> { _target_info: TargetInfo, main_fn_name: &str, transform: F, - ) -> T + ) -> Option where F: Fn(&'a Self::Memory, usize) -> T, Self::Memory: 'a, @@ -138,11 +138,11 @@ impl<'a> ReplApp<'a> for ExpectReplApp<'a> { _main_fn_name: &str, _ret_bytes: usize, mut transform: F, - ) -> T + ) -> Option where F: FnMut(&'a Self::Memory, usize) -> T, Self::Memory: 'a, { - transform(self.memory, self.offset) + Some(transform(self.memory, self.offset)) } } diff --git a/crates/repl_expect/src/lib.rs b/crates/repl_expect/src/lib.rs index 752d0d8c0ca..42973c6c4da 100644 --- a/crates/repl_expect/src/lib.rs +++ b/crates/repl_expect/src/lib.rs @@ -4,7 +4,7 @@ use { roc_module::symbol::Interns, roc_mono::{ ir::ProcLayout, - layout::{GlobalLayoutInterner, LayoutCache, Niche}, + layout::{GlobalLayoutInterner, LayoutCache, LayoutInterner, Niche}, }, roc_parse::ast::Expr, roc_repl_eval::{eval::jit_to_ast, ReplAppMemory}, @@ -57,30 +57,30 @@ pub fn get_values<'a>( app.offset = start; - let expr = { - // TODO: pass layout_cache to jit_to_ast directly - let mut layout_cache = LayoutCache::new(layout_interner.fork(), target_info); - let layout = layout_cache.from_var(arena, variable, subs).unwrap(); - - let proc_layout = ProcLayout { - arguments: &[], - result: layout, - niche: Niche::NONE, - }; - - jit_to_ast( - arena, - app, - "expect_repl_main_fn", - proc_layout, - variable, - subs, - interns, - layout_interner.fork(), - target_info, - ) + // TODO: pass layout_cache to jit_to_ast directly + let mut layout_cache = LayoutCache::new(layout_interner.fork(), target_info); + let layout = layout_cache.from_var(arena, variable, subs).unwrap(); + + let proc_layout = ProcLayout { + arguments: &[], + result: layout, + niche: Niche::NONE, }; + let expr = jit_to_ast( + arena, + app, + "expect_repl_main_fn", + proc_layout, + variable, + subs, + interns, + layout_interner.fork(), + target_info, + ); + + app.offset += layout_cache.interner.stack_size_and_alignment(layout).0 as usize; + result.push(expr); result_vars.push(variable); } @@ -238,12 +238,12 @@ mod test { "# ), indoc!( - r#" + r" This expectation failed: 5│ expect 1 == 2 ^^^^^^^^^^^^^ - "# + " ), ); } @@ -265,7 +265,7 @@ mod test { "# ), indoc!( - r#" + r" This expectation failed: 5│> expect @@ -281,7 +281,7 @@ mod test { b : Num * b = 2 - "# + " ), ); } @@ -380,7 +380,7 @@ mod test { "# ), indoc!( - r#" + r" This expectation failed: 5│> expect @@ -397,7 +397,7 @@ mod test { expected : Result I64 [OutOfBounds] expected = Ok 42 - "# + " ), ); } @@ -463,7 +463,7 @@ mod test { "# ), indoc!( - r#" + r" This expectation failed: 5│> expect @@ -485,7 +485,7 @@ mod test { y : U8, } vec2 = { x: 4, y: 8 } - "# + " ), ); } @@ -965,22 +965,22 @@ mod test { fn issue_i4389() { run_expect_test( indoc!( - r#" + r" interface Test exposes [] imports [] expect totalCount = \{} -> 1u8 totalCount {} == 96u8 - "# + " ), indoc!( - r#" + r" This expectation failed: 3│> expect 4│> totalCount = \{} -> 1u8 5│> totalCount {} == 96u8 - "# + " ), ); } @@ -989,7 +989,7 @@ mod test { fn adjacent_lists() { run_expect_test( indoc!( - r#" + r" interface Test exposes [] imports [] expect @@ -1007,10 +1007,10 @@ mod test { x: [115, 116, 117], } actual == expected - "# + " ), indoc!( - r#" + r" This expectation failed: 3│> expect @@ -1044,7 +1044,7 @@ mod test { x : List (Int Unsigned8), } expected = { body: [42, 43, 44], headers: [15, 16, 17], x: [115, 116, 117] } - "# + " ), ); } @@ -1113,7 +1113,7 @@ mod test { fn tag_payloads_of_different_size() { run_expect_test( indoc!( - r#" + r" interface Test exposes [] imports [] actual : [Leftover (List U8), TooShort] @@ -1124,10 +1124,10 @@ mod test { expected = TooShort actual == expected - "# + " ), indoc!( - r#" + r" This expectation failed: 6│> expect @@ -1143,7 +1143,7 @@ mod test { TooShort, ] expected = TooShort - "# + " ), ); } @@ -1220,7 +1220,7 @@ mod test { fn match_on_opaque_number_type() { run_expect_test( indoc!( - r#" + r" interface Test exposes [] imports [] hexToByte : U8, U8 -> U8 @@ -1231,10 +1231,10 @@ mod test { actual = hexToByte 7 4 expected = 't' actual == expected - "# + " ), indoc!( - r#" + r" This expectation failed: 7│> expect @@ -1249,7 +1249,7 @@ mod test { expected : Int Unsigned8 expected = 116 - "# + " ), ); } diff --git a/crates/repl_expect/src/run.rs b/crates/repl_expect/src/run.rs index 8ce24d49ce0..1505ba63674 100644 --- a/crates/repl_expect/src/run.rs +++ b/crates/repl_expect/src/run.rs @@ -273,7 +273,7 @@ fn run_expect_pure<'a, W: std::io::Write>( let mut offset = ExpectSequence::START_OFFSET; for _ in 0..sequence.count_failures() { - offset += render_expect_failure( + offset = render_expect_failure( writer, &renderer, arena, @@ -731,5 +731,9 @@ pub fn expect_mono_module_to_dylib<'a>( ); } + if let Ok(path) = std::env::var("ROC_DEBUG_LLVM") { + env.module.print_to_file(path).unwrap(); + } + llvm_module_to_dylib(env.module, &target, opt_level).map(|lib| (lib, expects, layout_interner)) } diff --git a/crates/repl_test/src/tests.rs b/crates/repl_test/src/tests.rs index f7816f0a301..0b13e786629 100644 --- a/crates/repl_test/src/tests.rs +++ b/crates/repl_test/src/tests.rs @@ -100,6 +100,12 @@ fn num_ceil_checked_division_success() { ) } +#[test] +fn float_division_by_zero() { + expect_success("1f64 / 0", "∞ : F64"); + expect_success("-1f64 / 0", "-∞ : F64"); +} + #[test] fn bool_in_record() { expect_success("{ x: 1 == 1 }", "{ x: Bool.true } : { x : Bool }"); @@ -124,11 +130,11 @@ fn bool_basic_equality() { fn bool_true() { expect_success( indoc!( - r#" + r" Bool.true - "# + " ), - r#"Bool.true : Bool"#, + r"Bool.true : Bool", ); } @@ -136,11 +142,11 @@ fn bool_true() { fn bool_false() { expect_success( indoc!( - r#" + r" Bool.false - "# + " ), - r#"Bool.false : Bool"#, + r"Bool.false : Bool", ); } @@ -268,11 +274,6 @@ fn str_concat() { ); } -#[test] -fn str_count_graphemes() { - expect_success("Str.countGraphemes \"å🤔\"", "2 : Nat"); -} - #[test] fn literal_empty_list() { expect_success("[]", "[] : List *"); @@ -315,24 +316,24 @@ fn nested_string_list() { #[test] fn nested_num_list() { expect_success( - r#"[[[4, 3, 2], [1, 0]], [[]], []]"#, - r#"[[[4, 3, 2], [1, 0]], [[]], []] : List (List (List (Num *)))"#, + r"[[[4, 3, 2], [1, 0]], [[]], []]", + r"[[[4, 3, 2], [1, 0]], [[]], []] : List (List (List (Num *)))", ); } #[test] fn nested_int_list() { expect_success( - r#"[[[4, 3, 2], [1, 0x0]], [[]], []]"#, - r#"[[[4, 3, 2], [1, 0]], [[]], []] : List (List (List (Int *)))"#, + r"[[[4, 3, 2], [1, 0x0]], [[]], []]", + r"[[[4, 3, 2], [1, 0]], [[]], []] : List (List (List (Int *)))", ); } #[test] fn nested_float_list() { expect_success( - r#"[[[4, 3, 2], [1, 0.0]], [[]], []]"#, - r#"[[[4, 3, 2], [1, 0]], [[]], []] : List (List (List (Frac *)))"#, + r"[[[4, 3, 2], [1, 0.0]], [[]], []]", + r"[[[4, 3, 2], [1, 0]], [[]], []] : List (List (List (Frac *)))", ); } @@ -641,7 +642,7 @@ fn too_few_args() { expect_failure( "Num.add 2", indoc!( - r#" + r" ── TOO FEW ARGS ──────────────────────────────────────────────────────────────── The add function expects 2 arguments, but it got only 1: @@ -651,7 +652,7 @@ fn too_few_args() { Roc does not allow functions to be partially applied. Use a closure to make partial application explicit. - "# + " ), ); } @@ -738,14 +739,14 @@ fn type_problem_unary_operator() { #[test] fn type_problem_string_interpolation() { expect_failure( - "\"This is not a string -> \\(1)\"", + "\"This is not a string -> $(1)\"", indoc!( r#" ── TYPE MISMATCH ─────────────────────────────────────────────────────────────── This argument to this string interpolation has an unexpected type: - 4│ "This is not a string -> \(1)" + 4│ "This is not a string -> $(1)" ^ The argument is a number of type: @@ -760,6 +761,84 @@ fn type_problem_string_interpolation() { ); } +#[cfg(not(feature = "wasm"))] // TODO: mismatch is due to terminal control codes! +#[test] +fn list_drop_at_negative_index() { + expect_failure( + "List.dropAt [1, 2, 3] -1", + indoc!( + r#" + ── TYPE MISMATCH ─────────────────────────────────────────────────────────────── + + This 2nd argument to dropAt has an unexpected type: + + 4│ List.dropAt [1, 2, 3] -1 + ^^ + + The argument is a number of type: + + I8, I16, F32, I32, F64, I64, I128, or Dec + + But dropAt needs its 2nd argument to be: + + Nat + "# + ), + ); +} + +#[cfg(not(feature = "wasm"))] // TODO: mismatch is due to terminal control codes! +#[test] +fn list_get_negative_index() { + expect_failure( + "List.get [1, 2, 3] -1", + indoc!( + r#" + ── TYPE MISMATCH ─────────────────────────────────────────────────────────────── + + This 2nd argument to get has an unexpected type: + + 4│ List.get [1, 2, 3] -1 + ^^ + + The argument is a number of type: + + I8, I16, F32, I32, F64, I64, I128, or Dec + + But get needs its 2nd argument to be: + + Nat + "# + ), + ); +} + +#[cfg(not(feature = "wasm"))] // TODO: mismatch is due to terminal control codes! +#[test] +fn invalid_string_interpolation() { + expect_failure( + "\"$(123)\"", + indoc!( + r#" + ── TYPE MISMATCH ─────────────────────────────────────────────────────────────── + + This argument to this string interpolation has an unexpected type: + + 4│ "$(123)" + ^^^ + + The argument is a number of type: + + Num * + + But this string interpolation needs its argument to be: + + Str + "# + ), + ); +} + #[test] fn issue_2149_i8_ok() { expect_success(r#"Str.toI8 "127""#, "Ok 127 : Result I8 [InvalidNumStr]"); @@ -970,7 +1049,7 @@ fn large_nullable_wrapped_tag_union() { fn issue_2300() { expect_success( r#"\Email str -> str == """#, - r#" : [Email Str] -> Bool"#, + r" : [Email Str] -> Bool", ) } @@ -978,8 +1057,8 @@ fn issue_2300() { #[test] fn function_in_list() { expect_success( - r#"[\x -> x + 1, \s -> s * 2]"#, - r#"[, ] : List (Num a -> Num a)"#, + r"[\x -> x + 1, \s -> s * 2]", + r"[, ] : List (Num a -> Num a)", ) } @@ -987,8 +1066,8 @@ fn function_in_list() { #[test] fn function_in_record() { expect_success( - r#"{ n: 1, adder: \x -> x + 1 }"#, - r#"{ adder: , n: 1 } : { adder : Num a -> Num a, n : Num * }"#, + r"{ n: 1, adder: \x -> x + 1 }", + r"{ adder: , n: 1 } : { adder : Num a -> Num a, n : Num * }", ) } @@ -996,8 +1075,8 @@ fn function_in_record() { #[test] fn function_in_unwrapped_record() { expect_success( - r#"{ adder: \x -> x + 1 }"#, - r#"{ adder: } : { adder : Num a -> Num a }"#, + r"{ adder: \x -> x + 1 }", + r"{ adder: } : { adder : Num a -> Num a }", ) } @@ -1005,16 +1084,16 @@ fn function_in_unwrapped_record() { #[test] fn function_in_tag() { expect_success( - r#"Adder (\x -> x + 1)"#, - r#"Adder : [Adder (Num a -> Num a)]"#, + r"Adder (\x -> x + 1)", + r"Adder : [Adder (Num a -> Num a)]", ) } #[test] fn newtype_of_record_of_tag_of_record_of_tag() { expect_success( - r#"A {b: C {d: 1}}"#, - r#"A { b: C { d: 1 } } : [A { b : [C { d : Num * }] }]"#, + r"A {b: C {d: 1}}", + r"A { b: C { d: 1 } } : [A { b : [C { d : Num * }] }]", ) } @@ -1022,11 +1101,11 @@ fn newtype_of_record_of_tag_of_record_of_tag() { fn print_u8s() { expect_success( indoc!( - r#" + r" x : U8 x = 129 x - "# + " ), "129 : U8", ) @@ -1062,17 +1141,17 @@ fn parse_problem() { fn issue_2343_complete_mono_with_shadowed_vars() { expect_failure( indoc!( - r#" + r" b = False f = \b -> when b is True -> 5 False -> 15 f b - "# + " ), indoc!( - r#" + r" ── DUPLICATE NAME ────────────────────────────────────────────────────────────── The b name is first defined here: @@ -1087,7 +1166,7 @@ fn issue_2343_complete_mono_with_shadowed_vars() { Since these variables have the same name, it's easy to use the wrong one by accident. Give one of them a new name. - "# + " ), ); } @@ -1126,12 +1205,12 @@ fn tag_with_type_behind_alias() { fn issue_2588_record_with_function_and_nonfunction() { expect_success( indoc!( - r#" + r" x = 1 f = \n -> n * 2 - { y: f x, f }"# + { y: f x, f }" ), - r#"{ f: , y: 2 } : { f : Num a -> Num a, y : Num * }"#, + r"{ f: , y: 2 } : { f : Num a -> Num a, y : Num * }", ) } @@ -1139,10 +1218,10 @@ fn issue_2588_record_with_function_and_nonfunction() { fn opaque_apply() { expect_success( indoc!( - r#" + r" Age := U32 - @Age 23"# + @Age 23" ), "@Age 23 : Age", ) @@ -1165,14 +1244,14 @@ fn opaque_apply_polymorphic() { fn opaque_pattern_and_call() { expect_success( indoc!( - r#" + r" F t u := [Package t u] f = \@F (Package A {}) -> @F (Package {} A) - f (@F (Package A {}))"# + f (@F (Package A {}))" ), - r#"@F (Package {} A) : F {} [A]"#, + r"@F (Package {} A) : F {} [A]", ) } @@ -1180,10 +1259,10 @@ fn opaque_pattern_and_call() { fn dec_in_repl() { expect_success( indoc!( - r#" + r" x: Dec x=1.23 - x"# + x" ), "1.23 : Dec", ) @@ -1193,12 +1272,12 @@ fn dec_in_repl() { fn print_i8_issue_2710() { expect_success( indoc!( - r#" + r" a : I8 a = -1 - a"# + a" ), - r#"-1 : I8"#, + r"-1 : I8", ) } @@ -1243,11 +1322,11 @@ fn issue_2582_specialize_result_value() { fn issue_2818() { expect_success( indoc!( - r#" + r" f : {} -> List Str f = \_ -> x = [] - x"# + x" ), r" : {} -> List Str", ) @@ -1257,7 +1336,7 @@ fn issue_2818() { fn issue_2810_recursive_layout_inside_nonrecursive() { expect_success( indoc!( - r#" + r" Command : [Command Tool] Job : [Job Command] @@ -1266,7 +1345,7 @@ fn issue_2810_recursive_layout_inside_nonrecursive() { a : Job a = Job (Command (FromJob (Job (Command SystemTool)))) - a"# + a" ), "Job (Command (FromJob (Job (Command SystemTool)))) : Job", ) @@ -1276,12 +1355,12 @@ fn issue_2810_recursive_layout_inside_nonrecursive() { fn render_nullable_unwrapped_passing_through_alias() { expect_success( indoc!( - r#" + r" Deep : [L DeepList] DeepList : [Nil, Cons Deep] v : DeepList v = (Cons (L (Cons (L (Cons (L Nil)))))) - v"# + v" ), "Cons (L (Cons (L (Cons (L Nil))))) : DeepList", ) @@ -1291,9 +1370,9 @@ fn render_nullable_unwrapped_passing_through_alias() { fn opaque_wrap_function() { expect_success( indoc!( - r#" + r" A a := a - List.map [1u8, 2u8, 3u8] @A"# + List.map [1u8, 2u8, 3u8] @A" ), "[@A 1, @A 2, @A 3] : List (A U8)", ); @@ -1305,10 +1384,10 @@ fn opaque_wrap_function() { fn dict_get_single() { expect_success( indoc!( - r#" - Dict.single 0 {a: 1, c: 2} |> Dict.get 0"# + r" + Dict.single 0 {a: 1, c: 2} |> Dict.get 0" ), - r#"Ok { a: 1, c: 2 } : Result { a : Num *, c : Num * } [KeyNotFound]"#, + r"Ok { a: 1, c: 2 } : Result { a : Num *, c : Num * } [KeyNotFound]", ) } @@ -1319,7 +1398,7 @@ fn record_of_poly_function() { r#" { a: \_ -> "a" }"# ), - r#"{ a: } : { a : * -> Str }"#, + r"{ a: } : { a : * -> Str }", ); } @@ -1338,18 +1417,18 @@ fn record_of_poly_function_and_string() { fn newtype_by_void_is_wrapped() { expect_success( indoc!( - r#" - Result.try (Err 42) (\x -> Err (x+1))"# + r" + Result.try (Err 42) (\x -> Err (x+1))" ), - r#"Err 42 : Result b (Num *)"#, + r"Err 42 : Result b (Num *)", ); expect_success( indoc!( - r#" - Result.try (Ok 42) (\x -> Ok (x+1))"# + r" + Result.try (Ok 42) (\x -> Ok (x+1))" ), - r#"Ok 43 : Result (Num *) err"#, + r"Ok 43 : Result (Num *) err", ); } @@ -1357,11 +1436,11 @@ fn newtype_by_void_is_wrapped() { fn enum_tag_union_in_list() { expect_success( indoc!( - r#" + r" [E, F, G, H] - "# + " ), - r#"[E, F, G, H] : List [E, F, G, H]"#, + r"[E, F, G, H] : List [E, F, G, H]", ); } @@ -1373,7 +1452,7 @@ fn str_to_dec() { Str.toDec "1234.1234" "# ), - r#"Ok 1234.1234 : Result Dec [InvalidNumStr]"#, + r"Ok 1234.1234 : Result Dec [InvalidNumStr]", ); } @@ -1405,7 +1484,7 @@ fn nested_tuple() { fn ordered_tag_union_memory_layout() { expect_success( indoc!( - r#" + r" Loc : { line: U32, column: U32 } Node : [ A Loc, Height U8 Loc ] @@ -1413,9 +1492,9 @@ fn ordered_tag_union_memory_layout() { x : Node x = Height 1 { line: 2, column: 3 } x - "# + " ), - r#"Height 1 { column: 3, line: 2 } : Node"#, + r"Height 1 { column: 3, line: 2 } : Node", ); } @@ -1424,7 +1503,7 @@ fn interpolation_with_nested_strings() { expect_success( indoc!( r#" - "foo \(Str.joinWith ["a", "b", "c"] ", ") bar" + "foo $(Str.joinWith ["a", "b", "c"] ", ") bar" "# ), r#""foo a, b, c bar" : Str"#, @@ -1436,7 +1515,7 @@ fn interpolation_with_num_to_str() { expect_success( indoc!( r#" - "foo \(Num.toStr Num.maxI8) bar" + "foo $(Num.toStr Num.maxI8) bar" "# ), r#""foo 127 bar" : Str"#, @@ -1448,7 +1527,7 @@ fn interpolation_with_operator_desugaring() { expect_success( indoc!( r#" - "foo \(Num.toStr (1 + 2)) bar" + "foo $(Num.toStr (1 + 2)) bar" "# ), r#""foo 3 bar" : Str"#, @@ -1463,7 +1542,7 @@ fn interpolation_with_nested_interpolation() { expect_failure( indoc!( r#" - "foo \(Str.joinWith ["a\(Num.toStr 5)", "b"] "c")" + "foo $(Str.joinWith ["a$(Num.toStr 5)", "b"] "c")" "# ), indoc!( @@ -1472,7 +1551,7 @@ fn interpolation_with_nested_interpolation() { This string interpolation is invalid: - 4│ "foo \(Str.joinWith ["a\(Num.toStr 5)", "b"] "c")" + 4│ "foo $(Str.joinWith ["a$(Num.toStr 5)", "b"] "c")" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ String interpolations cannot contain newlines or other interpolations. diff --git a/crates/repl_wasm/.gitignore b/crates/repl_wasm/.gitignore deleted file mode 100644 index f80caa7cf36..00000000000 --- a/crates/repl_wasm/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -# wasm-pack -/pkg - -# shell script output -/build diff --git a/crates/repl_wasm/src/repl.rs b/crates/repl_wasm/src/repl.rs index 077808afe2d..cb6b6822e17 100644 --- a/crates/repl_wasm/src/repl.rs +++ b/crates/repl_wasm/src/repl.rs @@ -160,7 +160,7 @@ impl<'a> ReplApp<'a> for WasmReplApp<'a> { _main_fn_name: &str, _ret_bytes: usize, mut transform: F, - ) -> T + ) -> Option where F: FnMut(&'a Self::Memory, usize) -> T, Self::Memory: 'a, @@ -172,7 +172,7 @@ impl<'a> ReplApp<'a> for WasmReplApp<'a> { let app_result_addr = js_get_result_and_memory(copied_bytes.as_mut_ptr()); let mem = self.arena.alloc(WasmMemory { copied_bytes }); - transform(mem, app_result_addr) + Some(transform(mem, app_result_addr)) } } diff --git a/crates/reporting/.gitignore b/crates/reporting/.gitignore deleted file mode 100644 index cad23091000..00000000000 --- a/crates/reporting/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/tmp \ No newline at end of file diff --git a/crates/reporting/src/cli.rs b/crates/reporting/src/cli.rs index 9447fdf0d6d..9c6582f7cef 100644 --- a/crates/reporting/src/cli.rs +++ b/crates/reporting/src/cli.rs @@ -2,6 +2,7 @@ use std::path::PathBuf; use roc_collections::MutMap; use roc_module::symbol::{Interns, ModuleId}; +use roc_problem::can::Problem; use roc_region::all::LineInfo; use roc_solve_problem::TypeError; @@ -17,8 +18,10 @@ impl Problems { // 0 means no problems, 1 means errors, 2 means warnings if self.errors > 0 { 1 + } else if self.warnings > 0 { + 2 } else { - self.warnings.min(1) as i32 + 0 } } @@ -87,29 +90,6 @@ pub fn report_problems( // Report parsing and canonicalization problems let alloc = RocDocAllocator::new(&src_lines, *home, interns); - let problems = can_problems.remove(home).unwrap_or_default(); - - for problem in problems.into_iter() { - let report = can_problem(&alloc, &lines, module_path.clone(), problem); - let severity = report.severity; - let mut buf = String::new(); - - report.render_color_terminal(&mut buf, &alloc, &palette); - - match severity { - Warning => { - warnings.push(buf); - } - RuntimeError => { - errors.push(buf); - } - Fatal => { - fatally_errored = true; - errors.push(buf); - } - } - } - let problems = type_problems.remove(home).unwrap_or_default(); for problem in problems { @@ -133,6 +113,43 @@ pub fn report_problems( } } } + + // Shadowing errors often cause cryptic type errors. To make it easy to spot the root cause, + // we print the shadowing errors last. + let problems = can_problems.remove(home).unwrap_or_default(); + let (shadowing_errs, mut ordered): (Vec, Vec) = + problems.into_iter().partition(|p| { + matches!( + p, + Problem::Shadowing { + original_region: _, + shadow: _, + kind: _, + } + ) + }); + ordered.extend(shadowing_errs); + + for problem in ordered.into_iter() { + let report = can_problem(&alloc, &lines, module_path.clone(), problem); + let severity = report.severity; + let mut buf = String::new(); + + report.render_color_terminal(&mut buf, &alloc, &palette); + + match severity { + Warning => { + warnings.push(buf); + } + RuntimeError => { + errors.push(buf); + } + Fatal => { + fatally_errored = true; + errors.push(buf); + } + } + } } debug_assert!(can_problems.is_empty() && type_problems.is_empty(), "After reporting problems, there were {:?} can_problems and {:?} type_problems that could not be reported because they did not have corresponding entries in `sources`.", can_problems.len(), type_problems.len()); diff --git a/crates/reporting/src/error/parse.rs b/crates/reporting/src/error/parse.rs index ecbe2cc3551..9b64ed5a4e9 100644 --- a/crates/reporting/src/error/parse.rs +++ b/crates/reporting/src/error/parse.rs @@ -3910,6 +3910,28 @@ fn to_packages_report<'a>( severity: Severity::RuntimeError, } } + EPackages::ListEnd(pos) => { + let surroundings = Region::new(start, pos); + let region = LineColumnRegion::from_pos(lines.convert_pos(pos)); + + let doc = alloc.stack([ + alloc.reflow( + r"I am partway through parsing a list of packages, but I got stuck here:", + ), + alloc.region_with_subregion(lines.convert_region(surroundings), region), + alloc.concat([alloc.reflow("I am expecting a comma or end of list, like")]), + alloc + .parser_suggestion("packages { package_name: \"url-or-path\", }") + .indent(4), + ]); + + Report { + filename, + doc, + title: "WEIRD PACKAGES LIST".to_string(), + severity: Severity::RuntimeError, + } + } EPackages::Space(error, pos) => to_space_report(alloc, lines, filename, &error, pos), diff --git a/crates/reporting/src/report.rs b/crates/reporting/src/report.rs index 7c6a8051c53..d4b08bf43f8 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 @@ -163,7 +166,7 @@ impl<'b> Report<'b> { if self.title.is_empty() { self.doc } else { - let header = if self.filename == PathBuf::from("") { + let header = if self.filename == PathBuf::from("replfile.roc") { crate::report::pretty_header(&self.title) } else { crate::report::pretty_header_with_path(&self.title, &self.filename) @@ -1649,6 +1652,42 @@ pub fn to_file_problem_report<'b>( severity: Severity::Fatal, } } + io::ErrorKind::Unsupported => { + let doc = match filename.extension() { + Some(ext) => alloc.concat(vec![ + alloc.reflow(r"I expected a file with extension `.roc` or without extension."), + alloc.hardline(), + alloc.reflow(r"Instead I received a file with extension `."), + alloc.as_string(ext.to_string_lossy()), + alloc.as_string("`."), + ]), + None => { + alloc.stack(vec![ + alloc.vcat(vec![ + alloc.reflow(r"I expected a file with either:"), + alloc.reflow("- extension `.roc`"), + alloc.intersperse( + "- no extension and a roc shebang as the first line, e.g. `#!/home/username/bin/roc_nightly/roc`" + .split(char::is_whitespace), + alloc.concat(vec![ alloc.hardline(), alloc.text(" ")]).flat_alt(alloc.space()).group() + ), + ]), + alloc.concat(vec![ + alloc.reflow("The provided file did not start with a shebang `#!` containing the string `roc`. Is "), + alloc.as_string(filename.to_string_lossy()), + alloc.reflow(" a Roc file?"), + ]) + ]) + } + }; + + Report { + filename, + doc, + title: "NOT A ROC FILE".to_string(), + severity: Severity::Fatal, + } + } _ => { let error = std::io::Error::from(error); let formatted = format!("{error}"); diff --git a/crates/roc_std/.gitignore b/crates/roc_std/.gitignore deleted file mode 100644 index e0292b19e02..00000000000 --- a/crates/roc_std/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -*.o -*.a diff --git a/crates/roc_std/src/lib.rs b/crates/roc_std/src/lib.rs index f9c4dfbdb54..677c4f63275 100644 --- a/crates/roc_std/src/lib.rs +++ b/crates/roc_std/src/lib.rs @@ -310,10 +310,9 @@ impl RocDec { } }; - let opt_after_point = match parts.next() { - Some(answer) if answer.len() <= Self::DECIMAL_PLACES => Some(answer), - _ => None, - }; + let opt_after_point = parts + .next() + .map(|answer| &answer[..Ord::min(answer.len(), Self::DECIMAL_PLACES)]); // There should have only been one "." in the string! if parts.next().is_some() { diff --git a/crates/roc_std/src/roc_str.rs b/crates/roc_std/src/roc_str.rs index 68e85ee2836..3ff02f26491 100644 --- a/crates/roc_std/src/roc_str.rs +++ b/crates/roc_std/src/roc_str.rs @@ -361,7 +361,7 @@ impl RocStr { let ptr = if len < big_string.capacity() { // We happen to have excess capacity already, so we will be able // to write the terminator into the first byte of excess capacity. - big_string.ptr_to_first_elem() as *mut u8 + big_string.ptr_to_first_elem() } else { // We always have an allocation that's even bigger than necessary, // because the refcount bytes take up more than the 1B needed for @@ -376,7 +376,7 @@ impl RocStr { // // IMPORTANT: Must use ptr::copy instead of ptr::copy_nonoverlapping // because the regions definitely overlap! - ptr::copy(big_string.ptr_to_first_elem() as *mut u8, alloc_ptr, len); + ptr::copy(big_string.ptr_to_first_elem(), alloc_ptr, len); alloc_ptr }; @@ -388,7 +388,7 @@ impl RocStr { // The backing list was not unique, so we can't mutate it in-place. // ask for `len + 1` to store the original string and the terminator with_stack_bytes(len + 1, |alloc_ptr: *mut u8| { - let elem_ptr = big_string.ptr_to_first_elem() as *mut u8; + let elem_ptr = big_string.ptr_to_first_elem(); // memcpy the bytes into the stack allocation std::ptr::copy_nonoverlapping(elem_ptr, alloc_ptr, len); diff --git a/crates/roc_std/tests/test_roc_std.rs b/crates/roc_std/tests/test_roc_std.rs index f21565ba435..2b58f904a2b 100644 --- a/crates/roc_std/tests/test_roc_std.rs +++ b/crates/roc_std/tests/test_roc_std.rs @@ -300,6 +300,11 @@ mod test_roc_std { let example = RocDec::from_str("1000.000").unwrap(); assert_eq!(format!("{example}"), "1000"); + + // truncate if there are more digits than supported + let example = + RocDec::from_str("3.14159265358979323846264338327950288419716939937510").unwrap(); + assert_eq!(format!("{example}"), "3.141592653589793238"); } #[test] diff --git a/crates/valgrind/src/lib.rs b/crates/valgrind/src/lib.rs index 90e110c5b75..00efead061e 100644 --- a/crates/valgrind/src/lib.rs +++ b/crates/valgrind/src/lib.rs @@ -149,7 +149,7 @@ fn run_with_valgrind(binary_path: &std::path::Path) { let memory_errors = extract_valgrind_errors(&raw_xml).unwrap_or_else(|err| { panic!( indoc!( - r#" + r" failed to parse the `valgrind` xml output: Error was: @@ -167,7 +167,7 @@ fn run_with_valgrind(binary_path: &std::path::Path) { valgrind stderr was: {} - "# + " ), err, raw_xml, valgrind_out.stdout, valgrind_out.stderr ); @@ -214,7 +214,7 @@ fn list_concat_consumes_first_argument() { #[test] fn list_concat_consumes_second_argument() { valgrind_test(indoc!( - r#" + r" ( a : List U8 a = [] @@ -223,7 +223,7 @@ fn list_concat_consumes_second_argument() { |> List.len |> Num.toStr ) - "# + " )); } @@ -232,16 +232,6 @@ fn str_capacity_concat() { valgrind_test(r#"Str.withCapacity 42 |> Str.concat "foobar""#); } -#[test] -fn append_scalar() { - valgrind_test(indoc!( - r#" - Str.appendScalar "abcd" 'A' - |> Result.withDefault "" - "# - )); -} - #[test] fn split_not_present() { valgrind_test(indoc!( @@ -273,7 +263,7 @@ fn str_concat_first_argument_not_unique() { #[test] fn list_concat_empty_list_zero_sized_type() { valgrind_test(indoc!( - r#" + r" ( a = List.reserve [] 11 b = [] @@ -281,7 +271,7 @@ fn list_concat_empty_list_zero_sized_type() { |> List.len |> Num.toStr ) - "# + " )); } @@ -316,7 +306,7 @@ fn str_trim_start_capacity() { #[test] fn str_concat_later_referencing_empty_list_with_capacity() { valgrind_test(indoc!( - r#" + r" ( a : List U8 a = List.withCapacity 1 @@ -326,7 +316,7 @@ fn str_concat_later_referencing_empty_list_with_capacity() { |> Num.addWrap (List.len a) |> Num.toStr ) - "# + " )); } @@ -355,7 +345,7 @@ fn joinpoint_with_closure() { catSound = makeSound Cat dogSound = makeSound Dog gooseSound = makeSound Goose - "Cat: \(catSound), Dog: \(dogSound), Goose: \(gooseSound)" + "Cat: $(catSound), Dog: $(dogSound), Goose: $(gooseSound)" test ) @@ -384,7 +374,7 @@ fn joinpoint_with_reuse() { Cons x xs -> strX = f x strXs = printLinkedList xs f - "Cons \(strX) (\(strXs))" + "Cons $(strX) ($(strXs))" test = newList = mapLinkedList (Cons 1 (Cons 2 (Cons 3 Nil))) (\x -> x + 1) @@ -471,7 +461,7 @@ fn tree_rebalance() { sL = nodeInParens left showKey showValue sR = nodeInParens right showKey showValue - "Node \(sColor) \(sKey) \(sValue) \(sL) \(sR)" + "Node $(sColor) $(sKey) $(sValue) $(sL) $(sR)" nodeInParens : RedBlackTree k v, (k -> Str), (v -> Str) -> Str nodeInParens = \tree, showKey, showValue -> @@ -482,7 +472,7 @@ fn tree_rebalance() { Node _ _ _ _ _ -> inner = showRBTree tree showKey showValue - "(\(inner))" + "($(inner))" showColor : NodeColor -> Str showColor = \color -> @@ -504,7 +494,7 @@ fn tree_rebalance() { #[test] fn lowlevel_list_calls() { valgrind_test(indoc!( - r#" + r" ( a = List.map [1,1,1,1,1] (\x -> x + 0) b = List.map2 a [1,1,1,1,1] (\x, y -> x + y) @@ -514,7 +504,7 @@ fn lowlevel_list_calls() { Num.toStr (List.len e) ) - "# + " )); } @@ -531,7 +521,7 @@ fn joinpoint_nullpointer() { Nil -> "Nil" Cons x xs -> strXs = printLinkedList xs - "Cons \(x) (\(strXs))" + "Cons $(x) ($(strXs))" linkedListHead : LinkedList Str -> LinkedList Str linkedListHead = \linkedList -> @@ -543,10 +533,36 @@ fn joinpoint_nullpointer() { test = cons = printLinkedList (linkedListHead (Cons "foo" Nil)) nil = printLinkedList (linkedListHead (Nil)) - "\(cons) - \(nil)" + "$(cons) - $(nil)" test ) "# )); } + +#[test] +fn freeing_boxes() { + valgrind_test(indoc!( + r#" + ( + # Without refcounted field + a : I32 + a = 7 + |> Box.box + |> Box.unbox + + # With refcounted field + b : Str + b = + "Testing123. This will definitely be a large string that is on the heap." + |> Box.box + |> Box.unbox + + a + |> Num.toStr + |> Str.concat b + ) + "# + )); +} diff --git a/crates/valgrind/zig-platform/.gitignore b/crates/valgrind/zig-platform/.gitignore deleted file mode 100644 index 6bdb530fa21..00000000000 --- a/crates/valgrind/zig-platform/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -dynhost -libapp.so \ No newline at end of file diff --git a/crates/vendor/morphic_lib/.gitignore b/crates/vendor/morphic_lib/.gitignore deleted file mode 100644 index 96ef6c0b944..00000000000 --- a/crates/vendor/morphic_lib/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/target -Cargo.lock diff --git a/crates/wasm_module/src/parse.rs b/crates/wasm_module/src/parse.rs index 753ebe9530e..ad21b58b3d0 100644 --- a/crates/wasm_module/src/parse.rs +++ b/crates/wasm_module/src/parse.rs @@ -255,9 +255,9 @@ mod tests { decode_u32(&[0xff, 0xff, 0xff, 0xff, 0x0f]), Ok((u32::MAX, MAX_SIZE_ENCODED_U32)) ); - assert!(matches!(decode_u32(&[0x80; 6]), Err(_))); - assert!(matches!(decode_u32(&[0x80; 2]), Err(_))); - assert!(matches!(decode_u32(&[]), Err(_))); + assert!(decode_u32(&[0x80; 6]).is_err()); + assert!(decode_u32(&[0x80; 2]).is_err()); + assert!(decode_u32(&[]).is_err()); } #[test] diff --git a/devtools/README.md b/devtools/README.md index 96bcfde9880..fee1be5ed07 100755 --- a/devtools/README.md +++ b/devtools/README.md @@ -1,5 +1,7 @@ # devtools +[Install nix](https://github.com/roc-lang/roc/blob/main/BUILDING_FROM_SOURCE.md#installing-nix) if you have not already done so. + To make rust-analyzer and other vscode extensions work well you want them using the same rustc, glibc, zig... as specified in the roc nix flake. The easiest way to do this is to use another flake for all your dev tools that takes the roc flake as an input. diff --git a/examples/.gitignore b/examples/.gitignore deleted file mode 100644 index 05228d91667..00000000000 --- a/examples/.gitignore +++ /dev/null @@ -1,18 +0,0 @@ -*.dSYM -libhost.a -libapp.so -dynhost -*.rm -*.rh - -helloWorld -helloWorldNoURL -inspect-gui -inspect-logging -swiftui -parser/examples/example -gui/hello-gui -gui/breakout/breakout -gui/breakout/hello-gui -webserver/echo -webserver/http \ No newline at end of file diff --git a/examples/GuiFormatter.roc b/examples/GuiFormatter.roc index 1a060911a15..1e081e95125 100644 --- a/examples/GuiFormatter.roc +++ b/examples/GuiFormatter.roc @@ -149,7 +149,7 @@ bool = \b -> str : Str -> Inspector GuiFormatter str = \s -> f0 <- Inspect.custom - addNode f0 (Text "\"\(s)\"") + addNode f0 (Text "\"$(s)\"") opaque : * -> Inspector GuiFormatter opaque = \_ -> diff --git a/examples/cli/.gitignore b/examples/cli/.gitignore deleted file mode 100644 index 95d47a0ea98..00000000000 --- a/examples/cli/.gitignore +++ /dev/null @@ -1,13 +0,0 @@ -args -countdown -echo -effects -file -form -tui -http-get -file-io -env -ingested-file -ingested-file-bytes -out.txt diff --git a/examples/cli/argsBROKEN.roc b/examples/cli/argsBROKEN.roc index d56b88c5828..79d064c7e74 100644 --- a/examples/cli/argsBROKEN.roc +++ b/examples/cli/argsBROKEN.roc @@ -1,5 +1,5 @@ app "args" - packages { pf: "https://github.com/roc-lang/basic-cli/releases/download/0.7.1/Icc3xJoIixF3hCcfXrDwLCu4wQHtNdPyoJkEbkgIElA.tar.br" } + packages { pf: "https://github.com/roc-lang/basic-cli/releases/download/0.8.1/x8URkvfyi9I0QhmVG98roKBUs_AZRkLFwFJVJ3942YA.tar.br" } imports [pf.Stdout, pf.Arg, pf.Task.{ Task }] provides [main] to pf diff --git a/examples/cli/countdown.roc b/examples/cli/countdown.roc index 13ddb94d24f..9fab0cc874b 100644 --- a/examples/cli/countdown.roc +++ b/examples/cli/countdown.roc @@ -1,5 +1,5 @@ app "countdown" - packages { pf: "https://github.com/roc-lang/basic-cli/releases/download/0.7.1/Icc3xJoIixF3hCcfXrDwLCu4wQHtNdPyoJkEbkgIElA.tar.br" } + packages { pf: "https://github.com/roc-lang/basic-cli/releases/download/0.8.1/x8URkvfyi9I0QhmVG98roKBUs_AZRkLFwFJVJ3942YA.tar.br" } imports [pf.Stdin, pf.Stdout, pf.Task.{ await, loop }] provides [main] to pf @@ -13,6 +13,6 @@ tick = \n -> _ <- await (Stdout.line "🎉 SURPRISE! Happy Birthday! 🎂") Task.ok (Done {}) else - _ <- await (n |> Num.toStr |> \s -> "\(s)..." |> Stdout.line) + _ <- await (n |> Num.toStr |> \s -> "$(s)..." |> Stdout.line) _ <- await Stdin.line Task.ok (Step (n - 1)) diff --git a/examples/cli/echo.roc b/examples/cli/echo.roc index 034e7fd4c19..6d82ad603ff 100644 --- a/examples/cli/echo.roc +++ b/examples/cli/echo.roc @@ -1,5 +1,5 @@ app "echo" - packages { pf: "https://github.com/roc-lang/basic-cli/releases/download/0.7.1/Icc3xJoIixF3hCcfXrDwLCu4wQHtNdPyoJkEbkgIElA.tar.br" } + packages { pf: "https://github.com/roc-lang/basic-cli/releases/download/0.8.1/x8URkvfyi9I0QhmVG98roKBUs_AZRkLFwFJVJ3942YA.tar.br" } imports [pf.Stdin, pf.Stdout, pf.Task.{ Task }] provides [main] to pf diff --git a/examples/cli/effects.roc b/examples/cli/effects.roc index 7c434bd79fe..280eccfab6e 100644 --- a/examples/cli/effects.roc +++ b/examples/cli/effects.roc @@ -9,7 +9,7 @@ main = (Effect.getLine) \line -> Effect.after - (Effect.putLine "You entered: \(line)") + (Effect.putLine "You entered: $(line)") \{} -> Effect.after (Effect.putLine "It is known") diff --git a/examples/cli/env.roc b/examples/cli/env.roc index 41fbd6a61e2..480e33e0a5a 100644 --- a/examples/cli/env.roc +++ b/examples/cli/env.roc @@ -1,5 +1,5 @@ app "env" - packages { pf: "https://github.com/roc-lang/basic-cli/releases/download/0.7.1/Icc3xJoIixF3hCcfXrDwLCu4wQHtNdPyoJkEbkgIElA.tar.br" } + packages { pf: "https://github.com/roc-lang/basic-cli/releases/download/0.8.1/x8URkvfyi9I0QhmVG98roKBUs_AZRkLFwFJVJ3942YA.tar.br" } imports [pf.Stdout, pf.Stderr, pf.Env, pf.Task.{ Task }] provides [main] to pf @@ -7,7 +7,7 @@ main : Task {} I32 main = task = Env.decode "EDITOR" - |> Task.await (\editor -> Stdout.line "Your favorite editor is \(editor)!") + |> Task.await (\editor -> Stdout.line "Your favorite editor is $(editor)!") |> Task.await (\{} -> Env.decode "SHLVL") |> Task.await (\lvl -> @@ -16,7 +16,7 @@ main = n -> lvlStr = Num.toStr n - Stdout.line "Your current shell level is \(lvlStr)!") + Stdout.line "Your current shell level is $(lvlStr)!") |> Task.await \{} -> Env.decode "LETTERS" Task.attempt task \result -> @@ -24,7 +24,7 @@ main = Ok letters -> joinedLetters = Str.joinWith letters " " - Stdout.line "Your favorite letters are: \(joinedLetters)" + Stdout.line "Your favorite letters are: $(joinedLetters)" Err _ -> Stderr.line "I couldn't find your favorite letters in the environment variables!" diff --git a/examples/cli/false-interpreter/.gitignore b/examples/cli/false-interpreter/.gitignore deleted file mode 100644 index c508d5366f7..00000000000 --- a/examples/cli/false-interpreter/.gitignore +++ /dev/null @@ -1 +0,0 @@ -false diff --git a/examples/cli/false-interpreter/Context.roc b/examples/cli/false-interpreter/Context.roc index 86cf21ca5eb..7cc0456ee80 100644 --- a/examples/cli/false-interpreter/Context.roc +++ b/examples/cli/false-interpreter/Context.roc @@ -55,7 +55,7 @@ toStr = \{ scopes, stack, state, vars } -> stackStr = Str.joinWith (List.map stack toStrData) " " varsStr = Str.joinWith (List.map vars toStrData) " " - "\n============\nDepth: \(depth)\nState: \(stateStr)\nStack: [\(stackStr)]\nVars: [\(varsStr)]\n============\n" + "\n============\nDepth: $(depth)\nState: $(stateStr)\nStack: [$(stackStr)]\nVars: [$(varsStr)]\n============\n" with : Str, (Context -> Task {} a) -> Task {} a with = \path, callback -> diff --git a/examples/cli/false-interpreter/False.roc b/examples/cli/false-interpreter/False.roc index 0007f133070..9b09695b32b 100644 --- a/examples/cli/false-interpreter/False.roc +++ b/examples/cli/false-interpreter/False.roc @@ -21,7 +21,7 @@ InterpreterErrors : [BadUtf8, DivByZero, EmptyStack, InvalidBooleanValue, Invali main : Str -> Task {} [] main = \filename -> interpretFile filename - |> Task.onFail \StringErr e -> Stdout.line "Ran into problem:\n\(e)\n" + |> Task.onFail \StringErr e -> Stdout.line "Ran into problem:\n$(e)\n" interpretFile : Str -> Task {} [StringErr Str] interpretFile = \filename -> @@ -44,7 +44,7 @@ interpretFile = \filename -> Task.fail (StringErr "Ran into an invalid boolean that was neither false (0) or true (-1)") Err (InvalidChar char) -> - Task.fail (StringErr "Ran into an invalid character with ascii code: \(char)") + Task.fail (StringErr "Ran into an invalid character with ascii code: $(char)") Err MaxInputNumber -> Task.fail (StringErr "Like the original false compiler, the max input number is 320,000") diff --git a/examples/cli/false-interpreter/platform/Cargo.toml b/examples/cli/false-interpreter/platform/Cargo.toml index 1cce894c1d5..96421c2fcf1 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/cli/fileBROKEN.roc b/examples/cli/fileBROKEN.roc index 711c5f45410..23e857f6e0c 100644 --- a/examples/cli/fileBROKEN.roc +++ b/examples/cli/fileBROKEN.roc @@ -1,5 +1,5 @@ app "file-io" - packages { pf: "https://github.com/roc-lang/basic-cli/releases/download/0.7.1/Icc3xJoIixF3hCcfXrDwLCu4wQHtNdPyoJkEbkgIElA.tar.br" } + packages { pf: "https://github.com/roc-lang/basic-cli/releases/download/0.8.1/x8URkvfyi9I0QhmVG98roKBUs_AZRkLFwFJVJ3942YA.tar.br" } imports [ pf.Stdout, pf.Stderr, @@ -18,15 +18,15 @@ main = cwd <- Env.cwd |> Task.await cwdStr = Path.display cwd - _ <- Stdout.line "cwd: \(cwdStr)" |> Task.await + _ <- Stdout.line "cwd: $(cwdStr)" |> Task.await dirEntries <- Dir.list cwd |> Task.await contentsStr = Str.joinWith (List.map dirEntries Path.display) "\n " - _ <- Stdout.line "Directory contents:\n \(contentsStr)\n" |> Task.await + _ <- Stdout.line "Directory contents:\n $(contentsStr)\n" |> Task.await _ <- Stdout.line "Writing a string to out.txt" |> Task.await _ <- File.writeUtf8 path "a string!" |> Task.await contents <- File.readUtf8 path |> Task.await - Stdout.line "I read the file back. Its contents: \"\(contents)\"" + Stdout.line "I read the file back. Its contents: \"$(contents)\"" Task.attempt task \result -> when result is diff --git a/examples/cli/form.roc b/examples/cli/form.roc index 3aae9272d8b..22247c1058a 100644 --- a/examples/cli/form.roc +++ b/examples/cli/form.roc @@ -1,5 +1,5 @@ app "form" - packages { pf: "https://github.com/roc-lang/basic-cli/releases/download/0.7.1/Icc3xJoIixF3hCcfXrDwLCu4wQHtNdPyoJkEbkgIElA.tar.br" } + packages { pf: "https://github.com/roc-lang/basic-cli/releases/download/0.8.1/x8URkvfyi9I0QhmVG98roKBUs_AZRkLFwFJVJ3942YA.tar.br" } imports [pf.Stdin, pf.Stdout, pf.Task.{ await, Task }] provides [main] to pf @@ -11,7 +11,7 @@ main = _ <- await (Stdout.line "What's your last name?") lastName <- await Stdin.line - Stdout.line "Hi, \(unwrap firstName) \(unwrap lastName)! 👋" + Stdout.line "Hi, $(unwrap firstName) $(unwrap lastName)! 👋" unwrap : [Input Str, End] -> Str unwrap = \input -> diff --git a/examples/cli/http-get.roc b/examples/cli/http-get.roc index 2664203be83..81c9e8ea12e 100644 --- a/examples/cli/http-get.roc +++ b/examples/cli/http-get.roc @@ -1,5 +1,5 @@ app "http-get" - packages { pf: "https://github.com/roc-lang/basic-cli/releases/download/0.7.1/Icc3xJoIixF3hCcfXrDwLCu4wQHtNdPyoJkEbkgIElA.tar.br" } + packages { pf: "https://github.com/roc-lang/basic-cli/releases/download/0.8.1/x8URkvfyi9I0QhmVG98roKBUs_AZRkLFwFJVJ3942YA.tar.br" } imports [pf.Http, pf.Task.{ Task }, pf.Stdin, pf.Stdout] provides [main] to pf diff --git a/examples/cli/ingested-file-bytes.roc b/examples/cli/ingested-file-bytes.roc index de29db4d3ee..4473ccf110c 100644 --- a/examples/cli/ingested-file-bytes.roc +++ b/examples/cli/ingested-file-bytes.roc @@ -1,5 +1,5 @@ app "ingested-file-bytes" - packages { pf: "https://github.com/roc-lang/basic-cli/releases/download/0.7.1/Icc3xJoIixF3hCcfXrDwLCu4wQHtNdPyoJkEbkgIElA.tar.br" } + packages { pf: "https://github.com/roc-lang/basic-cli/releases/download/0.8.1/x8URkvfyi9I0QhmVG98roKBUs_AZRkLFwFJVJ3942YA.tar.br" } imports [ pf.Stdout, "../../LICENSE" as license : _, # A type hole can also be used here. diff --git a/examples/cli/ingested-file.roc b/examples/cli/ingested-file.roc index 361c6cecac6..29b5d32f071 100644 --- a/examples/cli/ingested-file.roc +++ b/examples/cli/ingested-file.roc @@ -1,5 +1,5 @@ app "ingested-file" - packages { pf: "https://github.com/roc-lang/basic-cli/releases/download/0.7.1/Icc3xJoIixF3hCcfXrDwLCu4wQHtNdPyoJkEbkgIElA.tar.br" } + packages { pf: "https://github.com/roc-lang/basic-cli/releases/download/0.8.1/x8URkvfyi9I0QhmVG98roKBUs_AZRkLFwFJVJ3942YA.tar.br" } imports [ pf.Stdout, "ingested-file.roc" as ownCode : Str, @@ -7,4 +7,4 @@ app "ingested-file" provides [main] to pf main = - Stdout.line "\nThis roc file can print it's own source code. The source is:\n\n\(ownCode)" + Stdout.line "\nThis roc file can print it's own source code. The source is:\n\n$(ownCode)" diff --git a/examples/glue/rust-platform/.cargo/config b/examples/glue/rust-platform/.cargo/config.toml similarity index 100% rename from examples/glue/rust-platform/.cargo/config rename to examples/glue/rust-platform/.cargo/config.toml diff --git a/examples/glue/rust-platform/Cargo.lock b/examples/glue/rust-platform/Cargo.lock deleted file mode 100644 index e338549811e..00000000000 --- a/examples/glue/rust-platform/Cargo.lock +++ /dev/null @@ -1,37 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "arrayvec" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" - -[[package]] -name = "host" -version = "0.0.1" -dependencies = [ - "libc", - "roc_std", -] - -[[package]] -name = "libc" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56d855069fafbb9b344c0f962150cd2c1187975cb1c22c1522c240d8c4986714" - -[[package]] -name = "roc_std" -version = "0.0.1" -dependencies = [ - "arrayvec", - "static_assertions", -] - -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" diff --git a/examples/glue/rust-platform/Cargo.toml b/examples/glue/rust-platform/Cargo.toml index 3cfadfba58b..de0c75b4ff7 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/glue/rust-platform/rocLovesRust b/examples/glue/rust-platform/rocLovesRust deleted file mode 100755 index f06f59fc33a..00000000000 Binary files a/examples/glue/rust-platform/rocLovesRust and /dev/null differ diff --git a/examples/glue/rust-platform/rust-toolchain.toml b/examples/glue/rust-platform/rust-toolchain.toml index cc6d7e3f5de..a4948bad2e3 100644 --- a/examples/glue/rust-platform/rust-toolchain.toml +++ b/examples/glue/rust-platform/rust-toolchain.toml @@ -1,5 +1,5 @@ [toolchain] -channel = "1.71.1" +channel = "1.72.1" profile = "default" diff --git a/examples/gui/.gitignore b/examples/gui/.gitignore deleted file mode 100644 index 09b30e5fc4d..00000000000 --- a/examples/gui/.gitignore +++ /dev/null @@ -1 +0,0 @@ -hello-guiBROKEN diff --git a/examples/gui/breakout/.gitignore b/examples/gui/breakout/.gitignore deleted file mode 100644 index 5b34d038823..00000000000 --- a/examples/gui/breakout/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -breakoutBROKEN -hello-guiBROKEN diff --git a/examples/gui/breakout/platform/.gitignore b/examples/gui/breakout/platform/.gitignore deleted file mode 100644 index eb5a316cbd1..00000000000 --- a/examples/gui/breakout/platform/.gitignore +++ /dev/null @@ -1 +0,0 @@ -target diff --git a/examples/gui/breakout/platform/Cargo.toml b/examples/gui/breakout/platform/Cargo.toml index ec0b370ed81..c4b624b2849 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/.gitignore b/examples/gui/platform/.gitignore deleted file mode 100644 index eb5a316cbd1..00000000000 --- a/examples/gui/platform/.gitignore +++ /dev/null @@ -1 +0,0 @@ -target diff --git a/examples/gui/platform/Cargo.toml b/examples/gui/platform/Cargo.toml index 3f312012bf4..1110e5ddd06 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/helloWorld.roc b/examples/helloWorld.roc index 4fbaf850327..15371db6c9c 100644 --- a/examples/helloWorld.roc +++ b/examples/helloWorld.roc @@ -1,5 +1,5 @@ app "helloWorld" - packages { pf: "https://github.com/roc-lang/basic-cli/releases/download/0.7.1/Icc3xJoIixF3hCcfXrDwLCu4wQHtNdPyoJkEbkgIElA.tar.br" } + packages { pf: "https://github.com/roc-lang/basic-cli/releases/download/0.8.1/x8URkvfyi9I0QhmVG98roKBUs_AZRkLFwFJVJ3942YA.tar.br" } imports [pf.Stdout] provides [main] to pf diff --git a/examples/inspect-logging.roc b/examples/inspect-logging.roc index 0526413cdf5..228d83af51d 100644 --- a/examples/inspect-logging.roc +++ b/examples/inspect-logging.roc @@ -2,7 +2,7 @@ # Shows how Roc values can be logged # app "inspect-logging" - packages { pf: "https://github.com/roc-lang/basic-cli/releases/download/0.7.1/Icc3xJoIixF3hCcfXrDwLCu4wQHtNdPyoJkEbkgIElA.tar.br" } + packages { pf: "https://github.com/roc-lang/basic-cli/releases/download/0.8.1/x8URkvfyi9I0QhmVG98roKBUs_AZRkLFwFJVJ3942YA.tar.br" } imports [ pf.Stdout, Community, diff --git a/examples/jvm-interop/.gitignore b/examples/jvm-interop/.gitignore deleted file mode 100644 index 28b74819c06..00000000000 --- a/examples/jvm-interop/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -*.log -*.class -*.o -*.so -*.jar -libhello* -*.h diff --git a/examples/jvm-interop/README.md b/examples/jvm-interop/README.md index 0a014226cba..9df6610ded1 100644 --- a/examples/jvm-interop/README.md +++ b/examples/jvm-interop/README.md @@ -39,7 +39,7 @@ Just so you know what to expect, our Roc functions look like this; ``` coffee interpolateString : Str -> Str interpolateString = \name -> - "Hello from Roc \(name)!!!🤘🤘🤘" + "Hello from Roc $(name)!!!🤘🤘🤘" mulArrByScalar : List I32, I32 -> List I32 diff --git a/examples/jvm-interop/impl.roc b/examples/jvm-interop/impl.roc index 75c2ba6d945..3b38226af2b 100644 --- a/examples/jvm-interop/impl.roc +++ b/examples/jvm-interop/impl.roc @@ -5,7 +5,7 @@ app "rocdemo" interpolateString : Str -> Str interpolateString = \name -> - "Hello from Roc \(name)!!!🤘🤘🤘" + "Hello from Roc $(name)!!!🤘🤘🤘" # jint is i32 mulArrByScalar : List I32, I32 -> List I32 diff --git a/examples/nodejs-interop/.gitignore b/examples/nodejs-interop/.gitignore deleted file mode 100644 index e3fbd98336e..00000000000 --- a/examples/nodejs-interop/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -build -node_modules diff --git a/examples/nodejs-interop/native-c-api/main.roc b/examples/nodejs-interop/native-c-api/main.roc index 158be20c3c2..9046dbcf74f 100644 --- a/examples/nodejs-interop/native-c-api/main.roc +++ b/examples/nodejs-interop/native-c-api/main.roc @@ -5,4 +5,4 @@ app "libhello" main : Str -> Str main = \message -> - "TypeScript said to Roc: \(message)! 🎉" + "TypeScript said to Roc: $(message)! 🎉" diff --git a/examples/nodejs-interop/wasm/.gitignore b/examples/nodejs-interop/wasm/.gitignore deleted file mode 100644 index f5c8d7d53c1..00000000000 --- a/examples/nodejs-interop/wasm/.gitignore +++ /dev/null @@ -1 +0,0 @@ -roc-app.wasm diff --git a/examples/nodejs-interop/wasm/hello.js b/examples/nodejs-interop/wasm/hello.js index 41bf9272c15..452655f84ef 100644 --- a/examples/nodejs-interop/wasm/hello.js +++ b/examples/nodejs-interop/wasm/hello.js @@ -25,6 +25,11 @@ function hello() { } exitCode = code; }, + random_get: (bufPtr, bufLen) => { + const buf = wasmMemoryBuffer.subarray(bufPtr, bufPtr + bufLen); + crypto.getRandomValues(buf); + return 0; + }, fd_write: (x) => { console.error(`fd_write not supported: ${x}`); }, diff --git a/examples/parser/.gitignore b/examples/parser/.gitignore deleted file mode 100644 index 14dd3585115..00000000000 --- a/examples/parser/.gitignore +++ /dev/null @@ -1 +0,0 @@ -parse-movies-csv diff --git a/examples/parser/Parser/CSV.roc b/examples/parser/Parser/CSV.roc deleted file mode 100644 index 734e04eb4c6..00000000000 --- a/examples/parser/Parser/CSV.roc +++ /dev/null @@ -1,196 +0,0 @@ -interface Parser.CSV - exposes [ - CSV, - CSVRecord, - file, - record, - parseStr, - parseCSV, - parseStrToCSVRecord, - field, - string, - nat, - f64, - ] - imports [ - Parser.Core.{ Parser, parse, buildPrimitiveParser, alt, map, many, sepBy1, between, ignore, flatten, sepBy }, - Parser.Str.{ RawStr, oneOf, codeunit, codeunitSatisfies, strFromRaw }, - ] - -## This is a CSV parser which follows RFC4180 -## -## For simplicity's sake, the following things are not yet supported: -## - CSV files with headings -## -## The following however *is* supported -## - A simple LF ("\n") instead of CRLF ("\r\n") to separate records. -CSV : List CSVRecord -CSVRecord : List CSVField -CSVField : RawStr - -## Attempts to parse an `a` from a `Str` that is encoded in CSV format. -parseStr : Parser CSVRecord a, Str -> Result (List a) [ParsingFailure Str, SyntaxError Str, ParsingIncomplete CSVRecord] -parseStr = \csvParser, input -> - when parseStrToCSV input is - Err (ParsingIncomplete rest) -> - restStr = Parser.Str.strFromRaw rest - - Err (SyntaxError restStr) - - Err (ParsingFailure str) -> - Err (ParsingFailure str) - - Ok csvData -> - when parseCSV csvParser csvData is - Err (ParsingFailure str) -> - Err (ParsingFailure str) - - Err (ParsingIncomplete problem) -> - Err (ParsingIncomplete problem) - - Ok vals -> - Ok vals - -## Attempts to parse an `a` from a `CSV` datastructure (a list of lists of bytestring-fields). -parseCSV : Parser CSVRecord a, CSV -> Result (List a) [ParsingFailure Str, ParsingIncomplete CSVRecord] -parseCSV = \csvParser, csvData -> - csvData - |> List.mapWithIndex (\recordFieldsList, index -> { record: recordFieldsList, index: index }) - |> List.walkUntil (Ok []) \state, { record: recordFieldsList, index: index } -> - when parseCSVRecord csvParser recordFieldsList is - Err (ParsingFailure problem) -> - indexStr = Num.toStr (index + 1) - recordStr = recordFieldsList |> List.map strFromRaw |> List.map (\val -> "\"\(val)\"") |> Str.joinWith ", " - problemStr = "\(problem)\nWhile parsing record no. \(indexStr): `\(recordStr)`" - - Break (Err (ParsingFailure problemStr)) - - Err (ParsingIncomplete problem) -> - Break (Err (ParsingIncomplete problem)) - - Ok val -> - state - |> Result.map (\vals -> List.append vals val) - |> Continue - -## Attempts to parse an `a` from a `CSVRecord` datastructure (a list of bytestring-fields) -## -## This parser succeeds when all fields of the CSVRecord are consumed by the parser. -parseCSVRecord : Parser CSVRecord a, CSVRecord -> Result a [ParsingFailure Str, ParsingIncomplete CSVRecord] -parseCSVRecord = \csvParser, recordFieldsList -> - parse csvParser recordFieldsList (\leftover -> leftover == []) - -## Wrapper function to combine a set of fields into your desired `a` -## -## ## Usage example -## -## >>> record (\firstName -> \lastName -> \age -> User {firstName, lastName, age}) -## >>> |> field string -## >>> |> field string -## >>> |> field nat -## -record : a -> Parser CSVRecord a -record = Parser.Core.const - -## Turns a parser for a `List U8` into a parser that parses part of a `CSVRecord`. -field : Parser RawStr a -> Parser CSVRecord a -field = \fieldParser -> - buildPrimitiveParser \fieldsList -> - when List.get fieldsList 0 is - Err OutOfBounds -> - Err (ParsingFailure "expected another CSV field but there are no more fields in this record") - - Ok rawStr -> - when Parser.Str.parseRawStr fieldParser rawStr is - Ok val -> - Ok { val: val, input: List.dropFirst fieldsList 1 } - - Err (ParsingFailure reason) -> - fieldStr = rawStr |> strFromRaw - - Err (ParsingFailure "Field `\(fieldStr)` could not be parsed. \(reason)") - - Err (ParsingIncomplete reason) -> - reasonStr = strFromRaw reason - fieldsStr = fieldsList |> List.map strFromRaw |> Str.joinWith ", " - - Err (ParsingFailure "The field parser was unable to read the whole field: `\(reasonStr)` while parsing the first field of leftover \(fieldsStr))") - -## Parser for a field containing a UTF8-encoded string -string : Parser CSVField Str -string = Parser.Str.anyString - -## Parse a natural number from a CSV field -nat : Parser CSVField Nat -nat = - string - |> map - (\val -> - when Str.toNat val is - Ok num -> - Ok num - - Err _ -> - Err "\(val) is not a Nat." - ) - |> flatten - -## Parse a 64-bit float from a CSV field -f64 : Parser CSVField F64 -f64 = - string - |> map - (\val -> - when Str.toF64 val is - Ok num -> - Ok num - - Err _ -> - Err "\(val) is not a F64." - ) - |> flatten - -## Attempts to parse a Str into the internal `CSV` datastructure (A list of lists of bytestring-fields). -parseStrToCSV : Str -> Result CSV [ParsingFailure Str, ParsingIncomplete RawStr] -parseStrToCSV = \input -> - parse file (Str.toUtf8 input) (\leftover -> leftover == []) - -## Attempts to parse a Str into the internal `CSVRecord` datastructure (A list of bytestring-fields). -parseStrToCSVRecord : Str -> Result CSVRecord [ParsingFailure Str, ParsingIncomplete RawStr] -parseStrToCSVRecord = \input -> - parse csvRecord (Str.toUtf8 input) (\leftover -> leftover == []) - -# The following are parsers to turn strings into CSV structures -file : Parser RawStr CSV -file = sepBy csvRecord endOfLine - -csvRecord : Parser RawStr CSVRecord -csvRecord = sepBy1 csvField comma - -csvField : Parser RawStr CSVField -csvField = alt escapedCsvField nonescapedCsvField - -escapedCsvField : Parser RawStr CSVField -escapedCsvField = between escapedContents dquote dquote -escapedContents = many - ( - oneOf [ - twodquotes |> map (\_ -> '"'), - comma, - cr, - lf, - textdata, - ] - ) - -twodquotes = Parser.Str.string "\"\"" - -nonescapedCsvField : Parser RawStr CSVField -nonescapedCsvField = many textdata -comma = codeunit ',' -dquote = codeunit '"' -endOfLine = alt (ignore crlf) (ignore lf) -cr = codeunit '\r' -lf = codeunit '\n' -crlf = Parser.Str.string "\r\n" -textdata = codeunitSatisfies (\x -> (x >= 32 && x <= 33) || (x >= 35 && x <= 43) || (x >= 45 && x <= 126)) # Any printable char except " (34) and , (44) diff --git a/examples/parser/Parser/Core.roc b/examples/parser/Parser/Core.roc deleted file mode 100644 index 9001a113cbb..00000000000 --- a/examples/parser/Parser/Core.roc +++ /dev/null @@ -1,354 +0,0 @@ -interface Parser.Core - exposes [ - Parser, - ParseResult, - parse, - parsePartial, - fail, - const, - alt, - keep, - skip, - oneOf, - map, - map2, - map3, - lazy, - maybe, - oneOrMore, - many, - between, - sepBy, - sepBy1, - ignore, - buildPrimitiveParser, - flatten, - ] - imports [] - -## Opaque type for a parser that will try to parse an `a` from an `input`. -## -## As a simple example, you might consider a parser that tries to parse a `U32` from a `Str`. -## Such a process might succeed or fail, depending on the current value of `input`. -## -## As such, a parser can be considered a recipe -## for a function of the type `input -> Result {val: a, input: input} [ParsingFailure Str]`. -## -## How a parser is _actually_ implemented internally is not important -## and this might change between versions; -## for instance to improve efficiency or error messages on parsing failures. -Parser input a := input -> ParseResult input a - -ParseResult input a : Result { val : a, input : input } [ParsingFailure Str] - -buildPrimitiveParser : (input -> ParseResult input a) -> Parser input a -buildPrimitiveParser = \fun -> - @Parser fun - -# -- Generic parsers: -## Most general way of running a parser. -## -## Can be tought of turning the recipe of a parser into its actual parsing function -## and running this function on the given input. -## -## Many (but not all!) parsers consume part of `input` when they succeed. -## This allows you to string parsers together that run one after the other: -## The part of the input that the first parser did not consume, is used by the next parser. -## This is why a parser returns on success both the resulting value and the leftover part of the input. -## -## Of course, this is mostly useful when creating your own internal parsing building blocks. -## `run` or `Parser.Str.runStr` etc. are more useful in daily usage. -parsePartial : Parser input a, input -> ParseResult input a -parsePartial = \@Parser parser, input -> - parser input - -## Runs a parser on the given input, expecting it to fully consume the input -## -## The `input -> Bool` parameter is used to check whether parsing has 'completed', -## (in other words: Whether all of the input has been consumed.) -## -## For most (but not all!) input types, a parsing run that leaves some unparsed input behind -## should be considered an error. -parse : Parser input a, input, (input -> Bool) -> Result a [ParsingFailure Str, ParsingIncomplete input] -parse = \parser, input, isParsingCompleted -> - when parsePartial parser input is - Ok { val: val, input: leftover } -> - if isParsingCompleted leftover then - Ok val - else - Err (ParsingIncomplete leftover) - - Err (ParsingFailure msg) -> - Err (ParsingFailure msg) - -## Parser that can never succeed, regardless of the given input. -## It will always fail with the given error message. -## -## This is mostly useful as 'base case' if all other parsers -## in a `oneOf` or `alt` have failed, to provide some more descriptive error message. -fail : Str -> Parser * * -fail = \msg -> - @Parser \_input -> Err (ParsingFailure msg) - -## Parser that will always produce the given `val`, without looking at the actual input. -## This is useful as basic building block, especially in combination with -## `map` and `keep`. -const : a -> Parser * a -const = \val -> - @Parser \input -> - Ok { val: val, input: input } - -## Try the `first` parser and (only) if it fails, try the `second` parser as fallback. -alt : Parser input a, Parser input a -> Parser input a -alt = \first, second -> - buildPrimitiveParser \input -> - when parsePartial first input is - Ok { val: val, input: rest } -> Ok { val: val, input: rest } - Err (ParsingFailure firstErr) -> - when parsePartial second input is - Ok { val: val, input: rest } -> Ok { val: val, input: rest } - Err (ParsingFailure secondErr) -> - Err (ParsingFailure ("\(firstErr) or \(secondErr)")) - -## Runs a parser building a function, then a parser building a value, -## and finally returns the result of calling the function with the value. -## -## This is useful if you are building up a structure that requires more parameters -## than there are variants of `map`, `map2`, `map3` etc. for. -## -## For instance, the following two are the same: -## -## >>> const (\x, y, z -> Triple x y z) -## >>> |> map3 Parser.Str.nat Parser.Str.nat Parser.Str.nat -## -## >>> const (\x -> \y -> \z -> Triple x y z) -## >>> |> keep Parser.Str.nat -## >>> |> keep Parser.Str.nat -## >>> |> keep Parser.Str.nat -## -## (And indeed, this is how `map`, `map2`, `map3` etc. are implemented under the hood.) -## -## # Currying -## Be aware that when using `keep`, you need to explicitly 'curry' the parameters to the construction function. -## This means that instead of writing `\x, y, z -> ...` -## you'll need to write `\x -> \y -> \z -> ...`. -## This is because the parameters to the function will be applied one-by-one as parsing continues. -keep : Parser input (a -> b), Parser input a -> Parser input b -keep = \funParser, valParser -> - @Parser \input -> - when parsePartial funParser input is - Ok { val: funVal, input: rest } -> - when parsePartial valParser rest is - Ok { val: val, input: rest2 } -> - Ok { val: funVal val, input: rest2 } - - Err e -> - Err e - - Err e -> - Err e - -## Skip over a parsed item as part of a pipeline -## -## This is useful if you are using a pipeline of parsers with `keep` but -## some parsed items are not part of the final result -## -## >>> const (\x -> \y -> \z -> Triple x y z) -## >>> |> keep Parser.Str.nat -## >>> |> skip (codeunit ',') -## >>> |> keep Parser.Str.nat -## >>> |> skip (codeunit ',') -## >>> |> keep Parser.Str.nat -## -skip : Parser input kept, Parser input skipped -> Parser input kept -skip = \kept, skipped -> - @Parser \input -> - when parsePartial kept input is - Ok step1 -> - when parsePartial skipped step1.input is - Ok step2 -> - Ok { val: step1.val, input: step2.input } - - Err e -> - Err e - - Err e -> - Err e - -# Internal utility function. Not exposed to users, since usage is discouraged! -# -# Runs `firstParser` and (only) if it succeeds, -# runs the function `buildNextParser` on its result value. -# This function returns a new parser, which is finally run. -# -# `andThen` is usually more flexible than necessary, and less efficient -# than using `const` with `map` and/or `keep`. -# Consider using those functions first. -andThen : Parser input a, (a -> Parser input b) -> Parser input b -andThen = \@Parser firstParser, buildNextParser -> - @Parser \input -> - when firstParser input is - Ok step -> - (@Parser nextParser) = buildNextParser step.val - nextParser step.input - - Err e -> - Err e - -## Try a list of parsers in turn, until one of them succeeds -oneOf : List (Parser input a) -> Parser input a -oneOf = \parsers -> - List.walkBackwards parsers (fail "oneOf: The list of parsers was empty") (\laterParser, earlierParser -> alt earlierParser laterParser) - -## Transforms the result of parsing into something else, -## using the given transformation function. -map : Parser input a, (a -> b) -> Parser input b -map = \@Parser simpleParser, transform -> - @Parser \input -> - when simpleParser input is - Ok step -> - Ok { val: transform step.val, input: step.input } - - Err e -> - Err e - -## Transforms the result of parsing into something else, -## using the given two-parameter transformation function. -map2 : Parser input a, Parser input b, (a, b -> c) -> Parser input c -map2 = \@Parser parserA, @Parser parserB, transform -> - @Parser \input -> - when parserA input is - Ok step1 -> - when parserB step1.input is - Ok step2 -> - Ok { val: transform step1.val step2.val, input: step2.input } - - Err e -> - Err e - - Err e -> - Err e - -## Transforms the result of parsing into something else, -## using the given three-parameter transformation function. -## -## If you need transformations with more inputs, -## take a look at `keep`. -map3 : Parser input a, Parser input b, Parser input c, (a, b, c -> d) -> Parser input d -map3 = \@Parser parserA, @Parser parserB, @Parser parserC, transform -> - @Parser \input -> - when parserA input is - Ok step1 -> - when parserB step1.input is - Ok step2 -> - when parserC step2.input is - Ok step3 -> - Ok { val: transform step1.val step2.val step3.val, input: step3.input } - - Err e -> - Err e - - Err e -> - Err e - - Err e -> - Err e - -# ^ And this could be repeated for as high as we want, of course. -# Removes a layer of 'result' from running the parser. -# -# This allows for instance to map functions that return a result over the parser, -# where errors are turned into `ParsingFailure` s. -flatten : Parser input (Result a Str) -> Parser input a -flatten = \parser -> - buildPrimitiveParser \input -> - result = parsePartial parser input - - when result is - Err problem -> - Err problem - - Ok { val: Ok val, input: inputRest } -> - Ok { val: val, input: inputRest } - - Ok { val: Err problem, input: _inputRest } -> - Err (ParsingFailure problem) - -## Runs a parser lazily -## -## This is (only) useful when dealing with a recursive structure. -## For instance, consider a type `Comment : { message: String, responses: List Comment }`. -## Without `lazy`, you would ask the compiler to build an infinitely deep parser. -## (Resulting in a compiler error.) -## -lazy : ({} -> Parser input a) -> Parser input a -lazy = \thunk -> - const {} - |> andThen thunk - -maybe : Parser input a -> Parser input (Result a [Nothing]) -maybe = \parser -> - alt (parser |> map (\val -> Ok val)) (const (Err Nothing)) - -manyImpl : Parser input a, List a, input -> ParseResult input (List a) -manyImpl = \@Parser parser, vals, input -> - result = parser input - - when result is - Err _ -> - Ok { val: vals, input: input } - - Ok { val: val, input: inputRest } -> - manyImpl (@Parser parser) (List.append vals val) inputRest - -## A parser which runs the element parser *zero* or more times on the input, -## returning a list containing all the parsed elements. -## -## Also see `oneOrMore`. -many : Parser input a -> Parser input (List a) -many = \parser -> - @Parser \input -> - manyImpl parser [] input - -## A parser which runs the element parser *one* or more times on the input, -## returning a list containing all the parsed elements. -## -## Also see `many`. -oneOrMore : Parser input a -> Parser input (List a) -oneOrMore = \@Parser parser -> - @Parser \input -> - when parser input is - Ok step -> - manyImpl (@Parser parser) [step.val] step.input - - Err e -> - Err e - -## Runs a parser for an 'opening' delimiter, then your main parser, then the 'closing' delimiter, -## and only returns the result of your main parser. -## -## Useful to recognize structures surrounded by delimiters (like braces, parentheses, quotes, etc.) -## -## >>> betweenBraces = \parser -> parser |> between (scalar '[') (scalar ']') -between : Parser input a, Parser input open, Parser input close -> Parser input a -between = \parser, open, close -> - map3 open parser close (\_, val, _ -> val) - -sepBy1 : Parser input a, Parser input sep -> Parser input (List a) -sepBy1 = \parser, separator -> - parserFollowedBySep = - const (\_ -> \val -> val) - |> keep separator - |> keep parser - - const (\val -> \vals -> List.prepend vals val) - |> keep parser - |> keep (many parserFollowedBySep) - -sepBy : Parser input a, Parser input sep -> Parser input (List a) -sepBy = \parser, separator -> - alt (sepBy1 parser separator) (const []) - -ignore : Parser input a -> Parser input {} -ignore = \parser -> - map parser (\_ -> {}) diff --git a/examples/parser/Parser/Http.roc b/examples/parser/Parser/Http.roc deleted file mode 100644 index 472c79231ee..00000000000 --- a/examples/parser/Parser/Http.roc +++ /dev/null @@ -1,261 +0,0 @@ -interface Parser.Http - exposes [ - Request, - Response, - request, - response, - ] - imports [ - Parser.Core.{ Parser, ParseResult, map, keep, skip, const, oneOrMore, many }, - Parser.Str.{ - RawStr, - oneOf, - string, - codeunit, - parseStr, - codeunitSatisfies, - strFromRaw, - anyRawString, - digits, - }, - ] - -# https://www.ietf.org/rfc/rfc2616.txt -Method : [Options, Get, Post, Put, Delete, Head, Trace, Connect, Patch] - -HttpVersion : { major : U8, minor : U8 } - -Request : { - method : Method, - uri : Str, - httpVersion : HttpVersion, - headers : List [Header Str Str], - body : List U8, -} - -Response : { - httpVersion : HttpVersion, - statusCode : U16, - status : Str, - headers : List [Header Str Str], - body : List U8, -} - -method : Parser RawStr Method -method = - oneOf [ - string "OPTIONS" |> map \_ -> Options, - string "GET" |> map \_ -> Get, - string "POST" |> map \_ -> Post, - string "PUT" |> map \_ -> Put, - string "DELETE" |> map \_ -> Delete, - string "HEAD" |> map \_ -> Head, - string "TRACE" |> map \_ -> Trace, - string "CONNECT" |> map \_ -> Connect, - string "PATCH" |> map \_ -> Patch, - ] - -expect parseStr method "GET" == Ok Get -expect parseStr method "DELETE" == Ok Delete - -# TODO: do we want more structure in the URI, or is Str actually what programs want anyway? -# This is not a full URL! -# Request-URI = "*" | absoluteURI | abs_path | authority -RequestUri : Str - -requestUri : Parser RawStr RequestUri -requestUri = - codeunitSatisfies \c -> c != ' ' - |> oneOrMore - |> map strFromRaw - -sp = codeunit ' ' -crlf = string "\r\n" - -httpVersion : Parser RawStr HttpVersion -httpVersion = - const (\major -> \minor -> { major, minor }) - |> skip (string "HTTP/") - |> keep digits - |> skip (codeunit '.') - |> keep digits - -expect - actual = parseStr httpVersion "HTTP/1.1" - expected = Ok { major: 1, minor: 1 } - actual == expected - -Header : [Header Str Str] - -stringWithoutColon : Parser RawStr Str -stringWithoutColon = - codeunitSatisfies \c -> c != ':' - |> oneOrMore - |> map strFromRaw - -stringWithoutCr : Parser RawStr Str -stringWithoutCr = - codeunitSatisfies \c -> c != '\r' - |> oneOrMore - |> map strFromRaw - -header : Parser RawStr Header -header = - const (\k -> \v -> Header k v) - |> keep stringWithoutColon - |> skip (string ": ") - |> keep stringWithoutCr - |> skip crlf - -expect - actual = parseStr header "Accept-Encoding: gzip, deflate\r\n" - expected = Ok (Header "Accept-Encoding" "gzip, deflate") - actual == expected - -request : Parser RawStr Request -request = - const (\m -> \u -> \hv -> \hs -> \b -> { method: m, uri: u, httpVersion: hv, headers: hs, body: b }) - |> keep method - |> skip sp - |> keep requestUri - |> skip sp - |> keep httpVersion - |> skip crlf - |> keep (many header) - |> skip crlf - |> keep anyRawString - -expect - requestText = - """ - GET /things?id=1 HTTP/1.1\r - Host: bar.example\r - Accept-Encoding: gzip, deflate\r - \r - Hello, world! - """ - actual = - parseStr request requestText - - expected : Result Request [ParsingFailure Str, ParsingIncomplete Str] - expected = Ok { - method: Get, - uri: "/things?id=1", - httpVersion: { major: 1, minor: 1 }, - headers: [ - Header "Host" "bar.example", - Header "Accept-Encoding" "gzip, deflate", - ], - body: "Hello, world!" |> Str.toUtf8, - } - actual == expected - -expect - requestText = - """ - OPTIONS /resources/post-here/ HTTP/1.1\r - Host: bar.example\r - Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r - Accept-Language: en-us,en;q=0.5\r - Accept-Encoding: gzip,deflate\r - Connection: keep-alive\r - Origin: https://foo.example\r - Access-Control-Request-Method: POST\r - Access-Control-Request-Headers: X-PINGOTHER, Content-Type\r - \r\n - """ - actual = - parseStr request requestText - expected = Ok { - method: Options, - uri: "/resources/post-here/", - httpVersion: { major: 1, minor: 1 }, - headers: [ - Header "Host" "bar.example", - Header "Accept" "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", - Header "Accept-Language" "en-us,en;q=0.5", - Header "Accept-Encoding" "gzip,deflate", - Header "Connection" "keep-alive", - Header "Origin" "https://foo.example", - Header "Access-Control-Request-Method" "POST", - Header "Access-Control-Request-Headers" "X-PINGOTHER, Content-Type", - ], - body: [], - } - actual == expected - -response : Parser RawStr Response -response = - const (\hv -> \sc -> \s -> \hs -> \b -> { httpVersion: hv, statusCode: sc, status: s, headers: hs, body: b }) - |> keep httpVersion - |> skip sp - |> keep digits - |> skip sp - |> keep stringWithoutCr - |> skip crlf - |> keep (many header) - |> skip crlf - |> keep anyRawString - -expect - body = - """ - \r - \r - \r - \r - A simple webpage\r - \r - \r -

Simple HTML webpage

\r -

Hello, world!

\r - \r - \r\n - """ - responseText = - """ - HTTP/1.1 200 OK\r - Content-Type: text/html; charset=utf-8\r - Content-Length: 55743\r - Connection: keep-alive\r - Cache-Control: s-maxage=300, public, max-age=0\r - Content-Language: en-US\r - Date: Thu, 06 Dec 2018 17:37:18 GMT\r - ETag: "2e77ad1dc6ab0b53a2996dfd4653c1c3"\r - Server: meinheld/0.6.1\r - Strict-Transport-Security: max-age=63072000\r - X-Content-Type-Options: nosniff\r - X-Frame-Options: DENY\r - X-XSS-Protection: 1; mode=block\r - Vary: Accept-Encoding,Cookie\r - Age: 7\r - \r - \(body) - """ - actual = - parseStr response responseText - expected = - Ok { - httpVersion: { major: 1, minor: 1 }, - statusCode: 200, - status: "OK", - headers: [ - Header "Content-Type" "text/html; charset=utf-8", - Header "Content-Length" "55743", - Header "Connection" "keep-alive", - Header "Cache-Control" "s-maxage=300, public, max-age=0", - Header "Content-Language" "en-US", - Header "Date" "Thu, 06 Dec 2018 17:37:18 GMT", - Header "ETag" "\"2e77ad1dc6ab0b53a2996dfd4653c1c3\"", - Header "Server" "meinheld/0.6.1", - Header "Strict-Transport-Security" "max-age=63072000", - Header "X-Content-Type-Options" "nosniff", - Header "X-Frame-Options" "DENY", - Header "X-XSS-Protection" "1; mode=block", - Header "Vary" "Accept-Encoding,Cookie", - Header "Age" "7", - ], - body: Str.toUtf8 body, - } - actual == expected - diff --git a/examples/parser/Parser/Str.roc b/examples/parser/Parser/Str.roc deleted file mode 100644 index 2c5bb33e206..00000000000 --- a/examples/parser/Parser/Str.roc +++ /dev/null @@ -1,215 +0,0 @@ -interface Parser.Str - exposes [ - RawStr, - parseStr, - parseStrPartial, - parseRawStr, - parseRawStrPartial, - string, - stringRaw, - codeunit, - codeunitSatisfies, - anyString, - anyRawString, - anyCodeunit, - scalar, - oneOf, - digit, - positiveInt, - strFromRaw, - ] - imports [Parser.Core.{ Parser, ParseResult, map, oneOrMore, parse, parsePartial, buildPrimitiveParser }] - -# Specific string-based parsers: -RawStr : List U8 - -strFromRaw : RawStr -> Str -strFromRaw = \rawStr -> - rawStr - |> Str.fromUtf8 - |> Result.withDefault "Unexpected problem while turning a List U8 (that was originally a Str) back into a Str. This should never happen!" - -strToRaw : Str -> RawStr -strToRaw = \str -> - str |> Str.toUtf8 - -strFromScalar : U32 -> Str -strFromScalar = \scalarVal -> - Str.appendScalar "" (Num.intCast scalarVal) - |> Result.withDefault "Unexpected problem while turning a U32 (that was probably originally a scalar constant) into a Str. This should never happen!" - -strFromCodeunit : U8 -> Str -strFromCodeunit = \cu -> - strFromRaw [cu] - -## Runs a parser against the start of a list of scalars, allowing the parser to consume it only partially. -parseRawStrPartial : Parser RawStr a, RawStr -> ParseResult RawStr a -parseRawStrPartial = \parser, input -> - parsePartial parser input - -## Runs a parser against the start of a string, allowing the parser to consume it only partially. -## -## - If the parser succeeds, returns the resulting value as well as the leftover input. -## - If the parser fails, returns `Err (ParsingFailure msg)` -parseStrPartial : Parser RawStr a, Str -> ParseResult Str a -parseStrPartial = \parser, input -> - parser - |> parseRawStrPartial (strToRaw input) - |> Result.map \{ val: val, input: restRaw } -> - { val: val, input: strFromRaw restRaw } - -## Runs a parser against a string, requiring the parser to consume it fully. -## -## - If the parser succeeds, returns `Ok val` -## - If the parser fails, returns `Err (ParsingFailure msg)` -## - If the parser succeeds but does not consume the full string, returns `Err (ParsingIncomplete leftover)` -parseRawStr : Parser RawStr a, RawStr -> Result a [ParsingFailure Str, ParsingIncomplete RawStr] -parseRawStr = \parser, input -> - parse parser input (\leftover -> List.len leftover == 0) - -parseStr : Parser RawStr a, Str -> Result a [ParsingFailure Str, ParsingIncomplete Str] -parseStr = \parser, input -> - parser - |> parseRawStr (strToRaw input) - |> Result.mapErr \problem -> - when problem is - ParsingFailure msg -> - ParsingFailure msg - - ParsingIncomplete leftoverRaw -> - ParsingIncomplete (strFromRaw leftoverRaw) - -codeunitSatisfies : (U8 -> Bool) -> Parser RawStr U8 -codeunitSatisfies = \check -> - buildPrimitiveParser \input -> - { before: start, others: inputRest } = List.split input 1 - - when List.get start 0 is - Err OutOfBounds -> - Err (ParsingFailure "expected a codeunit satisfying a condition, but input was empty.") - - Ok startCodeunit -> - if check startCodeunit then - Ok { val: startCodeunit, input: inputRest } - else - otherChar = strFromCodeunit startCodeunit - inputStr = strFromRaw input - - Err (ParsingFailure "expected a codeunit satisfying a condition but found `\(otherChar)`.\n While reading: `\(inputStr)`") - -# Implemented manually instead of on top of codeunitSatisfies -# because of better error messages -codeunit : U8 -> Parser RawStr U8 -codeunit = \expectedCodeUnit -> - buildPrimitiveParser \input -> - { before: start, others: inputRest } = List.split input 1 - - when List.get start 0 is - Err OutOfBounds -> - errorChar = strFromCodeunit expectedCodeUnit - - Err (ParsingFailure "expected char `\(errorChar)` but input was empty.") - - Ok startCodeunit -> - if startCodeunit == expectedCodeUnit then - Ok { val: expectedCodeUnit, input: inputRest } - else - errorChar = strFromCodeunit expectedCodeUnit - otherChar = strFromRaw start - inputStr = strFromRaw input - - Err (ParsingFailure "expected char `\(errorChar)` but found `\(otherChar)`.\n While reading: `\(inputStr)`") - -# Implemented manually instead of a sequence of codeunits -# because of efficiency and better error messages -stringRaw : List U8 -> Parser RawStr (List U8) -stringRaw = \expectedString -> - buildPrimitiveParser \input -> - { before: start, others: inputRest } = List.split input (List.len expectedString) - - if start == expectedString then - Ok { val: expectedString, input: inputRest } - else - errorString = strFromRaw expectedString - otherString = strFromRaw start - inputString = strFromRaw input - - Err (ParsingFailure "expected string `\(errorString)` but found `\(otherString)`.\nWhile reading: \(inputString)") - -string : Str -> Parser RawStr Str -string = \expectedString -> - strToRaw expectedString - |> stringRaw - |> map \_val -> expectedString - -scalar : U32 -> Parser RawStr U32 -scalar = \expectedScalar -> - expectedScalar - |> strFromScalar - |> string - |> map \_ -> expectedScalar - -# Matches any codeunit -anyCodeunit : Parser RawStr U8 -anyCodeunit = codeunitSatisfies (\_ -> Bool.true) - -# Matches any bytestring -# and consumes all of it. -# Does not fail. -anyRawString : Parser RawStr RawStr -anyRawString = buildPrimitiveParser \rawStringValue -> - Ok { val: rawStringValue, input: [] } - -# Matches any string -# as long as it is valid UTF8. -anyString : Parser RawStr Str -anyString = buildPrimitiveParser \fieldRawString -> - when Str.fromUtf8 fieldRawString is - Ok stringVal -> - Ok { val: stringVal, input: [] } - - Err (BadUtf8 _ _) -> - Err (ParsingFailure "Expected a string field, but its contents cannot be parsed as UTF8.") - -# betweenBraces : Parser RawStr a -> Parser RawStr a -# betweenBraces = \parser -> -# between parser (scalar '[') (scalar ']') -digit : Parser RawStr U8 -digit = - digitParsers = - List.range { start: At '0', end: At '9' } - |> List.map \digitCodeUnit -> - digitCodeUnit - |> codeunit - |> map \_ -> digitCodeUnit - '0' - - oneOf digitParsers - -# NOTE: Currently happily accepts leading zeroes -positiveInt : Parser RawStr (Int *) -positiveInt = - oneOrMore digit - |> map \digitsList -> - digitsList - |> List.map \char -> Num.intCast char - '0' - |> List.walk 0 \sum, digitVal -> 10 * sum + digitVal - -## Try a bunch of different parsers. -## -## The first parser which is tried is the one at the front of the list, -## and the next one is tried until one succeeds or the end of the list was reached. -## -## >>> boolParser : Parser RawStr Bool -## >>> boolParser = oneOf [string "true", string "false"] |> map (\x -> if x == "true" then True else False) -# NOTE: This implementation works, but is limited to parsing strings. -# Blocked until issue #3444 is fixed. -oneOf : List (Parser RawStr a) -> Parser RawStr a -oneOf = \parsers -> - buildPrimitiveParser \input -> - List.walkUntil parsers (Err (ParsingFailure "(no possibilities)")) \_, parser -> - when parseRawStrPartial parser input is - Ok val -> - Break (Ok val) - - Err problem -> - Continue (Err problem) diff --git a/examples/parser/README.md b/examples/parser/README.md new file mode 100644 index 00000000000..ecf1d8edc2b --- /dev/null +++ b/examples/parser/README.md @@ -0,0 +1,3 @@ +The parser package example has been moved to [https://github.com/lukewilliamboswell/roc-parser](https://github.com/lukewilliamboswell/roc-parser). + +The examples here use a release of this package. \ No newline at end of file diff --git a/examples/parser/examples/.gitignore b/examples/parser/examples/.gitignore deleted file mode 100644 index 2ab3c9a91f7..00000000000 --- a/examples/parser/examples/.gitignore +++ /dev/null @@ -1 +0,0 @@ -letter-counts diff --git a/examples/parser/examples/parse-movies-csv.roc b/examples/parser/examples/parse-movies-csv.roc deleted file mode 100644 index 580666f88df..00000000000 --- a/examples/parser/examples/parse-movies-csv.roc +++ /dev/null @@ -1,65 +0,0 @@ -app "example" - packages { - pf: "../../platform-switching/zig-platform/main.roc", - parser: "../package/main.roc", - } - imports [ - parser.ParserCore.{ Parser, map, keep }, - parser.ParserStr.{ RawStr, strFromRaw }, - parser.ParserCSV.{ CSV, record, field, string, nat, parseStr }, - ] - provides [main] to pf - -input : Str -input = "Airplane!,1980,\"Robert Hays,Julie Hagerty\"\r\nCaddyshack,1980,\"Chevy Chase,Rodney Dangerfield,Ted Knight,Michael O'Keefe,Bill Murray\"" - -main : Str -main = - when parseStr movieInfoParser input is - Ok movies -> - moviesString = - movies - |> List.map movieInfoExplanation - |> Str.joinWith ("\n") - nMovies = List.len movies |> Num.toStr - - "\(nMovies) movies were found:\n\n\(moviesString)\n\nParse success!\n" - - Err problem -> - when problem is - ParsingFailure failure -> - "Parsing failure: \(failure)\n" - - ParsingIncomplete leftover -> - leftoverStr = leftover |> List.map strFromRaw |> List.map (\val -> "\"\(val)\"") |> Str.joinWith ", " - - "Parsing incomplete. Following leftover fields while parsing a record: \(leftoverStr)\n" - - SyntaxError error -> - "Parsing failure. Syntax error in the CSV: \(error)" - -MovieInfo := { title : Str, releaseYear : Nat, actors : List Str } - -movieInfoParser = - record (\title -> \releaseYear -> \actors -> @MovieInfo { title, releaseYear, actors }) - |> keep (field string) - |> keep (field nat) - |> keep (field actorsParser) - -actorsParser = - string - |> map (\val -> Str.split val ",") - -movieInfoExplanation = \@MovieInfo { title, releaseYear, actors } -> - enumeratedActors = enumerate actors - releaseYearStr = Num.toStr releaseYear - - "The movie '\(title)' was released in \(releaseYearStr) and stars \(enumeratedActors)" - -enumerate : List Str -> Str -enumerate = \elements -> - { before: inits, others: last } = List.split elements (List.len elements - 1) - - last - |> List.prepend (inits |> Str.joinWith ", ") - |> Str.joinWith " and " diff --git a/examples/parser/examples/letter-counts.roc b/examples/parser/letter-counts.roc similarity index 76% rename from examples/parser/examples/letter-counts.roc rename to examples/parser/letter-counts.roc index f65a126c4a7..70d75f407f9 100644 --- a/examples/parser/examples/letter-counts.roc +++ b/examples/parser/letter-counts.roc @@ -1,13 +1,13 @@ app "example" packages { - cli: "https://github.com/roc-lang/basic-cli/releases/download/0.7.1/Icc3xJoIixF3hCcfXrDwLCu4wQHtNdPyoJkEbkgIElA.tar.br", - parser: "../package/main.roc", + cli: "https://github.com/roc-lang/basic-cli/releases/download/0.8.1/x8URkvfyi9I0QhmVG98roKBUs_AZRkLFwFJVJ3942YA.tar.br", + parser: "https://github.com/lukewilliamboswell/roc-parser/releases/download/0.5/KB-TITJ4DfunB88sFBWjCtCGV7LRRDdTH5JUXp4gIb8.tar.br", } imports [ cli.Stdout, cli.Stderr, - parser.ParserCore.{ Parser, buildPrimitiveParser, many }, - parser.ParserStr.{ parseStr }, + parser.Core.{ Parser, buildPrimitiveParser, many }, + parser.String.{ parseStr }, ] provides [main] to cli @@ -21,7 +21,7 @@ main = |> List.map \_ -> 1 |> List.sum |> Num.toStr - |> \countLetterA -> Stdout.line "I counted \(countLetterA) letter A's!" + |> \countLetterA -> Stdout.line "I counted $(countLetterA) letter A's!" Err _ -> Stderr.line "Ooops, something went wrong parsing letters" diff --git a/examples/parser/package/ParserCSV.roc b/examples/parser/package/ParserCSV.roc deleted file mode 100644 index ee6f5928c27..00000000000 --- a/examples/parser/package/ParserCSV.roc +++ /dev/null @@ -1,196 +0,0 @@ -interface ParserCSV - exposes [ - CSV, - CSVRecord, - file, - record, - parseStr, - parseCSV, - parseStrToCSVRecord, - field, - string, - nat, - f64, - ] - imports [ - ParserCore.{ Parser, parse, buildPrimitiveParser, alt, map, many, sepBy1, between, ignore, flatten, sepBy }, - ParserStr.{ RawStr, oneOf, codeunit, codeunitSatisfies, strFromRaw }, - ] - -## This is a CSV parser which follows RFC4180 -## -## For simplicity's sake, the following things are not yet supported: -## - CSV files with headings -## -## The following however *is* supported -## - A simple LF ("\n") instead of CRLF ("\r\n") to separate records. -CSV : List CSVRecord -CSVRecord : List CSVField -CSVField : RawStr - -## Attempts to parse an `a` from a `Str` that is encoded in CSV format. -parseStr : Parser CSVRecord a, Str -> Result (List a) [ParsingFailure Str, SyntaxError Str, ParsingIncomplete CSVRecord] -parseStr = \csvParser, input -> - when parseStrToCSV input is - Err (ParsingIncomplete rest) -> - restStr = ParserStr.strFromRaw rest - - Err (SyntaxError restStr) - - Err (ParsingFailure str) -> - Err (ParsingFailure str) - - Ok csvData -> - when parseCSV csvParser csvData is - Err (ParsingFailure str) -> - Err (ParsingFailure str) - - Err (ParsingIncomplete problem) -> - Err (ParsingIncomplete problem) - - Ok vals -> - Ok vals - -## Attempts to parse an `a` from a `CSV` datastructure (a list of lists of bytestring-fields). -parseCSV : Parser CSVRecord a, CSV -> Result (List a) [ParsingFailure Str, ParsingIncomplete CSVRecord] -parseCSV = \csvParser, csvData -> - csvData - |> List.mapWithIndex (\recordFieldsList, index -> { record: recordFieldsList, index: index }) - |> List.walkUntil (Ok []) \state, { record: recordFieldsList, index: index } -> - when parseCSVRecord csvParser recordFieldsList is - Err (ParsingFailure problem) -> - indexStr = Num.toStr (index + 1) - recordStr = recordFieldsList |> List.map strFromRaw |> List.map (\val -> "\"\(val)\"") |> Str.joinWith ", " - problemStr = "\(problem)\nWhile parsing record no. \(indexStr): `\(recordStr)`" - - Break (Err (ParsingFailure problemStr)) - - Err (ParsingIncomplete problem) -> - Break (Err (ParsingIncomplete problem)) - - Ok val -> - state - |> Result.map (\vals -> List.append vals val) - |> Continue - -## Attempts to parse an `a` from a `CSVRecord` datastructure (a list of bytestring-fields) -## -## This parser succeeds when all fields of the CSVRecord are consumed by the parser. -parseCSVRecord : Parser CSVRecord a, CSVRecord -> Result a [ParsingFailure Str, ParsingIncomplete CSVRecord] -parseCSVRecord = \csvParser, recordFieldsList -> - parse csvParser recordFieldsList (\leftover -> leftover == []) - -## Wrapper function to combine a set of fields into your desired `a` -## -## ## Usage example -## -## >>> record (\firstName -> \lastName -> \age -> User {firstName, lastName, age}) -## >>> |> field string -## >>> |> field string -## >>> |> field nat -## -record : a -> Parser CSVRecord a -record = ParserCore.const - -## Turns a parser for a `List U8` into a parser that parses part of a `CSVRecord`. -field : Parser RawStr a -> Parser CSVRecord a -field = \fieldParser -> - buildPrimitiveParser \fieldsList -> - when List.get fieldsList 0 is - Err OutOfBounds -> - Err (ParsingFailure "expected another CSV field but there are no more fields in this record") - - Ok rawStr -> - when ParserStr.parseRawStr fieldParser rawStr is - Ok val -> - Ok { val: val, input: List.dropFirst fieldsList 1 } - - Err (ParsingFailure reason) -> - fieldStr = rawStr |> strFromRaw - - Err (ParsingFailure "Field `\(fieldStr)` could not be parsed. \(reason)") - - Err (ParsingIncomplete reason) -> - reasonStr = strFromRaw reason - fieldsStr = fieldsList |> List.map strFromRaw |> Str.joinWith ", " - - Err (ParsingFailure "The field parser was unable to read the whole field: `\(reasonStr)` while parsing the first field of leftover \(fieldsStr))") - -## Parser for a field containing a UTF8-encoded string -string : Parser CSVField Str -string = ParserStr.anyString - -## Parse a natural number from a CSV field -nat : Parser CSVField Nat -nat = - string - |> map - (\val -> - when Str.toNat val is - Ok num -> - Ok num - - Err _ -> - Err "\(val) is not a Nat." - ) - |> flatten - -## Parse a 64-bit float from a CSV field -f64 : Parser CSVField F64 -f64 = - string - |> map - (\val -> - when Str.toF64 val is - Ok num -> - Ok num - - Err _ -> - Err "\(val) is not a F64." - ) - |> flatten - -## Attempts to parse a Str into the internal `CSV` datastructure (A list of lists of bytestring-fields). -parseStrToCSV : Str -> Result CSV [ParsingFailure Str, ParsingIncomplete RawStr] -parseStrToCSV = \input -> - parse file (Str.toUtf8 input) (\leftover -> leftover == []) - -## Attempts to parse a Str into the internal `CSVRecord` datastructure (A list of bytestring-fields). -parseStrToCSVRecord : Str -> Result CSVRecord [ParsingFailure Str, ParsingIncomplete RawStr] -parseStrToCSVRecord = \input -> - parse csvRecord (Str.toUtf8 input) (\leftover -> leftover == []) - -# The following are parsers to turn strings into CSV structures -file : Parser RawStr CSV -file = sepBy csvRecord endOfLine - -csvRecord : Parser RawStr CSVRecord -csvRecord = sepBy1 csvField comma - -csvField : Parser RawStr CSVField -csvField = alt escapedCsvField nonescapedCsvField - -escapedCsvField : Parser RawStr CSVField -escapedCsvField = between escapedContents dquote dquote -escapedContents = many - ( - oneOf [ - twodquotes |> map (\_ -> '"'), - comma, - cr, - lf, - textdata, - ] - ) - -twodquotes = ParserStr.string "\"\"" - -nonescapedCsvField : Parser RawStr CSVField -nonescapedCsvField = many textdata -comma = codeunit ',' -dquote = codeunit '"' -endOfLine = alt (ignore crlf) (ignore lf) -cr = codeunit '\r' -lf = codeunit '\n' -crlf = ParserStr.string "\r\n" -textdata = codeunitSatisfies (\x -> (x >= 32 && x <= 33) || (x >= 35 && x <= 43) || (x >= 45 && x <= 126)) # Any printable char except " (34) and , (44) diff --git a/examples/parser/package/ParserCore.roc b/examples/parser/package/ParserCore.roc deleted file mode 100644 index 096ad6d9e02..00000000000 --- a/examples/parser/package/ParserCore.roc +++ /dev/null @@ -1,354 +0,0 @@ -interface ParserCore - exposes [ - Parser, - ParseResult, - parse, - parsePartial, - fail, - const, - alt, - keep, - skip, - oneOf, - map, - map2, - map3, - lazy, - maybe, - oneOrMore, - many, - between, - sepBy, - sepBy1, - ignore, - buildPrimitiveParser, - flatten, - ] - imports [] - -## Opaque type for a parser that will try to parse an `a` from an `input`. -## -## As a simple example, you might consider a parser that tries to parse a `U32` from a `Str`. -## Such a process might succeed or fail, depending on the current value of `input`. -## -## As such, a parser can be considered a recipe -## for a function of the type `input -> Result {val: a, input: input} [ParsingFailure Str]`. -## -## How a parser is _actually_ implemented internally is not important -## and this might change between versions; -## for instance to improve efficiency or error messages on parsing failures. -Parser input a := input -> ParseResult input a - -ParseResult input a : Result { val : a, input : input } [ParsingFailure Str] - -buildPrimitiveParser : (input -> ParseResult input a) -> Parser input a -buildPrimitiveParser = \fun -> - @Parser fun - -# -- Generic parsers: -## Most general way of running a parser. -## -## Can be tought of turning the recipe of a parser into its actual parsing function -## and running this function on the given input. -## -## Many (but not all!) parsers consume part of `input` when they succeed. -## This allows you to string parsers together that run one after the other: -## The part of the input that the first parser did not consume, is used by the next parser. -## This is why a parser returns on success both the resulting value and the leftover part of the input. -## -## Of course, this is mostly useful when creating your own internal parsing building blocks. -## `run` or `Parser.Str.runStr` etc. are more useful in daily usage. -parsePartial : Parser input a, input -> ParseResult input a -parsePartial = \@Parser parser, input -> - parser input - -## Runs a parser on the given input, expecting it to fully consume the input -## -## The `input -> Bool` parameter is used to check whether parsing has 'completed', -## (in other words: Whether all of the input has been consumed.) -## -## For most (but not all!) input types, a parsing run that leaves some unparsed input behind -## should be considered an error. -parse : Parser input a, input, (input -> Bool) -> Result a [ParsingFailure Str, ParsingIncomplete input] -parse = \parser, input, isParsingCompleted -> - when parsePartial parser input is - Ok { val: val, input: leftover } -> - if isParsingCompleted leftover then - Ok val - else - Err (ParsingIncomplete leftover) - - Err (ParsingFailure msg) -> - Err (ParsingFailure msg) - -## Parser that can never succeed, regardless of the given input. -## It will always fail with the given error message. -## -## This is mostly useful as 'base case' if all other parsers -## in a `oneOf` or `alt` have failed, to provide some more descriptive error message. -fail : Str -> Parser * * -fail = \msg -> - @Parser \_input -> Err (ParsingFailure msg) - -## Parser that will always produce the given `val`, without looking at the actual input. -## This is useful as basic building block, especially in combination with -## `map` and `keep`. -const : a -> Parser * a -const = \val -> - @Parser \input -> - Ok { val: val, input: input } - -## Try the `first` parser and (only) if it fails, try the `second` parser as fallback. -alt : Parser input a, Parser input a -> Parser input a -alt = \first, second -> - buildPrimitiveParser \input -> - when parsePartial first input is - Ok { val: val, input: rest } -> Ok { val: val, input: rest } - Err (ParsingFailure firstErr) -> - when parsePartial second input is - Ok { val: val, input: rest } -> Ok { val: val, input: rest } - Err (ParsingFailure secondErr) -> - Err (ParsingFailure ("\(firstErr) or \(secondErr)")) - -## Runs a parser building a function, then a parser building a value, -## and finally returns the result of calling the function with the value. -## -## This is useful if you are building up a structure that requires more parameters -## than there are variants of `map`, `map2`, `map3` etc. for. -## -## For instance, the following two are the same: -## -## >>> const (\x, y, z -> Triple x y z) -## >>> |> map3 Parser.Str.nat Parser.Str.nat Parser.Str.nat -## -## >>> const (\x -> \y -> \z -> Triple x y z) -## >>> |> keep Parser.Str.nat -## >>> |> keep Parser.Str.nat -## >>> |> keep Parser.Str.nat -## -## (And indeed, this is how `map`, `map2`, `map3` etc. are implemented under the hood.) -## -## # Currying -## Be aware that when using `keep`, you need to explicitly 'curry' the parameters to the construction function. -## This means that instead of writing `\x, y, z -> ...` -## you'll need to write `\x -> \y -> \z -> ...`. -## This is because the parameters to the function will be applied one-by-one as parsing continues. -keep : Parser input (a -> b), Parser input a -> Parser input b -keep = \funParser, valParser -> - @Parser \input -> - when parsePartial funParser input is - Ok { val: funVal, input: rest } -> - when parsePartial valParser rest is - Ok { val: val, input: rest2 } -> - Ok { val: funVal val, input: rest2 } - - Err e -> - Err e - - Err e -> - Err e - -## Skip over a parsed item as part of a pipeline -## -## This is useful if you are using a pipeline of parsers with `keep` but -## some parsed items are not part of the final result -## -## >>> const (\x -> \y -> \z -> Triple x y z) -## >>> |> keep Parser.Str.nat -## >>> |> skip (codeunit ',') -## >>> |> keep Parser.Str.nat -## >>> |> skip (codeunit ',') -## >>> |> keep Parser.Str.nat -## -skip : Parser input kept, Parser input skipped -> Parser input kept -skip = \kept, skipped -> - @Parser \input -> - when parsePartial kept input is - Ok step1 -> - when parsePartial skipped step1.input is - Ok step2 -> - Ok { val: step1.val, input: step2.input } - - Err e -> - Err e - - Err e -> - Err e - -# Internal utility function. Not exposed to users, since usage is discouraged! -# -# Runs `firstParser` and (only) if it succeeds, -# runs the function `buildNextParser` on its result value. -# This function returns a new parser, which is finally run. -# -# `andThen` is usually more flexible than necessary, and less efficient -# than using `const` with `map` and/or `keep`. -# Consider using those functions first. -andThen : Parser input a, (a -> Parser input b) -> Parser input b -andThen = \@Parser firstParser, buildNextParser -> - @Parser \input -> - when firstParser input is - Ok step -> - (@Parser nextParser) = buildNextParser step.val - nextParser step.input - - Err e -> - Err e - -## Try a list of parsers in turn, until one of them succeeds -oneOf : List (Parser input a) -> Parser input a -oneOf = \parsers -> - List.walkBackwards parsers (fail "oneOf: The list of parsers was empty") (\laterParser, earlierParser -> alt earlierParser laterParser) - -## Transforms the result of parsing into something else, -## using the given transformation function. -map : Parser input a, (a -> b) -> Parser input b -map = \@Parser simpleParser, transform -> - @Parser \input -> - when simpleParser input is - Ok step -> - Ok { val: transform step.val, input: step.input } - - Err e -> - Err e - -## Transforms the result of parsing into something else, -## using the given two-parameter transformation function. -map2 : Parser input a, Parser input b, (a, b -> c) -> Parser input c -map2 = \@Parser parserA, @Parser parserB, transform -> - @Parser \input -> - when parserA input is - Ok step1 -> - when parserB step1.input is - Ok step2 -> - Ok { val: transform step1.val step2.val, input: step2.input } - - Err e -> - Err e - - Err e -> - Err e - -## Transforms the result of parsing into something else, -## using the given three-parameter transformation function. -## -## If you need transformations with more inputs, -## take a look at `keep`. -map3 : Parser input a, Parser input b, Parser input c, (a, b, c -> d) -> Parser input d -map3 = \@Parser parserA, @Parser parserB, @Parser parserC, transform -> - @Parser \input -> - when parserA input is - Ok step1 -> - when parserB step1.input is - Ok step2 -> - when parserC step2.input is - Ok step3 -> - Ok { val: transform step1.val step2.val step3.val, input: step3.input } - - Err e -> - Err e - - Err e -> - Err e - - Err e -> - Err e - -# ^ And this could be repeated for as high as we want, of course. -# Removes a layer of 'result' from running the parser. -# -# This allows for instance to map functions that return a result over the parser, -# where errors are turned into `ParsingFailure` s. -flatten : Parser input (Result a Str) -> Parser input a -flatten = \parser -> - buildPrimitiveParser \input -> - result = parsePartial parser input - - when result is - Err problem -> - Err problem - - Ok { val: Ok val, input: inputRest } -> - Ok { val: val, input: inputRest } - - Ok { val: Err problem, input: _inputRest } -> - Err (ParsingFailure problem) - -## Runs a parser lazily -## -## This is (only) useful when dealing with a recursive structure. -## For instance, consider a type `Comment : { message: String, responses: List Comment }`. -## Without `lazy`, you would ask the compiler to build an infinitely deep parser. -## (Resulting in a compiler error.) -## -lazy : ({} -> Parser input a) -> Parser input a -lazy = \thunk -> - const {} - |> andThen thunk - -maybe : Parser input a -> Parser input (Result a [Nothing]) -maybe = \parser -> - alt (parser |> map (\val -> Ok val)) (const (Err Nothing)) - -manyImpl : Parser input a, List a, input -> ParseResult input (List a) -manyImpl = \@Parser parser, vals, input -> - result = parser input - - when result is - Err _ -> - Ok { val: vals, input: input } - - Ok { val: val, input: inputRest } -> - manyImpl (@Parser parser) (List.append vals val) inputRest - -## A parser which runs the element parser *zero* or more times on the input, -## returning a list containing all the parsed elements. -## -## Also see `oneOrMore`. -many : Parser input a -> Parser input (List a) -many = \parser -> - @Parser \input -> - manyImpl parser [] input - -## A parser which runs the element parser *one* or more times on the input, -## returning a list containing all the parsed elements. -## -## Also see `many`. -oneOrMore : Parser input a -> Parser input (List a) -oneOrMore = \@Parser parser -> - @Parser \input -> - when parser input is - Ok step -> - manyImpl (@Parser parser) [step.val] step.input - - Err e -> - Err e - -## Runs a parser for an 'opening' delimiter, then your main parser, then the 'closing' delimiter, -## and only returns the result of your main parser. -## -## Useful to recognize structures surrounded by delimiters (like braces, parentheses, quotes, etc.) -## -## >>> betweenBraces = \parser -> parser |> between (scalar '[') (scalar ']') -between : Parser input a, Parser input open, Parser input close -> Parser input a -between = \parser, open, close -> - map3 open parser close (\_, val, _ -> val) - -sepBy1 : Parser input a, Parser input sep -> Parser input (List a) -sepBy1 = \parser, separator -> - parserFollowedBySep = - const (\_ -> \val -> val) - |> keep separator - |> keep parser - - const (\val -> \vals -> List.prepend vals val) - |> keep parser - |> keep (many parserFollowedBySep) - -sepBy : Parser input a, Parser input sep -> Parser input (List a) -sepBy = \parser, separator -> - alt (sepBy1 parser separator) (const []) - -ignore : Parser input a -> Parser input {} -ignore = \parser -> - map parser (\_ -> {}) diff --git a/examples/parser/package/ParserHttp.roc b/examples/parser/package/ParserHttp.roc deleted file mode 100644 index 2d798a3cba5..00000000000 --- a/examples/parser/package/ParserHttp.roc +++ /dev/null @@ -1,250 +0,0 @@ -interface ParserHttp - exposes [ - Request, - Response, - request, - response, - ] - imports [ - ParserCore.{ Parser, ParseResult, map, keep, skip, const, oneOrMore, many }, - ParserStr.{ RawStr, oneOf, string, codeunit, parseStr, codeunitSatisfies, strFromRaw, anyRawString }, - ] - -# https://www.ietf.org/rfc/rfc2616.txt -Method : [Options, Get, Post, Put, Delete, Head, Trace, Connect, Patch] - -HttpVersion : Str - -Request : { - method : Method, - uri : Str, - httpVersion : HttpVersion, - headers : List [Header Str Str], - body : List U8, -} - -Response : { - httpVersion : HttpVersion, - statusCode : Str, - status : Str, - headers : List [Header Str Str], - body : List U8, -} - -method : Parser RawStr Method -method = - oneOf [ - string "OPTIONS" |> map \_ -> Options, - string "GET" |> map \_ -> Get, - string "POST" |> map \_ -> Post, - string "PUT" |> map \_ -> Put, - string "DELETE" |> map \_ -> Delete, - string "HEAD" |> map \_ -> Head, - string "TRACE" |> map \_ -> Trace, - string "CONNECT" |> map \_ -> Connect, - string "PATCH" |> map \_ -> Patch, - ] - -expect parseStr method "GET" == Ok Get -expect parseStr method "DELETE" == Ok Delete - -# TODO: do we want more structure in the URI, or is Str actually what programs want anyway? -# This is not a full URL! -# Request-URI = "*" | absoluteURI | abs_path | authority -RequestUri : Str - -requestUri : Parser RawStr RequestUri -requestUri = - codeunitSatisfies \c -> c != ' ' - |> oneOrMore - |> map strFromRaw - -sp = codeunit ' ' -crlf = string "\r\n" - -# TODO: The 'digit' and 'digits' from ParserStr are causing repl.expect to blow up -digit = codeunitSatisfies \c -> c >= '0' && c <= '9' -digits = digit |> oneOrMore |> map strFromRaw - -httpVersion : Parser RawStr HttpVersion -httpVersion = - const (\major -> \minor -> "\(major).\(minor)") - |> skip (string "HTTP/") - |> keep digits - |> skip (codeunit '.') - |> keep digits - -Header : [Header Str Str] - -stringWithoutColon : Parser RawStr Str -stringWithoutColon = - codeunitSatisfies \c -> c != ':' - |> oneOrMore - |> map strFromRaw - -stringWithoutCr : Parser RawStr Str -stringWithoutCr = - codeunitSatisfies \c -> c != '\r' - |> oneOrMore - |> map strFromRaw - -header : Parser RawStr Header -header = - const (\k -> \v -> Header k v) - |> keep stringWithoutColon - |> skip (string ": ") - |> keep stringWithoutCr - |> skip crlf - -expect - actual = parseStr header "Accept-Encoding: gzip, deflate\r\n" - expected = Ok (Header "Accept-Encoding" "gzip, deflate") - actual == expected - -request : Parser RawStr Request -request = - const (\m -> \u -> \hv -> \hs -> \b -> { method: m, uri: u, httpVersion: hv, headers: hs, body: b }) - |> keep method - |> skip sp - |> keep requestUri - |> skip sp - |> keep httpVersion - |> skip crlf - |> keep (many header) - |> skip crlf - |> keep anyRawString - -expect - requestText = - """ - GET /things?id=1 HTTP/1.1\r - Host: bar.example\r - Accept-Encoding: gzip, deflate\r - \r - Hello, world! - """ - actual = - parseStr request requestText - - expected : Result Request [ParsingFailure Str, ParsingIncomplete Str] - expected = Ok { - method: Get, - uri: "/things?id=1", - httpVersion: "1.1", - headers: [ - Header "Host" "bar.example", - Header "Accept-Encoding" "gzip, deflate", - ], - body: "Hello, world!" |> Str.toUtf8, - } - actual == expected - -expect - requestText = - """ - OPTIONS /resources/post-here/ HTTP/1.1\r - Host: bar.example\r - Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r - Accept-Language: en-us,en;q=0.5\r - Accept-Encoding: gzip,deflate\r - Connection: keep-alive\r - Origin: https://foo.example\r - Access-Control-Request-Method: POST\r - Access-Control-Request-Headers: X-PINGOTHER, Content-Type\r - \r\n - """ - actual = - parseStr request requestText - expected = Ok { - method: Options, - uri: "/resources/post-here/", - httpVersion: "1.1", - headers: [ - Header "Host" "bar.example", - Header "Accept" "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", - Header "Accept-Language" "en-us,en;q=0.5", - Header "Accept-Encoding" "gzip,deflate", - Header "Connection" "keep-alive", - Header "Origin" "https://foo.example", - Header "Access-Control-Request-Method" "POST", - Header "Access-Control-Request-Headers" "X-PINGOTHER, Content-Type", - ], - body: [], - } - actual == expected - -response : Parser RawStr Response -response = - const (\hv -> \sc -> \s -> \hs -> \b -> { httpVersion: hv, statusCode: sc, status: s, headers: hs, body: b }) - |> keep httpVersion - |> skip sp - |> keep digits - |> skip sp - |> keep stringWithoutCr - |> skip crlf - |> keep (many header) - |> skip crlf - |> keep anyRawString - -expect - body = - """ - \r - \r - \r - \r - A simple webpage\r - \r - \r -

Simple HTML webpage

\r -

Hello, world!

\r - \r - \r\n - """ - responseText = - """ - HTTP/1.1 200 OK\r - Content-Type: text/html; charset=utf-8\r - Content-Length: 55743\r - Connection: keep-alive\r - Cache-Control: s-maxage=300, public, max-age=0\r - Content-Language: en-US\r - Date: Thu, 06 Dec 2018 17:37:18 GMT\r - ETag: "2e77ad1dc6ab0b53a2996dfd4653c1c3"\r - Server: meinheld/0.6.1\r - Strict-Transport-Security: max-age=63072000\r - X-Content-Type-Options: nosniff\r - X-Frame-Options: DENY\r - X-XSS-Protection: 1; mode=block\r - Vary: Accept-Encoding,Cookie\r - Age: 7\r - \r - \(body) - """ - actual = - parseStr response responseText - expected = - Ok { - httpVersion: "1.1", - statusCode: "200", - status: "OK", - headers: [ - Header "Content-Type" "text/html; charset=utf-8", - Header "Content-Length" "55743", - Header "Connection" "keep-alive", - Header "Cache-Control" "s-maxage=300, public, max-age=0", - Header "Content-Language" "en-US", - Header "Date" "Thu, 06 Dec 2018 17:37:18 GMT", - Header "ETag" "\"2e77ad1dc6ab0b53a2996dfd4653c1c3\"", - Header "Server" "meinheld/0.6.1", - Header "Strict-Transport-Security" "max-age=63072000", - Header "X-Content-Type-Options" "nosniff", - Header "X-Frame-Options" "DENY", - Header "X-XSS-Protection" "1; mode=block", - Header "Vary" "Accept-Encoding,Cookie", - Header "Age" "7", - ], - body: Str.toUtf8 body, - } - actual == expected - diff --git a/examples/parser/package/ParserStr.roc b/examples/parser/package/ParserStr.roc deleted file mode 100644 index f433c030236..00000000000 --- a/examples/parser/package/ParserStr.roc +++ /dev/null @@ -1,225 +0,0 @@ -interface ParserStr - exposes [ - RawStr, - parseStr, - parseStrPartial, - parseRawStr, - parseRawStrPartial, - string, - stringRaw, - codeunit, - codeunitSatisfies, - anyString, - anyRawString, - anyCodeunit, - scalar, - oneOf, - digit, - positiveInt, - strFromRaw, - ] - imports [ - ParserCore.{ - Parser, - ParseResult, - map, - oneOrMore, - parse, - parsePartial, - buildPrimitiveParser, - }, - ] - -# Specific string-based parsers: -RawStr : List U8 - -strFromRaw : RawStr -> Str -strFromRaw = \rawStr -> - rawStr - |> Str.fromUtf8 - |> Result.withDefault "Unexpected problem while turning a List U8 (that was originally a Str) back into a Str. This should never happen!" - -strToRaw : Str -> RawStr -strToRaw = \str -> - str |> Str.toUtf8 - -strFromScalar : U32 -> Str -strFromScalar = \scalarVal -> - Str.appendScalar "" (Num.intCast scalarVal) - |> Result.withDefault "Unexpected problem while turning a U32 (that was probably originally a scalar constant) into a Str. This should never happen!" - -strFromCodeunit : U8 -> Str -strFromCodeunit = \cu -> - strFromRaw [cu] - -## Runs a parser against the start of a list of scalars, allowing the parser to consume it only partially. -parseRawStrPartial : Parser RawStr a, RawStr -> ParseResult RawStr a -parseRawStrPartial = \parser, input -> - parsePartial parser input - -## Runs a parser against the start of a string, allowing the parser to consume it only partially. -## -## - If the parser succeeds, returns the resulting value as well as the leftover input. -## - If the parser fails, returns `Err (ParsingFailure msg)` -parseStrPartial : Parser RawStr a, Str -> ParseResult Str a -parseStrPartial = \parser, input -> - parser - |> parseRawStrPartial (strToRaw input) - |> Result.map \{ val: val, input: restRaw } -> - { val: val, input: strFromRaw restRaw } - -## Runs a parser against a string, requiring the parser to consume it fully. -## -## - If the parser succeeds, returns `Ok val` -## - If the parser fails, returns `Err (ParsingFailure msg)` -## - If the parser succeeds but does not consume the full string, returns `Err (ParsingIncomplete leftover)` -parseRawStr : Parser RawStr a, RawStr -> Result a [ParsingFailure Str, ParsingIncomplete RawStr] -parseRawStr = \parser, input -> - parse parser input (\leftover -> List.len leftover == 0) - -parseStr : Parser RawStr a, Str -> Result a [ParsingFailure Str, ParsingIncomplete Str] -parseStr = \parser, input -> - parser - |> parseRawStr (strToRaw input) - |> Result.mapErr \problem -> - when problem is - ParsingFailure msg -> - ParsingFailure msg - - ParsingIncomplete leftoverRaw -> - ParsingIncomplete (strFromRaw leftoverRaw) - -codeunitSatisfies : (U8 -> Bool) -> Parser RawStr U8 -codeunitSatisfies = \check -> - buildPrimitiveParser \input -> - { before: start, others: inputRest } = List.split input 1 - - when List.get start 0 is - Err OutOfBounds -> - Err (ParsingFailure "expected a codeunit satisfying a condition, but input was empty.") - - Ok startCodeunit -> - if check startCodeunit then - Ok { val: startCodeunit, input: inputRest } - else - otherChar = strFromCodeunit startCodeunit - inputStr = strFromRaw input - - Err (ParsingFailure "expected a codeunit satisfying a condition but found `\(otherChar)`.\n While reading: `\(inputStr)`") - -# Implemented manually instead of on top of codeunitSatisfies -# because of better error messages -codeunit : U8 -> Parser RawStr U8 -codeunit = \expectedCodeUnit -> - buildPrimitiveParser \input -> - { before: start, others: inputRest } = List.split input 1 - - when List.get start 0 is - Err OutOfBounds -> - errorChar = strFromCodeunit expectedCodeUnit - - Err (ParsingFailure "expected char `\(errorChar)` but input was empty.") - - Ok startCodeunit -> - if startCodeunit == expectedCodeUnit then - Ok { val: expectedCodeUnit, input: inputRest } - else - errorChar = strFromCodeunit expectedCodeUnit - otherChar = strFromRaw start - inputStr = strFromRaw input - - Err (ParsingFailure "expected char `\(errorChar)` but found `\(otherChar)`.\n While reading: `\(inputStr)`") - -# Implemented manually instead of a sequence of codeunits -# because of efficiency and better error messages -stringRaw : List U8 -> Parser RawStr (List U8) -stringRaw = \expectedString -> - buildPrimitiveParser \input -> - { before: start, others: inputRest } = List.split input (List.len expectedString) - - if start == expectedString then - Ok { val: expectedString, input: inputRest } - else - errorString = strFromRaw expectedString - otherString = strFromRaw start - inputString = strFromRaw input - - Err (ParsingFailure "expected string `\(errorString)` but found `\(otherString)`.\nWhile reading: \(inputString)") - -string : Str -> Parser RawStr Str -string = \expectedString -> - strToRaw expectedString - |> stringRaw - |> map \_val -> expectedString - -scalar : U32 -> Parser RawStr U32 -scalar = \expectedScalar -> - expectedScalar - |> strFromScalar - |> string - |> map \_ -> expectedScalar - -# Matches any codeunit -anyCodeunit : Parser RawStr U8 -anyCodeunit = codeunitSatisfies (\_ -> Bool.true) - -# Matches any bytestring -# and consumes all of it. -# Does not fail. -anyRawString : Parser RawStr RawStr -anyRawString = buildPrimitiveParser \rawStringValue -> - Ok { val: rawStringValue, input: [] } - -# Matches any string -# as long as it is valid UTF8. -anyString : Parser RawStr Str -anyString = buildPrimitiveParser \fieldRawString -> - when Str.fromUtf8 fieldRawString is - Ok stringVal -> - Ok { val: stringVal, input: [] } - - Err (BadUtf8 _ _) -> - Err (ParsingFailure "Expected a string field, but its contents cannot be parsed as UTF8.") - -# betweenBraces : Parser RawStr a -> Parser RawStr a -# betweenBraces = \parser -> -# between parser (scalar '[') (scalar ']') -digit : Parser RawStr U8 -digit = - digitParsers = - List.range { start: At '0', end: At '9' } - |> List.map \digitNum -> - digitNum - |> codeunit - |> map \_ -> digitNum - - oneOf digitParsers - -# NOTE: Currently happily accepts leading zeroes -positiveInt : Parser RawStr (Int *) -positiveInt = - oneOrMore digit - |> map \digitsList -> - digitsList - |> List.map \char -> Num.intCast char - '0' - |> List.walk 0 \sum, digitVal -> 10 * sum + digitVal - -## Try a bunch of different parsers. -## -## The first parser which is tried is the one at the front of the list, -## and the next one is tried until one succeeds or the end of the list was reached. -## -## >>> boolParser : Parser RawStr Bool -## >>> boolParser = oneOf [string "true", string "false"] |> map (\x -> if x == "true" then True else False) -# NOTE: This implementation works, but is limited to parsing strings. -# Blocked until issue #3444 is fixed. -oneOf : List (Parser RawStr a) -> Parser RawStr a -oneOf = \parsers -> - buildPrimitiveParser \input -> - List.walkUntil parsers (Err (ParsingFailure "(no possibilities)")) \_, parser -> - when parseRawStrPartial parser input is - Ok val -> - Break (Ok val) - - Err problem -> - Continue (Err problem) diff --git a/examples/parser/package/main.roc b/examples/parser/package/main.roc deleted file mode 100644 index 9ab47e30477..00000000000 --- a/examples/parser/package/main.roc +++ /dev/null @@ -1,8 +0,0 @@ -package "parser" - exposes [ - ParserCore, - ParserCSV, - ParserStr, - ParserHttp, - ] - packages {} diff --git a/examples/parser/parse-movies-csv.roc b/examples/parser/parse-movies-csv.roc new file mode 100644 index 00000000000..156a3fe7cbe --- /dev/null +++ b/examples/parser/parse-movies-csv.roc @@ -0,0 +1,68 @@ +app "example" + packages { + pf: "https://github.com/roc-lang/basic-cli/releases/download/0.8.1/x8URkvfyi9I0QhmVG98roKBUs_AZRkLFwFJVJ3942YA.tar.br", + parser: "https://github.com/lukewilliamboswell/roc-parser/releases/download/0.5/KB-TITJ4DfunB88sFBWjCtCGV7LRRDdTH5JUXp4gIb8.tar.br", + } + imports [ + pf.Stdout, + pf.Stderr, + pf.Task.{ Task }, + parser.Core.{ Parser, map, keep }, + parser.String.{ strFromUtf8 }, + parser.CSV.{ CSV }, + ] + provides [main] to pf + +input : Str +input = "Airplane!,1980,\"Robert Hays,Julie Hagerty\"\r\nCaddyshack,1980,\"Chevy Chase,Rodney Dangerfield,Ted Knight,Michael O'Keefe,Bill Murray\"" + +main : Task {} * +main = + when CSV.parseStr movieInfoParser input is + Ok movies -> + moviesString = + movies + |> List.map movieInfoExplanation + |> Str.joinWith ("\n") + nMovies = List.len movies |> Num.toStr + + Stdout.line "$(nMovies) movies were found:\n\n$(moviesString)\n\nParse success!\n" + + Err problem -> + when problem is + ParsingFailure failure -> + Stderr.line "Parsing failure: $(failure)\n" + + ParsingIncomplete leftover -> + leftoverStr = leftover |> List.map strFromUtf8 |> List.map (\val -> "\"$(val)\"") |> Str.joinWith ", " + + Stderr.line "Parsing incomplete. Following leftover fields while parsing a record: $(leftoverStr)\n" + + SyntaxError error -> + Stderr.line "Parsing failure. Syntax error in the CSV: $(error)" + +MovieInfo := { title : Str, releaseYear : U64, actors : List Str } + +movieInfoParser = + CSV.record (\title -> \releaseYear -> \actors -> @MovieInfo { title, releaseYear, actors }) + |> keep (CSV.field CSV.string) + |> keep (CSV.field CSV.u64) + |> keep (CSV.field actorsParser) + +actorsParser = + CSV.string + |> map \val -> Str.split val "," + +movieInfoExplanation = \@MovieInfo { title, releaseYear, actors } -> + enumeratedActors = enumerate actors + releaseYearStr = Num.toStr releaseYear + + "The movie '$(title)' was released in $(releaseYearStr) and stars $(enumeratedActors)" + +enumerate : List Str -> Str +enumerate = \elements -> + { before: inits, others: last } = List.split elements (List.len elements - 1) + + last + |> List.prepend (inits |> Str.joinWith ", ") + |> Str.joinWith " and " diff --git a/examples/platform-switching/.gitignore b/examples/platform-switching/.gitignore deleted file mode 100644 index 5cbd00ddc7c..00000000000 --- a/examples/platform-switching/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -rocLovesC -rocLovesPlatforms -rocLovesRust -rocLovesSwift -rocLovesWebAssembly -rocLovesZig -main -*.wasm diff --git a/examples/platform-switching/rust-platform/Cargo.toml b/examples/platform-switching/rust-platform/Cargo.toml index b329e6472b6..c5dca2b05ab 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/platform-switching/rust-platform/rust-toolchain.toml b/examples/platform-switching/rust-platform/rust-toolchain.toml index cc6d7e3f5de..a4948bad2e3 100644 --- a/examples/platform-switching/rust-platform/rust-toolchain.toml +++ b/examples/platform-switching/rust-platform/rust-toolchain.toml @@ -1,5 +1,5 @@ [toolchain] -channel = "1.71.1" +channel = "1.72.1" profile = "default" diff --git a/examples/python-interop/.gitignore b/examples/python-interop/.gitignore deleted file mode 100644 index fbee8bbbfc2..00000000000 --- a/examples/python-interop/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -libhello* -.interop_env/ -build/ -demo.egg-info/ -dist/ diff --git a/examples/python-interop/main.roc b/examples/python-interop/main.roc index 9b9d316dcac..5014c6b4f28 100644 --- a/examples/python-interop/main.roc +++ b/examples/python-interop/main.roc @@ -10,4 +10,4 @@ main = \num -> else str = Num.toStr num - "The number was \(str), OH YEAH!!! 🤘🤘" + "The number was $(str), OH YEAH!!! 🤘🤘" diff --git a/examples/ruby-interop/.gitignore b/examples/ruby-interop/.gitignore deleted file mode 100644 index 11621592d6a..00000000000 --- a/examples/ruby-interop/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -libhello -libhello.o -libhello.dylib -libhello.so -libhello.so.* -*.log -Makefile -*.bundle -extconf.h diff --git a/examples/ruby-interop/libhello.roc b/examples/ruby-interop/libhello.roc index 9b9d316dcac..5014c6b4f28 100644 --- a/examples/ruby-interop/libhello.roc +++ b/examples/ruby-interop/libhello.roc @@ -10,4 +10,4 @@ main = \num -> else str = Num.toStr num - "The number was \(str), OH YEAH!!! 🤘🤘" + "The number was $(str), OH YEAH!!! 🤘🤘" diff --git a/examples/static-site-gen/.gitignore b/examples/static-site-gen/.gitignore deleted file mode 100644 index fdb13757e35..00000000000 --- a/examples/static-site-gen/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -/output/*.html -/output/subFolder -/static-site -/bin diff --git a/examples/static-site-gen/input/subFolder/apple.md b/examples/static-site-gen/input/subFolder/apple.md index eb853b1edfd..c1582fb2607 100644 --- a/examples/static-site-gen/input/subFolder/apple.md +++ b/examples/static-site-gen/input/subFolder/apple.md @@ -54,12 +54,21 @@ Herculei undae calcata inmeriti quercus ignes parabant iam. ### Example Code Blocks +#### Something That Cannot Be Found + ```sh # This isn't fenced roc code so its not formatted # Use a fence like ```roc to format code blocks ``` +#### A Complete File + ```roc file:codeExample.roc ``` +#### A Snippet Of Some File + +```roc +file:codeExample.roc:snippet:view +``` diff --git a/examples/static-site-gen/input/subFolder/codeExample.roc b/examples/static-site-gen/input/subFolder/codeExample.roc index 76633762c65..88fcec8063a 100644 --- a/examples/static-site-gen/input/subFolder/codeExample.roc +++ b/examples/static-site-gen/input/subFolder/codeExample.roc @@ -29,6 +29,7 @@ transformFileContent = \currentUrl, htmlContent -> |> Result.map Html.render |> Result.withDefault "" +### start snippet view view : NavLink, Str -> Html.Node view = \currentNavLink, htmlContent -> html [lang "en"] [ @@ -37,6 +38,7 @@ view = \currentNavLink, htmlContent -> Html.title [] [text currentNavLink.title], link [rel "stylesheet", href "style.css"] [], ], + ### start snippet body body [] [ div [class "main"] [ div [class "navbar"] [ @@ -49,7 +51,9 @@ view = \currentNavLink, htmlContent -> ], ], ], + ### end snippet body ] +### end snippet view viewNavbar : NavLink -> Html.Node viewNavbar = \currentNavLink -> diff --git a/examples/static-site-gen/platform/Cargo.toml b/examples/static-site-gen/platform/Cargo.toml index b85f4974240..3681eb908ce 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" diff --git a/examples/static-site-gen/platform/Html.roc b/examples/static-site-gen/platform/Html.roc index dc206d56626..c3512ff9c3e 100644 --- a/examples/static-site-gen/platform/Html.roc +++ b/examples/static-site-gen/platform/Html.roc @@ -208,29 +208,29 @@ renderHelp = \buffer, node -> Str.concat buffer content Element tagName _ attrs children -> - withTagName = "\(buffer)<\(tagName)" + withTagName = "$(buffer)<$(tagName)" withAttrs = if List.isEmpty attrs then withTagName else - List.walk attrs "\(withTagName) " renderAttr + List.walk attrs "$(withTagName) " renderAttr withTag = Str.concat withAttrs ">" withChildren = List.walk children withTag renderHelp - "\(withChildren)" + "$(withChildren)" UnclosedElem tagName _ attrs -> if List.isEmpty attrs then - "\(buffer)<\(tagName)>" + "$(buffer)<$(tagName)>" else attrs - |> List.walk "\(buffer)<\(tagName) " renderAttr + |> List.walk "$(buffer)<$(tagName) " renderAttr |> Str.concat ">" # internal helper renderAttr : Str, Attribute -> Str renderAttr = \buffer, Attribute key val -> - "\(buffer) \(key)=\"\(val)\"" + "$(buffer) $(key)=\"$(val)\"" # Main root html = element "html" diff --git a/examples/static-site-gen/platform/Html/Attributes.roc b/examples/static-site-gen/platform/Html/Attributes.roc index 5a0ea68cd32..8e3e7672693 100644 --- a/examples/static-site-gen/platform/Html/Attributes.roc +++ b/examples/static-site-gen/platform/Html/Attributes.roc @@ -184,7 +184,7 @@ coords = attribute "coords" crossorigin = attribute "crossorigin" csp = attribute "csp" data = attribute "data" -dataAttr = \dataName, dataVal -> Attribute "data-\(dataName)" dataVal +dataAttr = \dataName, dataVal -> Attribute "data-$(dataName)" dataVal datetime = attribute "datetime" decoding = attribute "decoding" default = attribute "default" diff --git a/examples/static-site-gen/platform/src/lib.rs b/examples/static-site-gen/platform/src/lib.rs index 5abff2999b8..05b3273f0fb 100644 --- a/examples/static-site-gen/platform/src/lib.rs +++ b/examples/static-site-gen/platform/src/lib.rs @@ -3,13 +3,11 @@ use libc; use pulldown_cmark::{html, Options, Parser}; use roc_std::{RocBox, RocStr}; use std::env; -use std::ffi::CStr; use std::fs; -use std::os::raw::c_char; use std::path::{Path, PathBuf}; use syntect::easy::HighlightLines; -use syntect::highlighting::{Style, ThemeSet}; +use syntect::highlighting::{ThemeSet}; use syntect::html::{ClassStyle, ClassedHTMLGenerator}; use syntect::parsing::SyntaxSet; use syntect::util::LinesWithEndings; @@ -244,17 +242,19 @@ fn process_file(input_dir: &Path, output_dir: &Path, input_file: &Path) -> Resul pulldown_cmark::CodeBlockKind::Fenced(extention_str), )) => { if in_code_block { - match replace_code_with_static_file(&code_to_highlight, input_file) { - None => {} - // Check if the code block is actually just a relative - // path to a static file, if so replace the code with - // the contents of the file. - // ``` - // file:myCodeFile.roc - // ``` - Some(new_code_to_highlight) => { - code_to_highlight = new_code_to_highlight; + match &code_to_highlight.split(':').collect::>()[..] { + ["file", replacement_file_name, "snippet", snippet_name] => { + code_to_highlight = read_replacement_snippet( + replacement_file_name.trim(), + snippet_name.trim(), + input_file, + ); } + ["file", replacement_file_name] => { + code_to_highlight = + read_replacement_file(replacement_file_name.trim(), input_file); + } + _ => {} } // Format the whole multi-line code block as HTML all at once @@ -355,45 +355,74 @@ pub fn strip_windows_prefix(path_buf: PathBuf) -> std::path::PathBuf { fn is_roc_code_block(cbk: &pulldown_cmark::CodeBlockKind) -> bool { match cbk { pulldown_cmark::CodeBlockKind::Indented => false, - pulldown_cmark::CodeBlockKind::Fenced(cow_str) => { - if cow_str.contains("roc") { - true - } else { - false - } + pulldown_cmark::CodeBlockKind::Fenced(cow_str) => cow_str.contains("roc") + } +} + +fn read_replacement_file(replacement_file_name: &str, input_file: &Path) -> String { + if replacement_file_name.contains("../") { + panic!( + "ERROR File \"{}\" must be located within the input diretory.", + replacement_file_name + ); + } + + let input_dir = input_file.parent().unwrap(); + let replacement_file_path = input_dir.join(replacement_file_name); + + match fs::read(&replacement_file_path) { + Ok(content) => String::from_utf8(content).unwrap(), + Err(err) => { + panic!( + "ERROR File \"{}\" is unreadable:\n\t{}", + replacement_file_path.to_str().unwrap(), + err + ); } } } -fn replace_code_with_static_file(code: &str, input_file: &Path) -> Option { - let input_dir = input_file.parent()?; - let trimmed_code = code.trim(); - - // Confirm the code block starts with a `file:` tag - match trimmed_code.strip_prefix("file:") { - None => None, - Some(path) => { - // File must be located in input folder or sub-directory - if path.contains("../") { - panic!("ERROR File must be located within the input diretory!"); - } +fn remove_snippet_comments(input: &str) -> String { + let line_ending = if input.contains("\r\n") { "\r\n" } else { "\n" }; - let file_path = input_dir.join(path); + input + .lines() + .filter(|line| { + !line.contains("### start snippet") && !line.contains("### end snippet") + }) + .collect::>() + .join(line_ending) +} - // Check file exists before opening - match file_path.try_exists() { - Err(_) | Ok(false) => { - panic!( - "ERROR File does not exist: \"{}\"", - file_path.to_str().unwrap() - ); - } - Ok(true) => { - let vec_u8 = fs::read(file_path).ok()?; +fn read_replacement_snippet( + replacement_file_name: &str, + snippet_name: &str, + input_file: &Path, +) -> String { + let start_marker = format!("### start snippet {}", snippet_name); + let end_marker = format!("### end snippet {}", snippet_name); - String::from_utf8(vec_u8).ok() - } - } - } + let replacement_file_content = read_replacement_file(replacement_file_name.trim(), input_file); + + let start_position = replacement_file_content + .find(&start_marker) + .expect(format!("ERROR Failed to find snippet start \"{}\". ", &start_marker).as_str()); + + let end_position = replacement_file_content + .find(&end_marker) + .expect(format!("ERROR Failed to find snippet end \"{}\". ", &end_marker).as_str()); + + if start_position >= end_position { + let start_position_str = start_position.to_string(); + let end_position_str = end_position.to_string(); + + panic!( + "ERROR Detected start position ({start_position_str}) of snippet \"{snippet_name}\" was greater than or equal to detected end position ({end_position_str})." + ); + } else { + // We want to remove other snippet comments inside this one if they exist. + remove_snippet_comments( + &replacement_file_content[start_position + start_marker.len()..end_position] + ) } } diff --git a/examples/swiftui/.gitignore b/examples/swiftui/.gitignore deleted file mode 100644 index ba2906d0666..00000000000 --- a/examples/swiftui/.gitignore +++ /dev/null @@ -1 +0,0 @@ -main diff --git a/examples/virtual-dom-wip/ExampleApp.roc b/examples/virtual-dom-wip/ExampleApp.roc index 626f472b2e3..66a81c613fe 100644 --- a/examples/virtual-dom-wip/ExampleApp.roc +++ b/examples/virtual-dom-wip/ExampleApp.roc @@ -28,7 +28,7 @@ render = \state -> head [] [], body [] [ h1 [] [text "The app"], - div [] [text "The answer is \(num)"], + div [] [text "The answer is $(num)"], ], ] diff --git a/examples/virtual-dom-wip/platform/Html/Internal/Client.roc b/examples/virtual-dom-wip/platform/Html/Internal/Client.roc index bbe23151065..af756b91597 100644 --- a/examples/virtual-dom-wip/platform/Html/Internal/Client.roc +++ b/examples/virtual-dom-wip/platform/Html/Internal/Client.roc @@ -762,7 +762,7 @@ expect # Sizes don't matter, use zero. We are not creating a HTML string so we don't care what size it would be. Element "body" 0 [] [ Element "h1" 0 [] [Text "The app"], - Element "div" 0 [onClickAttr] [Text "The answer is \(num)"], + Element "div" 0 [onClickAttr] [Text "The answer is $(num)"], ] app : App State State diff --git a/examples/webserver/Http.roc b/examples/webserver/Http.roc index 557c3dadce9..d063a06dbb2 100644 --- a/examples/webserver/Http.roc +++ b/examples/webserver/Http.roc @@ -38,7 +38,7 @@ logRequest : Request -> Task {} AppError logRequest = \req -> dateTime <- Utc.now |> Task.map Utc.toIso8601Str |> Task.await - Stdout.line "\(dateTime) \(Http.methodToStr req.method) \(req.url)" + Stdout.line "$(dateTime) $(Http.methodToStr req.method) $(req.url)" readUrlEnv : Str -> Task Str AppError readUrlEnv = \target -> @@ -60,7 +60,7 @@ handleErr = \err -> HttpError _ -> "Http error fetching content" # Log error to stderr - {} <- Stderr.line "Internal Server Error: \(message)" |> Task.await + {} <- Stderr.line "Internal Server Error: $(message)" |> Task.await _ <- Stderr.flush |> Task.attempt # Respond with Http 500 Error diff --git a/examples/webserver/echo.roc b/examples/webserver/echo.roc index 9ee78fecf8b..10bb0285e00 100644 --- a/examples/webserver/echo.roc +++ b/examples/webserver/echo.roc @@ -13,7 +13,7 @@ main = \req -> # Log request date, method and url date <- Utc.now |> Task.map Utc.toIso8601Str |> Task.await - {} <- Stdout.line "\(date) \(Http.methodToStr req.method) \(req.url)" |> Task.await + {} <- Stdout.line "$(date) $(Http.methodToStr req.method) $(req.url)" |> Task.await # Respond with request body when req.body is diff --git a/nightly_benches/rust-toolchain b/nightly_benches/rust-toolchain.toml similarity index 100% rename from nightly_benches/rust-toolchain rename to nightly_benches/rust-toolchain.toml diff --git a/roc-for-elm-programmers.md b/roc-for-elm-programmers.md index 95b8f309637..8967a7f4709 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: diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 48dc4f568aa..003d2a6c99a 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -2,6 +2,7 @@ # How to update version: # - update `channel = "RUST_VERSION"` # - update `channel = "RUST_VERSION"` in examples/platform-switching/rust-platform/rust-toolchain.toml +# - update `channel = "RUST_VERSION"` in examples/glue/rust-platform/rust-toolchain.toml # - update FROM rust:RUST_VERSION-slim-buster in Earthfile # - to update the nightly version: # - Find the latest nightly release that matches RUST_VERSION here: https://github.com/oxalica/rust-overlay/tree/master/manifests/nightly/2023 @@ -10,9 +11,9 @@ # - update nightly-OLD_DATE in .github/workflows/windows_release_build.yml # - update nightly-OLD_DATE in crates/compiler/build/src/link.rs -channel = "1.71.1" # check ^^^ when changing this +channel = "1.72.1" # check ^^^ when changing this # -# channel = "nightly-2023-05-28" # 1.71.0 nightly to be able to use unstable features +# channel = "nightly-2023-07-09" # 1.72.0 nightly to be able to use unstable features profile = "default" components = [ # for usages of rust-analyzer or similar tools inside `nix develop` diff --git a/www/.gitignore b/www/.gitignore deleted file mode 100644 index 9bc9fa870c6..00000000000 --- a/www/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# ignore a symlink to the wasm repl code -public/repl \ No newline at end of file diff --git a/www/InteractiveExample.roc b/www/InteractiveExample.roc index 752a7b697f3..474cd106d6d 100644 --- a/www/InteractiveExample.roc +++ b/www/InteractiveExample.roc @@ -36,7 +36,7 @@ view = Newline, Desc [Ident "user", Kw "<-", Ident "Http.get", Ident "url", Ident "Json.codec", Kw "|>", Ident "Task.await"] "

This fetches the contents of the URL and decodes them as JSON.

If the shape of the JSON isn't compatible with the type of user (based on type inference), this will give a decoding error immediately.

As with all the other lines ending in |> Task.await, if there's an error, nothing else in storeEmail will be run, and handleErr will end up handling the error.

", Newline, - Desc [Ident "dest", Kw "=", Ident "Path.fromStr", StrInterpolation "\"" "user.name" ".txt\""] "

The \\(user.name) in this string literal will be replaced with the value in name. This is string interpolation.

Note that this line doesn't end with |> Task.await. Earlier lines needed that because they were I/O tasks, but this is a plain old definition, so there's no task to await.

", + Desc [Ident "dest", Kw "=", Ident "Path.fromStr", StrInterpolation "\"" "user.name" ".txt\""] "

The \$(user.name) in this string literal will be replaced with the value in name. This is string interpolation.

Note that this line doesn't end with |> Task.await. Earlier lines needed that because they were I/O tasks, but this is a plain old definition, so there's no task to await.

", Newline, Desc [Literal "_", Kw "<-", Ident "File.writeUtf8", Ident "dest", Ident "user.email", Kw "|>", Ident "Task.await"] "

This writes user.email to the file, encoded as UTF-8.

We won't be using the output of writeUtf8, so we name it _. The special name _ is for when you don't want to use something.

You can name as many things as you like _, but you can never reference anything named _. So it's only useful for when you don't want to choose a name.

", Newline, @@ -89,7 +89,7 @@ tokensToStr = \tokens -> # Don't put spaces after opening parens or before closing parens argsWithCommas = args - |> List.map \ident -> "\(ident)" + |> List.map \ident -> "$(ident)" |> Str.joinWith ", " bufWithSpace @@ -98,32 +98,32 @@ tokensToStr = \tokens -> |> Str.concat " ->" Kw str -> - Str.concat bufWithSpace "\(str)" + Str.concat bufWithSpace "$(str)" Num str | Str str | Literal str -> # We may render these differently in the future - Str.concat bufWithSpace "\(str)" + Str.concat bufWithSpace "$(str)" Comment str -> - Str.concat bufWithSpace "# \(str)" + Str.concat bufWithSpace "# $(str)" Ident str -> Str.concat bufWithSpace (identToHtml str) StrInterpolation before interp after -> bufWithSpace - |> Str.concat (if Str.isEmpty before then "" else "\(before)") - |> Str.concat "\\(\(identToHtml interp))" - |> Str.concat (if Str.isEmpty after then "" else "\(after)") + |> Str.concat (if Str.isEmpty before then "" else "$(before)") + |> Str.concat "\$($(identToHtml interp))" + |> Str.concat (if Str.isEmpty after then "" else "$(after)") identToHtml : Str -> Str identToHtml = \str -> List.walk (Str.split str ".") "" \accum, ident -> - identHtml = "\(ident)" + identHtml = "$(ident)" if Str.isEmpty accum then identHtml else - "\(accum).\(identHtml)" + "$(accum).$(identHtml)" sectionsToStr : List Section -> Str sectionsToStr = \sections -> @@ -168,5 +168,5 @@ radio = \index, labelHtml, descHtml -> checkedHtml = if index == 0 then " checked" else "" """ - \(descHtml) + $(descHtml) """ diff --git a/www/README.md b/www/README.md index 016e87cb758..1727bc31257 100644 --- a/www/README.md +++ b/www/README.md @@ -4,7 +4,7 @@ - Linux or MacOS operating system, Windows users can use linux through WSL. - Install [git](https://chat.openai.com/share/71fb3ae6-80d7-478c-8a27-a36aaa5ba921) -- Install [nix](https://nixos.org/download.html) +- Install [nix](https://github.com/roc-lang/roc/blob/main/BUILDING_FROM_SOURCE.md#installing-nix) ## Building the website from scratch diff --git a/www/build-dev-local.sh b/www/build-dev-local.sh index 0e21952743c..e1a59aec6fd 100755 --- a/www/build-dev-local.sh +++ b/www/build-dev-local.sh @@ -1,5 +1,8 @@ #!/usr/bin/env bash +# https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/ +set -euxo pipefail + # Use this script to for testing the WIP site locally without downloading assets every time. # NOTE run `bash www/build.sh` to cache local copy of fonts, and repl assets etc diff --git a/www/build.sh b/www/build.sh index 83a89fae2f1..497f74e083e 100755 --- a/www/build.sh +++ b/www/build.sh @@ -99,6 +99,10 @@ $roc version echo 'Building site markdown content' $roc run www/main.roc -- www/content/ www/build/ +echo "Adding github link to examples' html..." +source www/scripts/add-github-link-to-examples.sh +add_github_link_to_examples www/build/examples + # cleanup rm -rf roc_nightly roc_releases.json diff --git a/www/content/faq.md b/www/content/faq.md index 7bdcc7f52ae..9c88696ce8e 100644 --- a/www/content/faq.md +++ b/www/content/faq.md @@ -4,10 +4,7 @@ The Roc programming language is named after [a mythical bird](). - - - - +The Roc logoA purple origami bird made of six triangles That's why the logo is a bird. It’s specifically an [_origami_ bird](https://youtu.be/9gni1t1k1uY) as an homage @@ -153,6 +150,19 @@ the data model that would break their call sites, even if that change would impr On a historical note, `Maybe` may have been thought of as a substitute for null references—as opposed to something that emerged organically based on specific motivating use cases after `Result` already existed. That said, in languages that do not have an equivalent of Roc's tag unions, it's much less ergonomic to write something like `Result a [ListWasEmpty]`, so that design would not fit those languages as well as it fits Roc. +## Why doesn't Roc have a builtin "arbitrary-sized" number type like BigNum or BigDecimal? + +Like all programming languages, Roc is subject to the limitations of the universe. Almost all numbers in mathematics cannot even be represented in the universe because you'd run out of matter trying to write them down, and therefore Roc must choose what subset of mathematics to support—including which numbers to support. + +Roc supports 128-bit integers and 128-bit fixed-point decimal numbers. Here are some approximate ranges for those: + +- `I128`: ±170000000000000000000000000000000000000 +- `Dec`: ±170000000000000000000.000000000000000000 + +For heap-allocated numbers to be worth including in Roc's builtins, a sufficient number of real-world use cases would need to exist where the above ranges are too small, but a heap-allocated number would be big enough, _and_ the performance hit from the heap-allocated numbers would be acceptable to those use cases, _and_ a user-created implementation of heap-allocated numbers would not be acceptable, _and_ using 64-bit floating-point numbers (which can be even larger than these, at the cost of precision loss in some operations) would not be acceptable either. + +So far, this has not happened. + ## Why doesn't Roc have higher-kinded polymorphism or arbitrary-rank types? _Since this is a FAQ answer, it assumes familiarity with higher-kinded types and higher-rank types instead of including a primer on them._ diff --git a/www/content/friendly.md b/www/content/friendly.md index 38b7431e8d0..2b31d03e78b 100644 --- a/www/content/friendly.md +++ b/www/content/friendly.md @@ -9,7 +9,7 @@ Roc's syntax isn't trivial, but there also isn't much of it to learn. It's desig - `user.email` always accesses the `email` field of a record named `user`. (Roc has no inheritance, subclassing, or proxying.) - `Email.isValid` always refers to something named `isValid` exported by a module named `Email`. (Module names are always capitalized, and variables/constants never are.) Modules are always defined statically and can't be modified at runtime; there's no [monkey patching](https://en.wikipedia.org/wiki/Monkey_patch) to consider either. - `x = doSomething y z` always declares a new constant `x` (Roc has [no mutable variables, reassignment, or shadowing](/functional)) to be whatever the `doSomething` function returns when passed the arguments `y` and `z`. (Function calls in Roc don't need parentheses or commas.) -- `"Name: \(Str.trim name)"` uses *string interpolation* syntax: a backslash inside a string literal, followed by an expression in parentheses. This code is the same as combining the string `"Name: "` with the string returned by the function call `Str.trim name`.

Because Roc's string interpolation syntax begins with a backslash (just like other backlash-escapes such as `\n` and `\"`), you can always tell which parts of a string involve special handling: the parts that begin with backslashes. Everything else works as normal. +- `"Name: $(Str.trim name)"` uses *string interpolation* syntax: a dollar sign inside a string literal, followed by an expression in parentheses. Roc also ships with a source code formatter that helps you maintain a consistent style with little effort. The `roc format` command neatly formats your source code according to a common style, and it's designed with the time-saving feature of having no configuration options. This feature saves teams all the time they would otherwise spend debating which stylistic tweaks to settle on! diff --git a/www/content/functional.md b/www/content/functional.md index 28b2581865d..31fe8b5b8f1 100644 --- a/www/content/functional.md +++ b/www/content/functional.md @@ -65,7 +65,7 @@ A benefit of this design is that it makes Roc code easier to rearrange without c
func = \arg ->
     greeting = "Hello"
-    welcome = \name -> "\(greeting), \(name)!"
+    welcome = \name -> "$(greeting), $(name)!"
 
     # …
 
@@ -82,7 +82,7 @@ Suppose I decide to extract the `welcome` function to the top level, so I can re
 
     # …
 
-welcome = \prefix, name -> "\(prefix), \(name)!"
+welcome = \prefix, name -> "$(prefix), $(name)!" Even without knowing the rest of `func`, we can be confident this change will not alter the code's behavior. @@ -90,7 +90,7 @@ In contrast, suppose Roc allowed reassignment. Then it's possible something in t
func = \arg ->
     greeting = "Hello"
-    welcome = \name -> "\(greeting), \(name)!"
+    welcome = \name -> "$(greeting), $(name)!"
 
     # …
 
diff --git a/www/content/index.md b/www/content/index.md
index b5addaf0e91..66980a6e66c 100644
--- a/www/content/index.md
+++ b/www/content/index.md
@@ -6,7 +6,7 @@
 
 

A fast, friendly, functional language.

list = List.map songs \song ->
-    "Artist: \(song.artist)"
+ "Artist: $(song.artist)"
@@ -146,6 +146,7 @@ If you would like your organization to become an official sponsor of Roc's devel We'd also like to express our gratitude to our generous [individual sponsors](https://github.com/sponsors/roc-lang/)! A special thanks to those sponsoring $25/month or more:
    +
  • Steven Chen
  • Drew Lazzeri
  • Alex Binaei
  • Jono Mallanyk diff --git a/www/content/platforms.md b/www/content/platforms.md index e956568da54..4b76c69192d 100644 --- a/www/content/platforms.md +++ b/www/content/platforms.md @@ -8,7 +8,7 @@ Here is a Roc application that prints `"Hello, World!"` to the command line: ```roc app "hello" - packages { pf: "https://github.com/roc-lang/basic-cli/releases/download/0.7.1/Icc3xJoIixF3hCcfXrDwLCu4wQHtNdPyoJkEbkgIElA.tar.br" } + packages { pf: "https://github.com/roc-lang/basic-cli/releases/download/0.8.1/x8URkvfyi9I0QhmVG98roKBUs_AZRkLFwFJVJ3942YA.tar.br" } imports [pf.Stdout] provides [main] to pf diff --git a/www/content/tutorial.md b/www/content/tutorial.md index fba4399a2e6..85d5f9c9e8a 100644 --- a/www/content/tutorial.md +++ b/www/content/tutorial.md @@ -142,7 +142,7 @@ We'll get into more depth about modules later, but for now you can think of a mo An alternative syntax for `Str.concat` is _string interpolation_, which looks like this: -
    "\(greeting) there, \(audience)!"
    +
    "$(greeting) there, $(audience)!"
    This is syntax sugar for calling `Str.concat` several times, like so: @@ -152,7 +152,7 @@ Str.concat greeting (Str.concat " there, " (Str.concat audience "!")) You can put entire single-line expressions inside the parentheses in string interpolation. For example: -
    "Two plus three is: \(Num.toStr (2 + 3))"
    +
    "Two plus three is: $(Num.toStr (2 + 3))"
    By the way, there are many other ways to put strings together! Check out the [documentation](https://www.roc-lang.org/builtins/Str) for the `Str` module for more. @@ -164,7 +164,7 @@ Make a file named `main.roc` and put this in it: ```roc app "hello" - packages { pf: "https://github.com/roc-lang/basic-cli/releases/download/0.7.1/Icc3xJoIixF3hCcfXrDwLCu4wQHtNdPyoJkEbkgIElA.tar.br" } + packages { pf: "https://github.com/roc-lang/basic-cli/releases/download/0.8.1/x8URkvfyi9I0QhmVG98roKBUs_AZRkLFwFJVJ3942YA.tar.br" } imports [pf.Stdout] provides [main] to pf @@ -194,7 +194,7 @@ iguanas = 2 total = Num.toStr (birds + iguanas) main = - Stdout.line "There are \(total) animals." + Stdout.line "There are $(total) animals." ``` Now run `roc dev` again. This time the "Downloading ..." message won't appear; the file has been cached from last time, and won't need to be downloaded again. @@ -211,7 +211,7 @@ A definition names an expression. - The next def assigns the name `total` to the expression `Num.toStr (birds + iguanas)`. - The last def assigns the name `main` to an expression which returns a `Task`. We'll [discuss tasks later](#tasks). -Once we have a def, we can use its name in other expressions. For example, the `total` expression refers to `birds` and `iguanas`, and `Stdout.line "There are \(total) animals."` refers to `total`. +Once we have a def, we can use its name in other expressions. For example, the `total` expression refers to `birds` and `iguanas`, and `Stdout.line "There are $(total) animals."` refers to `total`. You can name a def using any combination of letters and numbers, but they have to start with a lowercase letter. @@ -234,7 +234,7 @@ iguanas = 2 total = addAndStringify birds iguanas main = - Stdout.line "There are \(total) animals." + Stdout.line "There are $(total) animals." addAndStringify = \num1, num2 -> Num.toStr (num1 + num2) @@ -499,7 +499,6 @@ This means you can choose to omit the `title`, `description`, or both fields, wh This is also the type that would have been inferred for `table` if no annotation had been written. Roc's compiler can tell from the destructuring syntax `title ? ""` that `title` is an optional field, and that it has the type `Str`. -These default values can reference other expressions in the record destructure; if you wanted, you could write `{ height, width, title ? "", description ? Str.concat "A table called " title }`. Destructuring is the only way to implement a record with optional fields. For example, if you write the expression `config.title` and `title` is an optional field, you'll get a compile error. @@ -849,7 +848,7 @@ Here's how calling `List.get` can look in practice: ```roc when List.get ["a", "b", "c"] index is - Ok str -> "I got this string: \(str)" + Ok str -> "I got this string: $(str)" Err OutOfBounds -> "That index was out of bounds, sorry!" ``` @@ -980,7 +979,7 @@ Sometimes you may want to document the type of a definition. For example, you mi ```roc # Takes a firstName string and a lastName string, and returns a string fullName = \firstName, lastName -> - "\(firstName) \(lastName)" + "$(firstName) $(lastName)" ``` Comments can be valuable documentation, but they can also get out of date and become misleading. If someone changes this function and forgets to update the comment, it will no longer be accurate. @@ -992,7 +991,7 @@ Here's another way to document this function's type, which doesn't have that pro ```roc fullName : Str, Str -> Str fullName = \firstName, lastName -> - "\(firstName) \(lastName)" + "$(firstName) $(lastName)" ``` The `fullName :` line is a _type annotation_. It's a strictly optional piece of metadata we can add above a def to describe its type. Unlike a comment, the Roc compiler will check type annotations for accuracy. If the annotation ever doesn't fit with the implementation, we'll get a compile-time error. @@ -1199,7 +1198,7 @@ Following this pattern, the 16 in `I16` means that it's a signed 16-bit integer. Choosing a size depends on your performance needs and the range of numbers you want to represent. Consider: - Larger integer sizes can represent a wider range of numbers. If you absolutely need to represent numbers in a certain range, make sure to pick an integer size that can hold them! -- Smaller integer sizes take up less memory. These savings rarely matters in variables and function arguments, but the sizes of integers that you use in data structures can add up. This can also affect whether those data structures fit in [cache lines](https://en.wikipedia.org/wiki/CPU_cache#Cache_performance), which can easily be a performance bottleneck. +- Smaller integer sizes take up less memory. These savings rarely matter in variables and function arguments, but the sizes of integers that you use in data structures can add up. This can also affect whether those data structures fit in [cache lines](https://en.wikipedia.org/wiki/CPU_cache#Cache_performance), which can easily be a performance bottleneck. - Certain processors work faster on some numeric sizes than others. There isn't even a general rule like "larger numeric sizes run slower" (or the reverse, for that matter) that applies to all processors. In fact, if the CPU is taking too long to run numeric calculations, you may find a performance improvement by experimenting with numeric sizes that are larger than otherwise necessary. However, in practice, doing this typically degrades overall performance, so be careful to measure properly! Here are the different fixed-size integer types that Roc supports: @@ -1247,7 +1246,7 @@ There are some use cases where `F64` and `F32` can be better choices than `Dec` ### [Num, Int, and Frac](#num-int-and-frac) {#num-int-and-frac} -Some operations work on specific numeric types - such as `I64` or `Dec` - but operations support multiple numeric types. For example, the `Num.abs` function works on any number, since you can take the [absolute value](https://en.wikipedia.org/wiki/Absolute_value) of integers and fractions alike. Its type is: +Some operations work on specific numeric types - such as `I64` or `Dec` - but some operations support multiple numeric types. For example, the `Num.abs` function works on any number, since you can take the [absolute value](https://en.wikipedia.org/wiki/Absolute_value) of integers and fractions alike. Its type is: ```roc abs : Num a -> Num a @@ -1333,9 +1332,9 @@ pluralize = \singular, plural, count -> countStr = Num.toStr count if count == 1 then - "\(countStr) \(singular)" + "$(countStr) $(singular)" else - "\(countStr) \(plural)" + "$(countStr) $(plural)" expect pluralize "cactus" "cacti" 1 == "1 cactus" @@ -1362,17 +1361,37 @@ pluralize = \singular, plural, count -> countStr = Num.toStr count if count == 1 then - "\(countStr) \(singular)" + "$(countStr) $(singular)" else expect count > 0 - "\(countStr) \(plural)" + "$(countStr) $(plural)" ``` This `expect` will fail if you call `pluralize` passing a count of 0. -Note that inline `expect`s do not halt the program! They are designed to inform, not to affect control flow. In fact, if you do `roc build`, they are not even included in the final binary. -So you'll want to use `roc dev` or `roc test` to get the output for `expect`. +Note that inline `expect`s do not halt the program! They are designed to inform, not to affect control flow. Different `roc` commands will also handle `expect`s differently: +- `roc build` discards all `expect`s for optimal runtime performance. +- `roc dev` only runs inline `expect`s that are encountered during normal execution of the program. +- `roc test` runs top level `expect`s and inline `expect`s that are encountered because of the running of top level `expect`s. + +Let's clear up any confusion with an example: +```roc +main = + expect 1 == 2 + + Stdout.line "Hello, World!" + +double = \num -> + expect num > -1 + + num * 2 + +expect double 0 == 0 +``` +- `roc build` wil run `main`, ignore `expect 1 == 2` and just print `Hello, World!`. +- `roc dev` will run `main`, tell you `expect 1 == 2` failed but will still print `Hello, World!`. +- `roc test` will run `expect double 0 == 0` followed by `expect num > -1` and will print how many top level expects passed: `0 failed and 1 passed in 100 ms.`. ## [Modules](#modules) {#modules} @@ -1404,7 +1423,7 @@ These modules are not ordinary `.roc` files that live on your filesystem. Rather Besides being built into the compiler, the builtin modules are different from other modules in that: - They are always imported. You never need to add them to `imports`. -- All their types are imported unqualified automatically. So you never need to write `Num.Nat`, because it's as if the `Num` module was imported using `imports [Num.{ Nat }]` (the same is true for all the other types in the `Num` module. +- All their types are imported unqualified automatically. So you never need to write `Num.Nat`, because it's as if the `Num` module was imported using `imports [Num.{ Nat }]` (the same is true for all the other types in the `Num` module). ### [App Module Header](#app-module-header) {#app-module-header} @@ -1412,7 +1431,7 @@ Let's take a closer look at the part of `main.roc` above the `main` def: ```roc app "hello" - packages { pf: "https://github.com/roc-lang/basic-cli/releases/download/0.7.1/Icc3xJoIixF3hCcfXrDwLCu4wQHtNdPyoJkEbkgIElA.tar.br" } + packages { pf: "https://github.com/roc-lang/basic-cli/releases/download/0.8.1/x8URkvfyi9I0QhmVG98roKBUs_AZRkLFwFJVJ3942YA.tar.br" } imports [pf.Stdout] provides [main] to pf ``` @@ -1424,9 +1443,9 @@ The line `app "hello"` shows that this module is a Roc application. The "hello" The remaining lines all involve the [platform](https://github.com/roc-lang/roc/wiki/Roc-concepts-explained#platform) this application is built on: ```roc -packages { pf: "https://github.com/roc-lang/basic-cli/releases/download/0.7.1/Icc3xJoIixF3hCcfXrDwLCu4wQHtNdPyoJkEbkgIElA.tar.br" } - imports [pf.Stdout] - provides [main] to pf +packages { pf: "https://github.com/roc-lang/basic-cli/releases/download/0.8.1/x8URkvfyi9I0QhmVG98roKBUs_AZRkLFwFJVJ3942YA.tar.br" } +imports [pf.Stdout] +provides [main] to pf ``` The `packages { pf: "https://...tar.br" }` part says three things: @@ -1455,7 +1474,7 @@ imports [pf.Stdout, AdditionalModule, AnotherModule] You can find documentation for the `Stdout.line` function in the [Stdout](https://www.roc-lang.org/packages/basic-cli/Stdout#line) module documentation. -### [Package Modules](#interface-modules) {#interface-modules} +### [Package Modules](#package-modules) {#package-modules} Package modules enable Roc code to be easily re-used and shared. This is achieved by organizing code into different Interface modules and then including these in the `exposes` field of the package file structure, `package "name" exposes [ MyInterface ] packages {}`. The modules that are listed in the `exposes` field are then available for use in applications, platforms, or other packages. Internal modules that are not listed will be unavailable for use outside of the package. @@ -1487,7 +1506,7 @@ Including the hash solves a number of problems: See [Html Interface](https://github.com/roc-lang/roc/blob/main/examples/virtual-dom-wip/platform/Html.roc) for an example. -### [Platform Modules](#interface-modules) {#interface-modules} +### [Platform Modules](#platform-modules) {#platform-modules} \[This part of the tutorial has not been written yet. Coming soon!\] @@ -1495,7 +1514,7 @@ See [Platform Switching Rust](https://github.com/roc-lang/roc/blob/main/examples ### [Importing Files](#importing-files) {#importing-files} -You can import files directly into your module as a `Str` or a `List U8` at compile time. This is can be useful for when working with data you would like to keep in a separate file, e.g. JSON or YAML configuration. +You can import files directly into your module as a `Str` or a `List U8` at compile time. This is can be useful when working with data you would like to keep in a separate file, e.g. JSON or YAML configuration. ```roc imports [ @@ -1523,7 +1542,7 @@ Let's start with a basic "Hello World" program. ```roc app "cli-tutorial" - packages { pf: "https://github.com/roc-lang/basic-cli/releases/download/0.7.1/Icc3xJoIixF3hCcfXrDwLCu4wQHtNdPyoJkEbkgIElA.tar.br" } + packages { pf: "https://github.com/roc-lang/basic-cli/releases/download/0.8.1/x8URkvfyi9I0QhmVG98roKBUs_AZRkLFwFJVJ3942YA.tar.br" } imports [pf.Stdout] provides [main] to pf @@ -1557,16 +1576,16 @@ Let's change `main` to read a line from `stdin`, and then print what we got: ```roc app "cli-tutorial" - packages { pf: "https://github.com/roc-lang/basic-cli/releases/download/0.7.1/Icc3xJoIixF3hCcfXrDwLCu4wQHtNdPyoJkEbkgIElA.tar.br" } + packages { pf: "https://github.com/roc-lang/basic-cli/releases/download/0.8.1/x8URkvfyi9I0QhmVG98roKBUs_AZRkLFwFJVJ3942YA.tar.br" } imports [pf.Stdout, pf.Stdin, pf.Task] provides [main] to pf main = Task.await Stdin.line \input -> - Stdout.line "Your input was: \(Inspect.toStr input)" + Stdout.line "Your input was: $(Inspect.toStr input)" ``` -The [`Inspect.toStr`](https://www.roc-lang.org/builtins/Inspect#toStr) function returns a `Str` representation of any Roc value. It's useful for things like debugging and logging (although [`dbg`](https://www.roc-lang.org/tutorial#debugging) is often nicer for debugging), but its output is almost never something that should be shown to end users! In this case we're just using it for our own learning, but in a real program we'd run a `when` on `answer` and do something different depending on whether we got an `End` or `Input` tag. +The [`Inspect.toStr`](https://www.roc-lang.org/builtins/Inspect#toStr) function returns a `Str` representation of any Roc value. It's useful for things like debugging and logging (although [`dbg`](https://www.roc-lang.org/tutorial#debugging) is often nicer for debugging), but its output is almost never something that should be shown to end users! In this case we're just using it for our own learning, but in a real program we'd run a `when` on `input` and do something different depending on whether we got an `End` or `Input` tag. If you run this program, at first it won't do anything. It's waiting for you to type something in and press Enter! Once you do, it should print back out what you entered—either `Your input was: End` or `Your input was: Input ` depending on whether you pressed Enter or the key combination to close stdin (namely Ctrl+D on UNIX or Ctrl+Z on Windows). Try doing it both ways to watch the output change! @@ -1584,7 +1603,7 @@ The second argument to `Task.await` is a "callback function" which runs after th ```roc \input -> - Stdout.line "Your input was: \(Inspect.toStr input)" + Stdout.line "Your input was: $(Inspect.toStr input)" ``` Notice that, just like before, we're still building `main` from a single `Task`. This is how we'll always do it! We'll keep building up bigger and bigger `Task`s out of smaller tasks, and then setting `main` to be that one big `Task`. @@ -1595,21 +1614,21 @@ For example, we can print a prompt before we pause to read from `stdin`, so it n main = Task.await (Stdout.line "Type something press Enter:") \_ -> Task.await Stdin.line \input -> - Stdout.line "Your input was: \(Inspect.toStr input)" + Stdout.line "Your input was: $(Inspect.toStr input)" ``` This works, but we can make it a little nicer to read. Let's change it to the following: ```roc app "cli-tutorial" - packages { pf: "https://github.com/roc-lang/basic-cli/releases/download/0.7.1/Icc3xJoIixF3hCcfXrDwLCu4wQHtNdPyoJkEbkgIElA.tar.br" } + packages { pf: "https://github.com/roc-lang/basic-cli/releases/download/0.8.1/x8URkvfyi9I0QhmVG98roKBUs_AZRkLFwFJVJ3942YA.tar.br" } imports [pf.Stdout, pf.Stdin, pf.Task.{ await }] provides [main] to pf main = await (Stdout.line "Type something press Enter:") \_ -> await Stdin.line \input -> - Stdout.line "Your input was: \(Inspect.toStr input)" + Stdout.line "Your input was: $(Inspect.toStr input)" ``` Here we've changed how we're importing the `Task` module. Before it was `pf.Task` and now it's `pf.Task.{ await }`. The difference is that we're importing `await` in an _unqualified_ way, meaning that whenever we write `await` in this module, it will refer to `Task.await`. Now we no longer need to write `Task.` every time we want to use `await`. @@ -1623,7 +1642,7 @@ main = _ <- await (Stdout.line "Type something press Enter:") input <- await Stdin.line - Stdout.line "Your input was: \(Inspect.toStr input)" + Stdout.line "Your input was: $(Inspect.toStr input)" ``` ## [Backpassing](#backpassing) {#backpassing} @@ -1635,14 +1654,14 @@ Here, we're using backpassing to define two anonymous functions. Here's one of t ```roc input <- -Stdout.line "Your input was: \(Inspect.toStr input)" +Stdout.line "Your input was: $(Inspect.toStr input)" ``` It may not look like it, but this code is defining an anonymous function! You might remember it as the anonymous function we previously defined like this: ```roc \input -> - Stdout.line "Your input was: \(Inspect.toStr input)" + Stdout.line "Your input was: $(Inspect.toStr input)" ``` These two anonymous functions are the same, just defined using different syntax. @@ -1655,7 +1674,7 @@ Here's the original: ```roc await Stdin.line \input -> - Stdout.line "Your input was: \(Inspect.toStr input)" + Stdout.line "Your input was: $(Inspect.toStr input)" ``` And here's the equivalent expression with backpassing syntax: @@ -1663,7 +1682,7 @@ And here's the equivalent expression with backpassing syntax: ```roc input <- await Stdin.line -Stdout.line "Your input was: \(Inspect.toStr input)" +Stdout.line "Your input was: $(Inspect.toStr input)" ``` Here's the other function we're defining with backpassing: @@ -1672,7 +1691,7 @@ Here's the other function we're defining with backpassing: _ <- input <- await Stdin.line -Stdout.line "Your input was: \(Inspect.toStr input)" +Stdout.line "Your input was: $(Inspect.toStr input)" ``` We could also have written that function this way if we preferred: @@ -1681,7 +1700,7 @@ We could also have written that function this way if we preferred: _ <- await Stdin.line \input -> - Stdout.line "Your input was: \(Inspect.toStr input)" + Stdout.line "Your input was: $(Inspect.toStr input)" ``` This is using a mix of a backpassing function `_ <-` and a normal function `\input ->`, which is totally allowed! Since backpassing is nothing more than syntax sugar for defining a function and passing back as an argument to another function, there's no reason we can't mix and match if we like. @@ -1693,7 +1712,7 @@ main = _ <- await (Stdout.line "Type something press Enter:") input <- await Stdin.line - Stdout.line "Your input was: \(Inspect.toStr input)" + Stdout.line "Your input was: $(Inspect.toStr input)" ``` This way, it reads like a series of instructions: @@ -1710,7 +1729,7 @@ Some important things to note about backpassing and `await`: See the [Task & Error Handling example](https://www.roc-lang.org/examples/Tasks/README.html) for a more detailed explanation of how to use tasks to help with error handling in a larger program. -## Examples +## [Examples](#examples) {#examples} Well done on making it this far! @@ -1728,7 +1747,7 @@ Let's say I write a function which takes a record with a `firstName` and `lastNa ```roc fullName = \user -> - "\(user.firstName) \(user.lastName)" + "$(user.firstName) $(user.lastName)" ``` I can pass this function a record that has more fields than just `firstName` and `lastName`, as long as it has _at least_ both of those fields (and both of them are strings). So any of these calls would work: @@ -1747,14 +1766,14 @@ If we add a type annotation to this `fullName` function, we can choose to have i # Closed record fullName : { firstName : Str, lastName : Str } -> Str fullName = \user -> - "\(user.firstName) \(user.lastName)" + "$(user.firstName) $(user.lastName)" ``` ```roc # Open record (because of the `*`) fullName : { firstName : Str, lastName : Str }* -> Str fullName = \user -> - "\(user.firstName) \(user.lastName)" + "$(user.firstName) $(user.lastName)" ``` The `*` in the type `{ firstName : Str, lastName : Str }*` is what makes it an open record type. This `*` is the _wildcard type_ we saw earlier with empty lists. (An empty list has the type `List *`, in contrast to something like `List Str` which is a list of strings.) @@ -1770,7 +1789,7 @@ The type variable can also be a named type variable, like so: ```roc addHttps : { url : Str }a -> { url : Str }a addHttps = \record -> - { record & url: "https://\(record.url)" } + { record & url: "https://$(record.url)" } ``` This function uses _constrained records_ in its type. The annotation is saying: diff --git a/www/public/different-names/index.html b/www/public/different-names/index.html index 2f38592f385..1d616d1dbe7 100644 --- a/www/public/different-names/index.html +++ b/www/public/different-names/index.html @@ -66,7 +66,7 @@

    Different Names

    - List.first + List.first
    • head
    • diff --git a/www/public/site.js b/www/public/site.js index ebdd90065ad..88dd1cb4674 100644 --- a/www/public/site.js +++ b/www/public/site.js @@ -40,11 +40,11 @@ const repl = { }, { match: (input) => input.replace(/ /g, "").match(/^name="/i), - show: '

      This created a new definitionname is now defined to be equal to the string you entered.

      Try using this definition by entering "Hi, \\(name)!"

      ', + show: '

      This created a new definitionname is now defined to be equal to the string you entered.

      Try using this definition by entering "Hi, \$(name)!"

      ', }, { - match: (input) => input.match(/^["][^\\]+\\\(name\)/i), - show: `

      Nicely done! This is an example of string interpolation, which replaces part of a string with whatever you put inside the parentheses after a \\.

      Now that you’ve written a few expressions, you can either continue exploring in this REPL, or move on to the tutorial to learn how to make full programs.

      Welcome to Roc! ${tutorialButtonSvg} Start Tutorial

      `, + match: (input) => input.match(/^"[^\$]+\$\(name\)/i), + show: `

      Nicely done! This is an example of string interpolation, which replaces part of a string with whatever you put inside the parentheses after a $.

      Now that you’ve written a few expressions, you can either continue exploring in this REPL, or move on to the tutorial to learn how to make full programs.

      Welcome to Roc! ${tutorialButtonSvg} Start Tutorial

      `, }, ], diff --git a/www/scripts/add-github-link-to-examples.sh b/www/scripts/add-github-link-to-examples.sh new file mode 100755 index 00000000000..0dc40b7e545 --- /dev/null +++ b/www/scripts/add-github-link-to-examples.sh @@ -0,0 +1,24 @@ +#!/usr/bin/env bash + +# https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/ +set -euxo pipefail + +function add_github_link_to_examples { + local examples_dir_path="$1" # for example: www/build/examples + + local github_logo_svg=$(cat <<'EOF' + +EOF + ) + + local examples_link="https://github.com/roc-lang/examples/tree/main/examples" + + local perl_script=www/scripts/add-link.pl + # test if we can find perl script + test -e $perl_script + + # Insert a github link to the example in HTML + find "$examples_dir_path" -type f -name "README.html" -exec perl $perl_script "$examples_dir_path" "$examples_link" "$github_logo_svg" {} \; +} \ No newline at end of file diff --git a/www/scripts/add-link.pl b/www/scripts/add-link.pl new file mode 100644 index 00000000000..45d672de132 --- /dev/null +++ b/www/scripts/add-link.pl @@ -0,0 +1,30 @@ +#!/usr/bin/perlfile_handle + +# This script inserts a link to the example's source code into its HTML + +use File::Basename; + +sub add_link { + my $examples_dir_path = shift; + my $examples_gh_link = shift; + my $github_logo_svg = shift; + my $file_path = shift; + my $file_dir = dirname($file_path); + + # read html into file_content + open my $file_handle, '<', $file_path or die "Can't open $file_path: $!"; + my $file_content = do { local $/; <$file_handle> }; + close $file_handle; + + # add link after h1 + $file_content =~ s!!$github_logo_svg!; + $file_content =~ s!href=\"$examples_dir_path!href=\"$examples_gh_link!; + + # write updated html to file_path + open my $file_handle, '>', $file_path or die "Can't open $file_path: $!"; + print $file_handle $file_content; + close $file_handle; +} + +# run the function with command line args +add_link @ARGV \ No newline at end of file