@@ -370,7 +370,16 @@ checkDeclTotality (fc, n)
370370 = do logLvl 2 $ "Checking " ++ show n ++ " for totality"
371371-- buildSCG (fc, n)
372372-- logLvl 2 $ "Built SCG"
373− checkTotality [] fc n
373+ i <- getIState
374+ let opts = case lookupCtxt n (idris_flags i) of
375+ [fs] -> fs
376+ _ -> []
377+ case lookupDef n (tt_ctxt i) of
378+ [CaseOp _ _ _ pats _] ->
379+ if AssertTotal `elem` opts
380+ then return $ Total []
381+ else checkTotality [] fc n
382+ _ -> checkTotality [] fc n
374383
375384-- Calculate the size change graph for this definition
376385