on master help sign in
Use ascending list for serializing where possible.
788a37cJasper Van der Jeugt
src/Text/Hakyll/Page.hs+2−2
@@ -149,5 +149,5 @@ instance Renderable Page where
149
149
150-- Make pages serializable.
150-- Make pages serializable.
151instance Binary Page where
151instance Binary Page where
152− put (Page context) = put $ M.toList context
152+ put (Page context) = put $ M.toAscList context
153− get = liftM (Page . M.fromList) get
153+ get = liftM (Page . M.fromAscList) get
src/Text/Hakyll/Tags.hs+2−2
@@ -45,9 +45,9 @@ readTagMap :: String -- ^ Unique identifier for the tagmap.
45 -> Hakyll (M.Map String [FilePath])
45 -> Hakyll (M.Map String [FilePath])
46readTagMap identifier paths = do
46readTagMap identifier paths = do
47 isCacheMoreRecent' <- isCacheMoreRecent fileName paths
47 isCacheMoreRecent' <- isCacheMoreRecent fileName paths
48− if isCacheMoreRecent' then M.fromList <$> getFromCache fileName
48+ if isCacheMoreRecent' then M.fromAscList <$> getFromCache fileName
49 else do tagMap <- readTagMap'
49 else do tagMap <- readTagMap'
50− storeInCache (M.toList tagMap) fileName
50+ storeInCache (M.toAscList tagMap) fileName
51 return tagMap
51 return tagMap
52 where
52 where
53 fileName = "_tagmap" </> identifier
53 fileName = "_tagmap" </> identifier