From 6b680c98873b91392e8e89d9ec4f008050f95f19 Mon Sep 17 00:00:00 2001 From: Simonas Kazlauskas Date: Sat, 23 Feb 2013 13:38:34 +0200 Subject: Fix code style --- src/Hakyll/Web/Template/List.hs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/Hakyll/Web/Template/List.hs b/src/Hakyll/Web/Template/List.hs index 1401119..9571b9e 100644 --- a/src/Hakyll/Web/Template/List.hs +++ b/src/Hakyll/Web/Template/List.hs @@ -61,10 +61,12 @@ applyJoinTemplateList delimiter tpl context items = do -- @year-month-day-title.extension@ naming scheme -- as is the convention in -- Hakyll. chronological :: MonadMetadata m => [Item a] -> m [Item a] -chronological = sortByM $ getItemUTC defaultTimeLocale . itemIdentifier - where sortByM :: (Monad m, Ord k) => (a -> m k) -> [a] -> m [a] - sortByM f xs = liftM (map fst . sortBy (comparing snd)) $ - mapM (\x -> liftM (x,) (f x)) xs +chronological = + sortByM $ getItemUTC defaultTimeLocale . itemIdentifier + where + sortByM :: (Monad m, Ord k) => (a -> m k) -> [a] -> m [a] + sortByM f xs = liftM (map fst . sortBy (comparing snd)) $ + mapM (\x -> liftM (x,) (f x)) xs -------------------------------------------------------------------------------- -- | The reverse of 'chronological' -- cgit v1.2.3