summaryrefslogtreecommitdiff
path: root/Omni/Ide/typecheck.sh
blob: 5f92c90248bba85c03efbe71160b0206101c2d69 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env bash
###
### typecheck a given target
###
### > typecheck.sh <target..>
###
### Runs the typechecker for the given target by building it with bild.
### This leverages bild's built-in typechecking without running tests.
###
help() {
    sed -rn 's/^### ?//;T;p' "$0"
}
if [[ $# == 0 ]] || [[ "$1" == "-h" ]]; then
    help
    exit 1
fi
target="$1"

# Use bild to typecheck (bild runs mypy for Python, ghc for Haskell, etc.)
# This is simpler than trying to set up the environment ourselves
bild "$target"