5 ms·
For a new project, is ditching Cabal altogether and using Stack recommended?
by thameera 11y ago
For a new project, is ditching Cabal altogether and using Stack recommended?
- rhaps0dy 11y agoWell, you aren't ditching Cabal-the-spec anytime soon :) 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.
- codygman 11y agoFor 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")))))
- kyllo 11y agoNot yet if it's a Yesod project, because yesod devel is tightly coupled to cabal-install.