cabal init stack init stack build
extra-deps: - persistent-2.2
Then I was wondering how to make emacs haskell-mode work with it, and I saw this[0] in the stack repo:
((haskell-mode . ((haskell-indent-spaces . 4) (hindent-style . "johan-tibell") (haskell-process-type . ghci) (haskell-process-path-ghci . "stack") (haskell-process-args-ghci . ("ghci")))))
0: https://github.com/commercialhaskell/stack/blob/master/.dir-...
In case anyone is wondering how to turn on language pragmas with stack ghci in emacs, I did this for the project I'm working on, because I need OverloadedStrings turned on:
((haskell-mode . ((haskell-indent-spaces . 4) (hindent-style . "johan-tibell") (haskell-process-type . ghci) (haskell-process-path-ghci . "stack") (haskell-process-args-ghci . ("ghci" "--ghc-options" "-XOverloadedStrings")))))
I didn't know about Stack before reading this, but it sounds very good. Cabal-install has always given me problems.
I definitely recommend at least trying it out, and will do so myself.