diff options
author | Alfredo Di Napoli <alfredo@well-typed.com> | 2021-07-27 09:45:27 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-07-28 13:20:52 -0400 |
commit | 4a2ef3dd38adf613f425bb1ef8a8614bea558ff0 (patch) | |
tree | 3e7173fa8426e4bd70997ae160966b3e362f2572 /testsuite/tests/safeHaskell | |
parent | 3382b3d6f9a818d0afe62112dd368ae04778d16e (diff) | |
download | haskell-4a2ef3dd38adf613f425bb1ef8a8614bea558ff0.tar.gz |
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`
Diffstat (limited to 'testsuite/tests/safeHaskell')
-rw-r--r-- | testsuite/tests/safeHaskell/flags/SafeFlags19.stderr | 2 | ||||
-rw-r--r-- | testsuite/tests/safeHaskell/flags/SafeFlags28.stderr | 8 | ||||
-rw-r--r-- | testsuite/tests/safeHaskell/flags/SafeFlags29.stderr | 8 |
3 files changed, 9 insertions, 9 deletions
diff --git a/testsuite/tests/safeHaskell/flags/SafeFlags19.stderr b/testsuite/tests/safeHaskell/flags/SafeFlags19.stderr index e47c40a558..438cd98629 100644 --- a/testsuite/tests/safeHaskell/flags/SafeFlags19.stderr +++ b/testsuite/tests/safeHaskell/flags/SafeFlags19.stderr @@ -1,3 +1,3 @@ SafeFlags19.hs:1:17: - unknown flag in {-# OPTIONS_GHC #-} pragma: -fno-package-trust + Unknown flag in {-# OPTIONS_GHC #-} pragma: -fno-package-trust diff --git a/testsuite/tests/safeHaskell/flags/SafeFlags28.stderr b/testsuite/tests/safeHaskell/flags/SafeFlags28.stderr index 13fdaf0c1a..efc47ee4ce 100644 --- a/testsuite/tests/safeHaskell/flags/SafeFlags28.stderr +++ b/testsuite/tests/safeHaskell/flags/SafeFlags28.stderr @@ -1,12 +1,12 @@ SafeFlags28.hs:1:17: error: - unknown flag in {-# OPTIONS_GHC #-} pragma: -trust + Unknown flag in {-# OPTIONS_GHC #-} pragma: -trust SafeFlags28.hs:1:24: error: - unknown flag in {-# OPTIONS_GHC #-} pragma: base, + Unknown flag in {-# OPTIONS_GHC #-} pragma: base, SafeFlags28.hs:1:30: error: - unknown flag in {-# OPTIONS_GHC #-} pragma: -trust + Unknown flag in {-# OPTIONS_GHC #-} pragma: -trust SafeFlags28.hs:1:37: error: - unknown flag in {-# OPTIONS_GHC #-} pragma: bytestring + Unknown flag in {-# OPTIONS_GHC #-} pragma: bytestring diff --git a/testsuite/tests/safeHaskell/flags/SafeFlags29.stderr b/testsuite/tests/safeHaskell/flags/SafeFlags29.stderr index 2c32e70254..a98ac6cf77 100644 --- a/testsuite/tests/safeHaskell/flags/SafeFlags29.stderr +++ b/testsuite/tests/safeHaskell/flags/SafeFlags29.stderr @@ -1,12 +1,12 @@ SafeFlags29.hs:2:17: error: - unknown flag in {-# OPTIONS_GHC #-} pragma: -trust + Unknown flag in {-# OPTIONS_GHC #-} pragma: -trust SafeFlags29.hs:2:24: error: - unknown flag in {-# OPTIONS_GHC #-} pragma: base + Unknown flag in {-# OPTIONS_GHC #-} pragma: base SafeFlags29.hs:2:29: error: - unknown flag in {-# OPTIONS_GHC #-} pragma: -trust + Unknown flag in {-# OPTIONS_GHC #-} pragma: -trust SafeFlags29.hs:2:36: error: - unknown flag in {-# OPTIONS_GHC #-} pragma: bytestring + Unknown flag in {-# OPTIONS_GHC #-} pragma: bytestring |