Repository : ssh://darcs.haskell.org//srv/darcs/testsuite On branch : master
https://github.com/ghc/testsuite/commit/48e8390401d17b5bbec412621ff1494550e0b5ed >--------------------------------------------------------------- commit 48e8390401d17b5bbec412621ff1494550e0b5ed Author: Jose Pedro Magalhaes <[email protected]> Date: Tue May 21 14:42:34 2013 +0100 Add test for T5863 As apparently there is already a test named T5863, I named this one T5863a. >--------------------------------------------------------------- tests/deriving/should_fail/T5863a.hs | 12 ++++++++++++ tests/deriving/should_fail/T5863a.stderr | 12 ++++++++++++ tests/deriving/should_fail/all.T | 1 + 3 files changed, 25 insertions(+), 0 deletions(-) diff --git a/tests/deriving/should_fail/T5863a.hs b/tests/deriving/should_fail/T5863a.hs new file mode 100644 index 0000000..3506dcc --- /dev/null +++ b/tests/deriving/should_fail/T5863a.hs @@ -0,0 +1,12 @@ +{-# LANGUAGE DeriveDataTypeable, TypeFamilies #-} + +import Data.Typeable + +class C a where + data T a :: * + +instance C Int where + data T Int = A1 deriving (Typeable) + +instance C Bool where + data T Bool = A2 deriving (Typeable) diff --git a/tests/deriving/should_fail/T5863a.stderr b/tests/deriving/should_fail/T5863a.stderr new file mode 100644 index 0000000..7b29ce0 --- /dev/null +++ b/tests/deriving/should_fail/T5863a.stderr @@ -0,0 +1,12 @@ + +T5863a.hs:9:31: + Can't make a derived instance of âTypeable * (T Int)â: + Deriving Typeable is not allowed for family instances; + derive Typeable for âTâ alone + In the data instance declaration for âTâ + +T5863a.hs:12:32: + Can't make a derived instance of âTypeable * (T Bool)â: + Deriving Typeable is not allowed for family instances; + derive Typeable for âTâ alone + In the data instance declaration for âTâ diff --git a/tests/deriving/should_fail/all.T b/tests/deriving/should_fail/all.T index e7cb909..ad96a11 100644 --- a/tests/deriving/should_fail/all.T +++ b/tests/deriving/should_fail/all.T @@ -39,3 +39,4 @@ test('T1133A', extra_clean(['T1133A.o-boot', 'T1133A.hi-boot']), run_command, ['$MAKE --no-print-directory -s T1133A']) +test('T5863a', normal, compile_fail, [''])
_______________________________________________ ghc-commits mailing list [email protected] http://www.haskell.org/mailman/listinfo/ghc-commits
