From b2a69f45f912749a1deaeb732d40a8c719a1e41d Mon Sep 17 00:00:00 2001 From: Sohang Chopra Date: Tue, 5 Nov 2024 11:50:05 +0530 Subject: [PATCH] ghcid: add page (#14611) Co-authored-by: Wiktor Perskawiec --- pages/common/ghcid.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 pages/common/ghcid.md diff --git a/pages/common/ghcid.md b/pages/common/ghcid.md new file mode 100644 index 0000000000..9a43109cba --- /dev/null +++ b/pages/common/ghcid.md @@ -0,0 +1,29 @@ +# ghcid + +> Simple and efficient CLI IDE for Haskell that reloads code on file changes. +> Continuously displays compile errors, warnings, and test results. +> More information: . + +- Start `ghcid` and monitor a Haskell file for changes: + +`ghcid {{path/to/Main.hs}}` + +- Start `ghcid` with a specific command, such as loading a Stack or Cabal project: + +`ghcid --command "{{stack ghci Main.hs}}"` + +- Run an action (default `main`) on each file save: + +`ghcid --run={{action}} {{path/to/Main.hs}}` + +- Set maximum height and width (default to console height and width): + +`ghcid --height={{height}} --width={{width}} {{path/to/Main.hs}}` + +- Write full GHC compiler output to a file: + +`ghcid --outputfile={{path/to/output_file.txt}} {{path/to/Main.hs}}` + +- Execute REPL commands (eg. `-- $> 1+1`) on each file save: + +`ghcid --allow-eval {{path/to/Main.hs}}`