HLS Troubleshooting
БесплатноБез исполняемых скриптовНе проверенThis skill should be used when the user mentions "HLS not working", "haskell-language-server issues", "Haskell LSP problems", "no completions in Haskell"…
Об этом скилле
HLS Troubleshooting Guide
This skill provides guidance for diagnosing and resolving Haskell Language Server (HLS) issues in Claude Code.
Overview
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.
Quick Check
Before troubleshooting, run the status command to identify the problem:
/hls:status
This performs three checks: PATH availability, version info, and startup test.
Progressive Troubleshooting
Diagnose issues from simple to complex. Most problems fall into one of three levels.
Level 1: HLS Not Found in PATH
Symptoms:
/hls:statusreports PATH check failed- "command not found" errors
- No LSP features available
Diagnosis:
Check if HLS is installed:
which haskell-language-server-wrapper
Common Fixes:
Install via GHCup (recommended):
ghcup install hlsAdd 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-wrapper
Restart Claude Code after PATH changes
Level 2: HLS Started But Unresponsive
Symptoms:
/hls:statusPATH check passes but startup test fails- HLS process visible but no LSP responses
- Long delays before features appear
Diagnosis:
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 --versionConsult
references/hls-docs.xmlfor the GHC version support matrix.Kill stuck processes:
pkill -f haskell-language-serverCheck available memory - HLS requires significant RAM for large projects. Consider:
- Closing other applications
- Increasing swap space
- Using a smaller project subset
Review HLS logs - Enable debug logging:
claude --enable-lsp-loggingLogs written to
~/.claude/debug/
Level 3: HLS Running But LSP Commands Failing
Symptoms:
/hls:statusall checks pass- Some features work but others don't
- Intermittent errors or partial responses
Diagnosis:
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 buildFix 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.yamlSee
references/hls-docs.xmlfor hie.yaml configuration details.Cradle errors - If HLS reports cradle loading failures:
- Ensure
cabal.projectorstack.yamlexists at project root - Run
cabal updateto refresh package index - Check for syntax errors in cabal files
- Ensure
Enable verbose logging for detailed diagnostics:
claude --enable-lsp-loggingCheck
~/.claude/debug/for HLS communication logs.Plugin-specific issues - Some HLS plugins may fail independently. Consult
references/hls-docs.xmlfor plugin configuration.
Platform-Specific Notes
Windows
- Use
whereinstead ofwhichfor PATH checks - PATH separator is
;not: - Common install location:
%APPDATA%\ghcup\bin
macOS
- GHCup installs to
~/.ghcup/bin - May need to allow in System Preferences > Security if blocked
Linux
- GHCup installs to
~/.ghcup/bin - Ensure glibc compatibility for prebuilt binaries
When to Consult Reference Documentation
For detailed information beyond this troubleshooting guide:
- HLS configuration and features: See
references/hls-docs.xml - GHC version issues and compiler errors: See
references/ghc-user.xml - Cabal project setup and build issues: See
references/cabal-docs.xml
These references contain comprehensive documentation for complex issues not covered here.
Summary Checklist
When HLS isn't working:
- Run
/hls:statusfor quick diagnosis - Level 1: Check PATH and installation
- Level 2: Check process state and resources
- Level 3: Check project configuration and builds
- Enable
--enable-lsp-loggingfor detailed debugging - Consult refe
Установить HLS Troubleshooting в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл HLS Troubleshooting?
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.
Как установить скилл HLS Troubleshooting?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл HLS Troubleshooting запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic