thentos-core-0.0.1.1: The swiss army knife of privacy-preserving identity management

Safe HaskellNone
LanguageHaskell2010

Paths.TH

Synopsis

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):

  1. Shell variable. Example: CABAL_PACKAGE_SOURCE_ROOT_THENTOS_CORE for package thentos-core.
  2. If current directory contains a directory with the same name as the package, take that.
  3. Like 2., but on *parent* directory.
  4. Take current directory.

WARNING: use this only for testing or build-time effects!