summaryrefslogtreecommitdiff
path: root/testsuite/tests/deriving/should_compile/T18914.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/deriving/should_compile/T18914.hs')
-rw-r--r--testsuite/tests/deriving/should_compile/T18914.hs12
1 files changed, 12 insertions, 0 deletions
diff --git a/testsuite/tests/deriving/should_compile/T18914.hs b/testsuite/tests/deriving/should_compile/T18914.hs
new file mode 100644
index 0000000000..8d30695cf4
--- /dev/null
+++ b/testsuite/tests/deriving/should_compile/T18914.hs
@@ -0,0 +1,12 @@
+{-# LANGUAGE GeneralizedNewtypeDeriving #-}
+{-# LANGUAGE RankNTypes #-}
+module T18914 where
+
+type T f = forall a. f a
+
+class C f where
+ m1 :: T f
+ m2 :: forall a. f a
+
+newtype N f a = MkN (f a)
+ deriving C