From aba08f650f66a7979b7d8e513f8630663f33f4fb Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Thu, 22 Mar 2007 17:01:14 +0000 Subject: [PATCH] Make a Functor (IOEnv m) instance so it satisfies the new Quasi requirements --- compiler/utils/IOEnv.hs | 3 +++ 1 file changed, 3 insertions(+) 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) -- 1.7.10.4