A Decoder<A> converts an unknown value into either a typed A or a
structural DecoderError. The shape (raw) => Either<DecoderError, A> is
the canonical FP decoder contract (cf. circe Decoder, fp-ts Decoder,
Effect-TS Schema.decodeUnknownEither, Elm Json.Decode.Decoder).
Any function matching this signature IS a decoder — there is no plugin
registration. Zod / TypeBox / Valibot / AJV / hand-rolled adapters are
~15 lines each. The bundled combinators in the Decoder value namespace
cover the functype-aware cases (Option, Either, List, etc.) that a
generic schema library cannot express.
A
Decoder<A>converts anunknownvalue into either a typedAor a structuralDecoderError. The shape(raw) => Either<DecoderError, A>is the canonical FP decoder contract (cf. circeDecoder, fp-tsDecoder, Effect-TSSchema.decodeUnknownEither, ElmJson.Decode.Decoder).Any function matching this signature IS a decoder — there is no plugin registration. Zod / TypeBox / Valibot / AJV / hand-rolled adapters are ~15 lines each. The bundled combinators in the
Decodervalue namespace cover the functype-aware cases (Option, Either, List, etc.) that a generic schema library cannot express.