transition(id, "x") needs every edge into x in the frame
Pitfall 30 of writing Soma, the programming language: a habit from another language, or a rule that surprises, with what the Soma compiler answers and the form to write.
skeleton Desk {
state ticket {
initial: new
new -> resolved
resolved -> closed
new -> closed
}
face { signal close(id: String) -> String moves resolved -> closed }
}
flesh Desk {
on close(id) { transition(id, "closed") return "closed" }
}
// error: `Desk.close` calls `transition(id, "closed")` without saying from where, so it also
// takes `new -> closed` — outside its frame (`moves resolved -> closed`)skeleton Desk {
state ticket {
initial: new
new -> resolved
resolved -> closed
new -> closed
}
face { signal close(id: String) -> String moves resolved -> closed }
}
flesh Desk {
on close(id) { transition(id, "resolved", "closed") return "closed" }
}Name the source (three arguments), or list every edge into the target (moves resolved -> closed, new -> closed, or moves * -> closed).