From: Ian Lynagh Date: Thu, 22 Mar 2007 17:01:14 +0000 (+0000) Subject: Make a Functor (IOEnv m) instance so it satisfies the new Quasi requirements X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=aba08f650f66a7979b7d8e513f8630663f33f4fb;p=ghc-hetmet.git Make a Functor (IOEnv m) instance so it satisfies the new Quasi requirements --- diff --git a/compiler/utils/IOEnv.hs b/compiler/utils/IOEnv.hs index c0277ae..c72347e 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)