From 1cb753cbb1c9bb31845ccffd307d482e7cc3bbba Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 14 Apr 2020 19:27:33 -0400 Subject: [PATCH] lang/haskell: remove intero support The package was deprecated and abandoned upstream since November 2019. Closes #2121 --- core/core-modules.el | 6 ++---- docs/modules.org | 2 +- modules/lang/haskell/+intero.el | 30 ------------------------------ modules/lang/haskell/README.org | 17 ++++++----------- modules/lang/haskell/autoload.el | 9 +++------ modules/lang/haskell/config.el | 4 +--- modules/lang/haskell/doctor.el | 8 +------- modules/lang/haskell/packages.el | 3 --- 8 files changed, 14 insertions(+), 65 deletions(-) delete mode 100644 modules/lang/haskell/+intero.el diff --git a/core/core-modules.el b/core/core-modules.el index 21bb388a5..c0125b8dd 100644 --- a/core/core-modules.el +++ b/core/core-modules.el @@ -142,10 +142,8 @@ following properties: :path [STRING] path to category root directory Example: - (doom-module-set :lang 'haskell :flags '(+intero))" - (puthash (cons category module) - plist - doom-modules)) + (doom-module-set :lang 'haskell :flags '(+dante))" + (puthash (cons category module) plist doom-modules)) (defun doom-module-path (category module &optional file) "Like `expand-file-name', but expands FILE relative to CATEGORY (keywordp) and diff --git a/docs/modules.org b/docs/modules.org index 7ad429148..276f7ebb4 100644 --- a/docs/modules.org +++ b/docs/modules.org @@ -109,7 +109,7 @@ Modules that bring support for a language or group of languages to Emacs. + [[file:../modules/lang/fsharp/README.org][fsharp]] - TODO + [[file:../modules/lang/fstar/README.org][fstar]] - F* support + [[file:../modules/lang/go/README.org][go]] =+lsp= - TODO -+ [[file:../modules/lang/haskell/README.org][haskell]] =+dante +ghcide +lsp +intero= - TODO ++ [[file:../modules/lang/haskell/README.org][haskell]] =+dante +ghcide +lsp= - TODO + hy - TODO + [[file:../modules/lang/idris/README.org][idris]] - TODO + java =+meghanada +lsp= - TODO diff --git a/modules/lang/haskell/+intero.el b/modules/lang/haskell/+intero.el deleted file mode 100644 index f8d84177c..000000000 --- a/modules/lang/haskell/+intero.el +++ /dev/null @@ -1,30 +0,0 @@ -;;; lang/haskell/+intero.el -*- lexical-binding: t; -*- -;;;###if (featurep! +intero) - -(use-package! intero - :commands intero-mode - :hook (haskell-mode-local-vars . +haskell-init-intero-h) - :config - (defun +haskell-init-intero-h () - "Initializes `intero-mode' in haskell-mode, unless stack isn't installed. -This is necessary because `intero-mode' doesn't do its own error checks." - (when (derived-mode-p 'haskell-mode) - (if (executable-find "stack") - (intero-mode +1) - (message "Couldn't find stack. Refusing to enable intero-mode.")))) - - (setq haskell-compile-cabal-build-command "stack build --fast") - (set-lookup-handlers! 'intero-mode :definition #'intero-goto-definition) - (set-company-backend! 'intero-mode 'intero-company) - (when (featurep! :checkers syntax) - (flycheck-add-next-checker 'intero '(warning . haskell-hlint))) - - (when (featurep 'evil) - (add-hook 'intero-mode-hook #'evil-normalize-keymaps)) - (map! :localleader - :map intero-mode-map - "t" #'intero-type-at - "i" #'intero-info - "l" #'intero-repl-load - "e" #'intero-repl-eval-region - "a" #'intero-apply-suggestions)) diff --git a/modules/lang/haskell/README.org b/modules/lang/haskell/README.org index b64d610b7..1657796a0 100644 --- a/modules/lang/haskell/README.org +++ b/modules/lang/haskell/README.org @@ -19,8 +19,8 @@ - [[#troubleshooting][Troubleshooting]] * Description -This module adds [[https://www.haskell.org/][Haskell]] support, powered by either [[https://github.com/jyp/dante][dante]] (the default), LSP -(haskell-language-server or ghcide) or [[https://haskell-lang.org/intero][intero]]. +This module adds [[https://www.haskell.org/][Haskell]] support, powered by either [[https://github.com/jyp/dante][dante]] (the default) or LSP +(haskell-language-server or ghcide). + Code completion (~company-ghc~) + Look up documentation (~hoogle~) @@ -45,8 +45,6 @@ Here are a few resources I've found indispensable in my Haskell adventures: + =+ghcide= Enables LSP support with ghcide (requires the ~:tools lsp~ module). + =+lsp= Enables LSP support with haskell-ide-engine (requires the ~:tools lsp~ module). -+ =+intero= (Deprecated) Enables intero; a comprehensive, stack-based - development environment for Haskell. ** Plugins + [[https://github.com/haskell/haskell-mode][haskell-mode]] @@ -55,16 +53,13 @@ Here are a few resources I've found indispensable in my Haskell adventures: + [[https://github.com/jyp/attrap][attrap]] + =+lsp= + [[https://github.com/emacs-lsp/lsp-haskell][lsp-haskell]] -+ =+intero= - + [[https://github.com/chrisdone/intero][intero]] =DEPRECATED= * Prerequisites -Depending on whether you use Intero, Dante or LSP, your dependencies will -differ: +Depending on whether you use Dante, haskell-language-server or ghcide, your +dependencies will differ: + Dante users need =cabal=, =ghc= and =ghc-mod= -+ LSP users need the =haskell-ide-engine= LSP server -+ Intero and LSP users need =stack= ++ LSP users need the =haskell-ide-engine= LSP server OR =ghcide= + All users will need the =hoogle= package ** Cabal @@ -111,7 +106,7 @@ yay -S haskell-ide-engine-git See https://github.com/digital-asset/ghcide for install instructions. ** Stack -To use Intero or LSP, you need =stack=: +To use LSP, you need =stack=: *** MacOS #+BEGIN_SRC sh diff --git a/modules/lang/haskell/autoload.el b/modules/lang/haskell/autoload.el index 370e5ed91..4e575c48e 100644 --- a/modules/lang/haskell/autoload.el +++ b/modules/lang/haskell/autoload.el @@ -4,12 +4,9 @@ (defun +haskell/open-repl (&optional arg) "Opens a Haskell REPL." (interactive "P") - (if-let* - ((window - (display-buffer - (if (featurep! +intero) - (intero-repl-buffer arg) - (haskell-session-interactive-buffer (haskell-session)))))) + (if-let (window + (display-buffer + (haskell-session-interactive-buffer (haskell-session)))) (window-buffer window) (error "Failed to display Haskell REPL"))) diff --git a/modules/lang/haskell/config.el b/modules/lang/haskell/config.el index 689f3b852..eab9a2adf 100644 --- a/modules/lang/haskell/config.el +++ b/modules/lang/haskell/config.el @@ -35,7 +35,6 @@ (map! :localleader :map haskell-mode-map - ;; this is set to use cabal for dante users and stack for intero users: "b" #'haskell-process-cabal-build "c" #'haskell-cabal-visit-file "h" #'haskell-hide-toggle @@ -45,8 +44,7 @@ ;; ;;; Backends -(cond ((featurep! +intero) (load! "+intero")) ; DEPRECATED - ((featurep! +dante) (load! "+dante")) +(cond ((featurep! +dante) (load! "+dante")) ((or (featurep! +lsp) (featurep! +ghcide)) (load! "+lsp"))) diff --git a/modules/lang/haskell/doctor.el b/modules/lang/haskell/doctor.el index 30e023631..088490cf9 100644 --- a/modules/lang/haskell/doctor.el +++ b/modules/lang/haskell/doctor.el @@ -7,12 +7,6 @@ (when (featurep! +dante) (unless (executable-find "cabal") - (warn! "Couldn't find cabal, haskell-mode may have issues"))) - -(when (featurep! +intero) - (unless (executable-find "stack") - (warn! "Couldn't find stack. Intero will not work"))) - -(when (or (featurep! +dante) (featurep! +intero)) + (warn! "Couldn't find cabal, haskell-mode may have issues")) (unless (executable-find "hlint") (warn! "Couldn't find hlint. Flycheck may have issues in haskell-mode"))) diff --git a/modules/lang/haskell/packages.el b/modules/lang/haskell/packages.el index 528167c9b..23cdb842d 100644 --- a/modules/lang/haskell/packages.el +++ b/modules/lang/haskell/packages.el @@ -9,6 +9,3 @@ (when (or (featurep! +lsp) (featurep! +ghcide)) (package! lsp-haskell :pin "582fa27c88")) -;; DEPRECATED -(when (featurep! +intero) - (package! intero :pin "fdb0550a2d"))