mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-09-10 15:33:50 +02:00
ghc: add page
This commit is contained in:
parent
b61acdf8a0
commit
8e84a68711
1 changed files with 23 additions and 0 deletions
23
pages/common/ghc.md
Normal file
23
pages/common/ghc.md
Normal file
|
@ -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`
|
Loading…
Add table
Reference in a new issue