Use ascending list for serializing where possible.

This commit is contained in:
Jasper Van der Jeugt 2010-01-24 11:55:40 +01:00
parent 4295de01bc
commit 788a37cd3e
2 changed files with 4 additions and 4 deletions

View file

@ -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

View file

@ -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