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

@ -142,10 +142,8 @@ following properties:
:path [STRING] path to category root directory :path [STRING] path to category root directory
Example: Example:
(doom-module-set :lang 'haskell :flags '(+intero))" (doom-module-set :lang 'haskell :flags '(+dante))"
(puthash (cons category module) (puthash (cons category module) plist doom-modules))
plist
doom-modules))
(defun doom-module-path (category module &optional file) (defun doom-module-path (category module &optional file)
"Like `expand-file-name', but expands FILE relative to CATEGORY (keywordp) and "Like `expand-file-name', but expands FILE relative to CATEGORY (keywordp) and

View file

@ -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/fsharp/README.org][fsharp]] - TODO
+ [[file:../modules/lang/fstar/README.org][fstar]] - F* support + [[file:../modules/lang/fstar/README.org][fstar]] - F* support
+ [[file:../modules/lang/go/README.org][go]] =+lsp= - TODO + [[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 + hy - TODO
+ [[file:../modules/lang/idris/README.org][idris]] - TODO + [[file:../modules/lang/idris/README.org][idris]] - TODO
+ java =+meghanada +lsp= - TODO + java =+meghanada +lsp= - TODO

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]] - [[#troubleshooting][Troubleshooting]]
* Description * Description
This module adds [[https://www.haskell.org/][Haskell]] support, powered by either [[https://github.com/jyp/dante][dante]] (the default), LSP 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) or [[https://haskell-lang.org/intero][intero]]. (haskell-language-server or ghcide).
+ Code completion (~company-ghc~) + Code completion (~company-ghc~)
+ Look up documentation (~hoogle~) + 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). + =+ghcide= Enables LSP support with ghcide (requires the ~:tools lsp~ module).
+ =+lsp= Enables LSP support with haskell-ide-engine (requires the ~:tools lsp~ + =+lsp= Enables LSP support with haskell-ide-engine (requires the ~:tools lsp~
module). module).
+ =+intero= (Deprecated) Enables intero; a comprehensive, stack-based
development environment for Haskell.
** Plugins ** Plugins
+ [[https://github.com/haskell/haskell-mode][haskell-mode]] + [[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]] + [[https://github.com/jyp/attrap][attrap]]
+ =+lsp= + =+lsp=
+ [[https://github.com/emacs-lsp/lsp-haskell][lsp-haskell]] + [[https://github.com/emacs-lsp/lsp-haskell][lsp-haskell]]
+ =+intero=
+ [[https://github.com/chrisdone/intero][intero]] =DEPRECATED=
* Prerequisites * Prerequisites
Depending on whether you use Intero, Dante or LSP, your dependencies will Depending on whether you use Dante, haskell-language-server or ghcide, your
differ: dependencies will differ:
+ Dante users need =cabal=, =ghc= and =ghc-mod= + Dante users need =cabal=, =ghc= and =ghc-mod=
+ LSP users need the =haskell-ide-engine= LSP server + LSP users need the =haskell-ide-engine= LSP server OR =ghcide=
+ Intero and LSP users need =stack=
+ All users will need the =hoogle= package + All users will need the =hoogle= package
** Cabal ** Cabal
@ -111,7 +106,7 @@ yay -S haskell-ide-engine-git
See https://github.com/digital-asset/ghcide for install instructions. See https://github.com/digital-asset/ghcide for install instructions.
** Stack ** Stack
To use Intero or LSP, you need =stack=: To use LSP, you need =stack=:
*** MacOS *** MacOS
#+BEGIN_SRC sh #+BEGIN_SRC sh

View file

@ -4,12 +4,9 @@
(defun +haskell/open-repl (&optional arg) (defun +haskell/open-repl (&optional arg)
"Opens a Haskell REPL." "Opens a Haskell REPL."
(interactive "P") (interactive "P")
(if-let* (if-let (window
((window
(display-buffer (display-buffer
(if (featurep! +intero) (haskell-session-interactive-buffer (haskell-session))))
(intero-repl-buffer arg)
(haskell-session-interactive-buffer (haskell-session))))))
(window-buffer window) (window-buffer window)
(error "Failed to display Haskell REPL"))) (error "Failed to display Haskell REPL")))

View file

@ -35,7 +35,6 @@
(map! :localleader (map! :localleader
:map haskell-mode-map :map haskell-mode-map
;; this is set to use cabal for dante users and stack for intero users:
"b" #'haskell-process-cabal-build "b" #'haskell-process-cabal-build
"c" #'haskell-cabal-visit-file "c" #'haskell-cabal-visit-file
"h" #'haskell-hide-toggle "h" #'haskell-hide-toggle
@ -45,8 +44,7 @@
;; ;;
;;; Backends ;;; Backends
(cond ((featurep! +intero) (load! "+intero")) ; DEPRECATED (cond ((featurep! +dante) (load! "+dante"))
((featurep! +dante) (load! "+dante"))
((or (featurep! +lsp) ((or (featurep! +lsp)
(featurep! +ghcide)) (featurep! +ghcide))
(load! "+lsp"))) (load! "+lsp")))

View file

@ -7,12 +7,6 @@
(when (featurep! +dante) (when (featurep! +dante)
(unless (executable-find "cabal") (unless (executable-find "cabal")
(warn! "Couldn't find cabal, haskell-mode may have issues"))) (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))
(unless (executable-find "hlint") (unless (executable-find "hlint")
(warn! "Couldn't find hlint. Flycheck may have issues in haskell-mode"))) (warn! "Couldn't find hlint. Flycheck may have issues in haskell-mode")))

View file

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