Safe Haskell | None |
---|---|
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 :: Constraint) => Unsatisfiable (e :: ErrorMessage)
- unsatisfiable :: Bottom => a
- class (Any :: Constraint) => Bottom
Documentation
class (Bottom, TypeError e :: Constraint) => 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 :: Bottom => a Source #
Produce a value of any type (and runtime representation) under
an Unsatisfiable
or Bottom
constraint.
class (Any :: Constraint) => Bottom Source #
A constraint that cannot be satisfied. Users should normally use
Unsatisfiable
instead of using this class directly.
Minimal complete definition
unsatisfiable'