diff options
author | Jed Barber <jjbarber@y7mail.com> | 2017-01-06 00:11:00 +1100 |
---|---|---|
committer | Jed Barber <jjbarber@y7mail.com> | 2017-01-06 00:11:00 +1100 |
commit | ed35d03fbdafce4d6d41d8731318304a8eb7ff61 (patch) | |
tree | 42a8fa732ae779a71db2561c93f63979cc4a5fe6 /src/main.hs | |
parent | a13d9db820d7cb83e9472e2cf387eb22c26d402d (diff) |
Ballot counting working, but results differ slightly from AEC counts
Diffstat (limited to 'src/main.hs')
-rw-r--r-- | src/main.hs | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/src/main.hs b/src/main.hs new file mode 100644 index 0000000..ecfec97 --- /dev/null +++ b/src/main.hs @@ -0,0 +1,44 @@ + + +import qualified System.Environment as Env +import qualified Senate as Sen +import qualified SenateTypes as Typ +import qualified Data.Maybe as Maybe + + + + +-- maps for NT Senate data +-- will be removed when candidate info parsing complete +above = [[1,2],[3,4],[5,6],[7,8],[9,10],[11,12],[13,14]] +below = [ "Pile, Jan" + , "Gimini, Jimmy" + , "Kavasilas, Andrew" + , "Jones, Timothy" + , "Campbell, Trudy" + , "Barry, Ian" + , "Connard, Michael" + , "Bannister, Kathy" + , "Scullion, Nigel" + , "Lillis, Jenni" + , "McCarthy, Malarndirri" + , "Honan, Pat" + , "Ordish, Carol" + , "Ordish, John" + , "Lee, TS" + , "Marshall, Tristan" + , "Ryan, Maurie Japarta" + , "MacDonald, Marney" + , "Strettles, Greg" ] + + + + +main = do + args <- Env.getArgs + counter <- Sen.createSenateCounter (head args) above below + let testTraces = map (:[]) (zip [1,1..] below) + theCounter = Maybe.fromJust counter + results = map (\x -> (Sen.doCount theCounter x) >>= (putStrLn . (((snd . head $ x) ++ " ") ++) . show)) testTraces + sequence_ results + |