Effect in practice
3 posts, in reading order. Drafts are previews until they ship.
- 1 Where exceptions are allowed to exist Failures are values everywhere inside; exceptions survive only at the adapter boundary, under Effect.try. An audit of my own codebase, with the diffs.
- 2 Make the compiler tell your ids apart: a guide to branded types To the type checker, every id and path in your domain is the same primitive — and that is a bug it should have caught. Branded types in Effect give them distinct identities that erase on encode: no migration, just compile errors at the call sites that were always wrong.
- 3 The model will find the fourth shape: property-based testing with fast-check Property-based testing for mapping code: fast-check via Effect, with generators derived from your schemas.