buildwrapper-0.6.1: A library and an executable that provide an easy API for a Haskell IDE

Safe HaskellSafe-Infered

Language.Haskell.BuildWrapper.API

Synopsis

Documentation

synchronizeSource

Arguments

:: Bool

if true copy all files, if false only copy files newer than their corresponding temp files

-> BuildWrapper (OpResult ([FilePath], [FilePath]))

return the list of files copied, the list of files deleted

copy all files from the project to the temporary folder

synchronize1Source

Arguments

:: Bool

always copy the file, if false only copy the file if it is newer than its corresponding temp file

-> FilePath

the source file in the project folder

-> BuildWrapper (Maybe FilePath)

return Nothing if no copy or Just file if copied

synchronize one file only

writeSource

Arguments

:: FilePath

the source file in the project folder

-> String

the contents

-> BuildWrapper () 

write contents to temporary file

configureSource

Arguments

:: WhichCabal

use the source or temp cabal

-> BuildWrapper (OpResult Bool)

True if configure succeeded

run cabal configure

buildSource

Arguments

:: Bool

do we want output (True) or just compilation without linking?

-> WhichCabal

use original cabal or temp cabal file

-> BuildWrapper (OpResult BuildResult) 

run cabal build

generateUsageSource

Arguments

:: Bool

should we return all files or only the changed ones?

-> String

the cabal component name

-> BuildWrapper (OpResult (Maybe [FilePath])) 

generate usage information files

build1Source

Arguments

:: FilePath

the source file

-> BuildWrapper (OpResult (Maybe [NameDef]))

True if build is successful

build one source file in GHC

preprocSource

Arguments

:: BuildFlags

the build flags

-> FilePath

the file to preprocess

-> IO String

the resulting code

preprocess a file

getBuildFlagsSource

Arguments

:: FilePath

the source file

-> BuildWrapper (OpResult BuildFlags) 

get the build flags for a source file

getASTSource

Arguments

:: FilePath

the source file

-> BuildWrapper (OpResult (Maybe (ParseResult (Module SrcSpanInfo, [Comment])))) 

get haskell-src-exts commented AST for source file

getGHCASTSource

Arguments

:: FilePath

the source file

-> BuildWrapper (OpResult (Maybe TypecheckedSource)) 

get GHC typechecked AST for source file

withGHCASTSource

Arguments

:: FilePath

the source file

-> (FilePath -> FilePath -> String -> [String] -> IO a) 
-> BuildWrapper (OpResult (Maybe a)) 

perform an action on the GHC AST

withGHCAST'Source

Arguments

:: FilePath

the source file

-> (FilePath -> FilePath -> String -> [String] -> IO (OpResult (Maybe a))) 
-> BuildWrapper (OpResult (Maybe a)) 

getOutlineSource

Arguments

:: FilePath

source file

-> BuildWrapper (OpResult OutlineResult) 

get outline for source file

getTokenTypesSource

Arguments

:: FilePath

the source file

-> BuildWrapper (OpResult [TokenDef]) 

get all occurrences of a token in the file

get lexer token types for source file

getOccurrencesSource

Arguments

:: FilePath

the source file

-> String

the token to search for

-> BuildWrapper (OpResult [TokenDef]) 

getThingAtPointSource

Arguments

:: FilePath

the source file

-> Int

the line

-> Int

the column -> Bool -- ^ do we want the result qualified? -> Bool -- ^ do we want the result typed?

-> BuildWrapper (OpResult (Maybe ThingAtPoint)) 

get thing at point

getNamesInScope :: FilePath -> BuildWrapper (OpResult (Maybe [String]))Source

get all names in scope (GHC API)