summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Weber <greg@gregweber.info>2014-11-17 19:15:51 -0600
committerAustin Seipp <austin@well-typed.com>2014-11-17 19:15:52 -0600
commit0515055abfcf5957d7a957607b4785320627fd65 (patch)
treeafb5e55313e1af468716e822ff337257e779da1c
parent2a6f193bb82f88e8dcb919ee7affc13feae56e98 (diff)
downloadhaskell-0515055abfcf5957d7a957607b4785320627fd65.tar.gz
document addDependentFile uses contents, not mtime
Reviewers: austin Reviewed By: austin Subscribers: thomie, carter Differential Revision: https://phabricator.haskell.org/D481 GHC Trac Issues: #4900
-rw-r--r--libraries/template-haskell/Language/Haskell/TH/Syntax.hs11
1 files changed, 9 insertions, 2 deletions
diff --git a/libraries/template-haskell/Language/Haskell/TH/Syntax.hs b/libraries/template-haskell/Language/Haskell/TH/Syntax.hs
index ddbe3a98e2..48199a4d8e 100644
--- a/libraries/template-haskell/Language/Haskell/TH/Syntax.hs
+++ b/libraries/template-haskell/Language/Haskell/TH/Syntax.hs
@@ -377,9 +377,16 @@ runIO :: IO a -> Q a
runIO m = Q (qRunIO m)
-- | Record external files that runIO is using (dependent upon).
--- The compiler can then recognize that it should re-compile the file using this TH when the external file changes.
--- Note that ghc -M will still not know about these dependencies - it does not execute TH.
+-- The compiler can then recognize that it should re-compile the Haskell file
+-- when an external file changes.
+--
-- Expects an absolute file path.
+--
+-- Notes:
+--
+-- * ghc -M does not know about these dependencies - it does not execute TH.
+--
+-- * The dependency is based on file content, not a modification time
addDependentFile :: FilePath -> Q ()
addDependentFile fp = Q (qAddDependentFile fp)