]>
Commit | Line | Data |
---|---|---|
1 | #!/usr/bin/env bash | |
2 | ||
3 | set -eo pipefail | |
4 | ||
5 | go() { | |
6 | local ERROR=0 | |
7 | while IFS= read -r -d '' file | |
8 | do | |
9 | cd "$(dirname "$file")" || exit | |
10 | echo "Typechecking ${file}" | |
11 | if ! dhall --explain resolve < "$(basename "$file")" >/dev/null; then | |
12 | echo "Failed to resolve $file" | |
13 | ERROR=1 | |
14 | fi; | |
15 | cd - >/dev/null || exit | |
16 | done < <(find . -type f -name "*.dhall" -print0) | |
17 | exit $ERROR; | |
18 | } | |
19 | ||
20 | go |