chore: remove traces
This commit is contained in:
parent
3bd7520087
commit
7140618a5c
@ -1,5 +1,3 @@
|
|||||||
{-# OPTIONS_GHC -fno-warn-deprecations #-}
|
|
||||||
|
|
||||||
module Handler.Utils.Exam
|
module Handler.Utils.Exam
|
||||||
( fetchExamAux
|
( fetchExamAux
|
||||||
, fetchExam, fetchExamId, fetchCourseIdExamId, fetchCourseIdExam
|
, fetchExam, fetchExamId, fetchCourseIdExamId, fetchCourseIdExam
|
||||||
@ -365,14 +363,14 @@ examAutoOccurrence (hash -> seed) rule ExamAutoOccurrenceConfig{..} occurrences
|
|||||||
= breakCost (wordIx # pred j) (wordIx # j)
|
= breakCost (wordIx # pred j) (wordIx # j)
|
||||||
| otherwise
|
| otherwise
|
||||||
= 0
|
= 0
|
||||||
traceM $ show ( i
|
-- traceM $ show ( i
|
||||||
, j
|
-- , j
|
||||||
, potWidth
|
-- , potWidth
|
||||||
, w
|
-- , w
|
||||||
, (fromRational :: Rational -> Centi) <$> prevMin
|
-- , (fromRational :: Rational -> Centi) <$> prevMin
|
||||||
, (fromRational :: Rational -> Centi) <$> widthCost potWidth w
|
-- , (fromRational :: Rational -> Centi) <$> widthCost potWidth w
|
||||||
, (fromRational :: Rational -> Centi) <$> breakCost'
|
-- , (fromRational :: Rational -> Centi) <$> breakCost'
|
||||||
)
|
-- )
|
||||||
when (isFinite cost) $ do
|
when (isFinite cost) $ do
|
||||||
minCost <- ST.readArray minima j
|
minCost <- ST.readArray minima j
|
||||||
when (cost < minCost) $ do
|
when (cost < minCost) $ do
|
||||||
@ -381,13 +379,13 @@ examAutoOccurrence (hash -> seed) rule ExamAutoOccurrenceConfig{..} occurrences
|
|||||||
go i' $ succ j
|
go i' $ succ j
|
||||||
| otherwise = return ()
|
| otherwise = return ()
|
||||||
in go i' $ succ i'
|
in go i' $ succ i'
|
||||||
traceM . show . map (fmap (fromRational :: Rational -> Centi)) =<< ST.getElems minima
|
-- traceM . show . map (fmap (fromRational :: Rational -> Centi)) =<< ST.getElems minima
|
||||||
traceM . show =<< ST.getElems breaks
|
-- traceM . show =<< ST.getElems breaks
|
||||||
|
|
||||||
let accumResult lineIx j (accCost, accMap) = do
|
let accumResult lineIx j (accCost, accMap) = do
|
||||||
i <- ST.readArray breaks j
|
i <- ST.readArray breaks j
|
||||||
accCost' <- (+) accCost <$> ST.readArray minima 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
|
let accMap' = (lineIxs List.!! lineIx, map (review wordIx) [i .. pred j]) : accMap
|
||||||
if
|
if
|
||||||
| i > 0 -> accumResult (succ lineIx) i (accCost', accMap')
|
| i > 0 -> accumResult (succ lineIx) i (accCost', accMap')
|
||||||
|
|||||||
Reference in New Issue
Block a user