where
-- System imports.
+import Data.Time.Clock ( UTCTime )
import Data.Tuple.Curry ( uncurryN )
import Test.Tasty ( TestTree, testGroup )
import Test.Tasty.HUnit ( (@?=), testCase )
-- Local imports.
import TSN.DbImport ( ImportResult(..) )
+import TSN.Picklers ( xp_time_stamp )
import Xml ( pickle_unpickle, unpickleable )
Message {
xml_file_id :: Int,
heading :: String,
- time_stamp :: String }
+ time_stamp :: UTCTime }
deriving (Eq, Show)
xpWrap (from_tuple, to_tuple) $
xpTriple (xpElem "XML_File_ID" xpInt)
(xpElem "heading" xpText)
- (xpElem "time_stamp" xpText)
+ (xpElem "time_stamp" xp_time_stamp)
where
from_tuple = uncurryN Message
to_tuple m = (xml_file_id m,