[commit: testsuite] master: Test Trac #8450 (8c88d0a)
git at git.haskell.org
git at git.haskell.org
Wed Nov 6 09:46:58 UTC 2013
Repository : ssh://git@git.haskell.org/testsuite
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/8c88d0a9b205a31b1708a7069c4aa417373f9ac3/testsuite
>---------------------------------------------------------------
commit 8c88d0a9b205a31b1708a7069c4aa417373f9ac3
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Wed Nov 6 09:46:44 2013 +0000
Test Trac #8450
>---------------------------------------------------------------
8c88d0a9b205a31b1708a7069c4aa417373f9ac3
tests/typecheck/should_fail/T8450.hs | 8 ++++++++
tests/typecheck/should_fail/T8450.stderr | 13 +++++++++++++
tests/typecheck/should_fail/all.T | 1 +
3 files changed, 22 insertions(+)
diff --git a/tests/typecheck/should_fail/T8450.hs b/tests/typecheck/should_fail/T8450.hs
new file mode 100644
index 0000000..ac122e7
--- /dev/null
+++ b/tests/typecheck/should_fail/T8450.hs
@@ -0,0 +1,8 @@
+{-# LANGUAGE ScopedTypeVariables #-}
+module T8450 where
+
+runEffect :: Either Bool r -> r
+runEffect = undefined
+
+run :: forall a. a
+run = runEffect $ (undefined :: Either a ())
diff --git a/tests/typecheck/should_fail/T8450.stderr b/tests/typecheck/should_fail/T8450.stderr
new file mode 100644
index 0000000..3688005
--- /dev/null
+++ b/tests/typecheck/should_fail/T8450.stderr
@@ -0,0 +1,13 @@
+
+T8450.hs:8:20:
+ Couldn't match type ‛a’ with ‛Bool’
+ ‛a’ is a rigid type variable bound by
+ the type signature for run :: a at T8450.hs:7:15
+ Expected type: Either Bool ()
+ Actual type: Either a ()
+ Relevant bindings include run :: a (bound at T8450.hs:8:1)
+ In the second argument of ‛($)’, namely
+ ‛(undefined :: Either a ())’
+ In the expression: runEffect $ (undefined :: Either a ())
+ In an equation for ‛run’:
+ run = runEffect $ (undefined :: Either a ())
diff --git a/tests/typecheck/should_fail/all.T b/tests/typecheck/should_fail/all.T
index 0abc6c7..1d15999 100644
--- a/tests/typecheck/should_fail/all.T
+++ b/tests/typecheck/should_fail/all.T
@@ -322,3 +322,4 @@ test('TcCoercibleFail2', when(compiler_lt('ghc', '7.7'), skip), compile_fail, ['
test('T8306', normal, compile_fail, [''])
test('T8392a', normal, compile_fail, [''])
test('T8428', normal, compile_fail, [''])
+test('T8450', normal, compile_fail, [''])
More information about the ghc-commits
mailing list