[Haskell] ANN: IOSpec 0.1

Isaac Dupree isaacdupree at charter.net
Tue Apr 24 19:36:07 EDT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Wouter Swierstra wrote:
> 
> * If you're an ICFP referee, you may want to avoid reading any further*
> 
> 
>             Test.IOSpec    Version 1.0
> 
> 
> I'm pleased to announce the first release of the Test.IOSpec library,
> that provides a pure specification of some functions in the IO monad.
> This may be of interest to anyone who wants to debug, reason about,
> analyse, or test impure code.
> 
> Essentially, by importing libraries from IOSpec you can the same code
> you would normally write in the IO monad. Once you're satisfied that
> your functions are reasonably well-behaved, you can remove the
> Test.IOSpec import and replace it with the "real" functions instead.
> 
>   Website: www.cs.nott.ac.uk/~wss/repos/IOSpec
>   Darcs: darcs get www.cs.nott.ac.uk/~wss/repos/IOSpec
>   Tarball: www.cs.nott.ac.uk/~wss/repos/IOSpec/dist/IOSpec-0.1.tar.gz
>   Haddock: www.cs.nott.ac.uk/~wss/repos/IOSpec/dist/doc/html
> 
> Several examples are included with the sources.
> 
> At the moment, the library consists of the following modules:
> 
>   * Test.IOSpec.Teletype: a specification of getChar and putChar.
>   * Test.IOSpec.IORef: a specification of most functions on IORefs.
>   * Test.IOSpec.Concurrent: specification of forkIO and MVars.
> 
> As an added feature, running concurrent code using
> Test.IOSpec.Concurrent will detect deadlocks, instead of looping
> indefinitely.
> 
> Future work includes:
> 
>   * Improving the interface, making it easier to combine functions from
> different modules.
>   * Adding more functionality: STM and weak pointers seem likely
> candidates.
> 
> If you have any questions, comments, or feedback, please do get in touch.
> 
>   Wouter

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!)


Isaac

P.S. why
> *If you're an ICFP referee, you may want to avoid reading any further*
?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGLpRmHgcxvIWYTTURAluiAKCc3Bhcp6UXF7j0F1ERfVnzWmhoiQCghb0u
wjPxtoY5PPC6TVavW2WP6YQ=
=BBIK
-----END PGP SIGNATURE-----


More information about the Haskell mailing list