tldr/pages/common/ghc.md
Daniel Campoverde [alx741] 164f1c9997 ghc: more explicit
2016-05-05 11:33:43 -05:00

389 B

ghc

The Glasgow Haskell Compiler. Compiles and links Haskell source files.

  • Find and compile all modules in the current directory:

ghc Main

  • Compile a single file:

ghc {{file.hs}}

  • Compile using extra optimization:

ghc -O {{file.hs}}

  • Stop compilation after generating object files (.o):

ghc -c {{file.hs}}

  • Run Haskell interactive interpreter (REPL):

ghci