Commit 5cc67734 authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

Test Trac #7558

parent a67156ee
{-# LANGUAGE GADTs #-}
module T7558 where
data T a b where
MkT :: (a~Maybe b) => a -> Maybe b -> T a b
f :: T a a -> Bool
f (MkT x y) = [x,y] `seq` True
T7558.hs:8:4:
Couldn't match type ‛a’ with ‛Maybe a’
‛a’ is a rigid type variable bound by
the type signature for f :: T a a -> Bool at T7558.hs:7:6
Inaccessible code in
a pattern with constructor
MkT :: forall a b. a ~ Maybe b => a -> Maybe b -> T a b,
in an equation for ‛f’
Relevant bindings include
f :: T a a -> Bool (bound at T7558.hs:8:1)
In the pattern: MkT x y
In an equation for ‛f’: f (MkT x y) = [x, y] `seq` True
...@@ -121,3 +121,4 @@ test('T7321', ...@@ -121,3 +121,4 @@ test('T7321',
run_command, run_command,
['$MAKE -s --no-print-directory T7321']) ['$MAKE -s --no-print-directory T7321'])
test('T7974', normal, compile, ['']) test('T7974', normal, compile, [''])
test('T7558', 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