1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
//! Prelude vocabulary — names that are always in scope without an explicit
//! `use`. Mirrors the seed lists in `SymbolTable::seed_prelude`.
//!
//! Exposed so that tooling (vocab emitter, editor extensions, documentation)
//! can render the prelude without re-hardcoding it. The resolver's internal
//! constants remain the authoritative definition; these `pub` constants
//! simply forward them so both sources stay trivially in sync at compile
//! time (a single list edit touches both).
/// Prelude functions — global callables always available.
pub const PRELUDE_FUNCTIONS: & = &;
/// Prelude types — builtin type names.
///
/// `Ordering` is included because §18.2 lists it in the prelude (it is the
/// return type of `Comparable.compare`); its definition lives in
/// `core.compare` and is re-exported here name-wise.
pub const PRELUDE_TYPES: & = &;
/// Prelude enum variant constructors (`Optional`, `Result`, `Ordering`).
///
/// `Less`/`Equal`/`Greater` are the variants of `Ordering` (defined in
/// `core.compare`); §18.2 lists them in the prelude so user code can name them
/// without an import when implementing `compare` or matching a `cmp()` result.
pub const PRELUDE_CONSTRUCTORS: & =
&;
/// Prelude traits — standard-library traits always available.
///
/// Mirrors the §18.2 core-trait list (`Comparable`, `Equatable`, `Hashable`,
/// `Displayable`, `Serializable`, `Cloneable`, `Default`, `Into`, `From`,
/// `Iterator`, `Iterable`) plus the defined-in-`core` convert/error traits
/// `TryFrom` (from `core.convert`) and `Error` (from `core.error`), which the
/// prelude re-exports so user code can name them without an import. Traits
/// whose definitions live in an embedded `core.*` module (`Comparable`,
/// `Equatable`, `Into`, `From`, `TryFrom`, `Displayable`, `Error`) are also
/// seeded with their full method signatures in the type checker via
/// `bock_types::seed_prelude`; the rest (`Hashable`, `Serializable`,
/// `Cloneable`, `Default`, `Iterator`, `Iterable`) are name-level only until
/// their `core.*` definitions ship.
pub const PRELUDE_TRAITS: & = &;
/// Primitive type names.
pub const PRIMITIVE_TYPES: & = &;