From 6cdfe0891b5aafc4c2107facbb38734663af975f Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Fri, 2 Nov 2018 14:32:47 +0100 Subject: [PATCH] Address warnings --- src/Foundation.hs | 2 +- src/Handler/Corrections.hs | 2 +- src/Handler/Sheet.hs | 2 +- src/Handler/Utils/Table/Cells.hs | 2 +- templates/widgets/sheetTypeSummary.hamlet | 72 +++++++++++------------ 5 files changed, 40 insertions(+), 40 deletions(-) diff --git a/src/Foundation.hs b/src/Foundation.hs index 09aa9b86e..435c8a838 100644 --- a/src/Foundation.hs +++ b/src/Foundation.hs @@ -223,7 +223,7 @@ embedRenderMessage ''UniWorX ''SheetType ("SheetType" <>) newtype SheetTypeComplete = SheetTypeComplete SheetType instance RenderMessage UniWorX (SheetTypeComplete) where - renderMessage foundation ls (SheetTypeComplete st) = case st of + renderMessage foundation ls (SheetTypeComplete sheetType) = case sheetType of NotGraded -> mr NotGraded other -> mr (grading other) <> ", " <> mr other where diff --git a/src/Handler/Corrections.hs b/src/Handler/Corrections.hs index a905b93f7..6a16862f2 100644 --- a/src/Handler/Corrections.hs +++ b/src/Handler/Corrections.hs @@ -234,7 +234,7 @@ makeCorrectionsTable whereClause dbtColonnade psValidator dbtProj' = do ) , ( "assignedtime" , SortColumn $ \((_ `E.InnerJoin` _ `E.InnerJoin` submission) `E.LeftOuterJoin` _) -> submission E.^. SubmissionRatingAssigned - ) + ) ] , dbtFilter = Map.fromList [ ( "term" diff --git a/src/Handler/Sheet.hs b/src/Handler/Sheet.hs index e39006646..840601eb1 100644 --- a/src/Handler/Sheet.hs +++ b/src/Handler/Sheet.hs @@ -208,7 +208,7 @@ getSheetListR tid ssh csh = do E.&&. submissionUser E.?. SubmissionUserUser E.==. E.val muid E.where_ $ sheet E.^. SheetCourse E.==. E.val cid return (sheet E.^. SheetType, submission E.?. SubmissionRatingPoints) - return $ foldMap (\(E.Value st, E.Value mbPts) -> sheetTypeSum st (join mbPts)) rows + return $ foldMap (\(E.Value sheetType, E.Value mbPts) -> sheetTypeSum sheetType (join mbPts)) rows (_, table) <- dbTable psValidator $ DBTable -- END ISSUE #223 ----------------------------------------------------- diff --git a/src/Handler/Utils/Table/Cells.hs b/src/Handler/Utils/Table/Cells.hs index 76da2088f..8dc0e38ee 100644 --- a/src/Handler/Utils/Table/Cells.hs +++ b/src/Handler/Utils/Table/Cells.hs @@ -84,7 +84,7 @@ sheetCell crse shn = in anchorCell link $ display2widget shn sheetTypeCell :: IsDBTable m a => SheetType -> DBCell m a -sheetTypeCell st = i18nCell $ SheetTypeComplete st +sheetTypeCell sheetType = i18nCell $ SheetTypeComplete sheetType submissionCell :: IsDBTable m a => CourseLink -> SheetName -> SubmissionId -> DBCell m a submissionCell crse shn sid = diff --git a/templates/widgets/sheetTypeSummary.hamlet b/templates/widgets/sheetTypeSummary.hamlet index 4a86f9a34..38fc7db3d 100644 --- a/templates/widgets/sheetTypeSummary.hamlet +++ b/templates/widgets/sheetTypeSummary.hamlet @@ -1,38 +1,38 @@ $with realGrades <- normalSummary <> bonusSummary - $with allGrades <- realGrades <> informationalSummary -
-