lang/haskell: remove intero support

The package was deprecated and abandoned upstream since November 2019.

Closes #2121
This commit is contained in:
Henrik Lissner 2020-04-14 19:27:33 -04:00
parent 31a31fff46
commit 1cb753cbb1
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
8 changed files with 14 additions and 65 deletions

View file

@ -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))

View file

@ -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

View file

@ -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")))

View file

@ -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")))

View file

@ -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")))

View file

@ -9,6 +9,3 @@
(when (or (featurep! +lsp)
(featurep! +ghcide))
(package! lsp-haskell :pin "582fa27c88"))
;; DEPRECATED
(when (featurep! +intero)
(package! intero :pin "fdb0550a2d"))