summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorAndrei Barbu <andrei@0xab.com>2021-09-30 17:19:36 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-12-15 16:33:17 -0500
commitf5a0b408c7e4ef71221eea3ea80ea250fbb28e18 (patch)
tree31b305405145c022d6aadfd512e83c3184330365 /docs
parent45bd630886157fbe4856594e098202808aedbdd0 (diff)
downloadhaskell-f5a0b408c7e4ef71221eea3ea80ea250fbb28e18.tar.gz
Plugin load order should follow the commandline order (fixes #17884)
In the past the order was reversed because flags are consed onto a list. No particular behavior was documented. We now reverse the flags and document the behavior.
Diffstat (limited to 'docs')
-rw-r--r--docs/users_guide/extending_ghc.rst8
1 files changed, 5 insertions, 3 deletions
diff --git a/docs/users_guide/extending_ghc.rst b/docs/users_guide/extending_ghc.rst
index ef9b584f04..06f3d2bb41 100644
--- a/docs/users_guide/extending_ghc.rst
+++ b/docs/users_guide/extending_ghc.rst
@@ -195,9 +195,11 @@ Using compiler plugins
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.
+plugin. Plugins are loaded in order, with command-line and Cabal flags preceding
+those in OPTIONS pragmas which are processed in file order. 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