Build dataflow programs with thin abstraction layers
Click ➕ New Spec or press Ctrl+N. Give your spec a name and optional type parameters.
Select your spec in the sidebar. Use the + Add buttons in the info panel to add input and output ports.
Double-click the canvas to enter design mode. Drag specs from the sidebar onto the canvas. Connect ports by clicking an output and then an input.
Click ▶ Run to execute. Enter input values and see the results!
💡 Tip: Try the pre-loaded specs Sum and Square to see working examples!
Types from above are sealed envelopes. A spec working with type T can't peek inside — it can only pass it around or use operations provided from outside.
Operations on abstract types come from outside via spec parameters. A [Combine: (a:T, b:T) → (sum:T)] parameter lets the caller provide the specific operation.
Each spec sees only one layer down. Sum uses add, but doesn't know how addition works internally.
Everything bottoms out at INDEX — a universal pair-based reference system. But most specs never see this level.
add(a, b) → sumsub(a, b) → diffmul(a, b) → productdiv(a, b) → quotmod(a, b) → remneg(x) → neg
eq(a, b) → Boolneq(a, b) → Boollt(a, b) → Boolgt(a, b) → Boollte(a, b) → Boolgte(a, b) → Bool
and(a, b) → Boolor(a, b) → Boolnot(x) → Boolselect(cond, t, f) → T
pair(a, b) → Pair<A,B>fst(p) → Asnd(p) → B
nil() → List<T>cons(head, tail) → Listhead(list) → Ttail(list) → List<T>is_empty(list) → Bool
dup(x) → (a, b)left(a) → OneOf<A,B>right(b) → OneOf<A,B>is_left(e) → Bool
Your DSL has been copied to clipboard. You can also copy or download below.
Bind each spec parameter to a primitive or spec that matches its signature.
A visual editor for exploring thin-layer abstraction
Specs marked with ★ are tutorial examples. Click them in order:
dupselectPress ? anytime for help