diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2012-08-29 11:34:32 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2012-08-29 11:34:32 +0100 |
commit | c5b92198ac416bc244fe8b59d728a8c005d7d985 (patch) | |
tree | 1e93b51bfa96f0a01c48f60b15f9c891d1f8704c /testsuite/tests | |
parent | 4976939a05a1b83502c6a75a7fa4b9034cc58b8a (diff) | |
download | haskell-c5b92198ac416bc244fe8b59d728a8c005d7d985.tar.gz |
Teat Trac #7175
Diffstat (limited to 'testsuite/tests')
-rw-r--r-- | testsuite/tests/typecheck/should_fail/T7175.hs | 11 | ||||
-rw-r--r-- | testsuite/tests/typecheck/should_fail/T7175.stderr | 6 | ||||
-rw-r--r-- | testsuite/tests/typecheck/should_fail/all.T | 1 |
3 files changed, 18 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_fail/T7175.hs b/testsuite/tests/typecheck/should_fail/T7175.hs new file mode 100644 index 0000000000..909834c29d --- /dev/null +++ b/testsuite/tests/typecheck/should_fail/T7175.hs @@ -0,0 +1,11 @@ +{-# LANGUAGE TypeFamilies, GADTs #-} + +module T7175 where + +type family F a + +data G1 a where + G1C :: F Int + +data G2 a where + G2C :: F Int diff --git a/testsuite/tests/typecheck/should_fail/T7175.stderr b/testsuite/tests/typecheck/should_fail/T7175.stderr new file mode 100644 index 0000000000..92272b6b36 --- /dev/null +++ b/testsuite/tests/typecheck/should_fail/T7175.stderr @@ -0,0 +1,6 @@ + +T7175.hs:8:4: + Data constructor `G1C' returns type `F Int' + instead of an instance of its parent type `G1 a' + In the definition of data constructor `G1C' + In the data declaration for `G1' diff --git a/testsuite/tests/typecheck/should_fail/all.T b/testsuite/tests/typecheck/should_fail/all.T index c7e347404e..7e6f20893c 100644 --- a/testsuite/tests/typecheck/should_fail/all.T +++ b/testsuite/tests/typecheck/should_fail/all.T @@ -280,3 +280,4 @@ test('T7019a', normal, compile_fail,['']) test('T5978', normal, compile_fail, ['']) test('TcMultiWayIfFail', if_compiler_lt('ghc', '7.5', skip), compile_fail, ['']) test('T2534', normal, compile_fail, ['']) +test('T7175', normal, compile_fail, ['']) |