summaryrefslogtreecommitdiff
path: root/testsuite/tests/deriving/should_compile/T15398.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/deriving/should_compile/T15398.hs')
-rw-r--r--testsuite/tests/deriving/should_compile/T15398.hs20
1 files changed, 20 insertions, 0 deletions
diff --git a/testsuite/tests/deriving/should_compile/T15398.hs b/testsuite/tests/deriving/should_compile/T15398.hs
new file mode 100644
index 0000000000..b78df1fa17
--- /dev/null
+++ b/testsuite/tests/deriving/should_compile/T15398.hs
@@ -0,0 +1,20 @@
+{-# LANGUAGE DeriveAnyClass #-}
+{-# LANGUAGE FlexibleContexts #-}
+{-# LANGUAGE GADTs #-}
+{-# LANGUAGE StandaloneDeriving #-}
+
+module T15398 where
+
+newtype Radius a = Radius a deriving (Eq, Ord)
+
+data CourseLine
+data OpenDistance
+data EndOfSpeedSection
+
+data Zone k a where
+ Point :: (Eq a, Ord a) => Zone CourseLine a
+ Vector :: (Eq a, Ord a) => Zone OpenDistance a
+ Conical :: (Eq a, Ord a) => Radius a -> Zone EndOfSpeedSection a
+
+deriving instance Eq a => Eq (Zone k a)
+deriving instance (Eq a, Ord a) => Ord (Zone k a)