hsdev-0.1.6.2: Haskell development library and tool with support of autocompletion, symbol info, go to declaration, find references etc.

Safe HaskellNone
LanguageHaskell98

HsDev.Tools.Ghc.Worker

Contents

Synopsis

Workers

ghcWorker :: [String] -> Ghc () -> IO (Worker Ghc) Source

Ghc worker. Pass options and initializer action

ghciWorker :: IO (Worker Ghc) Source

Interpreter worker is worker with preludeModules loaded

Initializers and actions

withFlags :: Ghc a -> Ghc a Source

Alter DynFlags temporary

modifyFlags :: (DynFlags -> DynFlags) -> Ghc () Source

Update DynFlags

importModules :: [String] -> Ghc () Source

Import some modules

preludeModules :: [String] Source

Default interpreter modules

evaluate :: String -> Ghc String Source

Evaluate expression

clearTargets :: Ghc () Source

Clear loaded targets

makeTarget :: String -> Maybe String -> Ghc Target Source

Make target with its source code optional

loadTargets :: [Target] -> Ghc () Source

Load all targets

Utils

listPackages :: Ghc [ModulePackage] Source

Get list of installed packages

spanRegion :: SrcSpan -> Region Source

Get region of SrcSpan

withCurrentDirectory :: FilePath -> Ghc a -> Ghc a Source

Set current directory and restore it after action

data Ghc a :: * -> *

A minimal implementation of a GhcMonad. If you need a custom monad, e.g., to maintain additional state consider wrapping this monad or using GhcT.