ghc
Compiler for the Haskell functional programming language
TLDR
Compile a Haskell file
SYNOPSIS
ghc [options] files
DESCRIPTION
ghc (Glasgow Haskell Compiler) is the leading compiler for the Haskell programming language. It compiles Haskell source code to native machine code, producing efficient executables.
GHC supports the full Haskell language standard plus numerous extensions for advanced type system features, parallelism, and performance. The --make mode automatically handles module dependencies.
PARAMETERS
FILES
Haskell source files (.hs, .lhs).-o FILE
Output file name.-c
Compile to object file only.-O, -O2
Enable optimization.-Wall
Enable all warnings.-Werror
Treat warnings as errors.-i DIR
Add to import path.-package PKG
Use specified package.--make
Build program with dependencies.--help
Display help information.
CAVEATS
Compilation can be memory-intensive. Large projects benefit from incremental builds. Extension flags vary by GHC version.
HISTORY
GHC was started at the University of Glasgow in 1989. It has become the de facto standard Haskell compiler, actively developed by the Haskell community and industrial users.
