Go to the first, previous, next, last section, table of contents.

Invoking GHC: Command-line options

Command-line arguments are either options or file names.

Command-line options begin with `-'. They may not be grouped: `-vO' is different from `-v -O'. Options need not precede filenames: e.g., `ghc *.o -o foo'. All options are processed and then apply to all files; you cannot, for example, invoke `ghc -c -O1 Foo.hs -O2 Bar.hs' to apply different optimisation levels to the files `Foo.hs' and `Bar.hs'. For conflicting options, e.g., `-c -S', we reserve the right to do anything we want. (Usually, the last one applies.)

Options related to profiling, Glasgow extensions to Haskell (e.g., unboxed values), Concurrent and Parallel Haskell are described in section See section Profiling Haskell programs, section See section Glasgow extensions to Haskell, and section See section Concurrent and Parallel Haskell, respectively.


Go to the first, previous, next, last section, table of contents.