On Nov 29, 2007, at 12:12 , Arthur van Leeuwen wrote:

Going through Rational is the right solution, though. My hackish
detour was to use fromIntegral . toInteger . fromEnum

?? fromEnum produces an Int, which is an Integral such as fromIntegral requires; why is toInteger needed?

Yes, that would be good! Note that both the docs for DiffTime and EpochTime state that they contain seconds, and both are somewhat unclear as to whether they contain any
higher precision than whole seconds.

(a) Whether EpochTime contains higher precision than seconds is system-dependent. (b) Use of a non-Integral type for EpochTime does not necessarily mean it has higher resolution than seconds.

(Blame POSIX for both of these. Haskell's System.POSIX must deal, as must any other POSIX-compliant library.)

--
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] [EMAIL PROTECTED]
system administrator [openafs,heimdal,too many hats] [EMAIL PROTECTED]
electrical and computer engineering, carnegie mellon university    KF8NH


_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to