From 22e4ad1406100fc4377568fe1aa4cb235be21257 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Thu, 20 Nov 2025 14:39:21 -0500 Subject: 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 --- Omni/Ide/typecheck.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'Omni/Ide/typecheck.sh') 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" -- cgit v1.2.3