diff options
Diffstat (limited to 'src/Counter.hs')
-rw-r--r-- | src/Counter.hs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Counter.hs b/src/Counter.hs index 0f3e0d9..bc23671 100644 --- a/src/Counter.hs +++ b/src/Counter.hs @@ -54,12 +54,15 @@ createSenateCounter f a b = do let prefs = parseRawLine a b t0 result = Maybe.fromJust prefs if (Maybe.isJust prefs) - then Vec.setPrefs prefStore n result >> readFunc (n + 1) (p + 1) + then Vec.setPrefs prefStore (p + 1) result >> readFunc (n + 1) (p + 1) else readFunc (n + 1) p p <- readFunc 1 0 IO.hClose h - return (SenateCounter prefStore b p) + return (SenateCounter + { prefData = prefStore + , ballotMap = b + , numBallots = p }) |