Commit 096f6029 authored by Andrey Mokhov's avatar Andrey Mokhov
Browse files

Add comments.

parent 18a779b2
......@@ -17,6 +17,12 @@ newtype ArgsHashKey = ArgsHashKey Target
-- argument list and computes its hash. The resulting value is tracked in a
-- Shake oracle, hence initiating rebuilts when the hash is changed (a hash
-- change indicates changes in the build system).
-- Note: we replace target sources with ["src"] for performance reasons -- to
-- avoid storing long lists of source files passed to some builders (e.g. Ar)
-- in the Shake database. This optimisation is harmless, because argument list
-- constructors are assumed not to examine target sources, but only append them
-- to argument lists where appropriate.
-- TODO: enforce the above assumption via type trickery?
checkArgsHash :: FullTarget -> Action ()
checkArgsHash target = do
tmp <- askOracle . ArgsHashKey $ target { sources = ["src"] } :: Action Int
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment