@@ -61,10 +61,12 @@ applyJoinTemplateList delimiter tpl context items = do
6161-- @year-month-day-title.extension@ naming scheme -- as is the convention in
6262-- Hakyll.
6363chronological :: MonadMetadata m => [Item a] -> m [Item a]
64−chronological = sortByM $ getItemUTC defaultTimeLocale . itemIdentifier
65− where sortByM :: (Monad m, Ord k) => (a -> m k) -> [a] -> m [a]
66− sortByM f xs = liftM (map fst . sortBy (comparing snd)) $
67− mapM (\x -> liftM (x,) (f x)) xs
64+chronological =
65+ sortByM $ getItemUTC defaultTimeLocale . itemIdentifier
66+ where
67+ sortByM :: (Monad m, Ord k) => (a -> m k) -> [a] -> m [a]
68+ sortByM f xs = liftM (map fst . sortBy (comparing snd)) $
69+ mapM (\x -> liftM (x,) (f x)) xs
6870
6971--------------------------------------------------------------------------------
7072-- | The reverse of 'chronological'