This skill should be used when the user mentions "HLS not working", "haskell-language-server issues", "Haskell LSP problems", "no completions in Haskell", "HLS diagnostics not showing", "troubleshoot HLS", "Haskell code analysis not working", or asks why HLS features aren't available in Claude Code.
Diagnoses Haskell Language Server issues when users report missing completions, diagnostics, or LSP failures. Guides through three-level troubleshooting: PATH verification, process/resource checks, and project configuration fixes.
/plugin marketplace add m4dc4p/claude-hls/plugin install hls@claude-hlsThis skill inherits all available tools. When active, it can use any tool Claude has access to.
references/cabal-docs.xmlreferences/ghc-user.xmlreferences/hls-docs.xmlThis skill provides guidance for diagnosing and resolving Haskell Language Server (HLS) issues in Claude Code.
HLS provides LSP features for Haskell development: diagnostics, go-to-definition, completions, hover info, and code actions. When HLS isn't working, these features become unavailable for .hs and .lhs files.
Before troubleshooting, run the status command to identify the problem:
/hls:status
This performs three checks: PATH availability, version info, and startup test.
Diagnose issues from simple to complex. Most problems fall into one of three levels.
Symptoms:
/hls:status reports PATH check failedDiagnosis:
Check if HLS is installed:
which haskell-language-server-wrapper
Common Fixes:
Install via GHCup (recommended):
ghcup install hls
Add GHCup to PATH - Add to shell config (.bashrc, .zshrc):
export PATH="$HOME/.ghcup/bin:$PATH"
Verify installation location - Check common paths:
~/.ghcup/bin/haskell-language-server-wrapper~/.local/bin/haskell-language-server-wrapper~/.cabal/bin/haskell-language-server-wrapperRestart Claude Code after PATH changes
Symptoms:
/hls:status PATH check passes but startup test failsDiagnosis:
Check if HLS process is running:
ps aux | grep haskell-language-server
Check system resources:
# Memory usage
free -h
# CPU usage
top -b -n 1 | head -20
Common Fixes:
Wait for initial indexing - HLS may take several minutes on first load for large projects
Check GHC version compatibility - HLS version must match project's GHC:
haskell-language-server-wrapper --version
ghc --version
Consult references/hls-docs.xml for the GHC version support matrix.
Kill stuck processes:
pkill -f haskell-language-server
Check available memory - HLS requires significant RAM for large projects. Consider:
Review HLS logs - Enable debug logging:
claude --enable-lsp-logging
Logs written to ~/.claude/debug/
Symptoms:
/hls:status all checks passDiagnosis:
Test specific LSP features manually. Check project configuration:
# Look for hie.yaml
ls -la hie.yaml
# Check cabal/stack files
ls -la *.cabal cabal.project stack.yaml 2>/dev/null
Common Fixes:
Verify project builds - HLS requires a buildable project:
cabal build # or
stack build
Fix any compilation errors first.
Check hie.yaml configuration - For multi-component projects, HLS needs to know which component each file belongs to. Generate implicit config:
gen-hie > hie.yaml
See references/hls-docs.xml for hie.yaml configuration details.
Cradle errors - If HLS reports cradle loading failures:
cabal.project or stack.yaml exists at project rootcabal update to refresh package indexEnable verbose logging for detailed diagnostics:
claude --enable-lsp-logging
Check ~/.claude/debug/ for HLS communication logs.
Plugin-specific issues - Some HLS plugins may fail independently. Consult references/hls-docs.xml for plugin configuration.
where instead of which for PATH checks; not :%APPDATA%\ghcup\bin~/.ghcup/bin~/.ghcup/binFor detailed information beyond this troubleshooting guide:
references/hls-docs.xmlreferences/ghc-user.xmlreferences/cabal-docs.xmlThese references contain comprehensive documentation for complex issues not covered here.
When HLS isn't working:
/hls:status for quick diagnosis--enable-lsp-logging for detailed debugging