티스토리 뷰

Haskell

Programming in Haskell (1) 시작하기

newpolaris 2011. 1. 11. 15:17
참고서 : 도서관에 맨 밑에 박혀있던 "하스켈로 배우는 프로그램(Programming in Haskell)"

어느책이든 머리말은 꽤 길다. 그냥 넘기고, 실습은 2장부터니 2장으로 바로 전진.

GHC 란걸 설치하라고 되어있다.


뭥..뭥미?

머하여간 GHC도 같이 포함되어있고 좋은 유틸도 있으니 Haskell Platform을 깔라고 하네여

http://hackage.haskell.org/platform/windows.html

..용량은 70mb정도 되는데 다운 로드 속도는 1kb 정도 되므로 torrent로 다운 받습니다.




컥 700MB 부족한 SDD 용량이 또 줄어드는 소리가 들립니더

그러나 8장까지는 Hugs란 것을 사용한다고 되어있는데...

아니 의사양반 GHC는 설치해놓고 9장부터 쓰겠다니.

Hugs 는 http://haskell.org/hugs/ 라는 곳에서 받을 수 있는데 2006이 마지막인가....

둘이 먼차이가 있는지 살펴보았다

1 Glasgow Haskell Compiler (GHC)

GHC is an optimising compiler for Haskell, providing many language extensions. GHC is the de facto standard compiler if you want fast code. GHC is written in Haskell (plus extensions), and its size and complexity mean that it is less portable than Hugs, it runs more slowly, and it needs more memory. However, the programs it produces run much faster.

There is also an interactive environment, GHCi, which is like Hugs but supports interactive loading of compiled code. GHC provides profiling for time and space, and supports concurrent and (recently) parallel programming. It is available for most common platforms, including Windows, Mac OS X, and several Unix variants (Linux, *BSD, Solaris).

The GHC team recommends installing the Haskell Platform to get GHC.

2 Hugs

Hugs is a small, portable Haskell interpreter written in C runs on almost any machine. Hugs is best used as a Haskell program development system: it boasts extremely fast compilation, supports incremental compilation, and has the convenience of an interactive interpreter (within which one can move from module to module to test different portions of a program). However, being an interpreter, it does not nearly match the run-time performance of, for example, GHC, nhc98, or HBC. It is certainly the best system for newcomers to learn Haskell. Hugs 98 is conformant with Haskell 98. Available for all Unix platforms including Linux, DOS, Windows 3.x, and Win 32 (Windows 95, Win32s, NT) and Macintoshes. It has many libraries including Win32 libraries, a foreign interface mechanism to facilitate interoperability with C, and the Windows version has a graphical user interface called WinHugs. Explanations of some common Hugs error messages and their causes can be found on Simon Thompson's page.

머 하여간 안되면 다른걸로 하면 되니까 우선 GHCi로 start!

(note: Hugs 설치시 chm 을 복사할수 없다고 나오는데 걍 C:\ (root)에 있는 폴더로 잡으니 문제가 사라졌다.)

2화로 이어집니다.

'Haskell' 카테고리의 다른 글

Programming in Haskell (6) ch3. Exercise  (0) 2011.01.17
Programming in Haskell (5) ch2. Exercise  (0) 2011.01.14
Programming in Haskell (4)  (0) 2011.01.14
Programming in Haskell (3) Ch1. Exercise  (0) 2011.01.14
Programming in Haskell (2)  (0) 2011.01.14
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크