ghc-mod-5.7.0.0: Happy Haskell Programming

Safe Haskell | None
Language | Haskell2010

Language.Haskell.GhcMod.Target

Synopsis

- runGmPkgGhc :: (IOish m, Gm m) => LightGhc a -> m a
- initSession :: IOish m => [GHCOption] -> (forall gm. GhcMonad gm => DynFlags -> gm DynFlags) -> GhcModT m ()
- dropSession :: IOish m => GhcModT m ()
- runGmlT :: IOish m => [Either FilePath ModuleName] -> GmlT m a -> GhcModT m a
- runGmlT' :: IOish m => [Either FilePath ModuleName] -> (forall gm. GhcMonad gm => DynFlags -> gm DynFlags) -> GmlT m a -> GhcModT m a
- runGmlTWith :: IOish m => [Either FilePath ModuleName] -> (forall gm. GhcMonad gm => DynFlags -> gm DynFlags) -> (GmlT m a -> GmlT m b) -> GmlT m a -> GhcModT m b
- targetGhcOptions :: forall m. IOish m => Cradle -> Set (Either FilePath ModuleName) -> GhcModT m [GHCOption]
- resolvedComponentsCache :: IOish m => FilePath -> Cached (GhcModT m) GhcModState [GmComponent GMCRaw (Set ModulePath)] (Map ChComponentName (GmComponent GMCResolved (Set ModulePath)))
- moduleComponents :: Map ChComponentName (GmComponent t (Set ModulePath)) -> Either FilePath ModuleName -> Set ChComponentName
- findCandidates :: [Set ChComponentName] -> Set ChComponentName
- pickComponent :: Set ChComponentName -> ChComponentName
- packageGhcOptions :: (IOish m, Applicative m, Gm m) => m [GHCOption]
- sandboxOpts :: (IOish m, GmEnv m) => Cradle -> m [String]
- resolveGmComponent :: (IOish m, Gm m) => Maybe [CompilationUnit] -> GmComponent GMCRaw (Set ModulePath) -> m (GmComponent GMCResolved (Set ModulePath))
- resolveEntrypoint :: (IOish m, Gm m) => Cradle -> GmComponent GMCRaw ChEntrypoint -> m (GmComponent GMCRaw (Set ModulePath))
- resolveChEntrypoints :: FilePath -> ChEntrypoint -> IO [CompilationUnit]
- chModToMod :: ChModuleName -> ModuleName
- resolveModule :: (IOish m, Gm m) => HscEnv -> [FilePath] -> CompilationUnit -> m (Maybe ModulePath)
- type CompilationUnit = Either FilePath ModuleName
- type Components = [GmComponent GMCRaw (Set ModulePath)]
- type ResolvedComponentsMap = Map ChComponentName (GmComponent GMCResolved (Set ModulePath))
- resolveGmComponents :: (IOish m, Gm m) => Maybe ([CompilationUnit], ResolvedComponentsMap) -> Components -> m ResolvedComponentsMap
- loadTargets :: IOish m => [GHCOption] -> [FilePath] -> GmlT m ()
- needsHscInterpreted :: ModuleGraph -> Bool
- cabalResolvedComponents :: IOish m => GhcModT m (Map ChComponentName (GmComponent GMCResolved (Set ModulePath)))

# Documentation

runGmPkgGhc :: (IOish m, Gm m) => LightGhc a -> m a #

initSession :: IOish m => [GHCOption] -> (forall gm. GhcMonad gm => DynFlags -> gm DynFlags) -> GhcModT m () #

dropSession :: IOish m => GhcModT m () #

Drop the currently active GHC session, the next that requires a GHC session will initialize a new one.

runGmlT :: IOish m => [Either FilePath ModuleName] -> GmlT m a -> GhcModT m a #

Run a GmlT action (i.e. a function in the GhcMonad) in the context of certain files or modules

runGmlT' :: IOish m => [Either FilePath ModuleName] -> (forall gm. GhcMonad gm => DynFlags -> gm DynFlags) -> GmlT m a -> GhcModT m a #

Run a GmlT action (i.e. a function in the GhcMonad) in the context of certain files or modules, with updated GHC flags

runGmlTWith :: IOish m => [Either FilePath ModuleName] -> (forall gm. GhcMonad gm => DynFlags -> gm DynFlags) -> (GmlT m a -> GmlT m b) -> GmlT m a -> GhcModT m b #

Run a GmlT action (i.e. a function in the GhcMonad) in the context of certain files or modules, with updated GHC flags and a final transformation

targetGhcOptions :: forall m. IOish m => Cradle -> Set (Either FilePath ModuleName) -> GhcModT m [GHCOption] #

resolvedComponentsCache :: IOish m => FilePath -> Cached (GhcModT m) GhcModState [GmComponent GMCRaw (Set ModulePath)] (Map ChComponentName (GmComponent GMCResolved (Set ModulePath))) #

moduleComponents :: Map ChComponentName (GmComponent t (Set ModulePath)) -> Either FilePath ModuleName -> Set ChComponentName #

findCandidates :: [Set ChComponentName] -> Set ChComponentName #

pickComponent :: Set ChComponentName -> ChComponentName #

packageGhcOptions :: (IOish m, Applicative m, Gm m) => m [GHCOption] #

sandboxOpts :: (IOish m, GmEnv m) => Cradle -> m [String] #

resolveGmComponent #

Arguments

:: (IOish m, Gm m) |
=> Maybe [CompilationUnit] | Updated modules
-> GmComponent GMCRaw (Set ModulePath) |
-> m (GmComponent GMCResolved (Set ModulePath)) |

resolveEntrypoint :: (IOish m, Gm m) => Cradle -> GmComponent GMCRaw ChEntrypoint -> m (GmComponent GMCRaw (Set ModulePath)) #

resolveChEntrypoints :: FilePath -> ChEntrypoint -> IO [CompilationUnit] #

chModToMod :: ChModuleName -> ModuleName #

resolveModule :: (IOish m, Gm m) => HscEnv -> [FilePath] -> CompilationUnit -> m (Maybe ModulePath) #

type CompilationUnit = Either FilePath ModuleName #

type Components = [GmComponent GMCRaw (Set ModulePath)] #

type ResolvedComponentsMap = Map ChComponentName (GmComponent GMCResolved (Set ModulePath)) #

resolveGmComponents #

Arguments

:: (IOish m, Gm m) |
=> Maybe ([CompilationUnit], ResolvedComponentsMap) | Updated modules
-> Components |
-> m ResolvedComponentsMap |

loadTargets :: IOish m => [GHCOption] -> [FilePath] -> GmlT m () #

Set the files as targets and load them.

needsHscInterpreted :: ModuleGraph -> Bool #

cabalResolvedComponents :: IOish m => GhcModT m (Map ChComponentName (GmComponent GMCResolved (Set ModulePath))) #