From 8e84a687113103ca8067f06fd8840f8015def118 Mon Sep 17 00:00:00 2001 From: "Daniel Campoverde [alx741]" Date: Wed, 4 May 2016 20:22:26 -0500 Subject: [PATCH 1/2] ghc: add page --- pages/common/ghc.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 pages/common/ghc.md diff --git a/pages/common/ghc.md b/pages/common/ghc.md new file mode 100644 index 0000000000..e329624a86 --- /dev/null +++ b/pages/common/ghc.md @@ -0,0 +1,23 @@ +# ghc + +> The Glassgow 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 optimization, for faster code: + +`ghc -O {{file.hs}}` + +- Stop after generating object files: + +`ghc -c {{file.hs}}` + +- Run in interactive mode (REPL): + +`ghci` From 164f1c999731cb4f81737542d5fdea3496c72cc6 Mon Sep 17 00:00:00 2001 From: "Daniel Campoverde [alx741]" Date: Thu, 5 May 2016 11:33:43 -0500 Subject: [PATCH 2/2] ghc: more explicit --- pages/common/ghc.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pages/common/ghc.md b/pages/common/ghc.md index e329624a86..158f63f456 100644 --- a/pages/common/ghc.md +++ b/pages/common/ghc.md @@ -1,6 +1,7 @@ # ghc -> The Glassgow Haskell Compiler, compiles and links Haskell source files. +> The Glasgow Haskell Compiler. +> Compiles and links Haskell source files. - Find and compile all modules in the current directory: @@ -10,14 +11,14 @@ `ghc {{file.hs}}` -- Compile using optimization, for faster code: +- Compile using extra optimization: `ghc -O {{file.hs}}` -- Stop after generating object files: +- Stop compilation after generating object files (.o): `ghc -c {{file.hs}}` -- Run in interactive mode (REPL): +- Run Haskell interactive interpreter (REPL): `ghci`