diff --git a/design/contracts/data-model.md b/design/contracts/data-model.md index 8617aaf..c15fdae 100644 --- a/design/contracts/data-model.md +++ b/design/contracts/data-model.md @@ -25,7 +25,13 @@ contract is what makes growing the schema cheap. ### Def `kind ∈ { "fn", "const", "type", "class", "instance" }`. All five -are real surface forms. +are real surface forms. Class and type cross-module references +(canonical-form rule, qualified `.` / +`.`) follow the scoping rule in +[memory model](memory-model.md); the `class`/`instance` schema +narrative — defaults, superclasses, diagnostics — lives in +[typeclasses](typeclasses.md). Exported `fn` defs interact with +[embedding ABI](embedding-abi.md). ```jsonc // fn (the unit that gets a content hash) @@ -201,6 +207,11 @@ Patterns are linear: each pattern variable may appear at most once. ### Type +The `Type::Con.name` canonical-form rule (bare for same-module / +primitives, qualified `.` for cross-module) lives +in [memory model](memory-model.md); `Type::Fn`'s parameter-mode +metadata is defined and gated there as well. + ```jsonc // Type-constructor application. `args` omitted when empty // (hash-stable when omitted, for non-parameterised cases like Int, Bool, ...). diff --git a/design/contracts/str-abi.md b/design/contracts/str-abi.md index bedd5a7..dc8daeb 100644 --- a/design/contracts/str-abi.md +++ b/design/contracts/str-abi.md @@ -5,8 +5,8 @@ The runtime ships a small family of operations that produce or transform heap-allocated `Str` values uniformly across static-Str and heap-Str inputs (the consumer ABI is identical between -realisations — see §"Str ABI"). All take their input(s) by `borrow` -and return an owned `Str`. Each is registered as a builtin in +realisations — see the Str ABI table below). All take their +input(s) by `borrow` and return an owned `Str`. Each is registered as a builtin in `crates/ailang-check/src/builtins.rs`, lowered inline in `crates/ailang-codegen/src/lib.rs::lower_app` to a `call ptr @ailang_`, and backed by a `runtime/str.c` C helper.