Dante for dummies
This article is outdated!
The article is old, from before I knew how to manage Emacs packages properly (the secret: use straight.el). My new article “How I use dante” is much better and I suggest you read it instead of this one.
The old article
I wanted to get started with Dante: Emacs mode for Interactive Haskell but found it difficult for various reasons. Here’s how I managed it.
Get Dante
I just downloaded
dante.elso I can run it withM-x eval-buffer.Use Emacs 25
It doesn’t seem to work with Emacs 24
Get dependent packages
It requires
lcr. It also requiresattrapif you want autofix.I don't know how to use Emacs properly so I just went to [MELPA](https://melpa.org/) and downloaded the files. You can load them with `M-x eval-buffer`.It also required some other stuff like
dashwhich I managed to install withapt.I don’t want to use MELPA if I don’t have to.
Turn on Dante and flycheck minor modes
You should probably use mode hooks to turn these on but I just used
M-x dante-modeM-x flycheck-mode
If it complains about missing
stackDante tries to work out what sort of project you are working in so it know how to launch GHCi. The way it works this out is through
dante-repl-command-line-methods-alist. It checks forstack.yamlbefore.cabal. I have both but I want to use cabal so I had to delete the stack entry. I usedM-x customize-groupto do this, in the “Dante Repl Command Line Methods Alist” setting.
Then it seems that Dante just works.
- ‘M-g n’ and ‘M-g p’ go to the next and previous errors respectively.