Plan9でHugs

hgetでダウンロードしてくる.

cpu% hget http://pages.cpsc.ucalgary.ca/~mirtchov/p9/hugs/hugs-p9.tgz | gunzip | tar xvf
cpu% cd hugs-p9/src
cpu% ape/psh
# make
# make install
# exit

さて,インストールできたので,実行してみる.問題なさそうだ.

$ hugs
__   __ __  __  ____   ___      _________________________________________
||   || ||  || ||  || ||__      Hugs 98: Based on the Haskell 98 standard
||___|| ||__|| ||__||  __||     Copyright (c) 1994-2002
||---||         ___||           World Wide Web: http://haskell.org/hugs
||   ||                         Report bugs to: hugs-bugs@haskell.org
||   || Version: <snapshot>     _________________________________________

Haskell 98 mode: Restart with command line option -98 to enable extensions

Reading file "/usr/takano/lib/hugs/lib/Prelude.hs":

Hugs session for:
/usr/takano/lib/hugs/lib/Prelude.hs
Type :? for help
Prelude> putStrLn "Hello, World!"
Hello, World!

Prelude> :quit
[Leaving Hugs]

Hugsは対話的に関数定義できないので,まずAcmeでプログラムを編集して,Hugs上でロード,評価する.

Prelude> :l hello.hs
Reading file "hello.hs":

Hugs session for:
/usr/oraccha/lib/hugs/lib/Prelude.hs
hello.hs
Main> 
Main> main
Hello, World!