summaryrefslogtreecommitdiff
path: root/testsuite/tests/backpack/should_fail/T23344.bkp
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/backpack/should_fail/T23344.bkp')
-rw-r--r--testsuite/tests/backpack/should_fail/T23344.bkp54
1 files changed, 54 insertions, 0 deletions
diff --git a/testsuite/tests/backpack/should_fail/T23344.bkp b/testsuite/tests/backpack/should_fail/T23344.bkp
new file mode 100644
index 0000000000..3d60ff7b51
--- /dev/null
+++ b/testsuite/tests/backpack/should_fail/T23344.bkp
@@ -0,0 +1,54 @@
+{-# LANGUAGE StandaloneKindSignatures #-}
+{-# LANGUAGE TypeFamilies #-}
+{-# LANGUAGE ImpredicativeTypes #-}
+
+unit p where
+ module M where
+ import Data.Kind
+
+ type C :: Type -> Constraint
+ class C a where
+ type family F a :: Type
+
+unit q where
+ dependency p
+ signature H where
+ data T1
+ data T2
+ data T3
+ module N where
+ import M ( C(F) )
+ import H ( T1, T2, T3 )
+
+ instance C T1 where
+ type F T1 = T2
+ instance C T2 where
+ type F T2 = T3
+ instance C T3 where
+ type F T3 = T1
+
+unit r where
+ dependency p
+ module H where
+ import Data.Kind
+
+ type S1 :: Type -> Type
+ data S1 a = MkS1
+
+ type S2 :: Type
+ data S2 = MkS2
+
+ type G :: Type -> Constraint
+ class G a where {}
+
+ type T1 = S1 (forall (a :: Type). a -> a)
+ type T2 = S1 (G S2 => S2)
+
+ type Y = forall a. a -> a
+ type Z = Y
+ type T3 = S1 Y
+
+unit s where
+ dependency p
+ dependency r
+ dependency q[H=r:H]