From efb6a30f0b70948ba51497bf2831e009ec6e1378 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Gr=C3=B6ber?= Date: Tue, 11 Dec 2018 18:36:00 -0500 Subject: 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 --- docs/users_guide/extending_ghc.rst | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'docs') 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 -- cgit v1.2.1