Skip to content

Commit

Permalink
lang/haskell: change default to +dante doomemacs#2121
Browse files Browse the repository at this point in the history
  • Loading branch information
hlissner committed Dec 1, 2019
1 parent 5e4e1d7 commit c7a6cf8
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 32 deletions.
2 changes: 1 addition & 1 deletion docs/index.org
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ Modules that bring support for a language or group of languages to Emacs.
+ [[file:../modules/lang/faust/README.org][faust]] - TODO
+ [[file:../modules/lang/fsharp/README.org][fsharp]] - TODO
+ [[file:../modules/lang/go/README.org][go]] =+lsp= - TODO
+ [[file:../modules/lang/haskell/README.org][haskell]] =+intero +dante +lsp= - TODO
+ [[file:../modules/lang/haskell/README.org][haskell]] =+dante +intero +lsp= - TODO
+ hy - TODO
+ [[file:../modules/lang/idris/README.org][idris]] - TODO
+ java =+meghanada +lsp= - TODO
Expand Down
2 changes: 1 addition & 1 deletion init.example.el
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
;;faust ; dsp, but you get to keep your soul
;;fsharp ; ML stands for Microsoft's Language
;;go ; the hipster dialect
;;(haskell +intero) ; a language that's lazier than I am
;;(haskell +dante) ; a language that's lazier than I am
;;hy ; readability of scheme w/ speed of python
;;idris ;
;;(java +meghanada) ; the poster child for carpal tunnel syndrome
Expand Down
60 changes: 30 additions & 30 deletions modules/lang/haskell/README.org
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@
- [[#module-flags][Module Flags]]
- [[#plugins][Plugins]]
- [[#prerequisites][Prerequisites]]
- [[#stack][Stack]]
- [[#cabal][Cabal]]
- [[#lsp][LSP]]
- [[#stack][Stack]]
- [[#haskell-packages][Haskell packages]]
- [[#configuration][Configuration]]
- [[#using-the-new-style-cabal-repl][Using the new-style cabal REPL]]
- [[#troubleshooting][Troubleshooting]]

* Description
This module adds [[https://www.haskell.org/][Haskell]] support, powered by either [[https://haskell-lang.org/intero][intero]] (the default), [[https://github.com/jyp/dante][dante]]
or [[https://github.com/emacs-lsp/lsp-haskell][LSP]].
This module adds [[https://www.haskell.org/][Haskell]] support, powered by either [[https://github.com/jyp/dante][dante]] (the default), LSP or
[[https://haskell-lang.org/intero][intero]].

+ Code completion (~company-ghc~)
+ Look up documentation (~hoogle~)
Expand All @@ -38,54 +38,32 @@ Here are a few resources I've found indespensible in my Haskell adventures:
+ [[https://docs.haskellstack.org/en/stable/README/][The Haskell Tool Stack docs]]

** Module Flags
+ =+intero= Enables intero; a comprehensive, stack-based development environment
for Haskell.
+ =+dante= Enables dante; a fork of intero aimed at lightweightedness. It
doesn't depend on =stack=, supports both ~cabal~-only and ~stack~ projects,
but lacks eldoc support.
+ =+lsp= Enables lsp-haskell (this requires the ~:tools lsp~ to be enabled).
+ =+intero= (Deprecated) Enables intero; a comprehensive, stack-based
development environment for Haskell.

** Plugins
+ [[https://github.com/haskell/haskell-mode][haskell-mode]]
+ =+dante=
+ [[https://github.com/jyp/dante][dante]]
+ [[https://github.com/jyp/attrap][attrap]]
+ =+intero=
+ [[https://github.com/chrisdone/intero][intero]]
+ =+lsp=
+ [[https://github.com/emacs-lsp/lsp-haskell][lsp-haskell]]
+ =+intero=
+ [[https://github.com/chrisdone/intero][intero]]

* Prerequisites
Depending on whether you use Intero, Dante or LSP, your dependencies will
differ:

+ Intero and LSP users need =stack=
+ Dante users need =cabal=, =ghc= and =ghc-mod=
+ LSP users need the =haskell-ide-engine= LSP server
+ Intero and LSP users need =stack=
+ All users will need the =hoogle= package

** Stack
To use Intero, you need =stack=:

*** MacOS
#+BEGIN_SRC sh
brew install haskell-stack
stack setup
#+END_SRC
*** Arch Linux
#+BEGIN_SRC sh
sudo pacman -S stack
# Replace pacaur with your AUR package manager of choice
pacaur -S ncurses5-compat-lib
stack setup
#+END_SRC

*** openSUSE
#+BEGIN_SRC sh :dir /sudo::
sudo zypper install stack
stack setup
#+END_SRC

** Cabal
To use Dante, you need =cabal= (the haskell package builder) and =ghci= (the
compiler, syntax checker & repl):
Expand Down Expand Up @@ -127,6 +105,28 @@ make
yay -S haskell-ide-engine-git
#+END_SRC

** Stack
To use Intero or LSP, you need =stack=:

*** MacOS
#+BEGIN_SRC sh
brew install haskell-stack
stack setup
#+END_SRC
*** Arch Linux
#+BEGIN_SRC sh
sudo pacman -S stack
# Replace pacaur with your AUR package manager of choice
pacaur -S ncurses5-compat-lib
stack setup
#+END_SRC

*** openSUSE
#+BEGIN_SRC sh :dir /sudo::
sudo zypper install stack
stack setup
#+END_SRC

** Haskell packages
You'll need to install the following packages using ~stack~ or ~cabal~:

Expand Down

0 comments on commit c7a6cf8

Please sign in to comment.