From a13d9db820d7cb83e9472e2cf387eb22c26d402d Mon Sep 17 00:00:00 2001 From: Jed Barber Date: Tue, 3 Jan 2017 23:38:20 +1100 Subject: Initial commit --- src/senatetypes.hs | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/senatetypes.hs (limited to 'src/senatetypes.hs') diff --git a/src/senatetypes.hs b/src/senatetypes.hs new file mode 100644 index 0000000..23ef738 --- /dev/null +++ b/src/senatetypes.hs @@ -0,0 +1,28 @@ +module SenateTypes( + CandidateID, + UpperLowerMap + ) where + + + +-- fairly obvious, rankings and candidateIDs are both numbers +type Ranking = Int +type CandidateID = Int + + + +-- positions in the uppermap list correspond to the boxes above the line, +-- and the lists of candidateIDs are the boxes below the line +type UpperMap = [[CandidateID]] + + + +-- merely a list in the order of how candidates were placed below the line +type LowerMap = [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 Trace = [(Ranking,CandidateID)] + -- cgit