summaryrefslogtreecommitdiff
path: root/compiler/main/Plugins.hs
diff options
context:
space:
mode:
authorChristiaan Baaij <christiaan.baaij@gmail.com>2018-08-01 14:21:22 -0400
committerBen Gamari <ben@smart-cactus.org>2018-08-01 19:38:48 -0400
commit52065e95c6df89d0048c6e3f35d6cc26ce8246f9 (patch)
tree78dac501a71e830bcf175af5b40b19643e17b6ed /compiler/main/Plugins.hs
parentf8618a9b15177ee8c84771b927cb3583c9cd8408 (diff)
downloadhaskell-52065e95c6df89d0048c6e3f35d6cc26ce8246f9.tar.gz
Plugin dependency information is stored separately
We need to store the used plugins so that we recompile a module when a plugin that it uses is recompiled. However, storing the `ModuleName`s of the plugins used by a module in the `dep_mods` field made the rest of GHC think that they belong in the HPT, causing at least the issues reported in #15234 We therefor store the `ModuleName`s of the plugins in a new field, `dep_plgins`, which is only used the the recompilation logic. Reviewers: mpickering, bgamari Reviewed By: mpickering, bgamari Subscribers: alpmestan, rwbarton, thomie, carter GHC Trac Issues: #15234 Differential Revision: https://phabricator.haskell.org/D4937
Diffstat (limited to 'compiler/main/Plugins.hs')
-rw-r--r--compiler/main/Plugins.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/main/Plugins.hs b/compiler/main/Plugins.hs
index 0e2ab32015..8ead643f49 100644
--- a/compiler/main/Plugins.hs
+++ b/compiler/main/Plugins.hs
@@ -99,14 +99,14 @@ data Plugin = Plugin {
data LoadedPlugin = LoadedPlugin {
lpPlugin :: Plugin
-- ^ the actual callable plugin
- , lpModule :: Module
+ , lpModule :: ModIface
-- ^ the module containing the plugin
, lpArguments :: [CommandLineOption]
-- ^ command line arguments for the plugin
}
lpModuleName :: LoadedPlugin -> ModuleName
-lpModuleName = moduleName . lpModule
+lpModuleName = moduleName . mi_module . lpModule
data PluginRecompile = ForceRecompile | NoForceRecompile | MaybeRecompile Fingerprint