import Paths_mailbox_count ( version )
import Data.Version ( showVersion )
-import OptionalConfiguration ( OptionalConfiguration(..) )
+import OptionalConfiguration (
+ OptionalConfiguration(
+ OptionalConfiguration,
+ database,
+ detail,
+ detail_query,
+ host,
+ password,
+ port,
+ summary_query,
+ username )
+ )
description :: String
merge_optional )
where
-import System.Console.CmdArgs.Default ( Default(..) )
+import System.Console.CmdArgs.Default ( Default( def ) )
import qualified OptionalConfiguration as OC (
OptionalConfiguration(..),
{-# LANGUAGE DoAndIfThenElse #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
-module Main
+module Main ( main )
where
import Data.Maybe ( fromMaybe )
import Data.Monoid ( (<>) )
import Data.String.Utils ( join )
-import Database.HDBC ( SqlError(..), handleSql )
+import Database.HDBC ( SqlError( seNativeError, seErrorMsg ), handleSql )
import Database.HDBC.PostgreSQL ( connectPostgreSQL )
import Database.HDBC.Sqlite3 ( connectSqlite3 )
import System.Console.CmdArgs ( def )
import System.Directory ( doesFileExist )
import System.IO ( hPutStrLn, stderr )
import CommandLine ( get_args )
-import Configuration ( Configuration(..), merge_optional )
+import Configuration (
+ Configuration( host, port, username, password, database ),
+ merge_optional )
import qualified OptionalConfiguration as OC ( from_rc )
import Report ( report )
lookup )
import Data.Data ( Data )
import Data.Typeable ( Typeable )
-import Data.Monoid ( Monoid(..) )
-import Data.Semigroup ( Semigroup( (<>) ) )
+import Data.Monoid ( Monoid() )
+import Data.Semigroup ( Semigroup() )
import Paths_mailbox_count ( getSysconfDir )
import System.Directory ( getHomeDirectory )
import System.FilePath ( (</>) )
safeFromSql,
quickQuery )
import Database.HDBC.Sqlite3 ( connectSqlite3 )
-import System.Console.CmdArgs.Default ( Default(..) )
+import System.Console.CmdArgs.Default ( Default( def ) )
import Test.Tasty ( TestTree, testGroup )
import Test.Tasty.HUnit ( (@?=), testCase )
-import Configuration ( Configuration(..) )
+import Configuration ( Configuration( detail, detail_query, summary_query ) )
-- Type synonyms to make the signatures below a little more clear.
type Domain = String
-module Main
+module Main ( main )
where
-import Test.DocTest
+import Test.DocTest ( doctest )
import System.FilePath.Find ((==?), always, extension, find)
find_sources :: IO [FilePath]