summaryrefslogtreecommitdiff
path: root/hadrian/build.stack.bat
diff options
context:
space:
mode:
Diffstat (limited to 'hadrian/build.stack.bat')
-rw-r--r--hadrian/build.stack.bat11
1 files changed, 11 insertions, 0 deletions
diff --git a/hadrian/build.stack.bat b/hadrian/build.stack.bat
new file mode 100644
index 0000000000..674375a3cf
--- /dev/null
+++ b/hadrian/build.stack.bat
@@ -0,0 +1,11 @@
+@echo off
+setlocal
+rem Change the current directory to the one containing this script
+cd %~dp0
+
+rem Build Hadrian and dependencies and exit the script if the build failed
+stack build
+if %errorlevel% neq 0 exit /B %errorlevel%
+
+rem Run Hadrian in GHC top directory forwarding additional user arguments
+stack exec hadrian -- --lint --directory ".." %*