]> gitweb.michael.orlitzky.com - dead/htsn.git/blobdiff - src/OptionalConfiguration.hs
Move the Report, Logging, and Terminal modules into their own namespace.
[dead/htsn.git] / src / OptionalConfiguration.hs
index 3b663d0eff1a5e61cfaa1dfb5a8327494e2fc7a2..8790ca075943fe94a0f54e9d291a5c5cfc81b8c7 100644 (file)
@@ -34,9 +34,8 @@ import System.FilePath ( (</>) )
 import System.IO.Error ( catchIOError )
 import System.Log ( Priority(..) )
 
-import Logging ( log_error ) -- Can't import report_error from Main
-import Terminal ( display_error ) -- 'cause of circular imports.
-import TSN.FeedHosts ( FeedHosts(..) )
+import FeedHosts ( FeedHosts(..) )
+import Network.Services.TSN.Report ( report_error )
 
 
 -- Derive standalone instances of Data and Typeable for Priority. This
@@ -145,12 +144,10 @@ instance DCT.Configured Priority where
 from_rc :: IO OptionalConfiguration
 from_rc = do
   etc  <- catchIOError getSysconfDir (\e -> do
-                                        display_error (show e)
-                                        log_error (show e)
+                                        report_error (show e)
                                         return "/etc")
   home <- catchIOError getHomeDirectory (\e -> do
-                                           display_error (show e)
-                                           log_error (show e)
+                                           report_error (show e)
                                            return "$(HOME)")
   let global_config_path = etc </> "htsnrc"
   let user_config_path = home </> ".htsnrc"