用stack搭建haskell编译环境
sudo apt-get install haskell-platform
ghci
Prelude> 1+1
2
新建文件 hello.hs
main = putStrLn "Hello, world!"
编译该文件:
$ ghc --make hello
[1 of 1] Compiling Main ( hello.hs, hello.o )
Linking hello ......
原创
2019-11-07 14:32:54 ·
3223 阅读 ·
1 评论