summaryrefslogtreecommitdiff
path: root/testsuite/tests/profiling/should_compile/T14931_State.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/profiling/should_compile/T14931_State.hs')
-rw-r--r--testsuite/tests/profiling/should_compile/T14931_State.hs15
1 files changed, 15 insertions, 0 deletions
diff --git a/testsuite/tests/profiling/should_compile/T14931_State.hs b/testsuite/tests/profiling/should_compile/T14931_State.hs
new file mode 100644
index 0000000000..9008c06a96
--- /dev/null
+++ b/testsuite/tests/profiling/should_compile/T14931_State.hs
@@ -0,0 +1,15 @@
+{-# LANGUAGE FlexibleInstances #-}
+{-# LANGUAGE FunctionalDependencies #-}
+{-# LANGUAGE MultiParamTypeClasses #-}
+{-# LANGUAGE UndecidableInstances #-}
+module T14931_State (MonadState(..), Lazy.evalState) where
+
+import qualified Control.Monad.Trans.State.Lazy as Lazy (StateT, get, put, evalState)
+
+class Monad m => MonadState s m | m -> s where
+ get :: m s
+ put :: s -> m ()
+
+instance Monad m => MonadState s (Lazy.StateT s m) where
+ get = Lazy.get
+ put = Lazy.put