Skip to content
Snippets Groups Projects
Commit 6dd579fc authored by sheaf's avatar sheaf Committed by Mikolaj
Browse files

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).
parent b7cc3264
No related branches found
No related tags found
Loading
Showing
with 192 additions and 131 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment