<div dir="ltr">suppose I have a restricted IO monad, RIO that only exposes readFile.<div>and then I have a monad SIO that will eventually provide a virtual file system from a map path->content, also with a readFile function returning SIO(String).</div><div><br></div><div>What is the way to write a function parseFile that can operate in both monads so that I can use SIO for testing? should I define a third monad CompileMonad that has instances for both RIO and SIO and then having parseFile :: CompileMonad ast?</div><div><br></div><div>Thanks,</div><div><br></div><div>  Maurizio</div></div>