Because file embedding runs IO in the Template Haskell Q monad, relative file paths are resolved by the compiler's working directory. Ordinarily, this is the root of the project being built - but if the compiler is e.g. building a dependency, it can also be different.
This change makes it so that template files are always embedded relative to the project that contains the code embedding them, rather than the working directory of the compiler - this means that dependencies in a multi-project codebase can embed files correctly.
Because file embedding runs IO in the Template Haskell
Q
monad, relative file paths are resolved by the compiler's working directory. Ordinarily, this is the root of the project being built - but if the compiler is e.g. building a dependency, it can also be different.This change makes it so that template files are always embedded relative to the project that contains the code embedding them, rather than the working directory of the compiler - this means that dependencies in a multi-project codebase can embed files correctly.