soma.cell

Programs using a sum type

9 verified Soma programs that use a sum type. Start from one of these when you write a program that needs it.

ProgramLinesUses
Agent lifecycle typed against a sum type — typos become compile errors57a state machine, an agent cell, a sum type, match
Trade settlement as a sum type58a sum type, match
Order records with nested line-items, computed totals, and a state machine over the order lifecycle58a state machine, a sum type, pipes (|>), lambdas
Refund agent — an LLM decides, the language decides what it may do162a state machine, a memory invariant, an agent cell, a sum type, LLM calls (think), match, try / catch, guard blocks, require / fail, a cost bound, tools
Document editorial workflow with a typed (sum-type) state machine59a state machine, a sum type
A media-player transport state machine57a state machine, a sum type
Order lifecycle as a typed state machine58a state machine, a sum type
A simplified TCP connection state machine (active-open path)58a state machine, a sum type
Todo service backed by a typed state machine (sum type TodoStatus)82a state machine, a sum type, HTTP routes, match