Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
An empty type with some useful instances.
Synopsis
- data Empty
- absurd :: Empty -> a
- toImpossible :: Empty -> IO Impossible
Documentation
Instances
Data Empty Source # | |
Defined in Agda.Utils.Empty gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Empty -> c Empty # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Empty # dataTypeOf :: Empty -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Empty) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Empty) # gmapT :: (forall b. Data b => b -> b) -> Empty -> Empty # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Empty -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Empty -> r # gmapQ :: (forall d. Data d => d -> u) -> Empty -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Empty -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Empty -> m Empty # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Empty -> m Empty # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Empty -> m Empty # | |
Show Empty Source # | |
NFData Empty Source # | Values of type |
Defined in Agda.Utils.Empty | |
Eq Empty Source # | |
Ord Empty Source # | |
toImpossible :: Empty -> IO Impossible Source #
toImpossible e
extracts the Impossible
value raised via
IMPOSSIBLE
to create the element e
of type Empty
.
It proceeds by evaluating e
to weak head normal form and
catching the exception.
We are forced to wrap things in a Maybe
because of
catchImpossible
's type.