Skip to content

driver: Split Session functions out of Main

Rodrigo Mesquita requested to merge wip/romes/better-main-3 into master
driver: Split Session functions out of Main

This commit moves out functions that help in creating and validating a
GHC session from Main into the ghc library where they can be used by
other GHC applications.

In particular:

- Move `Mode` types and functions (referring to the mode GHC is running
  on) to `GHC.Driver.Session.Mode`

- Move `checkOptions` and aux functions, which validates GHC DynFlags
  based on the mode, to `GHC.Driver.Session.Lint`

- Moves `initMulti` and aux functions, which initializes a multi-unit
  session, into `GHC.Driver.Session.Units`.

Merge request reports

Loading