summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorsheaf <sam.derbyshire@gmail.com>2022-05-11 13:17:41 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-05-12 18:14:34 -0400
commit3bf938b6c5e1190f3a55e149deaec2f6309d398f (patch)
treec3bde01d0456a05f956222bf06b3de8816be803c /docs
parentb8c5ffab70fbd4e9b01a180359800188191cca47 (diff)
downloadhaskell-3bf938b6c5e1190f3a55e149deaec2f6309d398f.tar.gz
Update extending_ghc for TcPlugin changes
The documentation still mentioned Derived constraints and an outdated datatype TcPluginResult.
Diffstat (limited to 'docs')
-rw-r--r--docs/users_guide/extending_ghc.rst12
1 files changed, 6 insertions, 6 deletions
diff --git a/docs/users_guide/extending_ghc.rst b/docs/users_guide/extending_ghc.rst
index c12abc2b4c..1cec248364 100644
--- a/docs/users_guide/extending_ghc.rst
+++ b/docs/users_guide/extending_ghc.rst
@@ -652,8 +652,8 @@ The key component of a typechecker plugin is a function of type
::
- solve :: [Ct] -> [Ct] -> [Ct] -> TcPluginM TcPluginResult
- solve givens deriveds wanteds = ...
+ solve :: [Ct] -> [Ct] -> TcPluginM TcPluginSolveResult
+ solve givens wanteds = ...
This function will be invoked in two different ways:
@@ -676,11 +676,11 @@ The plugin can then respond with:
The plugin must respond with constraints of the same flavour,
i.e. in (1) it should return only Givens, and for (2) it should return only
-Wanteds (or Deriveds); all other constraints will be ignored.
+Wanteds; all other constraints will be ignored.
If the plugin cannot make any progress, it should return
-``TcPluginSolveResult [] [] []``. Otherwise, if there were any new constraints, the
-main constraint solver will be re-invoked to simplify them, then the
+``TcPluginSolveResult [] [] []``. Otherwise, if there were any new constraints,
+the main constraint solver will be re-invoked to simplify them, then the
plugin will be invoked again. The plugin is responsible for making sure
that this process eventually terminates.
@@ -692,7 +692,7 @@ by solving or contradicting them).
Constraints that have been solved by the plugin must be provided with
evidence in the form of an ``EvTerm`` of the type of the constraint.
-This evidence is ignored for Given and Derived constraints, which GHC
+This evidence is ignored for Given constraints, which GHC
"solves" simply by discarding them; typically this is used when they are
uninformative (e.g. reflexive equations). For Wanted constraints, the
evidence will form part of the Core term that is generated after