Say I have a function
function1 :: (MonadError String m, MonadIO m) => m Int
function2 :: (MonadError Int m, MonadIO m) => m Int
and conversion function Int
toString
renderException :: Int -> String
Is there a way to implement function 3 that reuses all 3 functions?
function3 :: (MonadError String m, MonadIO m) => m Int
-- add the results from function1, function2 and
-- transform function2 error into a String
source
share