Closed ddssff closed 1 year ago
Surely this is no more dangerous than instance Enum Integer
?
Prelude> fromEnum (10000000000000000000 :: Integer)
-8446744073709551616
I'm not sure how much of a comfort this is. In my personal experience the DiffTime instance has actually caused a problem that I had to track down.
Don't use fromEnum
I guess?
Not seeing a change to be made here.
As you probably know, there are 86,400,000,000,000,000 picoseconds in a day. This is a 57 bit integer, which is larger than the Int type on many machines. Therefore, when you say fromEnum diff you will get unpleasant results at most times of day.)
Output: