Skip to content

Instantly share code, notes, and snippets.

@weaming
Last active November 6, 2019 08:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save weaming/693c35c5396eb583731b22745252dc9c to your computer and use it in GitHub Desktop.
Save weaming/693c35c5396eb583731b22745252dc9c to your computer and use it in GitHub Desktop.
# 安装 stack, ghc, ghci
brew install haskell-stack
# 安装 HIE
## 安装 nix-env
curl https://nixos.org/nix/install | sh
## 安装 hie, 对应 haskell 版本 8.65
nix-env -iA selection --arg selector 'p: { inherit (p) ghc865; }' -f https://github.com/infinisil/all-hies/tarball/master
# 配置 VSCode 环境
## 安装 VSCode
## 安装插件 Haskell Language Server
# (需要 ghc 在 vscode 的 PATH 中,才能启用自动 format 代码的功能)
stack install intero
## 配置 settings.json
### 配置 hie 路径
# "languageServerHaskell.hieExecutablePath": "~/.nix-profile/bin/hie",
### 开启保存自动保存并格式化
# "files.autoSave": "onFocusChange",
# "editor.formatOnSave": true,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment