ghcup

ghcup を利用するメリット

  • とても使いやすい

  • 新しいバージョンのコンパイラなどもすぐインストールできる

  • 複数バージョンのコンパイラを入れたい時とかにも使える

help
λ ghcup --help
ghcup 0.0.7
GHC up toolchain installer

USAGE:
    ghcup [FLAGS] <SUBCOMMAND>

FLAGS:
    -v, --verbose    Enable verbose output
    -h, --help       Prints help information
    -V, --version    Prints version information
    -w, --wget       Use wget instead of curl
    -c, --cache      Use "/Users/gupi/.ghcup/cache" for caching tarballs
                     (these will not be removed by ghcup)

SUBCOMMANDS:
    install            Install GHC
    set                Set currently active GHC version
    list               Show available GHCs and other tools
    upgrade            Upgrade this script in-place
    rm                 Remove an already installed GHC
    install-cabal      Install cabal-install
    debug-info         Print debug info (e.g. detected system/distro)
    changelog          Show the changelog of a GHC release (online)
    print-system-reqs  Print an approximation of system requirements

DISCUSSION:
    ghcup installs the Glasgow Haskell Compiler from the official
    release channels, enabling you to easily switch between different
    versions.

ghc の一覧を確認

λ ghcup list
Available versions:
✔ ghc	8.0.2	8.0
✗ ghc	8.2.2	8.2
✗ ghc	8.4.3
✔ ghc	8.4.4	8.4
✔ ghc	8.6.1	bad
✗ ghc	8.6.2
✗ ghc	8.6.3
✔ ghc	8.6.4
✔ ghc	8.6.5	recommended,8.6
✔ ghc	8.8.1	latest,8.8

cabal-install のインストール

λ ghcup install-cabal
  • バイナリが落ちてくるのでとても早い

参考リソース

Last updated