Purity ladder
| Mode | Callable from | Calls | Lowers to |
|---|---|---|---|
fn | any | fn, query | pure compute |
query | query, derive, mutate, check | fn, query | Cat1 + projection |
derive | derive, mutate (head population), check | fn, query | Cat1 (monotone) or Cat2 (NAF) |
check | observers only | fn, query | Cat3 (observer) |
mutate | host, other mutate | all five | side-effecting |
fn and query are cacheable on (args, state_version). derive is stratified fixpoint. mutate is transactional.