1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
import qualified System.Environment as Env
import qualified Senate as Sen
import qualified SenateTypes as Typ
import qualified Data.Maybe as Maybe
-- this is all messy test code
-- 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" ]
above2 = [[1,2],[3,4],[5,6],[7,8],[9,10],[11,12],[13,14],[15,16],[17,18],[19,20]]
below2 = [ "Donnelly, Matt"
, "Hennings, Cawley"
, "Edwards, David"
, "Mihaljevic, Denis"
, "Gallagher, Katy"
, "Smith, David"
, "O'Connor, Sandie"
, "Wyatt, Jess"
, "Haydon, John"
, "Tye, Martin"
, "Seselja, Zed"
, "Hiatt, Jane"
, "Field, Deborah"
, "Montagne, Jessica"
, "Hobbs, Christina"
, "Wareham, Sue"
, "Kim, David William"
, "Tadros, Elizabeth"
, "Bailey, Steven"
, "Swan, Robbie"
, "Hay, Michael Gerard"
, "Hanson, Anthony" ]
main = do
args <- Env.getArgs
counter <- Sen.createSenateCounter (head args) above below
let testTraces = (map (:[]) (zip [1,1..] below))
results = map (\x -> putStrLn . (((snd . head $ x) ++ " ") ++) . show . (Sen.doCount counter) $ x) testTraces
sequence_ results
|