DORURVCGBXEF3DMKG6PFOKVPCO6I7ZZKUGRQP5VO5MBAG6GEE4MAC
O5WOFYXPZAH6Y7HUQ5E47LQAZFISCNODY5LFHUONA2Q6ZRLPTOHAC
H5ZMKSRCKHPZZTZ6ITFKMDWSF25AIJZBEKX6SD77NBHW7ZFX3DSQC
4XWXRK36AQKTBU4DUEH4UEHDAJQYDQXBCGD3G2TZDIKYNMNPZ3CQC
BRJMDWYDEP5P765MXKA7UOM5YE6OSPUHQRY67AX6WJNGACQFRLHAC
ZJ6BESB2ZX5KZWQRANKZFHPP64H3WQHF56PMFFMZIKVSIZSX3SXAC
5FL4GFXIQJ3P7U5DD7VUEZHNZTTN7DERSUBQ64JZEPLU4PRX4K5QC
BFH72ISNORLFYPNB5SKVOG36JUXY2NAYHQZ6SMQIUUG4PB4EKVLAC
F3PSUKWXAFKSWPWD4OFGDMMOPGRZVLJWWHNWOHRDP677PZVFTRIQC
NZ2SHCLDVMHP4MN4ZIVSABSBXKVC6WYMTR7YPVA5AH6VUREXH37AC
defaultRule = MkRule (Proxy @50) (Proxy @30) (Proxy @20)
defaultRule = MkRule (SNat @50) (SNat @30) (SNat @20)
fromKnownNats :: forall n w s. (KnownNat n, KnownNat w, KnownNat s) => Rule '(n, w, s)
fromKnownNats = MkRule (SNat @n) (SNat @w) (SNat @s)
fromSTuple :: forall n w s. SNat n -> SNat w -> SNat s -> Rule '(n, w, s)
fromSTuple n w s = withKnownNat n $ withKnownNat w $ withKnownNat s $ fromKnownNats
toSNats :: forall n w s. Rule '(n, w, s) -> (SNat n, SNat w, SNat s)
toSNats (MkRule n w s) = (n, w, s)
toProxy :: forall n w s. Rule '(n, w, s) -> Proxy '(n, w, s)
toProxy _ = Proxy @'(n, w, s)
import Budget (Budget, Category (..), Rule, IntoRule (..))
import qualified Budget (needs, wants, savings)
import Budget (Budget, Category (..), IntoRule (..), Rule (MkRule), SomeBudget (..))
import qualified Budget (needs, savings, wants, withKnownRule)
printBudget :: SomeBudget -> Doc ()
printBudget (SomeBudget ss (MkRule n w s) budget) = withKnownNat n $ withKnownNat w $ withKnownNat s $ withKnownSymbol ss (pretty budget)