aboutsummaryrefslogtreecommitdiff
path: root/cmd/Main/Input.hs
blob: 008d0190dc06a6fbd863694b9d5e1405945c0375 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{-
This modules describes input data for the command line utlity.
-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}

module Main.Input
  ( Input(..)
  ) where

import GHC.Generics (Generic)

import Data.Aeson (FromJSON)

import Malodivo.Types.Bill (Bill)
import Malodivo.Types.District (DistrictInfo)
import Malodivo.Types.Ministry (MinistryInfo)

data Input = Input
  { bills :: [Bill] -- ^ bills requiring funding.
  , districts :: [DistrictInfo] -- ^ funds districts can provide.
  , ministries :: Maybe [MinistryInfo] -- ^ maximum funds ministries can get.
  } deriving (Generic, FromJSON)