Expressing Types as Values with Scalaz-Schema
summary
Scalaz-Schema presents a concrete Schema datatype that expresses ADTs as values and derives encoders like a JSON serializer without relying on compiler-driven implicit derivation (Shapeless Magnolia Scalaz-Deriving). It uses isomorphisms, recursion schemes, and a prim/type-level representation to enforce valid shapes at compile time, already produces working encoders for nested products sums and recursion, and outlines module support for Searcy and JSON4s plus a prototype for schema migrations.
AI-written summary · about
chapters (21)
- 0:00Start
- 1:12Encoders & Decoders
- 8:42Schema Datatype - The Function
- 10:13Schema Datatype - Primitives
- 12:19Products & Sums
- 13:32Schema Datatype - Product and Sums
- 14:47Schema Datatype Wrapping Schemas
- 17:20Schema Datatype - Fields/Branches
- 18:15Schema Datatype - Lists
- 18:56Schema Datatype - Recursion
- 19:34Round 1 Done! But there's still some problems
- 20:31Option Schemas
- 22:16Modules - Base SchemaModule
- 24:07Modules-The JSON Module
- 24:55Employee ADT
- 26:45Solution Approach
- 29:36Recursion Schemes - TL;DR
- 32:14Interpreters JSON Module
- 33:07Using Interpreters
- 34:15Future Plans
- 35:56The SchemaZ Team
related talks
36mAlgebraic DataTypes in Scala. Where is the algebra? What other algebras are there?
39mJSONSchema as a runtime type system - Advanced concepts and practical uses
38mScalaJS and Typescript: an unlikely romance
46mAutomatic type class instance derivation with shapeless
55mThe Shape of Shapeless (Part 2)
31mCan I really type THAT in TypeScript!?
39mCommunicating in Types
39mEnd to end typing for web applications
