ghc
The Glasgow Haskell Compiler. Compiles and links Haskell source files. More information: <https://www.haskell.org/ghc>.
Install
- All systems
-
curl cmd.cat/ghc.sh
- Debian
-
apt-get install ghc - Ubuntu
-
apt-get install ghc -
Alpine
-
apk add ghc - Arch Linux
-
pacman -S ghc - Kali Linux
-
apt-get install ghc - Fedora
-
dnf install ghc - Windows (WSL2)
-
sudo apt-get updatesudo apt-get install ghc - OS X
-
brew install ghc - Raspbian
-
apt-get install ghc - Docker
-
docker run cmd.cat/ghc ghcpowered by Commando
The Glasgow Haskell Compiler. Compiles and links Haskell source files. More information: <https://www.haskell.org/ghc>.
-
Find and compile all modules in the current directory:
ghc Main -
Compile a single file:
ghc path/to/file.hs -
Compile using extra optimization:
ghc -O path/to/file.hs -
Stop compilation after generating object files (.o):
ghc -c path/to/file.hs -
Start a REPL (interactive shell):
ghci -
Evaluate a single expression:
ghc -e expression
© tl;dr; authors and contributors