[Haskell-cafe] Re: [Haskell] ANN: IOSpec 0.1

Wouter Swierstra wss at Cs.Nott.AC.UK
Wed Apr 25 06:01:49 EDT 2007

Hi Isaac,

<Moving to Haskell-cafe>

> How does or might this relate to the typeclass-based Restricted IO  
> monad
> http://article.gmane.org/gmane.comp.lang.haskell.general/14526
> ?  RIO's technique has the advantage that multiple capabilities can be
> easily combined in one use of the monad - but this manner of using
> typeclasses might interfere with how testable it is? (I think that
> should be okay...  Also that this is a really neat project -  
> incremental
> progress on taming Haskell IO in practice!)

Stefan is absolutely right. The RIO, as far as I remember, restricts  
which parts of the IO monad you use. The same could be said for the  
Test.IOSpec modules. However, the Test.IOSpec also give you a pure  
specification of the functions you are using. This is very important  
if you want to trace/debug an execution of you code - you can see how  
the state of your machine changes at every step. There's also a bit  
finer control over how you test your functions: concurrent code is  
parameterised over the scheduler, for instance. Both these aren't  
possible with the RIO approach.

> P.S. why
>> *If you're an ICFP referee, you may want to avoid reading any  
>> further*

ICFP has a double-blind review process: if I were to submit a paper,  
I should do so anonymously. The idea behind it all is that if the  
reviewers don't know who the author of a paper is, they can't be  
prejudiced. The code I just released is described in a paper  
submitted to ICFP.

All the best,


This message has been checked for viruses but the contents of an attachment
may still contain software viruses, which could damage your computer system:
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.

More information about the Haskell-Cafe mailing list