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

Safe HaskellNone
LanguageHaskell2010

HIE.Bios.Cradle

Synopsis

Documentation

findCradle :: FilePath -> IO (Maybe FilePath) Source #

Given root/foo/bar.hs, return root/hie.yaml, or wherever the yaml file was found.

loadCradle :: FilePath -> IO (Cradle Void) Source #

Given root/hie.yaml load the Cradle.

loadImplicitCradle :: Show a => FilePath -> IO (Cradle a) Source #

Given root/foo/bar.hs, load an implicit cradle

defaultCradle :: FilePath -> Cradle a Source #

Default cradle has no special options, not very useful for loading modules.

readProcessWithOutputFile Source #

Arguments

:: LoggingFunction

Output of the process is streamed into this function.

-> FilePath

Working directory. Process is executed in this directory.

-> FilePath

Process to call.

-> [String]

Arguments to the process.

-> IO (ExitCode, [String], [String], [String]) 

Call a process with the given arguments. * A special file is created for the process to write to, the process can discover the name of the file by reading the HIE_BIOS_OUTPUT environment variable. The contents of this file is returned by the function. * The logging function is called every time the process emits anything to stdout or stderr. it can be used to report progress of the process to a user. * The process is executed in the given directory. * The path to the GHC version to use is supplied in the environment variable HIE_BIOS_GHC. Additionally, arguments to ghc are supplied via HIE_BIOS_GHC_ARGS