#haskell #watch #compile #ghci #notify

bin+lib ghciwatch

Ghciwatch loads a GHCi session for a Haskell project and reloads it when source files change

26 releases (2 stable)

1.0.1 Jul 24, 2024
0.5.16 May 24, 2024
0.5.8 Feb 26, 2024
0.5.6 Dec 13, 2023
0.5.3 Nov 30, 2023

#382 in Development tools

Download history 2/week @ 2024-06-28 12/week @ 2024-07-05 107/week @ 2024-07-19 45/week @ 2024-07-26 4/week @ 2024-08-02 12/week @ 2024-09-13 9/week @ 2024-09-20 35/week @ 2024-09-27 5/week @ 2024-10-04

61 downloads per month

MIT license

325KB
7K SLoC

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:

Developing ghciwatch

See CONTRIBUTING.md for information on hacking ghciwatch.

Dependencies

~26–40MB
~634K SLoC