mirror of
https://github.com/tldr-pages/tldr.git
synced 2024-12-28 03:15:33 +03:00
25 lines
389 B
Markdown
25 lines
389 B
Markdown
# 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`
|