mirror of
https://github.com/simonmichael/hledger.git
synced 2024-11-15 00:27:46 +03:00
17 lines
357 B
Haskell
17 lines
357 B
Haskell
{-|
|
|
|
|
A ledger-compatible @print@ command.
|
|
|
|
-}
|
|
|
|
module PrintCommand
|
|
where
|
|
import Ledger
|
|
import Options
|
|
|
|
|
|
-- | Print ledger entries in standard format.
|
|
printentries :: [Opt] -> [String] -> Ledger -> IO ()
|
|
printentries opts args l = putStr $ showEntries $ setprecisions $ entries $ rawledger l
|
|
where setprecisions = map (entrySetPrecision (lprecision l))
|