From 50a9e710f9cff8be9d85d7161bb454a46c3f5734 Mon Sep 17 00:00:00 2001 From: Hussein Ait-Lahcen Date: Mon, 19 Nov 2018 15:50:51 +0100 Subject: add dhall interface --- scripts/dhall_check.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 scripts/dhall_check.sh (limited to 'scripts') diff --git a/scripts/dhall_check.sh b/scripts/dhall_check.sh new file mode 100755 index 0000000..009d570 --- /dev/null +++ b/scripts/dhall_check.sh @@ -0,0 +1,25 @@ +#!/usr/bin/env bash + +pushd () { + command pushd "$@" > /dev/null +} + +popd () { + command popd "$@" > /dev/null +} + +go() { + local ERROR=0; + for file in $(find -type f -name "*.dhall"); do + pushd $(dirname $file); + cat $(basename $file) | dhall --explain resolve > /dev/null; + if [ "$?" -ne "0" ]; then + echo "Failed to resolve $file" + ERROR=1; + fi; + popd; + done; + exit $ERROR; +} + +go -- cgit v1.2.3 From 8b59c20ae4812fe2729d8fb6fb8b12a02a305b4f Mon Sep 17 00:00:00 2001 From: Hussein Ait-Lahcen Date: Mon, 19 Nov 2018 18:57:33 +0100 Subject: add travis ci step for typechecking dhall --- scripts/dhall_check.sh | 1 + 1 file changed, 1 insertion(+) (limited to 'scripts') diff --git a/scripts/dhall_check.sh b/scripts/dhall_check.sh index 009d570..a3413ec 100755 --- a/scripts/dhall_check.sh +++ b/scripts/dhall_check.sh @@ -13,6 +13,7 @@ go() { for file in $(find -type f -name "*.dhall"); do pushd $(dirname $file); cat $(basename $file) | dhall --explain resolve > /dev/null; + echo "Typechecking ${file}" if [ "$?" -ne "0" ]; then echo "Failed to resolve $file" ERROR=1; -- cgit v1.2.3