diff --git a/crates/README.md b/crates/README.md index 5bede496db..08bc414fe4 100644 --- a/crates/README.md +++ b/crates/README.md @@ -149,5 +149,4 @@ 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. -![Alt text](./building_a_roc_application.svg) - +![Illustration of the process to build a Roc Application using Rust](./building_a_roc_application.svg) diff --git a/crates/ast/src/lib.rs b/crates/ast/src/lib.rs index 911e97fded..03b303688f 100644 --- a/crates/ast/src/lib.rs +++ b/crates/ast/src/lib.rs @@ -1,6 +1,6 @@ //! Library for the Roc AST //! -//! Code to represent the [Abstract Syntax Tree](https://en.wikipedia.org/wiki/Abstract_syntax_tree) +//! Code to represent the [Abstract Syntax Tree](https://en.wikipedia.org/wiki/Abstract_syntax_tree) //! as used by the editor. In contrast to the compiler, the types in this AST do //! not keep track of the location of the matching code in the source file. pub mod ast_error; diff --git a/crates/compiler/alias_analysis/src/lib.rs b/crates/compiler/alias_analysis/src/lib.rs index 334f4d5a77..31e7028004 100644 --- a/crates/compiler/alias_analysis/src/lib.rs +++ b/crates/compiler/alias_analysis/src/lib.rs @@ -1,4 +1,4 @@ -//! Performs analysis and optimizations to remove unneeded [reference counts](https://en.wikipedia.org/wiki/Reference_counting) +//! Performs analysis and optimizations to remove unneeded [reference counts](https://en.wikipedia.org/wiki/Reference_counting) //! at runtime, and supports in-place mutation. use morphic_lib::TypeContext; use morphic_lib::{ diff --git a/crates/compiler/can/src/lib.rs b/crates/compiler/can/src/lib.rs index 7fac425143..f566275636 100644 --- a/crates/compiler/can/src/lib.rs +++ b/crates/compiler/can/src/lib.rs @@ -1,7 +1,7 @@ -//! [Canonicalize](https://en.wikipedia.org/wiki/Canonicalization) a roc -//! [abstract syntax tree](https://en.wikipedia.org/wiki/Abstract_syntax_tree), -//! [resolving symbols](https://stackoverflow.com/a/1175493/4200103), -//! [re-ordering definitions](https://www.oreilly.com/library/view/c-high-performance/9781787120952/546b5677-9157-4333-bc90-16db696436ac.xhtml), +//! [Canonicalize](https://en.wikipedia.org/wiki/Canonicalization) a roc +//! [abstract syntax tree](https://en.wikipedia.org/wiki/Abstract_syntax_tree), +//! [resolving symbols](https://stackoverflow.com/a/1175493/4200103), +//! [re-ordering definitions](https://www.oreilly.com/library/view/c-high-performance/9781787120952/546b5677-9157-4333-bc90-16db696436ac.xhtml), //! and preparing a module for [type inference](https://en.wikipedia.org/wiki/Type_inference). #![warn(clippy::dbg_macro)] // See github.com/roc-lang/roc/issues/800 for discussion of the large_enum_variant check. diff --git a/crates/compiler/constrain/src/lib.rs b/crates/compiler/constrain/src/lib.rs index 75e1a3a43b..09d8cfc319 100644 --- a/crates/compiler/constrain/src/lib.rs +++ b/crates/compiler/constrain/src/lib.rs @@ -1,6 +1,6 @@ -//! Responsible for building the set of constraints that are used during -//! [type inference](https://en.wikipedia.org/wiki/Type_inference) of a program, -//! and for gathering context needed for pleasant error messages when a type +//! Responsible for building the set of constraints that are used during +//! [type inference](https://en.wikipedia.org/wiki/Type_inference) of a program, +//! and for gathering context needed for pleasant error messages when a type //! error occurs. #![warn(clippy::dbg_macro)] // See github.com/roc-lang/roc/issues/800 for discussion of the large_enum_variant check. diff --git a/crates/compiler/gen_dev/src/lib.rs b/crates/compiler/gen_dev/src/lib.rs index ebbf159332..caef1c4ead 100644 --- a/crates/compiler/gen_dev/src/lib.rs +++ b/crates/compiler/gen_dev/src/lib.rs @@ -1,5 +1,5 @@ -//! Provides the compiler backend to generate Roc binaries fast, for a nice -//! developer experience. See [README.md](./compiler/gen_dev/README.md) for +//! Provides the compiler backend to generate Roc binaries fast, for a nice +//! developer experience. See [README.md](./compiler/gen_dev/README.md) for //! more information. #![warn(clippy::dbg_macro)] // See github.com/roc-lang/roc/issues/800 for discussion of the large_enum_variant check. diff --git a/crates/compiler/gen_llvm/src/lib.rs b/crates/compiler/gen_llvm/src/lib.rs index 5aa426d9fb..9143ec16c2 100644 --- a/crates/compiler/gen_llvm/src/lib.rs +++ b/crates/compiler/gen_llvm/src/lib.rs @@ -1,4 +1,4 @@ -//! Provides the LLVM backend to generate Roc binaries. Used to generate a +//! Provides the LLVM backend to generate Roc binaries. Used to generate a //! binary with the fastest possible execution speed. #![warn(clippy::dbg_macro)] // See github.com/roc-lang/roc/issues/800 for discussion of the large_enum_variant check. diff --git a/crates/compiler/gen_wasm/src/lib.rs b/crates/compiler/gen_wasm/src/lib.rs index 8aee0e763e..3078464807 100644 --- a/crates/compiler/gen_wasm/src/lib.rs +++ b/crates/compiler/gen_wasm/src/lib.rs @@ -1,4 +1,4 @@ -//! Provides the WASM backend to generate Roc binaries. +//! Provides the WASM backend to generate Roc binaries. mod backend; mod layout; mod low_level; diff --git a/crates/compiler/load/src/lib.rs b/crates/compiler/load/src/lib.rs index bd8337d531..064eea592f 100644 --- a/crates/compiler/load/src/lib.rs +++ b/crates/compiler/load/src/lib.rs @@ -1,4 +1,4 @@ -//! Used to load a .roc file and coordinate the compiler pipeline, including +//! Used to load a .roc file and coordinate the compiler pipeline, including //! parsing, type checking, and [code generation](https://en.wikipedia.org/wiki/Code_generation_(compiler)). use bumpalo::Bump; use roc_can::module::{ExposedByModule, TypeState}; diff --git a/crates/compiler/module/src/lib.rs b/crates/compiler/module/src/lib.rs index a1c718c746..027665bac9 100644 --- a/crates/compiler/module/src/lib.rs +++ b/crates/compiler/module/src/lib.rs @@ -1,4 +1,4 @@ -//! Implements data structures used for efficiently representing unique modules +//! Implements data structures used for efficiently representing unique modules //! and identifiers in Roc programs. #![warn(clippy::dbg_macro)] // See github.com/roc-lang/roc/issues/800 for discussion of the large_enum_variant check. diff --git a/crates/compiler/mono/src/lib.rs b/crates/compiler/mono/src/lib.rs index 7a3e542844..cfeefb408b 100644 --- a/crates/compiler/mono/src/lib.rs +++ b/crates/compiler/mono/src/lib.rs @@ -1,7 +1,7 @@ -//! Roc's main intermediate representation (IR), which is responsible for -//! [monomorphization](https://en.wikipedia.org/wiki/Monomorphization), -//! defunctionalization, inserting [ref-count](https://en.wikipedia.org/wiki/Reference_counting) -//! instructions, and transforming a Roc program into a form that is easy to +//! Roc's main intermediate representation (IR), which is responsible for +//! [monomorphization](https://en.wikipedia.org/wiki/Monomorphization), +//! defunctionalization, inserting [ref-count](https://en.wikipedia.org/wiki/Reference_counting) +//! instructions, and transforming a Roc program into a form that is easy to //! consume by a backend. #![warn(clippy::dbg_macro)] // See github.com/roc-lang/roc/issues/800 for discussion of the large_enum_variant check. diff --git a/crates/compiler/parse/src/lib.rs b/crates/compiler/parse/src/lib.rs index 1083a4c80c..dbdfe30ff4 100644 --- a/crates/compiler/parse/src/lib.rs +++ b/crates/compiler/parse/src/lib.rs @@ -1,4 +1,4 @@ -//! Implements the Roc parser, which transforms a textual representation of a +//! Implements the Roc parser, which transforms a textual representation of a //! Roc program to an [abstract syntax tree](https://en.wikipedia.org/wiki/Abstract_syntax_tree). #![warn(clippy::dbg_macro)] // See github.com/roc-lang/roc/issues/800 for discussion of the large_enum_variant check. diff --git a/crates/compiler/region/src/lib.rs b/crates/compiler/region/src/lib.rs index 7d218f8321..cb7f5ba923 100644 --- a/crates/compiler/region/src/lib.rs +++ b/crates/compiler/region/src/lib.rs @@ -1,4 +1,4 @@ -//! Data structures for storing source-code-location information, used heavily +//! Data structures for storing source-code-location information, used heavily //! for contextual error messages. #![warn(clippy::dbg_macro)] // See github.com/roc-lang/roc/issues/800 for discussion of the large_enum_variant check. diff --git a/crates/compiler/solve/src/lib.rs b/crates/compiler/solve/src/lib.rs index e51f889f10..fa30f79aad 100644 --- a/crates/compiler/solve/src/lib.rs +++ b/crates/compiler/solve/src/lib.rs @@ -1,4 +1,4 @@ -//! The entry point of Roc's [type inference](https://en.wikipedia.org/wiki/Type_inference) +//! The entry point of Roc's [type inference](https://en.wikipedia.org/wiki/Type_inference) //! system. Implements type inference and specialization of abilities. #![warn(clippy::dbg_macro)] // See github.com/roc-lang/roc/issues/800 for discussion of the large_enum_variant check. diff --git a/crates/compiler/test_gen/src/lib.rs b/crates/compiler/test_gen/src/lib.rs index c2dc85bd5a..c8b6a6d6e6 100644 --- a/crates/compiler/test_gen/src/lib.rs +++ b/crates/compiler/test_gen/src/lib.rs @@ -1,4 +1,4 @@ -//! Contains all of Roc's [code generation](https://en.wikipedia.org/wiki/Code_generation_(compiler)) +//! Contains all of Roc's [code generation](https://en.wikipedia.org/wiki/Code_generation_(compiler)) //! tests. #[cfg(test)] pub mod helpers; diff --git a/crates/compiler/unify/src/lib.rs b/crates/compiler/unify/src/lib.rs index e45135b693..d01b69174f 100644 --- a/crates/compiler/unify/src/lib.rs +++ b/crates/compiler/unify/src/lib.rs @@ -1,4 +1,4 @@ -//! Implements Roc's unification algorithm, the heartstone of Roc's +//! Implements Roc's unification algorithm, the heartstone of Roc's //! [type inference](https://en.wikipedia.org/wiki/Type_inference). #![warn(clippy::dbg_macro)] // See github.com/roc-lang/roc/issues/800 for discussion of the large_enum_variant check. diff --git a/crates/docs/src/lib.rs b/crates/docs/src/lib.rs index da5a0d0725..2d181188a9 100644 --- a/crates/docs/src/lib.rs +++ b/crates/docs/src/lib.rs @@ -1,4 +1,4 @@ -//! Generates html documentation from Roc files. Used for +//! Generates html documentation from Roc files. Used for //! [roc-lang.org/builtins/Num](https://www.roc-lang.org/builtins/Num). extern crate pulldown_cmark; extern crate roc_load; diff --git a/crates/glue/src/lib.rs b/crates/glue/src/lib.rs index 18dfc1d2fd..ade8a7074c 100644 --- a/crates/glue/src/lib.rs +++ b/crates/glue/src/lib.rs @@ -1,6 +1,6 @@ -//! Generates code needed for platform hosts to communicate with Roc apps. -//! This tool is not necessary for writing a platform in another language, -//! however, it's a great convenience! Currently supports Rust platforms, and +//! Generates code needed for platform hosts to communicate with Roc apps. +//! This tool is not necessary for writing a platform in another language, +//! however, it's a great convenience! Currently supports Rust platforms, and //! the plan is to support any language via a plugin model. pub mod enums; pub mod load; diff --git a/crates/linker/src/lib.rs b/crates/linker/src/lib.rs index 9e8a86aa8d..b51b9703dd 100644 --- a/crates/linker/src/lib.rs +++ b/crates/linker/src/lib.rs @@ -1,7 +1,7 @@ -//! Surgical linker that links platforms to Roc applications. We created our own -//! linker for performance, since regular linkers add complexity that is not -//! needed for linking Roc apps. Because we want `roc` to manage the build -//! system and final linking of the executable, it is significantly less +//! Surgical linker that links platforms to Roc applications. We created our own +//! linker for performance, since regular linkers add complexity that is not +//! needed for linking Roc apps. Because we want `roc` to manage the build +//! system and final linking of the executable, it is significantly less //! practical to use a regular linker. use memmap2::{Mmap, MmapMut}; use object::Object; diff --git a/crates/wasi-libc-sys/src/lib.rs b/crates/wasi-libc-sys/src/lib.rs index ea9a0644ac..4e27008a83 100644 --- a/crates/wasi-libc-sys/src/lib.rs +++ b/crates/wasi-libc-sys/src/lib.rs @@ -1,4 +1,4 @@ -//! Provides a Rust wrapper for the WebAssembly test platform built on libc and +//! Provides a Rust wrapper for the WebAssembly test platform built on libc and //! is primarily used for testing purposes. // 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