[Haskell-cafe] Re: Sillyness in the standard libs.

Brandon S. Allbery KF8NH allbery at ece.cmu.edu
Thu Nov 29 13:11:14 EST 2007

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  
(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] allbery at kf8nh.com
system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university    KF8NH

More information about the Haskell-Cafe mailing list