Bas van Dijk <[email protected]> wrote:

> However I have no idea how to serialize the DiffTime stored in an
> UTCTime:
>
> instance Serialize DiffTime where
>     get = ?
>     put = ?

Note that DiffTime has this weird property that there is a Real
instance, so you have a toRational function. ;)

To go the other way you have a Fractional instance, so you also have
'fromRational'.


Greets,
Ertugrul

-- 
nightmare = unsafePerformIO (getWrongWife >>= sex)
http://ertes.de/

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to