Haskell on Debian

0. アジェンダ

HakyllとpandocとMighttpdでサイトを作った話 by [twitter:@tanakh]さん の記事に触発されたので、 Haskell を試してみたいと思います。
私の環境は Windows 7 ですが、こういう系の環境は全て Debian(on VirtualPC)にまとめておりますので、その環境上に環境を構築したいと思います。

  1. Haskell Platform のインストール
  2. hello, world.
    • 実際にコードを書いてみます。

という順で作業を進めたいと思います。

1. Haskell Platform のインストール

ghc いれて、 Cabal 入れるんだと思っていましたが、haskell platform 入れるだけでした!

$ sudo aptitude -y install haskell-platform
Reading package lists...
Building dependency tree...
Reading state information...
...
Setting up libghc6-http-dev (40000009-2) ...
Setting up haskell-platform (2010.1.0.0.1) ...
Reading package lists...
Building dependency tree...
Reading state information...
Reading extended state information...
Initializing package states...
Writing extended state information...
Reading task descriptions...
$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 6.12.1

2. hello, world.

次に、helllo,world.

$ cat helloworld.hs
main = putStrLn "hello, world."
$ ghc -o helloworld helloworld.hs
$ ./helloworld
hello, world.

XYZ. まとめ

あっさりと入ってびっくりしましたが、これで私もHaskellに触ることができるということで。とりあえず、どこかのチュートリアルでもやって、記法を覚え、関数型言語の世界を楽しみたいと思います。

読んでみたい本

読みやすいらしいので、そのうち下記の日本語の方の本を買って読んでみたいと思います。

プログラミングHaskell

プログラミングHaskell

Programming in Haskell

Programming in Haskell

更新履歴

No. 更新日 更新内容
1 2011/11/06 0. アジェンダ 作成
2 2011/11/07 1. 必須ソフトウェアのインストール以降 作成
3 2011/11/07 0. アジェンダ 作成 修正