如何在Haskell中运行独立程序

我想将此程序作为独立程序运行:

module Main where main = putStrLn "Hello world!"

so I typed in ghci: --make -o hello Main.hs

but when I want to run it with ./hello I get a parse error for ./. I tried also ghc --make -o hello Main.hs but then I get an "Variable not in scope: ghc" error. Can somebody tell me, what I'm doing wrong?

解决:命令必须在外壳中运行,ghc和Main.hs必须在同一目录中