Skip to content

Commit

Permalink
Rename variable
Browse files Browse the repository at this point in the history
Seems fine for me to leave out the "maybe" part, this is already included in the "maybeInsert"
  • Loading branch information
MoritzR committed Aug 30, 2023
1 parent a1a9941 commit ed01059
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Prompt.hs
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,11 @@ renderTemplate templateMap template =
insertAccountsWithUnderscore :: TemplateMap -> TemplateMap
insertAccountsWithUnderscore templateMap =
templateMap
& maybeInsert "creditAccount" maybeCreditAccount
& maybeInsert "debitAccount" maybeDebitAccount
& maybeInsert "creditAccount" creditAccount
& maybeInsert "debitAccount" debitAccount
where
maybeCreditAccount = templateMap !? "credit_account"
maybeDebitAccount = templateMap !? "debit_account"
creditAccount = templateMap !? "credit_account"
debitAccount = templateMap !? "debit_account"
maybeInsert key maybeValue theMap = maybe theMap (\value -> insert key value theMap) maybeValue

getPromptResultForMatchingEntry :: Fill -> TemplateMap -> App (PromptResult TemplateMap)
Expand Down

0 comments on commit ed01059

Please sign in to comment.