From: Colin P. A. <co...@co...> - 2009-09-29 00:52:14
|
>>>>> "Justin" == Justin Bailey <jgb...@gm...> writes: Justin> On Mon, Sep 28, 2009 at 12:33 PM, Colin Paul Adams Justin> <co...@co...> wrote: >> If I look there, I see Data.Time.Clock.UTCTime, which I guess >> is what you are referring to in the line above. But if I try to >> write such a record with: >> >> ct <- getCurrentTime DB.insert db IT.imageTable (<snip> # >> IT.uploadTime <<- ct) >> >> the compiler complains: >> >> Couldn't match expected type `System.Time.CalendarTime' >> against inferred type `UTCTime' In the second argument >> of `(<<-)', namely `ct' In the second argument of `(#)', >> namely `IT.uploadTime <<- ct' >> >> How do I control this with a signature? Justin> Can you send the type definition for ImageTable (aliased Justin> as IT in your code)? That will help me answer your Justin> question. -- | Relative URIs for various sized images imageTable :: TInfo imageTable = TInfo {tname = "imageTable", cols = [indexColumn, captionColumn, thumbnailColumn, previewColumn, originalColumn, uploadTimeColumn]} captionColumn :: CInfo captionColumn = CInfo {cname = "caption", descr = (StringT, False)} indexColumn :: CInfo indexColumn = CInfo {cname = "indexNumber", descr = (IntegerT, False)} thumbnailColumn :: CInfo thumbnailColumn = CInfo {cname = "thumbnail", descr = (StringT, False)} previewColumn :: CInfo previewColumn = CInfo {cname = "preview", descr = (StringT, False)} originalColumn :: CInfo originalColumn = CInfo {cname = "original", descr = (StringT, True)} uploadTimeColumn :: CInfo uploadTimeColumn = CInfo {cname = "uploadTime", descr = (CalendarTimeT, False)} -- Colin Adams Preston Lancashire |