Skip to content

Commit dad4dcd

Browse files
committed
Add totality annotations to src and libs/{prelude, base}
1 parent 42d4c36 commit dad4dcd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+144
-1
lines changed

libs/base/Control/App.idr

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ module Control.App
22

33
import Data.IORef
44

5+
%default covering
6+
57
||| `Error` is a type synonym for `Type`, specify for exception handling.
68
public export
79
Error : Type

libs/base/Control/App/Console.idr

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ module Control.App.Console
22

33
import public Control.App
44

5+
%default total
6+
57
public export
68
interface Console e where
79
putChar : Char -> App {l} e ()

libs/base/Control/App/FileIO.idr

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import Data.List
66
import Data.Strings
77
import System.File
88

9+
%default covering
10+
911
toFileEx : FileError -> FileEx
1012
toFileEx (GenericFileError i) = GenericFileEx i
1113
toFileEx FileReadError = FileReadError

libs/base/Control/Applicative/Const.idr

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ module Control.Applicative.Const
33
import Data.Contravariant
44
import Data.Bits
55

6+
%default total
7+
68
public export
79
record Const (a : Type) (b : Type) where
810
constructor MkConst

libs/base/Control/Monad/Error/Either.idr

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ module Control.Monad.Error.Either
1515

1616
import Control.Monad.Trans
1717

18+
%default total
19+
1820
public export
1921
data EitherT : (e : Type) -> (m : Type -> Type) -> (a : Type) -> Type where
2022
MkEitherT : m (Either e a) -> EitherT e m a

libs/base/Control/Monad/Error/Interface.idr

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ import Control.Monad.State.State
99
import Control.Monad.Trans
1010
import Control.Monad.Writer.CPS
1111

12+
%default total
13+
1214
||| The strategy of combining computations that can throw exceptions
1315
||| by bypassing bound functions
1416
||| from the point an exception is thrown to the point that it is handled.

libs/base/Control/Monad/Identity.idr

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ module Control.Monad.Identity
22

33
import Data.Bits
44

5+
%default total
6+
57
public export
68
record Identity (a : Type) where
79
constructor Id

libs/base/Control/Monad/Maybe.idr

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ module Control.Monad.Maybe
1414
import Control.Monad.Trans
1515
import Data.Maybe
1616

17+
%default total
18+
1719
public export
1820
data MaybeT : (m : Type -> Type) -> (a : Type) -> Type where
1921
MkMaybeT : m (Maybe a) -> MaybeT m a

libs/base/Control/Monad/RWS/CPS.idr

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ module Control.Monad.RWS.CPS
77
import Control.Monad.Identity
88
import Control.Monad.Trans
99

10+
%default total
11+
1012
||| A monad transformer adding reading an environment of type `r`,
1113
||| collecting an output of type `w` and updating a state of type `s`
1214
||| to an inner monad `m`.

libs/base/Control/Monad/RWS/Interface.idr

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import Control.Monad.Reader.Interface
55
import Control.Monad.State.Interface
66
import Control.Monad.Writer.Interface
77

8+
%default covering
9+
810
public export
911
interface (MonadReader r m, MonadWriter w m, MonadState s m) =>
1012
MonadRWS r w s m | m where

0 commit comments

Comments
 (0)