diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2014-12-18 11:19:14 +0000 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2014-12-18 11:19:52 +0000 |
commit | 6ec9e958d6a6693dedbcbfc74f164d38e5fb5381 (patch) | |
tree | f9263a192d115fceaa28ea093a9002d90bc5145b /testsuite | |
parent | 726ea08a6e5899ccefe9b9bd65738141f257fc13 (diff) | |
download | haskell-6ec9e958d6a6693dedbcbfc74f164d38e5fb5381.tar.gz |
Fix wrong-kind-of-family error message (Trac #9896)
Diffstat (limited to 'testsuite')
5 files changed, 20 insertions, 6 deletions
diff --git a/testsuite/tests/indexed-types/should_fail/SimpleFail3a.stderr b/testsuite/tests/indexed-types/should_fail/SimpleFail3a.stderr index 7db6f3b91a..795188e922 100644 --- a/testsuite/tests/indexed-types/should_fail/SimpleFail3a.stderr +++ b/testsuite/tests/indexed-types/should_fail/SimpleFail3a.stderr @@ -1,5 +1,5 @@ SimpleFail3a.hs:10:3: - Wrong category of family instance; declaration was for a data type + Wrong category of family instance; declaration was for a data family In the type instance declaration for ‘S1’ In the instance declaration for ‘C1 Int’ diff --git a/testsuite/tests/indexed-types/should_fail/T9896.hs b/testsuite/tests/indexed-types/should_fail/T9896.hs new file mode 100644 index 0000000000..ca5238e22f --- /dev/null +++ b/testsuite/tests/indexed-types/should_fail/T9896.hs @@ -0,0 +1,8 @@ +{-# LANGUAGE TypeFamilies #-} +module T9896 where + +class Test a where + type TestT a :: * + +instance Test Bool where + newtype TestT Bool = Int diff --git a/testsuite/tests/indexed-types/should_fail/T9896.stderr b/testsuite/tests/indexed-types/should_fail/T9896.stderr new file mode 100644 index 0000000000..f46e406f03 --- /dev/null +++ b/testsuite/tests/indexed-types/should_fail/T9896.stderr @@ -0,0 +1,5 @@ + +T9896.hs:8:3: + Wrong category of family instance; declaration was for a type family + In the newtype instance declaration for ‘TestT’ + In the instance declaration for ‘Test Bool’ diff --git a/testsuite/tests/indexed-types/should_fail/all.T b/testsuite/tests/indexed-types/should_fail/all.T index 93085af239..821342cdfa 100644 --- a/testsuite/tests/indexed-types/should_fail/all.T +++ b/testsuite/tests/indexed-types/should_fail/all.T @@ -131,3 +131,4 @@ test('BadSock', normal, compile_fail, ['']) test('T9580', normal, multimod_compile_fail, ['T9580', '']) test('T9662', normal, compile_fail, ['']) test('T7862', normal, compile_fail, ['']) +test('T9896', normal, compile_fail, ['']) diff --git a/testsuite/tests/typecheck/should_fail/AssocTyDef03.stderr b/testsuite/tests/typecheck/should_fail/AssocTyDef03.stderr index c0950bcc74..0f0c951a1d 100644 --- a/testsuite/tests/typecheck/should_fail/AssocTyDef03.stderr +++ b/testsuite/tests/typecheck/should_fail/AssocTyDef03.stderr @@ -1,5 +1,5 @@ -
-AssocTyDef03.hs:6:5:
- Wrong category of family instance; declaration was for a data type
- In the default type instance declaration for ‘Typ’
- In the class declaration for ‘Cls’
+ +AssocTyDef03.hs:6:5: + Wrong category of family instance; declaration was for a data family + In the default type instance declaration for ‘Typ’ + In the class declaration for ‘Cls’ |