是否可以在Windows中将一组.hs的haskell文件编译成exe? .hs – > .可执行程序
绝对.安装
the Haskell Platform,它为您提供了一个最先进的Haskell编译器
GHC.
默认情况下,它编译为可执行文件,它在Linux或Windows上的工作相同.例如.
$cat A.hs main = print "hello,world"
用GHC编译:
$ghc --make A.hs [1 of 1] Compiling Main ( A.hs,A.o ) Linking A.exe ...
你现在可以运行:
$./A.exe "hello,world"
注意,这是在Cygwin下.但同样适用于Windows:
C:\temp>ghc --make A.hs [1 of 1] Compiling Main ( A.hs,A.o ) Linking A.exe ... C:\temp>A.exe "hello,world"
原文地址:https://www.jb51.cc/windows/371584.html
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。