summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2015-08-07 12:32:09 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2015-08-07 12:34:11 +0100
commit79e0a10e541724713f1149c468ba966b7fc819d3 (patch)
tree5589b9f2c38afa689141223b59225c20a39345be /testsuite
parent6cab3afe90264b00e2a92f1aef09d6ca4e7a1680 (diff)
downloadhaskell-79e0a10e541724713f1149c468ba966b7fc819d3.tar.gz
Test Trac #10753
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/indexed-types/should_compile/T10753.hs23
-rw-r--r--testsuite/tests/indexed-types/should_compile/all.T2
2 files changed, 25 insertions, 0 deletions
diff --git a/testsuite/tests/indexed-types/should_compile/T10753.hs b/testsuite/tests/indexed-types/should_compile/T10753.hs
new file mode 100644
index 0000000000..6939ce1570
--- /dev/null
+++ b/testsuite/tests/indexed-types/should_compile/T10753.hs
@@ -0,0 +1,23 @@
+{-# LANGUAGE TypeFamilies, MultiParamTypeClasses, FunctionalDependencies, FlexibleInstances #-}
+{-# LANGUAGE KindSignatures #-}
+{-# OPTIONS_GHC -fno-warn-redundant-constraints -fno-warn-missing-methods #-}
+module T10753 where
+
+
+class MonadState s m | m -> s where
+ get :: m s
+
+newtype StateT s m a = StateT { runStateT :: s -> m (a,s) }
+instance (Monad m) => Monad (StateT s m) where
+instance (Functor m, Monad m) => Applicative (StateT s m) where
+instance (Functor m) => Functor (StateT s m) where
+
+instance (Monad m) => MonadState s (StateT s m) where
+
+class HasConns (m :: * -> *) where
+ type Conn m
+
+foo :: (Monad m) => StateT (Conn m) m ()
+foo =
+ do _ <- get
+ return ()
diff --git a/testsuite/tests/indexed-types/should_compile/all.T b/testsuite/tests/indexed-types/should_compile/all.T
index ff5070b4ae..7bbb04b7fc 100644
--- a/testsuite/tests/indexed-types/should_compile/all.T
+++ b/testsuite/tests/indexed-types/should_compile/all.T
@@ -261,3 +261,5 @@ test('T10226', normal, compile, [''])
test('T10507', normal, compile, [''])
test('T10634', normal, compile, [''])
test('T10713', normal, compile, [''])
+test('T10753', normal, compile, [''])
+