From 061e71a8460adb68a16f234c7448c193694da6fd Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 3 Oct 2017 00:52:16 +0200 Subject: [PATCH] [breaking] lang/haskell: refactor + require flags #158 The +intero/+dante module flags are now required; there is no default. --- modules/lang/haskell/+dante.el | 2 +- modules/lang/haskell/+intero.el | 2 +- modules/lang/haskell/config.el | 13 ++++++++----- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/modules/lang/haskell/+dante.el b/modules/lang/haskell/+dante.el index 45ca105ab..bf2d61fa1 100644 --- a/modules/lang/haskell/+dante.el +++ b/modules/lang/haskell/+dante.el @@ -9,5 +9,5 @@ (warn "haskell-mode: couldn't find cabal") (remove-hook 'haskell-mode-hook #'dante-mode)) - (add-hook 'dante-mode-hook #'flycheck-mode)) + (add-hook 'dante-mode-hook #'flycheck-mode)) diff --git a/modules/lang/haskell/+intero.el b/modules/lang/haskell/+intero.el index a27ab768c..5adb63d25 100644 --- a/modules/lang/haskell/+intero.el +++ b/modules/lang/haskell/+intero.el @@ -12,7 +12,7 @@ (add-hook! 'intero-mode-hook #'(flycheck-mode eldoc-mode)) (set! :popup "^intero:backend:" :regex t :size 12) - (set! :jump :definition #'intero-goto-definition)) + (set! :jump 'haskell-mode :definition #'intero-goto-definition)) (def-package! hindent diff --git a/modules/lang/haskell/config.el b/modules/lang/haskell/config.el index 975f84259..8cc1fc152 100644 --- a/modules/lang/haskell/config.el +++ b/modules/lang/haskell/config.el @@ -1,5 +1,13 @@ ;;; lang/haskell/config.el -*- lexical-binding: t; -*- +(cond ((featurep! +intero) (load! +intero)) + ((featurep! +dante) (load! +dante))) + + +;; +;; Common plugins +;; + (def-package! haskell-mode :mode "\\.hs$" :mode ("\\.ghci$" . ghci-script-mode) @@ -30,8 +38,3 @@ (setq company-ghc-show-info 'oneline)) - -;; -(if (featurep! +dante) - (load! +dante) - (load! +intero))