diff options
Diffstat (limited to 'testsuite/tests/indexed-types/should_fail')
13 files changed, 43 insertions, 6 deletions
diff --git a/testsuite/tests/indexed-types/should_fail/BadFamInstDecl.hs b/testsuite/tests/indexed-types/should_fail/BadFamInstDecl.hs new file mode 100644 index 0000000000..ab894db1b1 --- /dev/null +++ b/testsuite/tests/indexed-types/should_fail/BadFamInstDecl.hs @@ -0,0 +1,4 @@ +module BadFamInstDecl where +import BadFamInstDecl_aux + +type instance T Int = Char diff --git a/testsuite/tests/indexed-types/should_fail/BadFamInstDecl.stderr b/testsuite/tests/indexed-types/should_fail/BadFamInstDecl.stderr new file mode 100644 index 0000000000..8b87a97cba --- /dev/null +++ b/testsuite/tests/indexed-types/should_fail/BadFamInstDecl.stderr @@ -0,0 +1,7 @@ +[1 of 2] Compiling BadFamInstDecl_aux ( BadFamInstDecl_aux.hs, BadFamInstDecl_aux.o ) +[2 of 2] Compiling BadFamInstDecl ( BadFamInstDecl.hs, BadFamInstDecl.o ) + +BadFamInstDecl.hs:4:1: [GHC-06206] + Illegal family instance for ‘T’ + In the type instance declaration for ‘T’ + Suggested fix: Perhaps you intended to use TypeFamilies diff --git a/testsuite/tests/indexed-types/should_fail/BadFamInstDecl_aux.hs b/testsuite/tests/indexed-types/should_fail/BadFamInstDecl_aux.hs new file mode 100644 index 0000000000..09f1873a44 --- /dev/null +++ b/testsuite/tests/indexed-types/should_fail/BadFamInstDecl_aux.hs @@ -0,0 +1,4 @@ +{-# LANGUAGE TypeFamilies #-} +module BadFamInstDecl_aux where + +type family T a diff --git a/testsuite/tests/indexed-types/should_fail/HsBootFam.hs b/testsuite/tests/indexed-types/should_fail/HsBootFam.hs new file mode 100644 index 0000000000..0fbae41933 --- /dev/null +++ b/testsuite/tests/indexed-types/should_fail/HsBootFam.hs @@ -0,0 +1,3 @@ +module HsBootFam where + +import {-# SOURCE #-} HsBootFam_aux diff --git a/testsuite/tests/indexed-types/should_fail/HsBootFam.stderr b/testsuite/tests/indexed-types/should_fail/HsBootFam.stderr new file mode 100644 index 0000000000..a6950a3ade --- /dev/null +++ b/testsuite/tests/indexed-types/should_fail/HsBootFam.stderr @@ -0,0 +1,5 @@ +[1 of 3] Compiling HsBootFam_aux[boot] ( HsBootFam_aux.hs-boot, HsBootFam_aux.o-boot ) + +HsBootFam_aux.hs-boot:6:1: [GHC-06203] + Illegal family instance in hs-boot file + In the type instance declaration for ‘F’ diff --git a/testsuite/tests/indexed-types/should_fail/HsBootFam_aux.hs b/testsuite/tests/indexed-types/should_fail/HsBootFam_aux.hs new file mode 100644 index 0000000000..d74cda5e7a --- /dev/null +++ b/testsuite/tests/indexed-types/should_fail/HsBootFam_aux.hs @@ -0,0 +1,6 @@ +{-# LANGUAGE TypeFamilies #-} + +module HsBootFam_aux where + +type family F a +type instance F Int = Char diff --git a/testsuite/tests/indexed-types/should_fail/HsBootFam_aux.hs-boot b/testsuite/tests/indexed-types/should_fail/HsBootFam_aux.hs-boot new file mode 100644 index 0000000000..d74cda5e7a --- /dev/null +++ b/testsuite/tests/indexed-types/should_fail/HsBootFam_aux.hs-boot @@ -0,0 +1,6 @@ +{-# LANGUAGE TypeFamilies #-} + +module HsBootFam_aux where + +type family F a +type instance F Int = Char diff --git a/testsuite/tests/indexed-types/should_fail/Overlap3.stderr b/testsuite/tests/indexed-types/should_fail/Overlap3.stderr index 5659fd1875..144ce6c020 100644 --- a/testsuite/tests/indexed-types/should_fail/Overlap3.stderr +++ b/testsuite/tests/indexed-types/should_fail/Overlap3.stderr @@ -1,4 +1,4 @@ -Overlap3.hs:8:1: +Overlap3.hs:8:1: [GHC-06207] Illegal instance for closed family ‘F’ In the type instance declaration for ‘F’ diff --git a/testsuite/tests/indexed-types/should_fail/Overlap7.stderr b/testsuite/tests/indexed-types/should_fail/Overlap7.stderr index 179251d5a2..04f765f495 100644 --- a/testsuite/tests/indexed-types/should_fail/Overlap7.stderr +++ b/testsuite/tests/indexed-types/should_fail/Overlap7.stderr @@ -1,4 +1,4 @@ -Overlap7.hs:8:1: +Overlap7.hs:8:1: [GHC-06207] Illegal instance for closed family ‘F’ In the type instance declaration for ‘F’ diff --git a/testsuite/tests/indexed-types/should_fail/SimpleFail7.stderr b/testsuite/tests/indexed-types/should_fail/SimpleFail7.stderr index 643709ec7e..1cd89db629 100644 --- a/testsuite/tests/indexed-types/should_fail/SimpleFail7.stderr +++ b/testsuite/tests/indexed-types/should_fail/SimpleFail7.stderr @@ -1,4 +1,4 @@ -SimpleFail7.hs:8:1: +SimpleFail7.hs:8:1: [GHC-06205] Associated type ‘S5’ must be inside a class instance In the data instance declaration for ‘S5’ diff --git a/testsuite/tests/indexed-types/should_fail/T3092.stderr b/testsuite/tests/indexed-types/should_fail/T3092.stderr index 141945c781..4754b3326f 100644 --- a/testsuite/tests/indexed-types/should_fail/T3092.stderr +++ b/testsuite/tests/indexed-types/should_fail/T3092.stderr @@ -1,10 +1,10 @@ -T3092.hs:5:1: +T3092.hs:5:1: [GHC-06204] Illegal family instance for ‘T’ (T is not an indexed type family) In the data instance declaration for ‘T’ -T3092.hs:8:1: +T3092.hs:8:1: [GHC-06204] Illegal family instance for ‘S’ (S is not an indexed type family) In the type instance declaration for ‘S’ diff --git a/testsuite/tests/indexed-types/should_fail/T7862.stderr b/testsuite/tests/indexed-types/should_fail/T7862.stderr index d430310aa9..a625b56098 100644 --- a/testsuite/tests/indexed-types/should_fail/T7862.stderr +++ b/testsuite/tests/indexed-types/should_fail/T7862.stderr @@ -1,5 +1,5 @@ -T7862.hs:23:10: warning: [-Wmissing-methods (in -Wdefault)] +T7862.hs:23:10: warning: [GHC-06201] [-Wmissing-methods (in -Wdefault)] • No explicit implementation for ‘+’, ‘*’, ‘abs’, ‘signum’, ‘fromInteger’, and (either ‘negate’ or diff --git a/testsuite/tests/indexed-types/should_fail/all.T b/testsuite/tests/indexed-types/should_fail/all.T index c056a1e056..e990d572c0 100644 --- a/testsuite/tests/indexed-types/should_fail/all.T +++ b/testsuite/tests/indexed-types/should_fail/all.T @@ -169,3 +169,5 @@ test('ExpandTFs', normal, compile_fail, ['']) test('T20465', normal, compile_fail, ['']) test('T20521', normal, compile_fail, ['']) test('T21896', normal, compile_fail, ['']) +test('HsBootFam', [extra_files(['HsBootFam_aux.hs','HsBootFam_aux.hs-boot'])], multimod_compile_fail, ['HsBootFam', '']) +test('BadFamInstDecl', [extra_files(['BadFamInstDecl_aux.hs'])], multimod_compile_fail, ['BadFamInstDecl', '']) |