diff --git a/pages/common/ghc.md b/pages/common/ghc.md new file mode 100644 index 000000000..158f63f45 --- /dev/null +++ b/pages/common/ghc.md @@ -0,0 +1,24 @@ +# 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`