[commit: ghc] master: document addDependentFile uses contents, not mtime (0515055)

git at git.haskell.org git at git.haskell.org
Tue Nov 18 01:19:58 UTC 2014


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/0515055abfcf5957d7a957607b4785320627fd65/ghc

>---------------------------------------------------------------

commit 0515055abfcf5957d7a957607b4785320627fd65
Author: Greg Weber <greg at gregweber.info>
Date:   Mon Nov 17 19:15:51 2014 -0600

    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


>---------------------------------------------------------------

0515055abfcf5957d7a957607b4785320627fd65
 libraries/template-haskell/Language/Haskell/TH/Syntax.hs | 11 +++++++++--
 1 file 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 ddbe3a9..48199a4 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)
 



More information about the ghc-commits mailing list