@@ -442,12 +442,18 @@ checkDeclTotality (fc, n)
443 when (CoveringFn `elem` opts) $ checkAllCovering fc [] n n
443 when (CoveringFn `elem` opts) $ checkAllCovering fc [] n n
444 t <- checkTotality [] fc n
444 t <- checkTotality [] fc n
445+ let acc = case lookupDefAccExact n False (tt_ctxt i) of
445 case t of
448 case t of
446 -- if it's not total, it can't reduce, to keep
449 -- if it's not total, it can't reduce, to keep
447− -- typechecking decidable
450+ -- typechecking decidable.
451+ -- So if it's currently public export, set it as
453+ p@(Partial _) -> do let newacc = max Frozen acc
448− p@(Partial _) -> do setAccessibility n Frozen
454+ setAccessibility n newacc
449− addIBC (IBCAccess n Frozen)
455+ addIBC (IBCAccess n newacc)
450− logCoverage 5 $ "HIDDEN: "
456+ logCoverage 5 $ "Set to " ++ show newacc ++ ":"
451 ++ show n ++ show p
457 ++ show n ++ show p
452 _ -> return ()
458 _ -> return ()