These are the libraries Constructive Programming has built in the open — code that puts the methodology into production, and the research artefacts that justify the methodology in the first place. Each one is independently versioned at github.com/Constructive-Programming.
cats-eo
Existential optics for Scala 3, built on cats.
One Optic[S, T, A, B, F] trait unifies Lens, Prism, Optional, Traversal, Grate, AlgLens and Kaleidoscope. Discipline-checked laws, scoverage-driven quality, JMH benchmarks against Monocle, and circe + avro integrations with an observable-by-default Ior failure surface.
surreals
Conway's surreal numbers as a cats-algebra Field.
A small Scala 3 exploration of surreal numbers, encoded with droste recursion schemes (Fix[SurrealStructure]) and memoised with scaffeine. Discipline laws under test.
scala-cardinality
Counting type inhabitants — keep your types small.
A type-cardinality calculator for Scala ADTs (|T| over +, *, ^), plus a scalafix rule that flags sum types used as function arguments. Backs the "Keep Your Types Small" argument with code.
cats-eo is the flagship: an existential-optics library for Scala 3 with discipline-checked laws, JMH benchmarks against Monocle, and circe + avro integrations. It is what we reach for when a client needs the same lens to work over an in-memory record, a JSON byte buffer, and an Avro wire payload — and when they need that lens to keep its laws under change.
scala-cardinality is the research artefact behind the Total Program Cardinality thesis — the metric that counts the inhabitants of an ADT and informs the narrowing work we do on client codebases. surreals is an algebraic exploration of Conway’s surreal numbers using cats algebra and droste recursion schemes; it is the proving ground for the recursion-scheme techniques that show up later in production pipelines.
The home page introduces a fourth, longer-running output: Fixed — a new functional language being designed around the same constructive principles. Phase 0 of that design is in flight; the implementation will follow.
Working with us
If your team is putting optics, effects, or typed-FP into production, or moving toward agent-native development with constructive guardrails, book a 30-minute scoping call or email consulting@constructive.dev. The libraries above are the ground we stand on; the consulting offer is how we bring it to your codebase.