summaryrefslogtreecommitdiff
path: root/src/SenateTypes.hs
blob: 3691034633f1cbdca5cf79508190d8c441a8d477 (plain)
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
module SenateTypes(
    Ranking,
    Position,
    CandidateID,
    AboveLineBallot,
    BelowLineBallot,
    Criteria
    ) where




--  fairly obvious, rankings, positions and candidateIDs are all numbers
type Ranking = Int
type Position = Int
type CandidateID = String



--  positions in the uppermap list correspond to the boxes above the line,
--  and the lists of candidateIDs are the boxes below the line
type AboveLineBallot = [[Position]]



--  a list of candidates in the order of how they were placed below the line
type BelowLineBallot = [CandidateID]



--  represents a criteria used for finding ballots that voted a specific
--  way, for example voted for candidate C as #1, candidate F as #2, etc
type Criteria = [(Ranking,CandidateID)]