./configure
checking for gfind... no
checking for find... /usr/bin/find
checking for sort... /usr/bin/sort
checking for ghc... no
configure: error: GHC is required unless bootstrapping from .hc files.
256
Run Code Online (Sandbox Code Playgroud)
我想安装 Glasgow Haskell Compiler,并且 ./configure 要求 GHC。它要求什么样的 GHC?全球强子对撞机?我从http://www.haskell.org/ghc/download_ghc_7_6_3下载了源代码
从结果来看apt-cache show ghc
:
The Glasgow Haskell Compilation system (GHC) is a compiler for Haskell.
Run Code Online (Sandbox Code Playgroud)
要安装 ghc,请打开终端并输入:
sudo apt-get install ghc
Run Code Online (Sandbox Code Playgroud)
创建一个示例 Haskell 源文件 example.hs,其中包含:main = putStrLn "Hello, World!"
要编译 example.hs cd
,请将目录更改为包含 example.hs 的目录并键入:
ghc -o example example.hs
Run Code Online (Sandbox Code Playgroud)
要运行可执行文件:
./example
Run Code Online (Sandbox Code Playgroud)