refactor: hlint

This commit is contained in:
Gregor Kleen 2019-08-12 17:18:05 +02:00
parent 71624e6229
commit f0d0e7444a
2 changed files with 8 additions and 13 deletions

View File

@ -197,13 +197,13 @@ getTermCurrentR :: Handler Html
getTermCurrentR = do
termIds <- runDB $ selectKeysList [TermActive ==. True] [Desc TermName]
case fromNullable termIds of
Nothing -> notFound
(Just (maximum -> tid)) ->
redirect $ (CourseListR, [("courses-term", toPathPiece tid)]) -- redirect avoids problematic breadcrumbs, headings, etc.
Nothing
-> notFound
Just (maximum -> tid)
-> redirect (CourseListR, [("courses-term", toPathPiece tid)]) -- redirect avoids problematic breadcrumbs, headings, etc.
getTermSchoolCourseListR :: TermId -> SchoolId -> Handler Html
getTermSchoolCourseListR tid ssh = redirect $ (CourseListR, [("courses-term", toPathPiece tid), ("courses-schoolshort", toPathPiece ssh)])
getTermSchoolCourseListR tid ssh = redirect (CourseListR, [("courses-term", toPathPiece tid), ("courses-schoolshort", toPathPiece ssh)])
getTermCourseListR :: TermId -> Handler Html
getTermCourseListR tid = redirect $ (CourseListR, [("courses-term", toPathPiece tid)])
getTermCourseListR tid = redirect (CourseListR, [("courses-term", toPathPiece tid)])

View File

@ -676,13 +676,8 @@ peekN n = do
-- Alternative --
-----------------
-- Linter complains to use asum instead, but requires a more specific type signature:
-- choice :: forall f mono a. (Alternative f, MonoFoldable mono, Element mono ~ f a) => mono -> f a
-- choice = foldr (<|>) empty
choice :: (Foldable t, Alternative f) => t (f a) -> f a
choice = asum --
choice :: forall f mono a. (Alternative f, MonoFoldable mono, Element mono ~ f a) => mono -> f a
choice = foldr (<|>) empty
--------------
-- Sessions --