mirror of
https://github.com/simonmichael/hledger.git
synced 2024-12-27 04:13:11 +03:00
flatten modules a little
This commit is contained in:
parent
3ca0303a88
commit
1127c3f52f
@ -4,7 +4,7 @@ Generate balances pie chart
|
||||
|
||||
-}
|
||||
|
||||
module Hledger.Cli.Commands.Chart
|
||||
module Hledger.Cli.Chart
|
||||
where
|
||||
import Hledger.Data.Utils
|
||||
import Hledger.Data.Types
|
||||
|
@ -13,7 +13,7 @@ import System.IO.UTF8 (putStr, putStrLn)
|
||||
#endif
|
||||
|
||||
import Hledger.Chart
|
||||
import Hledger.Cli.Commands.All
|
||||
import Hledger.Cli.Commands
|
||||
import Hledger.Cli.Options
|
||||
import Hledger.Cli.Tests
|
||||
import Hledger.Cli.Utils (withJournalDo)
|
||||
|
@ -10,9 +10,9 @@ import Safe (headDef)
|
||||
import Graphics.Vty
|
||||
import Hledger.Data
|
||||
import Hledger.Cli.Options
|
||||
import Hledger.Cli.Commands.Balance
|
||||
import Hledger.Cli.Commands.Register
|
||||
import Hledger.Cli.Commands.Print
|
||||
import Hledger.Cli.Balance
|
||||
import Hledger.Cli.Register
|
||||
import Hledger.Cli.Print
|
||||
|
||||
|
||||
helpmsg = "(b)alance, (r)egister, (p)rint, (right) to drill down, (left) to back up, (q)uit"
|
||||
|
@ -27,10 +27,10 @@ import Yesod.Helpers.Static
|
||||
import Text.Hamlet (defaultHamletSettings)
|
||||
import Text.Hamlet.RT
|
||||
|
||||
import Hledger.Cli.Commands.Add (appendToJournalFile)
|
||||
import Hledger.Cli.Commands.Balance
|
||||
import Hledger.Cli.Commands.Print
|
||||
import Hledger.Cli.Commands.Register
|
||||
import Hledger.Cli.Add (appendToJournalFile)
|
||||
import Hledger.Cli.Balance
|
||||
import Hledger.Cli.Print
|
||||
import Hledger.Cli.Register
|
||||
import Hledger.Cli.Options hiding (value)
|
||||
import Hledger.Cli.Utils
|
||||
import Hledger.Cli.Version (version)
|
||||
|
@ -5,12 +5,12 @@ A history-aware add command to help with data entry.
|
||||
|
||||
-}
|
||||
|
||||
module Hledger.Cli.Commands.Add
|
||||
module Hledger.Cli.Add
|
||||
where
|
||||
import Hledger.Data
|
||||
import Hledger.Read.Journal (someamount)
|
||||
import Hledger.Cli.Options
|
||||
import Hledger.Cli.Commands.Register (registerReport, registerReportAsText)
|
||||
import Hledger.Cli.Register (registerReport, registerReportAsText)
|
||||
#if __GLASGOW_HASKELL__ <= 610
|
||||
import Prelude hiding (putStr, putStrLn, getLine, appendFile)
|
||||
import System.IO.UTF8
|
@ -95,7 +95,7 @@ balance report:
|
||||
|
||||
-}
|
||||
|
||||
module Hledger.Cli.Commands.Balance (
|
||||
module Hledger.Cli.Balance (
|
||||
BalanceReport
|
||||
,BalanceReportItem
|
||||
,balance
|
40
hledger/Hledger/Cli/Commands.hs
Normal file
40
hledger/Hledger/Cli/Commands.hs
Normal file
@ -0,0 +1,40 @@
|
||||
{-# LANGUAGE CPP #-}
|
||||
{-|
|
||||
|
||||
The Commands package defines all the commands offered by the hledger
|
||||
application, like \"register\" and \"balance\". This module exports all
|
||||
the commands; you can also import individual modules if you prefer.
|
||||
|
||||
-}
|
||||
|
||||
module Hledger.Cli.Commands (
|
||||
module Hledger.Cli.Add,
|
||||
module Hledger.Cli.Balance,
|
||||
module Hledger.Cli.Convert,
|
||||
module Hledger.Cli.Histogram,
|
||||
module Hledger.Cli.Print,
|
||||
module Hledger.Cli.Register,
|
||||
module Hledger.Cli.Stats,
|
||||
tests_Hledger_Commands
|
||||
)
|
||||
where
|
||||
import Hledger.Cli.Add
|
||||
import Hledger.Cli.Balance
|
||||
import Hledger.Cli.Convert
|
||||
import Hledger.Cli.Histogram
|
||||
import Hledger.Cli.Print
|
||||
import Hledger.Cli.Register
|
||||
import Hledger.Cli.Stats
|
||||
import Test.HUnit (Test(TestList))
|
||||
|
||||
|
||||
tests_Hledger_Commands = TestList
|
||||
[
|
||||
-- Hledger.Cli.Add.tests_Add
|
||||
-- ,Hledger.Cli.Balance.tests_Balance
|
||||
Hledger.Cli.Convert.tests_Convert
|
||||
-- ,Hledger.Cli.Histogram.tests_Histogram
|
||||
-- ,Hledger.Cli.Print.tests_Print
|
||||
,Hledger.Cli.Register.tests_Register
|
||||
-- ,Hledger.Cli.Stats.tests_Stats
|
||||
]
|
@ -1,40 +0,0 @@
|
||||
{-# LANGUAGE CPP #-}
|
||||
{-|
|
||||
|
||||
The Commands package defines all the commands offered by the hledger
|
||||
application, like \"register\" and \"balance\". This module exports all
|
||||
the commands; you can also import individual modules if you prefer.
|
||||
|
||||
-}
|
||||
|
||||
module Hledger.Cli.Commands.All (
|
||||
module Hledger.Cli.Commands.Add,
|
||||
module Hledger.Cli.Commands.Balance,
|
||||
module Hledger.Cli.Commands.Convert,
|
||||
module Hledger.Cli.Commands.Histogram,
|
||||
module Hledger.Cli.Commands.Print,
|
||||
module Hledger.Cli.Commands.Register,
|
||||
module Hledger.Cli.Commands.Stats,
|
||||
tests_Hledger_Commands
|
||||
)
|
||||
where
|
||||
import Hledger.Cli.Commands.Add
|
||||
import Hledger.Cli.Commands.Balance
|
||||
import Hledger.Cli.Commands.Convert
|
||||
import Hledger.Cli.Commands.Histogram
|
||||
import Hledger.Cli.Commands.Print
|
||||
import Hledger.Cli.Commands.Register
|
||||
import Hledger.Cli.Commands.Stats
|
||||
import Test.HUnit (Test(TestList))
|
||||
|
||||
|
||||
tests_Hledger_Commands = TestList
|
||||
[
|
||||
-- Hledger.Cli.Commands.Add.tests_Add
|
||||
-- ,Hledger.Cli.Commands.Balance.tests_Balance
|
||||
Hledger.Cli.Commands.Convert.tests_Convert
|
||||
-- ,Hledger.Cli.Commands.Histogram.tests_Histogram
|
||||
-- ,Hledger.Cli.Commands.Print.tests_Print
|
||||
,Hledger.Cli.Commands.Register.tests_Register
|
||||
-- ,Hledger.Cli.Commands.Stats.tests_Stats
|
||||
]
|
@ -3,7 +3,7 @@ Convert account data in CSV format (eg downloaded from a bank) to journal
|
||||
format, and print it on stdout. See the manual for more details.
|
||||
-}
|
||||
|
||||
module Hledger.Cli.Commands.Convert where
|
||||
module Hledger.Cli.Convert where
|
||||
import Hledger.Cli.Options (Opt(Debug))
|
||||
import Hledger.Cli.Version (versionstr)
|
||||
import Hledger.Data.Types (Journal,AccountName,Transaction(..),Posting(..),PostingType(..))
|
@ -5,7 +5,7 @@ Print a histogram report.
|
||||
|
||||
-}
|
||||
|
||||
module Hledger.Cli.Commands.Histogram
|
||||
module Hledger.Cli.Histogram
|
||||
where
|
||||
import Hledger.Data
|
||||
import Hledger.Cli.Options
|
@ -45,8 +45,8 @@ import Prelude hiding (putStr, putStrLn)
|
||||
import System.IO.UTF8
|
||||
#endif
|
||||
|
||||
import Hledger.Cli.Commands.All
|
||||
import Hledger.Data
|
||||
import Hledger.Cli.Commands
|
||||
import Hledger.Cli.Options
|
||||
import Hledger.Cli.Tests
|
||||
import Hledger.Cli.Utils (withJournalDo)
|
||||
|
@ -5,7 +5,7 @@ A ledger-compatible @print@ command.
|
||||
|
||||
-}
|
||||
|
||||
module Hledger.Cli.Commands.Print (
|
||||
module Hledger.Cli.Print (
|
||||
JournalReport
|
||||
,JournalReportItem
|
||||
,print'
|
@ -5,7 +5,7 @@ A ledger-compatible @register@ command.
|
||||
|
||||
-}
|
||||
|
||||
module Hledger.Cli.Commands.Register (
|
||||
module Hledger.Cli.Register (
|
||||
RegisterReport
|
||||
,RegisterReportItem
|
||||
,register
|
@ -5,7 +5,7 @@ Print some statistics for the journal.
|
||||
|
||||
-}
|
||||
|
||||
module Hledger.Cli.Commands.Stats
|
||||
module Hledger.Cli.Stats
|
||||
where
|
||||
import Hledger.Data
|
||||
import Hledger.Cli.Options
|
@ -32,10 +32,10 @@ import qualified Data.Map as Map
|
||||
import System.Exit (exitFailure, exitWith, ExitCode(ExitSuccess)) -- base 3 compatible
|
||||
import System.Time (ClockTime(TOD))
|
||||
|
||||
import Hledger.Cli.Commands.All
|
||||
import Hledger.Data -- including testing utils in Hledger.Data.Utils
|
||||
import Hledger.Read (readJournal)
|
||||
import Hledger.Read.Journal (someamount)
|
||||
import Hledger.Cli.Commands
|
||||
import Hledger.Cli.Options
|
||||
import Hledger.Cli.Utils
|
||||
|
||||
|
@ -41,14 +41,14 @@ executable hledger
|
||||
Hledger.Cli.Tests
|
||||
Hledger.Cli.Utils
|
||||
Hledger.Cli.Version
|
||||
Hledger.Cli.Commands.Add
|
||||
Hledger.Cli.Commands.All
|
||||
Hledger.Cli.Commands.Balance
|
||||
Hledger.Cli.Commands.Convert
|
||||
Hledger.Cli.Commands.Histogram
|
||||
Hledger.Cli.Commands.Print
|
||||
Hledger.Cli.Commands.Register
|
||||
Hledger.Cli.Commands.Stats
|
||||
Hledger.Cli.Commands
|
||||
Hledger.Cli.Add
|
||||
Hledger.Cli.Balance
|
||||
Hledger.Cli.Convert
|
||||
Hledger.Cli.Histogram
|
||||
Hledger.Cli.Print
|
||||
Hledger.Cli.Register
|
||||
Hledger.Cli.Stats
|
||||
build-depends:
|
||||
hledger-lib == 0.13
|
||||
,HUnit
|
||||
@ -80,14 +80,14 @@ library
|
||||
Hledger.Cli.Tests
|
||||
Hledger.Cli.Utils
|
||||
Hledger.Cli.Version
|
||||
Hledger.Cli.Commands.Add
|
||||
Hledger.Cli.Commands.All
|
||||
Hledger.Cli.Commands.Balance
|
||||
Hledger.Cli.Commands.Convert
|
||||
Hledger.Cli.Commands.Histogram
|
||||
Hledger.Cli.Commands.Print
|
||||
Hledger.Cli.Commands.Register
|
||||
Hledger.Cli.Commands.Stats
|
||||
Hledger.Cli.Commands
|
||||
Hledger.Cli.Add
|
||||
Hledger.Cli.Balance
|
||||
Hledger.Cli.Convert
|
||||
Hledger.Cli.Histogram
|
||||
Hledger.Cli.Print
|
||||
Hledger.Cli.Register
|
||||
Hledger.Cli.Stats
|
||||
build-depends:
|
||||
hledger-lib == 0.13
|
||||
,HUnit
|
||||
|
Loading…
Reference in New Issue
Block a user