Data.Void

base-4.10.1.0: Basic libraries

Copyright | (C) 2008-2014 Edward Kmett
License | BSD-style (see the file libraries/base/LICENSE)
Maintainer | Edward Kmett <ekmett@gmail.com>
Stability | provisional
Portability | portable
Safe Haskell | Safe
Language | Haskell2010

Data.Void

Description

A logically uninhabited data type, used to indicate that a given term should not exist.

Since: 4.8.0.0

Synopsis

- data Void
- absurd :: Void -> a
- vacuous :: Functor f => f Void -> f a

# Documentation

data Void Source #

Uninhabited data type

Since: 4.8.0.0

Instances

Eq Void # | Since: 4.8.0.0
Methods (==) :: Void -> Void -> Bool Source # (/=) :: Void -> Void -> Bool Source #
Data Void # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Void -> c Void Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Void Source # toConstr :: Void -> Constr Source # dataTypeOf :: Void -> DataType Source # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Void) Source # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Void) Source # gmapT :: (forall b. Data b => b -> b) -> Void -> Void Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Void -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Void -> r Source # gmapQ :: (forall d. Data d => d -> u) -> Void -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> Void -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Void -> m Void Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Void -> m Void Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Void -> m Void Source #
Ord Void # | Since: 4.8.0.0
Methods compare :: Void -> Void -> Ordering Source # (<) :: Void -> Void -> Bool Source # (<=) :: Void -> Void -> Bool Source # (>) :: Void -> Void -> Bool Source # (>=) :: Void -> Void -> Bool Source # max :: Void -> Void -> Void Source # min :: Void -> Void -> Void Source #
Read Void # | Reading a `Void` value is always a parse error, considering `Void` as a data type with no constructors. | @since 4.8.0.0
Methods readsPrec :: Int -> ReadS Void Source # readList :: ReadS [Void] Source # readPrec :: ReadPrec Void Source # readListPrec :: ReadPrec [Void] Source #
Show Void # | Since: 4.8.0.0
Methods showsPrec :: Int -> Void -> ShowS Source # show :: Void -> String Source # showList :: [Void] -> ShowS Source #
Ix Void # | Since: 4.8.0.0
Methods range :: (Void, Void) -> [Void] Source # index :: (Void, Void) -> Void -> Int Source # unsafeIndex :: (Void, Void) -> Void -> Int inRange :: (Void, Void) -> Void -> Bool Source # rangeSize :: (Void, Void) -> Int Source # unsafeRangeSize :: (Void, Void) -> Int
Generic Void # |
Associated Types type Rep Void :: * -> * Source # Methods from :: Void -> Rep Void x Source # to :: Rep Void x -> Void Source #
Semigroup Void # | Since: 4.9.0.0
Methods (<>) :: Void -> Void -> Void Source # sconcat :: NonEmpty Void -> Void Source # stimes :: Integral b => b -> Void -> Void Source #
Exception Void # | Since: 4.8.0.0
Methods toException :: Void -> SomeException Source # fromException :: SomeException -> Maybe Void Source # displayException :: Void -> String Source #
type Rep Void # |
type Rep Void = D1 * (MetaData "Void" "Data.Void" "base" False) (V1 *)

absurd :: Void -> a Source #

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

Since: 4.8.0.0

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.

Since: 4.8.0.0