summaryrefslogtreecommitdiff
path: root/testsuite/tests/simplCore/should_compile/T22715_2a.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/simplCore/should_compile/T22715_2a.hs')
-rw-r--r--testsuite/tests/simplCore/should_compile/T22715_2a.hs29
1 files changed, 29 insertions, 0 deletions
diff --git a/testsuite/tests/simplCore/should_compile/T22715_2a.hs b/testsuite/tests/simplCore/should_compile/T22715_2a.hs
new file mode 100644
index 0000000000..d53cccd7aa
--- /dev/null
+++ b/testsuite/tests/simplCore/should_compile/T22715_2a.hs
@@ -0,0 +1,29 @@
+{-# OPTIONS_GHC -Wno-missing-methods #-}
+
+module T22715_2a where
+
+newtype IdentityT m a = IdentityT (m a) deriving Functor
+newtype IdT m a = IdT {runIdT :: m a} deriving Functor
+
+class Functor m => SillyA m where
+ unused :: m a -> m a
+
+class SillyA m => SillyB m where
+ unused2 :: m a -> m a
+
+instance SillyA m => SillyA (IdentityT m) where
+instance SillyB m => SillyB (IdentityT m) where
+
+instance SillyA m => SillyA (IdT m) where
+instance SillyB m => SillyB (IdT m) where
+
+instance SillyA IO where
+instance SillyB IO where
+
+class Functor m => Special m
+instance Functor m => Special (IdT m)
+
+type Input m = IdentityT (IdentityT m)
+
+class (Special m, SillyB m) => CommandMonad m
+instance SillyB m => CommandMonad (IdT (Input m))