3 ms·
For a recent project I did: cabal init stack init stack build Then I wanted a newer version of persistent, so I opened up my stack.yaml file and a
by codygman 11y ago
For a recent project I did:
cabal init
stack init
stack build
Then I wanted a newer version of persistent, so I opened up my stack.yaml file and added persistent 2.2 to the extra-deps section:
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")))))
Now everything is working flawlessly and very fast. As a bonus Haskell-mode works correctly for projects I haven't moved to/tested with stack yet.
0: https://github.com/commercialhaskell/stack/blob/master/.dir-locals.el https://github.com/commercialhaskell/stack/blob/master/.dir-...
- kyllo 11y agoSame experience here--that .dir-locals.el was absolutely crucial. 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")))))