2

Problem

I'm trying to set up hdevtools for piping GHC errors into my editor linter (so that you don’t have to continually run :r in GHCi to see errors). I have run into a hdevtools is not executable! error.

Question

Does anyone know what I’ve done wrong or what I can do to get this working? I'm not sure if this is a problem with the way I set up GHC and/or hdevtools, or if this is a problem with the permission settings of my directories or something...

Background info

  • Here is what the error and setup looks like: enter image description here
  • To get to this point, I followed the the instructions from http://seanhess.github.io/2015/08/05/practical-haskell-editors.html. Basically, I ran brew install ghc, brew install haskell-stack, stack setup, stack install hdevtools, and updated my path as show in the picture above ^
  • I'm brand new to Haskell. Been tinkering for a couple weeks.
  • I'm on OSX
  • It should be unrelated, but I’m using Syntastic with Vim + vim-hdevtools.
  • 2
    make sure `which hdevtools` shows `~/.local/bin/hdevtools`, make sure to load a new shell or do an `export PATH...` in your old shell – jberryman Feb 27 '16 at 23:14
  • @jberryman `which hdevtools` shows nothing so it looks like I've done something wrong; I'm not sure why though as `ls ~/.local/bin` outputs `hdevtools` and I have `export PATH="~/.stack/programs/x86_64-osx/ghc-7.10.3/bin/ghc:~/.local/bin:$PATH"` in my `.bash_profile`. Any ideas? –  Feb 28 '16 at 05:56
  • have you started a new bash since? (`source ~/.bash_profile` should do as well) – Random Dev Feb 28 '16 at 12:19
  • @Carsten Yep. No dice. –  Feb 28 '16 at 19:46
  • 1
    Try `export PATH="$HOME/..."` instead of `export PATH="~/..."`. `~` is not expanded inside double quotes. – Sato Katsura Feb 28 '16 at 20:33
  • @SatoKatsura Yay! That did the trick. Thank you. If you want to re-post this as an "Answer", I'll pick it so you get the points. –  Feb 28 '16 at 22:57

1 Answers1

1

I am not sure but I had a similar issue using the ghc provided by the ppa:hvr package which installs the ghc in /usr/opt/ghc/

I linked

  • /opt/ghc/7.10.3/bin/ -> /home/epsilonhalbe/bin/ghc/
  • /home/epsilonhalbe/.local/bin -> /home/epsilonhalbe/bin/util

then i added the following to my .vimrc

" ADJUST PATH {{{
if (index(split($PATH,':'),'/home/epsilonhalbe/bin') < 0)
    let $PATH = '/home/epsilonhalbe/bin' . ':' . $PATH
endif
if (index(split($PATH,':'),'/home/epsilonhalbe/bin/ghc') < 0)
    let $PATH = '/home/epsilonhalbe/bin/ghc' . ':' . $PATH
endif
if (index(split($PATH,':'),'/home/epsilonhalbe/bin/util') < 0)
    let $PATH = '/home/epsilonhalbe/bin/util' . ':' . $PATH
endif
" }}}

maybe this helps.

epsilonhalbe
  • 15,637
  • 5
  • 46
  • 74