first step towards a library, move Utils to Ledger.Utils
This commit is contained in:
parent
e9d9660c39
commit
627f78a730
@ -1,6 +1,6 @@
|
||||
module Account
|
||||
where
|
||||
import Utils
|
||||
import Ledger.Utils
|
||||
import Types
|
||||
import AccountName
|
||||
import Amount
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
module AccountName
|
||||
where
|
||||
import Utils
|
||||
import Ledger.Utils
|
||||
import Types
|
||||
|
||||
sepchar = ':'
|
||||
|
||||
@ -36,7 +36,7 @@ currencies can be converted to a simple amount. Arithmetic examples:
|
||||
|
||||
module Amount
|
||||
where
|
||||
import Utils
|
||||
import Ledger.Utils
|
||||
import Types
|
||||
import Currency
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@ module Currency
|
||||
where
|
||||
import qualified Data.Map as Map
|
||||
import Data.Map ((!))
|
||||
import Utils
|
||||
import Ledger.Utils
|
||||
import Types
|
||||
|
||||
currencies =
|
||||
|
||||
@ -2,7 +2,7 @@ module Ledger
|
||||
where
|
||||
import qualified Data.Map as Map
|
||||
import Data.Map ((!))
|
||||
import Utils
|
||||
import Ledger.Utils
|
||||
import Types
|
||||
import Amount
|
||||
import Account
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
-- standard imports and utilities
|
||||
module Utils (
|
||||
module Utils,
|
||||
module Ledger.Utils (
|
||||
module Ledger.Utils,
|
||||
module Char,
|
||||
module Data.List,
|
||||
module Data.Tree,
|
||||
@ -1,6 +1,6 @@
|
||||
module LedgerEntry
|
||||
where
|
||||
import Utils
|
||||
import Ledger.Utils
|
||||
import Types
|
||||
import RawTransaction
|
||||
import Amount
|
||||
|
||||
@ -5,7 +5,7 @@ import System.Directory
|
||||
import System.Environment (getEnv)
|
||||
import Data.Maybe (fromMaybe)
|
||||
|
||||
import Utils
|
||||
import Ledger.Utils
|
||||
import Types
|
||||
|
||||
|
||||
|
||||
2
Parse.hs
2
Parse.hs
@ -109,7 +109,7 @@ import Text.ParserCombinators.Parsec.Language
|
||||
import qualified Text.ParserCombinators.Parsec.Token as P
|
||||
import System.IO
|
||||
|
||||
import Utils
|
||||
import Ledger.Utils
|
||||
import Models
|
||||
import Options
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@ module RawLedger
|
||||
where
|
||||
import qualified Data.Map as Map
|
||||
|
||||
import Utils
|
||||
import Ledger.Utils
|
||||
import Types
|
||||
import AccountName
|
||||
import LedgerEntry
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
module RawTransaction
|
||||
where
|
||||
import Utils
|
||||
import Ledger.Utils
|
||||
import Types
|
||||
import AccountName
|
||||
import Amount
|
||||
|
||||
2
Tests.hs
2
Tests.hs
@ -6,7 +6,7 @@ import Text.ParserCombinators.Parsec
|
||||
import Options
|
||||
import Models
|
||||
import Parse
|
||||
import Utils
|
||||
import Ledger.Utils
|
||||
|
||||
-- utils
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
module TimeLog
|
||||
where
|
||||
import Utils
|
||||
import Ledger.Utils
|
||||
import Types
|
||||
import Currency
|
||||
import Amount
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
module Transaction
|
||||
where
|
||||
import Utils
|
||||
import Ledger.Utils
|
||||
import Types
|
||||
import AccountName
|
||||
import LedgerEntry
|
||||
|
||||
2
Types.hs
2
Types.hs
@ -3,7 +3,7 @@ All the basic data types, defined here for easy re-use. See "Main".
|
||||
-}
|
||||
module Types
|
||||
where
|
||||
import Utils
|
||||
import Ledger.Utils
|
||||
import qualified Data.Map as Map
|
||||
|
||||
-- | a date
|
||||
|
||||
@ -34,7 +34,7 @@ hledger ("Main")
|
||||
"Amount"
|
||||
"Currency"
|
||||
"Types"
|
||||
"Utils"
|
||||
"Ledger.Utils"
|
||||
@
|
||||
|
||||
This module includes some helpers for querying your ledger in ghci. Examples:
|
||||
@ -66,7 +66,7 @@ import Options
|
||||
import Models
|
||||
import Parse (parseLedgerAndDo, parseLedgerFile)
|
||||
import Tests (hunit, quickcheck)
|
||||
import Utils hiding (test)
|
||||
import Ledger.Utils hiding (test)
|
||||
|
||||
|
||||
main :: IO ()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user