I want my TemplateHaskell expression, which uses IO and depends on the MyDependency.txt file, to be re-evaluated when this file changes.
Therefore, I use addDependentFile "MyDependency.txt" to tell ghc to check this file for modification when compiling my code.
Unfortunately, this does not work, because addDependentFile only works with the directory from which ghc is called.
How can I use it to depend on the file that is next to (in the same directory as) that I am compiling?
source share