summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/T10432.hs
blob: ec46f17f14a08fe858731eb3ebaa6107df0b016e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{-# LANGUAGE ExistentialQuantification, PolyKinds,
             DataKinds, RankNTypes, GADTs, TypeOperators #-}
module T10432 where

import Data.Kind (Type)
import Data.Type.Equality

data WrappedType = forall a. WrapType a;

matchReflK :: forall (a :: ka) (b :: kb) (r :: Type).
  ('WrapType a :~: 'WrapType b) -> (('WrapType a ~ 'WrapType b) => r) -> r;
  matchReflK Refl r = r;

matchReflK2 :: forall (a :: ka) (b :: kb) (r :: Type).
               ('WrapType a :~: 'WrapType b) ->  r
matchReflK2 x = let foo :: ('WrapType a ~ 'WrapType b) => r
                    foo = undefined
                in undefined