The sample program: 16 definitions covering every kind. It is used by the tests, the conformance suite,
sophia sampleand the Moonkale sample store (SPEC-004 §9). Source:samples.rs.Sources: SPEC-003 Sophialang Core v0 §6. code:
samples.rs
The sample contains:
Nat(data);add(self-recursive);evenandodd(mutually recursive);todo(a hole);norm(an unresolvedmath.sqrt);- the relations
parentandancestor, with two rules (one weighted); - a test;
doubleonInt64, dispatching through the built-in generic+;peek(anUnsafe(memory)section);- a postulate;
- a struct layout;
- a constant.
builtin(name) derives intrinsic nominal ids for built-ins (Int64, +, ==, …), as Unison does with ##Nat.