Lake Traces #
This module defines Lake traces and associated utilities.
Traces are used to determine whether a Lake build artifact is dirty
(needs to be rebuilt) or is already up-to-date.
The primary type is Lake.BuildTrace.
Utilities #
Trace Abstraction #
Compute the trace of an object in a supporting monad.
Instances For
- nilTrace : α
The nil trace. Should not unduly clash with a proper trace.
Instances
- mixTrace : α → α → α
Combine two traces. The result should be dirty if either of the inputs is dirty.
Instances
Instances For
Instances For
Hash Trace #
Constructs a hash with with the value n. This is not equivalent to the hash of n.
Instances For
Parse a hash from a JSON number.
Instances For
Parse a hash from a string of hexadecimal digits. Does no validation.
Instances For
Parse a hash from a 16-digit string of hexadecimal digits.
Instances For
Returns the hash as 16-digit lowercase hex string.
Instances For
Parse a hash from a string of decimal digits.
Instances For
Laod a hash from a .hash file.
Instances For
Hash of a string (without line-ending normalization).
Instances For
Hash of a line-ending normalized string.
Instances For
Hash of a sequence of bytes.
Instances For
Instances For
Compute the hash of object a in a pure context.
Instances For
Compute the hash an object in an supporting monad.
Instances For
Compute the hash of a binary file. Binary files are equivalent only if they are byte identical.
Instances For
Compute the hash of a text file.
Normalizes \r\n sequences to \n for cross-platform compatibility.
Instances For
A wrapper around FilePath that adjusts its ComputeHash implementation
to normalize \r\n sequences to \n for cross-platform compatibility.
- path : System.FilePath
Instances For
Compute the hash of a file. If text := true, normalize line endings.
Instances For
Compute the hash of each element of an array and combine them (left-to-right).
Instances For
Modification Time (MTime) Trace #
Return the modification time of a file recorded by the OS.
Instances For
Lake Build Trace #
Sets the caption of the trace.
Instances For
Clear the inputs of the build trace. This is used to remove unnecessary repetition of trace trees across multiple trace files.
Instances For
Instances For
Instances For
Instances For
Check if the info is up-to-date using a hash. That is, check that info exists and its input hash matches this trace's hash.
Instances For
Check if the info is up-to-date using modification time. That is, check if the info is newer than this input trace's modification time.