X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Futils%2FIOEnv.hs;h=c72347eaab7d0cd0c1451400c3b1a453b705f692;hb=b3ccd6d5a4366dc8089fd9c49f5edf43077de009;hp=c0277ae851118ba14e3f2558ff69b553f1b57145;hpb=046ee54f048ddd721dcee41916d6a6f68db3b15b;p=ghc-hetmet.git 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)