mlms13 / bs-decode

Type-safe JSON decoding for ReasonML and OCaml
https://mlms13.github.io/bs-decode/docs/what-and-why
MIT License
103 stars 18 forks source link

Implement MonadThrow #120

Open mlms13 opened 1 year ago

mlms13 commented 1 year ago

While it's probably not a super common use case, it would make sense to add a throw function that constructs a decoder that always fails with the given error. This is the error version of pure.