hie-bios-0.5.0: Set up a GHC API session

Safe HaskellNone
LanguageHaskell2010

HIE.Bios.Ghc.Api

Contents

Description

These functions are for conveniently implementing the simple CLI

Synopsis

Documentation

initializeFlagsWithCradle Source #

Arguments

:: GhcMonad m 
=> FilePath

The file we are loading the Cradle because of

-> Cradle a

The cradle we want to load

-> m (CradleLoadResult (m SuccessFlag, ComponentOptions)) 

Initialize a GHC session by loading a given file into a given cradle.

initializeFlagsWithCradleWithMessage Source #

Arguments

:: GhcMonad m 
=> Maybe Messager 
-> FilePath

The file we are loading the Cradle because of

-> Cradle a

The cradle we want to load

-> m (CradleLoadResult (m SuccessFlag, ComponentOptions))

Whether we actually loaded the cradle or not.

The same as initializeFlagsWithCradle but with an additional argument to control how the loading progress messages are displayed to the user. In haskell-ide-engine the module loading progress is displayed in the UI by using a progress notification.

data SuccessFlag #

Constructors

Succeeded 
Failed 
Instances
Outputable SuccessFlag 
Instance details

Defined in BasicTypes

Utility functions for running the GHC monad and implementing internal utilities

withGHC Source #

Arguments

:: FilePath

A target file displayed in an error message.

-> Ghc a

Ghc actions created by the Ghc utilities.

-> IO a 

Converting the Ghc monad to the IO monad. All exceptions are ignored and logged.

withGHC' :: Ghc a -> IO a Source #

Run a Ghc monad computation with an automatically discovered libdir. It calculates the lib dir by calling ghc with the `--print-libdir` flag.

withGhcT :: (ExceptionMonad m, MonadIO m, Monad m) => GhcT m a -> m a Source #

getSystemLibDir :: IO (Maybe FilePath) Source #

Obtain the directory for system libraries.

withDynFlags :: GhcMonad m => (DynFlags -> DynFlags) -> m a -> m a Source #