drop TimeLog, it's no longer needed

This commit is contained in:
Simon Michael 2009-04-03 11:05:16 +00:00
parent bfed30d8d1
commit d8fe2aabb2
4 changed files with 1 additions and 26 deletions

View File

@ -509,7 +509,7 @@ numberpartsstartingwithpoint = do
return ("",frac)
{-| Parse a timelog file. Here is the timelog grammar, from timeclock.el 2.6:
{-| Parse a timelog entry. Here is the timelog grammar from timeclock.el 2.6:
@
A timelog contains data in the form of a single entry per line.
@ -545,12 +545,6 @@ i 2007/03/10 12:26:00 hledger
o 2007/03/10 17:26:02
-}
timelog :: GenParser Char LedgerFileCtx TimeLog
timelog = do
entries <- many timelogentry <?> "timelog entry"
eof
return $ TimeLog entries
timelogentry :: GenParser Char LedgerFileCtx TimeLogEntry
timelogentry = do
code <- oneOf "bhioO"

View File

@ -18,9 +18,6 @@ import Ledger.LedgerTransaction
instance Show TimeLogEntry where
show t = printf "%s %s %s" (show $ tlcode t) (show $ tldatetime t) (tlcomment t)
instance Show TimeLog where
show tl = printf "TimeLog with %d entries" $ length $ timelog_entries tl
-- | Convert time log entries to ledger transactions. When there is no
-- clockout, add one with the provided current time. Sessions crossing
-- midnight are split into days to give accurate per-day totals.

View File

@ -112,10 +112,6 @@ data TimeLogEntry = TimeLogEntry {
tlcomment :: String
} deriving (Eq,Ord)
data TimeLog = TimeLog {
timelog_entries :: [TimeLogEntry]
} deriving (Eq)
data Transaction = Transaction {
tnum :: Int,
status :: Bool,

View File

@ -734,9 +734,6 @@ tests = [
nulltxn{date=parsedate "2008/01/01",description="- 2008/12/31",account="",amount=Mixed [dollars 15]}
]
,"timelog" ~: do
parseWithCtx timelog timelog1_str `parseis` timelog1
,"transactionamount" ~: do
parseWithCtx transactionamount " $47.18" `parseis` Mixed [dollars 47.18]
parseWithCtx transactionamount " $1." `parseis`
@ -1135,15 +1132,6 @@ timelogentry1 = TimeLogEntry 'i' (parsedatetime "2007/03/11 16:19:00") "hledger"
timelogentry2_str = "o 2007/03/11 16:30:00\n"
timelogentry2 = TimeLogEntry 'o' (parsedatetime "2007/03/11 16:30:00") ""
timelog1_str = concat [
timelogentry1_str,
timelogentry2_str
]
timelog1 = TimeLog [
timelogentry1,
timelogentry2
]
price1_str = "P 2004/05/01 XYZ $55\n"
price1 = HistoricalPrice (parsedate "2004/05/01") "XYZ" "$" 55