[Haskell-beginners] testing IO code
Maurizio Vitale
mrz.vtl at gmail.com
Mon Mar 16 14:21:33 UTC 2015
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20150316/6aad3062/attachment.html>
More information about the Beginners
mailing list