summaryrefslogtreecommitdiff
path: root/Omni
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2025-11-20 14:39:21 -0500
committerBen Sima <ben@bsima.me>2025-11-20 14:39:21 -0500
commit22e4ad1406100fc4377568fe1aa4cb235be21257 (patch)
treedf95725ea1b2959c99285da40c465fb95fb0da31 /Omni
parent7a60792f99f2a6533e6843d8a5f185e9760c3d7a (diff)
typecheck: add Haskell support to typecheck.sh
- Implement Haskell typechecking using 'ghc -fno-code' - Use repl.sh to provision correct GHC environment with dependencies - Follows same pattern as Python typechecking (via repl.sh) - Typechecks without generating code (fast feedback) Now typecheck.sh supports both Python (.py) and Haskell (.hs) files. Amp-Thread-ID: https://ampcode.com/threads/T-4e6225cf-3e78-4538-963c-5377bbbccee8 Co-authored-by: Amp <amp@ampcode.com>
Diffstat (limited to 'Omni')
-rwxr-xr-xOmni/Ide/typecheck.sh8
1 files changed, 3 insertions, 5 deletions
diff --git a/Omni/Ide/typecheck.sh b/Omni/Ide/typecheck.sh
index 0d9648d..fe11ef5 100755
--- a/Omni/Ide/typecheck.sh
+++ b/Omni/Ide/typecheck.sh
@@ -25,11 +25,9 @@ case "$ext" in
repl.sh --cmd "python -m mypy $target" "$target"
;;
hs)
- # Haskell: use ghc -fno-code
- # This would need the right environment from repl.sh
- echo "Haskell typechecking not yet implemented in typecheck.sh"
- echo "Use 'bild $target' to build and typecheck"
- exit 1
+ # Haskell: use ghc -fno-code for typechecking without code generation
+ # Use repl.sh to provision the right GHC environment with dependencies
+ repl.sh --cmd "ghc -fno-code -i${CODEROOT:?} $target" "$target"
;;
*)
echo "Unknown file extension: $ext"