3.2 KiB
3.2 KiB
Programming Haskell
A literate programming file for configuring Emacs to use Haskell .
Introduction
While “they” claim a Gentle Introduction, it doesn’t look fun. I bought the book, Learn You a Haskell for Great Good!, which looks better. Before an Emacsian can dive into a new language, one needs to get an Emacs environment working.
First, get it installed. On a Mac, do something like:
brew install haskell-stack
Which installs the Haskell Stack project that is basically an interface to the kitchen sink.
And then run:
stack setup
And then you get access to an interactive session in a virtual environment with:
stack ghci
Haskell Mode
Seems that the venerable haskell-mode is the best.
(use-package haskell-mode
:custom
(haskell-process-type 'stack-ghci))
See this configuration for some advanced features.
The hindent package looks interesting:
(use-package hindent
:custom (hindent-style "johan-tibell")
:hook (haskell-mode . #'hindent-mode))