安装(Glasgow Haskell Compiler)
sudo apt-get install ghc
进入shell
ghci
hello.hs
module Main whereimport System.Environment main :: IO ()main = do args <- getArgs putStrLn ("Hello, " ++ args !! 0)
compiler & exec
$ ghc -o hello --make hello.hs [1 of 1] Compiling Main ( hello.hs, hello.o )Linking hello ...$ ./hello haskellhello, haskell