Commit 5dc88b72 authored by Jan Stolarek's avatar Jan Stolarek

Add test for T10836 (expected broken)

parent 37445780
{-# LANGUAGE TypeFamilies #-}
module T10836 where
type family Foo a = r | r -> a where
Foo Int = Int
Foo Bool = Int
type family Bar a = r | r -> a where
Bar Int = Int
Bar Bool = Int
T10836.hs:5:5: error:
Type family equations violate injectivity annotation:
Foo Int = Int
Foo Bool = Int
In the equations for closed type family ‘Foo’
In the type family declaration for ‘Foo’
T10836.hs:9:5: error:
Type family equations violate injectivity annotation:
Bar Int = Int
Bar Bool = Int
In the equations for closed type family ‘Bar’
In the type family declaration for ‘Bar’
......@@ -395,3 +395,4 @@ test('ExpandSynsFail2', normal, compile_fail, ['-fprint-expanded-synonyms'])
test('ExpandSynsFail3', normal, compile_fail, ['-fprint-expanded-synonyms'])
test('ExpandSynsFail4', normal, compile_fail, ['-fprint-expanded-synonyms'])
test('T10698', expect_broken(10698), compile_fail, [''])
test('T10836', expect_broken(10836), 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