diff --git a/src/Handler/Utils/Exam.hs b/src/Handler/Utils/Exam.hs index 9ccb492d4..a7188cb0f 100644 --- a/src/Handler/Utils/Exam.hs +++ b/src/Handler/Utils/Exam.hs @@ -1,5 +1,3 @@ -{-# OPTIONS_GHC -fno-warn-deprecations #-} - module Handler.Utils.Exam ( fetchExamAux , fetchExam, fetchExamId, fetchCourseIdExamId, fetchCourseIdExam @@ -365,14 +363,14 @@ examAutoOccurrence (hash -> seed) rule ExamAutoOccurrenceConfig{..} occurrences = breakCost (wordIx # pred j) (wordIx # j) | otherwise = 0 - traceM $ show ( i - , j - , potWidth - , w - , (fromRational :: Rational -> Centi) <$> prevMin - , (fromRational :: Rational -> Centi) <$> widthCost potWidth w - , (fromRational :: Rational -> Centi) <$> breakCost' - ) + -- traceM $ show ( i + -- , j + -- , potWidth + -- , w + -- , (fromRational :: Rational -> Centi) <$> prevMin + -- , (fromRational :: Rational -> Centi) <$> widthCost potWidth w + -- , (fromRational :: Rational -> Centi) <$> breakCost' + -- ) when (isFinite cost) $ do minCost <- ST.readArray minima j when (cost < minCost) $ do @@ -381,13 +379,13 @@ examAutoOccurrence (hash -> seed) rule ExamAutoOccurrenceConfig{..} occurrences go i' $ succ j | otherwise = return () in go i' $ succ i' - traceM . show . map (fmap (fromRational :: Rational -> Centi)) =<< ST.getElems minima - traceM . show =<< ST.getElems breaks + -- traceM . show . map (fmap (fromRational :: Rational -> Centi)) =<< ST.getElems minima + -- traceM . show =<< ST.getElems breaks let accumResult lineIx j (accCost, accMap) = do i <- ST.readArray breaks j accCost' <- (+) accCost <$> ST.readArray minima j - traceM $ show ((fromRational :: Rational -> Centi) <$> accCost', lineIx, (i, pred j)) + -- traceM $ show ((fromRational :: Rational -> Centi) <$> accCost', lineIx, (i, pred j)) let accMap' = (lineIxs List.!! lineIx, map (review wordIx) [i .. pred j]) : accMap if | i > 0 -> accumResult (succ lineIx) i (accCost', accMap')