[Haskell-cafe] Data.Time.Calendar.Day does not seem to have an instance for Read

C K Kashyap ckkashyap at gmail.com
Thu Mar 17 06:30:53 CET 2011


Hi,
I was wondering if this is a defect -

Prelude> import Data.Time.Calendar
Prelude Data.Time.Calendar> read "2011-10-10" :: Day

<interactive>:1:1:
    No instance for (Read Day)
      arising from a use of `read'
    Possible fix: add an instance declaration for (Read Day)
    In the expression: read "2011-10-10" :: Day
    In an equation for `it': it = read "2011-10-10" :: Day
Prelude Data.Time.Calendar>


The documentation says that  Day has an instance for Read.

Regards,
Kashyap
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20110317/6c49aaef/attachment.htm>


More information about the Haskell-Cafe mailing list