Commit ce286f4d authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

T3208b rightly rejects the program

parent ea3df4d2
{-# LANGUAGE TypeFamilies #-}
-- This should fail
module T3208b where
class SUBST s where
......@@ -10,7 +12,11 @@ class OBJECT o where
apply :: (SUBST s, OTerm o ~ STerm s) => s -> o
fce' :: (OTerm a ~ STerm a, OBJECT a, SUBST a) => a -> c
fce' f = fce . apply $ f
fce' f = fce (apply f)
-- f :: a
-- apply f :: (OBJECT a, SUBST a, OTerm o ~ STerm a) => o
-- fce called with a=o, gives wanted (OTerm o ~ STerm o, OBJECT o, SUBST o)
fce :: (OTerm a ~ STerm a, OBJECT a, SUBST a) => a -> c
fce f = fce' f
......@@ -132,7 +132,7 @@ test('TF_GADT', normal, compile, [''])
test('T2203b', normal, compile, [''])
test('T2767', normal, compile, [''])
test('T3208a', normal, compile, [''])
test('T3208b', expect_fail, compile, [''])
test('T3208b', normal, compile_fail, [''])
test('T3418', normal, compile, [''])
test('T3423', normal, compile, [''])
test('T2850', normal, compile, [''])
......
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