dangit.. simplify combineJournalUpdates for real
This commit is contained in:
parent
3be88ad6b5
commit
8214a6ccef
@ -105,9 +105,8 @@ genericSourcePos p = GenericSourcePos (sourceName p) (sourceLine p) (sourceColum
|
|||||||
-- monadic actions which can do IO or raise an exception) into a
|
-- monadic actions which can do IO or raise an exception) into a
|
||||||
-- single equivalent action.
|
-- single equivalent action.
|
||||||
combineJournalUpdates :: [JournalUpdate] -> JournalUpdate
|
combineJournalUpdates :: [JournalUpdate] -> JournalUpdate
|
||||||
combineJournalUpdates us = liftM (foldl' (\acc new x -> new (acc x)) id) $ sequence us
|
combineJournalUpdates us = foldl' (flip (.)) id <$> sequence us
|
||||||
-- XXX may be contributing to excessive stack use
|
-- XXX may be contributing to excessive stack use
|
||||||
--combineJournalUpdates us = foldl' (flip (.)) id <$> sequence us
|
|
||||||
|
|
||||||
-- cf http://neilmitchell.blogspot.co.uk/2015/09/detecting-space-leaks.html
|
-- cf http://neilmitchell.blogspot.co.uk/2015/09/detecting-space-leaks.html
|
||||||
-- $ ./devprof +RTS -K576K -xc
|
-- $ ./devprof +RTS -K576K -xc
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user