summaryrefslogtreecommitdiff
path: root/testsuite/tests/polykinds/T14710.hs
blob: 2fec10a7a16bffd99aaa7aa53c396c4522e1bdc0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE ScopedTypeVariables #-}
module T14710 where

import Data.Proxy

class C a b where
  c1 :: Proxy (x :: a) -> b
  c2 :: forall (x :: a). Proxy x -> b

f :: forall a. a -> a
f x = const x (const g1 g2)
  where
    g1 :: Proxy (x :: a)
    g1 = Proxy

    g2 :: forall (x :: a). Proxy x
    g2 = Proxy

h1 :: forall k a. Proxy (a :: k)
h1 = Proxy

h2 :: forall k (a :: k). Proxy a
h2 = Proxy