← 返回命令列表

Linux command

ghcid 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Start with default settings

ghcid

Watch specific file

ghcid --target=[file.hs]

Run test on reload

ghcid --test=[main]

With custom command

ghcid --command="[cabal repl]"

Output to terminal title

ghcid --title

说明

ghcid (GHCi daemon) provides rapid Haskell development feedback by running GHCi in the background, watching source files, and automatically reloading on changes. Errors and warnings are displayed immediately. The tool minimizes the compile-fix-compile cycle by providing instant feedback. It integrates with cabal, stack, and bare GHCi. The --test option runs expressions after successful compilation, enabling continuous testing.

参数

--command _CMD_
GHCi command to run.
--target _TARGET_
Target to load.
--test _EXPR_
Expression to run after reload.
--reload _PATH_
Additional paths to watch.
--restart _PATH_
Paths that trigger full restart.
--title
Update terminal title with status.
--help
Display help information.

FAQ

What is the ghcid command used for?

ghcid (GHCi daemon) provides rapid Haskell development feedback by running GHCi in the background, watching source files, and automatically reloading on changes. Errors and warnings are displayed immediately. The tool minimizes the compile-fix-compile cycle by providing instant feedback. It integrates with cabal, stack, and bare GHCi. The --test option runs expressions after successful compilation, enabling continuous testing.

How do I run a basic ghcid example?

Run `ghcid` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --command _CMD_ do in ghcid?

GHCi command to run.