docs: haddock fixes
This commit is contained in:
parent
5cfc8cf630
commit
48f6e03325
@ -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"
|
||||||
|
|||||||
@ -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)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user