Safe Haskell | None |
---|---|
Language | Haskell2010 |
- getPackageSourceRoot :: FilePath -> Q Exp
Documentation
getPackageSourceRoot :: FilePath -> Q Exp
Takes a package name and returns a directory FilePath
at compile time. The file path is
determined as follows (first working method wins):
- Shell variable. Example: CABAL_PACKAGE_SOURCE_ROOT_THENTOS_CORE for package thentos-core.
- If current directory contains a directory with the same name as the package, take that.
- Like 2., but on *parent* directory.
- Take current directory.
WARNING: use this only for testing or build-time effects!