Skip to content
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

Don't default to zero when parsing an empty string #15

Closed
jxv opened this issue Apr 9, 2019 · 2 comments · Fixed by #16
Closed

Don't default to zero when parsing an empty string #15

jxv opened this issue Apr 9, 2019 · 2 comments · Fixed by #16
Assignees

Comments

@jxv
Copy link
Contributor

jxv commented Apr 9, 2019

I expect this to return Nothing.

 > fromString "" :: Maybe (Fixed P100)
 (Just (fromString "0.00" :: PfromString "100"))

With a space it does.

 > fromString " " :: Maybe (Fixed P100)
 Nothing
@hdgarrood
Copy link
Contributor

This is behaviour inherited from purescript-bigints, which is in turn a basic wrapper around the npm package big-integer, where this appears to be the intended behaviour, so perhaps it does make sense to address this here.

@hdgarrood
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants