写下面的程序:
main = putStrLn "Hello, world!"
在命令行环境下键入命令:
>> C:\HaskellTest>C:\ghc-8.4.3\bin\ghc.exe hello.hs
[1 of 1] Compiling Main ( hello.hs, hello.o )
Linking hello.exe ...
>> dir
驱动器 G 中的卷是 xxxx
卷的序列号是 0000-0000
C:\HaskellTest 的目录
2018/06/26 08:58 6,205,644 hello.exe
2018/06/26 08:58 805 hello.hi
2018/06/26 08:56 31 hello.hs
2018/06/26 08:58 2,130 hello.o
>> hello
Hello, world!
今天用 Haskell 第一次生成了 exe 应用程序,或许,我真的能用 Haskell 做些真正有价值的工作。
本文记录了作者使用Haskell语言编写并成功编译运行一个简单程序的过程。通过编写Hello, World!程序并生成可执行文件,展示了Haskell语言的基本使用方法及编译流程。
1523

被折叠的 条评论
为什么被折叠?



