@@ -181,7 +181,12 @@ data ConsoleWidth = InfinitelyWide -- ^ Have pretty-printer assume that lines sh
181 | AutomaticWidth -- ^ Attempt to determine width, or 80 otherwise
181 | AutomaticWidth -- ^ Attempt to determine width, or 80 otherwise
182 deriving (Show, Eq)
182 deriving (Show, Eq)
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
185-- | The global state used in the Idris monad
190-- | The global state used in the Idris monad
186data IState = IState {
191data IState = IState {
187 tt_ctxt :: Context, -- ^ All the currently defined names and their terms
192 tt_ctxt :: Context, -- ^ All the currently defined names and their terms
@@ -244,7 +249,7 @@ data IState = IState {
244 idris_parsedSpan :: Maybe FC,
249 idris_parsedSpan :: Maybe FC,
245 hide_list :: Ctxt Accessibility,
250 hide_list :: Ctxt Accessibility,
246 default_access :: Accessibility,
251 default_access :: Accessibility,
247− default_total :: Bool,
252+ default_total :: DefaultTotality,
248 ibc_write :: [IBCWrite],
253 ibc_write :: [IBCWrite],
249 compiled_so :: Maybe String,
254 compiled_so :: Maybe String,
250 idris_dynamic_libs :: [DynamicLib],
255 idris_dynamic_libs :: [DynamicLib],
@@ -360,7 +365,7 @@ idrisInit = IState initContext S.empty []
360 emptyContext emptyContext emptyContext emptyContext
365 emptyContext emptyContext emptyContext emptyContext
361 emptyContext
366 emptyContext
362 [] [] [] defaultOpts 6 [] [] [] [] emptySyntaxRules [] [] [] [] [] [] []
367 [] [] [] defaultOpts 6 [] [] [] [] emptySyntaxRules [] [] [] [] [] [] []
363− [] [] Nothing [] Nothing [] [] Nothing Nothing emptyContext Private False [] Nothing [] []
368+ [] [] Nothing [] Nothing [] [] Nothing Nothing emptyContext Private DefaultCheckingPartial [] Nothing [] []
364 (RawOutput stdout) True defaultTheme [] (0, emptyContext) emptyContext M.empty
369 (RawOutput stdout) True defaultTheme [] (0, emptyContext) emptyContext M.empty
365 AutomaticWidth S.empty S.empty [] Nothing Nothing [] [] M.empty [] [] []
370 AutomaticWidth S.empty S.empty [] Nothing Nothing [] [] M.empty [] [] []
366 emptyContext S.empty M.empty emptyContext
371 emptyContext S.empty M.empty emptyContext
@@ -767,7 +772,7 @@ data Directive = DLib Codegen String
767 | DHide Name
772 | DHide Name
768 | DFreeze Name
773 | DFreeze Name
769 | DAccess Accessibility
774 | DAccess Accessibility
770− | DDefault Bool
775+ | DDefault DefaultTotality
771 | DLogging Integer
776 | DLogging Integer
772 | DDynamicLibs [String]
777 | DDynamicLibs [String]
773 | DNameHint Name FC [(Name, FC)]
778 | DNameHint Name FC [(Name, FC)]