Face contracts (compile-time checked)
Face contracts (compile-time checked), in the reference of the Soma programming language (soma 3.2.4). A block marked ✓ is a whole program that soma check accepts; the others are excerpts.
As shown, this does not compile: soma check reports face contract: signal 'create' declared in cell 'API' has no handler
(E0003).
cell API {
face {
signal create(name: String) -> Map // MUST have matching handler
signal delete(id: String) // MUST have matching handler
promise all_persistent // structural check: all_persistent,
// all_encrypted, all_consistent,
// has_memory, has_face, has_signals,
// has_auth — any other name is refused
promise "human-readable description" // a note (not checked)
}
// Missing handler for 'delete' → compile error
}