Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
An empty type with some useful instances.
Synopsis
- data Empty
- absurd :: Empty -> a
- toImpossible :: Empty -> IO Impossible
Documentation
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.