-
Notifications
You must be signed in to change notification settings - Fork 26
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
fromVar should return an Either String a #30
Comments
Also note for decoding basic type the failure information returned isn't that useful, so this change might not be worth it.
|
Problem ==== - Handling `Maybe` values in the `Parser` monad is troublesome. - Even `envMaybe` mixes up variable-not-found-error with others, which makes it obscure to use both `Nothing` and `Left String` as its error. Solution ==== Change the error type of `Parser a` from just a `String` into a dedicated error ADT `ParseError`. NOTE ==== - Fix dmjio#30 as a bonus!
Problem ==== - Handling `Maybe` values in the `Parser` monad is troublesome. - Even `envMaybe` mixes up variable-not-found-error with others, which makes it obscure to use both `Nothing` and `Left String` as its error. Solution ==== Change the error type of `Parser a` from just a `String` into a dedicated error ADT `ParseError`. NOTE ==== - Fix dmjio#30 as a bonus!
Problem ==== - Handling `Maybe` values in the `Parser` monad is troublesome. - Even `envMaybe` mixes up variable-not-found-error with others, which makes the difference of `Nothing` and `Left String` obscure. Solution ==== Change the error type of `Parser a` from just a `String` into a dedicated error ADT `ParseError`. NOTE ==== - Fix dmjio#30 as a bonus!
Problem ==== - Handling `Maybe` values in the `Parser` monad is troublesome. - Even `envMaybe` mixes up variable-not-found-error with others, which makes the difference of `Nothing` and `Left String` obscure. Solution ==== Change the error type of `Parser a` from just a `String` into a dedicated error ADT `ParseError`. NOTE ==== - Fix dmjio#30 as a bonus!
I'm trying to use
which makes sense. So I implement Then I started wondering about the purpose of So long story short: the fact that |
@cideM we can change |
For more parse failure information, we should use the latest and greatest
readEither
function fromText.Read.readEither
.The text was updated successfully, but these errors were encountered: