Make a Functor (IOEnv m) instance so it satisfies the new Quasi requirements
[ghc-hetmet.git] / compiler / utils / IOEnv.hs
index c0277ae..c72347e 100644 (file)
@@ -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)