summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/T9404b.hs
blob: 2fe837f70eea89571813569bd8c3bd325f6b0029 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{-# LANGUAGE RankNTypes, TypeFamilies #-}

module T9404b where

type family ListTF x where
  ListTF x = [x]

bar :: (forall x. ListTF x -> Int) -> ()
bar _ = ()

myconst :: ((forall r. ListTF r -> Int) -> ()) -> x -> (forall r. ListTF r -> Int) -> ()
myconst x _ = x

foo  = (bar `myconst` ()) $ length
foo2 = (myconst bar ()) $ length