30 releases (6 stable)
| 1.1.5 | Mar 12, 2025 |
|---|---|
| 1.1.3 | Feb 11, 2025 |
| 1.0.2 | Dec 3, 2024 |
| 1.0.1 | Jul 24, 2024 |
| 0.5.3 | Nov 30, 2023 |
#383 in Command line utilities
1,525 downloads per month
340KB
7.5K
SLoC
ghciwatch
Ghciwatch loads a GHCi session for a Haskell project and reloads it when source files change.
Features
- GHCi output is displayed to the user as soon as it's printed.
- Ghciwatch can handle new modules, removed modules, or moved modules without a hitch
- A variety of lifecycle
hooks
let you run Haskell code or shell commands on a variety of events.
- Run a test suite with
--test-ghci TestMain.testMain. - Refresh your
.cabalfiles withhpackbefore GHCi starts using--before-startup-shell hpack. - Format your code asynchronously using
--before-reload-shell async:fourmolu.
- Run a test suite with
- Custom globs can be supplied to reload or restart the GHCi session when non-Haskell files (like templates or database schema definitions) change.
- Ghciwatch can clear the screen between reloads.
- Compilation errors can be written to a file with
--error-file, for compatibility with ghcid's--outputfileoption. - Comments starting with
-- $>can be evaluated in GHCi.- Eval comments have access to the top-level bindings of the module they're defined in, including unexported bindings.
- Multi-line eval comments are supported with
{- $> ... <$ -}.
Demo
Check out a quick demo to see how ghciwatch feels in practice:
Learn More
Developing ghciwatch
See CONTRIBUTING.md for information on hacking
ghciwatch.
Dependencies
~25–44MB
~637K SLoC