0

Complete Haskell beginner here.

MacOS 12.2.1

I have installed Haskell with ghcup, and ghci 8.10.7 is installed. Excellent.

Following the instructions here, I have added ghcid

cabal update && cabal install ghcid

and created a project

mkdir myproject && cd myproject
cabal init -n --is-executable
cabal v2-run

and happily, "Hello Haskell!" appears.

When I run ghcid

ghcid "--command=ghci Main.hs"

from the root directory ("myproject"), I get this output

% ghcid "--command=ghci Main.hs"
Loading ghci Main.hs ...
GHCi, version 8.10.7: https://www.haskell.org/ghc/  :? for help

<no location info>: error: can't find file: Main.hs
Failed, no modules loaded.

No files loaded, GHCi is not working properly.
Command: ghci Main.hs

So I give ghcid some more information by explicitly passing app/Main.js

ghcid "--command=ghci app/Main.hs"
Loading ghci app/Main.hs ...
GHCi, version 8.10.7: https://www.haskell.org/ghc/  :? for help
[1 of 1] Compiling Main             ( app/Main.hs, interpreted )
Ok, one module loaded.

and the title of my terminal emulator says "All good, at 09:37:26 - myproject". I had expected to see the green text "All good" in the terminal, not in the title!

Making a typo in app/Main updates the title bar with "1 error - myproject", and doesn't update the "body" of the terminal with any info about the error.

I am using iTerm2 - doesn't matter what I set the emulation to (VT100, ansi, xterm, xterm-256).

I am sure I have some beginner's mis-understanding here, but I'd be grateful for some help.

Thanks

user2162871
  • 409
  • 3
  • 10
  • It seems like ghcid [shows its status on the title](https://github.com/ndmitchell/ghcid/issues/252), so title thing is normal. The content should display in the terminal, though. Have you tried scrolling down? – Abastro Mar 08 '22 at 06:57
  • Yes, there is nothing below. – user2162871 Mar 09 '22 at 01:16

0 Answers0