Scalaを勉強しなおすために、まずHaskellを勉強してからの方がScalaを理解しやすいという話を聞いたので、Haskellの勉強を始めることにしました。ということでまずはHaskellのコンパイラ、GHC(The Glasgow Haskell Compiler)をインストールしました。yumであっさりインストールできてしまいました。
1 # yum install ghc 2 Loaded plugins: fastestmirror 3 Loading mirror speeds from cached hostfile 4 * base: ftp.iij.ad .jp 5 * epel: ftp.tsukub a.wide.ad. jp 6 * extras: ftp.iij.ad .jp 7 * remi: rpms.famil lecollet.c om 8 * updates: ftp.iij.ad .jp 9 Setting up Install Process 10 Resolving Dependenci es 11 --> Running transactio n check 12 ---> Package ghc.x86_64 0:6.10.4-3 .el5 set to be updated 13 --> Processing Dependency : gmp-devel for package: ghc 14 --> Processing Dependency : libgmp.so. 3()(64bit) for package: ghc 15 --> Running transactio n check 16 ---> Package gmp.x86_64 0:4.1.4-10 .el5 set to be updated 17 ---> Package gmp-devel. x86_64 0:4.1.4-10 .el5 set to be updated 18 --> Finished Dependency Resolution 19 20 Dependenci es Resolved 21 22 ========== ========== ========== ========== ========== ========== ========== ========== ========== ========== ========== ========== 23 Package Arch Version Repository Size 24 ========== ========== ========== ========== ========== ========== ========== ========== ========== ========== ========== ========== 25 Installing : 26 ghc x86_64 6.10.4-3.e l5 epel 43 M 27 Installing for dependenci es: 28 gmp x86_64 4.1.4-10.e l5 base 201 k 29 gmp-devel x86_64 4.1.4-10.e l5 base 569 k 30 31 Transactio n Summary 32 ========== ========== ========== ========== ========== ========== ========== ========== ========== ========== ========== ========== 33 Install 3 Package(s) 34 Upgrade 0 Package(s) 35 36 Total download size: 44 M 37 Is this ok [y/N]: y 38 Downloadin g Packages: 39 (1/3): gmp-4.1.4- 10.el5.x86 _64.rpm | 201 kB 00:00 40 (2/3): gmp-devel- 4.1.4-10.e l5.x86_64. rpm | 569 kB 00:00 41 (3/3): ghc-6.10.4 -3.el5.x86 _64.rpm | 43 MB 00:07 42 ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- 43 Total 5.5 MB/s | 44 MB 00:08 44 Running rpm_check_ debug 45 Running Transactio n Test 46 Finished Transactio n Test 47 Transactio n Test Succeeded 48 Running Transactio n 49 Installing : gmp 1/3 50 Installing : gmp-devel 2/3 51 Installing : ghc 3/3 52 53 Installed: 54 ghc.x86_64 0:6.10.4-3 .el5 55 56 Dependency Installed: 57 gmp.x86_64 0:4.1.4-10 .el5 gmp-devel. x86_64 0:4.1.4-10 .el5 58 59 Complete!
コマンドが存在することを確認します。
1 # which ghci 2 /usr/bin/ghci 3 # which ghc 4 /usr/bin/g hc
バージョンの確認。
1 # ghc --version 2 The Glorious Glasgow Haskell Compilation System, version 6.10.4
対話モードで起動してみます。
1 # ghci 2 GHCi, version 6.10.4: http://www.haskell.o rg/ghc/ :? for help 3 Loading package ghc-prim ... linking ... done. 4 Loading package integer ... linking ... done. 5 Loading package base ... linking ... done. 6 Prelude> 7 Prelude> :q 8 Leaving GHCi. 9 #
ひとまずコンパイラのインストールは問題なくできたようです。
posted by
akanuma
on Mon 18 Jun 2012
at 13:24