I was trying to convert a SqlValue
into UTCTime
like this:
import Database.HDBC import Data.Time (UTCTime) getUTCTimeFromSql :: SqlValue -> UTCTime getUTCTimeFromSql time = fromSql time :: UTCTime
But GHC complains that I'm missing a Convertible
instance to do this:
No instance for (Data.Convertible.Base.Convertible SqlValue UTCTime) arising from a use of `fromSql' Possible fix: add an instance declaration for (Data.Convertible.Base.Convertible SqlValue UTCTime) In the expression: fromSql time :: UTCTime In an equation for `getUTCTimeFromSql': getUTCTimeFromSql time = fromSql time :: UTCTime
When I look at the HDBC source code, the instance for UTCTime
is there.
Am I missing something?