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

Parse Scientific directly, avoiding loss in precision. #68

Merged
merged 2 commits into from
Sep 6, 2015

Conversation

bitonic
Copy link
Collaborator

@bitonic bitonic commented Sep 3, 2015

For example, before:

λ> Yaml.decode "x: 9.78159610558926e-5" :: Maybe Yaml.Value
Just (Object (fromList [("x",Number 9.781596105589261e-5)]))

after:

λ> Yaml.decode "x: 9.78159610558926e-5" :: Maybe Yaml.Value
Just (Object (fromList [("x",Number 9.78159610558926e-5)]))

@bitonic bitonic force-pushed the fix-number-parsing branch 3 times, most recently from 5d12bcb to db243c7 Compare September 3, 2015 23:10
@@ -63,6 +63,7 @@ library
other-modules:
Data.Yaml.Internal
ghc-options: -Wall
c-options: -w
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this change related?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, sorry about that.

For example, before:

    λ> Yaml.decode "x: 9.78159610558926e-5" :: Maybe Yaml.Value
    Just (Object (fromList [("x",Number 9.781596105589261e-5)]))

after:

    λ> Yaml.decode "x: 9.78159610558926e-5" :: Maybe Yaml.Value
    Just (Object (fromList [("x",Number 9.78159610558926e-5)]))
...making sure that it includes `scientific`.
snoyberg added a commit that referenced this pull request Sep 6, 2015
Parse `Scientific` directly, avoiding loss in precision.
@snoyberg snoyberg merged commit eb8b0c7 into snoyberg:master Sep 6, 2015
snoyberg added a commit that referenced this pull request Sep 6, 2015
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 this pull request may close these issues.

None yet

2 participants