diff options
-rw-r--r-- | compiler/utils/IOEnv.hs | 3 |
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) |