Skip to content

Commit d5ed809

Browse files
committed
;lib: document AmountPrecision
1 parent 37e49ad commit d5ed809

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

hledger-lib/Hledger/Data/Types.hs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,10 @@ instance Show AmountStyle where
199199
(show asdecimalpoint)
200200
(show asdigitgroups)
201201

202+
-- | The "display precision" for a hledger amount, by which we mean
203+
-- the number of decimal digits to display to the right of the decimal mark.
204+
-- This can be from 0 to 255 digits (the maximum supported by the Decimal library),
205+
-- or NaturalPrecision meaning "show all significant decimal digits".
202206
data AmountPrecision = Precision !Word8 | NaturalPrecision deriving (Eq,Ord,Read,Show,Generic)
203207

204208
-- | A style for displaying digit groups in the integer part of a

0 commit comments

Comments
 (0)