I want to be able to write
x :: Eff (reader :: Reader Int, maybe :: Maybe) Int
x = do
config <- ask -- configuration from (Reader Int) monad
just config -- using (Maybe) Monad
runX :: Int
runX = runPure (runMaybe doIfNothing (runReader 6 x)) -- outputs: 6
using the Eff
Monad
Is this possible to do using Eff
?
If not how can we make it work not using Eff
?