summaryrefslogtreecommitdiff
path: root/testsuite/tests/deriving/should_compile/T8740.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/deriving/should_compile/T8740.hs')
-rw-r--r--testsuite/tests/deriving/should_compile/T8740.hs17
1 files changed, 17 insertions, 0 deletions
diff --git a/testsuite/tests/deriving/should_compile/T8740.hs b/testsuite/tests/deriving/should_compile/T8740.hs
new file mode 100644
index 0000000000..95a114cd3a
--- /dev/null
+++ b/testsuite/tests/deriving/should_compile/T8740.hs
@@ -0,0 +1,17 @@
+{-# LANGUAGE GADTs #-}
+{-# LANGUAGE StandaloneDeriving #-}
+module T8740 where
+
+data Abstract
+data Reified
+data Player
+
+data Elect p a where
+ ElectRefAsTypeOf :: Int -> Elect Abstract a -> Elect Abstract a
+ ElectHandle :: a -> Elect Reified a
+ Controller :: Elect Abstract Player
+ Owner :: Elect Abstract Player
+ You :: Elect Abstract Player
+
+deriving instance (Eq a) => Eq (Elect p a)
+deriving instance (Ord a) => Ord (Elect p a)