Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |
Tags
- RFID
- Programming
- Book
- comic agile
- django
- Book review
- agile
- France
- Malaysia
- Java
- ubuntu
- UK
- MySQL
- programming_book
- program
- Linux
- Python
- web
- management and leadership
- management
- Spain
- Software Engineering
- Italy
- Kuala Lumpur
- history
- hadoop
- erlang
- QT
- hbase
- leadership
Archives
- Today
- Total
main = putStrLn "Hello, World" 본문
http://haskell.springnote.com
1. install(Ubuntu, http://ubuntuprogramming.wikidot.com/haskell)
$ sudo apt-get install ghc6
2. compile mode
$ vi hello.hs
main = putStrLn "Hello, World"
$ ghc --make hello
[1 of 1] Compiling Main ( hello.hs, hello.o )
Linking hello ...
$ ./hello
Hello, World
$
3. interpreter mode
$ ghci
GHCi, version 6.8.2: http://www.haskell.org/ghc/ :? for help
Loading package base ... linking ... done.
Prelude> let fact x = product[1..x]
Prelude> fact 5
120
Prelude> :q
Leaving GHCi.
$
1. install(Ubuntu, http://ubuntuprogramming.wikidot.com/haskell)
$ sudo apt-get install ghc6
2. compile mode
$ vi hello.hs
main = putStrLn "Hello, World"
$ ghc --make hello
[1 of 1] Compiling Main ( hello.hs, hello.o )
Linking hello ...
$ ./hello
Hello, World
$
3. interpreter mode
$ ghci
GHCi, version 6.8.2: http://www.haskell.org/ghc/ :? for help
Loading package base ... linking ... done.
Prelude> let fact x = product[1..x]
Prelude> fact 5
120
Prelude> :q
Leaving GHCi.
$
Comments