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

Copyright(c) JP Moresmau 2011
LicenseBSD3
Maintainerjpmoresmau@gmail.com
Stabilitybeta
Portabilityportable
Safe HaskellNone
LanguageHaskell98

Language.Haskell.BuildWrapper.API

Description

API entry point, with all exposed methods

Synopsis

Documentation

synchronize Source

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

synchronize1 Source

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

write Source

Arguments

:: FilePath

the source file in the project folder

-> String

the contents

-> BuildWrapper () 

write contents to temporary file

configure Source

Arguments

:: WhichCabal

use the source or temp cabal

-> BuildWrapper (OpResult Bool)

True if configure succeeded

run cabal configure

build Source

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

generateUsage Source

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

build1 Source

Arguments

:: FilePath

the source file

-> Maybe String

the cabal component to use, or Nothing if not specified

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

Just names in scope if build is successful

build one source file in GHC

build1LongRunning Source

Arguments

:: FilePath

the source file

-> Maybe String

the cabal component to use, or Nothing if not specified

-> BuildWrapper (OpResult (Maybe ()))

True if build is successful

build one source file in GHC

preproc Source

Arguments

:: BuildFlags

the build flags

-> FilePath

the file to preprocess

-> IO String

the resulting code

preprocess a file

getBuildFlags Source

Arguments

:: FilePath

the source file

-> Maybe String

the cabal component to use, or Nothing if not specified

-> BuildWrapper (OpResult BuildFlags) 

get the build flags for a source file

getAST Source

Arguments

:: FilePath

the source file

-> Maybe String

the cabal component to use, or Nothing if not specified

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

get haskell-src-exts commented AST for source file

getGHCAST Source

Arguments

:: FilePath

the source file

-> Maybe String

the cabal component to use, or Nothing if not specified

-> BuildWrapper (OpResult (Maybe TypecheckedSource)) 

get GHC typechecked AST for source file

withGHCAST Source

Arguments

:: FilePath

the source file

-> Maybe String

the cabal component to use, or Nothing if not specified

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

perform an action on the GHC AST

withGHCAST' Source

Arguments

:: FilePath

the source file

-> Maybe String

the cabal component to use, or Nothing if not specified

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

perform an action on the GHC AST, returning notes alonside with the result

getOutline Source

Arguments

:: FilePath

source file

-> Maybe String

the cabal component to use, or Nothing if not specified

-> BuildWrapper (OpResult OutlineResult) 

get outline for source file

getTokenTypes Source

Arguments

:: FilePath

the source file

-> BuildWrapper (OpResult [TokenDef]) 

get lexer token types for source file

getOccurrences Source

Arguments

:: FilePath

the source file

-> String

the token to search for

-> Maybe String

the cabal component to use, or Nothing if not specified

-> BuildWrapper (OpResult [TokenDef]) 

get all occurrences of a token in the file

getThingAtPoint Source

Arguments

:: FilePath

the source file

-> Int

the line

-> Int

the column

-> Maybe String

the cabal component to use, or Nothing if not specified -> Bool -- ^ do we want the result qualified? -> Bool -- ^ do we want the result typed?

-> BuildWrapper (OpResult (Maybe ThingAtPoint)) 

get thing at point

getLocals Source

Arguments

:: FilePath

the source file

-> Int

the start line

-> Int

the start column

-> Int

the end line

-> Int

the end column

-> Maybe String

the cabal component to use, or Nothing if not specified

-> BuildWrapper (OpResult [ThingAtPoint]) 

get locals identifiers

evalExpression Source

Arguments

:: FilePath

the source file

-> String

expression

-> Maybe String

the cabal component to use, or Nothing if not specified

-> BuildWrapper (OpResult [EvalResult]) 

evaluate an expression

getNamesInScope Source

Arguments

:: FilePath 
-> Maybe String

the cabal component to use, or Nothing if not specified

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

get all names in scope (GHC API)

cleanImports Source

Arguments

:: FilePath

the source file

-> Bool

format?

-> Maybe String

the cabal component to use, or Nothing if not specified

-> BuildWrapper (OpResult [ImportClean]) 

clean imports in a source file

clean Source

Arguments

:: Bool

everything?

-> BuildWrapper Bool 

clean generated and copied files