ghcide-2.4.0.0: The core of an IDE

Safe Haskell | Safe-Inferred
Language | Haskell2010

Development.IDE.GHC.Compat.Plugins

Contents

- Plugin Compat Types, and initialisation
- Static plugins
- Plugin messages

Description

Plugin Compat utils.

Synopsis

- data Plugin = Plugin {
  - installCoreToDos :: CorePlugin
  - tcPlugin :: TcPlugin
  - defaultingPlugin :: DefaultingPlugin
  - holeFitPlugin :: HoleFitPlugin
  - driverPlugin :: [CommandLineOption] -> HscEnv -> IO HscEnv
  - pluginRecompile :: [CommandLineOption] -> IO PluginRecompile
  - parsedResultAction :: [CommandLineOption] -> ModSummary -> ParsedResult -> Hsc ParsedResult
  - renamedResultAction :: [CommandLineOption] -> TcGblEnv -> HsGroup GhcRn -> TcM (TcGblEnv, HsGroup GhcRn)
  - typeCheckResultAction :: [CommandLineOption] -> ModSummary -> TcGblEnv -> TcM TcGblEnv
  - spliceRunAction :: [CommandLineOption] -> LHsExpr GhcTc -> TcM (LHsExpr GhcTc)
  - interfaceLoadAction :: forall lcl. [CommandLineOption] -> ModIface -> IfM lcl ModIface
  }
- defaultPlugin :: Plugin
- data PluginWithArgs = PluginWithArgs {
  - paPlugin :: Plugin
  - paArguments :: [CommandLineOption]
  }
- applyPluginsParsedResultAction :: HscEnv -> DynFlags -> ModSummary -> ApiAnns -> ParsedSource -> PsMessages -> IO (ParsedSource, PsMessages)
- initializePlugins :: HscEnv -> IO HscEnv
- initPlugins :: HscEnv -> ModSummary -> IO (ModSummary, HscEnv)
- data StaticPlugin = StaticPlugin {
  - spPlugin :: PluginWithArgs
  }
- hsc_static_plugins :: HscEnv -> [StaticPlugin]
- data PsMessages = PsMessages {
  - psWarnings :: Messages PsWarning
  - psErrors :: Messages PsError
  }
- getPsMessages :: PState -> DynFlags -> PsMessages

# Plugin Compat Types, and initialisation

data Plugin #

Constructors

Plugin |

Fields

- installCoreToDos :: CorePlugin
- tcPlugin :: TcPlugin
- defaultingPlugin :: DefaultingPlugin
- holeFitPlugin :: HoleFitPlugin
- driverPlugin :: [CommandLineOption] -> HscEnv -> IO HscEnv
- pluginRecompile :: [CommandLineOption] -> IO PluginRecompile
- parsedResultAction :: [CommandLineOption] -> ModSummary -> ParsedResult -> Hsc ParsedResult
- renamedResultAction :: [CommandLineOption] -> TcGblEnv -> HsGroup GhcRn -> TcM (TcGblEnv, HsGroup GhcRn)
- typeCheckResultAction :: [CommandLineOption] -> ModSummary -> TcGblEnv -> TcM TcGblEnv
- spliceRunAction :: [CommandLineOption] -> LHsExpr GhcTc -> TcM (LHsExpr GhcTc)
- interfaceLoadAction :: forall lcl. [CommandLineOption] -> ModIface -> IfM lcl ModIface

defaultPlugin :: Plugin #

data PluginWithArgs #

Constructors

PluginWithArgs |

Fields

- paPlugin :: Plugin
- paArguments :: [CommandLineOption]

applyPluginsParsedResultAction :: HscEnv -> DynFlags -> ModSummary -> ApiAnns -> ParsedSource -> PsMessages -> IO (ParsedSource, PsMessages) #

initializePlugins :: HscEnv -> IO HscEnv #

initPlugins :: HscEnv -> ModSummary -> IO (ModSummary, HscEnv) #

Plugins aren't stored in ModSummary anymore since GHC 9.2, but this function still returns it for compatibility with 8.10

# Static plugins

data StaticPlugin #

Constructors

StaticPlugin |

Fields

- spPlugin :: PluginWithArgs

hsc_static_plugins :: HscEnv -> [StaticPlugin] #

# Plugin messages

data PsMessages #

Constructors

PsMessages |

Fields

- psWarnings :: Messages PsWarning
- psErrors :: Messages PsError

getPsMessages :: PState -> DynFlags -> PsMessages #