ghc Command Examples

The Glasgow Haskell Compiler. Compiles and links Haskell source files. More information: https://www.haskell.org/ghc.

ghc Main

ghc {{path/to/file.hs}}

ghc -O {{path/to/file.hs}}

ghc -c {{path/to/file.hs}}

ghci

ghc -e {{expression}}