Skip to content

fix: syntax error in ghciwatch command causing ghciwatch to error out when multiple hs files are in the app folder#21

Merged
dmjio merged 1 commit into
haskell-miso:mainfrom
mtamc:fix/watch_command_syntax_error
Apr 16, 2026
Merged

fix: syntax error in ghciwatch command causing ghciwatch to error out when multiple hs files are in the app folder#21
dmjio merged 1 commit into
haskell-miso:mainfrom
mtamc:fix/watch_command_syntax_error

Conversation

@mtamc
Copy link
Copy Markdown
Contributor

@mtamc mtamc commented Apr 16, 2026

--watch app/*.hs gets expanded to --watch app/File1.hs app/File2.hs which is unsupported and causes the following error:

ghciwatch --after-startup-ghci :main --after-reload-ghci :main --watch app/*.hs --debounce 50ms --command 'wasm32-wasi-cabal repl app -finteractive --repl-options="-fghci-browser -fghci-browser-port=8080"'
error: the argument '[FILE]' cannot be used with '--command <SHELL_COMMAND>'

Usage: ghciwatch [--command SHELL_COMMAND] [--watch PATH] [OPTIONS ...]

For more information, try '--help'.
make: *** [Makefile:18: watch] Error 2

According to the docs the correct syntax is --watch app or --watch app/File1.hs --watch app/File2.hs. https://mercurytechnologies.github.io/ghciwatch/cli.html#--watch

This PR simply uses --watch app.

… when multiple hs files are in the app folder
@dmjio dmjio merged commit 1ff7177 into haskell-miso:main Apr 16, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants