Skip to content

Commit

Permalink
Fix excessive interface recompilation caused by the Tactics plugin (h…
Browse files Browse the repository at this point in the history
  • Loading branch information
pepeiborra authored Oct 20, 2021
1 parent 1119def commit 8b5a1e0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion plugins/hls-tactics-plugin/src/Wingman/StaticPlugin.hs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import Development.IDE.GHC.Compat.Util
import GHC.LanguageExtensions.Type (Extension(EmptyCase, QuasiQuotes))
import Generics.SYB
import Ide.Types
import Plugins (purePlugin)

staticPlugin :: DynFlagsModifications
staticPlugin = mempty
Expand Down Expand Up @@ -66,8 +67,12 @@ allowEmptyCaseButWithWarning =
#if __GLASGOW_HASKELL__ >= 808
metaprogrammingPlugin :: StaticPlugin
metaprogrammingPlugin =
StaticPlugin $ PluginWithArgs (defaultPlugin { parsedResultAction = worker }) []
StaticPlugin $ PluginWithArgs pluginDefinition []
where
pluginDefinition = defaultPlugin
{ parsedResultAction = worker
, pluginRecompile = purePlugin
}
worker :: Monad m => [CommandLineOption] -> ModSummary -> HsParsedModule -> m HsParsedModule
worker _ _ pm = pure $ pm { hpm_module = addMetaprogrammingSyntax $ hpm_module pm }
#endif
Expand Down

0 comments on commit 8b5a1e0

Please sign in to comment.