Standardize module READMEs
This commit is contained in:
parent
b7d0f4dc3f
commit
cbabf6849c
16 changed files with 281 additions and 186 deletions
|
@ -1,4 +1,4 @@
|
|||
* :lang haskell
|
||||
#+TITLE: :lang haskell
|
||||
|
||||
This module adds [[https://www.haskell.org/][Haskell]] support.
|
||||
|
||||
|
@ -11,52 +11,55 @@ This module adds [[https://www.haskell.org/][Haskell]] support.
|
|||
+ [[https://github.com/hlissner/emacs-snippets/tree/master/haskell-mode][Snippets]]
|
||||
|
||||
#+begin_quote
|
||||
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 when working on smaller projects and programming exercises (like projecteuler.com or exercism.io).
|
||||
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.
|
||||
#+end_quote
|
||||
|
||||
** Install
|
||||
To get started with Haskell, you need:
|
||||
* Table of Contents :TOC:
|
||||
- [[#install][Install]]
|
||||
- [[#haskell][Haskell]]
|
||||
- [[#dependencies][Dependencies]]
|
||||
- [[#troubleshooting][Troubleshooting]]
|
||||
- [[#resources][Resources]]
|
||||
|
||||
+ cabal (the haskell package builder)
|
||||
+ ghc/ghci (the compiler, syntax checker & repl)
|
||||
* Install
|
||||
** Haskell
|
||||
To get started with Haskell, you need *stack* installed.
|
||||
|
||||
*** MacOS
|
||||
#+BEGIN_SRC sh :tangle (if (doom-system-os 'macos) "yes")
|
||||
brew install cabal-install ghc
|
||||
brew install haskell-stack
|
||||
stack setup
|
||||
#+END_SRC
|
||||
|
||||
*** Arch Linux
|
||||
#+BEGIN_SRC sh :dir /sudo:: :tangle (if (doom-system-os 'arch) "yes")
|
||||
sudo pacman --needed --noconfirm -S cabal-install ghc
|
||||
sudo pacman --needed --noconfirm -S stack
|
||||
# Replace pacaur with your AUR package manager of choice
|
||||
pacaur --needed --noconfirm -S ncurses5-compat-lib
|
||||
stack setup
|
||||
#+END_SRC
|
||||
|
||||
** Dependencies
|
||||
This module requires the following ~cabal~ packages:
|
||||
|
||||
+ ~happy~ (required by ~haskell-src-exts~)
|
||||
+ ~haskell-src-exts~ (required by ~ghc-mod~ & ~hoogle~)
|
||||
+ ~ghc-mod~ (for auto-completion)
|
||||
+ ~hoogle~ (for documentation lookup)
|
||||
This module requires ~ghc-mod~ (as well as ~intero~, but those will be automatically installed).
|
||||
|
||||
#+BEGIN_SRC sh
|
||||
cabal update
|
||||
cabal install happy haskell-src-exts ghc-mod hoogle
|
||||
stack install ghc-mod
|
||||
#+END_SRC
|
||||
|
||||
Ensure that ~\~/.cabal/bin~ is in ~PATH~:
|
||||
Also ensure that ~\~/.local/bin~ is in ~PATH~:
|
||||
|
||||
#+BEGIN_SRC sh
|
||||
# place this in your profile file, like ~/.bash_profile or ~/.zshenv
|
||||
export PATH="~/.cabal/bin:$PATH"
|
||||
export PATH="~/.local/bin:$PATH"
|
||||
#+END_SRC
|
||||
|
||||
** Troubleshooting
|
||||
* Troubleshooting
|
||||
+ Stack users: if a ~dist/setup-config~ file exists in your project, [[ https://github.com/DanielG/ghc-mod/wiki#known-issues-related-to-stack][ghc-mod may
|
||||
refuse to work]].
|
||||
|
||||
** Resources
|
||||
* Resources
|
||||
Here are a few resources I've found indespensible in my Haskell adventures:
|
||||
|
||||
+ [[http://learnyouahaskell.com/][Learn you a haskell for great good]]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue