coverage-0.1.0.3: Exhaustivity Checking Library

Safe HaskellSafe-Inferred
LanguageHaskell2010

Control.Coverage

Description

Exhaustivity checking main function.

Synopsis

Documentation

check :: Eq lit => Environment -> [Alternative lit] -> Check lit Source

Given a list of alternatives, check generates the proper set of uncovered cases.

data Binder lit Source

Binders

Constructors

Var (Maybe Name) 
Lit lit 
Tagged Name (Binder lit) 
Product (Binders lit) 
Record [(Name, Binder lit)] 

Instances

Eq lit => Eq (Binder lit) 
Show lit => Show (Binder lit) 

data Guard Source

Guards and alternatives

Guard are abstract, and it is up to the language implementor to interpret guards abstractly. Guards can catch all cases, or represent some opaque expression which cannot be analysed.

Constructors

CatchAll 
Opaque 

Instances

data Check lit Source

Check wraps both uncovered and redundant cases.

Constructors

Check 

Instances

Eq lit => Eq (Check lit) 
Show lit => Show (Check lit) 

data Redundant a Source

Data-type for redundant cases representation.

Constructors

DontKnow 
NotRedundant 
Redundant a 

Instances

Functor Redundant

Functor instance for Redundant (TODO: proofs).

Applicative Redundant

Applicative instance for Redundant.

Eq a => Eq (Redundant a) 
Show a => Show (Redundant a)