[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
At
http://osdir.com/ml/haskell-cafe@haskell.org/2009-10/msg00197.html
I griped that the lack of Data-Derivable time values was causing me
headache in happstack.
In the proposed cabal package
http://patch-tag.com/r/tphyahoo/systemtimetypeable/snapshot/current/content/pretty/systemtimetypeable.cabal
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
values.
Anyways, I am interested in what others think and, of course, patches
and suggestions welcome.
thomas.
More information about the Haskell-Cafe
mailing list