summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorDaniel Gröber <dxld@darkboxed.org>2018-12-11 18:36:00 -0500
committerBen Gamari <ben@smart-cactus.org>2018-12-12 23:25:02 -0500
commitefb6a30f0b70948ba51497bf2831e009ec6e1378 (patch)
treed39e605b08ddda0c44f8de95ccf9adb65a0af7ae /docs
parentf0eb404e1b5b296048da3d0b9efe42d5aa9e0f1d (diff)
downloadhaskell-efb6a30f0b70948ba51497bf2831e009ec6e1378.tar.gz
Fix recompilation checking of pure plugins
Previously when switching from using a Plugin with `RecompMaybe`/`ForceRecompile` in `pluginRecompile` to a Plugin with `NoForceRecompile` GHC would never even consider recompiling. However the previously active plugin could have modified the compilation output so we should recompile. Test Plan: validate Reviewers: bgamari, mpickering Subscribers: mpickering, rwbarton, carter GHC Trac Issues: #15858 Differential Revision: https://phabricator.haskell.org/D5299
Diffstat (limited to 'docs')
-rw-r--r--docs/users_guide/extending_ghc.rst19
1 files changed, 15 insertions, 4 deletions
diff --git a/docs/users_guide/extending_ghc.rst b/docs/users_guide/extending_ghc.rst
index 20d9674843..a913684a15 100644
--- a/docs/users_guide/extending_ghc.rst
+++ b/docs/users_guide/extending_ghc.rst
@@ -193,10 +193,11 @@ with ``-fexternal-interpreter`` let GHC developers know in :ghc-ticket:`14335`.
Using compiler plugins
~~~~~~~~~~~~~~~~~~~~~~
-Plugins can be specified on the command line with the
-:ghc-flag:`-fplugin=⟨module⟩` option where ⟨module⟩ is a
-module in a registered package that exports a plugin. Arguments can be given to
-plugins with the :ghc-flag:`-fplugin-opt=⟨module⟩:⟨args⟩` option.
+Plugins can be added on the command line with the :ghc-flag:`-fplugin=⟨module⟩`
+option where ⟨module⟩ is a module in a registered package that exports the
+plugin. Arguments can be passed to the plugins with the
+:ghc-flag:`-fplugin-opt=⟨module⟩:⟨args⟩` option. The list of enabled plugins can
+be reset with the :ghc-flag:`-fclear-plugins` option.
.. ghc-flag:: -fplugin=⟨module⟩
:shortdesc: Load a plugin exported by a given module
@@ -215,6 +216,16 @@ plugins with the :ghc-flag:`-fplugin-opt=⟨module⟩:⟨args⟩` option.
Give arguments to a plugin module; module must be specified with
:ghc-flag:`-fplugin=⟨module⟩`.
+.. ghc-flag:: -fclear-plugins
+ :shortdesc: Clear the list of active plugins
+ :type: dynamic
+ :category: plugins
+
+ Clear the list of plugins previously specified with
+ :ghc-flag:`-fplugin`. This is useful in GHCi where simply removing the
+ :ghc-flag:`-fplugin` options from the command line is not possible. Instead
+ `:set -fclear-plugins` can be used.
+
As an example, in order to load the plugin exported by ``Foo.Plugin`` in
the package ``foo-ghc-plugin``, and give it the parameter "baz", we