diff --git a/Ledger/Parse.hs b/Ledger/Parse.hs index 67079ee60..c37b568a6 100644 --- a/Ledger/Parse.hs +++ b/Ledger/Parse.hs @@ -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" diff --git a/Ledger/TimeLog.hs b/Ledger/TimeLog.hs index 6a87264fc..f4f355f89 100644 --- a/Ledger/TimeLog.hs +++ b/Ledger/TimeLog.hs @@ -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. diff --git a/Ledger/Types.hs b/Ledger/Types.hs index bea7695eb..d3239816e 100644 --- a/Ledger/Types.hs +++ b/Ledger/Types.hs @@ -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, diff --git a/Tests.hs b/Tests.hs index 4a136070a..a821b978e 100644 --- a/Tests.hs +++ b/Tests.hs @@ -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