[Haskell-cafe] Importing modules in GHCi
Artyom Kazak
artyom.kazak at gmail.com
Mon Jun 4 19:30:04 CEST 2012
Hi Café, I would greatly appreciate your help. Entering the following in
GHCi
produces an error message…
--> import Data.Time
--> getCurrentTime >>= print
<interactive>:1:20:
No instance for (Show UTCTime)
arising from a use of `print'
Possible fix: add an instance declaration for (Show UTCTime)
In the second argument of `(>>=)', namely `print'
In the expression: getCurrentTime >>= print
In an equation for `it': it = getCurrentTime >>= print
…but when I create a file with `import Data.Time` in it, and load the file
in GHCi,
everything works as expected.
Is it a bug in GHCi, or a feature? I’m using Haskell Platform 2012.2.0.1.
More information about the Haskell-Cafe
mailing list