Skip to content

Commit

Permalink
hlint
Browse files Browse the repository at this point in the history
  • Loading branch information
koterpillar committed Feb 11, 2020
1 parent 1356906 commit 033914b
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/Types/Language.hs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ instance A.FromJSON ISO639_1 where
parseJSON _ = mzero

instance A.FromJSONKey ISO639_1 where
fromJSONKey = A.FromJSONKeyTextParser $ parseLanguageM
fromJSONKey = A.FromJSONKeyTextParser parseLanguageM

-- | Newtype for parsing either a single value or a map of values
newtype LanguageChoices a =
Expand Down
4 changes: 1 addition & 3 deletions src/Views.hs
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,7 @@ paginate size page allItems = Paginated prev items next
| otherwise = Just (page + 1)

render :: MonadReader AppData m => HtmlUrl Sitemap -> m Markup
render html = do
r <- routeURLParams
pure $ html r
render html = html <$> routeURLParams

askLangStringFn ::
MonadReader AppData m => LanguagePreference -> m (Text -> Text)
Expand Down
2 changes: 0 additions & 2 deletions testsuite/TestModels.hs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{-# OPTIONS_GHC -F -pgmF htfpp #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# OPTIONS_GHC -fno-warn-missing-signatures #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}

module TestModels where

Expand Down
3 changes: 1 addition & 2 deletions testsuite/TestRoutes.hs
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ test_meta_URL = do
assertEqual (Just $ MetaView "meta" Nothing) (parseURL "/meta/")
assertEqual "/meta.pdf" (routeURL $ MetaView "meta" (Just Pdf))

test_feed_URL = do
assertEqual "/feed/en" (routeURL $ Feed EN)
test_feed_URL = assertEqual "/feed/en" (routeURL $ Feed EN)

prop_routeURL_parseURL route =
let url = routeURL route
Expand Down

0 comments on commit 033914b

Please sign in to comment.