refactor: hlint
This commit is contained in:
parent
71624e6229
commit
f0d0e7444a
@ -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)])
|
||||
|
||||
@ -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 --
|
||||
|
||||
Loading…
Reference in New Issue
Block a user