hlint: use on

This commit is contained in:
Simon Michael 2009-09-23 17:59:24 +00:00
parent 6a4dcf1c68
commit c9cb3d4399

View File

@ -6,6 +6,7 @@ A ledger-compatible @register@ command.
module Commands.Register
where
import Data.Function (on)
import Prelude hiding (putStr)
import Ledger
import Options
@ -99,7 +100,7 @@ showtxns [] _ _ = ""
showtxns (t:ts) tprev bal = this ++ showtxns ts t bal'
where
this = showtxn (t `issame` tprev) t bal'
issame t1 t2 = tnum t1 == tnum t2
issame = (==) `on` tnum
bal' = bal + tamount t
-- | Show one transaction line and balance with or without the entry details.