1 2 3 4 5 6 7 8
import System.Environment (getProgName, getArgs) main = do argv0 <- getProgName putStr argv0 argv <- getArgs mapM_ (\ x -> putChar ' ' >> putStr x) argv putChar '\n'