diff --git a/crates/README.md b/crates/README.md index 08bc414fe4..209992db82 100644 --- a/crates/README.md +++ b/crates/README.md @@ -149,4 +149,10 @@ Provides a Rust wrapper for the WebAssembly test platform built on libc and is p Below is a simplified diagram to illustrate how a Roc application and host are combined to build an executable file. -![Illustration of the process to build a Roc Application using Rust](./building_a_roc_application.svg) +![Building a Roc Application using Rust](./building_a_roc_application.svg) + +# Roc Compiler Stages + +Below is a simplified diagram to illustrate the different stages of the Roc Compiler. + +![Roc Compiler Stages](./roc_compiler_stages.svg) diff --git a/crates/building_a_roc_application.svg b/crates/building_a_roc_application.svg index 8eebd757cf..50bff9e784 100644 --- a/crates/building_a_roc_application.svg +++ b/crates/building_a_roc_application.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/crates/compiler/exhaustive/src/lib.rs b/crates/compiler/exhaustive/src/lib.rs index 9cb4f35f14..e5b292e578 100644 --- a/crates/compiler/exhaustive/src/lib.rs +++ b/crates/compiler/exhaustive/src/lib.rs @@ -1,5 +1,5 @@ -//! [Exhaustiveness](https://dev.to/babak/exhaustive-type-checking-with-typescript-4l3f) checking, based on "Warning for pattern matching" (Luc Maranget, 2007). -//! http://moscova.inria.fr/~maranget/papers/warn/warn.pdf +//! Exhaustiveness checking, based on [Warnings for pattern matching](http://moscova.inria.fr/~maranget/papers/warn/warn.pdf) +//! (Luc Maranget, 2007). use roc_collections::all::{HumanIndex, MutMap}; use roc_error_macros::internal_error; diff --git a/crates/compiler/str/Cargo.toml b/crates/compiler/str/Cargo.toml index 6bcff95749..688048376a 100644 --- a/crates/compiler/str/Cargo.toml +++ b/crates/compiler/str/Cargo.toml @@ -4,7 +4,7 @@ version = "0.0.1" authors = ["The Roc Contributors"] license = "UPL-1.0" edition = "2021" -description = "Provides Roc styled collection reference counting." +description = "Provides a Roc Str with reference-counting so that it may be mutated in-place." [dependencies] roc_collections = { path = "../collections" } diff --git a/crates/compiler/str/src/lib.rs b/crates/compiler/str/src/lib.rs index 97f89a6976..17f19c0fe0 100644 --- a/crates/compiler/str/src/lib.rs +++ b/crates/compiler/str/src/lib.rs @@ -1,4 +1,8 @@ -//! provides `Roc` styled collection [reference counting](https://en.wikipedia.org/wiki/Reference_counting). +//! Provides `Roc` styled collection [reference counting](https://en.wikipedia.org/wiki/Reference_counting). +//! This means the collection may or may not be safe to mutate in-place, may or +//! may not be reference counted, and may or may not need to be freed when no +//! longer in use. Whether each of these is true for a given collection can be +//! determined by inspecting that collection at runtime. #![crate_type = "lib"] #![no_std] diff --git a/crates/roc_compiler_stages.svg b/crates/roc_compiler_stages.svg new file mode 100644 index 0000000000..c250b616ea --- /dev/null +++ b/crates/roc_compiler_stages.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/crates/wasi-libc-sys/src/lib.rs b/crates/wasi-libc-sys/src/lib.rs index 4e27008a83..fb076d282a 100644 --- a/crates/wasi-libc-sys/src/lib.rs +++ b/crates/wasi-libc-sys/src/lib.rs @@ -1,5 +1,6 @@ -//! Provides a Rust wrapper for the WebAssembly test platform built on libc and -//! is primarily used for testing purposes. +//! Provides a Rust wrapper for the WebAssembly libc, which is used when +//! preprocessing hosts for use with the Wasm development back-end, and for the +//! mock hosts we use in our Wasm tests. // Rust's libc crate doesn't support Wasm, so we provide an implementation from Zig // We define Rust signatures here as we need them, rather than trying to cover all of libc #[cfg(target_family = "wasm")]