import qualified TSN.XML.Injuries as Injuries ( Listing )
import qualified TSN.XML.InjuriesDetail as InjuriesDetail ( PlayerListing )
import qualified TSN.XML.News as News ( Message )
import qualified TSN.XML.Injuries as Injuries ( Listing )
import qualified TSN.XML.InjuriesDetail as InjuriesDetail ( PlayerListing )
import qualified TSN.XML.News as News ( Message )
-- | An arrow which parses the doctype "SYSTEM" of an 'XmlTree'.
-- We use these to determine the parser to use.
-- | An arrow which parses the doctype "SYSTEM" of an 'XmlTree'.
-- We use these to determine the parser to use.
- doctypeA :: ArrowXml a => a XmlTree DtdName
- doctypeA = getAttrl >>> hasName "doctype-SYSTEM" /> getText >>^ DtdName
+ dtdnameA :: ArrowXml a => a XmlTree DtdName
+ dtdnameA = getAttrl >>> hasName "doctype-SYSTEM" /> getText >>^ DtdName
-- | Combine the arrows above as well as the function below
-- (arrowized with 'arr') into an IO action that does everything
-- | Combine the arrows above as well as the function below
-- (arrowized with 'arr') into an IO action that does everything
| otherwise = \_ -> do -- Dummy arg simplifies the other cases.
let infomsg =
"Unrecognized DTD in " ++ path ++ ": " ++ dtd ++ "."
| otherwise = \_ -> do -- Dummy arg simplifies the other cases.
let infomsg =
"Unrecognized DTD in " ++ path ++ ": " ++ dtd ++ "."
report_info $ "Removed processed file " ++ path ++ "."
-- | Try to remove @path@ and potentially try again.
report_info $ "Removed processed file " ++ path ++ "."
-- | Try to remove @path@ and potentially try again.
(remove_and_report path) `catchIOError` exception_handler
where
-- | A wrapper around threadDelay which takes seconds instead of
(remove_and_report path) `catchIOError` exception_handler
where
-- | A wrapper around threadDelay which takes seconds instead of