Commit cb41e08e authored by eir@cis.upenn.edu's avatar eir@cis.upenn.edu

Test #9109 in typecheck/should_fail/T9109

parent 113a37b6
{-# LANGUAGE GADTs #-}
module T9109 where
data G a where
GBool :: G Bool
foo GBool = True
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
......@@ -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, [''])
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment