-
Notifications
You must be signed in to change notification settings - Fork 329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Explicit Error Types #642
base: poc
Are you sure you want to change the base?
Explicit Error Types #642
Conversation
hey @anthonyjoeseph, it's been a while since this was opened. Is it still the direction of travel for the io-ts POC and (hopefully) next major version of it? Do you need any help with this? |
@cdimitroulas The next major iteration of a I don't plan to make changes to Once |
Closes #453, Closes #635
Completes the work started by @gcanti in the poc branch, which is explained at a high level here (by the author) and in the docs
As per the notes in the POC branch, all
Schemable
-related code has been moved into a separate repo called io-ts-contrib. It's registered under anthonyjoeseph's GitHub account, but ownership would ideally be transferred to a maintainer of io-ts(This PR is still a draft, pending the following)
TODO
LeafE
error types that are printable, and how to pattern match on errors (based on gcanti's explanation)io-ts-contrib TODO:
Guard
Arbitrary
JsonSchema
Type
Open Questions
Does io-ts 3.0.0 depend on fp-ts 3.0.0 still? (I thought I saw that somewhere but I can't find it now) Why?
Any way to use Kleisli to remove duplicate code between Decoders and TaskDecoders? Maybe through the help of multiple case-specific Applicative, Chain, Semigroup and/or Alt instances? (Or is this even worth doing?)
Why do decoders store their metadata at the value level? DecodeErrors make sense, that metadata is used for walking the tree, but what's the decoder stuff for?
Why was 'refine' originally removed from Decoder2? fromRefinement? (This PR adds
refinement
back in)Add Alt & Category instances for Decoder and TaskDecoder?
Decoder/TaskDecoder - input Ord instance for traversing? Or standardize "Ord.trivial"?
TaskDecoder - input Applicative instances? Or standardize "Task.parallel" (would probably be sufficient for e.g. graphql resolvers)?