LoginSignup
3
0

More than 3 years have passed since last update.

2020年 Haskellことはじめ

Posted at

Haskellをはじめてみたい

Haskell~教養としての関数型プログラミング~という本に出合い、そんな欲に駆られました。 ハードルも決して高くなく、関数型プログラミングという新しい世界。2020年の幕開けには丁度よいと思うので手始めに環境構築をしてみます。

Stackの導入

Haskellプロジェクトを開発するためのクロスプラットフォームプログラムとのこと。
公式サイト

STEP 1

windowsでのインストール方法は公式サイトよりWindows 64ビットインストーラーをダウンロード後、インストールすればよい。

STEP 2

Stackのセットアップ
コマンドプロンプトを管理者権限で起動後、下記コマンドを実行するとGHCのインストールが始まりstackのsetupが始まる。
GHCって何?って思った方はhttps://www.haskell.org/ghc/のサイトを確認するとよい。

C:\WINDOWS\system32>stack setup

# インストールが始める・・・
# 下記のようなメッセージが出ればOK

Extracting  msys2-20180531.tar

Everything is Ok

Size:       281825280
Compressed: 63974800
Extracting msys2-20180531.tar...
Extracted total of 14569 files from msys2-20180531.tar
Copying skeleton files.
These files are for the users to personalise their msys2 experience.

They will never be overwritten nor automatically updated.

'./.bashrc' -> '/home/ユーザー名/.bashrc'
'./.bash_logout' -> '/home/ユーザー名/.bash_logout'
'./.bash_profile' -> '/home/ユーザー名/.bash_profile'
'./.inputrc' -> '/home/ユーザー名/.inputrc'
'./.profile' -> '/home/ユーザー名/.profile'
[0mstack will use a sandboxed GHC it installed[0m
[0mFor more information on paths, see 'stack path' and 'stack exec env'[0m
[0mTo use this GHC and packages outside of a project, consider using:[0m
[0mstack ghc, stack ghci, stack runghc, or stack exec[0m



インストール確認

C:\WINDOWS\system32>stack ghc -- --version
The Glorious Glasgow Haskell Compilation System, version 8.6.5

環境構築はここまで。
次からはHaskellに触れていきます。

3
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
3
0