ghc-internal-9.1300.0: Basic libraries
Copyright(C) 2008-2014 Edward Kmett
LicenseBSD-style (see the file libraries/base/LICENSE)
MaintainerEdward Kmett <ekmett@gmail.com>
Stabilityprovisional
Portabilityportable
Safe HaskellTrustworthy
LanguageHaskell2010

GHC.Internal.Data.Void

Description

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

Since: base-4.8.0.0

Synopsis

Documentation

data Void Source #

Uninhabited data type

Since: base-4.8.0.0

Instances

Instances details
Semigroup Void Source #

Since: base-4.9.0.0

Instance details

Defined in GHC.Internal.Base

Data Void Source #

Since: base-4.8.0.0

Instance details

Defined in GHC.Internal.Data.Data

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 :: forall r r'. (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 #

Exception Void Source #

Since: base-4.8.0.0

Instance details

Defined in GHC.Internal.Exception.Type

Generic Void Source # 
Instance details

Defined in GHC.Internal.Generics

Associated Types

type Rep Void

Since: base-4.8.0.0

Instance details

Defined in GHC.Internal.Generics

type Rep Void = D1 ('MetaData "Void" "GHC.Internal.Base" "ghc-internal" 'False) (V1 :: Type -> Type)

Methods

from :: Void -> Rep Void x Source #

to :: Rep Void x -> Void Source #

Ix Void Source #

Since: base-4.8.0.0

Instance details

Defined in GHC.Internal.Ix

Read Void Source #

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

Since: base-4.8.0.0

Instance details

Defined in GHC.Internal.Read

Show Void Source #

Since: base-4.8.0.0

Instance details

Defined in GHC.Internal.Show

Eq Void Source #

Since: base-4.8.0.0

Instance details

Defined in GHC.Internal.Base

Methods

(==) :: Void -> Void -> Bool Source #

(/=) :: Void -> Void -> Bool Source #

Ord Void Source #

Since: base-4.8.0.0

Instance details

Defined in GHC.Internal.Base

Lift Void Source #

Since: template-haskell-2.15.0.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => Void -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Void -> Code m Void Source #

type Rep Void Source #

Since: base-4.8.0.0

Instance details

Defined in GHC.Internal.Generics

type Rep Void = D1 ('MetaData "Void" "GHC.Internal.Base" "ghc-internal" 'False) (V1 :: Type -> Type)

absurd :: Void -> a Source #

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

>>> let x :: Either Void Int; x = Right 5
>>> :{
case x of
    Right r -> r
    Left l  -> absurd l
:}
5

Since: base-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. It is implemented in terms of fmap absurd.

Since: base-4.8.0.0