From d5ed8090fadbfaab78255f85bd2ab5265da9737b Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Thu, 4 Feb 2021 13:55:05 -0800 Subject: [PATCH] ;lib: document AmountPrecision --- hledger-lib/Hledger/Data/Types.hs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hledger-lib/Hledger/Data/Types.hs b/hledger-lib/Hledger/Data/Types.hs index c9ec78519..0710c4d67 100644 --- a/hledger-lib/Hledger/Data/Types.hs +++ b/hledger-lib/Hledger/Data/Types.hs @@ -199,6 +199,10 @@ instance Show AmountStyle where (show asdecimalpoint) (show asdigitgroups) +-- | The "display precision" for a hledger amount, by which we mean +-- the number of decimal digits to display to the right of the decimal mark. +-- This can be from 0 to 255 digits (the maximum supported by the Decimal library), +-- or NaturalPrecision meaning "show all significant decimal digits". data AmountPrecision = Precision !Word8 | NaturalPrecision deriving (Eq,Ord,Read,Show,Generic) -- | A style for displaying digit groups in the integer part of a