Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Proof.Propositional.Inhabited
Synopsis
- class Inhabited a where
- trivial :: a
- 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 Inhabited
DeriveAnyClass
).
To derive an instance for each concrete types,
use
.prove
Since 0.4.0.0.
Minimal complete definition
Nothing
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.
Instances
withInhabited :: forall a b. a -> (Inhabited a => b) -> b Source #