diff options
Diffstat (limited to 'docs/users_guide/9.8.1-notes.rst')
-rw-r--r-- | docs/users_guide/9.8.1-notes.rst | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/docs/users_guide/9.8.1-notes.rst b/docs/users_guide/9.8.1-notes.rst index 0f0848765f..9f2d51d329 100644 --- a/docs/users_guide/9.8.1-notes.rst +++ b/docs/users_guide/9.8.1-notes.rst @@ -93,6 +93,21 @@ Compiler with each other, communicating via the system semaphore specified by the flag argument. +- GHC Proposal `#433 + <https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0433-unsatisfiable.rst>`_ + has been implemented. This adds the class ``Unsatisfiable :: ErrorMessage -> Constraint`` + to the ``GHC.TypeError`` module. Constraints of the form ``Unsatisfiable msg`` + provide a mechanism for custom type errors that reports the errors in a more + predictable behaviour than ``TypeError``, as these constraints are + handled purely during constraint solving. + + For example: :: + + instance Unsatisfiable (Text "There is no Eq instance for functions") => Eq (a -> b) where + (==) = unsatisfiable + + This allows errors to be reported when users use the instance, even when + type errors are being deferred. GHCi ~~~~ |