linear-base-0.4.0: Standard library for linear types.
Safe HaskellSafe-Inferred
LanguageHaskell2010

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

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.

class Any => Bottom Source #

A constraint that cannot be satisfied. Users should normally use Unsatisfiable instead of using this class directly.

Minimal complete definition

unsatisfiable'