design/ + source rustdoc: replace opaque shorthand with content phrases + links
Reader-facing prose and rustdoc carried opaque shorthand like
"Decision 10", "clause-5", "mq.1", "ct.1", "eob.1", "rpe.1",
"post-mq.3", and "Iter 22b.1:" with no in-repo definition the reader
could follow. This commit replaces every such occurrence in the
durable tier the reader is most likely to land on (design/ ledger +
source //! module headers + the central /// public-item rustdoc) with
an inline content phrase plus, where applicable, a Markdown link to
the file that defines the referenced concept.
design/ ledger — 16 files:
Definition-site headings demoted from "Decision N: <title>" to
"<title>": authoring-surface, tail-calls, memory-model section in
rc-uniqueness.md, dual-allocator section, typeclass design,
effects "pure core + algebraic effects".
Cross-reference sites: "Decision 1" -> canonical-schema principle
(data-model); "Decision 3/4" -> effects + scope-boundaries; "Decision
6" -> authoring-surface; "Decision 8" -> tail-calls; "Decision 9" ->
rc-uniqueness (dual-allocator); "Decision 10" -> memory-model;
"Decision 11" -> typeclasses (model). "clause-5" -> body-link
durability gate. "clause-3" (in language-constraints) ->
bug-class-reintroduction discriminator. "mq.1/2/3", "ct.1/4",
"eob.1", "rpe.1" -> the canonical-form rule / the type-driven
dispatch / the Str carve-out / etc. "post-mq.3" -> "type-driven".
design/contracts/feature-acceptance.md: file-local "clauses 1/2/3"
-> "criteria 1/2/3" (sprachliche Kohärenz mit der File-Überschrift
"Feature-acceptance criterion"); "the clause-3 mechanism" -> "the
bug-class-reintroduction discriminator".
Source //! module headers — 24 files:
Stripped "Iter X.Y:" prefixes and "(Decision N)" / "(mq.X)" tags
from spec_drift, uniqueness, reuse_shape, migrate_canonical_types,
typeclass_22b{2,3,c}, suppress_filter, lift, mono, linearity,
diagnostic, method_dispatch_pin, method_collision_pin,
no_per_type_print_ops, mq3_multi_class_e2e, print_mono_body_shape,
print_no_leak_pin, cli_diag_human_workspace_load_error,
ct1_check_cli, prose snapshot, unbound_in_instance_method_pin,
mono_xmod_ctor_pattern, desugar.
Central /// public-item rustdoc:
ast.rs (full sweep — every "Iter X" + "Decision N" prefix
reformulated; mode/Type::Fn rustdoc now points at memory-model.md;
Constraint / SuperclassRef / InstanceDef / ClassDef rustdoc points
at typeclasses contract).
diagnostic.rs (all "(Iter X)" / "(mq.X)" tags on diagnostic codes
removed).
lib.rs (FORM_A_SPEC rustdoc points at authoring-surface.md
instead of "Decision 6").
canonical.rs (type_hash + Float-literal rustdoc).
Still outstanding (for a follow-up commit): ~500 inline `//`
code-body comments with `Iter X.Y` markers across the workspace, and
a handful of `///` rustdoc items in hash_pin / workspace_pin / lift /
mono / suppress_filter test-pin and internal-function bodies. Code
identifiers (test filenames like `mq3_multi_class_e2e.rs`, function
names like `iter18e_drop_iterative_default_preserves_hashes`) stay
verbatim per the user's "code identifiers stay verbatim" rule.
Tests: design_index_pin 5/5 + docs_honesty_pin 5/5; workspace builds
clean; full `cargo test --workspace` previously green (every
`test result: ok` line, no FAILED line).
This commit is contained in:
@@ -39,7 +39,7 @@
|
||||
//! - `module-cycle` — workspace loader (Iter 5b, in the CLI path)
|
||||
//! - `module-name-mismatch` — workspace loader (Iter 5b, in the CLI path)
|
||||
//! - `module-hash-mismatch` — workspace loader (Iter 5b, in the CLI path)
|
||||
//! - `tail-call-not-in-tail-position` (Iter 14e, see Decision 8)
|
||||
//! - `tail-call-not-in-tail-position` (see `design/contracts/tail-calls.md`)
|
||||
//! - `use-after-consume` — `ctx`: `{"binder": "<n>"}` (Iter 18c.2);
|
||||
//! carries non-empty [`Diagnostic::suggested_rewrites`] showing how to
|
||||
//! spell the fix in form-A AILang.
|
||||
@@ -61,38 +61,38 @@
|
||||
//! the build refuses it. Note that an invalid suppression does NOT
|
||||
//! suppress its target diagnostic — the original still fires
|
||||
//! alongside this error.
|
||||
//! - `missing-constraint` (Iter 22b.2) — `severity: error`. Emitted
|
||||
//! - `missing-constraint` — `severity: error`. Emitted
|
||||
//! by the per-fn typecheck arm when a polymorphic `FnDef` calls a
|
||||
//! class method (e.g. `show x` where `x: a`) but its declared
|
||||
//! `Forall.constraints` (after one-step superclass expansion) does
|
||||
//! not include the residual class constraint. `ctx`:
|
||||
//! `{"class": "<C>", "method": "<m>", "at_type": "<a>"}`. Concrete-
|
||||
//! type residuals are deferred to the `no-instance` diagnostic.
|
||||
//! - `no-instance` (Iter 22b.2) — `severity: error`. Emitted by the
|
||||
//! - `no-instance` — `severity: error`. Emitted by the
|
||||
//! per-fn typecheck arm when a class-method call resolves the class
|
||||
//! param to a fully-concrete type that has no matching entry in the
|
||||
//! workspace instance registry (`(class, canonical-type-hash)`).
|
||||
//! Dual of `missing-constraint`: when the residual is concrete, the
|
||||
//! fn cannot push the obligation to a caller, so an existing
|
||||
//! instance is the only way to discharge it. `ctx`:
|
||||
//! `{"class": "<C>", "method": "<m>", "at_type": "<T>"}`. mq.2 adds
|
||||
//! an optional `candidate_classes` field when the residual originated
|
||||
//! from the multi-candidate dispatch path; absent on single-class
|
||||
//! residuals (back-compat).
|
||||
//! - `ambiguous-method-resolution` (mq.2) — `severity: error`. Emitted
|
||||
//! `{"class": "<C>", "method": "<m>", "at_type": "<T>"}`. An
|
||||
//! optional `candidate_classes` field is added when the residual
|
||||
//! originated from the multi-candidate dispatch path; absent on
|
||||
//! single-class residuals (back-compat).
|
||||
//! - `ambiguous-method-resolution` — `severity: error`. Emitted
|
||||
//! by the type-driven dispatch resolver (or the discharge-time
|
||||
//! multi-candidate refinement) when a bare-method call site survives
|
||||
//! both type-driven and constraint-driven filtering with more than
|
||||
//! one candidate class. `ctx`: `{"method": "<m>", "at_type": "<T>",
|
||||
//! "candidate_classes": ["<C1>", ...]}`. The author disambiguates
|
||||
//! by writing `<ClassQualifier>.<method> x`.
|
||||
//! - `unknown-class` (mq.2) — `severity: error`. Emitted by the
|
||||
//! - `unknown-class` — `severity: error`. Emitted by the
|
||||
//! type-driven dispatch resolver when an explicit class qualifier
|
||||
//! in a `Term::Var.name` (e.g. `"prelude.Show.show"`) names a
|
||||
//! qualified class that is not in the workspace registry of
|
||||
//! candidate classes for the method. `ctx`:
|
||||
//! `{"name": "<qualified-class>"}`.
|
||||
//! - `class-method-shadowed-by-fn` (mq.3) — `severity: warning`.
|
||||
//! - `class-method-shadowed-by-fn` — `severity: warning`.
|
||||
//! Emitted by `synth`'s `Term::Var` arm when a name resolves to a
|
||||
//! free fn (locals / caller-module-fn / imported-fn) AND a class
|
||||
//! method of the same name also exists in the workspace. Fn
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//! Iter 16b.3: post-typecheck `Term::LetRec` lift.
|
||||
//! Post-typecheck `Term::LetRec` lift.
|
||||
//!
|
||||
//! Background. The 16a desugar pass (`ailang-core::desugar::desugar_module`)
|
||||
//! eliminates most `Term::LetRec` nodes by lifting them to synthetic
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//! Iter 18c.2: linearity check for fns whose every parameter mode is
|
||||
//! Linearity check for fns whose every parameter mode is
|
||||
//! explicit (`Borrow` or `Own`).
|
||||
//!
|
||||
//! ## Scope
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//! Workspace monomorphisation pass (introduced iter 22b.3; the
|
||||
//! free-fn entry was added in iter 23.4).
|
||||
//! Workspace monomorphisation pass — class-method entry plus
|
||||
//! free-fn entry.
|
||||
//!
|
||||
//! Slots into the build pipeline after [`crate::lift_letrecs`] and
|
||||
//! before `ailang_codegen::lower_workspace_with_alloc`. It is only
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//! Iter 18d.2: shape-compatibility check for `(reuse-as <var> <body>)`.
|
||||
//! Shape-compatibility check for `(reuse-as <var> <body>)`.
|
||||
//!
|
||||
//! ## Why this is its own pass
|
||||
//!
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//! Iter 19b: per-module post-process that consumes
|
||||
//! Per-module post-process that consumes
|
||||
//! [`ailang_core::ast::FnDef::suppress`] entries.
|
||||
//!
|
||||
//! For each `Def::Fn(f)` and each `Suppress { code, because }` in
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//! Iter 18c.3: uniqueness inference over the typed AST.
|
||||
//! Uniqueness inference over the typed AST.
|
||||
//!
|
||||
//! This pass classifies every binder of every fn body as either
|
||||
//! [`Uniqueness::Unique`] or [`Uniqueness::Shared`]. Unlike the
|
||||
|
||||
Reference in New Issue
Block a user