refactor: hlint
This commit is contained in:
parent
71624e6229
commit
f0d0e7444a
@ -197,13 +197,13 @@ getTermCurrentR :: Handler Html
|
|||||||
getTermCurrentR = do
|
getTermCurrentR = do
|
||||||
termIds <- runDB $ selectKeysList [TermActive ==. True] [Desc TermName]
|
termIds <- runDB $ selectKeysList [TermActive ==. True] [Desc TermName]
|
||||||
case fromNullable termIds of
|
case fromNullable termIds of
|
||||||
Nothing -> notFound
|
Nothing
|
||||||
(Just (maximum -> tid)) ->
|
-> notFound
|
||||||
redirect $ (CourseListR, [("courses-term", toPathPiece tid)]) -- redirect avoids problematic breadcrumbs, headings, etc.
|
Just (maximum -> tid)
|
||||||
|
-> redirect (CourseListR, [("courses-term", toPathPiece tid)]) -- redirect avoids problematic breadcrumbs, headings, etc.
|
||||||
|
|
||||||
getTermSchoolCourseListR :: TermId -> SchoolId -> Handler Html
|
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 :: TermId -> Handler Html
|
||||||
getTermCourseListR tid = redirect $ (CourseListR, [("courses-term", toPathPiece tid)])
|
getTermCourseListR tid = redirect (CourseListR, [("courses-term", toPathPiece tid)])
|
||||||
|
|||||||
@ -676,13 +676,8 @@ peekN n = do
|
|||||||
-- Alternative --
|
-- 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 :: forall f mono a. (Alternative f, MonoFoldable mono, Element mono ~ f a) => mono -> f a
|
choice = foldr (<|>) empty
|
||||||
-- choice = foldr (<|>) empty
|
|
||||||
choice :: (Foldable t, Alternative f) => t (f a) -> f a
|
|
||||||
choice = asum --
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
--------------
|
--------------
|
||||||
-- Sessions --
|
-- Sessions --
|
||||||
|
|||||||
Reference in New Issue
Block a user