docs: haddock fixes

This commit is contained in:
Simon Michael 2009-11-25 12:57:30 +00:00
parent 5cfc8cf630
commit 48f6e03325
2 changed files with 4 additions and 4 deletions

View File

@ -108,7 +108,7 @@ showAmount a@(Amount (Commodity {symbol=sym,side=side,spaced=spaced}) _ pri) =
price = case pri of (Just pamt) -> " @ " ++ showMixedAmount pamt price = case pri of (Just pamt) -> " @ " ++ showMixedAmount pamt
Nothing -> "" Nothing -> ""
-- | Get the string representation of an amount, without any "@ price". -- | Get the string representation of an amount, without any \@ price.
showAmountWithoutPrice :: Amount -> String showAmountWithoutPrice :: Amount -> String
showAmountWithoutPrice a = showAmount a{price=Nothing} showAmountWithoutPrice a = showAmount a{price=Nothing}
@ -172,7 +172,7 @@ showMixedAmount m = concat $ intersperse "\n" $ map showfixedwidth as
showfixedwidth = printf (printf "%%%ds" width) . show showfixedwidth = printf (printf "%%%ds" width) . show
-- | Get the string representation of a mixed amount, but without -- | Get the string representation of a mixed amount, but without
-- any "@ price"s. -- any \@ prices.
showMixedAmountWithoutPrice :: MixedAmount -> String showMixedAmountWithoutPrice :: MixedAmount -> String
showMixedAmountWithoutPrice m = concat $ intersperse "\n" $ map showfixedwidth as showMixedAmountWithoutPrice m = concat $ intersperse "\n" $ map showfixedwidth as
where where
@ -188,7 +188,7 @@ showMixedAmountOrZero a
| otherwise = showMixedAmount a | otherwise = showMixedAmount a
-- | Get the string representation of a mixed amount, or a bare 0, -- | Get the string representation of a mixed amount, or a bare 0,
-- without any "@ price"s. -- without any \@ prices.
showMixedAmountOrZeroWithoutPrice :: MixedAmount -> String showMixedAmountOrZeroWithoutPrice :: MixedAmount -> String
showMixedAmountOrZeroWithoutPrice a showMixedAmountOrZeroWithoutPrice a
| isZeroMixedAmount a = "0" | isZeroMixedAmount a = "0"

View File

@ -56,7 +56,7 @@ data Commodity = Commodity {
data Amount = Amount { data Amount = Amount {
commodity :: Commodity, commodity :: Commodity,
quantity :: Double, quantity :: Double,
price :: Maybe MixedAmount -- ^ unit price for this amount at posting time, if known (from @ or P) price :: Maybe MixedAmount -- ^ unit price for this amount at posting time, if known (from \@ or P)
} deriving (Eq) } deriving (Eq)
newtype MixedAmount = Mixed [Amount] deriving (Eq) newtype MixedAmount = Mixed [Amount] deriving (Eq)