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

Enum.fromEnum{Int64} fails on 32-bit #132

Open
andreasbaumann opened this issue Dec 2, 2017 · 4 comments
Open

Enum.fromEnum{Int64} fails on 32-bit #132

andreasbaumann opened this issue Dec 2, 2017 · 4 comments
Labels

Comments

@andreasbaumann
Copy link

━━━ Test.Hedgehog.Text ━━━
  ✓ prop_show_append_size passed 100 tests.
  ✓ prop_tripping_append_size passed 100 tests.
  ○ 2/4 complete (running)
test: Enum.fromEnum{Int64}: value (-9223372036854775808) is outside of Int's bounds (-2147483648,2147483647)
Test suite test: FAIL
Test suite logged to: dist/test/hedgehog-0.5-test.log
0 of 1 test suites (0 of 1 test cases) passed.
@thumphries thumphries added the bug label Dec 6, 2017
@thumphries
Copy link
Member

Thanks for the report!

@andreasbaumann
Copy link
Author

Do I read the code correctly and the test tests a random number generator with a
64-bit only seed? So the library itself will not work on 32-bit and it's actually not just
the test which fails?

Anyway, what can be done in Haskell to write portable code?

@moodmosaic
Copy link
Member

I guess we could check SIZEOF_HSINT == 8. About fromEnum, see comments in #185 (comment) and #202.

@cheater
Copy link

cheater commented Aug 20, 2018

just happened to me, as well. Don't fromEnum an Int64. That's not what fromEnum is for!

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

No branches or pull requests

4 participants