Commit 932f0867 authored by Simon Peyton Jones's avatar Simon Peyton Jones

Test Trac #9858 comment:101

parent 746f086e
{-# LANGUAGE ImpredicativeTypes, FlexibleContexts #-}
module T9858b where
import Data.Typeable
i :: (Typeable a, Typeable b) => Proxy (a b) -> TypeRep
i p = typeRep p
j = i (Proxy :: Proxy (Eq Int => Int))
T9858c.hs:9:8: error:
Couldn't match type ‘Eq Int => Int’ with ‘a0 b0’
Expected type: Proxy (a0 b0)
Actual type: Proxy (Eq Int => Int)
In the first argument of ‘i’, namely
‘(Proxy :: Proxy (Eq Int => Int))’
In the expression: i (Proxy :: Proxy (Eq Int => Int))
In an equation for ‘j’: j = i (Proxy :: Proxy (Eq Int => Int))
......@@ -358,3 +358,4 @@ test('T10194', normal, compile_fail, [''])
test('T8030', normal, compile_fail, [''])
test('T9858a', normal, compile_fail, [''])
test('T9858b', normal, compile_fail, [''])
test('T9858c', 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