プログラミング + アカデミック + 何か面白いこと

  1. Programming
  2. 27 view

[Haskell]Install it on Ubuntu 13.04

Install Haskell

I’ll install Haskell to just use for fun.
It’s easy to install.

$sudo apt-get install ghc
$ghc
ghc: no input files
Usage: For basic information, try the `--help' option.
$ghci
GHCi, version 7.4.1: http://www.haskell.org/ghc/  😕 for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Prelude> Ctrl+z

Hello World

I’ll make a program which output input file’s content.

main = do
     cs <- readFile "input"
     putStr cs

Run it.

$vim input
1  100
2  1300
3  560
$ghc hello.hs
$ls
hello  hello.hi   hello.hs  hello.o  input
$./hello
1  100
2  1300
3  560

It works!
I’ll write haskell to make program for my research.

Programming recent post

  1. Install sbt 1.0.0 and run sample template

  2. [Machine Learning]Created docker image includ…

  3. [Node.js]How to write batch script with Node.…

  4. [Play][Scala]Develop Request Driven Batch Usi…

  5. [OpenCV][Ruby]Auto check web page design corr…

関連記事

PAGE TOP