main = do [a, b] <- getArgs putStr $ show $ (read a) + (read b)
2 3
[1 of 1] Compiling Main ( prog.hs, prog.o ) prog.hs:2:19: error: Variable not in scope: getArgs :: IO [String] | 2 | [a, b] <- getArgs | ^^^^^^^
Standard output is empty
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!