From 788a37cd3ea28e890c3f6f4ffca087e580dafcbd Mon Sep 17 00:00:00 2001 From: Jasper Van der Jeugt Date: Sun, 24 Jan 2010 11:55:40 +0100 Subject: Use ascending list for serializing where possible. --- src/Text/Hakyll/Page.hs | 4 ++-- src/Text/Hakyll/Tags.hs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Text/Hakyll/Page.hs b/src/Text/Hakyll/Page.hs index b9507b6..0cf86ee 100644 --- a/src/Text/Hakyll/Page.hs +++ b/src/Text/Hakyll/Page.hs @@ -149,5 +149,5 @@ instance Renderable Page where -- Make pages serializable. instance Binary Page where - put (Page context) = put $ M.toList context - get = liftM (Page . M.fromList) get + put (Page context) = put $ M.toAscList context + get = liftM (Page . M.fromAscList) get diff --git a/src/Text/Hakyll/Tags.hs b/src/Text/Hakyll/Tags.hs index 6a179a5..efd7bed 100644 --- a/src/Text/Hakyll/Tags.hs +++ b/src/Text/Hakyll/Tags.hs @@ -45,9 +45,9 @@ readTagMap :: String -- ^ Unique identifier for the tagmap. -> Hakyll (M.Map String [FilePath]) readTagMap identifier paths = do isCacheMoreRecent' <- isCacheMoreRecent fileName paths - if isCacheMoreRecent' then M.fromList <$> getFromCache fileName + if isCacheMoreRecent' then M.fromAscList <$> getFromCache fileName else do tagMap <- readTagMap' - storeInCache (M.toList tagMap) fileName + storeInCache (M.toAscList tagMap) fileName return tagMap where fileName = "_tagmap" identifier -- cgit v1.2.3