A pure implementation of a fragment of Haskell's IO actions for testing purposes