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
|
module Account
|
||||||
where
|
where
|
||||||
import Utils
|
import Ledger.Utils
|
||||||
import Types
|
import Types
|
||||||
import AccountName
|
import AccountName
|
||||||
import Amount
|
import Amount
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
module AccountName
|
module AccountName
|
||||||
where
|
where
|
||||||
import Utils
|
import Ledger.Utils
|
||||||
import Types
|
import Types
|
||||||
|
|
||||||
sepchar = ':'
|
sepchar = ':'
|
||||||
|
|||||||
@ -36,7 +36,7 @@ currencies can be converted to a simple amount. Arithmetic examples:
|
|||||||
|
|
||||||
module Amount
|
module Amount
|
||||||
where
|
where
|
||||||
import Utils
|
import Ledger.Utils
|
||||||
import Types
|
import Types
|
||||||
import Currency
|
import Currency
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@ module Currency
|
|||||||
where
|
where
|
||||||
import qualified Data.Map as Map
|
import qualified Data.Map as Map
|
||||||
import Data.Map ((!))
|
import Data.Map ((!))
|
||||||
import Utils
|
import Ledger.Utils
|
||||||
import Types
|
import Types
|
||||||
|
|
||||||
currencies =
|
currencies =
|
||||||
|
|||||||
@ -2,7 +2,7 @@ module Ledger
|
|||||||
where
|
where
|
||||||
import qualified Data.Map as Map
|
import qualified Data.Map as Map
|
||||||
import Data.Map ((!))
|
import Data.Map ((!))
|
||||||
import Utils
|
import Ledger.Utils
|
||||||
import Types
|
import Types
|
||||||
import Amount
|
import Amount
|
||||||
import Account
|
import Account
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
-- standard imports and utilities
|
-- standard imports and utilities
|
||||||
module Utils (
|
module Ledger.Utils (
|
||||||
module Utils,
|
module Ledger.Utils,
|
||||||
module Char,
|
module Char,
|
||||||
module Data.List,
|
module Data.List,
|
||||||
module Data.Tree,
|
module Data.Tree,
|
||||||
@ -1,6 +1,6 @@
|
|||||||
module LedgerEntry
|
module LedgerEntry
|
||||||
where
|
where
|
||||||
import Utils
|
import Ledger.Utils
|
||||||
import Types
|
import Types
|
||||||
import RawTransaction
|
import RawTransaction
|
||||||
import Amount
|
import Amount
|
||||||
|
|||||||
@ -5,7 +5,7 @@ import System.Directory
|
|||||||
import System.Environment (getEnv)
|
import System.Environment (getEnv)
|
||||||
import Data.Maybe (fromMaybe)
|
import Data.Maybe (fromMaybe)
|
||||||
|
|
||||||
import Utils
|
import Ledger.Utils
|
||||||
import Types
|
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 qualified Text.ParserCombinators.Parsec.Token as P
|
||||||
import System.IO
|
import System.IO
|
||||||
|
|
||||||
import Utils
|
import Ledger.Utils
|
||||||
import Models
|
import Models
|
||||||
import Options
|
import Options
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@ module RawLedger
|
|||||||
where
|
where
|
||||||
import qualified Data.Map as Map
|
import qualified Data.Map as Map
|
||||||
|
|
||||||
import Utils
|
import Ledger.Utils
|
||||||
import Types
|
import Types
|
||||||
import AccountName
|
import AccountName
|
||||||
import LedgerEntry
|
import LedgerEntry
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
module RawTransaction
|
module RawTransaction
|
||||||
where
|
where
|
||||||
import Utils
|
import Ledger.Utils
|
||||||
import Types
|
import Types
|
||||||
import AccountName
|
import AccountName
|
||||||
import Amount
|
import Amount
|
||||||
|
|||||||
2
Tests.hs
2
Tests.hs
@ -6,7 +6,7 @@ import Text.ParserCombinators.Parsec
|
|||||||
import Options
|
import Options
|
||||||
import Models
|
import Models
|
||||||
import Parse
|
import Parse
|
||||||
import Utils
|
import Ledger.Utils
|
||||||
|
|
||||||
-- utils
|
-- utils
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
module TimeLog
|
module TimeLog
|
||||||
where
|
where
|
||||||
import Utils
|
import Ledger.Utils
|
||||||
import Types
|
import Types
|
||||||
import Currency
|
import Currency
|
||||||
import Amount
|
import Amount
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
module Transaction
|
module Transaction
|
||||||
where
|
where
|
||||||
import Utils
|
import Ledger.Utils
|
||||||
import Types
|
import Types
|
||||||
import AccountName
|
import AccountName
|
||||||
import LedgerEntry
|
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
|
module Types
|
||||||
where
|
where
|
||||||
import Utils
|
import Ledger.Utils
|
||||||
import qualified Data.Map as Map
|
import qualified Data.Map as Map
|
||||||
|
|
||||||
-- | a date
|
-- | a date
|
||||||
|
|||||||
@ -34,7 +34,7 @@ hledger ("Main")
|
|||||||
"Amount"
|
"Amount"
|
||||||
"Currency"
|
"Currency"
|
||||||
"Types"
|
"Types"
|
||||||
"Utils"
|
"Ledger.Utils"
|
||||||
@
|
@
|
||||||
|
|
||||||
This module includes some helpers for querying your ledger in ghci. Examples:
|
This module includes some helpers for querying your ledger in ghci. Examples:
|
||||||
@ -66,7 +66,7 @@ import Options
|
|||||||
import Models
|
import Models
|
||||||
import Parse (parseLedgerAndDo, parseLedgerFile)
|
import Parse (parseLedgerAndDo, parseLedgerFile)
|
||||||
import Tests (hunit, quickcheck)
|
import Tests (hunit, quickcheck)
|
||||||
import Utils hiding (test)
|
import Ledger.Utils hiding (test)
|
||||||
|
|
||||||
|
|
||||||
main :: IO ()
|
main :: IO ()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user