diff options
author | Jed Barber <jjbarber@y7mail.com> | 2017-01-23 19:41:29 +1100 |
---|---|---|
committer | Jed Barber <jjbarber@y7mail.com> | 2017-01-23 19:41:29 +1100 |
commit | 37180398da12c35e028f0f08635814be30bb6ab5 (patch) | |
tree | 3ec2de0f9538574ab455f70128d60eab7ee0fd32 /src/main.hs | |
parent | c95d1cc837f09c3a8b79ed03b6ab9076b37e61c0 (diff) |
Verbosity now outputs to stderr
Diffstat (limited to 'src/main.hs')
-rw-r--r-- | src/main.hs | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/main.hs b/src/main.hs index b0baaa4..8cec703 100644 --- a/src/main.hs +++ b/src/main.hs @@ -4,6 +4,7 @@ import qualified System.Environment as Env import qualified System.Console.GetOpt as Opt import qualified System.Exit as Ex import qualified System.Directory as Dir +import qualified System.IO as IO import qualified Control.Monad as Con import qualified Data.Maybe as Maybe import qualified Counter as Sen @@ -174,18 +175,19 @@ main = do -- set up the election processing + Con.when (isVerbose options) $ IO.hPutStrLn IO.stderr "Reading candidate data..." (aboveBallot, belowBallot) <- Cand.readCandidates candidateFile state - Con.when (isVerbose options) $ putStrLn "Reading preference data..." + Con.when (isVerbose options) $ IO.hPutStrLn IO.stderr "Reading preference data..." counter <- Sen.createSenateCounter preferenceFile aboveBallot belowBallot - Con.when (isVerbose options) $ putStrLn "Done.\n" + Con.when (isVerbose options) $ IO.hPutStrLn IO.stderr "Done.\n" Dir.createDirectory outputDir - Con.when (isVerbose options) $ putStrLn "Setting up election..." + Con.when (isVerbose options) $ IO.hPutStrLn IO.stderr "Setting up election..." election <- Elt.createElection outputDir counter numToElect (isVerbose options) - Con.when (isVerbose options) $ putStrLn "Done.\n" + Con.when (isVerbose options) $ IO.hPutStrLn IO.stderr "Done.\n" -- run the show - Con.when (isVerbose options) $ putStrLn "Running...\n" + Con.when (isVerbose options) $ IO.hPutStrLn IO.stderr "Running...\n" Elt.doCount election |