verify :: XmlTree -> IO ImportResult
verify xml = do
let root_element = unpickleDoc xpickle xml :: Maybe Message
- case root_element of
- Nothing -> return $ Err "Could not unpickle document in import_generic."
- Just _ -> return $ Info "Heartbeat received."
+ return $ case root_element of
+ Nothing -> ImportFailed "Could not unpickle document in import_generic."
+ Just _ -> ImportSkipped "Heartbeat received. Thump."
-- * Tasty Tests
heartbeat_tests :: TestTree