summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2007-03-22 17:01:14 +0000
committerIan Lynagh <igloo@earth.li>2007-03-22 17:01:14 +0000
commitaba08f650f66a7979b7d8e513f8630663f33f4fb (patch)
treea4494431629ae4d85b7706cf7bf34ba9f88180f1 /compiler
parentfdaede604cfd993d77b458c945c4419e41ed178f (diff)
downloadhaskell-aba08f650f66a7979b7d8e513f8630663f33f4fb.tar.gz
Make a Functor (IOEnv m) instance so it satisfies the new Quasi requirements
Diffstat (limited to 'compiler')
-rw-r--r--compiler/utils/IOEnv.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/utils/IOEnv.hs b/compiler/utils/IOEnv.hs
index c0277ae851..c72347eaab 100644
--- a/compiler/utils/IOEnv.hs
+++ b/compiler/utils/IOEnv.hs
@@ -47,6 +47,9 @@ instance Monad (IOEnv m) where
return = returnM
fail s = failM -- Ignore the string
+instance Functor (IOEnv m) where
+ fmap f (IOEnv m) = IOEnv (\ env -> fmap f (m env))
+
returnM :: a -> IOEnv env a
returnM a = IOEnv (\ env -> return a)