diff --git a/src/Handler/Course/List.hs b/src/Handler/Course/List.hs index f2bab2d7c..4a29f3851 100644 --- a/src/Handler/Course/List.hs +++ b/src/Handler/Course/List.hs @@ -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)]) diff --git a/src/Utils.hs b/src/Utils.hs index e284921da..795787841 100644 --- a/src/Utils.hs +++ b/src/Utils.hs @@ -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 --