@@ -181,7 +181,12 @@ data ConsoleWidth = InfinitelyWide -- ^ Have pretty-printer assume that lines sh
181181 | AutomaticWidth -- ^ Attempt to determine width, or 80 otherwise
182182 deriving (Show, Eq)
183183
184−
184+-- | If a function has no totality annotation, what do we assume?
185+data DefaultTotality = DefaultCheckingTotal -- ^ Total
186+ | DefaultCheckingPartial -- ^ Partial
187+ | DefaultCheckingCovering -- ^Total coverage, but may diverge
188+ deriving (Show, Eq)
189+
185190-- | The global state used in the Idris monad
186191data IState = IState {
187192 tt_ctxt :: Context, -- ^ All the currently defined names and their terms
@@ -244,7 +249,7 @@ data IState = IState {
244249 idris_parsedSpan :: Maybe FC,
245250 hide_list :: Ctxt Accessibility,
246251 default_access :: Accessibility,
247− default_total :: Bool,
252+ default_total :: DefaultTotality,
248253 ibc_write :: [IBCWrite],
249254 compiled_so :: Maybe String,
250255 idris_dynamic_libs :: [DynamicLib],
@@ -360,7 +365,7 @@ idrisInit = IState initContext S.empty []
360365 emptyContext emptyContext emptyContext emptyContext
361366 emptyContext
362367 [] [] [] defaultOpts 6 [] [] [] [] emptySyntaxRules [] [] [] [] [] [] []
363− [] [] Nothing [] Nothing [] [] Nothing Nothing emptyContext Private False [] Nothing [] []
368+ [] [] Nothing [] Nothing [] [] Nothing Nothing emptyContext Private DefaultCheckingPartial [] Nothing [] []
364369 (RawOutput stdout) True defaultTheme [] (0, emptyContext) emptyContext M.empty
365370 AutomaticWidth S.empty S.empty [] Nothing Nothing [] [] M.empty [] [] []
366371 emptyContext S.empty M.empty emptyContext
@@ -767,7 +772,7 @@ data Directive = DLib Codegen String
767772 | DHide Name
768773 | DFreeze Name
769774 | DAccess Accessibility
770− | DDefault Bool
775+ | DDefault DefaultTotality
771776 | DLogging Integer
772777 | DDynamicLibs [String]
773778 | DNameHint Name FC [(Name, FC)]