packages feed

tilia-0.2.0.0: corpora/vendored/expression/block/negated-block-out.hs

{-# LANGUAGE BlockArguments #-}

-- A block under a minus ends where the block alone would: a tighter chain
-- led by it keeps its operators at the column of its items, where a step
-- further in would carry them onto its last line, a signature after it
-- goes on a line of its own, and a minus after it puts its items a step
-- further in, where at their column it would begin another item.
module Ledger.Balance where

balance entry =
  -case entry of
    Debit amount -> amount
    * rate
    + fee * count

refund =
  ( -do
      amount <- owed
      pure amount
    :: Ledger Int
  )

shortfall entry =
  -case entry of
      Debit amount -> amount
    - 1