The buildwrapper package

[Tags: bsd3, library, program]

Buildwrapper is an alternative to scion. It provides services to configure, build and give information on source files to help IDEs manage Haskell projects. You can use buildwrapper to build project and retrieve errors, get outline for each module source, get the type of something inside a source file, get lexer tokens, etc. Buildwrapper is used in the EclipseFP project (Eclipse plugins for Haskell development)


[Skip to ReadMe]

Properties

Versions0.1, 0.2, 0.2.1, 0.2.2, 0.3.0, 0.4.0, 0.4.1, 0.5.0, 0.5.1, 0.5.2, 0.6.0, 0.6.1, 0.6.2, 0.6.3, 0.6.4, 0.7.0, 0.7.1, 0.7.2, 0.7.3, 0.7.4, 0.7.5, 0.7.6, 0.7.7, 0.8.0, 0.8.1, 0.8.2, 0.8.3, 0.8.4, 0.8.5, 0.8.6, 0.8.7, 0.8.8, 0.8.9, 0.8.10, 0.8.11, 0.9.0, 0.9.1
Change logNone available
Dependenciesaeson (>=0.4), attoparsec, base (<5), buildwrapper, bytestring, Cabal, cmdargs, containers, cpphs, deepseq, directory, filepath, ghc, ghc-paths, haskell-src-exts, mtl, old-time, process, regex-tdfa, syb, text, time, transformers, unordered-containers, utf8-string, vector (>=0.8) [details]
LicenseBSD3
AuthorJP Moresmau <jpmoresmau@gmail.com>, based on the work of Thomas Schilling and others
MaintainerJP Moresmau <jpmoresmau@gmail.com>
Stabilitybeta
CategoryDevelopment
Home pagehttps://github.com/JPMoresmau/BuildWrapper
Source repositoryhead: git clone git://github.com/JPMoresmau/BuildWrapper.git
Executablesbuildwrapper
UploadedMon Jul 1 15:22:43 UTC 2013 by JeanPhilippeMoresmau
Downloads20787 total (391 in last 30 days)
Votes
0 []
StatusDocs uploaded by user
Build status unknown [no reports yet]

Modules

[Index]

Downloads

Maintainers' corner

For package maintainers and hackage trustees

Readme for buildwrapper-0.7.3

BuildWrapper

BuildWrapper is a program designed to help an IDE deal with a Haskell project. It combines several tools under a simple API:

Generic options

These options apply to all commands

synchronize

Synchronize ensures that all the files in the temporary work folder represent the up to date version of the source files. It returns the list of files actually copied from the main folder to the work folder.

synchronize1

Synchronizes only one file.

write

Updates the content of the file in the work folder. Note that an external tool could also write directly in the work folder.

configure

Runs cabal configure on the project. This command usually is not needed, as the build command will trigger a configure if needed. Returns the errors encountered, if any.

build

Runs cabal build on the project. Returns the errors encountered, if any, and the files processed during that build.

build1

Build one file using the GHC API. BuildWrapper takes care of calling the API with the proper flags from the cabal file. Returns the errors encountered during the build, if any. The AST and the build flags used are stored in a hidden file alongside the source file in the work folder. This file, with the .bwinfo extension, is plain JSON and can be parsed by an external tool if need be.

getbuildflags

Returns the build flags use to build a particular file

outline

Returns an outline of the file: the top level declarations, the import and export statements. This is generated using haskell-src-exts so the file does not need to be correct in respect to the typechecker, but needs to be valid Haskell syntax. If need be, the file is pre-processed by cpp2hs.

tokentypes

Returns a collection of lexer tokens for a particular file. The tokens have a type assigned to them (documentation, symbols, etc). This is used to provide syntax coloring in an IDE. If need be, the file is pre-processed and the preprocessor tokens are returned in the collection too.

occurrences

Find all occurrences of the given text in lexer tokens. Only fully matching tokens are retrieved.

thingatpoint

Returns the object found at a particular point in a source. Information can include a name, a module, a type, a haddock type code. This uses the generated .bwinfo file to perform the search so does not invoke the GHC API unless necessary (.bwinfo file missing or older than source)

namesinscope

Returns the list of names in scope (GHC API call)

locals

Returns the list of names defined locally to a point in the source (inside the function, say)

cleanimports

Returns the cleaned imports line: the location and import text for the minimal required imports

dependencies

Returns the list of all package dependencies for all cabal components in the cabal file, with the package database they are registered in

components

Returns the list of all components of the cabal file (executables, library, test suites)