Skip to content
  • Moritz Angermann's avatar
    Add support for relative lookup of template-hsc.h (#2) · 9c13b192
    Moritz Angermann authored and Herbert Valerio Riedel's avatar Herbert Valerio Riedel committed
    If the `IN_GHC_TREE` CPP macro is defined (controlled by the `in-ghc-tree` cabal flag),
    as a last resort, we also try to locate the template relative to the location of the currently
    executed `hsc2hs`. Note that this is a hack to work around
    only partial relocatable support in cabal, and is here to allow the `hsc2hs`
    built and shipped with ghc to be relocatable with the ghc
    binary distribution it ships with.
    
    Note that on Windows, `getExecutablePath` doesn't yet operate correctly
    in the presence of symlinks; but this should note have any detrimental
    effects. This will be fixed/improved in future `base` version.
    9c13b192