Skip to content

Commit e5df2d1

Browse files
committed
Improve the error message when a file hasn't been type checked
1 parent 51c504e commit e5df2d1

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ rec {
101101
'';
102102
postInstall = ''
103103
cp -r latex/ Makefile typecheck.time $out
104-
sh checkTypeChecked.sh
104+
sh checkTypeChecked.sh -m
105105
'';
106106
extraExtensions = [ "hs" "cabal" "py" ];
107107
};

src/checkTypeChecked.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@ echo "Checking that all Agda files have been typechecked..."
44
for agdaFn in $(find . -name '*.*agda'); do
55
agdaiFn="_build/2.7.0/agda/${agdaFn%.*agda}.agdai"
66
if [ "$(( $(stat -c "%Y" $agdaiFn) - $(stat -c "%Y" $agdaFn) ))" -lt "0" ]; then
7-
echo " FAIL: $agdaiFn is not up-to-date"
7+
if [ "$1" = "-m" ]; then
8+
echo " FAIL: $agdaiFn does not exist. Please remove the corresponding agda file or import it somewhere, e.g. from the Everything module."
9+
fi
810
exit 1
911
fi
1012
done
11-
echo " PASS: all Agda files have been typechecked"
13+
echo " PASS: all Agda files have been typechecked."

0 commit comments

Comments
 (0)