skills: hlint/hpack

This commit is contained in:
Sridhar Ratnakumar 2025-11-04 19:36:46 -05:00
parent a6eb26fc4f
commit 1162e22c79

View file

@ -45,3 +45,7 @@ Every error case in generated code must be handled properly.
As you make code changes, start a subagent in parallel to resolve any compile errors in `ghcid.log`.
**IMPORTANT**: Do not run build commands yourself. The human runs ghcid on the terminal, which then updates `ghcid.log` with any compile error or warning (if this file does not exist, or if ghcid has stopped, remind the human to address it). You should read `ghcid.log` (in _entirety_) after making code changes; this file updates near-instantly. Don't rely on VSCode diagnostics.
**Adding/Deleting modules**: When a new `.hs` file is added or deleted, the `.cabal` file must be updated accordingly. However, if `package.yaml` exists in the project, run `hpack` instead to regenerate the `.cabal` file with the updated module list. This will trigger `ghcid` to restart automatically.
**HLint warnings**: Once all code changes are made and `ghcid.log` shows success, check if the project has a `.hlint.yaml` file. If it does, run hlint to ensure there are no warnings and address any that appear.