summaryrefslogtreecommitdiff
path: root/testsuite/tests/deriving/should_compile/T14933.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/deriving/should_compile/T14933.hs')
-rw-r--r--testsuite/tests/deriving/should_compile/T14933.hs22
1 files changed, 22 insertions, 0 deletions
diff --git a/testsuite/tests/deriving/should_compile/T14933.hs b/testsuite/tests/deriving/should_compile/T14933.hs
new file mode 100644
index 0000000000..2682d6242f
--- /dev/null
+++ b/testsuite/tests/deriving/should_compile/T14933.hs
@@ -0,0 +1,22 @@
+{-# LANGUAGE DefaultSignatures #-}
+{-# LANGUAGE DeriveAnyClass #-}
+{-# LANGUAGE TypeFamilies #-}
+module T14933 where
+
+class Wrapped s where
+ type Unwrapped s :: *
+
+class Fork m where
+ fork :: (x, m)
+
+ default fork :: ( Wrapped m
+ , Unwrapped m ~ t
+ , Fork t
+ ) => (x, m)
+ fork = undefined
+
+newtype MyThing m = MyThing m
+ deriving Fork
+
+instance Wrapped (MyThing m) where
+ type Unwrapped (MyThing m) = m