Skip to content

Load a GHCi session for a Haskell project and reload it when source files change

License

Notifications You must be signed in to change notification settings

MercuryTechnologies/ghciwatch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

c404f36 · Mar 12, 2025
Oct 31, 2023
Feb 11, 2025
Sep 13, 2024
Mar 8, 2025
Mar 12, 2025
Oct 5, 2023
Mar 10, 2025
Mar 12, 2025
Feb 6, 2025
May 29, 2024
May 29, 2024
Mar 12, 2025
Mar 12, 2025
Jun 7, 2023
Aug 2, 2024
Mar 8, 2025
Mar 10, 2025
Sep 18, 2023
May 23, 2024
May 23, 2024

Repository files navigation

ghciwatch

Packaging status
Packaging status
User manual

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.
  • 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 --outputfile option.
  • 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

Read the manual here.

Developing ghciwatch

See CONTRIBUTING.md for information on hacking ghciwatch.