[Haskell-cafe] systemtimmetypeable: Workaround for lack of deriveable data instance in either System.Time or Data.Time.

Thomas Hartman tphyahoo at gmail.com
Mon Oct 19 17:00:36 EDT 2009



I griped that the lack of Data-Derivable time values was causing me
headache in happstack.

In the proposed cabal package


I submit a workaround that, while probably not the ideal thing, has
proved helpful to me.

Basically, I use the type MyTime, which is data-deriveable, when
working with Macid in happstack; and convert from System.Time and/or
Data.Time with the accompanying utility functions when necessary.
Perhaps the utility functions are useful on their own as well. I found
it surprisingly hard to get from Data.Time values to System.Time

Anyways, I am interested in what others think and, of course, patches
and suggestions welcome.


More information about the Haskell-Cafe mailing list