diff options
author | Richard Eisenberg <eir@cis.upenn.edu> | 2014-11-18 15:19:20 -0500 |
---|---|---|
committer | Richard Eisenberg <eir@cis.upenn.edu> | 2014-11-20 15:27:29 -0500 |
commit | cb41e08e4ce687356d1345ad6a1aa3555e505a59 (patch) | |
tree | c1bdfce7ddbe550e5ac9275f61cd474f6b43f68d /testsuite | |
parent | 113a37b6e39a3b4964ea6d93fd7adf30adb39426 (diff) | |
download | haskell-cb41e08e4ce687356d1345ad6a1aa3555e505a59.tar.gz |
Test #9109 in typecheck/should_fail/T9109
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/tests/typecheck/should_fail/T9109.hs | 8 | ||||
-rw-r--r-- | testsuite/tests/typecheck/should_fail/T9109.stderr | 15 | ||||
-rw-r--r-- | testsuite/tests/typecheck/should_fail/all.T | 1 |
3 files changed, 24 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_fail/T9109.hs b/testsuite/tests/typecheck/should_fail/T9109.hs new file mode 100644 index 0000000000..725cb66118 --- /dev/null +++ b/testsuite/tests/typecheck/should_fail/T9109.hs @@ -0,0 +1,8 @@ +{-# LANGUAGE GADTs #-} + +module T9109 where + +data G a where + GBool :: G Bool + +foo GBool = True diff --git a/testsuite/tests/typecheck/should_fail/T9109.stderr b/testsuite/tests/typecheck/should_fail/T9109.stderr new file mode 100644 index 0000000000..5ef2340a74 --- /dev/null +++ b/testsuite/tests/typecheck/should_fail/T9109.stderr @@ -0,0 +1,15 @@ + +T9109.hs:8:13: + Couldn't match expected type ‘t’ with actual type ‘Bool’ + ‘t’ is untouchable + inside the constraints (t1 ~ Bool) + bound by a pattern with constructor + GBool :: G Bool, + in an equation for ‘foo’ + at T9109.hs:8:5-9 + ‘t’ is a rigid type variable bound by + the inferred type of foo :: G t1 -> t at T9109.hs:8:1 + Possible fix: add a type signature for ‘foo’ + Relevant bindings include foo :: G t1 -> t (bound at T9109.hs:8:1) + In the expression: True + In an equation for ‘foo’: foo GBool = True diff --git a/testsuite/tests/typecheck/should_fail/all.T b/testsuite/tests/typecheck/should_fail/all.T index 14df71ed2b..28709e8360 100644 --- a/testsuite/tests/typecheck/should_fail/all.T +++ b/testsuite/tests/typecheck/should_fail/all.T @@ -344,3 +344,4 @@ test('T9739', normal, compile_fail, ['']) test('T9774', normal, compile_fail, ['']) test('T9318', normal, compile_fail, ['']) test('T9201', normal, compile_fail, ['']) +test('T9109', normal, compile_fail, ['']) |