I want that my TemplateHaskell expression, which uses IO and depends on the file MyDependency.txt
, is recomputed when that file is being changed.
Therefore I am using addDependentFile "MyDependency.txt"
to tell ghc to check that file for modification when compiling my code.
Unfortunately, this does not work because addDependentFile
only works relative to the directory from which ghc is called.
How can I use it to depend on a file that is just next to (in the same directory as) the file I am compiling?