I installed Haskell for the use of TidalCycles on Mac / 10.14.6 TidalCycles works fine, so Haskell should to work too. However, after entering 'ghci' in the terminal, the following message appears

-bash: ghci: command not found

Do I have to set a correct path (e.g. .bashrc)? And if so, where to?

Thanks for every help!


This depends on how you installed Haskell.

The recommended way to install Haskell on a Mac according to TidalCycles documentation is to install ghcup using this command:

curl https://get-ghcup.haskell.org -sSf | sh

If you install Haskell this way the install script will ask you to add a line to your ~/.bashrc or ~/.bash_profile that should take care of adding everything you need to your $PATH.

If you installed Haskell in a different way you can update the question to reflect that and I will update my answer.

If you want to fix things manually you can try if running this makes ghci available:

. "$HOME/.ghcup/env"

If that's the case you can make ghci available permanently by adding . $HOME/.ghcup/env to the appropriate dotfile (.bashrc or .bash_profle)

This blog post provides a more detailed tutorial on how to install Haskell and on how to make sure that all the executables are in your $PATH.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.