Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Stack" is not found when coding Haskell in emacs

Tags:

emacs

haskell

While coding Haskell in emacs(stack installed with brew) on MacOS 10.12 I get the error:

Error while checking syntax automatically: (file-error "Searching for program" "no such file or directory" "stack")

My config file .emacs contains the following:

(require 'package)
add-to-list
'package-archives
'("melpa" . "http://melpa.org/packages/") t)
(package-initialize)
(package-refresh-contents)
(package-install 'intero)
(add-hook 'haskell-mode-hook 'intero-mode)

Running with emacs --debug-init gives no errors.

Does somebody know how to solve this?

like image 569
Janjaap Ree Avatar asked Sep 24 '26 09:09

Janjaap Ree


1 Answers

I've managed to fix the problem by adding

(add-to-list 'exec-path "/usr/local/bin/")

to the .emacs config file.

like image 51
Janjaap Ree Avatar answered Sep 26 '26 00:09

Janjaap Ree