diff --git a/contrib/lang/haskell/README.md b/contrib/lang/haskell/README.md
index 6b796caae..59f1207cf 100644
--- a/contrib/lang/haskell/README.md
+++ b/contrib/lang/haskell/README.md
@@ -29,12 +29,11 @@ Top-level commands are prefixed by SPC m:
Key Binding | Description
----------------------|------------------------------------------------------------
-SPC m C | compile the current project
SPC m t | gets the type of the identifier under the cursor
SPC m i | gets information for the identifier under the cursor
-SPC m b | build the current cabal project
SPC m u | finds uses of identifier
SPC m g | go to definition or tag
+SPC m f | format buffer using haskell-stylish
#### Documentation commands:
Documentation commands are prefixed by SPC m h
@@ -51,7 +50,9 @@ Cabal commands are prefixed by SPC m c:
Key Binding | Description
----------------------|------------------------------------------------------------
-SPC m c c | cabal actions
+SPC m c a | cabal actions
+SPC m c b | build the current cabal project, i.e. invoke `cabal build`
+SPC m c c | compile the current project, i.e. invoke `ghc`
SPC m c v | visit the cabal file
#### Debug commands:
@@ -62,7 +63,7 @@ Debug commands are prefixed by SPC m d:
SPC m d d | start debug process, needs to be run first
SPC m d b | insert breakpoint at function
SPC m d n | next breakpoint
-SPC m d p | previous breakpoint
+SPC m d N | previous breakpoint
SPC m d B | delete breakpoint
SPC m d c | continue current process
SPC m d a | abandon current process
diff --git a/contrib/lang/haskell/packages.el b/contrib/lang/haskell/packages.el
index e286041a1..545099f9c 100644
--- a/contrib/lang/haskell/packages.el
+++ b/contrib/lang/haskell/packages.el
@@ -1,6 +1,7 @@
(defvar haskell-packages
'(
flycheck
+ flycheck-haskell
ghc
haskell-mode
ghci-completion
@@ -11,7 +12,8 @@
(add-to-list 'haskell-packages 'company-ghc))
(defun haskell/init-flycheck ()
- (add-hook 'haskell-mode-hook 'flycheck-mode))
+ ;;(add-hook 'haskell-mode-hook 'flycheck-mode))
+ (add-hook 'flycheck-mode-hook 'flycheck-haskell-setup))
(defun haskell/init-haskell-mode ()
(require 'haskell-yas)
@@ -39,8 +41,8 @@
'(haskell-process-suggest-remove-import-lines t)
'(haskell-process-auto-import-loaded-modules t)
- ;; To enable stylish on save.
- '(haskell-stylish-on-save t))
+ ;; Disable haskell-stylish on save, it breaks flycheck highlighting
+ '(haskell-stylish-on-save nil))
;; Make sure company-ghc is properly initialized
(autoload 'ghc-init "ghc" nil t)
@@ -69,20 +71,21 @@
(evil-leader/set-key-for-mode 'haskell-mode
- "mC" 'haskell-compile
- "mt" 'haskell-process-do-type
- "mi" 'haskell-process-do-info
- "mb" 'haskell-process-cabal-build
- "mu" 'haskell-mode-find-uses
- "mg" 'haskell-mode-jump-to-def-or-tag
+ "mt" 'haskell-process-do-type
+ "mi" 'haskell-process-do-info
+ "mu" 'haskell-mode-find-uses
+ "mg" 'haskell-mode-jump-to-def-or-tag
+ "mf" 'haskell-mode-stylish-buffer
"msb" 'haskell-process-load-or-reload
"msc" 'haskell-interactive-mode-clear
"mss" 'haskell-interactive-bring
"msS" 'haskell-interactive-switch
- "mcc" 'haskell-process-cabal
- "mcv" 'haskell-cabal-visit-file
+ "mca" 'haskell-process-cabal
+ "mcb" 'haskell-process-cabal-build
+ "mcc" 'haskell-compile
+ "mcv" 'haskell-cabal-visit-file
"mhh" 'hoogle
"mhy" 'hayoo
@@ -91,7 +94,7 @@
"mdd" 'haskell-debug
"mdb" 'haskell-debug/break-on-function
"mdn" 'haskell-debug/next
- "mdp" 'haskell-debug/previous
+ "mdN" 'haskell-debug/previous
"mdB" 'haskell-debug/delete
"mdc" 'haskell-debug/continue
"mda" 'haskell-debug/abandon