diff --git a/.github/workflows/nightly_macos_apple_silicon.yml b/.github/workflows/nightly_macos_apple_silicon.yml
index 361f0e4c8e2..0dd21d4f04c 100644
--- a/.github/workflows/nightly_macos_apple_silicon.yml
+++ b/.github/workflows/nightly_macos_apple_silicon.yml
@@ -1,5 +1,5 @@
on:
-# pull_request:
+ # pull_request:
workflow_dispatch:
schedule:
- cron: "0 9 * * *"
@@ -58,7 +58,7 @@ jobs:
- name: test with zig platform
run: |
- cd ${{ env.RELEASE_FOLDER_NAME }} && ./roc --build-host --suppress-build-host-warning examples/platform-switching/rocLovesZig.roc
+ cd ${{ env.RELEASE_FOLDER_NAME }} && ./roc --build-host --suppress-build-host-warning examples/platform-switching/roc_loves_zig.roc
- name: print short commit SHA
run: git rev-parse --short "$GITHUB_SHA"
diff --git a/BUILDING_FROM_SOURCE.md b/BUILDING_FROM_SOURCE.md
index 6e4b75168e0..c8a0bbdd5e4 100644
--- a/BUILDING_FROM_SOURCE.md
+++ b/BUILDING_FROM_SOURCE.md
@@ -15,7 +15,7 @@ Or even run it in your local Docker environment [Developing inside a Container](
## Using Nix
-On MacOS and Linux, we highly recommend Using [nix](https://nixos.org/download.html) to quickly install all dependencies necessary to build roc.
+On MacOS and Linux, we highly recommend using [nix](https://nixos.org/download.html) to quickly install all dependencies necessary to build roc.
:warning: If you tried to run `cargo` in the repo folder before installing nix, make sure to execute `cargo clean` first. To prevent you from executing `cargo` outside of nix, tools like [direnv](https://github.com/nix-community/nix-direnv) and [lorri](https://github.com/nix-community/lorri) can put you in a nix shell automatically when you `cd` into the directory.
@@ -89,22 +89,6 @@ Alternatively, you can use `cargo test --no-fail-fast` or `cargo test -p specifi
For emitting LLVM IR for debugging purposes, the `--emit-llvm-ir` flag can be used.
-### libxcb libraries
-
-You may see an error like this during builds:
-
-```text
-/usr/bin/ld: cannot find -lxcb-render
-/usr/bin/ld: cannot find -lxcb-shape
-/usr/bin/ld: cannot find -lxcb-xfixes
-```
-
-If so, you can fix it like so:
-
-```sh
-sudo apt-get install libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev
-```
-
### libz libzstd libraries
You may see an error like this during builds:
@@ -120,6 +104,15 @@ If so, you can fix it like so:
sudo apt-get install libz-dev libzstd-dev
```
+#### Macos zstd not found
+
+If you still hit `ld: library 'zstd' not found` even after doing `brew install zstd z3`,
+add these lines to `.cargo/config.toml`:
+```
+[target.aarch64-apple-darwin]
+rustflags = ["-C", "link-args=-L/opt/homebrew/lib"]
+```
+
### Zig
**version: 0.13.0**
diff --git a/build.zig b/build.zig
index 704215a27f4..e0bf7049505 100644
--- a/build.zig
+++ b/build.zig
@@ -9,12 +9,16 @@ pub fn build(b: *std.Build) void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
+ // Zig unicode library - https://codeberg.org/atman/zg
+ const zg = b.dependency("zg", .{});
+
const exe = b.addExecutable(.{
.name = "roc",
.root_source_file = b.path("src/main.zig"),
.target = target,
.optimize = optimize,
});
+ exe.root_module.addImport("GenCatData", zg.module("GenCatData"));
b.installArtifact(exe);
@@ -34,6 +38,7 @@ pub fn build(b: *std.Build) void {
.target = target,
.optimize = optimize,
});
+ all_tests.root_module.addImport("GenCatData", zg.module("GenCatData"));
// Install the test binary so we can run separately
// ```sh
diff --git a/build.zig.zon b/build.zig.zon
index 78694379d4d..462b8b55d6b 100644
--- a/build.zig.zon
+++ b/build.zig.zon
@@ -7,6 +7,10 @@
.url = "git+https://github.com/kristoff-it/zig-afl-kit#88c6b71377767c1b8d26979b0adfa12a58d988dd",
.hash = "1220796f7d2d9a2d4d7f8339ee0b14aa4bf133a15ae9ba39c941cc68e08d5c5ce9a2",
},
+ .zg = .{
+ .url = "https://codeberg.org/dude_the_builder/zg/archive/v0.13.2.tar.gz",
+ .hash = "122055beff332830a391e9895c044d33b15ea21063779557024b46169fb1984c6e40",
+ },
},
.paths = .{
"build.zig",
diff --git a/ci/basic_release_test.sh b/ci/basic_release_test.sh
index 7a1b2dcc9f0..9e7bc77d930 100755
--- a/ci/basic_release_test.sh
+++ b/ci/basic_release_test.sh
@@ -30,13 +30,13 @@ cd roc_release/*/
# test rust platform (first prebuild the host)
# temp disabled
# examples/platform-switching/rust-platform/build.sh
-# ./roc examples/platform-switching/rocLovesRust.roc
+# ./roc examples/platform-switching/roc_loves_rust.roc
# test zig platform
-./roc --build-host --suppress-build-host-warning examples/platform-switching/rocLovesZig.roc
+./roc --build-host --suppress-build-host-warning examples/platform-switching/roc_loves_zig.roc
# test C platform
-./roc --build-host --suppress-build-host-warning examples/platform-switching/rocLovesC.roc
+./roc --build-host --suppress-build-host-warning examples/platform-switching/roc_loves_c.roc
# test repl
cd ../../ci/repl_basic_test
diff --git a/ci/package_release.sh b/ci/package_release.sh
index 9e8be9e82dd..28781116331 100755
--- a/ci/package_release.sh
+++ b/ci/package_release.sh
@@ -16,7 +16,7 @@ mv crates/cli/tests/platform-switching $1/examples
mv examples/README.md $1/examples
# temporary github.com/roc-lang/roc/pull/7231
-rm $1/examples/platform-switching/rocLovesRust.roc
+rm $1/examples/platform-switching/roc_loves_rust.roc
rm -rf $1/examples/platform-switching/rust-platform
# copy zig builtins
diff --git a/crates/cli/tests/benchmarks/AStar.roc b/crates/cli/tests/benchmarks/AStar.roc
index be0ead6ced2..b45f179d5c3 100644
--- a/crates/cli/tests/benchmarks/AStar.roc
+++ b/crates/cli/tests/benchmarks/AStar.roc
@@ -103,21 +103,21 @@ astar = \cost_fn, move_fn, goal, model ->
astar(cost_fn, move_fn, goal, model_with_costs)
-# takeStep = \moveFn, _goal, model, current ->
-# modelPopped =
+# take_step = \move_fn, _goal, model, current ->
+# model_popped =
# { model &
-# openSet: Set.remove model.openSet current,
+# open_set: Set.remove model.open_set current,
# evaluated: Set.insert model.evaluated current,
# }
#
-# neighbors = moveFn current
+# neighbors = move_fn current
#
-# newNeighbors = Set.difference neighbors modelPopped.evaluated
+# new_neighbors = Set.difference neighbors model_popped.evaluated
#
-# modelWithNeighbors = { modelPopped & openSet: Set.union modelPopped.openSet newNeighbors }
+# model_with_neighbors = { model_popped & open_set: Set.union model_popped.open_set new_neighbors }
#
# # a lot goes wrong here
-# modelWithCosts =
-# Set.walk newNeighbors modelWithNeighbors (\n, m -> updateCost current n m)
+# model_with_costs =
+# Set.walk new_neighbors model_with_neighbors (\n, m -> update_cost current n m)
#
-# modelWithCosts
+# model_with_costs
diff --git a/crates/cli/tests/benchmarks/Base64/Decode.roc b/crates/cli/tests/benchmarks/Base64/Decode.roc
index e33e7028e05..e1f678d664f 100644
--- a/crates/cli/tests/benchmarks/Base64/Decode.roc
+++ b/crates/cli/tests/benchmarks/Base64/Decode.roc
@@ -59,7 +59,7 @@ lowest6_bits_mask = 63
bits_to_chars_help : U32, Int * -> List U8
bits_to_chars_help = \bits, missing ->
# The input is 24 bits, which we have to partition into 4 6-bit segments. We achieve this by
- # shifting to the right by (a multiple of) 6 to remove unwanted bits on the right, then `Num.bitwiseAnd`
+ # shifting to the right by (a multiple of) 6 to remove unwanted bits on the right, then `Num.bitwise_and`
# with `0b111111` (which is 2^6 - 1 or 63) (so, 6 1s) to remove unwanted bits on the left.
# any 6-bit number is a valid base64 digit, so this is actually safe
p =
diff --git a/crates/cli/tests/benchmarks/Base64/Encode.roc b/crates/cli/tests/benchmarks/Base64/Encode.roc
index 9ff3ed469d6..6ecc6fb7983 100644
--- a/crates/cli/tests/benchmarks/Base64/Encode.roc
+++ b/crates/cli/tests/benchmarks/Base64/Encode.roc
@@ -40,7 +40,7 @@ folder = \{ output, accum }, char ->
{ output, accum: None }
# SGVs bG8g V29y bGQ=
-# encodeResidual : { output : List ByteEncoder, accum : State } -> List ByteEncoder
+# encode_residual : { output : List ByteEncoder, accum : State } -> List ByteEncoder
encode_residual = \{ output, accum } ->
when accum is
Unreachable(_) -> output
diff --git a/crates/cli/tests/benchmarks/cFold.roc b/crates/cli/tests/benchmarks/c_fold.roc
similarity index 100%
rename from crates/cli/tests/benchmarks/cFold.roc
rename to crates/cli/tests/benchmarks/c_fold.roc
diff --git a/crates/cli/tests/benchmarks/nQueens.roc b/crates/cli/tests/benchmarks/n_queens.roc
similarity index 100%
rename from crates/cli/tests/benchmarks/nQueens.roc
rename to crates/cli/tests/benchmarks/n_queens.roc
diff --git a/crates/cli/tests/benchmarks/quicksortApp.roc b/crates/cli/tests/benchmarks/quicksort_app.roc
similarity index 100%
rename from crates/cli/tests/benchmarks/quicksortApp.roc
rename to crates/cli/tests/benchmarks/quicksort_app.roc
diff --git a/crates/cli/tests/benchmarks/rBTreeCk.roc b/crates/cli/tests/benchmarks/r_b_tree_ck.roc
similarity index 100%
rename from crates/cli/tests/benchmarks/rBTreeCk.roc
rename to crates/cli/tests/benchmarks/r_b_tree_ck.roc
diff --git a/crates/cli/tests/benchmarks/rBTreeInsert.roc b/crates/cli/tests/benchmarks/r_b_tree_insert.roc
similarity index 100%
rename from crates/cli/tests/benchmarks/rBTreeInsert.roc
rename to crates/cli/tests/benchmarks/r_b_tree_insert.roc
diff --git a/crates/cli/tests/benchmarks/testAStar.roc b/crates/cli/tests/benchmarks/test_a_star.roc
similarity index 100%
rename from crates/cli/tests/benchmarks/testAStar.roc
rename to crates/cli/tests/benchmarks/test_a_star.roc
diff --git a/crates/cli/tests/benchmarks/testBase64.roc b/crates/cli/tests/benchmarks/test_base64.roc
similarity index 100%
rename from crates/cli/tests/benchmarks/testBase64.roc
rename to crates/cli/tests/benchmarks/test_base64.roc
diff --git a/crates/cli/tests/cli_tests.rs b/crates/cli/tests/cli_tests.rs
index a4c1953e334..22a32f99ca0 100644
--- a/crates/cli/tests/cli_tests.rs
+++ b/crates/cli/tests/cli_tests.rs
@@ -63,7 +63,7 @@ mod cli_tests {
let cli_build = ExecCli::new(
roc_cli::CMD_DEV,
- file_from_root("crates/cli/tests/platform-switching", "rocLovesRust.roc"),
+ file_from_root("crates/cli/tests/platform-switching", "roc_loves_rust.roc"),
);
let expected_output = "Roc <3 Rust!\n";
@@ -80,7 +80,7 @@ mod cli_tests {
let cli_build = ExecCli::new(
CMD_BUILD,
- file_from_root("crates/cli/tests/platform-switching", "rocLovesZig.roc"),
+ file_from_root("crates/cli/tests/platform-switching", "roc_loves_zig.roc"),
)
.arg(BUILD_HOST_FLAG)
.arg(SUPPRESS_BUILD_HOST_WARNING_FLAG);
@@ -106,7 +106,7 @@ mod cli_tests {
CMD_CHECK,
file_from_root(
"crates/cli/tests/platform-switching",
- "rocLovesWebAssembly.roc",
+ "roc_loves_web_assembly.roc",
),
);
@@ -382,7 +382,7 @@ mod cli_tests {
CMD_BUILD,
file_from_root(
"crates/cli/tests/test-projects/effectful",
- "combine-tasks.roc",
+ "combine_tasks.roc",
),
);
@@ -605,7 +605,7 @@ mod cli_tests {
CMD_BUILD,
file_from_root(
"crates/cli/tests/test-projects/fixtures/transitive-deps",
- "direct-one.roc",
+ "direct_one.roc",
),
);
@@ -629,7 +629,7 @@ mod cli_tests {
CMD_BUILD,
file_from_root(
"crates/cli/tests/test-projects/fixtures/transitive-deps",
- "direct-one-and-two.roc",
+ "direct_one_and_two.roc",
),
);
@@ -653,7 +653,7 @@ mod cli_tests {
CMD_BUILD,
file_from_root(
"crates/cli/tests/test-projects/fixtures/transitive-deps",
- "direct-zero.roc",
+ "direct_zero.roc",
),
);
@@ -815,7 +815,7 @@ mod cli_tests {
CMD_BUILD,
file_from_root(
"crates/cli/tests/test-projects/test-platform-effects-zig/",
- "app-stub.roc",
+ "app_stub.roc",
),
)
.arg(BUILD_HOST_FLAG)
@@ -841,7 +841,7 @@ mod cli_tests {
let cli_build = ExecCli::new(
CMD_BUILD,
- file_from_root("crates/cli/tests/test-projects/effectful", "print-line.roc"),
+ file_from_root("crates/cli/tests/test-projects/effectful", "print_line.roc"),
);
let expected_output =
@@ -865,7 +865,7 @@ mod cli_tests {
CMD_BUILD,
file_from_root(
"crates/cli/tests/test-projects/effectful",
- "inspect-logging.roc",
+ "inspect_logging.roc",
),
);
@@ -1202,7 +1202,7 @@ mod cli_tests {
Please enter an integer
4
"};
- test_benchmark("nQueens.roc", expected_output, Some("6"), UseValgrind::Yes);
+ test_benchmark("n_queens.roc", expected_output, Some("6"), UseValgrind::Yes);
}
#[test]
@@ -1212,7 +1212,7 @@ mod cli_tests {
Please enter an integer
11 & 11
"};
- test_benchmark("cFold.roc", expected_output, Some("3"), UseValgrind::Yes);
+ test_benchmark("c_fold.roc", expected_output, Some("3"), UseValgrind::Yes);
}
#[test]
@@ -1234,7 +1234,7 @@ mod cli_tests {
10
"};
test_benchmark(
- "rBTreeCk.roc",
+ "r_b_tree_ck.roc",
expected_output,
Some("100"),
UseValgrind::Yes,
@@ -1245,17 +1245,22 @@ mod cli_tests {
#[cfg_attr(windows, ignore)]
fn rbtree_insert() {
let expected_output = "Node Black 0 {} Empty Empty\n";
- test_benchmark("rBTreeInsert.roc", expected_output, None, UseValgrind::Yes);
+ test_benchmark(
+ "r_b_tree_insert.roc",
+ expected_output,
+ None,
+ UseValgrind::Yes,
+ );
}
#[test]
#[cfg_attr(windows, ignore)]
fn astar() {
if cfg!(feature = "wasm32-cli-run") {
- eprintln!("WARNING: skipping testing benchmark testAStar.roc because it currently does not work on wasm32 due to dictionaries.");
+ eprintln!("WARNING: skipping testing benchmark test_a_star.roc because it currently does not work on wasm32 due to dictionaries.");
} else {
let expected_output = "True\n";
- test_benchmark("testAStar.roc", expected_output, None, UseValgrind::Yes);
+ test_benchmark("test_a_star.roc", expected_output, None, UseValgrind::Yes);
}
}
@@ -1266,7 +1271,7 @@ mod cli_tests {
encoded: SGVsbG8gV29ybGQ=
decoded: Hello World
"};
- test_benchmark("testBase64.roc", expected_output, None, UseValgrind::Yes);
+ test_benchmark("test_base64.roc", expected_output, None, UseValgrind::Yes);
}
#[test]
@@ -1288,7 +1293,7 @@ mod cli_tests {
fn quicksort_app() {
let expected_output = "Please enter an integer\n[0, 1, 1, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 5, 6, 6, 8, 9]\n";
test_benchmark(
- "quicksortApp.roc",
+ "quicksort_app.roc",
expected_output,
Some("0"),
UseValgrind::Yes,
@@ -1423,7 +1428,7 @@ mod cli_tests {
CMD_FORMAT,
file_from_root(
"crates/cli/tests/test-projects/fixtures/format",
- "not-formatted.roc",
+ "not_formatted.roc",
),
)
.arg(CHECK_FLAG)
@@ -1433,7 +1438,7 @@ mod cli_tests {
#[test]
fn format_check_folders() {
- // This fails, because "not-formatted.roc" is present in this folder
+ // This fails, because "not_formatted.roc" is present in this folder
ExecCli::new(
CMD_FORMAT,
dir_from_root("crates/cli/tests/test-projects/fixtures/format"),
diff --git a/crates/cli/tests/platform-switching/README.md b/crates/cli/tests/platform-switching/README.md
index 981b49eb943..5d967092c5d 100644
--- a/crates/cli/tests/platform-switching/README.md
+++ b/crates/cli/tests/platform-switching/README.md
@@ -4,7 +4,7 @@
To run, `cd` into this directory and run this in your terminal:
```bash
-roc --build-host --suppress-build-host-warning rocLovesC.roc
+roc --build-host --suppress-build-host-warning roc_loves_c.roc
```
## About these examples
diff --git a/crates/cli/tests/platform-switching/rocLovesC.roc b/crates/cli/tests/platform-switching/roc_loves_c.roc
similarity index 69%
rename from crates/cli/tests/platform-switching/rocLovesC.roc
rename to crates/cli/tests/platform-switching/roc_loves_c.roc
index 70be654a368..7a6b7c4c572 100644
--- a/crates/cli/tests/platform-switching/rocLovesC.roc
+++ b/crates/cli/tests/platform-switching/roc_loves_c.roc
@@ -4,6 +4,6 @@ app [main] { pf: platform "c-platform/main.roc" }
# ubuntu: sudo apt install build-essential clang
# fedora: sudo dnf install clang
-# run with `roc --build-host --suppress-build-host-warning rocLovesC.roc`
+# run with `roc --build-host --suppress-build-host-warning roc_loves_c.roc`
main = "Roc <3 C!\n"
diff --git a/crates/cli/tests/platform-switching/rocLovesRust.roc b/crates/cli/tests/platform-switching/roc_loves_rust.roc
similarity index 100%
rename from crates/cli/tests/platform-switching/rocLovesRust.roc
rename to crates/cli/tests/platform-switching/roc_loves_rust.roc
diff --git a/crates/cli/tests/platform-switching/rocLovesWebAssembly.roc b/crates/cli/tests/platform-switching/roc_loves_web_assembly.roc
similarity index 100%
rename from crates/cli/tests/platform-switching/rocLovesWebAssembly.roc
rename to crates/cli/tests/platform-switching/roc_loves_web_assembly.roc
diff --git a/crates/cli/tests/platform-switching/rocLovesZig.roc b/crates/cli/tests/platform-switching/roc_loves_zig.roc
similarity index 75%
rename from crates/cli/tests/platform-switching/rocLovesZig.roc
rename to crates/cli/tests/platform-switching/roc_loves_zig.roc
index 448a14b8f91..6b7e2c0e426 100644
--- a/crates/cli/tests/platform-switching/rocLovesZig.roc
+++ b/crates/cli/tests/platform-switching/roc_loves_zig.roc
@@ -5,6 +5,6 @@ app [main] { pf: platform "zig-platform/main.roc" }
# mkdir glue
# cp crates/compiler/builtins/bitcode/src/* ./glue
# cd -
-# roc --build-host --suppress-build-host-warning rocLovesZig.roc
+# roc --build-host --suppress-build-host-warning roc_loves_zig.roc
main = "Roc <3 Zig!\n"
diff --git a/crates/cli/tests/platform-switching/web-assembly-platform/README.md b/crates/cli/tests/platform-switching/web-assembly-platform/README.md
index b9d36b1b6ba..010f7dd5750 100644
--- a/crates/cli/tests/platform-switching/web-assembly-platform/README.md
+++ b/crates/cli/tests/platform-switching/web-assembly-platform/README.md
@@ -4,20 +4,20 @@ To run this website, we first compile the app that uses the Wasm platform:
- If you use the nightly roc release:
```bash
-./roc build --target=wasm32 examples/platform-switching/rocLovesWebAssembly.roc
+./roc build --target=wasm32 examples/platform-switching/roc_loves_web_assembly.roc
```
- If you start from the compiler source code:
```bash
# Build roc compiler if you have not done so already
cargo build
-target/debug/roc build --target=wasm32 examples/platform-switching/rocLovesWebAssembly.roc
+target/debug/roc build --target=wasm32 examples/platform-switching/roc_loves_web_assembly.roc
```
We then move the file:
```bash
# Go to the directory where index.html is
cd examples/platform-switching/web-assembly-platform/
# Move the .wasm file so that it's beside index.html
-mv ../rocLovesWebAssembly.wasm .
+mv ../roc_loves_web_assembly.wasm .
```
In the directory where index.html is, run any web server on localhost.
diff --git a/crates/cli/tests/platform-switching/web-assembly-platform/host.test.js b/crates/cli/tests/platform-switching/web-assembly-platform/host.test.js
index 0152e80a8de..f1293d02c4a 100644
--- a/crates/cli/tests/platform-switching/web-assembly-platform/host.test.js
+++ b/crates/cli/tests/platform-switching/web-assembly-platform/host.test.js
@@ -15,7 +15,7 @@ global.fetch = (filename) =>
const { roc_web_platform_run } = require("./host");
-roc_web_platform_run("./rocLovesWebAssembly.wasm", (string_from_roc) => {
+roc_web_platform_run("./roc_loves_web_assembly.wasm", (string_from_roc) => {
const expected = "Roc <3 Web Assembly!\n";
if (string_from_roc !== expected) {
console.error(`Expected "${expected}", but got "${string_from_roc}"`);
diff --git a/crates/cli/tests/platform-switching/web-assembly-platform/index.html b/crates/cli/tests/platform-switching/web-assembly-platform/index.html
index a664e3469c1..86bb80a5dfd 100644
--- a/crates/cli/tests/platform-switching/web-assembly-platform/index.html
+++ b/crates/cli/tests/platform-switching/web-assembly-platform/index.html
@@ -1,12 +1,14 @@
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/crates/cli/tests/snapshots/cli_tests__cli_tests__test_platform_simple_zig__module_params.snap b/crates/cli/tests/snapshots/cli_tests__cli_tests__test_platform_simple_zig__module_params.snap
index cd7fa78e06e..cece42dadf8 100644
--- a/crates/cli/tests/snapshots/cli_tests__cli_tests__test_platform_simple_zig__module_params.snap
+++ b/crates/cli/tests/snapshots/cli_tests__cli_tests__test_platform_simple_zig__module_params.snap
@@ -2,32 +2,32 @@
source: crates/cli/tests/cli_tests.rs
expression: cli_dev_out.normalize_stdout_and_stderr()
---
-App1.baseUrl: https://api.example.com/one
-App2.baseUrl: http://api.example.com/two
-App3.baseUrl: https://api.example.com/three
-App1.getUser 1: https://api.example.com/one/users/1
-App2.getUser 2: http://api.example.com/two/users/2
-App3.getUser 3: https://api.example.com/three/users/3
-App1.getPost 1: https://api.example.com/one/posts/1
-App2.getPost 2: http://api.example.com/two/posts/2
-App3.getPost 3: https://api.example.com/three/posts/3
-App1.getPosts [1, 2]: ["https://api.example.com/one/posts/1", "https://api.example.com/one/posts/2"]
-App2.getPosts [3, 4]: ["http://api.example.com/two/posts/3", "http://api.example.com/two/posts/4"]
-App2.getPosts [5, 6]: ["http://api.example.com/two/posts/5", "http://api.example.com/two/posts/6"]
-App1.getPostComments 1: https://api.example.com/one/posts/1/comments
-App2.getPostComments 2: http://api.example.com/two/posts/2/comments
-App2.getPostComments 3: http://api.example.com/two/posts/3/comments
-App1.getCompanies [1, 2]: ["https://api.example.com/one/companies/1", "https://api.example.com/one/companies/2"]
-App2.getCompanies [3, 4]: ["http://api.example.com/two/companies/3", "http://api.example.com/two/companies/4"]
-App2.getCompanies [5, 6]: ["http://api.example.com/two/companies/5", "http://api.example.com/two/companies/6"]
-App1.getPostAliased 1: https://api.example.com/one/posts/1
-App2.getPostAliased 2: http://api.example.com/two/posts/2
-App3.getPostAliased 3: https://api.example.com/three/posts/3
-App1.baseUrlAliased: https://api.example.com/one
-App2.baseUrlAliased: http://api.example.com/two
-App3.baseUrlAliased: https://api.example.com/three
-App1.getUserSafe 1: https://api.example.com/one/users/1
-Prod.getUserSafe 2: http://api.example.com/prod_1/users/2?safe=true
-usersApp1: ["https://api.example.com/one/users/1", "https://api.example.com/one/users/2", "https://api.example.com/one/users/3"]
-getUserApp3Nested 3: https://api.example.com/three/users/3
-usersApp3Passed: ["https://api.example.com/three/users/1", "https://api.example.com/three/users/2", "https://api.example.com/three/users/3"]
+App1.base_url: https://api.example.com/one
+App2.base_url: http://api.example.com/two
+App3.base_url: https://api.example.com/three
+App1.get_user 1: https://api.example.com/one/users/1
+App2.get_user 2: http://api.example.com/two/users/2
+App3.get_user 3: https://api.example.com/three/users/3
+App1.get_post 1: https://api.example.com/one/posts/1
+App2.get_post 2: http://api.example.com/two/posts/2
+App3.get_post 3: https://api.example.com/three/posts/3
+App1.get_posts [1, 2]: ["https://api.example.com/one/posts/1", "https://api.example.com/one/posts/2"]
+App2.get_posts [3, 4]: ["http://api.example.com/two/posts/3", "http://api.example.com/two/posts/4"]
+App2.get_posts [5, 6]: ["http://api.example.com/two/posts/5", "http://api.example.com/two/posts/6"]
+App1.get_post_comments 1: https://api.example.com/one/posts/1/comments
+App2.get_post_comments 2: http://api.example.com/two/posts/2/comments
+App2.get_post_comments 3: http://api.example.com/two/posts/3/comments
+App1.get_companies [1, 2]: ["https://api.example.com/one/companies/1", "https://api.example.com/one/companies/2"]
+App2.get_companies [3, 4]: ["http://api.example.com/two/companies/3", "http://api.example.com/two/companies/4"]
+App2.get_companies [5, 6]: ["http://api.example.com/two/companies/5", "http://api.example.com/two/companies/6"]
+App1.get_post_aliased 1: https://api.example.com/one/posts/1
+App2.get_post_aliased 2: http://api.example.com/two/posts/2
+App3.get_post_aliased 3: https://api.example.com/three/posts/3
+App1.base_url_aliased: https://api.example.com/one
+App2.base_url_aliased: http://api.example.com/two
+App3.base_url_aliased: https://api.example.com/three
+App1.get_user_safe 1: https://api.example.com/one/users/1
+Prod.get_user_safe 2: http://api.example.com/prod_1/users/2?safe=true
+users_app1: ["https://api.example.com/one/users/1", "https://api.example.com/one/users/2", "https://api.example.com/one/users/3"]
+get_user_app3_nested 3: https://api.example.com/three/users/3
+users_app3_passed: ["https://api.example.com/three/users/1", "https://api.example.com/three/users/2", "https://api.example.com/three/users/3"]
diff --git a/crates/cli/tests/test-projects/effectful/Community.roc b/crates/cli/tests/test-projects/effectful/Community.roc
index 5fcada82f98..56edb504419 100644
--- a/crates/cli/tests/test-projects/effectful/Community.roc
+++ b/crates/cli/tests/test-projects/effectful/Community.roc
@@ -7,7 +7,7 @@ module [
walk_friend_names,
]
-## Datatype representing a community for demonstration purposes in inspect-gui.roc and inspect-logging.roc
+## Datatype representing a community for demonstration purposes in inspect_logging.roc
Community := {
people : List Person,
diff --git a/crates/cli/tests/test-projects/effectful/combine-tasks.roc b/crates/cli/tests/test-projects/effectful/combine_tasks.roc
similarity index 100%
rename from crates/cli/tests/test-projects/effectful/combine-tasks.roc
rename to crates/cli/tests/test-projects/effectful/combine_tasks.roc
diff --git a/crates/cli/tests/test-projects/effectful/inspect-logging.roc b/crates/cli/tests/test-projects/effectful/inspect_logging.roc
similarity index 100%
rename from crates/cli/tests/test-projects/effectful/inspect-logging.roc
rename to crates/cli/tests/test-projects/effectful/inspect_logging.roc
diff --git a/crates/cli/tests/test-projects/effectful/print-line.roc b/crates/cli/tests/test-projects/effectful/print_line.roc
similarity index 100%
rename from crates/cli/tests/test-projects/effectful/print-line.roc
rename to crates/cli/tests/test-projects/effectful/print_line.roc
diff --git a/crates/cli/tests/test-projects/false-interpreter/Context.roc b/crates/cli/tests/test-projects/false-interpreter/Context.roc
index bc129a7dd7d..35275e12f21 100644
--- a/crates/cli/tests/test-projects/false-interpreter/Context.roc
+++ b/crates/cli/tests/test-projects/false-interpreter/Context.roc
@@ -63,7 +63,7 @@ with! = \path, callback! ->
File.with_open!(path, \handle ->
# I cant define scope here and put it in the list in callback. It breaks alias anaysis.
# Instead I have to inline this.
- # root_scope = { data: Some handle, index: 0, buf: [], whileInfo: None }
+ # root_scope = { data: Some handle, index: 0, buf: [], while_info: None }
callback!({ scopes: [{ data: Some(handle), index: 0, buf: [], while_info: None }], state: Executing, stack: [], vars: List.repeat(Number(0), Variable.total_count) }))
# I am pretty sure there is a syntax to destructure and keep a reference to the whole, but Im not sure what it is.
diff --git a/crates/cli/tests/test-projects/false-interpreter/main.roc b/crates/cli/tests/test-projects/false-interpreter/main.roc
index 7ea7128e8bc..5443035593e 100644
--- a/crates/cli/tests/test-projects/false-interpreter/main.roc
+++ b/crates/cli/tests/test-projects/false-interpreter/main.roc
@@ -278,7 +278,7 @@ step_exec_ctx! = \ctx, char ->
Ok(a) ->
Ok(a)
- # Being explicit with error type is required to stop the need to propogate the error parameters to Context.popStack
+ # Being explicit with error type is required to stop the need to propogate the error parameters to Context.pop_stack
Err(EmptyStack) ->
Err(EmptyStack)
diff --git a/crates/cli/tests/test-projects/fixtures/format/not-formatted.roc b/crates/cli/tests/test-projects/fixtures/format/not_formatted.roc
similarity index 100%
rename from crates/cli/tests/test-projects/fixtures/format/not-formatted.roc
rename to crates/cli/tests/test-projects/fixtures/format/not_formatted.roc
diff --git a/crates/cli/tests/test-projects/fixtures/transitive-deps/direct-one.roc b/crates/cli/tests/test-projects/fixtures/transitive-deps/direct_one.roc
similarity index 100%
rename from crates/cli/tests/test-projects/fixtures/transitive-deps/direct-one.roc
rename to crates/cli/tests/test-projects/fixtures/transitive-deps/direct_one.roc
diff --git a/crates/cli/tests/test-projects/fixtures/transitive-deps/direct-one-and-two.roc b/crates/cli/tests/test-projects/fixtures/transitive-deps/direct_one_and_two.roc
similarity index 100%
rename from crates/cli/tests/test-projects/fixtures/transitive-deps/direct-one-and-two.roc
rename to crates/cli/tests/test-projects/fixtures/transitive-deps/direct_one_and_two.roc
diff --git a/crates/cli/tests/test-projects/fixtures/transitive-deps/direct-zero.roc b/crates/cli/tests/test-projects/fixtures/transitive-deps/direct_zero.roc
similarity index 100%
rename from crates/cli/tests/test-projects/fixtures/transitive-deps/direct-zero.roc
rename to crates/cli/tests/test-projects/fixtures/transitive-deps/direct_zero.roc
diff --git a/crates/cli/tests/test-projects/module_params/Api.roc b/crates/cli/tests/test-projects/module_params/Api.roc
index f8db617be8c..6b5ca2d0a75 100644
--- a/crates/cli/tests/test-projects/module_params/Api.roc
+++ b/crates/cli/tests/test-projects/module_params/Api.roc
@@ -19,7 +19,7 @@ base_url =
## function def referencing params
get_user : U32 -> Str
get_user = \user_id ->
- # purposefully not using baseUrl to test top-level fn referencing param
+ # purposefully not using base_url to test top-level fn referencing param
protocol("api.example.com/${app_id}/users/${Num.to_str(user_id)}")
## function def referencing top-level value
diff --git a/crates/cli/tests/test-projects/module_params/app.roc b/crates/cli/tests/test-projects/module_params/app.roc
index 763ccd6abc0..dfcd86b7ccc 100644
--- a/crates/cli/tests/test-projects/module_params/app.roc
+++ b/crates/cli/tests/test-projects/module_params/app.roc
@@ -27,33 +27,33 @@ main =
List.map([1, 2, 3], App3.get_user)
"""
- App1.baseUrl: ${App1.base_url}
- App2.baseUrl: ${App2.base_url}
- App3.baseUrl: ${App3.base_url}
- App1.getUser 1: ${App1.get_user(1)}
- App2.getUser 2: ${App2.get_user(2)}
- App3.getUser 3: ${App3.get_user(3)}
- App1.getPost 1: ${App1.get_post(1)}
- App2.getPost 2: ${App2.get_post(2)}
- App3.getPost 3: ${App3.get_post(3)}
- App1.getPosts [1, 2]: ${Inspect.to_str(App1.get_posts([1, 2]))}
- App2.getPosts [3, 4]: ${Inspect.to_str(App2.get_posts([3, 4]))}
- App2.getPosts [5, 6]: ${Inspect.to_str(App2.get_posts([5, 6]))}
- App1.getPostComments 1: ${App1.get_post_comments(1)}
- App2.getPostComments 2: ${App2.get_post_comments(2)}
- App2.getPostComments 3: ${App2.get_post_comments(3)}
- App1.getCompanies [1, 2]: ${Inspect.to_str(App1.get_companies([1, 2]))}
- App2.getCompanies [3, 4]: ${Inspect.to_str(App2.get_companies([3, 4]))}
- App2.getCompanies [5, 6]: ${Inspect.to_str(App2.get_companies([5, 6]))}
- App1.getPostAliased 1: ${App1.get_post_aliased(1)}
- App2.getPostAliased 2: ${App2.get_post_aliased(2)}
- App3.getPostAliased 3: ${App3.get_post_aliased(3)}
- App1.baseUrlAliased: ${App1.base_url_aliased}
- App2.baseUrlAliased: ${App2.base_url_aliased}
- App3.baseUrlAliased: ${App3.base_url_aliased}
- App1.getUserSafe 1: ${App1.get_user_safe(1)}
- Prod.getUserSafe 2: ${Prod.get_user_safe(2)}
- usersApp1: ${Inspect.to_str(users_app1)}
- getUserApp3Nested 3: ${get_user_app3_nested(3)}
- usersApp3Passed: ${Inspect.to_str(users_app3_passed)}
+ App1.base_url: ${App1.base_url}
+ App2.base_url: ${App2.base_url}
+ App3.base_url: ${App3.base_url}
+ App1.get_user 1: ${App1.get_user(1)}
+ App2.get_user 2: ${App2.get_user(2)}
+ App3.get_user 3: ${App3.get_user(3)}
+ App1.get_post 1: ${App1.get_post(1)}
+ App2.get_post 2: ${App2.get_post(2)}
+ App3.get_post 3: ${App3.get_post(3)}
+ App1.get_posts [1, 2]: ${Inspect.to_str(App1.get_posts([1, 2]))}
+ App2.get_posts [3, 4]: ${Inspect.to_str(App2.get_posts([3, 4]))}
+ App2.get_posts [5, 6]: ${Inspect.to_str(App2.get_posts([5, 6]))}
+ App1.get_post_comments 1: ${App1.get_post_comments(1)}
+ App2.get_post_comments 2: ${App2.get_post_comments(2)}
+ App2.get_post_comments 3: ${App2.get_post_comments(3)}
+ App1.get_companies [1, 2]: ${Inspect.to_str(App1.get_companies([1, 2]))}
+ App2.get_companies [3, 4]: ${Inspect.to_str(App2.get_companies([3, 4]))}
+ App2.get_companies [5, 6]: ${Inspect.to_str(App2.get_companies([5, 6]))}
+ App1.get_post_aliased 1: ${App1.get_post_aliased(1)}
+ App2.get_post_aliased 2: ${App2.get_post_aliased(2)}
+ App3.get_post_aliased 3: ${App3.get_post_aliased(3)}
+ App1.base_url_aliased: ${App1.base_url_aliased}
+ App2.base_url_aliased: ${App2.base_url_aliased}
+ App3.base_url_aliased: ${App3.base_url_aliased}
+ App1.get_user_safe 1: ${App1.get_user_safe(1)}
+ Prod.get_user_safe 2: ${Prod.get_user_safe(2)}
+ users_app1: ${Inspect.to_str(users_app1)}
+ get_user_app3_nested 3: ${get_user_app3_nested(3)}
+ users_app3_passed: ${Inspect.to_str(users_app3_passed)}
"""
diff --git a/crates/cli/tests/test-projects/test-platform-effects-zig/app-stub.roc b/crates/cli/tests/test-projects/test-platform-effects-zig/app_stub.roc
similarity index 100%
rename from crates/cli/tests/test-projects/test-platform-effects-zig/app-stub.roc
rename to crates/cli/tests/test-projects/test-platform-effects-zig/app_stub.roc
diff --git a/crates/cli_test_utils/src/bench_utils.rs b/crates/cli_test_utils/src/bench_utils.rs
index 0e871966503..fb65e643597 100644
--- a/crates/cli_test_utils/src/bench_utils.rs
+++ b/crates/cli_test_utils/src/bench_utils.rs
@@ -36,7 +36,7 @@ fn bench_cmd(
stdin_str: &'static str,
bench_group_opt: Option<&mut BenchmarkGroup>,
) {
- // need to modify stack size for cFold benchmark
+ // need to modify stack size for c_fold benchmark
if exec_cli
.roc_file_path
.to_str()
@@ -79,7 +79,7 @@ fn bench_cmd(
pub fn bench_nqueens(bench_group_opt: Option<&mut BenchmarkGroup>) {
exec_bench_w_input(
- &file_from_root("crates/cli/tests/benchmarks", "nQueens.roc"),
+ &file_from_root("crates/cli/tests/benchmarks", "n_queens.roc"),
"11",
"Please enter an integer\n2680\n", //2680-14200
bench_group_opt,
@@ -88,7 +88,7 @@ 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_from_root("crates/cli/tests/benchmarks", "cFold.roc"),
+ &file_from_root("crates/cli/tests/benchmarks", "c_fold.roc"),
"17",
"Please enter an integer\n396354 & 396354\n",
bench_group_opt,
@@ -106,7 +106,7 @@ pub fn bench_deriv(bench_group_opt: Option<&mut BenchmarkGroup(bench_group_opt: Option<&mut BenchmarkGroup>) {
exec_bench_w_input(
- &file_from_root("crates/cli/tests/benchmarks", "rBTreeCk.roc"),
+ &file_from_root("crates/cli/tests/benchmarks", "r_b_tree_ck.roc"),
"80000",
"Please enter an integer\n8000\n",
bench_group_opt,
@@ -125,7 +125,7 @@ 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_from_root("crates/cli/tests/benchmarks", "quicksortApp.roc"),
+ &file_from_root("crates/cli/tests/benchmarks", "quicksort_app.roc"),
"1", // 1 for sorting large list, 0 for a small list
"Please enter an integer\n[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/compiler/alias_analysis/src/lib.rs b/crates/compiler/alias_analysis/src/lib.rs
index 925efc3bf29..963be268250 100644
--- a/crates/compiler/alias_analysis/src/lib.rs
+++ b/crates/compiler/alias_analysis/src/lib.rs
@@ -362,7 +362,7 @@ where
// For now, using solve_trivial to avoid bug with loops.
// Note: when disabling this, there was not much of a change in performance.
// Notably, NQueens was about 5% slower. False interpreter was 0-5% faster (depending on input).
- // cFold and derive saw minor gains ~1.5%. rBTreeCk saw a big gain of ~4%.
+ // c_fold and derive saw minor gains ~1.5%. r_b_tree_ck saw a big gain of ~4%.
// This feels wrong, morphic should not really be able to slow down code.
// Likely, noise or the bug and wrong inplace mutation lead to these perf changes.
// When re-enabling this, we should analysis the perf and inplace mutations of a few apps.
diff --git a/crates/compiler/builtins/roc/Bool.roc b/crates/compiler/builtins/roc/Bool.roc
index 9f326936d7e..ae7047ec482 100644
--- a/crates/compiler/builtins/roc/Bool.roc
+++ b/crates/compiler/builtins/roc/Bool.roc
@@ -3,7 +3,7 @@ module [Bool, Eq, true, false, not, is_eq, is_not_eq]
## Defines a type that can be compared for total equality.
##
## Total equality means that all values of the type can be compared to each
-## other, and two values `a`, `b` are identical if and only if `isEq(a, b)` is
+## other, and two values `a`, `b` are identical if and only if `is_eq(a, b)` is
## `Bool.true`.
##
## Not all types support total equality. For example, [`F32`](../Num#F32) and [`F64`](../Num#F64) can
diff --git a/crates/compiler/builtins/roc/Decode.roc b/crates/compiler/builtins/roc/Decode.roc
index 394ebae1d9f..096005f2aab 100644
--- a/crates/compiler/builtins/roc/Decode.roc
+++ b/crates/compiler/builtins/roc/Decode.roc
@@ -59,7 +59,7 @@ DecodeError : [TooShort]
## such as;
## ```roc
## expect
-## input = "\"hello\", " |> Str.toUtf8
+## input = "\"hello\", " |> Str.to_utf8
## actual = Decode.from_bytes_partial(input, Json.json)
## expected = Ok("hello")
##
@@ -132,7 +132,7 @@ decode_with = |bytes, @Decoder(decode), fmt| decode(bytes, fmt)
## Decode a `List U8` utf-8 bytes and return a [DecodeResult](#DecodeResult)
## ```roc
## expect
-## input = "\"hello\", " |> Str.toUtf8
+## input = "\"hello\", " |> Str.to_utf8
## actual = Decode.from_bytes_partial(input Json.json)
## expected = Ok("hello")
##
@@ -146,7 +146,7 @@ from_bytes_partial = |bytes, fmt| decode_with(bytes, decoder, fmt)
## remaining returns `Err Leftover (List U8)`.
## ```roc
## expect
-## input = "\"hello\", " |> Str.toUtf8
+## input = "\"hello\", " |> Str.to_utf8
## actual = Decode.from_bytes(input, Json.json)
## expected = Ok("hello")
##
diff --git a/crates/compiler/builtins/roc/Num.roc b/crates/compiler/builtins/roc/Num.roc
index 9c08ff8b894..79cc9ee9fde 100644
--- a/crates/compiler/builtins/roc/Num.roc
+++ b/crates/compiler/builtins/roc/Num.roc
@@ -193,7 +193,7 @@ import Result exposing [Result]
## have the type `Num *` at first, but usually end up taking on
## a more specific type based on how they're used.
##
-## For example, in `1 + List.len(myList)`, the `1` has the type `Num *` at first,
+## For example, in `1 + List.len(my_list)`, the `1` has the type `Num *` at first,
## but because `List.len` returns a `U64`, the `1` ends up changing from
## `Num *` to the more specific `U64`, and the expression as a whole
## ends up having the type `U64`.
@@ -345,16 +345,16 @@ Int range : Num (Integer range)
## If you don't specify a type, Roc will default to using [Dec] because it's
## the least error-prone overall. For example, suppose you write this:
## ```roc
-## wasItPrecise = 0.1 + 0.2 == 0.3
+## was_it_precise = 0.1 + 0.2 == 0.3
## ```
-## The value of `wasItPrecise` here will be `Bool.true`, because Roc uses [Dec]
+## The value of `was_it_precise` here will be `Bool.true`, because Roc uses [Dec]
## by default when there are no types specified.
##
## In contrast, suppose we use `f32` or `f64` for one of these numbers:
## ```roc
-## wasItPrecise = 0.1f64 + 0.2 == 0.3
+## was_it_precise = 0.1f64 + 0.2 == 0.3
## ```
-## Here, `wasItPrecise` will be `Bool.false` because the entire calculation will have
+## Here, `was_it_precise` will be `Bool.false` because the entire calculation will have
## been done in a base-2 floating point calculation, which causes noticeable
## precision loss in this case.
##
@@ -726,7 +726,7 @@ abs_diff = |a, b|
## Num.neg(0.0)
## ```
## !! Num.neg is not completely implemented for all types in all contexts, see github.com/roc-lang/roc/issues/6959
-## You can use `\someNum -> 0 - someNum` as a workaround.
+## You can use `\some_num -> 0 - some_num` as a workaround.
##
## This is safe to use with any [Frac], but it can cause overflow when used with certain [Int] values.
##
@@ -904,7 +904,7 @@ log_checked = |x|
## > access to hardware-accelerated performance, Roc follows these rules exactly.
##
## To divide an [Int] and a [Frac], first convert the [Int] to a [Frac] using
-## one of the functions in this module like #toDec.
+## one of the functions in this module like #to_dec.
## ```roc
## 5.0 / 7.0
##
@@ -1125,7 +1125,7 @@ add_wrap : Int range, Int range -> Int range
##
## This is the same as [Num.add] except for the saturating behavior if the
## addition is to overflow.
-## For example, if `x : U8` is 200 and `y : U8` is 100, `addSaturated x y` will
+## For example, if `x : U8` is 200 and `y : U8` is 100, `add_saturated x y` will
## yield 255, the maximum value of a `U8`.
add_saturated : Num a, Num a -> Num a
diff --git a/crates/compiler/builtins/roc/Str.roc b/crates/compiler/builtins/roc/Str.roc
index b7b53694702..36e46981fff 100644
--- a/crates/compiler/builtins/roc/Str.roc
+++ b/crates/compiler/builtins/roc/Str.roc
@@ -597,8 +597,8 @@ expect (Str.from_utf8_lossy [82, 0xED, 0xA0, 0xBD, 99]) == "R�c"
## expect Str.from_utf16([0xd83d, 0xdc26]) == Ok("🐦")
## expect Str.from_utf16([]) == Ok("")
## # unpaired surrogates, first and second halves
-## expect Str.from_utf16([82, 0xd83d, 99]) |> Result.isErr
-## expect Str.from_utf16([82, 0xdc96, 99]) |> Result.isErr
+## expect Str.from_utf16([82, 0xd83d, 99]) |> Result.is_err
+## expect Str.from_utf16([82, 0xdc96, 99]) |> Result.is_err
## ```
from_utf16 : List U16 -> Result Str [BadUtf16 { problem : Utf8Problem, index : U64 }]
from_utf16 = |codeunits|
@@ -700,10 +700,10 @@ expect Str.from_utf16_lossy([82, 0xdc96, 99]) == "R�c"
## expect Str.from_utf32([0xb9a, 0xbbf]) == Ok("சி")
## expect Str.from_utf32([0x1f426]) == Ok("🐦")
## # unpaired surrogates, first and second halves
-## expect Str.from_utf32([82, 0xd83d, 99]) |> Result.isErr
-## expect Str.from_utf32([82, 0xdc96, 99]) |> Result.isErr
+## expect Str.from_utf32([82, 0xd83d, 99]) |> Result.is_err
+## expect Str.from_utf32([82, 0xdc96, 99]) |> Result.is_err
## # invalid codepoint
-## expect Str.from_utf32([82, 0x110000, 99]) |> Result.isErr
+## expect Str.from_utf32([82, 0x110000, 99]) |> Result.is_err
## ```
from_utf32 : List U32 -> Result Str [BadUtf32 { problem : Utf8Problem, index : U64 }]
diff --git a/crates/compiler/test_syntax/tests/snapshots/pass/tuple_function_annotation.expr.formatted.roc b/crates/compiler/test_syntax/tests/snapshots/pass/tuple_function_annotation.expr.formatted.roc
index 87338cba51c..274c54feb1d 100644
--- a/crates/compiler/test_syntax/tests/snapshots/pass/tuple_function_annotation.expr.formatted.roc
+++ b/crates/compiler/test_syntax/tests/snapshots/pass/tuple_function_annotation.expr.formatted.roc
@@ -1,4 +1,4 @@
-1P : (
+11 : (
I,
s,
Mw
diff --git a/crates/compiler/test_syntax/tests/snapshots/pass/tuple_function_annotation.expr.result-ast b/crates/compiler/test_syntax/tests/snapshots/pass/tuple_function_annotation.expr.result-ast
index 9e7a2bc2806..2cd387da9cc 100644
--- a/crates/compiler/test_syntax/tests/snapshots/pass/tuple_function_annotation.expr.result-ast
+++ b/crates/compiler/test_syntax/tests/snapshots/pass/tuple_function_annotation.expr.result-ast
@@ -1,74 +1,79 @@
-@0-21 Defs(
- Defs {
- tags: [
- EitherIndex(2147483648),
- ],
- regions: [
- @0-17,
- ],
- space_before: [
- Slice { start: 0, length: 0 },
- ],
- space_after: [
- Slice { start: 0, length: 0 },
- ],
- spaces: [],
- type_defs: [],
- value_defs: [
- Annotation(
- @0-2 SpaceAfter(
- NumLiteral(
- "1P",
+@0-21 SpaceAfter(
+ Defs(
+ Defs {
+ tags: [
+ EitherIndex(2147483648),
+ ],
+ regions: [
+ @0-17,
+ ],
+ space_before: [
+ Slice { start: 0, length: 0 },
+ ],
+ space_after: [
+ Slice { start: 0, length: 0 },
+ ],
+ spaces: [],
+ type_defs: [],
+ value_defs: [
+ Annotation(
+ @0-2 SpaceAfter(
+ NumLiteral(
+ "11",
+ ),
+ [
+ Newline,
+ ],
),
- [
- Newline,
- ],
- ),
- @4-17 Tuple {
- elems: [
- @5-15 Function(
- [
- @5-6 Apply(
- "",
- "I",
- [],
- ),
- @7-8 SpaceAfter(
- BoundVariable(
- "s",
+ @4-17 Tuple {
+ elems: [
+ @5-15 Function(
+ [
+ @5-6 Apply(
+ "",
+ "I",
+ [],
),
- [
- Newline,
- ],
- ),
- @10-12 Apply(
- "",
- "Mw",
- [],
+ @7-8 SpaceAfter(
+ BoundVariable(
+ "s",
+ ),
+ [
+ Newline,
+ ],
+ ),
+ @10-12 Apply(
+ "",
+ "Mw",
+ [],
+ ),
+ ],
+ Pure,
+ @14-15 BoundVariable(
+ "r",
),
- ],
- Pure,
- @14-15 BoundVariable(
- "r",
+ ),
+ ],
+ ext: Some(
+ @16-17 BoundVariable(
+ "l",
),
),
- ],
- ext: Some(
- @16-17 BoundVariable(
- "l",
- ),
- ),
- },
- ),
- ],
- },
- @18-21 SpaceBefore(
- Var {
- module_name: "",
- ident: "asl",
+ },
+ ),
+ ],
},
- [
- Newline,
- ],
+ @18-21 SpaceBefore(
+ Var {
+ module_name: "",
+ ident: "asl",
+ },
+ [
+ Newline,
+ ],
+ ),
),
+ [
+ Newline,
+ ],
)
diff --git a/crates/compiler/test_syntax/tests/snapshots/pass/tuple_function_annotation.expr.roc b/crates/compiler/test_syntax/tests/snapshots/pass/tuple_function_annotation.expr.roc
index 2ff60858103..07c30aca37b 100644
--- a/crates/compiler/test_syntax/tests/snapshots/pass/tuple_function_annotation.expr.roc
+++ b/crates/compiler/test_syntax/tests/snapshots/pass/tuple_function_annotation.expr.roc
@@ -1,4 +1,4 @@
-1P
+11
:(I,s
,Mw->r)l
-asl
\ No newline at end of file
+asl
diff --git a/crates/docs/src/static/styles.css b/crates/docs/src/static/styles.css
index a188e7f0a52..e34bbb034f7 100644
--- a/crates/docs/src/static/styles.css
+++ b/crates/docs/src/static/styles.css
@@ -90,7 +90,7 @@ table tr td {
}
.entry-name:target {
- background-color: var(--violet-bg);
+ border: 4px solid var(--violet);
}
.entry-name a {
diff --git a/crates/glue/src/RustGlue.roc b/crates/glue/src/RustGlue.roc
index 7b01b37d405..0fdd0fdc20e 100644
--- a/crates/glue/src/RustGlue.roc
+++ b/crates/glue/src/RustGlue.roc
@@ -172,7 +172,7 @@ generate_entry_point = \buf, types, name, id ->
extern_arguments =
when Types.shape(types, id) is
Function(roc_fn) ->
- to_arg_str(roc_fn.args, types, \_argId, shape, index ->
+ to_arg_str(roc_fn.args, types, \_arg_id, shape, index ->
index_str = Num.to_str(index)
if can_derive_copy(types, shape) then
@@ -254,7 +254,7 @@ generate_function = \buf, types, roc_fn ->
extern_call_arguments =
without_unit =
- to_arg_str(roc_fn.args, types, \_argId, _shape, index ->
+ to_arg_str(roc_fn.args, types, \_arg_id, _shape, index ->
index_str = Num.to_str(index)
"&arg${index_str}")
@@ -814,7 +814,7 @@ generate_non_recursive_tag_union = \buf, types, id, name, tags, discriminant_siz
b
|> generate_roc_refcounted(types, union_type, escaped_name)
-generate_non_nullable_unwrapped = \buf, types, name, tag_name, payload, discriminant_size, _discriminant_offset, _null_tagIndex ->
+generate_non_nullable_unwrapped = \buf, types, name, tag_name, payload, discriminant_size, _discriminant_offset, _null_tag_index ->
escaped_name = escape_kw(name)
discriminant_name = "discriminant_${escaped_name}"
@@ -879,7 +879,7 @@ generate_recursive_tag_union = \buf, types, id, tag_union_name, tags, discrimina
discriminant_name = "discriminant_${escaped_name}"
tag_names = List.map(tags, \{ name: n } -> n)
# self = "(&*self.union_pointer())"
- # selfMut = "(&mut *self.union_pointer())"
+ # self_mut = "(&mut *self.union_pointer())"
# other = "(&*other.union_pointer())"
union_name = "union_${escaped_name}"
@@ -1919,9 +1919,9 @@ has_float = \types, type ->
has_float_help(types, type, Set.empty({}))
has_float_help = \types, type, do_not_recurse ->
- # TODO: is doNotRecurse problematic? Do we need an updated doNotRecurse for calls up the tree?
+ # TODO: is do_not_recurse problematic? Do we need an updated do_not_recurse for calls up the tree?
# I think there is a change it really only matters for RecursivePointer, so it may be fine.
- # Otherwise we need to deal with threading through updates to doNotRecurse
+ # Otherwise we need to deal with threading through updates to do_not_recurse
when type is
Num(kind) ->
when kind is
@@ -2145,9 +2145,9 @@ contains_refcounted = \types, type ->
contains_refcounted_help(types, type, Set.empty({}))
contains_refcounted_help = \types, type, do_not_recurse ->
- # TODO: is doNotRecurse problematic? Do we need an updated doNotRecurse for calls up the tree?
+ # TODO: is do_not_recurse problematic? Do we need an updated do_not_recurse for calls up the tree?
# I think there is a change it really only matters for RecursivePointer, so it may be fine.
- # Otherwise we need to deal with threading through updates to doNotRecurse
+ # Otherwise we need to deal with threading through updates to do_not_recurse
when type is
RocStr | RocList(_) | RocSet(_) | RocDict(_, _) | RocBox(_) | RecursivePointer(_) ->
Bool.true
diff --git a/crates/packaging/src/cache.rs b/crates/packaging/src/cache.rs
index b412e383c22..27341819235 100644
--- a/crates/packaging/src/cache.rs
+++ b/crates/packaging/src/cache.rs
@@ -54,7 +54,7 @@ fn nixos_error_if_dynamic(url: &str, dest_dir: &Path) {
Dynamically linked platforms can't be used on NixOS.\n\n\
You can:\n\n\t\
- Download the source of the platform and build it locally, like in this example:\n\t \
- https://github.com/roc-lang/roc/blob/main/examples/platform-switching/rocLovesC.roc.\n\t \
+ https://github.com/roc-lang/roc/blob/main/examples/platform-switching/roc_loves_c.roc.\n\t \
For some graphical platforms you may need to use https://github.com/guibou/nixGL.\n\n\t\
- Contact the author of the platform to ask them to statically link their platform.\n\t \
musl can be used to prevent a dynamic dependency on the systems' libc.\n\t \
diff --git a/src/check/tokenize.zig b/src/check/tokenize.zig
new file mode 100644
index 00000000000..9e88b80cba9
--- /dev/null
+++ b/src/check/tokenize.zig
@@ -0,0 +1,1206 @@
+const std = @import("std");
+
+// Unicode data tables - allows us to identify upper/lowercase letters for non-ASCII characters.
+const GenCatData = @import("GenCatData");
+
+pub const Token = struct {
+ tag: Tag,
+ offset: u32,
+ length: u32,
+
+ pub const Tag = enum(u8) {
+ EndOfFile,
+ Newline,
+
+ // primitives
+ Float,
+ String,
+ SingleQuote,
+
+ // a part of a string interpolation; generally you'll see something like:
+ // StringBegin, OpenCurly, , CloseCurly StringPart, OpenCurly, , CloseCurly
+ StringBegin,
+ StringPart,
+
+ // These are not technically valid, but we can have the formatter fix them up.
+ SingleQuoteBegin,
+ SingleQuotePart,
+
+ UpperIdent,
+ LowerIdent,
+ Underscore,
+ DotLowerIdent,
+ DotInt,
+ DotUpperIdent,
+ NoSpaceDotInt,
+ NoSpaceDotLowerIdent,
+ NoSpaceDotUpperIdent,
+
+ NamedUnderscore,
+ OpaqueName,
+ Int,
+
+ OpenRound,
+ CloseRound,
+ OpenSquare,
+ CloseSquare,
+ OpenCurly,
+ CloseCurly,
+
+ OpPlus,
+ OpStar,
+ OpPizza,
+ OpAssign,
+ OpBinaryMinus, // trailing whitespace
+ OpUnaryMinus, // no trailing whitespace
+ OpNotEquals,
+ OpBang,
+ OpAnd,
+ OpAmpersand,
+ OpQuestion,
+ OpOr,
+ OpBar,
+ OpDoubleSlash,
+ OpSlash,
+ OpPercent,
+ OpCaret,
+ OpGreaterThanOrEq,
+ OpGreaterThan,
+ OpLessThanOrEq,
+ OpBackArrow,
+ OpLessThan,
+ OpEquals,
+ OpColonEqual,
+
+ Comma,
+ Dot,
+ DoubleDot,
+ TripleDot,
+ OpColon,
+ OpArrow,
+ OpBackslash,
+
+ // Keywords
+ KwApp,
+ KwAs,
+ KwCrash,
+ KwDbg,
+ KwDebug,
+ KwElse,
+ KwExpect,
+ KwExposes,
+ KwGenerates,
+ KwHas,
+ KwHosted,
+ KwIf,
+ KwImplements,
+ KwImport,
+ KwImports,
+ KwInterface,
+ KwIs,
+ KwModule,
+ KwPackage,
+ KwPackages,
+ KwPlatform,
+ KwProvides,
+ KwRequires,
+ KwThen,
+ KwTo,
+ KwWhen,
+ KwWhere,
+ KwWith,
+ };
+
+ pub const keywords = std.StaticStringMap(Tag).initComptime(.{
+ .{ "app", .KwApp },
+ .{ "as", .KwAs },
+ .{ "crash", .KwCrash },
+ .{ "dbg", .KwDbg },
+ .{ "else", .KwElse },
+ .{ "expect", .KwExpect },
+ .{ "exposes", .KwExposes },
+ .{ "generates", .KwGenerates },
+ .{ "has", .KwHas },
+ .{ "hosted", .KwHosted },
+ .{ "if", .KwIf },
+ .{ "implements", .KwImplements },
+ .{ "import", .KwImport },
+ .{ "imports", .KwImports },
+ .{ "interface", .KwInterface },
+ .{ "is", .KwIs },
+ .{ "module", .KwModule },
+ .{ "package", .KwPackage },
+ .{ "packages", .KwPackages },
+ .{ "platform", .KwPlatform },
+ .{ "provides", .KwProvides },
+ .{ "requires", .KwRequires },
+ .{ "then", .KwThen },
+ .{ "to", .KwTo },
+ .{ "when", .KwWhen },
+ .{ "where", .KwWhere },
+ .{ "with", .KwWith },
+ });
+
+ pub const valid_number_suffixes = std.StaticStringMap(void).initComptime(.{
+ .{ "dec", .{} },
+ .{ "i128", .{} },
+ .{ "i16", .{} },
+ .{ "i32", .{} },
+ .{ "i64", .{} },
+ .{ "i8", .{} },
+ .{ "nat", .{} },
+ .{ "u128", .{} },
+ .{ "u16", .{} },
+ .{ "u32", .{} },
+ .{ "u64", .{} },
+ .{ "u8", .{} },
+ });
+
+ pub fn isKeyword(tok: Tag) bool {
+ return switch (tok) {
+ .KwApp,
+ .KwAs,
+ .KwCrash,
+ .KwDbg,
+ .KwElse,
+ .KwExpect,
+ .KwExpectFx,
+ .KwExposes,
+ .KwGenerates,
+ .KwHas,
+ .KwHosted,
+ .KwIf,
+ .KwImplements,
+ .KwImport,
+ .KwImports,
+ .KwInterface,
+ .KwIs,
+ .KwPackage,
+ .KwPackages,
+ .KwPlatform,
+ .KwProvides,
+ .KwRequires,
+ .KwThen,
+ .KwTo,
+ .KwWhen,
+ .KwWhere,
+ .KwWith,
+ => true,
+ else => false,
+ };
+ }
+};
+
+/// The buffer that accumulates tokens.
+pub const TokenizedBuffer = struct {
+ allocator: std.mem.Allocator,
+ tokens: std.MultiArrayList(Token),
+
+ pub fn init(allocator: std.mem.Allocator) !TokenizedBuffer {
+ return TokenizedBuffer{
+ .allocator = allocator,
+ .tokens = std.MultiArrayList(Token){},
+ };
+ }
+
+ pub fn deinit(self: *TokenizedBuffer) void {
+ self.tokens.deinit(self.allocator);
+ }
+
+ /// Pushes a token with the given tag, token offset, and length.
+ pub fn pushToken(self: *TokenizedBuffer, tag: Token.Tag, tok_offset: u32, tok_length: u32) !void {
+ try self.tokens.append(self.allocator, .{
+ .tag = tag,
+ .offset = tok_offset,
+ .length = tok_length,
+ });
+ }
+
+ pub fn pushNewline(self: *TokenizedBuffer, indent: u32) !void {
+ try self.tokens.append(self.allocator, .{
+ .tag = .Newline,
+ .offset = indent, // store the indent in the offset field
+ .length = 0,
+ });
+ }
+
+ /// Returns the offset of the token at index `idx`.
+ pub fn offset(self: *TokenizedBuffer, idx: u32) u32 {
+ // newline tokens don't have offsets - that field is used to store the indent.
+ std.debug.assert(self.tokens.items(.tag) != .Newline);
+ return self.tokens.items(.offset)[@intCast(idx)];
+ }
+};
+
+pub const Comment = struct {
+ begin: usize,
+ end: usize,
+};
+
+const Unicode = struct {
+ tag: Tag,
+ length: u32,
+
+ const Tag = enum {
+ LetterUpper,
+ LetterNotUpper,
+ Digit,
+ Other,
+ Invalid,
+ };
+};
+
+pub const Diagnostic = struct {
+ tag: Tag,
+ begin: u32,
+ end: u32,
+
+ pub const Tag = enum {
+ MisplacedCarriageReturn,
+ AsciiControl,
+ LeadingZero,
+ UnknownToken,
+ OpaqueNameWithoutName,
+ UppercaseBase,
+ InvalidUnicodeEscapeSequence,
+ InvalidEscapeSequence,
+ UnclosedString,
+ UnclosedSingleQuote,
+ BadNumberSuffix,
+ OverClosedBrace,
+ MismatchedBrace,
+ };
+};
+
+/// The cursor is our current position in the input text, and it collects messages.
+/// Note that instead of allocating its own message list, the caller must pass in a pre-allocated
+/// slice of Message. The field `message_count` tracks how many messages have been written.
+/// This can grow beyond the length of the slice, and if so, it means there are more messages
+/// than the caller has allocated space for. The caller can either ignore these messages or
+/// allocate a larger slice and tokenize again.
+pub const Cursor = struct {
+ buf: []const u8,
+ pos: u32,
+ messages: []Diagnostic,
+ message_count: usize,
+ gc: *GenCatData,
+ tab_width: u8 = 4, // TODO: make this configurable
+
+ /// Initialize a Cursor with the given input buffer and a pre-allocated messages slice.
+ pub fn init(buf: []const u8, messages: []Diagnostic, gc: *GenCatData) Cursor {
+ return Cursor{
+ .buf = buf,
+ .pos = 0,
+ .messages = messages,
+ .message_count = 0,
+ .gc = gc,
+ };
+ }
+
+ fn pushMessageHere(self: *Cursor, tag: Diagnostic.Tag) void {
+ self.pushMessage(tag, self.pos, self.pos);
+ }
+
+ fn pushMessage(self: *Cursor, tag: Diagnostic.Tag, begin: u32, end: u32) void {
+ if (self.message_count < self.messages.len) {
+ self.messages[self.message_count] = .{
+ .tag = tag,
+ .begin = begin,
+ .end = end,
+ };
+ }
+ self.message_count += 1;
+ }
+
+ /// Returns the current byte, or null if at the end.
+ pub fn peek(self: *Cursor) ?u8 {
+ if (self.pos < self.buf.len) {
+ return self.buf[self.pos];
+ }
+ return null;
+ }
+
+ /// Returns the byte at the given lookahead offset.
+ pub fn peekAt(self: *Cursor, lookahead: usize) ?u8 {
+ if (self.pos + lookahead < self.buf.len) {
+ return self.buf[self.pos + lookahead];
+ }
+ return null;
+ }
+
+ pub fn isPeekedCharInRange(self: *Cursor, lookahead: usize, start: u8, end: u8) bool {
+ const c = self.peekAt(lookahead);
+ return c != null and c >= start and c <= end;
+ }
+
+ /// Requires that the next byte is `ch`, otherwise pushes a message.
+ pub fn require(self: *Cursor, ch: u8, tag: Diagnostic.Tag) void {
+ if (self.peek() == ch) {
+ self.pos += 1;
+ } else {
+ self.pushMessageHere(tag);
+ }
+ }
+
+ /// Chomps “trivia” (whitespace, comments, etc.) and returns an optional indent.
+ /// If the chomped trivia includes a newline, returns the indent of the next (real) line.
+ /// Otherwise, returns null.
+ pub fn chompTrivia(self: *Cursor) ?u16 {
+ var sawNewline = false;
+ var indent: u16 = 0;
+
+ while (self.pos < self.buf.len) {
+ const b = self.buf[self.pos];
+ if (b == ' ') {
+ self.pos += 1;
+ if (sawNewline) indent += 1;
+ } else if (b == '\t') {
+ self.pos += 1;
+ if (sawNewline) {
+ // round up to the next tab stop
+ indent = (indent + self.tab_width) & ~(self.tab_width - 1);
+ }
+ } else if (b == '\n') {
+ self.pos += 1;
+ sawNewline = true;
+ indent = 0;
+ } else if (b == '\r') {
+ self.pos += 1;
+ sawNewline = true;
+ indent = 0;
+ if (self.pos < self.buf.len and self.buf[self.pos] == '\n') {
+ self.pos += 1;
+ } else {
+ self.pushMessageHere(.MisplacedCarriageReturn);
+ }
+ } else if (b == '#') {
+ self.pos += 1;
+ while (self.pos < self.buf.len and self.buf[self.pos] != '\n') {
+ self.pos += 1;
+ }
+ } else if (b >= 0 and b <= 31) {
+ self.pushMessageHere(.AsciiControl);
+ self.pos += 1;
+ } else {
+ break;
+ }
+ }
+ if (sawNewline) return indent;
+ return null;
+ }
+
+ fn maybeMessageForUppercaseBase(self: *Cursor, b: u8) void {
+ if (b == 'X' or b == 'O' or b == 'B') {
+ self.pushMessageHere(.UppercaseBase);
+ }
+ }
+
+ /// Decodes a Unicode character starting at `self.pos` and returns its category.
+ /// Note this assumes the caller has already peek'd the first byte.
+ pub fn decodeUnicode(self: *Cursor, first_byte: u8) Unicode {
+ std.debug.assert(first_byte == self.buf[self.pos]);
+ const len3 = std.unicode.utf8ByteSequenceLength(first_byte) catch {
+ return .{ .tag = .Invalid, .length = 1 };
+ };
+ const len: u32 = @intCast(len3);
+ const utf8_char = std.unicode.utf8Decode(self.buf[self.pos .. self.pos + len]) catch {
+ return .{ .tag = .Invalid, .length = len };
+ };
+ switch (self.gc.gc(utf8_char)) {
+ .Lu, .Lt => return .{ .tag = .LetterUpper, .length = len },
+ .Ll, .Lm, .Lo => return .{ .tag = .LetterNotUpper, .length = len },
+ .Nd, .Nl, .No => return .{ .tag = .Digit, .length = len },
+ else => return .{ .tag = .Other, .length = len },
+ }
+ }
+
+ pub fn chompNumber(self: *Cursor, initialDigit: u8) Token.Tag {
+ // Consume the initial digit.
+ std.debug.assert(initialDigit == self.buf[self.pos]);
+ self.pos += 1;
+
+ var tok: Token.Tag = undefined;
+ if (initialDigit == '0') {
+ while (true) {
+ const c = self.peek() orelse 0;
+ switch (c) {
+ 'x', 'X' => {
+ maybeMessageForUppercaseBase(self, c);
+ self.pos += 1;
+ self.chompIntegerBase16();
+ self.chompNumberSuffix();
+ tok = .Int;
+ break;
+ },
+ 'o', 'O' => {
+ maybeMessageForUppercaseBase(self, c);
+ self.pos += 1;
+ self.chompIntegerBase8();
+ self.chompNumberSuffix();
+ tok = .Int;
+ break;
+ },
+ 'b', 'B' => {
+ maybeMessageForUppercaseBase(self, c);
+ self.pos += 1;
+ self.chompIntegerBase2();
+ self.chompNumberSuffix();
+ tok = .Int;
+ break;
+ },
+ '0'...'9' => {
+ self.pushMessageHere(.LeadingZero);
+ _ = self.chompNumberBase10();
+ self.chompNumberSuffix();
+ tok = .Int;
+ break;
+ },
+ '_' => {
+ self.pos += 1;
+ continue;
+ },
+ '.' => {
+ self.pos += 1;
+ _ = self.chompIntegerBase10();
+ tok = .Float;
+ _ = self.chompExponent();
+ break;
+ },
+ else => {
+ tok = .Int;
+ break;
+ },
+ }
+ }
+ } else {
+ _ = self.chompNumberBase10();
+ self.chompNumberSuffix();
+ tok = .Int;
+ }
+ return tok;
+ }
+
+ pub fn chompExponent(self: *Cursor) bool {
+ if (self.peek() orelse 0 == 'e' or self.peek() orelse 0 == 'E') {
+ self.pos += 1;
+ // Optional sign
+ if (self.peek() orelse 0 == '+' or self.peek() orelse 0 == '-') {
+ self.pos += 1;
+ }
+ self.chompIntegerBase10();
+ return true;
+ }
+ return false;
+ }
+
+ pub fn chompNumberSuffix(self: *Cursor) void {
+ if (self.peek() == null or !std.ascii.isAlphabetic(self.peek() orelse 0)) {
+ return;
+ }
+ const start = self.pos;
+ var pos = self.pos + 1;
+ while (pos < self.buf.len) : (pos += 1) {
+ const c = self.buf[pos];
+ if (std.ascii.isAlphabetic(c) or std.ascii.isDigit(c)) {
+ // continue advancing
+ } else {
+ break;
+ }
+ }
+ const suffix = self.buf[start..pos];
+ if (Token.valid_number_suffixes.get(suffix) == null) {
+ self.pushMessageHere(.BadNumberSuffix);
+ }
+ self.pos = pos;
+ }
+
+ pub fn chompNumberBase10(self: *Cursor) Token.Tag {
+ self.chompIntegerBase10();
+ var token_type: Token.Tag = .Int;
+ if (self.peek() orelse 0 == '.') {
+ self.pos += 1;
+ self.chompIntegerBase10();
+ token_type = .Float;
+ }
+ if (self.chompExponent()) {
+ token_type = .Float;
+ }
+ return token_type;
+ }
+
+ pub fn chompIntegerBase10(self: *Cursor) void {
+ while (self.peek()) |c| {
+ if (c >= '0' and c <= '9') {
+ self.pos += 1;
+ } else if (c == '_') {
+ self.pos += 1;
+ } else {
+ break;
+ }
+ }
+ }
+
+ pub fn chompIntegerBase16(self: *Cursor) void {
+ while (self.peek()) |c| {
+ if ((c >= '0' and c <= '9') or (c >= 'a' and c <= 'f') or (c >= 'A' and c <= 'F')) {
+ self.pos += 1;
+ } else if (c == '_') {
+ self.pos += 1;
+ } else {
+ break;
+ }
+ }
+ }
+
+ pub fn chompIntegerBase8(self: *Cursor) void {
+ while (self.peek()) |c| {
+ if (c >= '0' and c <= '7') {
+ self.pos += 1;
+ } else if (c == '_') {
+ self.pos += 1;
+ } else {
+ break;
+ }
+ }
+ }
+
+ pub fn chompIntegerBase2(self: *Cursor) void {
+ while (self.peek()) |c| {
+ if (c == '0' or c == '1') {
+ self.pos += 1;
+ } else if (c == '_') {
+ self.pos += 1;
+ } else {
+ break;
+ }
+ }
+ }
+
+ /// Chomps an identifier starting with a lowercase letter.
+ /// Also checks if the resulting identifier is a keyword.
+ /// Returns the token type - LowerIdent or Kw*
+ pub fn chompIdentLower(self: *Cursor) Token.Tag {
+ const start = self.pos;
+ _ = self.chompIdentGeneral();
+ const ident = self.buf[start..self.pos];
+ const kw = Token.keywords.get(ident);
+ return kw orelse .LowerIdent;
+ }
+
+ /// Chomps a general identifier - either upper or lower case.
+ /// Doesn't check if the identifier is a keyword, since we assume the caller already
+ /// determined that was impossible (e.g. because the first character was uppercase),
+ /// or otherwise not relevant.
+ pub fn chompIdentGeneral(self: *Cursor) void {
+ while (self.pos < self.buf.len) {
+ const c = self.buf[self.pos];
+ if ((c >= 'a' and c <= 'z') or (c >= 'A' and c <= 'Z') or (c >= '0' and c <= '9') or c == '_') {
+ self.pos += 1;
+ } else {
+ const info = self.decodeUnicode(c);
+ if (info.tag != .Other and info.tag != .Invalid) {
+ self.pos += info.length;
+ } else {
+ break;
+ }
+ }
+ }
+ }
+
+ pub fn chompInteger(self: *Cursor) void {
+ while (self.pos < self.buf.len) {
+ const c = self.buf[self.pos];
+ if (c >= '0' and c <= '9') {
+ self.pos += 1;
+ } else {
+ break;
+ }
+ }
+ }
+};
+
+/// The output of the tokenizer.
+pub const TokenOutput = struct {
+ tokens: TokenizedBuffer,
+ messages: []Diagnostic,
+ extra_messages_dropped: usize,
+};
+
+const BraceKind = enum {
+ Round,
+ Square,
+ Curly,
+ StringInterpolation,
+ StringInterpolationMultiline,
+ SingleQuoteInterpolation,
+ SingleQuoteInterpolationMultiline,
+};
+
+/// The tokenizer that uses a Cursor and produces a TokenizedBuffer.
+pub const Tokenizer = struct {
+ cursor: Cursor,
+ output: TokenizedBuffer,
+ stack: std.ArrayList(BraceKind),
+
+ /// Creates a new Tokenizer.
+ /// Note that the caller must also provide a pre-allocated messages buffer.
+ pub fn init(text: []const u8, messages: []Diagnostic, gc: *GenCatData, allocator: std.mem.Allocator) !Tokenizer {
+ const cursor = Cursor.init(text, messages, gc);
+ const output = try TokenizedBuffer.init(allocator);
+ return Tokenizer{
+ .cursor = cursor,
+ .output = output,
+ .stack = std.ArrayList(BraceKind).init(allocator),
+ };
+ }
+
+ pub fn deinit(self: *Tokenizer) void {
+ self.output.deinit();
+ self.stack.deinit();
+ }
+
+ pub fn finish_and_deinit(self: Tokenizer) TokenOutput {
+ self.stack.deinit();
+ const actual_message_count = @min(self.cursor.message_count, self.cursor.messages.len);
+ return .{
+ .tokens = self.output,
+ .messages = self.cursor.messages[0..actual_message_count],
+ .extra_messages_dropped = self.cursor.message_count - actual_message_count,
+ };
+ }
+
+ fn pushToken(self: *Tokenizer, tag: Token.Tag, start: u32) !void {
+ const len = self.cursor.pos - start;
+ try self.output.pushToken(tag, start, len);
+ }
+
+ fn consumeBraceCloseAndContinueStringInterp(self: *Tokenizer, brace: BraceKind) !void {
+ std.debug.assert(self.cursor.peek() == '}' or self.cursor.peek() == ']' or self.cursor.peek() == ')');
+ if (self.stack.items.len == 0) {
+ self.cursor.pushMessageHere(.OverClosedBrace);
+ self.cursor.pos += 1;
+ return;
+ }
+ const last = self.stack.items[self.stack.items.len - 1];
+ if (last == brace) {
+ self.stack.items = self.stack.items[0 .. self.stack.items.len - 1];
+ } else {
+ self.cursor.pushMessageHere(.MismatchedBrace);
+ }
+ self.cursor.pos += 1;
+ const start = self.cursor.pos;
+ if (self.stack.items.len > 0) {
+ const brace_kind = self.stack.items[self.stack.items.len - 1];
+ const term: u8 = switch (brace_kind) {
+ .StringInterpolation, .StringInterpolationMultiline => '"',
+ .SingleQuoteInterpolation, .SingleQuoteInterpolationMultiline => '\'',
+ else => return,
+ };
+ const kind: StringKind = switch (brace_kind) {
+ .StringInterpolationMultiline, .SingleQuoteInterpolationMultiline => .multi_line,
+ else => .single_line,
+ };
+ _ = self.stack.pop();
+ const tok = try self.tokenizeStringLikeLiteralBody(.after_interpolation, kind, term, start);
+ try self.output.pushToken(tok, start, self.cursor.pos - start);
+ }
+ }
+
+ /// The main tokenize loop. This loops over the whole input buffer, tokenizing as it goes.
+ pub fn tokenize(self: *Tokenizer) !void {
+ var sawWhitespace: bool = true;
+ while (self.cursor.pos < self.cursor.buf.len) {
+ const start = self.cursor.pos;
+ const sp = sawWhitespace;
+ sawWhitespace = false;
+ const b = self.cursor.buf[self.cursor.pos];
+ switch (b) {
+ // Whitespace & control characters
+ 0...32, '#' => {
+ if (self.cursor.chompTrivia()) |indent| {
+ try self.output.pushNewline(indent);
+ }
+ sawWhitespace = true;
+ },
+
+ // Dot (.)
+ '.' => {
+ const next = self.cursor.peekAt(1);
+ if (next) |n| {
+ if (n == '.') {
+ if (self.cursor.peekAt(2) == '.') {
+ self.cursor.pos += 3;
+ try self.output.pushToken(.TripleDot, start, 3);
+ } else {
+ self.cursor.pos += 2;
+ try self.output.pushToken(.DoubleDot, start, 2);
+ }
+ } else if (n >= '0' and n <= '9') {
+ self.cursor.pos += 1;
+ self.cursor.chompInteger();
+ const len = self.cursor.pos - start;
+ try self.output.pushToken(if (sp) .DotInt else .NoSpaceDotInt, start, len);
+ } else if (n >= 'a' and n <= 'z') {
+ self.cursor.pos += 1;
+ self.cursor.chompIdentGeneral();
+ const len = self.cursor.pos - start;
+ try self.output.pushToken(if (sp) .DotLowerIdent else .NoSpaceDotLowerIdent, start, len);
+ } else if (n >= 'A' and n <= 'Z') {
+ self.cursor.pos += 1;
+ self.cursor.chompIdentGeneral();
+ const len = self.cursor.pos - start;
+ try self.output.pushToken(if (sp) .DotUpperIdent else .NoSpaceDotUpperIdent, start, len);
+ } else if (n >= 0b11000000 and n <= 0xff) {
+ const info = self.cursor.decodeUnicode(n);
+ switch (info.tag) {
+ .LetterUpper => {
+ self.cursor.pos += info.length;
+ self.cursor.chompIdentGeneral();
+ const len = self.cursor.pos - start;
+ try self.output.pushToken(if (sp) .DotUpperIdent else .NoSpaceDotUpperIdent, start, len);
+ },
+ .LetterNotUpper => {
+ self.cursor.pos += info.length;
+ self.cursor.chompIdentGeneral();
+ const len = self.cursor.pos - start;
+ try self.output.pushToken(if (sp) .DotLowerIdent else .NoSpaceDotLowerIdent, start, len);
+ },
+ else => {
+ self.cursor.pos += info.length;
+ self.cursor.pushMessageHere(.UnknownToken);
+ },
+ }
+ } else if (n == '{') {
+ self.cursor.pos += 1;
+ try self.output.pushToken(.Dot, start, 1);
+ } else {
+ self.cursor.pos += 1;
+ try self.output.pushToken(.Dot, start, 1);
+ }
+ } else {
+ self.cursor.pos += 1;
+ try self.output.pushToken(.Dot, start, 1);
+ }
+ },
+
+ // Minus (-)
+ '-' => {
+ const next = self.cursor.peekAt(1);
+ if (next) |n| {
+ if (n == '>') {
+ self.cursor.pos += 2;
+ try self.output.pushToken(.OpArrow, start, 2);
+ } else if (n == ' ' or n == '\t' or n == '\n' or n == '\r' or n == '#') {
+ self.cursor.pos += 1;
+ try self.output.pushToken(.OpBinaryMinus, start, 1);
+ } else if (n >= '0' and n <= '9' and sp) {
+ self.cursor.pos += 1;
+ while (self.cursor.pos < self.cursor.buf.len and std.ascii.isDigit(self.cursor.buf[self.cursor.pos])) {
+ self.cursor.pos += 1;
+ }
+ const len = self.cursor.pos - start;
+ try self.output.pushToken(.Int, start, len);
+ } else {
+ self.cursor.pos += 1;
+ const tokenType: Token.Tag = if (sp) .OpUnaryMinus else .OpBinaryMinus;
+ try self.output.pushToken(tokenType, start, 1);
+ }
+ } else {
+ self.cursor.pos += 1;
+ try self.output.pushToken(if (sp) .OpUnaryMinus else .OpBinaryMinus, start, 1);
+ }
+ },
+
+ // Exclamation (!)
+ '!' => {
+ if (self.cursor.peekAt(1) == '=') {
+ self.cursor.pos += 2;
+ try self.output.pushToken(.OpNotEquals, start, 2);
+ } else {
+ self.cursor.pos += 1;
+ try self.output.pushToken(.OpBang, start, 1);
+ }
+ },
+
+ // Ampersand (&)
+ '&' => {
+ if (self.cursor.peekAt(1) == '&') {
+ self.cursor.pos += 2;
+ try self.output.pushToken(.OpAnd, start, 2);
+ } else {
+ self.cursor.pos += 1;
+ try self.output.pushToken(.OpAmpersand, start, 1);
+ }
+ },
+
+ // Comma (,)
+ ',' => {
+ self.cursor.pos += 1;
+ try self.output.pushToken(.Comma, start, 1);
+ },
+
+ // Question mark (?)
+ '?' => {
+ self.cursor.pos += 1;
+ try self.output.pushToken(.OpQuestion, start, 1);
+ },
+
+ // Pipe (|)
+ '|' => {
+ if (self.cursor.peekAt(1) == '|') {
+ self.cursor.pos += 2;
+ try self.output.pushToken(.OpOr, start, 2);
+ } else if (self.cursor.peekAt(1) == '>') {
+ self.cursor.pos += 2;
+ try self.output.pushToken(.OpPizza, start, 2);
+ } else {
+ self.cursor.pos += 1;
+ try self.output.pushToken(.OpBar, start, 1);
+ }
+ },
+
+ // Plus (+)
+ '+' => {
+ self.cursor.pos += 1;
+ try self.output.pushToken(.OpPlus, start, 1);
+ },
+
+ // Star (*)
+ '*' => {
+ self.cursor.pos += 1;
+ try self.output.pushToken(.OpStar, start, 1);
+ },
+
+ // Slash (/)
+ '/' => {
+ if (self.cursor.peekAt(1) == '/') {
+ self.cursor.pos += 2;
+ try self.output.pushToken(.OpDoubleSlash, start, 2);
+ } else {
+ self.cursor.pos += 1;
+ try self.output.pushToken(.OpSlash, start, 1);
+ }
+ },
+
+ // Backslash (\)
+ '\\' => {
+ self.cursor.pos += 1;
+ try self.output.pushToken(.OpBackslash, start, 1);
+ },
+
+ // Percent (%)
+ '%' => {
+ self.cursor.pos += 1;
+ try self.output.pushToken(.OpPercent, start, 1);
+ },
+
+ // Caret (^)
+ '^' => {
+ self.cursor.pos += 1;
+ try self.output.pushToken(.OpCaret, start, 1);
+ },
+
+ // Greater-than (>)
+ '>' => {
+ if (self.cursor.peekAt(1) == '=') {
+ self.cursor.pos += 2;
+ try self.output.pushToken(.OpGreaterThanOrEq, start, 2);
+ } else {
+ self.cursor.pos += 1;
+ try self.output.pushToken(.OpGreaterThan, start, 1);
+ }
+ },
+
+ // Less-than (<)
+ '<' => {
+ if (self.cursor.peekAt(1) == '=') {
+ self.cursor.pos += 2;
+ try self.output.pushToken(.OpLessThanOrEq, start, 2);
+ } else if (self.cursor.peekAt(1) == '-') {
+ self.cursor.pos += 2;
+ try self.output.pushToken(.OpBackArrow, start, 2);
+ } else {
+ self.cursor.pos += 1;
+ try self.output.pushToken(.OpLessThan, start, 1);
+ }
+ },
+
+ // Equals (=)
+ '=' => {
+ if (self.cursor.peekAt(1) == '=') {
+ self.cursor.pos += 2;
+ try self.output.pushToken(.OpEquals, start, 2);
+ } else {
+ self.cursor.pos += 1;
+ try self.output.pushToken(.OpAssign, start, 1);
+ }
+ },
+
+ // Colon (:)
+ ':' => {
+ if (self.cursor.peekAt(1) == '=') {
+ self.cursor.pos += 2;
+ try self.output.pushToken(.OpColonEqual, start, 2);
+ } else {
+ self.cursor.pos += 1;
+ try self.output.pushToken(.OpColon, start, 1);
+ }
+ },
+
+ '(' => {
+ self.cursor.pos += 1;
+ try self.stack.append(.Round);
+ try self.output.pushToken(.OpenRound, start, 1);
+ },
+ '[' => {
+ self.cursor.pos += 1;
+ try self.stack.append(.Square);
+ try self.output.pushToken(.OpenSquare, start, 1);
+ },
+ '{' => {
+ self.cursor.pos += 1;
+ try self.stack.append(.Curly);
+ try self.output.pushToken(.OpenCurly, start, 1);
+ },
+
+ ')' => {
+ try self.output.pushToken(.CloseRound, start, 1);
+ try self.consumeBraceCloseAndContinueStringInterp(.Round);
+ },
+ ']' => {
+ try self.output.pushToken(.CloseSquare, start, 1);
+ try self.consumeBraceCloseAndContinueStringInterp(.Square);
+ },
+ '}' => {
+ try self.output.pushToken(.CloseCurly, start, 1);
+ try self.consumeBraceCloseAndContinueStringInterp(.Curly);
+ },
+
+ '_' => {
+ const next = self.cursor.peekAt(1);
+ if (next) |n| {
+ if ((n >= 'a' and n <= 'z') or (n >= 'A' and n <= 'Z') or (n >= '0' and n <= '9')) {
+ self.cursor.pos += 2;
+ self.cursor.chompIdentGeneral();
+ const len = self.cursor.pos - start;
+ try self.output.pushToken(.NamedUnderscore, start, len);
+ } else {
+ self.cursor.pos += 1;
+ try self.output.pushToken(.Underscore, start, 1);
+ }
+ } else {
+ self.cursor.pos += 1;
+ try self.output.pushToken(.Underscore, start, 1);
+ }
+ },
+
+ '@' => {
+ const next = self.cursor.peekAt(1);
+ if (next) |n| {
+ if ((n >= 'a' and n <= 'z') or (n >= 'A' and n <= 'Z') or (n >= '0' and n <= '9')) {
+ self.cursor.pos += 2;
+ self.cursor.chompIdentGeneral();
+ const len = self.cursor.pos - start;
+ try self.output.pushToken(.OpaqueName, start, len);
+ } else {
+ self.cursor.pushMessageHere(.OpaqueNameWithoutName);
+ self.cursor.pos += 1;
+ try self.output.pushToken(.OpaqueName, start, 1);
+ }
+ } else {
+ self.cursor.pushMessageHere(.OpaqueNameWithoutName);
+ self.cursor.pos += 1;
+ try self.output.pushToken(.OpaqueName, start, 1);
+ }
+ },
+
+ // Numbers starting with 0-9
+ '0'...'9' => {
+ _ = self.cursor.chompNumber(b);
+ const len = self.cursor.pos - start;
+ try self.output.pushToken(.Int, start, len);
+ },
+
+ // Lowercase identifiers
+ 'a'...'z' => {
+ self.cursor.pos += 1;
+ _ = self.cursor.chompIdentLower();
+ const len = self.cursor.pos - start;
+ try self.output.pushToken(.LowerIdent, start, len);
+ },
+
+ // Uppercase identifiers
+ 'A'...'Z' => {
+ self.cursor.pos += 1;
+ _ = self.cursor.chompIdentGeneral();
+ const len = self.cursor.pos - start;
+ try self.output.pushToken(.UpperIdent, start, len);
+ },
+
+ // String-like literal starting with a single or double quote
+ '"', '\'' => {
+ // Note this may return StringBegin/StringPart instead of String,
+ // in the case of a string interpolation.
+ const tok = try self.tokenizeStringLikeLiteral(b);
+ try self.output.pushToken(tok, start, self.cursor.pos - start);
+ },
+
+ // first byte of a UTF-8 sequence
+ 0b11000000...0xff => {
+ const info = self.cursor.decodeUnicode(b);
+ switch (info.tag) {
+ .LetterUpper => {
+ self.cursor.pos += info.length;
+ self.cursor.chompIdentGeneral();
+ const len = self.cursor.pos - start;
+ try self.output.pushToken(.UpperIdent, start, len);
+ },
+ .LetterNotUpper => {
+ self.cursor.pos += info.length;
+ self.cursor.chompIdentGeneral();
+ const len = self.cursor.pos - start;
+ try self.output.pushToken(.LowerIdent, start, len);
+ },
+ else => {
+ self.cursor.pos += info.length;
+ self.cursor.pushMessageHere(.UnknownToken);
+ },
+ }
+ },
+
+ // Fallback for any unknown token.
+ else => {
+ self.cursor.pushMessageHere(.UnknownToken);
+ self.cursor.pos += 1;
+ },
+ }
+ }
+
+ try self.pushToken(.EndOfFile, 0);
+ }
+
+ pub fn tokenizeStringLikeLiteral(self: *Tokenizer, term: u8) !Token.Tag {
+ const start = self.cursor.pos;
+ // Skip the initial quote.
+ self.cursor.pos += 1;
+ var kind: StringKind = .single_line;
+ if (self.cursor.peek() == term and self.cursor.peekAt(1) == term) {
+ self.cursor.pos += 2;
+ kind = .multi_line;
+ }
+ return try self.tokenizeStringLikeLiteralBody(.start, kind, term, start);
+ }
+
+ const StringState = enum {
+ start,
+ after_interpolation,
+ };
+
+ const StringKind = enum {
+ single_line,
+ multi_line,
+ };
+
+ pub fn tokenizeStringLikeLiteralBody(self: *Tokenizer, state: StringState, kind: StringKind, term: u8, start: u32) !Token.Tag {
+ var escape: bool = false;
+ while (self.cursor.pos < self.cursor.buf.len) {
+ const c = self.cursor.buf[self.cursor.pos];
+ if (escape) {
+ switch (c) {
+ '\\', '"', '\'', 'n', 'r', 't' => {
+ escape = false;
+ self.cursor.pos += 1;
+ },
+ 'u' => {
+ escape = false;
+ self.cursor.pos += 1;
+ self.cursor.require('(', .InvalidUnicodeEscapeSequence);
+ while (true) {
+ if (self.cursor.peek() == ')') {
+ self.cursor.pos += 1;
+ break;
+ } else if (self.cursor.peek() != null) {
+ const next = self.cursor.peek() orelse 0;
+ if ((next >= '0' and next <= '9') or
+ (next >= 'a' and next <= 'f') or
+ (next >= 'A' and next <= 'F'))
+ {
+ self.cursor.pos += 1;
+ } else {
+ self.cursor.pushMessageHere(.InvalidUnicodeEscapeSequence);
+ break;
+ }
+ } else {
+ break;
+ }
+ }
+ },
+ else => {
+ self.cursor.pushMessageHere(.InvalidEscapeSequence);
+ escape = false;
+ self.cursor.pos += 1;
+ },
+ }
+ } else {
+ if (c == '\\') {
+ escape = true;
+ self.cursor.pos += 1;
+ } else if (c == '$' and self.cursor.peekAt(1) == '{') {
+ self.cursor.pos += 1;
+ var brace: BraceKind = undefined;
+ if (term == '"') {
+ switch (kind) {
+ .multi_line => brace = .StringInterpolationMultiline,
+ .single_line => brace = .StringInterpolation,
+ }
+ } else {
+ switch (kind) {
+ .multi_line => brace = .SingleQuoteInterpolationMultiline,
+ .single_line => brace = .SingleQuoteInterpolation,
+ }
+ }
+ try self.stack.append(brace);
+ switch (term) {
+ '"' => {
+ switch (state) {
+ .start => return .StringBegin,
+ .after_interpolation => return .StringPart,
+ }
+ },
+ '\'' => {
+ std.debug.assert(term == '\'');
+ switch (state) {
+ .start => return .SingleQuoteBegin,
+ .after_interpolation => return .SingleQuotePart,
+ }
+ },
+ else => std.debug.assert(false),
+ }
+ } else if (c == '\n') {
+ if (kind == .single_line) {
+ self.cursor.pushMessage(.UnclosedString, @intCast(start), @intCast(self.cursor.pos));
+ return .String;
+ } else {
+ self.cursor.pos += 1;
+ }
+ } else {
+ if (kind == .single_line and c == term) {
+ self.cursor.pos += 1;
+ return .String;
+ } else if (kind == .multi_line and c == term and self.cursor.peekAt(1) == term and self.cursor.peekAt(2) == term) {
+ self.cursor.pos += 3;
+ return .String;
+ }
+ self.cursor.pos += 1;
+ }
+ }
+ }
+ const diag: Diagnostic.Tag = if (term == '"') .UnclosedString else .UnclosedSingleQuote;
+ self.cursor.pushMessage(diag, start, self.cursor.pos);
+ if (state == .after_interpolation) {
+ return if (term == '"') .StringPart else .SingleQuotePart;
+ } else {
+ return if (term == '"') .String else .SingleQuote;
+ }
+ }
+};
diff --git a/src/main.zig b/src/main.zig
index 4d8d2afe6d4..e07f0d48f7a 100644
--- a/src/main.zig
+++ b/src/main.zig
@@ -3,6 +3,7 @@ const mem = std.mem;
const Allocator = std.mem.Allocator;
const RocCmd = @import("cli.zig").RocCmd;
const RocOpt = @import("cli.zig").RocOpt;
+const syntax = @import("check/syntax.zig");
const usage =
\\Usage:
@@ -138,11 +139,20 @@ fn rocVersion(allocator: Allocator, args: []const []const u8) !void {
}
fn rocCheck(allocator: Allocator, opt: RocOpt, args: []const []const u8) !void {
- _ = allocator;
-
- std.debug.print("TODO roc check\n{}\n{s}\n\n", .{ opt, args });
-
- fatal("not implemented", .{});
+ var syn = try syntax.Syntax.init(allocator);
+ defer syn.deinit();
+ _ = opt;
+
+ // Temporary implementation for early testing
+ const dir_path = args[0];
+ const fs = std.fs.cwd();
+ var dir = try fs.openDir(dir_path, .{ .iterate = true });
+ defer dir.close();
+
+ const success = try syn.tokenizeAndCheckSyntaxFiles(dir);
+ if (!success) {
+ fatal("syntax check failed", .{});
+ }
}
fn rocDocs(allocator: Allocator, opt: RocOpt, args: []const []const u8) !void {
diff --git a/www/main.roc b/www/main.roc
index e52613fad23..7b193809648 100644
--- a/www/main.roc
+++ b/www/main.roc
@@ -64,11 +64,11 @@ get_page_info = \page_path_str ->
Str.split_on(page_path_str, "/")
|> List.take_last(2)
|> List.first # we use the folder for name for the page title, e.g. Json from examples/Json/README.html
- |> unwrap_or_crash("This List.first should never fail. pagePathStr ($(page_path_str)) did not contain any `/`.")
+ |> unwrap_or_crash("This List.first should never fail. page_path_str ($(page_path_str)) did not contain any `/`.")
|> (\page_title ->
{ title: "$(page_title) | Roc", description: "$(page_title) example in the Roc programming language." })
else
- crash("Web page $(page_path_str) did not have a title and description specified in the pageData Dict. Please add one.")
+ crash("Web page $(page_path_str) did not have a title and description specified in the page_data Dict. Please add one.")
unwrap_or_crash : Result a b, Str -> a where b implements Inspect
unwrap_or_crash = \result, error_msg ->