Commit 79e0a10e authored by Simon Peyton Jones's avatar Simon Peyton Jones

Test Trac #10753

parent 6cab3afe
{-# 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 ()
......@@ -261,3 +261,5 @@ test('T10226', normal, compile, [''])
test('T10507', normal, compile, [''])
test('T10634', normal, compile, [''])
test('T10713', normal, compile, [''])
test('T10753', normal, compile, [''])
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment