0

I installed haskell-mode in order to have highlighted code when editing *.hs files.

I have added the following line to my init.el file:

(load "/usr/share/emacs/site-lisp/haskell-mode/haskell-package.el")

As it can be understand from the manual https://github.com/haskell/haskell-mode/wiki/Syntax-highlighting, the code should be highlited automatically by adding this line, right?

I have also added the line

(add-hook 'haskell-mode-hook 'turn-on-haskell-indentation)

into my init.el file just to see if anithing changes but still I get nothing for haskell code.

user2820579
  • 3,261
  • 7
  • 30
  • 45
  • 1
    Is haskell mode enabled? The mode is usually displayed at the bottom of each buffer. If it isn't, enable it (`M-x haskell-mode`) to see if it works. – user2407038 Nov 04 '14 at 22:10
  • it returns `[No match]`, how can I overcome this? – user2820579 Nov 04 '14 at 23:20
  • You don't have haskell mode installed. The easiest way of doing this is using package.el. The instructions [here](https://github.com/haskell/haskell-mode) are very straightforward. – user2407038 Nov 05 '14 at 05:00
  • It dones't work either, I have the lines `(add-to-list 'load-path "/usr/share/emacs/site-lisp/haskell-mode/") (load "/someotherpath/ESS/lisp/ess-site.el") (load "/usr/share/emacs/site-lisp/haskell-mode/haskell-package.el") (add-hook 'haskell-mode-hook 'turn-on-haskell-indentation)` ESS is used by julia and works fine, but the same trick with package.el doesn't work – user2820579 Nov 08 '14 at 19:51
  • now it says: `Symbol's value as variable is void: haskell-font-lock-choose-keywords` – user2820579 Nov 25 '14 at 21:52
  • For all you that are lost as me, follow the instructions in https://github.com/haskell/haskell-mode. (I didn't do the last make all since all worked before smoothly.) – user2820579 Nov 25 '14 at 22:57

1 Answers1

1

It is best to use MELPA to install haskell-mode. Everything should work out of the box when you use MELPA. Instructions to get going with haskell-mode are in the manual:

http://haskell.github.io/haskell-mode/manual/latest/Getting-Started.html#Getting-Started

Gracjan Polak
  • 596
  • 3
  • 16