I've come to rely a lot on projectile-toggle-between-implementation-and-test to jump between implementation and test when developing Clojure. However when I tried to use it in my Haskell projects it didn't work at all. I found that two things needed adjusting.

  1. The project type was wrongly set to make. I fixed that by explicitly setting it to haskell-cabal in my .dir-locals.el:

    ((nil . ((projectile-project-type . haskell-cabal))))
  2. Second, the test suffix, Spec, didn't match what I use so I put this in my config:

    (with-eval-after-load 'haskell-mode
      (plist-put (alist-get 'haskell-cabal projectile-project-types)
                 'test-suffix "Test"))

I'm not very experienced with configuring Emacs, so I'm wondering if this is a good way of doing it, or if there's a better way?

  • 1
    The question risks being closed as primarily opinion-based. Instead of asking for the best way, or is there a better way, try asking a specific question about your actual code. – Drew Jul 25 '20 at 18:17
  • Please clarify what notion of "good/bad" you're interested in. I.e. state the problems you see in your current solution. – Stefan Jul 25 '20 at 20:03
  • Well, I'm not seeing any problems with it, but as I mention, I am not experienced so maybe there /are/ problems with it! – Magnus Jul 26 '20 at 19:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.