-- This file is part of hs-tax-ato
-- Copyright (C) 2020, 2021  Fraser Tweedale
--
-- hs-tax-ato is free software: you can redistribute it and/or modify
-- it under the terms of the GNU Affero General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-- GNU Affero General Public License for more details.
--
-- You should have received a copy of the GNU Affero General Public License
-- along with this program.  If not, see <http://www.gnu.org/licenses/>.

{-# LANGUAGE DataKinds #-}

-- | Tax tables for 2019–20 financial year.
module Data.Tax.ATO.FY.FY2020 (tables) where

import Control.Lens (review)

import Data.Tax
import Data.Tax.ATO.Common
import Data.Tax.ATO.PrivateHealthInsuranceRebate
import qualified Data.Tax.ATO.FY.FY2019 as FY2019

help :: (Fractional a, Ord a) => Tax (Money a) (Money a)
help :: forall a. (Fractional a, Ord a) => Tax (Money a) (Money a)
help = forall a.
(Fractional a, Ord a) =>
[(a, a)] -> Tax (Money a) (Money a)
thresholds'
  [ (a
45881, a
0.01)
  , (a
52974, a
0.01)
  , (a
56152, a
0.005)
  , (a
59522, a
0.005)
  , (a
63093, a
0.005)
  , (a
66878, a
0.005)
  , (a
70891, a
0.005)
  , (a
75145, a
0.005)
  , (a
79653, a
0.005)
  , (a
84433, a
0.005)
  , (a
89499, a
0.005)
  , (a
94869, a
0.005)
  , (a
100561, a
0.005)
  , (a
106594, a
0.005)
  , (a
112990, a
0.005)
  , (a
119770, a
0.005)
  , (a
126956, a
0.005)
  , (a
134573, a
0.005)
  ]

-- | From 1 July 2019, all study and training loans are covered by
-- one set of thresholds and rates.  For backwards compatibility,
-- 'ttHelp' and 'ttSfss' now refer to the same value.
--
tables :: (Ord a, Fractional a) => TaxTables 2020 a
tables :: forall a. (Ord a, Fractional a) => TaxTables 2020 a
tables = forall {k} (y :: k) a.
Tax (Money a) (Money a)
-> Tax (Money a) (Money a)
-> Tax (Money a) (Money a)
-> Tax (Money a) (Money a)
-> Tax (Money a) (Money a)
-> Tax (Money a) (Money a)
-> PrivateHealthInsuranceRebateRates a
-> TaxTables y a
TaxTables
  (forall {k} (y :: k) a. TaxTables y a -> Tax (Money a) (Money a)
ttIndividualIncomeTax forall a. (Ord a, Fractional a) => TaxTables 2019 a
FY2019.tables)
  (forall a.
(Fractional a, Ord a) =>
Money a -> Tax (Money a) (Money a)
medicareLevy (forall b (m :: * -> *) t. MonadReader b m => AReview t b -> m t
review forall a b. Iso (Money a) (Money b) a b
money a
22801))
  forall a. (Fractional a, Ord a) => Tax (Money a) (Money a)
medicareLevySurcharge
  forall a. (Fractional a, Ord a) => Tax (Money a) (Money a)
help
  forall a. (Fractional a, Ord a) => Tax (Money a) (Money a)
help
  (forall a. (Fractional a, Ord a) => Tax (Money a) (Money a)
lowIncomeTaxOffset forall a. Semigroup a => a -> a -> a
<> forall a. (Fractional a, Ord a) => Tax (Money a) (Money a)
lamito)
  forall a. Fractional a => PrivateHealthInsuranceRebateRates a
privateHealthInsuranceRebateRates

privateHealthInsuranceRebateRates
  :: (Fractional a) => PrivateHealthInsuranceRebateRates a
privateHealthInsuranceRebateRates :: forall a. Fractional a => PrivateHealthInsuranceRebateRates a
privateHealthInsuranceRebateRates =
  [ ( a
90000, (a
0.25059, a
0.25059), (a
0.29236, a
0.29236), (a
0.33413, a
0.33413) )
  , (a
105000, (a
0.16706, a
0.16706), (a
0.20883, a
0.20883), (a
0.25059, a
0.25059) )
  , (a
140000, (a
0.08352, a
0.08352), (a
0.12529, a
0.12529), (a
0.16706, a
0.16706) )
  ]