DRYな備忘録

Don't Repeat Yourself.

HaskellでHello,World【Haskell】【ghc】【debian】【apt-get】

HaskellでHello,World

$ sudo apt-get install haskell
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package haskell

$ ghc --version
zsh: ghc: command not found

$ sudo apt-get install ghc
(略)

$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 6.12.1

$ vi hello.hs

$ cat hello.hs

-- my first Haskell
main = putStrLn "Hello, Haskell!!"

$ runghc ./hello.hs

Hello, Haskell!!