[Haskell-cafe] [newbie] How to test this function?
bulat.ziganshin at gmail.com
Thu Sep 21 04:30:34 EDT 2006
Thursday, September 21, 2006, 8:28:23 AM, you wrote:
> First, how do I fix the identation of the if then else?
http://haskell.org/haskellwiki/IO_inside contains a lot of information
about using IO monad
> Second, I want to test this function, without hitting the filesystem. In
> C++ I would use a istringstream. I couldn't find a function that returns
> a Handle from a String.
although you will need to slightly change your program using v*
operations instead of h*, in return you will get ability to use String
h1 <- openFile "test" ReadMode
h2 <- newStringReader "input"
Bulat mailto:Bulat.Ziganshin at gmail.com
More information about the Haskell-Cafe