rice

personal dot files and scripts for linux and macOS
Log | Files | Refs | README | LICENSE

module-haskell.el (1542B)


      1 ;;; module-haskell.el
      2 
      3 ;; Author: Mark Feller <mark.feller@member.fsf.org>
      4 
      5 ;; This file is not part of GNU Emacs.
      6 
      7 ;; This file is free software; you can redistribute it and/or modify
      8 ;; it under the terms of the GNU General Public License as published by
      9 ;; the Free Software Foundation; either version 3, or (at your option)
     10 ;; any later version.
     11 
     12 ;; This file is distributed in the hope that it will be useful,
     13 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 ;; GNU General Public License for more details.
     16 
     17 ;; You should have received a copy of the GNU General Public License
     18 ;; along with this file.  If not, see <http://www.gnu.org/licenses/>.
     19 
     20 ;;; Commentary:
     21 
     22 ;;; Code:
     23 
     24 (use-package haskell-mode
     25   :bind (:map haskell-mode-map
     26               ("C-c C-c" . haskell-compile)
     27               :map haskell-cabal-mode-map
     28               ("C-c C-c" . haskell-compile))
     29   :config
     30   (progn (setq haskell-stylish-on-save t)
     31          (setq haskell-doc-prettify-types t)
     32 
     33          (defun haskell-mode-defaults ()
     34            (subword-mode +1)
     35            (eldoc-mode +1)
     36            (haskell-indentation-mode +1)
     37            (interactive-haskell-mode +1))
     38 
     39          (setq haskell-mode-hook 'haskell-mode-defaults)
     40 
     41          (add-hook 'haskell-mode-hook (lambda ()
     42                                         (run-hooks 'haskell-mode-hook)))))
     43 
     44 (use-package flycheck-haskell
     45   :after (haskell-mode flycheck-mode))
     46 
     47 (provide 'module-haskell)
     48 
     49 ;;; module-haskell.el ends here