diff --git a/src/Handler/Utils/Exam.hs b/src/Handler/Utils/Exam.hs index 596700220..9a63a6ac3 100644 --- a/src/Handler/Utils/Exam.hs +++ b/src/Handler/Utils/Exam.hs @@ -45,6 +45,7 @@ import qualified Data.Array as Array import Data.Array.ST (STArray, STUArray) import qualified Data.Array.ST as ST +import Data.Foldable (foldMap') import Data.List (findIndex, unfoldr) import qualified Data.List as List @@ -392,7 +393,7 @@ examAutoOccurrence (hash -> seed) rule ExamAutoOccurrenceConfig{..} occurrences | otherwise -> Map.singleton [] $ Map.keysSet users occurrencesSize :: ExamOccurrenceCapacity - occurrencesSize = fold occurrences' + occurrencesSize = foldMap' (view _2) occurrences'' occurrences' :: Map ExamOccurrenceId ExamOccurrenceCapacity -- ^ reduce room capacity for every pre-assigned user by 1