Add scripts for building EDSL scripts

This commit is contained in:
Manuel Thalmann 2024-06-16 23:02:59 +02:00
parent b46f7563db
commit 6ec26a5769
3 changed files with 18 additions and 0 deletions

1
Exercises/exercise-6/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
*.txt

7
Exercises/exercise-6/build.sh Executable file
View file

@ -0,0 +1,7 @@
for shape in "shape1" "shape2" "shape3" "iShape" "disc50"
do
pushd "${BASH_SOURCE%/*}" > /dev/null
ghc ./Shapes.hs -e "render 100 100 $shape"
mv shape.txt "$shape.txt"
popd > /dev/null
done

10
Exercises/exercise-6/watch.sh Executable file
View file

@ -0,0 +1,10 @@
pushd "${BASH_SOURCE%/*}" > /dev/null
nix-shell -p entr bash --run \
"ls *.hs | \
entr -rs ' \
./build.sh
' \
"
popd > /dev/null