[Haskell-cafe] Sillyness in the standard libs.
Brandon S. Allbery KF8NH
allbery at ece.cmu.edu
Mon Nov 19 16:43:38 EST 2007
On Nov 19, 2007, at 16:06 , Arthur van Leeuwen wrote:
> here is a puzzle for you: try converting a
> System.Posix.Types.EpochTime into either a
> System.Time.CalendarTime or a Data.Time.Clock.UTCTime without going
> read . show or a similar detour through strings.
fromEnum and/or toEnum are helpful for this kind of thing, and I am
occasionally tempted to bind "cast = toEnum . fromEnum" because I
need it so much.
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