[Haskell-cafe] Data.Time.Calendar.Day does not seem to have an instance for Read
aslatter at gmail.com
Thu Mar 17 06:47:44 CET 2011
On Thu, Mar 17, 2011 at 12:30 AM, C K Kashyap <ckkashyap at gmail.com> wrote:
> I was wondering if this is a defect -
> Prelude> import Data.Time.Calendar
> Prelude Data.Time.Calendar> read "2011-10-10" :: Day
> 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>
I see the same problem with GHC 7.0.2, time-126.96.36.199.
Does it work if you use it in a Haskell source file, instead of GHCi?
> The documentation says that Day has an instance for Read.
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
More information about the Haskell-Cafe