[commit: ghc] master: testsuite: AMPify ioprof.hs (6477b3d)

git at git.haskell.org git at git.haskell.org
Wed Sep 10 07:01:47 UTC 2014


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/6477b3dc058a92b825ef30d98797603b4a44a001/ghc

>---------------------------------------------------------------

commit 6477b3dc058a92b825ef30d98797603b4a44a001
Author: Joachim Breitner <mail at joachim-breitner.de>
Date:   Wed Sep 10 09:01:33 2014 +0200

    testsuite: AMPify ioprof.hs


>---------------------------------------------------------------

6477b3dc058a92b825ef30d98797603b4a44a001
 testsuite/tests/profiling/should_run/ioprof.hs | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/testsuite/tests/profiling/should_run/ioprof.hs b/testsuite/tests/profiling/should_run/ioprof.hs
index 2a9930e..98c7f4e 100644
--- a/testsuite/tests/profiling/should_run/ioprof.hs
+++ b/testsuite/tests/profiling/should_run/ioprof.hs
@@ -1,5 +1,7 @@
 import Control.Concurrent
 import Control.Exception
+import Control.Monad (ap, liftM)
+import Control.Applicative
 
 type S = String
 
@@ -10,6 +12,13 @@ instance Monad (M s) where
                             (s',a) -> unM (k a) s'
   return a = M $ \s -> (s,a)
 
+instance Functor (M s) where
+    fmap = liftM
+
+instance Applicative (M s) where
+    pure  = return
+    (<*>) = ap
+
 errorM :: String -> M s a
 errorM s = M $ \_ -> error s
 



More information about the ghc-commits mailing list