suppose I have a restricted IO monad, RIO that only exposes readFile.
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).

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?

Thanks,

  Maurizio