2
votes

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.
1
make sure which hdevtools shows ~/.local/bin/hdevtools, make sure to load a new shell or do an export PATH... in your old shelljberryman
@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?user3773571
have you started a new bash since? (source ~/.bash_profile should do as well)Random Dev
@Carsten Yep. No dice.user3773571
Try export PATH="$HOME/..." instead of export PATH="~/...". ~ is not expanded inside double quotes.Sato Katsura

1 Answers

1
votes

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.