LoginSignup
0
0

More than 3 years have passed since last update.

Haskell のインストール

Last updated at Posted at 2021-04-11

[増補改訂]関数プログラミング実践入門を読んで Haskell を Mac(Big Sur)にインストールする。

手順

Stack のインストール

Stack は Python の Virtualenv や Ruby の rbenv のようなもの。正常にビルドできることが保証されたパッケージ群(スナップショット)を提供する Stackage(Stable Hackage) を利用している。

The Haskell Tool Stack

$ curl -sSL https://get.haskellstack.org/ | sh

Stack から GHCをインストールする

GHC はコンパイラ。

$ stack setup
・・・・
stack will use a sandboxed GHC it installed
For more information on paths, see 'stack path' and 'stack exec env'
To use this GHC and packages outside of a project, consider using:
stack ghc, stack ghci, stack runghc, or stack exec

GHCi が起動する

GHCi は対話的インタープリタ。

$ stack exec ghci
GHCi, version 8.10.4: https://www.haskell.org/ghc/  :? for help
Prelude> 

GHCi コマンド

# ヘルプ
Prelude> :?
# 終了
Prelude> :q

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0