Prelude Compiler Boundary¶
Accepted
Accepted for the V1 compiler/prelude boundary; the exact prelude surface is tracked in Scope Backlog.
The compiler may assume the prelude exists when compiling ordinary Catalyst code, but it should not bake broad library behavior into sema. Sema recognizes language constructs and checks the contracts they lower to. The declarations and implementations for those contracts should remain visible to reflection and tooling.
Examples:
a == blowers throughPartialEq(RightType)a < blowers throughPartialOrd(RightType)a + blowers throughAdd(RightType, ResultType)-alowers throughNeg(ResultType)for item in xsresolvesIterable(Item)orIterator(Item)items[i]resolvesIndexable(T)Box(dyn Iterator(Item))works through normal prelude implementations plus compiler-provided dyn metadata
If a feature can be expressed as ordinary library code without affecting syntax, type checking, or core ownership semantics, it should start in std, not the prelude.