diff --git a/src/Handler/Course.hs b/src/Handler/Course.hs index 3b95e77a1..080e444ec 100644 --- a/src/Handler/Course.hs +++ b/src/Handler/Course.hs @@ -1,7 +1,6 @@ {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} -{-# LANGUAGE OverloadedLists #-} {-# LANGUAGE MultiWayIf #-} {-# LANGUAGE PartialTypeSignatures #-} {-# LANGUAGE RecordWildCards, NamedFieldPuns, TupleSections #-} @@ -99,7 +98,7 @@ makeCourseTable whereClause colChoices psValidator = do { dbtSQLQuery , dbtColonnade = colChoices , dbtProj - , dbtSorting = + , dbtSorting = Map.fromList -- OverloadedLists does not work with the templates here [ ( "course", SortColumn $ \course -> course E.^. CourseName) , ( "cshort", SortColumn $ \course -> course E.^. CourseShorthand) , ( "term" , SortColumn $ \course -> course E.^. CourseTerm) @@ -110,7 +109,7 @@ makeCourseTable whereClause colChoices psValidator = do , ( "registered", SortColumn $ course2Registered muid ) ] - , dbtFilter = + , dbtFilter = Map.fromList -- OverloadedLists does not work with the templates here [ ( "course", FilterColumn $ \(course :: CourseTableExpr) criterias -> if | Set.null criterias -> E.val True :: E.SqlExpr (E.Value Bool) | otherwise -> course E.^. CourseName `E.in_` E.valList (Set.toList criterias)