Setup Hooks: make Location a separate data type
This commit makes Location a separate data type:
data Location where
Location
:: SymbolicPath Pkg (Dir baseDir)
-> RelativePath baseDir File
-> Location
instead of being a type synonym for (FilePath, FilePath).
We noted during testing of the Hooks API that it was all too easy to
give an incorrect location for rule outputs, e.g. by omitting an
extension or using an absolute path.
This change allows us to improve the API documentation, as well as
clarifying the types to avoid any ambiguities about what kind of file
path is expected (FilePath vs SymbolicPath).
19 files changed: