Data.Void.Unsafe

void-0.7.3: A Haskell 98 logically uninhabited data type

Copyright | (C) 2008-2015 Edward Kmett
License | BSD-style (see the file LICENSE)
Maintainer | Edward Kmett <ekmett@gmail.com>
Stability | provisional
Portability | portable
Safe Haskell | Unsafe
Language | Haskell98

Data.Void.Unsafe

Description

Synopsis

- unsafeVacuous :: Functor f => f Void -> f a
- unsafeVacuousM :: Monad m => m Void -> m a

# Documentation

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

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 #

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.