Skip to content

Conversation

klao
Copy link
Contributor

@klao klao commented Aug 27, 2013

The library was failing tests on my 32 bits machine.

Two tests were failing:

  1. prop_showRead :: Day -> Bool. This is just because Day in Int64 internally and YearMonthDay has an Int as year. I limited the range of Days we test to Int.
  2. prop_parseTime. This is a real bug; you were parsing '%s' as an Int, which introduced a year 2038 bug to your code.

We did the debugging together with @errge.

@liyang
Copy link
Member

liyang commented Sep 1, 2013

I've pushed the part of that commit fixing the "%s" parsing in e2c96e6.

Trying to figure out if there are reasonable Bounded instances for YearMonthDay & UTCTime &c. (and reduce the range of the existing instance Bounded Day), such that all conversions between the assorted types do not overflow. I'm trying to avoid #ifdefs on word size... maybe that's not practical.

Perhaps the instance Arbitrarys should go into the library proper, since QuickCheck is already in the platform.

@errge
Copy link

errge commented Sep 1, 2013

Yes, this definitely fixed that issue, as can be seen in this build log:
https://api.travis-ci.org/jobs/10855175/log.txt?deansi=true

Thanks!

@liyang
Copy link
Member

liyang commented Sep 2, 2013

I'm working on getting the instance Arbitrarys into the library right now, and will release when I'm done, hopefully within a few days.

@errge
Copy link

errge commented Sep 5, 2013

https://travis-ci.org/errge/thyme/builds/11008259

The recent git commits make thyme build and test cleanly on both amd64 and i386 with GHC 7.6.3. I haven't tested other configurations.

@liyang
Copy link
Member

liyang commented Sep 6, 2013

I believe b88dc1e and 9bae6a0 (and I guess 4698e21) fixed the remaining issues. Thyme is now officially not Y294K-compliant, although we just need to switch the epoch from that of the MJD to fix that one, or move to 128-bit words…

@liyang liyang closed this Sep 6, 2013
tmcgilchrist referenced this pull request in tmcgilchrist/thyme Mar 11, 2023
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