kazu-yamamoto / hhp

Happy Haskell Programming
BSD 3-Clause "New" or "Revised" License
67 stars 5 forks source link

Error "No such file or directory hhp" #9

Closed mouse07410 closed 5 years ago

mouse07410 commented 5 years ago

I followed your directions for installing hhp. It installed the library and two executables:

$ ghc-pkg list hhp
/Users/ur20980/.ghcup/ghc/8.6.4/lib/ghc-8.6.4/package.conf.d
    (no packages)
/Users/ur20980/.ghc/x86_64-darwin-8.6.4/package.conf.d
    hhp-0.0.0
$ type hhpc
hhpc is /Users/ur20980/.cabal/bin/hhpc
$ type hhpi type hhp
hhpi is /Users/ur20980/.cabal/bin/hhpi
type is a shell builtin
-bash: type: hhp: not found
$ 

Here's how I initialize haskell-mode:

;; Haskell mode
(autoload 'hpp-init' "hhp" nil t)
(autoload 'hhp-debug' "hhp" nil t)
(add-hook 'haskell-mode-hook (lambda () (hpp-init)))

When I open a simple Haskell source file, Emacs reports this error:

File mode specification error: (file-missing Cannot open load file No such file or directory hhp)
mouse07410 commented 5 years ago

Pilot error, provoked by insufficient documentation re. where hhp.el should be located after a successful installation.

In my case it turned out in ~/Library/Haskell/share/ghc-8.6.4-x86_64/hhp-0.0.0/hhp.el. I'm sure there's Cabal or stack parameter that controls this, and it would be nice if it was mentioned/described somewhere.