#!/usr/bin/env bash set -euo pipefail cd "$(dirname "$0")/.." for module in \ src/Nuthatch/Http/Server.hs \ src/Nuthatch/Http/Auth.hs \ src/Nuthatch/Browse.hs \ src/Nuthatch/Transfer.hs \ src/Nuthatch/Mutation/Service.hs \ src/Nuthatch/Mutation/Recovery.hs \ src/Nuthatch/Mutation/Effects.hs; do test -f "$module" done test "$(wc -l &2 exit 1 fi grep -F 'Nuthatch.Mutation.Service' src/Nuthatch/Transfer.hs >/dev/null grep -F 'Nuthatch.Mutation.Service' src/Nuthatch/Http/Server.hs >/dev/null grep -F 'Nuthatch.Mutation.Service' src/Nuthatch/Mutation/Recovery.hs >/dev/null if grep -Eq 'recoverOnce|recoverOne|finalizeRecovered|observeObjectWithRetry' \ src/Nuthatch/App.hs src/Nuthatch/Http/*.hs; then printf '%s\n' "Recovery implementation leaked into HTTP composition" >&2 exit 1 fi printf '%s\n' "Application responsibility boundaries passed"