From d23d9acf338a3501696a5ce8b290c970d7715bbf Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Wed, 26 Aug 2015 10:11:32 -0700 Subject: [PATCH] fix haddock failures (#281) --- hledger-lib/Hledger/Data/AccountName.hs | 3 ++- hledger-lib/Hledger/Data/StringFormat.hs | 13 +++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/hledger-lib/Hledger/Data/AccountName.hs b/hledger-lib/Hledger/Data/AccountName.hs index 4ffc9da94..ec25ed133 100644 --- a/hledger-lib/Hledger/Data/AccountName.hs +++ b/hledger-lib/Hledger/Data/AccountName.hs @@ -32,9 +32,10 @@ accountNameFromComponents = concat . intersperse [acctsepchar] accountLeafName :: AccountName -> String accountLeafName = last . accountNameComponents +-- | Truncate all account name components but the last to two characters. accountSummarisedName :: AccountName -> String accountSummarisedName a - -- | length cs > 1 = take 2 (head cs) ++ ":" ++ a' + -- length cs > 1 = take 2 (head cs) ++ ":" ++ a' | length cs > 1 = intercalate ":" (map (take 2) $ init cs) ++ ":" ++ a' | otherwise = a' where diff --git a/hledger-lib/Hledger/Data/StringFormat.hs b/hledger-lib/Hledger/Data/StringFormat.hs index c594d56df..20c253513 100644 --- a/hledger-lib/Hledger/Data/StringFormat.hs +++ b/hledger-lib/Hledger/Data/StringFormat.hs @@ -45,10 +45,15 @@ data StringFormat = data StringFormatComponent = FormatLiteral String -- ^ Literal text to be rendered as-is - | FormatField Bool -- ^ Left justified if true, right justified if false - (Maybe Int) -- ^ Minimum width; will be space-padded if narrower than this - (Maybe Int) -- ^ Maximum width; will be clipped if wider than this - ReportItemField -- ^ One of several standard hledger report item fields to interpolate + | FormatField Bool + (Maybe Int) + (Maybe Int) + ReportItemField -- ^ A data field to be formatted and interpolated. Parameters: + -- + -- - Left justify ? Right justified if false + -- - Minimum width ? Will be space-padded if narrower than this + -- - Maximum width ? Will be clipped if wider than this + -- - Which of the standard hledger report item fields to interpolate deriving (Show, Eq) -- | An id identifying which report item field to interpolate. These