summaryrefslogtreecommitdiff
path: root/testsuite/tests/backpack/should_fail/T19244a.stderr
diff options
context:
space:
mode:
authorsheaf <sam.derbyshire@gmail.com>2023-05-15 15:23:49 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2023-05-15 18:03:00 -0400
commit4d29ecdfcc79ad663e066d9f7d6d17b64c8c6c41 (patch)
tree985890c63aee54a2e94e31aa85cbec44652987b9 /testsuite/tests/backpack/should_fail/T19244a.stderr
parentd69cbd78999071d2d6479be40ae90ddd83b9942a (diff)
downloadhaskell-4d29ecdfcc79ad663e066d9f7d6d17b64c8c6c41.tar.gz
Migrate errors to diagnostics in GHC.Tc.Module
This commit migrates the errors in GHC.Tc.Module to use the new diagnostic infrastructure. It required a significant overhaul of the compatibility checks between an hs-boot or signature module and its implementation; we now use a Writer monad to accumulate errors; see the BootMismatch datatype in GHC.Tc.Errors.Types, with its panoply of subtypes. For the sake of readability, several local functions inside the 'checkBootTyCon' function were split off into top-level functions. We split off GHC.Types.HscSource into a "boot or sig" vs "normal hs file" datatype, as this mirrors the logic in several other places where we want to treat hs-boot and hsig files in a similar fashion. This commit also refactors the Backpack checks for type synonyms implementing abstract data, to correctly reject implementations that contain qualified or quantified types (this fixes #23342 and #23344).
Diffstat (limited to 'testsuite/tests/backpack/should_fail/T19244a.stderr')
-rw-r--r--testsuite/tests/backpack/should_fail/T19244a.stderr72
1 files changed, 36 insertions, 36 deletions
diff --git a/testsuite/tests/backpack/should_fail/T19244a.stderr b/testsuite/tests/backpack/should_fail/T19244a.stderr
index 5dceaad5f3..3c9e217a87 100644
--- a/testsuite/tests/backpack/should_fail/T19244a.stderr
+++ b/testsuite/tests/backpack/should_fail/T19244a.stderr
@@ -1,31 +1,31 @@
[1 of 4] Processing user
- [1 of 2] Compiling Map[sig] ( user/Map.hsig, nothing )
- [2 of 2] Compiling User ( user/User.hs, nothing )
+ [1 of 2] Compiling Map[sig] ( user\Map.hsig, nothing )
+ [2 of 2] Compiling User ( user\User.hs, nothing )
[2 of 4] Processing ordmap
Instantiating ordmap
- [1 of 1] Compiling Map ( ordmap/Map.hs, T19244a.out/ordmap/Map.o )
+ [1 of 1] Compiling Map ( ordmap\Map.hs, T19244a.out\ordmap\Map.o )
[3 of 4] Processing eqmap
Instantiating eqmap
- [1 of 1] Compiling Map ( eqmap/Map.hs, T19244a.out/eqmap/Map.o )
+ [1 of 1] Compiling Map ( eqmap\Map.hs, T19244a.out\eqmap\Map.o )
[4 of 4] Processing main
Instantiating main
[1 of 2] Including user[Map=ordmap:Map]
Instantiating user[Map=ordmap:Map]
- [1 of 2] Compiling Map[sig] ( user/Map.hsig, T19244a.out/user/user-GzloW2NeDdA2M0V8qzN4g2/Map.o )
+ [1 of 2] Compiling Map[sig] ( user\Map.hsig, T19244a.out\user\user-GzloW2NeDdA2M0V8qzN4g2\Map.o )
-T19244a.bkp:22:9: error:
+T19244a.bkp:22:9: error: [GHC-15843]
• Type constructor ‘Key’ has conflicting definitions in the module
- and its hsig file
+ and its hsig file.
Main module: type Key :: * -> Constraint
type Key = GHC.Classes.Ord :: * -> Constraint
- Hsig file: type Key :: forall {k}. k -> Constraint
- class Key k1
- The types have different kinds
- • while checking that ordmap:Map implements signature Map in user[Map=ordmap:Map]
+ Hsig file: type Key :: forall {k}. k -> Constraint
+ class Key k1
+ The types have different kinds.
+ • While checking that ‘ordmap:Map’ implements signature ‘Map’ in ‘user[Map=ordmap:Map]’.
-<no location info>: error:
+<no location info>: error: [GHC-15843]
• Type constructor ‘Map’ has conflicting definitions in the module
- and its hsig file
+ and its hsig file.
Main module: type role Map nominal representational
type Map :: * -> * -> *
data Map k a
@@ -35,37 +35,37 @@ T19244a.bkp:22:9: error:
!(Map k a)
!(Map k a)
| Data.Map.Internal.Tip
- Hsig file: type role Map nominal representational
- type Map :: forall {k} {k1}. k -> k1 -> *
- data Map k2 a
- The types have different kinds
- • while checking that ordmap:Map implements signature Map in user[Map=ordmap:Map]
+ Hsig file: type role Map nominal representational
+ type Map :: forall {k} {k1}. k -> k1 -> *
+ data Map k2 a
+ The types have different kinds.
+ • While checking that ‘ordmap:Map’ implements signature ‘Map’ in ‘user[Map=ordmap:Map]’.
-<no location info>: error:
+<no location info>: error: [GHC-11890]
• Identifier ‘lookup’ has conflicting definitions in the module
- and its hsig file
+ and its hsig file.
Main module: lookup ::
GHC.Classes.Ord k => k -> Map k a -> GHC.Maybe.Maybe a
- Hsig file: lookup ::
- Key (*) k => k -> Map (*) (*) k a -> GHC.Maybe.Maybe a
- The two types are different
- • while checking that ordmap:Map implements signature Map in user[Map=ordmap:Map]
+ Hsig file: lookup ::
+ Key (*) k => k -> Map (*) (*) k a -> GHC.Maybe.Maybe a
+ The two types are different.
+ • While checking that ‘ordmap:Map’ implements signature ‘Map’ in ‘user[Map=ordmap:Map]’.
-<no location info>: error:
+<no location info>: error: [GHC-11890]
• Identifier ‘insert’ has conflicting definitions in the module
- and its hsig file
+ and its hsig file.
Main module: insert ::
GHC.Classes.Ord k => k -> a -> Map k a -> Map k a
- Hsig file: insert ::
- Key (*) k => k -> a -> Map (*) (*) k a -> Map (*) (*) k a
- The two types are different
- • while checking that ordmap:Map implements signature Map in user[Map=ordmap:Map]
+ Hsig file: insert ::
+ Key (*) k => k -> a -> Map (*) (*) k a -> Map (*) (*) k a
+ The two types are different.
+ • While checking that ‘ordmap:Map’ implements signature ‘Map’ in ‘user[Map=ordmap:Map]’.
-<no location info>: error:
+<no location info>: error: [GHC-11890]
• Identifier ‘empty’ has conflicting definitions in the module
- and its hsig file
+ and its hsig file.
Main module: empty :: Map k a
- Hsig file: empty ::
- forall {k1} {k2} (k3 :: k1) (a :: k2). Map k1 k2 k3 a
- The two types are different
- • while checking that ordmap:Map implements signature Map in user[Map=ordmap:Map]
+ Hsig file: empty ::
+ forall {k1} {k2} (k3 :: k1) (a :: k2). Map k1 k2 k3 a
+ The two types are different.
+ • While checking that ‘ordmap:Map’ implements signature ‘Map’ in ‘user[Map=ordmap:Map]’.