Examples (6)
Find and compile all modules in the current directory
ghc MainCompile a single file
ghc path/to/file.hsCompile using extra optimization
ghc -O path/to/file.hsStop compilation after generating object files (.o)
ghc -c path/to/file.hsStart a REPL (interactive shell)
Evaluate a single expression
ghc -e expressionmade by @shridhargupta | data from tldr-pages