canadian-income-tax-2023.0: Canadian income tax calculation
Safe HaskellSafe-Inferred
LanguageHaskell2010

Tax.Util

Description

Shared utility functions used by other modules

Synopsis

Documentation

fixEq :: Eq a => (a -> a) -> a -> a Source #

Repeatedly apply the function to the argument until it reaches the fixed point.

totalOf :: Num a => [Maybe a] -> Maybe a Source #

Sum the list of arguments; return Nothing iff all items are Nothing.

difference :: Maybe Centi -> Maybe Centi -> Maybe Centi Source #

Subtraction under Maybe

nonNegativeDifference :: Maybe Centi -> Maybe Centi -> Maybe Centi Source #

Non-negative subtraction under Maybe, returning Just 0 instead of negative results

fractionOf :: Maybe Rational -> Maybe Centi -> Maybe Centi Source #

Multiplication under Maybe