diff options
Diffstat (limited to 'testsuite/tests/backpack')
15 files changed, 54 insertions, 24 deletions
diff --git a/testsuite/tests/backpack/should_fail/bkpfail04.stderr b/testsuite/tests/backpack/should_fail/bkpfail04.stderr index 07159cf277..0cb8d9cfe0 100644 --- a/testsuite/tests/backpack/should_fail/bkpfail04.stderr +++ b/testsuite/tests/backpack/should_fail/bkpfail04.stderr @@ -8,8 +8,10 @@ bkpfail04.bkp:7:9: error: • Type constructor ‘A’ has conflicting definitions in the module and its hsig file - Main module: data A = A {foo :: Int} - Hsig file: data A = A {bar :: Bool} + Main module: type A :: * + data A = A {foo :: Int} + 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 diff --git a/testsuite/tests/backpack/should_fail/bkpfail06.stderr b/testsuite/tests/backpack/should_fail/bkpfail06.stderr index 27e0ddf006..a707bf06b6 100644 --- a/testsuite/tests/backpack/should_fail/bkpfail06.stderr +++ b/testsuite/tests/backpack/should_fail/bkpfail06.stderr @@ -14,7 +14,9 @@ bkpfail06.bkp:10:9: error: • Type constructor ‘T’ has conflicting definitions in the module and its hsig file - Main module: data T = T GHC.Types.Bool - Hsig file: data T = T GHC.Types.Int + 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] diff --git a/testsuite/tests/backpack/should_fail/bkpfail07.stderr b/testsuite/tests/backpack/should_fail/bkpfail07.stderr index f8cf6b000a..05277035dd 100644 --- a/testsuite/tests/backpack/should_fail/bkpfail07.stderr +++ b/testsuite/tests/backpack/should_fail/bkpfail07.stderr @@ -10,7 +10,9 @@ bkpfail07.bkp:6:9: error: • Type constructor ‘T’ has conflicting definitions in the module and its hsig file - Main module: data T = T GHC.Types.Bool - Hsig file: data T = T GHC.Types.Int + 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] diff --git a/testsuite/tests/backpack/should_fail/bkpfail10.stderr b/testsuite/tests/backpack/should_fail/bkpfail10.stderr index 70b0853dc5..78ceaffb30 100644 --- a/testsuite/tests/backpack/should_fail/bkpfail10.stderr +++ b/testsuite/tests/backpack/should_fail/bkpfail10.stderr @@ -12,8 +12,10 @@ bkpfail10.bkp:8:9: error: • Type constructor ‘H’ has conflicting definitions in the module and its hsig file - Main module: data H a = H a - Hsig file: data H + 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] diff --git a/testsuite/tests/backpack/should_fail/bkpfail17.stderr b/testsuite/tests/backpack/should_fail/bkpfail17.stderr index 7bd5c5778d..81e47ec524 100644 --- a/testsuite/tests/backpack/should_fail/bkpfail17.stderr +++ b/testsuite/tests/backpack/should_fail/bkpfail17.stderr @@ -9,8 +9,10 @@ <no location info>: error: • Type constructor ‘Either’ has conflicting definitions in the module and its hsig file - Main module: data Either a b = Left a | Right b + 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] diff --git a/testsuite/tests/backpack/should_fail/bkpfail22.stderr b/testsuite/tests/backpack/should_fail/bkpfail22.stderr index fe066bd039..cb0a0e23fa 100644 --- a/testsuite/tests/backpack/should_fail/bkpfail22.stderr +++ b/testsuite/tests/backpack/should_fail/bkpfail22.stderr @@ -16,6 +16,8 @@ bkpfail22.bkp:16:9: error: • Type constructor ‘S’ has conflicting definitions in the module and its hsig file - Main module: type S = () - Hsig file: type S = GHC.Types.Bool + 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] diff --git a/testsuite/tests/backpack/should_fail/bkpfail23.stderr b/testsuite/tests/backpack/should_fail/bkpfail23.stderr index 00a19e2001..6a2eb8ce1e 100644 --- a/testsuite/tests/backpack/should_fail/bkpfail23.stderr +++ b/testsuite/tests/backpack/should_fail/bkpfail23.stderr @@ -13,8 +13,10 @@ bkpfail23.bkp:14:9: error: • Type constructor ‘F’ has conflicting definitions in the module and its hsig file - Main module: type F a = () + Main module: type F :: * -> * + type 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.) diff --git a/testsuite/tests/backpack/should_fail/bkpfail25.stderr b/testsuite/tests/backpack/should_fail/bkpfail25.stderr index 1a9c573157..cedcd30399 100644 --- a/testsuite/tests/backpack/should_fail/bkpfail25.stderr +++ b/testsuite/tests/backpack/should_fail/bkpfail25.stderr @@ -18,7 +18,9 @@ bkpfail25.bkp:7:18: warning: [-Wmissing-methods (in -Wdefault)] bkpfail25.bkp:12:9: error: • Type constructor ‘T’ has conflicting definitions in the module and its hsig file - Main module: type T a = a + 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] diff --git a/testsuite/tests/backpack/should_fail/bkpfail26.stderr b/testsuite/tests/backpack/should_fail/bkpfail26.stderr index 3de59a22c7..09410cedfe 100644 --- a/testsuite/tests/backpack/should_fail/bkpfail26.stderr +++ b/testsuite/tests/backpack/should_fail/bkpfail26.stderr @@ -13,8 +13,10 @@ bkpfail26.bkp:15:9: error: • Type constructor ‘T’ has conflicting definitions in the module and its hsig file - Main module: type T a = [a] + Main module: type T :: * -> * + type T a = [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.) diff --git a/testsuite/tests/backpack/should_fail/bkpfail27.stderr b/testsuite/tests/backpack/should_fail/bkpfail27.stderr index dfadb40773..bc5a8c6bd5 100644 --- a/testsuite/tests/backpack/should_fail/bkpfail27.stderr +++ b/testsuite/tests/backpack/should_fail/bkpfail27.stderr @@ -13,7 +13,9 @@ bkpfail27.bkp:15:9: error: • Type constructor ‘T’ has conflicting definitions in the module and its hsig file - Main module: type T = F - Hsig file: data T + 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] diff --git a/testsuite/tests/backpack/should_fail/bkpfail41.stderr b/testsuite/tests/backpack/should_fail/bkpfail41.stderr index 9a1b4218e0..6cd72dcad1 100644 --- a/testsuite/tests/backpack/should_fail/bkpfail41.stderr +++ b/testsuite/tests/backpack/should_fail/bkpfail41.stderr @@ -10,10 +10,12 @@ bkpfail41.bkp:10:9: error: • Class ‘C’ has conflicting definitions in the module and its hsig file - Main module: class C a where + Main module: type C :: * -> Constraint + class C a where f :: a -> a {-# MINIMAL f #-} - Hsig file: class C a where + Hsig file: type C :: * -> Constraint + class C a where f :: a -> a default f :: a -> a The methods do not match: diff --git a/testsuite/tests/backpack/should_fail/bkpfail42.stderr b/testsuite/tests/backpack/should_fail/bkpfail42.stderr index 467ab717aa..5b078910f9 100644 --- a/testsuite/tests/backpack/should_fail/bkpfail42.stderr +++ b/testsuite/tests/backpack/should_fail/bkpfail42.stderr @@ -6,10 +6,12 @@ bkpfail42.bkp:9:9: error: • Type constructor ‘F’ has conflicting definitions in the module and its hsig file - Main module: type family F a :: * - where F a = Int - Hsig file: type family F a :: * - where F a = Bool + Main module: type F :: * -> * + type family F a where + F a = Int + Hsig file: type F :: * -> * + type family F a where + F a = Bool • while merging the signatures from: • p[A=<A>]:A • ...and the local signature for A diff --git a/testsuite/tests/backpack/should_fail/bkpfail45.stderr b/testsuite/tests/backpack/should_fail/bkpfail45.stderr index 737769384d..f28f18316b 100644 --- a/testsuite/tests/backpack/should_fail/bkpfail45.stderr +++ b/testsuite/tests/backpack/should_fail/bkpfail45.stderr @@ -14,8 +14,10 @@ bkpfail45.bkp:13:9: error: • Type constructor ‘T’ has conflicting definitions in the module 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 The roles do not match. Roles on abstract types default to ‘representational’ in boot files. diff --git a/testsuite/tests/backpack/should_fail/bkpfail46.stderr b/testsuite/tests/backpack/should_fail/bkpfail46.stderr index 9aeaccbb7e..908866f67c 100644 --- a/testsuite/tests/backpack/should_fail/bkpfail46.stderr +++ b/testsuite/tests/backpack/should_fail/bkpfail46.stderr @@ -13,8 +13,10 @@ bkpfail46.bkp:15:9: error: • Type constructor ‘K’ has conflicting definitions in the module and its hsig file - Main module: type K a = GHC.Classes.Eq a :: Constraint - Hsig file: class K a + Main module: type K :: * -> Constraint + type K a = GHC.Classes.Eq a :: Constraint + 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] diff --git a/testsuite/tests/backpack/should_fail/bkpfail47.stderr b/testsuite/tests/backpack/should_fail/bkpfail47.stderr index b2bc08b4c2..0eb58d8ee4 100644 --- a/testsuite/tests/backpack/should_fail/bkpfail47.stderr +++ b/testsuite/tests/backpack/should_fail/bkpfail47.stderr @@ -9,8 +9,10 @@ bkpfail47.bkp:9:9: error: • Type constructor ‘T’ has conflicting definitions in the module 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 The roles are not compatible: Main module: [representational, nominal] |