[commit: ghc] master: Add regression test for #12104 (69b9b85)
git at git.haskell.org
git at git.haskell.org
Fri Apr 28 18:19:03 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/69b9b853e3e68191cdfa8aec0e4da966298a2659/ghc
>---------------------------------------------------------------
commit 69b9b853e3e68191cdfa8aec0e4da966298a2659
Author: Ryan Scott <ryan.gl.scott at gmail.com>
Date: Fri Apr 28 13:24:11 2017 -0400
Add regression test for #12104
Commit 2f9f1f86849ebc18af409c9b3fd809c9cd464021
(#13487) fixes #12104 as well. This adds a regression test for the
program reported in #12104 to keep it fixed.
Test Plan: make test TEST=T12104
Reviewers: bgamari, austin
Reviewed By: bgamari
Subscribers: rwbarton, thomie
GHC Trac Issues: #12104
Differential Revision: https://phabricator.haskell.org/D3495
>---------------------------------------------------------------
69b9b853e3e68191cdfa8aec0e4da966298a2659
testsuite/tests/typecheck/should_compile/T12104.hs | 11 +++++++++++
testsuite/tests/typecheck/should_compile/T12104.stderr | 5 +++++
testsuite/tests/typecheck/should_compile/all.T | 1 +
3 files changed, 17 insertions(+)
diff --git a/testsuite/tests/typecheck/should_compile/T12104.hs b/testsuite/tests/typecheck/should_compile/T12104.hs
new file mode 100644
index 0000000..12c309c
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/T12104.hs
@@ -0,0 +1,11 @@
+{-# LANGUAGE TypeFamilies, DataKinds, UndecidableInstances #-}
+
+module T12104 where
+
+import GHC.TypeLits
+
+type family F a where
+ F a = TypeError (Text "error")
+
+err :: F ()
+err = ()
diff --git a/testsuite/tests/typecheck/should_compile/T12104.stderr b/testsuite/tests/typecheck/should_compile/T12104.stderr
new file mode 100644
index 0000000..7848551
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/T12104.stderr
@@ -0,0 +1,5 @@
+
+T12104.hs:11:7: warning: [-Wdeferred-type-errors (in -Wdefault)]
+ • error
+ • In the expression: ()
+ In an equation for ‘err’: err = ()
diff --git a/testsuite/tests/typecheck/should_compile/all.T b/testsuite/tests/typecheck/should_compile/all.T
index fcb80da..67fe104 100644
--- a/testsuite/tests/typecheck/should_compile/all.T
+++ b/testsuite/tests/typecheck/should_compile/all.T
@@ -512,6 +512,7 @@ test('T11339c', normal, compile, [''])
test('T11339d', normal, compile, [''])
test('T11974', normal, compile, [''])
test('T12067', [], multimod_compile, ['T12067', '-v0'])
+test('T12104', normal, compile, ['-fdefer-type-errors'])
test('T12185', normal, compile, [''])
test('T12133', normal, compile, [''])
test('T12381', normal, compile, [''])
More information about the ghc-commits
mailing list