HORIZON HASKELLDocslts/ghc-10.0.xaa25b892026-10-10Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · aa25b89 · 2026-10-10

Moduleghc-internal-10.0.0Haskell2010

GHC.Internal.Data.Void

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

  • 1 type
  • 2 values
datadata Void
#

Uninhabited data type

Instances11Eq, Data, Ord, Read, Show, Ix, …
  • Eq VoidDefined in ghc-internal-10.0.0 · GHC.Internal.Base
  • Data VoidDefined in ghc-internal-10.0.0 · GHC.Internal.Data.Data
  • Ord VoidDefined in ghc-internal-10.0.0 · GHC.Internal.Base
  • Read VoidDefined in ghc-internal-10.0.0 · GHC.Internal.Read

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

  • Show VoidDefined in ghc-internal-10.0.0 · GHC.Internal.Show
  • Ix VoidDefined in ghc-internal-10.0.0 · GHC.Internal.Ix
  • Generic VoidDefined in ghc-internal-10.0.0 · GHC.Internal.Generics
  • Semigroup VoidDefined in ghc-internal-10.0.0 · GHC.Internal.Base
  • Exception VoidDefined in ghc-internal-10.0.0 · GHC.Internal.Exception.Type
  • Lift VoidDefined in ghc-internal-10.0.0 · GHC.Internal.TH.Lift
  • type Rep Void = D1 ('MetaData "Void" "GHC.Internal.Base" "ghc-internal" 'False) V1Defined in ghc-internal-10.0.0 · GHC.Internal.Generics
valueabsurd :: Void -> a
#

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

Example2 expressions
let x :: Either Void Int; x = Right 5:{case x of    Right r -> r    Left l  -> absurd l:}5
valuevacuous :: Functor f => f Void -> f a
#

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.