summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/tc148.hs
blob: c66f723550f36ba188e7420d71a336b0baffa50c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
{-# LANGUAGE Rank2Types #-}

-- This program tickled a bug in 5.02.2's forall-lifting

module ShouldCompile where

class Class x where
 combinator' :: (forall y. Class y => y -> y) -> x -> x

combinator :: (forall y. Class y => y -> y)
           -> (forall x. Class x => x -> x)
combinator f = combinator' f