1
Fork 0
effect-systems/.githooks/pre-commit

14 lines
258 B
Bash
Executable File

#!/bin/bash
set -e
filesToFormat=$(
git --no-pager diff --name-status --no-color --cached | \
awk '$1 != "D" && $2 ~ /\.hs/ {print $NF}'
)
for path in $filesToFormat
do
ormolu --ghc-opt -XTypeApplications --mode inplace $path
git add $path
done;