{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE EmptyCase #-}
{-# LANGUAGE EmptyDataDeriving #-}
{-# LANGUAGE Safe #-}
module Data.Void
( Void
, absurd
, vacuous
) where
import Control.Exception
import Data.Data
import Data.Ix
import GHC.Generics
import Data.Semigroup (Semigroup(..), stimesIdempotent)
data Void deriving
( Void -> Void -> Bool
(Void -> Void -> Bool) -> (Void -> Void -> Bool) -> Eq Void
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Void -> Void -> Bool
== :: Void -> Void -> Bool
$c/= :: Void -> Void -> Bool
/= :: Void -> Void -> Bool
Eq
, Typeable Void
Typeable Void
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Void -> c Void)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Void)
-> (Void -> Constr)
-> (Void -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Void))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Void))
-> ((forall b. Data b => b -> b) -> Void -> Void)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Void -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Void -> r)
-> (forall u. (forall d. Data d => d -> u) -> Void -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> Void -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Void -> m Void)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Void -> m Void)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Void -> m Void)
-> Data Void
Void -> Constr
Void -> DataType
(forall b. Data b => b -> b) -> Void -> Void
forall a.
Typeable a
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Void -> u
forall u. (forall d. Data d => d -> u) -> Void -> [u]
forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Void -> r
forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Void -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Void -> m Void
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Void -> m Void
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Void
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Void -> c Void
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Void)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Void)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Void -> c Void
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Void -> c Void
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Void
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Void
$ctoConstr :: Void -> Constr
toConstr :: Void -> Constr
$cdataTypeOf :: Void -> DataType
dataTypeOf :: Void -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Void)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Void)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Void)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Void)
$cgmapT :: (forall b. Data b => b -> b) -> Void -> Void
gmapT :: (forall b. Data b => b -> b) -> Void -> Void
$cgmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Void -> r
gmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Void -> r
$cgmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Void -> r
gmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Void -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Void -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> Void -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Void -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Void -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Void -> m Void
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Void -> m Void
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Void -> m Void
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Void -> m Void
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Void -> m Void
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Void -> m Void
Data
, (forall x. Void -> Rep Void x)
-> (forall x. Rep Void x -> Void) -> Generic Void
forall x. Void -> Rep Void x
forall x. Rep Void x -> Void
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. Void -> Rep Void x
from :: forall x. Void -> Rep Void x
$cto :: forall x. Rep Void x -> Void
to :: forall x. Rep Void x -> Void
Generic
, Eq Void
Eq Void
-> (Void -> Void -> Ordering)
-> (Void -> Void -> Bool)
-> (Void -> Void -> Bool)
-> (Void -> Void -> Bool)
-> (Void -> Void -> Bool)
-> (Void -> Void -> Void)
-> (Void -> Void -> Void)
-> Ord Void
Void -> Void -> Bool
Void -> Void -> Ordering
Void -> Void -> Void
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: Void -> Void -> Ordering
compare :: Void -> Void -> Ordering
$c< :: Void -> Void -> Bool
< :: Void -> Void -> Bool
$c<= :: Void -> Void -> Bool
<= :: Void -> Void -> Bool
$c> :: Void -> Void -> Bool
> :: Void -> Void -> Bool
$c>= :: Void -> Void -> Bool
>= :: Void -> Void -> Bool
$cmax :: Void -> Void -> Void
max :: Void -> Void -> Void
$cmin :: Void -> Void -> Void
min :: Void -> Void -> Void
Ord
, ReadPrec [Void]
ReadPrec Void
Int -> ReadS Void
ReadS [Void]
(Int -> ReadS Void)
-> ReadS [Void] -> ReadPrec Void -> ReadPrec [Void] -> Read Void
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS Void
readsPrec :: Int -> ReadS Void
$creadList :: ReadS [Void]
readList :: ReadS [Void]
$creadPrec :: ReadPrec Void
readPrec :: ReadPrec Void
$creadListPrec :: ReadPrec [Void]
readListPrec :: ReadPrec [Void]
Read
, Int -> Void -> ShowS
[Void] -> ShowS
Void -> String
(Int -> Void -> ShowS)
-> (Void -> String) -> ([Void] -> ShowS) -> Show Void
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Void -> ShowS
showsPrec :: Int -> Void -> ShowS
$cshow :: Void -> String
show :: Void -> String
$cshowList :: [Void] -> ShowS
showList :: [Void] -> ShowS
Show
)
instance Ix Void where
range :: (Void, Void) -> [Void]
range (Void, Void)
_ = []
index :: (Void, Void) -> Void -> Int
index (Void, Void)
_ = Void -> Int
forall a. Void -> a
absurd
inRange :: (Void, Void) -> Void -> Bool
inRange (Void, Void)
_ = Void -> Bool
forall a. Void -> a
absurd
rangeSize :: (Void, Void) -> Int
rangeSize (Void, Void)
_ = Int
0
instance Exception Void
instance Semigroup Void where
Void
a <> :: Void -> Void -> Void
<> Void
_ = Void
a
stimes :: forall b. Integral b => b -> Void -> Void
stimes = b -> Void -> Void
forall b a. Integral b => b -> a -> a
stimesIdempotent
absurd :: Void -> a
absurd :: forall a. Void -> a
absurd Void
a = case Void
a of {}
vacuous :: Functor f => f Void -> f a
vacuous :: forall (f :: * -> *) a. Functor f => f Void -> f a
vacuous = (Void -> a) -> f Void -> f a
forall a b. (a -> b) -> f a -> f b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Void -> a
forall a. Void -> a
absurd