| Safe Haskell | None |
|---|---|
| Language | Haskell98 |
Proof.Propositional.Inhabited
- class Inhabited a where
- withInhabited :: forall a b. a -> (Inhabited a => b) -> b
Documentation
class Inhabited a where Source #
Types with at least one inhabitant, dual to .
Currently, GHC doesn't provide a selective-instance,
hence we can't generically derive Empty instances
for sum types (i.e. by InhabitedDeriveAnyClass).
To derive an instance for each concrete types,
use .prove
Since 0.4.0.0.
Methods
A generic inhabitant of type , which means that
one cannot assume anything about the value of a
except that ittrivial
- is of type
a, and - doesn't contain any partial values.
trivial :: (Generic a, GInhabited (Rep a)) => a Source #
A generic inhabitant of type , which means that
one cannot assume anything about the value of a
except that ittrivial
- is of type
a, and - doesn't contain any partial values.
Instances
| Inhabited () Source # | |
| Inhabited (IsTrue True) Source # | |
| Inhabited b => Inhabited (a -> b) Source # | |
| (Inhabited a, Inhabited b) => Inhabited (a, b) Source # | |
| (Inhabited a, Inhabited b, Inhabited c) => Inhabited (a, b, c) Source # | |
| (Inhabited a, Inhabited b, Inhabited c, Inhabited d) => Inhabited (a, b, c, d) Source # | |
withInhabited :: forall a b. a -> (Inhabited a => b) -> b Source #