summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_fail/tcfail124.hs
blob: 729d14b601110c1f28965da422841c6daed962ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
{-# LANGUAGE RankNTypes #-}

module ShouldFail where

-- With the new typechecker (GHC 7.1), these now all pass

f1 :: (forall a. Eq a => [a]) -> Bool
f1 xs@(x:_)  = x

f2 :: (forall a. Eq a => [a]) -> Bool
f2 [x] = x

f3 :: (forall a. Eq a => [a]) -> Bool
f3 (x:[]) = x