h*       !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                                                                                                                          0.0.0.10 Safe-Inferredhaspara'Common Aeson encoding/decoding options.hasparaAeson encoding/decoding options for uppercase constructor tag modifiers Safe-Inferred"1 in case that the lossless attempt fails. We could have used G directly. However, G is doing too much (see H). Therefore, we are first attempting a lossless construction (see =) and we fallback to G) in case the lossless construction fails.mkQuantity 0 :: Quantity 00mkQuantity 0 :: Quantity 10.0mkQuantity 0 :: Quantity 20.00mkQuantity 0.04 :: Quantity 10.0mkQuantity 0.05 :: Quantity 10.0mkQuantity 0.06 :: Quantity 10.1mkQuantity 0.14 :: Quantity 10.1mkQuantity 0.15 :: Quantity 10.2mkQuantity 0.16 :: Quantity 10.2mkQuantity 0.04 :: Quantity 20.04mkQuantity 0.05 :: Quantity 20.05mkQuantity 0.06 :: Quantity 20.06mkQuantity 0.14 :: Quantity 20.14mkQuantity 0.15 :: Quantity 20.15mkQuantity 0.16 :: Quantity 20.16mkQuantity 0.04 :: Quantity 30.040mkQuantity 0.05 :: Quantity 30.050mkQuantity 0.06 :: Quantity 30.060mkQuantity 0.14 :: Quantity 30.140mkQuantity 0.15 :: Quantity 30.150mkQuantity 0.16 :: Quantity 30.160=haspara Constructs 9 values from  values in a lossy way.2mkQuantityLossless 0 :: Either String (Quantity 0)Right 02mkQuantityLossless 0 :: Either String (Quantity 1) Right 0.02mkQuantityLossless 0 :: Either String (Quantity 2) Right 0.005mkQuantityLossless 0.04 :: Either String (Quantity 1)8Left "Underflow while trying to create quantity: 4.0e-2"5mkQuantityLossless 0.05 :: Either String (Quantity 1)8Left "Underflow while trying to create quantity: 5.0e-2"5mkQuantityLossless 0.06 :: Either String (Quantity 1)8Left "Underflow while trying to create quantity: 6.0e-2"5mkQuantityLossless 0.14 :: Either String (Quantity 1)6Left "Underflow while trying to create quantity: 0.14"5mkQuantityLossless 0.15 :: Either String (Quantity 1)6Left "Underflow while trying to create quantity: 0.15"5mkQuantityLossless 0.16 :: Either String (Quantity 1)6Left "Underflow while trying to create quantity: 0.16"5mkQuantityLossless 0.04 :: Either String (Quantity 2) Right 0.045mkQuantityLossless 0.05 :: Either String (Quantity 2) Right 0.055mkQuantityLossless 0.06 :: Either String (Quantity 2) Right 0.065mkQuantityLossless 0.14 :: Either String (Quantity 2) Right 0.145mkQuantityLossless 0.15 :: Either String (Quantity 2) Right 0.155mkQuantityLossless 0.16 :: Either String (Quantity 2) Right 0.165mkQuantityLossless 0.04 :: Either String (Quantity 3) Right 0.0405mkQuantityLossless 0.05 :: Either String (Quantity 3) Right 0.0505mkQuantityLossless 0.06 :: Either String (Quantity 3) Right 0.0605mkQuantityLossless 0.14 :: Either String (Quantity 3) Right 0.1405mkQuantityLossless 0.15 :: Either String (Quantity 3) Right 0.1505mkQuantityLossless 0.16 :: Either String (Quantity 3) Right 0.160>hasparaRounds given quantity by k digits.?@ABCDEFGH9;:8<=>?@ABCDEFGH Safe-Inferred"1<]Thaspara3Type encoding for FX rate quotation database for a .ZhasparaType encoding for a dictionary-based FX rate quotation database for various  values.[haspara:Type encoding for FX rate quotations with fixed precision.%An FX rate quotation is a 3-tuple of: +a currency pair the rate is quoted for, and-a date that the quotation is effective as of,0a (positive) rate as the value of the quotation.]hasparaCurrency pair of the FX rate.^hasparaActual date of the FX rate._haspara%(Positive) rate value of the FX rate.`hasparaSmart constructor for [ values within   context.The rate is expected to be a positive value. If it is not, the function will throw an error.:set -XTypeApplicationsmkFxQuoteError @(Either _) @2 "EUR" "USD" (read "2021-12-31") 1.16Right (MkFxQuote {fxQuotePair = EUR/USD, fxQuoteDate = 2021-12-31, fxQuoteRate = Refined 1.16})mkFxQuoteError @(Either _) @2 "EUR" "USD" (read "2021-12-31") (-1.16)Left "Can not create FX Rate. Error was: The predicate (GreaterThan 0) failed with the message: Value is not greater than 0\n"ahasparaSmart constructor for [ values within  context.The rate is expected to be a positive value. If it is not, the function will fail.:set -XTypeApplications v == valueFromAmount k (amountFromValue k v)..., and for the list of !s.3let kinds = [minBound .. maxBound] :: [AccountKind]kinds[AccountKindAsset,AccountKindLiability,AccountKindEquity,AccountKindRevenue,AccountKindExpense]All checks should pass:2all (\k -> check k valPos && check k valNeg) kindsTruehaspara Builds the / value for the given account kind and quantity.The concept of quantity here refers to the conventional concept of what it means for an  of a given !.For example, a loan of USD 1,000 has an increase in our liabilities. Therefore, the quantity is expected to be positive::set -XDataKindsimport Haspara.QuantityamountFromQuantity AccountKindLiability (mkQuantity 1000 :: Quantity 2)?Amount {amountSide = SideCredit, amountValue = Refined 1000.00}Note  function if you are rather working with values that are conceptually different than the quantity here whereby a value refers to the value of a particular economic event as in the contribution of that event to the net-worth of the entity. Therefore, above example would be reflected as follows to get the same  value:amountFromValue AccountKindLiability (mkQuantity (-1000) :: Quantity 2)?Amount {amountSide = SideCredit, amountValue = Refined 1000.00}Check ' documentation for further information.haspara*Returns the quantity for the given amount.This is dual to .haspara instance for .:set -XDataKindsimport Haspara.Accounting.Sideimport Haspara.Quantityimport Refined.UnsafeAeson.encode (Amount SideDebit (unsafeRefine (mkQuantity 42 :: Quantity 2)))""{\"side\":\"db\",\"value\":42.0}"Aeson.encode (Amount SideCredit (unsafeRefine (mkQuantity 42 :: Quantity 2)))""{\"side\":\"cr\",\"value\":42.0}"Aeson.eitherDecode (Aeson.encode (Amount SideDebit (unsafeRefine (mkQuantity 42 :: Quantity 2)))) :: Either String (Amount 2)Right (Amount {amountSide = SideDebit, amountValue = Refined 42.00})Aeson.eitherDecode (Aeson.encode (Amount SideCredit (unsafeRefine (mkQuantity 42 :: Quantity 2)))) :: Either String (Amount 2)Right (Amount {amountSide = SideCredit, amountValue = Refined 42.00})haspara instance for .:set -XDataKinds:set -XOverloadedStringsAeson.eitherDecode "{\"side\": \"db\", \"value\": 42}" :: Either String (Amount 2)Right (Amount {amountSide = SideDebit, amountValue = Refined 42.00})Aeson.eitherDecode "{\"side\": \"cr\", \"value\": 42}" :: Either String (Amount 2)Right (Amount {amountSide = SideCredit, amountValue = Refined 42.00})    Safe-Inferred1< haspara$Data definition for inventory event.haspara)Data definition for a journal entry item.A journal entry item has a , an unsigned quantity as amount, an account that it belongs to and the event the item is originating from. Journal entry item definition is polymorphic over the precision of the monetary quantities, the account and event objects.haspara$Data definition for a journal entry.A journal entry has a (unique) identifier, date and description, and a list of s. Journal entry definition is polymorphic over the precision of the monetary quantities, the account and event objects.hasparaData definition for the journal entries of interest (like a general ledger.)A  is a list of  records which are polymorphic over the precision of the monetary quantities, the account and event objects.haspara2Returns the total debit amount of a journal entry.haspara3Returns the total credit amount of a journal entry.haspara9Predicate to check if a journal entry is balanced or not.The logical check is indeed whether the total debit amount is equal to the total credit amount or not.haspara Creates a  from the given signed value, the account it belongs to and the event it is originating from.The value is defined as in  function.haspara Creates a 8 with inventory event informationfrom the given signed value, the account it belongs to and the event it is originating from.The value is defined as in  function.  Safe-Inferred1<d hasparaData definition for balances.This definition is similar to , however, the value is allowed to be negative to reflect "Negative Balance" phenomenon.See https://www.accountingtools.com/articles/what-is-a-negative-balance.htmlhaspara#Returns the debit quantity, if any.haspara$Returns the credit quantity, if any.haspara*Updates the balance with the given amount. :set -XDataKindsimport Data.Default (def) import Haspara.Accounting.Amountimport Haspara.Accounting.Sideimport Refined.Unsafe3let balance = Balance SideDebit 42 def :: Balance 2balanceBalance {balanceSide = SideDebit, balanceValue = 42.00, balanceInventory = MkInventory {inventoryTotal = 0.000000000000, inventoryCurrent = fromList [], inventoryHistory = fromList []}}let amountDebit = Amount SideDebit (unsafeRefine 10) :: Amount 2 amountDebit@BCH Safe-Inferredhaspara Constructs a 9 value at compile-time using -XTemplateHaskell.:set -XDataKinds:set -XOverloadedStrings:set -XTemplateHaskell!$$(quantityTH 0.00) :: Quantity 20.00!$$(quantityTH 0.09) :: Quantity 20.09"$$(quantityTH 0.009) :: Quantity 2...6..."Underflow while trying to create quantity: 9.0e-3"..."$$(quantityTH 0.009) :: Quantity 30.009haspara Constructs a  value at compile-time using -XTemplateHaskell.:set -XOverloadedStrings:set -XTemplateHaskell$$(currencyTH "USD")USD$$(currencyTH "usd")......Currency code error! Expecting at least 3 uppercase ASCII letters, but received: usd...haspara Constructs a  value at compile-time using -XTemplateHaskell.:set -XOverloadedStrings:set -XTemplateHaskell$$(currencyPairTH "EUR" "USD")EUR/USD$$(currencyPairTH "USD" "USD")USD/USD$$(currencyPairTH "USD" "eur")...... Currency code error! Expecting at least 3 uppercase ASCII letters, but received: eur... Safe-Inferred !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghiijklmnopqrstuvwxyz{|}~                                                                                                                                          'haspara-0.0.0.10-LGg0czPpaCuGVkbC64W22nHaspara.Internal.AesonHaspara.CurrencyHaspara.Accounting.AccountHaspara.QuantityHaspara.FxQuoteHaspara.MonetaryHaspara.Accounting.SideHaspara.Accounting.InventoryHaspara.Accounting.AmountHaspara.Accounting.JournalHaspara.Accounting.BalanceHaspara.Accounting.LedgerHaspara.Accounting.TrialBalance Haspara.THhaspara Data.AesonFromJSONToJSONHasparaMonetaryAccountHaspara.Accounting Paths_hasparacommonAesonOptionsaesonOptionsForSingleTag CurrencyPaircurrencyPairBasecurrencyPairQuoteCurrency MkCurrency currencyCodemkCurrencyErrormkCurrencyFailcurrencyCodeParsertoCurrencyTuplefromCurrencyTuple$fToJSONCurrency$fFromJSONCurrency$fShowCurrency$fIsStringCurrency$fShowCurrencyPair$fToJSONCurrencyPair$fFromJSONCurrencyPair$fEqCurrencyPair$fGenericCurrencyPair$fOrdCurrencyPair$fLiftBoxedRepCurrencyPair $fEqCurrency$fHashableCurrency $fOrdCurrency$fLiftBoxedRepCurrency accountKind accountObject AccountKindAccountKindAssetAccountKindLiabilityAccountKindEquityAccountKindRevenueAccountKindExpenseaccountKindText$fToJSONAccountKind$fFromJSONAccountKind$fHashableAccountKind$fToJSONAccount$fFromJSONAccount$fHashableAccount $fEqAccount$fGenericAccount $fOrdAccount $fShowAccount$fBoundedAccountKind$fEnumAccountKind$fEqAccountKind$fGenericAccountKind$fOrdAccountKind$fShowAccountKindUnsignedQuantityQuantity MkQuantity unQuantity mkQuantitymkQuantityLossless roundQuantitytimes timesLosslessdividedivideLdivideRdivideDsumUnsignedQuantity absQuantity mkQuantityAuxroundScientific$fShowQuantity$fFractionalArith $fNumArith$fToJSONQuantity$fFromJSONQuantity $fEqQuantity $fOrdQuantity$fGenericQuantity $fNumQuantity$fLiftBoxedRepQuantity$fLiftBoxedRepDecimalFxQuotePairDatabasefxQuotePairDatabasePairfxQuotePairDatabaseTablefxQuotePairDatabaseSincefxQuotePairDatabaseUntilFxQuoteDatabaseFxQuote MkFxQuote fxQuotePair fxQuoteDate fxQuoteRatemkFxQuoteError mkFxQuoteFailmkFxQuoteUnsafe findFxQuotefindFxQuoteAuxemptyFxQuoteDatabase addFxQuotes addFxQuoteinitFxQuotePairDatabaseupdateFxQuotePairDatabase$fToJSONFxQuote$fFromJSONFxQuote$fShowFxQuotePairDatabase $fEqFxQuote$fGenericFxQuote $fOrdFxQuote $fShowFxQuoteMonetaryExceptionIncompatibleCurrenciesExceptionIncompatibleDatesExceptionInconsistentFxQuoteExceptionconvertM convertAsofMMoney moneyDate moneyCurrency moneyQuantityconvert $fToJSONMoney$fFromJSONMoney$fExceptionMonetaryException $fEqMoney$fGenericMoney $fOrdMoney $fShowMoney$fShowMonetaryExceptionSide SideDebit SideCredit otherSidesideByAccountKindnormalSideByAccountKind $fToJSONSide$fFromJSONSide$fEqSide $fOrdSide $fShowSideMunchMunchNoMunchAll MunchLeft MunchRightInventoryHistoryItemMkInventoryHistoryIteminventoryHistoryItemDateinventoryHistoryItemPnlinventoryHistoryItemFstinventoryHistoryItemSndInventoryEventinventoryEventDateinventoryEventPriceinventoryEventQuantity Inventory MkInventoryinventoryTotalinventoryCurrentinventoryHistoryupdateInventoryupdateInventoryVPupdateInventoryVVupdateInventoryAux splitEventaddInventoryEventmunchAll whatMunch$fToJSONInventoryEvent$fFromJSONInventoryEvent$fToJSONInventoryHistoryItem$fFromJSONInventoryHistoryItem$fToJSONInventory$fFromJSONInventory$fDefaultInventory $fEqMunch $fShowMunch $fEqInventory$fGenericInventory$fShowInventory$fEqInventoryHistoryItem$fGenericInventoryHistoryItem$fShowInventoryHistoryItem$fEqInventoryEvent$fGenericInventoryEvent$fShowInventoryEventAmount amountSide amountValue amountDebit amountCreditamountFromValuevalueFromAmountamountFromQuantityquantityFromAmount$fToJSONAmount$fFromJSONAmount $fEqAmount$fGenericAmount $fOrdAmount $fShowAmountJournalEntryItemInventoryEvent(journalEntryItemInventoryEventPnlAccount#journalEntryItemInventoryEventEvent&journalEntryItemInventoryEventQuantityJournalEntryItemjournalEntryItemAmountjournalEntryItemAccountjournalEntryItemEventjournalEntryItemInventoryEvent JournalEntryjournalEntryIdjournalEntryDatejournalEntryItemsjournalEntryDescriptionJournaljournalEntriesjournalEntryTotalDebitjournalEntryTotalCreditisJournalEntryBalancedmkJournalEntryItemFromValue$mkInventoryJournalEntryItemFromValue&$fToJSONJournalEntryItemInventoryEvent($fFromJSONJournalEntryItemInventoryEvent$fToJSONJournalEntryItem$fFromJSONJournalEntryItem$fToJSONJournalEntry$fFromJSONJournalEntry$fToJSONJournal$fFromJSONJournal$fGenericJournal $fShowJournal$fGenericJournalEntry$fShowJournalEntry$fEqJournalEntryItem$fGenericJournalEntryItem$fShowJournalEntryItem"$fEqJournalEntryItemInventoryEvent'$fGenericJournalEntryItemInventoryEvent$$fShowJournalEntryItemInventoryEventBalance balanceSide balanceValuebalanceInventory balanceDebit balanceCredit updateBalanceupdateBalanceWithInventoryamountFromBalancequantityFromBalancevalueFromBalance$fToJSONBalance$fFromJSONBalance $fEqBalance$fGenericBalance $fShowBalance LedgerEntryledgerEntryDateledgerEntryAmountledgerEntryDescriptionledgerEntryEventledgerEntryPostingIdledgerEntryBalanceLedger ledgerAccount ledgerOpening ledgerRunning GeneralLedgergeneralLedgerLedgers ledgerClosing initLedgerinitLedgerWithOpeningBalanceinitLedgerWithOpeningValueinitLedgerWithOpeningQuantity postEntries postEntry postEntryItempostItemhistItemToJournalEntryItem$fToJSONLedgerEntry$fFromJSONLedgerEntry$fToJSONLedger$fFromJSONLedger$fToJSONGeneralLedger$fFromJSONGeneralLedger$fEqGeneralLedger$fGenericGeneralLedger$fShowGeneralLedger $fEqLedger$fGenericLedger $fShowLedger$fEqLedgerEntry$fGenericLedgerEntry$fShowLedgerEntryTrialBalanceItemtrialBalanceItemLedgertrialBalanceItemBalance TrialBalancetrialBalanceItemstrialBalanceItemAmountprepareTrialBalancemkTrialBalanceItemtrialBalanceTotals$fToJSONTrialBalanceItem$fFromJSONTrialBalanceItem$fToJSONTrialBalance$fFromJSONTrialBalance$fEqTrialBalance$fGenericTrialBalance$fShowTrialBalance$fEqTrialBalanceItem$fGenericTrialBalanceItem$fShowTrialBalanceItem quantityTH currencyTHcurrencyPairTH$aeson-2.2.3.0-G9Z2Jit3h8hFb5zDbTBNRhData.Aeson.Types.FromJSONData.Aeson.Types.ToJSON mtl-2.3.1Control.Monad.Error.Class MonadError text-2.0.2Data.Text.InternalTextbaseControl.Monad.Fail MonadFail Data.StringIsStringGHC.ShowShow)scientific-0.3.8.0-JlCboYA3TR1JjaI9vxDqiAData.Scientific Scientifictemplate-haskellLanguage.Haskell.TH.SyntaxLiftGHC.Errerror time-1.12.2Data.Time.Calendar.DaysDay1data-default-class-0.1.2.0-5FK3vpOLcdkKGIel7pORbQData.Default.Classdefversion getBinDir getLibDir getDynLibDir getDataDir getLibexecDirgetDataFileName getSysconfDir