This commit is contained in:
Simon Michael 2016-02-21 02:37:59 -08:00
parent 5acb82e627
commit 931a1d5b9e
2 changed files with 4 additions and 5 deletions

View File

@ -64,11 +64,10 @@ import Data.List
-- import Data.Map (findWithDefault) -- import Data.Map (findWithDefault)
import Data.Maybe import Data.Maybe
import Data.Ord import Data.Ord
import Safe (headMay) import Safe (headMay, headDef)
import Data.Time.Calendar import Data.Time.Calendar
import Data.Time.LocalTime import Data.Time.LocalTime
import Data.Tree import Data.Tree
import Safe (headDef)
import System.Time (ClockTime(TOD)) import System.Time (ClockTime(TOD))
import Test.HUnit import Test.HUnit
import Text.Printf import Text.Printf
@ -173,11 +172,11 @@ journalTransactionAt Journal{jtxns=ts} i =
-- | Get the transaction that appeared immediately after this one in the input stream, if any. -- | Get the transaction that appeared immediately after this one in the input stream, if any.
journalNextTransaction :: Journal -> Transaction -> Maybe Transaction journalNextTransaction :: Journal -> Transaction -> Maybe Transaction
journalNextTransaction j t = journalTransactionAt j (tindex t + 1) journalNextTransaction j t = journalTransactionAt j (tindex t + 1)
-- | Get the transaction that appeared immediately before this one in the input stream, if any. -- | Get the transaction that appeared immediately before this one in the input stream, if any.
journalPrevTransaction :: Journal -> Transaction -> Maybe Transaction journalPrevTransaction :: Journal -> Transaction -> Maybe Transaction
journalPrevTransaction j t = journalTransactionAt j (tindex t - 1) journalPrevTransaction j t = journalTransactionAt j (tindex t - 1)
-- | Unique transaction descriptions used in this journal. -- | Unique transaction descriptions used in this journal.
journalDescriptions :: Journal -> [String] journalDescriptions :: Journal -> [String]
journalDescriptions = nub . sort . map tdescription . jtxns journalDescriptions = nub . sort . map tdescription . jtxns

View File

@ -143,4 +143,4 @@ main = do
-- can't do anything here, hakyll exits -- can't do anything here, hakyll exits
linkReadmeToIndex = system "ln -sf README.html _site/index.html" >> return () linkReadmeToIndex = void $ system "ln -sf README.html _site/index.html"