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

Change Number bounds from Int to Scientific. #18

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Change Number bounds from Int to Scientific. #18

wants to merge 1 commit into from

Conversation

tvh
Copy link
Contributor

@tvh tvh commented Nov 18, 2014

This allows validation on all values regardless of size of maxBound.

If this is merged, the code from PR #17 would change with sane bounds.

This allows validation on all values regardless of size of `maxBound`.
@hesselink
Copy link
Member

In principle this sounds good, I think. However, it seems the Show instance for Scientific is different from Int, in that it always prints with one decimal place (1.0 instead of 1). This will change e.g. the documentation generated by rest-gen, which might be confusing (seeing 1.0 for an integral type). @bergmark What do you think?

@bergmark
Copy link
Member

We have a floatingOrInteger check in rest-gen for dealing with this difference, does this change hit some other code path?

I'd prefer to have two AST items for floating and integral types. I use integrals pretty much exclusively with json-schema. It's a breaking change either way.

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.

3 participants