summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_fail/T10619.hs
blob: d29c62f75136b6200b1f435bcdb99b192b7abda2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{-# LANGUAGE RankNTypes #-}

module T10619 where

-- tests that type checking doesn't care about order. all of these
-- should fail and be reported.

foo _ = if True
        then ((\x -> x) :: (forall a. a -> a) -> forall b. b -> b)
        else \y -> y

bar _ = if True
        then \y -> y
        else ((\x -> x) :: (forall a. a -> a) -> forall b. b -> b)

baz True  = (\x -> x) :: (forall a. a -> a) -> forall b. b -> b
baz False = \y -> y

quux False = \y -> y
quux True  = (\x -> x) :: (forall a. a -> a) -> forall b. b -> b