void-0.6.1: A Haskell 98 logically uninhabited data type

Portabilityportable
Stabilityprovisional
MaintainerEdward Kmett <ekmett@gmail.com>
Safe HaskellTrustworthy

Data.Void

Description

 

Synopsis

Documentation

data Void Source

A logically uninhabited data type.

Instances

Eq Void 
Data Void 
Ord Void 
Read Void

Reading a Void value is always a parse error, considering Void as a data type with no constructors.

Show Void 
Ix Void 
Typeable Void 
Generic Void 
Exception Void 
Hashable Void 
Semigroup Void 

absurd :: Void -> aSource

Since Void values logically don't exist, this witnesses the logical reasoning tool of "ex falso quodlibet".

vacuous :: Functor f => f Void -> f aSource

If Void is uninhabited then any Functor that holds only values of type Void is holding no values.

vacuousM :: Monad m => m Void -> m aSource

If Void is uninhabited then any Monad that holds values of type Void is holding no values.