Skip to content

Commit

Permalink
Fix formatting of documentation comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ad-si committed Jan 11, 2024
1 parent be5883c commit 1b756bb
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 28 deletions.
14 changes: 7 additions & 7 deletions src/Transity/Data/Account.purs
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ import Transity.Utils
)


--| A physical account which can contain one or several commodities.
--| E.g. wallet, bank account, barn.
--| You shouldn't misuse this for abstract concepts like expenses or income.
--| To assign a meaning to a transaction you can use notes and tags.
--|
--| The Id must be a `:` separated String where the first element
--| is the owner of the account. E.g. `john:evil-bank:savings`
-- | A physical account which can contain one or several commodities.
-- | E.g. wallet, bank account, barn.
-- | You shouldn't misuse this for abstract concepts like expenses or income.
-- | To assign a meaning to a transaction you can use notes and tags.
-- |
-- | The Id must be a `:` separated String where the first element
-- | is the owner of the account. E.g. `john:evil-bank:savings`

type Id = String
newtype Account = Account
Expand Down
12 changes: 6 additions & 6 deletions src/Transity/Data/Amount.purs
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ decodeJsonCommodity json =
(toString json)


--| E.g. "20 €", "10 cows", or "20 minutes"
--| `amount = Amount (fromInt 20) (Commodity "€")
-- | E.g. "20 €", "10 cows", or "20 minutes"
-- | `amount = Amount (fromInt 20) (Commodity "€")

data Amount = Amount Rational Commodity

Expand Down Expand Up @@ -146,10 +146,10 @@ showPretty :: Amount -> String
showPretty = showPrettyAligned ColorNo 0 0 0


--| Specify the width (in characters) of the integer part,
--| the width of the fractional part (including decimal point),
--| the width of commodity part
--| and receive a pretty printed amount.
-- | Specify the width (in characters) of the integer part,
-- | the width of the fractional part (including decimal point),
-- | the width of commodity part
-- | and receive a pretty printed amount.

showPrettyAligned :: ColorFlag -> Int -> Int -> Int -> Amount -> String
showPrettyAligned colorFlag intWid fracWid comWid (Amount val (Commodity com)) =
Expand Down
8 changes: 4 additions & 4 deletions src/Transity/Data/CommodityMap.purs
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ showPretty :: CommodityMap -> String
showPretty = showPrettyAligned ColorNo 0 0 0


--| Specify the width (in characters) of the integer part,
--| the width of the fractional part
--| (both exluding the decimal point) and receive a pretty printed
--| multi line string.
-- | Specify the width (in characters) of the integer part,
-- | the width of the fractional part
-- | (both exluding the decimal point) and receive a pretty printed
-- | multi line string.

showPrettyAligned :: ColorFlag -> Int -> Int -> Int -> CommodityMap -> String
showPrettyAligned colorFlag intWidth fracWidth comWidth commodityMap =
Expand Down
10 changes: 5 additions & 5 deletions src/Transity/Data/Transfer.purs
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,11 @@ showPrettyColorized :: Transfer -> String
showPrettyColorized = showPrettyAligned ColorYes 15 15 5 3 10


--| - From account name width
--| - To account name width
--| - Integer part width
--| - Fraction part width
--| - Commodity width
-- | - From account name width
-- | - To account name width
-- | - Integer part width
-- | - Fraction part width
-- | - Commodity width

showPrettyAligned
:: ColorFlag -> Int -> Int -> Int -> Int -> Int -> Transfer -> String
Expand Down
8 changes: 4 additions & 4 deletions src/Transity/Plot.purs
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ gplotTable dataString = "$data << EOD\n"
<> "\nEOD\n"


--| Code (without data) for gnuplot impulse diagram
--| to visualize transfers on one account
-- | Code (without data) for gnuplot impulse diagram
-- | to visualize transfers on one account
gplotCode :: GplotConfig -> String
gplotCode (GplotConfig conf) =
gplotTable conf.data <>
Expand Down Expand Up @@ -74,8 +74,8 @@ gplotCode (GplotConfig conf) =
) # joinWith ";")


--| Code (without data) for cumuluative gnuplot step chart
--| to visualize balance on one account
-- | Code (without data) for cumuluative gnuplot step chart
-- | to visualize balance on one account
gplotCodeCumul :: GplotConfig -> String
gplotCodeCumul (GplotConfig conf) =
gplotTable conf.data <>
Expand Down
3 changes: 1 addition & 2 deletions src/Transity/Utils.purs
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ import Foreign.Object (Object)
import Transity.Data.Config



--| Flag to switch between different ways of sorting the output
-- | Flag to switch between different ways of sorting the output
data SortOrder = CustomSort | Alphabetically

derive instance eqSortOrder :: Eq SortOrder
Expand Down

0 comments on commit 1b756bb

Please sign in to comment.