Re: [Haskell-cafe] get a string representation (show) of a function argument

2012-03-31 Thread Roman Cheplyaka
* TP [2012-04-01 00:29:15+0200] > I am wondering if there is any means to get "f 3 5" instead of "8" in the > output of this program. No, this is not possible by referential transparency. The output of your function can't depend on whether it is passed 8 or the result of f 3 5. In Lisp-like lan

[Haskell-cafe] get a string representation (show) of a function argument

2012-03-31 Thread TP
Hi, I don't known the advanced features and extensions of GHC at all. Look at the following program: f :: Integer -> Integer -> IO Integer f a b = do print $ "first argument=" ++ (show a) print $ "second argument=" ++ (show b) print $ a+b return (a+b) main = do