@@ -1020,6 +1020,7 @@ elabClauses info fc opts n_in cs = let n = liftname info n_in in
1020 let tot = if pcover || AssertTotal `elem` opts
1020 let tot = if pcover || AssertTotal `elem` opts
1021 then Unchecked -- finish checking later
1021 then Unchecked -- finish checking later
1022 else Partial NotCovering -- already know it's not total
1022 else Partial NotCovering -- already know it's not total
1023 -- case lookupCtxt (namespace info) n (idris_flags ist) of
1024 -- case lookupCtxt (namespace info) n (idris_flags ist) of
1024 -- [fs] -> if TotalFn `elem` fs
1025 -- [fs] -> if TotalFn `elem` fs
1025 -- then case tot of
1026 -- then case tot of
@@ -1075,7 +1076,10 @@ elabClauses info fc opts n_in cs = let n = liftname info n_in in
1075 return ()
1076 return ()
1076 -- addIBC (IBCTotal n tot)
1077 -- addIBC (IBCTotal n tot)
1077 [] -> return ()
1078 [] -> return ()
1078− return ()
1079+ -- Check it's covering, if 'covering' option is used. Chase
1080+ -- all called functions, and fail if any of them are also
1081+ -- 'Partial NotCovering'
1082+ when (CoveringFn `elem` opts) $ checkAllCovering fc [] n n
1080 noMatch i cs tm = all (\x -> case matchClause i (delab' i x True True) tm of
1084 noMatch i cs tm = all (\x -> case matchClause i (delab' i x True True) tm of
1081 Right _ -> False
1085 Right _ -> False