• 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30

Scalaを勉強しなおすために、まずHaskellを勉強してからの方がScalaを理解しやすいという話を聞いたので、Haskellの勉強を始めることにしました。ということでまずはHaskellのコンパイラ、GHC(The Glasgow Haskell Compiler)をインストールしました。yumであっさりインストールできてしまいました。

sh>>

yum install ghc

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile

  • base: ftp.iij.ad.jp
  • epel: ftp.tsukuba.wide.ad.jp
  • extras: ftp.iij.ad.jp
  • remi: rpms.famillecollet.com
  • updates: ftp.iij.ad.jp
    Setting up Install Process
    Resolving Dependencies
    --> Running transaction check
    ---> Package ghc.x86_64 0:6.10.4-3.el5 set to be updated
    --> Processing Dependency: gmp-devel for package: ghc
    --> Processing Dependency: libgmp.so.3()(64bit) for package: ghc
    --> Running transaction check
    ---> Package gmp.x86_64 0:4.1.4-10.el5 set to be updated
    ---> Package gmp-devel.x86_64 0:4.1.4-10.el5 set to be updated
    --> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================================
Package Arch Version Repository Size

Installing:
ghc x86_64 6.10.4-3.el5 epel 43 M
Installing for dependencies:
gmp x86_64 4.1.4-10.el5 base 201 k
gmp-devel x86_64 4.1.4-10.el5 base 569 k

Transaction Summary

Install 3 Package(s)
Upgrade 0 Package(s)

Total download size: 44 M
Is this ok [y/N]: y
Downloading Packages:
(1/3): gmp-4.1.4-10.el5.x86_64.rpm | 201 kB 00:00
(2/3): gmp-devel-4.1.4-10.el5.x86_64.rpm | 569 kB 00:00
(3/3): ghc-6.10.4-3.el5.x86_64.rpm | 43 MB 00:07

Total 5.5 MB/s | 44 MB 00:08
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : gmp 1/3
Installing : gmp-devel 2/3
Installing : ghc 3/3

Installed:
ghc.x86_64 0:6.10.4-3.el5

Dependency Installed:
gmp.x86_64 0:4.1.4-10.el5 gmp-devel.x86_64 0:4.1.4-10.el5

Complete!
<<--

コマンドが存在することを確認します。

sh>>

which ghci

/usr/bin/ghci

which ghc

/usr/bin/ghc
<<--

バージョンの確認。

sh>>

ghc --version

The Glorious Glasgow Haskell Compilation System, version 6.10.4
<<--

対話モードで起動してみます。

sh>>

ghci

GHCi, version 6.10.4: http://www.haskell.org/ghc/ :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer ... linking ... done.
Loading package base ... linking ... done.
Prelude>
Prelude> :q
Leaving GHCi.

<<--

ひとまずコンパイラのインストールは問題なくできたようです。

posted by akanuma akanuma on Mon 18 Jun 2012 at 13:24 with 0 comments