Haskell结构
例子
档案结构
一个简单的项目中包含以下文件:
➜ helloworld ls LICENSE Setup.hs helloworld.cabalsrc stack.yaml
文件夹中src有一个名为的文件Main.hs。这是项目的“起点”helloworld。默认情况下Main.hs包含一个简单的“Hello,World!”。程序。
主站
module Main where main :: IO () main = do putStrLn "hello world"
运行程序
确保您在目录中helloworld并运行:
stack build # Compile the program stack exec helloworld # Run the program # prints "hello world"
热门推荐
10 财运虎年祝福语简短语
11 单亲爸爸春节祝福语简短
12 狗狗上厕所训练
13 植物种植祝福语简短
14 翻译考试祝福语朋友简短
15 个人周年庆简短祝福语
16 狗狗怎么训练
17 分别祝福语简短搞笑英文
18 生日广州男生祝福语简短