ghc-7.6.3: The GHC API

Safe Haskell | None

StaticFlagParser

Synopsis

- parseStaticFlags :: [Located String] -> IO ([Located String], [Located String])
- parseStaticFlagsFull :: [Flag IO] -> [Located String] -> IO ([Located String], [Located String])
- flagsStatic :: [Flag IO]

# Documentation

parseStaticFlags :: [Located String] -> IO ([Located String], [Located String])

Parses GHC's static flags from a list of command line arguments.

These flags are static in the sense that they can be set only once and they are global, meaning that they affect every instance of GHC running; multiple GHC threads will use the same flags.

This function must be called before any session is started, i.e., before the first call to `withGhc`.

Static flags are more of a hack and are static for more or less historical reasons. In the long run, most static flags should eventually become dynamic flags.

XXX: can we add an auto-generated list of static flags here?

parseStaticFlagsFull :: [Flag IO] -> [Located String] -> IO ([Located String], [Located String])

Parse GHC's static flags as `parseStaticFlags` does. However it also takes a list of available static flags, such that certain flags can be enabled or disabled through this argument.

flagsStatic :: [Flag IO]