GHCi doesn't track files added by addDependentFile in TH
Summary
Language.Haskell.TH.Syntax.addDependentFile
causes external files to be tracked for recompilation at least with ghc --make
. However it seems to have no effect in ghci.
Steps to reproduce
Load the following file in ghci with some text saved in foo
:
{-# LANGUAGE TemplateHaskell #-}
import Language.Haskell.TH.Syntax
$(addDependentFile "foo" >> return [])
Edit foo
and reload ghci with :r
.
Expected behavior
I would expect to see [1 of 1] Compiling Main
. Instead just Ok, one module loaded.
Environment
- GHC version used: 8.10.1