io exercise in haskell