[commit: ghc] master: Test Trac #13271 (b125392)

git at git.haskell.org git at git.haskell.org
Wed Feb 22 11:20:11 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/b125392983401cc9fe13502e52880387bc71a092/ghc

>---------------------------------------------------------------

commit b125392983401cc9fe13502e52880387bc71a092
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Wed Feb 22 08:43:58 2017 +0000

    Test Trac #13271


>---------------------------------------------------------------

b125392983401cc9fe13502e52880387bc71a092
 testsuite/tests/indexed-types/should_fail/T13271.hs     | 13 +++++++++++++
 testsuite/tests/indexed-types/should_fail/T13271.stderr |  4 ++++
 testsuite/tests/indexed-types/should_fail/all.T         |  1 +
 3 files changed, 18 insertions(+)

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 0000000..3c72d2c
--- /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 0000000..e28dcea
--- /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 7f23c34..0645601 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, [''])



More information about the ghc-commits mailing list