diff options
author | Simonas Kazlauskas <git@kazlauskas.me> | 2013-02-23 13:38:34 +0200 |
---|---|---|
committer | Simonas Kazlauskas <git@kazlauskas.me> | 2013-02-23 13:38:34 +0200 |
commit | 6b680c98873b91392e8e89d9ec4f008050f95f19 (patch) | |
tree | 2752c6566733f838ed4105b58a30a7ec37123824 /src/Hakyll | |
parent | 45c618b413b69d119354e63dafbf96533a7ee849 (diff) | |
download | hakyll-6b680c98873b91392e8e89d9ec4f008050f95f19.tar.gz |
Fix code style
Diffstat (limited to 'src/Hakyll')
-rw-r--r-- | src/Hakyll/Web/Template/List.hs | 10 |
1 files changed, 6 insertions, 4 deletions
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' |