[commit: ghc] master: Test Trac #10753 (79e0a10)
git at git.haskell.org
git at git.haskell.org
Fri Aug 7 11:32:56 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/79e0a10e541724713f1149c468ba966b7fc819d3/ghc
>---------------------------------------------------------------
commit 79e0a10e541724713f1149c468ba966b7fc819d3
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Fri Aug 7 12:32:09 2015 +0100
Test Trac #10753
>---------------------------------------------------------------
79e0a10e541724713f1149c468ba966b7fc819d3
.../tests/indexed-types/should_compile/T10753.hs | 23 ++++++++++++++++++++++
testsuite/tests/indexed-types/should_compile/all.T | 2 ++
2 files changed, 25 insertions(+)
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 0000000..6939ce1
--- /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 ff5070b..7bbb04b 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, [''])
+
More information about the ghc-commits
mailing list