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

-- Make sure for-alls can occur in data types

module Foo where

newtype CPS1 a = CPS1 { unCPS1 :: forall ans . (a -> ans) -> ans }

newtype CPS2 a = CPS2 (forall ans . (a -> ans) -> ans)
	-- This one also has an interesting record selector;
	-- caused an applyTypeArgs crash in 5.02.1

data 	CPS3 a = CPS3 { unCPS3 :: forall ans . (a -> ans) -> ans }
data 	CPS4 a = CPS4 (forall ans . (a -> ans) -> ans)