Upgrade to Pro — share decks privately, control downloads, hide ads and more …

tax-ato: project update (lightning talk, EO2025)

tax-ato: project update (lightning talk, EO2025)

A brief update to the tax-ato project, an Australian personal income tax library written in Haskell.

Avatar for Fraser Tweedale

Fraser Tweedale

January 22, 2025
Tweet

More Decks by Fraser Tweedale

Other Decks in Programming

Transcript

  1. tax-ato - personal income tax library yes it’s Haskell of

    course, sorry not sorry https://hackage.haskell.org/package/tax-ato https://github.com/frasertweedale/hs-tax-ato
  2. import Control.Lens import Data.Time import Text.PrettyPrint (render) import Data.Tax.ATO import

    Data.Tax.ATO.CGT import Data.Tax.ATO.Pretty import qualified Data.Tax.ATO.FY.FY2024 as FY main :: IO () main = do let assessment = assessTax FY.tables taxReturn putStrLn . render $ summariseTaxReturnInfo taxReturn putStrLn . render $ summariseAssessment assessment taxReturn :: TaxReturnInfo FY.FY Rational taxReturn = newTaxReturnInfo & set paymentSummaries [ PaymentSummary "1234567890" -- ABN (Money 180000) -- Gross payments (Money 50000) -- Tax withheld mempty -- Reportable super contributions ] & set dividends [ dividendFromNetFranked30 -- 30% corporate tax rate "IBM" (day "2023-09-01") -- payment date (Money 70) -- net payment (proportion 1) -- franked proportion ] & set cgtEvents [ CGTEvent "NVDA" -- ticker 10 -- units (may be fractional) (day "2014-01-01") -- acquisition date (Money 30) -- acquisition price (per unit) (Money 20) -- acquisition cost (brokerage) (day "2024-03-01") -- disposal date (Money 300) -- disposal price (Money 20) -- disposal cost mempty -- capital costs mempty -- costs of ownership ] & set (deductions . workRelatedTravelExpenses) (Money 1000) & set (deductions . personalSuperannuationContributions) (Money 5000) & set helpBalance (Money 10000) & set privateHealthInsurancePolicyDetails [ PrivateHealthInsurancePolicyDetail "NIB" "98765432" -- policy number (Money 750) -- premiums eligible for rebate (Money 180) -- rebate received BenefitCode30 , PrivateHealthInsurancePolicyDetail "NIB" "98765432" (Money 250) (Money 60) BenefitCode31 ]
  3. stuff that was implemented in 2023 ▶ PAYG income, deductions

    ▶ Medicare levy, Medicare levy surcharge ▶ dividends and franking credits ▶ CGT, foreign income, FITO, ESS ▶ student loan repayments (HECS/HELP/etc) ▶ offsets: LITO, LMITO, spouse super contribution ▶ private health insurance rebate adjustments ▶ rates/rules for previous financial years (back to 2017)
  4. stuff that’s new since 2023 ▶ PAYG instalments ▶ depreciation

    schedules ▶ pretty printing ▶ improvements to dividends ▶ vastly expanded documentation and examples
  5. stuff that I SHALL implement this year ▶ personal services

    income (PSI) ▶ trust distributions ▶ cents-per-kilometer travel expense rates ▶ WFH running costs cents-per-hour rates
  6. stuff that’s still not implemented ▶ some adjustments/variations based on

    family income or dependents ▶ employment termination payments ▶ super income streams and lump payments ▶ rental income and deductions ▶ FHSS releases ▶ some grandfathering rules (e.g. CGT indexation method) ▶ lots of other esoteric (to me) features and quirks
  7. want to contribute? (low-hanging fruit) ▶ rental income and deductions

    ▶ pre-2017 rates and thresholds ▶ tests ▶ scratch your own itch...
  8. © 2025 Fraser Tweedale Except where otherwise noted this work

    is licensed under http://creativecommons.org/licenses/by/4.0/ Code https://github.com/frasertweedale Blog frasertweedale.github.io/blog-fp Fediverse @[email protected]