[Haskell-cafe] Sillyness in the standard libs.

Henning Thielemann lemming at henning-thielemann.de
Mon Nov 19 16:50:35 EST 2007


On Mon, 19 Nov 2007, Brandon S. Allbery KF8NH wrote:

> 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
> > through
> > 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.

Really? I'd like to know which examples these are. So far I suspected that
'cast' indicates not well chosen types.


More information about the Haskell-Cafe mailing list