ubuntuにghc6.10をインストール
ubuntuにghc6.10をインストール
http://d.hatena.ne.jp/TTSY/20081208/p1によると…
なに?permutationsがある?ほんと?試してみる。
$ ghci GHCi, version 6.8.2: http://www.haskell.org/ghc/ :? for help Loading package base ... linking ... done. Prelude> :m Data.List Prelude Data.List> permutations <interactive>:1:0: Not in scope: `permutations'
なんだ?ghc6.10をインストールしないとないのかもしれないorz
仕方ない、インストールするか。
(下準備)pacoを"make install"したソフトウェアを管理できる超便利ツール「Paco」 - 元RX-7乗りの適当な日々に従いインストール
http://www.haskell.org/ghc/download_ghc_6_10_1.html#x86linux より ghcのdebian用のバイナリをダウンロードし、展開->configure->インストールを行う。
$ sudo aptitude install libgmp3-dev $ wget http://www.haskell.org/ghc/dist/6.10.1/ghc-6.10.1-i386-unknown-linux-libedit2.tar.bz2 $ tar xjf ghc-6.10.1-i386-unknown-linux-libedit2.tar.bz2 $ ghc-6.10.1 $ ./configure $ sudo paco -D make install
ちなみにpacoは-aでパッケージ一覧、-rでパッケージ削除なのを忘れないように。
よし、実験。
$ ghci GHCi, version 6.10.1: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer ... linking ... done. Loading package base ... linking ... done. Prelude> :m Data.List Prelude Data.List> permutations [1,2,3] [[1,2,3],[2,1,3],[3,2,1],[2,3,1],[3,1,2],[1,3,2]]
うまくいった!
おそらく http://href.spiritloose.net/ にはなくて http://www.haskell.org/ghc/docs/latest/html/libraries/base/doc-index.html にあるからバージョンの問題なんだろう。