summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_fail/T7368a.hs
blob: 7b11313c5dca64aeab5a17286a70e6dbe2dcc7a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
{-# LANGUAGE Rank2Types, KindSignatures #-}
module T7368 where

newtype Bad w = Bad (forall a. (w a -> a))
-- Bad :: forall w. (forall a. w a -> a) -> Bad w

fun :: forall (f :: * -> *). f (Bad f) -> Bool
fun (Bad x) = True 

{-  f (Bad f) ~ Bad w
-->
    f ~ Bad
    Bad f ~ w
-}