Commit 881b85f1 authored by Simon Peyton Jones's avatar Simon Peyton Jones

Test Trac #2714

parent 756b6183
{-# LANGUAGE ScopedTypeVariables #-}
-- Trac #2714
module T2714 where
f :: ((a -> b) -> b) -> (forall c. c -> a)
f = fmap
T2714.hs:8:4:
Couldn't match expected type `a' against inferred type `f b'
`a' is a rigid type variable bound by
the type signature for `f' at T2714.hs:7:7
In the expression: fmap
In the definition of `f': f = fmap
T2714.hs:8:4:
Couldn't match expected type `c'
against inferred type `f (f b -> b)'
`c' is a rigid type variable bound by
the polymorphic type `forall c. c -> a' at T2714.hs:8:4
In the expression: fmap
In the definition of `f': f = fmap
......@@ -199,3 +199,4 @@ test('T2307', normal, compile_fail, [''])
test('T2414', normal, compile_fail, [''])
test('T2538', normal, compile_fail, [''])
test('T2688', normal, compile_fail, [''])
test('T2714', 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