Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/MercuryTechnologies/ghciwatch
ghci-based file watching recompiler for Haskell development
https://github.com/MercuryTechnologies/ghciwatch
ghci haskell inotify
Last synced: 8 days ago
JSON representation
ghci-based file watching recompiler for Haskell development
- Host: GitHub
- URL: https://github.com/MercuryTechnologies/ghciwatch
- Owner: MercuryTechnologies
- License: mit
- Created: 2023-06-07T20:29:49.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-22T18:36:22.000Z (6 months ago)
- Last Synced: 2024-05-22T21:20:28.826Z (6 months ago)
- Topics: ghci, haskell, inotify
- Language: Rust
- Homepage: https://mercurytechnologies.github.io/ghciwatch/
- Size: 1.68 MB
- Stars: 40
- Watchers: 41
- Forks: 6
- Open Issues: 39
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# ghciwatch
Ghciwatch loads a [GHCi][ghci] session for a Haskell project and reloads it
when source files change.[ghci]: https://downloads.haskell.org/ghc/latest/docs/users_guide/ghci.html
## 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](https://mercurytechnologies.github.io/ghciwatch/lifecycle-hooks.html)
let you run Haskell code or shell commands on a variety of events.
- Run a test suite with [`--test-ghci
TestMain.testMain`](https://mercurytechnologies.github.io/ghciwatch/cli.html#--test-ghci).
- Refresh your `.cabal` files with [`hpack`][hpack] before GHCi starts using
[`--before-startup-shell
hpack`](https://mercurytechnologies.github.io/ghciwatch/cli.html#--before-startup-shell).
- Format your code asynchronously using [`--before-reload-shell
async:fourmolu`](https://mercurytechnologies.github.io/ghciwatch/cli.html#--before-reload-shell).
- [Custom
globs](https://mercurytechnologies.github.io/ghciwatch/cli.html#--reload-glob)
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](https://mercurytechnologies.github.io/ghciwatch/cli.html#--clear).
- Compilation errors can be written to a file with
[`--error-file`](https://mercurytechnologies.github.io/ghciwatch/cli.html#--error-file),
for compatibility with [ghcid's][ghcid] `--outputfile` option.
- Comments starting with `-- $>` [can be
evaluated](https://mercurytechnologies.github.io/ghciwatch/comment-evaluation.html)
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 `{- $> ... <$ -}`.[ghcid]: https://github.com/ndmitchell/ghcid
[hpack]: https://github.com/sol/hpack## Demo
Check out a quick demo to see how ghciwatch feels in practice:
## Learn More
[Read the manual here](https://mercurytechnologies.github.io/ghciwatch/).
## Developing ghciwatch
See [`CONTRIBUTING.md`](./CONTRIBUTING.md) for information on hacking
ghciwatch.