equational-reasoning-0.4.1.1: Proof assistant for Haskell using DataKinds & PolyKinds

Safe HaskellNone
LanguageHaskell98

Proof.Propositional.Empty

Synopsis

Documentation

class Empty a where Source #

Type-class for types without inhabitants, dual to Inhabited. Current GHC doesn't provide selective-instance, hence we don't Empty provide instances for product types in a generic deriving (DeriveAnyClass).

To derive an instance for each concrete types, use refute.

Since 0.4.0.0.

Methods

eliminate :: a -> x Source #

eliminate :: (Generic a, GEmpty (Rep a)) => a -> x Source #

Instances

Empty Void Source # 

Methods

eliminate :: Void -> x Source #

Empty (IsTrue False) Source # 

Methods

eliminate :: IsTrue False -> x Source #

(Empty a, Empty b) => Empty (Either a b) Source # 

Methods

eliminate :: Either a b -> x Source #

withEmpty :: forall a b. (a -> Void) -> (Empty a => b) -> b Source #

Giving falsity witness by proving Void from a. See also withEmpty'.

Since 0.4.0.0

withEmpty' :: forall a b. (forall c. a -> c) -> (Empty a => b) -> b Source #

Giving falsity witness by showing a entails everything. See also withEmpty.

Since 0.4.0.0