| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Prelude.Linear.Unsatisfiable
Description
An ergonomic class for unsatisfiable constraints. This is based on
the trivial-constraint package and the
Unsatisfiable proposal
Once that proposal is implemented, we can use it.
Synopsis
- class (Bottom, TypeError e) => Unsatisfiable (e :: ErrorMessage)
- unsatisfiable :: forall {rep} (a :: TYPE rep). Bottom => a
- class Any => Bottom
Documentation
class (Bottom, TypeError e) => Unsatisfiable (e :: ErrorMessage) Source #
An unsatisfiable constraint with a user-provided error message. Under an
Unsatisfiable constraint, users can use unsatisfiable to get a value of
any type (and runtime representation) they desire. For example,
instance Unsatisfiable
('Text "V1 cannot have an Applicative instance because it cannot implement pure")
=> Applicative V1 where
pure = unsatisfiable
(*) = unsatisfiable
unsatisfiable :: forall {rep} (a :: TYPE rep). Bottom => a Source #
Produce a value of any type (and runtime representation) under
an Unsatisfiable or Bottom constraint.
A constraint that cannot be satisfied. Users should normally use
Unsatisfiable instead of using this class directly.
Minimal complete definition
unsatisfiable'