mirror of
https://github.com/tldr-pages/tldr.git
synced 2024-11-01 03:17:57 +01:00
commit
89ad0da38f
1 changed files with 24 additions and 0 deletions
24
pages/common/ghc.md
Normal file
24
pages/common/ghc.md
Normal file
|
@ -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`
|
Loading…
Reference in a new issue