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 HaskellUnsafe
LanguageHaskell98

Data.Void.Unsafe

Description

 

Synopsis

Documentation

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

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

This is only safe for valid functors that do not perform GADT-like analysis on the argument.

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

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

This is only safe for valid monads that do not perform GADT-like analysis on the argument.