summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/tc214.hs
blob: e631854a1e9248f06764e2a23f89dbe593328dba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{-# OPTIONS_GHC -XImpredicativeTypes -fno-warn-deprecated-flags -XGADTs #-}

-- This program sent GHC 6.6 into a loop, because the fixpointing
-- of the substitution in type refinement got its in-scope-set
-- from the answer!

module ShouldCompile where

------------------
data Foo a b where F :: a -> Foo () a

bar :: Foo () (forall a.a) -> ()
bar (F _) = ()

------------------
data Foo2 a where F2 :: a -> Foo2 [a]

bar2 :: Foo2 [forall a.a] -> ()
bar2 (F2 _) = ()