diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2017-02-22 08:43:58 +0000 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2017-02-22 08:43:58 +0000 |
commit | b125392983401cc9fe13502e52880387bc71a092 (patch) | |
tree | 6936eb6dcc745baeb4d199a2d8b9ce0b67b8b92b | |
parent | 8ccbc2e5252abd4fa67d155d4fff489ee9929906 (diff) | |
download | haskell-b125392983401cc9fe13502e52880387bc71a092.tar.gz |
Test Trac #13271
-rw-r--r-- | testsuite/tests/indexed-types/should_fail/T13271.hs | 13 | ||||
-rw-r--r-- | testsuite/tests/indexed-types/should_fail/T13271.stderr | 4 | ||||
-rw-r--r-- | testsuite/tests/indexed-types/should_fail/all.T | 1 |
3 files changed, 18 insertions, 0 deletions
diff --git a/testsuite/tests/indexed-types/should_fail/T13271.hs b/testsuite/tests/indexed-types/should_fail/T13271.hs new file mode 100644 index 0000000000..3c72d2ce96 --- /dev/null +++ b/testsuite/tests/indexed-types/should_fail/T13271.hs @@ -0,0 +1,13 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeFamilyDependencies #-} + +module T13271 where + +import GHC.TypeLits + +data T1 = T1 +type T2 = TypeError (Text "You can't do that!") + +type family X i = r | r -> i where + X 1 = T1 + X 2 = T2 diff --git a/testsuite/tests/indexed-types/should_fail/T13271.stderr b/testsuite/tests/indexed-types/should_fail/T13271.stderr new file mode 100644 index 0000000000..e28dcea3c2 --- /dev/null +++ b/testsuite/tests/indexed-types/should_fail/T13271.stderr @@ -0,0 +1,4 @@ + +T13271.hs:9:1: error: + • You can't do that! + • In the type synonym declaration for ‘T2’ diff --git a/testsuite/tests/indexed-types/should_fail/all.T b/testsuite/tests/indexed-types/should_fail/all.T index 7f23c34fc5..0645601dcc 100644 --- a/testsuite/tests/indexed-types/should_fail/all.T +++ b/testsuite/tests/indexed-types/should_fail/all.T @@ -130,3 +130,4 @@ test('T12522a', normal, compile_fail, ['']) test('T12867', normal, compile_fail, ['']) test('T7102', [ expect_broken(7102) ], ghci_script, ['T7102.script']) test('T7102a', normal, ghci_script, ['T7102a.script']) +test('T13271', normal, compile_fail, ['']) |