2

The Haskell stack build doesn't install ghc to the system, only for itself, and using spacemacs without a systemwide configured ghc have been a painful experience (to me).

My question is, there is a correct way of configuring emacs/spacemacs for using with stack, or users are supposed to install a systemwide ghc and stack to work with emacs/spacemacs and haskell?

Creating a layer specific to deal with stack seems to me to be the right solution, but I don't know how to do this, I'm a beginner on both stack and emacs, so...

flavio
  • 121
  • 1
  • 3

2 Answers2

1

I use intero for programming Haskell in Emacs. It has superior stack support. Check it out at its homepage.

Tassilo Horn
  • 326
  • 1
  • 5
1

Spacemacs already have the Haskell layer.

This layer has the following dependencies:

  • apply-refact (required by hlint-refactor)
  • hlint (required by hlint-refactor)
  • stylish-haskell (optional for haskell-mode)
  • hasktags (optional)
  • hoogle (optional for haskell-mode and helm-hoogle)
  • ghc-mod (optional for completion)
  • intero (optional for completion)

You can install them all with the following command (or the stack equivalent):

$ cabal install apply-refact hlint stylish-haskell hasktags hoogle

It also has the following syntax checkers:

  • flycheck
  • hlint (via flycheck)
  • ghc-mod
  • haskell-mode interactive
  • The `haskell layer` works well with a system install of haskell, but the question is how to do a good suport for the **haskell Stack**. The haskell layer doesn't do a good job on the interactive mode without having ghc installed system wide – flavio Jun 20 '17 at 00:44