From 9a239789fab093a5baa810dd474458327c4b771c Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Wed, 30 May 2012 10:16:37 +0000 Subject: [PATCH] apply journal updates in the order they were parsed, not the reverse (!) Fixes the order of include files in stats command. --- hledger-lib/Hledger/Read/JournalReader.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hledger-lib/Hledger/Read/JournalReader.hs b/hledger-lib/Hledger/Read/JournalReader.hs index ec56bdfb3..d4ad2ca4e 100644 --- a/hledger-lib/Hledger/Read/JournalReader.hs +++ b/hledger-lib/Hledger/Read/JournalReader.hs @@ -79,7 +79,7 @@ parse _ = -- trace ("running "++format++" reader") . -- | Flatten a list of JournalUpdate's into a single equivalent one. combineJournalUpdates :: [JournalUpdate] -> JournalUpdate -combineJournalUpdates us = liftM (foldr (.) id) $ sequence us +combineJournalUpdates us = liftM (foldr (flip (.)) id) $ sequence us -- | Given a JournalUpdate-generating parsec parser, file path and data string, -- parse and post-process a Journal so that it's ready to use, or give an error.