Skip to content
Snippets Groups Projects
Commit 4a2ef3dd authored by Alfredo Di Napoli's avatar Alfredo Di Napoli Committed by Marge Bot
Browse files

Port more DriverUnknownMessage into richer DriverMessage constructors

In order:

* Introduce the `PsErrUnknownOptionsPragma` diagnostic message

  This commit changes the diagnostic emitted inside
  `GHC.Parser.Header.checkProcessArgsResult` from an (erroneous) and
  unstructured `DriverUnknownMessage` to a `PsErrUnknownOPtionsPragma`,
  i.e. a new data constructor of a `PsHeaderMessage`.

* Add the `DriverUserDefinedRuleIgnored` diagnostic message

* Add `DriverUserDefinedRuleIgnored` data constructor

  This commit adds (and use) a new data constructor to the `DriverMessage`
  type, replacing a `DriverUnknownMessage` with it.

* Add and use `DriverCannotLoadInterfaceFile` constructor

  This commit introduces the DriverCannotLoadInterfaceFile constructor for
  the `DriverMessage` type and it uses it to replace and occurrence of
  `DriverUnknownMessage`.

* Add and use the `DriverInferredSafeImport` constructor

  This commit adds a new `DriverInferredSafeImport` constructor to the
  `DriverMessage` type, and uses it in `GHC.Driver.Main` to replace one
  occurrence of `DriverUnknownMessage`.

* Add and use `DriverCannotImportUnsafeModule` constructor

  This commit adds the `DriverCannotImportUnsafeModule` constructor
  to the `DriverMessage` type, and later using it to replace one usage of
  `DriverUnknownMessage` in the `GHC.Driver.Main` module.

* Add and use `DriverMissingSafeHaskellMode` constructor

* Add and use `DriverPackageNotTrusted` constructor

* Introduce and use `DriverInferredSafeModule` constructor

* Add and use `DriverMarkedTrustworthyButInferredSafe` constructor

* Add and use `DriverCannotImportFromUntrustedPackage`
parent 3382b3d6
No related merge requests found
Showing
with 289 additions and 74 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment