[commit: ghc] master: Add test for Trac #15352 (81d8b17)
git at git.haskell.org
git at git.haskell.org
Wed Jul 11 11:09:46 UTC 2018
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/81d8b1792d01e0645468e35e23e758dd9c7a6349/ghc
>---------------------------------------------------------------
commit 81d8b1792d01e0645468e35e23e758dd9c7a6349
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Wed Jul 11 12:04:46 2018 +0100
Add test for Trac #15352
>---------------------------------------------------------------
81d8b1792d01e0645468e35e23e758dd9c7a6349
.../tests/indexed-types/should_compile/T15352.hs | 31 ++++++++++++++++++++++
testsuite/tests/indexed-types/should_compile/all.T | 2 ++
2 files changed, 33 insertions(+)
diff --git a/testsuite/tests/indexed-types/should_compile/T15352.hs b/testsuite/tests/indexed-types/should_compile/T15352.hs
new file mode 100644
index 0000000..d83512f
--- /dev/null
+++ b/testsuite/tests/indexed-types/should_compile/T15352.hs
@@ -0,0 +1,31 @@
+{-# LANGUAGE TypeInType #-} -- or PolyKinds
+{-# LANGUAGE MultiParamTypeClasses #-}
+{-# LANGUAGE TypeFamilies #-}
+
+module T15352 where
+
+import Data.Kind
+
+class C (x :: Type) (y :: k) where
+ type F y
+
+
+type Hom k = k -> k -> Type
+
+type family Ob (p :: Hom k) :: k -> Constraint
+
+class ( obP ~ Ob p
+ , opP ~ Dom p
+ , obQ ~ Ob q
+ , opQ ~ Dom q
+ , p ~ Dom f
+ , q ~ Cod f
+ ) => Functor' (obP :: i -> Constraint)
+ (opP :: Hom i)
+ (p :: Hom i)
+ (obQ :: j -> Constraint)
+ (opQ :: Hom j)
+ (q :: Hom j)
+ (f :: i -> j) where
+ type Dom f :: Hom i
+ type Cod f :: Hom j
diff --git a/testsuite/tests/indexed-types/should_compile/all.T b/testsuite/tests/indexed-types/should_compile/all.T
index 3f27591..035c85d 100644
--- a/testsuite/tests/indexed-types/should_compile/all.T
+++ b/testsuite/tests/indexed-types/should_compile/all.T
@@ -288,3 +288,5 @@ test('T15318', normal, compile, [''])
test('T15322', normal, compile, [''])
test('T15322a', normal, compile_fail, [''])
test('T15142', normal, compile, [''])
+test('T15352', normal, compile, [''])
+
More information about the ghc-commits
mailing list