doomemacs/modules/lang/haskell/README.org
2017-08-21 20:13:31 +02:00

2.2 KiB

:lang haskell

This module adds Haskell support.

  • Code completion (company-ghc)
  • Look up documentation (hoogle)
  • eldoc support (dante)
  • REPL (ghci)
  • Syntax-checking (flycheck)
  • Code navigation (dante)
  • Snippets

Haskell contends with C and Ruby as my favorite language. I don't think my Haskell code will ever save the world, but I'll reach for it for small projects and programming exercises (like projecteuler.com or exercism.io).

I'd love to incorporate more of it into my machine learning work, but Python and Julia hold that crown. For now.

Install

Haskell

To get started with Haskell, you need stack installed.

MacOS

brew install haskell-stack
stack setup

Arch Linux

sudo pacman --needed --noconfirm -S stack
# Replace pacaur with your AUR package manager of choice
pacaur --needed --noconfirm -S ncurses5-compat-lib
stack setup

Dependencies

This module requires ghc-mod (as well as intero, but those will be automatically installed).

stack install ghc-mod

Also ensure that \~/.local/bin is in PATH:

# place this in your profile file, like ~/.bash_profile or ~/.zshenv
export PATH="~/.local/bin:$PATH"

Troubleshooting

  • Stack users: if a dist/setup-config file exists in your project, ghc-mod may refuse to work.

Resources

Here are a few resources I've found indespensible in my Haskell adventures: