     (add-to-list 'align-rules-list
                  '(haskell-types
                    (regexp . "\\(\\s-+\\)\\(::\\|∷\\)\\s-+")
-                   (modes . '(haskell-mode literate-haskell-mode))))
+                   (modes . haskell-modes)))
     (add-to-list 'align-rules-list
                  '(haskell-assignment
                    (regexp . "\\(\\s-+\\)=\\s-+")
-                   (modes . '(haskell-mode literate-haskell-mode))))
+                   (modes . haskell-modes)))
     (add-to-list 'align-rules-list
                  '(haskell-arrows
                    (regexp . "\\(\\s-+\\)\\(->\\|→\\)\\s-+")
-                   (modes . '(haskell-mode literate-haskell-mode))))
+                   (modes . haskell-modes)))
     (add-to-list 'align-rules-list
                  '(haskell-left-arrows
                    (regexp . "\\(\\s-+\\)\\(<-\\|←\\)\\s-+")
-                   (modes . '(haskell-mode literate-haskell-mode))))))
+                   (modes . haskell-modes))))))
 
 (defun haskell/init-haskell-snippets ()
   ;; manually load the package since the current implementation is not lazy

    :init (add-hook 'haskell-mode-hook 'ghc-init)
    :config
    (progn
      (spacemacs/declare-prefix-for-mode 'haskell-mode "mm" "haskell/ghc-mod")
      (spacemacs/set-leader-keys-for-major-mode 'haskell-mode
          "mt" 'ghc-insert-template-or-signature
          "mu" 'ghc-initial-code-from-signature
          "ma" 'ghc-auto

  (use-package cmm-mode
    :defer t))

(setq haskell-modes '(haskell-mode literate-haskell-mode))

(when (configuration-layer/layer-usedp 'spacemacs-helm)
  (defun haskell/init-helm-hoogle ()
    (use-package helm-hoogle
      :defer t
      :init
      (dolist (mode haskell-modes)
        (spacemacs/set-leader-keys-for-major-mode mode "hf" 'helm-hoogle)))))

(defun haskell/post-init-flycheck ()
  (spacemacs/add-flycheck-hook 'haskell-mode))
