void-0.7: A Haskell 98 logically uninhabited data type

Copyright(C) 2008-2013 Edward Kmett
LicenseBSD-style (see the file LICENSE)
MaintainerEdward Kmett <ekmett@gmail.com>
Stabilityprovisional
Portabilityportable
Safe HaskellTrustworthy
LanguageHaskell98

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 
Generic Void 
Exception Void 
Hashable Void 
Semigroup Void 
Typeable * Void 
type Rep Void 

absurd :: Void -> a Source

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

vacuous :: Functor f => f Void -> f a Source

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

vacuousM :: Monad m => m Void -> m a Source

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