diff options
Diffstat (limited to 'testsuite/tests/backpack/should_fail')
41 files changed, 601 insertions, 322 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]’. diff --git a/testsuite/tests/backpack/should_fail/T19244b.stderr b/testsuite/tests/backpack/should_fail/T19244b.stderr index 3a50d11079..6c883c2601 100644 --- a/testsuite/tests/backpack/should_fail/T19244b.stderr +++ b/testsuite/tests/backpack/should_fail/T19244b.stderr @@ -1,21 +1,21 @@ [1 of 3] 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 3] Processing ordmap Instantiating ordmap - [1 of 1] Compiling Map ( ordmap/Map.hs, T19244b.out/ordmap/Map.o ) + [1 of 1] Compiling Map ( ordmap\Map.hs, T19244b.out\ordmap\Map.o ) [3 of 3] Processing main Instantiating main [1 of 1] Including user[Map=ordmap:Map] Instantiating user[Map=ordmap:Map] - [1 of 2] Compiling Map[sig] ( user/Map.hsig, T19244b.out/user/user-GzloW2NeDdA2M0V8qzN4g2/Map.o ) + [1 of 2] Compiling Map[sig] ( user\Map.hsig, T19244b.out\user\user-GzloW2NeDdA2M0V8qzN4g2\Map.o ) -T19244b.bkp:11:27: error: +T19244b.bkp:11:27: 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]’. diff --git a/testsuite/tests/backpack/should_fail/T23342.bkp b/testsuite/tests/backpack/should_fail/T23342.bkp new file mode 100644 index 0000000000..62f9b5f1c5 --- /dev/null +++ b/testsuite/tests/backpack/should_fail/T23342.bkp @@ -0,0 +1,21 @@ +unit p where + signature H where + import Data.Kind + data T1 + data T2 + data T3 + +unit q where + module H where + import Data.Kind + class C a where {} + data S + + type T1 = forall (a :: Type). a -> a + type T2 = forall (a :: Type). C a => a + type T3 = C S => S -> S + +unit r where + dependency q + dependency p[H=q:H] + diff --git a/testsuite/tests/backpack/should_fail/T23342.stderr b/testsuite/tests/backpack/should_fail/T23342.stderr new file mode 100644 index 0000000000..39641082d6 --- /dev/null +++ b/testsuite/tests/backpack/should_fail/T23342.stderr @@ -0,0 +1,44 @@ +[1 of 3] Processing p + [1 of 1] Compiling H[sig] ( p\H.hsig, nothing ) +[2 of 3] Processing q + Instantiating q + [1 of 1] Compiling H ( q\H.hs, T23342.out\q\H.o ) +[3 of 3] Processing r + Instantiating r + [1 of 2] Including q + [2 of 2] Including p[H=q:H] + Instantiating p[H=q:H] + [1 of 1] Compiling H[sig] ( p\H.hsig, T23342.out\p\p-D5Mg3foBSCrDbQDKH4WGSG\H.o ) + +T23342.bkp:14:5: error: [GHC-15843] + • Type constructor ‘T1’ has conflicting definitions in the module + and its hsig file. + Main module: type T1 :: * + type T1 = forall a. a -> a + Hsig file: type T1 :: * + data T1 + Illegal implementation of abstract data: + Invalid polymorphic type: forall a. a -> a. + • While checking that ‘q:H’ implements signature ‘H’ in ‘p[H=q:H]’. + +T23342.bkp:15:5: error: [GHC-15843] + • Type constructor ‘T2’ has conflicting definitions in the module + and its hsig file. + Main module: type T2 :: * + type T2 = forall a. C a => a + Hsig file: type T2 :: * + data T2 + Illegal implementation of abstract data: + Invalid polymorphic type: forall a. C a => a. + • While checking that ‘q:H’ implements signature ‘H’ in ‘p[H=q:H]’. + +T23342.bkp:16:5: error: [GHC-15843] + • Type constructor ‘T3’ has conflicting definitions in the module + and its hsig file. + Main module: type T3 :: * + type T3 = C S => S -> S + Hsig file: type T3 :: * + data T3 + Illegal implementation of abstract data: + Invalid qualified type: C S => S -> S. + • While checking that ‘q:H’ implements signature ‘H’ in ‘p[H=q:H]’. diff --git a/testsuite/tests/backpack/should_fail/T23344.bkp b/testsuite/tests/backpack/should_fail/T23344.bkp new file mode 100644 index 0000000000..3d60ff7b51 --- /dev/null +++ b/testsuite/tests/backpack/should_fail/T23344.bkp @@ -0,0 +1,54 @@ +{-# LANGUAGE StandaloneKindSignatures #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE ImpredicativeTypes #-} + +unit p where + module M where + import Data.Kind + + type C :: Type -> Constraint + class C a where + type family F a :: Type + +unit q where + dependency p + signature H where + data T1 + data T2 + data T3 + module N where + import M ( C(F) ) + import H ( T1, T2, T3 ) + + instance C T1 where + type F T1 = T2 + instance C T2 where + type F T2 = T3 + instance C T3 where + type F T3 = T1 + +unit r where + dependency p + module H where + import Data.Kind + + type S1 :: Type -> Type + data S1 a = MkS1 + + type S2 :: Type + data S2 = MkS2 + + type G :: Type -> Constraint + class G a where {} + + type T1 = S1 (forall (a :: Type). a -> a) + type T2 = S1 (G S2 => S2) + + type Y = forall a. a -> a + type Z = Y + type T3 = S1 Y + +unit s where + dependency p + dependency r + dependency q[H=r:H] diff --git a/testsuite/tests/backpack/should_fail/T23344.stderr b/testsuite/tests/backpack/should_fail/T23344.stderr new file mode 100644 index 0000000000..6687faba5f --- /dev/null +++ b/testsuite/tests/backpack/should_fail/T23344.stderr @@ -0,0 +1,51 @@ +[1 of 4] Processing p + Instantiating p + [1 of 1] Compiling M ( p\M.hs, T23344.out\p\M.o ) +[2 of 4] Processing q + [1 of 2] Compiling H[sig] ( q\H.hsig, nothing ) + [2 of 2] Compiling N ( q\N.hs, nothing ) +[3 of 4] Processing r + Instantiating r + [1 of 1] Including p + [1 of 1] Compiling H ( r\H.hs, T23344.out\r\H.o ) +[4 of 4] Processing s + Instantiating s + [1 of 3] Including p + [2 of 3] Including r + [3 of 3] Including q[H=r:H] + Instantiating q[H=r:H] + [1 of 1] Including p + [1 of 2] Compiling H[sig] ( q\H.hsig, T23344.out\q\q-EsMFZGC3QiBIz4krwt67aW\H.o ) + +T23344.bkp:44:5: error: [GHC-15843] + • Type constructor ‘T1’ has conflicting definitions in the module + and its hsig file. + Main module: type T1 :: * + type T1 = S1 (forall a. a -> a) + Hsig file: type T1 :: * + data T1 + Illegal implementation of abstract data: + Invalid polymorphic type: forall a. a -> a. + • While checking that ‘r:H’ implements signature ‘H’ in ‘q[H=r:H]’. + +T23344.bkp:45:5: error: [GHC-15843] + • Type constructor ‘T2’ has conflicting definitions in the module + and its hsig file. + Main module: type T2 :: * + type T2 = S1 (G S2 => S2) + Hsig file: type T2 :: * + data T2 + Illegal implementation of abstract data: + Invalid qualified type: G S2 => S2. + • While checking that ‘r:H’ implements signature ‘H’ in ‘q[H=r:H]’. + +T23344.bkp:49:5: error: [GHC-15843] + • Type constructor ‘T3’ has conflicting definitions in the module + and its hsig file. + Main module: type T3 :: * + type T3 = S1 Y + Hsig file: type T3 :: * + data T3 + Illegal implementation of abstract data: + Invalid polymorphic type: forall a. a -> a. + • While checking that ‘r:H’ implements signature ‘H’ in ‘q[H=r:H]’. diff --git a/testsuite/tests/backpack/should_fail/all.T b/testsuite/tests/backpack/should_fail/all.T index e01a4281a5..91733d9040 100644 --- a/testsuite/tests/backpack/should_fail/all.T +++ b/testsuite/tests/backpack/should_fail/all.T @@ -49,5 +49,8 @@ test('bkpfail50', normal, backpack_compile_fail, ['']) test('bkpfail51', normal, backpack_compile_fail, ['']) test('bkpfail52', normal, backpack_compile_fail, ['']) test('bkpfail53', normal, backpack_compile_fail, ['']) +test('bkpfail54', normal, backpack_compile_fail, ['']) test('T19244a', normal, backpack_compile_fail, ['']) test('T19244b', normal, backpack_compile_fail, ['']) +test('T23342', normal, backpack_compile_fail, ['']) +test('T23344', normal, backpack_compile_fail, ['']) diff --git a/testsuite/tests/backpack/should_fail/bkpfail01.stderr b/testsuite/tests/backpack/should_fail/bkpfail01.stderr index 7197fa3eb2..6b13993058 100644 --- a/testsuite/tests/backpack/should_fail/bkpfail01.stderr +++ b/testsuite/tests/backpack/should_fail/bkpfail01.stderr @@ -1,19 +1,19 @@ [1 of 3] Processing p - [1 of 2] Compiling H[sig] ( p/H.hsig, nothing ) - [2 of 2] Compiling A ( p/A.hs, nothing ) + [1 of 2] Compiling H[sig] ( p\H.hsig, nothing ) + [2 of 2] Compiling A ( p\A.hs, nothing ) [2 of 3] Processing q Instantiating q - [1 of 1] Compiling H ( q/H.hs, nothing ) + [1 of 1] Compiling H ( q\H.hs, nothing ) [3 of 3] Processing r Instantiating r [1 of 1] Including p[H=q:H] Instantiating p[H=q:H] - [1 of 2] Compiling H[sig] ( p/H.hsig, nothing ) + [1 of 2] Compiling H[sig] ( p\H.hsig, nothing ) -bkpfail01.out/p/p-D5Mg3foBSCrDbQDKH4WGSG/../H.hi:1:1: error: [GHC-93011] +bkpfail01.out\p\p-D5Mg3foBSCrDbQDKH4WGSG\..\H.hi:1:1: error: [GHC-93011] • ‘H’ is exported by the hsig file, but not exported by the implementing module ‘q:H’ - • while checking that q:H implements signature H in p[H=q:H] + • While checking that ‘q:H’ implements signature ‘H’ in ‘p[H=q:H]’. -bkpfail01.out/p/p-D5Mg3foBSCrDbQDKH4WGSG/../H.hi:1:1: error: [GHC-93011] +bkpfail01.out\p\p-D5Mg3foBSCrDbQDKH4WGSG\..\H.hi:1:1: error: [GHC-93011] • ‘H’ is exported by the hsig file, but not exported by the implementing module ‘q:H’ - • while checking that q:H implements signature H in p[H=q:H] + • While checking that ‘q:H’ implements signature ‘H’ in ‘p[H=q:H]’. diff --git a/testsuite/tests/backpack/should_fail/bkpfail03.stderr b/testsuite/tests/backpack/should_fail/bkpfail03.stderr index 9383a2aca1..3d38234f45 100644 --- a/testsuite/tests/backpack/should_fail/bkpfail03.stderr +++ b/testsuite/tests/backpack/should_fail/bkpfail03.stderr @@ -1,17 +1,17 @@ [1 of 3] Processing q - [1 of 2] Compiling M1 ( q/M1.hs, nothing ) - [2 of 2] Compiling M2[sig] ( q/M2.hsig, nothing ) + [1 of 2] Compiling M1 ( q\M1.hs, nothing ) + [2 of 2] Compiling M2[sig] ( q\M2.hsig, nothing ) [2 of 3] Processing m2 Instantiating m2 - [1 of 1] Compiling M2 ( m2/M2.hs, nothing ) + [1 of 1] Compiling M2 ( m2\M2.hs, nothing ) [3 of 3] Processing p Instantiating p [1 of 1] Including q[M2=m2:M2] Instantiating q[M2=m2:M2] - [1 of 2] Compiling M1 ( q/M1.hs, nothing ) - [2 of 2] Compiling M2[sig] ( q/M2.hsig, nothing ) + [1 of 2] Compiling M1 ( q\M1.hs, nothing ) + [2 of 2] Compiling M2[sig] ( q\M2.hsig, nothing ) -bkpfail03.bkp:3:9: error: +bkpfail03.bkp:3:9: error: [GHC-12424] • The hsig file (re)exports ‘M1.M’ but the implementing module exports a different identifier ‘M2.M’ - • while checking that m2:M2 implements signature M2 in q[M2=m2:M2] + • While checking that ‘m2:M2’ implements signature ‘M2’ in ‘q[M2=m2:M2]’. diff --git a/testsuite/tests/backpack/should_fail/bkpfail04.stderr b/testsuite/tests/backpack/should_fail/bkpfail04.stderr index 397cd24851..450da78636 100644 --- a/testsuite/tests/backpack/should_fail/bkpfail04.stderr +++ b/testsuite/tests/backpack/should_fail/bkpfail04.stderr @@ -1,20 +1,20 @@ [1 of 3] Processing p - [1 of 1] Compiling A[sig] ( p/A.hsig, nothing ) + [1 of 1] Compiling A[sig] ( p\A.hsig, nothing ) [2 of 3] Processing q - [1 of 1] Compiling A[sig] ( q/A.hsig, nothing ) + [1 of 1] Compiling A[sig] ( q\A.hsig, nothing ) [3 of 3] Processing r - [1 of 4] Compiling A[sig] ( r/A.hsig, nothing ) + [1 of 4] Compiling A[sig] ( r\A.hsig, nothing ) -bkpfail04.bkp:7:9: error: +bkpfail04.bkp:7:9: error: [GHC-15843] • Type constructor ‘A’ has conflicting definitions in the module - and its hsig file + and its hsig file. Main module: type A :: * data A = A {foo :: Int} - Hsig file: type A :: * - data A = A {bar :: Bool} + Hsig file: type A :: * + data A = A {bar :: Bool} The constructors do not match: - The record label lists for ‘A’ differ - The types for ‘A’ differ + • The record label lists for ‘A’ differ. + • The types for ‘A’ differ. • while merging the signatures from: • p[A=<A>]:A • q[A=<A>]:A diff --git a/testsuite/tests/backpack/should_fail/bkpfail05.stderr b/testsuite/tests/backpack/should_fail/bkpfail05.stderr index c07426fc6b..1827c7ff1a 100644 --- a/testsuite/tests/backpack/should_fail/bkpfail05.stderr +++ b/testsuite/tests/backpack/should_fail/bkpfail05.stderr @@ -1,23 +1,23 @@ [1 of 5] Processing h - [1 of 1] Compiling H[sig] ( h/H.hsig, nothing ) + [1 of 1] Compiling H[sig] ( h\H.hsig, nothing ) [2 of 5] Processing t-impl Instantiating t-impl - [1 of 1] Compiling T ( t-impl/T.hs, bkpfail05.out/t-impl/T.o ) + [1 of 1] Compiling T ( t-impl\T.hs, bkpfail05.out\t-impl\T.o ) [3 of 5] Processing p - [1 of 2] Compiling H[sig] ( p/H.hsig, nothing ) + [1 of 2] Compiling H[sig] ( p\H.hsig, nothing ) [2 of 2] Instantiating h [4 of 5] Processing h-impl Instantiating h-impl [1 of 1] Including t-impl - [1 of 1] Compiling H ( h-impl/H.hs, bkpfail05.out/h-impl/H.o ) + [1 of 1] Compiling H ( h-impl\H.hs, bkpfail05.out\h-impl\H.o ) [5 of 5] Processing q Instantiating q [1 of 1] Including p[H=h-impl:H] Instantiating p[H=h-impl:H] [1 of 2] Including h[H=h-impl:H] Instantiating h[H=h-impl:H] - [1 of 1] Compiling H[sig] ( h/H.hsig, bkpfail05.out/h/h-5FYQgnNkfSvBT5yogOxPpf/H.o ) + [1 of 1] Compiling H[sig] ( h\H.hsig, bkpfail05.out\h\h-5FYQgnNkfSvBT5yogOxPpf\H.o ) -bkpfail05.out/h/h-5FYQgnNkfSvBT5yogOxPpf/../H.hi:1:1: error: [GHC-93011] +bkpfail05.out\h\h-5FYQgnNkfSvBT5yogOxPpf\..\H.hi:1:1: error: [GHC-93011] • ‘T1’ is exported by the hsig file, but not exported by the implementing module ‘h-impl:H’ - • while checking that h-impl:H implements signature H in h[H=h-impl:H] + • While checking that ‘h-impl:H’ implements signature ‘H’ in ‘h[H=h-impl:H]’. diff --git a/testsuite/tests/backpack/should_fail/bkpfail06.stderr b/testsuite/tests/backpack/should_fail/bkpfail06.stderr index a707bf06b6..ef40417b48 100644 --- a/testsuite/tests/backpack/should_fail/bkpfail06.stderr +++ b/testsuite/tests/backpack/should_fail/bkpfail06.stderr @@ -1,22 +1,22 @@ [1 of 3] Processing p - [1 of 2] Compiling H[sig] ( p/H.hsig, nothing ) - [2 of 2] Compiling A ( p/A.hs, nothing ) + [1 of 2] Compiling H[sig] ( p\H.hsig, nothing ) + [2 of 2] Compiling A ( p\A.hs, nothing ) [2 of 3] Processing qimpl Instantiating qimpl - [1 of 2] Compiling T ( qimpl/T.hs, bkpfail06.out/qimpl/T.o ) - [2 of 2] Compiling H ( qimpl/H.hs, bkpfail06.out/qimpl/H.o ) + [1 of 2] Compiling T ( qimpl\T.hs, bkpfail06.out\qimpl\T.o ) + [2 of 2] Compiling H ( qimpl\H.hs, bkpfail06.out\qimpl\H.o ) [3 of 3] Processing q Instantiating q [1 of 1] Including p[H=qimpl:H] Instantiating p[H=qimpl:H] - [1 of 2] Compiling H[sig] ( p/H.hsig, bkpfail06.out/p/p-IueY0RdHDM2I4k0mLZuqM0/H.o ) + [1 of 2] Compiling H[sig] ( p\H.hsig, bkpfail06.out\p\p-IueY0RdHDM2I4k0mLZuqM0\H.o ) -bkpfail06.bkp:10:9: error: +bkpfail06.bkp:10:9: error: [GHC-15843] • Type constructor ‘T’ has conflicting definitions in the module - and its hsig file + and its hsig file. Main module: type T :: * data T = T GHC.Types.Bool - Hsig file: type T :: * - data T = T GHC.Types.Int - The constructors do not match: The types for ‘T’ differ - • while checking that qimpl:H implements signature H in p[H=qimpl:H] + Hsig file: type T :: * + data T = T GHC.Types.Int + The constructors do not match: The types for ‘T’ differ. + • While checking that ‘qimpl:H’ implements signature ‘H’ in ‘p[H=qimpl:H]’. diff --git a/testsuite/tests/backpack/should_fail/bkpfail07.stderr b/testsuite/tests/backpack/should_fail/bkpfail07.stderr index 251fd67f0b..7829f1e0cd 100644 --- a/testsuite/tests/backpack/should_fail/bkpfail07.stderr +++ b/testsuite/tests/backpack/should_fail/bkpfail07.stderr @@ -1,20 +1,20 @@ [1 of 3] Processing p - [1 of 1] Compiling H[sig] ( p/H.hsig, nothing ) + [1 of 1] Compiling H[sig] ( p\H.hsig, nothing ) [2 of 3] Processing h - [1 of 3] Compiling T ( h/T.hs, nothing ) - [2 of 3] Compiling H ( h/H.hs, nothing ) - [3 of 3] Compiling A[sig] ( h/A.hsig, nothing ) + [1 of 3] Compiling T ( h\T.hs, nothing ) + [2 of 3] Compiling H ( h\H.hs, nothing ) + [3 of 3] Compiling A[sig] ( h\A.hsig, nothing ) [3 of 3] Processing q - [1 of 3] Compiling A[sig] ( q/A.hsig, nothing ) + [1 of 3] Compiling A[sig] ( q\A.hsig, nothing ) [2 of 3] Instantiating h [3 of 3] Instantiating p -bkpfail07.bkp:6:9: error: +bkpfail07.bkp:6:9: error: [GHC-15843] • Type constructor ‘T’ has conflicting definitions in the module - and its hsig file + and its hsig file. Main module: type T :: * data T = T GHC.Types.Bool - Hsig file: type T :: * - data T = T GHC.Types.Int - The constructors do not match: The types for ‘T’ differ - • while checking that h[A=<A>]:H implements signature H in p[H=h[A=<A>]:H] + Hsig file: type T :: * + data T = T GHC.Types.Int + The constructors do not match: The types for ‘T’ differ. + • While checking that ‘h[A=<A>]:H’ implements signature ‘H’ in ‘p[H=h[A=<A>]:H]’. diff --git a/testsuite/tests/backpack/should_fail/bkpfail09.stderr b/testsuite/tests/backpack/should_fail/bkpfail09.stderr index 858f292001..48be5a4274 100644 --- a/testsuite/tests/backpack/should_fail/bkpfail09.stderr +++ b/testsuite/tests/backpack/should_fail/bkpfail09.stderr @@ -1,17 +1,17 @@ [1 of 3] Processing p - [1 of 2] Compiling H[sig] ( p/H.hsig, nothing ) - [2 of 2] Compiling A ( p/A.hs, nothing ) + [1 of 2] Compiling H[sig] ( p\H.hsig, nothing ) + [2 of 2] Compiling A ( p\A.hs, nothing ) [2 of 3] Processing q Instantiating q - [1 of 1] Compiling H ( q/H.hs, bkpfail09.out/q/H.o ) + [1 of 1] Compiling H ( q\H.hs, bkpfail09.out\q\H.o ) [3 of 3] Processing r - [1 of 3] Compiling H2[sig] ( r/H2.hsig, nothing ) + [1 of 3] Compiling H2[sig] ( r\H2.hsig, nothing ) [2 of 3] Instantiating p Command line argument: -unit-id p[H=H]:0:0: error: [GHC-93011] • ‘H’ is exported by the hsig file, but not exported by the implementing module ‘q:H’ - • while checking that q:H implements signature H in p[H=q:H] + • While checking that ‘q:H’ implements signature ‘H’ in ‘p[H=q:H]’. Command line argument: -unit-id p[H=H]:0:0: error: [GHC-93011] • ‘H’ is exported by the hsig file, but not exported by the implementing module ‘q:H’ - • while checking that q:H implements signature H in p[H=q:H] + • While checking that ‘q:H’ implements signature ‘H’ in ‘p[H=q:H]’. diff --git a/testsuite/tests/backpack/should_fail/bkpfail10.stderr b/testsuite/tests/backpack/should_fail/bkpfail10.stderr index 78ceaffb30..abd3a1b6ba 100644 --- a/testsuite/tests/backpack/should_fail/bkpfail10.stderr +++ b/testsuite/tests/backpack/should_fail/bkpfail10.stderr @@ -1,28 +1,28 @@ [1 of 3] Processing p - [1 of 1] Compiling H[sig] ( p/H.hsig, nothing ) + [1 of 1] Compiling H[sig] ( p\H.hsig, nothing ) [2 of 3] Processing q Instantiating q - [1 of 1] Compiling H ( q/H.hs, bkpfail10.out/q/H.o ) + [1 of 1] Compiling H ( q\H.hs, bkpfail10.out\q\H.o ) [3 of 3] Processing r Instantiating r [1 of 2] Including p[H=q:H] Instantiating p[H=q:H] - [1 of 1] Compiling H[sig] ( p/H.hsig, bkpfail10.out/p/p-D5Mg3foBSCrDbQDKH4WGSG/H.o ) + [1 of 1] Compiling H[sig] ( p\H.hsig, bkpfail10.out\p\p-D5Mg3foBSCrDbQDKH4WGSG\H.o ) -bkpfail10.bkp:8:9: error: +bkpfail10.bkp:8:9: error: [GHC-15843] • Type constructor ‘H’ has conflicting definitions in the module - and its hsig file + and its hsig file. Main module: type H :: * -> * data H a = H a - Hsig file: type H :: * - data H - The types have different kinds - • while checking that q:H implements signature H in p[H=q:H] + Hsig file: type H :: * + data H + The types have different kinds. + • While checking that ‘q:H’ implements signature ‘H’ in ‘p[H=q:H]’. -bkpfail10.bkp:10:9: error: +bkpfail10.bkp:10:9: error: [GHC-11890] • Identifier ‘f’ has conflicting definitions in the module - and its hsig file + and its hsig file. Main module: f :: H a -> H a - Hsig file: f :: H -> H - The two types are different - • while checking that q:H implements signature H in p[H=q:H] + Hsig file: f :: H -> H + The two types are different. + • While checking that ‘q:H’ implements signature ‘H’ in ‘p[H=q:H]’. diff --git a/testsuite/tests/backpack/should_fail/bkpfail11.stderr b/testsuite/tests/backpack/should_fail/bkpfail11.stderr index cfcfdcb0e4..2686cd1fbc 100644 --- a/testsuite/tests/backpack/should_fail/bkpfail11.stderr +++ b/testsuite/tests/backpack/should_fail/bkpfail11.stderr @@ -15,4 +15,4 @@ bkpfail11.out\sig\sig-HyoWTHt34SDIRGEX0vZ8iN\..\A.hi:1:1: error: [GHC-39999] arising when attempting to show that instance [safe] GHC.Show.Show T -- Defined at bkpfail11.bkp:5:18 is provided by ‘mod:A’ - • while checking that mod:A implements signature A in sig[A=mod:A] + • While checking that ‘mod:A’ implements signature ‘A’ in ‘sig[A=mod:A]’. diff --git a/testsuite/tests/backpack/should_fail/bkpfail12.stderr b/testsuite/tests/backpack/should_fail/bkpfail12.stderr index f240d2f058..a7205970fb 100644 --- a/testsuite/tests/backpack/should_fail/bkpfail12.stderr +++ b/testsuite/tests/backpack/should_fail/bkpfail12.stderr @@ -1,17 +1,17 @@ [1 of 3] Processing p - [1 of 2] Compiling Q[sig] ( p/Q.hsig, nothing ) - [2 of 2] Compiling P ( p/P.hs, nothing ) + [1 of 2] Compiling Q[sig] ( p\Q.hsig, nothing ) + [2 of 2] Compiling P ( p\P.hs, nothing ) [2 of 3] Processing q Instantiating q - [1 of 1] Compiling Q ( q/Q.hs, bkpfail12.out/q/Q.o ) + [1 of 1] Compiling Q ( q\Q.hs, bkpfail12.out\q\Q.o ) [3 of 3] Processing r - [1 of 3] Compiling H[sig] ( r/H.hsig, nothing ) + [1 of 3] Compiling H[sig] ( r\H.hsig, nothing ) [2 of 3] Instantiating p -bkpfail12.bkp:8:9: error: +bkpfail12.bkp:8:9: error: [GHC-11890] • Identifier ‘f’ has conflicting definitions in the module - and its hsig file + and its hsig file. Main module: f :: GHC.Types.Bool - Hsig file: f :: GHC.Types.Int - The two types are different - • while checking that Q implements signature Q in p[Q=Q] + Hsig file: f :: GHC.Types.Int + The two types are different. + • While checking that ‘Q’ implements signature ‘Q’ in ‘p[Q=Q]’. diff --git a/testsuite/tests/backpack/should_fail/bkpfail13.stderr b/testsuite/tests/backpack/should_fail/bkpfail13.stderr index 13d227a617..fa46c6a61a 100644 --- a/testsuite/tests/backpack/should_fail/bkpfail13.stderr +++ b/testsuite/tests/backpack/should_fail/bkpfail13.stderr @@ -1,17 +1,17 @@ [1 of 3] Processing p - [1 of 2] Compiling Q[sig] ( p/Q.hsig, nothing ) - [2 of 2] Compiling P ( p/P.hs, nothing ) + [1 of 2] Compiling Q[sig] ( p\Q.hsig, nothing ) + [2 of 2] Compiling P ( p\P.hs, nothing ) [2 of 3] Processing q Instantiating q - [1 of 1] Compiling QMe ( q/QMe.hs, bkpfail13.out/q/QMe.o ) + [1 of 1] Compiling QMe ( q\QMe.hs, bkpfail13.out\q\QMe.o ) [3 of 3] Processing r - [1 of 3] Compiling H[sig] ( r/H.hsig, nothing ) + [1 of 3] Compiling H[sig] ( r\H.hsig, nothing ) [2 of 3] Instantiating p -bkpfail13.bkp:8:9: error: +bkpfail13.bkp:8:9: error: [GHC-11890] • Identifier ‘f’ has conflicting definitions in the module - and its hsig file + and its hsig file. Main module: f :: GHC.Types.Bool - Hsig file: f :: GHC.Types.Int - The two types are different - • while checking that q:QMe implements signature Q in p[Q=q:QMe] + Hsig file: f :: GHC.Types.Int + The two types are different. + • While checking that ‘q:QMe’ implements signature ‘Q’ in ‘p[Q=q:QMe]’. diff --git a/testsuite/tests/backpack/should_fail/bkpfail14.stderr b/testsuite/tests/backpack/should_fail/bkpfail14.stderr index 401cab2286..3c1de27b10 100644 --- a/testsuite/tests/backpack/should_fail/bkpfail14.stderr +++ b/testsuite/tests/backpack/should_fail/bkpfail14.stderr @@ -1,20 +1,20 @@ [1 of 3] Processing p - [1 of 3] Compiling Q[sig] ( p/Q.hsig, nothing ) - [2 of 3] Compiling Q2[sig] ( p/Q2.hsig, nothing ) - [3 of 3] Compiling P ( p/P.hs, nothing ) + [1 of 3] Compiling Q[sig] ( p\Q.hsig, nothing ) + [2 of 3] Compiling Q2[sig] ( p\Q2.hsig, nothing ) + [3 of 3] Compiling P ( p\P.hs, nothing ) [2 of 3] Processing q Instantiating q - [1 of 3] Compiling QMe ( q/QMe.hs, bkpfail14.out/q/QMe.o ) - [2 of 3] Compiling Q ( q/Q.hs, bkpfail14.out/q/Q.o ) - [3 of 3] Compiling Q2 ( q/Q2.hs, bkpfail14.out/q/Q2.o ) + [1 of 3] Compiling QMe ( q\QMe.hs, bkpfail14.out\q\QMe.o ) + [2 of 3] Compiling Q ( q\Q.hs, bkpfail14.out\q\Q.o ) + [3 of 3] Compiling Q2 ( q\Q2.hs, bkpfail14.out\q\Q2.o ) [3 of 3] Processing r - [1 of 3] Compiling H[sig] ( r/H.hsig, nothing ) + [1 of 3] Compiling H[sig] ( r\H.hsig, nothing ) [2 of 3] Instantiating p -bkpfail14.bkp:9:9: error: +bkpfail14.bkp:9:9: error: [GHC-11890] • Identifier ‘f’ has conflicting definitions in the module - and its hsig file + and its hsig file. Main module: f :: GHC.Types.Bool - Hsig file: f :: GHC.Types.Int - The two types are different - • while checking that QMe implements signature Q in p[Q=QMe,Q2=Q2] + Hsig file: f :: GHC.Types.Int + The two types are different. + • While checking that ‘QMe’ implements signature ‘Q’ in ‘p[Q=QMe,Q2=Q2]’. diff --git a/testsuite/tests/backpack/should_fail/bkpfail15.stderr b/testsuite/tests/backpack/should_fail/bkpfail15.stderr index cf30efe6f8..18c86e4b44 100644 --- a/testsuite/tests/backpack/should_fail/bkpfail15.stderr +++ b/testsuite/tests/backpack/should_fail/bkpfail15.stderr @@ -1,18 +1,18 @@ [1 of 3] Processing p - [1 of 3] Compiling A[sig] ( p/A.hsig, nothing ) - [2 of 3] Compiling Q[sig] ( p/Q.hsig, nothing ) - [3 of 3] Compiling P ( p/P.hs, nothing ) + [1 of 3] Compiling A[sig] ( p\A.hsig, nothing ) + [2 of 3] Compiling Q[sig] ( p\Q.hsig, nothing ) + [3 of 3] Compiling P ( p\P.hs, nothing ) [2 of 3] Processing q Instantiating q - [1 of 1] Compiling Q ( q/Q.hs, bkpfail15.out/q/Q.o ) + [1 of 1] Compiling Q ( q\Q.hs, bkpfail15.out\q\Q.o ) [3 of 3] Processing r - [1 of 2] Compiling A[sig] ( r/A.hsig, nothing ) + [1 of 2] Compiling A[sig] ( r\A.hsig, nothing ) [2 of 2] Instantiating p -bkpfail15.bkp:8:9: error: +bkpfail15.bkp:8:9: error: [GHC-11890] • Identifier ‘f’ has conflicting definitions in the module - and its hsig file + and its hsig file. Main module: f :: GHC.Types.Bool - Hsig file: f :: GHC.Types.Int - The two types are different - • while checking that q:Q implements signature Q in p[A=<A>,Q=q:Q] + Hsig file: f :: GHC.Types.Int + The two types are different. + • While checking that ‘q:Q’ implements signature ‘Q’ in ‘p[A=<A>,Q=q:Q]’. diff --git a/testsuite/tests/backpack/should_fail/bkpfail16.stderr b/testsuite/tests/backpack/should_fail/bkpfail16.stderr index af4d241106..6196ab958a 100644 --- a/testsuite/tests/backpack/should_fail/bkpfail16.stderr +++ b/testsuite/tests/backpack/should_fail/bkpfail16.stderr @@ -1,11 +1,11 @@ [1 of 2] Processing p - [1 of 1] Compiling ShouldFail[sig] ( p/ShouldFail.hsig, nothing ) + [1 of 1] Compiling ShouldFail[sig] ( p\ShouldFail.hsig, nothing ) [2 of 2] Processing q Instantiating q - [1 of 1] Including p[ShouldFail=base-4.13.0.0:Data.Bool] - Instantiating p[ShouldFail=base-4.13.0.0:Data.Bool] - [1 of 1] Compiling ShouldFail[sig] ( p/ShouldFail.hsig, bkpfail16.out/p/p-1OqLaT7dAn947wScQQKCw5/ShouldFail.o ) + [1 of 1] Including p[ShouldFail=base-4.18.0.0:Data.Bool] + Instantiating p[ShouldFail=base-4.18.0.0:Data.Bool] + [1 of 1] Compiling ShouldFail[sig] ( p\ShouldFail.hsig, bkpfail16.out\p\p-1OqLaT7dAn947wScQQKCw5\ShouldFail.o ) -bkpfail16.out/p/p-1OqLaT7dAn947wScQQKCw5/../ShouldFail.hi:1:1: error: [GHC-93011] +bkpfail16.out\p\p-1OqLaT7dAn947wScQQKCw5\..\ShouldFail.hi:1:1: error: [GHC-93011] • ‘Booly’ is exported by the hsig file, but not exported by the implementing module ‘Data.Bool’ - • while checking that Data.Bool implements signature ShouldFail in p[ShouldFail=Data.Bool] + • While checking that ‘Data.Bool’ implements signature ‘ShouldFail’ in ‘p[ShouldFail=Data.Bool]’. diff --git a/testsuite/tests/backpack/should_fail/bkpfail17.stderr b/testsuite/tests/backpack/should_fail/bkpfail17.stderr index 2777b503ed..699de6374c 100644 --- a/testsuite/tests/backpack/should_fail/bkpfail17.stderr +++ b/testsuite/tests/backpack/should_fail/bkpfail17.stderr @@ -1,18 +1,18 @@ [1 of 2] Processing p - [1 of 1] Compiling ShouldFail[sig] ( p/ShouldFail.hsig, nothing ) + [1 of 1] Compiling ShouldFail[sig] ( p\ShouldFail.hsig, nothing ) [2 of 2] Processing q Instantiating q - [1 of 1] Including p[ShouldFail=base-4.16.0.0:Prelude] - Instantiating p[ShouldFail=base-4.16.0.0:Prelude] - [1 of 1] Compiling ShouldFail[sig] ( p/ShouldFail.hsig, bkpfail17.out/p/p-2W6J7O3LvroH97zGxbPEGF/ShouldFail.o ) + [1 of 1] Including p[ShouldFail=base-4.18.0.0:Prelude] + Instantiating p[ShouldFail=base-4.18.0.0:Prelude] + [1 of 1] Compiling ShouldFail[sig] ( p\ShouldFail.hsig, bkpfail17.out\p\p-2W6J7O3LvroH97zGxbPEGF\ShouldFail.o ) -<no location info>: error: +<no location info>: error: [GHC-15843] • Type constructor ‘Either’ has conflicting definitions in the module - and its hsig file + and its hsig file. Main module: type Either :: * -> * -> * data Either a b = Left a | Right b - Hsig file: type role Either representational phantom phantom - type Either :: * -> * -> * -> * - data Either a b c = Left a - The types have different kinds - • while checking that Prelude implements signature ShouldFail in p[ShouldFail=Prelude] + Hsig file: type role Either representational phantom phantom + type Either :: * -> * -> * -> * + data Either a b c = Left a + The types have different kinds. + • While checking that ‘Prelude’ implements signature ‘ShouldFail’ in ‘p[ShouldFail=Prelude]’. diff --git a/testsuite/tests/backpack/should_fail/bkpfail19.stderr b/testsuite/tests/backpack/should_fail/bkpfail19.stderr index a66eca5e60..6540bfd0e9 100644 --- a/testsuite/tests/backpack/should_fail/bkpfail19.stderr +++ b/testsuite/tests/backpack/should_fail/bkpfail19.stderr @@ -1,12 +1,12 @@ [1 of 2] Processing p - [1 of 1] Compiling ShouldFail[sig] ( p/ShouldFail.hsig, nothing ) + [1 of 1] Compiling ShouldFail[sig] ( p\ShouldFail.hsig, nothing ) [2 of 2] Processing q Instantiating q - [1 of 1] Including p[ShouldFail=base-4.13.0.0:Data.STRef] - Instantiating p[ShouldFail=base-4.13.0.0:Data.STRef] - [1 of 1] Compiling ShouldFail[sig] ( p/ShouldFail.hsig, bkpfail19.out/p/p-CfyUIAu1JTRCDuXEyGszXN/ShouldFail.o ) + [1 of 1] Including p[ShouldFail=base-4.18.0.0:Data.STRef] + Instantiating p[ShouldFail=base-4.18.0.0:Data.STRef] + [1 of 1] Compiling ShouldFail[sig] ( p\ShouldFail.hsig, bkpfail19.out\p\p-CfyUIAu1JTRCDuXEyGszXN\ShouldFail.o ) -<no location info>: error: +<no location info>: error: [GHC-12424] • The hsig file (re)exports ‘Data.STRef.Lazy.newSTRef’ but the implementing module exports a different identifier ‘GHC.STRef.newSTRef’ - • while checking that Data.STRef implements signature ShouldFail in p[ShouldFail=Data.STRef] + • While checking that ‘Data.STRef’ implements signature ‘ShouldFail’ in ‘p[ShouldFail=Data.STRef]’. diff --git a/testsuite/tests/backpack/should_fail/bkpfail22.stderr b/testsuite/tests/backpack/should_fail/bkpfail22.stderr index cb0a0e23fa..c03360435f 100644 --- a/testsuite/tests/backpack/should_fail/bkpfail22.stderr +++ b/testsuite/tests/backpack/should_fail/bkpfail22.stderr @@ -1,23 +1,23 @@ [1 of 4] Processing p - [1 of 2] Compiling H[sig] ( p/H.hsig, nothing ) - [2 of 2] Compiling M ( p/M.hs, nothing ) + [1 of 2] Compiling H[sig] ( p\H.hsig, nothing ) + [2 of 2] Compiling M ( p\M.hs, nothing ) [2 of 4] Processing q - [1 of 2] Compiling H2[sig] ( q/H2.hsig, nothing ) - [2 of 2] Compiling N ( q/N.hs, nothing ) + [1 of 2] Compiling H2[sig] ( q\H2.hsig, nothing ) + [2 of 2] Compiling N ( q\N.hs, nothing ) [3 of 4] Processing badimpl Instantiating badimpl - [1 of 1] Compiling H2 ( badimpl/H2.hs, bkpfail22.out/badimpl/H2.o ) + [1 of 1] Compiling H2 ( badimpl\H2.hs, bkpfail22.out\badimpl\H2.o ) [4 of 4] Processing check Instantiating check [1 of 2] Including q[H2=badimpl:H2] Instantiating q[H2=badimpl:H2] - [1 of 2] Compiling H2[sig] ( q/H2.hsig, bkpfail22.out/q/q-FjwGsuDQ5qiKUCvnEATUA9/H2.o ) + [1 of 2] Compiling H2[sig] ( q\H2.hsig, bkpfail22.out\q\q-FjwGsuDQ5qiKUCvnEATUA9\H2.o ) -bkpfail22.bkp:16:9: error: +bkpfail22.bkp:16:9: error: [GHC-15843] • Type constructor ‘S’ has conflicting definitions in the module - and its hsig file + and its hsig file. Main module: type S :: * type S = () - Hsig file: type S :: * - type S = GHC.Types.Bool - • while checking that badimpl:H2 implements signature H2 in q[H2=badimpl:H2] + Hsig file: type S :: * + type S = GHC.Types.Bool + • While checking that ‘badimpl:H2’ implements signature ‘H2’ in ‘q[H2=badimpl:H2]’. diff --git a/testsuite/tests/backpack/should_fail/bkpfail23.stderr b/testsuite/tests/backpack/should_fail/bkpfail23.stderr index a8144dbde5..d8e492cf55 100644 --- a/testsuite/tests/backpack/should_fail/bkpfail23.stderr +++ b/testsuite/tests/backpack/should_fail/bkpfail23.stderr @@ -1,23 +1,24 @@ [1 of 3] Processing p - [1 of 2] Compiling H[sig] ( p/H.hsig, nothing ) - [2 of 2] Compiling M ( p/M.hs, nothing ) + [1 of 2] Compiling H[sig] ( p\H.hsig, nothing ) + [2 of 2] Compiling M ( p\M.hs, nothing ) [2 of 3] Processing h Instantiating h - [1 of 1] Compiling H ( h/H.hs, bkpfail23.out/h/H.o ) + [1 of 1] Compiling H ( h\H.hs, bkpfail23.out\h\H.o ) [3 of 3] Processing r Instantiating r [1 of 1] Including p[H=h:H] Instantiating p[H=h:H] - [1 of 2] Compiling H[sig] ( p/H.hsig, bkpfail23.out/p/p-6KeuBvYi0jvLWqVbkSAZMq/H.o ) + [1 of 2] Compiling H[sig] ( p\H.hsig, bkpfail23.out\p\p-6KeuBvYi0jvLWqVbkSAZMq\H.o ) -bkpfail23.bkp:15:9: error: +bkpfail23.bkp:15:9: error: [GHC-15843] • Type constructor ‘F’ has conflicting definitions in the module - and its hsig file + and its hsig file. Main module: type F :: * -> * type F a = () - Hsig file: type role F phantom - type F :: * -> * - data F a + Hsig file: type role F phantom + type F :: * -> * + data F a Illegal parameterized type synonym in implementation of abstract data. - (Try eta reducing your type synonym so that it is nullary.) - • while checking that h:H implements signature H in p[H=h:H] + • While checking that ‘h:H’ implements signature ‘H’ in ‘p[H=h:H]’. + Suggested fix: + If possible, eta-reduce the type synonym ‘F’ so that it is nullary. diff --git a/testsuite/tests/backpack/should_fail/bkpfail25.stderr b/testsuite/tests/backpack/should_fail/bkpfail25.stderr index 9433904ee5..9c483e3593 100644 --- a/testsuite/tests/backpack/should_fail/bkpfail25.stderr +++ b/testsuite/tests/backpack/should_fail/bkpfail25.stderr @@ -1,6 +1,6 @@ [1 of 3] Processing p - [1 of 2] Compiling H[sig] ( p/H.hsig, nothing ) - [2 of 2] Compiling M ( p/M.hs, nothing ) + [1 of 2] Compiling H[sig] ( p\H.hsig, nothing ) + [2 of 2] Compiling M ( p\M.hs, nothing ) bkpfail25.bkp:8:18: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)] • No explicit implementation for @@ -8,19 +8,22 @@ bkpfail25.bkp:8:18: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)] • In the instance declaration for ‘Functor T’ [2 of 3] Processing q Instantiating q - [1 of 1] Compiling H ( q/H.hs, bkpfail25.out/q/H.o ) + [1 of 1] Compiling H ( q\H.hs, bkpfail25.out\q\H.o ) [3 of 3] Processing r Instantiating r [1 of 1] Including p[H=q:H] Instantiating p[H=q:H] - [1 of 2] Compiling H[sig] ( p/H.hsig, bkpfail25.out/p/p-D5Mg3foBSCrDbQDKH4WGSG/H.o ) + [1 of 2] Compiling H[sig] ( p\H.hsig, bkpfail25.out\p\p-D5Mg3foBSCrDbQDKH4WGSG\H.o ) -bkpfail25.bkp:13:9: error: +bkpfail25.bkp:13:9: error: [GHC-15843] • Type constructor ‘T’ has conflicting definitions in the module - and its hsig file + and its hsig file. Main module: type T :: * -> * type T a = a - Hsig file: type role T nominal - type T :: * -> * - data T a - • while checking that q:H implements signature H in p[H=q:H] + Hsig file: type role T nominal + type T :: * -> * + data T a + Illegal parameterized type synonym in implementation of abstract data. + • While checking that ‘q:H’ implements signature ‘H’ in ‘p[H=q:H]’. + Suggested fix: + If possible, eta-reduce the type synonym ‘T’ so that it is nullary. diff --git a/testsuite/tests/backpack/should_fail/bkpfail26.stderr b/testsuite/tests/backpack/should_fail/bkpfail26.stderr index f697f47212..18de9f92b4 100644 --- a/testsuite/tests/backpack/should_fail/bkpfail26.stderr +++ b/testsuite/tests/backpack/should_fail/bkpfail26.stderr @@ -1,23 +1,24 @@ [1 of 3] Processing p - [1 of 2] Compiling H[sig] ( p/H.hsig, nothing ) - [2 of 2] Compiling M ( p/M.hs, nothing ) + [1 of 2] Compiling H[sig] ( p\H.hsig, nothing ) + [2 of 2] Compiling M ( p\M.hs, nothing ) [2 of 3] Processing q Instantiating q - [1 of 1] Compiling H ( q/H.hs, bkpfail26.out/q/H.o ) + [1 of 1] Compiling H ( q\H.hs, bkpfail26.out\q\H.o ) [3 of 3] Processing r Instantiating r [1 of 1] Including p[H=q:H] Instantiating p[H=q:H] - [1 of 2] Compiling H[sig] ( p/H.hsig, bkpfail26.out/p/p-D5Mg3foBSCrDbQDKH4WGSG/H.o ) + [1 of 2] Compiling H[sig] ( p\H.hsig, bkpfail26.out\p\p-D5Mg3foBSCrDbQDKH4WGSG\H.o ) -bkpfail26.bkp:16:9: error: +bkpfail26.bkp:16:9: error: [GHC-15843] • Type constructor ‘T’ has conflicting definitions in the module - and its hsig file + and its hsig file. Main module: type T :: * -> * type T a = [a] - Hsig file: type role T nominal - type T :: * -> * - data T a + Hsig file: type role T nominal + type T :: * -> * + data T a Illegal parameterized type synonym in implementation of abstract data. - (Try eta reducing your type synonym so that it is nullary.) - • while checking that q:H implements signature H in p[H=q:H] + • While checking that ‘q:H’ implements signature ‘H’ in ‘p[H=q:H]’. + Suggested fix: + If possible, eta-reduce the type synonym ‘T’ so that it is nullary. diff --git a/testsuite/tests/backpack/should_fail/bkpfail27.stderr b/testsuite/tests/backpack/should_fail/bkpfail27.stderr index bc5a8c6bd5..d4ae895626 100644 --- a/testsuite/tests/backpack/should_fail/bkpfail27.stderr +++ b/testsuite/tests/backpack/should_fail/bkpfail27.stderr @@ -1,21 +1,21 @@ [1 of 3] Processing p - [1 of 2] Compiling H[sig] ( p/H.hsig, nothing ) - [2 of 2] Compiling M ( p/M.hs, nothing ) + [1 of 2] Compiling H[sig] ( p\H.hsig, nothing ) + [2 of 2] Compiling M ( p\M.hs, nothing ) [2 of 3] Processing q Instantiating q - [1 of 1] Compiling H ( q/H.hs, bkpfail27.out/q/H.o ) + [1 of 1] Compiling H ( q\H.hs, bkpfail27.out\q\H.o ) [3 of 3] Processing r Instantiating r [1 of 1] Including p[H=q:H] Instantiating p[H=q:H] - [1 of 2] Compiling H[sig] ( p/H.hsig, bkpfail27.out/p/p-D5Mg3foBSCrDbQDKH4WGSG/H.o ) + [1 of 2] Compiling H[sig] ( p\H.hsig, bkpfail27.out\p\p-D5Mg3foBSCrDbQDKH4WGSG\H.o ) -bkpfail27.bkp:15:9: error: +bkpfail27.bkp:15:9: error: [GHC-15843] • Type constructor ‘T’ has conflicting definitions in the module - and its hsig file + and its hsig file. Main module: type T :: * type T = F - Hsig file: type T :: * - data T - Illegal type family application in implementation of abstract data. - • while checking that q:H implements signature H in p[H=q:H] + Hsig file: type T :: * + data T + Illegal implementation of abstract data: Invalid type family ‘F’. + • While checking that ‘q:H’ implements signature ‘H’ in ‘p[H=q:H]’. diff --git a/testsuite/tests/backpack/should_fail/bkpfail35.stderr b/testsuite/tests/backpack/should_fail/bkpfail35.stderr index f72bd23184..fc8cabbe4a 100644 --- a/testsuite/tests/backpack/should_fail/bkpfail35.stderr +++ b/testsuite/tests/backpack/should_fail/bkpfail35.stderr @@ -1,18 +1,18 @@ [1 of 4] Processing p - [1 of 2] Compiling A[sig] ( p/A.hsig, nothing ) - [2 of 2] Compiling B ( p/B.hs, nothing ) + [1 of 2] Compiling A[sig] ( p\A.hsig, nothing ) + [2 of 2] Compiling B ( p\B.hs, nothing ) [2 of 4] Processing q - [1 of 2] Compiling A[sig] ( q/A.hsig, nothing ) + [1 of 2] Compiling A[sig] ( q\A.hsig, nothing ) [2 of 2] Instantiating p [3 of 4] Processing aimpl Instantiating aimpl - [1 of 1] Compiling A ( aimpl/A.hs, bkpfail35.out/aimpl/A.o ) + [1 of 1] Compiling A ( aimpl\A.hs, bkpfail35.out\aimpl\A.o ) [4 of 4] Processing r Instantiating r [1 of 1] Including q[A=aimpl:A] Instantiating q[A=aimpl:A] - [1 of 1] Compiling A[sig] ( q/A.hsig, bkpfail35.out/q/q-E72T6bb4XRkIeTPWK2mCKa/A.o ) + [1 of 1] Compiling A[sig] ( q\A.hsig, bkpfail35.out\q\q-E72T6bb4XRkIeTPWK2mCKa\A.o ) -bkpfail35.out/q/q-E72T6bb4XRkIeTPWK2mCKa/../A.hi:1:1: error: [GHC-93011] +bkpfail35.out\q\q-E72T6bb4XRkIeTPWK2mCKa\..\A.hi:1:1: error: [GHC-93011] • ‘y’ is exported by the hsig file, but not exported by the implementing module ‘aimpl:A’ - • while checking that aimpl:A implements signature A in q[A=aimpl:A] + • While checking that ‘aimpl:A’ implements signature ‘A’ in ‘q[A=aimpl:A]’. diff --git a/testsuite/tests/backpack/should_fail/bkpfail37.stderr b/testsuite/tests/backpack/should_fail/bkpfail37.stderr index 4158517b28..320e107bf2 100644 --- a/testsuite/tests/backpack/should_fail/bkpfail37.stderr +++ b/testsuite/tests/backpack/should_fail/bkpfail37.stderr @@ -1,17 +1,17 @@ [1 of 3] Processing p - [1 of 1] Compiling A[sig] ( p/A.hsig, nothing ) + [1 of 1] Compiling A[sig] ( p\A.hsig, nothing ) [2 of 3] Processing q Instantiating q - [1 of 1] Compiling A ( q/A.hs, bkpfail37.out/q/A.o ) + [1 of 1] Compiling A ( q\A.hs, bkpfail37.out\q\A.o ) [3 of 3] Processing r Instantiating r [1 of 1] Including p[A=q:A] Instantiating p[A=q:A] - [1 of 1] Compiling A[sig] ( p/A.hsig, bkpfail37.out/p/p-HVmFlcYSefiK5n1aDP1v7x/A.o ) + [1 of 1] Compiling A[sig] ( p\A.hsig, bkpfail37.out\p\p-HVmFlcYSefiK5n1aDP1v7x\A.o ) bkpfail37.bkp:9:9: error: [GHC-93007] • Identifier ‘op’ has conflicting fixities in the module and its hsig file Main module: infixr 4 Hsig file: infixr 6 - • while checking that q:A implements signature A in p[A=q:A] + • While checking that ‘q:A’ implements signature ‘A’ in ‘p[A=q:A]’. diff --git a/testsuite/tests/backpack/should_fail/bkpfail41.stderr b/testsuite/tests/backpack/should_fail/bkpfail41.stderr index 6f58345fe7..6732d71574 100644 --- a/testsuite/tests/backpack/should_fail/bkpfail41.stderr +++ b/testsuite/tests/backpack/should_fail/bkpfail41.stderr @@ -1,25 +1,25 @@ [1 of 3] Processing p - [1 of 2] Compiling A[sig] ( p/A.hsig, nothing ) - [2 of 2] Compiling B[sig] ( p/B.hsig, nothing ) + [1 of 2] Compiling A[sig] ( p\A.hsig, nothing ) + [2 of 2] Compiling B[sig] ( p\B.hsig, nothing ) [2 of 3] Processing i Instantiating i - [1 of 1] Compiling A ( i/A.hs, bkpfail41.out/i/A.o ) + [1 of 1] Compiling A ( i\A.hs, bkpfail41.out\i\A.o ) [3 of 3] Processing r - [1 of 2] Compiling B[sig] ( r/B.hsig, nothing ) + [1 of 2] Compiling B[sig] ( r\B.hsig, nothing ) [2 of 2] Instantiating p -bkpfail41.bkp:10:9: error: +bkpfail41.bkp:10:9: error: [GHC-15843] • Class ‘C’ has conflicting definitions in the module - and its hsig file + and its hsig file. Main module: type C :: * -> Constraint class C a where f :: a -> a {-# MINIMAL f #-} - Hsig file: type C :: * -> Constraint - class C a where - f :: a -> a - default f :: a -> a - The methods do not match: - The default methods associated with ‘f’ are not compatible - The MINIMAL pragmas are not compatible - • while checking that i:A implements signature A in p[A=i:A,B=<B>] + Hsig file: type C :: * -> Constraint + class C a where + f :: a -> a + default f :: a -> a + The class methods do not match: + The default methods associated with ‘f’ are not compatible. + The MINIMAL pragmas are not compatible. + • While checking that ‘i:A’ implements signature ‘A’ in ‘p[A=i:A,B=<B>]’. diff --git a/testsuite/tests/backpack/should_fail/bkpfail42.stderr b/testsuite/tests/backpack/should_fail/bkpfail42.stderr index 0dfef9355f..b8c6fb4c34 100644 --- a/testsuite/tests/backpack/should_fail/bkpfail42.stderr +++ b/testsuite/tests/backpack/should_fail/bkpfail42.stderr @@ -1,17 +1,20 @@ [1 of 2] Processing p - [1 of 1] Compiling A[sig] ( p/A.hsig, nothing ) + [1 of 1] Compiling A[sig] ( p\A.hsig, nothing ) [2 of 2] Processing q - [1 of 2] Compiling A[sig] ( q/A.hsig, nothing ) + [1 of 2] Compiling A[sig] ( q\A.hsig, nothing ) -bkpfail42.bkp:10:9: error: +bkpfail42.bkp:10:9: error: [GHC-15843] • Type constructor ‘F’ has conflicting definitions in the module - and its hsig file + and its hsig file. Main module: type F :: * -> * type family F a where F a = Int - Hsig file: type F :: * -> * - type family F a where - F a = Bool + Hsig file: type F :: * -> * + type family F a where + F a = Bool + Type family equations do not match: + The second equations do not match. + The equation right-hand sides don't match. • while merging the signatures from: • p[A=<A>]:A • ...and the local signature for A diff --git a/testsuite/tests/backpack/should_fail/bkpfail43.stderr b/testsuite/tests/backpack/should_fail/bkpfail43.stderr index 1231788023..72e48315a0 100644 --- a/testsuite/tests/backpack/should_fail/bkpfail43.stderr +++ b/testsuite/tests/backpack/should_fail/bkpfail43.stderr @@ -17,4 +17,4 @@ bkpfail43.out\p\p-HVmFlcYSefiK5n1aDP1v7x\..\A.hi:1:1: error: [GHC-39999] -- Defined at bkpfail43.bkp:3:18 is provided by ‘q:A’ (maybe you haven't applied a function to enough arguments?) - • while checking that q:A implements signature A in p[A=q:A] + • While checking that ‘q:A’ implements signature ‘A’ in ‘p[A=q:A]’. diff --git a/testsuite/tests/backpack/should_fail/bkpfail45.stderr b/testsuite/tests/backpack/should_fail/bkpfail45.stderr index e2b4236aab..5049f5f4b3 100644 --- a/testsuite/tests/backpack/should_fail/bkpfail45.stderr +++ b/testsuite/tests/backpack/should_fail/bkpfail45.stderr @@ -1,24 +1,23 @@ [1 of 3] Processing p - [1 of 2] Compiling A[sig] ( p/A.hsig, nothing ) - [2 of 2] Compiling B ( p/B.hs, nothing ) + [1 of 2] Compiling A[sig] ( p\A.hsig, nothing ) + [2 of 2] Compiling B ( p\B.hs, nothing ) [2 of 3] Processing a Instantiating a - [1 of 1] Compiling A ( a/A.hs, bkpfail45.out/a/A.o ) + [1 of 1] Compiling A ( a\A.hs, bkpfail45.out\a\A.o ) [3 of 3] Processing q Instantiating q [1 of 1] Including p[A=a:A] Instantiating p[A=a:A] - [1 of 2] Compiling A[sig] ( p/A.hsig, bkpfail45.out/p/p-KvF5Y9pEVY39j64PHPNj9i/A.o ) + [1 of 2] Compiling A[sig] ( p\A.hsig, bkpfail45.out\p\p-KvF5Y9pEVY39j64PHPNj9i\A.o ) -bkpfail45.bkp:14:9: error: +bkpfail45.bkp:14:9: error: [GHC-15843] • Type constructor ‘T’ has conflicting definitions in the module - and its hsig file + and its hsig file. Main module: type role T phantom type T :: * -> * data T a = T - Hsig file: type role T nominal - type T :: * -> * - data T a = T + Hsig file: type role T nominal + type T :: * -> * + data T a = T The roles do not match. - Roles on abstract types default to ‘representational’ in boot files. - • while checking that a:A implements signature A in p[A=a:A] + • While checking that ‘a:A’ implements signature ‘A’ in ‘p[A=a:A]’. diff --git a/testsuite/tests/backpack/should_fail/bkpfail46.stderr b/testsuite/tests/backpack/should_fail/bkpfail46.stderr index 5ab1a5fddb..9b387a39d7 100644 --- a/testsuite/tests/backpack/should_fail/bkpfail46.stderr +++ b/testsuite/tests/backpack/should_fail/bkpfail46.stderr @@ -1,22 +1,23 @@ [1 of 3] Processing p - [1 of 2] Compiling A[sig] ( p/A.hsig, nothing ) - [2 of 2] Compiling M ( p/M.hs, nothing ) + [1 of 2] Compiling A[sig] ( p\A.hsig, nothing ) + [2 of 2] Compiling M ( p\M.hs, nothing ) [2 of 3] Processing q Instantiating q - [1 of 1] Compiling A ( q/A.hs, bkpfail46.out/q/A.o ) + [1 of 1] Compiling A ( q\A.hs, bkpfail46.out\q\A.o ) [3 of 3] Processing r Instantiating r [1 of 1] Including p[A=q:A] Instantiating p[A=q:A] - [1 of 2] Compiling A[sig] ( p/A.hsig, bkpfail46.out/p/p-HVmFlcYSefiK5n1aDP1v7x/A.o ) + [1 of 2] Compiling A[sig] ( p\A.hsig, bkpfail46.out\p\p-HVmFlcYSefiK5n1aDP1v7x\A.o ) -bkpfail46.bkp:16:9: error: +bkpfail46.bkp:16:9: error: [GHC-15843] • Type constructor ‘K’ has conflicting definitions in the module - and its hsig file + and its hsig file. Main module: type K :: * -> Constraint type K a = GHC.Classes.Eq a :: Constraint - Hsig file: type K :: * -> Constraint - class K a + Hsig file: type K :: * -> Constraint + class K a Illegal parameterized type synonym in implementation of abstract data. - (Try eta reducing your type synonym so that it is nullary.) - • while checking that q:A implements signature A in p[A=q:A] + • While checking that ‘q:A’ implements signature ‘A’ in ‘p[A=q:A]’. + Suggested fix: + If possible, eta-reduce the type synonym ‘K’ so that it is nullary. diff --git a/testsuite/tests/backpack/should_fail/bkpfail47.stderr b/testsuite/tests/backpack/should_fail/bkpfail47.stderr index 86453f28ea..adb764be16 100644 --- a/testsuite/tests/backpack/should_fail/bkpfail47.stderr +++ b/testsuite/tests/backpack/should_fail/bkpfail47.stderr @@ -1,22 +1,22 @@ [1 of 3] Processing p - [1 of 1] Compiling A[sig] ( p/A.hsig, nothing ) + [1 of 1] Compiling A[sig] ( p\A.hsig, nothing ) [2 of 3] Processing q - [1 of 1] Compiling A[sig] ( q/A.hsig, nothing ) + [1 of 1] Compiling A[sig] ( q\A.hsig, nothing ) [3 of 3] Processing r - [1 of 3] Compiling A[sig] ( r/A.hsig, nothing ) + [1 of 3] Compiling A[sig] ( r\A.hsig, nothing ) -bkpfail47.bkp:10:9: error: +bkpfail47.bkp:10:9: error: [GHC-15843] • Type constructor ‘T’ has conflicting definitions in the module - and its hsig file + and its hsig file. Main module: type role T representational nominal type T :: * -> * -> * data T a b = MkT - Hsig file: type role T nominal representational - type T :: * -> * -> * - data T a b + Hsig file: type role T nominal representational + type T :: * -> * -> * + data T a b The roles are not compatible: - Main module: [representational, nominal] - Hsig file: [nominal, representational] + Main module: [nominal, representational] + Hsig file: [representational, nominal] • while merging the signatures from: • p[A=<A>]:A • q[A=<A>]:A diff --git a/testsuite/tests/backpack/should_fail/bkpfail50.stderr b/testsuite/tests/backpack/should_fail/bkpfail50.stderr index 2d4d171ea7..0ca6328193 100644 --- a/testsuite/tests/backpack/should_fail/bkpfail50.stderr +++ b/testsuite/tests/backpack/should_fail/bkpfail50.stderr @@ -1,16 +1,16 @@ [1 of 2] Processing p - [1 of 1] Compiling H[sig] ( p/H.hsig, nothing ) + [1 of 1] Compiling H[sig] ( p\H.hsig, nothing ) [2 of 2] Processing q - [1 of 2] Compiling A[sig] ( q/A.hsig, nothing ) + [1 of 2] Compiling A[sig] ( q\A.hsig, nothing ) -bkpfail50.bkp:7:9: error: +bkpfail50.bkp:7:9: error: [GHC-15843] • Type constructor ‘T’ has conflicting definitions in the module - and its hsig file + and its hsig file. Main module: type T :: * data T = T Bool - Hsig file: type T :: * - data T = T Int - The constructors do not match: The types for ‘T’ differ + Hsig file: type T :: * + data T = T Int + The constructors do not match: The types for ‘T’ differ. • while merging the signatures from: • p[H=<A>]:H • ...and the local signature for A diff --git a/testsuite/tests/backpack/should_fail/bkpfail52.stderr b/testsuite/tests/backpack/should_fail/bkpfail52.stderr index 888434e33c..4a920bf65c 100644 --- a/testsuite/tests/backpack/should_fail/bkpfail52.stderr +++ b/testsuite/tests/backpack/should_fail/bkpfail52.stderr @@ -1,16 +1,16 @@ [1 of 2] Processing p - [1 of 1] Compiling H[sig] ( p/H.hsig, nothing ) + [1 of 1] Compiling H[sig] ( p\H.hsig, nothing ) [2 of 2] Processing q - [1 of 3] Compiling B ( q/B.hs, nothing ) - [2 of 3] Compiling A[sig] ( q/A.hsig, nothing ) + [1 of 3] Compiling B ( q\B.hs, nothing ) + [2 of 3] Compiling A[sig] ( q\A.hsig, nothing ) -bkpfail52.bkp:10:9: error: +bkpfail52.bkp:10:9: error: [GHC-15843] • Type constructor ‘T’ has conflicting definitions in the module - and its hsig file + and its hsig file. Main module: type T :: * type T = B.T - Hsig file: type T :: * - data T = T Int + Hsig file: type T :: * + data T = T Int • while merging the signatures from: • p[H=<A>]:H • ...and the local signature for A diff --git a/testsuite/tests/backpack/should_fail/bkpfail53.stderr b/testsuite/tests/backpack/should_fail/bkpfail53.stderr index b694bc57ff..a5939ff072 100644 --- a/testsuite/tests/backpack/should_fail/bkpfail53.stderr +++ b/testsuite/tests/backpack/should_fail/bkpfail53.stderr @@ -1,17 +1,17 @@ [1 of 2] Processing p - [1 of 2] Compiling H[sig] ( p/H.hsig, nothing ) - [2 of 2] Compiling I ( p/I.hs, nothing ) + [1 of 2] Compiling H[sig] ( p\H.hsig, nothing ) + [2 of 2] Compiling I ( p\I.hs, nothing ) [2 of 2] Processing q - [1 of 4] Compiling B ( q/B.hs, nothing ) - [2 of 4] Compiling A[sig] ( q/A.hsig, nothing ) + [1 of 4] Compiling B ( q\B.hs, nothing ) + [2 of 4] Compiling A[sig] ( q\A.hsig, nothing ) -bkpfail53.bkp:15:9: error: +bkpfail53.bkp:15:9: error: [GHC-15843] • Type constructor ‘T’ has conflicting definitions in the module - and its hsig file + and its hsig file. Main module: type T :: * type T = B.T - Hsig file: type T :: * - data T = T Int + Hsig file: type T :: * + data T = T Int • while merging the signatures from: • p[H=<A>]:H • ...and the local signature for A diff --git a/testsuite/tests/backpack/should_fail/bkpfail54.bkp b/testsuite/tests/backpack/should_fail/bkpfail54.bkp new file mode 100644 index 0000000000..4248390c91 --- /dev/null +++ b/testsuite/tests/backpack/should_fail/bkpfail54.bkp @@ -0,0 +1,47 @@ + +-- Check that we do something sensible when we implement +-- abstract data with a quantified type. + +{-# LANGUAGE StandaloneKindSignatures #-} +{-# LANGUAGE TypeFamilies #-} + +unit p where + module M where + import Data.Kind ( Type, Constraint ) + + type C :: Type -> Constraint + class C a where + type family F a :: Type + +unit q where + dependency p + signature H where + data T1 + data T2 + data T3 + module N where + import M ( C(F) ) + import H ( T1, T2, T3 ) + + instance C T1 where + type F T1 = T2 + instance C T2 where + type F T2 = T3 + instance C T3 where + type F T3 = T1 + +unit r where + dependency p + module H where + + class C2 a where {} + data S = MkS + + type T1 = forall a. a -> a + type T2 = forall a. C2 a => a + type T3 = C2 S => S -> S + +unit s where + dependency p + dependency r + dependency q[H=r:H] diff --git a/testsuite/tests/backpack/should_fail/bkpfail54.stderr b/testsuite/tests/backpack/should_fail/bkpfail54.stderr new file mode 100644 index 0000000000..8fd391624e --- /dev/null +++ b/testsuite/tests/backpack/should_fail/bkpfail54.stderr @@ -0,0 +1,51 @@ +[1 of 4] Processing p + Instantiating p + [1 of 1] Compiling M ( p\M.hs, bkpfail54.out\p\M.o ) +[2 of 4] Processing q + [1 of 2] Compiling H[sig] ( q\H.hsig, nothing ) + [2 of 2] Compiling N ( q\N.hs, nothing ) +[3 of 4] Processing r + Instantiating r + [1 of 1] Including p + [1 of 1] Compiling H ( r\H.hs, bkpfail54.out\r\H.o ) +[4 of 4] Processing s + Instantiating s + [1 of 3] Including p + [2 of 3] Including r + [3 of 3] Including q[H=r:H] + Instantiating q[H=r:H] + [1 of 1] Including p + [1 of 2] Compiling H[sig] ( q\H.hsig, bkpfail54.out\q\q-EsMFZGC3QiBIz4krwt67aW\H.o ) + +bkpfail54.bkp:40:5: error: [GHC-15843] + • Type constructor ‘T1’ has conflicting definitions in the module + and its hsig file. + Main module: type T1 :: * + type T1 = forall a. a -> a + Hsig file: type T1 :: * + data T1 + Illegal implementation of abstract data: + Invalid polymorphic type: forall a. a -> a. + • While checking that ‘r:H’ implements signature ‘H’ in ‘q[H=r:H]’. + +bkpfail54.bkp:41:5: error: [GHC-15843] + • Type constructor ‘T2’ has conflicting definitions in the module + and its hsig file. + Main module: type T2 :: * + type T2 = forall a. C2 a => a + Hsig file: type T2 :: * + data T2 + Illegal implementation of abstract data: + Invalid polymorphic type: forall a. C2 a => a. + • While checking that ‘r:H’ implements signature ‘H’ in ‘q[H=r:H]’. + +bkpfail54.bkp:42:5: error: [GHC-15843] + • Type constructor ‘T3’ has conflicting definitions in the module + and its hsig file. + Main module: type T3 :: * + type T3 = C2 S => S -> S + Hsig file: type T3 :: * + data T3 + Illegal implementation of abstract data: + Invalid qualified type: C2 S => S -> S. + • While checking that ‘r:H’ implements signature ‘H’ in ‘q[H=r:H]’. |