summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/simplCore/should_compile/T15453.hs25
-rw-r--r--testsuite/tests/simplCore/should_compile/all.T1
2 files changed, 26 insertions, 0 deletions
diff --git a/testsuite/tests/simplCore/should_compile/T15453.hs b/testsuite/tests/simplCore/should_compile/T15453.hs
new file mode 100644
index 0000000000..a452bef0df
--- /dev/null
+++ b/testsuite/tests/simplCore/should_compile/T15453.hs
@@ -0,0 +1,25 @@
+{-# LANGUAGE ImpredicativeTypes #-}
+{-# LANGUAGE RankNTypes #-}
+{-# LANGUAGE TypeFamilies #-}
+{-# LANGUAGE TypeInType #-}
+{-# LANGUAGE TypeOperators #-}
+{-# LANGUAGE UndecidableInstances #-}
+module T15453 where
+
+import Data.Kind
+import Data.Proxy
+import Data.Type.Equality
+
+type family S :: Type where
+ S = T
+type family T :: Type where
+ T = Int
+
+f :: (forall (x :: S). Proxy x) :~: (forall (x :: T). Proxy x)
+f = Refl
+
+g :: (forall (x :: T). Proxy x) :~: (forall (x :: Int). Proxy x)
+g = Refl
+
+h :: (forall (x :: S). Proxy x) :~: (forall (x :: Int). Proxy x)
+h = f `trans` g
diff --git a/testsuite/tests/simplCore/should_compile/all.T b/testsuite/tests/simplCore/should_compile/all.T
index 5ad7dba94a..fe9cb05ec0 100644
--- a/testsuite/tests/simplCore/should_compile/all.T
+++ b/testsuite/tests/simplCore/should_compile/all.T
@@ -316,3 +316,4 @@ test('T15005', normal, compile, ['-O'])
# we omit profiling because it affects the optimiser and makes the test fail
test('T15056', [extra_files(['T15056a.hs']), omit_ways(['profasm'])], multimod_compile, ['T15056', '-O -v0 -ddump-rule-firings'])
test('T15186', normal, multimod_compile, ['T15186', '-v0'])
+test('T15453', normal, compile, ['-dcore-lint -O1'])