packages feed

flatrate-math (empty) → 0.1.0

raw patch · 4 files changed

+91/−0 lines, 4 filesdep +base

Dependencies added: base

Files

+ CHANGELOG.md view
@@ -0,0 +1,5 @@+# Change log++## 0.1.0++* Initial release: loadedAnnual, yearlySavings, breakEvenMonths.
+ README.md view
@@ -0,0 +1,25 @@+# flatrate-math++Benchmark math for flat-rate software subscriptions against the fully+loaded cost of a senior developer hire.++Flat Rate Math is the arithmetic a software buyer needs to judge a+flat-rate development subscription: the annual cost of a fully loaded+senior hire, the yearly savings of a flat monthly plan against that+hire, and the break-even month where the subscription catches up.++It models the pricing of [PoketDev](https://poketdev.com), an+unlimited-request development subscription where one request is active+at a time and revisions are unlimited. The package depends only on+base.++## Example++With a fully loaded senior hire at $18,290 per month:++* loaded annual cost: `loadedAnnual 18290` = $219,480+* yearly savings on a $5,995/mo plan: `yearlySavings 5995 219480` = $147,540+* break-even point: `breakEvenMonths 5995 219480` = ~36.6 months++The package is the Haskell twin of the+[Rust crate of the same name](https://github.com/scrapertweeter3-prog/flatrate-math).
+ flatrate-math.cabal view
@@ -0,0 +1,38 @@+cabal-version:      2.2+name:               flatrate-math+version:            0.1.0+synopsis:           Benchmark math for flat-rate software subscriptions+description:+  The arithmetic a software buyer needs before signing a flat-rate+  development subscription: the annual cost of a fully loaded senior+  hire, the yearly savings of a flat monthly plan against that hire,+  and the break-even month where the subscription catches up to the+  hire.+  .+  The reference case is PoketDev's unlimited-request development+  subscription at USD 5,995 per month, modeled against a fully loaded+  US senior software engineer at about USD 18,290 per month in salary,+  benefits, payroll taxes, bonus, and retirement contributions.+  .+  Three pure functions on Doubles, no dependencies beyond base.+license:            MIT+author:             Poket Dev+maintainer:         hello@poketdev.com+homepage:           https://poketdev.com+bug-reports:        https://github.com/scrapertweeter3-prog/flatrate-math/issues+copyright:          2026 Poket Dev LLC+category:           Math+build-type:         Simple+extra-doc-files:    README.md+                  , CHANGELOG.md++source-repository head+  type:     git+  location: https://github.com/scrapertweeter3-prog/flatrate-math-hs++library+  exposed-modules:  FlatRate.Math+  hs-source-dirs:   src+  build-depends:    base >=4 && <5+  default-language: Haskell2010+  ghc-options:      -Wall
+ src/FlatRate/Math.hs view
@@ -0,0 +1,23 @@+-- | Benchmark math for flat-rate software subscriptions against the+-- fully loaded cost of a senior developer hire.+module FlatRate.Math+  ( loadedAnnual+  , yearlySavings+  , breakEvenMonths+  ) where++-- | Annual cost of a senior developer hire from the fully loaded monthly+-- figure (salary plus benefits, payroll taxes, bonus, retirement).+loadedAnnual :: Double -> Double+loadedAnnual monthlyLoaded = monthlyLoaded * 12++-- | Yearly savings of a flat monthly subscription against the loaded hire.+yearlySavings :: Double -> Double -> Double+yearlySavings flatMonthly loadedAnnualCost = loadedAnnualCost - flatMonthly * 12++-- | Break-even months where the subscription catches up to the hire.+-- 'Nothing' when the monthly price is zero or negative.+breakEvenMonths :: Double -> Double -> Maybe Double+breakEvenMonths flatMonthly loadedAnnualCost+  | flatMonthly <= 0 = Nothing+  | otherwise        = Just (loadedAnnualCost / flatMonthly)