summaryrefslogtreecommitdiff
path: root/testsuite/tests/deriving/should_fail/T14728a.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/deriving/should_fail/T14728a.hs')
-rw-r--r--testsuite/tests/deriving/should_fail/T14728a.hs20
1 files changed, 20 insertions, 0 deletions
diff --git a/testsuite/tests/deriving/should_fail/T14728a.hs b/testsuite/tests/deriving/should_fail/T14728a.hs
new file mode 100644
index 0000000000..28cf8e0ffc
--- /dev/null
+++ b/testsuite/tests/deriving/should_fail/T14728a.hs
@@ -0,0 +1,20 @@
+{-# LANGUAGE GeneralizedNewtypeDeriving #-}
+{-# LANGUAGE StandaloneDeriving #-}
+{-# LANGUAGE TypeFamilies #-}
+{-# LANGUAGE TypeInType #-}
+module T14728a where
+
+import Data.Functor.Identity
+import Data.Kind
+
+class C (a :: Type) where
+ type T a (x :: a) :: Type
+ type U z :: a
+
+instance C () where
+ type T () '() = Bool
+
+deriving instance C (Identity a)
+
+f :: T (Identity ()) ('Identity '())
+f = True