通过 GHC 在 fish 中安装 Haskell

install Haskell through GHC in fish

我想使用 GHC 安装 Haskell,推荐。

我按照说明做了,但它警告我:

  1. 第一次警告:

    !These instructions were written for users who use bash or zsh, not /usr/local/bin/fish. Hopefully you know what you're doing!

使用 fish,不幸的是,我编辑了 fish 版本的说明:

$ cat ~/.config/fish/config.fish
...
set GHC_DOT_APP /Applications/ghc-7.10.3.app
if test -d $GHC_DOT_APP
    set PATH $HOME/.local/bin $HOME/.cabal/bin $GHC_DOT_APP/Contents/bin $PATH
end
...
$ echo $PATH
/Users/hongbook/.local/bin /Users/hongbook/.cabal/bin /Applications/ghc-7.10.3.app/Contents/bin /Users/hongbook/.fzf/bin /Users/hongbook/.rvm/bin /usr/local/bin /usr/bin /bin /usr/sbin /sbin /opt/X11/bin /usr/local/go/bin /Applications/Postgres.app/Contents/Versions/latest/bin /Users/hongbook/.rvm/bin

此外,上面的说明也在 ~/.profile 中写道。

  1. 第二次警告:

    Xcode is not installed

但我已经拿到了。

$ xcode-select --version 
xcode-select version 2349.

刷新清单不起作用。

通过其他安装方式解决:

  1. 按照以下说明进行操作: https://haskell-lang.org/get-started/osx

  1. 下载它(需要很长时间..): https://www.haskell.org/platform/